@entifix/transactions 0.14.0 → 0.15.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/README.md +6 -6
- package/dist/engine/index.d.ts +2 -9
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +3 -10
- package/dist/engine/index.js.map +1 -1
- package/dist/index.d.ts +0 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -14
- package/dist/index.js.map +1 -1
- package/dist/ports/participant-client.d.ts +7 -2
- package/dist/ports/participant-client.d.ts.map +1 -1
- package/dist/ports/participant-client.js.map +1 -1
- package/package.json +4 -4
- package/dist/contracts/command.d.ts +0 -59
- package/dist/contracts/command.d.ts.map +0 -1
- package/dist/contracts/command.js +0 -46
- package/dist/contracts/command.js.map +0 -1
- package/dist/contracts/event.d.ts +0 -85
- package/dist/contracts/event.d.ts.map +0 -1
- package/dist/contracts/event.js +0 -81
- package/dist/contracts/event.js.map +0 -1
- package/dist/contracts/messages.d.ts +0 -37
- package/dist/contracts/messages.d.ts.map +0 -1
- package/dist/contracts/messages.js +0 -68
- package/dist/contracts/messages.js.map +0 -1
- package/dist/contracts/record.d.ts +0 -106
- package/dist/contracts/record.d.ts.map +0 -1
- package/dist/contracts/record.js +0 -27
- package/dist/contracts/record.js.map +0 -1
- package/dist/contracts/saga-definition.d.ts +0 -181
- package/dist/contracts/saga-definition.d.ts.map +0 -1
- package/dist/contracts/saga-definition.js +0 -101
- package/dist/contracts/saga-definition.js.map +0 -1
- package/dist/engine/local-saga-dispatcher.d.ts +0 -35
- package/dist/engine/local-saga-dispatcher.d.ts.map +0 -1
- package/dist/engine/local-saga-dispatcher.js +0 -28
- package/dist/engine/local-saga-dispatcher.js.map +0 -1
- package/dist/engine/resolve-template.d.ts +0 -48
- package/dist/engine/resolve-template.d.ts.map +0 -1
- package/dist/engine/resolve-template.js +0 -95
- package/dist/engine/resolve-template.js.map +0 -1
- package/dist/engine/resume-sweep.d.ts +0 -46
- package/dist/engine/resume-sweep.d.ts.map +0 -1
- package/dist/engine/resume-sweep.js +0 -74
- package/dist/engine/resume-sweep.js.map +0 -1
- package/dist/engine/run-saga.d.ts +0 -54
- package/dist/engine/run-saga.d.ts.map +0 -1
- package/dist/engine/run-saga.js +0 -463
- package/dist/engine/run-saga.js.map +0 -1
- package/dist/engine/run-transaction.d.ts +0 -55
- package/dist/engine/run-transaction.d.ts.map +0 -1
- package/dist/engine/run-transaction.js +0 -101
- package/dist/engine/run-transaction.js.map +0 -1
- package/dist/mixins/transaction-mixins.d.ts +0 -20
- package/dist/mixins/transaction-mixins.d.ts.map +0 -1
- package/dist/mixins/transaction-mixins.js +0 -13
- package/dist/mixins/transaction-mixins.js.map +0 -1
- package/dist/ports/lock-service.d.ts +0 -24
- package/dist/ports/lock-service.d.ts.map +0 -1
- package/dist/ports/lock-service.js +0 -5
- package/dist/ports/lock-service.js.map +0 -1
- package/dist/ports/saga-dispatcher.d.ts +0 -46
- package/dist/ports/saga-dispatcher.d.ts.map +0 -1
- package/dist/ports/saga-dispatcher.js +0 -5
- package/dist/ports/saga-dispatcher.js.map +0 -1
- package/dist/ports/saga-store.d.ts +0 -96
- package/dist/ports/saga-store.d.ts.map +0 -1
- package/dist/ports/saga-store.js +0 -19
- package/dist/ports/saga-store.js.map +0 -1
- package/dist/ports/sequence-service.d.ts +0 -17
- package/dist/ports/sequence-service.d.ts.map +0 -1
- package/dist/ports/sequence-service.js +0 -5
- package/dist/ports/sequence-service.js.map +0 -1
- package/dist/ports/transaction-handler.d.ts +0 -66
- package/dist/ports/transaction-handler.d.ts.map +0 -1
- package/dist/ports/transaction-handler.js +0 -5
- package/dist/ports/transaction-handler.js.map +0 -1
- package/dist/ports/transaction-sink.d.ts +0 -120
- package/dist/ports/transaction-sink.d.ts.map +0 -1
- package/dist/ports/transaction-sink.js +0 -28
- package/dist/ports/transaction-sink.js.map +0 -1
- package/dist/ports/transaction-stream-hub.d.ts +0 -28
- package/dist/ports/transaction-stream-hub.d.ts.map +0 -1
- package/dist/ports/transaction-stream-hub.js +0 -5
- package/dist/ports/transaction-stream-hub.js.map +0 -1
- package/dist/stream/transaction-stream-hub.d.ts +0 -18
- package/dist/stream/transaction-stream-hub.d.ts.map +0 -1
- package/dist/stream/transaction-stream-hub.js +0 -50
- package/dist/stream/transaction-stream-hub.js.map +0 -1
- package/dist/use-case/facade.uc.d.ts +0 -22
- package/dist/use-case/facade.uc.d.ts.map +0 -1
- package/dist/use-case/facade.uc.js +0 -55
- package/dist/use-case/facade.uc.js.map +0 -1
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { Context } from 'effect';
|
|
2
|
-
/**
|
|
3
|
-
* A write the browser has started and the server has not finished.
|
|
4
|
-
*
|
|
5
|
-
* The `transactionId` is also the stored entity's id — the client's minted id
|
|
6
|
-
* is the primary key — so this is enough to find the record
|
|
7
|
-
* later without holding a copy of it.
|
|
8
|
-
*/
|
|
9
|
-
export interface PendingTransaction {
|
|
10
|
-
readonly transactionId: string;
|
|
11
|
-
/** The target entity's `key`, so a settle knows which query scope to refresh. */
|
|
12
|
-
readonly entity: string;
|
|
13
|
-
/** ISO-8601, when the `202` came back. Drives the oldest-first eviction. */
|
|
14
|
-
readonly at: string;
|
|
15
|
-
}
|
|
16
|
-
/** A pending write, plus what reconciliation has since learned about it. */
|
|
17
|
-
export type PendingEntry = PendingTransaction & {
|
|
18
|
-
readonly state: 'pending' | 'failed';
|
|
19
|
-
/**
|
|
20
|
-
* The record as the browser holds it, so a list can show it before the server
|
|
21
|
-
* has one.
|
|
22
|
-
*
|
|
23
|
-
* ⚠️ **In memory only — never persisted.** The store's `partialize` strips it,
|
|
24
|
-
* for the reason an autosaved draft gives: a class instance does not survive
|
|
25
|
-
* a JSON round trip,
|
|
26
|
-
* it comes back as something else. So a refresh keeps the *watch* and loses
|
|
27
|
-
* the row, which is the documented behaviour — past a refresh, server truth
|
|
28
|
-
* plus an honest notice beats a record rebuilt from a blob.
|
|
29
|
-
*
|
|
30
|
-
* Typed `unknown` because this package must not care what an entity is; the
|
|
31
|
-
* shell that put it here is the only thing that reads it back.
|
|
32
|
-
*/
|
|
33
|
-
readonly record?: unknown;
|
|
34
|
-
/**
|
|
35
|
-
* Free text from whatever threw, in whatever language it was written in.
|
|
36
|
-
*
|
|
37
|
-
* ⚠️ Diagnostic only — never the headline of anything a user reads. A
|
|
38
|
-
* transaction's failure carries no error *code*, so the message shown has to
|
|
39
|
-
* be a catalog key and this is the detail beside it.
|
|
40
|
-
*/
|
|
41
|
-
readonly reason?: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* How a transactional write announces itself to whoever is watching.
|
|
45
|
-
*
|
|
46
|
-
* The save adapter is the only place that knows a create went out as a command
|
|
47
|
-
* rather than as a plain `POST`, and it learns nothing back — the `202`
|
|
48
|
-
* describes a transaction, not an entity. So it tells this port, and the browser
|
|
49
|
-
* takes it from there.
|
|
50
|
-
*
|
|
51
|
-
* Framework-free and synchronous on purpose: the implementation is a React store
|
|
52
|
-
* action, and keeping that behind a port is what stops `@entifix/transactions`
|
|
53
|
-
* knowing anything about React or about where the pending set is persisted.
|
|
54
|
-
*/
|
|
55
|
-
export interface TransactionSink {
|
|
56
|
-
began(pending: PendingTransaction): void;
|
|
57
|
-
}
|
|
58
|
-
declare const TransactionSinkTag_base: Context.ServiceClass<TransactionSinkTag, "TransactionSinkTag", TransactionSink>;
|
|
59
|
-
/**
|
|
60
|
-
* ⚠️ Read with `Effect.serviceOption`, never `yield*`.
|
|
61
|
-
*
|
|
62
|
-
* That keeps the tag out of the save adapter's `R`, so the storefront, the plain
|
|
63
|
-
* REST adapters and every existing spec compile and run with no layer to
|
|
64
|
-
* provide — an optional capability must not become a build break for callers
|
|
65
|
-
* that will never want it.
|
|
66
|
-
*
|
|
67
|
-
* The cost of that erasure is that **nothing forces a composition root to
|
|
68
|
-
* provide it**: forget to, and the read returns `None`, everything compiles, and
|
|
69
|
-
* the feature is silently dead. A spec pins the one place that must
|
|
70
|
-
* (`mergeContext`), because an invariant the compiler cannot hold is one a test
|
|
71
|
-
* has to.
|
|
72
|
-
*/
|
|
73
|
-
export declare class TransactionSinkTag extends TransactionSinkTag_base {
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* The sink where nothing is watching — outside a mounted provider, and in every
|
|
77
|
-
* caller that never opted into command creates.
|
|
78
|
-
*
|
|
79
|
-
* A create on a plain route still works exactly as it did; it simply gets no
|
|
80
|
-
* optimistic treatment, which is an honest boundary rather than a write into an
|
|
81
|
-
* unscoped store.
|
|
82
|
-
*/
|
|
83
|
-
export declare const NoopTransactionSink: TransactionSink;
|
|
84
|
-
/**
|
|
85
|
-
* The full view of the pending set, for the side that reconciles it.
|
|
86
|
-
*
|
|
87
|
-
* It extends {@link TransactionSink} because one store is behind both: the
|
|
88
|
-
* adapter needs only `began`, and the settlement side needs to read entries and
|
|
89
|
-
* retire them. Two interfaces rather than one because they are consumed from
|
|
90
|
-
* opposite sides of a tier boundary — a T3 package may not import a T4 shell,
|
|
91
|
-
* so the store is handed in as a prop, the way `EntityDraftStore` already is for
|
|
92
|
-
* autosave.
|
|
93
|
-
*/
|
|
94
|
-
export interface PendingTransactionStore extends TransactionSink {
|
|
95
|
-
readonly entries: readonly PendingEntry[];
|
|
96
|
-
/** The write landed. Drop it; the server's copy is the truth now. */
|
|
97
|
-
settle(transactionId: string): void;
|
|
98
|
-
/**
|
|
99
|
-
* Holds the record the browser already has, so the list can render it while
|
|
100
|
-
* the write is still in flight — and answers whether this id was being
|
|
101
|
-
* watched at all.
|
|
102
|
-
*
|
|
103
|
-
* ⚠️ **The return value is why this is one call and not two.** A caller that
|
|
104
|
-
* asked `entries.some(...)` first would be reading a React render closure
|
|
105
|
-
* captured *before* its own `await`, so the announcement the save adapter made
|
|
106
|
-
* during that await is invisible to it and every transactional write reads as
|
|
107
|
-
* a plain one. Answering from the store's current state is the only version
|
|
108
|
-
* without that race.
|
|
109
|
-
*
|
|
110
|
-
* Separate from `began` because the save adapter announces before it returns
|
|
111
|
-
* and has no reason to know about lists.
|
|
112
|
-
*/
|
|
113
|
-
attach(transactionId: string, record: unknown): boolean;
|
|
114
|
-
/** The write failed terminally. Keep it, marked, until it is dismissed. */
|
|
115
|
-
fail(transactionId: string, reason?: string): void;
|
|
116
|
-
/** The operator has read the failure. */
|
|
117
|
-
dismiss(transactionId: string): void;
|
|
118
|
-
}
|
|
119
|
-
export {};
|
|
120
|
-
//# sourceMappingURL=transaction-sink.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-sink.d.ts","sourceRoot":"","sources":["../../src/ports/transaction-sink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG;IAC9C,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;IACrC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAC1C;;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,kBAAmB,SAAQ,uBAGf;CAAG;AAE5B;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAEjC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,WAAW,uBAAwB,SAAQ,eAAe;IAC9D,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAC1C,qEAAqE;IACrE,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC;IACxD,2EAA2E;IAC3E,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnD,yCAAyC;IACzC,OAAO,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Context } from 'effect';
|
|
2
|
-
/**
|
|
3
|
-
* ⚠️ Read with `Effect.serviceOption`, never `yield*`.
|
|
4
|
-
*
|
|
5
|
-
* That keeps the tag out of the save adapter's `R`, so the storefront, the plain
|
|
6
|
-
* REST adapters and every existing spec compile and run with no layer to
|
|
7
|
-
* provide — an optional capability must not become a build break for callers
|
|
8
|
-
* that will never want it.
|
|
9
|
-
*
|
|
10
|
-
* The cost of that erasure is that **nothing forces a composition root to
|
|
11
|
-
* provide it**: forget to, and the read returns `None`, everything compiles, and
|
|
12
|
-
* the feature is silently dead. A spec pins the one place that must
|
|
13
|
-
* (`mergeContext`), because an invariant the compiler cannot hold is one a test
|
|
14
|
-
* has to.
|
|
15
|
-
*/ export class TransactionSinkTag extends Context.Service()('TransactionSinkTag') {
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The sink where nothing is watching — outside a mounted provider, and in every
|
|
19
|
-
* caller that never opted into command creates.
|
|
20
|
-
*
|
|
21
|
-
* A create on a plain route still works exactly as it did; it simply gets no
|
|
22
|
-
* optimistic treatment, which is an honest boundary rather than a write into an
|
|
23
|
-
* unscoped store.
|
|
24
|
-
*/ export const NoopTransactionSink = {
|
|
25
|
-
began: ()=>undefined
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=transaction-sink.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ports/transaction-sink.ts"],"sourcesContent":["import { Context } from 'effect';\n\n/**\n * A write the browser has started and the server has not finished.\n *\n * The `transactionId` is also the stored entity's id — the client's minted id\n * is the primary key — so this is enough to find the record\n * later without holding a copy of it.\n */\nexport interface PendingTransaction {\n readonly transactionId: string;\n /** The target entity's `key`, so a settle knows which query scope to refresh. */\n readonly entity: string;\n /** ISO-8601, when the `202` came back. Drives the oldest-first eviction. */\n readonly at: string;\n}\n\n/** A pending write, plus what reconciliation has since learned about it. */\nexport type PendingEntry = PendingTransaction & {\n readonly state: 'pending' | 'failed';\n /**\n * The record as the browser holds it, so a list can show it before the server\n * has one.\n *\n * ⚠️ **In memory only — never persisted.** The store's `partialize` strips it,\n * for the reason an autosaved draft gives: a class instance does not survive\n * a JSON round trip,\n * it comes back as something else. So a refresh keeps the *watch* and loses\n * the row, which is the documented behaviour — past a refresh, server truth\n * plus an honest notice beats a record rebuilt from a blob.\n *\n * Typed `unknown` because this package must not care what an entity is; the\n * shell that put it here is the only thing that reads it back.\n */\n readonly record?: unknown;\n /**\n * Free text from whatever threw, in whatever language it was written in.\n *\n * ⚠️ Diagnostic only — never the headline of anything a user reads. A\n * transaction's failure carries no error *code*, so the message shown has to\n * be a catalog key and this is the detail beside it.\n */\n readonly reason?: string;\n};\n\n/**\n * How a transactional write announces itself to whoever is watching.\n *\n * The save adapter is the only place that knows a create went out as a command\n * rather than as a plain `POST`, and it learns nothing back — the `202`\n * describes a transaction, not an entity. So it tells this port, and the browser\n * takes it from there.\n *\n * Framework-free and synchronous on purpose: the implementation is a React store\n * action, and keeping that behind a port is what stops `@entifix/transactions`\n * knowing anything about React or about where the pending set is persisted.\n */\nexport interface TransactionSink {\n began(pending: PendingTransaction): void;\n}\n\n/**\n * ⚠️ Read with `Effect.serviceOption`, never `yield*`.\n *\n * That keeps the tag out of the save adapter's `R`, so the storefront, the plain\n * REST adapters and every existing spec compile and run with no layer to\n * provide — an optional capability must not become a build break for callers\n * that will never want it.\n *\n * The cost of that erasure is that **nothing forces a composition root to\n * provide it**: forget to, and the read returns `None`, everything compiles, and\n * the feature is silently dead. A spec pins the one place that must\n * (`mergeContext`), because an invariant the compiler cannot hold is one a test\n * has to.\n */\nexport class TransactionSinkTag extends Context.Service<\n TransactionSinkTag,\n TransactionSink\n>()('TransactionSinkTag') {}\n\n/**\n * The sink where nothing is watching — outside a mounted provider, and in every\n * caller that never opted into command creates.\n *\n * A create on a plain route still works exactly as it did; it simply gets no\n * optimistic treatment, which is an honest boundary rather than a write into an\n * unscoped store.\n */\nexport const NoopTransactionSink: TransactionSink = {\n began: () => undefined,\n};\n\n/**\n * The full view of the pending set, for the side that reconciles it.\n *\n * It extends {@link TransactionSink} because one store is behind both: the\n * adapter needs only `began`, and the settlement side needs to read entries and\n * retire them. Two interfaces rather than one because they are consumed from\n * opposite sides of a tier boundary — a T3 package may not import a T4 shell,\n * so the store is handed in as a prop, the way `EntityDraftStore` already is for\n * autosave.\n */\nexport interface PendingTransactionStore extends TransactionSink {\n readonly entries: readonly PendingEntry[];\n /** The write landed. Drop it; the server's copy is the truth now. */\n settle(transactionId: string): void;\n /**\n * Holds the record the browser already has, so the list can render it while\n * the write is still in flight — and answers whether this id was being\n * watched at all.\n *\n * ⚠️ **The return value is why this is one call and not two.** A caller that\n * asked `entries.some(...)` first would be reading a React render closure\n * captured *before* its own `await`, so the announcement the save adapter made\n * during that await is invisible to it and every transactional write reads as\n * a plain one. Answering from the store's current state is the only version\n * without that race.\n *\n * Separate from `began` because the save adapter announces before it returns\n * and has no reason to know about lists.\n */\n attach(transactionId: string, record: unknown): boolean;\n /** The write failed terminally. Keep it, marked, until it is dismissed. */\n fail(transactionId: string, reason?: string): void;\n /** The operator has read the failure. */\n dismiss(transactionId: string): void;\n}\n"],"names":["Context","TransactionSinkTag","Service","NoopTransactionSink","began","undefined"],"mappings":"AAAA,SAASA,OAAO,QAAQ,SAAS;AA6DjC;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMC,2BAA2BD,QAAQE,OAAO,GAGnD;AAAuB;AAE3B;;;;;;;CAOC,GACD,OAAO,MAAMC,sBAAuC;IAClDC,OAAO,IAAMC;AACf,EAAE"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { DomainEvent, EntityChangeEvent } from '@entifix/core';
|
|
2
|
-
import { Context, type Effect, type Stream } from 'effect';
|
|
3
|
-
import type { TransactionEvent } from '../contracts/event.js';
|
|
4
|
-
/**
|
|
5
|
-
* The in-process fan-out behind `GET /api/transaction/events`.
|
|
6
|
-
*
|
|
7
|
-
* One subscription to the bus feeds it; each connected browser takes its own
|
|
8
|
-
* filtered view. It is a hub rather than a bus subscription per connection
|
|
9
|
-
* because a queue per open tab is a broker resource a client controls.
|
|
10
|
-
*/
|
|
11
|
-
export interface TransactionStreamHub {
|
|
12
|
-
/** Offer one bus event to every connection scoped to its organization. */
|
|
13
|
-
publish(event: DomainEvent<TransactionEvent>): Effect.Effect<void>;
|
|
14
|
-
/**
|
|
15
|
-
* One connection's view, already scoped and already mapped.
|
|
16
|
-
*
|
|
17
|
-
* ⚠️ **Fails closed.** An event whose `organizationId` does not match is
|
|
18
|
-
* dropped, and so is one carrying none at all — including every event emitted
|
|
19
|
-
* before that member existed. Defaulting an absent organization to "everyone"
|
|
20
|
-
* is a cross-tenant delivery that raises nothing.
|
|
21
|
-
*/
|
|
22
|
-
subscribe(organizationId: string): Stream.Stream<DomainEvent<EntityChangeEvent>>;
|
|
23
|
-
}
|
|
24
|
-
declare const TransactionStreamHubTag_base: Context.ServiceClass<TransactionStreamHubTag, "TransactionStreamHubTag", TransactionStreamHub>;
|
|
25
|
-
export declare class TransactionStreamHubTag extends TransactionStreamHubTag_base {
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
28
|
-
//# sourceMappingURL=transaction-stream-hub.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-stream-hub.d.ts","sourceRoot":"","sources":["../../src/ports/transaction-stream-hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACnE;;;;;;;OAOG;IACH,SAAS,CACP,cAAc,EAAE,MAAM,GACrB,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC;CAClD;;AAED,qBAAa,uBAAwB,SAAQ,4BAGf;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ports/transaction-stream-hub.ts"],"sourcesContent":["import type { DomainEvent, EntityChangeEvent } from '@entifix/core';\nimport { Context, type Effect, type Stream } from 'effect';\n\nimport type { TransactionEvent } from '../contracts/event.js';\n\n/**\n * The in-process fan-out behind `GET /api/transaction/events`.\n *\n * One subscription to the bus feeds it; each connected browser takes its own\n * filtered view. It is a hub rather than a bus subscription per connection\n * because a queue per open tab is a broker resource a client controls.\n */\nexport interface TransactionStreamHub {\n /** Offer one bus event to every connection scoped to its organization. */\n publish(event: DomainEvent<TransactionEvent>): Effect.Effect<void>;\n /**\n * One connection's view, already scoped and already mapped.\n *\n * ⚠️ **Fails closed.** An event whose `organizationId` does not match is\n * dropped, and so is one carrying none at all — including every event emitted\n * before that member existed. Defaulting an absent organization to \"everyone\"\n * is a cross-tenant delivery that raises nothing.\n */\n subscribe(\n organizationId: string,\n ): Stream.Stream<DomainEvent<EntityChangeEvent>>;\n}\n\nexport class TransactionStreamHubTag extends Context.Service<\n TransactionStreamHubTag,\n TransactionStreamHub\n>()('TransactionStreamHubTag') {}\n"],"names":["Context","TransactionStreamHubTag","Service"],"mappings":"AACA,SAASA,OAAO,QAAkC,SAAS;AA2B3D,OAAO,MAAMC,gCAAgCD,QAAQE,OAAO,GAGxD;AAA4B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { DomainEvent, EntityChangeEvent } from '@entifix/core';
|
|
2
|
-
import { Effect, PubSub } from 'effect';
|
|
3
|
-
import type { TransactionEvent } from '../contracts/event.js';
|
|
4
|
-
import type { TransactionStreamHub } from '../ports/transaction-stream-hub.js';
|
|
5
|
-
/**
|
|
6
|
-
* Rewrites a transaction event as the entity change it announces, keeping the
|
|
7
|
-
* message's own metadata untouched.
|
|
8
|
-
*
|
|
9
|
-
* No fourth framing and no duplicated fields: the transaction id, the timestamp
|
|
10
|
-
* and the sequence a consumer needs are already `meta.event.correlationId`,
|
|
11
|
-
* `.at` and `.id` on the message this returns.
|
|
12
|
-
*/
|
|
13
|
-
export declare const entityChangeFor: (event: DomainEvent<TransactionEvent>) => DomainEvent<EntityChangeEvent>;
|
|
14
|
-
/** Builds a hub over a sliding {@link PubSub}. */
|
|
15
|
-
export declare const makeTransactionStreamHub: (pubsub: PubSub.PubSub<DomainEvent<TransactionEvent>>) => TransactionStreamHub;
|
|
16
|
-
/** Opens a hub. Scoped, so its subscribers are released with the scope. */
|
|
17
|
-
export declare const makeTransactionStreamHubEffect: Effect.Effect<TransactionStreamHub, never, never>;
|
|
18
|
-
//# sourceMappingURL=transaction-stream-hub.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-stream-hub.d.ts","sourceRoot":"","sources":["../../src/stream/transaction-stream-hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AA2B/E;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,WAAW,CAAC,gBAAgB,CAAC,KACnC,WAAW,CAAC,iBAAiB,CAW9B,CAAC;AAEH,kDAAkD;AAClD,eAAO,MAAM,wBAAwB,GACnC,QAAQ,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,KACnD,oBAOD,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,8BAA8B,mDAG1C,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Effect, PubSub, Stream } from 'effect';
|
|
2
|
-
/**
|
|
3
|
-
* How many undelivered events one hub holds before the oldest are dropped.
|
|
4
|
-
*
|
|
5
|
-
* Bounded with a **sliding** strategy rather than unbounded: a browser that
|
|
6
|
-
* stops reading its connection must not be able to grow the service's heap, and
|
|
7
|
-
* a reactive hint is worth less the older it is — the record behind it is the
|
|
8
|
-
* truth, and re-reading it is cheap, which is also why the stream offers no
|
|
9
|
-
* replay.
|
|
10
|
-
*/ const CAPACITY = 256;
|
|
11
|
-
/**
|
|
12
|
-
* What a transaction's state means for the entity it is about.
|
|
13
|
-
*
|
|
14
|
-
* `type: 'create'` is the only command that exists, so `PENDING` and
|
|
15
|
-
* `COMPLETED` both announce an entity coming into existence — the id is already
|
|
16
|
-
* known at `accepted`, because the client-minted transaction id is the stored entity's id. A terminal failure announces the opposite: nothing was
|
|
17
|
-
* written, so a consumer holding an optimistic row must drop it.
|
|
18
|
-
*
|
|
19
|
-
* When `update`/`delete` commands land this keys off `command.type` instead;
|
|
20
|
-
* the state alone cannot distinguish them.
|
|
21
|
-
*/ const changeFor = (state)=>state === 'PENDING' || state === 'COMPLETED' ? 'created' : 'deleted';
|
|
22
|
-
/**
|
|
23
|
-
* Rewrites a transaction event as the entity change it announces, keeping the
|
|
24
|
-
* message's own metadata untouched.
|
|
25
|
-
*
|
|
26
|
-
* No fourth framing and no duplicated fields: the transaction id, the timestamp
|
|
27
|
-
* and the sequence a consumer needs are already `meta.event.correlationId`,
|
|
28
|
-
* `.at` and `.id` on the message this returns.
|
|
29
|
-
*/ export const entityChangeFor = (event)=>{
|
|
30
|
-
var _event_data_entityId;
|
|
31
|
-
return {
|
|
32
|
-
name: event.name,
|
|
33
|
-
id: event.id,
|
|
34
|
-
source: event.source,
|
|
35
|
-
at: event.at,
|
|
36
|
-
correlationId: event.correlationId,
|
|
37
|
-
data: {
|
|
38
|
-
entity: event.data.entity,
|
|
39
|
-
change: changeFor(event.data.state),
|
|
40
|
-
id: (_event_data_entityId = event.data.entityId) != null ? _event_data_entityId : event.data.transactionId
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
/** Builds a hub over a sliding {@link PubSub}. */ export const makeTransactionStreamHub = (pubsub)=>({
|
|
45
|
-
publish: (event)=>Effect.asVoid(PubSub.publish(pubsub, event)),
|
|
46
|
-
subscribe: (organizationId)=>Stream.fromPubSub(pubsub).pipe(Stream.filter((event)=>event.data.organizationId === organizationId), Stream.map(entityChangeFor))
|
|
47
|
-
});
|
|
48
|
-
/** Opens a hub. Scoped, so its subscribers are released with the scope. */ export const makeTransactionStreamHubEffect = Effect.map(PubSub.sliding(CAPACITY), makeTransactionStreamHub);
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=transaction-stream-hub.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/stream/transaction-stream-hub.ts"],"sourcesContent":["import type { DomainEvent, EntityChangeEvent } from '@entifix/core';\nimport { Effect, PubSub, Stream } from 'effect';\n\nimport type { TransactionEvent, TransactionState } from '../contracts/event.js';\nimport type { TransactionStreamHub } from '../ports/transaction-stream-hub.js';\n\n/**\n * How many undelivered events one hub holds before the oldest are dropped.\n *\n * Bounded with a **sliding** strategy rather than unbounded: a browser that\n * stops reading its connection must not be able to grow the service's heap, and\n * a reactive hint is worth less the older it is — the record behind it is the\n * truth, and re-reading it is cheap, which is also why the stream offers no\n * replay.\n */\nconst CAPACITY = 256;\n\n/**\n * What a transaction's state means for the entity it is about.\n *\n * `type: 'create'` is the only command that exists, so `PENDING` and\n * `COMPLETED` both announce an entity coming into existence — the id is already\n * known at `accepted`, because the client-minted transaction id is the stored entity's id. A terminal failure announces the opposite: nothing was\n * written, so a consumer holding an optimistic row must drop it.\n *\n * When `update`/`delete` commands land this keys off `command.type` instead;\n * the state alone cannot distinguish them.\n */\nconst changeFor = (state: TransactionState): EntityChangeEvent['change'] =>\n state === 'PENDING' || state === 'COMPLETED' ? 'created' : 'deleted';\n\n/**\n * Rewrites a transaction event as the entity change it announces, keeping the\n * message's own metadata untouched.\n *\n * No fourth framing and no duplicated fields: the transaction id, the timestamp\n * and the sequence a consumer needs are already `meta.event.correlationId`,\n * `.at` and `.id` on the message this returns.\n */\nexport const entityChangeFor = (\n event: DomainEvent<TransactionEvent>,\n): DomainEvent<EntityChangeEvent> => ({\n name: event.name,\n id: event.id,\n source: event.source,\n at: event.at,\n correlationId: event.correlationId,\n data: {\n entity: event.data.entity,\n change: changeFor(event.data.state),\n id: event.data.entityId ?? event.data.transactionId,\n },\n});\n\n/** Builds a hub over a sliding {@link PubSub}. */\nexport const makeTransactionStreamHub = (\n pubsub: PubSub.PubSub<DomainEvent<TransactionEvent>>,\n): TransactionStreamHub => ({\n publish: event => Effect.asVoid(PubSub.publish(pubsub, event)),\n subscribe: organizationId =>\n Stream.fromPubSub(pubsub).pipe(\n Stream.filter(event => event.data.organizationId === organizationId),\n Stream.map(entityChangeFor),\n ),\n});\n\n/** Opens a hub. Scoped, so its subscribers are released with the scope. */\nexport const makeTransactionStreamHubEffect = Effect.map(\n PubSub.sliding<DomainEvent<TransactionEvent>>(CAPACITY),\n makeTransactionStreamHub,\n);\n"],"names":["Effect","PubSub","Stream","CAPACITY","changeFor","state","entityChangeFor","event","name","id","source","at","correlationId","data","entity","change","entityId","transactionId","makeTransactionStreamHub","pubsub","publish","asVoid","subscribe","organizationId","fromPubSub","pipe","filter","map","makeTransactionStreamHubEffect","sliding"],"mappings":"AACA,SAASA,MAAM,EAAEC,MAAM,EAAEC,MAAM,QAAQ,SAAS;AAKhD;;;;;;;;CAQC,GACD,MAAMC,WAAW;AAEjB;;;;;;;;;;CAUC,GACD,MAAMC,YAAY,CAACC,QACjBA,UAAU,aAAaA,UAAU,cAAc,YAAY;AAE7D;;;;;;;CAOC,GACD,OAAO,MAAMC,kBAAkB,CAC7BC;QAUMA;WAT8B;QACpCC,MAAMD,MAAMC,IAAI;QAChBC,IAAIF,MAAME,EAAE;QACZC,QAAQH,MAAMG,MAAM;QACpBC,IAAIJ,MAAMI,EAAE;QACZC,eAAeL,MAAMK,aAAa;QAClCC,MAAM;YACJC,QAAQP,MAAMM,IAAI,CAACC,MAAM;YACzBC,QAAQX,UAAUG,MAAMM,IAAI,CAACR,KAAK;YAClCI,EAAE,GAAEF,uBAAAA,MAAMM,IAAI,CAACG,QAAQ,YAAnBT,uBAAuBA,MAAMM,IAAI,CAACI,aAAa;QACrD;IACF;EAAG;AAEH,gDAAgD,GAChD,OAAO,MAAMC,2BAA2B,CACtCC,SAC0B,CAAA;QAC1BC,SAASb,CAAAA,QAASP,OAAOqB,MAAM,CAACpB,OAAOmB,OAAO,CAACD,QAAQZ;QACvDe,WAAWC,CAAAA,iBACTrB,OAAOsB,UAAU,CAACL,QAAQM,IAAI,CAC5BvB,OAAOwB,MAAM,CAACnB,CAAAA,QAASA,MAAMM,IAAI,CAACU,cAAc,KAAKA,iBACrDrB,OAAOyB,GAAG,CAACrB;IAEjB,CAAA,EAAG;AAEH,yEAAyE,GACzE,OAAO,MAAMsB,iCAAiC5B,OAAO2B,GAAG,CACtD1B,OAAO4B,OAAO,CAAgC1B,WAC9Ce,0BACA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
import { CommandTag, LockHandlesTag, OutcomeTag } from '../mixins/transaction-mixins.js';
|
|
3
|
-
import { type LockHandle, LockServiceTag } from '../ports/lock-service.js';
|
|
4
|
-
import { TransactionHandlerTag } from '../ports/transaction-handler.js';
|
|
5
|
-
/**
|
|
6
|
-
* The five-step transaction facade, each step a use-case in the same
|
|
7
|
-
* `*UCFactory -> Effect.gen -> yield Context.Tag` style as the entity
|
|
8
|
-
* use-cases. Inputs arrive through Context so a step is agnostic to how the
|
|
9
|
-
* command/handles/outcome were produced. The {@link runTransaction} engine
|
|
10
|
-
* sequences them.
|
|
11
|
-
*/
|
|
12
|
-
/** 1. Validate — delegates to the injected domain handler. */
|
|
13
|
-
export declare function validateUCFactory(): Effect.Effect<void, import("@entifix/core").EntifixFailure<string, string, import("@entifix/core").FailureCategory>, TransactionHandlerTag | CommandTag>;
|
|
14
|
-
/** 2. Lock — acquire every resource key the handler declares for the command. */
|
|
15
|
-
export declare function lockUCFactory(): Effect.Effect<readonly LockHandle[], import("@entifix/core").StoreFailure, TransactionHandlerTag | LockServiceTag | CommandTag>;
|
|
16
|
-
/** 3. Execute — the write; returns the assigned code + stored id. */
|
|
17
|
-
export declare function executeUCFactory(): Effect.Effect<import("../index.js").TransactionOutcome, import("@entifix/core").EntifixFailure<string, string, import("@entifix/core").FailureCategory>, TransactionHandlerTag | CommandTag>;
|
|
18
|
-
/** 4. Rollback — undo a failed execution (idempotent). */
|
|
19
|
-
export declare function rollbackUCFactory(): Effect.Effect<void, import("@entifix/core").EntifixFailure<string, string, import("@entifix/core").FailureCategory>, TransactionHandlerTag | CommandTag | OutcomeTag>;
|
|
20
|
-
/** 5. Free — release every held lock, best-effort per handle. */
|
|
21
|
-
export declare function freeUCFactory(): Effect.Effect<void, import("@entifix/core").StoreFailure, LockServiceTag | LockHandlesTag>;
|
|
22
|
-
//# sourceMappingURL=facade.uc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facade.uc.d.ts","sourceRoot":"","sources":["../../src/use-case/facade.uc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,UAAU,EACV,cAAc,EACd,UAAU,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,UAAU,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE;;;;;;GAMG;AAEH,8DAA8D;AAC9D,wBAAgB,iBAAiB,6JAMhC;AAED,iFAAiF;AACjF,wBAAgB,aAAa,oIAY5B;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,iMAM/B;AAED,0DAA0D;AAC1D,wBAAgB,iBAAiB,0KAOhC;AAED,iEAAiE;AACjE,wBAAgB,aAAa,+FAQ5B"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Effect } from 'effect';
|
|
2
|
-
import { CommandTag, LockHandlesTag, OutcomeTag } from '../mixins/transaction-mixins.js';
|
|
3
|
-
import { LockServiceTag } from '../ports/lock-service.js';
|
|
4
|
-
import { TransactionHandlerTag } from '../ports/transaction-handler.js';
|
|
5
|
-
/**
|
|
6
|
-
* The five-step transaction facade, each step a use-case in the same
|
|
7
|
-
* `*UCFactory -> Effect.gen -> yield Context.Tag` style as the entity
|
|
8
|
-
* use-cases. Inputs arrive through Context so a step is agnostic to how the
|
|
9
|
-
* command/handles/outcome were produced. The {@link runTransaction} engine
|
|
10
|
-
* sequences them.
|
|
11
|
-
*/ /** 1. Validate — delegates to the injected domain handler. */ export function validateUCFactory() {
|
|
12
|
-
return Effect.gen(function*() {
|
|
13
|
-
const handler = yield* TransactionHandlerTag;
|
|
14
|
-
const command = yield* CommandTag;
|
|
15
|
-
yield* handler.validate(command);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
/** 2. Lock — acquire every resource key the handler declares for the command. */ export function lockUCFactory() {
|
|
19
|
-
return Effect.gen(function*() {
|
|
20
|
-
const lockService = yield* LockServiceTag;
|
|
21
|
-
const handler = yield* TransactionHandlerTag;
|
|
22
|
-
const command = yield* CommandTag;
|
|
23
|
-
const handles = [];
|
|
24
|
-
for (const key of handler.lockKeys(command)){
|
|
25
|
-
handles.push((yield* lockService.acquire(key)));
|
|
26
|
-
}
|
|
27
|
-
return handles;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/** 3. Execute — the write; returns the assigned code + stored id. */ export function executeUCFactory() {
|
|
31
|
-
return Effect.gen(function*() {
|
|
32
|
-
const handler = yield* TransactionHandlerTag;
|
|
33
|
-
const command = yield* CommandTag;
|
|
34
|
-
return yield* handler.execute(command);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
/** 4. Rollback — undo a failed execution (idempotent). */ export function rollbackUCFactory() {
|
|
38
|
-
return Effect.gen(function*() {
|
|
39
|
-
const handler = yield* TransactionHandlerTag;
|
|
40
|
-
const command = yield* CommandTag;
|
|
41
|
-
const outcome = yield* OutcomeTag;
|
|
42
|
-
yield* handler.rollback(command, outcome);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/** 5. Free — release every held lock, best-effort per handle. */ export function freeUCFactory() {
|
|
46
|
-
return Effect.gen(function*() {
|
|
47
|
-
const lockService = yield* LockServiceTag;
|
|
48
|
-
const handles = yield* LockHandlesTag;
|
|
49
|
-
for (const handle of handles){
|
|
50
|
-
yield* lockService.release(handle);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=facade.uc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/use-case/facade.uc.ts"],"sourcesContent":["import { Effect } from 'effect';\n\nimport {\n CommandTag,\n LockHandlesTag,\n OutcomeTag,\n} from '../mixins/transaction-mixins.js';\nimport { type LockHandle, LockServiceTag } from '../ports/lock-service.js';\nimport { TransactionHandlerTag } from '../ports/transaction-handler.js';\n\n/**\n * The five-step transaction facade, each step a use-case in the same\n * `*UCFactory -> Effect.gen -> yield Context.Tag` style as the entity\n * use-cases. Inputs arrive through Context so a step is agnostic to how the\n * command/handles/outcome were produced. The {@link runTransaction} engine\n * sequences them.\n */\n\n/** 1. Validate — delegates to the injected domain handler. */\nexport function validateUCFactory() {\n return Effect.gen(function* () {\n const handler = yield* TransactionHandlerTag;\n const command = yield* CommandTag;\n yield* handler.validate(command);\n });\n}\n\n/** 2. Lock — acquire every resource key the handler declares for the command. */\nexport function lockUCFactory() {\n return Effect.gen(function* () {\n const lockService = yield* LockServiceTag;\n const handler = yield* TransactionHandlerTag;\n const command = yield* CommandTag;\n\n const handles: LockHandle[] = [];\n for (const key of handler.lockKeys(command)) {\n handles.push(yield* lockService.acquire(key));\n }\n return handles as readonly LockHandle[];\n });\n}\n\n/** 3. Execute — the write; returns the assigned code + stored id. */\nexport function executeUCFactory() {\n return Effect.gen(function* () {\n const handler = yield* TransactionHandlerTag;\n const command = yield* CommandTag;\n return yield* handler.execute(command);\n });\n}\n\n/** 4. Rollback — undo a failed execution (idempotent). */\nexport function rollbackUCFactory() {\n return Effect.gen(function* () {\n const handler = yield* TransactionHandlerTag;\n const command = yield* CommandTag;\n const outcome = yield* OutcomeTag;\n yield* handler.rollback(command, outcome);\n });\n}\n\n/** 5. Free — release every held lock, best-effort per handle. */\nexport function freeUCFactory() {\n return Effect.gen(function* () {\n const lockService = yield* LockServiceTag;\n const handles = yield* LockHandlesTag;\n for (const handle of handles) {\n yield* lockService.release(handle);\n }\n });\n}\n"],"names":["Effect","CommandTag","LockHandlesTag","OutcomeTag","LockServiceTag","TransactionHandlerTag","validateUCFactory","gen","handler","command","validate","lockUCFactory","lockService","handles","key","lockKeys","push","acquire","executeUCFactory","execute","rollbackUCFactory","outcome","rollback","freeUCFactory","handle","release"],"mappings":"AAAA,SAASA,MAAM,QAAQ,SAAS;AAEhC,SACEC,UAAU,EACVC,cAAc,EACdC,UAAU,QACL,kCAAkC;AACzC,SAA0BC,cAAc,QAAQ,2BAA2B;AAC3E,SAASC,qBAAqB,QAAQ,kCAAkC;AAExE;;;;;;CAMC,GAED,4DAA4D,GAC5D,OAAO,SAASC;IACd,OAAON,OAAOO,GAAG,CAAC;QAChB,MAAMC,UAAU,OAAOH;QACvB,MAAMI,UAAU,OAAOR;QACvB,OAAOO,QAAQE,QAAQ,CAACD;IAC1B;AACF;AAEA,+EAA+E,GAC/E,OAAO,SAASE;IACd,OAAOX,OAAOO,GAAG,CAAC;QAChB,MAAMK,cAAc,OAAOR;QAC3B,MAAMI,UAAU,OAAOH;QACvB,MAAMI,UAAU,OAAOR;QAEvB,MAAMY,UAAwB,EAAE;QAChC,KAAK,MAAMC,OAAON,QAAQO,QAAQ,CAACN,SAAU;YAC3CI,QAAQG,IAAI,CAAC,CAAA,OAAOJ,YAAYK,OAAO,CAACH,IAAG;QAC7C;QACA,OAAOD;IACT;AACF;AAEA,mEAAmE,GACnE,OAAO,SAASK;IACd,OAAOlB,OAAOO,GAAG,CAAC;QAChB,MAAMC,UAAU,OAAOH;QACvB,MAAMI,UAAU,OAAOR;QACvB,OAAO,OAAOO,QAAQW,OAAO,CAACV;IAChC;AACF;AAEA,wDAAwD,GACxD,OAAO,SAASW;IACd,OAAOpB,OAAOO,GAAG,CAAC;QAChB,MAAMC,UAAU,OAAOH;QACvB,MAAMI,UAAU,OAAOR;QACvB,MAAMoB,UAAU,OAAOlB;QACvB,OAAOK,QAAQc,QAAQ,CAACb,SAASY;IACnC;AACF;AAEA,+DAA+D,GAC/D,OAAO,SAASE;IACd,OAAOvB,OAAOO,GAAG,CAAC;QAChB,MAAMK,cAAc,OAAOR;QAC3B,MAAMS,UAAU,OAAOX;QACvB,KAAK,MAAMsB,UAAUX,QAAS;YAC5B,OAAOD,YAAYa,OAAO,CAACD;QAC7B;IACF;AACF"}
|