@shware/workflow 4.1.1 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -38
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/apns-relay.cjs +1 -2
- package/dist/apns-relay.d.cts +0 -2
- package/dist/apns-relay.d.cts.map +1 -1
- package/dist/apns-relay.d.mts +0 -2
- package/dist/apns-relay.d.mts.map +1 -1
- package/dist/apns-relay.mjs +1 -2
- package/dist/apns.cjs +1 -2
- package/dist/apns.d.cts +0 -2
- package/dist/apns.d.cts.map +1 -1
- package/dist/apns.d.mts +0 -2
- package/dist/apns.d.mts.map +1 -1
- package/dist/apns.mjs +1 -2
- package/dist/aws/engine-step.cjs +1 -2
- package/dist/aws/engine-step.d.cts +0 -2
- package/dist/aws/engine-step.d.cts.map +1 -1
- package/dist/aws/engine-step.d.mts +0 -2
- package/dist/aws/engine-step.d.mts.map +1 -1
- package/dist/aws/engine-step.mjs +1 -2
- package/dist/aws/function-url.cjs +1 -2
- package/dist/aws/function-url.d.cts +0 -2
- package/dist/aws/function-url.d.cts.map +1 -1
- package/dist/aws/function-url.d.mts +0 -2
- package/dist/aws/function-url.d.mts.map +1 -1
- package/dist/aws/function-url.mjs +1 -2
- package/dist/aws/index.cjs +3 -5
- package/dist/aws/index.cjs.map +1 -1
- package/dist/aws/index.d.cts +1 -3
- package/dist/aws/index.d.cts.map +1 -1
- package/dist/aws/index.d.mts +1 -3
- package/dist/aws/index.d.mts.map +1 -1
- package/dist/aws/index.mjs +3 -5
- package/dist/aws/index.mjs.map +1 -1
- package/dist/aws/instances.cjs +2 -3
- package/dist/aws/instances.cjs.map +1 -1
- package/dist/aws/instances.d.cts +1 -3
- package/dist/aws/instances.d.cts.map +1 -1
- package/dist/aws/instances.d.mts +1 -3
- package/dist/aws/instances.d.mts.map +1 -1
- package/dist/aws/instances.mjs +2 -3
- package/dist/aws/instances.mjs.map +1 -1
- package/dist/aws/lambda-api.cjs +1 -2
- package/dist/aws/lambda-api.d.cts +0 -2
- package/dist/aws/lambda-api.d.cts.map +1 -1
- package/dist/aws/lambda-api.d.mts +0 -2
- package/dist/aws/lambda-api.d.mts.map +1 -1
- package/dist/aws/lambda-api.mjs +1 -2
- package/dist/client.cjs +1 -2
- package/dist/client.d.cts +0 -2
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.mts +0 -2
- package/dist/client.d.mts.map +1 -1
- package/dist/client.mjs +1 -2
- package/dist/cloudflare/bindings.cjs +1 -2
- package/dist/cloudflare/bindings.cjs.map +1 -1
- package/dist/cloudflare/bindings.d.cts +0 -21
- package/dist/cloudflare/bindings.d.cts.map +1 -1
- package/dist/cloudflare/bindings.d.mts +0 -21
- package/dist/cloudflare/bindings.d.mts.map +1 -1
- package/dist/cloudflare/bindings.mjs +1 -2
- package/dist/cloudflare/bindings.mjs.map +1 -1
- package/dist/cloudflare/index.cjs +0 -5
- package/dist/cloudflare/index.d.cts +4 -6
- package/dist/cloudflare/index.d.mts +4 -6
- package/dist/cloudflare/index.mjs +2 -4
- package/dist/cloudflare/runner.cjs +4 -6
- package/dist/cloudflare/runner.cjs.map +1 -1
- package/dist/cloudflare/runner.d.cts +3 -5
- package/dist/cloudflare/runner.d.cts.map +1 -1
- package/dist/cloudflare/runner.d.mts +3 -5
- package/dist/cloudflare/runner.d.mts.map +1 -1
- package/dist/cloudflare/runner.mjs +4 -6
- package/dist/cloudflare/runner.mjs.map +1 -1
- package/dist/cloudflare/worker.cjs +1 -2
- package/dist/cloudflare/worker.d.cts +0 -2
- package/dist/cloudflare/worker.d.cts.map +1 -1
- package/dist/cloudflare/worker.d.mts +0 -2
- package/dist/cloudflare/worker.d.mts.map +1 -1
- package/dist/cloudflare/worker.mjs +1 -2
- package/dist/cloudflare/workers.d.cts +0 -2
- package/dist/cloudflare/workers.d.cts.map +1 -1
- package/dist/cloudflare/workers.d.mts +0 -2
- package/dist/cloudflare/workers.d.mts.map +1 -1
- package/dist/config.cjs +1 -2
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +1 -3
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +1 -3
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +1 -2
- package/dist/config.mjs.map +1 -1
- package/dist/contract.cjs +1 -2
- package/dist/contract.d.cts +0 -2
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +0 -2
- package/dist/contract.d.mts.map +1 -1
- package/dist/contract.mjs +1 -2
- package/dist/dsl/action.cjs +1 -2
- package/dist/dsl/action.d.cts +0 -2
- package/dist/dsl/action.d.cts.map +1 -1
- package/dist/dsl/action.d.mts +0 -2
- package/dist/dsl/action.d.mts.map +1 -1
- package/dist/dsl/action.mjs +1 -2
- package/dist/dsl/base.cjs +1 -2
- package/dist/dsl/base.d.cts +0 -2
- package/dist/dsl/base.d.cts.map +1 -1
- package/dist/dsl/base.d.mts +0 -2
- package/dist/dsl/base.d.mts.map +1 -1
- package/dist/dsl/base.mjs +1 -2
- package/dist/dsl/bundle.cjs +1 -2
- package/dist/dsl/bundle.d.cts +0 -2
- package/dist/dsl/bundle.d.cts.map +1 -1
- package/dist/dsl/bundle.d.mts +0 -2
- package/dist/dsl/bundle.d.mts.map +1 -1
- package/dist/dsl/bundle.mjs +1 -2
- package/dist/dsl/condition.cjs +1 -2
- package/dist/dsl/condition.d.cts +0 -2
- package/dist/dsl/condition.d.cts.map +1 -1
- package/dist/dsl/condition.d.mts +0 -2
- package/dist/dsl/condition.d.mts.map +1 -1
- package/dist/dsl/condition.mjs +1 -2
- package/dist/dsl/flow.cjs +1 -2
- package/dist/dsl/flow.d.cts +0 -2
- package/dist/dsl/flow.d.cts.map +1 -1
- package/dist/dsl/flow.d.mts +0 -2
- package/dist/dsl/flow.d.mts.map +1 -1
- package/dist/dsl/flow.mjs +1 -2
- package/dist/dsl/refs.cjs +1 -2
- package/dist/dsl/refs.d.cts +0 -2
- package/dist/dsl/refs.d.cts.map +1 -1
- package/dist/dsl/refs.d.mts +0 -2
- package/dist/dsl/refs.d.mts.map +1 -1
- package/dist/dsl/refs.mjs +1 -2
- package/dist/dsl/template.cjs +1 -2
- package/dist/dsl/template.d.cts +0 -2
- package/dist/dsl/template.d.cts.map +1 -1
- package/dist/dsl/template.d.mts +0 -2
- package/dist/dsl/template.d.mts.map +1 -1
- package/dist/dsl/template.mjs +1 -2
- package/dist/dsl/trigger.cjs +1 -2
- package/dist/dsl/trigger.d.cts +0 -2
- package/dist/dsl/trigger.d.cts.map +1 -1
- package/dist/dsl/trigger.d.mts +0 -2
- package/dist/dsl/trigger.d.mts.map +1 -1
- package/dist/dsl/trigger.mjs +1 -2
- package/dist/dsl/workflow.cjs +1 -2
- package/dist/dsl/workflow.d.cts +0 -2
- package/dist/dsl/workflow.d.cts.map +1 -1
- package/dist/dsl/workflow.d.mts +0 -2
- package/dist/dsl/workflow.d.mts.map +1 -1
- package/dist/dsl/workflow.mjs +1 -2
- package/dist/email-context.cjs +1 -2
- package/dist/email-context.d.cts +0 -2
- package/dist/email-context.d.cts.map +1 -1
- package/dist/email-context.d.mts +0 -2
- package/dist/email-context.d.mts.map +1 -1
- package/dist/email-context.mjs +1 -2
- package/dist/email-sender.cjs +1 -2
- package/dist/email-sender.d.cts +0 -2
- package/dist/email-sender.d.cts.map +1 -1
- package/dist/email-sender.d.mts +0 -2
- package/dist/email-sender.d.mts.map +1 -1
- package/dist/email-sender.mjs +1 -2
- package/dist/email.cjs +1 -2
- package/dist/email.d.cts +0 -2
- package/dist/email.d.cts.map +1 -1
- package/dist/email.d.mts +0 -2
- package/dist/email.d.mts.map +1 -1
- package/dist/email.mjs +1 -2
- package/dist/engine/actions.cjs +1 -2
- package/dist/engine/actions.d.cts +0 -2
- package/dist/engine/actions.d.cts.map +1 -1
- package/dist/engine/actions.d.mts +0 -2
- package/dist/engine/actions.d.mts.map +1 -1
- package/dist/engine/actions.mjs +1 -2
- package/dist/engine/bucket.cjs +1 -2
- package/dist/engine/bucket.d.cts +0 -2
- package/dist/engine/bucket.d.cts.map +1 -1
- package/dist/engine/bucket.d.mts +0 -2
- package/dist/engine/bucket.d.mts.map +1 -1
- package/dist/engine/bucket.mjs +1 -2
- package/dist/engine/condition.cjs +3 -4
- package/dist/engine/condition.cjs.map +1 -1
- package/dist/engine/condition.d.cts +1 -3
- package/dist/engine/condition.d.cts.map +1 -1
- package/dist/engine/condition.d.mts +1 -3
- package/dist/engine/condition.d.mts.map +1 -1
- package/dist/engine/condition.mjs +3 -4
- package/dist/engine/condition.mjs.map +1 -1
- package/dist/engine/duration.cjs +1 -2
- package/dist/engine/duration.d.cts +0 -2
- package/dist/engine/duration.d.cts.map +1 -1
- package/dist/engine/duration.d.mts +0 -2
- package/dist/engine/duration.d.mts.map +1 -1
- package/dist/engine/duration.mjs +1 -2
- package/dist/engine/interpreter.cjs +1 -2
- package/dist/engine/interpreter.d.cts +0 -2
- package/dist/engine/interpreter.d.cts.map +1 -1
- package/dist/engine/interpreter.d.mts +0 -2
- package/dist/engine/interpreter.d.mts.map +1 -1
- package/dist/engine/interpreter.mjs +1 -2
- package/dist/engine/ports.d.cts +1 -3
- package/dist/engine/ports.d.cts.map +1 -1
- package/dist/engine/ports.d.mts +1 -3
- package/dist/engine/ports.d.mts.map +1 -1
- package/dist/engine/recipient.cjs +1 -2
- package/dist/engine/recipient.d.cts +0 -2
- package/dist/engine/recipient.d.cts.map +1 -1
- package/dist/engine/recipient.d.mts +0 -2
- package/dist/engine/recipient.d.mts.map +1 -1
- package/dist/engine/recipient.mjs +1 -2
- package/dist/engine/retry.cjs +1 -2
- package/dist/engine/retry.d.cts +0 -2
- package/dist/engine/retry.d.cts.map +1 -1
- package/dist/engine/retry.d.mts +0 -2
- package/dist/engine/retry.d.mts.map +1 -1
- package/dist/engine/retry.mjs +1 -2
- package/dist/engine/time-scale.cjs +1 -2
- package/dist/engine/time-scale.d.cts +0 -2
- package/dist/engine/time-scale.d.cts.map +1 -1
- package/dist/engine/time-scale.d.mts +0 -2
- package/dist/engine/time-scale.d.mts.map +1 -1
- package/dist/engine/time-scale.mjs +1 -2
- package/dist/engine/time-window.cjs +1 -2
- package/dist/engine/time-window.d.cts +0 -2
- package/dist/engine/time-window.d.cts.map +1 -1
- package/dist/engine/time-window.d.mts +0 -2
- package/dist/engine/time-window.d.mts.map +1 -1
- package/dist/engine/time-window.mjs +1 -2
- package/dist/fcm.cjs +1 -2
- package/dist/fcm.d.cts +0 -2
- package/dist/fcm.d.cts.map +1 -1
- package/dist/fcm.d.mts +0 -2
- package/dist/fcm.d.mts.map +1 -1
- package/dist/fcm.mjs +1 -2
- package/dist/hash.cjs +1 -2
- package/dist/hash.d.cts +0 -2
- package/dist/hash.d.cts.map +1 -1
- package/dist/hash.d.mts +0 -2
- package/dist/hash.d.mts.map +1 -1
- package/dist/hash.mjs +1 -2
- package/dist/host/auth.cjs +1 -2
- package/dist/host/auth.d.cts +0 -2
- package/dist/host/auth.d.cts.map +1 -1
- package/dist/host/auth.d.mts +0 -2
- package/dist/host/auth.d.mts.map +1 -1
- package/dist/host/auth.mjs +1 -2
- package/dist/host/channels.cjs +1 -2
- package/dist/host/channels.d.cts +1 -3
- package/dist/host/channels.d.cts.map +1 -1
- package/dist/host/channels.d.mts +1 -3
- package/dist/host/channels.d.mts.map +1 -1
- package/dist/host/channels.mjs +1 -2
- package/dist/host/execute.cjs +1 -2
- package/dist/host/execute.d.cts +1 -3
- package/dist/host/execute.d.cts.map +1 -1
- package/dist/host/execute.d.mts +1 -3
- package/dist/host/execute.d.mts.map +1 -1
- package/dist/host/execute.mjs +1 -2
- package/dist/host/fresh-read.cjs +1 -2
- package/dist/host/fresh-read.d.cts +0 -2
- package/dist/host/fresh-read.d.cts.map +1 -1
- package/dist/host/fresh-read.d.mts +0 -2
- package/dist/host/fresh-read.d.mts.map +1 -1
- package/dist/host/fresh-read.mjs +1 -2
- package/dist/host/http.cjs +4 -6
- package/dist/host/http.cjs.map +1 -1
- package/dist/host/http.d.cts +2 -4
- package/dist/host/http.d.cts.map +1 -1
- package/dist/host/http.d.mts +2 -4
- package/dist/host/http.d.mts.map +1 -1
- package/dist/host/http.mjs +4 -6
- package/dist/host/http.mjs.map +1 -1
- package/dist/host/ingest.cjs +12 -24
- package/dist/host/ingest.cjs.map +1 -1
- package/dist/host/ingest.d.cts +8 -15
- package/dist/host/ingest.d.cts.map +1 -1
- package/dist/host/ingest.d.mts +8 -15
- package/dist/host/ingest.d.mts.map +1 -1
- package/dist/host/ingest.mjs +13 -24
- package/dist/host/ingest.mjs.map +1 -1
- package/dist/host/journey-host.cjs +3 -6
- package/dist/host/journey-host.cjs.map +1 -1
- package/dist/host/journey-host.d.cts +6 -8
- package/dist/host/journey-host.d.cts.map +1 -1
- package/dist/host/journey-host.d.mts +6 -8
- package/dist/host/journey-host.d.mts.map +1 -1
- package/dist/host/journey-host.mjs +3 -6
- package/dist/host/journey-host.mjs.map +1 -1
- package/dist/host/platform.cjs +1 -2
- package/dist/host/platform.cjs.map +1 -1
- package/dist/host/platform.d.cts +1 -9
- package/dist/host/platform.d.cts.map +1 -1
- package/dist/host/platform.d.mts +1 -9
- package/dist/host/platform.d.mts.map +1 -1
- package/dist/host/platform.mjs +1 -2
- package/dist/host/platform.mjs.map +1 -1
- package/dist/host/senders.cjs +1 -2
- package/dist/host/senders.d.cts +0 -2
- package/dist/host/senders.d.cts.map +1 -1
- package/dist/host/senders.d.mts +0 -2
- package/dist/host/senders.d.mts.map +1 -1
- package/dist/host/senders.mjs +1 -2
- package/dist/http2-client.cjs +1 -2
- package/dist/http2-client.d.cts +0 -2
- package/dist/http2-client.d.cts.map +1 -1
- package/dist/http2-client.d.mts +0 -2
- package/dist/http2-client.d.mts.map +1 -1
- package/dist/http2-client.mjs +1 -2
- package/dist/ir.cjs +1 -2
- package/dist/ir.d.cts +0 -2
- package/dist/ir.d.cts.map +1 -1
- package/dist/ir.d.mts +0 -2
- package/dist/ir.d.mts.map +1 -1
- package/dist/ir.mjs +1 -2
- package/dist/jwt.cjs +1 -2
- package/dist/jwt.d.cts +0 -2
- package/dist/jwt.d.cts.map +1 -1
- package/dist/jwt.d.mts +0 -2
- package/dist/jwt.d.mts.map +1 -1
- package/dist/jwt.mjs +1 -2
- package/dist/plan.cjs +1 -2
- package/dist/plan.d.cts +0 -2
- package/dist/plan.d.cts.map +1 -1
- package/dist/plan.d.mts +0 -2
- package/dist/plan.d.mts.map +1 -1
- package/dist/plan.mjs +1 -2
- package/dist/postgres-js.cjs +1 -2
- package/dist/postgres-js.d.cts +0 -2
- package/dist/postgres-js.d.cts.map +1 -1
- package/dist/postgres-js.d.mts +0 -2
- package/dist/postgres-js.d.mts.map +1 -1
- package/dist/postgres-js.mjs +1 -2
- package/dist/provenance.cjs +1 -2
- package/dist/provenance.d.cts +0 -2
- package/dist/provenance.d.cts.map +1 -1
- package/dist/provenance.d.mts +0 -2
- package/dist/provenance.d.mts.map +1 -1
- package/dist/provenance.mjs +1 -2
- package/dist/push.cjs +1 -2
- package/dist/push.d.cts +0 -2
- package/dist/push.d.cts.map +1 -1
- package/dist/push.d.mts +0 -2
- package/dist/push.d.mts.map +1 -1
- package/dist/push.mjs +1 -2
- package/dist/react-email.cjs +1 -2
- package/dist/react-email.d.cts +0 -2
- package/dist/react-email.d.cts.map +1 -1
- package/dist/react-email.d.mts +0 -2
- package/dist/react-email.d.mts.map +1 -1
- package/dist/react-email.mjs +1 -2
- package/dist/reporting/classify.cjs +1 -2
- package/dist/reporting/classify.d.cts +0 -2
- package/dist/reporting/classify.d.cts.map +1 -1
- package/dist/reporting/classify.d.mts +0 -2
- package/dist/reporting/classify.d.mts.map +1 -1
- package/dist/reporting/classify.mjs +1 -2
- package/dist/reporting/observer.cjs +1 -2
- package/dist/reporting/observer.d.cts +0 -2
- package/dist/reporting/observer.d.cts.map +1 -1
- package/dist/reporting/observer.d.mts +0 -2
- package/dist/reporting/observer.d.mts.map +1 -1
- package/dist/reporting/observer.mjs +1 -2
- package/dist/reporting/tracking.cjs +1 -2
- package/dist/reporting/tracking.d.cts +0 -2
- package/dist/reporting/tracking.d.cts.map +1 -1
- package/dist/reporting/tracking.d.mts +0 -2
- package/dist/reporting/tracking.d.mts.map +1 -1
- package/dist/reporting/tracking.mjs +1 -2
- package/dist/runtime.cjs +1 -2
- package/dist/runtime.d.cts +0 -2
- package/dist/runtime.d.cts.map +1 -1
- package/dist/runtime.d.mts +0 -2
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +1 -2
- package/dist/store/erasure.cjs +1 -2
- package/dist/store/erasure.d.cts +0 -2
- package/dist/store/erasure.d.cts.map +1 -1
- package/dist/store/erasure.d.mts +0 -2
- package/dist/store/erasure.d.mts.map +1 -1
- package/dist/store/erasure.mjs +1 -2
- package/dist/store/facts.cjs +2 -3
- package/dist/store/facts.cjs.map +1 -1
- package/dist/store/facts.d.cts +0 -2
- package/dist/store/facts.d.cts.map +1 -1
- package/dist/store/facts.d.mts +0 -2
- package/dist/store/facts.d.mts.map +1 -1
- package/dist/store/facts.mjs +2 -3
- package/dist/store/facts.mjs.map +1 -1
- package/dist/store/index.cjs +1 -4
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +21 -28
- package/dist/store/index.d.cts.map +1 -1
- package/dist/store/index.d.mts +21 -28
- package/dist/store/index.d.mts.map +1 -1
- package/dist/store/index.mjs +2 -4
- package/dist/store/index.mjs.map +1 -1
- package/dist/store/postgres-reporting.cjs +1 -2
- package/dist/store/postgres-reporting.d.cts +0 -2
- package/dist/store/postgres-reporting.d.cts.map +1 -1
- package/dist/store/postgres-reporting.d.mts +0 -2
- package/dist/store/postgres-reporting.d.mts.map +1 -1
- package/dist/store/postgres-reporting.mjs +1 -2
- package/dist/store/postgres.cjs +3 -5
- package/dist/store/postgres.cjs.map +1 -1
- package/dist/store/postgres.d.cts +2 -5
- package/dist/store/postgres.d.cts.map +1 -1
- package/dist/store/postgres.d.mts +2 -5
- package/dist/store/postgres.d.mts.map +1 -1
- package/dist/store/postgres.mjs +3 -5
- package/dist/store/postgres.mjs.map +1 -1
- package/dist/store/sql.cjs +1 -2
- package/dist/store/sql.d.cts +0 -2
- package/dist/store/sql.d.cts.map +1 -1
- package/dist/store/sql.d.mts +0 -2
- package/dist/store/sql.d.mts.map +1 -1
- package/dist/store/sql.mjs +1 -2
- package/dist/store/tables.cjs +1 -2
- package/dist/store/tables.d.cts +0 -2
- package/dist/store/tables.d.cts.map +1 -1
- package/dist/store/tables.d.mts +0 -2
- package/dist/store/tables.d.mts.map +1 -1
- package/dist/store/tables.mjs +1 -2
- package/dist/store/user-lock.cjs +1 -2
- package/dist/store/user-lock.d.cts +0 -2
- package/dist/store/user-lock.d.cts.map +1 -1
- package/dist/store/user-lock.d.mts +0 -2
- package/dist/store/user-lock.d.mts.map +1 -1
- package/dist/store/user-lock.mjs +1 -2
- package/dist/templates.cjs +1 -2
- package/dist/templates.d.cts +0 -2
- package/dist/templates.d.cts.map +1 -1
- package/dist/templates.d.mts +0 -2
- package/dist/templates.d.mts.map +1 -1
- package/dist/templates.mjs +1 -2
- package/dist/transports/cloudflare-email.cjs +1 -2
- package/dist/transports/cloudflare-email.d.cts +1 -3
- package/dist/transports/cloudflare-email.d.cts.map +1 -1
- package/dist/transports/cloudflare-email.d.mts +1 -3
- package/dist/transports/cloudflare-email.d.mts.map +1 -1
- package/dist/transports/cloudflare-email.mjs +1 -2
- package/dist/transports/ses.cjs +1 -2
- package/dist/transports/ses.d.cts +0 -2
- package/dist/transports/ses.d.cts.map +1 -1
- package/dist/transports/ses.d.mts +0 -2
- package/dist/transports/ses.d.mts.map +1 -1
- package/dist/transports/ses.mjs +1 -2
- package/dist/transports/sigv4.cjs +1 -2
- package/dist/transports/sigv4.d.cts +0 -2
- package/dist/transports/sigv4.d.cts.map +1 -1
- package/dist/transports/sigv4.d.mts +0 -2
- package/dist/transports/sigv4.d.mts.map +1 -1
- package/dist/transports/sigv4.mjs +1 -2
- package/dist/webhooks.cjs +1 -2
- package/dist/webhooks.d.cts +0 -2
- package/dist/webhooks.d.cts.map +1 -1
- package/dist/webhooks.d.mts +0 -2
- package/dist/webhooks.d.mts.map +1 -1
- package/dist/webhooks.mjs +1 -2
- package/dist/webpush.cjs +1 -2
- package/dist/webpush.d.cts +0 -2
- package/dist/webpush.d.cts.map +1 -1
- package/dist/webpush.d.mts +0 -2
- package/dist/webpush.d.mts.map +1 -1
- package/dist/webpush.mjs +1 -2
- package/package.json +5 -7
- package/dist/cloudflare/d1-env.cjs +0 -17
- package/dist/cloudflare/d1-env.cjs.map +0 -1
- package/dist/cloudflare/d1-env.d.cts +0 -12
- package/dist/cloudflare/d1-env.d.cts.map +0 -1
- package/dist/cloudflare/d1-env.d.mts +0 -12
- package/dist/cloudflare/d1-env.d.mts.map +0 -1
- package/dist/cloudflare/d1-env.mjs +0 -16
- package/dist/cloudflare/d1-env.mjs.map +0 -1
- package/dist/cloudflare/schema.sql +0 -148
- package/dist/store/d1.cjs +0 -245
- package/dist/store/d1.cjs.map +0 -1
- package/dist/store/d1.d.cts +0 -73
- package/dist/store/d1.d.cts.map +0 -1
- package/dist/store/d1.d.mts +0 -73
- package/dist/store/d1.d.mts.map +0 -1
- package/dist/store/d1.mjs +0 -244
- package/dist/store/d1.mjs.map +0 -1
- package/src/cloudflare/schema.sql +0 -148
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EmailBindingLike } from "../cloudflare/bindings.mjs";
|
|
2
1
|
import { EmailTransport } from "../email-sender.mjs";
|
|
3
|
-
|
|
2
|
+
import { EmailBindingLike } from "../cloudflare/bindings.mjs";
|
|
4
3
|
/**
|
|
5
4
|
* `@shware/workflow/transports/cloudflare-email` — Cloudflare Email Service, through the
|
|
6
5
|
* Worker's `send_email` binding or, from anywhere else (a Lambda), its REST API. Both take the
|
|
@@ -36,5 +35,4 @@ export declare class CloudflareEmailError extends Error {
|
|
|
36
35
|
}[]);
|
|
37
36
|
}
|
|
38
37
|
export declare function cloudflareEmailTransport(options: CloudflareEmailTransportOptions): EmailTransport;
|
|
39
|
-
//#endregion
|
|
40
38
|
//# sourceMappingURL=cloudflare-email.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudflare-email.d.mts","names":[],"sources":["../../src/transports/cloudflare-email.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloudflare-email.d.mts","names":[],"sources":["../../src/transports/cloudflare-email.ts"],"mappings":";;;;;;;YAWY;;EAGN,SAAS;EACT;EACA;;EAGA;EACA;;EAEA;;EAEA;EACA,eAAe;;;qBAIR,6BAA6B;WAK7B;WACA;IAAmB;IAAe;;WAL3B;;WAET;EACT,YACW,gBACA;IAAmB;IAAe;;;wBAS/B,yBAAyB,SAAS,kCAAkC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isRetryableStatus } from "../engine/retry.mjs";
|
|
2
2
|
import { mimeAddress } from "../email.mjs";
|
|
3
|
-
|
|
3
|
+
// src/transports/cloudflare-email.ts
|
|
4
4
|
/** The REST API refused the email: `errors` are Cloudflare's `{ code, message }` pairs. */
|
|
5
5
|
var CloudflareEmailError = class extends Error {
|
|
6
6
|
status;
|
|
@@ -56,7 +56,6 @@ function cloudflareEmailTransport(options) {
|
|
|
56
56
|
return typeof id === "string" ? { providerMessageId: id } : {};
|
|
57
57
|
} };
|
|
58
58
|
}
|
|
59
|
-
//#endregion
|
|
60
59
|
export { CloudflareEmailError, cloudflareEmailTransport };
|
|
61
60
|
|
|
62
61
|
//# sourceMappingURL=cloudflare-email.mjs.map
|
package/dist/transports/ses.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_engine_retry = require("../engine/retry.cjs");
|
|
3
3
|
const require_email = require("../email.cjs");
|
|
4
4
|
const require_transports_sigv4 = require("./sigv4.cjs");
|
|
5
|
-
|
|
5
|
+
// src/transports/ses.ts
|
|
6
6
|
/**
|
|
7
7
|
* Error codes that mean "later", whatever the status line says. SES v2 answers its sending-rate
|
|
8
8
|
* limit with 429 `TooManyRequestsException`
|
|
@@ -132,7 +132,6 @@ function sesEmailTransport(options) {
|
|
|
132
132
|
return typeof messageId === "string" ? { providerMessageId: messageId } : {};
|
|
133
133
|
} };
|
|
134
134
|
}
|
|
135
|
-
//#endregion
|
|
136
135
|
exports.SesSendError = SesSendError;
|
|
137
136
|
exports.sesEmailTransport = sesEmailTransport;
|
|
138
137
|
exports.sesErrorType = sesErrorType;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EmailTransport } from "../email-sender.cjs";
|
|
2
|
-
//#region src/transports/ses.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* `@shware/workflow/transports/ses` — email through Amazon SES (the v2 `SendEmail` API) over
|
|
5
4
|
* plain `fetch` with a SigV4 signature, so the same transport runs in a Lambda and in a Worker.
|
|
@@ -45,5 +44,4 @@ export declare class SesSendError extends Error {
|
|
|
45
44
|
*/
|
|
46
45
|
export declare function sesErrorType(headers: Headers, body: unknown): string | undefined;
|
|
47
46
|
export declare function sesEmailTransport(options: SesEmailTransportOptions): EmailTransport;
|
|
48
|
-
//#endregion
|
|
49
47
|
//# sourceMappingURL=ses.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ses.d.cts","names":[],"sources":["../../src/transports/ses.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ses.d.cts","names":[],"sources":["../../src/transports/ses.ts"],"mappings":";;;;;;iBAWiB;EACf;EACA;;EAEA;;;YAIU,8BAA8B,iBAAiB,QAAQ;iBAElD;EACf;;;;;;EAMA,cAAc,iBAAiB;;EAE/B;;EAEA;EACA,eAAe;;;qBA6BJ,qBAAqB;WAQrB;WACA;WARO;;;;;WAKT;EACT,YACW,gBACA,0BACT;;;;;;wBAWY,aAAa,SAAS,SAAS;wBAyB/B,kBAAkB,SAAS,2BAA2B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EmailTransport } from "../email-sender.mjs";
|
|
2
|
-
//#region src/transports/ses.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* `@shware/workflow/transports/ses` — email through Amazon SES (the v2 `SendEmail` API) over
|
|
5
4
|
* plain `fetch` with a SigV4 signature, so the same transport runs in a Lambda and in a Worker.
|
|
@@ -45,5 +44,4 @@ export declare class SesSendError extends Error {
|
|
|
45
44
|
*/
|
|
46
45
|
export declare function sesErrorType(headers: Headers, body: unknown): string | undefined;
|
|
47
46
|
export declare function sesEmailTransport(options: SesEmailTransportOptions): EmailTransport;
|
|
48
|
-
//#endregion
|
|
49
47
|
//# sourceMappingURL=ses.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ses.d.mts","names":[],"sources":["../../src/transports/ses.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ses.d.mts","names":[],"sources":["../../src/transports/ses.ts"],"mappings":";;;;;;iBAWiB;EACf;EACA;;EAEA;;;YAIU,8BAA8B,iBAAiB,QAAQ;iBAElD;EACf;;;;;;EAMA,cAAc,iBAAiB;;EAE/B;;EAEA;EACA,eAAe;;;qBA6BJ,qBAAqB;WAQrB;WACA;WARO;;;;;WAKT;EACT,YACW,gBACA,0BACT;;;;;;wBAWY,aAAa,SAAS,SAAS;wBAyB/B,kBAAkB,SAAS,2BAA2B"}
|
package/dist/transports/ses.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isRetryableStatus } from "../engine/retry.mjs";
|
|
2
2
|
import { mimeAddress } from "../email.mjs";
|
|
3
3
|
import { signRequest } from "./sigv4.mjs";
|
|
4
|
-
|
|
4
|
+
// src/transports/ses.ts
|
|
5
5
|
/**
|
|
6
6
|
* Error codes that mean "later", whatever the status line says. SES v2 answers its sending-rate
|
|
7
7
|
* limit with 429 `TooManyRequestsException`
|
|
@@ -131,7 +131,6 @@ function sesEmailTransport(options) {
|
|
|
131
131
|
return typeof messageId === "string" ? { providerMessageId: messageId } : {};
|
|
132
132
|
} };
|
|
133
133
|
}
|
|
134
|
-
//#endregion
|
|
135
134
|
export { SesSendError, sesEmailTransport, sesErrorType };
|
|
136
135
|
|
|
137
136
|
//# sourceMappingURL=ses.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let node_buffer = require("node:buffer");
|
|
3
|
-
|
|
3
|
+
// src/transports/sigv4.ts
|
|
4
4
|
const utf8 = new TextEncoder();
|
|
5
5
|
const hex = (bytes) => node_buffer.Buffer.from(bytes).toString("hex");
|
|
6
6
|
async function sha256(data) {
|
|
@@ -81,7 +81,6 @@ async function signRequest(request) {
|
|
|
81
81
|
authorization: `AWS4-HMAC-SHA256 Credential=${accessKeyId}/${scope}, SignedHeaders=${signedHeaders}, Signature=${signature}`
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
exports.signRequest = signRequest;
|
|
86
85
|
|
|
87
86
|
//# sourceMappingURL=sigv4.cjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/transports/sigv4.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* AWS Signature Version 4 over WebCrypto, which a Worker and Node both have: enough to sign
|
|
4
3
|
* the JSON API calls the transports make. Headers are signed as given (plus `host` and
|
|
@@ -23,5 +22,4 @@ export interface SigV4Request {
|
|
|
23
22
|
}
|
|
24
23
|
/** The request's headers with `authorization` (and `x-amz-date`, the session token) added. */
|
|
25
24
|
export declare function signRequest(request: SigV4Request): Promise<Record<string, string>>;
|
|
26
|
-
//#endregion
|
|
27
25
|
//# sourceMappingURL=sigv4.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sigv4.d.cts","names":[],"sources":["../../src/transports/sigv4.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sigv4.d.cts","names":[],"sources":["../../src/transports/sigv4.ts"],"mappings":";;;;;;iBAQiB;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA,UAAU;EACV;EACA,aAAa;EACb;EACA;;EAEA;;;wBAoEoB,YAAY,SAAS,eAAe,QAAQ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/transports/sigv4.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* AWS Signature Version 4 over WebCrypto, which a Worker and Node both have: enough to sign
|
|
4
3
|
* the JSON API calls the transports make. Headers are signed as given (plus `host` and
|
|
@@ -23,5 +22,4 @@ export interface SigV4Request {
|
|
|
23
22
|
}
|
|
24
23
|
/** The request's headers with `authorization` (and `x-amz-date`, the session token) added. */
|
|
25
24
|
export declare function signRequest(request: SigV4Request): Promise<Record<string, string>>;
|
|
26
|
-
//#endregion
|
|
27
25
|
//# sourceMappingURL=sigv4.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sigv4.d.mts","names":[],"sources":["../../src/transports/sigv4.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sigv4.d.mts","names":[],"sources":["../../src/transports/sigv4.ts"],"mappings":";;;;;;iBAQiB;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA,UAAU;EACV;EACA,aAAa;EACb;EACA;;EAEA;;;wBAoEoB,YAAY,SAAS,eAAe,QAAQ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
|
-
|
|
2
|
+
// src/transports/sigv4.ts
|
|
3
3
|
const utf8 = new TextEncoder();
|
|
4
4
|
const hex = (bytes) => Buffer.from(bytes).toString("hex");
|
|
5
5
|
async function sha256(data) {
|
|
@@ -80,7 +80,6 @@ async function signRequest(request) {
|
|
|
80
80
|
authorization: `AWS4-HMAC-SHA256 Credential=${accessKeyId}/${scope}, SignedHeaders=${signedHeaders}, Signature=${signature}`
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
//#endregion
|
|
84
83
|
export { signRequest };
|
|
85
84
|
|
|
86
85
|
//# sourceMappingURL=sigv4.mjs.map
|
package/dist/webhooks.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/webhooks.ts
|
|
3
3
|
/**
|
|
4
4
|
* `@shware/workflow/webhooks` — messages posted to a team channel through an incoming webhook:
|
|
5
5
|
* Discord (`discord-api-types` bodies) and Slack (Block Kit). Plain fetch, no SDKs. A template
|
|
@@ -89,7 +89,6 @@ var SlackWebhookSender = class {
|
|
|
89
89
|
throw new Error(`[slack] ${status}: ${reason}`);
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
|
-
//#endregion
|
|
93
92
|
exports.DiscordWebhookSender = DiscordWebhookSender;
|
|
94
93
|
exports.SlackWebhookSender = SlackWebhookSender;
|
|
95
94
|
|
package/dist/webhooks.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MessageSender, OutboundMessage, SendResult } from "./engine/ports.cjs";
|
|
2
2
|
import "./engine/index.cjs";
|
|
3
3
|
import { DiscordContent, SlackContent } from "./templates.cjs";
|
|
4
|
-
//#region src/webhooks.d.ts
|
|
5
4
|
export interface WebhookMessage<C> {
|
|
6
5
|
url: string;
|
|
7
6
|
content: C;
|
|
@@ -21,5 +20,4 @@ export declare class SlackWebhookSender implements MessageSender {
|
|
|
21
20
|
constructor(options: WebhookSenderOptions<SlackContent>);
|
|
22
21
|
send(message: OutboundMessage): Promise<void | SendResult>;
|
|
23
22
|
}
|
|
24
|
-
//#endregion
|
|
25
23
|
//# sourceMappingURL=webhooks.d.cts.map
|
package/dist/webhooks.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.cts","names":[],"sources":["../src/webhooks.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhooks.d.cts","names":[],"sources":["../src/webhooks.ts"],"mappings":";;;iBAmBiB,eAAe;EAC9B;EACA,SAAS;;iBAGM,qBAAqB;EACpC,SACE,kBACA,OAAO,6BACJ,QAAQ,eAAe,MAAM,eAAe;;EAEjD,eAAe;;qBAsBJ,gCAAgC;mBACd;EAA7B,YAA6B,SAAS,qBAAqB;EAErD,KAAK,SAAS,kBAAkB,eAAe;;qBA0B1C,8BAA8B;mBACZ;EAA7B,YAA6B,SAAS,qBAAqB;EAErD,KAAK,SAAS,kBAAkB,eAAe"}
|
package/dist/webhooks.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MessageSender, OutboundMessage, SendResult } from "./engine/ports.mjs";
|
|
2
2
|
import "./engine/index.mjs";
|
|
3
3
|
import { DiscordContent, SlackContent } from "./templates.mjs";
|
|
4
|
-
//#region src/webhooks.d.ts
|
|
5
4
|
export interface WebhookMessage<C> {
|
|
6
5
|
url: string;
|
|
7
6
|
content: C;
|
|
@@ -21,5 +20,4 @@ export declare class SlackWebhookSender implements MessageSender {
|
|
|
21
20
|
constructor(options: WebhookSenderOptions<SlackContent>);
|
|
22
21
|
send(message: OutboundMessage): Promise<void | SendResult>;
|
|
23
22
|
}
|
|
24
|
-
//#endregion
|
|
25
23
|
//# sourceMappingURL=webhooks.d.mts.map
|
package/dist/webhooks.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.mts","names":[],"sources":["../src/webhooks.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhooks.d.mts","names":[],"sources":["../src/webhooks.ts"],"mappings":";;;iBAmBiB,eAAe;EAC9B;EACA,SAAS;;iBAGM,qBAAqB;EACpC,SACE,kBACA,OAAO,6BACJ,QAAQ,eAAe,MAAM,eAAe;;EAEjD,eAAe;;qBAsBJ,gCAAgC;mBACd;EAA7B,YAA6B,SAAS,qBAAqB;EAErD,KAAK,SAAS,kBAAkB,eAAe;;qBA0B1C,8BAA8B;mBACZ;EAA7B,YAA6B,SAAS,qBAAqB;EAErD,KAAK,SAAS,kBAAkB,eAAe"}
|
package/dist/webhooks.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/webhooks.ts
|
|
2
2
|
/**
|
|
3
3
|
* `@shware/workflow/webhooks` — messages posted to a team channel through an incoming webhook:
|
|
4
4
|
* Discord (`discord-api-types` bodies) and Slack (Block Kit). Plain fetch, no SDKs. A template
|
|
@@ -88,7 +88,6 @@ var SlackWebhookSender = class {
|
|
|
88
88
|
throw new Error(`[slack] ${status}: ${reason}`);
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
//#endregion
|
|
92
91
|
export { DiscordWebhookSender, SlackWebhookSender };
|
|
93
92
|
|
|
94
93
|
//# sourceMappingURL=webhooks.mjs.map
|
package/dist/webpush.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_engine_retry = require("./engine/retry.cjs");
|
|
3
3
|
const require_jwt = require("./jwt.cjs");
|
|
4
4
|
let node_buffer = require("node:buffer");
|
|
5
|
-
|
|
5
|
+
// src/webpush.ts
|
|
6
6
|
/**
|
|
7
7
|
* How a push service's answer is classified (RFC 8030 §7 and §8.1, with the browsers' services
|
|
8
8
|
* answering as documented there):
|
|
@@ -244,7 +244,6 @@ async function webPushTopic(idempotencyKey) {
|
|
|
244
244
|
const digest = await crypto.subtle.digest("SHA-256", utf8(idempotencyKey));
|
|
245
245
|
return require_jwt.base64url(new Uint8Array(digest)).slice(0, 32);
|
|
246
246
|
}
|
|
247
|
-
//#endregion
|
|
248
247
|
exports.DEAD_TOKEN_REASONS = DEAD_TOKEN_REASONS;
|
|
249
248
|
exports.MAX_PLAINTEXT_BYTES = MAX_PLAINTEXT_BYTES;
|
|
250
249
|
exports.VapidSigner = VapidSigner;
|
package/dist/webpush.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MessageSender, OutboundMessage, SendResult } from "./engine/ports.cjs";
|
|
2
2
|
import "./engine/index.cjs";
|
|
3
3
|
import { PushRenderer } from "./push.cjs";
|
|
4
|
-
//#region src/webpush.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* `@shware/workflow/webpush` — browser push through the standard Web Push protocol: VAPID
|
|
7
6
|
* (RFC 8292) identifies the sender, the payload is encrypted for the subscription (RFC 8291,
|
|
@@ -90,6 +89,5 @@ export declare class WebPushSender implements MessageSender {
|
|
|
90
89
|
* base64 alphabet, so the idempotency key goes through SHA-256 and is cut to size.
|
|
91
90
|
*/
|
|
92
91
|
export declare function webPushTopic(idempotencyKey: string): Promise<string>;
|
|
93
|
-
//#endregion
|
|
94
92
|
export {};
|
|
95
93
|
//# sourceMappingURL=webpush.d.cts.map
|
package/dist/webpush.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpush.d.cts","names":[],"sources":["../src/webpush.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"webpush.d.cts","names":[],"sources":["../src/webpush.ts"],"mappings":";;;;;;;;;;;;;;;iBAmBiB;EACf;EACA;;iBAGe,2BAA2B;;EAE1C;;iBAGe;;EAEf,aAAa;EACb,QAAQ;;EAER;;EAEA,eAAe;;;;;;;;;;;;;;qBAeJ,oBAAoB;;wBAYX,qBAAqB,QAAQ;;;;;;;qBAkBtC;;KAER,QAAQ,WAAW;wBAIR,cAAc,eAAe;;;;;;wBAmBvB,eACpB,SAAS,OACT,QAAQ,OACR,YAAY,OACZ,OAAM,QACL,QAAQ;;;;;;;;qBAmDE;mBAKkB;UAJrB;mBACS;mBACA;EAEjB,YAA6B,SAAS;;EAGhC,cAAc,kBAAkB,eAAmB;UAmBjD;UA0BM;;qBAuCH,yBAAyB;mBACP;EAA7B,YAA6B,SAAS;EAEhC,KAAK,SAAS,kBAAkB,eAAe;;;;;;wBA4DjC,aAAa,yBAAyB"}
|
package/dist/webpush.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MessageSender, OutboundMessage, SendResult } from "./engine/ports.mjs";
|
|
2
2
|
import "./engine/index.mjs";
|
|
3
3
|
import { PushRenderer } from "./push.mjs";
|
|
4
|
-
//#region src/webpush.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* `@shware/workflow/webpush` — browser push through the standard Web Push protocol: VAPID
|
|
7
6
|
* (RFC 8292) identifies the sender, the payload is encrypted for the subscription (RFC 8291,
|
|
@@ -90,6 +89,5 @@ export declare class WebPushSender implements MessageSender {
|
|
|
90
89
|
* base64 alphabet, so the idempotency key goes through SHA-256 and is cut to size.
|
|
91
90
|
*/
|
|
92
91
|
export declare function webPushTopic(idempotencyKey: string): Promise<string>;
|
|
93
|
-
//#endregion
|
|
94
92
|
export {};
|
|
95
93
|
//# sourceMappingURL=webpush.d.mts.map
|
package/dist/webpush.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpush.d.mts","names":[],"sources":["../src/webpush.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"webpush.d.mts","names":[],"sources":["../src/webpush.ts"],"mappings":";;;;;;;;;;;;;;;iBAmBiB;EACf;EACA;;iBAGe,2BAA2B;;EAE1C;;iBAGe;;EAEf,aAAa;EACb,QAAQ;;EAER;;EAEA,eAAe;;;;;;;;;;;;;;qBAeJ,oBAAoB;;wBAYX,qBAAqB,QAAQ;;;;;;;qBAkBtC;;KAER,QAAQ,WAAW;wBAIR,cAAc,eAAe;;;;;;wBAmBvB,eACpB,SAAS,OACT,QAAQ,OACR,YAAY,OACZ,OAAM,QACL,QAAQ;;;;;;;;qBAmDE;mBAKkB;UAJrB;mBACS;mBACA;EAEjB,YAA6B,SAAS;;EAGhC,cAAc,kBAAkB,eAAmB;UAmBjD;UA0BM;;qBAuCH,yBAAyB;mBACP;EAA7B,YAA6B,SAAS;EAEhC,KAAK,SAAS,kBAAkB,eAAe;;;;;;wBA4DjC,aAAa,yBAAyB"}
|
package/dist/webpush.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PermanentError, isRetryableStatus } from "./engine/retry.mjs";
|
|
2
2
|
import { base64url } from "./jwt.mjs";
|
|
3
3
|
import { Buffer } from "node:buffer";
|
|
4
|
-
|
|
4
|
+
// src/webpush.ts
|
|
5
5
|
/**
|
|
6
6
|
* How a push service's answer is classified (RFC 8030 §7 and §8.1, with the browsers' services
|
|
7
7
|
* answering as documented there):
|
|
@@ -243,7 +243,6 @@ async function webPushTopic(idempotencyKey) {
|
|
|
243
243
|
const digest = await crypto.subtle.digest("SHA-256", utf8(idempotencyKey));
|
|
244
244
|
return base64url(new Uint8Array(digest)).slice(0, 32);
|
|
245
245
|
}
|
|
246
|
-
//#endregion
|
|
247
246
|
export { DEAD_TOKEN_REASONS, MAX_PLAINTEXT_BYTES, VapidSigner, WebPushSender, encryptPayload, fromBase64url, generateVapidKeys, webPushTopic };
|
|
248
247
|
|
|
249
248
|
//# sourceMappingURL=webpush.mjs.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shware/workflow",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/ShwareHQ/shware-sdk.git"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"src/cloudflare/schema.sql",
|
|
11
10
|
"src/cloudflare/workers.d.ts"
|
|
12
11
|
],
|
|
13
12
|
"type": "module",
|
|
@@ -32,7 +31,6 @@
|
|
|
32
31
|
"default": "./dist/engine/index.cjs"
|
|
33
32
|
}
|
|
34
33
|
},
|
|
35
|
-
"./schema.sql": "./dist/cloudflare/schema.sql",
|
|
36
34
|
"./cloudflare": {
|
|
37
35
|
"import": {
|
|
38
36
|
"types": "./dist/cloudflare/index.d.mts",
|
|
@@ -199,14 +197,14 @@
|
|
|
199
197
|
},
|
|
200
198
|
"dependencies": {
|
|
201
199
|
"@slack/types": "^3.2.0",
|
|
202
|
-
"discord-api-types": "^0.38.
|
|
200
|
+
"discord-api-types": "^0.38.57",
|
|
203
201
|
"ms": "^2.1.3"
|
|
204
202
|
},
|
|
205
203
|
"devDependencies": {
|
|
206
|
-
"@aws-sdk/client-lambda": "^3.
|
|
207
|
-
"@aws/durable-execution-sdk-js": "^2.7.
|
|
204
|
+
"@aws-sdk/client-lambda": "^3.1156.0",
|
|
205
|
+
"@aws/durable-execution-sdk-js": "^2.7.1",
|
|
208
206
|
"@aws/durable-execution-sdk-js-testing": "^1.3.1",
|
|
209
|
-
"@electric-sql/pglite": "^0.5.
|
|
207
|
+
"@electric-sql/pglite": "^0.5.11",
|
|
210
208
|
"@repo/typescript-config": "0.0.0",
|
|
211
209
|
"@types/aws-lambda": "^8.10.164",
|
|
212
210
|
"@types/ms": "^2.1.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_store_d1 = require("../store/d1.cjs");
|
|
3
|
-
//#region src/cloudflare/d1-env.ts
|
|
4
|
-
/**
|
|
5
|
-
* The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see
|
|
6
|
-
* ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store
|
|
7
|
-
* is passed, so a Worker that declares `DB` needs no wiring; one on another store (say
|
|
8
|
-
* PostgresJourneyStore) passes its own and may omit the binding entirely.
|
|
9
|
-
*/
|
|
10
|
-
function d1Store(env) {
|
|
11
|
-
if (env.DB === void 0) throw new Error("JourneyStore not configured: declare the DB binding for the default D1 store, or pass a store explicitly");
|
|
12
|
-
return new require_store_d1.D1JourneyStore(env.DB);
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
exports.d1Store = d1Store;
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=d1-env.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"d1-env.cjs","names":["D1JourneyStore"],"sources":["../../src/cloudflare/d1-env.ts"],"sourcesContent":["import type { JourneyEnv } from '../host/platform';\nimport { D1JourneyStore } from '../store/d1';\nimport type { JourneyStore } from '../store/index';\n\n/**\n * The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see\n * ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store\n * is passed, so a Worker that declares `DB` needs no wiring; one on another store (say\n * PostgresJourneyStore) passes its own and may omit the binding entirely.\n */\nexport function d1Store(env: JourneyEnv): JourneyStore {\n if (env.DB === undefined) {\n throw new Error(\n 'JourneyStore not configured: declare the DB binding for the default D1 store, or pass a store explicitly'\n );\n }\n return new D1JourneyStore(env.DB);\n}\n"],"mappings":";;;;;;;;;AAUA,SAAgB,QAAQ,KAA+B;CACrD,IAAI,IAAI,OAAO,KAAA,GACb,MAAM,IAAI,MACR,0GACF;CAEF,OAAO,IAAIA,iBAAAA,eAAe,IAAI,EAAE;AAClC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { JourneyEnv } from "../host/platform.cjs";
|
|
2
|
-
import { JourneyStore } from "../store/index.cjs";
|
|
3
|
-
//#region src/cloudflare/d1-env.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see
|
|
6
|
-
* ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store
|
|
7
|
-
* is passed, so a Worker that declares `DB` needs no wiring; one on another store (say
|
|
8
|
-
* PostgresJourneyStore) passes its own and may omit the binding entirely.
|
|
9
|
-
*/
|
|
10
|
-
export declare function d1Store(env: JourneyEnv): JourneyStore;
|
|
11
|
-
//#endregion
|
|
12
|
-
//# sourceMappingURL=d1-env.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"d1-env.d.cts","names":[],"sources":["../../src/cloudflare/d1-env.ts"],"mappings":";;;;;;;;;wBAUgB,QAAQ,KAAK,aAAa"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { JourneyEnv } from "../host/platform.mjs";
|
|
2
|
-
import { JourneyStore } from "../store/index.mjs";
|
|
3
|
-
//#region src/cloudflare/d1-env.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see
|
|
6
|
-
* ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store
|
|
7
|
-
* is passed, so a Worker that declares `DB` needs no wiring; one on another store (say
|
|
8
|
-
* PostgresJourneyStore) passes its own and may omit the binding entirely.
|
|
9
|
-
*/
|
|
10
|
-
export declare function d1Store(env: JourneyEnv): JourneyStore;
|
|
11
|
-
//#endregion
|
|
12
|
-
//# sourceMappingURL=d1-env.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"d1-env.d.mts","names":[],"sources":["../../src/cloudflare/d1-env.ts"],"mappings":";;;;;;;;;wBAUgB,QAAQ,KAAK,aAAa"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { D1JourneyStore } from "../store/d1.mjs";
|
|
2
|
-
//#region src/cloudflare/d1-env.ts
|
|
3
|
-
/**
|
|
4
|
-
* The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see
|
|
5
|
-
* ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store
|
|
6
|
-
* is passed, so a Worker that declares `DB` needs no wiring; one on another store (say
|
|
7
|
-
* PostgresJourneyStore) passes its own and may omit the binding entirely.
|
|
8
|
-
*/
|
|
9
|
-
function d1Store(env) {
|
|
10
|
-
if (env.DB === void 0) throw new Error("JourneyStore not configured: declare the DB binding for the default D1 store, or pass a store explicitly");
|
|
11
|
-
return new D1JourneyStore(env.DB);
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { d1Store };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=d1-env.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"d1-env.mjs","names":[],"sources":["../../src/cloudflare/d1-env.ts"],"sourcesContent":["import type { JourneyEnv } from '../host/platform';\nimport { D1JourneyStore } from '../store/d1';\nimport type { JourneyStore } from '../store/index';\n\n/**\n * The default store: D1 from the env's `DB` binding — tables and workflow bodies alike (see\n * ../cloudflare/schema.sql). Every router function and the runner fall back to it when no store\n * is passed, so a Worker that declares `DB` needs no wiring; one on another store (say\n * PostgresJourneyStore) passes its own and may omit the binding entirely.\n */\nexport function d1Store(env: JourneyEnv): JourneyStore {\n if (env.DB === undefined) {\n throw new Error(\n 'JourneyStore not configured: declare the DB binding for the default D1 store, or pass a store explicitly'\n );\n }\n return new D1JourneyStore(env.DB);\n}\n"],"mappings":";;;;;;;;AAUA,SAAgB,QAAQ,KAA+B;CACrD,IAAI,IAAI,OAAO,KAAA,GACb,MAAM,IAAI,MACR,0GACF;CAEF,OAAO,IAAI,eAAe,IAAI,EAAE;AAClC"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
-- Journey engine data plane (D1). Conditions are evaluated by querying at
|
|
2
|
-
-- decision time: lazy, with no real-time segment materialisation.
|
|
3
|
-
|
|
4
|
-
-- Raw event log. Every count- and window-based condition reads this table, so a
|
|
5
|
-
-- duplicated row silently changes a journey's behaviour, and `id` is what stops
|
|
6
|
-
-- that: it is the occurrence's identity, chosen by whoever sent it, and the key
|
|
7
|
-
-- constraint makes a second delivery of the same occurrence a no-op. Ingest is
|
|
8
|
-
-- reachable from two retrying callers (a client retrying a 500, and the
|
|
9
|
-
-- interpreter's send_event step being retried after it already committed its
|
|
10
|
-
-- row), so both pass an id they can reproduce.
|
|
11
|
-
--
|
|
12
|
-
-- The id is per user: the key is (user_id, id), so one sender's id can never
|
|
13
|
-
-- block another user's event, and a producer only has to keep its ids unique
|
|
14
|
-
-- within a user.
|
|
15
|
-
--
|
|
16
|
-
-- Only the sender knows whether two deliveries describe one occurrence or two,
|
|
17
|
-
-- so the engine never invents that answer: an ingest that arrives without an id
|
|
18
|
-
-- is given a fresh one, which is a truthful "this is its own occurrence" rather
|
|
19
|
-
-- than a guess.
|
|
20
|
-
CREATE TABLE IF NOT EXISTS events (
|
|
21
|
-
id TEXT NOT NULL,
|
|
22
|
-
user_id TEXT NOT NULL,
|
|
23
|
-
name TEXT NOT NULL,
|
|
24
|
-
ts INTEGER NOT NULL,
|
|
25
|
-
payload TEXT NOT NULL DEFAULT '{}',
|
|
26
|
-
PRIMARY KEY (user_id, id)
|
|
27
|
-
);
|
|
28
|
-
CREATE INDEX IF NOT EXISTS idx_events_user_name_ts ON events (user_id, name, ts);
|
|
29
|
-
|
|
30
|
-
CREATE TABLE IF NOT EXISTS profiles (
|
|
31
|
-
user_id TEXT PRIMARY KEY,
|
|
32
|
-
props TEXT NOT NULL DEFAULT '{}'
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
-- Workflow bodies (WorkflowIR JSON), content-addressed. They live beside the
|
|
36
|
-
-- routes that point at them so a deploy is read-your-writes: the trigger row
|
|
37
|
-
-- and the body it names are in one strongly consistent database, and a route
|
|
38
|
-
-- never names a body another store has yet to catch up on.
|
|
39
|
-
CREATE TABLE IF NOT EXISTS workflow_ir (
|
|
40
|
-
content_hash TEXT PRIMARY KEY,
|
|
41
|
-
ir TEXT NOT NULL
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
-- Deploy artefacts: segment definitions (resolved by id during evaluation)
|
|
45
|
-
-- and the trigger routing table.
|
|
46
|
-
-- Push devices: one row per provider token, owned by the user who registered it last.
|
|
47
|
-
-- user_id is null for a device whose user signed out: it stays registered until the next
|
|
48
|
-
-- sign-in binds it again. A database created while it was NOT NULL needs the table rebuilt.
|
|
49
|
-
CREATE TABLE IF NOT EXISTS devices (
|
|
50
|
-
token TEXT PRIMARY KEY,
|
|
51
|
-
user_id TEXT,
|
|
52
|
-
platform TEXT NOT NULL,
|
|
53
|
-
ts INTEGER NOT NULL
|
|
54
|
-
);
|
|
55
|
-
CREATE INDEX IF NOT EXISTS idx_devices_user_ts ON devices (user_id, ts);
|
|
56
|
-
|
|
57
|
-
CREATE TABLE IF NOT EXISTS segments (
|
|
58
|
-
id TEXT PRIMARY KEY,
|
|
59
|
-
condition TEXT NOT NULL,
|
|
60
|
-
hash TEXT NOT NULL
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
-- Event trigger routes. `where` gates on the triggering event's payload
|
|
64
|
-
-- (a payload-only condition tree); `filter` gates on the profile.
|
|
65
|
-
CREATE TABLE IF NOT EXISTS triggers (
|
|
66
|
-
workflow TEXT PRIMARY KEY,
|
|
67
|
-
hash TEXT NOT NULL,
|
|
68
|
-
event TEXT NOT NULL,
|
|
69
|
-
"where" TEXT,
|
|
70
|
-
filter TEXT
|
|
71
|
-
);
|
|
72
|
-
CREATE INDEX IF NOT EXISTS idx_triggers_event ON triggers (event);
|
|
73
|
-
|
|
74
|
-
-- Segment-entry trigger routes.
|
|
75
|
-
CREATE TABLE IF NOT EXISTS segment_triggers (
|
|
76
|
-
workflow TEXT PRIMARY KEY,
|
|
77
|
-
hash TEXT NOT NULL,
|
|
78
|
-
segment TEXT NOT NULL
|
|
79
|
-
);
|
|
80
|
-
CREATE INDEX IF NOT EXISTS idx_segment_triggers_segment ON segment_triggers (segment);
|
|
81
|
-
|
|
82
|
-
-- Lazily maintained segment membership, covering only segments that something
|
|
83
|
-
-- triggers on. Transitions are re-evaluated when the user is ingested or
|
|
84
|
-
-- identified, and by the scheduled sweep (journeyWorker's `scheduled`), which
|
|
85
|
-
-- also catches drift driven purely by the clock.
|
|
86
|
-
CREATE TABLE IF NOT EXISTS segment_members (
|
|
87
|
-
segment TEXT NOT NULL,
|
|
88
|
-
user_id TEXT NOT NULL,
|
|
89
|
-
ts INTEGER NOT NULL,
|
|
90
|
-
PRIMARY KEY (segment, user_id)
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
-- Workflows a segment entry still has to start for a member: written with the
|
|
94
|
-
-- membership, removed as each starts, so a failed start is retried by the next
|
|
95
|
-
-- evaluation instead of being hidden behind the membership.
|
|
96
|
-
CREATE TABLE IF NOT EXISTS segment_starts (
|
|
97
|
-
segment TEXT NOT NULL,
|
|
98
|
-
workflow TEXT NOT NULL,
|
|
99
|
-
user_id TEXT NOT NULL,
|
|
100
|
-
ts INTEGER NOT NULL,
|
|
101
|
-
PRIMARY KEY (segment, workflow, user_id)
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
-- Erasure tombstones (forgetUser): every write about a user is conditional on
|
|
105
|
-
-- no row here. While erased_at is null the user's data stays until every
|
|
106
|
-
-- running instance is stopped, and the scheduled sweep retries what is left;
|
|
107
|
-
-- once set, the data is gone and the row stays so the id is never written again.
|
|
108
|
-
CREATE TABLE IF NOT EXISTS erasures (
|
|
109
|
-
user_id TEXT PRIMARY KEY,
|
|
110
|
-
ts INTEGER NOT NULL,
|
|
111
|
-
erased_at INTEGER
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
-- Entry ledger: the once-per-user policy, instance addressing, and the audit
|
|
115
|
-
-- trail of which IR version each user was pinned to.
|
|
116
|
-
--
|
|
117
|
-
-- The primary key is what makes the policy atomic, and it is also the whole
|
|
118
|
-
-- policy: a user who has entered cannot enter again. The one exception is a
|
|
119
|
-
-- row left at 'failed', which records an instance that died rather than a
|
|
120
|
-
-- journey the user received; the router takes such a row over so the entry can
|
|
121
|
-
-- be retried (see startJourney). A general re-entry policy is a separate
|
|
122
|
-
-- design question and deliberately not encoded here.
|
|
123
|
-
CREATE TABLE IF NOT EXISTS entries (
|
|
124
|
-
workflow TEXT NOT NULL,
|
|
125
|
-
user_id TEXT NOT NULL,
|
|
126
|
-
instance_id TEXT NOT NULL,
|
|
127
|
-
hash TEXT NOT NULL,
|
|
128
|
-
status TEXT NOT NULL,
|
|
129
|
-
ts INTEGER NOT NULL,
|
|
130
|
-
-- When the runner admitted itself (admitInstance), before its first
|
|
131
|
-
-- observable effect; null until then, so an erasure knows nothing of the
|
|
132
|
-
-- instance has run yet.
|
|
133
|
-
admitted_at INTEGER,
|
|
134
|
-
PRIMARY KEY (workflow, user_id)
|
|
135
|
-
);
|
|
136
|
-
|
|
137
|
-
-- wait_until wake routing. `wake_handle` is an opaque handle (the instance id
|
|
138
|
-
-- on Cloudflare, a callback id on AWS). The primary key makes the interpreter's
|
|
139
|
-
-- re-subscription on every wait attempt idempotent, which its one-shot-callback
|
|
140
|
-
-- contract requires.
|
|
141
|
-
CREATE TABLE IF NOT EXISTS subscriptions (
|
|
142
|
-
user_id TEXT NOT NULL,
|
|
143
|
-
event TEXT NOT NULL,
|
|
144
|
-
wake_handle TEXT NOT NULL,
|
|
145
|
-
ts INTEGER NOT NULL,
|
|
146
|
-
PRIMARY KEY (wake_handle, event)
|
|
147
|
-
);
|
|
148
|
-
CREATE INDEX IF NOT EXISTS idx_subs_user_event ON subscriptions (user_id, event);
|