inngest 0.7.0 → 0.7.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/cloudflare.js +1 -1
- package/cloudflare.js.map +1 -1
- package/components/Inngest.d.ts +45 -5
- package/components/Inngest.d.ts.map +1 -1
- package/components/Inngest.js +12 -3
- package/components/Inngest.js.map +1 -1
- package/components/InngestFunction.d.ts +22 -4
- package/components/InngestFunction.d.ts.map +1 -1
- package/components/InngestFunction.js +112 -30
- package/components/InngestFunction.js.map +1 -1
- package/components/InngestStepTools.d.ts +126 -0
- package/components/InngestStepTools.d.ts.map +1 -0
- package/components/InngestStepTools.js +287 -0
- package/components/InngestStepTools.js.map +1 -0
- package/express.d.ts.map +1 -1
- package/express.js +20 -10
- package/express.js.map +1 -1
- package/helpers/func.d.ts +13 -3
- package/helpers/func.d.ts.map +1 -1
- package/helpers/func.js +29 -4
- package/helpers/func.js.map +1 -1
- package/helpers/strings.d.ts +8 -0
- package/helpers/strings.d.ts.map +1 -1
- package/helpers/strings.js +60 -1
- package/helpers/strings.js.map +1 -1
- package/helpers/types.d.ts +26 -0
- package/helpers/types.d.ts.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/landing.d.ts +1 -1
- package/landing.d.ts.map +1 -1
- package/landing.js +1 -1
- package/landing.js.map +1 -1
- package/next.js +1 -1
- package/next.js.map +1 -1
- package/package.json +7 -3
- package/redwood.js +1 -1
- package/redwood.js.map +1 -1
- package/remix.js +1 -1
- package/remix.js.map +1 -1
- package/types.d.ts +127 -11
- package/types.d.ts.map +1 -1
- package/types.js +11 -0
- package/types.js.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/components/InngestStep.d.ts +0 -15
- package/components/InngestStep.d.ts.map +0 -1
- package/components/InngestStep.js +0 -37
- package/components/InngestStep.js.map +0 -1
package/types.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { createStepTools } from "./components/InngestStepTools";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* outputting anything.
|
|
3
|
+
* Arguments for a single-step function.
|
|
5
4
|
*
|
|
6
5
|
* @public
|
|
7
6
|
*/
|
|
8
|
-
export
|
|
7
|
+
export interface SingleStepFnArgs<Event, FnId, StepId> {
|
|
9
8
|
/**
|
|
10
9
|
* If relevant, the event data present in the payload.
|
|
11
10
|
*/
|
|
@@ -25,7 +24,97 @@ export declare type StepFn<Event, FnId, StepId> = (arg: {
|
|
|
25
24
|
fn_id: FnId;
|
|
26
25
|
step_id: StepId;
|
|
27
26
|
};
|
|
28
|
-
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Arguments for a multi-step function, extending the single-step args and
|
|
30
|
+
* including step function tooling.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export interface MultiStepFnArgs<Events extends Record<string, EventPayload>, Event extends keyof Events, FnId, StepId> extends SingleStepFnArgs<Events[Event], FnId, StepId> {
|
|
35
|
+
tools: ReturnType<typeof createStepTools<Events, Event>>[0];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Unique codes for the different types of operation that can be sent to Inngest
|
|
39
|
+
* from SDK step functions.
|
|
40
|
+
*/
|
|
41
|
+
export declare enum StepOpCode {
|
|
42
|
+
WaitForEvent = "WaitForEvent",
|
|
43
|
+
RunStep = "Step",
|
|
44
|
+
Sleep = "Sleep"
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The shape of a single operation in a step function. Used to communicate
|
|
48
|
+
* desired and received operations to Inngest.
|
|
49
|
+
*/
|
|
50
|
+
export declare type Op = {
|
|
51
|
+
/**
|
|
52
|
+
* The unique code for this operation.
|
|
53
|
+
*/
|
|
54
|
+
op: StepOpCode;
|
|
55
|
+
/**
|
|
56
|
+
* The unhashed step name for this operation.
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
/**
|
|
60
|
+
* Any additional data required for this operation to send to Inngest. This
|
|
61
|
+
* is not compared when confirming that the operation was completed; use `id`
|
|
62
|
+
* for this.
|
|
63
|
+
*/
|
|
64
|
+
opts?: any;
|
|
65
|
+
/**
|
|
66
|
+
* Any data present for this operation. If data is present, this operation is
|
|
67
|
+
* treated as completed.
|
|
68
|
+
*/
|
|
69
|
+
data?: any;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The shape of a hashed operation in a step function. Used to communicate
|
|
73
|
+
* desired and received operations to Inngest.
|
|
74
|
+
*/
|
|
75
|
+
export declare type HashedOp = Op & {
|
|
76
|
+
/**
|
|
77
|
+
* The hashed identifier for this operation, used to confirm that the operation
|
|
78
|
+
* was completed when it is received from Inngest.
|
|
79
|
+
*/
|
|
80
|
+
id: string;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* A helper type to represent a stack of operations that will accumulate
|
|
84
|
+
* throughout a step function's run. This stack contains an object of
|
|
85
|
+
* op hashes to data.
|
|
86
|
+
*/
|
|
87
|
+
export declare type OpStack = Record<string, any>;
|
|
88
|
+
/**
|
|
89
|
+
* A function that can be used to submit an operation to Inngest internally.
|
|
90
|
+
*/
|
|
91
|
+
export declare type SubmitOpFn = (op: Op) => void;
|
|
92
|
+
/**
|
|
93
|
+
* A sleep-compatible time string such as `"1h30m15s"` that can be sent to
|
|
94
|
+
* Inngest to sleep for a given amount of time.
|
|
95
|
+
*
|
|
96
|
+
* This type includes an empty string too, so make sure to exclude that via
|
|
97
|
+
* `Exclude<TimeStr, "">` if you don't want to allow empty strings.
|
|
98
|
+
*
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
101
|
+
export declare type TimeStr = `${`${number}w` | ""}${`${number}d` | ""}${`${number}h` | ""}${`${number}m` | ""}${`${number}s` | ""}${`${number}ms` | ""}`;
|
|
102
|
+
/**
|
|
103
|
+
* The shape of a step function, taking in event, step, and ctx data, and
|
|
104
|
+
* outputting anything.
|
|
105
|
+
*
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
export declare type SingleStepFn<Event, FnId, StepId> = (arg: SingleStepFnArgs<Event, FnId, StepId>) => any;
|
|
109
|
+
/**
|
|
110
|
+
* The shape of a multi-step function, taking in event, step, ctx, and tools.
|
|
111
|
+
*
|
|
112
|
+
* Multi-step functions are not expected to return any data themselves, as all
|
|
113
|
+
* logic is expected to be placed within steps.
|
|
114
|
+
*
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
export declare type MultiStepFn<Events extends Record<string, EventPayload>, Event extends keyof Events, FnId, StepId> = (arg: MultiStepFnArgs<Events, Event, FnId, StepId>) => void;
|
|
29
118
|
/**
|
|
30
119
|
* The shape of a single event's payload. It should be extended to enforce
|
|
31
120
|
* adherence to given events and not used as a method of creating them (i.e. as
|
|
@@ -256,13 +345,31 @@ export interface FunctionOptions {
|
|
|
256
345
|
* the name.
|
|
257
346
|
*/
|
|
258
347
|
name: string;
|
|
348
|
+
/**
|
|
349
|
+
* Allow the specification of an idempotency key using event data. If
|
|
350
|
+
* specified, this overrides the throttle object.
|
|
351
|
+
*/
|
|
352
|
+
idempotency?: string;
|
|
353
|
+
/**
|
|
354
|
+
* Throttle workflows, only running them a given number of times (count) per
|
|
355
|
+
* period. This can optionally include a throttle key, which is used to
|
|
356
|
+
* further constrain throttling similar to idempotency.
|
|
357
|
+
*/
|
|
358
|
+
throttle?: {
|
|
359
|
+
/**
|
|
360
|
+
* An optional key to use for throttle, similar to idempotency.
|
|
361
|
+
*/
|
|
362
|
+
key?: string;
|
|
363
|
+
/**
|
|
364
|
+
* The number of times to allow the function to run per the given `period`.
|
|
365
|
+
*/
|
|
366
|
+
count: number;
|
|
367
|
+
/**
|
|
368
|
+
* The period of time to allow the function to run `count` times.
|
|
369
|
+
*/
|
|
370
|
+
period: TimeStr;
|
|
371
|
+
};
|
|
259
372
|
}
|
|
260
|
-
/**
|
|
261
|
-
* A shortcut type for a collection of Inngest steps.
|
|
262
|
-
*
|
|
263
|
-
* @internal
|
|
264
|
-
*/
|
|
265
|
-
export declare type Steps = Record<string, InngestStep<any[], any>>;
|
|
266
373
|
/**
|
|
267
374
|
* Expected responses to be used within an `InngestCommHandler` in order to
|
|
268
375
|
* appropriately respond to Inngest.
|
|
@@ -275,6 +382,9 @@ export declare type StepRunResponse = {
|
|
|
275
382
|
} | {
|
|
276
383
|
status: 200;
|
|
277
384
|
body?: any;
|
|
385
|
+
} | {
|
|
386
|
+
status: 206;
|
|
387
|
+
body: any;
|
|
278
388
|
};
|
|
279
389
|
/**
|
|
280
390
|
* The response to send to Inngest when pushing function config either directly
|
|
@@ -365,6 +475,12 @@ export interface FunctionConfig {
|
|
|
365
475
|
url: string;
|
|
366
476
|
};
|
|
367
477
|
}>;
|
|
478
|
+
idempotency?: string;
|
|
479
|
+
throttle?: {
|
|
480
|
+
key?: string;
|
|
481
|
+
count: number;
|
|
482
|
+
period: TimeStr;
|
|
483
|
+
};
|
|
368
484
|
}
|
|
369
485
|
export interface DevServerInfo {
|
|
370
486
|
/**
|
package/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM;IACnD;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAE7B;;OAEG;IACH,GAAG,EAAE;QAAE,KAAK,EAAE,IAAI,CAAC;QAAC,OAAO,EAAE,M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T,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE;QACT,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,OAAO,CAAC;QACtB,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB,CAAC;IACF,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B"}
|
package/types.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StepOpCode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Unique codes for the different types of operation that can be sent to Inngest
|
|
6
|
+
* from SDK step functions.
|
|
7
|
+
*/
|
|
8
|
+
var StepOpCode;
|
|
9
|
+
(function (StepOpCode) {
|
|
10
|
+
StepOpCode["WaitForEvent"] = "WaitForEvent";
|
|
11
|
+
StepOpCode["RunStep"] = "Step";
|
|
12
|
+
StepOpCode["Sleep"] = "Sleep";
|
|
13
|
+
})(StepOpCode = exports.StepOpCode || (exports.StepOpCode = {}));
|
|
3
14
|
//# sourceMappingURL=types.js.map
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AA2CA;;;GAGG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,2CAA6B,CAAA;IAC7B,8BAAgB,CAAA;IAChB,6BAAe,CAAA;AACjB,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.7.
|
|
1
|
+
export declare const version = "0.7.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A typed, individual step within an `InngestFunction`.
|
|
3
|
-
*/
|
|
4
|
-
export declare class InngestStep<Input extends any[], Output> {
|
|
5
|
-
#private;
|
|
6
|
-
constructor(fn: (...args: Input) => Output);
|
|
7
|
-
/**
|
|
8
|
-
* Run this step with the given `data`.
|
|
9
|
-
*
|
|
10
|
-
* Purposefully return a promise so that it's easier to catch further up the
|
|
11
|
-
* stack.
|
|
12
|
-
*/
|
|
13
|
-
private run;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=InngestStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InngestStep.d.ts","sourceRoot":"","sources":["../../src/components/InngestStep.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,WAAW,CAAC,KAAK,SAAS,GAAG,EAAE,EAAE,MAAM;;gBAGtC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,MAAM;IAI1C;;;;;OAKG;YAEW,GAAG;CAGlB"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _InngestStep_fn;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.InngestStep = void 0;
|
|
16
|
-
/**
|
|
17
|
-
* A typed, individual step within an `InngestFunction`.
|
|
18
|
-
*/
|
|
19
|
-
class InngestStep {
|
|
20
|
-
constructor(fn) {
|
|
21
|
-
_InngestStep_fn.set(this, void 0);
|
|
22
|
-
__classPrivateFieldSet(this, _InngestStep_fn, fn, "f");
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Run this step with the given `data`.
|
|
26
|
-
*
|
|
27
|
-
* Purposefully return a promise so that it's easier to catch further up the
|
|
28
|
-
* stack.
|
|
29
|
-
*/
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
31
|
-
async run(data) {
|
|
32
|
-
return __classPrivateFieldGet(this, _InngestStep_fn, "f").call(this, data);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.InngestStep = InngestStep;
|
|
36
|
-
_InngestStep_fn = new WeakMap();
|
|
37
|
-
//# sourceMappingURL=InngestStep.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InngestStep.js","sourceRoot":"","sources":["../../src/components/InngestStep.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,MAAa,WAAW;IAGtB,YAAY,EAA8B;QAF1C,kCAAuC;QAGrC,uBAAA,IAAI,mBAAO,EAAE,MAAA,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,4DAA4D;IACpD,KAAK,CAAC,GAAG,CAAC,IAAS;QACzB,OAAO,uBAAA,IAAI,uBAAI,MAAR,IAAI,EAAK,IAAI,CAAC,CAAC;IACxB,CAAC;CACF;AAjBD,kCAiBC"}
|