@llmops/core 0.2.11-beta.4 → 0.2.11
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-BiyQ5XmW.mjs → bun-sqlite-dialect-YVmcpOaa.mjs} +0 -1
- package/dist/{bun-sqlite-dialect-DLqPd3F0.cjs → bun-sqlite-dialect-t1xHHJDz.cjs} +1 -2
- package/dist/db/index.cjs +1 -10
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +2 -4
- package/dist/{db-CEHt_ysR.mjs → db-BGDhJROC.mjs} +2 -8
- package/dist/{db-BIiDmOuQ.cjs → db-CqDD6Ydv.cjs} +2 -8
- package/dist/{index-C66pTe1n.d.cts → index-BUlmWTh7.d.cts} +37 -41
- package/dist/{index-BX96l072.d.mts → index-CkrtLH8W.d.mts} +2 -6
- package/dist/index.cjs +2 -14
- package/dist/index.d.cts +269 -269
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -8
- package/dist/{node-sqlite-dialect-HRKgk8Ae.cjs → node-sqlite-dialect-D4V5e49r.cjs} +1 -2
- package/dist/{node-sqlite-dialect-B3Mejscr.mjs → node-sqlite-dialect-rrsskSJp.mjs} +0 -1
- package/package.json +2 -4
- package/dist/neon-dialect-C8y4ymaE.mjs +0 -4
- package/dist/neon-dialect-CTFuNy48.mjs +0 -4
- package/dist/neon-dialect-eEOfdvtN.cjs +0 -11
- package/dist/neon-dialect-js5JsNqM.cjs +0 -2
package/dist/db/index.cjs
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const require_db = require('../db-BIiDmOuQ.cjs');
|
|
3
|
-
require('../neon-dialect-js5JsNqM.cjs');
|
|
4
|
-
let kysely_neon = require("kysely-neon");
|
|
1
|
+
const require_db = require('../db-CqDD6Ydv.cjs');
|
|
5
2
|
|
|
6
|
-
Object.defineProperty(exports, 'NeonDialect', {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return kysely_neon.NeonDialect;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
3
|
exports.SCHEMA_METADATA = require_db.SCHEMA_METADATA;
|
|
13
4
|
exports.configVariantsSchema = require_db.configVariantsSchema;
|
|
14
5
|
exports.configsSchema = require_db.configsSchema;
|
package/dist/db/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult,
|
|
1
|
+
import { A as SCHEMA_METADATA, B as WorkspaceSettings, C as EnvironmentSecretsTable, D as LLMRequestsTable, E as LLMRequest, F as Updateable, G as environmentsSchema, H as configVariantsSchema, I as Variant, J as schemas, K as llmRequestsSchema, L as VariantVersion, M as TableName, N as TargetingRule, O as ProviderConfig, P as TargetingRulesTable, Q as workspaceSettingsSchema, R as VariantVersionsTable, S as EnvironmentSecret, T as Insertable, U as configsSchema, V as WorkspaceSettingsTable, W as environmentSecretsSchema, X as variantVersionsSchema, Y as targetingRulesSchema, Z as variantsSchema, _ as ConfigVariant, a as createDatabaseFromConnection, b as Database, c as MigrationResult, d as runAutoMigrations, f as parsePartialTableData, g as Config, h as validateTableData, i as createDatabase, j as Selectable, k as ProviderConfigsTable, l as getMigrations, m as validatePartialTableData, n as DatabaseOptions, o as detectDatabaseType, p as parseTableData, q as providerConfigsSchema, r as DatabaseType, s as MigrationOptions, t as DatabaseConnection, u as matchType, v as ConfigVariantsTable, w as EnvironmentsTable, x as Environment, y as ConfigsTable, z as VariantsTable } from "../index-BUlmWTh7.cjs";
|
|
2
|
+
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult, ProviderConfig, ProviderConfigsTable, SCHEMA_METADATA, Selectable, TableName, TargetingRule, TargetingRulesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, detectDatabaseType, environmentSecretsSchema, environmentsSchema, getMigrations, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, providerConfigsSchema, runAutoMigrations, schemas, targetingRulesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult,
|
|
1
|
+
import { A as SCHEMA_METADATA, B as WorkspaceSettings, C as EnvironmentSecretsTable, D as LLMRequestsTable, E as LLMRequest, F as Updateable, G as environmentsSchema, H as configVariantsSchema, I as Variant, J as schemas, K as llmRequestsSchema, L as VariantVersion, M as TableName, N as TargetingRule, O as ProviderConfig, P as TargetingRulesTable, Q as workspaceSettingsSchema, R as VariantVersionsTable, S as EnvironmentSecret, T as Insertable, U as configsSchema, V as WorkspaceSettingsTable, W as environmentSecretsSchema, X as variantVersionsSchema, Y as targetingRulesSchema, Z as variantsSchema, _ as ConfigVariant, a as createDatabaseFromConnection, b as Database, c as MigrationResult, d as runAutoMigrations, f as parsePartialTableData, g as Config, h as validateTableData, i as createDatabase, j as Selectable, k as ProviderConfigsTable, l as getMigrations, m as validatePartialTableData, n as DatabaseOptions, o as detectDatabaseType, p as parseTableData, q as providerConfigsSchema, r as DatabaseType, s as MigrationOptions, t as DatabaseConnection, u as matchType, v as ConfigVariantsTable, w as EnvironmentsTable, x as Environment, y as ConfigsTable, z as VariantsTable } from "../index-CkrtLH8W.mjs";
|
|
2
|
+
export { Config, ConfigVariant, ConfigVariantsTable, ConfigsTable, Database, DatabaseConnection, DatabaseOptions, DatabaseType, Environment, EnvironmentSecret, EnvironmentSecretsTable, EnvironmentsTable, Insertable, LLMRequest, LLMRequestsTable, MigrationOptions, MigrationResult, ProviderConfig, ProviderConfigsTable, SCHEMA_METADATA, Selectable, TableName, TargetingRule, TargetingRulesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, detectDatabaseType, environmentSecretsSchema, environmentsSchema, getMigrations, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, providerConfigsSchema, runAutoMigrations, schemas, targetingRulesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { C as variantsSchema, S as variantVersionsSchema, _ as environmentsSchema, a as matchType, b as schemas, d as validatePartialTableData, f as validateTableData, g as environmentSecretsSchema, h as configsSchema, i as getMigrations, 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 llmRequestsSchema, w as workspaceSettingsSchema, x as targetingRulesSchema, y as providerConfigsSchema } from "../db-CEHt_ysR.mjs";
|
|
3
|
-
import { t as NeonDialect } from "../neon-dialect-C8y4ymaE.mjs";
|
|
1
|
+
import { C as variantsSchema, S as variantVersionsSchema, _ as environmentsSchema, a as matchType, b as schemas, d as validatePartialTableData, f as validateTableData, g as environmentSecretsSchema, h as configsSchema, i as getMigrations, 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 llmRequestsSchema, w as workspaceSettingsSchema, x as targetingRulesSchema, y as providerConfigsSchema } from "../db-BGDhJROC.mjs";
|
|
4
2
|
|
|
5
|
-
export {
|
|
3
|
+
export { SCHEMA_METADATA, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, detectDatabaseType, environmentSecretsSchema, environmentsSchema, getMigrations, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, providerConfigsSchema, runAutoMigrations, schemas, targetingRulesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use node";
|
|
2
1
|
import { CompiledQuery, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect, sql } from "kysely";
|
|
3
2
|
import { getMigrations } from "better-auth/db";
|
|
4
3
|
import pino from "pino";
|
|
@@ -13789,7 +13788,6 @@ function detectDatabaseType(db) {
|
|
|
13789
13788
|
if ("connect" in db) return "postgres";
|
|
13790
13789
|
if ("fileControl" in db) return "sqlite";
|
|
13791
13790
|
if ("open" in db && "close" in db && "prepare" in db) return "sqlite";
|
|
13792
|
-
if ("neon" in db) return "neon";
|
|
13793
13791
|
return null;
|
|
13794
13792
|
}
|
|
13795
13793
|
/**
|
|
@@ -13807,12 +13805,12 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
13807
13805
|
case "sqlite":
|
|
13808
13806
|
if ("aggregate" in rawConnection && !("createSession" in rawConnection)) dialect = new SqliteDialect({ database: rawConnection });
|
|
13809
13807
|
else if ("fileControl" in rawConnection) {
|
|
13810
|
-
const { BunSqliteDialect } = await import("./bun-sqlite-dialect-
|
|
13808
|
+
const { BunSqliteDialect } = await import("./bun-sqlite-dialect-YVmcpOaa.mjs");
|
|
13811
13809
|
dialect = new BunSqliteDialect({ database: rawConnection });
|
|
13812
13810
|
} else if ("createSession" in rawConnection && typeof window === "undefined") try {
|
|
13813
13811
|
const { DatabaseSync } = await import("node:sqlite");
|
|
13814
13812
|
if (rawConnection instanceof DatabaseSync) {
|
|
13815
|
-
const { NodeSqliteDialect } = await import("./node-sqlite-dialect-
|
|
13813
|
+
const { NodeSqliteDialect } = await import("./node-sqlite-dialect-rrsskSJp.mjs");
|
|
13816
13814
|
dialect = new NodeSqliteDialect({ database: rawConnection });
|
|
13817
13815
|
}
|
|
13818
13816
|
} catch {}
|
|
@@ -13831,10 +13829,6 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
13831
13829
|
case "mssql":
|
|
13832
13830
|
if ("createDriver" in rawConnection) dialect = rawConnection;
|
|
13833
13831
|
break;
|
|
13834
|
-
case "neon":
|
|
13835
|
-
const { NeonDialect: NeonDialect$1 } = await import("./neon-dialect-CTFuNy48.mjs");
|
|
13836
|
-
dialect = new NeonDialect$1(rawConnection);
|
|
13837
|
-
break;
|
|
13838
13832
|
}
|
|
13839
13833
|
return dialect ? new Kysely({ dialect }) : null;
|
|
13840
13834
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use node";
|
|
2
1
|
//#region rolldown:runtime
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
@@ -13813,7 +13812,6 @@ function detectDatabaseType(db) {
|
|
|
13813
13812
|
if ("connect" in db) return "postgres";
|
|
13814
13813
|
if ("fileControl" in db) return "sqlite";
|
|
13815
13814
|
if ("open" in db && "close" in db && "prepare" in db) return "sqlite";
|
|
13816
|
-
if ("neon" in db) return "neon";
|
|
13817
13815
|
return null;
|
|
13818
13816
|
}
|
|
13819
13817
|
/**
|
|
@@ -13831,12 +13829,12 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
13831
13829
|
case "sqlite":
|
|
13832
13830
|
if ("aggregate" in rawConnection && !("createSession" in rawConnection)) dialect = new kysely.SqliteDialect({ database: rawConnection });
|
|
13833
13831
|
else if ("fileControl" in rawConnection) {
|
|
13834
|
-
const { BunSqliteDialect } = await Promise.resolve().then(() => require("./bun-sqlite-dialect-
|
|
13832
|
+
const { BunSqliteDialect } = await Promise.resolve().then(() => require("./bun-sqlite-dialect-t1xHHJDz.cjs"));
|
|
13835
13833
|
dialect = new BunSqliteDialect({ database: rawConnection });
|
|
13836
13834
|
} else if ("createSession" in rawConnection && typeof window === "undefined") try {
|
|
13837
13835
|
const { DatabaseSync } = await import("node:sqlite");
|
|
13838
13836
|
if (rawConnection instanceof DatabaseSync) {
|
|
13839
|
-
const { NodeSqliteDialect } = await Promise.resolve().then(() => require("./node-sqlite-dialect-
|
|
13837
|
+
const { NodeSqliteDialect } = await Promise.resolve().then(() => require("./node-sqlite-dialect-D4V5e49r.cjs"));
|
|
13840
13838
|
dialect = new NodeSqliteDialect({ database: rawConnection });
|
|
13841
13839
|
}
|
|
13842
13840
|
} catch {}
|
|
@@ -13855,10 +13853,6 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
13855
13853
|
case "mssql":
|
|
13856
13854
|
if ("createDriver" in rawConnection) dialect = rawConnection;
|
|
13857
13855
|
break;
|
|
13858
|
-
case "neon":
|
|
13859
|
-
const { NeonDialect: NeonDialect$1 } = await Promise.resolve().then(() => require("./neon-dialect-eEOfdvtN.cjs"));
|
|
13860
|
-
dialect = new NeonDialect$1(rawConnection);
|
|
13861
|
-
break;
|
|
13862
13856
|
}
|
|
13863
13857
|
return dialect ? new kysely.Kysely({ dialect }) : null;
|
|
13864
13858
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { NeonDialect } from "kysely-neon";
|
|
2
1
|
import { ColumnType, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
|
|
3
|
-
import * as
|
|
2
|
+
import * as zod0 from "zod";
|
|
4
3
|
import { z } from "zod";
|
|
5
4
|
|
|
6
5
|
//#region src/db/schema.d.ts
|
|
@@ -858,29 +857,29 @@ declare const schemas: {
|
|
|
858
857
|
* Validate data against table schema
|
|
859
858
|
* Useful for runtime validation before inserting/updating
|
|
860
859
|
*/
|
|
861
|
-
declare function validateTableData<T extends TableName>(table: T, data: unknown):
|
|
860
|
+
declare function validateTableData<T extends TableName>(table: T, data: unknown): zod0.ZodSafeParseSuccess<{
|
|
862
861
|
slug: string;
|
|
863
862
|
id: string;
|
|
864
863
|
createdAt: Date;
|
|
865
864
|
updatedAt: Date;
|
|
866
865
|
name?: string | undefined;
|
|
867
|
-
}> |
|
|
866
|
+
}> | zod0.ZodSafeParseError<{
|
|
868
867
|
slug: string;
|
|
869
868
|
id: string;
|
|
870
869
|
createdAt: Date;
|
|
871
870
|
updatedAt: Date;
|
|
872
871
|
name?: string | undefined;
|
|
873
|
-
}> |
|
|
872
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
874
873
|
name: string;
|
|
875
874
|
id: string;
|
|
876
875
|
createdAt: Date;
|
|
877
876
|
updatedAt: Date;
|
|
878
|
-
}> |
|
|
877
|
+
}> | zod0.ZodSafeParseError<{
|
|
879
878
|
name: string;
|
|
880
879
|
id: string;
|
|
881
880
|
createdAt: Date;
|
|
882
881
|
updatedAt: Date;
|
|
883
|
-
}> |
|
|
882
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
884
883
|
variantId: string;
|
|
885
884
|
version: number;
|
|
886
885
|
provider: string;
|
|
@@ -889,7 +888,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
889
888
|
id: string;
|
|
890
889
|
createdAt: Date;
|
|
891
890
|
updatedAt: Date;
|
|
892
|
-
}> |
|
|
891
|
+
}> | zod0.ZodSafeParseError<{
|
|
893
892
|
variantId: string;
|
|
894
893
|
version: number;
|
|
895
894
|
provider: string;
|
|
@@ -898,33 +897,33 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
898
897
|
id: string;
|
|
899
898
|
createdAt: Date;
|
|
900
899
|
updatedAt: Date;
|
|
901
|
-
}> |
|
|
900
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
902
901
|
environmentId: string;
|
|
903
902
|
keyName: string;
|
|
904
903
|
keyValue: string;
|
|
905
904
|
id: string;
|
|
906
905
|
createdAt: Date;
|
|
907
906
|
updatedAt: Date;
|
|
908
|
-
}> |
|
|
907
|
+
}> | zod0.ZodSafeParseError<{
|
|
909
908
|
environmentId: string;
|
|
910
909
|
keyName: string;
|
|
911
910
|
keyValue: string;
|
|
912
911
|
id: string;
|
|
913
912
|
createdAt: Date;
|
|
914
913
|
updatedAt: Date;
|
|
915
|
-
}> |
|
|
914
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
916
915
|
configId: string;
|
|
917
916
|
variantId: string;
|
|
918
917
|
id: string;
|
|
919
918
|
createdAt: Date;
|
|
920
919
|
updatedAt: Date;
|
|
921
|
-
}> |
|
|
920
|
+
}> | zod0.ZodSafeParseError<{
|
|
922
921
|
configId: string;
|
|
923
922
|
variantId: string;
|
|
924
923
|
id: string;
|
|
925
924
|
createdAt: Date;
|
|
926
925
|
updatedAt: Date;
|
|
927
|
-
}> |
|
|
926
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
928
927
|
environmentId: string;
|
|
929
928
|
configId: string;
|
|
930
929
|
configVariantId: string;
|
|
@@ -936,7 +935,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
936
935
|
createdAt: Date;
|
|
937
936
|
updatedAt: Date;
|
|
938
937
|
variantVersionId?: string | null | undefined;
|
|
939
|
-
}> |
|
|
938
|
+
}> | zod0.ZodSafeParseError<{
|
|
940
939
|
environmentId: string;
|
|
941
940
|
configId: string;
|
|
942
941
|
configVariantId: string;
|
|
@@ -948,21 +947,21 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
948
947
|
createdAt: Date;
|
|
949
948
|
updatedAt: Date;
|
|
950
949
|
variantVersionId?: string | null | undefined;
|
|
951
|
-
}> |
|
|
950
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
952
951
|
setupComplete: boolean;
|
|
953
952
|
id: string;
|
|
954
953
|
createdAt: Date;
|
|
955
954
|
updatedAt: Date;
|
|
956
955
|
name?: string | null | undefined;
|
|
957
956
|
superAdminId?: string | null | undefined;
|
|
958
|
-
}> |
|
|
957
|
+
}> | zod0.ZodSafeParseError<{
|
|
959
958
|
setupComplete: boolean;
|
|
960
959
|
id: string;
|
|
961
960
|
createdAt: Date;
|
|
962
961
|
updatedAt: Date;
|
|
963
962
|
name?: string | null | undefined;
|
|
964
963
|
superAdminId?: string | null | undefined;
|
|
965
|
-
}> |
|
|
964
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
966
965
|
providerId: string;
|
|
967
966
|
config: Record<string, unknown>;
|
|
968
967
|
enabled: boolean;
|
|
@@ -970,7 +969,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
970
969
|
createdAt: Date;
|
|
971
970
|
updatedAt: Date;
|
|
972
971
|
name?: string | null | undefined;
|
|
973
|
-
}> |
|
|
972
|
+
}> | zod0.ZodSafeParseError<{
|
|
974
973
|
providerId: string;
|
|
975
974
|
config: Record<string, unknown>;
|
|
976
975
|
enabled: boolean;
|
|
@@ -978,7 +977,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
978
977
|
createdAt: Date;
|
|
979
978
|
updatedAt: Date;
|
|
980
979
|
name?: string | null | undefined;
|
|
981
|
-
}> |
|
|
980
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
982
981
|
requestId: string;
|
|
983
982
|
provider: string;
|
|
984
983
|
model: string;
|
|
@@ -1002,7 +1001,7 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
1002
1001
|
environmentId?: string | null | undefined;
|
|
1003
1002
|
providerConfigId?: string | null | undefined;
|
|
1004
1003
|
userId?: string | null | undefined;
|
|
1005
|
-
}> |
|
|
1004
|
+
}> | zod0.ZodSafeParseError<{
|
|
1006
1005
|
requestId: string;
|
|
1007
1006
|
provider: string;
|
|
1008
1007
|
model: string;
|
|
@@ -1030,17 +1029,17 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
1030
1029
|
/**
|
|
1031
1030
|
* Validate partial data (for updates)
|
|
1032
1031
|
*/
|
|
1033
|
-
declare function validatePartialTableData<T extends TableName>(table: T, data: unknown):
|
|
1032
|
+
declare function validatePartialTableData<T extends TableName>(table: T, data: unknown): zod0.ZodSafeParseSuccess<{
|
|
1034
1033
|
name?: string | undefined;
|
|
1035
1034
|
id?: string | undefined;
|
|
1036
1035
|
createdAt?: Date | undefined;
|
|
1037
1036
|
updatedAt?: Date | undefined;
|
|
1038
|
-
}> |
|
|
1037
|
+
}> | zod0.ZodSafeParseError<{
|
|
1039
1038
|
name?: string | undefined;
|
|
1040
1039
|
id?: string | undefined;
|
|
1041
1040
|
createdAt?: Date | undefined;
|
|
1042
1041
|
updatedAt?: Date | undefined;
|
|
1043
|
-
}> |
|
|
1042
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
1044
1043
|
variantId?: string | undefined;
|
|
1045
1044
|
version?: number | undefined;
|
|
1046
1045
|
provider?: string | undefined;
|
|
@@ -1049,7 +1048,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
1049
1048
|
id?: string | undefined;
|
|
1050
1049
|
createdAt?: Date | undefined;
|
|
1051
1050
|
updatedAt?: Date | undefined;
|
|
1052
|
-
}> |
|
|
1051
|
+
}> | zod0.ZodSafeParseError<{
|
|
1053
1052
|
variantId?: string | undefined;
|
|
1054
1053
|
version?: number | undefined;
|
|
1055
1054
|
provider?: string | undefined;
|
|
@@ -1058,33 +1057,33 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
1058
1057
|
id?: string | undefined;
|
|
1059
1058
|
createdAt?: Date | undefined;
|
|
1060
1059
|
updatedAt?: Date | undefined;
|
|
1061
|
-
}> |
|
|
1060
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
1062
1061
|
environmentId?: string | undefined;
|
|
1063
1062
|
keyName?: string | undefined;
|
|
1064
1063
|
keyValue?: string | undefined;
|
|
1065
1064
|
id?: string | undefined;
|
|
1066
1065
|
createdAt?: Date | undefined;
|
|
1067
1066
|
updatedAt?: Date | undefined;
|
|
1068
|
-
}> |
|
|
1067
|
+
}> | zod0.ZodSafeParseError<{
|
|
1069
1068
|
environmentId?: string | undefined;
|
|
1070
1069
|
keyName?: string | undefined;
|
|
1071
1070
|
keyValue?: string | undefined;
|
|
1072
1071
|
id?: string | undefined;
|
|
1073
1072
|
createdAt?: Date | undefined;
|
|
1074
1073
|
updatedAt?: Date | undefined;
|
|
1075
|
-
}> |
|
|
1074
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
1076
1075
|
configId?: string | undefined;
|
|
1077
1076
|
variantId?: string | undefined;
|
|
1078
1077
|
id?: string | undefined;
|
|
1079
1078
|
createdAt?: Date | undefined;
|
|
1080
1079
|
updatedAt?: Date | undefined;
|
|
1081
|
-
}> |
|
|
1080
|
+
}> | zod0.ZodSafeParseError<{
|
|
1082
1081
|
configId?: string | undefined;
|
|
1083
1082
|
variantId?: string | undefined;
|
|
1084
1083
|
id?: string | undefined;
|
|
1085
1084
|
createdAt?: Date | undefined;
|
|
1086
1085
|
updatedAt?: Date | undefined;
|
|
1087
|
-
}> |
|
|
1086
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
1088
1087
|
environmentId?: string | undefined;
|
|
1089
1088
|
configId?: string | undefined;
|
|
1090
1089
|
configVariantId?: string | undefined;
|
|
@@ -1096,7 +1095,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
1096
1095
|
id?: string | undefined;
|
|
1097
1096
|
createdAt?: Date | undefined;
|
|
1098
1097
|
updatedAt?: Date | undefined;
|
|
1099
|
-
}> |
|
|
1098
|
+
}> | zod0.ZodSafeParseError<{
|
|
1100
1099
|
environmentId?: string | undefined;
|
|
1101
1100
|
configId?: string | undefined;
|
|
1102
1101
|
configVariantId?: string | undefined;
|
|
@@ -1108,21 +1107,21 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
1108
1107
|
id?: string | undefined;
|
|
1109
1108
|
createdAt?: Date | undefined;
|
|
1110
1109
|
updatedAt?: Date | undefined;
|
|
1111
|
-
}> |
|
|
1110
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
1112
1111
|
name?: string | null | undefined;
|
|
1113
1112
|
setupComplete?: boolean | undefined;
|
|
1114
1113
|
superAdminId?: string | null | undefined;
|
|
1115
1114
|
id?: string | undefined;
|
|
1116
1115
|
createdAt?: Date | undefined;
|
|
1117
1116
|
updatedAt?: Date | undefined;
|
|
1118
|
-
}> |
|
|
1117
|
+
}> | zod0.ZodSafeParseError<{
|
|
1119
1118
|
name?: string | null | undefined;
|
|
1120
1119
|
setupComplete?: boolean | undefined;
|
|
1121
1120
|
superAdminId?: string | null | undefined;
|
|
1122
1121
|
id?: string | undefined;
|
|
1123
1122
|
createdAt?: Date | undefined;
|
|
1124
1123
|
updatedAt?: Date | undefined;
|
|
1125
|
-
}> |
|
|
1124
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
1126
1125
|
providerId?: string | undefined;
|
|
1127
1126
|
name?: string | null | undefined;
|
|
1128
1127
|
config?: Record<string, unknown> | undefined;
|
|
@@ -1130,7 +1129,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
1130
1129
|
id?: string | undefined;
|
|
1131
1130
|
createdAt?: Date | undefined;
|
|
1132
1131
|
updatedAt?: Date | undefined;
|
|
1133
|
-
}> |
|
|
1132
|
+
}> | zod0.ZodSafeParseError<{
|
|
1134
1133
|
providerId?: string | undefined;
|
|
1135
1134
|
name?: string | null | undefined;
|
|
1136
1135
|
config?: Record<string, unknown> | undefined;
|
|
@@ -1138,7 +1137,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
1138
1137
|
id?: string | undefined;
|
|
1139
1138
|
createdAt?: Date | undefined;
|
|
1140
1139
|
updatedAt?: Date | undefined;
|
|
1141
|
-
}> |
|
|
1140
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
1142
1141
|
requestId?: string | undefined;
|
|
1143
1142
|
configId?: string | null | undefined;
|
|
1144
1143
|
variantId?: string | null | undefined;
|
|
@@ -1162,7 +1161,7 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
1162
1161
|
id?: string | undefined;
|
|
1163
1162
|
createdAt?: Date | undefined;
|
|
1164
1163
|
updatedAt?: Date | undefined;
|
|
1165
|
-
}> |
|
|
1164
|
+
}> | zod0.ZodSafeParseError<{
|
|
1166
1165
|
requestId?: string | undefined;
|
|
1167
1166
|
configId?: string | null | undefined;
|
|
1168
1167
|
variantId?: string | null | undefined;
|
|
@@ -1406,7 +1405,7 @@ declare function runAutoMigrations(db: Kysely<Database>, dbType: DatabaseType$1,
|
|
|
1406
1405
|
/**
|
|
1407
1406
|
* Supported database types
|
|
1408
1407
|
*/
|
|
1409
|
-
type DatabaseType = 'postgres' | 'mysql' | 'sqlite' | 'mssql'
|
|
1408
|
+
type DatabaseType = 'postgres' | 'mysql' | 'sqlite' | 'mssql';
|
|
1410
1409
|
/**
|
|
1411
1410
|
* Options for creating a database connection
|
|
1412
1411
|
*/
|
|
@@ -1432,9 +1431,6 @@ type DatabaseConnection = {
|
|
|
1432
1431
|
} | {
|
|
1433
1432
|
type: 'mssql';
|
|
1434
1433
|
dialect: MssqlDialect;
|
|
1435
|
-
} | {
|
|
1436
|
-
type: 'neon';
|
|
1437
|
-
dialect: NeonDialect;
|
|
1438
1434
|
} | {
|
|
1439
1435
|
type: DatabaseType;
|
|
1440
1436
|
kysely: Kysely<Database>;
|
|
@@ -1455,4 +1451,4 @@ declare function detectDatabaseType(db: unknown): DatabaseType | null;
|
|
|
1455
1451
|
*/
|
|
1456
1452
|
declare function createDatabaseFromConnection(rawConnection: any, options?: DatabaseOptions): Promise<Kysely<Database> | null>;
|
|
1457
1453
|
//#endregion
|
|
1458
|
-
export {
|
|
1454
|
+
export { SCHEMA_METADATA as A, WorkspaceSettings as B, EnvironmentSecretsTable as C, LLMRequestsTable as D, LLMRequest as E, Updateable as F, environmentsSchema as G, configVariantsSchema as H, Variant as I, schemas as J, llmRequestsSchema as K, VariantVersion as L, TableName as M, TargetingRule as N, ProviderConfig as O, TargetingRulesTable as P, workspaceSettingsSchema as Q, VariantVersionsTable as R, EnvironmentSecret as S, Insertable as T, configsSchema as U, WorkspaceSettingsTable as V, environmentSecretsSchema as W, variantVersionsSchema as X, targetingRulesSchema as Y, variantsSchema as Z, ConfigVariant as _, createDatabaseFromConnection as a, Database as b, MigrationResult as c, runAutoMigrations as d, parsePartialTableData as f, Config as g, validateTableData as h, createDatabase as i, Selectable as j, ProviderConfigsTable as k, getMigrations as l, validatePartialTableData as m, DatabaseOptions as n, detectDatabaseType as o, parseTableData as p, providerConfigsSchema as q, DatabaseType as r, MigrationOptions as s, DatabaseConnection as t, matchType as u, ConfigVariantsTable as v, EnvironmentsTable as w, Environment as x, ConfigsTable as y, VariantsTable as z };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ColumnType, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
|
|
2
|
-
import { NeonDialect } from "kysely-neon";
|
|
3
2
|
import * as zod497 from "zod";
|
|
4
3
|
import { z } from "zod";
|
|
5
4
|
|
|
@@ -1406,7 +1405,7 @@ declare function runAutoMigrations(db: Kysely<Database>, dbType: DatabaseType$1,
|
|
|
1406
1405
|
/**
|
|
1407
1406
|
* Supported database types
|
|
1408
1407
|
*/
|
|
1409
|
-
type DatabaseType = 'postgres' | 'mysql' | 'sqlite' | 'mssql'
|
|
1408
|
+
type DatabaseType = 'postgres' | 'mysql' | 'sqlite' | 'mssql';
|
|
1410
1409
|
/**
|
|
1411
1410
|
* Options for creating a database connection
|
|
1412
1411
|
*/
|
|
@@ -1432,9 +1431,6 @@ type DatabaseConnection = {
|
|
|
1432
1431
|
} | {
|
|
1433
1432
|
type: 'mssql';
|
|
1434
1433
|
dialect: MssqlDialect;
|
|
1435
|
-
} | {
|
|
1436
|
-
type: 'neon';
|
|
1437
|
-
dialect: NeonDialect;
|
|
1438
1434
|
} | {
|
|
1439
1435
|
type: DatabaseType;
|
|
1440
1436
|
kysely: Kysely<Database>;
|
|
@@ -1455,4 +1451,4 @@ declare function detectDatabaseType(db: unknown): DatabaseType | null;
|
|
|
1455
1451
|
*/
|
|
1456
1452
|
declare function createDatabaseFromConnection(rawConnection: any, options?: DatabaseOptions): Promise<Kysely<Database> | null>;
|
|
1457
1453
|
//#endregion
|
|
1458
|
-
export {
|
|
1454
|
+
export { SCHEMA_METADATA as A, WorkspaceSettings as B, EnvironmentSecretsTable as C, LLMRequestsTable as D, LLMRequest as E, Updateable as F, environmentsSchema as G, configVariantsSchema as H, Variant as I, schemas as J, llmRequestsSchema as K, VariantVersion as L, TableName as M, TargetingRule as N, ProviderConfig as O, TargetingRulesTable as P, workspaceSettingsSchema as Q, VariantVersionsTable as R, EnvironmentSecret as S, Insertable as T, configsSchema as U, WorkspaceSettingsTable as V, environmentSecretsSchema as W, variantVersionsSchema as X, targetingRulesSchema as Y, variantsSchema as Z, ConfigVariant as _, createDatabaseFromConnection as a, Database as b, MigrationResult as c, runAutoMigrations as d, parsePartialTableData as f, Config as g, validateTableData as h, createDatabase as i, Selectable as j, ProviderConfigsTable as k, getMigrations as l, validatePartialTableData as m, DatabaseOptions as n, detectDatabaseType as o, parseTableData as p, providerConfigsSchema as q, DatabaseType as r, MigrationOptions as s, DatabaseConnection as t, matchType as u, ConfigVariantsTable as v, EnvironmentsTable as w, Environment as x, ConfigsTable as y, VariantsTable as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const require_db = require('./db-BIiDmOuQ.cjs');
|
|
3
|
-
require('./neon-dialect-js5JsNqM.cjs');
|
|
1
|
+
const require_db = require('./db-CqDD6Ydv.cjs');
|
|
4
2
|
let __llmops_gateway = require("@llmops/gateway");
|
|
5
3
|
__llmops_gateway = require_db.__toESM(__llmops_gateway);
|
|
6
4
|
let kysely = require("kysely");
|
|
@@ -10,7 +8,6 @@ let node_path = require("node:path");
|
|
|
10
8
|
node_path = require_db.__toESM(node_path);
|
|
11
9
|
let __better_auth_utils_random = require("@better-auth/utils/random");
|
|
12
10
|
let node_crypto = require("node:crypto");
|
|
13
|
-
let kysely_neon = require("kysely-neon");
|
|
14
11
|
|
|
15
12
|
//#region src/providers/supported-providers.ts
|
|
16
13
|
/**
|
|
@@ -842,10 +839,7 @@ var CacheService = class {
|
|
|
842
839
|
}
|
|
843
840
|
createBackend(config) {
|
|
844
841
|
switch (config.backend) {
|
|
845
|
-
case "memory": return new MemoryCacheBackend(
|
|
846
|
-
maxSize: config.maxSize,
|
|
847
|
-
cleanupIntervalMs: config.cleanupInterval
|
|
848
|
-
});
|
|
842
|
+
case "memory": return new MemoryCacheBackend(config.maxSize, config.cleanupInterval);
|
|
849
843
|
case "file": return new FileCacheBackend(config.dataDir, config.fileName, config.saveInterval, config.cleanupInterval);
|
|
850
844
|
default: throw new Error(`Unsupported cache backend: ${config.backend}`);
|
|
851
845
|
}
|
|
@@ -2591,12 +2585,6 @@ exports.FileCacheBackend = FileCacheBackend;
|
|
|
2591
2585
|
exports.MS = MS;
|
|
2592
2586
|
exports.MemoryCacheBackend = MemoryCacheBackend;
|
|
2593
2587
|
exports.ModelsDevPricingProvider = ModelsDevPricingProvider;
|
|
2594
|
-
Object.defineProperty(exports, 'NeonDialect', {
|
|
2595
|
-
enumerable: true,
|
|
2596
|
-
get: function () {
|
|
2597
|
-
return kysely_neon.NeonDialect;
|
|
2598
|
-
}
|
|
2599
|
-
});
|
|
2600
2588
|
exports.SCHEMA_METADATA = require_db.SCHEMA_METADATA;
|
|
2601
2589
|
exports.SupportedProviders = SupportedProviders;
|
|
2602
2590
|
exports.calculateCost = calculateCost;
|