alchemy-effect 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.d.ts +7 -2
- package/lib/app.d.ts.map +1 -1
- package/lib/app.js +1 -0
- package/lib/app.js.map +1 -1
- package/lib/apply.d.ts +57 -1
- package/lib/apply.d.ts.map +1 -1
- package/lib/apply.js +141 -55
- package/lib/apply.js.map +1 -1
- package/lib/aws/account.d.ts +4 -3
- package/lib/aws/account.d.ts.map +1 -1
- package/lib/aws/account.js +2 -2
- package/lib/aws/account.js.map +1 -1
- package/lib/aws/arn.d.ts +1 -5
- package/lib/aws/arn.d.ts.map +1 -1
- package/lib/aws/client.d.ts.map +1 -1
- package/lib/aws/client.js +9 -1
- package/lib/aws/client.js.map +1 -1
- package/lib/aws/credentials.d.ts +1 -1
- package/lib/aws/credentials.d.ts.map +1 -1
- package/lib/aws/credentials.js.map +1 -1
- package/lib/aws/dynamodb/attribute-value.d.ts +20 -0
- package/lib/aws/dynamodb/attribute-value.d.ts.map +1 -0
- package/lib/aws/dynamodb/attribute-value.js +217 -0
- package/lib/aws/dynamodb/attribute-value.js.map +1 -0
- package/lib/aws/dynamodb/client.d.ts +12 -0
- package/lib/aws/dynamodb/client.d.ts.map +1 -0
- package/lib/aws/{sqs/queue.client.js → dynamodb/client.js} +6 -6
- package/lib/aws/dynamodb/client.js.map +1 -0
- package/lib/aws/dynamodb/expr.d.ts +41 -0
- package/lib/aws/dynamodb/expr.d.ts.map +1 -0
- package/lib/aws/dynamodb/expr.js +1 -0
- package/lib/aws/dynamodb/expr.js.map +1 -0
- package/lib/aws/dynamodb/index.d.ts +9 -0
- package/lib/aws/dynamodb/index.d.ts.map +1 -0
- package/lib/aws/dynamodb/index.js +10 -0
- package/lib/aws/dynamodb/index.js.map +1 -0
- package/lib/aws/dynamodb/projection.d.ts +25 -0
- package/lib/aws/dynamodb/projection.d.ts.map +1 -0
- package/lib/aws/dynamodb/projection.js +1 -0
- package/lib/aws/dynamodb/projection.js.map +1 -0
- package/lib/aws/dynamodb/secondary-index.d.ts +25 -0
- package/lib/aws/dynamodb/secondary-index.d.ts.map +1 -0
- package/lib/aws/dynamodb/secondary-index.js +4 -0
- package/lib/aws/dynamodb/secondary-index.js.map +1 -0
- package/lib/aws/dynamodb/table.d.ts +56 -0
- package/lib/aws/dynamodb/table.d.ts.map +1 -0
- package/lib/aws/dynamodb/table.get-item.d.ts +55 -0
- package/lib/aws/dynamodb/table.get-item.d.ts.map +1 -0
- package/lib/aws/dynamodb/table.get-item.js +75 -0
- package/lib/aws/dynamodb/table.get-item.js.map +1 -0
- package/lib/aws/dynamodb/table.js +4 -0
- package/lib/aws/dynamodb/table.js.map +1 -0
- package/lib/aws/dynamodb/table.provider.d.ts +8 -0
- package/lib/aws/dynamodb/table.provider.d.ts.map +1 -0
- package/lib/aws/dynamodb/table.provider.js +199 -0
- package/lib/aws/dynamodb/table.provider.js.map +1 -0
- package/lib/aws/ec2/client.d.ts +12 -0
- package/lib/aws/ec2/client.d.ts.map +1 -0
- package/lib/aws/ec2/client.js +11 -0
- package/lib/aws/ec2/client.js.map +1 -0
- package/lib/aws/ec2/index.d.ts +4 -0
- package/lib/aws/ec2/index.d.ts.map +1 -0
- package/lib/aws/ec2/index.js +4 -0
- package/lib/aws/ec2/index.js.map +1 -0
- package/lib/aws/ec2/vpc.d.ts +131 -0
- package/lib/aws/ec2/vpc.d.ts.map +1 -0
- package/lib/aws/ec2/vpc.js +3 -0
- package/lib/aws/ec2/vpc.js.map +1 -0
- package/lib/aws/ec2/vpc.provider.d.ts +7 -0
- package/lib/aws/ec2/vpc.provider.d.ts.map +1 -0
- package/lib/aws/ec2/vpc.provider.js +198 -0
- package/lib/aws/ec2/vpc.provider.js.map +1 -0
- package/lib/aws/index.d.ts +24 -14
- package/lib/aws/index.d.ts.map +1 -1
- package/lib/aws/index.js +7 -12
- package/lib/aws/index.js.map +1 -1
- package/lib/aws/lambda/client.d.ts +8 -0
- package/lib/aws/lambda/client.d.ts.map +1 -0
- package/lib/aws/lambda/client.js +7 -0
- package/lib/aws/lambda/client.js.map +1 -0
- package/lib/aws/lambda/consume.d.ts +3 -3
- package/lib/aws/lambda/consume.d.ts.map +1 -1
- package/lib/aws/lambda/consume.js.map +1 -1
- package/lib/aws/lambda/function.d.ts +13 -10
- package/lib/aws/lambda/function.d.ts.map +1 -1
- package/lib/aws/lambda/function.invoke.d.ts +2 -2
- package/lib/aws/lambda/function.invoke.d.ts.map +1 -1
- package/lib/aws/lambda/function.invoke.js +2 -2
- package/lib/aws/lambda/function.invoke.js.map +1 -1
- package/lib/aws/lambda/function.js +1 -1
- package/lib/aws/lambda/function.js.map +1 -1
- package/lib/aws/lambda/function.provider.d.ts +3 -3
- package/lib/aws/lambda/function.provider.d.ts.map +1 -1
- package/lib/aws/lambda/function.provider.js +145 -55
- package/lib/aws/lambda/function.provider.js.map +1 -1
- package/lib/aws/lambda/index.d.ts +1 -2
- package/lib/aws/lambda/index.d.ts.map +1 -1
- package/lib/aws/lambda/index.js +1 -1
- package/lib/aws/lambda/index.js.map +1 -1
- package/lib/aws/lambda/serve.d.ts +1 -1
- package/lib/aws/lambda/serve.d.ts.map +1 -1
- package/lib/aws/lambda/serve.js.map +1 -1
- package/lib/aws/region.d.ts +1 -0
- package/lib/aws/region.d.ts.map +1 -1
- package/lib/aws/region.js.map +1 -1
- package/lib/aws/sqs/client.d.ts +12 -0
- package/lib/aws/sqs/client.d.ts.map +1 -0
- package/lib/aws/sqs/client.js +11 -0
- package/lib/aws/sqs/client.js.map +1 -0
- package/lib/aws/sqs/index.d.ts +2 -1
- package/lib/aws/sqs/index.d.ts.map +1 -1
- package/lib/aws/sqs/index.js +2 -1
- package/lib/aws/sqs/index.js.map +1 -1
- package/lib/aws/sqs/queue.consume.d.ts +1 -10
- package/lib/aws/sqs/queue.consume.d.ts.map +1 -1
- package/lib/aws/sqs/queue.consume.js +1 -19
- package/lib/aws/sqs/queue.consume.js.map +1 -1
- package/lib/aws/sqs/queue.d.ts +2 -10
- package/lib/aws/sqs/queue.d.ts.map +1 -1
- package/lib/aws/sqs/queue.event-source.d.ts +20 -0
- package/lib/aws/sqs/queue.event-source.d.ts.map +1 -0
- package/lib/aws/sqs/queue.event-source.js +148 -0
- package/lib/aws/sqs/queue.event-source.js.map +1 -0
- package/lib/aws/sqs/queue.provider.d.ts +4 -3
- package/lib/aws/sqs/queue.provider.d.ts.map +1 -1
- package/lib/aws/sqs/queue.provider.js +4 -4
- package/lib/aws/sqs/queue.provider.js.map +1 -1
- package/lib/aws/sqs/queue.send-message.d.ts +2 -2
- package/lib/aws/sqs/queue.send-message.d.ts.map +1 -1
- package/lib/aws/sqs/queue.send-message.js +2 -2
- package/lib/aws/sqs/queue.send-message.js.map +1 -1
- package/lib/binding.d.ts +70 -22
- package/lib/binding.d.ts.map +1 -1
- package/lib/binding.js.map +1 -1
- package/lib/capability.d.ts +38 -0
- package/lib/capability.d.ts.map +1 -1
- package/lib/cli/components/Plan.d.ts.map +1 -1
- package/lib/cli/components/Plan.js +3 -1
- package/lib/cli/components/Plan.js.map +1 -1
- package/lib/cli/index.d.ts +204 -116
- package/lib/cli/index.d.ts.map +1 -1
- package/lib/cli/index.js +25707 -11055
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/progress.d.ts.map +1 -1
- package/lib/cli/progress.js +1 -0
- package/lib/cli/progress.js.map +1 -1
- package/lib/cloudflare/api.d.ts +29 -17
- package/lib/cloudflare/api.d.ts.map +1 -1
- package/lib/cloudflare/api.js +92 -27
- package/lib/cloudflare/api.js.map +1 -1
- package/lib/cloudflare/context.d.ts +27 -0
- package/lib/cloudflare/context.d.ts.map +1 -0
- package/lib/cloudflare/context.js +24 -0
- package/lib/cloudflare/context.js.map +1 -0
- package/lib/cloudflare/index.d.ts +5 -4
- package/lib/cloudflare/index.d.ts.map +1 -1
- package/lib/cloudflare/index.js +4 -4
- package/lib/cloudflare/index.js.map +1 -1
- package/lib/cloudflare/kv/index.d.ts +4 -0
- package/lib/cloudflare/kv/index.d.ts.map +1 -0
- package/lib/cloudflare/kv/index.js +4 -0
- package/lib/cloudflare/kv/index.js.map +1 -0
- package/lib/cloudflare/kv/namespace.binding.d.ts +8 -0
- package/lib/cloudflare/kv/namespace.binding.d.ts.map +1 -0
- package/lib/cloudflare/kv/namespace.binding.js +15 -0
- package/lib/cloudflare/kv/namespace.binding.js.map +1 -0
- package/lib/cloudflare/kv/namespace.client.d.ts +11 -0
- package/lib/cloudflare/kv/namespace.client.d.ts.map +1 -0
- package/lib/cloudflare/kv/namespace.client.js +31 -0
- package/lib/cloudflare/kv/namespace.client.js.map +1 -0
- package/lib/cloudflare/kv/namespace.d.ts +23 -0
- package/lib/cloudflare/kv/namespace.d.ts.map +1 -0
- package/lib/cloudflare/kv/namespace.js +3 -0
- package/lib/cloudflare/kv/namespace.js.map +1 -0
- package/lib/cloudflare/kv/namespace.provider.d.ts +5 -0
- package/lib/cloudflare/kv/namespace.provider.d.ts.map +1 -0
- package/lib/cloudflare/kv/namespace.provider.js +80 -0
- package/lib/cloudflare/kv/namespace.provider.js.map +1 -0
- package/lib/cloudflare/live.d.ts +11 -0
- package/lib/cloudflare/live.d.ts.map +1 -0
- package/lib/cloudflare/live.js +18 -0
- package/lib/cloudflare/live.js.map +1 -0
- package/lib/cloudflare/r2/bucket.binding.d.ts +8 -0
- package/lib/cloudflare/r2/bucket.binding.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.binding.js +18 -0
- package/lib/cloudflare/r2/bucket.binding.js.map +1 -0
- package/lib/cloudflare/r2/bucket.client.d.ts +8 -0
- package/lib/cloudflare/r2/bucket.client.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.client.js +9 -0
- package/lib/cloudflare/r2/bucket.client.js.map +1 -0
- package/lib/cloudflare/r2/bucket.d.ts +32 -0
- package/lib/cloudflare/r2/bucket.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.del.d.ts +4 -0
- package/lib/cloudflare/r2/bucket.del.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.del.js +7 -0
- package/lib/cloudflare/r2/bucket.del.js.map +1 -0
- package/lib/cloudflare/r2/bucket.get.d.ts +5 -0
- package/lib/cloudflare/r2/bucket.get.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.get.js +7 -0
- package/lib/cloudflare/r2/bucket.get.js.map +1 -0
- package/lib/cloudflare/r2/bucket.head.d.ts +4 -0
- package/lib/cloudflare/r2/bucket.head.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.head.js +7 -0
- package/lib/cloudflare/r2/bucket.head.js.map +1 -0
- package/lib/cloudflare/r2/bucket.js +3 -0
- package/lib/cloudflare/r2/bucket.js.map +1 -0
- package/lib/cloudflare/r2/bucket.list.d.ts +5 -0
- package/lib/cloudflare/r2/bucket.list.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.list.js +7 -0
- package/lib/cloudflare/r2/bucket.list.js.map +1 -0
- package/lib/cloudflare/r2/bucket.multipart.d.ts +19 -0
- package/lib/cloudflare/r2/bucket.multipart.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.multipart.js +25 -0
- package/lib/cloudflare/r2/bucket.multipart.js.map +1 -0
- package/lib/cloudflare/r2/bucket.provider.d.ts +5 -0
- package/lib/cloudflare/r2/bucket.provider.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.provider.js +66 -0
- package/lib/cloudflare/r2/bucket.provider.js.map +1 -0
- package/lib/cloudflare/r2/bucket.put.d.ts +6 -0
- package/lib/cloudflare/r2/bucket.put.d.ts.map +1 -0
- package/lib/cloudflare/r2/bucket.put.js +8 -0
- package/lib/cloudflare/r2/bucket.put.js.map +1 -0
- package/lib/cloudflare/r2/index.d.ts +10 -0
- package/lib/cloudflare/r2/index.d.ts.map +1 -0
- package/lib/cloudflare/r2/index.js +10 -0
- package/lib/cloudflare/r2/index.js.map +1 -0
- package/lib/cloudflare/stream.d.ts +10 -0
- package/lib/cloudflare/stream.d.ts.map +1 -0
- package/lib/cloudflare/stream.js +16 -0
- package/lib/cloudflare/stream.js.map +1 -0
- package/lib/cloudflare/worker/assets.fetch.d.ts +8 -0
- package/lib/cloudflare/worker/assets.fetch.d.ts.map +1 -0
- package/lib/cloudflare/worker/assets.fetch.js +11 -0
- package/lib/cloudflare/worker/assets.fetch.js.map +1 -0
- package/lib/cloudflare/worker/assets.provider.d.ts +66 -0
- package/lib/cloudflare/worker/assets.provider.d.ts.map +1 -0
- package/lib/cloudflare/worker/assets.provider.js +145 -0
- package/lib/cloudflare/worker/assets.provider.js.map +1 -0
- package/lib/cloudflare/worker/index.d.ts +6 -0
- package/lib/cloudflare/worker/index.d.ts.map +1 -0
- package/lib/cloudflare/worker/index.js +5 -0
- package/lib/cloudflare/worker/index.js.map +1 -0
- package/lib/cloudflare/worker/worker.d.ts +67 -0
- package/lib/cloudflare/worker/worker.d.ts.map +1 -0
- package/lib/cloudflare/worker/worker.handler.d.ts +11 -0
- package/lib/cloudflare/worker/worker.handler.d.ts.map +1 -0
- package/lib/cloudflare/worker/worker.handler.js +15 -0
- package/lib/cloudflare/worker/worker.handler.js.map +1 -0
- package/lib/cloudflare/worker/worker.js +4 -0
- package/lib/cloudflare/worker/worker.js.map +1 -0
- package/lib/cloudflare/worker/worker.provider.d.ts +10 -0
- package/lib/cloudflare/worker/worker.provider.d.ts.map +1 -0
- package/lib/cloudflare/worker/worker.provider.js +193 -0
- package/lib/cloudflare/worker/worker.provider.js.map +1 -0
- package/lib/cloudflare/worker/worker.serve.d.ts +39 -0
- package/lib/cloudflare/worker/worker.serve.d.ts.map +1 -0
- package/lib/cloudflare/worker/worker.serve.js +4 -0
- package/lib/cloudflare/worker/worker.serve.js.map +1 -0
- package/lib/destroy.d.ts +1 -3
- package/lib/destroy.d.ts.map +1 -1
- package/lib/destroy.js +5 -0
- package/lib/destroy.js.map +1 -1
- package/lib/dot-alchemy.d.ts +3 -2
- package/lib/dot-alchemy.d.ts.map +1 -1
- package/lib/dot-alchemy.js +3 -2
- package/lib/dot-alchemy.js.map +1 -1
- package/lib/esbuild.d.ts +28 -0
- package/lib/esbuild.d.ts.map +1 -0
- package/lib/esbuild.js +63 -0
- package/lib/esbuild.js.map +1 -0
- package/lib/index.d.ts +1 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/plan.d.ts +19 -8
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +144 -72
- package/lib/plan.js.map +1 -1
- package/lib/policy.d.ts +19 -1
- package/lib/policy.d.ts.map +1 -1
- package/lib/policy.js +10 -1
- package/lib/policy.js.map +1 -1
- package/lib/provider.d.ts +2 -2
- package/lib/provider.d.ts.map +1 -1
- package/lib/resource.d.ts +2 -10
- package/lib/resource.d.ts.map +1 -1
- package/lib/resource.js +1 -0
- package/lib/resource.js.map +1 -1
- package/lib/runtime.d.ts +1 -1
- package/lib/runtime.d.ts.map +1 -1
- package/lib/schema.d.ts +37 -0
- package/lib/schema.d.ts.map +1 -0
- package/lib/schema.js +61 -0
- package/lib/schema.js.map +1 -0
- package/lib/sha256.d.ts +5 -0
- package/lib/sha256.d.ts.map +1 -0
- package/lib/sha256.js +16 -0
- package/lib/sha256.js.map +1 -0
- package/lib/state.d.ts +3 -2
- package/lib/state.d.ts.map +1 -1
- package/lib/state.js +3 -2
- package/lib/state.js.map +1 -1
- package/lib/tags.d.ts +17 -0
- package/lib/tags.d.ts.map +1 -0
- package/lib/tags.js +22 -0
- package/lib/tags.js.map +1 -0
- package/lib/test.d.ts +14 -0
- package/lib/test.d.ts.map +1 -0
- package/lib/test.js +28 -0
- package/lib/test.js.map +1 -0
- package/lib/tsconfig.test.tsbuildinfo +1 -0
- package/lib/type.d.ts +3 -0
- package/lib/type.d.ts.map +1 -0
- package/lib/type.js +3 -0
- package/lib/type.js.map +1 -0
- package/package.json +48 -3
- package/src/app.ts +8 -7
- package/src/apply.ts +251 -93
- package/src/aws/account.ts +6 -4
- package/src/aws/arn.ts +1 -7
- package/src/aws/client.ts +15 -1
- package/src/aws/credentials.ts +1 -0
- package/src/aws/dynamodb/attribute-value.ts +240 -0
- package/src/aws/{sqs/queue.client.ts → dynamodb/client.ts} +9 -9
- package/src/aws/dynamodb/expr.ts +90 -0
- package/src/aws/dynamodb/index.ts +12 -0
- package/src/aws/dynamodb/projection.ts +159 -0
- package/src/aws/dynamodb/secondary-index.ts +45 -0
- package/src/aws/dynamodb/table.get-item.ts +177 -0
- package/src/aws/dynamodb/table.provider.ts +280 -0
- package/src/aws/dynamodb/table.ts +156 -0
- package/src/aws/ec2/client.ts +20 -0
- package/src/aws/ec2/index.ts +3 -0
- package/src/aws/ec2/vpc.provider.ts +285 -0
- package/src/aws/ec2/vpc.ts +152 -0
- package/src/aws/index.ts +15 -16
- package/src/aws/lambda/client.ts +14 -0
- package/src/aws/lambda/consume.ts +0 -1
- package/src/aws/lambda/function.invoke.ts +2 -2
- package/src/aws/lambda/function.provider.ts +197 -105
- package/src/aws/lambda/function.ts +16 -10
- package/src/aws/lambda/index.ts +1 -4
- package/src/aws/lambda/serve.ts +1 -1
- package/src/aws/region.ts +3 -1
- package/src/aws/sqs/client.ts +20 -0
- package/src/aws/sqs/index.ts +2 -1
- package/src/aws/sqs/queue.consume.ts +1 -34
- package/src/aws/sqs/queue.event-source.ts +253 -0
- package/src/aws/sqs/queue.provider.ts +4 -4
- package/src/aws/sqs/queue.send-message.ts +2 -2
- package/src/binding.ts +121 -25
- package/src/capability.ts +44 -0
- package/src/cli/components/Plan.tsx +4 -2
- package/src/cli/progress.tsx +1 -0
- package/src/cloudflare/api.ts +141 -61
- package/src/cloudflare/context.ts +49 -0
- package/src/cloudflare/index.ts +6 -4
- package/src/cloudflare/kv/index.ts +3 -0
- package/src/cloudflare/kv/namespace.binding.ts +25 -0
- package/src/cloudflare/kv/namespace.client.ts +70 -0
- package/src/cloudflare/kv/namespace.provider.ts +99 -0
- package/src/cloudflare/kv/namespace.ts +29 -0
- package/src/cloudflare/live.ts +38 -0
- package/src/cloudflare/r2/bucket.binding.ts +27 -0
- package/src/cloudflare/r2/bucket.client.ts +22 -0
- package/src/cloudflare/r2/bucket.del.ts +11 -0
- package/src/cloudflare/r2/bucket.get.ts +13 -0
- package/src/cloudflare/r2/bucket.head.ts +11 -0
- package/src/cloudflare/r2/bucket.list.ts +12 -0
- package/src/cloudflare/r2/bucket.multipart.ts +55 -0
- package/src/cloudflare/r2/bucket.provider.ts +83 -0
- package/src/cloudflare/r2/bucket.put.ts +17 -0
- package/src/cloudflare/r2/bucket.ts +38 -0
- package/src/cloudflare/r2/index.ts +9 -0
- package/src/cloudflare/stream.ts +21 -0
- package/src/cloudflare/worker/assets.fetch.ts +27 -0
- package/src/cloudflare/worker/assets.provider.ts +249 -0
- package/src/cloudflare/worker/index.ts +6 -0
- package/src/cloudflare/worker/worker.handler.ts +39 -0
- package/src/cloudflare/worker/worker.provider.ts +246 -0
- package/src/cloudflare/worker/worker.serve.ts +19 -0
- package/src/cloudflare/worker/worker.ts +76 -0
- package/src/destroy.ts +6 -3
- package/src/dot-alchemy.ts +3 -2
- package/src/esbuild.ts +98 -0
- package/src/index.ts +5 -4
- package/src/plan.ts +233 -120
- package/src/policy.ts +55 -2
- package/src/provider.ts +2 -2
- package/src/resource.ts +3 -2
- package/src/runtime.ts +1 -1
- package/src/schema.ts +102 -0
- package/src/sha256.ts +23 -0
- package/src/state.ts +3 -2
- package/src/tags.ts +38 -0
- package/src/test.ts +71 -0
- package/src/type.ts +2 -0
- package/lib/aws/lambda/function.client.d.ts +0 -8
- package/lib/aws/lambda/function.client.d.ts.map +0 -1
- package/lib/aws/lambda/function.client.js +0 -7
- package/lib/aws/lambda/function.client.js.map +0 -1
- package/lib/aws/sqs/queue.client.d.ts +0 -12
- package/lib/aws/sqs/queue.client.d.ts.map +0 -1
- package/lib/aws/sqs/queue.client.js.map +0 -1
- package/lib/cloudflare/kv.d.ts +0 -29
- package/lib/cloudflare/kv.d.ts.map +0 -1
- package/lib/cloudflare/kv.js +0 -3
- package/lib/cloudflare/kv.js.map +0 -1
- package/lib/cloudflare/kv.provider.d.ts +0 -4
- package/lib/cloudflare/kv.provider.d.ts.map +0 -1
- package/lib/cloudflare/kv.provider.js +0 -39
- package/lib/cloudflare/kv.provider.js.map +0 -1
- package/lib/cloudflare/worker.d.ts +0 -33
- package/lib/cloudflare/worker.d.ts.map +0 -1
- package/lib/cloudflare/worker.js +0 -4
- package/lib/cloudflare/worker.js.map +0 -1
- package/src/aws/lambda/function.client.ts +0 -14
- package/src/cloudflare/kv.provider.ts +0 -51
- package/src/cloudflare/kv.ts +0 -20
- package/src/cloudflare/worker.ts +0 -34
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import * as FileSystem from "@effect/platform/FileSystem";
|
|
2
|
+
import * as Path from "@effect/platform/Path";
|
|
3
|
+
import type { Workers } from "cloudflare/resources.mjs";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { App } from "../../app.ts";
|
|
6
|
+
import type { ScopedPlanStatusSession } from "../../apply.ts";
|
|
7
|
+
import { DotAlchemy } from "../../dot-alchemy.ts";
|
|
8
|
+
import { ESBuild } from "../../esbuild.ts";
|
|
9
|
+
import { sha256 } from "../../sha256.ts";
|
|
10
|
+
import { CloudflareAccountId, CloudflareApi } from "../api.ts";
|
|
11
|
+
import { Assets } from "./assets.provider.ts";
|
|
12
|
+
import { Worker, type WorkerAttr, type WorkerProps } from "./worker.ts";
|
|
13
|
+
|
|
14
|
+
export const workerProvider = () =>
|
|
15
|
+
Worker.provider.effect(
|
|
16
|
+
Effect.gen(function* () {
|
|
17
|
+
const app = yield* App;
|
|
18
|
+
const api = yield* CloudflareApi;
|
|
19
|
+
const accountId = yield* CloudflareAccountId;
|
|
20
|
+
const { read, upload } = yield* Assets;
|
|
21
|
+
const { build } = yield* ESBuild;
|
|
22
|
+
const fs = yield* FileSystem.FileSystem;
|
|
23
|
+
const path = yield* Path.Path;
|
|
24
|
+
const dotAlchemy = yield* DotAlchemy;
|
|
25
|
+
|
|
26
|
+
const getAccountSubdomain = yield* Effect.cachedFunction(
|
|
27
|
+
Effect.fnUntraced(function* (accountId: string) {
|
|
28
|
+
const { subdomain } = yield* api.workers.subdomains.get({
|
|
29
|
+
account_id: accountId,
|
|
30
|
+
});
|
|
31
|
+
return subdomain;
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
// pre-fetch subdomain in background
|
|
36
|
+
yield* Effect.forkDaemon(getAccountSubdomain(accountId));
|
|
37
|
+
|
|
38
|
+
const setWorkerSubdomain = Effect.fnUntraced(function* (
|
|
39
|
+
name: string,
|
|
40
|
+
enabled: boolean,
|
|
41
|
+
) {
|
|
42
|
+
const subdomain = yield* api.workers.scripts.subdomain.create(name, {
|
|
43
|
+
account_id: accountId,
|
|
44
|
+
enabled,
|
|
45
|
+
});
|
|
46
|
+
yield* Effect.logDebug("setWorkerSubdomain", subdomain);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const createWorkerName = (id: string, props: WorkerProps | undefined) =>
|
|
50
|
+
props?.name ?? `${app.name}-${id}-${app.stage}`.toLowerCase();
|
|
51
|
+
|
|
52
|
+
const prepareAssets = Effect.fnUntraced(function* (
|
|
53
|
+
assets: WorkerProps["assets"],
|
|
54
|
+
) {
|
|
55
|
+
if (!assets) return undefined;
|
|
56
|
+
const result = yield* read(
|
|
57
|
+
typeof assets === "string" ? { directory: assets } : assets,
|
|
58
|
+
);
|
|
59
|
+
return {
|
|
60
|
+
...result,
|
|
61
|
+
hash: yield* sha256(JSON.stringify(result)),
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const prepareBundle = Effect.fnUntraced(function* (
|
|
66
|
+
id: string,
|
|
67
|
+
main: string,
|
|
68
|
+
) {
|
|
69
|
+
const outfile = path.join(dotAlchemy, "out", `${id}.js`);
|
|
70
|
+
yield* build({
|
|
71
|
+
entryPoints: [path.relative(process.cwd(), main)],
|
|
72
|
+
outfile,
|
|
73
|
+
write: true,
|
|
74
|
+
bundle: true,
|
|
75
|
+
format: "esm",
|
|
76
|
+
sourcemap: false,
|
|
77
|
+
treeShaking: true,
|
|
78
|
+
});
|
|
79
|
+
const code = yield* fs.readFileString(outfile);
|
|
80
|
+
return {
|
|
81
|
+
code,
|
|
82
|
+
hash: yield* sha256(code),
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const prepareMetadata = Effect.fnUntraced(function* (props: WorkerProps) {
|
|
87
|
+
const metadata: Workers.ScriptUpdateParams.Metadata = {
|
|
88
|
+
assets: undefined,
|
|
89
|
+
bindings: [],
|
|
90
|
+
body_part: undefined,
|
|
91
|
+
compatibility_date: props.compatibility?.date,
|
|
92
|
+
compatibility_flags: props.compatibility?.flags,
|
|
93
|
+
keep_assets: undefined,
|
|
94
|
+
keep_bindings: undefined,
|
|
95
|
+
limits: props.limits,
|
|
96
|
+
logpush: props.logpush,
|
|
97
|
+
main_module: "worker.js",
|
|
98
|
+
migrations: undefined,
|
|
99
|
+
observability: props.observability ?? {
|
|
100
|
+
enabled: true,
|
|
101
|
+
logs: {
|
|
102
|
+
enabled: true,
|
|
103
|
+
invocation_logs: true,
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
placement: props.placement,
|
|
107
|
+
tags: props.tags,
|
|
108
|
+
tail_consumers: undefined,
|
|
109
|
+
usage_model: undefined,
|
|
110
|
+
};
|
|
111
|
+
return metadata;
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const putWorker = Effect.fnUntraced(function* (
|
|
115
|
+
id: string,
|
|
116
|
+
news: WorkerProps,
|
|
117
|
+
bindings: Worker["binding"][],
|
|
118
|
+
olds: WorkerProps | undefined,
|
|
119
|
+
output: WorkerAttr<WorkerProps> | undefined,
|
|
120
|
+
session: ScopedPlanStatusSession,
|
|
121
|
+
) {
|
|
122
|
+
const name = createWorkerName(id, news);
|
|
123
|
+
const [assets, bundle, metadata] = yield* Effect.all([
|
|
124
|
+
prepareAssets(news.assets),
|
|
125
|
+
prepareBundle(id, news.main),
|
|
126
|
+
prepareMetadata(news),
|
|
127
|
+
]).pipe(Effect.orDie);
|
|
128
|
+
metadata.bindings = bindings.flatMap((binding) => binding.bindings);
|
|
129
|
+
if (assets) {
|
|
130
|
+
if (output?.hash.assets !== assets.hash) {
|
|
131
|
+
const { jwt } = yield* upload(accountId, name, assets, session);
|
|
132
|
+
metadata.assets = {
|
|
133
|
+
jwt,
|
|
134
|
+
config: assets.config,
|
|
135
|
+
};
|
|
136
|
+
} else {
|
|
137
|
+
metadata.assets = {
|
|
138
|
+
config: assets.config,
|
|
139
|
+
};
|
|
140
|
+
metadata.keep_assets = true;
|
|
141
|
+
}
|
|
142
|
+
metadata.bindings.push({
|
|
143
|
+
type: "assets",
|
|
144
|
+
name: "ASSETS",
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
yield* session.note("Uploading worker...");
|
|
148
|
+
const worker = yield* api.workers.scripts.update(name, {
|
|
149
|
+
account_id: accountId,
|
|
150
|
+
metadata: metadata,
|
|
151
|
+
files: [
|
|
152
|
+
new File([bundle.code], "worker.js", {
|
|
153
|
+
type: "application/javascript+module",
|
|
154
|
+
}),
|
|
155
|
+
],
|
|
156
|
+
});
|
|
157
|
+
if (!olds || news.subdomain?.enabled !== olds.subdomain?.enabled) {
|
|
158
|
+
const enable = news.subdomain?.enabled !== false;
|
|
159
|
+
yield* session.note(
|
|
160
|
+
`${enable ? "Enabling" : "Disabling"} workers.dev subdomain...`,
|
|
161
|
+
);
|
|
162
|
+
yield* setWorkerSubdomain(name, enable);
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
id: worker.id,
|
|
166
|
+
name,
|
|
167
|
+
logpush: worker.logpush,
|
|
168
|
+
observability: metadata.observability,
|
|
169
|
+
subdomain: news.subdomain ?? {
|
|
170
|
+
enabled: true,
|
|
171
|
+
previews_enabled: true,
|
|
172
|
+
},
|
|
173
|
+
url:
|
|
174
|
+
news.subdomain?.enabled !== false
|
|
175
|
+
? `https://${name}.${yield* getAccountSubdomain(accountId)}.workers.dev`
|
|
176
|
+
: undefined,
|
|
177
|
+
tags: metadata.tags,
|
|
178
|
+
accountId,
|
|
179
|
+
hash: {
|
|
180
|
+
assets: assets?.hash,
|
|
181
|
+
bundle: bundle.hash,
|
|
182
|
+
},
|
|
183
|
+
} as WorkerAttr<WorkerProps>;
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
diff: Effect.fnUntraced(function* ({ id, olds, news, output }) {
|
|
188
|
+
if (output.accountId !== accountId) {
|
|
189
|
+
return { action: "replace" };
|
|
190
|
+
}
|
|
191
|
+
const workerName = createWorkerName(id, news);
|
|
192
|
+
if (workerName !== output.name) {
|
|
193
|
+
return { action: "replace" };
|
|
194
|
+
}
|
|
195
|
+
const [assets, bundle] = yield* Effect.all([
|
|
196
|
+
prepareAssets(news.assets),
|
|
197
|
+
prepareBundle(id, news.main),
|
|
198
|
+
]).pipe(Effect.orDie);
|
|
199
|
+
if (
|
|
200
|
+
assets?.hash !== output.hash.assets ||
|
|
201
|
+
bundle.hash !== output.hash.bundle
|
|
202
|
+
) {
|
|
203
|
+
return { action: "update" };
|
|
204
|
+
}
|
|
205
|
+
}),
|
|
206
|
+
create: Effect.fnUntraced(function* ({ id, news, bindings, session }) {
|
|
207
|
+
const name = createWorkerName(id, news);
|
|
208
|
+
const existing = yield* api.workers.beta.workers
|
|
209
|
+
.get(name, {
|
|
210
|
+
account_id: accountId,
|
|
211
|
+
})
|
|
212
|
+
.pipe(Effect.catchTag("NotFound", () => Effect.void));
|
|
213
|
+
if (existing) {
|
|
214
|
+
return yield* Effect.fail(
|
|
215
|
+
new Error(`Worker "${name}" already exists`),
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
return yield* putWorker(
|
|
219
|
+
id,
|
|
220
|
+
news,
|
|
221
|
+
bindings,
|
|
222
|
+
undefined,
|
|
223
|
+
undefined,
|
|
224
|
+
session,
|
|
225
|
+
);
|
|
226
|
+
}),
|
|
227
|
+
update: Effect.fnUntraced(function* ({
|
|
228
|
+
id,
|
|
229
|
+
olds,
|
|
230
|
+
news,
|
|
231
|
+
output,
|
|
232
|
+
bindings,
|
|
233
|
+
session,
|
|
234
|
+
}) {
|
|
235
|
+
return yield* putWorker(id, news, bindings, olds, output, session);
|
|
236
|
+
}),
|
|
237
|
+
delete: Effect.fnUntraced(function* ({ output }) {
|
|
238
|
+
yield* api.workers.scripts
|
|
239
|
+
.delete(output.id, {
|
|
240
|
+
account_id: output.accountId,
|
|
241
|
+
})
|
|
242
|
+
.pipe(Effect.catchTag("NotFound", () => Effect.void));
|
|
243
|
+
}),
|
|
244
|
+
};
|
|
245
|
+
}),
|
|
246
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as types from "@cloudflare/workers-types";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Worker from "./worker.ts";
|
|
4
|
+
|
|
5
|
+
export const serve =
|
|
6
|
+
<const ID extends string, Req>(
|
|
7
|
+
id: ID,
|
|
8
|
+
{
|
|
9
|
+
fetch,
|
|
10
|
+
}: {
|
|
11
|
+
fetch: (
|
|
12
|
+
request: Request,
|
|
13
|
+
env: unknown,
|
|
14
|
+
ctx: types.ExecutionContext,
|
|
15
|
+
) => Effect.Effect<Response, never, Req>;
|
|
16
|
+
},
|
|
17
|
+
) =>
|
|
18
|
+
<const Props extends Worker.WorkerProps<Req>>(props: Props) =>
|
|
19
|
+
Worker.Worker(id, { handle: fetch })(props);
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { Workers } from "cloudflare/resources";
|
|
2
|
+
import { Runtime, type RuntimeProps } from "../../runtime.ts";
|
|
3
|
+
import type * as Assets from "./assets.fetch.ts";
|
|
4
|
+
|
|
5
|
+
export const WorkerType = "Cloudflare.Worker" as const;
|
|
6
|
+
export type WorkerType = typeof WorkerType;
|
|
7
|
+
|
|
8
|
+
export type WorkerProps<Req = any> = RuntimeProps<
|
|
9
|
+
Worker,
|
|
10
|
+
Exclude<Req, Assets.Fetch>
|
|
11
|
+
> & {
|
|
12
|
+
name?: string;
|
|
13
|
+
logpush?: boolean;
|
|
14
|
+
observability?: Worker.Observability;
|
|
15
|
+
subdomain?: Worker.Subdomain;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
main: string;
|
|
18
|
+
compatibility?: {
|
|
19
|
+
date?: string;
|
|
20
|
+
flags?: string[];
|
|
21
|
+
};
|
|
22
|
+
limits?: Worker.Limits;
|
|
23
|
+
placement?: Worker.Placement;
|
|
24
|
+
} & (Extract<Req, Assets.Fetch> extends never
|
|
25
|
+
? {
|
|
26
|
+
assets?: string | Worker.AssetsProps;
|
|
27
|
+
}
|
|
28
|
+
: {
|
|
29
|
+
assets: string | Worker.AssetsProps;
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export type WorkerAttr<Props extends WorkerProps> = {
|
|
33
|
+
id: string;
|
|
34
|
+
name: Props["name"] extends string ? Props["name"] : string;
|
|
35
|
+
logpush: Props["logpush"] extends boolean ? Props["logpush"] : boolean;
|
|
36
|
+
observability: Props["observability"] extends Worker.Observability
|
|
37
|
+
? Props["observability"]
|
|
38
|
+
: {
|
|
39
|
+
// whatever cloudflare's (or our, probably ours) default is
|
|
40
|
+
};
|
|
41
|
+
url: Props["subdomain"] extends { enabled: false } ? undefined : string;
|
|
42
|
+
subdomain: Props["subdomain"] extends Worker.Subdomain
|
|
43
|
+
? Props["subdomain"]
|
|
44
|
+
: { enabled: true; previews_enabled: true };
|
|
45
|
+
tags: Props["tags"] extends string[] ? Props["tags"] : string[];
|
|
46
|
+
accountId: string;
|
|
47
|
+
hash: { assets: string | undefined; bundle: string };
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export interface Worker extends Runtime<WorkerType> {
|
|
51
|
+
props: WorkerProps;
|
|
52
|
+
attr: WorkerAttr<Extract<this["props"], WorkerProps>>;
|
|
53
|
+
binding: {
|
|
54
|
+
bindings: Worker.Binding[];
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const Worker = Runtime(WorkerType)<Worker>();
|
|
59
|
+
|
|
60
|
+
export declare namespace Worker {
|
|
61
|
+
export type Observability = Workers.ScriptUpdateParams.Metadata.Observability;
|
|
62
|
+
export type Subdomain = Workers.Beta.Worker.Subdomain;
|
|
63
|
+
export type Binding = NonNullable<
|
|
64
|
+
Workers.Beta.Workers.VersionCreateParams["bindings"]
|
|
65
|
+
>[number];
|
|
66
|
+
export type Limits = Workers.Beta.Workers.Version.Limits;
|
|
67
|
+
export type Placement = Workers.Beta.Workers.Version.Placement;
|
|
68
|
+
export type Assets = Workers.Beta.Workers.Version.Assets;
|
|
69
|
+
export type AssetsConfig = Workers.Beta.Workers.Version.Assets.Config;
|
|
70
|
+
export type Module = Workers.Beta.Workers.Version.Module;
|
|
71
|
+
|
|
72
|
+
export interface AssetsProps {
|
|
73
|
+
directory: string;
|
|
74
|
+
config?: AssetsConfig;
|
|
75
|
+
}
|
|
76
|
+
}
|
package/src/destroy.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { App } from "./app.ts";
|
|
1
|
+
import { apply } from "./apply.ts";
|
|
3
2
|
|
|
4
|
-
export
|
|
3
|
+
export const destroy = () =>
|
|
4
|
+
apply({
|
|
5
|
+
phase: "destroy",
|
|
6
|
+
resources: [],
|
|
7
|
+
});
|
package/src/dot-alchemy.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as FileSystem from "@effect/platform/FileSystem";
|
|
2
|
+
import * as Path from "@effect/platform/Path";
|
|
2
3
|
import * as Context from "effect/Context";
|
|
3
4
|
import * as Effect from "effect/Effect";
|
|
4
5
|
import * as Layer from "effect/Layer";
|
|
5
|
-
import path from "node:path";
|
|
6
6
|
|
|
7
7
|
export class DotAlchemy extends Context.Tag(".alchemy")<DotAlchemy, string>() {}
|
|
8
8
|
|
|
@@ -10,6 +10,7 @@ export const dotAlchemy = Layer.effect(
|
|
|
10
10
|
DotAlchemy,
|
|
11
11
|
Effect.gen(function* () {
|
|
12
12
|
const fs = yield* FileSystem.FileSystem;
|
|
13
|
+
const path = yield* Path.Path;
|
|
13
14
|
const dir = path.join(process.cwd(), ".alchemy");
|
|
14
15
|
yield* fs.makeDirectory(dir, { recursive: true });
|
|
15
16
|
return dir;
|
package/src/esbuild.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import * as Data from "effect/Data";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Layer from "effect/Layer";
|
|
5
|
+
import * as Queue from "effect/Queue";
|
|
6
|
+
import type * as Scope from "effect/Scope";
|
|
7
|
+
import type esbuild from "esbuild";
|
|
8
|
+
|
|
9
|
+
export class ESBuild extends Context.Tag("ESBuild")<
|
|
10
|
+
ESBuild,
|
|
11
|
+
{
|
|
12
|
+
readonly build: <T extends esbuild.BuildOptions>(
|
|
13
|
+
options: esbuild.SameShape<esbuild.BuildOptions, T>,
|
|
14
|
+
) => Effect.Effect<esbuild.BuildResult<T>, ESBuildError>;
|
|
15
|
+
readonly context: <T extends esbuild.BuildOptions>(
|
|
16
|
+
options: esbuild.SameShape<esbuild.BuildOptions, T>,
|
|
17
|
+
) => Effect.Effect<
|
|
18
|
+
{
|
|
19
|
+
queue: Queue.Queue<esbuild.BuildResult<T>>;
|
|
20
|
+
rebuild: () => Effect.Effect<
|
|
21
|
+
esbuild.BuildResult<T>,
|
|
22
|
+
ESBuildError,
|
|
23
|
+
never
|
|
24
|
+
>;
|
|
25
|
+
},
|
|
26
|
+
ESBuildError,
|
|
27
|
+
Scope.Scope
|
|
28
|
+
>;
|
|
29
|
+
}
|
|
30
|
+
>() {}
|
|
31
|
+
|
|
32
|
+
export const layer = () =>
|
|
33
|
+
Layer.effect(
|
|
34
|
+
ESBuild,
|
|
35
|
+
Effect.gen(function* () {
|
|
36
|
+
const esbuild = yield* Effect.promise(() => import("esbuild"));
|
|
37
|
+
return ESBuild.of({
|
|
38
|
+
build: Effect.fnUntraced(function* (options) {
|
|
39
|
+
return yield* Effect.tryPromise({
|
|
40
|
+
try: () => esbuild.build(options),
|
|
41
|
+
catch: ESBuildError.map,
|
|
42
|
+
});
|
|
43
|
+
}),
|
|
44
|
+
context: Effect.fnUntraced(function* (options) {
|
|
45
|
+
const queue = yield* Queue.unbounded<esbuild.BuildResult>();
|
|
46
|
+
const context = yield* Effect.tryPromise({
|
|
47
|
+
try: async () =>
|
|
48
|
+
esbuild.context({
|
|
49
|
+
...options,
|
|
50
|
+
plugins: [
|
|
51
|
+
...(options.plugins ?? []),
|
|
52
|
+
{
|
|
53
|
+
name: "queue",
|
|
54
|
+
setup: (build) => {
|
|
55
|
+
build.onEnd((result) => {
|
|
56
|
+
Queue.unsafeOffer(queue, result as esbuild.BuildResult);
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
}),
|
|
62
|
+
catch: ESBuildError.map,
|
|
63
|
+
});
|
|
64
|
+
yield* Effect.addFinalizer(() =>
|
|
65
|
+
Effect.promise(() => context.dispose()),
|
|
66
|
+
);
|
|
67
|
+
yield* Effect.tryPromise({
|
|
68
|
+
try: () => context.watch(),
|
|
69
|
+
catch: ESBuildError.map,
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
queue,
|
|
73
|
+
rebuild: Effect.fnUntraced(function* () {
|
|
74
|
+
return yield* Effect.tryPromise({
|
|
75
|
+
try: (): Promise<esbuild.BuildResult> => context.rebuild(),
|
|
76
|
+
catch: ESBuildError.map,
|
|
77
|
+
});
|
|
78
|
+
}),
|
|
79
|
+
};
|
|
80
|
+
}),
|
|
81
|
+
});
|
|
82
|
+
}),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
export class ESBuildError extends Data.TaggedError("ESBuildError")<{
|
|
86
|
+
message: string;
|
|
87
|
+
errors: esbuild.Message[];
|
|
88
|
+
messages: esbuild.Message[];
|
|
89
|
+
}> {
|
|
90
|
+
static map(error: unknown): ESBuildError {
|
|
91
|
+
const cause = error as esbuild.BuildFailure;
|
|
92
|
+
return new ESBuildError({
|
|
93
|
+
message: cause.message,
|
|
94
|
+
errors: cause.errors,
|
|
95
|
+
messages: cause.warnings,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -14,8 +14,9 @@ export * from "./provider.ts";
|
|
|
14
14
|
export * from "./resource.ts";
|
|
15
15
|
export * from "./runtime.ts";
|
|
16
16
|
export * from "./service.ts";
|
|
17
|
-
export *
|
|
17
|
+
export * from "./type.ts";
|
|
18
18
|
|
|
19
|
-
export * as AWS from "./aws/index.ts";
|
|
20
|
-
export * as CLI from "./cli/index.ts";
|
|
21
|
-
export * as Cloudflare from "./cloudflare/index.ts";
|
|
19
|
+
// export * as AWS from "./aws/index.ts";
|
|
20
|
+
// export * as CLI from "./cli/index.ts";
|
|
21
|
+
// export * as Cloudflare from "./cloudflare/index.ts";
|
|
22
|
+
export * as State from "./state.ts";
|