@llmops/core 0.6.8 → 0.6.9-beta.2
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-CweOAhRE.cjs → bun-sqlite-dialect-C06VxkTn.cjs} +1 -1
- package/dist/db/index.cjs +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{db-H8SfNI38.mjs → db-CdAtHHw5.mjs} +19 -14
- package/dist/{db-DsEVRoua.cjs → db-D8otWwZL.cjs} +23 -18
- package/dist/index.cjs +7 -3
- package/dist/index.mjs +6 -2
- package/dist/{neon-dialect-Bk6Cncio.cjs → neon-dialect-DIuEesTA.cjs} +1 -1
- package/dist/{neon-dialect-Dn80Acj9.cjs → neon-dialect-ccr-mLKR.cjs} +1 -1
- package/dist/{node-sqlite-dialect-DyFzt-h5.cjs → node-sqlite-dialect-AU81Qz0n.cjs} +1 -1
- package/package.json +2 -2
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-D8otWwZL.cjs');
|
|
2
|
+
const require_neon_dialect = require('../neon-dialect-ccr-mLKR.cjs');
|
|
3
3
|
|
|
4
4
|
exports.SCHEMA_METADATA = require_db.SCHEMA_METADATA;
|
|
5
5
|
exports.configVariantsSchema = require_db.configVariantsSchema;
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as schemas, C as llmRequestsSchema, D as playgroundsSchema, E as playgroundRunsSchema, F as variantVersionsSchema, I as variantsSchema, L as workspaceSettingsSchema, M as spansSchema, N as targetingRulesSchema, O as providerConfigsSchema, P as tracesSchema, S as guardrailConfigsSchema, T as playgroundResultsSchema, _ as datasetVersionRecordsSchema, a as matchType, b as environmentSecretsSchema, d as validatePartialTableData, f as validateTableData, g as datasetRecordsSchema, h as configsSchema, i as getMigrations, j as spanEventsSchema, k as providerGuardrailOverridesSchema, l as parsePartialTableData, m as configVariantsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as SCHEMA_METADATA, r as detectDatabaseType, t as createDatabase, u as parseTableData, v as datasetVersionsSchema, w as playgroundColumnSchema, x as environmentsSchema, y as datasetsSchema } from "../db-
|
|
1
|
+
import { A as schemas, C as llmRequestsSchema, D as playgroundsSchema, E as playgroundRunsSchema, F as variantVersionsSchema, I as variantsSchema, L as workspaceSettingsSchema, M as spansSchema, N as targetingRulesSchema, O as providerConfigsSchema, P as tracesSchema, S as guardrailConfigsSchema, T as playgroundResultsSchema, _ as datasetVersionRecordsSchema, a as matchType, b as environmentSecretsSchema, d as validatePartialTableData, f as validateTableData, g as datasetRecordsSchema, h as configsSchema, i as getMigrations, j as spanEventsSchema, k as providerGuardrailOverridesSchema, l as parsePartialTableData, m as configVariantsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as SCHEMA_METADATA, r as detectDatabaseType, t as createDatabase, u as parseTableData, v as datasetVersionsSchema, w as playgroundColumnSchema, x as environmentsSchema, y as datasetsSchema } from "../db-CdAtHHw5.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 };
|
|
@@ -14522,22 +14522,27 @@ async function getMigrations(db, dbType, options) {
|
|
|
14522
14522
|
}
|
|
14523
14523
|
let getAuthMigrations;
|
|
14524
14524
|
try {
|
|
14525
|
-
|
|
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
|
+
}
|
|
14526
14531
|
} catch (error$47) {
|
|
14527
|
-
logger.warn({ error: error$47 }, "Failed to import better-auth
|
|
14528
|
-
return {
|
|
14529
|
-
toBeCreated,
|
|
14530
|
-
toBeAdded,
|
|
14531
|
-
runMigrations: async () => {
|
|
14532
|
-
for (const migration of migrations) await migration.execute();
|
|
14533
|
-
},
|
|
14534
|
-
compileMigrations: async () => {
|
|
14535
|
-
return migrations.map((m) => m.compile().sql).join(";\n\n") + ";";
|
|
14536
|
-
},
|
|
14537
|
-
migrations,
|
|
14538
|
-
needsMigration: toBeCreated.length > 0 || toBeAdded.length > 0
|
|
14539
|
-
};
|
|
14532
|
+
logger.warn({ error: error$47 }, "Failed to import better-auth migrations; skipping auth migrations");
|
|
14540
14533
|
}
|
|
14534
|
+
if (!getAuthMigrations) return {
|
|
14535
|
+
toBeCreated,
|
|
14536
|
+
toBeAdded,
|
|
14537
|
+
runMigrations: async () => {
|
|
14538
|
+
for (const migration of migrations) await migration.execute();
|
|
14539
|
+
},
|
|
14540
|
+
compileMigrations: async () => {
|
|
14541
|
+
return migrations.map((m) => m.compile().sql).join(";\n\n") + ";";
|
|
14542
|
+
},
|
|
14543
|
+
migrations,
|
|
14544
|
+
needsMigration: toBeCreated.length > 0 || toBeAdded.length > 0
|
|
14545
|
+
};
|
|
14541
14546
|
const authOptions = getAuthClientOptions({ database: {
|
|
14542
14547
|
db,
|
|
14543
14548
|
type: dbType === "neon" ? "postgres" : dbType
|
|
@@ -14546,22 +14546,27 @@ async function getMigrations(db, dbType, options) {
|
|
|
14546
14546
|
}
|
|
14547
14547
|
let getAuthMigrations;
|
|
14548
14548
|
try {
|
|
14549
|
-
|
|
14549
|
+
const dbModule = await import("better-auth/db");
|
|
14550
|
+
if (typeof dbModule.getMigrations === "function") getAuthMigrations = dbModule.getMigrations;
|
|
14551
|
+
if (!getAuthMigrations) {
|
|
14552
|
+
const migrationModule = await import("better-auth/db/migration");
|
|
14553
|
+
if (typeof migrationModule.getMigrations === "function") getAuthMigrations = migrationModule.getMigrations;
|
|
14554
|
+
}
|
|
14550
14555
|
} catch (error$47) {
|
|
14551
|
-
logger.warn({ error: error$47 }, "Failed to import better-auth
|
|
14552
|
-
return {
|
|
14553
|
-
toBeCreated,
|
|
14554
|
-
toBeAdded,
|
|
14555
|
-
runMigrations: async () => {
|
|
14556
|
-
for (const migration of migrations) await migration.execute();
|
|
14557
|
-
},
|
|
14558
|
-
compileMigrations: async () => {
|
|
14559
|
-
return migrations.map((m) => m.compile().sql).join(";\n\n") + ";";
|
|
14560
|
-
},
|
|
14561
|
-
migrations,
|
|
14562
|
-
needsMigration: toBeCreated.length > 0 || toBeAdded.length > 0
|
|
14563
|
-
};
|
|
14556
|
+
logger.warn({ error: error$47 }, "Failed to import better-auth migrations; skipping auth migrations");
|
|
14564
14557
|
}
|
|
14558
|
+
if (!getAuthMigrations) return {
|
|
14559
|
+
toBeCreated,
|
|
14560
|
+
toBeAdded,
|
|
14561
|
+
runMigrations: async () => {
|
|
14562
|
+
for (const migration of migrations) await migration.execute();
|
|
14563
|
+
},
|
|
14564
|
+
compileMigrations: async () => {
|
|
14565
|
+
return migrations.map((m) => m.compile().sql).join(";\n\n") + ";";
|
|
14566
|
+
},
|
|
14567
|
+
migrations,
|
|
14568
|
+
needsMigration: toBeCreated.length > 0 || toBeAdded.length > 0
|
|
14569
|
+
};
|
|
14565
14570
|
const authOptions = getAuthClientOptions({ database: {
|
|
14566
14571
|
db,
|
|
14567
14572
|
type: dbType === "neon" ? "postgres" : dbType
|
|
@@ -14713,12 +14718,12 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
14713
14718
|
case "sqlite":
|
|
14714
14719
|
if ("aggregate" in rawConnection && !("createSession" in rawConnection)) dialect = new kysely.SqliteDialect({ database: rawConnection });
|
|
14715
14720
|
else if ("fileControl" in rawConnection) {
|
|
14716
|
-
const { BunSqliteDialect } = await Promise.resolve().then(() => require("./bun-sqlite-dialect-
|
|
14721
|
+
const { BunSqliteDialect } = await Promise.resolve().then(() => require("./bun-sqlite-dialect-C06VxkTn.cjs"));
|
|
14717
14722
|
dialect = new BunSqliteDialect({ database: rawConnection });
|
|
14718
14723
|
} else if ("createSession" in rawConnection && typeof window === "undefined") try {
|
|
14719
14724
|
const { DatabaseSync } = await import("node:sqlite");
|
|
14720
14725
|
if (rawConnection instanceof DatabaseSync) {
|
|
14721
|
-
const { NodeSqliteDialect } = await Promise.resolve().then(() => require("./node-sqlite-dialect-
|
|
14726
|
+
const { NodeSqliteDialect } = await Promise.resolve().then(() => require("./node-sqlite-dialect-AU81Qz0n.cjs"));
|
|
14722
14727
|
dialect = new NodeSqliteDialect({ database: rawConnection });
|
|
14723
14728
|
}
|
|
14724
14729
|
} catch {}
|
|
@@ -14736,7 +14741,7 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
14736
14741
|
break;
|
|
14737
14742
|
case "neon": {
|
|
14738
14743
|
if (typeof rawConnection === "function") {
|
|
14739
|
-
const { createNeonDialect: createNeonDialect$1 } = await Promise.resolve().then(() => require("./neon-dialect-
|
|
14744
|
+
const { createNeonDialect: createNeonDialect$1 } = await Promise.resolve().then(() => require("./neon-dialect-DIuEesTA.cjs"));
|
|
14740
14745
|
dialect = createNeonDialect$1(rawConnection);
|
|
14741
14746
|
break;
|
|
14742
14747
|
}
|
|
@@ -14744,7 +14749,7 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
14744
14749
|
if (!connectionString) throw new Error("Neon connection string is required. Pass it directly as the database option or set one of: NEON_CONNECTION_STRING, NEON_PG_URL, DATABASE_URL, POSTGRES_URL");
|
|
14745
14750
|
const { neon } = await import("@neondatabase/serverless");
|
|
14746
14751
|
const sql$1 = neon(connectionString);
|
|
14747
|
-
const { createNeonDialect } = await Promise.resolve().then(() => require("./neon-dialect-
|
|
14752
|
+
const { createNeonDialect } = await Promise.resolve().then(() => require("./neon-dialect-DIuEesTA.cjs"));
|
|
14748
14753
|
dialect = createNeonDialect(sql$1);
|
|
14749
14754
|
break;
|
|
14750
14755
|
}
|
package/dist/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-D8otWwZL.cjs');
|
|
2
|
+
const require_neon_dialect = require('./neon-dialect-ccr-mLKR.cjs');
|
|
3
3
|
let __llmops_gateway = require("@llmops/gateway");
|
|
4
4
|
__llmops_gateway = require_db.__toESM(__llmops_gateway);
|
|
5
5
|
let kysely = require("kysely");
|
|
@@ -3664,7 +3664,11 @@ const createWorkspaceSettingsDataLayer = (db) => {
|
|
|
3664
3664
|
return true;
|
|
3665
3665
|
},
|
|
3666
3666
|
isSetupComplete: async () => {
|
|
3667
|
-
|
|
3667
|
+
try {
|
|
3668
|
+
return (await db.selectFrom("workspace_settings").select("setupComplete").executeTakeFirst())?.setupComplete ?? false;
|
|
3669
|
+
} catch {
|
|
3670
|
+
return false;
|
|
3671
|
+
}
|
|
3668
3672
|
},
|
|
3669
3673
|
markSetupComplete: async () => {
|
|
3670
3674
|
let settings = await db.selectFrom("workspace_settings").selectAll().executeTakeFirst();
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as schemas, B as any, C as llmRequestsSchema, D as playgroundsSchema, E as playgroundRunsSchema, F as variantVersionsSchema, G as object, H as boolean, I as variantsSchema, J as union, K as record, L as workspaceSettingsSchema, M as spansSchema, N as targetingRulesSchema, O as providerConfigsSchema, P as tracesSchema, R as zod_default, S as guardrailConfigsSchema, T as playgroundResultsSchema, U as literal, V as array, W as number, Y as unknown, _ as datasetVersionRecordsSchema, a as matchType, b as environmentSecretsSchema, c as logger, d as validatePartialTableData, f as validateTableData, g as datasetRecordsSchema, h as configsSchema, i as getMigrations, j as spanEventsSchema, k as providerGuardrailOverridesSchema, l as parsePartialTableData, m as configVariantsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as SCHEMA_METADATA, q as string, r as detectDatabaseType, s as getAuthClientOptions, t as createDatabase, u as parseTableData, v as datasetVersionsSchema, w as playgroundColumnSchema, x as environmentsSchema, y as datasetsSchema, z as _enum } from "./db-
|
|
1
|
+
import { A as schemas, B as any, C as llmRequestsSchema, D as playgroundsSchema, E as playgroundRunsSchema, F as variantVersionsSchema, G as object, H as boolean, I as variantsSchema, J as union, K as record, L as workspaceSettingsSchema, M as spansSchema, N as targetingRulesSchema, O as providerConfigsSchema, P as tracesSchema, R as zod_default, S as guardrailConfigsSchema, T as playgroundResultsSchema, U as literal, V as array, W as number, Y as unknown, _ as datasetVersionRecordsSchema, a as matchType, b as environmentSecretsSchema, c as logger, d as validatePartialTableData, f as validateTableData, g as datasetRecordsSchema, h as configsSchema, i as getMigrations, j as spanEventsSchema, k as providerGuardrailOverridesSchema, l as parsePartialTableData, m as configVariantsSchema, n as createDatabaseFromConnection, o as runAutoMigrations, p as SCHEMA_METADATA, q as string, r as detectDatabaseType, s as getAuthClientOptions, t as createDatabase, u as parseTableData, v as datasetVersionsSchema, w as playgroundColumnSchema, x as environmentsSchema, y as datasetsSchema, z as _enum } from "./db-CdAtHHw5.mjs";
|
|
2
2
|
import { n as executeWithSchema, t as createNeonDialect } from "./neon-dialect-DySGBYUi.mjs";
|
|
3
3
|
import gateway from "@llmops/gateway";
|
|
4
4
|
import { sql } from "kysely";
|
|
@@ -3661,7 +3661,11 @@ const createWorkspaceSettingsDataLayer = (db) => {
|
|
|
3661
3661
|
return true;
|
|
3662
3662
|
},
|
|
3663
3663
|
isSetupComplete: async () => {
|
|
3664
|
-
|
|
3664
|
+
try {
|
|
3665
|
+
return (await db.selectFrom("workspace_settings").select("setupComplete").executeTakeFirst())?.setupComplete ?? false;
|
|
3666
|
+
} catch {
|
|
3667
|
+
return false;
|
|
3668
|
+
}
|
|
3665
3669
|
},
|
|
3666
3670
|
markSetupComplete: async () => {
|
|
3667
3671
|
let settings = await db.selectFrom("workspace_settings").selectAll().executeTakeFirst();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmops/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9-beta.2",
|
|
4
4
|
"description": "Core LLMOps functionality and utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"kysely": "^0.28.8",
|
|
56
56
|
"kysely-neon": "^2.0.2",
|
|
57
57
|
"pino": "^10.1.0",
|
|
58
|
-
"@llmops/gateway": "^0.6.
|
|
58
|
+
"@llmops/gateway": "^0.6.9-beta.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/json-logic-js": "^2.0.8",
|