alchemy 0.1.18 → 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/alchemy.d.ts +67 -0
- package/lib/alchemy.js +40 -0
- package/lib/apply.d.ts +3 -20
- package/lib/apply.js +86 -82
- package/lib/aws/account-id.d.ts +0 -1
- package/lib/aws/account-id.js +0 -1
- package/lib/aws/bucket.d.ts +4 -7
- package/lib/aws/bucket.js +8 -12
- package/lib/aws/function.d.ts +4 -7
- package/lib/aws/function.js +9 -30
- package/lib/aws/index.d.ts +1 -1
- package/lib/aws/index.js +1 -1
- package/lib/aws/oidc/github-oidc-provider.d.ts +2 -6
- package/lib/aws/oidc/github-oidc-provider.js +10 -15
- package/lib/aws/oidc/index.d.ts +0 -1
- package/lib/aws/oidc/index.js +0 -1
- package/lib/aws/oidc/oidc-provider.d.ts +4 -6
- package/lib/aws/oidc/oidc-provider.js +9 -11
- package/lib/aws/policy-attachment.d.ts +9 -0
- package/lib/aws/policy-attachment.js +20 -0
- package/lib/aws/policy.d.ts +4 -16
- package/lib/aws/policy.js +9 -40
- package/lib/aws/queue.d.ts +4 -34
- package/lib/aws/queue.js +10 -20
- package/lib/aws/role.d.ts +4 -7
- package/lib/aws/role.js +17 -26
- package/lib/aws/ses.d.ts +4 -10
- package/lib/aws/ses.js +118 -131
- package/lib/aws/table.d.ts +4 -7
- package/lib/aws/table.js +8 -11
- package/lib/cloudflare/api.d.ts +0 -1
- package/lib/cloudflare/api.js +0 -1
- package/lib/cloudflare/asset-manifest.d.ts +0 -1
- package/lib/cloudflare/asset-manifest.js +0 -1
- package/lib/cloudflare/auth.d.ts +0 -1
- package/lib/cloudflare/auth.js +0 -1
- package/lib/cloudflare/bindings.d.ts +1 -1
- package/lib/cloudflare/bindings.js +3 -2
- package/lib/cloudflare/bound.d.ts +0 -1
- package/lib/cloudflare/bound.js +0 -1
- package/lib/cloudflare/bucket.d.ts +7 -15
- package/lib/cloudflare/bucket.js +12 -19
- package/lib/cloudflare/durable-object-namespace.d.ts +0 -3
- package/lib/cloudflare/durable-object-namespace.js +0 -4
- package/lib/cloudflare/generate-asset-manifest.d.ts +0 -1
- package/lib/cloudflare/generate-asset-manifest.js +1 -2
- package/lib/cloudflare/index.d.ts +0 -1
- package/lib/cloudflare/index.js +0 -1
- package/lib/cloudflare/kv-namespace.d.ts +6 -9
- package/lib/cloudflare/kv-namespace.js +16 -20
- package/lib/cloudflare/state.d.ts +0 -1
- package/lib/cloudflare/state.js +0 -1
- package/lib/cloudflare/static-site-router.d.ts +0 -1
- package/lib/cloudflare/static-site-router.js +0 -4
- package/lib/cloudflare/static-site.d.ts +5 -11
- package/lib/cloudflare/static-site.js +16 -28
- package/lib/cloudflare/types.d.ts +0 -1
- package/lib/cloudflare/types.js +0 -1
- package/lib/cloudflare/upload-asset-manifest.d.ts +0 -1
- package/lib/cloudflare/upload-asset-manifest.js +0 -1
- package/lib/cloudflare/worker-metadata.d.ts +0 -1
- package/lib/cloudflare/worker-metadata.js +0 -1
- package/lib/cloudflare/worker-migration.d.ts +0 -1
- package/lib/cloudflare/worker-migration.js +0 -1
- package/lib/cloudflare/worker.d.ts +8 -14
- package/lib/cloudflare/worker.js +37 -49
- package/lib/context.d.ts +58 -0
- package/lib/context.js +36 -0
- package/lib/destroy.d.ts +10 -13
- package/lib/destroy.js +104 -43
- package/lib/{esbuild.d.ts → esbuild/bundle.d.ts} +4 -18
- package/lib/{esbuild.js → esbuild/bundle.js} +10 -24
- package/lib/esbuild/index.d.ts +1 -0
- package/lib/esbuild/index.js +1 -0
- package/lib/fs/file.d.ts +13 -0
- package/lib/fs/file.js +20 -0
- package/lib/fs/folder.d.ts +10 -0
- package/lib/fs/folder.js +16 -0
- package/lib/fs/index.d.ts +2 -0
- package/lib/fs/index.js +2 -0
- package/lib/github/client.d.ts +0 -1
- package/lib/github/client.js +0 -1
- package/lib/github/index.d.ts +0 -1
- package/lib/github/index.js +0 -1
- package/lib/github/secret.d.ts +4 -6
- package/lib/github/secret.js +10 -12
- package/lib/index.d.ts +6 -10
- package/lib/index.js +5 -9
- package/lib/resource.d.ts +34 -62
- package/lib/resource.js +29 -270
- package/lib/scope.d.ts +35 -14
- package/lib/scope.js +78 -23
- package/lib/secret.d.ts +2 -7
- package/lib/secret.js +7 -20
- package/lib/state.d.ts +14 -10
- package/lib/state.js +15 -14
- package/lib/stripe/index.d.ts +0 -1
- package/lib/stripe/index.js +0 -1
- package/lib/stripe/price.d.ts +4 -5
- package/lib/stripe/price.js +10 -20
- package/lib/stripe/product.d.ts +4 -5
- package/lib/stripe/product.js +10 -20
- package/lib/stripe/webhook.d.ts +4 -6
- package/lib/stripe/webhook.js +12 -25
- package/lib/test/bun.d.ts +19 -0
- package/lib/test/bun.js +55 -0
- package/lib/{utils → util}/content-type.d.ts +0 -1
- package/lib/{utils → util}/content-type.js +0 -1
- package/lib/{encrypt.d.ts → util/encrypt.d.ts} +0 -1
- package/lib/{encrypt.js → util/encrypt.js} +0 -1
- package/lib/{error.d.ts → util/ignore.d.ts} +0 -1
- package/lib/{error.js → util/ignore.js} +0 -1
- package/lib/{utils → util}/retry.d.ts +0 -1
- package/lib/{utils → util}/retry.js +0 -1
- package/lib/util/serde.d.ts +3 -0
- package/lib/{serde.js → util/serde.js} +19 -10
- package/lib/util/slugify.d.ts +1 -0
- package/lib/util/slugify.js +3 -0
- package/package.json +5 -4
- package/src/alchemy.ts +120 -0
- package/src/apply.ts +109 -114
- package/src/aws/bucket.ts +11 -14
- package/src/aws/function.ts +13 -33
- package/src/aws/index.ts +1 -0
- package/src/aws/oidc/github-oidc-provider.ts +14 -19
- package/src/aws/oidc/oidc-provider.ts +19 -12
- package/src/aws/policy-attachment.ts +51 -0
- package/src/aws/policy.ts +15 -60
- package/src/aws/queue.ts +17 -21
- package/src/aws/role.ts +25 -28
- package/src/aws/ses.ts +150 -164
- package/src/aws/table.ts +15 -15
- package/src/cloudflare/bindings.ts +8 -0
- package/src/cloudflare/bucket.ts +39 -47
- package/src/cloudflare/durable-object-namespace.ts +0 -10
- package/src/cloudflare/generate-asset-manifest.ts +1 -1
- package/src/cloudflare/kv-namespace.ts +35 -33
- package/src/cloudflare/static-site-router.ts +0 -3
- package/src/cloudflare/static-site.ts +44 -60
- package/src/cloudflare/worker.ts +105 -111
- package/src/context.ts +122 -0
- package/src/destroy.ts +124 -73
- package/src/{esbuild.ts → esbuild/bundle.ts} +16 -28
- package/src/esbuild/index.ts +1 -0
- package/src/fs/file.ts +39 -0
- package/src/fs/folder.ts +32 -0
- package/src/fs/index.ts +2 -0
- package/src/github/secret.ts +19 -16
- package/src/index.ts +7 -15
- package/src/resource.ts +101 -462
- package/src/scope.ts +101 -36
- package/src/secret.ts +9 -32
- package/src/state.ts +30 -21
- package/src/stripe/price.ts +17 -22
- package/src/stripe/product.ts +17 -22
- package/src/stripe/webhook.ts +21 -27
- package/src/test/bun.ts +105 -0
- package/src/util/serde.ts +53 -0
- package/src/util/slugify.ts +3 -0
- package/lib/$.d.ts +0 -12
- package/lib/$.d.ts.map +0 -1
- package/lib/$.js +0 -42
- package/lib/$.js.map +0 -1
- package/lib/alchemize.d.ts +0 -47
- package/lib/alchemize.d.ts.map +0 -1
- package/lib/alchemize.js +0 -116
- package/lib/alchemize.js.map +0 -1
- package/lib/apply.d.ts.map +0 -1
- package/lib/apply.js.map +0 -1
- package/lib/aws/account-id.d.ts.map +0 -1
- package/lib/aws/account-id.js.map +0 -1
- package/lib/aws/bucket.d.ts.map +0 -1
- package/lib/aws/bucket.js.map +0 -1
- package/lib/aws/function.d.ts.map +0 -1
- package/lib/aws/function.js.map +0 -1
- package/lib/aws/index.d.ts.map +0 -1
- package/lib/aws/index.js.map +0 -1
- package/lib/aws/oidc/github-oidc-provider.d.ts.map +0 -1
- package/lib/aws/oidc/github-oidc-provider.js.map +0 -1
- package/lib/aws/oidc/index.d.ts.map +0 -1
- package/lib/aws/oidc/index.js.map +0 -1
- package/lib/aws/oidc/oidc-provider.d.ts.map +0 -1
- package/lib/aws/oidc/oidc-provider.js.map +0 -1
- package/lib/aws/policy.d.ts.map +0 -1
- package/lib/aws/policy.js.map +0 -1
- package/lib/aws/queue.d.ts.map +0 -1
- package/lib/aws/queue.js.map +0 -1
- package/lib/aws/role.d.ts.map +0 -1
- package/lib/aws/role.js.map +0 -1
- package/lib/aws/ses.d.ts.map +0 -1
- package/lib/aws/ses.js.map +0 -1
- package/lib/aws/table.d.ts.map +0 -1
- package/lib/aws/table.js.map +0 -1
- package/lib/cloudflare/api.d.ts.map +0 -1
- package/lib/cloudflare/api.js.map +0 -1
- package/lib/cloudflare/asset-manifest.d.ts.map +0 -1
- package/lib/cloudflare/asset-manifest.js.map +0 -1
- package/lib/cloudflare/auth.d.ts.map +0 -1
- package/lib/cloudflare/auth.js.map +0 -1
- package/lib/cloudflare/bindings.d.ts.map +0 -1
- package/lib/cloudflare/bindings.js.map +0 -1
- package/lib/cloudflare/bound.d.ts.map +0 -1
- package/lib/cloudflare/bound.js.map +0 -1
- package/lib/cloudflare/bucket.d.ts.map +0 -1
- package/lib/cloudflare/bucket.js.map +0 -1
- package/lib/cloudflare/durable-object-namespace.d.ts.map +0 -1
- package/lib/cloudflare/durable-object-namespace.js.map +0 -1
- package/lib/cloudflare/generate-asset-manifest.d.ts.map +0 -1
- package/lib/cloudflare/generate-asset-manifest.js.map +0 -1
- package/lib/cloudflare/index.d.ts.map +0 -1
- package/lib/cloudflare/index.js.map +0 -1
- package/lib/cloudflare/kv-namespace.d.ts.map +0 -1
- package/lib/cloudflare/kv-namespace.js.map +0 -1
- package/lib/cloudflare/state.d.ts.map +0 -1
- package/lib/cloudflare/state.js.map +0 -1
- package/lib/cloudflare/static-site-router.d.ts.map +0 -1
- package/lib/cloudflare/static-site-router.js.map +0 -1
- package/lib/cloudflare/static-site.d.ts.map +0 -1
- package/lib/cloudflare/static-site.js.map +0 -1
- package/lib/cloudflare/types.d.ts.map +0 -1
- package/lib/cloudflare/types.js.map +0 -1
- package/lib/cloudflare/upload-asset-manifest.d.ts.map +0 -1
- package/lib/cloudflare/upload-asset-manifest.js.map +0 -1
- package/lib/cloudflare/worker-metadata.d.ts.map +0 -1
- package/lib/cloudflare/worker-metadata.js.map +0 -1
- package/lib/cloudflare/worker-migration.d.ts.map +0 -1
- package/lib/cloudflare/worker-migration.js.map +0 -1
- package/lib/cloudflare/worker.d.ts.map +0 -1
- package/lib/cloudflare/worker.js.map +0 -1
- package/lib/destroy.d.ts.map +0 -1
- package/lib/destroy.js.map +0 -1
- package/lib/encrypt.d.ts.map +0 -1
- package/lib/encrypt.js.map +0 -1
- package/lib/error.d.ts.map +0 -1
- package/lib/error.js.map +0 -1
- package/lib/esbuild.d.ts.map +0 -1
- package/lib/esbuild.js.map +0 -1
- package/lib/fs.d.ts +0 -12
- package/lib/fs.d.ts.map +0 -1
- package/lib/fs.js +0 -41
- package/lib/fs.js.map +0 -1
- package/lib/github/client.d.ts.map +0 -1
- package/lib/github/client.js.map +0 -1
- package/lib/github/index.d.ts.map +0 -1
- package/lib/github/index.js.map +0 -1
- package/lib/github/secret.d.ts.map +0 -1
- package/lib/github/secret.js.map +0 -1
- package/lib/global.d.ts +0 -16
- package/lib/global.d.ts.map +0 -1
- package/lib/global.js +0 -42
- package/lib/global.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/input.d.ts +0 -7
- package/lib/input.d.ts.map +0 -1
- package/lib/input.js +0 -2
- package/lib/input.js.map +0 -1
- package/lib/main.d.ts +0 -3
- package/lib/main.d.ts.map +0 -1
- package/lib/main.js +0 -32
- package/lib/main.js.map +0 -1
- package/lib/output.d.ts +0 -25
- package/lib/output.d.ts.map +0 -1
- package/lib/output.js +0 -23
- package/lib/output.js.map +0 -1
- package/lib/print.d.ts +0 -7
- package/lib/print.d.ts.map +0 -1
- package/lib/print.js +0 -10
- package/lib/print.js.map +0 -1
- package/lib/resource.d.ts.map +0 -1
- package/lib/resource.js.map +0 -1
- package/lib/scope.d.ts.map +0 -1
- package/lib/scope.js.map +0 -1
- package/lib/secret.d.ts.map +0 -1
- package/lib/secret.js.map +0 -1
- package/lib/serde.d.ts +0 -3
- package/lib/serde.d.ts.map +0 -1
- package/lib/serde.js.map +0 -1
- package/lib/slug.d.ts +0 -2
- package/lib/slug.d.ts.map +0 -1
- package/lib/slug.js +0 -4
- package/lib/slug.js.map +0 -1
- package/lib/state.d.ts.map +0 -1
- package/lib/state.js.map +0 -1
- package/lib/stripe/index.d.ts.map +0 -1
- package/lib/stripe/index.js.map +0 -1
- package/lib/stripe/price.d.ts.map +0 -1
- package/lib/stripe/price.js.map +0 -1
- package/lib/stripe/product.d.ts.map +0 -1
- package/lib/stripe/product.js.map +0 -1
- package/lib/stripe/webhook.d.ts.map +0 -1
- package/lib/stripe/webhook.js.map +0 -1
- package/lib/utils/content-type.d.ts.map +0 -1
- package/lib/utils/content-type.js.map +0 -1
- package/lib/utils/retry.d.ts.map +0 -1
- package/lib/utils/retry.js.map +0 -1
- package/src/$.ts +0 -69
- package/src/alchemize.ts +0 -195
- package/src/fs.ts +0 -47
- package/src/global.ts +0 -63
- package/src/input.ts +0 -19
- package/src/main.ts +0 -34
- package/src/output.ts +0 -75
- package/src/print.ts +0 -18
- package/src/serde.ts +0 -46
- package/src/slug.ts +0 -3
- /package/src/{utils → util}/content-type.ts +0 -0
- /package/src/{encrypt.ts → util/encrypt.ts} +0 -0
- /package/src/{error.ts → util/ignore.ts} +0 -0
- /package/src/{utils → util}/retry.ts +0 -0
package/lib/aws/ses.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { CreateConfigurationSetCommand, CreateEmailIdentityCommand, DeleteConfigurationSetCommand, DeleteEmailIdentityCommand, GetConfigurationSetCommand, GetEmailIdentityCommand, NotFoundException, PutConfigurationSetDeliveryOptionsCommand, PutConfigurationSetReputationOptionsCommand, PutConfigurationSetSendingOptionsCommand, PutConfigurationSetSuppressionOptionsCommand, PutConfigurationSetTrackingOptionsCommand, PutEmailIdentityDkimAttributesCommand, SESv2Client, } from "@aws-sdk/client-sesv2";
|
|
2
|
-
import { ignore } from "../error";
|
|
3
2
|
import { Resource } from "../resource";
|
|
3
|
+
import { ignore } from "../util/ignore";
|
|
4
4
|
/**
|
|
5
5
|
* AWS SES resource for creating and configuring Simple Email Service
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export const SES = Resource("aws::SES", async function (id, props) {
|
|
8
8
|
// Create SES client
|
|
9
9
|
const client = new SESv2Client({});
|
|
10
10
|
// Resource ID is either based on the configuration set name or email identity
|
|
11
|
-
const id =
|
|
11
|
+
// const id =
|
|
12
|
+
// props.configurationSetName || props.emailIdentity || this.resourceID;
|
|
12
13
|
// Handle deletion
|
|
13
|
-
if (
|
|
14
|
-
const output =
|
|
14
|
+
if (this.phase === "delete") {
|
|
15
|
+
const output = this.output;
|
|
15
16
|
// Delete configuration set if it exists
|
|
16
17
|
if (output?.configurationSetName) {
|
|
17
18
|
await ignore(NotFoundException.name, () => client.send(new DeleteConfigurationSetCommand({
|
|
@@ -25,7 +26,7 @@ export class SES extends Resource("aws::SES", async (ctx, props) => {
|
|
|
25
26
|
})));
|
|
26
27
|
}
|
|
27
28
|
// Return empty output for delete
|
|
28
|
-
return;
|
|
29
|
+
return this.destroy();
|
|
29
30
|
}
|
|
30
31
|
// Created resources
|
|
31
32
|
let configurationSetArn;
|
|
@@ -34,156 +35,142 @@ export class SES extends Resource("aws::SES", async (ctx, props) => {
|
|
|
34
35
|
let dkimVerificationStatus;
|
|
35
36
|
// Create or update configuration set if specified
|
|
36
37
|
if (props.configurationSetName) {
|
|
38
|
+
// Check if configuration set exists
|
|
39
|
+
let configSetExists = false;
|
|
37
40
|
try {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
await client.send(new GetConfigurationSetCommand({
|
|
42
|
+
ConfigurationSetName: props.configurationSetName,
|
|
43
|
+
}));
|
|
44
|
+
configSetExists = true;
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
if (error instanceof NotFoundException) {
|
|
48
|
+
configSetExists = false;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (configSetExists) {
|
|
55
|
+
// Update existing configuration set using appropriate update commands
|
|
56
|
+
if (props.sendingOptions) {
|
|
57
|
+
await client.send(new PutConfigurationSetSendingOptionsCommand({
|
|
42
58
|
ConfigurationSetName: props.configurationSetName,
|
|
59
|
+
SendingEnabled: props.sendingOptions.SendingEnabled,
|
|
43
60
|
}));
|
|
44
|
-
configSetExists = true;
|
|
45
61
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
62
|
+
if (props.reputationOptions) {
|
|
63
|
+
await client.send(new PutConfigurationSetReputationOptionsCommand({
|
|
64
|
+
ConfigurationSetName: props.configurationSetName,
|
|
65
|
+
ReputationMetricsEnabled: props.reputationOptions.ReputationMetricsEnabled,
|
|
66
|
+
}));
|
|
53
67
|
}
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
SendingEnabled: props.sendingOptions.SendingEnabled,
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
if (props.reputationOptions) {
|
|
63
|
-
await client.send(new PutConfigurationSetReputationOptionsCommand({
|
|
64
|
-
ConfigurationSetName: props.configurationSetName,
|
|
65
|
-
ReputationMetricsEnabled: props.reputationOptions.ReputationMetricsEnabled,
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
if (props.trackingOptions) {
|
|
69
|
-
await client.send(new PutConfigurationSetTrackingOptionsCommand({
|
|
70
|
-
ConfigurationSetName: props.configurationSetName,
|
|
71
|
-
CustomRedirectDomain: props.trackingOptions.CustomRedirectDomain,
|
|
72
|
-
}));
|
|
73
|
-
}
|
|
74
|
-
if (props.suppressionOptions) {
|
|
75
|
-
await client.send(new PutConfigurationSetSuppressionOptionsCommand({
|
|
76
|
-
ConfigurationSetName: props.configurationSetName,
|
|
77
|
-
SuppressedReasons: props.suppressionOptions.SuppressedReasons,
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
80
|
-
if (props.deliveryOptions) {
|
|
81
|
-
await client.send(new PutConfigurationSetDeliveryOptionsCommand({
|
|
82
|
-
ConfigurationSetName: props.configurationSetName,
|
|
83
|
-
TlsPolicy: props.deliveryOptions.TlsPolicy,
|
|
84
|
-
SendingPoolName: props.deliveryOptions.SendingPoolName,
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
// In SESv2, the ARN isn't directly returned in the response
|
|
88
|
-
configurationSetArn = `arn:aws:ses:${process.env.AWS_REGION}:${process.env.AWS_ACCOUNT_ID}:configuration-set/${props.configurationSetName}`;
|
|
68
|
+
if (props.trackingOptions) {
|
|
69
|
+
await client.send(new PutConfigurationSetTrackingOptionsCommand({
|
|
70
|
+
ConfigurationSetName: props.configurationSetName,
|
|
71
|
+
CustomRedirectDomain: props.trackingOptions.CustomRedirectDomain,
|
|
72
|
+
}));
|
|
89
73
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
74
|
+
if (props.suppressionOptions) {
|
|
75
|
+
await client.send(new PutConfigurationSetSuppressionOptionsCommand({
|
|
76
|
+
ConfigurationSetName: props.configurationSetName,
|
|
77
|
+
SuppressedReasons: props.suppressionOptions.SuppressedReasons,
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
if (props.deliveryOptions) {
|
|
81
|
+
await client.send(new PutConfigurationSetDeliveryOptionsCommand({
|
|
93
82
|
ConfigurationSetName: props.configurationSetName,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
TrackingOptions: props.trackingOptions,
|
|
97
|
-
SuppressionOptions: props.suppressionOptions,
|
|
98
|
-
DeliveryOptions: props.deliveryOptions,
|
|
99
|
-
Tags: Object.entries(props.tags || {}).map(([Key, Value]) => ({
|
|
100
|
-
Key,
|
|
101
|
-
Value,
|
|
102
|
-
})),
|
|
83
|
+
TlsPolicy: props.deliveryOptions.TlsPolicy,
|
|
84
|
+
SendingPoolName: props.deliveryOptions.SendingPoolName,
|
|
103
85
|
}));
|
|
104
|
-
// In SESv2, the ARN isn't directly returned in the response
|
|
105
|
-
configurationSetArn = `arn:aws:ses:${process.env.AWS_REGION}:${process.env.AWS_ACCOUNT_ID}:configuration-set/${props.configurationSetName}`;
|
|
106
86
|
}
|
|
87
|
+
// In SESv2, the ARN isn't directly returned in the response
|
|
88
|
+
configurationSetArn = `arn:aws:ses:${process.env.AWS_REGION}:${process.env.AWS_ACCOUNT_ID}:configuration-set/${props.configurationSetName}`;
|
|
107
89
|
}
|
|
108
|
-
|
|
109
|
-
|
|
90
|
+
else {
|
|
91
|
+
// Create new configuration set
|
|
92
|
+
await client.send(new CreateConfigurationSetCommand({
|
|
93
|
+
ConfigurationSetName: props.configurationSetName,
|
|
94
|
+
SendingOptions: props.sendingOptions,
|
|
95
|
+
ReputationOptions: props.reputationOptions,
|
|
96
|
+
TrackingOptions: props.trackingOptions,
|
|
97
|
+
SuppressionOptions: props.suppressionOptions,
|
|
98
|
+
DeliveryOptions: props.deliveryOptions,
|
|
99
|
+
Tags: Object.entries(props.tags || {}).map(([Key, Value]) => ({
|
|
100
|
+
Key,
|
|
101
|
+
Value,
|
|
102
|
+
})),
|
|
103
|
+
}));
|
|
104
|
+
// In SESv2, the ARN isn't directly returned in the response
|
|
105
|
+
configurationSetArn = `arn:aws:ses:${process.env.AWS_REGION}:${process.env.AWS_ACCOUNT_ID}:configuration-set/${props.configurationSetName}`;
|
|
110
106
|
}
|
|
111
107
|
}
|
|
112
108
|
// Create or verify email identity if specified
|
|
113
109
|
if (props.emailIdentity) {
|
|
110
|
+
// Check if identity exists
|
|
111
|
+
let getIdentityResult;
|
|
114
112
|
try {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
catch (error) {
|
|
123
|
-
if (error instanceof NotFoundException) {
|
|
124
|
-
getIdentityResult = null;
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
throw error;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (!getIdentityResult) {
|
|
131
|
-
// Create new email identity
|
|
132
|
-
const createIdentityResult = await client.send(new CreateEmailIdentityCommand({
|
|
133
|
-
EmailIdentity: props.emailIdentity,
|
|
134
|
-
Tags: Object.entries(props.tags || {}).map(([Key, Value]) => ({
|
|
135
|
-
Key,
|
|
136
|
-
Value,
|
|
137
|
-
})),
|
|
138
|
-
}));
|
|
139
|
-
// If it's an email address, we don't need to explicitly verify in v2
|
|
140
|
-
// The verification email is automatically sent by SES in v2
|
|
141
|
-
// Store the identity information
|
|
142
|
-
emailIdentityArn = `arn:aws:ses:${process.env.AWS_REGION}:${process.env.AWS_ACCOUNT_ID}:identity/${props.emailIdentity}`;
|
|
143
|
-
emailIdentityVerificationStatus =
|
|
144
|
-
createIdentityResult.VerifiedForSendingStatus
|
|
145
|
-
? "VERIFIED"
|
|
146
|
-
: "PENDING";
|
|
113
|
+
getIdentityResult = await client.send(new GetEmailIdentityCommand({
|
|
114
|
+
EmailIdentity: props.emailIdentity,
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
if (error instanceof NotFoundException) {
|
|
119
|
+
getIdentityResult = null;
|
|
147
120
|
}
|
|
148
121
|
else {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (!getIdentityResult) {
|
|
126
|
+
// Create new email identity
|
|
127
|
+
const createIdentityResult = await client.send(new CreateEmailIdentityCommand({
|
|
128
|
+
EmailIdentity: props.emailIdentity,
|
|
129
|
+
Tags: Object.entries(props.tags || {}).map(([Key, Value]) => ({
|
|
130
|
+
Key,
|
|
131
|
+
Value,
|
|
132
|
+
})),
|
|
133
|
+
}));
|
|
134
|
+
// If it's an email address, we don't need to explicitly verify in v2
|
|
135
|
+
// The verification email is automatically sent by SES in v2
|
|
136
|
+
// Store the identity information
|
|
137
|
+
emailIdentityArn = `arn:aws:ses:${process.env.AWS_REGION}:${process.env.AWS_ACCOUNT_ID}:identity/${props.emailIdentity}`;
|
|
138
|
+
emailIdentityVerificationStatus =
|
|
139
|
+
createIdentityResult.VerifiedForSendingStatus
|
|
140
|
+
? "VERIFIED"
|
|
141
|
+
: "PENDING";
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
// Store the identity information
|
|
145
|
+
emailIdentityArn = `arn:aws:ses:${process.env.AWS_REGION}:${process.env.AWS_ACCOUNT_ID}:identity/${props.emailIdentity}`;
|
|
146
|
+
emailIdentityVerificationStatus =
|
|
147
|
+
getIdentityResult.VerifiedForSendingStatus ? "VERIFIED" : "PENDING";
|
|
148
|
+
// Update DKIM settings if requested
|
|
149
|
+
if (props.enableDkim !== undefined) {
|
|
150
|
+
if (props.enableDkim) {
|
|
151
|
+
await client.send(new PutEmailIdentityDkimAttributesCommand({
|
|
152
|
+
EmailIdentity: props.emailIdentity,
|
|
153
|
+
SigningEnabled: true,
|
|
154
|
+
}));
|
|
155
|
+
// We can check the current status of DKIM
|
|
156
|
+
dkimVerificationStatus = "PENDING"; // Default to pending
|
|
157
|
+
// Get the updated identity to check DKIM status
|
|
158
|
+
const updatedIdentity = await client.send(new GetEmailIdentityCommand({
|
|
159
|
+
EmailIdentity: props.emailIdentity,
|
|
160
|
+
}));
|
|
161
|
+
if (updatedIdentity.DkimAttributes?.Status) {
|
|
162
|
+
dkimVerificationStatus = updatedIdentity.DkimAttributes.Status;
|
|
169
163
|
}
|
|
170
164
|
}
|
|
171
165
|
}
|
|
172
166
|
}
|
|
173
|
-
catch (error) {
|
|
174
|
-
console.error(`Error configuring email identity ${props.emailIdentity}:`, error);
|
|
175
|
-
throw error;
|
|
176
|
-
}
|
|
177
167
|
}
|
|
178
168
|
// Return the resource output
|
|
179
|
-
return {
|
|
169
|
+
return this({
|
|
180
170
|
...props,
|
|
181
|
-
id,
|
|
182
171
|
configurationSetArn,
|
|
183
172
|
emailIdentityArn,
|
|
184
173
|
emailIdentityVerificationStatus,
|
|
185
174
|
dkimVerificationStatus,
|
|
186
|
-
};
|
|
187
|
-
})
|
|
188
|
-
}
|
|
189
|
-
//# sourceMappingURL=ses.js.map
|
|
175
|
+
});
|
|
176
|
+
});
|
package/lib/aws/table.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Context } from "../context";
|
|
2
|
+
import { Resource } from "../resource";
|
|
1
3
|
export interface TableProps {
|
|
2
4
|
tableName: string;
|
|
3
5
|
partitionKey: {
|
|
@@ -13,14 +15,9 @@ export interface TableProps {
|
|
|
13
15
|
writeCapacity?: number;
|
|
14
16
|
tags?: Record<string, string>;
|
|
15
17
|
}
|
|
16
|
-
export interface
|
|
17
|
-
id: string;
|
|
18
|
+
export interface Table extends Resource<"dynamo::Table">, TableProps {
|
|
18
19
|
arn: string;
|
|
19
20
|
streamArn?: string;
|
|
20
21
|
tableId: string;
|
|
21
22
|
}
|
|
22
|
-
declare const
|
|
23
|
-
export declare class Table extends Table_base {
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=table.d.ts.map
|
|
23
|
+
export declare const Table: ((this: Context<Table>, id: string, props: TableProps) => Promise<Table>) | (((this: any, id: string, props: TableProps) => never) & (new (_: never) => never));
|
package/lib/aws/table.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CreateTableCommand, DeleteTableCommand, DescribeTableCommand, DynamoDBClient, InternalServerError, ResourceInUseException, ResourceNotFoundException, } from "@aws-sdk/client-dynamodb";
|
|
2
|
-
import { ignore } from "../error";
|
|
3
2
|
import { Resource } from "../resource";
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { ignore } from "../util/ignore";
|
|
4
|
+
import { withExponentialBackoff } from "../util/retry";
|
|
5
|
+
export const Table = Resource("dynamo::Table", async function (id, props) {
|
|
6
6
|
const client = new DynamoDBClient({});
|
|
7
|
-
if (
|
|
7
|
+
if (this.phase === "delete") {
|
|
8
8
|
await withExponentialBackoff(async () => {
|
|
9
9
|
await ignore(ResourceNotFoundException.name, () => client.send(new DeleteTableCommand({
|
|
10
10
|
TableName: props.tableName,
|
|
@@ -39,7 +39,7 @@ export class Table extends Resource("dynamo::Table", async (ctx, props) => {
|
|
|
39
39
|
if (!tableDeleted) {
|
|
40
40
|
throw new Error(`Timed out waiting for table ${props.tableName} to be deleted`);
|
|
41
41
|
}
|
|
42
|
-
return;
|
|
42
|
+
return this.destroy();
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
45
|
// Setup for table creation
|
|
@@ -141,14 +141,11 @@ export class Table extends Resource("dynamo::Table", async (ctx, props) => {
|
|
|
141
141
|
if (!tableActive) {
|
|
142
142
|
throw new Error(`Timed out waiting for table ${props.tableName} to become active`);
|
|
143
143
|
}
|
|
144
|
-
return {
|
|
144
|
+
return this({
|
|
145
145
|
...props,
|
|
146
|
-
id: props.tableName,
|
|
147
146
|
arn: tableDescription.TableArn,
|
|
148
147
|
streamArn: tableDescription.LatestStreamArn,
|
|
149
148
|
tableId: tableDescription.TableId,
|
|
150
|
-
};
|
|
149
|
+
});
|
|
151
150
|
}
|
|
152
|
-
})
|
|
153
|
-
}
|
|
154
|
-
//# sourceMappingURL=table.js.map
|
|
151
|
+
});
|
package/lib/cloudflare/api.d.ts
CHANGED
package/lib/cloudflare/api.js
CHANGED
package/lib/cloudflare/auth.d.ts
CHANGED
|
@@ -49,4 +49,3 @@ export declare function getCloudflareAuth(options?: CloudflareAuthOptions): Prom
|
|
|
49
49
|
* @returns Complete headers for the request
|
|
50
50
|
*/
|
|
51
51
|
export declare function getCloudflareHeaders(contentType?: string, options?: CloudflareAuthOptions): Promise<Record<string, string>>;
|
|
52
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/lib/cloudflare/auth.js
CHANGED
|
@@ -15,6 +15,7 @@ export type Bindings = {
|
|
|
15
15
|
* L2 Binding Resources.
|
|
16
16
|
*/
|
|
17
17
|
export type Binding = DurableObjectNamespace | KVNamespace | Worker | R2Bucket | Secret | string;
|
|
18
|
+
export declare function isDurableObjectNamespace(binding: Binding): binding is DurableObjectNamespace;
|
|
18
19
|
/**
|
|
19
20
|
* Union type for all Worker binding types (API spec)
|
|
20
21
|
*/
|
|
@@ -258,4 +259,3 @@ export interface WorkerBindingStaticContent {
|
|
|
258
259
|
/** Type identifier for Static Content binding */
|
|
259
260
|
type: "static_content";
|
|
260
261
|
}
|
|
261
|
-
//# sourceMappingURL=bindings.d.ts.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export function isDurableObjectNamespace(binding) {
|
|
2
|
+
return (typeof binding === "object" && binding.type === "durable_object_namespace");
|
|
3
|
+
}
|
|
@@ -5,4 +5,3 @@ import type { DurableObjectNamespace as _DurableObjectNamespace } from "./durabl
|
|
|
5
5
|
import type { KVNamespace as _KVNamespace } from "./kv-namespace";
|
|
6
6
|
import type { Worker as _Worker } from "./worker";
|
|
7
7
|
export type Bound<T extends Binding> = T extends _DurableObjectNamespace ? DurableObjectNamespace : T extends _KVNamespace ? KVNamespace : T extends _Worker ? Worker : T extends _R2Bucket ? R2Bucket : T extends Secret ? string : never;
|
|
8
|
-
//# sourceMappingURL=bound.d.ts.map
|
package/lib/cloudflare/bound.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Context } from "../context";
|
|
2
|
+
import { Resource } from "../resource";
|
|
2
3
|
/**
|
|
3
4
|
* Properties for creating or updating an R2 Bucket
|
|
4
5
|
*/
|
|
@@ -8,7 +9,7 @@ export interface BucketProps {
|
|
|
8
9
|
* Names can only contain lowercase letters (a-z), numbers (0-9), and hyphens (-)
|
|
9
10
|
* Cannot begin or end with a hyphen
|
|
10
11
|
*/
|
|
11
|
-
name
|
|
12
|
+
name: string;
|
|
12
13
|
/**
|
|
13
14
|
* Optional location hint for the bucket
|
|
14
15
|
* Indicates the primary geographical location data will be accessed from
|
|
@@ -28,11 +29,11 @@ export interface BucketProps {
|
|
|
28
29
|
/**
|
|
29
30
|
* Output returned after R2 Bucket creation/update
|
|
30
31
|
*/
|
|
31
|
-
export interface
|
|
32
|
+
export interface R2Bucket extends Resource<"cloudflare::R2Bucket">, BucketProps {
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* Resource type identifier
|
|
34
35
|
*/
|
|
35
|
-
|
|
36
|
+
type: "r2_bucket";
|
|
36
37
|
/**
|
|
37
38
|
* Location of the bucket
|
|
38
39
|
*/
|
|
@@ -41,14 +42,5 @@ export interface BucketOutput extends BucketProps {
|
|
|
41
42
|
* Time at which the bucket was created (Unix timestamp in seconds)
|
|
42
43
|
*/
|
|
43
44
|
creationDate: number;
|
|
44
|
-
/**
|
|
45
|
-
* Resource type identifier
|
|
46
|
-
*/
|
|
47
|
-
type: "r2_bucket";
|
|
48
|
-
}
|
|
49
|
-
export declare function isBucket(resource: any): resource is Resolved<R2Bucket>;
|
|
50
|
-
declare const R2Bucket_base: import("../resource").Provider<"cloudflare::R2Bucket", [props: BucketProps], BucketOutput>;
|
|
51
|
-
export declare class R2Bucket extends R2Bucket_base {
|
|
52
45
|
}
|
|
53
|
-
export
|
|
54
|
-
//# sourceMappingURL=bucket.d.ts.map
|
|
46
|
+
export declare const R2Bucket: ((this: Context<R2Bucket>, id: string, props: BucketProps) => Promise<R2Bucket>) | (((this: any, id: string, props: BucketProps) => never) & (new (_: never) => never));
|
package/lib/cloudflare/bucket.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { Resource } from "../resource";
|
|
2
2
|
import { createCloudflareApi } from "./api";
|
|
3
|
-
export function
|
|
4
|
-
return (resource && typeof resource === "object" && resource.id && resource.location);
|
|
5
|
-
}
|
|
6
|
-
export class R2Bucket extends Resource("cloudflare::R2Bucket", async (ctx, props) => {
|
|
3
|
+
export const R2Bucket = Resource("cloudflare::R2Bucket", async function (id, props) {
|
|
7
4
|
// Create Cloudflare API client with automatic account discovery
|
|
8
5
|
const api = await createCloudflareApi();
|
|
9
6
|
// Resource ID defaults to bucket name if provided
|
|
10
|
-
const bucketName = props.name ||
|
|
11
|
-
if (
|
|
12
|
-
if (
|
|
7
|
+
const bucketName = props.name || this.id;
|
|
8
|
+
if (this.phase === "delete") {
|
|
9
|
+
if (this.output?.name) {
|
|
13
10
|
// Delete R2 bucket
|
|
14
11
|
const headers = {};
|
|
15
12
|
if (props.jurisdiction && props.jurisdiction !== "default") {
|
|
16
13
|
headers["cf-r2-jurisdiction"] = props.jurisdiction;
|
|
17
14
|
}
|
|
18
|
-
const deleteResponse = await api.delete(`/accounts/${api.accountId}/r2/buckets/${
|
|
15
|
+
const deleteResponse = await api.delete(`/accounts/${api.accountId}/r2/buckets/${this.output.name}`, { headers });
|
|
19
16
|
if (!deleteResponse.ok && deleteResponse.status !== 404) {
|
|
20
17
|
const errorData = await deleteResponse.json().catch(() => ({
|
|
21
18
|
errors: [{ message: deleteResponse.statusText }],
|
|
@@ -24,12 +21,12 @@ export class R2Bucket extends Resource("cloudflare::R2Bucket", async (ctx, props
|
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
23
|
// Return void (a deleted bucket has no content)
|
|
27
|
-
return;
|
|
24
|
+
return this.destroy();
|
|
28
25
|
}
|
|
29
26
|
else {
|
|
30
27
|
try {
|
|
31
28
|
let bucketOutput;
|
|
32
|
-
if (
|
|
29
|
+
if (this.phase === "update" && this.output?.name) {
|
|
33
30
|
// Get bucket details to verify it exists
|
|
34
31
|
const headers = {};
|
|
35
32
|
if (props.jurisdiction && props.jurisdiction !== "default") {
|
|
@@ -43,14 +40,13 @@ export class R2Bucket extends Resource("cloudflare::R2Bucket", async (ctx, props
|
|
|
43
40
|
throw new Error(`Error getting R2 bucket '${bucketName}': ${errorData.errors?.[0]?.message || getResponse.statusText}`);
|
|
44
41
|
}
|
|
45
42
|
const result = (await getResponse.json());
|
|
46
|
-
bucketOutput = {
|
|
47
|
-
id: result.result.name,
|
|
43
|
+
bucketOutput = this({
|
|
48
44
|
name: result.result.name,
|
|
49
45
|
location: result.result.location || "default",
|
|
50
46
|
creationDate: Math.floor(new Date(result.result.creation_date).getTime() / 1000),
|
|
51
47
|
jurisdiction: props.jurisdiction || "default",
|
|
52
48
|
type: "r2_bucket",
|
|
53
|
-
};
|
|
49
|
+
});
|
|
54
50
|
// Update public access setting if it has changed
|
|
55
51
|
if (props.allowPublicAccess !== undefined) {
|
|
56
52
|
await updatePublicAccess(api, bucketName, props.allowPublicAccess);
|
|
@@ -76,14 +72,13 @@ export class R2Bucket extends Resource("cloudflare::R2Bucket", async (ctx, props
|
|
|
76
72
|
throw new Error(`Error creating R2 bucket '${bucketName}': ${errorData.errors?.[0]?.message || createResponse.statusText}`);
|
|
77
73
|
}
|
|
78
74
|
const result = (await createResponse.json());
|
|
79
|
-
bucketOutput = {
|
|
80
|
-
id: result.result.name,
|
|
75
|
+
bucketOutput = this({
|
|
81
76
|
name: result.result.name,
|
|
82
77
|
location: result.result.location || "default",
|
|
83
78
|
creationDate: Math.floor(new Date(result.result.creation_date).getTime() / 1000),
|
|
84
79
|
jurisdiction: props.jurisdiction || "default",
|
|
85
80
|
type: "r2_bucket",
|
|
86
|
-
};
|
|
81
|
+
});
|
|
87
82
|
// Set public access if requested
|
|
88
83
|
if (props.allowPublicAccess) {
|
|
89
84
|
await updatePublicAccess(api, bucketName, true);
|
|
@@ -96,8 +91,7 @@ export class R2Bucket extends Resource("cloudflare::R2Bucket", async (ctx, props
|
|
|
96
91
|
throw error;
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
|
-
})
|
|
100
|
-
}
|
|
94
|
+
});
|
|
101
95
|
/**
|
|
102
96
|
* Helper function to update the public access setting for a bucket
|
|
103
97
|
*/
|
|
@@ -117,4 +111,3 @@ async function updatePublicAccess(api, bucketName, allowPublicAccess) {
|
|
|
117
111
|
console.warn("Could not set public access:", error);
|
|
118
112
|
}
|
|
119
113
|
}
|
|
120
|
-
//# sourceMappingURL=bucket.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Resolved } from "../output";
|
|
2
1
|
export interface DurableObjectNamespaceInput {
|
|
3
2
|
className: string;
|
|
4
3
|
scriptName?: string | undefined;
|
|
@@ -6,7 +5,6 @@ export interface DurableObjectNamespaceInput {
|
|
|
6
5
|
sqlite?: boolean | undefined;
|
|
7
6
|
namespaceId?: string | undefined;
|
|
8
7
|
}
|
|
9
|
-
export declare function isDurableObjectNamespace(binding: any): binding is Resolved<DurableObjectNamespace>;
|
|
10
8
|
export declare class DurableObjectNamespace implements DurableObjectNamespaceInput {
|
|
11
9
|
readonly id: string;
|
|
12
10
|
readonly type: "durable_object_namespace";
|
|
@@ -17,4 +15,3 @@ export declare class DurableObjectNamespace implements DurableObjectNamespaceInp
|
|
|
17
15
|
readonly namespaceId?: string | undefined;
|
|
18
16
|
constructor(id: string, input: DurableObjectNamespaceInput);
|
|
19
17
|
}
|
|
20
|
-
//# sourceMappingURL=durable-object-namespace.d.ts.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export function isDurableObjectNamespace(binding) {
|
|
2
|
-
return (typeof binding === "object" && binding.type === "durable_object_namespace");
|
|
3
|
-
}
|
|
4
1
|
export class DurableObjectNamespace {
|
|
5
2
|
id;
|
|
6
3
|
type = "durable_object_namespace";
|
|
@@ -18,4 +15,3 @@ export class DurableObjectNamespace {
|
|
|
18
15
|
this.sqlite = input.sqlite;
|
|
19
16
|
}
|
|
20
17
|
}
|
|
21
|
-
//# sourceMappingURL=durable-object-namespace.js.map
|
|
@@ -2,7 +2,7 @@ import crypto from "crypto";
|
|
|
2
2
|
import { promises as fs } from "fs";
|
|
3
3
|
import { glob } from "glob";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { getContentType } from "../
|
|
5
|
+
import { getContentType } from "../util/content-type";
|
|
6
6
|
export async function generateAssetManifest(dir, fileOptions = [
|
|
7
7
|
{
|
|
8
8
|
files: "**",
|
|
@@ -66,4 +66,3 @@ export async function generateAssetManifest(dir, fileOptions = [
|
|
|
66
66
|
}));
|
|
67
67
|
return manifestEntries;
|
|
68
68
|
}
|
|
69
|
-
//# sourceMappingURL=generate-asset-manifest.js.map
|
package/lib/cloudflare/index.js
CHANGED