@llmops/core 0.6.10-beta.2 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{bun-sqlite-dialect-C06VxkTn.cjs → bun-sqlite-dialect-C3HVUfYl.cjs} +1 -1
- package/dist/db/index.cjs +2 -2
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.mts +1 -1
- package/dist/db/index.mjs +1 -1
- package/dist/{db-CdAtHHw5.mjs → db-CjwRQB4N.mjs} +4 -290
- package/dist/{db-D8otWwZL.cjs → db-D3WDjcvd.cjs} +5 -299
- package/dist/{index-D3onb7gK.d.mts → index-BmGf4wCW.d.cts} +278 -832
- package/dist/{index-CyVFWq76.d.cts → index-BoDvuqku.d.mts} +278 -832
- package/dist/index.cjs +52 -1171
- package/dist/index.d.cts +38 -1082
- package/dist/index.d.mts +38 -1082
- package/dist/index.mjs +52 -1162
- package/dist/{neon-dialect-DIuEesTA.cjs → neon-dialect-BSJpZ9YH.cjs} +1 -1
- package/dist/{neon-dialect-ccr-mLKR.cjs → neon-dialect-DMClTHvw.cjs} +1 -1
- package/dist/{node-sqlite-dialect-AU81Qz0n.cjs → node-sqlite-dialect-BZGXfDHS.cjs} +1 -1
- package/package.json +2 -4
package/dist/db/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_db = require('../db-
|
|
2
|
-
const require_neon_dialect = require('../neon-dialect-
|
|
1
|
+
const require_db = require('../db-D3WDjcvd.cjs');
|
|
2
|
+
const require_neon_dialect = require('../neon-dialect-DMClTHvw.cjs');
|
|
3
3
|
|
|
4
4
|
exports.SCHEMA_METADATA = require_db.SCHEMA_METADATA;
|
|
5
5
|
exports.configVariantsSchema = require_db.configVariantsSchema;
|
package/dist/db/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-
|
|
1
|
+
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-BmGf4wCW.cjs";
|
|
2
2
|
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Dataset, DatasetRecord, DatasetRecordsTable, DatasetVersion, DatasetVersionRecord, DatasetVersionRecordsTable, DatasetVersionsTable, DatasetsTable, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, GuardrailConfig, GuardrailConfigsTable, GuardrailResult, GuardrailResults, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult, Playground, PlaygroundColumn, PlaygroundResult, PlaygroundResultsTable, PlaygroundRun, PlaygroundRunsTable, PlaygroundsTable, ProviderConfig, ProviderConfigsTable, ProviderGuardrailOverride, ProviderGuardrailOverridesTable, SCHEMA_METADATA, Selectable, Span, SpanEvent, SpanEventsTable, SpansTable, TableName, TargetingRule, TargetingRulesTable, Trace, TracesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-
|
|
1
|
+
import { $ as SCHEMA_METADATA, A as DatasetsTable, At as playgroundsSchema, B as LLMRequest, Bt as workspaceSettingsSchema, C as Dataset, Ct as environmentSecretsSchema, D as DatasetVersionRecord, Dt as playgroundColumnSchema, E as DatasetVersion, Et as llmRequestsSchema, F as GuardrailConfig, Ft as spansSchema, G as PlaygroundResultsTable, H as Playground, I as GuardrailConfigsTable, It as targetingRulesSchema, J as PlaygroundsTable, K as PlaygroundRun, L as GuardrailResult, Lt as tracesSchema, M as EnvironmentSecret, Mt as providerGuardrailOverridesSchema, N as EnvironmentSecretsTable, Nt as schemas, O as DatasetVersionRecordsTable, Ot as playgroundResultsSchema, P as EnvironmentsTable, Pt as spanEventsSchema, Q as ProviderGuardrailOverridesTable, R as GuardrailResults, Rt as variantVersionsSchema, S as Database, St as datasetsSchema, T as DatasetRecordsTable, Tt as guardrailConfigsSchema, U as PlaygroundColumn, V as LLMRequestsTable, W as PlaygroundResult, X as ProviderConfigsTable, Y as ProviderConfig, Z as ProviderGuardrailOverride, _ as validateTableData, _t as configVariantsSchema, a as createDatabaseFromConnection, at as TableName, b as ConfigVariantsTable, bt as datasetVersionRecordsSchema, c as executeWithSchema, ct as Trace, d as getMigrations, dt as Variant, et as Selectable, f as matchType, ft as VariantVersion, g as validatePartialTableData, gt as WorkspaceSettingsTable, h as parseTableData, ht as WorkspaceSettings, i as createDatabase, it as SpansTable, j as Environment, jt as providerConfigsSchema, k as DatasetVersionsTable, kt as playgroundRunsSchema, l as MigrationOptions, lt as TracesTable, m as parsePartialTableData, mt as VariantsTable, n as DatabaseOptions, nt as SpanEvent, o as detectDatabaseType, ot as TargetingRule, p as runAutoMigrations, pt as VariantVersionsTable, q as PlaygroundRunsTable, r as DatabaseType, rt as SpanEventsTable, s as createNeonDialect, st as TargetingRulesTable, t as DatabaseConnection, tt as Span, u as MigrationResult, ut as Updateable, v as Config, vt as configsSchema, w as DatasetRecord, wt as environmentsSchema, x as ConfigsTable, xt as datasetVersionsSchema, y as ConfigVariant, yt as datasetRecordsSchema, z as Insertable, zt as variantsSchema } from "../index-BoDvuqku.mjs";
|
|
2
2
|
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Dataset, DatasetRecord, DatasetRecordsTable, DatasetVersion, DatasetVersionRecord, DatasetVersionRecordsTable, DatasetVersionsTable, DatasetsTable, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, GuardrailConfig, GuardrailConfigsTable, GuardrailResult, GuardrailResults, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult, Playground, PlaygroundColumn, PlaygroundResult, PlaygroundResultsTable, PlaygroundRun, PlaygroundRunsTable, PlaygroundsTable, ProviderConfig, ProviderConfigsTable, ProviderGuardrailOverride, ProviderGuardrailOverridesTable, SCHEMA_METADATA, Selectable, Span, SpanEvent, SpanEventsTable, SpansTable, TableName, TargetingRule, TargetingRulesTable, Trace, TracesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as spanEventsSchema, C as playgroundColumnSchema, D as providerConfigsSchema, E as playgroundsSchema, F as variantsSchema, I as workspaceSettingsSchema, M as targetingRulesSchema, N as tracesSchema, O as providerGuardrailOverridesSchema, P as variantVersionsSchema, S as llmRequestsSchema, T as playgroundRunsSchema, _ as datasetVersionsSchema, a as matchType, b as environmentsSchema, c as parsePartialTableData, d as validateTableData, f as SCHEMA_METADATA, g as datasetVersionRecordsSchema, h as datasetRecordsSchema, i as getMigrations, j as spansSchema, k as schemas, l as parseTableData, m as configsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as configVariantsSchema, r as detectDatabaseType, t as createDatabase, u as validatePartialTableData, v as datasetsSchema, w as playgroundResultsSchema, x as guardrailConfigsSchema, y as environmentSecretsSchema } from "../db-CjwRQB4N.mjs";
|
|
2
2
|
import { n as executeWithSchema, t as createNeonDialect } from "../neon-dialect-DySGBYUi.mjs";
|
|
3
3
|
|
|
4
4
|
export { SCHEMA_METADATA, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, schemas, spanEventsSchema, spansSchema, targetingRulesSchema, tracesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
1
2
|
import { CompiledQuery, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect, sql } from "kysely";
|
|
2
3
|
import pino from "pino";
|
|
3
4
|
|
|
@@ -16,6 +17,7 @@ var __export = (all, symbols) => {
|
|
|
16
17
|
}
|
|
17
18
|
return target;
|
|
18
19
|
};
|
|
20
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
19
21
|
|
|
20
22
|
//#endregion
|
|
21
23
|
//#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.js
|
|
@@ -13160,237 +13162,6 @@ const spanEventsSchema = object({
|
|
|
13160
13162
|
* Derived from Zod schemas
|
|
13161
13163
|
*/
|
|
13162
13164
|
const SCHEMA_METADATA = { tables: {
|
|
13163
|
-
configs: {
|
|
13164
|
-
order: 1,
|
|
13165
|
-
schema: configsSchema,
|
|
13166
|
-
fields: {
|
|
13167
|
-
id: {
|
|
13168
|
-
type: "uuid",
|
|
13169
|
-
primaryKey: true
|
|
13170
|
-
},
|
|
13171
|
-
slug: {
|
|
13172
|
-
type: "text",
|
|
13173
|
-
unique: true
|
|
13174
|
-
},
|
|
13175
|
-
name: {
|
|
13176
|
-
type: "text",
|
|
13177
|
-
nullable: true
|
|
13178
|
-
},
|
|
13179
|
-
createdAt: {
|
|
13180
|
-
type: "timestamp",
|
|
13181
|
-
default: "now()"
|
|
13182
|
-
},
|
|
13183
|
-
updatedAt: {
|
|
13184
|
-
type: "timestamp",
|
|
13185
|
-
default: "now()",
|
|
13186
|
-
onUpdate: "now()"
|
|
13187
|
-
}
|
|
13188
|
-
}
|
|
13189
|
-
},
|
|
13190
|
-
variants: {
|
|
13191
|
-
order: 2,
|
|
13192
|
-
schema: variantsSchema,
|
|
13193
|
-
fields: {
|
|
13194
|
-
id: {
|
|
13195
|
-
type: "uuid",
|
|
13196
|
-
primaryKey: true
|
|
13197
|
-
},
|
|
13198
|
-
name: { type: "text" },
|
|
13199
|
-
createdAt: {
|
|
13200
|
-
type: "timestamp",
|
|
13201
|
-
default: "now()"
|
|
13202
|
-
},
|
|
13203
|
-
updatedAt: {
|
|
13204
|
-
type: "timestamp",
|
|
13205
|
-
default: "now()",
|
|
13206
|
-
onUpdate: "now()"
|
|
13207
|
-
}
|
|
13208
|
-
}
|
|
13209
|
-
},
|
|
13210
|
-
variant_versions: {
|
|
13211
|
-
order: 3,
|
|
13212
|
-
schema: variantVersionsSchema,
|
|
13213
|
-
fields: {
|
|
13214
|
-
id: {
|
|
13215
|
-
type: "uuid",
|
|
13216
|
-
primaryKey: true
|
|
13217
|
-
},
|
|
13218
|
-
variantId: {
|
|
13219
|
-
type: "uuid",
|
|
13220
|
-
references: {
|
|
13221
|
-
table: "variants",
|
|
13222
|
-
column: "id"
|
|
13223
|
-
}
|
|
13224
|
-
},
|
|
13225
|
-
version: { type: "integer" },
|
|
13226
|
-
provider: { type: "text" },
|
|
13227
|
-
modelName: { type: "text" },
|
|
13228
|
-
jsonData: { type: "jsonb" },
|
|
13229
|
-
createdAt: {
|
|
13230
|
-
type: "timestamp",
|
|
13231
|
-
default: "now()"
|
|
13232
|
-
},
|
|
13233
|
-
updatedAt: {
|
|
13234
|
-
type: "timestamp",
|
|
13235
|
-
default: "now()",
|
|
13236
|
-
onUpdate: "now()"
|
|
13237
|
-
}
|
|
13238
|
-
},
|
|
13239
|
-
uniqueConstraints: [{ columns: ["variantId", "version"] }]
|
|
13240
|
-
},
|
|
13241
|
-
environments: {
|
|
13242
|
-
order: 4,
|
|
13243
|
-
schema: environmentsSchema,
|
|
13244
|
-
fields: {
|
|
13245
|
-
id: {
|
|
13246
|
-
type: "uuid",
|
|
13247
|
-
primaryKey: true
|
|
13248
|
-
},
|
|
13249
|
-
name: { type: "text" },
|
|
13250
|
-
slug: {
|
|
13251
|
-
type: "text",
|
|
13252
|
-
unique: true
|
|
13253
|
-
},
|
|
13254
|
-
isProd: {
|
|
13255
|
-
type: "boolean",
|
|
13256
|
-
default: false
|
|
13257
|
-
},
|
|
13258
|
-
createdAt: {
|
|
13259
|
-
type: "timestamp",
|
|
13260
|
-
default: "now()"
|
|
13261
|
-
},
|
|
13262
|
-
updatedAt: {
|
|
13263
|
-
type: "timestamp",
|
|
13264
|
-
default: "now()",
|
|
13265
|
-
onUpdate: "now()"
|
|
13266
|
-
}
|
|
13267
|
-
}
|
|
13268
|
-
},
|
|
13269
|
-
environment_secrets: {
|
|
13270
|
-
order: 5,
|
|
13271
|
-
schema: environmentSecretsSchema,
|
|
13272
|
-
fields: {
|
|
13273
|
-
id: {
|
|
13274
|
-
type: "uuid",
|
|
13275
|
-
primaryKey: true
|
|
13276
|
-
},
|
|
13277
|
-
environmentId: {
|
|
13278
|
-
type: "uuid",
|
|
13279
|
-
references: {
|
|
13280
|
-
table: "environments",
|
|
13281
|
-
column: "id"
|
|
13282
|
-
}
|
|
13283
|
-
},
|
|
13284
|
-
keyName: { type: "text" },
|
|
13285
|
-
keyValue: { type: "text" },
|
|
13286
|
-
createdAt: {
|
|
13287
|
-
type: "timestamp",
|
|
13288
|
-
default: "now()"
|
|
13289
|
-
},
|
|
13290
|
-
updatedAt: {
|
|
13291
|
-
type: "timestamp",
|
|
13292
|
-
default: "now()",
|
|
13293
|
-
onUpdate: "now()"
|
|
13294
|
-
}
|
|
13295
|
-
}
|
|
13296
|
-
},
|
|
13297
|
-
config_variants: {
|
|
13298
|
-
order: 6,
|
|
13299
|
-
schema: configVariantsSchema,
|
|
13300
|
-
fields: {
|
|
13301
|
-
id: {
|
|
13302
|
-
type: "uuid",
|
|
13303
|
-
primaryKey: true
|
|
13304
|
-
},
|
|
13305
|
-
configId: {
|
|
13306
|
-
type: "uuid",
|
|
13307
|
-
references: {
|
|
13308
|
-
table: "configs",
|
|
13309
|
-
column: "id"
|
|
13310
|
-
}
|
|
13311
|
-
},
|
|
13312
|
-
variantId: {
|
|
13313
|
-
type: "uuid",
|
|
13314
|
-
references: {
|
|
13315
|
-
table: "variants",
|
|
13316
|
-
column: "id"
|
|
13317
|
-
}
|
|
13318
|
-
},
|
|
13319
|
-
createdAt: {
|
|
13320
|
-
type: "timestamp",
|
|
13321
|
-
default: "now()"
|
|
13322
|
-
},
|
|
13323
|
-
updatedAt: {
|
|
13324
|
-
type: "timestamp",
|
|
13325
|
-
default: "now()",
|
|
13326
|
-
onUpdate: "now()"
|
|
13327
|
-
}
|
|
13328
|
-
}
|
|
13329
|
-
},
|
|
13330
|
-
targeting_rules: {
|
|
13331
|
-
order: 7,
|
|
13332
|
-
schema: targetingRulesSchema,
|
|
13333
|
-
fields: {
|
|
13334
|
-
id: {
|
|
13335
|
-
type: "uuid",
|
|
13336
|
-
primaryKey: true
|
|
13337
|
-
},
|
|
13338
|
-
environmentId: {
|
|
13339
|
-
type: "uuid",
|
|
13340
|
-
references: {
|
|
13341
|
-
table: "environments",
|
|
13342
|
-
column: "id"
|
|
13343
|
-
}
|
|
13344
|
-
},
|
|
13345
|
-
configId: {
|
|
13346
|
-
type: "uuid",
|
|
13347
|
-
references: {
|
|
13348
|
-
table: "configs",
|
|
13349
|
-
column: "id"
|
|
13350
|
-
}
|
|
13351
|
-
},
|
|
13352
|
-
configVariantId: {
|
|
13353
|
-
type: "uuid",
|
|
13354
|
-
references: {
|
|
13355
|
-
table: "config_variants",
|
|
13356
|
-
column: "id"
|
|
13357
|
-
}
|
|
13358
|
-
},
|
|
13359
|
-
variantVersionId: {
|
|
13360
|
-
type: "uuid",
|
|
13361
|
-
nullable: true,
|
|
13362
|
-
references: {
|
|
13363
|
-
table: "variant_versions",
|
|
13364
|
-
column: "id"
|
|
13365
|
-
}
|
|
13366
|
-
},
|
|
13367
|
-
weight: {
|
|
13368
|
-
type: "integer",
|
|
13369
|
-
default: 1e4
|
|
13370
|
-
},
|
|
13371
|
-
priority: {
|
|
13372
|
-
type: "integer",
|
|
13373
|
-
default: 0
|
|
13374
|
-
},
|
|
13375
|
-
enabled: {
|
|
13376
|
-
type: "boolean",
|
|
13377
|
-
default: true
|
|
13378
|
-
},
|
|
13379
|
-
conditions: {
|
|
13380
|
-
type: "jsonb",
|
|
13381
|
-
default: "{}"
|
|
13382
|
-
},
|
|
13383
|
-
createdAt: {
|
|
13384
|
-
type: "timestamp",
|
|
13385
|
-
default: "now()"
|
|
13386
|
-
},
|
|
13387
|
-
updatedAt: {
|
|
13388
|
-
type: "timestamp",
|
|
13389
|
-
default: "now()",
|
|
13390
|
-
onUpdate: "now()"
|
|
13391
|
-
}
|
|
13392
|
-
}
|
|
13393
|
-
},
|
|
13394
13165
|
workspace_settings: {
|
|
13395
13166
|
order: 8,
|
|
13396
13167
|
schema: workspaceSettingsSchema,
|
|
@@ -14242,27 +14013,6 @@ function parsePartialTableData(table, data) {
|
|
|
14242
14013
|
//#region src/utils/logger.ts
|
|
14243
14014
|
const logger = pino({ level: process.env.LOG_LEVEL || "info" });
|
|
14244
14015
|
|
|
14245
|
-
//#endregion
|
|
14246
|
-
//#region src/auth/get-auth-client-options.ts
|
|
14247
|
-
/**
|
|
14248
|
-
* Get Better Auth client options
|
|
14249
|
-
*
|
|
14250
|
-
* @param options - Auth client options including database config and hooks
|
|
14251
|
-
*/
|
|
14252
|
-
const getAuthClientOptions = (options) => {
|
|
14253
|
-
const { database, onUserCreated, baseURL, trustedOrigins } = options;
|
|
14254
|
-
return {
|
|
14255
|
-
database,
|
|
14256
|
-
baseURL,
|
|
14257
|
-
trustedOrigins,
|
|
14258
|
-
emailAndPassword: { enabled: true },
|
|
14259
|
-
advanced: { cookiePrefix: "llmops" },
|
|
14260
|
-
databaseHooks: onUserCreated ? { user: { create: { after: async (user) => {
|
|
14261
|
-
await onUserCreated(user.id);
|
|
14262
|
-
} } } } : void 0
|
|
14263
|
-
};
|
|
14264
|
-
};
|
|
14265
|
-
|
|
14266
14016
|
//#endregion
|
|
14267
14017
|
//#region src/db/migrations.ts
|
|
14268
14018
|
const postgresMap = {
|
|
@@ -14515,23 +14265,7 @@ async function getMigrations(db, dbType, options) {
|
|
|
14515
14265
|
migrations.push(builder);
|
|
14516
14266
|
}
|
|
14517
14267
|
}
|
|
14518
|
-
|
|
14519
|
-
await sql`SET search_path TO "${options?.schema ?? "llmops"}"`.execute(db);
|
|
14520
|
-
} catch (error$47) {
|
|
14521
|
-
logger.warn({ error: error$47 }, "Failed to set search_path for Better Auth migrations");
|
|
14522
|
-
}
|
|
14523
|
-
let getAuthMigrations;
|
|
14524
|
-
try {
|
|
14525
|
-
const dbModule = await import("better-auth/db");
|
|
14526
|
-
if (typeof dbModule.getMigrations === "function") getAuthMigrations = dbModule.getMigrations;
|
|
14527
|
-
if (!getAuthMigrations) {
|
|
14528
|
-
const migrationModule = await import("better-auth/db/migration");
|
|
14529
|
-
if (typeof migrationModule.getMigrations === "function") getAuthMigrations = migrationModule.getMigrations;
|
|
14530
|
-
}
|
|
14531
|
-
} catch (error$47) {
|
|
14532
|
-
logger.warn({ error: error$47 }, "Failed to import better-auth migrations; skipping auth migrations");
|
|
14533
|
-
}
|
|
14534
|
-
if (!getAuthMigrations) return {
|
|
14268
|
+
return {
|
|
14535
14269
|
toBeCreated,
|
|
14536
14270
|
toBeAdded,
|
|
14537
14271
|
runMigrations: async () => {
|
|
@@ -14543,26 +14277,6 @@ async function getMigrations(db, dbType, options) {
|
|
|
14543
14277
|
migrations,
|
|
14544
14278
|
needsMigration: toBeCreated.length > 0 || toBeAdded.length > 0
|
|
14545
14279
|
};
|
|
14546
|
-
const authOptions = getAuthClientOptions({ database: {
|
|
14547
|
-
db,
|
|
14548
|
-
type: dbType === "neon" ? "postgres" : dbType
|
|
14549
|
-
} });
|
|
14550
|
-
const { toBeAdded: authChangesToBeAdded, toBeCreated: authChangesToBeCreated, runMigrations: runAuthMigrations } = await getAuthMigrations(authOptions);
|
|
14551
|
-
async function runMigrations() {
|
|
14552
|
-
for (const migration of migrations) await migration.execute();
|
|
14553
|
-
await runAuthMigrations();
|
|
14554
|
-
}
|
|
14555
|
-
async function compileMigrations() {
|
|
14556
|
-
return migrations.map((m) => m.compile().sql).join(";\n\n") + ";";
|
|
14557
|
-
}
|
|
14558
|
-
return {
|
|
14559
|
-
toBeCreated: [...toBeCreated, ...authChangesToBeCreated],
|
|
14560
|
-
toBeAdded: [...toBeAdded, ...authChangesToBeAdded],
|
|
14561
|
-
runMigrations,
|
|
14562
|
-
compileMigrations,
|
|
14563
|
-
migrations,
|
|
14564
|
-
needsMigration: toBeCreated.length > 0 || toBeAdded.length > 0 || authChangesToBeCreated.length > 0 || authChangesToBeAdded.length > 0
|
|
14565
|
-
};
|
|
14566
14280
|
}
|
|
14567
14281
|
/**
|
|
14568
14282
|
* Fix legacy constraints that may exist from previous schema versions
|
|
@@ -14737,4 +14451,4 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
14737
14451
|
}
|
|
14738
14452
|
|
|
14739
14453
|
//#endregion
|
|
14740
|
-
export {
|
|
14454
|
+
export { spanEventsSchema as A, array as B, playgroundColumnSchema as C, providerConfigsSchema as D, playgroundsSchema as E, variantsSchema as F, record as G, literal as H, workspaceSettingsSchema as I, unknown as J, string$1 as K, zod_default as L, targetingRulesSchema as M, tracesSchema as N, providerGuardrailOverridesSchema as O, variantVersionsSchema as P, _enum as R, llmRequestsSchema as S, playgroundRunsSchema as T, number$1 as U, boolean$1 as V, object as W, __require as Y, datasetVersionsSchema as _, matchType as a, environmentsSchema as b, parsePartialTableData as c, validateTableData as d, SCHEMA_METADATA as f, datasetVersionRecordsSchema as g, datasetRecordsSchema as h, getMigrations as i, spansSchema as j, schemas as k, parseTableData as l, configsSchema as m, createDatabaseFromConnection as n, runAutoMigrations as o, configVariantsSchema as p, union as q, detectDatabaseType as r, logger as s, createDatabase as t, validatePartialTableData as u, datasetsSchema as v, playgroundResultsSchema as w, guardrailConfigsSchema as x, environmentSecretsSchema as y, any as z };
|