@effect-agent/storage-cloudflare 0.1.0-beta.45 → 0.1.0-beta.47
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/DoMemoryStore.d.mts +24 -0
- package/dist/DoMemoryStore.mjs +50 -0
- package/dist/DoMemoryStore.mjs.map +1 -0
- package/dist/DoScheduleStore.d.mts +36 -0
- package/dist/DoScheduleStore.mjs +369 -0
- package/dist/DoScheduleStore.mjs.map +1 -0
- package/dist/DoStorageConfig.d.mts +45 -0
- package/dist/DoStorageConfig.mjs +52 -0
- package/dist/DoStorageConfig.mjs.map +1 -0
- package/dist/{do-storage-failpoint-9XB9tuif.d.mts → DoStorageError-Qwybzk0O.d.mts} +6 -15
- package/dist/DoStorageError.d.mts +2 -0
- package/dist/DoStorageError.mjs +158 -0
- package/dist/DoStorageError.mjs.map +1 -0
- package/dist/DoStorageFailpoint.d.mts +17 -0
- package/dist/{do-storage-failpoint-C-Qtchs7.mjs → DoStorageFailpoint.mjs} +5 -3
- package/dist/DoStorageFailpoint.mjs.map +1 -0
- package/dist/{testing.d.mts → DoStorageFailpointTesting.d.mts} +4 -3
- package/dist/{testing.mjs → DoStorageFailpointTesting.mjs} +3 -3
- package/dist/DoStorageFailpointTesting.mjs.map +1 -0
- package/dist/DoStorageVersion-KrYUXqeJ.d.mts +10 -0
- package/dist/DoStorageVersion.d.mts +2 -0
- package/dist/DoStorageVersion.mjs +8 -0
- package/dist/DoStorageVersion.mjs.map +1 -0
- package/dist/DoSubmissionLedger.d.mts +23 -0
- package/dist/DoSubmissionLedger.mjs +1716 -0
- package/dist/DoSubmissionLedger.mjs.map +1 -0
- package/dist/DoSubscriptionStore.d.mts +25 -0
- package/dist/DoSubscriptionStore.mjs +720 -0
- package/dist/DoSubscriptionStore.mjs.map +1 -0
- package/dist/DoThreadStore-D9ebIYPv.mjs +1083 -0
- package/dist/DoThreadStore-D9ebIYPv.mjs.map +1 -0
- package/dist/DoThreadStore.d.mts +59 -0
- package/dist/DoThreadStore.mjs +5 -0
- package/dist/MemoryProtocol.d.mts +19796 -0
- package/dist/MemoryProtocol.mjs +182 -0
- package/dist/MemoryProtocol.mjs.map +1 -0
- package/dist/PortProtocol.d.mts +1587 -0
- package/dist/PortProtocol.mjs +175 -0
- package/dist/PortProtocol.mjs.map +1 -0
- package/dist/PortRouting.d.mts +82 -0
- package/dist/PortRouting.mjs +404 -0
- package/dist/PortRouting.mjs.map +1 -0
- package/dist/index.d.mts +13 -21619
- package/dist/index.mjs +13 -4954
- package/dist/migrations-Bo4GU-pp.mjs +236 -0
- package/dist/migrations-Bo4GU-pp.mjs.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/package.json +1 -1
- package/src/{do-memory-store.ts → DoMemoryStore.ts} +5 -2
- package/src/{do-schedule-store.ts → DoScheduleStore.ts} +6 -4
- package/src/{errors.ts → DoStorageError.ts} +1 -1
- package/src/{do-storage-failpoint.ts → DoStorageFailpoint.ts} +1 -1
- package/src/{do-storage-failpoint-testing.ts → DoStorageFailpointTesting.ts} +2 -2
- package/src/DoStorageVersion.ts +2 -0
- package/src/{do-ledger.ts → DoSubmissionLedger.ts} +22 -20
- package/src/{do-subscription-store.ts → DoSubscriptionStore.ts} +10 -8
- package/src/{do-thread-store.ts → DoThreadStore.ts} +19 -21
- package/src/{memory-protocol.ts → MemoryProtocol.ts} +15 -10
- package/src/{port-protocol.ts → PortProtocol.ts} +13 -11
- package/src/{routing.ts → PortRouting.ts} +10 -8
- package/src/index.ts +12 -36
- package/src/{do-journal.ts → internal/do-journal.ts} +2 -2
- package/dist/do-storage-failpoint-C-Qtchs7.mjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/testing.mjs.map +0 -1
- package/src/testing.ts +0 -2
- /package/src/{do-storage-config.ts → DoStorageConfig.ts} +0 -0
- /package/src/{migrations.ts → internal/migrations.ts} +0 -0
package/dist/testing.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","names":[],"sources":["../src/do-storage-failpoint-testing.ts"],"sourcesContent":["import { Context, Effect, Layer, Ref } from \"effect\";\n\nimport { DoStorageFailpoint, type DoStorageFailpointHandler } from \"./do-storage-failpoint.ts\";\nimport type { DoStorageFailpointLocation } from \"./errors.ts\";\n\nconst noFailpoint: DoStorageFailpointHandler = () => Effect.void;\n\n/** Test-only control for replacing the active Durable Object failpoint handler. */\nexport class DoStorageFailpointTestControl extends Context.Service<\n DoStorageFailpointTestControl,\n {\n readonly clear: Effect.Effect<void>;\n readonly setHandler: (handler: DoStorageFailpointHandler) => Effect.Effect<void>;\n }\n>()(\"@effect-agent/storage-cloudflare/DoStorageFailpointTestControl\") {\n /** Reusable test Layer with a control service backed by the same handler Ref. */\n static readonly layer = Layer.effectContext(\n Effect.gen(function* () {\n const handler = yield* Ref.make<DoStorageFailpointHandler>(noFailpoint);\n\n return Context.make(\n DoStorageFailpoint,\n DoStorageFailpoint.of({\n hit: (location) => Ref.get(handler).pipe(Effect.flatMap((current) => current(location))),\n }),\n ).pipe(\n Context.add(\n DoStorageFailpointTestControl,\n DoStorageFailpointTestControl.of({\n clear: Ref.set(handler, noFailpoint),\n setHandler: (next) => Ref.set(handler, next),\n }),\n ),\n );\n }),\n );\n}\n\n/**\n * The DC-specific eviction failpoint mode: instead of failing typed, an armed hit evicts the\n * Durable Object through an injected `evict` thunk — in production-shaped harnesses that thunk\n * is `() => ctx.abort()`, the platform's real failure mode. `ctx.abort()` never returns (it\n * throws while destroying the in-memory instance and every in-flight implicit or explicit\n * storage transaction rolls back), so an armed hit ends the current Attempt exactly like an\n * unannounced platform eviction; DO storage — the only correctness-critical state — survives\n * for the next incarnation, which the persisted alarm wakes without any incoming request.\n *\n * The handles stay injected: this package never imports `cloudflare:workers`, so the harness\n * that owns a `DurableObjectState` supplies the thunk.\n */\nexport const evictionFailpointHandler =\n (options: {\n readonly isArmed: (location: DoStorageFailpointLocation) => Effect.Effect<boolean>;\n /** Kills the incarnation — e.g. `() => ctx.abort()`. Typed `void` because the platform\n * declares `abort` as returning, but it throws while destroying the instance. */\n readonly evict: (location: DoStorageFailpointLocation) => void;\n }): DoStorageFailpointHandler =>\n (location) =>\n options.isArmed(location).pipe(\n Effect.flatMap((armed) =>\n armed\n ? // `ctx.abort()` throws while destroying the instance; that throw surfaces as a\n // defect in the (already dying) incarnation. The defensive throw below keeps the\n // guarantee — nothing after an armed hit may observe in-memory state — even if a\n // harness supplies an evict thunk that returns.\n Effect.sync((): never => {\n options.evict(location);\n throw new Error(\n `Durable Object eviction did not interrupt execution at ${location}.`,\n );\n })\n : Effect.void,\n ),\n );\n"],"mappings":";;;AAKA,MAAM,oBAA+C,OAAO;;AAG5D,IAAa,gCAAb,MAAa,sCAAsC,QAAQ,QAMzD,CAAC,CAAC,gEAAgE,CAAC,CAAC;;CAEpE,OAAgB,QAAQ,MAAM,cAC5B,OAAO,IAAI,aAAa;EACtB,MAAM,UAAU,OAAO,IAAI,KAAgC,WAAW;EAEtE,OAAO,QAAQ,KACb,oBACA,mBAAmB,GAAG,EACpB,MAAM,aAAa,IAAI,IAAI,OAAO,CAAC,CAAC,KAAK,OAAO,SAAS,YAAY,QAAQ,QAAQ,CAAC,CAAC,EACzF,CAAC,CACH,CAAC,CAAC,KACA,QAAQ,IACN,+BACA,8BAA8B,GAAG;GAC/B,OAAO,IAAI,IAAI,SAAS,WAAW;GACnC,aAAa,SAAS,IAAI,IAAI,SAAS,IAAI;EAC7C,CAAC,CACH,CACF;CACF,CAAC,CACH;AACF;;;;;;;;;;;;;AAcA,MAAa,4BACV,aAMA,aACC,QAAQ,QAAQ,QAAQ,CAAC,CAAC,KACxB,OAAO,SAAS,UACd,QAKI,OAAO,WAAkB;CACvB,QAAQ,MAAM,QAAQ;CACtB,MAAM,IAAI,MACR,0DAA0D,SAAS,EACrE;AACF,CAAC,IACD,OAAO,IACb,CACF"}
|
package/src/testing.ts
DELETED
|
File without changes
|
|
File without changes
|