@substrat-run/adapter-cloudflare 0.138.0 → 0.139.0

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/sql.d.ts CHANGED
@@ -18,7 +18,11 @@ import { type RedactionSql, type ScopedSql } from '@substrat-run/kernel';
18
18
  * hosted push path. The DO's own spine writes go through `this.sql` directly and
19
19
  * never pass through here.
20
20
  */
21
- export declare function doScopedSql(sql: SqlStorage): ScopedSql;
21
+ export declare function doScopedSql(sql: SqlStorage,
22
+ /** #119: the module tables carrying archive/trash columns — `guardSpine` refuses positional writes to them. */
23
+ statefulTables?: ReadonlySet<string>,
24
+ /** #119: the kernel's integrity check, run after any runtime DDL — see `guardSpine`. */
25
+ afterDdl?: () => void): ScopedSql;
22
26
  /**
23
27
  * The kernel's OWN spine access (#1672) — `doScopedSql` without `guardSpine`, because these
24
28
  * are the kernel's writes to `_substrat_capabilities`, which module code may never make.
package/dist/sql.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../src/sql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAEpG;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,CAStD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,CASrD;AAED,2GAA2G;AAC3G,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,YAAY,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAWpF"}
1
+ {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../src/sql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAEpG;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,UAAU;AACf,+GAA+G;AAC/G,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;AACpC,wFAAwF;AACxF,QAAQ,CAAC,EAAE,MAAM,IAAI,GACpB,SAAS,CASX;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,CASrD;AAED,2GAA2G;AAC3G,wBAAgB,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,YAAY,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAWpF"}
package/dist/sql.js CHANGED
@@ -18,14 +18,18 @@ import { guardSpine } from '@substrat-run/kernel';
18
18
  * hosted push path. The DO's own spine writes go through `this.sql` directly and
19
19
  * never pass through here.
20
20
  */
21
- export function doScopedSql(sql) {
21
+ export function doScopedSql(sql,
22
+ /** #119: the module tables carrying archive/trash columns — `guardSpine` refuses positional writes to them. */
23
+ statefulTables,
24
+ /** #119: the kernel's integrity check, run after any runtime DDL — see `guardSpine`. */
25
+ afterDdl) {
22
26
  return guardSpine({
23
27
  query: (q, params = []) => sql.exec(q, ...params).toArray(),
24
28
  exec: (q, params = []) => {
25
29
  const cursor = sql.exec(q, ...params);
26
30
  return { changes: cursor.rowsWritten };
27
31
  },
28
- });
32
+ }, statefulTables, afterDdl);
29
33
  }
30
34
  /**
31
35
  * The kernel's OWN spine access (#1672) — `doScopedSql` without `guardSpine`, because these
package/dist/sql.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sql.js","sourceRoot":"","sources":["../src/sql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAoD,MAAM,sBAAsB,CAAC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AAE,EAAE;YACpD,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAI,MAAqB,CAAC,CAAC;YACtD,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,2GAA2G;AAC3G,MAAM,UAAU,cAAc,CAAC,GAAe;IAC5C,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAI,MAAqB,CAAC,CAAC,OAAO,EAAE,CAAC;AACzE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAe,EAAE,IAAY;IAC5D,gGAAgG;IAChG,iGAAiG;IACjG,MAAM,KAAK,GAAG,GAAG;SACd,IAAI,CACH;iEAC2D,EAC3D,IAAI,CACL;SACA,OAAO,EAAE,CAAC;IACb,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC,WAAW,CAAC;AAClG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/adapter-cloudflare",
3
- "version": "0.138.0",
3
+ "version": "0.139.0",
4
4
  "description": "Cloudflare Durable-Object scope host (D-14): DO-per-scope, real kernel semantics on Workers",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -26,8 +26,8 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@substrat-run/contracts": "^0.138.0",
30
- "@substrat-run/kernel": "^0.138.0"
29
+ "@substrat-run/kernel": "^0.139.0",
30
+ "@substrat-run/contracts": "^0.139.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@cloudflare/vitest-pool-workers": "^0.12.21",
@@ -36,12 +36,12 @@
36
36
  "typescript": "^7.0.0",
37
37
  "vitest": "^3.2.7",
38
38
  "wrangler": "^4.146.0",
39
- "@substrat-run/attachment-extractors": "^0.1.4",
40
- "@substrat-run/contract-tests": "^0.138.0",
41
- "@substrat-run/vertical-auth": "^0.19.1",
42
- "@substrat-run/control-plane-api": "^0.138.0",
43
- "@substrat-run/cli": "^0.40.2",
44
- "@substrat-run/vertical-host": "^0.138.0"
39
+ "@substrat-run/attachment-extractors": "^0.2.0",
40
+ "@substrat-run/cli": "^0.40.3",
41
+ "@substrat-run/contract-tests": "^0.139.0",
42
+ "@substrat-run/vertical-auth": "^0.20.0",
43
+ "@substrat-run/control-plane-api": "^0.139.0",
44
+ "@substrat-run/vertical-host": "^0.139.0"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
@@ -49,6 +49,8 @@
49
49
  "scripts": {
50
50
  "build": "tsc -p tsconfig.json",
51
51
  "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
52
- "test": "vitest run && vitest run -c vitest.supplied-sweeper.config.ts"
52
+ "test": "vitest run && vitest run -c vitest.supplied-sweeper.config.ts",
53
+ "test:contract": "vitest run test/contract.test.ts",
54
+ "test:rest": "vitest run --exclude test/contract.test.ts && vitest run -c vitest.supplied-sweeper.config.ts"
53
55
  }
54
56
  }