inngest 3.42.0 → 3.42.1
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/_virtual/rolldown_runtime.cjs +7 -0
- package/dist/_virtual/rolldown_runtime.js +8 -1
- package/dist/components/InngestMiddleware.d.cts +4 -1
- package/dist/components/InngestMiddleware.d.cts.map +1 -1
- package/dist/components/InngestMiddleware.d.ts +4 -1
- package/dist/components/InngestMiddleware.d.ts.map +1 -1
- package/dist/components/InngestStepTools.d.cts +37 -2
- package/dist/components/InngestStepTools.d.cts.map +1 -1
- package/dist/components/InngestStepTools.d.ts +37 -2
- package/dist/components/InngestStepTools.d.ts.map +1 -1
- package/dist/components/execution/InngestExecution.cjs +12 -0
- package/dist/components/execution/InngestExecution.cjs.map +1 -1
- package/dist/components/execution/InngestExecution.d.cts +11 -4
- package/dist/components/execution/InngestExecution.d.cts.map +1 -1
- package/dist/components/execution/InngestExecution.d.ts +11 -4
- package/dist/components/execution/InngestExecution.d.ts.map +1 -1
- package/dist/components/execution/InngestExecution.js +8 -1
- package/dist/components/execution/InngestExecution.js.map +1 -1
- package/dist/components/execution/v0.cjs +12 -0
- package/dist/components/execution/v0.cjs.map +1 -1
- package/dist/components/execution/v0.d.cts +140 -0
- package/dist/components/execution/v0.d.cts.map +1 -0
- package/dist/components/execution/v0.d.ts +140 -0
- package/dist/components/execution/v0.d.ts.map +1 -0
- package/dist/components/execution/v0.js +8 -1
- package/dist/components/execution/v0.js.map +1 -1
- package/dist/components/execution/v1.cjs +11 -0
- package/dist/components/execution/v1.cjs.map +1 -1
- package/dist/components/execution/v1.d.cts +118 -0
- package/dist/components/execution/v1.d.cts.map +1 -0
- package/dist/components/execution/v1.d.ts +118 -0
- package/dist/components/execution/v1.d.ts.map +1 -0
- package/dist/components/execution/v1.js +7 -1
- package/dist/components/execution/v1.js.map +1 -1
- package/dist/components/execution/v2.cjs +11 -0
- package/dist/components/execution/v2.cjs.map +1 -1
- package/dist/components/execution/v2.d.cts +118 -0
- package/dist/components/execution/v2.d.cts.map +1 -0
- package/dist/components/execution/v2.d.ts +118 -0
- package/dist/components/execution/v2.d.ts.map +1 -0
- package/dist/components/execution/v2.js +7 -1
- package/dist/components/execution/v2.js.map +1 -1
- package/dist/helpers/ServerTiming.cjs +9 -0
- package/dist/helpers/ServerTiming.cjs.map +1 -1
- package/dist/helpers/ServerTiming.d.cts +4 -2
- package/dist/helpers/ServerTiming.d.cts.map +1 -1
- package/dist/helpers/ServerTiming.d.ts +4 -2
- package/dist/helpers/ServerTiming.d.ts.map +1 -1
- package/dist/helpers/ServerTiming.js +4 -1
- package/dist/helpers/ServerTiming.js.map +1 -1
- package/dist/helpers/errors.cjs +37 -0
- package/dist/helpers/errors.cjs.map +1 -1
- package/dist/helpers/errors.d.cts +193 -0
- package/dist/helpers/errors.d.cts.map +1 -0
- package/dist/helpers/errors.d.ts +193 -0
- package/dist/helpers/errors.d.ts.map +1 -0
- package/dist/helpers/errors.js +36 -4
- package/dist/helpers/errors.js.map +1 -1
- package/dist/helpers/strings.js +4 -4
- package/dist/helpers/strings.js.map +1 -1
- package/dist/internals.cjs +50 -0
- package/dist/internals.d.cts +8 -0
- package/dist/internals.d.ts +8 -0
- package/dist/internals.js +9 -0
- package/dist/types.cjs +18 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +4 -2
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.ts +4 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +14 -1
- package/dist/types.js.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.cts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +9 -1
|
@@ -5,6 +5,12 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
8
14
|
var __copyProps = (to, from, except, desc) => {
|
|
9
15
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
16
|
key = keys[i];
|
|
@@ -22,4 +28,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
28
|
|
|
23
29
|
//#endregion
|
|
24
30
|
|
|
31
|
+
exports.__export = __export;
|
|
25
32
|
exports.__toESM = __toESM;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
|
|
3
3
|
//#region rolldown:runtime
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
4
11
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
5
12
|
|
|
6
13
|
//#endregion
|
|
7
|
-
export { __require };
|
|
14
|
+
export { __export, __require };
|
|
@@ -64,6 +64,9 @@ declare namespace InngestMiddleware {
|
|
|
64
64
|
}
|
|
65
65
|
type Stack = [InngestMiddleware.Like, ...InngestMiddleware.Like[]];
|
|
66
66
|
}
|
|
67
|
+
type FnsWithSameInputAsOutput<TRecord extends Record<string, (arg: any) => any>> = { [K in keyof TRecord as Await<TRecord[K]> extends Parameters<TRecord[K]>[0] ? K : Await<TRecord[K]> extends undefined | void ? Parameters<TRecord[K]>[0] extends undefined | void ? K : never : never]: TRecord[K] };
|
|
68
|
+
type PromisifiedFunctionRecord<TRecord extends Record<string, (arg: any) => any>> = Pick<Partial<{ [K in keyof TRecord]: (...args: Parameters<TRecord[K]>) => Promise<Await<TRecord[K]>> }>, keyof FnsWithSameInputAsOutput<TRecord>> & Omit<Partial<{ [K in keyof TRecord]: (...args: Parameters<TRecord[K]>) => Promise<Parameters<TRecord[K]>[0]> }>, keyof FnsWithSameInputAsOutput<TRecord>>;
|
|
69
|
+
type RunHookStack = PromisifiedFunctionRecord<Await<MiddlewareRegisterReturn["onFunctionRun"]>>;
|
|
67
70
|
/**
|
|
68
71
|
* Options passed to new {@link InngestMiddleware} instance.
|
|
69
72
|
*
|
|
@@ -333,5 +336,5 @@ type ExtendSendEventWithMiddleware<TMiddlewareStacks extends InngestMiddleware.S
|
|
|
333
336
|
*/
|
|
334
337
|
type MiddlewareStackRunInputMutation<TContext, TMiddleware extends InngestMiddleware.Stack> = ObjectAssign<{ [K in keyof TMiddleware]: GetMiddlewareRunInputMutation<TMiddleware[K]> }, TContext>;
|
|
335
338
|
//#endregion
|
|
336
|
-
export { ExtendSendEventWithMiddleware, ExtendWithMiddleware, InngestMiddleware, MiddlewareOptions, MiddlewareRegisterFn, MiddlewareRegisterReturn };
|
|
339
|
+
export { ExtendSendEventWithMiddleware, ExtendWithMiddleware, InngestMiddleware, MiddlewareOptions, MiddlewareRegisterFn, MiddlewareRegisterReturn, RunHookStack };
|
|
337
340
|
//# sourceMappingURL=InngestMiddleware.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InngestMiddleware.d.cts","names":[],"sources":["../../../src/components/InngestMiddleware.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AA0CA;;;;;;;;;;;;AAoCA;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"InngestMiddleware.d.cts","names":[],"sources":["../../../src/components/InngestMiddleware.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AA0CA;;;;;;;;;;;;AAoCA;;;;;;;;;AAUK,cA9CQ,iBA8CgB,CAAA,cA9CgB,iBA8ChB,CAAA,YA7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c,qCACxB,YAAY,OAGhB;KAGU,+CACgB,iBAAA,CAAkB,0BAE1C,2BAEY,oBAAoB,oCAE9B,kBAAkB,OAGtB;KAGU,wDACgB,iBAAA,CAAkB,0BAE1C,2BAEY,oBAAoB,2CAE9B,kBAAkB,OAGtB;;;;KAMU,8DAEU,iBAAA,CAAkB,SACpC,2BAEY,cAAc,8BAA8B,YAAY,OAEtE"}
|
|
@@ -64,6 +64,9 @@ declare namespace InngestMiddleware {
|
|
|
64
64
|
}
|
|
65
65
|
type Stack = [InngestMiddleware.Like, ...InngestMiddleware.Like[]];
|
|
66
66
|
}
|
|
67
|
+
type FnsWithSameInputAsOutput<TRecord extends Record<string, (arg: any) => any>> = { [K in keyof TRecord as Await<TRecord[K]> extends Parameters<TRecord[K]>[0] ? K : Await<TRecord[K]> extends undefined | void ? Parameters<TRecord[K]>[0] extends undefined | void ? K : never : never]: TRecord[K] };
|
|
68
|
+
type PromisifiedFunctionRecord<TRecord extends Record<string, (arg: any) => any>> = Pick<Partial<{ [K in keyof TRecord]: (...args: Parameters<TRecord[K]>) => Promise<Await<TRecord[K]>> }>, keyof FnsWithSameInputAsOutput<TRecord>> & Omit<Partial<{ [K in keyof TRecord]: (...args: Parameters<TRecord[K]>) => Promise<Parameters<TRecord[K]>[0]> }>, keyof FnsWithSameInputAsOutput<TRecord>>;
|
|
69
|
+
type RunHookStack = PromisifiedFunctionRecord<Await<MiddlewareRegisterReturn["onFunctionRun"]>>;
|
|
67
70
|
/**
|
|
68
71
|
* Options passed to new {@link InngestMiddleware} instance.
|
|
69
72
|
*
|
|
@@ -333,5 +336,5 @@ type ExtendSendEventWithMiddleware<TMiddlewareStacks extends InngestMiddleware.S
|
|
|
333
336
|
*/
|
|
334
337
|
type MiddlewareStackRunInputMutation<TContext, TMiddleware extends InngestMiddleware.Stack> = ObjectAssign<{ [K in keyof TMiddleware]: GetMiddlewareRunInputMutation<TMiddleware[K]> }, TContext>;
|
|
335
338
|
//#endregion
|
|
336
|
-
export { ExtendSendEventWithMiddleware, ExtendWithMiddleware, InngestMiddleware, MiddlewareOptions, MiddlewareRegisterFn, MiddlewareRegisterReturn };
|
|
339
|
+
export { ExtendSendEventWithMiddleware, ExtendWithMiddleware, InngestMiddleware, MiddlewareOptions, MiddlewareRegisterFn, MiddlewareRegisterReturn, RunHookStack };
|
|
337
340
|
//# sourceMappingURL=InngestMiddleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InngestMiddleware.d.ts","names":[],"sources":["../../../src/components/InngestMiddleware.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AA0CA;;;;;;;;;;;;AAoCA;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"InngestMiddleware.d.ts","names":[],"sources":["../../../src/components/InngestMiddleware.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AA0CA;;;;;;;;;;;;AAoCA;;;;;;;;;AAUK,cA9CQ,iBA8CgB,CAAA,cA9CgB,iBA8ChB,CAAA,YA7ChB,iBAAA,CAAkB,IA6CF,CAAA;EAAA,KA3CtB,MAAA,CAAO,WAAA,GA2Ce,EAAA,OA3CQ,iBAAA,CAAkB,GA2C1B;;;;;WAIJ,IAAA,EAvCD,KAuCC,CAAA,MAAA,CAAA;;;;;;;;;;;;;;;AAQA;EAGK,SAAA,IAAA,EAjCN,KAiCM,CAAA,MAAA,CAAA;aAEZ,CAAA;IAAA,IAAA;IAAA;EAAA,CAAA,EAjCY,KAiCZ;;AAIQ,kBA/BT,iBAAA,CA+BS;QAAQ,GAAA,EAAA,oBAAA;OAAnB,GAAA,GA5BK,iBA4BL,CA5BuB,iBA4BvB,CAAA;YACQ,IAAA,CAAA;IAAQ,UA3BjB,MAAA,CAAO,WAAA,CA2BU,EAAA,OA3BW,iBAAA,CAAkB,GA2B7B;;OAAtB,KAAA,GAAA,CAzBc,iBAAA,CAAkB,IAyBhC,EAAA,GAzByC,iBAAA,CAAkB,IAyB3D,EAAA,CAAA;;KAtBJ,wBAwB4B,CA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KAAK;;;;;OAKE;WACI;;;;;;;;;;KAaV,kBAAA,SAA2B,sBAAsB;QAE1C;UACE,KAAK;;;;;;;KAkBd,4BAAA,GAA+B;YACxB,cAAc;;;;;;;;KASrB,wBAAA,SACE,iCACF;aAEY;;;;;;;KAYZ,6BAAA;UAA0C,SAAS;;;;;;KAMnD,yBAAA,SACE,kCAEF;WAAwB;;;;;KAKxB,mBAAA;UACK,SAAS,KAAK;SACf,SAAS,KAAK;MACjB;WAES,QAAQ,KAAK;;KAOvB,qBAAA;UACK,SAAS,KAAK;MAClB;;;;KAKD,kDAAkD,iBAAA,CAAkB,QACvE,oBAAoB,iCAChB,sBAAsB,uBACpB,MACE,MAAM,MAAM;;kBAKE,OAAO,KAAK;;;;KAS/B,yDACiB,iBAAA,CAAkB,QACpC,oBAAoB,iCACpB,sBAAsB,uBACpB,MACE,MAAM,MAAM;;kBAKE,UAAU,QAAQ;;;;KAS5B,qEAEU,iBAAA,CAAkB,SACpC,2BAEY,cAAc,qCACxB,YAAY,OAGhB;KAGU,+CACgB,iBAAA,CAAkB,0BAE1C,2BAEY,oBAAoB,oCAE9B,kBAAkB,OAGtB;KAGU,wDACgB,iBAAA,CAAkB,0BAE1C,2BAEY,oBAAoB,2CAE9B,kBAAkB,OAGtB;;;;KAMU,8DAEU,iBAAA,CAAkB,SACpC,2BAEY,cAAc,8BAA8B,YAAY,OAEtE"}
|
|
@@ -9,7 +9,42 @@ import { z } from "zod/v3";
|
|
|
9
9
|
import { AiAdapter, models } from "@inngest/ai";
|
|
10
10
|
|
|
11
11
|
//#region src/components/InngestStepTools.d.ts
|
|
12
|
-
|
|
12
|
+
interface FoundStep extends HashedOp {
|
|
13
|
+
hashedId: string;
|
|
14
|
+
fn?: (...args: unknown[]) => unknown;
|
|
15
|
+
rawArgs: unknown[];
|
|
16
|
+
/**
|
|
17
|
+
* A boolean representing whether the step has been fulfilled, either
|
|
18
|
+
* resolving or rejecting the `Promise` returned to userland code.
|
|
19
|
+
*
|
|
20
|
+
* Note that this is distinct from {@link hasStepState}, which instead tracks
|
|
21
|
+
* whether the step has been given some state from the Executor. State from
|
|
22
|
+
* the Executor could be data other than a resolution or rejection, such as
|
|
23
|
+
* inputs.
|
|
24
|
+
*/
|
|
25
|
+
fulfilled: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* A boolean representing whether the step has been given some state from the
|
|
28
|
+
* Executor. State from the Executor could be data other than a resolution or
|
|
29
|
+
* rejection, such as inputs.
|
|
30
|
+
*
|
|
31
|
+
* This is distinct from {@link fulfilled}, which instead tracks whether the
|
|
32
|
+
* step has been fulfilled, either resolving or rejecting the `Promise`
|
|
33
|
+
* returned to userland code.
|
|
34
|
+
*/
|
|
35
|
+
hasStepState: boolean;
|
|
36
|
+
handled: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The promise that has been returned to userland code for this step.
|
|
39
|
+
*/
|
|
40
|
+
promise: Promise<unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a boolean representing whether or not the step was handled on this
|
|
43
|
+
* invocation.
|
|
44
|
+
*/
|
|
45
|
+
handle: () => boolean;
|
|
46
|
+
input?: unknown;
|
|
47
|
+
}
|
|
13
48
|
type MatchOpFn<T extends (...args: unknown[]) => Promise<unknown> = (...args: unknown[]) => Promise<unknown>> = (stepOptions: StepOptions,
|
|
14
49
|
/**
|
|
15
50
|
* Arguments passed by the user.
|
|
@@ -342,5 +377,5 @@ type AiInferOpts<TModel extends AiAdapter> = {
|
|
|
342
377
|
body: AiAdapter.Input<TModel>;
|
|
343
378
|
};
|
|
344
379
|
//#endregion
|
|
345
|
-
export { createStepTools };
|
|
380
|
+
export { FoundStep, createStepTools };
|
|
346
381
|
//# sourceMappingURL=InngestStepTools.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InngestStepTools.d.cts","names":[],"sources":["../../../src/components/InngestStepTools.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InngestStepTools.d.cts","names":[],"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;;;;;;;;;;;;;;;;6BAiBwB;;;;;;;;;;;;;;;;;;KAoBxB,gCACY,eAAe,2CACF;SAErB;;;;;;;;;;;6BAYoB;IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgDC,2BAA2B;;;;;;;;;;;;;;;;;;;SAmBvB;;;;QAKD,SAAA,CAAU,MAAM"}
|
|
@@ -9,7 +9,42 @@ import { z } from "zod/v3";
|
|
|
9
9
|
import { AiAdapter, models } from "@inngest/ai";
|
|
10
10
|
|
|
11
11
|
//#region src/components/InngestStepTools.d.ts
|
|
12
|
-
|
|
12
|
+
interface FoundStep extends HashedOp {
|
|
13
|
+
hashedId: string;
|
|
14
|
+
fn?: (...args: unknown[]) => unknown;
|
|
15
|
+
rawArgs: unknown[];
|
|
16
|
+
/**
|
|
17
|
+
* A boolean representing whether the step has been fulfilled, either
|
|
18
|
+
* resolving or rejecting the `Promise` returned to userland code.
|
|
19
|
+
*
|
|
20
|
+
* Note that this is distinct from {@link hasStepState}, which instead tracks
|
|
21
|
+
* whether the step has been given some state from the Executor. State from
|
|
22
|
+
* the Executor could be data other than a resolution or rejection, such as
|
|
23
|
+
* inputs.
|
|
24
|
+
*/
|
|
25
|
+
fulfilled: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* A boolean representing whether the step has been given some state from the
|
|
28
|
+
* Executor. State from the Executor could be data other than a resolution or
|
|
29
|
+
* rejection, such as inputs.
|
|
30
|
+
*
|
|
31
|
+
* This is distinct from {@link fulfilled}, which instead tracks whether the
|
|
32
|
+
* step has been fulfilled, either resolving or rejecting the `Promise`
|
|
33
|
+
* returned to userland code.
|
|
34
|
+
*/
|
|
35
|
+
hasStepState: boolean;
|
|
36
|
+
handled: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The promise that has been returned to userland code for this step.
|
|
39
|
+
*/
|
|
40
|
+
promise: Promise<unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a boolean representing whether or not the step was handled on this
|
|
43
|
+
* invocation.
|
|
44
|
+
*/
|
|
45
|
+
handle: () => boolean;
|
|
46
|
+
input?: unknown;
|
|
47
|
+
}
|
|
13
48
|
type MatchOpFn<T extends (...args: unknown[]) => Promise<unknown> = (...args: unknown[]) => Promise<unknown>> = (stepOptions: StepOptions,
|
|
14
49
|
/**
|
|
15
50
|
* Arguments passed by the user.
|
|
@@ -342,5 +377,5 @@ type AiInferOpts<TModel extends AiAdapter> = {
|
|
|
342
377
|
body: AiAdapter.Input<TModel>;
|
|
343
378
|
};
|
|
344
379
|
//#endregion
|
|
345
|
-
export { createStepTools };
|
|
380
|
+
export { FoundStep, createStepTools };
|
|
346
381
|
//# sourceMappingURL=InngestStepTools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InngestStepTools.d.ts","names":[],"sources":["../../../src/components/InngestStepTools.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InngestStepTools.d.ts","names":[],"sources":["../../../src/components/InngestStepTools.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;UAsCiB,SAAA,SAAkB;;;EAAlB,OAAA,EAAA,OAAU,EAAA;EAAA;;;;AA6C3B;;;;;WASiC,EAAA,OAAA;;;;;AAGjC;;;;;cAIM,EAAA,OAAA;;EAEW;;;SAGV,EAlCI,OAkCJ,CAAA,OAAA,CAAA;;;;AA2CP;EAwiBC,MAAA,EAAA,GAAA,GAAA,OAAA;OAxiB+C,CAAA,EAAA,OAAQ;;AAE3C,KAlED,SAkEC,CAAA,UAAA,CAAA,GAAA,IAAA,EAAA,OAAA,EAAA,EAAA,GAjEuB,OAiEvB,CAAA,OAAA,CAAA,GAAA,CAAA,GAAA,IAAA,EAAA,OAAA,EAAA,EAAA,GA/DN,OA+DM,CAAA,OAAA,CAAA,CAAA,GAAA,CAAA,WAAA,EA7DE,WA6DF;;;;OAmIU,EA5LZ,qBA4LY,CA5LU,CA4LV,CAAA,EAAA,GA3LlB,IA2LkB,CA3Lb,QA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,UA2oBlB,CA3oB6B,GA2oB7B,CAAA,EAAA,GA3oBsC,OA2oBtC,CAAA,KAAA,EAAA,CAAA,IA1oBA,OA0oBA,CA1oBQ,CA0oBR,SAAA,IAAA,GAAA,IAAA,GA1oBgC,CA0oBhC,CAAA,GAzoBA,UAyoBA,CAzoBW,GAyoBX,CAAA,SAAA,IAAA,GAAA,IAAA,GAvoBE,UAuoBF,CAvoBa,GAuoBb,CAAA,CAAA,CAAA,CAAA;IAAgB;;;IAwBxB,MAAA,EAAA;;;;;;;;;;;;;;;;;;uBA1Ya,0DAMV;;;;;;;4BA4BU,uBAKP,oDACH;;;;;;;;;6BA4Cc,6CACJ,uBACP,eAAe,eAClB,iBAAiB,kBAAkB;;;;;;;;;;KA2IzC,uCAAuC;YAChC;;KAGP,iCAAiC,kCACpC,qBAAqB,aACnB,KAAK,yBAAyB;;;;;;;;;;;;;;;8BAeA;;;;;KAM7B,cAAA;;;;;;;;;;;;;KAeA,iBAAA;;;;;;;;;;;;;;;;6BAiBwB;;;;;;;;;;;;;;;;;;KAoBxB,gCACY,eAAe,2CACF;SAErB;;;;;;;;;;;6BAYoB;IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgDC,2BAA2B;;;;;;;;;;;;;;;;;;;SAmBvB;;;;QAKD,SAAA,CAAU,MAAM"}
|
|
@@ -3,6 +3,12 @@ const require_consts = require('../../helpers/consts.cjs');
|
|
|
3
3
|
const debug = require_rolldown_runtime.__toESM(require("debug"));
|
|
4
4
|
|
|
5
5
|
//#region src/components/execution/InngestExecution.ts
|
|
6
|
+
var InngestExecution_exports = {};
|
|
7
|
+
require_rolldown_runtime.__export(InngestExecution_exports, {
|
|
8
|
+
ExecutionVersion: () => require_consts.ExecutionVersion,
|
|
9
|
+
InngestExecution: () => InngestExecution,
|
|
10
|
+
PREFERRED_EXECUTION_VERSION: () => PREFERRED_EXECUTION_VERSION
|
|
11
|
+
});
|
|
6
12
|
/**
|
|
7
13
|
* The preferred execution version that will be used by the SDK when handling
|
|
8
14
|
* brand new runs where the Executor is allowing us to choose.
|
|
@@ -21,5 +27,11 @@ var InngestExecution = class {
|
|
|
21
27
|
|
|
22
28
|
//#endregion
|
|
23
29
|
exports.InngestExecution = InngestExecution;
|
|
30
|
+
Object.defineProperty(exports, 'InngestExecution_exports', {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return InngestExecution_exports;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
24
36
|
exports.PREFERRED_EXECUTION_VERSION = PREFERRED_EXECUTION_VERSION;
|
|
25
37
|
//# sourceMappingURL=InngestExecution.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InngestExecution.cjs","names":["ExecutionVersion","options: InngestExecutionOptions","debugPrefix"],"sources":["../../../src/components/execution/InngestExecution.ts"],"sourcesContent":["import Debug, { type Debugger } from \"debug\";\nimport { debugPrefix, ExecutionVersion } from \"../../helpers/consts.ts\";\nimport type { ServerTiming } from \"../../helpers/ServerTiming.ts\";\nimport type { MaybePromise, Simplify } from \"../../helpers/types.ts\";\nimport type { Context, IncomingOp, OutgoingOp } from \"../../types.ts\";\nimport type { Inngest } from \"../Inngest.ts\";\nimport type { ActionResponse } from \"../InngestCommHandler.ts\";\nimport type { InngestFunction } from \"../InngestFunction.ts\";\n\n/**\n * The possible results of an execution.\n */\nexport interface ExecutionResults {\n \"function-resolved\": { data: unknown };\n \"step-ran\": { step: OutgoingOp; retriable?: boolean | string };\n \"function-rejected\": { error: unknown; retriable: boolean | string };\n \"steps-found\": { steps: [OutgoingOp, ...OutgoingOp[]] };\n \"step-not-found\": { step: OutgoingOp };\n}\n\nexport type ExecutionResult = {\n [K in keyof ExecutionResults]: Simplify<\n {\n type: K;\n ctx: Context.Any;\n ops: Record<string, MemoizedOp>;\n } & ExecutionResults[K]\n >;\n}[keyof ExecutionResults];\n\nexport type ExecutionResultHandler<T = ActionResponse> = (\n result: ExecutionResult,\n) => MaybePromise<T>;\n\nexport type ExecutionResultHandlers<T = ActionResponse> = {\n [E in ExecutionResult as E[\"type\"]]: (result: E) => MaybePromise<T>;\n};\n\nexport interface MemoizedOp extends IncomingOp {\n /**\n * If the step has been hit during this run, these will be the arguments\n * passed to it.\n */\n rawArgs?: unknown[];\n fulfilled?: boolean;\n\n /**\n * The promise that has been returned to userland code.\n */\n promise?: Promise<unknown>;\n seen?: boolean;\n}\n\n/**\n * The preferred execution version that will be used by the SDK when handling\n * brand new runs where the Executor is allowing us to choose.\n *\n * Changing this should not ever be a breaking change, as this will only change\n * new runs, not existing ones.\n */\nexport const PREFERRED_EXECUTION_VERSION =\n ExecutionVersion.V1 satisfies ExecutionVersion;\n\n/**\n * Options for creating a new {@link InngestExecution} instance.\n */\nexport interface InngestExecutionOptions {\n client: Inngest.Any;\n fn: InngestFunction.Any;\n reqArgs: unknown[];\n runId: string;\n data: Omit<Context.Any, \"step\">;\n stepState: Record<string, MemoizedOp>;\n stepCompletionOrder: string[];\n\n /**\n * Headers to be sent with any request to Inngest during this execution.\n */\n headers: Record<string, string>;\n requestedRunStep?: string;\n timer?: ServerTiming;\n isFailureHandler?: boolean;\n disableImmediateExecution?: boolean;\n\n /**\n * Provide the ability to transform the context passed to the function before\n * the execution starts.\n */\n transformCtx?: (ctx: Readonly<Context.Any>) => Context.Any;\n}\n\nexport type InngestExecutionFactory = (\n options: InngestExecutionOptions,\n) => IInngestExecution;\n\nexport class InngestExecution {\n protected debug: Debugger;\n\n constructor(protected options: InngestExecutionOptions) {\n this.debug = Debug(`${debugPrefix}:${this.options.runId}`);\n }\n}\n\nexport interface IInngestExecution {\n start(): Promise<ExecutionResult>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InngestExecution.cjs","names":["ExecutionVersion","options: InngestExecutionOptions","debugPrefix"],"sources":["../../../src/components/execution/InngestExecution.ts"],"sourcesContent":["import Debug, { type Debugger } from \"debug\";\nimport { debugPrefix, ExecutionVersion } from \"../../helpers/consts.ts\";\nimport type { ServerTiming } from \"../../helpers/ServerTiming.ts\";\nimport type { MaybePromise, Simplify } from \"../../helpers/types.ts\";\nimport type { Context, IncomingOp, OutgoingOp } from \"../../types.ts\";\nimport type { Inngest } from \"../Inngest.ts\";\nimport type { ActionResponse } from \"../InngestCommHandler.ts\";\nimport type { InngestFunction } from \"../InngestFunction.ts\";\n\n// Re-export ExecutionVersion so it's correctly recognized as an enum and not\n// just a type. This can be lost when bundling if we don't re-export it here.\n// See `pnpm run test:dist`.\nexport { ExecutionVersion };\n\n/**\n * The possible results of an execution.\n */\nexport interface ExecutionResults {\n \"function-resolved\": { data: unknown };\n \"step-ran\": { step: OutgoingOp; retriable?: boolean | string };\n \"function-rejected\": { error: unknown; retriable: boolean | string };\n \"steps-found\": { steps: [OutgoingOp, ...OutgoingOp[]] };\n \"step-not-found\": { step: OutgoingOp };\n}\n\nexport type ExecutionResult = {\n [K in keyof ExecutionResults]: Simplify<\n {\n type: K;\n ctx: Context.Any;\n ops: Record<string, MemoizedOp>;\n } & ExecutionResults[K]\n >;\n}[keyof ExecutionResults];\n\nexport type ExecutionResultHandler<T = ActionResponse> = (\n result: ExecutionResult,\n) => MaybePromise<T>;\n\nexport type ExecutionResultHandlers<T = ActionResponse> = {\n [E in ExecutionResult as E[\"type\"]]: (result: E) => MaybePromise<T>;\n};\n\nexport interface MemoizedOp extends IncomingOp {\n /**\n * If the step has been hit during this run, these will be the arguments\n * passed to it.\n */\n rawArgs?: unknown[];\n fulfilled?: boolean;\n\n /**\n * The promise that has been returned to userland code.\n */\n promise?: Promise<unknown>;\n seen?: boolean;\n}\n\n/**\n * The preferred execution version that will be used by the SDK when handling\n * brand new runs where the Executor is allowing us to choose.\n *\n * Changing this should not ever be a breaking change, as this will only change\n * new runs, not existing ones.\n */\nexport const PREFERRED_EXECUTION_VERSION =\n ExecutionVersion.V1 satisfies ExecutionVersion;\n\n/**\n * Options for creating a new {@link InngestExecution} instance.\n */\nexport interface InngestExecutionOptions {\n client: Inngest.Any;\n fn: InngestFunction.Any;\n reqArgs: unknown[];\n runId: string;\n data: Omit<Context.Any, \"step\">;\n stepState: Record<string, MemoizedOp>;\n stepCompletionOrder: string[];\n\n /**\n * Headers to be sent with any request to Inngest during this execution.\n */\n headers: Record<string, string>;\n requestedRunStep?: string;\n timer?: ServerTiming;\n isFailureHandler?: boolean;\n disableImmediateExecution?: boolean;\n\n /**\n * Provide the ability to transform the context passed to the function before\n * the execution starts.\n */\n transformCtx?: (ctx: Readonly<Context.Any>) => Context.Any;\n}\n\nexport type InngestExecutionFactory = (\n options: InngestExecutionOptions,\n) => IInngestExecution;\n\nexport class InngestExecution {\n protected debug: Debugger;\n\n constructor(protected options: InngestExecutionOptions) {\n this.debug = Debug(`${debugPrefix}:${this.options.runId}`);\n }\n}\n\nexport interface IInngestExecution {\n start(): Promise<ExecutionResult>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiEA,MAAa,8BACXA,gCAAiB;AAkCnB,IAAa,mBAAb,MAA8B;CAC5B,AAAU;CAEV,YAAY,AAAUC,SAAkC;EAAlC;AACpB,OAAK,2BAAc,GAAGC,2BAAY,GAAG,KAAK,QAAQ"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExecutionVersion } from "../../helpers/consts.cjs";
|
|
2
|
+
import { MaybePromise, Simplify } from "../../helpers/types.cjs";
|
|
2
3
|
import { ServerTiming } from "../../helpers/ServerTiming.cjs";
|
|
3
4
|
import { InngestFunction } from "../InngestFunction.cjs";
|
|
4
5
|
import { Context, IncomingOp, OutgoingOp } from "../../types.cjs";
|
|
5
6
|
import { Inngest } from "../Inngest.cjs";
|
|
7
|
+
import { ActionResponse } from "../InngestCommHandler.cjs";
|
|
6
8
|
import { Debugger } from "debug";
|
|
7
9
|
|
|
8
10
|
//#region src/components/execution/InngestExecution.d.ts
|
|
9
|
-
|
|
11
|
+
declare namespace InngestExecution_d_exports {
|
|
12
|
+
export { ExecutionResult, ExecutionResultHandler, ExecutionResultHandlers, ExecutionResults, ExecutionVersion, IInngestExecution, InngestExecution, InngestExecutionFactory, InngestExecutionOptions, MemoizedOp, PREFERRED_EXECUTION_VERSION };
|
|
13
|
+
}
|
|
10
14
|
/**
|
|
11
15
|
* The possible results of an execution.
|
|
12
16
|
*/
|
|
@@ -34,6 +38,8 @@ type ExecutionResult = { [K in keyof ExecutionResults]: Simplify<{
|
|
|
34
38
|
ctx: Context.Any;
|
|
35
39
|
ops: Record<string, MemoizedOp>;
|
|
36
40
|
} & ExecutionResults[K]> }[keyof ExecutionResults];
|
|
41
|
+
type ExecutionResultHandler<T = ActionResponse> = (result: ExecutionResult) => MaybePromise<T>;
|
|
42
|
+
type ExecutionResultHandlers<T = ActionResponse> = { [E in ExecutionResult as E["type"]]: (result: E) => MaybePromise<T> };
|
|
37
43
|
interface MemoizedOp extends IncomingOp {
|
|
38
44
|
/**
|
|
39
45
|
* If the step has been hit during this run, these will be the arguments
|
|
@@ -54,7 +60,7 @@ interface MemoizedOp extends IncomingOp {
|
|
|
54
60
|
* Changing this should not ever be a breaking change, as this will only change
|
|
55
61
|
* new runs, not existing ones.
|
|
56
62
|
*/
|
|
57
|
-
|
|
63
|
+
declare const PREFERRED_EXECUTION_VERSION = ExecutionVersion.V1;
|
|
58
64
|
/**
|
|
59
65
|
* Options for creating a new {@link InngestExecution} instance.
|
|
60
66
|
*/
|
|
@@ -80,6 +86,7 @@ interface InngestExecutionOptions {
|
|
|
80
86
|
*/
|
|
81
87
|
transformCtx?: (ctx: Readonly<Context.Any>) => Context.Any;
|
|
82
88
|
}
|
|
89
|
+
type InngestExecutionFactory = (options: InngestExecutionOptions) => IInngestExecution;
|
|
83
90
|
declare class InngestExecution {
|
|
84
91
|
protected options: InngestExecutionOptions;
|
|
85
92
|
protected debug: Debugger;
|
|
@@ -89,5 +96,5 @@ interface IInngestExecution {
|
|
|
89
96
|
start(): Promise<ExecutionResult>;
|
|
90
97
|
}
|
|
91
98
|
//#endregion
|
|
92
|
-
export { ExecutionResult, IInngestExecution, InngestExecution, InngestExecutionOptions };
|
|
99
|
+
export { ExecutionResult, IInngestExecution, InngestExecution, InngestExecutionFactory, InngestExecutionOptions, InngestExecution_d_exports, MemoizedOp };
|
|
93
100
|
//# sourceMappingURL=InngestExecution.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InngestExecution.d.cts","names":[],"sources":["../../../../src/components/execution/InngestExecution.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InngestExecution.d.cts","names":[],"sources":["../../../../src/components/execution/InngestExecution.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;UAiBiB,gBAAA;;;;;UAEK;;;;;;;;IAFL,KAAA,EAAA,CAIU,UAJM,EAAA,GAIS,UAJT,EAAA,CAAA;EAAA,CAAA;kBAEX,EAAA;IAEK,IAAA,EACC,UADD;;;KAIf,eAAA,WAAA,MACE,gBADa,GACM,QADN,CAAA;EAAA,IAAA,EAGf,CAHe;EACb,GAAA,EAGH,OAAA,CAAQ,GAHL;EAEF,GAAA,EAED,MAFC,CAAA,MAAA,EAEc,UAFd,CAAA;IAGJ,gBAFW,CAEM,CAFN,CAAA,CAAA,SAIX,gBAHkB,CAAA;AAAf,KAKC,sBALD,CAAA,IAK4B,cAL5B,CAAA,GAAA,CAAA,MAAA,EAMD,eANC,EAAA,GAON,YAPM,CAOO,CAPP,CAAA;AACH,KAQI,uBARJ,CAAA,IAQgC,cARhC,CAAA,GAAA,QASA,eATiB,IASE,CATF,CAAA,MAAA,CAAA,GAAA,CAAA,MAAA,EASuB,CATvB,EAAA,GAS6B,YAT7B,CAS0C,CAT1C,CAAA;AAEjB,UAUS,UAAA,SAAmB,UAV5B,CAAA;;AAER;;;SACU,CAAA,EAAA,OAAA,EAAA;WACQ,CAAA,EAAA,OAAA;;;AAElB;EAAmC,OAAA,CAAA,EAevB,OAfuB,CAAA,OAAA,CAAA;MAAK,CAAA,EAAA,OAAA;;;;;;;AAIxC;;AAWY,cAWC,2BAAA,GAXD,gBAAA,CAAA,EAAA;;;AAWZ;AAMiB,UAAA,uBAAA,CAAuB;EAAA,MAAA,EAC9B,OAAA,CAAQ,GADsB;MAElC,eAAA,CAAgB,GADJ;SACZ,EAAA,OAAA,EAAA;OAGO,EAAA,MAAQ;MAAb,EAAA,IAAA,CAAK,OAAA,CAAQ,GAAb,EAAA,MAAA,CAAA;WACoB,EAAf,MAAe,CAAA,MAAA,EAAA,UAAA,CAAA;qBAAf,EAAA,MAAA,EAAA;;;;SAgBU,EAVZ,MAUY,CAAA,MAAA,EAAA,MAAA,CAAA;kBAAkC,CAAA,EAAA,MAAA;UAR/C;EAWE,gBAAA,CAAA,EAAA,OAAuB;EAAA,yBAAA,CAAA,EAAA,OAAA;;;;AAInC;EAA6B,YAAA,CAAA,EAAA,CAAA,GAAA,EAPN,QAOM,CAPG,OAAA,CAAQ,GAOX,CAAA,EAAA,GAPoB,OAAA,CAAQ,GAO5B;;AACV,KALP,uBAAA,GAKO,CAAA,OAAA,EAJR,uBAIQ,EAAA,GAHd,iBAGc;AAEc,cAHpB,gBAAA,CAGoB;qBAAA;EAKhB,UAAA,KAAA,EAPE,QAOe;EAAA,WAAA,CAAA,OAAA,EALD,uBAKC;;AACvB,UADM,iBAAA,CACN;WAAA,QAAQ"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExecutionVersion } from "../../helpers/consts.js";
|
|
2
|
+
import { MaybePromise, Simplify } from "../../helpers/types.js";
|
|
2
3
|
import { ServerTiming } from "../../helpers/ServerTiming.js";
|
|
3
4
|
import { InngestFunction } from "../InngestFunction.js";
|
|
4
5
|
import { Context, IncomingOp, OutgoingOp } from "../../types.js";
|
|
5
6
|
import { Inngest } from "../Inngest.js";
|
|
7
|
+
import { ActionResponse } from "../InngestCommHandler.js";
|
|
6
8
|
import { Debugger } from "debug";
|
|
7
9
|
|
|
8
10
|
//#region src/components/execution/InngestExecution.d.ts
|
|
9
|
-
|
|
11
|
+
declare namespace InngestExecution_d_exports {
|
|
12
|
+
export { ExecutionResult, ExecutionResultHandler, ExecutionResultHandlers, ExecutionResults, ExecutionVersion, IInngestExecution, InngestExecution, InngestExecutionFactory, InngestExecutionOptions, MemoizedOp, PREFERRED_EXECUTION_VERSION };
|
|
13
|
+
}
|
|
10
14
|
/**
|
|
11
15
|
* The possible results of an execution.
|
|
12
16
|
*/
|
|
@@ -34,6 +38,8 @@ type ExecutionResult = { [K in keyof ExecutionResults]: Simplify<{
|
|
|
34
38
|
ctx: Context.Any;
|
|
35
39
|
ops: Record<string, MemoizedOp>;
|
|
36
40
|
} & ExecutionResults[K]> }[keyof ExecutionResults];
|
|
41
|
+
type ExecutionResultHandler<T = ActionResponse> = (result: ExecutionResult) => MaybePromise<T>;
|
|
42
|
+
type ExecutionResultHandlers<T = ActionResponse> = { [E in ExecutionResult as E["type"]]: (result: E) => MaybePromise<T> };
|
|
37
43
|
interface MemoizedOp extends IncomingOp {
|
|
38
44
|
/**
|
|
39
45
|
* If the step has been hit during this run, these will be the arguments
|
|
@@ -54,7 +60,7 @@ interface MemoizedOp extends IncomingOp {
|
|
|
54
60
|
* Changing this should not ever be a breaking change, as this will only change
|
|
55
61
|
* new runs, not existing ones.
|
|
56
62
|
*/
|
|
57
|
-
|
|
63
|
+
declare const PREFERRED_EXECUTION_VERSION = ExecutionVersion.V1;
|
|
58
64
|
/**
|
|
59
65
|
* Options for creating a new {@link InngestExecution} instance.
|
|
60
66
|
*/
|
|
@@ -80,6 +86,7 @@ interface InngestExecutionOptions {
|
|
|
80
86
|
*/
|
|
81
87
|
transformCtx?: (ctx: Readonly<Context.Any>) => Context.Any;
|
|
82
88
|
}
|
|
89
|
+
type InngestExecutionFactory = (options: InngestExecutionOptions) => IInngestExecution;
|
|
83
90
|
declare class InngestExecution {
|
|
84
91
|
protected options: InngestExecutionOptions;
|
|
85
92
|
protected debug: Debugger;
|
|
@@ -89,5 +96,5 @@ interface IInngestExecution {
|
|
|
89
96
|
start(): Promise<ExecutionResult>;
|
|
90
97
|
}
|
|
91
98
|
//#endregion
|
|
92
|
-
export { ExecutionResult, IInngestExecution, InngestExecution, InngestExecutionOptions };
|
|
99
|
+
export { ExecutionResult, IInngestExecution, InngestExecution, InngestExecutionFactory, InngestExecutionOptions, InngestExecution_d_exports, MemoizedOp };
|
|
93
100
|
//# sourceMappingURL=InngestExecution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InngestExecution.d.ts","names":[],"sources":["../../../../src/components/execution/InngestExecution.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InngestExecution.d.ts","names":[],"sources":["../../../../src/components/execution/InngestExecution.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;UAiBiB,gBAAA;;;;;UAEK;;;;;;;;IAFL,KAAA,EAAA,CAIU,UAJM,EAAA,GAIS,UAJT,EAAA,CAAA;EAAA,CAAA;kBAEX,EAAA;IAEK,IAAA,EACC,UADD;;;KAIf,eAAA,WAAA,MACE,gBADa,GACM,QADN,CAAA;EAAA,IAAA,EAGf,CAHe;EACb,GAAA,EAGH,OAAA,CAAQ,GAHL;EAEF,GAAA,EAED,MAFC,CAAA,MAAA,EAEc,UAFd,CAAA;IAGJ,gBAFW,CAEM,CAFN,CAAA,CAAA,SAIX,gBAHkB,CAAA;AAAf,KAKC,sBALD,CAAA,IAK4B,cAL5B,CAAA,GAAA,CAAA,MAAA,EAMD,eANC,EAAA,GAON,YAPM,CAOO,CAPP,CAAA;AACH,KAQI,uBARJ,CAAA,IAQgC,cARhC,CAAA,GAAA,QASA,eATiB,IASE,CATF,CAAA,MAAA,CAAA,GAAA,CAAA,MAAA,EASuB,CATvB,EAAA,GAS6B,YAT7B,CAS0C,CAT1C,CAAA;AAEjB,UAUS,UAAA,SAAmB,UAV5B,CAAA;;AAER;;;SACU,CAAA,EAAA,OAAA,EAAA;WACQ,CAAA,EAAA,OAAA;;;AAElB;EAAmC,OAAA,CAAA,EAevB,OAfuB,CAAA,OAAA,CAAA;MAAK,CAAA,EAAA,OAAA;;;;;;;AAIxC;;AAWY,cAWC,2BAAA,GAXD,gBAAA,CAAA,EAAA;;;AAWZ;AAMiB,UAAA,uBAAA,CAAuB;EAAA,MAAA,EAC9B,OAAA,CAAQ,GADsB;MAElC,eAAA,CAAgB,GADJ;SACZ,EAAA,OAAA,EAAA;OAGO,EAAA,MAAQ;MAAb,EAAA,IAAA,CAAK,OAAA,CAAQ,GAAb,EAAA,MAAA,CAAA;WACoB,EAAf,MAAe,CAAA,MAAA,EAAA,UAAA,CAAA;qBAAf,EAAA,MAAA,EAAA;;;;SAgBU,EAVZ,MAUY,CAAA,MAAA,EAAA,MAAA,CAAA;kBAAkC,CAAA,EAAA,MAAA;UAR/C;EAWE,gBAAA,CAAA,EAAA,OAAuB;EAAA,yBAAA,CAAA,EAAA,OAAA;;;;AAInC;EAA6B,YAAA,CAAA,EAAA,CAAA,GAAA,EAPN,QAOM,CAPG,OAAA,CAAQ,GAOX,CAAA,EAAA,GAPoB,OAAA,CAAQ,GAO5B;;AACV,KALP,uBAAA,GAKO,CAAA,OAAA,EAJR,uBAIQ,EAAA,GAHd,iBAGc;AAEc,cAHpB,gBAAA,CAGoB;qBAAA;EAKhB,UAAA,KAAA,EAPE,QAOe;EAAA,WAAA,CAAA,OAAA,EALD,uBAKC;;AACvB,UADM,iBAAA,CACN;WAAA,QAAQ"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { __export } from "../../_virtual/rolldown_runtime.js";
|
|
1
2
|
import { ExecutionVersion, debugPrefix } from "../../helpers/consts.js";
|
|
2
3
|
import debug from "debug";
|
|
3
4
|
|
|
4
5
|
//#region src/components/execution/InngestExecution.ts
|
|
6
|
+
var InngestExecution_exports = {};
|
|
7
|
+
__export(InngestExecution_exports, {
|
|
8
|
+
ExecutionVersion: () => ExecutionVersion,
|
|
9
|
+
InngestExecution: () => InngestExecution,
|
|
10
|
+
PREFERRED_EXECUTION_VERSION: () => PREFERRED_EXECUTION_VERSION
|
|
11
|
+
});
|
|
5
12
|
/**
|
|
6
13
|
* The preferred execution version that will be used by the SDK when handling
|
|
7
14
|
* brand new runs where the Executor is allowing us to choose.
|
|
@@ -19,5 +26,5 @@ var InngestExecution = class {
|
|
|
19
26
|
};
|
|
20
27
|
|
|
21
28
|
//#endregion
|
|
22
|
-
export { InngestExecution, PREFERRED_EXECUTION_VERSION };
|
|
29
|
+
export { InngestExecution, InngestExecution_exports, PREFERRED_EXECUTION_VERSION };
|
|
23
30
|
//# sourceMappingURL=InngestExecution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InngestExecution.js","names":["options: InngestExecutionOptions","Debug"],"sources":["../../../src/components/execution/InngestExecution.ts"],"sourcesContent":["import Debug, { type Debugger } from \"debug\";\nimport { debugPrefix, ExecutionVersion } from \"../../helpers/consts.ts\";\nimport type { ServerTiming } from \"../../helpers/ServerTiming.ts\";\nimport type { MaybePromise, Simplify } from \"../../helpers/types.ts\";\nimport type { Context, IncomingOp, OutgoingOp } from \"../../types.ts\";\nimport type { Inngest } from \"../Inngest.ts\";\nimport type { ActionResponse } from \"../InngestCommHandler.ts\";\nimport type { InngestFunction } from \"../InngestFunction.ts\";\n\n/**\n * The possible results of an execution.\n */\nexport interface ExecutionResults {\n \"function-resolved\": { data: unknown };\n \"step-ran\": { step: OutgoingOp; retriable?: boolean | string };\n \"function-rejected\": { error: unknown; retriable: boolean | string };\n \"steps-found\": { steps: [OutgoingOp, ...OutgoingOp[]] };\n \"step-not-found\": { step: OutgoingOp };\n}\n\nexport type ExecutionResult = {\n [K in keyof ExecutionResults]: Simplify<\n {\n type: K;\n ctx: Context.Any;\n ops: Record<string, MemoizedOp>;\n } & ExecutionResults[K]\n >;\n}[keyof ExecutionResults];\n\nexport type ExecutionResultHandler<T = ActionResponse> = (\n result: ExecutionResult,\n) => MaybePromise<T>;\n\nexport type ExecutionResultHandlers<T = ActionResponse> = {\n [E in ExecutionResult as E[\"type\"]]: (result: E) => MaybePromise<T>;\n};\n\nexport interface MemoizedOp extends IncomingOp {\n /**\n * If the step has been hit during this run, these will be the arguments\n * passed to it.\n */\n rawArgs?: unknown[];\n fulfilled?: boolean;\n\n /**\n * The promise that has been returned to userland code.\n */\n promise?: Promise<unknown>;\n seen?: boolean;\n}\n\n/**\n * The preferred execution version that will be used by the SDK when handling\n * brand new runs where the Executor is allowing us to choose.\n *\n * Changing this should not ever be a breaking change, as this will only change\n * new runs, not existing ones.\n */\nexport const PREFERRED_EXECUTION_VERSION =\n ExecutionVersion.V1 satisfies ExecutionVersion;\n\n/**\n * Options for creating a new {@link InngestExecution} instance.\n */\nexport interface InngestExecutionOptions {\n client: Inngest.Any;\n fn: InngestFunction.Any;\n reqArgs: unknown[];\n runId: string;\n data: Omit<Context.Any, \"step\">;\n stepState: Record<string, MemoizedOp>;\n stepCompletionOrder: string[];\n\n /**\n * Headers to be sent with any request to Inngest during this execution.\n */\n headers: Record<string, string>;\n requestedRunStep?: string;\n timer?: ServerTiming;\n isFailureHandler?: boolean;\n disableImmediateExecution?: boolean;\n\n /**\n * Provide the ability to transform the context passed to the function before\n * the execution starts.\n */\n transformCtx?: (ctx: Readonly<Context.Any>) => Context.Any;\n}\n\nexport type InngestExecutionFactory = (\n options: InngestExecutionOptions,\n) => IInngestExecution;\n\nexport class InngestExecution {\n protected debug: Debugger;\n\n constructor(protected options: InngestExecutionOptions) {\n this.debug = Debug(`${debugPrefix}:${this.options.runId}`);\n }\n}\n\nexport interface IInngestExecution {\n start(): Promise<ExecutionResult>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InngestExecution.js","names":["options: InngestExecutionOptions","Debug"],"sources":["../../../src/components/execution/InngestExecution.ts"],"sourcesContent":["import Debug, { type Debugger } from \"debug\";\nimport { debugPrefix, ExecutionVersion } from \"../../helpers/consts.ts\";\nimport type { ServerTiming } from \"../../helpers/ServerTiming.ts\";\nimport type { MaybePromise, Simplify } from \"../../helpers/types.ts\";\nimport type { Context, IncomingOp, OutgoingOp } from \"../../types.ts\";\nimport type { Inngest } from \"../Inngest.ts\";\nimport type { ActionResponse } from \"../InngestCommHandler.ts\";\nimport type { InngestFunction } from \"../InngestFunction.ts\";\n\n// Re-export ExecutionVersion so it's correctly recognized as an enum and not\n// just a type. This can be lost when bundling if we don't re-export it here.\n// See `pnpm run test:dist`.\nexport { ExecutionVersion };\n\n/**\n * The possible results of an execution.\n */\nexport interface ExecutionResults {\n \"function-resolved\": { data: unknown };\n \"step-ran\": { step: OutgoingOp; retriable?: boolean | string };\n \"function-rejected\": { error: unknown; retriable: boolean | string };\n \"steps-found\": { steps: [OutgoingOp, ...OutgoingOp[]] };\n \"step-not-found\": { step: OutgoingOp };\n}\n\nexport type ExecutionResult = {\n [K in keyof ExecutionResults]: Simplify<\n {\n type: K;\n ctx: Context.Any;\n ops: Record<string, MemoizedOp>;\n } & ExecutionResults[K]\n >;\n}[keyof ExecutionResults];\n\nexport type ExecutionResultHandler<T = ActionResponse> = (\n result: ExecutionResult,\n) => MaybePromise<T>;\n\nexport type ExecutionResultHandlers<T = ActionResponse> = {\n [E in ExecutionResult as E[\"type\"]]: (result: E) => MaybePromise<T>;\n};\n\nexport interface MemoizedOp extends IncomingOp {\n /**\n * If the step has been hit during this run, these will be the arguments\n * passed to it.\n */\n rawArgs?: unknown[];\n fulfilled?: boolean;\n\n /**\n * The promise that has been returned to userland code.\n */\n promise?: Promise<unknown>;\n seen?: boolean;\n}\n\n/**\n * The preferred execution version that will be used by the SDK when handling\n * brand new runs where the Executor is allowing us to choose.\n *\n * Changing this should not ever be a breaking change, as this will only change\n * new runs, not existing ones.\n */\nexport const PREFERRED_EXECUTION_VERSION =\n ExecutionVersion.V1 satisfies ExecutionVersion;\n\n/**\n * Options for creating a new {@link InngestExecution} instance.\n */\nexport interface InngestExecutionOptions {\n client: Inngest.Any;\n fn: InngestFunction.Any;\n reqArgs: unknown[];\n runId: string;\n data: Omit<Context.Any, \"step\">;\n stepState: Record<string, MemoizedOp>;\n stepCompletionOrder: string[];\n\n /**\n * Headers to be sent with any request to Inngest during this execution.\n */\n headers: Record<string, string>;\n requestedRunStep?: string;\n timer?: ServerTiming;\n isFailureHandler?: boolean;\n disableImmediateExecution?: boolean;\n\n /**\n * Provide the ability to transform the context passed to the function before\n * the execution starts.\n */\n transformCtx?: (ctx: Readonly<Context.Any>) => Context.Any;\n}\n\nexport type InngestExecutionFactory = (\n options: InngestExecutionOptions,\n) => IInngestExecution;\n\nexport class InngestExecution {\n protected debug: Debugger;\n\n constructor(protected options: InngestExecutionOptions) {\n this.debug = Debug(`${debugPrefix}:${this.options.runId}`);\n }\n}\n\nexport interface IInngestExecution {\n start(): Promise<ExecutionResult>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiEA,MAAa,8BACX,iBAAiB;AAkCnB,IAAa,mBAAb,MAA8B;CAC5B,AAAU;CAEV,YAAY,AAAUA,SAAkC;EAAlC;AACpB,OAAK,QAAQC,MAAM,GAAG,YAAY,GAAG,KAAK,QAAQ"}
|
|
@@ -13,6 +13,12 @@ const hash_js = require_rolldown_runtime.__toESM(require("hash.js"));
|
|
|
13
13
|
const canonicalize = require_rolldown_runtime.__toESM(require("canonicalize"));
|
|
14
14
|
|
|
15
15
|
//#region src/components/execution/v0.ts
|
|
16
|
+
var v0_exports = {};
|
|
17
|
+
require_rolldown_runtime.__export(v0_exports, {
|
|
18
|
+
V0InngestExecution: () => V0InngestExecution,
|
|
19
|
+
_internals: () => _internals,
|
|
20
|
+
createV0InngestExecution: () => createV0InngestExecution
|
|
21
|
+
});
|
|
16
22
|
const { sha1 } = hash_js.default;
|
|
17
23
|
const createV0InngestExecution = (options) => {
|
|
18
24
|
return new V0InngestExecution(options);
|
|
@@ -378,4 +384,10 @@ const _internals = { hashData };
|
|
|
378
384
|
|
|
379
385
|
//#endregion
|
|
380
386
|
exports.createV0InngestExecution = createV0InngestExecution;
|
|
387
|
+
Object.defineProperty(exports, 'v0_exports', {
|
|
388
|
+
enumerable: true,
|
|
389
|
+
get: function () {
|
|
390
|
+
return v0_exports;
|
|
391
|
+
}
|
|
392
|
+
});
|
|
381
393
|
//# sourceMappingURL=v0.cjs.map
|