@relkit/inngest 0.0.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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/dist/deployment/index.d.ts +27 -0
  4. package/dist/deployment/index.d.ts.map +1 -0
  5. package/dist/deployment/index.js +22 -0
  6. package/dist/deployment/index.js.map +1 -0
  7. package/dist/index.d.ts +23 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +89 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/local-readiness.d.ts +3 -0
  12. package/dist/local-readiness.d.ts.map +1 -0
  13. package/dist/local-readiness.js +97 -0
  14. package/dist/local-readiness.js.map +1 -0
  15. package/dist/local-recipe/index.d.ts +2 -0
  16. package/dist/local-recipe/index.d.ts.map +1 -0
  17. package/dist/local-recipe/index.js +2 -0
  18. package/dist/local-recipe/index.js.map +1 -0
  19. package/dist/local-timeouts.d.ts +5 -0
  20. package/dist/local-timeouts.d.ts.map +1 -0
  21. package/dist/local-timeouts.js +5 -0
  22. package/dist/local-timeouts.js.map +1 -0
  23. package/dist/local.d.ts +151 -0
  24. package/dist/local.d.ts.map +1 -0
  25. package/dist/local.js +140 -0
  26. package/dist/local.js.map +1 -0
  27. package/dist/runtime/index.d.ts +25 -0
  28. package/dist/runtime/index.d.ts.map +1 -0
  29. package/dist/runtime/index.js +152 -0
  30. package/dist/runtime/index.js.map +1 -0
  31. package/dist/runtime/observe.d.ts +11 -0
  32. package/dist/runtime/observe.d.ts.map +1 -0
  33. package/dist/runtime/observe.js +89 -0
  34. package/dist/runtime/observe.js.map +1 -0
  35. package/dist/runtime/policy.d.ts +8 -0
  36. package/dist/runtime/policy.d.ts.map +1 -0
  37. package/dist/runtime/policy.js +76 -0
  38. package/dist/runtime/policy.js.map +1 -0
  39. package/dist/runtime/realtime.d.ts +4 -0
  40. package/dist/runtime/realtime.d.ts.map +1 -0
  41. package/dist/runtime/realtime.js +50 -0
  42. package/dist/runtime/realtime.js.map +1 -0
  43. package/dist/runtime/run-controls.d.ts +5 -0
  44. package/dist/runtime/run-controls.d.ts.map +1 -0
  45. package/dist/runtime/run-controls.js +116 -0
  46. package/dist/runtime/run-controls.js.map +1 -0
  47. package/dist/runtime/run-operations.d.ts +6 -0
  48. package/dist/runtime/run-operations.d.ts.map +1 -0
  49. package/dist/runtime/run-operations.js +88 -0
  50. package/dist/runtime/run-operations.js.map +1 -0
  51. package/dist/runtime/run-query.d.ts +9 -0
  52. package/dist/runtime/run-query.d.ts.map +1 -0
  53. package/dist/runtime/run-query.js +66 -0
  54. package/dist/runtime/run-query.js.map +1 -0
  55. package/dist/runtime/runs-support.d.ts +7 -0
  56. package/dist/runtime/runs-support.d.ts.map +1 -0
  57. package/dist/runtime/runs-support.js +25 -0
  58. package/dist/runtime/runs-support.js.map +1 -0
  59. package/dist/runtime/runs.d.ts +42 -0
  60. package/dist/runtime/runs.d.ts.map +1 -0
  61. package/dist/runtime/runs.js +129 -0
  62. package/dist/runtime/runs.js.map +1 -0
  63. package/dist/runtime/submission.d.ts +6 -0
  64. package/dist/runtime/submission.d.ts.map +1 -0
  65. package/dist/runtime/submission.js +119 -0
  66. package/dist/runtime/submission.js.map +1 -0
  67. package/dist/runtime/support.d.ts +10 -0
  68. package/dist/runtime/support.d.ts.map +1 -0
  69. package/dist/runtime/support.js +54 -0
  70. package/dist/runtime/support.js.map +1 -0
  71. package/dist/runtime/task-binding-function.d.ts +6 -0
  72. package/dist/runtime/task-binding-function.d.ts.map +1 -0
  73. package/dist/runtime/task-binding-function.js +63 -0
  74. package/dist/runtime/task-binding-function.js.map +1 -0
  75. package/dist/runtime/task-binding-support.d.ts +12 -0
  76. package/dist/runtime/task-binding-support.d.ts.map +1 -0
  77. package/dist/runtime/task-binding-support.js +88 -0
  78. package/dist/runtime/task-binding-support.js.map +1 -0
  79. package/dist/runtime/task-binding.d.ts +51 -0
  80. package/dist/runtime/task-binding.d.ts.map +1 -0
  81. package/dist/runtime/task-binding.js +86 -0
  82. package/dist/runtime/task-binding.js.map +1 -0
  83. package/package.json +75 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rel-kit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @relkit/inngest
2
+
3
+ Inngest durable-jobs integration for RELKIT.
4
+
5
+ See [@relkit/app](https://github.com/rel-kit/relkit) for supported application APIs.
@@ -0,0 +1,27 @@
1
+ export interface InngestDeploymentProfile {
2
+ readonly provider: "inngest";
3
+ readonly compatibility: "native";
4
+ readonly adapterId: "inngest";
5
+ readonly sdk: "inngest@4.20.0";
6
+ readonly serverImageDigest: string;
7
+ readonly profile: "self-hosted-docker";
8
+ readonly workerRuntime: "bun";
9
+ readonly executionLimits: Readonly<{
10
+ readonly inputBytes: number;
11
+ readonly progressBytes: number;
12
+ readonly maxRunList: number;
13
+ }>;
14
+ readonly policyIdentity: readonly string[];
15
+ }
16
+ export interface InngestWorkerPublication {
17
+ readonly provider: "inngest";
18
+ readonly mechanism: "inngest-sdk";
19
+ readonly taskId: string;
20
+ readonly taskVersion: string;
21
+ readonly buildId: string;
22
+ readonly serviceGeneration: string;
23
+ readonly entrypoint: string;
24
+ }
25
+ export declare const deploymentProfile: InngestDeploymentProfile;
26
+ export declare function nativeWorkerPublication(value: Omit<InngestWorkerPublication, "provider" | "mechanism">): InngestWorkerPublication;
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deployment/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC;IAC9B,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC;QACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,CAAC,CAAC;IACH,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,iBAAiB,EAAE,wBAiB9B,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,IAAI,CAAC,wBAAwB,EAAE,UAAU,GAAG,WAAW,CAAC,GAC9D,wBAAwB,CAE1B"}
@@ -0,0 +1,22 @@
1
+ export const deploymentProfile = Object.freeze({
2
+ provider: "inngest",
3
+ compatibility: "native",
4
+ adapterId: "inngest",
5
+ sdk: "inngest@4.20.0",
6
+ serverImageDigest: "sha256:169c1d84801db304ca3c2c267810c67141c8f17bf7c01557b024a9a02fe67e57",
7
+ profile: "self-hosted-docker",
8
+ workerRuntime: "bun",
9
+ executionLimits: { inputBytes: 1_048_576, progressBytes: 65_536, maxRunList: 100 },
10
+ policyIdentity: [
11
+ "taskId",
12
+ "taskVersion",
13
+ "buildId",
14
+ "serviceGeneration",
15
+ "schemaHashes",
16
+ "policy",
17
+ ],
18
+ });
19
+ export function nativeWorkerPublication(value) {
20
+ return Object.freeze({ provider: "inngest", mechanism: "inngest-sdk", ...value });
21
+ }
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/deployment/index.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,MAAM,iBAAiB,GAA6B,MAAM,CAAC,MAAM,CAAC;IACvE,QAAQ,EAAE,SAAS;IACnB,aAAa,EAAE,QAAQ;IACvB,SAAS,EAAE,SAAS;IACpB,GAAG,EAAE,gBAAgB;IACrB,iBAAiB,EAAE,yEAAyE;IAC5F,OAAO,EAAE,oBAAoB;IAC7B,aAAa,EAAE,KAAK;IACpB,eAAe,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE;IAClF,cAAc,EAAE;QACd,QAAQ;QACR,aAAa;QACb,SAAS;QACT,mBAAmB;QACnB,cAAc;QACd,QAAQ;KACT;CACF,CAAC,CAAC;AAEH,MAAM,UAAU,uBAAuB,CACrC,KAA+D;IAE/D,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;AACpF,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { type BindingValueRef, type ProviderAdapter, type ProviderBehavior, type ProviderConnectionValues } from "@relkit/provider";
2
+ import { type JobsServiceBehavior, type JobsServiceOptions } from "@relkit/jobs";
3
+ declare const job: import("@relkit/provider").ProviderCapability<"job">;
4
+ type SecretReference = BindingValueRef<string, string, "secret-string">;
5
+ type TextReference = BindingValueRef<string, string, "string">;
6
+ export interface InngestOptions extends JobsServiceOptions {
7
+ readonly appId?: string;
8
+ readonly baseUrl?: string | URL | TextReference;
9
+ readonly eventKey?: SecretReference;
10
+ readonly signingKey?: SecretReference;
11
+ readonly serveOrigin?: string | URL | TextReference;
12
+ readonly appVersion?: string;
13
+ readonly native?: Readonly<Record<string, import("@relkit/contracts").JsonValue>>;
14
+ }
15
+ export type InngestBehavior = JobsServiceBehavior;
16
+ export type InngestAdapter<Options extends InngestOptions = InngestOptions> = ProviderAdapter<typeof job, "inngest", ProviderConnectionValues, ProviderBehavior<InngestBehavior>>;
17
+ export declare const inngestIntegration: import("@relkit/provider").IntegrationReference<"inngest">;
18
+ export declare const inngestConnectionContract: import("@relkit/provider").ProviderConnectionContract;
19
+ export declare const inngestLocalRecipe: import("@relkit/provider").ProviderLocalRecipeReference;
20
+ /** Defines a native Inngest durable-jobs adapter without importing the SDK. */
21
+ export declare function inngest<const Options extends InngestOptions = InngestOptions>(options?: Options): InngestAdapter<Options>;
22
+ export {};
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
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BAAyB,uDAAqB,CAAC;AAC5D,eAAO,MAAM,kBAAkB,yDAAc,CAAC;AAE9C,+EAA+E;AAC/E,wBAAgB,OAAO,CAAC,KAAK,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc,EAC3E,OAAO,GAAE,OAAuB,GAC/B,cAAc,CAAC,OAAO,CAAC,CAmBzB"}
package/dist/index.js ADDED
@@ -0,0 +1,89 @@
1
+ import { defineConnectionContract, defineIntegrationReference, defineLocalRecipeReference, defineProviderAdapter, defineProviderBehavior, defineProviderCapability, defineProviderFeature, isBindingValueRef, } from "@relkit/provider";
2
+ import { serializeJobsServiceOptions, validateJobsServiceOptions, } from "@relkit/jobs";
3
+ const job = defineProviderCapability("job");
4
+ const durable = defineProviderFeature(job, "durable");
5
+ const retryable = defineProviderFeature(job, "retryable");
6
+ const observation = defineProviderFeature(job, "observation");
7
+ const progress = defineProviderFeature(job, "progress");
8
+ const schedules = defineProviderFeature(job, "native-scheduling");
9
+ const integration = defineIntegrationReference("inngest");
10
+ const localRecipe = defineLocalRecipeReference(integration, "inngest-docker", 2);
11
+ const connectionContract = defineConnectionContract({
12
+ appId: { required: false, authoredValue: "fallback", default: "relkit" },
13
+ baseUrl: { required: false, authoredValue: "fallback", default: "http://127.0.0.1:8288" },
14
+ eventKey: { required: false, sensitive: true, authoredValue: "fallback" },
15
+ signingKey: { required: false, sensitive: true, authoredValue: "fallback" },
16
+ serveOrigin: { required: false, authoredValue: "fallback" },
17
+ appVersion: { required: false, authoredValue: "fallback", default: "relkit" },
18
+ });
19
+ export const inngestIntegration = integration;
20
+ export const inngestConnectionContract = connectionContract;
21
+ export const inngestLocalRecipe = localRecipe;
22
+ /** Defines a native Inngest durable-jobs adapter without importing the SDK. */
23
+ export function inngest(options = {}) {
24
+ assertOptions(options);
25
+ return defineProviderAdapter({
26
+ integration,
27
+ capability: job,
28
+ adapterId: "inngest",
29
+ connectionContract,
30
+ connection: {
31
+ ...(options.appId === undefined ? {} : { appId: options.appId }),
32
+ ...(options.baseUrl === undefined ? {} : { baseUrl: urlValue(options.baseUrl) }),
33
+ ...(options.eventKey === undefined ? {} : { eventKey: options.eventKey }),
34
+ ...(options.signingKey === undefined ? {} : { signingKey: options.signingKey }),
35
+ ...(options.serveOrigin === undefined ? {} : { serveOrigin: urlValue(options.serveOrigin) }),
36
+ ...(options.appVersion === undefined ? {} : { appVersion: options.appVersion }),
37
+ },
38
+ behavior: defineProviderBehavior(serializeJobsServiceOptions(options, options.native)),
39
+ features: [durable, retryable, observation, progress, schedules],
40
+ localRecipe,
41
+ });
42
+ }
43
+ function assertOptions(options) {
44
+ if (options === null || typeof options !== "object" || Array.isArray(options))
45
+ throw new TypeError("Inngest options must be an object");
46
+ validateJobsServiceOptions(options);
47
+ const keys = new Set([
48
+ "appId",
49
+ "baseUrl",
50
+ "eventKey",
51
+ "signingKey",
52
+ "serveOrigin",
53
+ "appVersion",
54
+ "native",
55
+ "limits",
56
+ "workers",
57
+ "observation",
58
+ "maxElapsed",
59
+ "hookTimeout",
60
+ "shutdownGrace",
61
+ ]);
62
+ for (const key of Object.keys(options))
63
+ if (!keys.has(key))
64
+ throw new TypeError(`Unknown Inngest option "${key}"`);
65
+ for (const [name, value] of [
66
+ ["appId", options.appId],
67
+ ["appVersion", options.appVersion],
68
+ ])
69
+ if (value !== undefined && (typeof value !== "string" || value.trim() === ""))
70
+ throw new TypeError(`Inngest ${name} is invalid`);
71
+ for (const [name, value] of [
72
+ ["eventKey", options.eventKey],
73
+ ["signingKey", options.signingKey],
74
+ ])
75
+ if (value !== undefined &&
76
+ (!isBindingValueRef(value) || value.type !== "secret-string" || !value.sensitive))
77
+ throw new TypeError(`Inngest ${name} must be a named secret binding value`);
78
+ urlValue(options.baseUrl);
79
+ urlValue(options.serveOrigin);
80
+ }
81
+ function urlValue(value) {
82
+ if (value === undefined || isBindingValueRef(value))
83
+ return value;
84
+ const url = value instanceof URL ? value : new URL(value);
85
+ if (url.protocol !== "http:" && url.protocol !== "https:")
86
+ throw new TypeError("Inngest URL must use http or https");
87
+ return url.toString();
88
+ }
89
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,GAKlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,GAG3B,MAAM,cAAc,CAAC;AAEtB,MAAM,GAAG,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,qBAAqB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AACtD,MAAM,SAAS,GAAG,qBAAqB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AAC1D,MAAM,WAAW,GAAG,qBAAqB,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;AAC9D,MAAM,QAAQ,GAAG,qBAAqB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACxD,MAAM,SAAS,GAAG,qBAAqB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAClE,MAAM,WAAW,GAAG,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC1D,MAAM,WAAW,GAAG,0BAA0B,CAAC,WAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AACjF,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;IAClD,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE;IACxE,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,uBAAuB,EAAE;IACzF,QAAQ,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,a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} from "@relkit/local-service";
2
+ export declare function waitForInngestReadiness(context: LocalServiceRecipeOutputContext): Promise<void>;
3
+ //# sourceMappingURL=local-readiness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-readiness.d.ts","sourceRoot":"","sources":["../src/local-readiness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAG7E,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,IAAI,CAAC,CAkBf"}
@@ -0,0 +1,97 @@
1
+ import { createHash } from "node:crypto";
2
+ import { INNGEST_LOCAL_STARTUP_TIMEOUT_MS } from "./local-timeouts.js";
3
+ export async function waitForInngestReadiness(context) {
4
+ const fetcher = context.fetch ?? globalThis.fetch;
5
+ const apiPort = number(context.ports.api, "Inngest API port");
6
+ const workerPort = context.ports["worker.api"];
7
+ await waitForNativeRead(fetcher, "http://127.0.0.1:" + apiPort, text(context.secrets.signingKey, "Inngest signing key"), context.signal);
8
+ if (workerPort !== undefined) {
9
+ await waitForHealth(fetcher, "http://127.0.0.1:" + number(workerPort, "Inngest worker port") + "/_relkit/v1/health/ready", context.signal);
10
+ await waitForHealth(fetcher, "http://127.0.0.1:" + apiPort + "/health", context.signal);
11
+ }
12
+ }
13
+ async function waitForHealth(fetcher, endpoint, signal) {
14
+ const deadline = Date.now() + INNGEST_LOCAL_STARTUP_TIMEOUT_MS;
15
+ let lastError;
16
+ while (Date.now() < deadline) {
17
+ try {
18
+ const response = await fetcher(endpoint, {
19
+ redirect: "error",
20
+ ...(signal === undefined ? {} : { signal }),
21
+ });
22
+ if (response.ok)
23
+ return;
24
+ lastError = new Error("status " + response.status);
25
+ }
26
+ catch (error) {
27
+ lastError = error;
28
+ }
29
+ await pause(signal);
30
+ }
31
+ throw new Error("Inngest local health check timed out at " + endpoint + ": " + String(lastError ?? "not ready"));
32
+ }
33
+ async function waitForNativeRead(fetcher, baseUrl, signingKey, signal) {
34
+ const deadline = Date.now() + INNGEST_LOCAL_STARTUP_TIMEOUT_MS;
35
+ let lastError;
36
+ while (Date.now() < deadline) {
37
+ try {
38
+ const response = await fetcher(baseUrl + "/v2/runs?limit=1", {
39
+ headers: {
40
+ accept: "application/json",
41
+ authorization: "Bearer " + hashSigningKey(signingKey),
42
+ },
43
+ redirect: "error",
44
+ ...(signal === undefined ? {} : { signal }),
45
+ });
46
+ if (response.ok)
47
+ return;
48
+ lastError = new Error("status " + response.status);
49
+ }
50
+ catch (error) {
51
+ lastError = error;
52
+ }
53
+ await pause(signal);
54
+ }
55
+ throw new Error("Inngest native read check timed out at " + baseUrl + ": " + String(lastError ?? "not ready"));
56
+ }
57
+ function pause(signal) {
58
+ return new Promise((resolve, reject) => {
59
+ let timer;
60
+ const cleanup = () => {
61
+ clearTimeout(timer);
62
+ signal?.removeEventListener("abort", abort);
63
+ };
64
+ const abort = () => {
65
+ cleanup();
66
+ reject(signal?.reason ?? new Error("Inngest local health check was cancelled."));
67
+ };
68
+ timer = setTimeout(() => {
69
+ cleanup();
70
+ resolve();
71
+ }, 250);
72
+ if (signal === undefined)
73
+ return;
74
+ if (signal.aborted)
75
+ abort();
76
+ else
77
+ signal.addEventListener("abort", abort, { once: true });
78
+ });
79
+ }
80
+ function number(value, name) {
81
+ if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1 || value > 65_535) {
82
+ throw new TypeError(name + " is invalid");
83
+ }
84
+ return value;
85
+ }
86
+ function hashSigningKey(signingKey) {
87
+ const prefix = signingKey.match(/^signkey-[\w]+-/u)?.[0] ?? "";
88
+ const key = signingKey.slice(prefix.length).replace(/[^a-z0-9]/giu, "");
89
+ const normalized = key.length % 2 === 0 ? key : "0" + key;
90
+ return prefix + createHash("sha256").update(Buffer.from(normalized, "hex")).digest("hex");
91
+ }
92
+ function text(value, name) {
93
+ if (typeof value !== "string" || value === "")
94
+ throw new TypeError(name + " is invalid");
95
+ return value;
96
+ }
97
+ //# sourceMappingURL=local-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G,CAAC,IAAI,KAAK,GAAG,MAAM,EAAE,CAAC;QAC7F,MAAM,IAAI,SAAS,CAAC,IAAI,GAAG,aAAa,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,cAAc,CAAC,UAAkB;IACxC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/D,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IACxE,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC;IAC1D,OAAO,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5F,CAAC;AAED,SAAS,IAAI,CAAC,KAAc,EAAE,IAAY;IACxC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE;QAAE,MAAM,IAAI,SAAS,CAAC,IAAI,GAAG,aAAa,CAAC,CAAC;IACzF,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { localRecipe } from "../local.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/local-recipe/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { localRecipe } from "../local.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/local-recipe/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** Startup budget shared by the Docker worker health check and readiness probes. */
2
+ export declare const INNGEST_LOCAL_STARTUP_TIMEOUT_MS = 300000;
3
+ export declare const INNGEST_LOCAL_HEALTH_INTERVAL_MS = 500;
4
+ export declare const INNGEST_LOCAL_HEALTH_RETRIES: number;
5
+ //# sourceMappingURL=local-timeouts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-timeouts.d.ts","sourceRoot":"","sources":["../src/local-timeouts.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,eAAO,MAAM,gCAAgC,SAAU,CAAC;AACxD,eAAO,MAAM,gCAAgC,MAAM,CAAC;AACpD,eAAO,MAAM,4BAA4B,QAExC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** Startup budget shared by the Docker worker health check and readiness probes. */
2
+ export const INNGEST_LOCAL_STARTUP_TIMEOUT_MS = 300_000;
3
+ export const INNGEST_LOCAL_HEALTH_INTERVAL_MS = 500;
4
+ export const INNGEST_LOCAL_HEALTH_RETRIES = Math.ceil(INNGEST_LOCAL_STARTUP_TIMEOUT_MS / INNGEST_LOCAL_HEALTH_INTERVAL_MS);
5
+ //# sourceMappingURL=local-timeouts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-timeouts.js","sourceRoot":"","sources":["../src/local-timeouts.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAC,MAAM,gCAAgC,GAAG,OAAO,CAAC;AACxD,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AACpD,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC,IAAI,CACnD,gCAAgC,GAAG,gCAAgC,CACpE,CAAC"}
@@ -0,0 +1,151 @@
1
+ import { type LocalServiceRecipeOutputContext } from "@relkit/local-service";
2
+ import { waitForInngestReadiness } from "./local-readiness.js";
3
+ export declare const localRecipe: Readonly<{
4
+ kind: "local-service-recipe";
5
+ protocolVersion: 2;
6
+ integrationId: "inngest";
7
+ recipeId: "inngest-docker";
8
+ recipeVersion: 2;
9
+ materializerId: "docker";
10
+ containers: readonly (Readonly<{
11
+ id: "postgres";
12
+ image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
13
+ ports: Readonly<{}>;
14
+ volumes: readonly {
15
+ name: string;
16
+ mountPath: string;
17
+ }[];
18
+ environment: Readonly<{
19
+ POSTGRES_DB: Readonly<{
20
+ value: "inngest";
21
+ }>;
22
+ POSTGRES_USER: Readonly<{
23
+ value: "inngest";
24
+ }>;
25
+ POSTGRES_PASSWORD: Readonly<{
26
+ secret: "postgresPassword";
27
+ }>;
28
+ }>;
29
+ health: Readonly<{
30
+ command: string[];
31
+ intervalMs: 250;
32
+ timeoutMs: 2000;
33
+ retries: 60;
34
+ }>;
35
+ networkAliases: readonly string[];
36
+ }> | Readonly<{
37
+ id: "redis";
38
+ image: "redis:7-alpine@sha256:ff02b58f971e7d7d156a1267e283fcbbeee91773b6aa36c49dac28ecfe28eadf";
39
+ command: readonly string[];
40
+ ports: Readonly<{}>;
41
+ volumes: readonly {
42
+ name: string;
43
+ mountPath: string;
44
+ }[];
45
+ health: Readonly<{
46
+ command: string[];
47
+ intervalMs: 250;
48
+ timeoutMs: 2000;
49
+ retries: 60;
50
+ }>;
51
+ networkAliases: readonly string[];
52
+ }> | Readonly<{
53
+ id: "inngest";
54
+ image: "inngest/inngest@sha256:d5365a31f8bf504dc2d54ddd114fcdc1a0413f8b57a450365c095ab6234ad8c2";
55
+ command: readonly string[];
56
+ dependsOn: readonly string[];
57
+ ports: Readonly<{
58
+ api: 8288;
59
+ }>;
60
+ health: Readonly<{
61
+ command: string[];
62
+ intervalMs: 500;
63
+ timeoutMs: 2000;
64
+ retries: 60;
65
+ }>;
66
+ networkAliases: readonly string[];
67
+ hostAliases: Readonly<{
68
+ "host.docker.internal": "host-gateway";
69
+ }>;
70
+ environment: Readonly<{
71
+ INNGEST_EVENT_KEY: Readonly<{
72
+ secret: "eventKey";
73
+ }>;
74
+ INNGEST_SIGNING_KEY: Readonly<{
75
+ secret: "signingKey";
76
+ }>;
77
+ POSTGRES_PASSWORD: Readonly<{
78
+ secret: "postgresPassword";
79
+ }>;
80
+ }>;
81
+ }>)[];
82
+ workers: readonly Readonly<{
83
+ id: "worker";
84
+ image: "oven/bun:1.3.10@sha256:b86c67b531d87b4db11470d9b2bd0c519b1976eee6fcd71634e73abfa6230d2e";
85
+ command: readonly string[];
86
+ dependsOn: readonly string[];
87
+ ports: Readonly<{
88
+ api: 3000;
89
+ }>;
90
+ health: Readonly<{
91
+ command: string[];
92
+ intervalMs: 500;
93
+ timeoutMs: 2000;
94
+ retries: number;
95
+ }>;
96
+ networkAliases: readonly string[];
97
+ hostAliases: Readonly<{
98
+ "host.docker.internal": "host-gateway";
99
+ }>;
100
+ }>[];
101
+ init: readonly Readonly<{
102
+ id: "postgres-ready";
103
+ image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
104
+ dependsOn: readonly string[];
105
+ command: readonly string[];
106
+ environment: Readonly<{
107
+ POSTGRES_PASSWORD: Readonly<{
108
+ secret: "postgresPassword";
109
+ }>;
110
+ }>;
111
+ }>[];
112
+ volumes: Readonly<{
113
+ postgres: Readonly<{
114
+ mountPath: "/var/lib/postgresql/data";
115
+ persistent: true;
116
+ }>;
117
+ redis: Readonly<{
118
+ mountPath: "/data";
119
+ persistent: true;
120
+ }>;
121
+ }>;
122
+ generatedSecrets: Readonly<{
123
+ eventKey: Readonly<{
124
+ bytes: 24;
125
+ encoding: "hex";
126
+ }>;
127
+ signingKey: Readonly<{
128
+ bytes: 32;
129
+ encoding: "hex";
130
+ }>;
131
+ postgresPassword: Readonly<{
132
+ bytes: 24;
133
+ encoding: "hex";
134
+ }>;
135
+ }>;
136
+ network: Readonly<{
137
+ internal: false;
138
+ }>;
139
+ ownership: Readonly<{
140
+ scope: "project";
141
+ retainVolumes: true;
142
+ }>;
143
+ outputs: ({ ports, secrets, endpoints }: LocalServiceRecipeOutputContext) => Readonly<{
144
+ baseUrl: `http://127.0.0.1:${number}`;
145
+ eventKey: string;
146
+ signingKey: string;
147
+ serveOrigin: string;
148
+ }>;
149
+ initialize: typeof waitForInngestReadiness;
150
+ }>;
151
+ //# sourceMappingURL=local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../src/local.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAY/D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAkHmB,+BAA+B;;;;;;;EAQvB,CAAC"}