@substrat-run/contracts 0.94.0 → 0.95.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.
- package/dist/ci.d.ts.map +1 -1
- package/dist/ci.js +58 -4
- package/dist/ci.js.map +1 -1
- package/dist/introspection.d.ts +42 -0
- package/dist/introspection.d.ts.map +1 -1
- package/dist/introspection.js +169 -0
- package/dist/introspection.js.map +1 -1
- package/package.json +1 -1
package/dist/ci.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../src/ci.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH;;;;;GAKG;AACH,eAAO,MAAM,UAAU,aAAc,MAAM,KAAG,MAA0B,CAAC;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,aAAc,MAAM,SAAS,MAAM,GAAG,MAAM,KAAG,MAChD,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,aAAc,MAAM,KAAG,MAA2B,CAAC;AAMrF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAElE;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,CAa1F;AAED,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,QAAO,MACiF,CAAC;AAMvH;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,YAAY,CAAC;AAEjD,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,OAAO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;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAQjF;AAKD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAyStE"}
|
package/dist/ci.js
CHANGED
|
@@ -153,10 +153,64 @@ export function deployWorkflowYaml(opts) {
|
|
|
153
153
|
else npm run build --workspaces --if-present
|
|
154
154
|
fi`
|
|
155
155
|
: '';
|
|
156
|
+
// The gate, between the build and every push (#955).
|
|
157
|
+
//
|
|
158
|
+
// A push IS a release: it uploads a bundle the platform admits and serves. So everything
|
|
159
|
+
// the project enforces mechanically has to hold BEFORE the upload, not in a CI job running
|
|
160
|
+
// beside this one that goes red on code prod is already serving. Outside this monorepo
|
|
161
|
+
// nothing else ever runs those rules — the hosted push path is the only path a customer
|
|
162
|
+
// has — which is what made R2's ambient-env ban, R5, R6 and R7 advisory for every project
|
|
163
|
+
// that is not this repo.
|
|
164
|
+
//
|
|
165
|
+
// The three names are the gates a scaffolded project ships with (`npm create substrat`
|
|
166
|
+
// writes `test`, `typecheck` and `lint:boundaries`), and each runs only if THIS package
|
|
167
|
+
// declares it — never the repo root, even in a monorepo. The step above builds the
|
|
168
|
+
// vertical's dependency closure and nothing else, so a root script is free to need a tool
|
|
169
|
+
// this job never built: falling back to the root `lint:boundaries` is how the first
|
|
170
|
+
// version of this gate died, on a `packages/boundary-lint/dist` that was correctly absent.
|
|
171
|
+
// A monorepo package that wants the layer rules gated declares them itself —
|
|
172
|
+
// `"lint:boundaries": "substrat-boundary-lint"` beside a devDependency on
|
|
173
|
+
// @substrat-run/boundary-lint, which then IS in the closure the build step covers.
|
|
174
|
+
//
|
|
175
|
+
// A project that declares none of the three is still pushed — this file is regenerated
|
|
176
|
+
// into repos that predate the gate, and refusing there would break their deploy on an
|
|
177
|
+
// upgrade — but it says so loudly instead of passing quietly.
|
|
178
|
+
const pkgRelRef = path ? `${path}/package.json` : 'package.json';
|
|
179
|
+
const gate = `
|
|
180
|
+
- name: Gate the push (typecheck, tests, layer rules)
|
|
181
|
+
# Runs the gates ${pkgRelRef} declares — a violation fails the job before anything
|
|
182
|
+
# is uploaded. Add \`test\`, \`typecheck\` and \`lint:boundaries\` scripts to gate more;
|
|
183
|
+
# \`lint:boundaries\` is \`substrat-boundary-lint\` from @substrat-run/boundary-lint.
|
|
184
|
+
run: |
|
|
185
|
+
set -euo pipefail
|
|
186
|
+
if [ -f pnpm-lock.yaml ]; then PM=pnpm
|
|
187
|
+
elif [ -f yarn.lock ]; then PM=yarn
|
|
188
|
+
else PM=npm
|
|
189
|
+
fi
|
|
190
|
+
declares() { node -e "const s=require(process.cwd()+'/'+process.argv[1]).scripts||{};process.exit(s[process.argv[2]]?0:1)" '${pkgRelRef}' "$1"; }
|
|
191
|
+
RAN=''
|
|
192
|
+
for s in typecheck test lint:boundaries; do
|
|
193
|
+
if declares "$s"; then ( cd ${dir} && $PM run "$s" ); RAN="$RAN $s"
|
|
194
|
+
else echo "no '$s' script in ${pkgRelRef} — skipped"
|
|
195
|
+
fi
|
|
196
|
+
done
|
|
197
|
+
if [ -z "$RAN" ]; then
|
|
198
|
+
echo "::warning::no typecheck, test or lint:boundaries script in ${pkgRelRef} — this push is UNGATED. See https://substrat.net/guide/deploying"
|
|
199
|
+
else
|
|
200
|
+
echo "gates passed:$RAN"
|
|
201
|
+
fi`;
|
|
156
202
|
// The install block repeats across jobs (self-contained file, see above). `fetch-depth: 2`
|
|
157
203
|
// is what lets the changesets release gate diff package.json against the previous commit.
|
|
158
|
-
|
|
159
|
-
|
|
204
|
+
//
|
|
205
|
+
// `persist-credentials: false` because nothing here speaks git over the network after the
|
|
206
|
+
// checkout: the CLI pushes with SUBSTRAT_SERVICE_TOKEN and `gh` is handed GH_TOKEN
|
|
207
|
+
// explicitly. Left at its default, the workflow token sits in .git/config while the job
|
|
208
|
+
// installs and builds repository-controlled code, which is one dependency away from
|
|
209
|
+
// being readable.
|
|
210
|
+
const setup = (fetchDepth) => ` - uses: actions/checkout@v7
|
|
211
|
+
with:
|
|
212
|
+
persist-credentials: false${fetchDepth ? `\n fetch-depth: ${fetchDepth}` : ''}
|
|
213
|
+
- uses: actions/setup-node@v6
|
|
160
214
|
with:
|
|
161
215
|
# 22+: corepack resolves the latest pnpm for lockfile-only repos, and pnpm 11
|
|
162
216
|
# needs Node >= 22.13 (node:sqlite).
|
|
@@ -169,7 +223,7 @@ export function deployWorkflowYaml(opts) {
|
|
|
169
223
|
elif [ -f yarn.lock ]; then corepack enable && yarn install --frozen-lockfile
|
|
170
224
|
elif [ -f package-lock.json ]; then npm ci
|
|
171
225
|
else npm install
|
|
172
|
-
fi${buildDeps}`;
|
|
226
|
+
fi${buildDeps}${gate}`;
|
|
173
227
|
const cpEnv = ` env:
|
|
174
228
|
SUBSTRAT_SERVICE_TOKEN: \${{ secrets.SUBSTRAT_SERVICE_TOKEN }}
|
|
175
229
|
SUBSTRAT_CP_URL: ${cpUrl}`;
|
|
@@ -273,7 +327,7 @@ ${cpEnv}
|
|
|
273
327
|
runs-on: ubuntu-latest
|
|
274
328
|
concurrency: substrat-preview-\${{ github.event.number }}
|
|
275
329
|
steps:
|
|
276
|
-
- uses: actions/setup-node@
|
|
330
|
+
- uses: actions/setup-node@v6
|
|
277
331
|
with:
|
|
278
332
|
node-version: 22
|
|
279
333
|
- name: Reap the preview
|
package/dist/ci.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci.js","sourceRoot":"","sources":["../src/ci.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,MAAM,QAAQ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QACxB,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,WAAW,GAAG,OAAO,KAAK,YAAY;QAC1C,CAAC,CAAC;6FACuF;QACzF,CAAC,CAAC,qCAAqC,MAAM;8EAC6B,CAAC;IAE7E,OAAO;;;;wDAKL,IAAI;QACF,CAAC,CAAC,sCAAsC,IAAI,mBAAmB,IAAI,iNAAiN;QACpR,CAAC,CAAC,EACN;;;;;;;;iBAQe,MAAM,IAAI,WAAW;;;;oDAIc,WAAW;;;;EAI7D,WAAW;;;;EAIX,KAAK,CAAC,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;EAC/C,QAAQ;EACR,OAAO;;;;;;;;;;;EAWP,KAAK,EAAE;EACP,YAAY;EACZ,WAAW;;EAEX,OAAO;CACR,CAAC;AACF,CAAC"}
|
package/dist/introspection.d.ts
CHANGED
|
@@ -171,4 +171,46 @@ export declare const directoryBackup: z.ZodObject<{
|
|
|
171
171
|
tables: z.ZodNumber;
|
|
172
172
|
}, z.core.$strip>;
|
|
173
173
|
export type DirectoryBackup = z.infer<typeof directoryBackup>;
|
|
174
|
+
/**
|
|
175
|
+
* Throw naming the offending identifier, or return it.
|
|
176
|
+
*
|
|
177
|
+
* Exported because a caller that reads names one at a time — walking `sqlite_master`
|
|
178
|
+
* in a file it was handed, say — has to check each one at the point it interpolates
|
|
179
|
+
* it, not as a batch afterwards.
|
|
180
|
+
*/
|
|
181
|
+
export declare function assertSqlIdentifier(name: string, what: string): string;
|
|
182
|
+
/** Every table and column name in a dump, checked before any of them reaches SQL. */
|
|
183
|
+
export declare function assertDumpIdentifiers(tables: {
|
|
184
|
+
name: string;
|
|
185
|
+
columns?: string[];
|
|
186
|
+
}[]): void;
|
|
187
|
+
/**
|
|
188
|
+
* A dumped table's schema is exactly one `CREATE TABLE` for the name the dump
|
|
189
|
+
* declared — checked BEFORE it runs, because a check that runs afterwards has
|
|
190
|
+
* already let the statement happen.
|
|
191
|
+
*
|
|
192
|
+
* Both halves are load-bearing, and the second is the one that is easy to miss.
|
|
193
|
+
* Executing a table's `ddl` runs EVERY statement the text contains — `db.exec` on
|
|
194
|
+
* better-sqlite3 and `SqlStorage.exec` on a Durable Object both do — so
|
|
195
|
+
* `CREATE TABLE x (id TEXT); ATTACH DATABASE '/tmp/out' AS e;` executed both halves
|
|
196
|
+
* with two entirely plain identifiers, and nothing an identifier check adds would
|
|
197
|
+
* have caught it. Pinning the head alone is not enough either: a trailing statement
|
|
198
|
+
* rides in behind a perfectly honest `CREATE TABLE`.
|
|
199
|
+
*
|
|
200
|
+
* Refusing beats relying on the driver to compile only the first statement. That is
|
|
201
|
+
* true of better-sqlite3's `prepare` and NOT true of a Durable Object, which has no
|
|
202
|
+
* prepare step at all — so a rule that leaned on it would hold in the CLI and quietly
|
|
203
|
+
* fail on the hosted path, which is the one that matters most.
|
|
204
|
+
*/
|
|
205
|
+
export declare function assertSingleCreateTable(ddl: string, name: string): void;
|
|
206
|
+
/**
|
|
207
|
+
* Everything a dump must satisfy before any of it reaches SQL: its identifiers, and
|
|
208
|
+
* one `CREATE TABLE` per table. The single entry point a replay site calls, so a new
|
|
209
|
+
* one cannot pick up half the rules.
|
|
210
|
+
*/
|
|
211
|
+
export declare function assertReplayableDump(tables: {
|
|
212
|
+
name: string;
|
|
213
|
+
ddl: string;
|
|
214
|
+
columns?: string[];
|
|
215
|
+
}[]): void;
|
|
174
216
|
//# sourceMappingURL=introspection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"introspection.d.ts","sourceRoot":"","sources":["../src/introspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;iBAIrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD;;;;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z.object({
|
|
|
172
172
|
/** Tables carried; zero means the copy is not restorable. */
|
|
173
173
|
tables: z.number().int().nonnegative(),
|
|
174
174
|
});
|
|
175
|
+
/**
|
|
176
|
+
* ## Replaying a dump: a dump is untrusted input at every site that replays it
|
|
177
|
+
*
|
|
178
|
+
* A `ScopeDumpTable` names its own tables and columns and carries its own schema
|
|
179
|
+
* text, and all three reach SQL as TEXT — a bind parameter can stand in for a value
|
|
180
|
+
* but never for an identifier, and never for a `CREATE TABLE`. So the quoting used to
|
|
181
|
+
* be the only thing in the way, and a crafted name walks straight out of it:
|
|
182
|
+
*
|
|
183
|
+
* ```
|
|
184
|
+
* x") ; ATTACH DATABASE '/tmp/pwned.db' AS e; --
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* Three call sites replay a dump — the CLI's `scope pull`/`restore`, the SQLite
|
|
188
|
+
* adapter's `loadDump`, and the two Durable Object paths (`scope-do`, `control-plane-do`).
|
|
189
|
+
* The checks live HERE, beside the schema they judge, because the alternative is the
|
|
190
|
+
* same security rule written three times and fixed in one of them. #1143.
|
|
191
|
+
*
|
|
192
|
+
* The rule is **refuse the backup**, not quote harder. Every table a substrat scope
|
|
193
|
+
* holds is a plain word, so a name that is not one is corruption or an attack, and
|
|
194
|
+
* neither is worth loading.
|
|
195
|
+
*/
|
|
196
|
+
const SQL_IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
197
|
+
/**
|
|
198
|
+
* Throw naming the offending identifier, or return it.
|
|
199
|
+
*
|
|
200
|
+
* Exported because a caller that reads names one at a time — walking `sqlite_master`
|
|
201
|
+
* in a file it was handed, say — has to check each one at the point it interpolates
|
|
202
|
+
* it, not as a batch afterwards.
|
|
203
|
+
*/
|
|
204
|
+
export function assertSqlIdentifier(name, what) {
|
|
205
|
+
if (!SQL_IDENTIFIER.test(name)) {
|
|
206
|
+
throw new Error(`refusing this dump: ${what} ${JSON.stringify(name)} is not a plain SQL identifier ` +
|
|
207
|
+
'(letters, digits and underscore, not starting with a digit). A scope dump whose ' +
|
|
208
|
+
'names do not read like table names is corrupt or crafted — it is not loaded.');
|
|
209
|
+
}
|
|
210
|
+
return name;
|
|
211
|
+
}
|
|
212
|
+
/** Every table and column name in a dump, checked before any of them reaches SQL. */
|
|
213
|
+
export function assertDumpIdentifiers(tables) {
|
|
214
|
+
const seen = new Set();
|
|
215
|
+
for (const t of tables) {
|
|
216
|
+
assertSqlIdentifier(t.name, 'table name');
|
|
217
|
+
// A dump lists each table once. A REPEATED name is how a crafted one hides: the
|
|
218
|
+
// honest entry creates the table, and a second entry under the same name carries
|
|
219
|
+
// the payload while every per-entry check still sees a table that exists.
|
|
220
|
+
// Compared case-insensitively, because SQLite resolves table names that way —
|
|
221
|
+
// `Users` and `users` are one table, so two entries would otherwise merge into
|
|
222
|
+
// it. `sqlIdentifier` has already limited the name to ASCII, so lowercasing is
|
|
223
|
+
// the same fold SQLite applies rather than an approximation of it.
|
|
224
|
+
const key = t.name.toLowerCase();
|
|
225
|
+
if (seen.has(key)) {
|
|
226
|
+
throw new Error(`refusing this dump: table ${JSON.stringify(t.name)} is listed twice (SQLite resolves table ` +
|
|
227
|
+
'names case-insensitively, so names differing only in case are one table). A scope dump names ' +
|
|
228
|
+
'each of its tables once — a repeat is corrupt or crafted, and it is not loaded.');
|
|
229
|
+
}
|
|
230
|
+
seen.add(key);
|
|
231
|
+
for (const c of t.columns ?? []) {
|
|
232
|
+
assertSqlIdentifier(c, `column name in table ${JSON.stringify(t.name)}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
const CREATE_TABLE_HEAD = /^\s*CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?(?:"([^"]+)"|`([^`]+)`|\[([^\]]+)\]|([A-Za-z_][A-Za-z0-9_]*))\s*\(/i;
|
|
237
|
+
/**
|
|
238
|
+
* Is there a SECOND statement in this text?
|
|
239
|
+
*
|
|
240
|
+
* A small SQL-aware scan rather than a `split(';')`: a `;` inside a string literal,
|
|
241
|
+
* a quoted identifier or a comment is not a statement boundary, and treating one as
|
|
242
|
+
* such would refuse honest schemas (a DEFAULT of `'a;b'` is legal). Only a top-level
|
|
243
|
+
* `;` with something other than whitespace or comments after it counts.
|
|
244
|
+
*
|
|
245
|
+
* A table's DDL is a single `CREATE TABLE`, so there is deliberately no `BEGIN … END`
|
|
246
|
+
* handling here — that belongs to triggers, which a dump's `ddl` field never carries.
|
|
247
|
+
*/
|
|
248
|
+
function hasTrailingStatement(sql) {
|
|
249
|
+
const n = sql.length;
|
|
250
|
+
let i = 0;
|
|
251
|
+
let ended = false;
|
|
252
|
+
while (i < n) {
|
|
253
|
+
const c = sql[i];
|
|
254
|
+
const c2 = sql[i + 1];
|
|
255
|
+
if (c === '-' && c2 === '-') {
|
|
256
|
+
while (i < n && sql[i] !== '\n')
|
|
257
|
+
i += 1;
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
if (c === '/' && c2 === '*') {
|
|
261
|
+
i += 2;
|
|
262
|
+
while (i < n && !(sql[i] === '*' && sql[i + 1] === '/'))
|
|
263
|
+
i += 1;
|
|
264
|
+
i += 2;
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
// A string literal, or a quoted identifier. The closing mark doubles to escape
|
|
268
|
+
// itself in all three of SQLite's quoting styles.
|
|
269
|
+
if (c === "'" || c === '"' || c === '`') {
|
|
270
|
+
i += 1;
|
|
271
|
+
while (i < n) {
|
|
272
|
+
if (sql[i] === c) {
|
|
273
|
+
if (sql[i + 1] === c) {
|
|
274
|
+
i += 2;
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
i += 1;
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
i += 1;
|
|
281
|
+
}
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
if (c === '[') {
|
|
285
|
+
while (i < n && sql[i] !== ']')
|
|
286
|
+
i += 1;
|
|
287
|
+
i += 1;
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
if (c === ';') {
|
|
291
|
+
ended = true;
|
|
292
|
+
i += 1;
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
// Anything that is not whitespace, after a top-level `;`, is a second statement.
|
|
296
|
+
if (ended && !/\s/.test(c))
|
|
297
|
+
return true;
|
|
298
|
+
i += 1;
|
|
299
|
+
}
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* A dumped table's schema is exactly one `CREATE TABLE` for the name the dump
|
|
304
|
+
* declared — checked BEFORE it runs, because a check that runs afterwards has
|
|
305
|
+
* already let the statement happen.
|
|
306
|
+
*
|
|
307
|
+
* Both halves are load-bearing, and the second is the one that is easy to miss.
|
|
308
|
+
* Executing a table's `ddl` runs EVERY statement the text contains — `db.exec` on
|
|
309
|
+
* better-sqlite3 and `SqlStorage.exec` on a Durable Object both do — so
|
|
310
|
+
* `CREATE TABLE x (id TEXT); ATTACH DATABASE '/tmp/out' AS e;` executed both halves
|
|
311
|
+
* with two entirely plain identifiers, and nothing an identifier check adds would
|
|
312
|
+
* have caught it. Pinning the head alone is not enough either: a trailing statement
|
|
313
|
+
* rides in behind a perfectly honest `CREATE TABLE`.
|
|
314
|
+
*
|
|
315
|
+
* Refusing beats relying on the driver to compile only the first statement. That is
|
|
316
|
+
* true of better-sqlite3's `prepare` and NOT true of a Durable Object, which has no
|
|
317
|
+
* prepare step at all — so a rule that leaned on it would hold in the CLI and quietly
|
|
318
|
+
* fail on the hosted path, which is the one that matters most.
|
|
319
|
+
*/
|
|
320
|
+
export function assertSingleCreateTable(ddl, name) {
|
|
321
|
+
const head = CREATE_TABLE_HEAD.exec(ddl);
|
|
322
|
+
const creates = head ? (head[1] ?? head[2] ?? head[3] ?? head[4]) : undefined;
|
|
323
|
+
if (creates !== name) {
|
|
324
|
+
throw new Error(`refusing this dump: the schema given for table ${JSON.stringify(name)} does not begin with ` +
|
|
325
|
+
`\`CREATE TABLE ${name} (\` — it begins ${JSON.stringify(ddl.slice(0, 60))}. A scope dump's schema ` +
|
|
326
|
+
'and its own table list have to agree; one that does not is corrupt or crafted, and it is not loaded.');
|
|
327
|
+
}
|
|
328
|
+
if (hasTrailingStatement(ddl)) {
|
|
329
|
+
throw new Error(`refusing this dump: the schema given for table ${JSON.stringify(name)} carries more than one ` +
|
|
330
|
+
'statement. A dumped table is one `CREATE TABLE`; anything appended to it would execute with ' +
|
|
331
|
+
'the same privileges as the restore, so the dump is not loaded.');
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Everything a dump must satisfy before any of it reaches SQL: its identifiers, and
|
|
336
|
+
* one `CREATE TABLE` per table. The single entry point a replay site calls, so a new
|
|
337
|
+
* one cannot pick up half the rules.
|
|
338
|
+
*/
|
|
339
|
+
export function assertReplayableDump(tables) {
|
|
340
|
+
assertDumpIdentifiers(tables);
|
|
341
|
+
for (const t of tables)
|
|
342
|
+
assertSingleCreateTable(t.ddl, t.name);
|
|
343
|
+
}
|
|
175
344
|
//# sourceMappingURL=introspection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"introspection.js","sourceRoot":"","sources":["../src/introspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACxC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,CAAC,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CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAW,EAAE,IAAY;IAC/D,MAAM,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9E,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,kDAAkD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,uBAAuB;YAC3F,kBAAkB,IAAI,oBAAoB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,0BAA0B;YACpG,sGAAsG,CACzG,CAAC;IACJ,CAAC;IACD,IAAI,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACb,kDAAkD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,yBAAyB;YAC7F,8FAA8F;YAC9F,gEAAgE,CACnE,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAA2D;IAC9F,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9B,KAAK,MAAM,CAAC,IAAI,MAAM;QAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.1",
|
|
4
4
|
"description": "Substrat kernel contract schemas — Zod is the source of truth (master plan D-22); OAS/JSON Schema are emitted artifacts",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|