@substrat-run/adapter-cloudflare 0.240.0 → 0.242.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/connection-sweep-do.d.ts +12 -0
- package/dist/connection-sweep-do.d.ts.map +1 -1
- package/dist/connection-sweep-do.js +28 -6
- package/dist/connection-sweep-do.js.map +1 -1
- package/dist/control-plane-do.d.ts +22 -0
- package/dist/control-plane-do.d.ts.map +1 -1
- package/dist/control-plane-do.js +60 -13
- package/dist/control-plane-do.js.map +1 -1
- package/dist/control-plane-object.d.ts +23 -0
- package/dist/control-plane-object.d.ts.map +1 -0
- package/dist/control-plane-object.js +92 -0
- package/dist/control-plane-object.js.map +1 -0
- package/dist/delivery-broker-supervisor-do.d.ts +19 -0
- package/dist/delivery-broker-supervisor-do.d.ts.map +1 -1
- package/dist/delivery-broker-supervisor-do.js +27 -0
- package/dist/delivery-broker-supervisor-do.js.map +1 -1
- package/dist/directory-placement.d.ts.map +1 -1
- package/dist/directory-placement.js +7 -0
- package/dist/directory-placement.js.map +1 -1
- package/dist/egress-gate.d.ts +71 -0
- package/dist/egress-gate.d.ts.map +1 -0
- package/dist/egress-gate.js +80 -0
- package/dist/egress-gate.js.map +1 -0
- package/dist/host.d.ts +1058 -18
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +135 -29
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/listed-object.d.ts +24 -0
- package/dist/listed-object.d.ts.map +1 -0
- package/dist/listed-object.js +43 -0
- package/dist/listed-object.js.map +1 -0
- package/dist/peer-read-evidence.d.ts +31 -31
- package/dist/peer-read-evidence.d.ts.map +1 -1
- package/dist/peer-read-evidence.js +75 -0
- package/dist/peer-read-evidence.js.map +1 -1
- package/dist/route-resolver.d.ts +22 -1
- package/dist/route-resolver.d.ts.map +1 -1
- package/dist/route-resolver.js +1 -1
- package/dist/route-resolver.js.map +1 -1
- package/dist/scope-do.d.ts +5 -0
- package/dist/scope-do.d.ts.map +1 -1
- package/dist/scope-do.js +32 -10
- package/dist/scope-do.js.map +1 -1
- package/dist/scope-facets.d.ts +15 -4
- package/dist/scope-facets.d.ts.map +1 -1
- package/dist/scope-facets.js +66 -13
- package/dist/scope-facets.js.map +1 -1
- package/dist/scope-object.d.ts +28 -0
- package/dist/scope-object.d.ts.map +1 -0
- package/dist/scope-object.js +13 -0
- package/dist/scope-object.js.map +1 -0
- package/dist/scope-supervisor-do.d.ts +3 -1
- package/dist/scope-supervisor-do.d.ts.map +1 -1
- package/dist/scope-supervisor-do.js +24 -5
- package/dist/scope-supervisor-do.js.map +1 -1
- package/dist/supplied-pass-box.d.ts +16 -2
- package/dist/supplied-pass-box.d.ts.map +1 -1
- package/dist/supplied-pass-box.js +92 -28
- package/dist/supplied-pass-box.js.map +1 -1
- package/dist/tenant-due-index-do.d.ts +33 -0
- package/dist/tenant-due-index-do.d.ts.map +1 -1
- package/dist/tenant-due-index-do.js +47 -0
- package/dist/tenant-due-index-do.js.map +1 -1
- package/dist/tenant-due-work-do.d.ts +18 -0
- package/dist/tenant-due-work-do.d.ts.map +1 -1
- package/dist/tenant-due-work-do.js +21 -0
- package/dist/tenant-due-work-do.js.map +1 -1
- package/package.json +13 -12
package/dist/scope-do.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-do.d.ts","sourceRoot":"","sources":["../src/scope-do.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EA0CL,KAAK,OAAO,EAiBZ,KAAK,QAAQ,EAsBd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAkEL,KAAK,mBAAmB,EASxB,KAAK,SAAS,EA2Bd,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EAoJtB,MAAM,sBAAsB,CAAC;AAuD9B,OAAO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KEY, provisionedParent, operationNotInScopeType, provisionedScopeType, scopeTypePlanOf, scopeTypeRoleRefusal, scopeTypeRuns, listQuery, cursorOf, searchLimit, searchMatchExpression, searchQuery, ATTACHMENT_TEXT_DDL, ATTACHMENT_BYTES_SQL, ATTACHMENT_CONDEMNED_DDL, ATTACHMENT_SWEEP_LICENCE_DDL, ATTACHMENT_SWEEP_LICENCE_TABLE, WIRE_NONCE_DDL, WIRE_NONCE_FULL, claimWireNonceIn, isWireNonceTable, isWireNonceWrite, clearOrphanSweepLicence, condemnLicensedOrphanAttachments, consumeOrphanSweepLicence, licensedOrphanIds, recordOrphanSweepLicence, refuseUnlicensedOrphanSweep, refuseCondemnedAttachment, refuseCondemnedInDump, rowlessAttachmentIds, attachmentRecordOfRow, enqueueAttachmentText, reconcileAttachmentText, queueAttachmentTextBackfill, startAttachmentTextBackfill, readAttachmentTextRecheckPage, requeueUnsupportedAttachmentText, startAttachmentTextRecheck, recordAttachmentText, searchAttachments, IDEMPOTENCY_DDL, REFUSALS_TABLE_DDL, REFUSALS_INDEX, refusalInsert, refusalOf, markGuardRefusal, REFUSALS_REBUILD, refusalsAdmitGuards, assertIdempotencyKey, assertPermissionKey, idempotencyLookupQuery, idempotencyPruneStatement, idempotencyRecordStatement, idempotencyOptedOutMessage, replayFor, entityVersionQuery, entityVersionOf, assertIfMatch, OUTBOX_ENTITY_INDEX, SCHEDULE_STATE_DDL, SCHEDULE_STATE_REBUILD, scheduleStateHasKind, VERTICAL_EVENTS_DDL, EXPORT_HOPS_SQL, emptyImportResult, IMPORT_CURSORS_SQL, IMPORT_CURSOR_OF_SQL, OUTBOX_MARK_SQL, exportedSinceQuery, emittedSinceQuery, emittedReportOf, EMITTED_REPORT_CAP, noteTransitionInto, withTransitions, IMPORT_CURSOR_ADVANCE_SQL, IMPORT_RECORD_SQL, moveImportCursor, CrossVerticalRegistry, exportReadPlan, exportReadQuery, planExportBatch, withheldNote, JOB_RUN_DDL, JOB_RUN_DUE_AT, jobRunListLimit, SYSTEM_DOOR_WAIT, ancestorsWithin, } from '@substrat-run/kernel';
|
|
11
11
|
import { isUpgradeRequest, readSubscription, LIVE_DECIDE_ATTEMPTS, LIVE_FANOUT_LIMIT, LIVE_PRINCIPAL_HEADER, LIVE_SCOPE_HEADER, LIVE_SUBSCRIBE_PATH, LIVE_TENANT_HEADER, LIVE_WITHIN_HEADER, LIVE_EXPIRES_HEADER, LIVE_CLOSE, LIVE_SOCKETS_PER_PRINCIPAL, decodeLiveWithin, liveInstant, liveRefusal, liveRefusalStatus, } from './live-reads.js';
|
|
12
12
|
import { replyOf } from './do-reply.js';
|
|
13
|
-
import {
|
|
13
|
+
import { listedScopeObject } from './scope-object.js';
|
|
14
|
+
import { assertNotSupervised, HOLDS_DATA_TABLES, SCOPE_RPC, SUPERVISOR_OWNED_METHODS, } from './scope-facets.js';
|
|
14
15
|
import { OperationQueue } from './serialization.js';
|
|
15
16
|
import { reconcileOnWake } from './reconcile-on-wake.js';
|
|
16
17
|
import { meterScopeWorkEntries, ScopeWorkMeter } from './scope-work.js';
|
|
@@ -935,11 +936,17 @@ function liveTargetOfSocket(ws, since) {
|
|
|
935
936
|
};
|
|
936
937
|
}
|
|
937
938
|
/**
|
|
938
|
-
* Track B: is `name` a method of the
|
|
939
|
-
* facet's `supervisedCall`
|
|
939
|
+
* Track B (#3466): is `name` a method a subclass of the platform's scope class adds (a fixture's
|
|
940
|
+
* probe), found below `base`? What a facet's `supervisedCall` runs besides the listed RPC surface:
|
|
941
|
+
* never a member of the platform class itself, so none of its private helpers, never an owned door,
|
|
942
|
+
* never an `Object.prototype` member, never a field. As the broker facet's `addedBelow`.
|
|
940
943
|
*/
|
|
941
|
-
function
|
|
942
|
-
|
|
944
|
+
function addedBelow(object, name, base) {
|
|
945
|
+
if (SUPERVISOR_OWNED_METHODS.has(name))
|
|
946
|
+
return false;
|
|
947
|
+
for (let p = Object.getPrototypeOf(object); p !== null && p !== base; p = Object.getPrototypeOf(p)) {
|
|
948
|
+
if (p === Object.prototype)
|
|
949
|
+
return false;
|
|
943
950
|
const d = Object.getOwnPropertyDescriptor(p, name);
|
|
944
951
|
if (d)
|
|
945
952
|
return typeof d.value === 'function';
|
|
@@ -960,9 +967,16 @@ export function defineScopeDO(modules, bareOps,
|
|
|
960
967
|
* #2430: `permissions` is the vertical's `definePermissions(...)` value, the one `substrat push`
|
|
961
968
|
* and `lint:permissions` read. Given, a module in `modules` that its list leaves out is refused
|
|
962
969
|
* when the class is defined, as `registerModule` refuses one on either host.
|
|
970
|
+
*
|
|
971
|
+
* #3466: `rpc: 'listed'` serves the scope behind a prototype holding only its listed RPC surface
|
|
972
|
+
* and the runtime's hooks (`listedScopeObject`), so none of the class's internal helpers is RPC.
|
|
973
|
+
* Opt-in: absent, the class is returned as before.
|
|
963
974
|
*/
|
|
964
975
|
options = {}) {
|
|
965
|
-
|
|
976
|
+
if (options.rpc !== undefined && options.rpc !== 'listed')
|
|
977
|
+
throw new Error(`defineScopeDO: unknown rpc '${String(options.rpc)}'`);
|
|
978
|
+
const Scope = scopeClass(modules, bareOps, options, 'object');
|
|
979
|
+
return options.rpc === 'listed' ? listedScopeObject(Scope) : Scope;
|
|
966
980
|
}
|
|
967
981
|
/**
|
|
968
982
|
* Track B (broker RFC §6, #3466): the same scope class, to run as a FACET a scope supervisor
|
|
@@ -3216,16 +3230,20 @@ function scopeClass(modules, bareOps, options, runtime) {
|
|
|
3216
3230
|
/**
|
|
3217
3231
|
* Track B: one call from the supervisor, by name, with the wake the call asked for and the
|
|
3218
3232
|
* scope's tenant beside its value. The supervisor arms its own alarm from the first and names
|
|
3219
|
-
* the facet's isolate from the second. What it forwards is the supervisor's decision,
|
|
3220
|
-
*
|
|
3221
|
-
*
|
|
3233
|
+
* the facet's isolate from the second. What it forwards is the supervisor's decision; here, the
|
|
3234
|
+
* same written surface is checked again (#3466): the alarm, the admission, the class's listed RPC
|
|
3235
|
+
* methods (`SCOPE_RPC_METHODS`), and a method a subclass adds below this class (a fixture's
|
|
3236
|
+
* probe, forwarded only when the supervisor is told to). Never one of this class's private
|
|
3237
|
+
* helpers, which are functions on the prototype all the same.
|
|
3222
3238
|
*
|
|
3223
3239
|
* A call that throws carries no wake: the supervisor keeps the alarm it armed before the call,
|
|
3224
3240
|
* and the wake stays here for the next call to carry.
|
|
3225
3241
|
*/
|
|
3226
3242
|
async supervisedCall(method, args, platform) {
|
|
3227
3243
|
this.assertFacet('supervisedCall');
|
|
3228
|
-
const callable = method === 'alarm' ||
|
|
3244
|
+
const callable = method === 'alarm' ||
|
|
3245
|
+
method === 'liveAdmit' ||
|
|
3246
|
+
(typeof method === 'string' && (SCOPE_RPC.has(method) || addedBelow(this, method, ScopeDO.prototype)));
|
|
3229
3247
|
const fn = callable ? this[method] : undefined;
|
|
3230
3248
|
if (typeof fn !== 'function')
|
|
3231
3249
|
throw new Error(`scope facet: no forwarded method '${String(method)}'`);
|
|
@@ -9993,6 +10011,10 @@ function scopeClass(modules, bareOps, options, runtime) {
|
|
|
9993
10011
|
return purges?.has(String(args[0])) ? 'purge' : 'schedule';
|
|
9994
10012
|
},
|
|
9995
10013
|
}, (self) => self.scopeWorkTrigger());
|
|
10014
|
+
// #3466: the supervisor's written RPC surface (`SCOPE_RPC_METHODS`) is exactly this class's public
|
|
10015
|
+
// methods, both ways. `keyof` never names a private member, so none can be listed; a public method
|
|
10016
|
+
// added here and not listed (or owned) fails this line, naming it.
|
|
10017
|
+
void null;
|
|
9996
10018
|
return ScopeDO;
|
|
9997
10019
|
}
|
|
9998
10020
|
//# sourceMappingURL=scope-do.js.map
|