@llmops/core 0.4.8-beta.5 → 0.4.8-beta.6
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-lNniX_lj.cjs → bun-sqlite-dialect-D8jqel4D.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-CEt1ZD2V.cjs → db-C4vSSIoo.cjs} +17 -7
- package/dist/{db-BN99c_b5.mjs → db-DNmuKhIK.mjs} +13 -3
- package/dist/{index-BvrZuRon.d.mts → index-BYhMgUES.d.cts} +53 -49
- package/dist/{index-Bk_flDhH.d.cts → index-BvU4Gv3C.d.mts} +53 -49
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +269 -269
- package/dist/index.d.mts +269 -269
- package/dist/index.mjs +1 -1
- package/dist/{neon-dialect-sUVNvVYh.cjs → neon-dialect-COb-W-YR.cjs} +1 -1
- package/dist/{neon-dialect-C9_0GrsB.cjs → neon-dialect-CjY5HR5J.cjs} +1 -1
- package/dist/{node-sqlite-dialect-BPGejxOC.cjs → node-sqlite-dialect-krEZZBUP.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-C4vSSIoo.cjs');
|
|
2
|
+
const require_neon_dialect = require('../neon-dialect-COb-W-YR.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 ProviderConfigsTable, A as DatasetVersionRecord, At as schemas, B as GuardrailResult, C as ConfigVariantsTable, Ct as llmRequestsSchema, D as DatasetRecord, Dt as playgroundsSchema, E as Dataset, Et as playgroundRunsSchema, F as EnvironmentSecret, G as Playground, H as Insertable, I as EnvironmentSecretsTable, J as PlaygroundResultsTable, K as PlaygroundColumn, L as EnvironmentsTable, M as DatasetVersionsTable, Mt as variantVersionsSchema, N as DatasetsTable, Nt as variantsSchema, O as DatasetRecordsTable, Ot as providerConfigsSchema, P as Environment, Pt as workspaceSettingsSchema, Q as ProviderConfig, R as GuardrailConfig, S as ConfigVariant, St as guardrailConfigsSchema, T as Database, Tt as playgroundResultsSchema, U as LLMRequest, V as GuardrailResults, W as LLMRequestsTable, X as PlaygroundRunsTable, Y as PlaygroundRun, Z as PlaygroundsTable, _ as validateTableData, _t as datasetVersionRecordsSchema, a as createDatabaseFromConnection, at as TargetingRule, b as runSchemaSQL, bt as environmentSecretsSchema, c as executeWithSchema, ct as Variant, d as getMigrations, dt as VariantsTable, et as ProviderGuardrailOverride, f as matchType, ft as WorkspaceSettings, g as validatePartialTableData, gt as datasetRecordsSchema, h as parseTableData, ht as configsSchema, i as createDatabase, it as TableName, j as DatasetVersionRecordsTable, jt as targetingRulesSchema, k as DatasetVersion, kt as providerGuardrailOverridesSchema, l as MigrationOptions, lt as VariantVersion, m as parsePartialTableData, mt as configVariantsSchema, n as DatabaseOptions, nt as SCHEMA_METADATA, o as detectDatabaseType, ot as TargetingRulesTable, p as runAutoMigrations, pt as WorkspaceSettingsTable, q as PlaygroundResult, r as DatabaseType, rt as Selectable, s as createNeonDialect, st as Updateable, t as DatabaseConnection, tt as ProviderGuardrailOverridesTable, u as MigrationResult, ut as VariantVersionsTable, v as createNeonSqlFunction, vt as datasetVersionsSchema, w as ConfigsTable, wt as playgroundColumnSchema, x as Config, xt as environmentsSchema, y as generatePostgresSchemaSQL, yt as datasetsSchema, z as GuardrailConfigsTable } from "../index-
|
|
1
|
+
import { $ as ProviderConfigsTable, A as DatasetVersionRecord, At as schemas, B as GuardrailResult, C as ConfigVariantsTable, Ct as llmRequestsSchema, D as DatasetRecord, Dt as playgroundsSchema, E as Dataset, Et as playgroundRunsSchema, F as EnvironmentSecret, G as Playground, H as Insertable, I as EnvironmentSecretsTable, J as PlaygroundResultsTable, K as PlaygroundColumn, L as EnvironmentsTable, M as DatasetVersionsTable, Mt as variantVersionsSchema, N as DatasetsTable, Nt as variantsSchema, O as DatasetRecordsTable, Ot as providerConfigsSchema, P as Environment, Pt as workspaceSettingsSchema, Q as ProviderConfig, R as GuardrailConfig, S as ConfigVariant, St as guardrailConfigsSchema, T as Database, Tt as playgroundResultsSchema, U as LLMRequest, V as GuardrailResults, W as LLMRequestsTable, X as PlaygroundRunsTable, Y as PlaygroundRun, Z as PlaygroundsTable, _ as validateTableData, _t as datasetVersionRecordsSchema, a as createDatabaseFromConnection, at as TargetingRule, b as runSchemaSQL, bt as environmentSecretsSchema, c as executeWithSchema, ct as Variant, d as getMigrations, dt as VariantsTable, et as ProviderGuardrailOverride, f as matchType, ft as WorkspaceSettings, g as validatePartialTableData, gt as datasetRecordsSchema, h as parseTableData, ht as configsSchema, i as createDatabase, it as TableName, j as DatasetVersionRecordsTable, jt as targetingRulesSchema, k as DatasetVersion, kt as providerGuardrailOverridesSchema, l as MigrationOptions, lt as VariantVersion, m as parsePartialTableData, mt as configVariantsSchema, n as DatabaseOptions, nt as SCHEMA_METADATA, o as detectDatabaseType, ot as TargetingRulesTable, p as runAutoMigrations, pt as WorkspaceSettingsTable, q as PlaygroundResult, r as DatabaseType, rt as Selectable, s as createNeonDialect, st as Updateable, t as DatabaseConnection, tt as ProviderGuardrailOverridesTable, u as MigrationResult, ut as VariantVersionsTable, v as createNeonSqlFunction, vt as datasetVersionsSchema, w as ConfigsTable, wt as playgroundColumnSchema, x as Config, xt as environmentsSchema, y as generatePostgresSchemaSQL, yt as datasetsSchema, z as GuardrailConfigsTable } from "../index-BYhMgUES.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, TableName, TargetingRule, TargetingRulesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, createNeonSqlFunction, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, generatePostgresSchemaSQL, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, runSchemaSQL, schemas, targetingRulesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ProviderConfigsTable, A as DatasetVersionRecord, At as schemas, B as GuardrailResult, C as ConfigVariantsTable, Ct as llmRequestsSchema, D as DatasetRecord, Dt as playgroundsSchema, E as Dataset, Et as playgroundRunsSchema, F as EnvironmentSecret, G as Playground, H as Insertable, I as EnvironmentSecretsTable, J as PlaygroundResultsTable, K as PlaygroundColumn, L as EnvironmentsTable, M as DatasetVersionsTable, Mt as variantVersionsSchema, N as DatasetsTable, Nt as variantsSchema, O as DatasetRecordsTable, Ot as providerConfigsSchema, P as Environment, Pt as workspaceSettingsSchema, Q as ProviderConfig, R as GuardrailConfig, S as ConfigVariant, St as guardrailConfigsSchema, T as Database, Tt as playgroundResultsSchema, U as LLMRequest, V as GuardrailResults, W as LLMRequestsTable, X as PlaygroundRunsTable, Y as PlaygroundRun, Z as PlaygroundsTable, _ as validateTableData, _t as datasetVersionRecordsSchema, a as createDatabaseFromConnection, at as TargetingRule, b as runSchemaSQL, bt as environmentSecretsSchema, c as executeWithSchema, ct as Variant, d as getMigrations, dt as VariantsTable, et as ProviderGuardrailOverride, f as matchType, ft as WorkspaceSettings, g as validatePartialTableData, gt as datasetRecordsSchema, h as parseTableData, ht as configsSchema, i as createDatabase, it as TableName, j as DatasetVersionRecordsTable, jt as targetingRulesSchema, k as DatasetVersion, kt as providerGuardrailOverridesSchema, l as MigrationOptions, lt as VariantVersion, m as parsePartialTableData, mt as configVariantsSchema, n as DatabaseOptions, nt as SCHEMA_METADATA, o as detectDatabaseType, ot as TargetingRulesTable, p as runAutoMigrations, pt as WorkspaceSettingsTable, q as PlaygroundResult, r as DatabaseType, rt as Selectable, s as createNeonDialect, st as Updateable, t as DatabaseConnection, tt as ProviderGuardrailOverridesTable, u as MigrationResult, ut as VariantVersionsTable, v as createNeonSqlFunction, vt as datasetVersionsSchema, w as ConfigsTable, wt as playgroundColumnSchema, x as Config, xt as environmentsSchema, y as generatePostgresSchemaSQL, yt as datasetsSchema, z as GuardrailConfigsTable } from "../index-
|
|
1
|
+
import { $ as ProviderConfigsTable, A as DatasetVersionRecord, At as schemas, B as GuardrailResult, C as ConfigVariantsTable, Ct as llmRequestsSchema, D as DatasetRecord, Dt as playgroundsSchema, E as Dataset, Et as playgroundRunsSchema, F as EnvironmentSecret, G as Playground, H as Insertable, I as EnvironmentSecretsTable, J as PlaygroundResultsTable, K as PlaygroundColumn, L as EnvironmentsTable, M as DatasetVersionsTable, Mt as variantVersionsSchema, N as DatasetsTable, Nt as variantsSchema, O as DatasetRecordsTable, Ot as providerConfigsSchema, P as Environment, Pt as workspaceSettingsSchema, Q as ProviderConfig, R as GuardrailConfig, S as ConfigVariant, St as guardrailConfigsSchema, T as Database, Tt as playgroundResultsSchema, U as LLMRequest, V as GuardrailResults, W as LLMRequestsTable, X as PlaygroundRunsTable, Y as PlaygroundRun, Z as PlaygroundsTable, _ as validateTableData, _t as datasetVersionRecordsSchema, a as createDatabaseFromConnection, at as TargetingRule, b as runSchemaSQL, bt as environmentSecretsSchema, c as executeWithSchema, ct as Variant, d as getMigrations, dt as VariantsTable, et as ProviderGuardrailOverride, f as matchType, ft as WorkspaceSettings, g as validatePartialTableData, gt as datasetRecordsSchema, h as parseTableData, ht as configsSchema, i as createDatabase, it as TableName, j as DatasetVersionRecordsTable, jt as targetingRulesSchema, k as DatasetVersion, kt as providerGuardrailOverridesSchema, l as MigrationOptions, lt as VariantVersion, m as parsePartialTableData, mt as configVariantsSchema, n as DatabaseOptions, nt as SCHEMA_METADATA, o as detectDatabaseType, ot as TargetingRulesTable, p as runAutoMigrations, pt as WorkspaceSettingsTable, q as PlaygroundResult, r as DatabaseType, rt as Selectable, s as createNeonDialect, st as Updateable, t as DatabaseConnection, tt as ProviderGuardrailOverridesTable, u as MigrationResult, ut as VariantVersionsTable, v as createNeonSqlFunction, vt as datasetVersionsSchema, w as ConfigsTable, wt as playgroundColumnSchema, x as Config, xt as environmentsSchema, y as generatePostgresSchemaSQL, yt as datasetsSchema, z as GuardrailConfigsTable } from "../index-BvU4Gv3C.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, TableName, TargetingRule, TargetingRulesTable, Updateable, Variant, VariantVersion, VariantVersionsTable, VariantsTable, WorkspaceSettings, WorkspaceSettingsTable, configVariantsSchema, configsSchema, createDatabase, createDatabaseFromConnection, createNeonDialect, createNeonSqlFunction, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, generatePostgresSchemaSQL, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, runSchemaSQL, schemas, targetingRulesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as playgroundsSchema, C as environmentSecretsSchema, D as playgroundColumnSchema, E as llmRequestsSchema, F as variantVersionsSchema, I as variantsSchema, L as workspaceSettingsSchema, M as providerGuardrailOverridesSchema, N as schemas, O as playgroundResultsSchema, P as targetingRulesSchema, S as datasetsSchema, T as guardrailConfigsSchema, _ as configVariantsSchema, a as matchType, b as datasetVersionRecordsSchema, d as validatePartialTableData, f as validateTableData, g as SCHEMA_METADATA, h as runSchemaSQL, i as getMigrations, j as providerConfigsSchema, k as playgroundRunsSchema, l as parsePartialTableData, m as generatePostgresSchemaSQL, n as createDatabaseFromConnection, o as runAutoMigrations, p as createNeonSqlFunction, r as detectDatabaseType, t as createDatabase, u as parseTableData, v as configsSchema, w as environmentsSchema, x as datasetVersionsSchema, y as datasetRecordsSchema } from "../db-
|
|
1
|
+
import { A as playgroundsSchema, C as environmentSecretsSchema, D as playgroundColumnSchema, E as llmRequestsSchema, F as variantVersionsSchema, I as variantsSchema, L as workspaceSettingsSchema, M as providerGuardrailOverridesSchema, N as schemas, O as playgroundResultsSchema, P as targetingRulesSchema, S as datasetsSchema, T as guardrailConfigsSchema, _ as configVariantsSchema, a as matchType, b as datasetVersionRecordsSchema, d as validatePartialTableData, f as validateTableData, g as SCHEMA_METADATA, h as runSchemaSQL, i as getMigrations, j as providerConfigsSchema, k as playgroundRunsSchema, l as parsePartialTableData, m as generatePostgresSchemaSQL, n as createDatabaseFromConnection, o as runAutoMigrations, p as createNeonSqlFunction, r as detectDatabaseType, t as createDatabase, u as parseTableData, v as configsSchema, w as environmentsSchema, x as datasetVersionsSchema, y as datasetRecordsSchema } from "../db-DNmuKhIK.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, createNeonSqlFunction, datasetRecordsSchema, datasetVersionRecordsSchema, datasetVersionsSchema, datasetsSchema, detectDatabaseType, environmentSecretsSchema, environmentsSchema, executeWithSchema, generatePostgresSchemaSQL, getMigrations, guardrailConfigsSchema, llmRequestsSchema, matchType, parsePartialTableData, parseTableData, playgroundColumnSchema, playgroundResultsSchema, playgroundRunsSchema, playgroundsSchema, providerConfigsSchema, providerGuardrailOverridesSchema, runAutoMigrations, runSchemaSQL, schemas, targetingRulesSchema, validatePartialTableData, validateTableData, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
|
@@ -14148,19 +14148,29 @@ function splitSQLStatements(sql$1) {
|
|
|
14148
14148
|
/**
|
|
14149
14149
|
* Create a Neon SQL function from various connection types
|
|
14150
14150
|
*
|
|
14151
|
+
* The Neon serverless library returns a tagged template function from neon(),
|
|
14152
|
+
* but for conventional string queries we need to use sql.query() instead.
|
|
14153
|
+
* This helper wraps the neon instance to provide a simple query function.
|
|
14154
|
+
*
|
|
14151
14155
|
* @param rawConnection - neon() function, connection string, or undefined (uses env vars)
|
|
14152
14156
|
* @returns SQL function that can be used with runSchemaSQL, or null if unable to create
|
|
14153
14157
|
*/
|
|
14154
14158
|
async function createNeonSqlFunction(rawConnection) {
|
|
14155
|
-
|
|
14159
|
+
const wrapNeonSql = (sql$1) => {
|
|
14160
|
+
return (query) => sql$1.query(query);
|
|
14161
|
+
};
|
|
14162
|
+
if (typeof rawConnection === "function") {
|
|
14163
|
+
if ("query" in rawConnection && typeof rawConnection.query === "function") return wrapNeonSql(rawConnection);
|
|
14164
|
+
return rawConnection;
|
|
14165
|
+
}
|
|
14156
14166
|
if (typeof rawConnection === "string" && rawConnection) {
|
|
14157
14167
|
const { neon: neon$1 } = await import("@neondatabase/serverless");
|
|
14158
|
-
return neon$1(rawConnection);
|
|
14168
|
+
return wrapNeonSql(neon$1(rawConnection));
|
|
14159
14169
|
}
|
|
14160
14170
|
const connectionString = process.env.NEON_CONNECTION_STRING || process.env.NEON_PG_URL || process.env.DATABASE_URL || process.env.POSTGRES_URL || "";
|
|
14161
14171
|
if (!connectionString) return null;
|
|
14162
14172
|
const { neon } = await import("@neondatabase/serverless");
|
|
14163
|
-
return neon(connectionString);
|
|
14173
|
+
return wrapNeonSql(neon(connectionString));
|
|
14164
14174
|
}
|
|
14165
14175
|
|
|
14166
14176
|
//#endregion
|
|
@@ -14621,12 +14631,12 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
14621
14631
|
case "sqlite":
|
|
14622
14632
|
if ("aggregate" in rawConnection && !("createSession" in rawConnection)) dialect = new kysely.SqliteDialect({ database: rawConnection });
|
|
14623
14633
|
else if ("fileControl" in rawConnection) {
|
|
14624
|
-
const { BunSqliteDialect } = await Promise.resolve().then(() => require("./bun-sqlite-dialect-
|
|
14634
|
+
const { BunSqliteDialect } = await Promise.resolve().then(() => require("./bun-sqlite-dialect-D8jqel4D.cjs"));
|
|
14625
14635
|
dialect = new BunSqliteDialect({ database: rawConnection });
|
|
14626
14636
|
} else if ("createSession" in rawConnection && typeof window === "undefined") try {
|
|
14627
14637
|
const { DatabaseSync } = await import("node:sqlite");
|
|
14628
14638
|
if (rawConnection instanceof DatabaseSync) {
|
|
14629
|
-
const { NodeSqliteDialect } = await Promise.resolve().then(() => require("./node-sqlite-dialect-
|
|
14639
|
+
const { NodeSqliteDialect } = await Promise.resolve().then(() => require("./node-sqlite-dialect-krEZZBUP.cjs"));
|
|
14630
14640
|
dialect = new NodeSqliteDialect({ database: rawConnection });
|
|
14631
14641
|
}
|
|
14632
14642
|
} catch {}
|
|
@@ -14644,7 +14654,7 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
14644
14654
|
break;
|
|
14645
14655
|
case "neon": {
|
|
14646
14656
|
if (typeof rawConnection === "function") {
|
|
14647
|
-
const { createNeonDialect: createNeonDialect$1 } = await Promise.resolve().then(() => require("./neon-dialect-
|
|
14657
|
+
const { createNeonDialect: createNeonDialect$1 } = await Promise.resolve().then(() => require("./neon-dialect-CjY5HR5J.cjs"));
|
|
14648
14658
|
dialect = createNeonDialect$1(rawConnection);
|
|
14649
14659
|
break;
|
|
14650
14660
|
}
|
|
@@ -14652,7 +14662,7 @@ async function createDatabaseFromConnection(rawConnection, options) {
|
|
|
14652
14662
|
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");
|
|
14653
14663
|
const { neon } = await import("@neondatabase/serverless");
|
|
14654
14664
|
const sql$1 = neon(connectionString);
|
|
14655
|
-
const { createNeonDialect } = await Promise.resolve().then(() => require("./neon-dialect-
|
|
14665
|
+
const { createNeonDialect } = await Promise.resolve().then(() => require("./neon-dialect-CjY5HR5J.cjs"));
|
|
14656
14666
|
dialect = createNeonDialect(sql$1);
|
|
14657
14667
|
break;
|
|
14658
14668
|
}
|
|
@@ -14124,19 +14124,29 @@ function splitSQLStatements(sql$1) {
|
|
|
14124
14124
|
/**
|
|
14125
14125
|
* Create a Neon SQL function from various connection types
|
|
14126
14126
|
*
|
|
14127
|
+
* The Neon serverless library returns a tagged template function from neon(),
|
|
14128
|
+
* but for conventional string queries we need to use sql.query() instead.
|
|
14129
|
+
* This helper wraps the neon instance to provide a simple query function.
|
|
14130
|
+
*
|
|
14127
14131
|
* @param rawConnection - neon() function, connection string, or undefined (uses env vars)
|
|
14128
14132
|
* @returns SQL function that can be used with runSchemaSQL, or null if unable to create
|
|
14129
14133
|
*/
|
|
14130
14134
|
async function createNeonSqlFunction(rawConnection) {
|
|
14131
|
-
|
|
14135
|
+
const wrapNeonSql = (sql$1) => {
|
|
14136
|
+
return (query) => sql$1.query(query);
|
|
14137
|
+
};
|
|
14138
|
+
if (typeof rawConnection === "function") {
|
|
14139
|
+
if ("query" in rawConnection && typeof rawConnection.query === "function") return wrapNeonSql(rawConnection);
|
|
14140
|
+
return rawConnection;
|
|
14141
|
+
}
|
|
14132
14142
|
if (typeof rawConnection === "string" && rawConnection) {
|
|
14133
14143
|
const { neon: neon$1 } = await import("@neondatabase/serverless");
|
|
14134
|
-
return neon$1(rawConnection);
|
|
14144
|
+
return wrapNeonSql(neon$1(rawConnection));
|
|
14135
14145
|
}
|
|
14136
14146
|
const connectionString = process.env.NEON_CONNECTION_STRING || process.env.NEON_PG_URL || process.env.DATABASE_URL || process.env.POSTGRES_URL || "";
|
|
14137
14147
|
if (!connectionString) return null;
|
|
14138
14148
|
const { neon } = await import("@neondatabase/serverless");
|
|
14139
|
-
return neon(connectionString);
|
|
14149
|
+
return wrapNeonSql(neon(connectionString));
|
|
14140
14150
|
}
|
|
14141
14151
|
|
|
14142
14152
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnType, Dialect, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
|
|
2
|
-
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
3
2
|
import * as zod0 from "zod";
|
|
4
3
|
import { z } from "zod";
|
|
4
|
+
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
5
5
|
|
|
6
6
|
//#region src/db/schema.d.ts
|
|
7
7
|
declare const configsSchema: z.ZodObject<{
|
|
@@ -1927,6 +1927,10 @@ declare function runSchemaSQL(sql: (query: string) => Promise<unknown>, schemaNa
|
|
|
1927
1927
|
/**
|
|
1928
1928
|
* Create a Neon SQL function from various connection types
|
|
1929
1929
|
*
|
|
1930
|
+
* The Neon serverless library returns a tagged template function from neon(),
|
|
1931
|
+
* but for conventional string queries we need to use sql.query() instead.
|
|
1932
|
+
* This helper wraps the neon instance to provide a simple query function.
|
|
1933
|
+
*
|
|
1930
1934
|
* @param rawConnection - neon() function, connection string, or undefined (uses env vars)
|
|
1931
1935
|
* @returns SQL function that can be used with runSchemaSQL, or null if unable to create
|
|
1932
1936
|
*/
|
|
@@ -2115,22 +2119,6 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2115
2119
|
id: string;
|
|
2116
2120
|
createdAt: Date;
|
|
2117
2121
|
updatedAt: Date;
|
|
2118
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2119
|
-
providerConfigId: string;
|
|
2120
|
-
guardrailConfigId: string;
|
|
2121
|
-
enabled: boolean;
|
|
2122
|
-
id: string;
|
|
2123
|
-
createdAt: Date;
|
|
2124
|
-
updatedAt: Date;
|
|
2125
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2126
|
-
}> | zod0.ZodSafeParseError<{
|
|
2127
|
-
providerConfigId: string;
|
|
2128
|
-
guardrailConfigId: string;
|
|
2129
|
-
enabled: boolean;
|
|
2130
|
-
id: string;
|
|
2131
|
-
createdAt: Date;
|
|
2132
|
-
updatedAt: Date;
|
|
2133
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2134
2122
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2135
2123
|
datasetId: string;
|
|
2136
2124
|
versionNumber: number;
|
|
@@ -2181,6 +2169,22 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2181
2169
|
id: string;
|
|
2182
2170
|
createdAt: Date;
|
|
2183
2171
|
updatedAt: Date;
|
|
2172
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
2173
|
+
providerConfigId: string;
|
|
2174
|
+
guardrailConfigId: string;
|
|
2175
|
+
enabled: boolean;
|
|
2176
|
+
id: string;
|
|
2177
|
+
createdAt: Date;
|
|
2178
|
+
updatedAt: Date;
|
|
2179
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2180
|
+
}> | zod0.ZodSafeParseError<{
|
|
2181
|
+
providerConfigId: string;
|
|
2182
|
+
guardrailConfigId: string;
|
|
2183
|
+
enabled: boolean;
|
|
2184
|
+
id: string;
|
|
2185
|
+
createdAt: Date;
|
|
2186
|
+
updatedAt: Date;
|
|
2187
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2184
2188
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2185
2189
|
requestId: string;
|
|
2186
2190
|
provider: string;
|
|
@@ -2421,22 +2425,6 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2421
2425
|
id?: string | undefined;
|
|
2422
2426
|
createdAt?: Date | undefined;
|
|
2423
2427
|
updatedAt?: Date | undefined;
|
|
2424
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2425
|
-
providerConfigId?: string | undefined;
|
|
2426
|
-
guardrailConfigId?: string | undefined;
|
|
2427
|
-
enabled?: boolean | undefined;
|
|
2428
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2429
|
-
id?: string | undefined;
|
|
2430
|
-
createdAt?: Date | undefined;
|
|
2431
|
-
updatedAt?: Date | undefined;
|
|
2432
|
-
}> | zod0.ZodSafeParseError<{
|
|
2433
|
-
providerConfigId?: string | undefined;
|
|
2434
|
-
guardrailConfigId?: string | undefined;
|
|
2435
|
-
enabled?: boolean | undefined;
|
|
2436
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2437
|
-
id?: string | undefined;
|
|
2438
|
-
createdAt?: Date | undefined;
|
|
2439
|
-
updatedAt?: Date | undefined;
|
|
2440
2428
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2441
2429
|
datasetId?: string | undefined;
|
|
2442
2430
|
versionNumber?: number | undefined;
|
|
@@ -2487,6 +2475,22 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2487
2475
|
id?: string | undefined;
|
|
2488
2476
|
createdAt?: Date | undefined;
|
|
2489
2477
|
updatedAt?: Date | undefined;
|
|
2478
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
2479
|
+
providerConfigId?: string | undefined;
|
|
2480
|
+
guardrailConfigId?: string | undefined;
|
|
2481
|
+
enabled?: boolean | undefined;
|
|
2482
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2483
|
+
id?: string | undefined;
|
|
2484
|
+
createdAt?: Date | undefined;
|
|
2485
|
+
updatedAt?: Date | undefined;
|
|
2486
|
+
}> | zod0.ZodSafeParseError<{
|
|
2487
|
+
providerConfigId?: string | undefined;
|
|
2488
|
+
guardrailConfigId?: string | undefined;
|
|
2489
|
+
enabled?: boolean | undefined;
|
|
2490
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2491
|
+
id?: string | undefined;
|
|
2492
|
+
createdAt?: Date | undefined;
|
|
2493
|
+
updatedAt?: Date | undefined;
|
|
2490
2494
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2491
2495
|
requestId?: string | undefined;
|
|
2492
2496
|
configId?: string | null | undefined;
|
|
@@ -2650,14 +2654,6 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
2650
2654
|
id: string;
|
|
2651
2655
|
createdAt: Date;
|
|
2652
2656
|
updatedAt: Date;
|
|
2653
|
-
} | {
|
|
2654
|
-
providerConfigId: string;
|
|
2655
|
-
guardrailConfigId: string;
|
|
2656
|
-
enabled: boolean;
|
|
2657
|
-
id: string;
|
|
2658
|
-
createdAt: Date;
|
|
2659
|
-
updatedAt: Date;
|
|
2660
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2661
2657
|
} | {
|
|
2662
2658
|
datasetId: string;
|
|
2663
2659
|
versionNumber: number;
|
|
@@ -2683,6 +2679,14 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
2683
2679
|
id: string;
|
|
2684
2680
|
createdAt: Date;
|
|
2685
2681
|
updatedAt: Date;
|
|
2682
|
+
} | {
|
|
2683
|
+
providerConfigId: string;
|
|
2684
|
+
guardrailConfigId: string;
|
|
2685
|
+
enabled: boolean;
|
|
2686
|
+
id: string;
|
|
2687
|
+
createdAt: Date;
|
|
2688
|
+
updatedAt: Date;
|
|
2689
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2686
2690
|
} | {
|
|
2687
2691
|
requestId: string;
|
|
2688
2692
|
provider: string;
|
|
@@ -2805,14 +2809,6 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
2805
2809
|
id?: string | undefined;
|
|
2806
2810
|
createdAt?: Date | undefined;
|
|
2807
2811
|
updatedAt?: Date | undefined;
|
|
2808
|
-
} | {
|
|
2809
|
-
providerConfigId?: string | undefined;
|
|
2810
|
-
guardrailConfigId?: string | undefined;
|
|
2811
|
-
enabled?: boolean | undefined;
|
|
2812
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2813
|
-
id?: string | undefined;
|
|
2814
|
-
createdAt?: Date | undefined;
|
|
2815
|
-
updatedAt?: Date | undefined;
|
|
2816
2812
|
} | {
|
|
2817
2813
|
datasetId?: string | undefined;
|
|
2818
2814
|
versionNumber?: number | undefined;
|
|
@@ -2838,6 +2834,14 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
2838
2834
|
id?: string | undefined;
|
|
2839
2835
|
createdAt?: Date | undefined;
|
|
2840
2836
|
updatedAt?: Date | undefined;
|
|
2837
|
+
} | {
|
|
2838
|
+
providerConfigId?: string | undefined;
|
|
2839
|
+
guardrailConfigId?: string | undefined;
|
|
2840
|
+
enabled?: boolean | undefined;
|
|
2841
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2842
|
+
id?: string | undefined;
|
|
2843
|
+
createdAt?: Date | undefined;
|
|
2844
|
+
updatedAt?: Date | undefined;
|
|
2841
2845
|
} | {
|
|
2842
2846
|
requestId?: string | undefined;
|
|
2843
2847
|
configId?: string | null | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnType, Dialect, Generated, Kysely, MssqlDialect, MysqlDialect, PostgresDialect, SqliteDialect } from "kysely";
|
|
2
|
+
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
2
3
|
import * as zod0 from "zod";
|
|
3
4
|
import { z } from "zod";
|
|
4
|
-
import { NeonQueryFunction } from "@neondatabase/serverless";
|
|
5
5
|
|
|
6
6
|
//#region src/db/schema.d.ts
|
|
7
7
|
declare const configsSchema: z.ZodObject<{
|
|
@@ -1927,6 +1927,10 @@ declare function runSchemaSQL(sql: (query: string) => Promise<unknown>, schemaNa
|
|
|
1927
1927
|
/**
|
|
1928
1928
|
* Create a Neon SQL function from various connection types
|
|
1929
1929
|
*
|
|
1930
|
+
* The Neon serverless library returns a tagged template function from neon(),
|
|
1931
|
+
* but for conventional string queries we need to use sql.query() instead.
|
|
1932
|
+
* This helper wraps the neon instance to provide a simple query function.
|
|
1933
|
+
*
|
|
1930
1934
|
* @param rawConnection - neon() function, connection string, or undefined (uses env vars)
|
|
1931
1935
|
* @returns SQL function that can be used with runSchemaSQL, or null if unable to create
|
|
1932
1936
|
*/
|
|
@@ -2115,22 +2119,6 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2115
2119
|
id: string;
|
|
2116
2120
|
createdAt: Date;
|
|
2117
2121
|
updatedAt: Date;
|
|
2118
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2119
|
-
providerConfigId: string;
|
|
2120
|
-
guardrailConfigId: string;
|
|
2121
|
-
enabled: boolean;
|
|
2122
|
-
id: string;
|
|
2123
|
-
createdAt: Date;
|
|
2124
|
-
updatedAt: Date;
|
|
2125
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2126
|
-
}> | zod0.ZodSafeParseError<{
|
|
2127
|
-
providerConfigId: string;
|
|
2128
|
-
guardrailConfigId: string;
|
|
2129
|
-
enabled: boolean;
|
|
2130
|
-
id: string;
|
|
2131
|
-
createdAt: Date;
|
|
2132
|
-
updatedAt: Date;
|
|
2133
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2134
2122
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2135
2123
|
datasetId: string;
|
|
2136
2124
|
versionNumber: number;
|
|
@@ -2181,6 +2169,22 @@ declare function validateTableData<T extends TableName>(table: T, data: unknown)
|
|
|
2181
2169
|
id: string;
|
|
2182
2170
|
createdAt: Date;
|
|
2183
2171
|
updatedAt: Date;
|
|
2172
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
2173
|
+
providerConfigId: string;
|
|
2174
|
+
guardrailConfigId: string;
|
|
2175
|
+
enabled: boolean;
|
|
2176
|
+
id: string;
|
|
2177
|
+
createdAt: Date;
|
|
2178
|
+
updatedAt: Date;
|
|
2179
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2180
|
+
}> | zod0.ZodSafeParseError<{
|
|
2181
|
+
providerConfigId: string;
|
|
2182
|
+
guardrailConfigId: string;
|
|
2183
|
+
enabled: boolean;
|
|
2184
|
+
id: string;
|
|
2185
|
+
createdAt: Date;
|
|
2186
|
+
updatedAt: Date;
|
|
2187
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2184
2188
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2185
2189
|
requestId: string;
|
|
2186
2190
|
provider: string;
|
|
@@ -2421,22 +2425,6 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2421
2425
|
id?: string | undefined;
|
|
2422
2426
|
createdAt?: Date | undefined;
|
|
2423
2427
|
updatedAt?: Date | undefined;
|
|
2424
|
-
}> | zod0.ZodSafeParseSuccess<{
|
|
2425
|
-
providerConfigId?: string | undefined;
|
|
2426
|
-
guardrailConfigId?: string | undefined;
|
|
2427
|
-
enabled?: boolean | undefined;
|
|
2428
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2429
|
-
id?: string | undefined;
|
|
2430
|
-
createdAt?: Date | undefined;
|
|
2431
|
-
updatedAt?: Date | undefined;
|
|
2432
|
-
}> | zod0.ZodSafeParseError<{
|
|
2433
|
-
providerConfigId?: string | undefined;
|
|
2434
|
-
guardrailConfigId?: string | undefined;
|
|
2435
|
-
enabled?: boolean | undefined;
|
|
2436
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2437
|
-
id?: string | undefined;
|
|
2438
|
-
createdAt?: Date | undefined;
|
|
2439
|
-
updatedAt?: Date | undefined;
|
|
2440
2428
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2441
2429
|
datasetId?: string | undefined;
|
|
2442
2430
|
versionNumber?: number | undefined;
|
|
@@ -2487,6 +2475,22 @@ declare function validatePartialTableData<T extends TableName>(table: T, data: u
|
|
|
2487
2475
|
id?: string | undefined;
|
|
2488
2476
|
createdAt?: Date | undefined;
|
|
2489
2477
|
updatedAt?: Date | undefined;
|
|
2478
|
+
}> | zod0.ZodSafeParseSuccess<{
|
|
2479
|
+
providerConfigId?: string | undefined;
|
|
2480
|
+
guardrailConfigId?: string | undefined;
|
|
2481
|
+
enabled?: boolean | undefined;
|
|
2482
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2483
|
+
id?: string | undefined;
|
|
2484
|
+
createdAt?: Date | undefined;
|
|
2485
|
+
updatedAt?: Date | undefined;
|
|
2486
|
+
}> | zod0.ZodSafeParseError<{
|
|
2487
|
+
providerConfigId?: string | undefined;
|
|
2488
|
+
guardrailConfigId?: string | undefined;
|
|
2489
|
+
enabled?: boolean | undefined;
|
|
2490
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2491
|
+
id?: string | undefined;
|
|
2492
|
+
createdAt?: Date | undefined;
|
|
2493
|
+
updatedAt?: Date | undefined;
|
|
2490
2494
|
}> | zod0.ZodSafeParseSuccess<{
|
|
2491
2495
|
requestId?: string | undefined;
|
|
2492
2496
|
configId?: string | null | undefined;
|
|
@@ -2650,14 +2654,6 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
2650
2654
|
id: string;
|
|
2651
2655
|
createdAt: Date;
|
|
2652
2656
|
updatedAt: Date;
|
|
2653
|
-
} | {
|
|
2654
|
-
providerConfigId: string;
|
|
2655
|
-
guardrailConfigId: string;
|
|
2656
|
-
enabled: boolean;
|
|
2657
|
-
id: string;
|
|
2658
|
-
createdAt: Date;
|
|
2659
|
-
updatedAt: Date;
|
|
2660
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2661
2657
|
} | {
|
|
2662
2658
|
datasetId: string;
|
|
2663
2659
|
versionNumber: number;
|
|
@@ -2683,6 +2679,14 @@ declare function parseTableData<T extends TableName>(table: T, data: unknown): {
|
|
|
2683
2679
|
id: string;
|
|
2684
2680
|
createdAt: Date;
|
|
2685
2681
|
updatedAt: Date;
|
|
2682
|
+
} | {
|
|
2683
|
+
providerConfigId: string;
|
|
2684
|
+
guardrailConfigId: string;
|
|
2685
|
+
enabled: boolean;
|
|
2686
|
+
id: string;
|
|
2687
|
+
createdAt: Date;
|
|
2688
|
+
updatedAt: Date;
|
|
2689
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2686
2690
|
} | {
|
|
2687
2691
|
requestId: string;
|
|
2688
2692
|
provider: string;
|
|
@@ -2805,14 +2809,6 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
2805
2809
|
id?: string | undefined;
|
|
2806
2810
|
createdAt?: Date | undefined;
|
|
2807
2811
|
updatedAt?: Date | undefined;
|
|
2808
|
-
} | {
|
|
2809
|
-
providerConfigId?: string | undefined;
|
|
2810
|
-
guardrailConfigId?: string | undefined;
|
|
2811
|
-
enabled?: boolean | undefined;
|
|
2812
|
-
parameters?: Record<string, unknown> | null | undefined;
|
|
2813
|
-
id?: string | undefined;
|
|
2814
|
-
createdAt?: Date | undefined;
|
|
2815
|
-
updatedAt?: Date | undefined;
|
|
2816
2812
|
} | {
|
|
2817
2813
|
datasetId?: string | undefined;
|
|
2818
2814
|
versionNumber?: number | undefined;
|
|
@@ -2838,6 +2834,14 @@ declare function parsePartialTableData<T extends TableName>(table: T, data: unkn
|
|
|
2838
2834
|
id?: string | undefined;
|
|
2839
2835
|
createdAt?: Date | undefined;
|
|
2840
2836
|
updatedAt?: Date | undefined;
|
|
2837
|
+
} | {
|
|
2838
|
+
providerConfigId?: string | undefined;
|
|
2839
|
+
guardrailConfigId?: string | undefined;
|
|
2840
|
+
enabled?: boolean | undefined;
|
|
2841
|
+
parameters?: Record<string, unknown> | null | undefined;
|
|
2842
|
+
id?: string | undefined;
|
|
2843
|
+
createdAt?: Date | undefined;
|
|
2844
|
+
updatedAt?: Date | undefined;
|
|
2841
2845
|
} | {
|
|
2842
2846
|
requestId?: string | undefined;
|
|
2843
2847
|
configId?: string | null | undefined;
|
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-C4vSSIoo.cjs');
|
|
2
|
+
const require_neon_dialect = require('./neon-dialect-COb-W-YR.cjs');
|
|
3
3
|
let __llmops_gateway = require("@llmops/gateway");
|
|
4
4
|
__llmops_gateway = require_db.__toESM(__llmops_gateway);
|
|
5
5
|
let kysely = require("kysely");
|