sendwend 0.0.0-stage → 12.7.3
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/LICENSE +21 -0
- package/README.md +2082 -2
- package/dist/_virtual/_rolldown/runtime.cjs +22 -0
- package/dist/apns-relay.cjs +91 -0
- package/dist/apns-relay.cjs.map +1 -0
- package/dist/apns-relay.d.cts +26 -0
- package/dist/apns-relay.d.cts.map +1 -0
- package/dist/apns-relay.d.mts +26 -0
- package/dist/apns-relay.d.mts.map +1 -0
- package/dist/apns-relay.mjs +90 -0
- package/dist/apns-relay.mjs.map +1 -0
- package/dist/apns.cjs +215 -0
- package/dist/apns.cjs.map +1 -0
- package/dist/apns.d.cts +110 -0
- package/dist/apns.d.cts.map +1 -0
- package/dist/apns.d.mts +110 -0
- package/dist/apns.d.mts.map +1 -0
- package/dist/apns.mjs +207 -0
- package/dist/apns.mjs.map +1 -0
- package/dist/aws/engine-step.cjs +105 -0
- package/dist/aws/engine-step.cjs.map +1 -0
- package/dist/aws/engine-step.d.cts +42 -0
- package/dist/aws/engine-step.d.cts.map +1 -0
- package/dist/aws/engine-step.d.mts +42 -0
- package/dist/aws/engine-step.d.mts.map +1 -0
- package/dist/aws/engine-step.mjs +103 -0
- package/dist/aws/engine-step.mjs.map +1 -0
- package/dist/aws/function-url.cjs +53 -0
- package/dist/aws/function-url.cjs.map +1 -0
- package/dist/aws/function-url.d.cts +36 -0
- package/dist/aws/function-url.d.cts.map +1 -0
- package/dist/aws/function-url.d.mts +36 -0
- package/dist/aws/function-url.d.mts.map +1 -0
- package/dist/aws/function-url.mjs +50 -0
- package/dist/aws/function-url.mjs.map +1 -0
- package/dist/aws/index.cjs +232 -0
- package/dist/aws/index.cjs.map +1 -0
- package/dist/aws/index.d.cts +73 -0
- package/dist/aws/index.d.cts.map +1 -0
- package/dist/aws/index.d.mts +73 -0
- package/dist/aws/index.d.mts.map +1 -0
- package/dist/aws/index.mjs +218 -0
- package/dist/aws/index.mjs.map +1 -0
- package/dist/aws/instances.cjs +218 -0
- package/dist/aws/instances.cjs.map +1 -0
- package/dist/aws/instances.d.cts +102 -0
- package/dist/aws/instances.d.cts.map +1 -0
- package/dist/aws/instances.d.mts +102 -0
- package/dist/aws/instances.d.mts.map +1 -0
- package/dist/aws/instances.mjs +214 -0
- package/dist/aws/instances.mjs.map +1 -0
- package/dist/aws/lambda-api.cjs +86 -0
- package/dist/aws/lambda-api.cjs.map +1 -0
- package/dist/aws/lambda-api.d.cts +41 -0
- package/dist/aws/lambda-api.d.cts.map +1 -0
- package/dist/aws/lambda-api.d.mts +41 -0
- package/dist/aws/lambda-api.d.mts.map +1 -0
- package/dist/aws/lambda-api.mjs +85 -0
- package/dist/aws/lambda-api.mjs.map +1 -0
- package/dist/client.cjs +216 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +193 -0
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.mts +193 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +212 -0
- package/dist/client.mjs.map +1 -0
- package/dist/cloudflare/bindings.cjs +49 -0
- package/dist/cloudflare/bindings.cjs.map +1 -0
- package/dist/cloudflare/bindings.d.cts +31 -0
- package/dist/cloudflare/bindings.d.cts.map +1 -0
- package/dist/cloudflare/bindings.d.mts +31 -0
- package/dist/cloudflare/bindings.d.mts.map +1 -0
- package/dist/cloudflare/bindings.mjs +46 -0
- package/dist/cloudflare/bindings.mjs.map +1 -0
- package/dist/cloudflare/index.cjs +73 -0
- package/dist/cloudflare/index.d.cts +25 -0
- package/dist/cloudflare/index.d.mts +25 -0
- package/dist/cloudflare/index.mjs +20 -0
- package/dist/cloudflare/runner.cjs +200 -0
- package/dist/cloudflare/runner.cjs.map +1 -0
- package/dist/cloudflare/runner.d.cts +83 -0
- package/dist/cloudflare/runner.d.cts.map +1 -0
- package/dist/cloudflare/runner.d.mts +83 -0
- package/dist/cloudflare/runner.d.mts.map +1 -0
- package/dist/cloudflare/runner.mjs +199 -0
- package/dist/cloudflare/runner.mjs.map +1 -0
- package/dist/cloudflare/worker.cjs +106 -0
- package/dist/cloudflare/worker.cjs.map +1 -0
- package/dist/cloudflare/worker.d.cts +52 -0
- package/dist/cloudflare/worker.d.cts.map +1 -0
- package/dist/cloudflare/worker.d.mts +52 -0
- package/dist/cloudflare/worker.d.mts.map +1 -0
- package/dist/cloudflare/worker.mjs +104 -0
- package/dist/cloudflare/worker.mjs.map +1 -0
- package/dist/cloudflare/workers.d.cjs +0 -0
- package/dist/cloudflare/workers.d.cts +42 -0
- package/dist/cloudflare/workers.d.cts.map +1 -0
- package/dist/cloudflare/workers.d.mts +42 -0
- package/dist/cloudflare/workers.d.mts.map +1 -0
- package/dist/config.cjs +257 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +184 -0
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +184 -0
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +246 -0
- package/dist/config.mjs.map +1 -0
- package/dist/contract.cjs +222 -0
- package/dist/contract.cjs.map +1 -0
- package/dist/contract.d.cts +110 -0
- package/dist/contract.d.cts.map +1 -0
- package/dist/contract.d.mts +110 -0
- package/dist/contract.d.mts.map +1 -0
- package/dist/contract.mjs +216 -0
- package/dist/contract.mjs.map +1 -0
- package/dist/date-time.cjs +22 -0
- package/dist/date-time.cjs.map +1 -0
- package/dist/date-time.d.cts +10 -0
- package/dist/date-time.d.cts.map +1 -0
- package/dist/date-time.d.mts +10 -0
- package/dist/date-time.d.mts.map +1 -0
- package/dist/date-time.mjs +21 -0
- package/dist/date-time.mjs.map +1 -0
- package/dist/dsl/action.cjs +25 -0
- package/dist/dsl/action.cjs.map +1 -0
- package/dist/dsl/action.d.cts +63 -0
- package/dist/dsl/action.d.cts.map +1 -0
- package/dist/dsl/action.d.mts +63 -0
- package/dist/dsl/action.d.mts.map +1 -0
- package/dist/dsl/action.mjs +24 -0
- package/dist/dsl/action.mjs.map +1 -0
- package/dist/dsl/base.cjs +33 -0
- package/dist/dsl/base.cjs.map +1 -0
- package/dist/dsl/base.d.cts +43 -0
- package/dist/dsl/base.d.cts.map +1 -0
- package/dist/dsl/base.d.mts +43 -0
- package/dist/dsl/base.d.mts.map +1 -0
- package/dist/dsl/base.mjs +29 -0
- package/dist/dsl/base.mjs.map +1 -0
- package/dist/dsl/bundle.cjs +287 -0
- package/dist/dsl/bundle.cjs.map +1 -0
- package/dist/dsl/bundle.d.cts +33 -0
- package/dist/dsl/bundle.d.cts.map +1 -0
- package/dist/dsl/bundle.d.mts +33 -0
- package/dist/dsl/bundle.d.mts.map +1 -0
- package/dist/dsl/bundle.mjs +284 -0
- package/dist/dsl/bundle.mjs.map +1 -0
- package/dist/dsl/condition.cjs +200 -0
- package/dist/dsl/condition.cjs.map +1 -0
- package/dist/dsl/condition.d.cts +151 -0
- package/dist/dsl/condition.d.cts.map +1 -0
- package/dist/dsl/condition.d.mts +151 -0
- package/dist/dsl/condition.d.mts.map +1 -0
- package/dist/dsl/condition.mjs +178 -0
- package/dist/dsl/condition.mjs.map +1 -0
- package/dist/dsl/flow.cjs +335 -0
- package/dist/dsl/flow.cjs.map +1 -0
- package/dist/dsl/flow.d.cts +278 -0
- package/dist/dsl/flow.d.cts.map +1 -0
- package/dist/dsl/flow.d.mts +278 -0
- package/dist/dsl/flow.d.mts.map +1 -0
- package/dist/dsl/flow.mjs +331 -0
- package/dist/dsl/flow.mjs.map +1 -0
- package/dist/dsl/index.cjs +37 -0
- package/dist/dsl/index.d.cts +34 -0
- package/dist/dsl/index.d.mts +34 -0
- package/dist/dsl/index.mjs +9 -0
- package/dist/dsl/refs.cjs +101 -0
- package/dist/dsl/refs.cjs.map +1 -0
- package/dist/dsl/refs.d.cts +127 -0
- package/dist/dsl/refs.d.cts.map +1 -0
- package/dist/dsl/refs.d.mts +127 -0
- package/dist/dsl/refs.d.mts.map +1 -0
- package/dist/dsl/refs.mjs +93 -0
- package/dist/dsl/refs.mjs.map +1 -0
- package/dist/dsl/template.cjs +19 -0
- package/dist/dsl/template.cjs.map +1 -0
- package/dist/dsl/template.d.cts +30 -0
- package/dist/dsl/template.d.cts.map +1 -0
- package/dist/dsl/template.d.mts +30 -0
- package/dist/dsl/template.d.mts.map +1 -0
- package/dist/dsl/template.mjs +18 -0
- package/dist/dsl/template.mjs.map +1 -0
- package/dist/dsl/trigger.cjs +53 -0
- package/dist/dsl/trigger.cjs.map +1 -0
- package/dist/dsl/trigger.d.cts +112 -0
- package/dist/dsl/trigger.d.cts.map +1 -0
- package/dist/dsl/trigger.d.mts +112 -0
- package/dist/dsl/trigger.d.mts.map +1 -0
- package/dist/dsl/trigger.mjs +52 -0
- package/dist/dsl/trigger.mjs.map +1 -0
- package/dist/dsl/workflow.cjs +143 -0
- package/dist/dsl/workflow.cjs.map +1 -0
- package/dist/dsl/workflow.d.cts +88 -0
- package/dist/dsl/workflow.d.cts.map +1 -0
- package/dist/dsl/workflow.d.mts +88 -0
- package/dist/dsl/workflow.d.mts.map +1 -0
- package/dist/dsl/workflow.mjs +142 -0
- package/dist/dsl/workflow.mjs.map +1 -0
- package/dist/email-context.cjs +28 -0
- package/dist/email-context.cjs.map +1 -0
- package/dist/email-context.d.cts +9 -0
- package/dist/email-context.d.cts.map +1 -0
- package/dist/email-context.d.mts +9 -0
- package/dist/email-context.d.mts.map +1 -0
- package/dist/email-context.mjs +26 -0
- package/dist/email-context.mjs.map +1 -0
- package/dist/email-sender.cjs +93 -0
- package/dist/email-sender.cjs.map +1 -0
- package/dist/email-sender.d.cts +88 -0
- package/dist/email-sender.d.cts.map +1 -0
- package/dist/email-sender.d.mts +88 -0
- package/dist/email-sender.d.mts.map +1 -0
- package/dist/email-sender.mjs +90 -0
- package/dist/email-sender.mjs.map +1 -0
- package/dist/email.cjs +73 -0
- package/dist/email.cjs.map +1 -0
- package/dist/email.d.cts +59 -0
- package/dist/email.d.cts.map +1 -0
- package/dist/email.d.mts +59 -0
- package/dist/email.d.mts.map +1 -0
- package/dist/email.mjs +68 -0
- package/dist/email.mjs.map +1 -0
- package/dist/engine/actions.cjs +19 -0
- package/dist/engine/actions.cjs.map +1 -0
- package/dist/engine/actions.d.cts +27 -0
- package/dist/engine/actions.d.cts.map +1 -0
- package/dist/engine/actions.d.mts +27 -0
- package/dist/engine/actions.d.mts.map +1 -0
- package/dist/engine/actions.mjs +18 -0
- package/dist/engine/actions.mjs.map +1 -0
- package/dist/engine/bucket.cjs +71 -0
- package/dist/engine/bucket.cjs.map +1 -0
- package/dist/engine/bucket.d.cts +30 -0
- package/dist/engine/bucket.d.cts.map +1 -0
- package/dist/engine/bucket.d.mts +30 -0
- package/dist/engine/bucket.d.mts.map +1 -0
- package/dist/engine/bucket.mjs +68 -0
- package/dist/engine/bucket.mjs.map +1 -0
- package/dist/engine/condition.cjs +199 -0
- package/dist/engine/condition.cjs.map +1 -0
- package/dist/engine/condition.d.cts +76 -0
- package/dist/engine/condition.d.cts.map +1 -0
- package/dist/engine/condition.d.mts +76 -0
- package/dist/engine/condition.d.mts.map +1 -0
- package/dist/engine/condition.mjs +192 -0
- package/dist/engine/condition.mjs.map +1 -0
- package/dist/engine/duration.cjs +33 -0
- package/dist/engine/duration.cjs.map +1 -0
- package/dist/engine/duration.d.cts +3 -0
- package/dist/engine/duration.d.cts.map +1 -0
- package/dist/engine/duration.d.mts +3 -0
- package/dist/engine/duration.d.mts.map +1 -0
- package/dist/engine/duration.mjs +32 -0
- package/dist/engine/duration.mjs.map +1 -0
- package/dist/engine/index.cjs +33 -0
- package/dist/engine/index.d.cts +10 -0
- package/dist/engine/index.d.mts +10 -0
- package/dist/engine/index.mjs +9 -0
- package/dist/engine/interpreter.cjs +613 -0
- package/dist/engine/interpreter.cjs.map +1 -0
- package/dist/engine/interpreter.d.cts +4 -0
- package/dist/engine/interpreter.d.cts.map +1 -0
- package/dist/engine/interpreter.d.mts +4 -0
- package/dist/engine/interpreter.d.mts.map +1 -0
- package/dist/engine/interpreter.mjs +612 -0
- package/dist/engine/interpreter.mjs.map +1 -0
- package/dist/engine/ports.cjs +0 -0
- package/dist/engine/ports.d.cts +373 -0
- package/dist/engine/ports.d.cts.map +1 -0
- package/dist/engine/ports.d.mts +373 -0
- package/dist/engine/ports.d.mts.map +1 -0
- package/dist/engine/ports.mjs +1 -0
- package/dist/engine/recipient.cjs +22 -0
- package/dist/engine/recipient.cjs.map +1 -0
- package/dist/engine/recipient.d.cts +11 -0
- package/dist/engine/recipient.d.cts.map +1 -0
- package/dist/engine/recipient.d.mts +11 -0
- package/dist/engine/recipient.d.mts.map +1 -0
- package/dist/engine/recipient.mjs +21 -0
- package/dist/engine/recipient.mjs.map +1 -0
- package/dist/engine/retry.cjs +106 -0
- package/dist/engine/retry.cjs.map +1 -0
- package/dist/engine/retry.d.cts +73 -0
- package/dist/engine/retry.d.cts.map +1 -0
- package/dist/engine/retry.d.mts +73 -0
- package/dist/engine/retry.d.mts.map +1 -0
- package/dist/engine/retry.mjs +98 -0
- package/dist/engine/retry.mjs.map +1 -0
- package/dist/engine/time-scale.cjs +153 -0
- package/dist/engine/time-scale.cjs.map +1 -0
- package/dist/engine/time-scale.d.cts +41 -0
- package/dist/engine/time-scale.d.cts.map +1 -0
- package/dist/engine/time-scale.d.mts +41 -0
- package/dist/engine/time-scale.d.mts.map +1 -0
- package/dist/engine/time-scale.mjs +150 -0
- package/dist/engine/time-scale.mjs.map +1 -0
- package/dist/engine/time-window.cjs +148 -0
- package/dist/engine/time-window.cjs.map +1 -0
- package/dist/engine/time-window.d.cts +20 -0
- package/dist/engine/time-window.d.cts.map +1 -0
- package/dist/engine/time-window.d.mts +20 -0
- package/dist/engine/time-window.d.mts.map +1 -0
- package/dist/engine/time-window.mjs +146 -0
- package/dist/engine/time-window.mjs.map +1 -0
- package/dist/fcm.cjs +208 -0
- package/dist/fcm.cjs.map +1 -0
- package/dist/fcm.d.cts +89 -0
- package/dist/fcm.d.cts.map +1 -0
- package/dist/fcm.d.mts +89 -0
- package/dist/fcm.d.mts.map +1 -0
- package/dist/fcm.mjs +202 -0
- package/dist/fcm.mjs.map +1 -0
- package/dist/hash.cjs +244 -0
- package/dist/hash.cjs.map +1 -0
- package/dist/hash.d.cts +28 -0
- package/dist/hash.d.cts.map +1 -0
- package/dist/hash.d.mts +28 -0
- package/dist/hash.d.mts.map +1 -0
- package/dist/hash.mjs +238 -0
- package/dist/hash.mjs.map +1 -0
- package/dist/host/auth.cjs +48 -0
- package/dist/host/auth.cjs.map +1 -0
- package/dist/host/auth.d.cts +33 -0
- package/dist/host/auth.d.cts.map +1 -0
- package/dist/host/auth.d.mts +33 -0
- package/dist/host/auth.d.mts.map +1 -0
- package/dist/host/auth.mjs +45 -0
- package/dist/host/auth.mjs.map +1 -0
- package/dist/host/batch.cjs +178 -0
- package/dist/host/batch.cjs.map +1 -0
- package/dist/host/batch.d.cts +92 -0
- package/dist/host/batch.d.cts.map +1 -0
- package/dist/host/batch.d.mts +92 -0
- package/dist/host/batch.d.mts.map +1 -0
- package/dist/host/batch.mjs +169 -0
- package/dist/host/batch.mjs.map +1 -0
- package/dist/host/channels.cjs +256 -0
- package/dist/host/channels.cjs.map +1 -0
- package/dist/host/channels.d.cts +66 -0
- package/dist/host/channels.d.cts.map +1 -0
- package/dist/host/channels.d.mts +66 -0
- package/dist/host/channels.d.mts.map +1 -0
- package/dist/host/channels.mjs +252 -0
- package/dist/host/channels.mjs.map +1 -0
- package/dist/host/execute.cjs +102 -0
- package/dist/host/execute.cjs.map +1 -0
- package/dist/host/execute.d.cts +38 -0
- package/dist/host/execute.d.cts.map +1 -0
- package/dist/host/execute.d.mts +38 -0
- package/dist/host/execute.d.mts.map +1 -0
- package/dist/host/execute.mjs +101 -0
- package/dist/host/execute.mjs.map +1 -0
- package/dist/host/fresh-read.cjs +29 -0
- package/dist/host/fresh-read.cjs.map +1 -0
- package/dist/host/fresh-read.d.cts +16 -0
- package/dist/host/fresh-read.d.cts.map +1 -0
- package/dist/host/fresh-read.d.mts +16 -0
- package/dist/host/fresh-read.d.mts.map +1 -0
- package/dist/host/fresh-read.mjs +28 -0
- package/dist/host/fresh-read.mjs.map +1 -0
- package/dist/host/http.cjs +393 -0
- package/dist/host/http.cjs.map +1 -0
- package/dist/host/http.d.cts +61 -0
- package/dist/host/http.d.cts.map +1 -0
- package/dist/host/http.d.mts +61 -0
- package/dist/host/http.d.mts.map +1 -0
- package/dist/host/http.mjs +389 -0
- package/dist/host/http.mjs.map +1 -0
- package/dist/host/ingest.cjs +1210 -0
- package/dist/host/ingest.cjs.map +1 -0
- package/dist/host/ingest.d.cts +497 -0
- package/dist/host/ingest.d.cts.map +1 -0
- package/dist/host/ingest.d.mts +497 -0
- package/dist/host/ingest.d.mts.map +1 -0
- package/dist/host/ingest.mjs +1172 -0
- package/dist/host/ingest.mjs.map +1 -0
- package/dist/host/journey-host.cjs +223 -0
- package/dist/host/journey-host.cjs.map +1 -0
- package/dist/host/journey-host.d.cts +118 -0
- package/dist/host/journey-host.d.cts.map +1 -0
- package/dist/host/journey-host.d.mts +118 -0
- package/dist/host/journey-host.d.mts.map +1 -0
- package/dist/host/journey-host.mjs +219 -0
- package/dist/host/journey-host.mjs.map +1 -0
- package/dist/host/platform.cjs +20 -0
- package/dist/host/platform.cjs.map +1 -0
- package/dist/host/platform.d.cts +120 -0
- package/dist/host/platform.d.cts.map +1 -0
- package/dist/host/platform.d.mts +120 -0
- package/dist/host/platform.d.mts.map +1 -0
- package/dist/host/platform.mjs +18 -0
- package/dist/host/platform.mjs.map +1 -0
- package/dist/host/senders.cjs +71 -0
- package/dist/host/senders.cjs.map +1 -0
- package/dist/host/senders.d.cts +34 -0
- package/dist/host/senders.d.cts.map +1 -0
- package/dist/host/senders.d.mts +34 -0
- package/dist/host/senders.d.mts.map +1 -0
- package/dist/host/senders.mjs +67 -0
- package/dist/host/senders.mjs.map +1 -0
- package/dist/host/workflow-cache.cjs +47 -0
- package/dist/host/workflow-cache.cjs.map +1 -0
- package/dist/host/workflow-cache.d.cts +21 -0
- package/dist/host/workflow-cache.d.cts.map +1 -0
- package/dist/host/workflow-cache.d.mts +21 -0
- package/dist/host/workflow-cache.d.mts.map +1 -0
- package/dist/host/workflow-cache.mjs +46 -0
- package/dist/host/workflow-cache.mjs.map +1 -0
- package/dist/http2-client.cjs +89 -0
- package/dist/http2-client.cjs.map +1 -0
- package/dist/http2-client.d.cts +45 -0
- package/dist/http2-client.d.cts.map +1 -0
- package/dist/http2-client.d.mts +45 -0
- package/dist/http2-client.d.mts.map +1 -0
- package/dist/http2-client.mjs +87 -0
- package/dist/http2-client.mjs.map +1 -0
- package/dist/index.cjs +130 -0
- package/dist/index.d.cts +21 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.mjs +20 -0
- package/dist/inflight.cjs +116 -0
- package/dist/inflight.cjs.map +1 -0
- package/dist/inflight.d.cts +49 -0
- package/dist/inflight.d.cts.map +1 -0
- package/dist/inflight.d.mts +49 -0
- package/dist/inflight.d.mts.map +1 -0
- package/dist/inflight.mjs +113 -0
- package/dist/inflight.mjs.map +1 -0
- package/dist/ir.cjs +429 -0
- package/dist/ir.cjs.map +1 -0
- package/dist/ir.d.cts +593 -0
- package/dist/ir.d.cts.map +1 -0
- package/dist/ir.d.mts +593 -0
- package/dist/ir.d.mts.map +1 -0
- package/dist/ir.mjs +404 -0
- package/dist/ir.mjs.map +1 -0
- package/dist/jwt.cjs +17 -0
- package/dist/jwt.cjs.map +1 -0
- package/dist/jwt.d.cts +7 -0
- package/dist/jwt.d.cts.map +1 -0
- package/dist/jwt.d.mts +7 -0
- package/dist/jwt.d.mts.map +1 -0
- package/dist/jwt.mjs +15 -0
- package/dist/jwt.mjs.map +1 -0
- package/dist/node/index.cjs +231 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +59 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.d.mts +59 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/node/index.mjs +225 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/node/runs.cjs +222 -0
- package/dist/node/runs.cjs.map +1 -0
- package/dist/node/runs.d.cts +93 -0
- package/dist/node/runs.d.cts.map +1 -0
- package/dist/node/runs.d.mts +93 -0
- package/dist/node/runs.d.mts.map +1 -0
- package/dist/node/runs.mjs +221 -0
- package/dist/node/runs.mjs.map +1 -0
- package/dist/node/runtime.cjs +351 -0
- package/dist/node/runtime.cjs.map +1 -0
- package/dist/node/runtime.d.cts +96 -0
- package/dist/node/runtime.d.cts.map +1 -0
- package/dist/node/runtime.d.mts +96 -0
- package/dist/node/runtime.d.mts.map +1 -0
- package/dist/node/runtime.mjs +348 -0
- package/dist/node/runtime.mjs.map +1 -0
- package/dist/plan.cjs +221 -0
- package/dist/plan.cjs.map +1 -0
- package/dist/plan.d.cts +68 -0
- package/dist/plan.d.cts.map +1 -0
- package/dist/plan.d.mts +68 -0
- package/dist/plan.d.mts.map +1 -0
- package/dist/plan.mjs +218 -0
- package/dist/plan.mjs.map +1 -0
- package/dist/postgres-js.cjs +51 -0
- package/dist/postgres-js.cjs.map +1 -0
- package/dist/postgres-js.d.cts +32 -0
- package/dist/postgres-js.d.cts.map +1 -0
- package/dist/postgres-js.d.mts +32 -0
- package/dist/postgres-js.d.mts.map +1 -0
- package/dist/postgres-js.mjs +46 -0
- package/dist/postgres-js.mjs.map +1 -0
- package/dist/provenance.cjs +66 -0
- package/dist/provenance.cjs.map +1 -0
- package/dist/provenance.d.cts +40 -0
- package/dist/provenance.d.cts.map +1 -0
- package/dist/provenance.d.mts +40 -0
- package/dist/provenance.d.mts.map +1 -0
- package/dist/provenance.mjs +64 -0
- package/dist/provenance.mjs.map +1 -0
- package/dist/push.cjs +11 -0
- package/dist/push.cjs.map +1 -0
- package/dist/push.d.cts +14 -0
- package/dist/push.d.cts.map +1 -0
- package/dist/push.d.mts +14 -0
- package/dist/push.d.mts.map +1 -0
- package/dist/push.mjs +10 -0
- package/dist/push.mjs.map +1 -0
- package/dist/react-email.cjs +56 -0
- package/dist/react-email.cjs.map +1 -0
- package/dist/react-email.d.cts +5 -0
- package/dist/react-email.d.cts.map +1 -0
- package/dist/react-email.d.mts +5 -0
- package/dist/react-email.d.mts.map +1 -0
- package/dist/react-email.mjs +55 -0
- package/dist/react-email.mjs.map +1 -0
- package/dist/reporting/classify.cjs +46 -0
- package/dist/reporting/classify.cjs.map +1 -0
- package/dist/reporting/classify.d.cts +65 -0
- package/dist/reporting/classify.d.cts.map +1 -0
- package/dist/reporting/classify.d.mts +65 -0
- package/dist/reporting/classify.d.mts.map +1 -0
- package/dist/reporting/classify.mjs +42 -0
- package/dist/reporting/classify.mjs.map +1 -0
- package/dist/reporting/observer.cjs +137 -0
- package/dist/reporting/observer.cjs.map +1 -0
- package/dist/reporting/observer.d.cts +31 -0
- package/dist/reporting/observer.d.cts.map +1 -0
- package/dist/reporting/observer.d.mts +31 -0
- package/dist/reporting/observer.d.mts.map +1 -0
- package/dist/reporting/observer.mjs +134 -0
- package/dist/reporting/observer.mjs.map +1 -0
- package/dist/reporting/tracking.cjs +185 -0
- package/dist/reporting/tracking.cjs.map +1 -0
- package/dist/reporting/tracking.d.cts +63 -0
- package/dist/reporting/tracking.d.cts.map +1 -0
- package/dist/reporting/tracking.d.mts +63 -0
- package/dist/reporting/tracking.d.mts.map +1 -0
- package/dist/reporting/tracking.mjs +182 -0
- package/dist/reporting/tracking.mjs.map +1 -0
- package/dist/runtime.cjs +18 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +44 -0
- package/dist/runtime.d.cts.map +1 -0
- package/dist/runtime.d.mts +44 -0
- package/dist/runtime.d.mts.map +1 -0
- package/dist/runtime.mjs +17 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/store/condition-sql.cjs +145 -0
- package/dist/store/condition-sql.cjs.map +1 -0
- package/dist/store/condition-sql.d.cts +38 -0
- package/dist/store/condition-sql.d.cts.map +1 -0
- package/dist/store/condition-sql.d.mts +38 -0
- package/dist/store/condition-sql.d.mts.map +1 -0
- package/dist/store/condition-sql.mjs +144 -0
- package/dist/store/condition-sql.mjs.map +1 -0
- package/dist/store/erasure.cjs +21 -0
- package/dist/store/erasure.cjs.map +1 -0
- package/dist/store/erasure.d.cts +16 -0
- package/dist/store/erasure.d.cts.map +1 -0
- package/dist/store/erasure.d.mts +16 -0
- package/dist/store/erasure.d.mts.map +1 -0
- package/dist/store/erasure.mjs +20 -0
- package/dist/store/erasure.mjs.map +1 -0
- package/dist/store/facts.cjs +79 -0
- package/dist/store/facts.cjs.map +1 -0
- package/dist/store/facts.d.cts +41 -0
- package/dist/store/facts.d.cts.map +1 -0
- package/dist/store/facts.d.mts +41 -0
- package/dist/store/facts.d.mts.map +1 -0
- package/dist/store/facts.mjs +77 -0
- package/dist/store/facts.mjs.map +1 -0
- package/dist/store/identity.cjs +34 -0
- package/dist/store/identity.cjs.map +1 -0
- package/dist/store/identity.d.cts +13 -0
- package/dist/store/identity.d.cts.map +1 -0
- package/dist/store/identity.d.mts +13 -0
- package/dist/store/identity.d.mts.map +1 -0
- package/dist/store/identity.mjs +30 -0
- package/dist/store/identity.mjs.map +1 -0
- package/dist/store/index.cjs +35 -0
- package/dist/store/index.cjs.map +1 -0
- package/dist/store/index.d.cts +766 -0
- package/dist/store/index.d.cts.map +1 -0
- package/dist/store/index.d.mts +766 -0
- package/dist/store/index.d.mts.map +1 -0
- package/dist/store/index.mjs +22 -0
- package/dist/store/index.mjs.map +1 -0
- package/dist/store/postgres-reporting.cjs +327 -0
- package/dist/store/postgres-reporting.cjs.map +1 -0
- package/dist/store/postgres-reporting.d.cts +95 -0
- package/dist/store/postgres-reporting.d.cts.map +1 -0
- package/dist/store/postgres-reporting.d.mts +95 -0
- package/dist/store/postgres-reporting.d.mts.map +1 -0
- package/dist/store/postgres-reporting.mjs +326 -0
- package/dist/store/postgres-reporting.mjs.map +1 -0
- package/dist/store/postgres.cjs +1173 -0
- package/dist/store/postgres.cjs.map +1 -0
- package/dist/store/postgres.d.cts +199 -0
- package/dist/store/postgres.d.cts.map +1 -0
- package/dist/store/postgres.d.mts +199 -0
- package/dist/store/postgres.d.mts.map +1 -0
- package/dist/store/postgres.mjs +1170 -0
- package/dist/store/postgres.mjs.map +1 -0
- package/dist/store/sql.cjs +24 -0
- package/dist/store/sql.cjs.map +1 -0
- package/dist/store/sql.d.cts +26 -0
- package/dist/store/sql.d.cts.map +1 -0
- package/dist/store/sql.d.mts +26 -0
- package/dist/store/sql.d.mts.map +1 -0
- package/dist/store/sql.mjs +23 -0
- package/dist/store/sql.mjs.map +1 -0
- package/dist/store/tables.cjs +660 -0
- package/dist/store/tables.cjs.map +1 -0
- package/dist/store/tables.d.cts +103 -0
- package/dist/store/tables.d.cts.map +1 -0
- package/dist/store/tables.d.mts +103 -0
- package/dist/store/tables.d.mts.map +1 -0
- package/dist/store/tables.mjs +653 -0
- package/dist/store/tables.mjs.map +1 -0
- package/dist/store/user-lock.cjs +42 -0
- package/dist/store/user-lock.cjs.map +1 -0
- package/dist/store/user-lock.d.cts +30 -0
- package/dist/store/user-lock.d.cts.map +1 -0
- package/dist/store/user-lock.d.mts +30 -0
- package/dist/store/user-lock.d.mts.map +1 -0
- package/dist/store/user-lock.mjs +39 -0
- package/dist/store/user-lock.mjs.map +1 -0
- package/dist/template-rules.cjs +94 -0
- package/dist/template-rules.cjs.map +1 -0
- package/dist/template-rules.d.cts +80 -0
- package/dist/template-rules.d.cts.map +1 -0
- package/dist/template-rules.d.mts +80 -0
- package/dist/template-rules.d.mts.map +1 -0
- package/dist/template-rules.mjs +86 -0
- package/dist/template-rules.mjs.map +1 -0
- package/dist/templates.cjs +375 -0
- package/dist/templates.cjs.map +1 -0
- package/dist/templates.d.cts +358 -0
- package/dist/templates.d.cts.map +1 -0
- package/dist/templates.d.mts +358 -0
- package/dist/templates.d.mts.map +1 -0
- package/dist/templates.mjs +353 -0
- package/dist/templates.mjs.map +1 -0
- package/dist/transports/cloudflare-email.cjs +69 -0
- package/dist/transports/cloudflare-email.cjs.map +1 -0
- package/dist/transports/cloudflare-email.d.cts +63 -0
- package/dist/transports/cloudflare-email.d.cts.map +1 -0
- package/dist/transports/cloudflare-email.d.mts +63 -0
- package/dist/transports/cloudflare-email.d.mts.map +1 -0
- package/dist/transports/cloudflare-email.mjs +67 -0
- package/dist/transports/cloudflare-email.mjs.map +1 -0
- package/dist/transports/ses.cjs +142 -0
- package/dist/transports/ses.cjs.map +1 -0
- package/dist/transports/ses.d.cts +49 -0
- package/dist/transports/ses.d.cts.map +1 -0
- package/dist/transports/ses.d.mts +49 -0
- package/dist/transports/ses.d.mts.map +1 -0
- package/dist/transports/ses.mjs +139 -0
- package/dist/transports/ses.mjs.map +1 -0
- package/dist/transports/sigv4.cjs +86 -0
- package/dist/transports/sigv4.cjs.map +1 -0
- package/dist/transports/sigv4.d.cts +25 -0
- package/dist/transports/sigv4.d.cts.map +1 -0
- package/dist/transports/sigv4.d.mts +25 -0
- package/dist/transports/sigv4.d.mts.map +1 -0
- package/dist/transports/sigv4.mjs +85 -0
- package/dist/transports/sigv4.mjs.map +1 -0
- package/dist/webhooks.cjs +97 -0
- package/dist/webhooks.cjs.map +1 -0
- package/dist/webhooks.d.cts +23 -0
- package/dist/webhooks.d.cts.map +1 -0
- package/dist/webhooks.d.mts +23 -0
- package/dist/webhooks.d.mts.map +1 -0
- package/dist/webhooks.mjs +95 -0
- package/dist/webhooks.mjs.map +1 -0
- package/dist/webpush.cjs +361 -0
- package/dist/webpush.cjs.map +1 -0
- package/dist/webpush.d.cts +135 -0
- package/dist/webpush.d.cts.map +1 -0
- package/dist/webpush.d.mts +135 -0
- package/dist/webpush.d.mts.map +1 -0
- package/dist/webpush.mjs +350 -0
- package/dist/webpush.mjs.map +1 -0
- package/package.json +279 -3
- package/src/cloudflare/workers.d.ts +44 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DurableContext, RetryDecision } from "@aws/durable-execution-sdk-js";
|
|
2
|
+
import { EngineStep } from "../engine/ports.mjs";
|
|
3
|
+
import { ExecutionRegistry, JourneyStore } from "../store/index.mjs";
|
|
4
|
+
import { LambdaApi } from "./lambda-api.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* EngineStep over a Lambda durable execution.
|
|
7
|
+
*
|
|
8
|
+
* Steps, sleeps and wakes map onto the SDK's `step`, `wait` and callbacks. A wake handle is a
|
|
9
|
+
* callback, which is one-shot, so every wait arms a fresh one (the interpreter subscribes on
|
|
10
|
+
* every attempt): created where the durable context allows it — outside any step, so its id
|
|
11
|
+
* replays — then recorded in Postgres together with the subscription rows, numbered by a
|
|
12
|
+
* generation so a late wake or cleanup of an older wait cannot touch a newer one. The callback
|
|
13
|
+
* is only a hint; the facts the wait re-checks are Postgres'.
|
|
14
|
+
*/
|
|
15
|
+
/** What the step retries, bounded: 6 attempts with exponential backoff up to a minute. */
|
|
16
|
+
export declare function stepRetry(error: Error, attempt: number): RetryDecision;
|
|
17
|
+
export declare class AwsEngineStep implements EngineStep {
|
|
18
|
+
private readonly context;
|
|
19
|
+
private readonly store;
|
|
20
|
+
private readonly executions;
|
|
21
|
+
private readonly lambda;
|
|
22
|
+
private readonly userId;
|
|
23
|
+
private readonly instanceId;
|
|
24
|
+
private generation;
|
|
25
|
+
private armed;
|
|
26
|
+
constructor(context: DurableContext, store: JourneyStore, executions: ExecutionRegistry, lambda: LambdaApi, userId: string, instanceId: string);
|
|
27
|
+
do<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
28
|
+
sleep(name: string, ms: number): Promise<void>;
|
|
29
|
+
subscribe(name: string, events: readonly string[], options?: {
|
|
30
|
+
deadlineMs?: number;
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
unsubscribe(name: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* The timeout is ignored on purpose: the callback's own timeout was set from the deadline
|
|
35
|
+
* when it was armed (`subscribe`), and only its expiry says the wait timed out.
|
|
36
|
+
*/
|
|
37
|
+
waitForWake(name: string, _wait: {
|
|
38
|
+
timeoutMs: number;
|
|
39
|
+
deadlineMs: number;
|
|
40
|
+
}): Promise<'event' | 'timeout'>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=engine-step.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-step.d.mts","names":[],"sources":["../../src/aws/engine-step.ts"],"mappings":";;;;;;;;;;;;;;;wBAuBgB,UAAU,OAAO,OAAO,kBAAkB;qBAa7C,yBAAyB;mBAKjB;mBACA;mBACA;mBACA;mBACA;mBACA;UATX;UACA;EAER,YACmB,SAAS,gBACT,OAAO,cACP,YAAY,mBACZ,QAAQ,WACR,gBACA;EAGnB,GAAG,GAAG,cAAc,UAAU,QAAQ,KAAK,QAAQ;EAI7C,MAAM,cAAc,aAAa;EAMjC,UACJ,cACA,2BACA;IAAW;MACV;EAqCG,YAAY,eAAe;;;;;EAsB3B,YACJ,cACA;IAAS;IAAmB;MAC3B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { CallbackTimeoutError } from "@aws/durable-execution-sdk-js";
|
|
2
|
+
import { isRetryable } from "../engine/retry.mjs";
|
|
3
|
+
import { instanceOwner } from "../store/identity.mjs";
|
|
4
|
+
import "../store/index.mjs";
|
|
5
|
+
// src/aws/engine-step.ts
|
|
6
|
+
/**
|
|
7
|
+
* EngineStep over a Lambda durable execution.
|
|
8
|
+
*
|
|
9
|
+
* Steps, sleeps and wakes map onto the SDK's `step`, `wait` and callbacks. A wake handle is a
|
|
10
|
+
* callback, which is one-shot, so every wait arms a fresh one (the interpreter subscribes on
|
|
11
|
+
* every attempt): created where the durable context allows it — outside any step, so its id
|
|
12
|
+
* replays — then recorded in Postgres together with the subscription rows, numbered by a
|
|
13
|
+
* generation so a late wake or cleanup of an older wait cannot touch a newer one. The callback
|
|
14
|
+
* is only a hint; the facts the wait re-checks are Postgres'.
|
|
15
|
+
*/
|
|
16
|
+
/** What the step retries, bounded: 6 attempts with exponential backoff up to a minute. */
|
|
17
|
+
function stepRetry(error, attempt) {
|
|
18
|
+
if (!isRetryable(error) || attempt >= 6) return { shouldRetry: false };
|
|
19
|
+
return {
|
|
20
|
+
shouldRetry: true,
|
|
21
|
+
delay: { seconds: Math.min(60, 2 ** attempt) }
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var AwsEngineStep = class {
|
|
25
|
+
context;
|
|
26
|
+
store;
|
|
27
|
+
executions;
|
|
28
|
+
lambda;
|
|
29
|
+
userId;
|
|
30
|
+
instanceId;
|
|
31
|
+
generation = 0;
|
|
32
|
+
armed;
|
|
33
|
+
constructor(context, store, executions, lambda, userId, instanceId) {
|
|
34
|
+
this.context = context;
|
|
35
|
+
this.store = store;
|
|
36
|
+
this.executions = executions;
|
|
37
|
+
this.lambda = lambda;
|
|
38
|
+
this.userId = userId;
|
|
39
|
+
this.instanceId = instanceId;
|
|
40
|
+
}
|
|
41
|
+
do(name, fn) {
|
|
42
|
+
return this.context.step(name, () => fn(), { retryStrategy: stepRetry });
|
|
43
|
+
}
|
|
44
|
+
async sleep(name, ms) {
|
|
45
|
+
if (!(ms > 0)) return;
|
|
46
|
+
await this.context.wait(name, { seconds: Math.ceil(ms / 1e3) });
|
|
47
|
+
}
|
|
48
|
+
async subscribe(name, events, options = {}) {
|
|
49
|
+
const generation = ++this.generation;
|
|
50
|
+
const { deadlineMs } = options;
|
|
51
|
+
const seconds = deadlineMs === void 0 ? void 0 : await this.context.step(`${name}:timeout`, async () => Math.max(1, Math.ceil((deadlineMs - Date.now()) / 1e3)));
|
|
52
|
+
const [promise, callbackId] = await this.context.createCallback(`${name}:callback`, seconds === void 0 ? {} : { timeout: { seconds } });
|
|
53
|
+
const previous = this.armed;
|
|
54
|
+
this.armed = {
|
|
55
|
+
promise,
|
|
56
|
+
callbackId,
|
|
57
|
+
generation,
|
|
58
|
+
settled: false
|
|
59
|
+
};
|
|
60
|
+
await this.context.step(name, async () => {
|
|
61
|
+
const owner = await instanceOwner(this.store, this.instanceId, this.userId);
|
|
62
|
+
await this.store.subscribe(this.instanceId, owner, events, Date.now());
|
|
63
|
+
await this.executions.armCallback(this.instanceId, {
|
|
64
|
+
id: callbackId,
|
|
65
|
+
generation,
|
|
66
|
+
deadlineAt: deadlineMs
|
|
67
|
+
});
|
|
68
|
+
if (previous !== void 0 && !previous.settled) await this.lambda.completeCallback(previous.callbackId, "{}");
|
|
69
|
+
}, { retryStrategy: stepRetry });
|
|
70
|
+
if (previous !== void 0) previous.settled = true;
|
|
71
|
+
}
|
|
72
|
+
async unsubscribe(name) {
|
|
73
|
+
const armed = this.armed;
|
|
74
|
+
await this.context.step(name, async () => {
|
|
75
|
+
await this.store.unsubscribe(this.instanceId);
|
|
76
|
+
if (armed === void 0) return;
|
|
77
|
+
await this.executions.clearCallback(this.instanceId, armed.generation);
|
|
78
|
+
if (!armed.settled) await this.lambda.completeCallback(armed.callbackId, "{}");
|
|
79
|
+
}, { retryStrategy: stepRetry });
|
|
80
|
+
if (armed !== void 0) armed.settled = true;
|
|
81
|
+
this.armed = void 0;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The timeout is ignored on purpose: the callback's own timeout was set from the deadline
|
|
85
|
+
* when it was armed (`subscribe`), and only its expiry says the wait timed out.
|
|
86
|
+
*/
|
|
87
|
+
async waitForWake(name, _wait) {
|
|
88
|
+
const armed = this.armed;
|
|
89
|
+
if (armed === void 0) throw new Error(`waitForWake '${name}' without a subscribe: nothing is armed to wake it`);
|
|
90
|
+
try {
|
|
91
|
+
await armed.promise;
|
|
92
|
+
return "event";
|
|
93
|
+
} catch (error) {
|
|
94
|
+
if (error instanceof CallbackTimeoutError) return "timeout";
|
|
95
|
+
throw error;
|
|
96
|
+
} finally {
|
|
97
|
+
armed.settled = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
export { AwsEngineStep, stepRetry };
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=engine-step.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-step.mjs","names":[],"sources":["../../src/aws/engine-step.ts"],"sourcesContent":["import {\n CallbackTimeoutError,\n type DurableContext,\n type DurablePromise,\n type RetryDecision,\n} from '@aws/durable-execution-sdk-js';\nimport type { EngineStep } from '../engine/ports';\nimport { isRetryable } from '../engine/retry';\nimport { type ExecutionRegistry, type JourneyStore, instanceOwner } from '../store/index';\nimport type { LambdaApi } from './lambda-api';\n\n/**\n * EngineStep over a Lambda durable execution.\n *\n * Steps, sleeps and wakes map onto the SDK's `step`, `wait` and callbacks. A wake handle is a\n * callback, which is one-shot, so every wait arms a fresh one (the interpreter subscribes on\n * every attempt): created where the durable context allows it — outside any step, so its id\n * replays — then recorded in Postgres together with the subscription rows, numbered by a\n * generation so a late wake or cleanup of an older wait cannot touch a newer one. The callback\n * is only a hint; the facts the wait re-checks are Postgres'.\n */\n\n/** What the step retries, bounded: 6 attempts with exponential backoff up to a minute. */\nexport function stepRetry(error: Error, attempt: number): RetryDecision {\n if (!isRetryable(error) || attempt >= 6) return { shouldRetry: false };\n return { shouldRetry: true, delay: { seconds: Math.min(60, 2 ** attempt) } };\n}\n\ninterface Armed {\n promise: DurablePromise<string>;\n callbackId: string;\n generation: number;\n /** The wait consumed it (woken or timed out): there is nothing left to close. */\n settled: boolean;\n}\n\nexport class AwsEngineStep implements EngineStep {\n private generation = 0;\n private armed: Armed | undefined;\n\n constructor(\n private readonly context: DurableContext,\n private readonly store: JourneyStore,\n private readonly executions: ExecutionRegistry,\n private readonly lambda: LambdaApi,\n private readonly userId: string,\n private readonly instanceId: string\n ) {}\n\n do<T>(name: string, fn: () => Promise<T>): Promise<T> {\n return this.context.step(name, () => fn(), { retryStrategy: stepRetry });\n }\n\n async sleep(name: string, ms: number): Promise<void> {\n // A wait is whole seconds: rounded up, so it never ends early; nothing to wait at zero\n if (!(ms > 0)) return;\n await this.context.wait(name, { seconds: Math.ceil(ms / 1000) });\n }\n\n async subscribe(\n name: string,\n events: readonly string[],\n options: { deadlineMs?: number } = {}\n ): Promise<void> {\n const generation = ++this.generation;\n const { deadlineMs } = options;\n // The callback's own timeout is the wait's deadline: fixed when it is created\n const seconds =\n deadlineMs === undefined\n ? undefined\n : await this.context.step(`${name}:timeout`, async () =>\n Math.max(1, Math.ceil((deadlineMs - Date.now()) / 1000))\n );\n const [promise, callbackId] = await this.context.createCallback(\n `${name}:callback`,\n seconds === undefined ? {} : { timeout: { seconds } }\n );\n const previous = this.armed;\n this.armed = { promise, callbackId, generation, settled: false };\n await this.context.step(\n name,\n async () => {\n // Rows first, then the callback: a wake that lands in between finds the rows and the\n // callback of the last wait — its completion is refused, and this wait checks the facts\n const owner = await instanceOwner(this.store, this.instanceId, this.userId);\n await this.store.subscribe(this.instanceId, owner, events, Date.now());\n await this.executions.armCallback(this.instanceId, {\n id: callbackId,\n generation,\n deadlineAt: deadlineMs,\n });\n if (previous !== undefined && !previous.settled) {\n await this.lambda.completeCallback(previous.callbackId, '{}');\n }\n },\n { retryStrategy: stepRetry }\n );\n if (previous !== undefined) previous.settled = true;\n }\n\n async unsubscribe(name: string): Promise<void> {\n const armed = this.armed;\n await this.context.step(\n name,\n async () => {\n await this.store.unsubscribe(this.instanceId);\n if (armed === undefined) return;\n await this.executions.clearCallback(this.instanceId, armed.generation);\n // The condition held before the wait parked: its callback is closed through the public\n // API (a closed one answers false), rather than left open until it times out\n if (!armed.settled) await this.lambda.completeCallback(armed.callbackId, '{}');\n },\n { retryStrategy: stepRetry }\n );\n if (armed !== undefined) armed.settled = true;\n this.armed = undefined;\n }\n\n /**\n * The timeout is ignored on purpose: the callback's own timeout was set from the deadline\n * when it was armed (`subscribe`), and only its expiry says the wait timed out.\n */\n async waitForWake(\n name: string,\n _wait: { timeoutMs: number; deadlineMs: number }\n ): Promise<'event' | 'timeout'> {\n const armed = this.armed;\n if (armed === undefined) {\n throw new Error(`waitForWake '${name}' without a subscribe: nothing is armed to wake it`);\n }\n try {\n await armed.promise;\n return 'event';\n } catch (error) {\n // Only the callback's own expiry is a timeout; any other failure is a failure\n if (error instanceof CallbackTimeoutError) return 'timeout';\n throw error;\n } finally {\n armed.settled = true;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,SAAgB,UAAU,OAAc,SAAgC;CACtE,IAAI,CAAC,YAAY,KAAK,KAAK,WAAW,GAAG,OAAO,EAAE,aAAa,MAAM;CACrE,OAAO;EAAE,aAAa;EAAM,OAAO,EAAE,SAAS,KAAK,IAAI,IAAI,KAAK,OAAO,EAAE;CAAE;AAC7E;AAUA,IAAa,gBAAb,MAAiD;CAK5B;CACA;CACA;CACA;CACA;CACA;CATX,aAAa;CACb;CAER,YACmB,SACA,OACA,YACA,QACA,QACA,YACjB;EANiB,KAAA,UAAA;EACA,KAAA,QAAA;EACA,KAAA,aAAA;EACA,KAAA,SAAA;EACA,KAAA,SAAA;EACA,KAAA,aAAA;CAChB;CAEH,GAAM,MAAc,IAAkC;EACpD,OAAO,KAAK,QAAQ,KAAK,YAAY,GAAG,GAAG,EAAE,eAAe,UAAU,CAAC;CACzE;CAEA,MAAM,MAAM,MAAc,IAA2B;EAEnD,IAAI,EAAE,KAAK,IAAI;EACf,MAAM,KAAK,QAAQ,KAAK,MAAM,EAAE,SAAS,KAAK,KAAK,KAAK,GAAI,EAAE,CAAC;CACjE;CAEA,MAAM,UACJ,MACA,QACA,UAAmC,CAAC,GACrB;EACf,MAAM,aAAa,EAAE,KAAK;EAC1B,MAAM,EAAE,eAAe;EAEvB,MAAM,UACJ,eAAe,KAAA,IACX,KAAA,IACA,MAAM,KAAK,QAAQ,KAAK,GAAG,KAAK,WAAW,YACzC,KAAK,IAAI,GAAG,KAAK,MAAM,aAAa,KAAK,IAAI,KAAK,GAAI,CAAC,CACzD;EACN,MAAM,CAAC,SAAS,cAAc,MAAM,KAAK,QAAQ,eAC/C,GAAG,KAAK,YACR,YAAY,KAAA,IAAY,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,CACtD;EACA,MAAM,WAAW,KAAK;EACtB,KAAK,QAAQ;GAAE;GAAS;GAAY;GAAY,SAAS;EAAM;EAC/D,MAAM,KAAK,QAAQ,KACjB,MACA,YAAY;GAGV,MAAM,QAAQ,MAAM,cAAc,KAAK,OAAO,KAAK,YAAY,KAAK,MAAM;GAC1E,MAAM,KAAK,MAAM,UAAU,KAAK,YAAY,OAAO,QAAQ,KAAK,IAAI,CAAC;GACrE,MAAM,KAAK,WAAW,YAAY,KAAK,YAAY;IACjD,IAAI;IACJ;IACA,YAAY;GACd,CAAC;GACD,IAAI,aAAa,KAAA,KAAa,CAAC,SAAS,SACtC,MAAM,KAAK,OAAO,iBAAiB,SAAS,YAAY,IAAI;EAEhE,GACA,EAAE,eAAe,UAAU,CAC7B;EACA,IAAI,aAAa,KAAA,GAAW,SAAS,UAAU;CACjD;CAEA,MAAM,YAAY,MAA6B;EAC7C,MAAM,QAAQ,KAAK;EACnB,MAAM,KAAK,QAAQ,KACjB,MACA,YAAY;GACV,MAAM,KAAK,MAAM,YAAY,KAAK,UAAU;GAC5C,IAAI,UAAU,KAAA,GAAW;GACzB,MAAM,KAAK,WAAW,cAAc,KAAK,YAAY,MAAM,UAAU;GAGrE,IAAI,CAAC,MAAM,SAAS,MAAM,KAAK,OAAO,iBAAiB,MAAM,YAAY,IAAI;EAC/E,GACA,EAAE,eAAe,UAAU,CAC7B;EACA,IAAI,UAAU,KAAA,GAAW,MAAM,UAAU;EACzC,KAAK,QAAQ,KAAA;CACf;;;;;CAMA,MAAM,YACJ,MACA,OAC8B;EAC9B,MAAM,QAAQ,KAAK;EACnB,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MAAM,gBAAgB,KAAK,mDAAmD;EAE1F,IAAI;GACF,MAAM,MAAM;GACZ,OAAO;EACT,SAAS,OAAO;GAEd,IAAI,iBAAiB,sBAAsB,OAAO;GAClD,MAAM;EACR,UAAU;GACR,MAAM,UAAU;EAClB;CACF;AACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let node_buffer = require("node:buffer");
|
|
3
|
+
// src/aws/function-url.ts
|
|
4
|
+
/**
|
|
5
|
+
* An HTTP request, told apart by the event's own top-level shape — the Function URL wraps
|
|
6
|
+
* every request in `requestContext.http`, so no request body can pass for anything else.
|
|
7
|
+
*/
|
|
8
|
+
function isFunctionUrlEvent(event) {
|
|
9
|
+
if (typeof event !== "object" || event === null) return false;
|
|
10
|
+
const { requestContext, rawPath } = event;
|
|
11
|
+
return typeof rawPath === "string" && typeof requestContext === "object" && requestContext !== null && typeof requestContext.http === "object" && requestContext.http !== null && typeof requestContext.http.method === "string";
|
|
12
|
+
}
|
|
13
|
+
const fromBase64 = (value) => new Uint8Array(node_buffer.Buffer.from(value, "base64"));
|
|
14
|
+
const toBase64 = (bytes) => node_buffer.Buffer.from(bytes).toString("base64");
|
|
15
|
+
function toRequest(event) {
|
|
16
|
+
const method = event.requestContext.http.method.toUpperCase();
|
|
17
|
+
const headers = new Headers();
|
|
18
|
+
for (const [name, value] of Object.entries(event.headers ?? {})) if (value !== void 0) headers.set(name, value);
|
|
19
|
+
if (event.cookies !== void 0 && event.cookies.length > 0) headers.set("cookie", event.cookies.join("; "));
|
|
20
|
+
const host = event.requestContext.domainName ?? headers.get("host") ?? "localhost";
|
|
21
|
+
const query = event.rawQueryString === void 0 || event.rawQueryString === "" ? "" : `?${event.rawQueryString}`;
|
|
22
|
+
const hasBody = method !== "GET" && method !== "HEAD" && event.body !== void 0;
|
|
23
|
+
return new Request(`https://${host}${event.rawPath}${query}`, {
|
|
24
|
+
method,
|
|
25
|
+
headers,
|
|
26
|
+
...hasBody ? { body: event.isBase64Encoded === true ? fromBase64(event.body ?? "") : event.body } : {}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** Content types sent as text; everything else (a tracking pixel) goes back base64. */
|
|
30
|
+
const TEXTUAL = /^(text\/|application\/(json|javascript|xml|x-www-form-urlencoded)|image\/svg\+xml)/i;
|
|
31
|
+
async function fromResponse(response, method) {
|
|
32
|
+
const headers = {};
|
|
33
|
+
const cookies = [];
|
|
34
|
+
response.headers.forEach((value, name) => {
|
|
35
|
+
if (name === "set-cookie") cookies.push(value);
|
|
36
|
+
else headers[name] = value;
|
|
37
|
+
});
|
|
38
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
39
|
+
const bytes = method.toUpperCase() === "HEAD" ? /* @__PURE__ */ new Uint8Array() : new Uint8Array(await response.arrayBuffer());
|
|
40
|
+
const textual = bytes.length === 0 || TEXTUAL.test(contentType);
|
|
41
|
+
return {
|
|
42
|
+
statusCode: response.status,
|
|
43
|
+
headers,
|
|
44
|
+
...cookies.length === 0 ? {} : { cookies },
|
|
45
|
+
body: textual ? new TextDecoder().decode(bytes) : toBase64(bytes),
|
|
46
|
+
isBase64Encoded: !textual
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
exports.fromResponse = fromResponse;
|
|
50
|
+
exports.isFunctionUrlEvent = isFunctionUrlEvent;
|
|
51
|
+
exports.toRequest = toRequest;
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=function-url.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-url.cjs","names":["Buffer"],"sources":["../../src/aws/function-url.ts"],"sourcesContent":["import { Buffer } from 'node:buffer';\n/**\n * Lambda Function URL events (payload format 2.0) as fetch `Request`s, and `Response`s back as\n * the result Lambda turns into the HTTP response — so the host's HTTP API runs unchanged.\n */\n\nexport interface FunctionUrlEvent {\n version?: string;\n rawPath: string;\n rawQueryString?: string;\n headers?: Record<string, string | undefined>;\n cookies?: string[];\n body?: string;\n isBase64Encoded?: boolean;\n requestContext: {\n domainName?: string;\n http: { method: string; sourceIp?: string; userAgent?: string };\n };\n}\n\nexport interface FunctionUrlResult {\n statusCode: number;\n headers: Record<string, string>;\n cookies?: string[];\n body: string;\n isBase64Encoded: boolean;\n}\n\n/**\n * An HTTP request, told apart by the event's own top-level shape — the Function URL wraps\n * every request in `requestContext.http`, so no request body can pass for anything else.\n */\nexport function isFunctionUrlEvent(event: unknown): event is FunctionUrlEvent {\n if (typeof event !== 'object' || event === null) return false;\n // Untrusted until checked: every level may be missing\n const { requestContext, rawPath } = event as {\n requestContext?: { http?: { method?: unknown } | null } | null;\n rawPath?: unknown;\n };\n return (\n typeof rawPath === 'string' &&\n typeof requestContext === 'object' &&\n requestContext !== null &&\n typeof requestContext.http === 'object' &&\n requestContext.http !== null &&\n typeof requestContext.http.method === 'string'\n );\n}\n\nconst fromBase64 = (value: string): Uint8Array => new Uint8Array(Buffer.from(value, 'base64'));\nconst toBase64 = (bytes: Uint8Array): string => Buffer.from(bytes).toString('base64');\n\nexport function toRequest(event: FunctionUrlEvent): Request {\n const method = event.requestContext.http.method.toUpperCase();\n const headers = new Headers();\n for (const [name, value] of Object.entries(event.headers ?? {})) {\n if (value !== undefined) headers.set(name, value);\n }\n if (event.cookies !== undefined && event.cookies.length > 0) {\n headers.set('cookie', event.cookies.join('; '));\n }\n const host = event.requestContext.domainName ?? headers.get('host') ?? 'localhost';\n const query =\n event.rawQueryString === undefined || event.rawQueryString === ''\n ? ''\n : `?${event.rawQueryString}`;\n const hasBody = method !== 'GET' && method !== 'HEAD' && event.body !== undefined;\n return new Request(`https://${host}${event.rawPath}${query}`, {\n method,\n headers,\n ...(hasBody\n ? { body: event.isBase64Encoded === true ? fromBase64(event.body ?? '') : event.body }\n : {}),\n });\n}\n\n/** Content types sent as text; everything else (a tracking pixel) goes back base64. */\nconst TEXTUAL =\n /^(text\\/|application\\/(json|javascript|xml|x-www-form-urlencoded)|image\\/svg\\+xml)/i;\n\nexport async function fromResponse(response: Response, method: string): Promise<FunctionUrlResult> {\n const headers: Record<string, string> = {};\n const cookies: string[] = [];\n response.headers.forEach((value, name) => {\n if (name === 'set-cookie') cookies.push(value);\n else headers[name] = value;\n });\n const contentType = response.headers.get('content-type') ?? '';\n const head = method.toUpperCase() === 'HEAD';\n const bytes = head ? new Uint8Array() : new Uint8Array(await response.arrayBuffer());\n const textual = bytes.length === 0 || TEXTUAL.test(contentType);\n return {\n statusCode: response.status,\n headers,\n ...(cookies.length === 0 ? {} : { cookies }),\n body: textual ? new TextDecoder().decode(bytes) : toBase64(bytes),\n isBase64Encoded: !textual,\n };\n}\n"],"mappings":";;;;;;;AAgCA,SAAgB,mBAAmB,OAA2C;CAC5E,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CAExD,MAAM,EAAE,gBAAgB,YAAY;CAIpC,OACE,OAAO,YAAY,YACnB,OAAO,mBAAmB,YAC1B,mBAAmB,QACnB,OAAO,eAAe,SAAS,YAC/B,eAAe,SAAS,QACxB,OAAO,eAAe,KAAK,WAAW;AAE1C;AAEA,MAAM,cAAc,UAA8B,IAAI,WAAWA,YAAAA,OAAO,KAAK,OAAO,QAAQ,CAAC;AAC7F,MAAM,YAAY,UAA8BA,YAAAA,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,QAAQ;AAEpF,SAAgB,UAAU,OAAkC;CAC1D,MAAM,SAAS,MAAM,eAAe,KAAK,OAAO,YAAY;CAC5D,MAAM,UAAU,IAAI,QAAQ;CAC5B,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,WAAW,CAAC,CAAC,GAC5D,IAAI,UAAU,KAAA,GAAW,QAAQ,IAAI,MAAM,KAAK;CAElD,IAAI,MAAM,YAAY,KAAA,KAAa,MAAM,QAAQ,SAAS,GACxD,QAAQ,IAAI,UAAU,MAAM,QAAQ,KAAK,IAAI,CAAC;CAEhD,MAAM,OAAO,MAAM,eAAe,cAAc,QAAQ,IAAI,MAAM,KAAK;CACvE,MAAM,QACJ,MAAM,mBAAmB,KAAA,KAAa,MAAM,mBAAmB,KAC3D,KACA,IAAI,MAAM;CAChB,MAAM,UAAU,WAAW,SAAS,WAAW,UAAU,MAAM,SAAS,KAAA;CACxE,OAAO,IAAI,QAAQ,WAAW,OAAO,MAAM,UAAU,SAAS;EAC5D;EACA;EACA,GAAI,UACA,EAAE,MAAM,MAAM,oBAAoB,OAAO,WAAW,MAAM,QAAQ,EAAE,IAAI,MAAM,KAAK,IACnF,CAAC;CACP,CAAC;AACH;;AAGA,MAAM,UACJ;AAEF,eAAsB,aAAa,UAAoB,QAA4C;CACjG,MAAM,UAAkC,CAAC;CACzC,MAAM,UAAoB,CAAC;CAC3B,SAAS,QAAQ,SAAS,OAAO,SAAS;EACxC,IAAI,SAAS,cAAc,QAAQ,KAAK,KAAK;OACxC,QAAQ,QAAQ;CACvB,CAAC;CACD,MAAM,cAAc,SAAS,QAAQ,IAAI,cAAc,KAAK;CAE5D,MAAM,QADO,OAAO,YAAY,MAAM,yBACjB,IAAI,WAAW,IAAI,IAAI,WAAW,MAAM,SAAS,YAAY,CAAC;CACnF,MAAM,UAAU,MAAM,WAAW,KAAK,QAAQ,KAAK,WAAW;CAC9D,OAAO;EACL,YAAY,SAAS;EACrB;EACA,GAAI,QAAQ,WAAW,IAAI,CAAC,IAAI,EAAE,QAAQ;EAC1C,MAAM,UAAU,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK,IAAI,SAAS,KAAK;EAChE,iBAAiB,CAAC;CACpB;AACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lambda Function URL events (payload format 2.0) as fetch `Request`s, and `Response`s back as
|
|
3
|
+
* the result Lambda turns into the HTTP response — so the host's HTTP API runs unchanged.
|
|
4
|
+
*/
|
|
5
|
+
export interface FunctionUrlEvent {
|
|
6
|
+
version?: string;
|
|
7
|
+
rawPath: string;
|
|
8
|
+
rawQueryString?: string;
|
|
9
|
+
headers?: Record<string, string | undefined>;
|
|
10
|
+
cookies?: string[];
|
|
11
|
+
body?: string;
|
|
12
|
+
isBase64Encoded?: boolean;
|
|
13
|
+
requestContext: {
|
|
14
|
+
domainName?: string;
|
|
15
|
+
http: {
|
|
16
|
+
method: string;
|
|
17
|
+
sourceIp?: string;
|
|
18
|
+
userAgent?: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface FunctionUrlResult {
|
|
23
|
+
statusCode: number;
|
|
24
|
+
headers: Record<string, string>;
|
|
25
|
+
cookies?: string[];
|
|
26
|
+
body: string;
|
|
27
|
+
isBase64Encoded: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* An HTTP request, told apart by the event's own top-level shape — the Function URL wraps
|
|
31
|
+
* every request in `requestContext.http`, so no request body can pass for anything else.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isFunctionUrlEvent(event: unknown): event is FunctionUrlEvent;
|
|
34
|
+
export declare function toRequest(event: FunctionUrlEvent): Request;
|
|
35
|
+
export declare function fromResponse(response: Response, method: string): Promise<FunctionUrlResult>;
|
|
36
|
+
//# sourceMappingURL=function-url.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-url.d.cts","names":[],"sources":["../../src/aws/function-url.ts"],"mappings":";;;;iBAMiB;EACf;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;IACE;IACA;MAAQ;MAAgB;MAAmB;;;;iBAI9B;EACf;EACA,SAAS;EACT;EACA;EACA;;;;;;wBAOc,mBAAmB,iBAAiB,SAAS;wBAoB7C,UAAU,OAAO,mBAAmB;wBA4B9B,aAAa,UAAU,UAAU,iBAAiB,QAAQ"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lambda Function URL events (payload format 2.0) as fetch `Request`s, and `Response`s back as
|
|
3
|
+
* the result Lambda turns into the HTTP response — so the host's HTTP API runs unchanged.
|
|
4
|
+
*/
|
|
5
|
+
export interface FunctionUrlEvent {
|
|
6
|
+
version?: string;
|
|
7
|
+
rawPath: string;
|
|
8
|
+
rawQueryString?: string;
|
|
9
|
+
headers?: Record<string, string | undefined>;
|
|
10
|
+
cookies?: string[];
|
|
11
|
+
body?: string;
|
|
12
|
+
isBase64Encoded?: boolean;
|
|
13
|
+
requestContext: {
|
|
14
|
+
domainName?: string;
|
|
15
|
+
http: {
|
|
16
|
+
method: string;
|
|
17
|
+
sourceIp?: string;
|
|
18
|
+
userAgent?: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface FunctionUrlResult {
|
|
23
|
+
statusCode: number;
|
|
24
|
+
headers: Record<string, string>;
|
|
25
|
+
cookies?: string[];
|
|
26
|
+
body: string;
|
|
27
|
+
isBase64Encoded: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* An HTTP request, told apart by the event's own top-level shape — the Function URL wraps
|
|
31
|
+
* every request in `requestContext.http`, so no request body can pass for anything else.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isFunctionUrlEvent(event: unknown): event is FunctionUrlEvent;
|
|
34
|
+
export declare function toRequest(event: FunctionUrlEvent): Request;
|
|
35
|
+
export declare function fromResponse(response: Response, method: string): Promise<FunctionUrlResult>;
|
|
36
|
+
//# sourceMappingURL=function-url.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-url.d.mts","names":[],"sources":["../../src/aws/function-url.ts"],"mappings":";;;;iBAMiB;EACf;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;IACE;IACA;MAAQ;MAAgB;MAAmB;;;;iBAI9B;EACf;EACA,SAAS;EACT;EACA;EACA;;;;;;wBAOc,mBAAmB,iBAAiB,SAAS;wBAoB7C,UAAU,OAAO,mBAAmB;wBA4B9B,aAAa,UAAU,UAAU,iBAAiB,QAAQ"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
// src/aws/function-url.ts
|
|
3
|
+
/**
|
|
4
|
+
* An HTTP request, told apart by the event's own top-level shape — the Function URL wraps
|
|
5
|
+
* every request in `requestContext.http`, so no request body can pass for anything else.
|
|
6
|
+
*/
|
|
7
|
+
function isFunctionUrlEvent(event) {
|
|
8
|
+
if (typeof event !== "object" || event === null) return false;
|
|
9
|
+
const { requestContext, rawPath } = event;
|
|
10
|
+
return typeof rawPath === "string" && typeof requestContext === "object" && requestContext !== null && typeof requestContext.http === "object" && requestContext.http !== null && typeof requestContext.http.method === "string";
|
|
11
|
+
}
|
|
12
|
+
const fromBase64 = (value) => new Uint8Array(Buffer.from(value, "base64"));
|
|
13
|
+
const toBase64 = (bytes) => Buffer.from(bytes).toString("base64");
|
|
14
|
+
function toRequest(event) {
|
|
15
|
+
const method = event.requestContext.http.method.toUpperCase();
|
|
16
|
+
const headers = new Headers();
|
|
17
|
+
for (const [name, value] of Object.entries(event.headers ?? {})) if (value !== void 0) headers.set(name, value);
|
|
18
|
+
if (event.cookies !== void 0 && event.cookies.length > 0) headers.set("cookie", event.cookies.join("; "));
|
|
19
|
+
const host = event.requestContext.domainName ?? headers.get("host") ?? "localhost";
|
|
20
|
+
const query = event.rawQueryString === void 0 || event.rawQueryString === "" ? "" : `?${event.rawQueryString}`;
|
|
21
|
+
const hasBody = method !== "GET" && method !== "HEAD" && event.body !== void 0;
|
|
22
|
+
return new Request(`https://${host}${event.rawPath}${query}`, {
|
|
23
|
+
method,
|
|
24
|
+
headers,
|
|
25
|
+
...hasBody ? { body: event.isBase64Encoded === true ? fromBase64(event.body ?? "") : event.body } : {}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** Content types sent as text; everything else (a tracking pixel) goes back base64. */
|
|
29
|
+
const TEXTUAL = /^(text\/|application\/(json|javascript|xml|x-www-form-urlencoded)|image\/svg\+xml)/i;
|
|
30
|
+
async function fromResponse(response, method) {
|
|
31
|
+
const headers = {};
|
|
32
|
+
const cookies = [];
|
|
33
|
+
response.headers.forEach((value, name) => {
|
|
34
|
+
if (name === "set-cookie") cookies.push(value);
|
|
35
|
+
else headers[name] = value;
|
|
36
|
+
});
|
|
37
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
38
|
+
const bytes = method.toUpperCase() === "HEAD" ? /* @__PURE__ */ new Uint8Array() : new Uint8Array(await response.arrayBuffer());
|
|
39
|
+
const textual = bytes.length === 0 || TEXTUAL.test(contentType);
|
|
40
|
+
return {
|
|
41
|
+
statusCode: response.status,
|
|
42
|
+
headers,
|
|
43
|
+
...cookies.length === 0 ? {} : { cookies },
|
|
44
|
+
body: textual ? new TextDecoder().decode(bytes) : toBase64(bytes),
|
|
45
|
+
isBase64Encoded: !textual
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export { fromResponse, isFunctionUrlEvent, toRequest };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=function-url.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-url.mjs","names":[],"sources":["../../src/aws/function-url.ts"],"sourcesContent":["import { Buffer } from 'node:buffer';\n/**\n * Lambda Function URL events (payload format 2.0) as fetch `Request`s, and `Response`s back as\n * the result Lambda turns into the HTTP response — so the host's HTTP API runs unchanged.\n */\n\nexport interface FunctionUrlEvent {\n version?: string;\n rawPath: string;\n rawQueryString?: string;\n headers?: Record<string, string | undefined>;\n cookies?: string[];\n body?: string;\n isBase64Encoded?: boolean;\n requestContext: {\n domainName?: string;\n http: { method: string; sourceIp?: string; userAgent?: string };\n };\n}\n\nexport interface FunctionUrlResult {\n statusCode: number;\n headers: Record<string, string>;\n cookies?: string[];\n body: string;\n isBase64Encoded: boolean;\n}\n\n/**\n * An HTTP request, told apart by the event's own top-level shape — the Function URL wraps\n * every request in `requestContext.http`, so no request body can pass for anything else.\n */\nexport function isFunctionUrlEvent(event: unknown): event is FunctionUrlEvent {\n if (typeof event !== 'object' || event === null) return false;\n // Untrusted until checked: every level may be missing\n const { requestContext, rawPath } = event as {\n requestContext?: { http?: { method?: unknown } | null } | null;\n rawPath?: unknown;\n };\n return (\n typeof rawPath === 'string' &&\n typeof requestContext === 'object' &&\n requestContext !== null &&\n typeof requestContext.http === 'object' &&\n requestContext.http !== null &&\n typeof requestContext.http.method === 'string'\n );\n}\n\nconst fromBase64 = (value: string): Uint8Array => new Uint8Array(Buffer.from(value, 'base64'));\nconst toBase64 = (bytes: Uint8Array): string => Buffer.from(bytes).toString('base64');\n\nexport function toRequest(event: FunctionUrlEvent): Request {\n const method = event.requestContext.http.method.toUpperCase();\n const headers = new Headers();\n for (const [name, value] of Object.entries(event.headers ?? {})) {\n if (value !== undefined) headers.set(name, value);\n }\n if (event.cookies !== undefined && event.cookies.length > 0) {\n headers.set('cookie', event.cookies.join('; '));\n }\n const host = event.requestContext.domainName ?? headers.get('host') ?? 'localhost';\n const query =\n event.rawQueryString === undefined || event.rawQueryString === ''\n ? ''\n : `?${event.rawQueryString}`;\n const hasBody = method !== 'GET' && method !== 'HEAD' && event.body !== undefined;\n return new Request(`https://${host}${event.rawPath}${query}`, {\n method,\n headers,\n ...(hasBody\n ? { body: event.isBase64Encoded === true ? fromBase64(event.body ?? '') : event.body }\n : {}),\n });\n}\n\n/** Content types sent as text; everything else (a tracking pixel) goes back base64. */\nconst TEXTUAL =\n /^(text\\/|application\\/(json|javascript|xml|x-www-form-urlencoded)|image\\/svg\\+xml)/i;\n\nexport async function fromResponse(response: Response, method: string): Promise<FunctionUrlResult> {\n const headers: Record<string, string> = {};\n const cookies: string[] = [];\n response.headers.forEach((value, name) => {\n if (name === 'set-cookie') cookies.push(value);\n else headers[name] = value;\n });\n const contentType = response.headers.get('content-type') ?? '';\n const head = method.toUpperCase() === 'HEAD';\n const bytes = head ? new Uint8Array() : new Uint8Array(await response.arrayBuffer());\n const textual = bytes.length === 0 || TEXTUAL.test(contentType);\n return {\n statusCode: response.status,\n headers,\n ...(cookies.length === 0 ? {} : { cookies }),\n body: textual ? new TextDecoder().decode(bytes) : toBase64(bytes),\n isBase64Encoded: !textual,\n };\n}\n"],"mappings":";;;;;;AAgCA,SAAgB,mBAAmB,OAA2C;CAC5E,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CAExD,MAAM,EAAE,gBAAgB,YAAY;CAIpC,OACE,OAAO,YAAY,YACnB,OAAO,mBAAmB,YAC1B,mBAAmB,QACnB,OAAO,eAAe,SAAS,YAC/B,eAAe,SAAS,QACxB,OAAO,eAAe,KAAK,WAAW;AAE1C;AAEA,MAAM,cAAc,UAA8B,IAAI,WAAW,OAAO,KAAK,OAAO,QAAQ,CAAC;AAC7F,MAAM,YAAY,UAA8B,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,QAAQ;AAEpF,SAAgB,UAAU,OAAkC;CAC1D,MAAM,SAAS,MAAM,eAAe,KAAK,OAAO,YAAY;CAC5D,MAAM,UAAU,IAAI,QAAQ;CAC5B,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,WAAW,CAAC,CAAC,GAC5D,IAAI,UAAU,KAAA,GAAW,QAAQ,IAAI,MAAM,KAAK;CAElD,IAAI,MAAM,YAAY,KAAA,KAAa,MAAM,QAAQ,SAAS,GACxD,QAAQ,IAAI,UAAU,MAAM,QAAQ,KAAK,IAAI,CAAC;CAEhD,MAAM,OAAO,MAAM,eAAe,cAAc,QAAQ,IAAI,MAAM,KAAK;CACvE,MAAM,QACJ,MAAM,mBAAmB,KAAA,KAAa,MAAM,mBAAmB,KAC3D,KACA,IAAI,MAAM;CAChB,MAAM,UAAU,WAAW,SAAS,WAAW,UAAU,MAAM,SAAS,KAAA;CACxE,OAAO,IAAI,QAAQ,WAAW,OAAO,MAAM,UAAU,SAAS;EAC5D;EACA;EACA,GAAI,UACA,EAAE,MAAM,MAAM,oBAAoB,OAAO,WAAW,MAAM,QAAQ,EAAE,IAAI,MAAM,KAAK,IACnF,CAAC;CACP,CAAC;AACH;;AAGA,MAAM,UACJ;AAEF,eAAsB,aAAa,UAAoB,QAA4C;CACjG,MAAM,UAAkC,CAAC;CACzC,MAAM,UAAoB,CAAC;CAC3B,SAAS,QAAQ,SAAS,OAAO,SAAS;EACxC,IAAI,SAAS,cAAc,QAAQ,KAAK,KAAK;OACxC,QAAQ,QAAQ;CACvB,CAAC;CACD,MAAM,cAAc,SAAS,QAAQ,IAAI,cAAc,KAAK;CAE5D,MAAM,QADO,OAAO,YAAY,MAAM,yBACjB,IAAI,WAAW,IAAI,IAAI,WAAW,MAAM,SAAS,YAAY,CAAC;CACnF,MAAM,UAAU,MAAM,WAAW,KAAK,QAAQ,KAAK,WAAW;CAC9D,OAAO;EACL,YAAY,SAAS;EACrB;EACA,GAAI,QAAQ,WAAW,IAAI,CAAC,IAAI,EAAE,QAAQ;EAC1C,MAAM,UAAU,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK,IAAI,SAAS,KAAK;EAChE,iBAAiB,CAAC;CACpB;AACF"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let node_async_hooks = require("node:async_hooks");
|
|
3
|
+
let _aws_durable_execution_sdk_js = require("@aws/durable-execution-sdk-js");
|
|
4
|
+
const require_engine_duration = require("../engine/duration.cjs");
|
|
5
|
+
const require_engine_retry = require("../engine/retry.cjs");
|
|
6
|
+
const require_host_execute = require("../host/execute.cjs");
|
|
7
|
+
const require_host_fresh_read = require("../host/fresh-read.cjs");
|
|
8
|
+
const require_host_ingest = require("../host/ingest.cjs");
|
|
9
|
+
const require_host_journey_host = require("../host/journey-host.cjs");
|
|
10
|
+
const require_http2_client = require("../http2-client.cjs");
|
|
11
|
+
const require_aws_engine_step = require("./engine-step.cjs");
|
|
12
|
+
const require_aws_function_url = require("./function-url.cjs");
|
|
13
|
+
const require_aws_instances = require("./instances.cjs");
|
|
14
|
+
const require_aws_lambda_api = require("./lambda-api.cjs");
|
|
15
|
+
const require_host_auth = require("../host/auth.cjs");
|
|
16
|
+
// src/aws/index.ts
|
|
17
|
+
/**
|
|
18
|
+
* `sendwend/aws` — the journey host as one Lambda durable function behind a Function
|
|
19
|
+
* URL, on Postgres.
|
|
20
|
+
*
|
|
21
|
+
* The one handler tells three inputs apart by the event's top-level shape: a Function URL
|
|
22
|
+
* request (the HTTP API — ingest, identify, devices, tracking, bundle, preview), an internal run
|
|
23
|
+
* (one journey instance: one durable execution, started by an asynchronous invoke of this
|
|
24
|
+
* function's own numbered version), and a scheduled maintenance tick. An HTTP body can never
|
|
25
|
+
* pass for the other two: the Function URL always wraps it.
|
|
26
|
+
*
|
|
27
|
+
* const journeys = journeyLambda({
|
|
28
|
+
* config,
|
|
29
|
+
* env, // parsed from process.env (zod)
|
|
30
|
+
* store: (env, database) => postgresJsStore(env.DATABASE_URL, database),
|
|
31
|
+
* email: (env) => sesEmailTransport({ region: env.AWS_REGION }),
|
|
32
|
+
* });
|
|
33
|
+
* export const handler = journeys.handler;
|
|
34
|
+
*/
|
|
35
|
+
/** The scheduled tick (EventBridge Scheduler's payload): the segment sweep and maintenance. */
|
|
36
|
+
const SWEEP_EVENT_TYPE = "$workflow.sweep";
|
|
37
|
+
/** This function's ARN without its qualifier, from the ARN it was invoked under. */
|
|
38
|
+
function unqualified(invokedFunctionArn) {
|
|
39
|
+
return invokedFunctionArn.split(":").slice(0, 7).join(":");
|
|
40
|
+
}
|
|
41
|
+
const json = (body, status = 200) => new Response(JSON.stringify(body), {
|
|
42
|
+
status,
|
|
43
|
+
headers: { "content-type": "application/json" }
|
|
44
|
+
});
|
|
45
|
+
function journeyLambda(options) {
|
|
46
|
+
const { env: baseEnv, lambda: lambdaOption, startRetryMs, stopDrainMs, executionTimeoutMs, ...hostOptions } = options;
|
|
47
|
+
const host = require_host_journey_host.createJourneyHost({
|
|
48
|
+
...hostOptions,
|
|
49
|
+
store: (env, database) => options.store(env, database)
|
|
50
|
+
}, { apnsFetch: require_http2_client.http2Fetch() });
|
|
51
|
+
if (executionTimeoutMs !== void 0) {
|
|
52
|
+
const tooLong = host.bundle().workflows.filter((workflow) => require_engine_duration.longestJourneyMs(workflow) > executionTimeoutMs);
|
|
53
|
+
if (tooLong.length > 0) {
|
|
54
|
+
const days = (ms) => `${Math.ceil(ms / 864e5)} days`;
|
|
55
|
+
throw new RangeError(`${tooLong.map((w) => `'${w.id}' can run ${days(require_engine_duration.longestJourneyMs(w))}`).join(", ")}, longer than the execution timeout (${days(executionTimeoutMs)}): raise ExecutionTimeout (up to 366 days)`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const lambda = lambdaOption ?? require_aws_lambda_api.sdkLambdaApi();
|
|
59
|
+
const ownHashes = new Set(host.bundle().workflows.map((workflow) => workflow.contentHash));
|
|
60
|
+
const scope = new node_async_hooks.AsyncLocalStorage();
|
|
61
|
+
/** The version this code was published as: `$LATEST` while developing. */
|
|
62
|
+
const ownVersion = () => process.env.AWS_LAMBDA_FUNCTION_VERSION ?? "$LATEST";
|
|
63
|
+
/** Numbered versions are ordered: the bundle compiled into a later one goes live by itself. */
|
|
64
|
+
const bundleVersion = () => {
|
|
65
|
+
const version = ownVersion();
|
|
66
|
+
return /^\d+$/.test(version) ? {
|
|
67
|
+
id: version,
|
|
68
|
+
createdAt: Number(version)
|
|
69
|
+
} : void 0;
|
|
70
|
+
};
|
|
71
|
+
/** The store and the env (with the instance port) of this invocation, opened on first use. */
|
|
72
|
+
const open = (context) => {
|
|
73
|
+
const invocation = scope.getStore();
|
|
74
|
+
if (invocation === void 0) throw new Error("journeyLambda: outside an invocation");
|
|
75
|
+
const placeholder = { ...baseEnv };
|
|
76
|
+
invocation.lease ??= host.lease(placeholder);
|
|
77
|
+
const { store } = invocation.lease;
|
|
78
|
+
const { executions } = store;
|
|
79
|
+
const functionArn = unqualified(context.lambdaContext.invokedFunctionArn);
|
|
80
|
+
const target = async (contentHash, version) => {
|
|
81
|
+
if (version !== void 0 && /^\d+$/.test(version)) return `${functionArn}:${version}`;
|
|
82
|
+
if (ownHashes.has(contentHash)) return `${functionArn}:${ownVersion()}`;
|
|
83
|
+
throw new Error(`no published version is known to carry workflow IR ${contentHash}`);
|
|
84
|
+
};
|
|
85
|
+
const instances = new require_aws_instances.AwsInstances({
|
|
86
|
+
store,
|
|
87
|
+
executions,
|
|
88
|
+
lambda,
|
|
89
|
+
target,
|
|
90
|
+
...startRetryMs === void 0 ? {} : { startRetryMs },
|
|
91
|
+
...stopDrainMs === void 0 ? {} : { stopDrainMs }
|
|
92
|
+
});
|
|
93
|
+
return {
|
|
94
|
+
store,
|
|
95
|
+
env: {
|
|
96
|
+
...baseEnv,
|
|
97
|
+
JOURNEY: instances
|
|
98
|
+
},
|
|
99
|
+
executions
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
const run = async (input, context) => {
|
|
103
|
+
const { store, env, executions } = open(context);
|
|
104
|
+
const { instanceId, params } = input;
|
|
105
|
+
const record = await require_host_fresh_read.readWithRetry(() => executions.get(instanceId), {
|
|
106
|
+
what: "run entry",
|
|
107
|
+
instanceId
|
|
108
|
+
});
|
|
109
|
+
if (record === void 0 || record.stoppedAt !== void 0 || record.input !== JSON.stringify(input)) throw new require_engine_retry.PermanentError("journeyLambda: run input is not a recorded start");
|
|
110
|
+
await context.step("$workflow:started", async () => {
|
|
111
|
+
await executions.markSubmitted(instanceId, context.executionContext.durableExecutionArn, Date.now());
|
|
112
|
+
});
|
|
113
|
+
return require_host_execute.executeJourney({
|
|
114
|
+
instanceId,
|
|
115
|
+
params,
|
|
116
|
+
enteredAtMs: input.enteredAtMs,
|
|
117
|
+
step: new require_aws_engine_step.AwsEngineStep(context, store, executions, lambda, params.userId, instanceId)
|
|
118
|
+
}, host.runParts(env, store, params));
|
|
119
|
+
};
|
|
120
|
+
const http = (event, context) => {
|
|
121
|
+
const serve = async () => {
|
|
122
|
+
const method = event.requestContext.http.method;
|
|
123
|
+
try {
|
|
124
|
+
const { store, env } = open(context);
|
|
125
|
+
const request = require_aws_function_url.toRequest(event);
|
|
126
|
+
if (new URL(request.url).pathname === "/deploy") return await require_aws_function_url.fromResponse(json({ error: "deploy by publishing a version (POST /bundle/deploy applies its own bundle)" }, 409), method);
|
|
127
|
+
const version = bundleVersion();
|
|
128
|
+
await host.applyOwnBundle(env, version);
|
|
129
|
+
return await require_aws_function_url.fromResponse(await host.handle(request, env, store, version), method);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error("[workflow] request failed", error);
|
|
132
|
+
return require_aws_function_url.fromResponse(json({ error: "internal error" }, 500), method);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const method = event.requestContext.http.method.toUpperCase();
|
|
136
|
+
if (method === "GET" || method === "HEAD") return serve();
|
|
137
|
+
return context.step("http", serve, { retryStrategy: () => ({ shouldRetry: false }) });
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* The sweep as durable steps, one per page of users: an invocation cut short (the function's
|
|
141
|
+
* timeout) is re-invoked, and the re-invocation replays the pages already checkpointed
|
|
142
|
+
* instead of evaluating them again. What is shared with every other host is the page and where
|
|
143
|
+
* the pass stands, both in `sweepSegmentPass` and the store; only the steps are this host's.
|
|
144
|
+
* No step retries on its own — a page that failed is evaluated again by the next tick.
|
|
145
|
+
*/
|
|
146
|
+
const sweep = async (context) => {
|
|
147
|
+
const once = { retryStrategy: () => ({ shouldRetry: false }) };
|
|
148
|
+
await context.step("sweep:maintain", async () => {
|
|
149
|
+
const { store, env } = open(context);
|
|
150
|
+
await host.applyOwnBundle(env, bundleVersion());
|
|
151
|
+
await require_host_ingest.sweepMaintenance(env, store);
|
|
152
|
+
}, once);
|
|
153
|
+
const dates = /* @__PURE__ */ new Map();
|
|
154
|
+
const dated = [];
|
|
155
|
+
const failedDates = [];
|
|
156
|
+
for (let n = 0;; n++) {
|
|
157
|
+
const except = [...failedDates];
|
|
158
|
+
const page = await context.step(`sweep:date:${n}`, async () => {
|
|
159
|
+
const { store, env } = open(context);
|
|
160
|
+
return await require_host_ingest.fanOutDatePage(env, store, Date.now(), 500, except) ?? null;
|
|
161
|
+
}, once);
|
|
162
|
+
if (page === null) break;
|
|
163
|
+
const key = `${page.workflow}@${page.at}`;
|
|
164
|
+
const fanout = dates.get(key) ?? {
|
|
165
|
+
workflow: page.workflow,
|
|
166
|
+
at: page.at,
|
|
167
|
+
entered: 0,
|
|
168
|
+
finished: false
|
|
169
|
+
};
|
|
170
|
+
fanout.entered += page.started.length;
|
|
171
|
+
fanout.finished = page.finished;
|
|
172
|
+
dates.set(key, fanout);
|
|
173
|
+
dated.push(...page.started);
|
|
174
|
+
if (page.failed) failedDates.push(page.workflow);
|
|
175
|
+
}
|
|
176
|
+
let evaluated = 0;
|
|
177
|
+
const started = [...dated];
|
|
178
|
+
let sizes = [];
|
|
179
|
+
let finished = false;
|
|
180
|
+
for (let n = 0;; n++) {
|
|
181
|
+
const slice = await context.step(`sweep:page:${n}`, async () => {
|
|
182
|
+
const { store, env } = open(context);
|
|
183
|
+
return require_host_ingest.sweepSegmentPass(env, store, Date.now(), 0);
|
|
184
|
+
}, once);
|
|
185
|
+
evaluated += slice.evaluated;
|
|
186
|
+
started.push(...slice.started);
|
|
187
|
+
sizes = slice.sizes;
|
|
188
|
+
finished = slice.finished;
|
|
189
|
+
if (!slice.more) break;
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
evaluated,
|
|
193
|
+
started,
|
|
194
|
+
sizes,
|
|
195
|
+
finished,
|
|
196
|
+
dates: [...dates.values()]
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
const durable = (0, _aws_durable_execution_sdk_js.withDurableExecution)(async (input, context) => {
|
|
200
|
+
if (require_aws_function_url.isFunctionUrlEvent(input)) return http(input, context);
|
|
201
|
+
if (require_aws_instances.isRunInput(input)) return run(input, context);
|
|
202
|
+
if (typeof input === "object" && input !== null && input.type === "$workflow.sweep") return sweep(context);
|
|
203
|
+
throw new Error("journeyLambda: unrecognized event (not a Function URL request, run or sweep)");
|
|
204
|
+
});
|
|
205
|
+
const handler = async (event, context) => {
|
|
206
|
+
const invocation = {};
|
|
207
|
+
try {
|
|
208
|
+
return await scope.run(invocation, () => durable(event, context));
|
|
209
|
+
} finally {
|
|
210
|
+
await invocation.lease?.close().catch((error) => {
|
|
211
|
+
console.error("[workflow] closing the store failed", error);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
return { handler };
|
|
216
|
+
}
|
|
217
|
+
exports.AwsEngineStep = require_aws_engine_step.AwsEngineStep;
|
|
218
|
+
exports.AwsInstances = require_aws_instances.AwsInstances;
|
|
219
|
+
exports.RUN_EVENT_TYPE = require_aws_instances.RUN_EVENT_TYPE;
|
|
220
|
+
exports.SWEEP_EVENT_TYPE = SWEEP_EVENT_TYPE;
|
|
221
|
+
exports.bearerMatches = require_host_auth.bearerMatches;
|
|
222
|
+
exports.executionName = require_aws_instances.executionName;
|
|
223
|
+
exports.fromResponse = require_aws_function_url.fromResponse;
|
|
224
|
+
exports.isFunctionUrlEvent = require_aws_function_url.isFunctionUrlEvent;
|
|
225
|
+
exports.isRunInput = require_aws_instances.isRunInput;
|
|
226
|
+
exports.journeyLambda = journeyLambda;
|
|
227
|
+
exports.sdkLambdaApi = require_aws_lambda_api.sdkLambdaApi;
|
|
228
|
+
exports.stepRetry = require_aws_engine_step.stepRetry;
|
|
229
|
+
exports.timingSafeEqual = require_host_auth.timingSafeEqual;
|
|
230
|
+
exports.toRequest = require_aws_function_url.toRequest;
|
|
231
|
+
|
|
232
|
+
//# sourceMappingURL=index.cjs.map
|