@bjornpagen/bumbledb-log 1.2.1 → 1.3.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 (122) hide show
  1. package/README.md +152 -63
  2. package/dist/admin.d.ts +1 -1
  3. package/dist/bin.d.ts.map +1 -0
  4. package/dist/bin.js +13 -0
  5. package/dist/bin.js.map +1 -0
  6. package/dist/codes.d.ts +1 -1
  7. package/dist/codes.d.ts.map +1 -1
  8. package/dist/codes.js +1 -8
  9. package/dist/codes.js.map +1 -1
  10. package/dist/errors.d.ts +7 -21
  11. package/dist/errors.d.ts.map +1 -1
  12. package/dist/errors.js +11 -45
  13. package/dist/errors.js.map +1 -1
  14. package/dist/identity.d.ts +0 -8
  15. package/dist/identity.d.ts.map +1 -1
  16. package/dist/identity.js +0 -5
  17. package/dist/identity.js.map +1 -1
  18. package/dist/index.d.ts +5 -3
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +2 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/machine.d.ts +4 -28
  23. package/dist/machine.d.ts.map +1 -1
  24. package/dist/machine.js +183 -246
  25. package/dist/machine.js.map +1 -1
  26. package/dist/native.d.ts +59 -154
  27. package/dist/native.d.ts.map +1 -1
  28. package/dist/native.js.map +1 -1
  29. package/dist/options.d.ts +2 -11
  30. package/dist/options.d.ts.map +1 -1
  31. package/dist/outcome.d.ts +1 -85
  32. package/dist/outcome.d.ts.map +1 -1
  33. package/dist/schema-files.d.ts +16 -0
  34. package/dist/schema-files.d.ts.map +1 -0
  35. package/dist/schema-files.js +77 -0
  36. package/dist/schema-files.js.map +1 -0
  37. package/dist/schema.d.ts +6 -9
  38. package/dist/schema.d.ts.map +1 -1
  39. package/dist/schema.js +8 -8
  40. package/dist/schema.js.map +1 -1
  41. package/dist/transition.d.ts +75 -0
  42. package/dist/transition.d.ts.map +1 -0
  43. package/dist/transition.js +3 -0
  44. package/dist/transition.js.map +1 -0
  45. package/pack-provenance.json +4 -4
  46. package/package.json +4 -8
  47. package/dist/migration-ops.d.ts +0 -20
  48. package/dist/migration-ops.d.ts.map +0 -1
  49. package/dist/migration-ops.js +0 -7
  50. package/dist/migration-ops.js.map +0 -1
  51. package/dist/migrations/bin.d.ts.map +0 -1
  52. package/dist/migrations/bin.js +0 -30
  53. package/dist/migrations/bin.js.map +0 -1
  54. package/dist/migrations/canonical.d.ts +0 -40
  55. package/dist/migrations/canonical.d.ts.map +0 -1
  56. package/dist/migrations/canonical.js +0 -156
  57. package/dist/migrations/canonical.js.map +0 -1
  58. package/dist/migrations/cli.d.ts +0 -29
  59. package/dist/migrations/cli.d.ts.map +0 -1
  60. package/dist/migrations/cli.js +0 -124
  61. package/dist/migrations/cli.js.map +0 -1
  62. package/dist/migrations/codec.d.ts +0 -74
  63. package/dist/migrations/codec.d.ts.map +0 -1
  64. package/dist/migrations/codec.js +0 -2
  65. package/dist/migrations/codec.js.map +0 -1
  66. package/dist/migrations/decode.d.ts +0 -16
  67. package/dist/migrations/decode.d.ts.map +0 -1
  68. package/dist/migrations/decode.js +0 -302
  69. package/dist/migrations/decode.js.map +0 -1
  70. package/dist/migrations/diff.d.ts +0 -39
  71. package/dist/migrations/diff.d.ts.map +0 -1
  72. package/dist/migrations/diff.js +0 -385
  73. package/dist/migrations/diff.js.map +0 -1
  74. package/dist/migrations/expr.d.ts +0 -22
  75. package/dist/migrations/expr.d.ts.map +0 -1
  76. package/dist/migrations/expr.js +0 -219
  77. package/dist/migrations/expr.js.map +0 -1
  78. package/dist/migrations/fail.d.ts +0 -22
  79. package/dist/migrations/fail.d.ts.map +0 -1
  80. package/dist/migrations/fail.js +0 -52
  81. package/dist/migrations/fail.js.map +0 -1
  82. package/dist/migrations/fsops.d.ts +0 -37
  83. package/dist/migrations/fsops.d.ts.map +0 -1
  84. package/dist/migrations/fsops.js +0 -222
  85. package/dist/migrations/fsops.js.map +0 -1
  86. package/dist/migrations/generate.d.ts +0 -11
  87. package/dist/migrations/generate.d.ts.map +0 -1
  88. package/dist/migrations/generate.js +0 -455
  89. package/dist/migrations/generate.js.map +0 -1
  90. package/dist/migrations/index.d.ts +0 -23
  91. package/dist/migrations/index.d.ts.map +0 -1
  92. package/dist/migrations/index.js +0 -6
  93. package/dist/migrations/index.js.map +0 -1
  94. package/dist/migrations/intent.d.ts +0 -86
  95. package/dist/migrations/intent.d.ts.map +0 -1
  96. package/dist/migrations/intent.js +0 -97
  97. package/dist/migrations/intent.js.map +0 -1
  98. package/dist/migrations/lock.d.ts +0 -27
  99. package/dist/migrations/lock.d.ts.map +0 -1
  100. package/dist/migrations/lock.js +0 -14
  101. package/dist/migrations/lock.js.map +0 -1
  102. package/dist/migrations/native.d.ts +0 -26
  103. package/dist/migrations/native.d.ts.map +0 -1
  104. package/dist/migrations/native.js +0 -124
  105. package/dist/migrations/native.js.map +0 -1
  106. package/dist/migrations/repo.d.ts +0 -38
  107. package/dist/migrations/repo.d.ts.map +0 -1
  108. package/dist/migrations/repo.js +0 -191
  109. package/dist/migrations/repo.js.map +0 -1
  110. package/dist/migrations/theory.d.ts +0 -21
  111. package/dist/migrations/theory.d.ts.map +0 -1
  112. package/dist/migrations/theory.js +0 -107
  113. package/dist/migrations/theory.js.map +0 -1
  114. package/dist/migrations/types.d.ts +0 -242
  115. package/dist/migrations/types.d.ts.map +0 -1
  116. package/dist/migrations/types.js +0 -2
  117. package/dist/migrations/types.js.map +0 -1
  118. package/dist/migrations/workflow.d.ts +0 -11
  119. package/dist/migrations/workflow.d.ts.map +0 -1
  120. package/dist/migrations/workflow.js +0 -14
  121. package/dist/migrations/workflow.js.map +0 -1
  122. /package/dist/{migrations/bin.d.ts → bin.d.ts} +0 -0
@@ -1,156 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // Canonical scalar spellings.
3
- // ---------------------------------------------------------------------------
4
- const F64_IMAGE = new DataView(new ArrayBuffer(8));
5
- const CANONICAL_NAN = "7ff8000000000000";
6
- /** Canonical binary64 bit image: quiet NaN, +0 for both zeros. */
7
- export function f64Bits(value) {
8
- if (Number.isNaN(value)) {
9
- return CANONICAL_NAN;
10
- }
11
- F64_IMAGE.setFloat64(0, value === 0 ? 0 : value);
12
- return F64_IMAGE.getBigUint64(0).toString(16).padStart(16, "0");
13
- }
14
- const HEX = "0123456789abcdef";
15
- export function bytesHex(bytes) {
16
- let out = "";
17
- for (const byte of bytes) {
18
- out += HEX[byte >> 4];
19
- out += HEX[byte & 0x0f];
20
- }
21
- return out;
22
- }
23
- export function renderJson(value) {
24
- return `${JSON.stringify(value, null, "\t")}\n`;
25
- }
26
- /** Compact single-line spelling for request bodies. */
27
- export function compactJson(value) {
28
- return JSON.stringify(value);
29
- }
30
- // ---------------------------------------------------------------------------
31
- // Plan data → JSON tree (the native request carries this subtree; the native
32
- // parser is `migration::plan::parse_plan`'s operation/expression grammar).
33
- // PlanValue is already exactly the JSON value-arm spelling.
34
- // ---------------------------------------------------------------------------
35
- export function valueJson(value) {
36
- if ("bool" in value) {
37
- return { bool: value.bool };
38
- }
39
- if ("u64" in value) {
40
- return { u64: value.u64 };
41
- }
42
- if ("i64" in value) {
43
- return { i64: value.i64 };
44
- }
45
- if ("$f64" in value) {
46
- return { $f64: value.$f64 };
47
- }
48
- if ("uuid" in value) {
49
- return { uuid: value.uuid };
50
- }
51
- if ("string" in value) {
52
- return { string: value.string };
53
- }
54
- if ("fixedBytes" in value) {
55
- return { fixedBytes: value.fixedBytes };
56
- }
57
- if ("intervalU64" in value) {
58
- return { intervalU64: value.intervalU64 };
59
- }
60
- if ("intervalI64" in value) {
61
- return { intervalI64: value.intervalI64 };
62
- }
63
- return { intervalF64: value.intervalF64 };
64
- }
65
- function expressionJson(expression) {
66
- switch (expression.kind) {
67
- case "field":
68
- return { kind: "field", name: expression.name };
69
- case "literal":
70
- return { kind: "literal", value: valueJson(expression.value) };
71
- case "negate":
72
- case "isNaN":
73
- case "isFinite":
74
- return { kind: expression.kind, expr: expressionJson(expression.expr) };
75
- case "add":
76
- case "subtract":
77
- case "multiply":
78
- case "divide":
79
- return { kind: expression.kind, left: expressionJson(expression.left), right: expressionJson(expression.right) };
80
- case "cast":
81
- return { kind: "cast", cast: expression.cast, expr: expressionJson(expression.expr) };
82
- }
83
- }
84
- function operationJson(operation) {
85
- switch (operation.kind) {
86
- case "map-relation":
87
- return {
88
- kind: "map-relation",
89
- source: operation.source,
90
- target: operation.target,
91
- fields: operation.fields.map((field) => ({
92
- target: field.target,
93
- expression: expressionJson(field.expression)
94
- }))
95
- };
96
- case "empty-relation":
97
- return { kind: "empty-relation", target: operation.target };
98
- case "drop-relation":
99
- return { kind: "drop-relation", source: operation.source };
100
- case "seed":
101
- return {
102
- kind: "seed",
103
- target: operation.target,
104
- rows: operation.rows.map((row) => row.map(valueJson))
105
- };
106
- case "validate-schema":
107
- return { kind: "validate-schema", schemaId: operation.schemaId };
108
- }
109
- }
110
- export function planJson(plan) {
111
- const destructive = plan.destructive.map((loss) => loss.field === undefined ? { relation: loss.relation } : { relation: loss.relation, field: loss.field });
112
- return {
113
- planVersion: plan.planVersion,
114
- sequence: plan.sequence,
115
- id: plan.id,
116
- fromSchemaId: plan.fromSchemaId,
117
- toSchemaId: plan.toSchemaId,
118
- operations: plan.operations.map(operationJson),
119
- destructive
120
- };
121
- }
122
- // ---------------------------------------------------------------------------
123
- // TS-owned derived files.
124
- // ---------------------------------------------------------------------------
125
- export function renderContract(contract) {
126
- return renderJson({
127
- contractVersion: contract.contractVersion,
128
- schemaId: contract.schemaId,
129
- appliedPrefixDigest: contract.appliedPrefixDigest,
130
- steps: contract.steps
131
- });
132
- }
133
- /**
134
- * The generated static index: data imports only, no I/O, no logic. The app's
135
- * admin runner imports this module's default export as `GeneratedMigrations`.
136
- * Snapshots are the exact render texts (base first) imported from the
137
- * derived sidecar — never reformatted by this module.
138
- */
139
- export function renderIndex(entries) {
140
- const lines = ["/** Generated by bumbledb-log. Static migration data imports only — do not edit. */"];
141
- entries.forEach((entry, ordinal) => {
142
- lines.push(`import plan${ordinal} from "./${entry.id}.plan.json" with { type: "json" }`);
143
- });
144
- lines.push(`import manifest from "./manifest.json" with { type: "json" }`);
145
- lines.push(`import snapshots from "./snapshots.json" with { type: "json" }`);
146
- lines.push("");
147
- const roster = entries.map((_, ordinal) => `plan${ordinal}`).join(", ");
148
- lines.push(`const plans = Object.freeze([${roster}])`);
149
- lines.push("export default Object.freeze({ manifest, plans, snapshots })");
150
- return `${lines.join("\n")}\n`;
151
- }
152
- /** Derived sidecar: exact snapshot texts, empty-base first. */
153
- export function renderSnapshots(texts) {
154
- return renderJson(texts);
155
- }
156
- //# sourceMappingURL=canonical.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canonical.js","sourceRoot":"","sources":["../../src/migrations/canonical.ts"],"names":[],"mappings":"AA0BA,8EAA8E;AAC9E,8BAA8B;AAC9B,8EAA8E;AAE9E,MAAM,SAAS,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;AAClD,MAAM,aAAa,GAAG,kBAAkB,CAAA;AAExC,kEAAkE;AAClE,MAAM,UAAU,OAAO,CAAC,KAAa;IACpC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,aAAa,CAAA;IACrB,CAAC;IACD,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IAChD,OAAO,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;AAChE,CAAC;AAED,MAAM,GAAG,GAAG,kBAAkB,CAAA;AAE9B,MAAM,UAAU,QAAQ,CAAC,KAAiB;IACzC,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,GAAG,IAAI,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,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACvE,KAAK,CAAC,IAAI,CAAC,gCAAgC,MAAM,IAAI,CAAC,CAAA;IACtD,KAAK,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAA;IAC1E,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;AAC/B,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,eAAe,CAAC,KAAwB;IACvD,OAAO,UAAU,CAAC,KAAK,CAAC,CAAA;AACzB,CAAC"}
@@ -1,29 +0,0 @@
1
- import type { AnySchema } from "@bjornpagen/bumbledb";
2
- import { Effect } from "effect";
3
- import type { MigrationIntent } from "./intent.js";
4
- import type { CheckReport, GenerationReport } from "./types.js";
5
- export declare const CLI_USAGE = "bumbledb-log <generate|check> --schema <module.ts> --out <migrations-dir>\n\t[--export <name>] schema export (default: \"default\", then \"schema\")\n\t[--intent <name>] intent export (default: \"evolution\" when present)\n\t[--label <label>] stable human label for a new plan ([a-z0-9-])\n\t[--contract <path>] runtime contract path (default: <out>/runtime-contract.json)\n";
6
- export interface CliArguments {
7
- readonly command: "generate" | "check";
8
- readonly schemaPath: string;
9
- readonly directory: string;
10
- readonly exportName: string | null;
11
- readonly intentName: string | null;
12
- readonly label: string | null;
13
- readonly contract: string | null;
14
- }
15
- export declare function parseCliArguments(argv: readonly string[]): CliArguments | string;
16
- export interface AuthoredModule {
17
- readonly schema: AnySchema;
18
- readonly intent: MigrationIntent<AnySchema["relations"]> | undefined;
19
- }
20
- /** Load the authoring module. Dynamic import stays inside this Effect. */
21
- export declare const loadAuthoring: (cli: CliArguments) => Effect.Effect<AuthoredModule, string, never>;
22
- export declare const cliProgram: (cli: CliArguments, authored: AuthoredModule) => Effect.Effect<{
23
- report: GenerationReport;
24
- code: 0;
25
- } | {
26
- report: CheckReport;
27
- code: 0 | 1;
28
- }, import("...js").LogError, import("@bjornpagen/bumbledb").NativeRuntime>;
29
- //# sourceMappingURL=cli.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/migrations/cli.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAGzE,eAAO,MAAM,SAAS,qYAKrB,CAAA;AAED,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAA;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,YAAY,GAAG,MAAM,CA4ChF;AAiBD,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,GAAG,SAAS,CAAA;CACpE;AAED,0EAA0E;AAC1E,eAAO,MAAM,aAAa,qEAsBxB,CAAA;AAEF,eAAO,MAAM,UAAU;;UAeE,CAAC;;;;uEAQxB,CAAA"}
@@ -1,124 +0,0 @@
1
- var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
- if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
- return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
- return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
- });
6
- }
7
- return path;
8
- };
9
- /**
10
- * The generator CLI surface: argument parsing and the Effect program.
11
- * Framework runners (`Effect.runPromiseExit`) live only at the executable
12
- * boundary (`#migrations/bin.ts`) and in authored tests. There is no public
13
- * Promise/async twin of generate/check.
14
- */
15
- import * as path from "node:path";
16
- import { pathToFileURL } from "node:url";
17
- import { Effect } from "effect";
18
- import { checkMigrations, generateMigrations } from "#migrations/workflow.ts";
19
- export const CLI_USAGE = `bumbledb-log <generate|check> --schema <module.ts> --out <migrations-dir>
20
- [--export <name>] schema export (default: "default", then "schema")
21
- [--intent <name>] intent export (default: "evolution" when present)
22
- [--label <label>] stable human label for a new plan ([a-z0-9-])
23
- [--contract <path>] runtime contract path (default: <out>/runtime-contract.json)
24
- `;
25
- export function parseCliArguments(argv) {
26
- const command = argv[0];
27
- if (command !== "generate" && command !== "check") {
28
- return CLI_USAGE;
29
- }
30
- let schemaPath = null;
31
- let directory = null;
32
- let exportName = null;
33
- let intentName = null;
34
- let label = null;
35
- let contract = null;
36
- for (let index = 1; index < argv.length; index += 2) {
37
- const flag = argv[index];
38
- const value = argv[index + 1];
39
- if (flag === undefined || value === undefined) {
40
- return CLI_USAGE;
41
- }
42
- switch (flag) {
43
- case "--schema":
44
- schemaPath = value;
45
- break;
46
- case "--out":
47
- directory = value;
48
- break;
49
- case "--export":
50
- exportName = value;
51
- break;
52
- case "--intent":
53
- intentName = value;
54
- break;
55
- case "--label":
56
- label = value;
57
- break;
58
- case "--contract":
59
- contract = value;
60
- break;
61
- default:
62
- return CLI_USAGE;
63
- }
64
- }
65
- if (schemaPath === null || directory === null) {
66
- return CLI_USAGE;
67
- }
68
- return { command, schemaPath, directory, exportName, intentName, label, contract };
69
- }
70
- function isSchemaValue(value) {
71
- return (typeof value === "object" &&
72
- value !== null &&
73
- "relations" in value &&
74
- "statements" in value &&
75
- "classes" in value &&
76
- "name" in value);
77
- }
78
- function isIntentValue(value) {
79
- return typeof value === "object" && value !== null && "schema" in value && "entries" in value;
80
- }
81
- /** Load the authoring module. Dynamic import stays inside this Effect. */
82
- export const loadAuthoring = Effect.fn("bumbledb-log.cli.loadAuthoring")(function* (cli) {
83
- const loaded = yield* Effect.tryPromise({
84
- try: () => import(__rewriteRelativeImportExtension(pathToFileURL(path.resolve(cli.schemaPath)).href)),
85
- catch: (cause) => `schema module failed to load: ${cause instanceof Error ? cause.message : String(cause)}`
86
- });
87
- const exportName = cli.exportName ?? (loaded.default !== undefined ? "default" : "schema");
88
- const candidate = loaded[exportName];
89
- if (!isSchemaValue(candidate)) {
90
- return yield* Effect.fail(`export ${exportName} of ${cli.schemaPath} is not a schema value (declare it with schema(...))`);
91
- }
92
- const intentName = cli.intentName ?? "evolution";
93
- const intentCandidate = loaded[intentName];
94
- if (cli.intentName !== null && intentCandidate === undefined) {
95
- return yield* Effect.fail(`export ${intentName} of ${cli.schemaPath} does not exist`);
96
- }
97
- if (intentCandidate !== undefined && !isIntentValue(intentCandidate)) {
98
- return yield* Effect.fail(`export ${intentName} of ${cli.schemaPath} is not a migrationIntent(...) value`);
99
- }
100
- const authored = { schema: candidate, intent: intentCandidate };
101
- return authored;
102
- });
103
- export const cliProgram = Effect.fn("bumbledb-log.cli.program")(function* (cli, authored) {
104
- const repository = {
105
- directory: cli.directory,
106
- ...(cli.contract === null ? {} : { contract: cli.contract })
107
- };
108
- if (cli.command === "generate") {
109
- const report = yield* generateMigrations({
110
- schema: authored.schema,
111
- ...(authored.intent === undefined ? {} : { intent: authored.intent }),
112
- ...(cli.label === null ? {} : { label: cli.label }),
113
- repository
114
- });
115
- return { report, code: 0 };
116
- }
117
- const report = yield* checkMigrations({
118
- schema: authored.schema,
119
- ...(authored.intent === undefined ? {} : { intent: authored.intent }),
120
- repository
121
- });
122
- return { report, code: report.status === "clean" ? 0 : 1 };
123
- });
124
- //# sourceMappingURL=cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/migrations/cli.ts"],"names":[],"mappings":";;;;;;;;AAAA;;;;;GAKG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAG/B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;CAKxB,CAAA;AAYD,MAAM,UAAU,iBAAiB,CAAC,IAAuB;IACxD,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;IACvB,IAAI,OAAO,KAAK,UAAU,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACnD,OAAO,SAAS,CAAA;IACjB,CAAC;IACD,IAAI,UAAU,GAAkB,IAAI,CAAA;IACpC,IAAI,SAAS,GAAkB,IAAI,CAAA;IACnC,IAAI,UAAU,GAAkB,IAAI,CAAA;IACpC,IAAI,UAAU,GAAkB,IAAI,CAAA;IACpC,IAAI,KAAK,GAAkB,IAAI,CAAA;IAC/B,IAAI,QAAQ,GAAkB,IAAI,CAAA;IAClC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;QACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;QAC7B,IAAI,IAAI,KAAK,SAAS,IA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AM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;QACrE,UAAU;KACV,CAAC,CAAA;IACF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAE,CAAW,CAAC,CAAC,CAAE,CAAW,EAAE,CAAA;AACjF,CAAC,CAAC,CAAA"}
@@ -1,74 +0,0 @@
1
- /**
2
- * The native-codec interface of the migration generator. Everything
3
- * semantic — schema validation, canonical SchemaId, snapshot rendering, plan
4
- * validation/rendering/digesting, manifest verification/appending, plan-set
5
- * digests — happens in the native `schema_file`, `migration::plan` and
6
- * `migration::manifest` modules reached through the shared bridge.
7
- * TypeScript never reimplements framing, hashing or scalar
8
- * arithmetic; this interface only names the two bounded read entrypoints the
9
- * generator calls. `#migrations/native.ts` binds the production codec;
10
- * generator tests can substitute a scripted codec to exercise refusal and
11
- * repository-publication behavior independently of native execution.
12
- *
13
- * This module is types only — importing it performs no native work and does
14
- * not load the addon.
15
- */
16
- import type { NativeRuntime, SchemaSpec } from "@bjornpagen/bumbledb";
17
- import type { Effect } from "effect";
18
- import type { LogError } from "../errors.js";
19
- import type { JsonValue } from "./canonical.js";
20
- export interface SchemaIdentity {
21
- /** Canonical schema fingerprint, 64 lowercase hex (core v6 stream). */
22
- readonly schemaId: string;
23
- /** The canonical `schema_file::render` text, written verbatim to meta/. */
24
- readonly snapshot: string;
25
- }
26
- export interface EntryPayload {
27
- readonly sequence: string;
28
- readonly id: string;
29
- readonly fromSchemaId: string;
30
- readonly toSchemaId: string;
31
- readonly planDigest: string;
32
- readonly prefixDigest: string;
33
- }
34
- export interface ChainRequest {
35
- /** Parsed `manifest.json` tree when the repo has one; null roots a fresh chain. */
36
- readonly manifest: JsonValue | null;
37
- /** Required when `manifest` is null: the declared empty-base schema. */
38
- readonly baseSchemaId: string | null;
39
- /** Every recorded schema snapshot's parsed tree, in manifest order. */
40
- readonly snapshots: readonly JsonValue[];
41
- /** Every recorded plan's parsed tree, in manifest order (`bind_plans`). */
42
- readonly plans: readonly JsonValue[];
43
- /** A new plan to validate + append (data tree, `parse_plan` grammar). */
44
- readonly append: JsonValue | null;
45
- /** Request a `plan_set_digest` over entries [first, first+count). */
46
- readonly planSet: {
47
- readonly first: number;
48
- readonly count: number;
49
- } | null;
50
- }
51
- export interface ChainPayload {
52
- readonly headPrefixDigest: string;
53
- readonly planSetDigest: string | null;
54
- readonly appended: {
55
- readonly entry: EntryPayload;
56
- /** Canonical `render_plan` text: written verbatim, never reformatted. */
57
- readonly planText: string;
58
- /** Canonical `render_manifest` text after the append. */
59
- readonly manifestText: string;
60
- } | null;
61
- }
62
- export interface MigrationCodec {
63
- /** Validate + fingerprint + render the current schema natively. */
64
- schemaIdentity(spec: SchemaSpec): Effect.Effect<SchemaIdentity, LogError, NativeRuntime>;
65
- /**
66
- * One native chain pass: parse + verify the manifest, bind every recorded
67
- * plan's canonical digest, optionally validate/append a new plan (returning
68
- * its canonical rendered text, the new manifest text and the new entry),
69
- * and optionally compute a pending plan-set digest. Nothing is trusted
70
- * from text.
71
- */
72
- verifyChain(request: ChainRequest): Effect.Effect<ChainPayload, LogError, NativeRuntime>;
73
- }
74
- //# sourceMappingURL=codec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../src/migrations/codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEzD,MAAM,WAAW,cAAc;IAC9B,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,2EAA2E;IAC3E,QAAQ,CAAC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,cAAc;IAC9B,mEAAmE;IACnE,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAA;IACxF;;;;;;OAMG;IACH,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAA;CACxF"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=codec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/migrations/codec.ts"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
1
- import type { ActivationRef, GeneratedMigrations, MigrationManifest, MigrationPlan, RuntimeContract } from "./types.js";
2
- export type DecodeResult<A> = {
3
- readonly ok: true;
4
- readonly value: A;
5
- } | {
6
- readonly ok: false;
7
- readonly detail: string;
8
- };
9
- export declare function decodeManifestData(value: unknown): DecodeResult<MigrationManifest>;
10
- export declare function decodePlanData(value: unknown): DecodeResult<MigrationPlan>;
11
- export declare function decodeGeneratedMigrations(value: unknown): DecodeResult<GeneratedMigrations>;
12
- export declare function decodeRuntimeContract(value: unknown): DecodeResult<RuntimeContract>;
13
- export declare function decodeActivationRef(value: unknown): DecodeResult<ActivationRef>;
14
- /** Decode a persisted ready-to-switch migrate outcome's activation field. */
15
- export declare function decodeReadyToSwitchActivation(value: unknown): DecodeResult<ActivationRef>;
16
- //# sourceMappingURL=decode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../src/migrations/decode.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACX,aAAa,EACb,mBAAmB,EAEnB,iBAAiB,EACjB,aAAa,EAIb,eAAe,EACf,MAAM,sBAAsB,CAAA;AAuB7B,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAMxH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAOlF;AAgED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,CAuD1E;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC,mBAAmB,CAAC,CA2C3F;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAoBnF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,CA2E/E;AAED,6EAA6E;AAC7E,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,CAQzF"}