@braintrust/core
Advanced tools
Comparing version 0.0.41 to 0.0.42
@@ -0,1 +1,3 @@ | ||
import { z } from 'zod'; | ||
declare const TRANSACTION_ID_FIELD = "_xact_id"; | ||
@@ -257,19 +259,50 @@ declare const OBJECT_DELETE_FIELD = "_object_delete"; | ||
interface RepoInfo { | ||
commit?: string; | ||
branch?: string; | ||
tag?: string; | ||
dirty?: boolean; | ||
author_name?: string; | ||
author_email?: string; | ||
commit_message?: string; | ||
commit_time?: string; | ||
git_diff?: string; | ||
} | ||
type GitFields = Array<keyof RepoInfo>; | ||
type CollectMetadata = "all" | "none" | "some"; | ||
type GitMetadataSettings = { | ||
collect: CollectMetadata; | ||
fields?: GitFields; | ||
}; | ||
declare const repoInfoSchema: z.ZodObject<{ | ||
commit: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
branch: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
tag: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
dirty: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>; | ||
author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
commit_message: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
commit_time: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
git_diff: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
}, "strict", z.ZodTypeAny, { | ||
commit?: string | null | undefined; | ||
branch?: string | null | undefined; | ||
tag?: string | null | undefined; | ||
dirty?: boolean | null | undefined; | ||
author_name?: string | null | undefined; | ||
author_email?: string | null | undefined; | ||
commit_message?: string | null | undefined; | ||
commit_time?: string | null | undefined; | ||
git_diff?: string | null | undefined; | ||
}, { | ||
commit?: string | null | undefined; | ||
branch?: string | null | undefined; | ||
tag?: string | null | undefined; | ||
dirty?: boolean | null | undefined; | ||
author_name?: string | null | undefined; | ||
author_email?: string | null | undefined; | ||
commit_message?: string | null | undefined; | ||
commit_time?: string | null | undefined; | ||
git_diff?: string | null | undefined; | ||
}>; | ||
type RepoInfo = z.infer<typeof repoInfoSchema>; | ||
declare const gitFieldsSchema: z.ZodEnum<["dirty", "tag", "commit", "branch", "author_name", "author_email", "commit_message", "commit_time", "git_diff"]>; | ||
type GitFields = z.infer<typeof gitFieldsSchema>; | ||
declare const collectMetadataEnum: z.ZodEnum<["all", "none", "some"]>; | ||
type CollectMetadata = z.infer<typeof collectMetadataEnum>; | ||
declare const gitMetadataSettingsSchema: z.ZodObject<{ | ||
collect: z.ZodEnum<["all", "none", "some"]>; | ||
fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["dirty", "tag", "commit", "branch", "author_name", "author_email", "commit_message", "commit_time", "git_diff"]>, "many">>; | ||
}, "strict", z.ZodTypeAny, { | ||
collect: "some" | "none" | "all"; | ||
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined; | ||
}, { | ||
collect: "some" | "none" | "all"; | ||
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined; | ||
}>; | ||
type GitMetadataSettings = z.infer<typeof gitMetadataSettingsSchema>; | ||
declare function mergeGitMetadataSettings(s1: GitMetadataSettings, s2: GitMetadataSettings): GitMetadataSettings; | ||
@@ -280,2 +313,2 @@ | ||
export { ALL_ROW_ID_FIELDS, AUDIT_METADATA_FIELD, AUDIT_SOURCE_FIELD, type AnyDatasetRecord, BT_CURSOR_HEADER, BT_FOUND_EXISTING_HEADER, BT_IMPERSONATE_USER, type BackgroundLogEvent, CREATED_FIELD, type CollectMetadata, type CommentEvent, DEFAULT_IS_LEGACY_DATASET, type DatasetEvent, type DatasetRecord, type ExperimentEvent, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type GitFields, type GitMetadataSettings, ID_FIELD, IS_MERGE_FIELD, type IdField, type InputField, type InputsField, type LogCommentFullArgs, type LogFeedbackFullArgs, type LoggingEvent, MERGE_PATHS_FIELD, OBJECT_DELETE_FIELD, type OtherExperimentLogFields, PARENT_ID_FIELD, type ParentExperimentIds, type ParentProjectLogIds, type RepoInfo, type SanitizedExperimentLogPartialArgs, type Score, type Scorer, type ScorerArgs, type Source, SpanComponentsV1, SpanComponentsV2, SpanObjectTypeV1, SpanObjectTypeV2, SpanRowIdsV1, SpanRowIdsV2, type SpanType, SpanTypeAttribute, TRANSACTION_ID_FIELD, type TransactionId, VALID_SOURCES, batchItems, capitalize, constructJsonArray, ensureDatasetRecord, ensureLegacyDatasetRecord, ensureNewDatasetRecord, loadPrettyXact, makeLegacyEvent, mapAt, mergeDicts, mergeGitMetadataSettings, mergeRowBatch, prettifyXact, snakeToCamelCase, snakeToTitleCase, spanTypeAttributeValues }; | ||
export { ALL_ROW_ID_FIELDS, AUDIT_METADATA_FIELD, AUDIT_SOURCE_FIELD, type AnyDatasetRecord, BT_CURSOR_HEADER, BT_FOUND_EXISTING_HEADER, BT_IMPERSONATE_USER, type BackgroundLogEvent, CREATED_FIELD, type CollectMetadata, type CommentEvent, DEFAULT_IS_LEGACY_DATASET, type DatasetEvent, type DatasetRecord, type ExperimentEvent, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type GitFields, type GitMetadataSettings, ID_FIELD, IS_MERGE_FIELD, type IdField, type InputField, type InputsField, type LogCommentFullArgs, type LogFeedbackFullArgs, type LoggingEvent, MERGE_PATHS_FIELD, OBJECT_DELETE_FIELD, type OtherExperimentLogFields, PARENT_ID_FIELD, type ParentExperimentIds, type ParentProjectLogIds, type RepoInfo, type SanitizedExperimentLogPartialArgs, type Score, type Scorer, type ScorerArgs, type Source, SpanComponentsV1, SpanComponentsV2, SpanObjectTypeV1, SpanObjectTypeV2, SpanRowIdsV1, SpanRowIdsV2, type SpanType, SpanTypeAttribute, TRANSACTION_ID_FIELD, type TransactionId, VALID_SOURCES, batchItems, capitalize, constructJsonArray, ensureDatasetRecord, ensureLegacyDatasetRecord, ensureNewDatasetRecord, gitFieldsSchema, gitMetadataSettingsSchema, loadPrettyXact, makeLegacyEvent, mapAt, mergeDicts, mergeGitMetadataSettings, mergeRowBatch, prettifyXact, snakeToCamelCase, snakeToTitleCase, spanTypeAttributeValues }; |
{ | ||
"name": "@braintrust/core", | ||
"version": "0.0.41", | ||
"version": "0.0.42", | ||
"description": "Shared core dependencies for Braintrust packages", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
3409352
44869
4