@sequenceholdings/orm 2.11.0 → 2.11.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.
Files changed (47) hide show
  1. package/README.md +3 -4
  2. package/dist/authoring.d.cts +1 -1
  3. package/dist/authoring.d.ts +1 -1
  4. package/dist/canonical.d.cts +43 -43
  5. package/dist/canonical.d.ts +43 -43
  6. package/dist/cli.cjs +147 -195
  7. package/dist/cli.cjs.map +1 -1
  8. package/dist/cli.js +148 -196
  9. package/dist/cli.js.map +1 -1
  10. package/dist/client.cjs +5 -10
  11. package/dist/client.cjs.map +1 -1
  12. package/dist/client.d.cts +2 -13
  13. package/dist/client.d.ts +2 -13
  14. package/dist/client.js +6 -10
  15. package/dist/client.js.map +1 -1
  16. package/dist/compiler.cjs +14 -67
  17. package/dist/compiler.cjs.map +1 -1
  18. package/dist/compiler.d.cts +6 -17
  19. package/dist/compiler.d.ts +6 -17
  20. package/dist/compiler.js +16 -66
  21. package/dist/compiler.js.map +1 -1
  22. package/dist/index.cjs +242 -189
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +541 -36
  25. package/dist/index.d.ts +541 -36
  26. package/dist/index.js +237 -189
  27. package/dist/index.js.map +1 -1
  28. package/dist/ir.cjs +6 -11
  29. package/dist/ir.cjs.map +1 -1
  30. package/dist/ir.d.cts +61 -64
  31. package/dist/ir.d.ts +61 -64
  32. package/dist/ir.js +6 -11
  33. package/dist/ir.js.map +1 -1
  34. package/dist/predicate-v2.cjs +3 -8
  35. package/dist/predicate-v2.cjs.map +1 -1
  36. package/dist/predicate-v2.js +3 -8
  37. package/dist/predicate-v2.js.map +1 -1
  38. package/dist/sdl.cjs +4 -11
  39. package/dist/sdl.cjs.map +1 -1
  40. package/dist/sdl.d.cts +1 -5
  41. package/dist/sdl.d.ts +1 -5
  42. package/dist/sdl.js +4 -11
  43. package/dist/sdl.js.map +1 -1
  44. package/package.json +1 -1
  45. package/src/codegen-gql/server-fns.cjs +1 -1
  46. package/dist/{definition-CevES7lM.d.cts → definition-B99BsOAO.d.cts} +2 -2
  47. package/dist/{definition-CevES7lM.d.ts → definition-B99BsOAO.d.ts} +2 -2
package/dist/index.js CHANGED
@@ -4965,6 +4965,149 @@ function compileStaticPolicySql({ table, predicate, tables, namespace, alias, ro
4965
4965
  });
4966
4966
  return render(table, predicate, alias, rootRelation);
4967
4967
  }
4968
+ var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
4969
+ var DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
4970
+ var TIMESTAMPTZ_RE = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})$/;
4971
+ var INTEGER_RE = /^-?\d+$/;
4972
+ var NUMERIC_RE = /^-?\d+(\.\d+)?$/;
4973
+ function sourceSchemaAllowed(schema) {
4974
+ return schema !== "information_schema" && !schema.startsWith("pg_");
4975
+ }
4976
+ function isRelationIdentifier(value) {
4977
+ return value.length <= 63 && IDENTIFIER_PATTERN.test(value);
4978
+ }
4979
+ function isSourceColumn(value) {
4980
+ return value.length <= 63 && COLUMN_IDENTIFIER_PATTERN.test(value);
4981
+ }
4982
+ function splitQualifiedRelation(from) {
4983
+ const dot = from.indexOf(".");
4984
+ if (dot <= 0 || dot !== from.lastIndexOf(".")) return null;
4985
+ const schema = from.slice(0, dot);
4986
+ const table = from.slice(dot + 1);
4987
+ if (!isRelationIdentifier(schema) || !isRelationIdentifier(table)) return null;
4988
+ return { schema, table };
4989
+ }
4990
+ function postgresTypeName(type) {
4991
+ if (type === "double") return "double precision";
4992
+ if (type === "timestamptz") return "timestamp with time zone";
4993
+ return type;
4994
+ }
4995
+ function columnPostgresType(column, schemaName, enums) {
4996
+ if (typeof column.type === "string") return postgresTypeName(column.type);
4997
+ if (!enums.has(column.type.enum)) return null;
4998
+ return `${quoteIdentifier(schemaName)}.${quoteIdentifier(column.type.enum)}`;
4999
+ }
5000
+ function quoteQualified(schema, table) {
5001
+ return `${quoteIdentifier(schema)}.${quoteIdentifier(table)}`;
5002
+ }
5003
+ var INT4_MIN = -2147483648;
5004
+ var INT4_MAX = 2147483647;
5005
+ function resumeLiteralSql({
5006
+ column,
5007
+ after,
5008
+ schemaName,
5009
+ enums
5010
+ }) {
5011
+ const coerced = coerceResumeValue(column, after);
5012
+ if (!coerced.ok) return coerced;
5013
+ return literalSql({ column, value: coerced.value, schemaName, enums });
5014
+ }
5015
+ function coerceResumeValue(column, after) {
5016
+ const type = typeof column.type === "string" ? column.type : null;
5017
+ if (type === "integer") {
5018
+ if (!INTEGER_RE.test(after)) return { ok: false, error: `${column.name}: after must be an integer` };
5019
+ const parsed = Number(after);
5020
+ if (!Number.isSafeInteger(parsed) || parsed < INT4_MIN || parsed > INT4_MAX) {
5021
+ return { ok: false, error: `${column.name}: after must be an integer` };
5022
+ }
5023
+ return { ok: true, value: parsed };
5024
+ }
5025
+ if (type === "boolean") {
5026
+ if (after !== "true" && after !== "false") return { ok: false, error: `${column.name}: after must be true or false` };
5027
+ return { ok: true, value: after === "true" };
5028
+ }
5029
+ return { ok: true, value: after };
5030
+ }
5031
+ function literalSql({
5032
+ column,
5033
+ value,
5034
+ schemaName,
5035
+ enums
5036
+ }) {
5037
+ const label = column.name;
5038
+ if (typeof value === "string" && value.includes("\0")) {
5039
+ return { ok: false, error: `${label}: null default contains a NUL character` };
5040
+ }
5041
+ if (typeof column.type !== "string") {
5042
+ const enumDef = enums.get(column.type.enum);
5043
+ if (!enumDef) return { ok: false, error: `${label}: enum '${column.type.enum}' is not declared` };
5044
+ if (typeof value !== "string" || !enumDef.values.includes(value)) {
5045
+ return { ok: false, error: `${label}: null default must be one of ${enumDef.values.join(", ")}` };
5046
+ }
5047
+ const typeName = columnPostgresType(column, schemaName, enums);
5048
+ return { ok: true, sql: `${quoteLiteral(value)}::${typeName}` };
5049
+ }
5050
+ return scalarLiteral({ column, type: column.type, value, label });
5051
+ }
5052
+ var SCALAR_LITERALS = {
5053
+ text: (value, label) => typeof value === "string" ? { ok: true, sql: quoteLiteral(value) } : { ok: false, error: `${label}: null default must be a string` },
5054
+ uuid: (value, label) => typeof value === "string" && UUID_RE.test(value) ? { ok: true, sql: `${quoteLiteral(value)}::uuid` } : { ok: false, error: `${label}: null default must be a UUID` },
5055
+ boolean: (value, label) => typeof value === "boolean" ? { ok: true, sql: value ? "TRUE" : "FALSE" } : { ok: false, error: `${label}: null default must be true or false` },
5056
+ integer: (value, label) => typeof value === "number" && Number.isSafeInteger(value) ? { ok: true, sql: String(value) } : { ok: false, error: `${label}: null default must be an integer` },
5057
+ bigint: (value, label) => typeof value === "string" && INTEGER_RE.test(value) ? { ok: true, sql: `${value}::bigint` } : { ok: false, error: `${label}: null default must be a base-10 integer string` },
5058
+ numeric: numericLiteral,
5059
+ double: numericLiteral,
5060
+ date: (value, label) => typeof value === "string" && DATE_RE.test(value) ? { ok: true, sql: `${quoteLiteral(value)}::date` } : { ok: false, error: `${label}: null default must be a YYYY-MM-DD date` },
5061
+ timestamptz: (value, label) => typeof value === "string" && TIMESTAMPTZ_RE.test(value) ? { ok: true, sql: `${quoteLiteral(value)}::${postgresTypeName("timestamptz")}` } : { ok: false, error: `${label}: null default must be an ISO-8601 timestamp` },
5062
+ jsonb: jsonbLiteral
5063
+ };
5064
+ function numericLiteral(value, label) {
5065
+ if (typeof value === "number" && Number.isFinite(value)) return { ok: true, sql: String(value) };
5066
+ if (typeof value === "string" && NUMERIC_RE.test(value)) return { ok: true, sql: value };
5067
+ return { ok: false, error: `${label}: null default must be a finite number` };
5068
+ }
5069
+ function scalarLiteral({
5070
+ column,
5071
+ type,
5072
+ value,
5073
+ label
5074
+ }) {
5075
+ const encode = SCALAR_LITERALS[type];
5076
+ if (!encode) return { ok: false, error: `${column.name}: unsupported type '${type}'` };
5077
+ return encode(value, label);
5078
+ }
5079
+ function jsonbLiteral(value, label) {
5080
+ if (typeof value !== "string") return { ok: false, error: `${label}: null default must be a JSON string` };
5081
+ try {
5082
+ JSON.parse(value);
5083
+ } catch {
5084
+ return { ok: false, error: `${label}: null default must be valid JSON` };
5085
+ }
5086
+ return { ok: true, sql: `${quoteLiteral(value)}::jsonb` };
5087
+ }
5088
+ function dollarQuote(body) {
5089
+ const digest = createHash("sha256").update(body).digest("hex");
5090
+ const candidates = ["seq_orm_import", `seq_orm_${digest.slice(0, 16)}`, `seq_orm_${digest}`];
5091
+ const tag = candidates.find((candidate) => !body.includes(`$${candidate}$`)) ?? `seq_orm_${digest}_body`;
5092
+ return `$${tag}$${body}$${tag}$`;
5093
+ }
5094
+
5095
+ // src/engine/synced-backing-absent.ts
5096
+ var SYNCED_BACKING_ABSENT_FUNCTION = "orm_synced_backing_absent";
5097
+ var SYNCED_BACKING_ABSENT_SQLSTATE = "55000";
5098
+ var REASON = "is disabled in this environment: its synced pipeline is not deployed here";
5099
+ var SYNCED_BACKING_ABSENT_RAISE = `RAISE EXCEPTION 'ORM object % ${REASON}', object
5100
+ USING ERRCODE = '${SYNCED_BACKING_ABSENT_SQLSTATE}';`;
5101
+ var RAISED = new RegExp(`^ORM object ([a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*) ${REASON}`);
5102
+ function disabledSyncedObjectFromError(error) {
5103
+ if (error === null || typeof error !== "object") return null;
5104
+ const { code, message } = error;
5105
+ if (code !== SYNCED_BACKING_ABSENT_SQLSTATE || typeof message !== "string") return null;
5106
+ return RAISED.exec(message)?.[1] ?? null;
5107
+ }
5108
+ function disabledSyncedObjectMessage(object) {
5109
+ return `${object} ${REASON}`;
5110
+ }
4968
5111
 
4969
5112
  // src/engine/security.ts
4970
5113
  var CONSUMER_TABLE_PRIVILEGES = ["SELECT", "INSERT", "UPDATE", "DELETE"];
@@ -5141,6 +5284,42 @@ function splitPhysicalRelation(physicalRelation) {
5141
5284
  `synced view physical relation must be "table" or "schema.table" (got "${physicalRelation}")`
5142
5285
  );
5143
5286
  }
5287
+ function syncedViewUnbackedStatements({
5288
+ definition,
5289
+ tables,
5290
+ columnTypesByTable
5291
+ }) {
5292
+ if (tables.length === 0) return [];
5293
+ const schema = quoteIdentifier(ormSchemaName(definition.namespace));
5294
+ const role = quoteIdentifier(consumerRoleName(definition.namespace));
5295
+ const guard = `${schema}.${quoteIdentifier(SYNCED_BACKING_ABSENT_FUNCTION)}`;
5296
+ const wanted = new Set(tables);
5297
+ const statements = [
5298
+ `CREATE OR REPLACE FUNCTION ${guard}(object text, typed anyelement) RETURNS anyelement LANGUAGE plpgsql VOLATILE AS ${quoteLiteral(`BEGIN
5299
+ ${SYNCED_BACKING_ABSENT_RAISE}
5300
+ END`)}`
5301
+ ];
5302
+ for (const table of syncedTables(definition)) {
5303
+ if (!wanted.has(table.table)) continue;
5304
+ const columns = Object.entries(table.columns ?? {});
5305
+ if (columns.length === 0) {
5306
+ throw new OrmDefinitionError(`synced table "${table.table}" needs declared columns to be disabled while its backing is absent`);
5307
+ }
5308
+ const object = quoteLiteral(`${definition.namespace}.${table.table}`);
5309
+ const canonicalTypes = columnTypesByTable?.get(table.table);
5310
+ const projection = columns.map(([name2, column]) => {
5311
+ const declared = canonicalTypes?.[name2];
5312
+ const sqlType = typeof declared === "object" ? `${schema}.${quoteIdentifier(declared.enum)}` : postgresTypeName(column.type);
5313
+ return `${guard}(${object}, NULL::${sqlType}) AS ${quoteIdentifier(name2)}`;
5314
+ }).join(", ");
5315
+ const viewName = `${schema}.${quoteIdentifier(table.table)}`;
5316
+ statements.push(
5317
+ `CREATE OR REPLACE VIEW ${viewName} AS SELECT ${projection} WHERE ${guard}(${object}, true)`,
5318
+ `GRANT SELECT ON ${viewName} TO ${role}`
5319
+ );
5320
+ }
5321
+ return statements;
5322
+ }
5144
5323
  function syncedViewDropStatements({
5145
5324
  schemaName,
5146
5325
  tables
@@ -6223,11 +6402,13 @@ function applyMigrationHintsV2(previous, definition) {
6223
6402
  if (column.renamedFrom) {
6224
6403
  const previousColumn = snapshotTable.columns[column.renamedFrom];
6225
6404
  if (previousColumn && snapshotTable.columns[name2]) {
6226
- throw new OrmDefinitionError(
6227
- `'${table.table}.${name2}' declares renamedFrom '${column.renamedFrom}', but both columns exist in the previous schema \u2014 a rename cannot overwrite a live column`
6228
- );
6229
- }
6230
- if (previousColumn) {
6405
+ const reused = table.columns.some((candidate) => candidate.columnName === column.renamedFrom);
6406
+ if (!reused) {
6407
+ throw new OrmDefinitionError(
6408
+ `'${table.table}.${name2}' declares renamedFrom '${column.renamedFrom}', but both columns exist in the previous schema \u2014 a rename cannot overwrite a live column`
6409
+ );
6410
+ }
6411
+ } else if (previousColumn) {
6231
6412
  statements.push(
6232
6413
  `ALTER TABLE ${qualified2(table.table)} RENAME COLUMN ${quoteIdentifier(column.renamedFrom)} TO ${quoteIdentifier(name2)}`
6233
6414
  );
@@ -6320,7 +6501,7 @@ async function planWithViewRecreation({
6320
6501
  const schema = ormSchemaName(canonical.namespace);
6321
6502
  const previous = previousSnapshot ? normalizeSnapshot(previousSnapshot) : emptySnapshot(canonical.namespace);
6322
6503
  assertValidViewDependencies(canonical);
6323
- const hints = applyMigrationHintsV2(previous, canonical);
6504
+ const hints = previousSnapshot === void 0 ? { statements: [], adjusted: previous } : applyMigrationHintsV2(previous, canonical);
6324
6505
  const snapshot = generateSnapshotV2(canonical, previousId(previous));
6325
6506
  const generatedBaseDdl = await diffStatements(withoutViews(hints.adjusted), withoutViews(snapshot));
6326
6507
  const baseDdl = orderForeignKeyAdditions(canonical, generatedBaseDdl);
@@ -7072,52 +7253,6 @@ async function planMigration({
7072
7253
  }
7073
7254
  var compileNamespace = (definition) => planMigration({ definition });
7074
7255
  var previousId2 = (snapshot) => snapshot.id;
7075
- var ORM_MIGRATION_EXPORT_FILE = "orm.migration.json";
7076
- var ORM_MIGRATION_EXPORT_MAX_BYTES = ORM_REGISTRATION_MAX_BYTES;
7077
- var hash = z.string().regex(/^sha256:[0-9a-f]{64}$/);
7078
- var ormMigrationPayloadSchema = z.object({
7079
- canonical_definition: canonicalDefinitionSchema,
7080
- documents: z.array(z.object({ path: z.string().min(1).max(2048), contents: z.string().max(1e6) }).strict()).max(5e3),
7081
- client_manifest: z.object({ ops_hash: hash, operations: z.record(z.string(), hash) }).strict(),
7082
- sdl: z.string().refine((value) => Buffer.byteLength(value, "utf8") <= MAX_GENERATED_SDL_BYTES, {
7083
- message: `sdl exceeds ${MAX_GENERATED_SDL_BYTES} bytes`
7084
- }),
7085
- schema_snapshot: z.json(),
7086
- // The existing ORM committed-migration validator and replay engine remain
7087
- // authoritative. This envelope hashes the provenance, never authorizes SQL.
7088
- migration: z.json().optional()
7089
- }).strict();
7090
- var ormMigrationExportSchema = z.object({
7091
- schema_version: z.literal(1),
7092
- schema_hash: hash,
7093
- payload: ormMigrationPayloadSchema,
7094
- checksum: z.string().regex(/^[0-9a-f]{64}$/)
7095
- }).strict();
7096
- function checksum(value) {
7097
- return createHash("sha256").update(stableJson(value)).digest("hex");
7098
- }
7099
- function createOrmMigrationExport({ schemaHash, payload }) {
7100
- const contents = { schema_version: 1, schema_hash: hash.parse(schemaHash), payload: ormMigrationPayloadSchema.parse(payload) };
7101
- return { ...contents, checksum: checksum(contents) };
7102
- }
7103
- function parseOrmMigrationExport(text4) {
7104
- if (Buffer.byteLength(text4, "utf8") > ORM_MIGRATION_EXPORT_MAX_BYTES) throw new Error("ORM migration export exceeds the size limit");
7105
- const exported = ormMigrationExportSchema.parse(JSON.parse(text4));
7106
- const { checksum: expected, ...contents } = exported;
7107
- if (checksum(contents) !== expected) throw new Error("ORM migration export checksum mismatch; regenerate and commit it");
7108
- return exported;
7109
- }
7110
- function renderOrmMigrationExport(exported) {
7111
- const text4 = `${JSON.stringify(exported, null, 2)}
7112
- `;
7113
- if (Buffer.byteLength(text4, "utf8") > ORM_MIGRATION_EXPORT_MAX_BYTES) throw new Error("ORM migration export exceeds the size limit");
7114
- return text4;
7115
- }
7116
-
7117
- // src/client/sql.ts
7118
- var BUILTIN_SQL_READ_HASH = "sha256:a50c477c952a5e0fe68ed158a4530e4aab573c09bcbb1a8ac454dc88a39a6258";
7119
-
7120
- // src/ir/index.ts
7121
7256
  var IR_VERSION = 6;
7122
7257
  var LEGACY_IR_VERSION = 1;
7123
7258
  var GUARDED_IR_VERSION = 2;
@@ -7153,9 +7288,9 @@ var EXTERNAL_POLICY_CLAIM_KEYS = ["ext_subject", "ext_email"];
7153
7288
  function isExternalPolicyClaimKey(key) {
7154
7289
  return EXTERNAL_POLICY_CLAIM_KEYS.includes(key);
7155
7290
  }
7156
- var scalarLiteral = z.union([z.string(), z.number(), z.boolean(), z.null()]);
7291
+ var scalarLiteral2 = z.union([z.string(), z.number(), z.boolean(), z.null()]);
7157
7292
  var valueIrSchema = z.discriminatedUnion("kind", [
7158
- z.object({ kind: z.literal("literal"), value: z.union([scalarLiteral, z.array(scalarLiteral)]) }),
7293
+ z.object({ kind: z.literal("literal"), value: z.union([scalarLiteral2, z.array(scalarLiteral2)]) }),
7159
7294
  z.object({ kind: z.literal("variable"), name: z.string() }),
7160
7295
  z.object({ kind: z.literal("claim"), key: z.enum(["sub", "org", ...EXTERNAL_POLICY_CLAIM_KEYS]) })
7161
7296
  ]);
@@ -7402,7 +7537,7 @@ var INPUT_REF_KINDS = [
7402
7537
  "onConflict"
7403
7538
  ];
7404
7539
  var variableDefaultIrSchema = z.object({
7405
- value: z.union([scalarLiteral, z.array(scalarLiteral)])
7540
+ value: z.union([scalarLiteral2, z.array(scalarLiteral2)])
7406
7541
  });
7407
7542
  var variableIrSchema = z.object({
7408
7543
  name: z.string(),
@@ -7445,8 +7580,7 @@ var compiledOperationSchema = z.object({
7445
7580
  maxRows: z.number().int().min(1).max(1e4)
7446
7581
  }).strict().optional(),
7447
7582
  irVersion: irVersionSchema,
7448
- name: z.string(),
7449
- opHash: z.string().regex(/^sha256:[0-9a-f]{64}$/),
7583
+ name: z.string().regex(/^[_A-Za-z][_0-9A-Za-z]{0,254}$/),
7450
7584
  kind: z.enum(["query", "mutation"]),
7451
7585
  requires: z.object({
7452
7586
  capability: z.string().optional(),
@@ -7462,7 +7596,7 @@ var compiledOperationSchema = z.object({
7462
7596
  }
7463
7597
  if (operation.language === "sql") {
7464
7598
  const validPlan = operation.sqlQuery ? !operation.sql && operation.irVersion === RUNTIME_SQL_IR_VERSION : !!operation.sql && operation.irVersion === SQL_IR_VERSION;
7465
- const builtin = operation.name === "BuiltinSqlRead" && operation.opHash === BUILTIN_SQL_READ_HASH && operation.requires === null;
7599
+ const builtin = operation.name === "BuiltinSqlRead" && operation.requires === null;
7466
7600
  if (!validPlan || operation.kind !== "query" || operation.roots.length !== 0 || !builtin && !operation.requires?.capability) {
7467
7601
  ctx.addIssue({ code: "custom", message: "SQL operations require a query-only v4 plan or v5 runtime contract, capability, and no GraphQL roots" });
7468
7602
  }
@@ -7477,7 +7611,7 @@ var compiledOperationSchema = z.object({
7477
7611
  }
7478
7612
  });
7479
7613
  var resolvedSourceIrSchema = z.object({
7480
- name: z.string(),
7614
+ name: z.string().regex(/^[_A-Za-z][_0-9A-Za-z]{0,254}$/),
7481
7615
  kind: z.enum(["manual", "etl", "prefetch"]),
7482
7616
  /** Logical table key of the backing relation. */
7483
7617
  table: z.string(),
@@ -7591,7 +7725,6 @@ var compiledArtifactSchema = z.object({
7591
7725
  ownSchemaHash: z.string().optional(),
7592
7726
  dependencies: z.record(z.string(), z.string()).optional(),
7593
7727
  readPolicies: z.record(z.string(), predIrSchema).optional(),
7594
- opsHash: z.string(),
7595
7728
  /** Apply-observed synced objects without a serving backing; not part of the authored schema hash. */
7596
7729
  unbackedTables: z.array(z.string()).optional(),
7597
7730
  tables: z.record(z.string(), tableMetaIrSchema),
@@ -7621,11 +7754,52 @@ function normalizeIr(raw) {
7621
7754
  if (!irVersionSchema.safeParse(version).success) throw new IrVersionError(version);
7622
7755
  return compiledArtifactSchema.parse(raw);
7623
7756
  }
7624
- function indexByHash(artifact) {
7757
+ function indexByName(artifact) {
7625
7758
  const map = /* @__PURE__ */ new Map();
7626
- for (const op of Object.values(artifact.operations)) map.set(op.opHash, op);
7759
+ for (const op of Object.values(artifact.operations)) map.set(op.name, op);
7627
7760
  return map;
7628
7761
  }
7762
+ var ORM_MIGRATION_EXPORT_FILE = "orm.migration.json";
7763
+ var ORM_MIGRATION_EXPORT_MAX_BYTES = ORM_REGISTRATION_MAX_BYTES;
7764
+ var hash = z.string().regex(/^sha256:[0-9a-f]{64}$/);
7765
+ var ormMigrationPayloadSchema = z.object({
7766
+ canonical_definition: canonicalDefinitionSchema,
7767
+ documents: z.array(z.object({ path: z.string().min(1).max(2048), contents: z.string().max(1e6) }).strict()).max(5e3),
7768
+ client_manifest: z.object({ operations: z.record(z.string(), compiledOperationSchema) }).strict(),
7769
+ sdl: z.string().refine((value) => Buffer.byteLength(value, "utf8") <= MAX_GENERATED_SDL_BYTES, {
7770
+ message: `sdl exceeds ${MAX_GENERATED_SDL_BYTES} bytes`
7771
+ }),
7772
+ schema_snapshot: z.json(),
7773
+ // The existing ORM committed-migration validator and replay engine remain
7774
+ // authoritative. This envelope hashes the provenance, never authorizes SQL.
7775
+ migration: z.json().optional()
7776
+ }).strict();
7777
+ var ormMigrationExportSchema = z.object({
7778
+ schema_version: z.literal(1),
7779
+ schema_hash: hash,
7780
+ payload: ormMigrationPayloadSchema,
7781
+ checksum: z.string().regex(/^[0-9a-f]{64}$/)
7782
+ }).strict();
7783
+ function checksum(value) {
7784
+ return createHash("sha256").update(stableJson(value)).digest("hex");
7785
+ }
7786
+ function createOrmMigrationExport({ schemaHash, payload }) {
7787
+ const contents = { schema_version: 1, schema_hash: hash.parse(schemaHash), payload: ormMigrationPayloadSchema.parse(payload) };
7788
+ return { ...contents, checksum: checksum(contents) };
7789
+ }
7790
+ function parseOrmMigrationExport(text4) {
7791
+ if (Buffer.byteLength(text4, "utf8") > ORM_MIGRATION_EXPORT_MAX_BYTES) throw new Error("ORM migration export exceeds the size limit");
7792
+ const exported = ormMigrationExportSchema.parse(JSON.parse(text4));
7793
+ const { checksum: expected, ...contents } = exported;
7794
+ if (checksum(contents) !== expected) throw new Error("ORM migration export checksum mismatch; regenerate and commit it");
7795
+ return exported;
7796
+ }
7797
+ function renderOrmMigrationExport(exported) {
7798
+ const text4 = `${JSON.stringify(exported, null, 2)}
7799
+ `;
7800
+ if (Buffer.byteLength(text4, "utf8") > ORM_MIGRATION_EXPORT_MAX_BYTES) throw new Error("ORM migration export exceeds the size limit");
7801
+ return text4;
7802
+ }
7629
7803
 
7630
7804
  // src/schema/namespace.ts
7631
7805
  var EMPTY_CAPABILITIES = { roles: { definitions: {}, capabilities: {} }, uses: [] };
@@ -8356,132 +8530,6 @@ var importSpecSchema = z.object({
8356
8530
  onConflict: z.enum(IMPORT_CONFLICT_MODES).default("skip"),
8357
8531
  batchSize: z.number().int().min(1).max(2e4).default(5e3)
8358
8532
  }).strict();
8359
- var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
8360
- var DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
8361
- var TIMESTAMPTZ_RE = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})$/;
8362
- var INTEGER_RE = /^-?\d+$/;
8363
- var NUMERIC_RE = /^-?\d+(\.\d+)?$/;
8364
- function sourceSchemaAllowed(schema) {
8365
- return schema !== "information_schema" && !schema.startsWith("pg_");
8366
- }
8367
- function isRelationIdentifier(value) {
8368
- return value.length <= 63 && IDENTIFIER_PATTERN.test(value);
8369
- }
8370
- function isSourceColumn(value) {
8371
- return value.length <= 63 && COLUMN_IDENTIFIER_PATTERN.test(value);
8372
- }
8373
- function splitQualifiedRelation(from) {
8374
- const dot = from.indexOf(".");
8375
- if (dot <= 0 || dot !== from.lastIndexOf(".")) return null;
8376
- const schema = from.slice(0, dot);
8377
- const table = from.slice(dot + 1);
8378
- if (!isRelationIdentifier(schema) || !isRelationIdentifier(table)) return null;
8379
- return { schema, table };
8380
- }
8381
- function postgresTypeName(type) {
8382
- if (type === "double") return "double precision";
8383
- if (type === "timestamptz") return "timestamp with time zone";
8384
- return type;
8385
- }
8386
- function columnPostgresType(column, schemaName, enums) {
8387
- if (typeof column.type === "string") return postgresTypeName(column.type);
8388
- if (!enums.has(column.type.enum)) return null;
8389
- return `${quoteIdentifier(schemaName)}.${quoteIdentifier(column.type.enum)}`;
8390
- }
8391
- function quoteQualified(schema, table) {
8392
- return `${quoteIdentifier(schema)}.${quoteIdentifier(table)}`;
8393
- }
8394
- var INT4_MIN = -2147483648;
8395
- var INT4_MAX = 2147483647;
8396
- function resumeLiteralSql({
8397
- column,
8398
- after,
8399
- schemaName,
8400
- enums
8401
- }) {
8402
- const coerced = coerceResumeValue(column, after);
8403
- if (!coerced.ok) return coerced;
8404
- return literalSql({ column, value: coerced.value, schemaName, enums });
8405
- }
8406
- function coerceResumeValue(column, after) {
8407
- const type = typeof column.type === "string" ? column.type : null;
8408
- if (type === "integer") {
8409
- if (!INTEGER_RE.test(after)) return { ok: false, error: `${column.name}: after must be an integer` };
8410
- const parsed = Number(after);
8411
- if (!Number.isSafeInteger(parsed) || parsed < INT4_MIN || parsed > INT4_MAX) {
8412
- return { ok: false, error: `${column.name}: after must be an integer` };
8413
- }
8414
- return { ok: true, value: parsed };
8415
- }
8416
- if (type === "boolean") {
8417
- if (after !== "true" && after !== "false") return { ok: false, error: `${column.name}: after must be true or false` };
8418
- return { ok: true, value: after === "true" };
8419
- }
8420
- return { ok: true, value: after };
8421
- }
8422
- function literalSql({
8423
- column,
8424
- value,
8425
- schemaName,
8426
- enums
8427
- }) {
8428
- const label = column.name;
8429
- if (typeof value === "string" && value.includes("\0")) {
8430
- return { ok: false, error: `${label}: null default contains a NUL character` };
8431
- }
8432
- if (typeof column.type !== "string") {
8433
- const enumDef = enums.get(column.type.enum);
8434
- if (!enumDef) return { ok: false, error: `${label}: enum '${column.type.enum}' is not declared` };
8435
- if (typeof value !== "string" || !enumDef.values.includes(value)) {
8436
- return { ok: false, error: `${label}: null default must be one of ${enumDef.values.join(", ")}` };
8437
- }
8438
- const typeName = columnPostgresType(column, schemaName, enums);
8439
- return { ok: true, sql: `${quoteLiteral(value)}::${typeName}` };
8440
- }
8441
- return scalarLiteral2({ column, type: column.type, value, label });
8442
- }
8443
- var SCALAR_LITERALS = {
8444
- text: (value, label) => typeof value === "string" ? { ok: true, sql: quoteLiteral(value) } : { ok: false, error: `${label}: null default must be a string` },
8445
- uuid: (value, label) => typeof value === "string" && UUID_RE.test(value) ? { ok: true, sql: `${quoteLiteral(value)}::uuid` } : { ok: false, error: `${label}: null default must be a UUID` },
8446
- boolean: (value, label) => typeof value === "boolean" ? { ok: true, sql: value ? "TRUE" : "FALSE" } : { ok: false, error: `${label}: null default must be true or false` },
8447
- integer: (value, label) => typeof value === "number" && Number.isSafeInteger(value) ? { ok: true, sql: String(value) } : { ok: false, error: `${label}: null default must be an integer` },
8448
- bigint: (value, label) => typeof value === "string" && INTEGER_RE.test(value) ? { ok: true, sql: `${value}::bigint` } : { ok: false, error: `${label}: null default must be a base-10 integer string` },
8449
- numeric: numericLiteral,
8450
- double: numericLiteral,
8451
- date: (value, label) => typeof value === "string" && DATE_RE.test(value) ? { ok: true, sql: `${quoteLiteral(value)}::date` } : { ok: false, error: `${label}: null default must be a YYYY-MM-DD date` },
8452
- timestamptz: (value, label) => typeof value === "string" && TIMESTAMPTZ_RE.test(value) ? { ok: true, sql: `${quoteLiteral(value)}::${postgresTypeName("timestamptz")}` } : { ok: false, error: `${label}: null default must be an ISO-8601 timestamp` },
8453
- jsonb: jsonbLiteral
8454
- };
8455
- function numericLiteral(value, label) {
8456
- if (typeof value === "number" && Number.isFinite(value)) return { ok: true, sql: String(value) };
8457
- if (typeof value === "string" && NUMERIC_RE.test(value)) return { ok: true, sql: value };
8458
- return { ok: false, error: `${label}: null default must be a finite number` };
8459
- }
8460
- function scalarLiteral2({
8461
- column,
8462
- type,
8463
- value,
8464
- label
8465
- }) {
8466
- const encode = SCALAR_LITERALS[type];
8467
- if (!encode) return { ok: false, error: `${column.name}: unsupported type '${type}'` };
8468
- return encode(value, label);
8469
- }
8470
- function jsonbLiteral(value, label) {
8471
- if (typeof value !== "string") return { ok: false, error: `${label}: null default must be a JSON string` };
8472
- try {
8473
- JSON.parse(value);
8474
- } catch {
8475
- return { ok: false, error: `${label}: null default must be valid JSON` };
8476
- }
8477
- return { ok: true, sql: `${quoteLiteral(value)}::jsonb` };
8478
- }
8479
- function dollarQuote(body) {
8480
- const digest = createHash("sha256").update(body).digest("hex");
8481
- const candidates = ["seq_orm_import", `seq_orm_${digest.slice(0, 16)}`, `seq_orm_${digest}`];
8482
- const tag = candidates.find((candidate) => !body.includes(`$${candidate}$`)) ?? `seq_orm_${digest}_body`;
8483
- return `$${tag}$${body}$${tag}$`;
8484
- }
8485
8533
 
8486
8534
  // src/import/script.ts
8487
8535
  function renderImportScript({
@@ -8858,6 +8906,6 @@ function resumeArguments({
8858
8906
  return [literal2.sql];
8859
8907
  }
8860
8908
 
8861
- export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, CANONICAL_FORMAT, CAPABILITIES_CLAIM_KEY, CAPABILITY_KEY_PATTERN, CELLS_FIELD, CELL_PARTS, CELL_PART_SUFFIX, CLAIMS_CONTRACT, CLAIMS_SETTING, CLAIM_KEY_PATTERN, CMP_OPS, COLUMN_BRAND, COLUMN_DEFAULT_FNS, COLUMN_IDENTIFIER_PATTERN, COLUMN_TYPES, COMPARE_OPS, COMPOSED_IR_VERSION, CONSUMER_ROLE_SUFFIX, ColumnBuilder, DATE_BUCKETS, DEFINITION_FILE_EXTENSIONS, ENUM_BRAND, EXTERNAL_POLICY_CLAIM_KEYS, GUARDED_IR_VERSION, HASH_DOMAIN, IDENTIFIER_PATTERN, IDENTIFIER_RE, IMPORT_CONFLICT_MODES, INPUT_REF_KINDS, IR_VERSION, IrVersionError, LEGACY_IR_VERSION, LINK_BRAND, MATERIALIZE_ACTOR, MATERIALIZE_CLAIMS_JSON, MAX_DEFINITION_FILE_BYTES, MAX_GENERATED_SDL_BYTES, MAX_IDENTIFIER_LENGTH, MAX_PERSISTED_READ_ROWS, MAX_TRACKED_COLUMN_NAME, MIGRATIONS_DIRNAME, NAMESPACE_CONFIG_BRAND, NAMESPACE_CONFIG_FILE, NAMESPACE_CONFIG_FILENAMES, NAMESPACE_PATTERN, OPERATION_DOCUMENTS_FILE, OPERATION_DOCUMENTS_VERSION, ORM_DATA_TOKEN_HEADER, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, ORM_REGISTRATION_MAX_BYTES, ORM_SCHEMA_PREFIX, ORM_SERVICE_DATA_TOKEN_HEADER, ORM_TO_PIPELINE_TYPE, OrmDefinitionError, PredicateParseError, QUALIFIED_TABLE_PATTERN, RESERVED_COLUMN_NAMES, RESERVED_TABLE_NAMES, ROLES_CLAIM_KEY, RUNTIME_SQL_IR_VERSION, SCHEMA_DIR, SERVICE_PRINCIPAL_IR_VERSION, SQL_IR_VERSION, STATEMENT_KINDS, SYNCED_CONTRACT_HASH_DOMAIN, SYNCED_SOURCE_PATTERN, SYNCED_VIEW_EXECUTION_OWNER_ROLE, TABLE_BRAND, VIEW_BRAND, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, activeAuthoringContext, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, beginAuthoringContext, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalActionSchema, canonicalColumnSchema, canonicalDefinitionSchema, canonicalEnumSchema, canonicalIndexSchema, canonicalLinkSchema, canonicalPoliciesSchema, canonicalRelations, canonicalTableSchema, canonicalViewSchema, canonicalizeDefinition, capabilityExpression, castParts, cellColumnName, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, compiledArtifactSchema, compiledOperationSchema, computeCanonicalHash, computeDefinitionHash, computeSyncedContractHash, consumerRoleName, convertV1DefinitionToCanonical, createOrmMigrationExport, custom, declaredCapabilityKeys, declaredSyncedIndexes, defineEnum, defineNamespace, defineOperation, defineResolvedTable, defineSyncedTable, defineTable, defineView, deriveColumnName, diffCommand, diffStatements, emptyJournal, emptySnapshot, endAuthoringContext, etlSource, extractNamedParams, extractOrmSyncedTableContract, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, highest, identifierSchema, importSpecSchema, indexByHash, isColumnBuilder, isEnumRef, isExternalPolicyClaimKey, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, isSeqLink, isSeqNamespaceConfig, isSeqTable, isSeqView, isSyncedIndexStatement, latest, limitIrSchema, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, loadNamespaceFromDir, lowest, managedFn, manualSource, materializeLockKey, materializedRefreshFunctionName, migrationName, namespaceConfigSchema, namespaceSchema, nonNullFirst, normalizeCanonical, normalizeIr, normalizeSnapshot, objectRef, ontologyContractSchema, orderIrSchema, ormMigrationExportSchema, ormSchemaName, overlayWinsUnion, overrideRowMutation, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, pendingSyncedIndexStatements, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, policyExpressionSchema, policyVariantSchema, predIrSchema, predicateOperands, prefetchPlanIrSchema, prefetchSource, priority, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readOntologyContract, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, revertOverlayMutation, rewriteSyncedSourceRelationsInViewQuery, roleExpression, rootIrSchema, securityStatements, selectionIrSchema, serializeNamespace, sqlObjectIrSchema, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedContractSurface, syncedIndexStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, t, tableFileSchema, tableMetaIrSchema, tableReferenceSchema, toMany, toOne, toPlatformUser, typesInterfaceName, usesServicePrincipal, validateNamespaceCatalog, validateViewCatalogStatement, valueIrSchema, variableDefaultIrSchema, variableIrSchema, verifyRebaseIsNoop, walkPredicate, writeMigration };
8909
+ export { ACTION_REQUIRES_DENIED_SQLSTATE, ACTION_VALIDATES_FAILED_SQLSTATE, AUDIT_ACTIONS, CANONICAL_FORMAT, CAPABILITIES_CLAIM_KEY, CAPABILITY_KEY_PATTERN, CELLS_FIELD, CELL_PARTS, CELL_PART_SUFFIX, CLAIMS_CONTRACT, CLAIMS_SETTING, CLAIM_KEY_PATTERN, CMP_OPS, COLUMN_BRAND, COLUMN_DEFAULT_FNS, COLUMN_IDENTIFIER_PATTERN, COLUMN_TYPES, COMPARE_OPS, COMPOSED_IR_VERSION, CONSUMER_ROLE_SUFFIX, ColumnBuilder, DATE_BUCKETS, DEFINITION_FILE_EXTENSIONS, ENUM_BRAND, EXTERNAL_POLICY_CLAIM_KEYS, GUARDED_IR_VERSION, HASH_DOMAIN, IDENTIFIER_PATTERN, IDENTIFIER_RE, IMPORT_CONFLICT_MODES, INPUT_REF_KINDS, IR_VERSION, IrVersionError, LEGACY_IR_VERSION, LINK_BRAND, MATERIALIZE_ACTOR, MATERIALIZE_CLAIMS_JSON, MAX_DEFINITION_FILE_BYTES, MAX_GENERATED_SDL_BYTES, MAX_IDENTIFIER_LENGTH, MAX_PERSISTED_READ_ROWS, MAX_TRACKED_COLUMN_NAME, MIGRATIONS_DIRNAME, NAMESPACE_CONFIG_BRAND, NAMESPACE_CONFIG_FILE, NAMESPACE_CONFIG_FILENAMES, NAMESPACE_PATTERN, OPERATION_DOCUMENTS_FILE, OPERATION_DOCUMENTS_VERSION, ORM_DATA_TOKEN_HEADER, ORM_MIGRATION_EXPORT_FILE, ORM_MIGRATION_EXPORT_MAX_BYTES, ORM_REGISTRATION_MAX_BYTES, ORM_SCHEMA_PREFIX, ORM_SERVICE_DATA_TOKEN_HEADER, ORM_TO_PIPELINE_TYPE, OrmDefinitionError, PredicateParseError, QUALIFIED_TABLE_PATTERN, RESERVED_COLUMN_NAMES, RESERVED_TABLE_NAMES, ROLES_CLAIM_KEY, RUNTIME_SQL_IR_VERSION, SCHEMA_DIR, SERVICE_PRINCIPAL_IR_VERSION, SQL_IR_VERSION, STATEMENT_KINDS, SYNCED_BACKING_ABSENT_FUNCTION, SYNCED_BACKING_ABSENT_SQLSTATE, SYNCED_CONTRACT_HASH_DOMAIN, SYNCED_SOURCE_PATTERN, SYNCED_VIEW_EXECUTION_OWNER_ROLE, TABLE_BRAND, VIEW_BRAND, actionFunctionName, actionFunctionStatements, actionParamArg, actionParamOrder, actionParamSchema, actionPrepareChecks, actionSchema, actionWriteTargets, actionsInterfaceName, activeAuthoringContext, applyMigrationHints, applyMigrationHintsV2, assertSyncedViewDefinitionMatches, beginAuthoringContext, buildActionParamsSchema, buildDrizzleEntities, buildDrizzleEntitiesV2, buildNamespaceDefinition, buildRebaseJournalEntry, canonicalActionSchema, canonicalColumnSchema, canonicalDefinitionSchema, canonicalEnumSchema, canonicalIndexSchema, canonicalLinkSchema, canonicalPoliciesSchema, canonicalRelations, canonicalTableSchema, canonicalViewSchema, canonicalizeDefinition, capabilityExpression, castParts, cellColumnName, checksumOf, claimExpression, classifyDestructive, columnSchema, columnTypeSchema, compileActionRequires, compileActionStatements, compileNamespace, compilePredIrToSql, compilePredicate, compiledArtifactSchema, compiledOperationSchema, computeCanonicalHash, computeDefinitionHash, computeSyncedContractHash, consumerRoleName, convertV1DefinitionToCanonical, createOrmMigrationExport, custom, declaredCapabilityKeys, declaredSyncedIndexes, defineEnum, defineNamespace, defineOperation, defineResolvedTable, defineSyncedTable, defineTable, defineView, deriveColumnName, diffCommand, diffStatements, disabledSyncedObjectFromError, disabledSyncedObjectMessage, emptyJournal, emptySnapshot, endAuthoringContext, etlSource, extractNamedParams, extractOrmSyncedTableContract, generateNamespaceTypes, generateSnapshot, generateSnapshotV2, highest, identifierSchema, importSpecSchema, indexByName, isColumnBuilder, isEnumRef, isExternalPolicyClaimKey, isFunctionDefault, isOwnedStatement, isOwnedStatementV2, isQualifiedReference, isSeqLink, isSeqNamespaceConfig, isSeqTable, isSeqView, isSyncedIndexStatement, latest, limitIrSchema, loadCommittedMigrations, loadCommittedTipMigration, loadNamespaceDefinition, loadNamespaceFromDir, lowest, managedFn, manualSource, materializeLockKey, materializedRefreshFunctionName, migrationName, namespaceConfigSchema, namespaceSchema, nonNullFirst, normalizeCanonical, normalizeIr, normalizeSnapshot, objectRef, ontologyContractSchema, orderIrSchema, ormMigrationExportSchema, ormSchemaName, overlayWinsUnion, overrideRowMutation, parseCanonicalDefinition, parseDefinitionSources, parseOrmMigrationExport, parsePredicate, parseTableFile, parsedPredicateSchema, pendingKitStatements, pendingKitStatementsV2, pendingSyncedIndexStatements, planCommittedMigrationV2, planMigration, planMigrationV2, planTableImport, policyExpressionSchema, policyVariantSchema, predIrSchema, predicateOperands, prefetchPlanIrSchema, prefetchSource, priority, quoteIdentifier, quoteLiteral, readMigrationSql, readMigrationWorkspace, readOntologyContract, readSnapshot, rebaseViolations, referencedCapabilities, referencedColumns, renderMigrationSql, renderOrmMigrationExport, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, revertOverlayMutation, rewriteSyncedSourceRelationsInViewQuery, roleExpression, rootIrSchema, securityStatements, selectionIrSchema, serializeNamespace, sqlObjectIrSchema, sqlTypeName, stableJson, syncedBackingRevokeStatements, syncedContractSurface, syncedIndexStatements, syncedTables, syncedViewDropStatements, syncedViewStatements, syncedViewUnbackedStatements, t, tableFileSchema, tableMetaIrSchema, tableReferenceSchema, toMany, toOne, toPlatformUser, typesInterfaceName, usesServicePrincipal, validateNamespaceCatalog, validateViewCatalogStatement, valueIrSchema, variableDefaultIrSchema, variableIrSchema, verifyRebaseIsNoop, walkPredicate, writeMigration };
8862
8910
  //# sourceMappingURL=index.js.map
8863
8911
  //# sourceMappingURL=index.js.map