@substrat-run/adapter-cloudflare 0.135.0 → 0.136.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/connector-calls.d.ts +11 -0
- package/dist/connector-calls.d.ts.map +1 -0
- package/dist/connector-calls.js +10 -0
- package/dist/connector-calls.js.map +1 -0
- package/dist/control-plane-do.d.ts +76 -0
- package/dist/control-plane-do.d.ts.map +1 -1
- package/dist/control-plane-do.js +172 -49
- package/dist/control-plane-do.js.map +1 -1
- package/dist/host.d.ts +193 -12
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +497 -46
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/live-reads.d.ts +5 -4
- package/dist/live-reads.d.ts.map +1 -1
- package/dist/live-reads.js +5 -4
- package/dist/live-reads.js.map +1 -1
- package/dist/r2.d.ts +2 -1
- package/dist/r2.d.ts.map +1 -1
- package/dist/r2.js.map +1 -1
- package/dist/route-resolver.d.ts +7 -0
- package/dist/route-resolver.d.ts.map +1 -1
- package/dist/route-resolver.js +4 -0
- package/dist/route-resolver.js.map +1 -1
- package/dist/scope-do.d.ts.map +1 -1
- package/dist/scope-do.js +632 -100
- package/dist/scope-do.js.map +1 -1
- package/dist/scope-sweeper-do.d.ts +32 -6
- package/dist/scope-sweeper-do.d.ts.map +1 -1
- package/dist/scope-sweeper-do.js +35 -5
- package/dist/scope-sweeper-do.js.map +1 -1
- package/package.json +10 -9
|
@@ -8,6 +8,14 @@ import type { ExecutorDrainReport, JobDriveReport, ScheduleRegistration, Schedul
|
|
|
8
8
|
* `PLATFORM_SWEEPER_NAME` gives the directory-backed trigger.
|
|
9
9
|
*/
|
|
10
10
|
export declare const SCOPE_SWEEPER_NAME = "scope-sweeper";
|
|
11
|
+
/**
|
|
12
|
+
* A tenant or scope id: a ULID, exactly what `@substrat-run/contracts`' `tenantId` and
|
|
13
|
+
* `scopeId` schemas accept. Checked with the pattern rather than through those schemas since
|
|
14
|
+
* #1902, because this file is bundled into the sweeper the platform supplies to every upload
|
|
15
|
+
* that needs one, and a runtime import of contracts pulls zod in with it (the #1893 reason
|
|
16
|
+
* `routed-node.ts` gives). `test/scope-sweeper.test.ts` holds it to the schemas.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SWEEPER_ID: RegExp;
|
|
11
19
|
/**
|
|
12
20
|
* What one scope-local pass did. `scopes` is the roster size at the start of the
|
|
13
21
|
* pass — every entry is visited; `schedules.scopes` keeps the kernel report's
|
|
@@ -22,9 +30,16 @@ export interface ScopeSweepReport {
|
|
|
22
30
|
schedules: ScheduleSweepReport;
|
|
23
31
|
/** Present when this deployment opted into driving resumable jobs. */
|
|
24
32
|
jobs?: Pick<JobDriveReport, 'attempted' | 'advanced' | 'completed' | 'retrying' | 'failed'>;
|
|
33
|
+
/**
|
|
34
|
+
* #1713: roster scopes the pass skipped whole because their lifecycle holds them — suspended
|
|
35
|
+
* or archived, or under a suspended or deleting tenant. Nothing ran and nothing moved: their
|
|
36
|
+
* deliveries stay due, their schedules' cadence untouched, their jobs where they were, so the
|
|
37
|
+
* first pass after the scope is live again picks all of it up. Absent on a host that cannot say.
|
|
38
|
+
*/
|
|
39
|
+
held?: number;
|
|
25
40
|
/** Per-unit failures; the pass records and steps over each, never aborts. */
|
|
26
41
|
errors: {
|
|
27
|
-
kind: 'drain' | 'schedule' | 'freshness' | 'job';
|
|
42
|
+
kind: 'drain' | 'schedule' | 'freshness' | 'job' | 'lifecycle';
|
|
28
43
|
id: string;
|
|
29
44
|
error: string;
|
|
30
45
|
}[];
|
|
@@ -35,13 +50,20 @@ export type ScopeSweepOutcome = ScopeSweepReport | {
|
|
|
35
50
|
};
|
|
36
51
|
/**
|
|
37
52
|
* The slice of `CloudflareScopeHost` a scope-local pass drives — structural, so
|
|
38
|
-
* tests can hand in a fake and the DO depends on no host internals. All
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* (#461);
|
|
53
|
+
* tests can hand in a fake and the DO depends on no host internals. All of it
|
|
54
|
+
* is CP-less-safe: the lifecycle a CP-less host reads is the one the platform
|
|
55
|
+
* delivered to the scope's own storage (#1713), and `runDueSchedules` skips the
|
|
56
|
+
* directory read on a CP-less host (#461); none of it needs a platform actor.
|
|
42
57
|
*/
|
|
43
58
|
export interface ScopeSweepHost {
|
|
44
59
|
drainDue(tenantId: TenantId, scopeId: ScopeId): Promise<ExecutorDrainReport>;
|
|
60
|
+
/**
|
|
61
|
+
* #1713: whether the scope's lifecycle holds its work — the ONE gate a pass asks before any
|
|
62
|
+
* phase, so a held scope is skipped whole rather than refused phase by phase. Optional so a
|
|
63
|
+
* fake host (and a pre-widening deployment) keeps compiling; the host's own entry points hold
|
|
64
|
+
* a scope either way.
|
|
65
|
+
*/
|
|
66
|
+
lifecycleHeld?(scopeId: ScopeId): Promise<boolean>;
|
|
45
67
|
runDueJobs(tenantId: TenantId, scopeId: ScopeId): Promise<JobDriveReport>;
|
|
46
68
|
registeredSchedules(): ScheduleRegistration[];
|
|
47
69
|
runDueSchedules(moduleId: ScheduleRegistration['moduleId'], tenantId: TenantId, scopeId: ScopeId): Promise<ScheduleRunReport>;
|
|
@@ -149,7 +171,11 @@ export interface ScopeSweeperDo {
|
|
|
149
171
|
* while the roster is non-empty, so a deployment with no scopes costs nothing —
|
|
150
172
|
* `noteScope` (re)arms when the first scope arrives.
|
|
151
173
|
*
|
|
152
|
-
*
|
|
174
|
+
* A pushed vertical rarely calls this itself any more (#1902): the uploader supplies a
|
|
175
|
+
* sweeper built from it — `SweeperDO` bound as `SWEEPER`, its host the one the vertical's
|
|
176
|
+
* `mountPlatformSurface` registers — to a version that declares schedules and exports none.
|
|
177
|
+
* Wire one by hand to change what the platform's does (`runJobs`, `startJobs`, a different
|
|
178
|
+
* interval), or for a deployment not pushed through the platform:
|
|
153
179
|
*
|
|
154
180
|
* ```ts
|
|
155
181
|
* export const SweeperDO = defineScopeSweeperDO<Env>({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-sweeper-do.d.ts","sourceRoot":"","sources":["../src/scope-sweeper-do.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"scope-sweeper-do.d.ts","sourceRoot":"","sources":["../src/scope-sweeper-do.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,QAA6B,CAAC;AAarD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,WAAW,EAAE,mBAAmB,CAAC;IACjC,4EAA4E;IAC5E,SAAS,EAAE,mBAAmB,CAAC;IAC/B,sEAAsE;IACtE,IAAI,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC,CAAC;IAC5F;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,MAAM,EAAE;QAAE,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,WAAW,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACzG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
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DurableObject } from 'cloudflare:workers';
|
|
2
|
-
import { scopeId as scopeIdSchema, tenantId as tenantIdSchema } from '@substrat-run/contracts';
|
|
3
2
|
/**
|
|
4
3
|
* The singleton's name: every caller reaches the ONE scope sweeper via
|
|
5
4
|
* `env.SWEEPER.get(env.SWEEPER.idFromName(SCOPE_SWEEPER_NAME))` — one roster,
|
|
@@ -7,6 +6,20 @@ import { scopeId as scopeIdSchema, tenantId as tenantIdSchema } from '@substrat-
|
|
|
7
6
|
* `PLATFORM_SWEEPER_NAME` gives the directory-backed trigger.
|
|
8
7
|
*/
|
|
9
8
|
export const SCOPE_SWEEPER_NAME = 'scope-sweeper';
|
|
9
|
+
/**
|
|
10
|
+
* A tenant or scope id: a ULID, exactly what `@substrat-run/contracts`' `tenantId` and
|
|
11
|
+
* `scopeId` schemas accept. Checked with the pattern rather than through those schemas since
|
|
12
|
+
* #1902, because this file is bundled into the sweeper the platform supplies to every upload
|
|
13
|
+
* that needs one, and a runtime import of contracts pulls zod in with it (the #1893 reason
|
|
14
|
+
* `routed-node.ts` gives). `test/scope-sweeper.test.ts` holds it to the schemas.
|
|
15
|
+
*/
|
|
16
|
+
export const SWEEPER_ID = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
|
17
|
+
function parseId(value, what) {
|
|
18
|
+
if (typeof value !== 'string' || !SWEEPER_ID.test(value)) {
|
|
19
|
+
throw new TypeError(`${what} must be a ULID, got ${JSON.stringify(value)}`);
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
10
23
|
/** Roster keys in the sweeper's own storage: `scope:<scopeId>` → tenantId. */
|
|
11
24
|
const ROSTER_PREFIX = 'scope:';
|
|
12
25
|
const JOB_START_PREFIX = 'job-start:';
|
|
@@ -40,7 +53,11 @@ const JOB_START_PREFIX = 'job-start:';
|
|
|
40
53
|
* while the roster is non-empty, so a deployment with no scopes costs nothing —
|
|
41
54
|
* `noteScope` (re)arms when the first scope arrives.
|
|
42
55
|
*
|
|
43
|
-
*
|
|
56
|
+
* A pushed vertical rarely calls this itself any more (#1902): the uploader supplies a
|
|
57
|
+
* sweeper built from it — `SweeperDO` bound as `SWEEPER`, its host the one the vertical's
|
|
58
|
+
* `mountPlatformSurface` registers — to a version that declares schedules and exports none.
|
|
59
|
+
* Wire one by hand to change what the platform's does (`runJobs`, `startJobs`, a different
|
|
60
|
+
* interval), or for a deployment not pushed through the platform:
|
|
44
61
|
*
|
|
45
62
|
* ```ts
|
|
46
63
|
* export const SweeperDO = defineScopeSweeperDO<Env>({
|
|
@@ -59,14 +76,14 @@ export function defineScopeSweeperDO(config) {
|
|
|
59
76
|
async noteScope(tenantId, scopeId) {
|
|
60
77
|
// Parse, don't trust: RPC delivers plain strings; a malformed id must fail
|
|
61
78
|
// loudly here, not surface as a stuck roster entry that never sweeps.
|
|
62
|
-
const t =
|
|
63
|
-
const s =
|
|
79
|
+
const t = parseId(tenantId, 'tenantId');
|
|
80
|
+
const s = parseId(scopeId, 'scopeId');
|
|
64
81
|
await this.ctx.storage.put(`${ROSTER_PREFIX}${s}`, t);
|
|
65
82
|
await this.ensureArmed();
|
|
66
83
|
return { scopes: await this.#rosterSize() };
|
|
67
84
|
}
|
|
68
85
|
async forgetScope(scopeId) {
|
|
69
|
-
const s =
|
|
86
|
+
const s = parseId(scopeId, 'scopeId');
|
|
70
87
|
await this.ctx.storage.delete([`${ROSTER_PREFIX}${s}`, `${JOB_START_PREFIX}${s}`]);
|
|
71
88
|
// The alarm is left as-is: an empty-roster pass simply does not re-arm.
|
|
72
89
|
return { scopes: await this.#rosterSize() };
|
|
@@ -146,6 +163,19 @@ export function defineScopeSweeperDO(config) {
|
|
|
146
163
|
const worker = async () => {
|
|
147
164
|
while (next < entries.length) {
|
|
148
165
|
const { tenantId, scopeId } = entries[next++];
|
|
166
|
+
if (host.lifecycleHeld) {
|
|
167
|
+
try {
|
|
168
|
+
if (await host.lifecycleHeld(scopeId)) {
|
|
169
|
+
report.held = (report.held ?? 0) + 1;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (err) {
|
|
174
|
+
// Unread is not live: a scope whose hold cannot be read runs nothing this pass.
|
|
175
|
+
report.errors.push({ kind: 'lifecycle', id: scopeId, error: message(err) });
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
149
179
|
if (config.drainRetries !== false) {
|
|
150
180
|
try {
|
|
151
181
|
const r = await host.drainDue(tenantId, scopeId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-sweeper-do.js","sourceRoot":"","sources":["../src/scope-sweeper-do.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"scope-sweeper-do.js","sourceRoot":"","sources":["../src/scope-sweeper-do.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAYnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,0BAA0B,CAAC;AAErD,SAAS,OAAO,CAAmB,KAAc,EAAE,IAAY;IAC7D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,wBAAwB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,KAAU,CAAC;AACpB,CAAC;AAED,8EAA8E;AAC9E,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,gBAAgB,GAAG,YAAY,CAAC;AA+HtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,M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|
+
"version": "0.136.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.
|
|
30
|
-
"@substrat-run/kernel": "^0.
|
|
29
|
+
"@substrat-run/contracts": "^0.136.0",
|
|
30
|
+
"@substrat-run/kernel": "^0.136.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@cloudflare/vitest-pool-workers": "^0.12.21",
|
|
@@ -36,11 +36,12 @@
|
|
|
36
36
|
"typescript": "^7.0.0",
|
|
37
37
|
"vitest": "^3.2.7",
|
|
38
38
|
"wrangler": "^4.139.0",
|
|
39
|
-
"@substrat-run/
|
|
40
|
-
"@substrat-run/
|
|
41
|
-
"@substrat-run/
|
|
42
|
-
"@substrat-run/
|
|
43
|
-
"@substrat-run/vertical-host": "^0.
|
|
39
|
+
"@substrat-run/attachment-extractors": "^0.1.2",
|
|
40
|
+
"@substrat-run/cli": "^0.40.0",
|
|
41
|
+
"@substrat-run/contract-tests": "^0.136.0",
|
|
42
|
+
"@substrat-run/control-plane-api": "^0.136.0",
|
|
43
|
+
"@substrat-run/vertical-host": "^0.136.0",
|
|
44
|
+
"@substrat-run/vertical-auth": "^0.18.5"
|
|
44
45
|
},
|
|
45
46
|
"publishConfig": {
|
|
46
47
|
"access": "public"
|
|
@@ -48,6 +49,6 @@
|
|
|
48
49
|
"scripts": {
|
|
49
50
|
"build": "tsc -p tsconfig.json",
|
|
50
51
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit",
|
|
51
|
-
"test": "vitest run"
|
|
52
|
+
"test": "vitest run && vitest run -c vitest.supplied-sweeper.config.ts"
|
|
52
53
|
}
|
|
53
54
|
}
|