@fantastic.dev/better-stripe 0.97.1 → 0.99.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts +11 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +39 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts +22 -0
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js +13 -5
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.d.ts +17 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.js +140 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +61 -9
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +41 -411
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/initialActorData.d.ts +21 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialActorData.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialActorData.js +36 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialActorData.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +141 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +132 -182
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js +17 -5
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/transportCapture.d.ts +35 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportCapture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportCapture.js +46 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportCapture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.d.ts +63 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.js +380 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js +25 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.d.ts +56 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.js +49 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.js +3 -0
- package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.d.ts +65 -0
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.js +162 -0
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts +4 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js +87 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.d.ts +368 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.js +106 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/stockDelegateFactory.d.ts +4 -0
- package/dist/client/billing/renewalAttach/internal/producer/stockDelegateFactory.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/stockDelegateFactory.js +24 -3
- package/dist/client/billing/renewalAttach/internal/producer/stockDelegateFactory.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/output.js +22 -8
- package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/record.js +10 -2
- package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +69 -156
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +18 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js +15 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -1
- package/docs/renewal-context-reads.md +69 -8
- package/package.json +1 -1
- package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +45 -3
- package/src/client/billing/renewalAttach/internal/c10/attachEvents.ts +17 -5
- package/src/client/billing/renewalAttach/internal/operations/actorFailureControl.ts +165 -0
- package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +48 -535
- package/src/client/billing/renewalAttach/internal/operations/initialActorData.ts +41 -0
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +168 -209
- package/src/client/billing/renewalAttach/internal/operations/ownedAwait.ts +23 -5
- package/src/client/billing/renewalAttach/internal/operations/transportCapture.ts +60 -0
- package/src/client/billing/renewalAttach/internal/operations/transportKernel.ts +500 -0
- package/src/client/billing/renewalAttach/internal/producer/invocationProducer.ts +28 -0
- package/src/client/billing/renewalAttach/internal/producer/journalWorkFactory.ts +54 -0
- package/src/client/billing/renewalAttach/internal/producer/lineageAuthority.ts +3 -0
- package/src/client/billing/renewalAttach/internal/producer/operationFactory.ts +176 -0
- package/src/client/billing/renewalAttach/internal/producer/producerAcquisition.integration.test.ts +240 -0
- package/src/client/billing/renewalAttach/internal/producer/producerActor.integration.test.ts +526 -0
- package/src/client/billing/renewalAttach/internal/producer/producerRecovery.integration.test.ts +394 -0
- package/src/client/billing/renewalAttach/internal/producer/producerRecoveryControls.integration.test.ts +437 -0
- package/src/client/billing/renewalAttach/internal/producer/producerRecoveryIsolation.integration.test.ts +332 -0
- package/src/client/billing/renewalAttach/internal/producer/producerTransport.integration.test.ts +440 -0
- package/src/client/billing/renewalAttach/internal/producer/recoveryEntry.ts +109 -0
- package/src/client/billing/renewalAttach/internal/producer/recoveryFactory.ts +135 -0
- package/src/client/billing/renewalAttach/internal/producer/stockDelegateFactory.ts +29 -5
- package/src/client/billing/renewalAttach/internal/recovery/output.ts +34 -8
- package/src/client/billing/renewalAttach/internal/recovery/record.ts +16 -2
- package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +107 -188
- package/src/client/billing/renewalAttach/internal/recovery/relation.ts +17 -1
- package/src/client/billing/renewalAttach/internal/test-fixtures/producerInitialOperation.ts +82 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ownedAwait.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/ownedAwait.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ownedAwait.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/ownedAwait.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;CACxC;AACD,kFAAkF;AAClF,wBAAgB,KAAK,CAAC,CAAC,EACrB,IAAI,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EAC9B,cAAc,GAAE,gBAAgB,GAAG,IAAW,GAC7C,OAAO,CAAC,CAAC,CAAC,CAEZ;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,IAG5B,CAAC,QACf,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,YACrB,gBAAgB,GAAG,IAAI,KAC/B,OAAO,CAAC,CAAC,CAAC,CAGd"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { OWNER } from "../originalOwner.js";
|
|
2
|
+
import { ownerForInitialLineage } from "../producer/ownerFactory.js";
|
|
2
3
|
/** Same original owner around each actor continuation; no new timer or origin. */
|
|
3
4
|
export function owned(work, failureControl = null) {
|
|
4
|
-
OWNER
|
|
5
|
+
return runOwned(OWNER, work, failureControl);
|
|
6
|
+
}
|
|
7
|
+
export function ownedForInitialLineage(token) {
|
|
8
|
+
if (arguments.length !== 1)
|
|
9
|
+
throw Error("INITIAL_ACTOR_STOP");
|
|
10
|
+
const owner = ownerForInitialLineage(token);
|
|
11
|
+
return function owned(work, control = null) {
|
|
12
|
+
return runOwned(owner, work, control);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function runOwned(owner, work, failureControl) {
|
|
16
|
+
owner.check();
|
|
5
17
|
return new Promise((resolve, reject) => {
|
|
6
18
|
let done = false, remove = null;
|
|
7
19
|
const finish = (ok, value) => {
|
|
@@ -16,14 +28,14 @@ export function owned(work, failureControl = null) {
|
|
|
16
28
|
reject(value);
|
|
17
29
|
};
|
|
18
30
|
const retire = () => finish(false, Error("INITIAL_ACTOR_STOP"));
|
|
19
|
-
remove =
|
|
31
|
+
remove = owner.subscribe(retire);
|
|
20
32
|
if (done) {
|
|
21
33
|
remove();
|
|
22
34
|
return;
|
|
23
35
|
}
|
|
24
36
|
let pending;
|
|
25
37
|
try {
|
|
26
|
-
|
|
38
|
+
owner.check();
|
|
27
39
|
pending = work();
|
|
28
40
|
}
|
|
29
41
|
catch {
|
|
@@ -34,7 +46,7 @@ export function owned(work, failureControl = null) {
|
|
|
34
46
|
if (done)
|
|
35
47
|
return;
|
|
36
48
|
try {
|
|
37
|
-
|
|
49
|
+
owner.check();
|
|
38
50
|
finish(true, value);
|
|
39
51
|
}
|
|
40
52
|
catch {
|
|
@@ -44,7 +56,7 @@ export function owned(work, failureControl = null) {
|
|
|
44
56
|
if (done)
|
|
45
57
|
return;
|
|
46
58
|
try {
|
|
47
|
-
|
|
59
|
+
owner.check();
|
|
48
60
|
const forwarded = failureControl
|
|
49
61
|
? failureControl.forward(error)
|
|
50
62
|
: null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ownedAwait.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/ownedAwait.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ownedAwait.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/ownedAwait.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAKrE,kFAAkF;AAClF,MAAM,UAAU,KAAK,CACnB,IAA8B,EAC9B,cAAc,GAA4B,IAAI;IAE9C,OAAO,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAC/C,CAAC;AACD,MAAM,UAAU,sBAAsB,CAAC,KAAa;IAClD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC5C,OAAO,SAAS,KAAK,CACnB,IAA8B,EAC9B,OAAO,GAA4B,IAAI;QAEvC,OAAO,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC,CAAC;AACJ,CAAC;AACD,SAAS,QAAQ,CACf,KAAgD,EAChD,IAA8B,EAC9B,cAAuC;IAEvC,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,IAAI,GAAG,KAAK,EACd,MAAM,GAAwB,IAAI,CAAC;QACrC,MAAM,MAAM,GAAG,CAAC,EAAW,EAAE,KAAc,EAAE,EAAE;YAC7C,IAAI,IAAI;gBAAE,OAAO;YACjB,IAAI,G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,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS,CAC7D,CAAC;YACJ,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type SourceMethod } from "./types.js";
|
|
2
|
+
export declare function captureLegacyTransportSource(raw: unknown): Readonly<{
|
|
3
|
+
owner: object;
|
|
4
|
+
check: SourceMethod;
|
|
5
|
+
delegate: object;
|
|
6
|
+
send: SourceMethod;
|
|
7
|
+
request: import("../../../renewalV2/index.js").PreparedRenewalScheduleAttachmentV2;
|
|
8
|
+
plan: readonly Readonly<{
|
|
9
|
+
resource: import("./types.js").ReadResource;
|
|
10
|
+
ordinal: number;
|
|
11
|
+
method: "GET";
|
|
12
|
+
path: string;
|
|
13
|
+
body: undefined;
|
|
14
|
+
options: import("./types.js").ReadOptions;
|
|
15
|
+
id: string;
|
|
16
|
+
}>[];
|
|
17
|
+
}>;
|
|
18
|
+
export declare function captureInitialTransportSource(token: object, raw: unknown): Readonly<{
|
|
19
|
+
owner: object;
|
|
20
|
+
check: SourceMethod;
|
|
21
|
+
delegate: object;
|
|
22
|
+
send: SourceMethod;
|
|
23
|
+
request: import("../../../renewalV2/index.js").PreparedRenewalScheduleAttachmentV2;
|
|
24
|
+
plan: readonly Readonly<{
|
|
25
|
+
resource: import("./types.js").ReadResource;
|
|
26
|
+
ordinal: number;
|
|
27
|
+
method: "GET";
|
|
28
|
+
path: string;
|
|
29
|
+
body: undefined;
|
|
30
|
+
options: import("./types.js").ReadOptions;
|
|
31
|
+
id: string;
|
|
32
|
+
}>[];
|
|
33
|
+
}>;
|
|
34
|
+
export declare function checkTransportOwnerResult(value: unknown): void;
|
|
35
|
+
//# sourceMappingURL=transportCapture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transportCapture.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/transportCapture.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AA8BpB,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO;;;;;;;;;;;;;;;GAExD;AACD,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO;;;;;;;;;;;;;;;GAExE;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,QAcvD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { types } from "node:util";
|
|
2
|
+
import { OWNER } from "../originalOwner.js";
|
|
3
|
+
import { ownerForInitialLineage } from "../producer/ownerFactory.js";
|
|
4
|
+
import { closed, captureRequestAndReads, need, } from "./types.js";
|
|
5
|
+
function sourceFunction(service, name) {
|
|
6
|
+
need(service && typeof service === "object" && !types.isProxy(service));
|
|
7
|
+
const d = Object.getOwnPropertyDescriptor(service, name);
|
|
8
|
+
need(d && "value" in d && typeof d.value === "function");
|
|
9
|
+
// The function is selected once from validated own data, preserving its receiver.
|
|
10
|
+
return { receiver: service, method: d.value };
|
|
11
|
+
}
|
|
12
|
+
/** Internal fixed attach profile: 43 reads and one POST, never a 44-GET profile. */
|
|
13
|
+
function captureSource(raw, expectedOwner) {
|
|
14
|
+
const b = closed(raw, ["owner", "request", "readPlan", "delegate"]);
|
|
15
|
+
need(b.owner === expectedOwner);
|
|
16
|
+
const owner = sourceFunction(b.owner, "check"), delegate = sourceFunction(b.delegate, "rawRequest");
|
|
17
|
+
const { request, plan } = captureRequestAndReads(b.request, b.readPlan);
|
|
18
|
+
return Object.freeze({
|
|
19
|
+
owner: owner.receiver,
|
|
20
|
+
check: owner.method,
|
|
21
|
+
delegate: delegate.receiver,
|
|
22
|
+
send: delegate.method,
|
|
23
|
+
request,
|
|
24
|
+
plan: Object.freeze(plan),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export function captureLegacyTransportSource(raw) {
|
|
28
|
+
return captureSource(raw, OWNER);
|
|
29
|
+
}
|
|
30
|
+
export function captureInitialTransportSource(token, raw) {
|
|
31
|
+
return captureSource(raw, ownerForInitialLineage(token));
|
|
32
|
+
}
|
|
33
|
+
export function checkTransportOwnerResult(value) {
|
|
34
|
+
const x = closed(value, ["wallMs", "ns", "nowSeconds", "retired"]);
|
|
35
|
+
need(typeof x.wallMs === "number" &&
|
|
36
|
+
Number.isSafeInteger(x.wallMs) &&
|
|
37
|
+
x.wallMs >= 0 &&
|
|
38
|
+
typeof x.ns === "bigint" &&
|
|
39
|
+
x.ns >= 0n &&
|
|
40
|
+
x.ns <= 18446744073709551615n &&
|
|
41
|
+
typeof x.nowSeconds === "number" &&
|
|
42
|
+
Number.isSafeInteger(x.nowSeconds) &&
|
|
43
|
+
x.nowSeconds === Math.floor(x.wallMs / 1000) &&
|
|
44
|
+
x.retired === false);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=transportCapture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transportCapture.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/transportCapture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACL,MAAM,EACN,sBAAsB,EACtB,IAAI,GAEL,MAAM,YAAY,CAAC;AAEpB,SAAS,cAAc,CACrB,OAAgB,EAChB,IAAY;IAEZ,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,MAAM,CAAC,GAAG,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,IA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,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,KAAc;IACtD,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;IACnE,IAAI,CACF,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ;QAC1B,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;QAC9B,CAAC,CAAC,MAAM,IAAI,CAAC;QACb,OAAO,CAAC,CAAC,EAAE,KAAK,QAAQ;QACxB,CAAC,CAAC,EAAE,IAAI,EAAE;QACV,CAAC,CAAC,EAAE,IAAI,qBAAqB;QAC7B,OAAO,CAAC,CAAC,UAAU,KAAK,QAAQ;QAChC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC;QAClC,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;QAC5C,CAAC,CAAC,OAAO,KAAK,KAAK,CACtB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type Diagnostics } from "./providerFailure.js";
|
|
2
|
+
export type PostDisposition = "NOT_STARTED" | "PENDING" | "REJECTED" | "FULFILLED_UNVERIFIED" | "FULFILLED_SAFE";
|
|
3
|
+
export type Quarantine = Readonly<object>;
|
|
4
|
+
type Association = Readonly<{
|
|
5
|
+
operation: unknown;
|
|
6
|
+
readPlan: unknown;
|
|
7
|
+
delegate: unknown;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function build(source: unknown, association?: Association, token?: object): Readonly<{
|
|
10
|
+
transport: Readonly<{
|
|
11
|
+
readTransport: Readonly<{
|
|
12
|
+
rawRequest: (method: unknown, path: unknown, body: unknown, options: unknown) => Promise<unknown>;
|
|
13
|
+
}>;
|
|
14
|
+
postAttach: (...args: unknown[]) => Promise<Readonly<{
|
|
15
|
+
outcome: "not_started";
|
|
16
|
+
reason: string;
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
readonly outcome: "provider_rejected";
|
|
19
|
+
readonly phase: "post";
|
|
20
|
+
readonly ordinal: number;
|
|
21
|
+
readonly diagnostics: Readonly<{}>;
|
|
22
|
+
}> | Readonly<{
|
|
23
|
+
outcome: "fulfilled_safe";
|
|
24
|
+
body: unknown;
|
|
25
|
+
statusCode: number;
|
|
26
|
+
}> | Readonly<{
|
|
27
|
+
outcome: "fulfilled_unverified";
|
|
28
|
+
}>>;
|
|
29
|
+
takeReadRejection(...args: unknown[]): Readonly<{
|
|
30
|
+
phase: "read";
|
|
31
|
+
ordinal: number;
|
|
32
|
+
diagnostics: Diagnostics;
|
|
33
|
+
}> | null;
|
|
34
|
+
postDisposition(...args: unknown[]): PostDisposition;
|
|
35
|
+
}>;
|
|
36
|
+
capability: Readonly<{
|
|
37
|
+
assertSourceOperationBinding(operation: unknown, request: unknown, readPlan: unknown, delegate: unknown): boolean;
|
|
38
|
+
takeFulfilledQuarantine(...args: unknown[]): object | null;
|
|
39
|
+
assertVirginAcquisition(...args: unknown[]): boolean;
|
|
40
|
+
consumeReadCatch(...args: unknown[]): Readonly<{
|
|
41
|
+
phase: "read";
|
|
42
|
+
ordinal: number;
|
|
43
|
+
diagnostics: Readonly<{
|
|
44
|
+
statusCode?: number;
|
|
45
|
+
code?: string;
|
|
46
|
+
requestId?: string;
|
|
47
|
+
type?: string;
|
|
48
|
+
}>;
|
|
49
|
+
}> | null;
|
|
50
|
+
consumePostCatch(actualReply: unknown): Readonly<{
|
|
51
|
+
phase: "post";
|
|
52
|
+
ordinal: number;
|
|
53
|
+
diagnostics: Readonly<{
|
|
54
|
+
statusCode?: number;
|
|
55
|
+
code?: string;
|
|
56
|
+
requestId?: string;
|
|
57
|
+
type?: string;
|
|
58
|
+
}>;
|
|
59
|
+
}> | null;
|
|
60
|
+
}>;
|
|
61
|
+
}>;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=transportKernel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transportKernel.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/transportKernel.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAuB9B,MAAM,MAAM,eAAe,GACvB,aAAa,GACb,SAAS,GACT,UAAU,GACV,sBAAsB,GACtB,gBAAgB,CAAC;AAUrB,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAkE1C,KAAK,WAAW,GAAG,QAAQ,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AACH,wBAAgB,KAAK,CACnB,MAAM,EAAE,OAAO,EACf,WAAW,CAAC,EAAE,WAAW,EACzB,KAAK,CAAC,EAAE,MAAM;;;iCA+DJ,OAAO,QACT,OAAO,QACP,OAAO,WACJ,OAAO,KACf,OAAO,CAAC,OAAO,CAAC;;8BAsDgB,OAAO,EAAE;qBA5LnB,aAAa;;;8BAyOrB,mBAAmB;4BACrB,MAAM;;;;qBAmCN,gBAAgB;;;;qBAOd,sBAAsB;;mCASV,OAAO,EAAE;mBAlS/B,MAAM;qBACJ,MAAM;yBACF,WAAW;;iCA6SG,OAAO,EAAE,GAAG,eAAe;;;gDAOvC,OAAO,WACT,OAAO,YACN,OAAO,YACP,OAAO;yCA8Bc,OAAO,EAAE;yCAiBT,OAAO,EAAE;kCAyBhB,OAAO,EAAE;mBAqBxB,MAAM;;;;;;;;;sCAKa,OAAO;mBAyB1B,MAAM;;;;;;;;;;GAOpB"}
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { types } from "node:util";
|
|
2
|
+
import { requiredJSONSnapshot } from "../material/requiredJson.js";
|
|
3
|
+
import { rejectProxyJSON } from "../acquisition/rawWireSource.js";
|
|
4
|
+
import { closed, captureRequestAndReads, need, stop, freezeJSON, } from "./types.js";
|
|
5
|
+
import { safeDiagnostics, opaqueRecord, } from "./providerFailure.js";
|
|
6
|
+
import { equal } from "../../../renewalAggregate/shared.js";
|
|
7
|
+
import { captureLegacyTransportSource, captureInitialTransportSource, checkTransportOwnerResult as checkOwnerResult, } from "./transportCapture.js";
|
|
8
|
+
function validRead(row, method, path, body, options) {
|
|
9
|
+
need(row && method === row.method && path === row.path && body === undefined);
|
|
10
|
+
const value = closed(options, ["apiVersion", "maxNetworkRetries"]);
|
|
11
|
+
need(value.apiVersion === row.options.apiVersion &&
|
|
12
|
+
value.maxNetworkRetries === 0);
|
|
13
|
+
}
|
|
14
|
+
const notStarted = (reason) => Object.freeze({ outcome: "not_started", reason });
|
|
15
|
+
const nativeResponsePrototype = Response.prototype, nativeStatusGetter = Object.getOwnPropertyDescriptor(nativeResponsePrototype, "status").get, apply = Reflect.apply;
|
|
16
|
+
function capturePostReply(reply) {
|
|
17
|
+
rejectProxyJSON(reply, true);
|
|
18
|
+
need(reply !== null && typeof reply === "object" && !Array.isArray(reply));
|
|
19
|
+
const proto = Object.getPrototypeOf(reply);
|
|
20
|
+
need(proto === Object.prototype || proto === null);
|
|
21
|
+
const meta = Object.getOwnPropertyDescriptor(reply, "lastResponse");
|
|
22
|
+
need(meta &&
|
|
23
|
+
!meta.enumerable &&
|
|
24
|
+
"value" in meta &&
|
|
25
|
+
meta.value !== null &&
|
|
26
|
+
typeof meta.value === "object");
|
|
27
|
+
const metadata = meta.value;
|
|
28
|
+
need(!types.isProxy(metadata));
|
|
29
|
+
const codes = [];
|
|
30
|
+
for (const key of ["status", "statusCode"]) {
|
|
31
|
+
const d = Object.getOwnPropertyDescriptor(metadata, key);
|
|
32
|
+
if (!d)
|
|
33
|
+
continue;
|
|
34
|
+
need("value" in d);
|
|
35
|
+
if (d.value !== undefined)
|
|
36
|
+
codes.push(d.value);
|
|
37
|
+
}
|
|
38
|
+
if (Object.getPrototypeOf(metadata) === nativeResponsePrototype)
|
|
39
|
+
codes.push(apply(nativeStatusGetter, metadata, []));
|
|
40
|
+
need(codes.length > 0 &&
|
|
41
|
+
codes.every((x) => typeof x === "number" &&
|
|
42
|
+
Number.isInteger(x) &&
|
|
43
|
+
x >= 200 &&
|
|
44
|
+
x < 300 &&
|
|
45
|
+
x === codes[0]));
|
|
46
|
+
const statusCode = codes[0];
|
|
47
|
+
need(typeof statusCode === "number");
|
|
48
|
+
const entries = [];
|
|
49
|
+
for (const key of Reflect.ownKeys(reply)) {
|
|
50
|
+
need(typeof key === "string");
|
|
51
|
+
if (key === "lastResponse")
|
|
52
|
+
continue;
|
|
53
|
+
const d = Object.getOwnPropertyDescriptor(reply, key);
|
|
54
|
+
need(d && d.enumerable && "value" in d);
|
|
55
|
+
entries.push([key, d.value]);
|
|
56
|
+
}
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
body: requiredJSONSnapshot(Object.fromEntries(entries)),
|
|
59
|
+
statusCode,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export function build(source, association, token) {
|
|
63
|
+
const b = token === undefined
|
|
64
|
+
? captureLegacyTransportSource(source)
|
|
65
|
+
: captureInitialTransportSource(token, source);
|
|
66
|
+
const generation = Object.freeze({});
|
|
67
|
+
let ordinal = 0, index = 0, pending = null, failedRead = false, consumedPost = false;
|
|
68
|
+
let postState = "NOT_STARTED", postAttempt = null, rejectionSlot = null, lastFailedRead = null, closedOwner = false, checking = false;
|
|
69
|
+
function ownerGate() {
|
|
70
|
+
if (closedOwner || checking) {
|
|
71
|
+
closedOwner = true;
|
|
72
|
+
stop();
|
|
73
|
+
}
|
|
74
|
+
checking = true;
|
|
75
|
+
try {
|
|
76
|
+
checkOwnerResult(Reflect.apply(b.check, b.owner, []));
|
|
77
|
+
if (closedOwner)
|
|
78
|
+
stop();
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
closedOwner = true;
|
|
82
|
+
stop();
|
|
83
|
+
}
|
|
84
|
+
finally {
|
|
85
|
+
checking = false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function attempt(kind, row) {
|
|
89
|
+
need(!pending && ordinal < 44);
|
|
90
|
+
const value = Object.freeze({
|
|
91
|
+
generation,
|
|
92
|
+
ordinal: ++ordinal,
|
|
93
|
+
kind,
|
|
94
|
+
resource: kind === "read" && "resource" in row ? row.resource : "post",
|
|
95
|
+
method: row.method,
|
|
96
|
+
path: row.path,
|
|
97
|
+
id: "id" in row ? row.id : b.request.payload.from_subscription,
|
|
98
|
+
});
|
|
99
|
+
pending = value;
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
const own = (a) => pending === a && a.generation === generation;
|
|
103
|
+
const postCatchRecords = new WeakMap();
|
|
104
|
+
let reservation = "unused", fulfilledSlot = null;
|
|
105
|
+
async function rawRequest(method, path, body, options) {
|
|
106
|
+
need(!failedRead && !consumedPost && !pending && index < b.plan.length);
|
|
107
|
+
ownerGate();
|
|
108
|
+
const row = b.plan[index];
|
|
109
|
+
validRead(row, method, path, body, options);
|
|
110
|
+
const a = attempt("read", row);
|
|
111
|
+
let reply;
|
|
112
|
+
try {
|
|
113
|
+
reply = await Reflect.apply(b.send, b.delegate, [
|
|
114
|
+
method,
|
|
115
|
+
path,
|
|
116
|
+
body,
|
|
117
|
+
row.options,
|
|
118
|
+
]);
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
need(own(a));
|
|
122
|
+
failedRead = true;
|
|
123
|
+
lastFailedRead = a;
|
|
124
|
+
let live = false;
|
|
125
|
+
try {
|
|
126
|
+
ownerGate();
|
|
127
|
+
live = true;
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
/* Retired errors are opaque. */
|
|
131
|
+
}
|
|
132
|
+
if (live && own(a))
|
|
133
|
+
rejectionSlot = {
|
|
134
|
+
attempt: a,
|
|
135
|
+
record: opaqueRecord({
|
|
136
|
+
phase: "read",
|
|
137
|
+
ordinal: a.ordinal,
|
|
138
|
+
diagnostics: safeDiagnostics(error),
|
|
139
|
+
}, "rawError", error),
|
|
140
|
+
};
|
|
141
|
+
pending = null;
|
|
142
|
+
if (live)
|
|
143
|
+
throw error;
|
|
144
|
+
stop();
|
|
145
|
+
}
|
|
146
|
+
try {
|
|
147
|
+
ownerGate();
|
|
148
|
+
need(own(a));
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
failedRead = true;
|
|
152
|
+
pending = null;
|
|
153
|
+
stop();
|
|
154
|
+
}
|
|
155
|
+
pending = null;
|
|
156
|
+
index++;
|
|
157
|
+
return reply;
|
|
158
|
+
}
|
|
159
|
+
async function postAttach(...args) {
|
|
160
|
+
if (args.length ||
|
|
161
|
+
consumedPost ||
|
|
162
|
+
pending ||
|
|
163
|
+
failedRead ||
|
|
164
|
+
index !== b.plan.length)
|
|
165
|
+
return notStarted("not_ready");
|
|
166
|
+
try {
|
|
167
|
+
ownerGate();
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return notStarted("owner_closed");
|
|
171
|
+
}
|
|
172
|
+
consumedPost = true;
|
|
173
|
+
const request = b.request, a = attempt("post", request);
|
|
174
|
+
postAttempt = a;
|
|
175
|
+
postState = "PENDING";
|
|
176
|
+
let reply;
|
|
177
|
+
try {
|
|
178
|
+
reply = await Reflect.apply(b.send, b.delegate, [
|
|
179
|
+
request.method,
|
|
180
|
+
request.path,
|
|
181
|
+
request.payload,
|
|
182
|
+
{
|
|
183
|
+
apiVersion: request.apiVersion,
|
|
184
|
+
idempotencyKey: request.key,
|
|
185
|
+
maxNetworkRetries: 0,
|
|
186
|
+
},
|
|
187
|
+
]);
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
postState = "REJECTED";
|
|
191
|
+
let live = false;
|
|
192
|
+
try {
|
|
193
|
+
ownerGate();
|
|
194
|
+
live = true;
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
/* No late error reflection. */
|
|
198
|
+
}
|
|
199
|
+
const valid = own(a) && postAttempt === a, diagnostics = live && valid ? safeDiagnostics(error) : Object.freeze({});
|
|
200
|
+
const record = opaqueRecord({
|
|
201
|
+
outcome: "provider_rejected",
|
|
202
|
+
phase: "post",
|
|
203
|
+
ordinal: a.ordinal,
|
|
204
|
+
diagnostics,
|
|
205
|
+
}, "rawError", error);
|
|
206
|
+
if (valid)
|
|
207
|
+
postCatchRecords.set(record, Object.freeze({ attempt: a, diagnostics }));
|
|
208
|
+
pending = null;
|
|
209
|
+
return record;
|
|
210
|
+
}
|
|
211
|
+
if (own(a) && postAttempt === a && a.generation === generation) {
|
|
212
|
+
const q = Object.create(null);
|
|
213
|
+
Object.defineProperty(q, "raw", {
|
|
214
|
+
value: reply,
|
|
215
|
+
enumerable: false,
|
|
216
|
+
writable: false,
|
|
217
|
+
configurable: false,
|
|
218
|
+
});
|
|
219
|
+
Object.freeze(q);
|
|
220
|
+
fulfilledSlot = Object.freeze({ attempt: a, generation, quarantine: q });
|
|
221
|
+
}
|
|
222
|
+
postState = "FULFILLED_UNVERIFIED";
|
|
223
|
+
try {
|
|
224
|
+
ownerGate();
|
|
225
|
+
need(own(a) && postAttempt === a);
|
|
226
|
+
const admitted = capturePostReply(reply);
|
|
227
|
+
ownerGate();
|
|
228
|
+
pending = null;
|
|
229
|
+
postState = "FULFILLED_SAFE";
|
|
230
|
+
return Object.freeze({
|
|
231
|
+
outcome: "fulfilled_safe",
|
|
232
|
+
body: freezeJSON(admitted.body),
|
|
233
|
+
statusCode: admitted.statusCode,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
pending = null;
|
|
238
|
+
return opaqueRecord({ outcome: "fulfilled_unverified" }, "rawResponse", reply);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
const transport = Object.freeze({
|
|
242
|
+
readTransport: Object.freeze({ rawRequest }),
|
|
243
|
+
postAttach,
|
|
244
|
+
takeReadRejection(...args) {
|
|
245
|
+
need(args.length === 0);
|
|
246
|
+
const slot = rejectionSlot;
|
|
247
|
+
rejectionSlot = null;
|
|
248
|
+
if (!slot ||
|
|
249
|
+
slot.attempt !== lastFailedRead ||
|
|
250
|
+
slot.attempt.generation !== generation ||
|
|
251
|
+
slot.attempt.kind !== "read")
|
|
252
|
+
return null;
|
|
253
|
+
return slot.record;
|
|
254
|
+
},
|
|
255
|
+
postDisposition(...args) {
|
|
256
|
+
need(args.length === 0);
|
|
257
|
+
return postState;
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
const capability = Object.freeze({
|
|
261
|
+
assertSourceOperationBinding(operation, request, readPlan, delegate) {
|
|
262
|
+
ownerGate();
|
|
263
|
+
if (!association ||
|
|
264
|
+
association.operation !== operation ||
|
|
265
|
+
association.readPlan !== readPlan ||
|
|
266
|
+
association.delegate !== delegate)
|
|
267
|
+
return false;
|
|
268
|
+
const current = captureRequestAndReads(request, readPlan);
|
|
269
|
+
const matches = equal(current.request, b.request) &&
|
|
270
|
+
current.plan.length === b.plan.length &&
|
|
271
|
+
current.plan.every((row, index) => {
|
|
272
|
+
const captured = b.plan[index];
|
|
273
|
+
return (row.resource === captured.resource &&
|
|
274
|
+
row.ordinal === captured.ordinal &&
|
|
275
|
+
row.method === captured.method &&
|
|
276
|
+
row.path === captured.path &&
|
|
277
|
+
row.body === captured.body &&
|
|
278
|
+
row.id === captured.id &&
|
|
279
|
+
row.options.apiVersion === captured.options.apiVersion &&
|
|
280
|
+
row.options.maxNetworkRetries === captured.options.maxNetworkRetries);
|
|
281
|
+
});
|
|
282
|
+
ownerGate();
|
|
283
|
+
return matches;
|
|
284
|
+
},
|
|
285
|
+
takeFulfilledQuarantine(...args) {
|
|
286
|
+
if (args.length !== 0 ||
|
|
287
|
+
pending !== null ||
|
|
288
|
+
fulfilledSlot === null ||
|
|
289
|
+
fulfilledSlot.attempt !== postAttempt ||
|
|
290
|
+
fulfilledSlot.generation !== generation ||
|
|
291
|
+
postAttempt === null ||
|
|
292
|
+
postAttempt.generation !== generation ||
|
|
293
|
+
postAttempt.kind !== "post" ||
|
|
294
|
+
(postState !== "FULFILLED_SAFE" && postState !== "FULFILLED_UNVERIFIED"))
|
|
295
|
+
return null;
|
|
296
|
+
const q = fulfilledSlot.quarantine;
|
|
297
|
+
fulfilledSlot = null;
|
|
298
|
+
return q;
|
|
299
|
+
},
|
|
300
|
+
assertVirginAcquisition(...args) {
|
|
301
|
+
need(args.length === 0);
|
|
302
|
+
try {
|
|
303
|
+
ownerGate();
|
|
304
|
+
}
|
|
305
|
+
catch {
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
if (reservation !== "unused" ||
|
|
309
|
+
ordinal !== 0 ||
|
|
310
|
+
index !== 0 ||
|
|
311
|
+
pending ||
|
|
312
|
+
failedRead ||
|
|
313
|
+
lastFailedRead ||
|
|
314
|
+
rejectionSlot ||
|
|
315
|
+
consumedPost ||
|
|
316
|
+
postAttempt ||
|
|
317
|
+
postState !== "NOT_STARTED") {
|
|
318
|
+
reservation = "invalid";
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
reservation = "reserved";
|
|
322
|
+
return true;
|
|
323
|
+
},
|
|
324
|
+
consumeReadCatch(...args) {
|
|
325
|
+
need(args.length === 0);
|
|
326
|
+
try {
|
|
327
|
+
ownerGate();
|
|
328
|
+
}
|
|
329
|
+
catch {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
const slot = rejectionSlot;
|
|
333
|
+
if (reservation !== "reserved" ||
|
|
334
|
+
!failedRead ||
|
|
335
|
+
pending ||
|
|
336
|
+
!slot ||
|
|
337
|
+
slot.attempt !== lastFailedRead ||
|
|
338
|
+
slot.attempt.generation !== generation ||
|
|
339
|
+
slot.attempt.kind !== "read" ||
|
|
340
|
+
slot.attempt.ordinal > 43)
|
|
341
|
+
return null;
|
|
342
|
+
rejectionSlot = null;
|
|
343
|
+
return Object.freeze({
|
|
344
|
+
phase: "read",
|
|
345
|
+
ordinal: slot.attempt.ordinal,
|
|
346
|
+
diagnostics: slot.record.diagnostics,
|
|
347
|
+
});
|
|
348
|
+
},
|
|
349
|
+
consumePostCatch(actualReply) {
|
|
350
|
+
need(arguments.length === 1);
|
|
351
|
+
try {
|
|
352
|
+
ownerGate();
|
|
353
|
+
}
|
|
354
|
+
catch {
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
const stored = actualReply !== null &&
|
|
358
|
+
(typeof actualReply === "object" || typeof actualReply === "function")
|
|
359
|
+
? postCatchRecords.get(actualReply)
|
|
360
|
+
: undefined;
|
|
361
|
+
if (reservation !== "reserved" ||
|
|
362
|
+
!stored ||
|
|
363
|
+
stored.attempt !== postAttempt ||
|
|
364
|
+
stored.attempt.generation !== generation ||
|
|
365
|
+
stored.attempt.kind !== "post" ||
|
|
366
|
+
postState !== "REJECTED" ||
|
|
367
|
+
pending ||
|
|
368
|
+
stored.attempt.ordinal > 44)
|
|
369
|
+
return null;
|
|
370
|
+
postCatchRecords.delete(actualReply);
|
|
371
|
+
return Object.freeze({
|
|
372
|
+
phase: "post",
|
|
373
|
+
ordinal: stored.attempt.ordinal,
|
|
374
|
+
diagnostics: stored.diagnostics,
|
|
375
|
+
});
|
|
376
|
+
},
|
|
377
|
+
});
|
|
378
|
+
return Object.freeze({ transport, capability });
|
|
379
|
+
}
|
|
380
|
+
//# sourceMappingURL=transportKernel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transportKernel.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/transportKernel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EACL,MAAM,EACN,sBAAsB,EACtB,IAAI,EACJ,IAAI,EACJ,UAAU,GAGX,MAAM,YAAY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C;YACd,CAAC;YACD,MAAM,MAAM,GACV,WAAW,KAAK,IAAI;gBACpB,CAAC,OAAO,WAAW,KAAK,QAAQ,IAAI,OAAO,WAAW,KAAK,UAAU,CAAC;gBACpE,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC;gBACnC,CAAC,CAAC,SAAS,CAAC;YAChB,IACE,WAAW,KAAK,UAAU;gBAC1B,CAAC,MAAM;gBACP,MAAM,CAAC,OAAO,KAAK,WAAW;gBAC9B,MAAM,CAAC,OAAO,CAAC,UAAU,KAAK,UAAU;gBACxC,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM;gBAC9B,SAAS,KAAK,UAAU;gBACxB,OAAO;gBACP,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE;gBAE3B,OAAO,IAAI,CAAC;YACd,gBAAgB,CAAC,MAAM,CAAC,WAAqB,CAAC,CAAC;YAC/C,OAAO,MAAM,CAAC,MAAM,CAAC;gBACnB,KAAK,EAAE,MAAe;gBACtB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO;gBAC/B,WAAW,EAAE,MAAM,CAAC,WAAW;aAChC,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { captureLiveAttachRecovery } from "./recoveryEntry.js";
|
|
1
2
|
import { type InitialOwner } from "./ownerFactory.js";
|
|
2
3
|
import { stockDelegateForInitialLineage } from "./stockDelegateFactory.js";
|
|
3
4
|
import type { createClassActionOperationJournal } from "../operationJournal.js";
|
|
4
5
|
import { createInitialAttachEventCompiler } from "../c10/attachEvents.js";
|
|
5
6
|
import { createInitialMaterialClassifiers } from "../material/classifiers.js";
|
|
7
|
+
import { createInitialTransportForLineage } from "../operations/fixedTransport.js";
|
|
8
|
+
import { type RawAcquisitionResult } from "../acquisition/ownedAcquisition.js";
|
|
9
|
+
import { captureInitialAttachForLineage } from "../operations/initialAttach.js";
|
|
6
10
|
export type InitialInvocationCore = Readonly<{
|
|
7
11
|
owner: InitialOwner;
|
|
8
12
|
basisJSON: string;
|
|
@@ -10,6 +14,10 @@ export type InitialInvocationCore = Readonly<{
|
|
|
10
14
|
owned<T>(work: () => T | PromiseLike<T>): Promise<T>;
|
|
11
15
|
attachEvents(): ReturnType<typeof createInitialAttachEventCompiler>;
|
|
12
16
|
material: ReturnType<typeof createInitialMaterialClassifiers>;
|
|
17
|
+
transport(): ReturnType<typeof createInitialTransportForLineage>;
|
|
18
|
+
acquire(): Promise<RawAcquisitionResult>;
|
|
19
|
+
initialAttach(): ReturnType<typeof captureInitialAttachForLineage>;
|
|
20
|
+
recoverAttach(): ReturnType<typeof captureLiveAttachRecovery>;
|
|
13
21
|
operationalAuthority: false;
|
|
14
22
|
}>;
|
|
15
23
|
/** Node-only private construction. Does not admit an operational runtime profile. */
|