alchemy-effect 0.0.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/README.md +179 -0
- package/bin/alchemy-effect.js +15 -0
- package/bin/alchemy-effect.js.map +1 -0
- package/bin/alchemy-effect.ts +10 -0
- 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 +18 -0
- package/lib/aws/account.d.ts.map +1 -0
- package/lib/aws/account.js +18 -0
- package/lib/aws/account.js.map +1 -0
- package/lib/aws/arn.d.ts +2 -0
- package/lib/aws/arn.d.ts.map +1 -0
- package/lib/aws/arn.js +1 -0
- package/lib/aws/arn.js.map +1 -0
- package/lib/aws/assets.d.ts +8 -0
- package/lib/aws/assets.d.ts.map +1 -0
- package/lib/aws/assets.js +4 -0
- package/lib/aws/assets.js.map +1 -0
- package/lib/aws/bundle.d.ts +4 -0
- package/lib/aws/bundle.d.ts.map +1 -0
- package/lib/aws/bundle.js +4 -0
- package/lib/aws/bundle.js.map +1 -0
- package/lib/aws/client.d.ts +8 -0
- package/lib/aws/client.d.ts.map +1 -0
- package/lib/aws/client.js +28 -0
- package/lib/aws/client.js.map +1 -0
- package/lib/aws/credentials.d.ts +146 -0
- package/lib/aws/credentials.d.ts.map +1 -0
- package/lib/aws/credentials.js +170 -0
- package/lib/aws/credentials.js.map +1 -0
- 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/dynamodb/client.js +11 -0
- 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/iam.d.ts +23 -0
- package/lib/aws/iam.d.ts.map +1 -0
- package/lib/aws/iam.js +7 -0
- package/lib/aws/iam.js.map +1 -0
- package/lib/aws/index.d.ts +32 -0
- package/lib/aws/index.d.ts.map +1 -0
- package/lib/aws/index.js +23 -0
- package/lib/aws/index.js.map +1 -0
- 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 +17 -0
- package/lib/aws/lambda/consume.d.ts.map +1 -0
- package/lib/aws/lambda/consume.js +30 -0
- package/lib/aws/lambda/consume.js.map +1 -0
- package/lib/aws/lambda/function.d.ts +41 -0
- package/lib/aws/lambda/function.d.ts.map +1 -0
- package/lib/aws/lambda/function.handler.d.ts +7 -0
- package/lib/aws/lambda/function.handler.d.ts.map +1 -0
- package/lib/aws/lambda/function.handler.js +8 -0
- package/lib/aws/lambda/function.handler.js.map +1 -0
- package/lib/aws/lambda/function.invoke.d.ts +10 -0
- package/lib/aws/lambda/function.invoke.d.ts.map +1 -0
- package/lib/aws/lambda/function.invoke.js +31 -0
- package/lib/aws/lambda/function.invoke.js.map +1 -0
- package/lib/aws/lambda/function.js +3 -0
- package/lib/aws/lambda/function.js.map +1 -0
- package/lib/aws/lambda/function.provider.d.ts +9 -0
- package/lib/aws/lambda/function.provider.d.ts.map +1 -0
- package/lib/aws/lambda/function.provider.js +465 -0
- package/lib/aws/lambda/function.provider.js.map +1 -0
- package/lib/aws/lambda/index.d.ts +8 -0
- package/lib/aws/lambda/index.d.ts.map +1 -0
- package/lib/aws/lambda/index.js +9 -0
- package/lib/aws/lambda/index.js.map +1 -0
- package/lib/aws/lambda/serve.d.ts +14 -0
- package/lib/aws/lambda/serve.d.ts.map +1 -0
- package/lib/aws/lambda/serve.js +7 -0
- package/lib/aws/lambda/serve.js.map +1 -0
- package/lib/aws/parse-ini.d.ts +4 -0
- package/lib/aws/parse-ini.d.ts.map +1 -0
- package/lib/aws/parse-ini.js +67 -0
- package/lib/aws/parse-ini.js.map +1 -0
- package/lib/aws/profile.d.ts +6 -0
- package/lib/aws/profile.d.ts.map +1 -0
- package/lib/aws/profile.js +4 -0
- package/lib/aws/profile.js.map +1 -0
- package/lib/aws/region.d.ts +19 -0
- package/lib/aws/region.d.ts.map +1 -0
- package/lib/aws/region.js +21 -0
- package/lib/aws/region.js.map +1 -0
- package/lib/aws/s3.d.ts +8 -0
- package/lib/aws/s3.d.ts.map +1 -0
- package/lib/aws/s3.js +7 -0
- package/lib/aws/s3.js.map +1 -0
- 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 +7 -0
- package/lib/aws/sqs/index.d.ts.map +1 -0
- package/lib/aws/sqs/index.js +7 -0
- package/lib/aws/sqs/index.js.map +1 -0
- package/lib/aws/sqs/queue.consume.d.ts +12 -0
- package/lib/aws/sqs/queue.consume.d.ts.map +1 -0
- package/lib/aws/sqs/queue.consume.js +3 -0
- package/lib/aws/sqs/queue.consume.js.map +1 -0
- package/lib/aws/sqs/queue.d.ts +79 -0
- package/lib/aws/sqs/queue.d.ts.map +1 -0
- 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.js +3 -0
- package/lib/aws/sqs/queue.js.map +1 -0
- package/lib/aws/sqs/queue.provider.d.ts +7 -0
- package/lib/aws/sqs/queue.provider.d.ts.map +1 -0
- package/lib/aws/sqs/queue.provider.js +79 -0
- package/lib/aws/sqs/queue.provider.js.map +1 -0
- package/lib/aws/sqs/queue.send-message.d.ts +11 -0
- package/lib/aws/sqs/queue.send-message.d.ts.map +1 -0
- package/lib/aws/sqs/queue.send-message.js +32 -0
- package/lib/aws/sqs/queue.send-message.js.map +1 -0
- package/lib/aws/sts.d.ts +8 -0
- package/lib/aws/sts.d.ts.map +1 -0
- package/lib/aws/sts.js +7 -0
- package/lib/aws/sts.js.map +1 -0
- package/lib/aws/zip.d.ts +3 -0
- package/lib/aws/zip.d.ts.map +1 -0
- package/lib/aws/zip.js +12 -0
- package/lib/aws/zip.js.map +1 -0
- 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/approve.d.ts +4 -0
- package/lib/cli/approve.d.ts.map +1 -0
- package/lib/cli/approve.js +18 -0
- package/lib/cli/approve.js.map +1 -0
- package/lib/cli/clack.d.ts +14 -0
- package/lib/cli/clack.d.ts.map +1 -0
- package/lib/cli/clack.js +12 -0
- package/lib/cli/clack.js.map +1 -0
- package/lib/cli/components/ApprovePlan.d.ts +8 -0
- package/lib/cli/components/ApprovePlan.d.ts.map +1 -0
- package/lib/cli/components/ApprovePlan.js +30 -0
- package/lib/cli/components/ApprovePlan.js.map +1 -0
- package/lib/cli/components/Plan.d.ts +7 -0
- package/lib/cli/components/Plan.d.ts.map +1 -0
- package/lib/cli/components/Plan.js +100 -0
- package/lib/cli/components/Plan.js.map +1 -0
- package/lib/cli/components/PlanProgress.d.ts +9 -0
- package/lib/cli/components/PlanProgress.d.ts.map +1 -0
- package/lib/cli/components/PlanProgress.js +166 -0
- package/lib/cli/components/PlanProgress.js.map +1 -0
- package/lib/cli/index.d.ts +449 -0
- package/lib/cli/index.d.ts.map +1 -0
- package/lib/cli/index.js +39912 -0
- package/lib/cli/index.js.map +1 -0
- package/lib/cli/main.d.ts +2 -0
- package/lib/cli/main.d.ts.map +1 -0
- package/lib/cli/main.js +1 -0
- package/lib/cli/main.js.map +1 -0
- package/lib/cli/plan.d.ts +13 -0
- package/lib/cli/plan.d.ts.map +1 -0
- package/lib/cli/plan.js +1 -0
- package/lib/cli/plan.js.map +1 -0
- package/lib/cli/progress.d.ts +7 -0
- package/lib/cli/progress.d.ts.map +1 -0
- package/lib/cli/progress.js +30 -0
- package/lib/cli/progress.js.map +1 -0
- package/lib/cli/spinner.d.ts +2 -0
- package/lib/cli/spinner.d.ts.map +1 -0
- package/lib/cli/spinner.js +13 -0
- package/lib/cli/spinner.js.map +1 -0
- package/lib/cloudflare/api.d.ts +36 -0
- package/lib/cloudflare/api.d.ts.map +1 -0
- package/lib/cloudflare/api.js +99 -0
- package/lib/cloudflare/api.js.map +1 -0
- 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 +6 -0
- package/lib/cloudflare/index.d.ts.map +1 -0
- package/lib/cloudflare/index.js +5 -0
- package/lib/cloudflare/index.js.map +1 -0
- 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 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- 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 +115 -3
- package/src/app.ts +8 -7
- package/src/apply.ts +251 -93
- package/src/aws/account.ts +37 -0
- package/src/aws/arn.ts +1 -0
- package/src/aws/assets.ts +8 -0
- package/src/aws/bundle.ts +5 -0
- package/src/aws/client.ts +47 -0
- package/src/aws/credentials.ts +409 -0
- package/src/aws/dynamodb/attribute-value.ts +240 -0
- package/src/aws/dynamodb/client.ts +20 -0
- 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/iam.ts +30 -0
- package/src/aws/index.ts +54 -0
- package/src/aws/lambda/client.ts +14 -0
- package/src/aws/lambda/consume.ts +63 -0
- package/src/aws/lambda/function.handler.ts +30 -0
- package/src/aws/lambda/function.invoke.ts +40 -0
- package/src/aws/lambda/function.provider.ts +655 -0
- package/src/aws/lambda/function.ts +45 -0
- package/src/aws/lambda/index.ts +9 -0
- package/src/aws/lambda/serve.ts +29 -0
- package/src/aws/parse-ini.ts +80 -0
- package/src/aws/profile.ts +6 -0
- package/src/aws/region.ts +37 -0
- package/src/aws/s3.ts +10 -0
- package/src/aws/sqs/client.ts +20 -0
- package/src/aws/sqs/index.ts +6 -0
- package/src/aws/sqs/queue.consume.ts +13 -0
- package/src/aws/sqs/queue.event-source.ts +253 -0
- package/src/aws/sqs/queue.provider.ts +94 -0
- package/src/aws/sqs/queue.send-message.ts +51 -0
- package/src/aws/sqs/queue.ts +86 -0
- package/src/aws/sts.ts +13 -0
- package/src/aws/zip.ts +17 -0
- package/src/binding.ts +121 -25
- package/src/capability.ts +44 -0
- package/src/cli/approve.tsx +30 -0
- package/src/cli/clack.ts +22 -0
- package/src/cli/components/ApprovePlan.tsx +44 -0
- package/src/cli/components/Plan.tsx +154 -0
- package/src/cli/components/PlanProgress.tsx +206 -0
- package/src/cli/index.ts +6 -0
- package/src/cli/main.ts +0 -0
- package/src/cli/plan.ts +16 -0
- package/src/cli/progress.tsx +46 -0
- package/src/cli/spinner.ts +14 -0
- package/src/cloudflare/api.ts +152 -0
- package/src/cloudflare/context.ts +49 -0
- package/src/cloudflare/index.ts +6 -0
- 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 -0
- 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/src/provider.ts
CHANGED
|
@@ -44,8 +44,8 @@ export interface ProviderService<Res extends Resource = Resource> {
|
|
|
44
44
|
olds: Res["props"];
|
|
45
45
|
news: Res["props"];
|
|
46
46
|
output: Res["attr"];
|
|
47
|
-
}): Effect.Effect<Diff, never, never>;
|
|
48
|
-
|
|
47
|
+
}): Effect.Effect<Diff | void, never, never>;
|
|
48
|
+
precreate?(input: {
|
|
49
49
|
id: string;
|
|
50
50
|
news: Res["props"];
|
|
51
51
|
session: ScopedPlanStatusSession;
|
package/src/resource.ts
CHANGED
|
@@ -37,13 +37,14 @@ export const Resource = <Ctor extends (id: string, props: any) => Resource>(
|
|
|
37
37
|
type: ReturnType<Ctor>["type"],
|
|
38
38
|
) => {
|
|
39
39
|
const Tag = Context.Tag(type)();
|
|
40
|
-
const provider = {
|
|
41
|
-
tag: Tag,
|
|
40
|
+
const provider: ResourceTags<ReturnType<Ctor>> = {
|
|
41
|
+
tag: Tag as any,
|
|
42
42
|
effect: <Err, Req>(
|
|
43
43
|
eff: Effect<ProviderService<ReturnType<Ctor>>, Err, Req>,
|
|
44
44
|
) => Layer.effect(Tag, eff),
|
|
45
45
|
succeed: (service: ProviderService<ReturnType<Ctor>>) =>
|
|
46
46
|
Layer.succeed(Tag, service),
|
|
47
|
+
of: (service) => service,
|
|
47
48
|
};
|
|
48
49
|
return Object.assign(
|
|
49
50
|
function (id: string, props: any) {
|
package/src/runtime.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare namespace Runtime {
|
|
|
38
38
|
export type AnyRuntime = Runtime<string>;
|
|
39
39
|
|
|
40
40
|
export interface RuntimeProps<Run extends Runtime, Req> {
|
|
41
|
-
bindings: Policy<Run, Extract<Req, Capability
|
|
41
|
+
bindings: Policy<Run, Extract<Req, Capability>, unknown>;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export interface Runtime<
|
package/src/schema.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as S from "effect/Schema";
|
|
2
|
+
import type { AST } from "effect/SchemaAST";
|
|
3
|
+
|
|
4
|
+
const Description = Symbol.for("effect/annotation/Description");
|
|
5
|
+
|
|
6
|
+
export const isTag = <T extends S.Schema<any>>(tag: T["ast"]["_tag"]) =>
|
|
7
|
+
((schema) =>
|
|
8
|
+
S.isSchema(schema)
|
|
9
|
+
? S.encodedSchema(schema).ast._tag === tag
|
|
10
|
+
: schema._tag === tag) as {
|
|
11
|
+
(schema: S.Schema<any>): schema is T;
|
|
12
|
+
(schema: AST): boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const hasGenericAnnotation =
|
|
16
|
+
(type: string) => (ast: AST | undefined) => {
|
|
17
|
+
const description: string | undefined = ast?.annotations?.[
|
|
18
|
+
Description
|
|
19
|
+
] as string;
|
|
20
|
+
return (
|
|
21
|
+
description &&
|
|
22
|
+
description?.startsWith(`${type}<`) &&
|
|
23
|
+
description?.endsWith(">")
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const isNullishSchema = (schema: S.Schema<any>) =>
|
|
28
|
+
isNullSchema(schema) || isUndefinedSchema(schema);
|
|
29
|
+
export const isNullSchema = (schema: S.Schema<any>) =>
|
|
30
|
+
schema.ast._tag === "Literal" && schema.ast.literal === null;
|
|
31
|
+
export const isUndefinedSchema = isTag("UndefinedKeyword");
|
|
32
|
+
export const isBooleanSchema = isTag<S.Schema<boolean>>("BooleanKeyword");
|
|
33
|
+
export const isStringSchema = isTag<S.Schema<string>>("StringKeyword");
|
|
34
|
+
export const isNumberSchema = isTag<S.Schema<number>>("NumberKeyword");
|
|
35
|
+
|
|
36
|
+
export const hasMapAnnotation = hasGenericAnnotation("Map");
|
|
37
|
+
|
|
38
|
+
export const isRecordLikeSchema = (schema: S.Schema<any>) =>
|
|
39
|
+
isMapSchema(schema) ||
|
|
40
|
+
isRecordSchema(schema) ||
|
|
41
|
+
isStructSchema(schema) ||
|
|
42
|
+
isClassSchema(schema) ||
|
|
43
|
+
false;
|
|
44
|
+
|
|
45
|
+
export const isMapSchema = (schema: S.Schema<any>) =>
|
|
46
|
+
hasMapAnnotation(schema.ast) ||
|
|
47
|
+
// @ts-expect-error - ast.to?. is not narrowed, we don't care
|
|
48
|
+
hasMapAnnotation(schema.ast.to) ||
|
|
49
|
+
false;
|
|
50
|
+
|
|
51
|
+
export const isClassSchema = (schema: S.Schema<any>) => {
|
|
52
|
+
const encoded = S.encodedSchema(schema);
|
|
53
|
+
return (
|
|
54
|
+
encoded.ast._tag === "TypeLiteral" &&
|
|
55
|
+
encoded.ast.propertySignatures !== undefined
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const isStructSchema = (schema: S.Schema<any>) => {
|
|
60
|
+
return (
|
|
61
|
+
schema.ast._tag === "TypeLiteral" &&
|
|
62
|
+
schema.ast.propertySignatures !== undefined
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const isRecordSchema = (schema: S.Schema<any>) => {
|
|
67
|
+
const encoded = S.encodedSchema(schema);
|
|
68
|
+
return (
|
|
69
|
+
encoded.ast._tag === "TypeLiteral" &&
|
|
70
|
+
encoded.ast.indexSignatures?.[0] !== undefined
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const isListSchema = (schema: S.Schema<any>) => {
|
|
75
|
+
return (
|
|
76
|
+
hasListAnnotation(schema.ast) ||
|
|
77
|
+
(S.encodedSchema(schema).ast._tag === "TupleType" && !isMapSchema(schema))
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
export const hasListAnnotation = (ast: AST | undefined) => {
|
|
81
|
+
const description: string | undefined = ast?.annotations?.[
|
|
82
|
+
Description
|
|
83
|
+
] as string;
|
|
84
|
+
return (
|
|
85
|
+
description &&
|
|
86
|
+
description?.startsWith("List<") &&
|
|
87
|
+
description?.endsWith(">")
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const isSetSchema = (schema: S.Schema<any>) => {
|
|
92
|
+
return (
|
|
93
|
+
// @ts-expect-error - ast.to?. is not narrowed, we don't care
|
|
94
|
+
hasSetAnnotation(schema.ast) || hasSetAnnotation(schema.ast.to) || false
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const hasSetAnnotation = hasGenericAnnotation("Set");
|
|
99
|
+
|
|
100
|
+
export const getSetValueAST = (schema: S.Schema<any>): AST =>
|
|
101
|
+
// @ts-expect-error - ast.to?. is not narrowed, we don't care
|
|
102
|
+
isSetSchema(schema) && schema.ast.to?.typeParameters[0];
|
package/src/sha256.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
|
|
3
|
+
type Input = ArrayBuffer | Uint8Array | string;
|
|
4
|
+
|
|
5
|
+
export const sha256 = (input: Input) =>
|
|
6
|
+
Effect.promise(async () => {
|
|
7
|
+
const digest = await crypto.subtle.digest("SHA-256", toArrayBuffer(input));
|
|
8
|
+
const hashArray = Array.from(new Uint8Array(digest));
|
|
9
|
+
return hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const toArrayBuffer = (input: Input) => {
|
|
13
|
+
if (input instanceof ArrayBuffer) {
|
|
14
|
+
return input;
|
|
15
|
+
}
|
|
16
|
+
if (typeof input === "string") {
|
|
17
|
+
return new TextEncoder().encode(input);
|
|
18
|
+
}
|
|
19
|
+
return input.buffer.slice(
|
|
20
|
+
input.byteOffset,
|
|
21
|
+
input.byteOffset + input.byteLength,
|
|
22
|
+
) as ArrayBuffer;
|
|
23
|
+
};
|
package/src/state.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FileSystem } from "@effect/platform";
|
|
2
1
|
import type { PlatformError } from "@effect/platform/Error";
|
|
2
|
+
import * as FileSystem from "@effect/platform/FileSystem";
|
|
3
|
+
import * as Path from "@effect/platform/Path";
|
|
3
4
|
import * as Context from "effect/Context";
|
|
4
5
|
import * as Data from "effect/Data";
|
|
5
6
|
import * as Effect from "effect/Effect";
|
|
6
7
|
import * as Layer from "effect/Layer";
|
|
7
|
-
import path from "node:path";
|
|
8
8
|
import { App } from "./app.ts";
|
|
9
9
|
import type { BindNode } from "./plan.ts";
|
|
10
10
|
import { isResource } from "./resource.ts";
|
|
@@ -100,6 +100,7 @@ export const localFs = Layer.effect(
|
|
|
100
100
|
Effect.gen(function* () {
|
|
101
101
|
const app = yield* App;
|
|
102
102
|
const fs = yield* FileSystem.FileSystem;
|
|
103
|
+
const path = yield* Path.Path;
|
|
103
104
|
const dotAlchemy = path.join(process.cwd(), ".alchemy");
|
|
104
105
|
const stateDir = path.join(dotAlchemy, "state");
|
|
105
106
|
const appDir = path.join(stateDir, app.name);
|
package/src/tags.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { App } from "./app.ts";
|
|
3
|
+
|
|
4
|
+
export type Tags =
|
|
5
|
+
| Record<string, string>
|
|
6
|
+
| [string, string][]
|
|
7
|
+
| { Key: string; Value: string }[];
|
|
8
|
+
|
|
9
|
+
const normalizeTags = (tags: Tags) =>
|
|
10
|
+
Array.isArray(tags)
|
|
11
|
+
? Object.fromEntries(
|
|
12
|
+
tags.map((tag) =>
|
|
13
|
+
Array.isArray(tag) ? [tag[0], tag[1]] : [tag.Key, tag.Value],
|
|
14
|
+
),
|
|
15
|
+
)
|
|
16
|
+
: tags;
|
|
17
|
+
|
|
18
|
+
export const hasTags = (expectedTags: Tags, tags: Tags | undefined) => {
|
|
19
|
+
const actualTags = normalizeTags(tags ?? []);
|
|
20
|
+
return Object.entries(normalizeTags(expectedTags)).every(
|
|
21
|
+
([key, value]) => actualTags[key] === value,
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const createTagsList = (tags: Tags) =>
|
|
26
|
+
Object.entries(normalizeTags(tags)).map(([Key, Value]) => ({
|
|
27
|
+
Key,
|
|
28
|
+
Value,
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
export const createTagger = Effect.fn(function* () {
|
|
32
|
+
const app = yield* App;
|
|
33
|
+
return (id: string) => ({
|
|
34
|
+
"alchemy::app": app.name,
|
|
35
|
+
"alchemy::stage": app.stage,
|
|
36
|
+
"alchemy::id": id,
|
|
37
|
+
});
|
|
38
|
+
});
|
package/src/test.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { FetchHttpClient, FileSystem, HttpClient } from "@effect/platform";
|
|
2
|
+
import { NodeContext } from "@effect/platform-node";
|
|
3
|
+
import type * as Path from "@effect/platform/Path";
|
|
4
|
+
import { it } from "@effect/vitest";
|
|
5
|
+
import { LogLevel } from "effect";
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Layer from "effect/Layer";
|
|
8
|
+
import * as Logger from "effect/Logger";
|
|
9
|
+
import * as Scope from "effect/Scope";
|
|
10
|
+
import * as App from "./app.ts";
|
|
11
|
+
import { PlanStatusReporter } from "./apply.ts";
|
|
12
|
+
import { DotAlchemy, dotAlchemy } from "./dot-alchemy.ts";
|
|
13
|
+
import * as State from "./state.ts";
|
|
14
|
+
|
|
15
|
+
type Provided =
|
|
16
|
+
| Scope.Scope
|
|
17
|
+
| App.App
|
|
18
|
+
| State.State
|
|
19
|
+
| DotAlchemy
|
|
20
|
+
| HttpClient.HttpClient
|
|
21
|
+
| FileSystem.FileSystem
|
|
22
|
+
| Path.Path;
|
|
23
|
+
|
|
24
|
+
export function test(
|
|
25
|
+
name: string,
|
|
26
|
+
testCase: Effect.Effect<void, any, Provided>,
|
|
27
|
+
timeout: number = 120_000,
|
|
28
|
+
) {
|
|
29
|
+
const platform = Layer.mergeAll(
|
|
30
|
+
NodeContext.layer,
|
|
31
|
+
FetchHttpClient.layer,
|
|
32
|
+
Logger.pretty,
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const alchemy = Layer.provideMerge(
|
|
36
|
+
Layer.mergeAll(State.localFs, report),
|
|
37
|
+
Layer.mergeAll(
|
|
38
|
+
App.make({ name: name.replaceAll(/[^a-zA-Z0-9_]/g, "-"), stage: "test" }),
|
|
39
|
+
dotAlchemy,
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return it.scopedLive(
|
|
44
|
+
name,
|
|
45
|
+
() =>
|
|
46
|
+
testCase.pipe(
|
|
47
|
+
Effect.provide(Layer.provideMerge(alchemy, platform)),
|
|
48
|
+
Logger.withMinimumLogLevel(
|
|
49
|
+
process.env.DEBUG ? LogLevel.Debug : LogLevel.Info,
|
|
50
|
+
),
|
|
51
|
+
),
|
|
52
|
+
timeout,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const report = Layer.succeed(
|
|
57
|
+
PlanStatusReporter,
|
|
58
|
+
PlanStatusReporter.of({
|
|
59
|
+
start: Effect.fn(function* (plan) {
|
|
60
|
+
return {
|
|
61
|
+
done: () => Effect.void,
|
|
62
|
+
emit: (event) =>
|
|
63
|
+
Effect.log(
|
|
64
|
+
event.kind === "status-change"
|
|
65
|
+
? `${event.status} ${event.id}(${event.type})`
|
|
66
|
+
: event.message,
|
|
67
|
+
),
|
|
68
|
+
};
|
|
69
|
+
}),
|
|
70
|
+
}),
|
|
71
|
+
);
|
package/src/type.ts
ADDED