alchemy 0.12.21 → 0.14.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/ai/client.d.ts.map +1 -1
- package/lib/ai/client.js +3 -5
- package/lib/ai/client.js.map +1 -1
- package/lib/alchemy.d.ts +2 -1
- package/lib/alchemy.d.ts.map +1 -1
- package/lib/alchemy.js +87 -92
- package/lib/alchemy.js.map +1 -1
- package/lib/apply.d.ts.map +1 -1
- package/lib/apply.js +6 -1
- package/lib/apply.js.map +1 -1
- package/lib/aws/bucket.d.ts.map +1 -1
- package/lib/aws/bucket.js +55 -57
- package/lib/aws/bucket.js.map +1 -1
- package/lib/aws/function.d.ts.map +1 -1
- package/lib/aws/function.js +250 -252
- package/lib/aws/function.js.map +1 -1
- package/lib/aws/policy-attachment.d.ts.map +1 -1
- package/lib/aws/policy-attachment.js +4 -6
- package/lib/aws/policy-attachment.js.map +1 -1
- package/lib/aws/policy.d.ts.map +1 -1
- package/lib/aws/policy.js +63 -65
- package/lib/aws/policy.js.map +1 -1
- package/lib/aws/queue.js +88 -90
- package/lib/aws/queue.js.map +1 -1
- package/lib/aws/table.d.ts.map +1 -1
- package/lib/aws/table.js +95 -99
- package/lib/aws/table.js.map +1 -1
- package/lib/cloudflare/account-api-token.d.ts +1 -1
- package/lib/cloudflare/account-api-token.d.ts.map +1 -1
- package/lib/cloudflare/account-api-token.js +0 -1
- package/lib/cloudflare/account-api-token.js.map +1 -1
- package/lib/cloudflare/ai-gateway.js.map +1 -1
- package/lib/cloudflare/ai.d.ts +1 -1
- package/lib/cloudflare/ai.d.ts.map +1 -1
- package/lib/cloudflare/ai.js.map +1 -1
- package/lib/cloudflare/api.d.ts +5 -5
- package/lib/cloudflare/api.d.ts.map +1 -1
- package/lib/cloudflare/api.js +52 -15
- package/lib/cloudflare/api.js.map +1 -1
- package/lib/cloudflare/auth.d.ts +24 -55
- package/lib/cloudflare/auth.d.ts.map +1 -1
- package/lib/cloudflare/auth.js +15 -72
- package/lib/cloudflare/auth.js.map +1 -1
- package/lib/cloudflare/bucket.d.ts +2 -2
- package/lib/cloudflare/bucket.d.ts.map +1 -1
- package/lib/cloudflare/bucket.js +22 -24
- package/lib/cloudflare/bucket.js.map +1 -1
- package/lib/cloudflare/bundle/alias-plugin.d.ts +6 -0
- package/lib/cloudflare/bundle/alias-plugin.d.ts.map +1 -0
- package/lib/cloudflare/bundle/alias-plugin.js +36 -0
- package/lib/cloudflare/bundle/alias-plugin.js.map +1 -0
- package/lib/cloudflare/bundle/build-failures.d.ts +12 -0
- package/lib/cloudflare/bundle/build-failures.d.ts.map +1 -0
- package/lib/cloudflare/bundle/build-failures.js +45 -0
- package/lib/cloudflare/bundle/build-failures.js.map +1 -0
- package/lib/cloudflare/bundle/bundle-worker.d.ts +7 -0
- package/lib/cloudflare/bundle/bundle-worker.d.ts.map +1 -0
- package/lib/cloudflare/bundle/bundle-worker.js +69 -0
- package/lib/cloudflare/bundle/bundle-worker.js.map +1 -0
- package/lib/cloudflare/bundle/external.d.ts +1 -0
- package/lib/cloudflare/bundle/external.d.ts.map +1 -1
- package/lib/cloudflare/bundle/external.js +8 -1
- package/lib/cloudflare/bundle/external.js.map +1 -1
- package/lib/cloudflare/bundle/local-dev-cloudflare-shim.d.ts +1 -1
- package/lib/cloudflare/bundle/local-dev-cloudflare-shim.d.ts.map +1 -1
- package/lib/cloudflare/bundle/local-dev-cloudflare-shim.js +6 -6
- package/lib/cloudflare/bundle/local-dev-cloudflare-shim.js.map +1 -1
- package/lib/cloudflare/bundle/nodejs-compat-mode.d.ts +17 -0
- package/lib/cloudflare/bundle/nodejs-compat-mode.d.ts.map +1 -0
- package/lib/cloudflare/bundle/nodejs-compat-mode.js +27 -0
- package/lib/cloudflare/bundle/nodejs-compat-mode.js.map +1 -0
- package/lib/cloudflare/bundle/{hybrid-nodejs-compat.d.ts → nodejs-compat.d.ts} +2 -2
- package/lib/cloudflare/bundle/nodejs-compat.d.ts.map +1 -0
- package/lib/cloudflare/bundle/{hybrid-nodejs-compat.js → nodejs-compat.js} +2 -2
- package/lib/cloudflare/bundle/nodejs-compat.js.map +1 -0
- package/lib/cloudflare/custom-domain.d.ts.map +1 -1
- package/lib/cloudflare/custom-domain.js +3 -5
- package/lib/cloudflare/custom-domain.js.map +1 -1
- package/lib/cloudflare/d1-database.d.ts +1 -1
- package/lib/cloudflare/d1-database.d.ts.map +1 -1
- package/lib/cloudflare/d1-database.js +70 -72
- package/lib/cloudflare/d1-database.js.map +1 -1
- package/lib/cloudflare/d1-migrations.d.ts +1 -1
- package/lib/cloudflare/d1-migrations.d.ts.map +1 -1
- package/lib/cloudflare/d1-migrations.js +2 -3
- package/lib/cloudflare/d1-migrations.js.map +1 -1
- package/lib/cloudflare/dns-records.d.ts.map +1 -1
- package/lib/cloudflare/dns-records.js +2 -4
- package/lib/cloudflare/dns-records.js.map +1 -1
- package/lib/cloudflare/kv-namespace.d.ts +1 -1
- package/lib/cloudflare/kv-namespace.d.ts.map +1 -1
- package/lib/cloudflare/kv-namespace.js +24 -27
- package/lib/cloudflare/kv-namespace.js.map +1 -1
- package/lib/cloudflare/pipeline.d.ts +1 -1
- package/lib/cloudflare/pipeline.d.ts.map +1 -1
- package/lib/cloudflare/pipeline.js +32 -34
- package/lib/cloudflare/pipeline.js.map +1 -1
- package/lib/cloudflare/queue-consumer.d.ts +1 -1
- package/lib/cloudflare/queue-consumer.d.ts.map +1 -1
- package/lib/cloudflare/queue-consumer.js +27 -33
- package/lib/cloudflare/queue-consumer.js.map +1 -1
- package/lib/cloudflare/queue.d.ts +1 -1
- package/lib/cloudflare/queue.d.ts.map +1 -1
- package/lib/cloudflare/queue.js +36 -38
- package/lib/cloudflare/queue.js.map +1 -1
- package/lib/cloudflare/r2-rest-state-store.js +4 -8
- package/lib/cloudflare/r2-rest-state-store.js.map +1 -1
- package/lib/cloudflare/types.d.ts.map +1 -1
- package/lib/cloudflare/types.js +1 -3
- package/lib/cloudflare/types.js.map +1 -1
- package/lib/cloudflare/user.d.ts +51 -0
- package/lib/cloudflare/user.d.ts.map +1 -0
- package/lib/cloudflare/user.js +62 -0
- package/lib/cloudflare/user.js.map +1 -0
- package/lib/cloudflare/vectorize-index.d.ts.map +1 -1
- package/lib/cloudflare/vectorize-index.js +37 -39
- package/lib/cloudflare/vectorize-index.js.map +1 -1
- package/lib/cloudflare/vectorize-metadata-index.d.ts +1 -1
- package/lib/cloudflare/vectorize-metadata-index.d.ts.map +1 -1
- package/lib/cloudflare/vectorize-metadata-index.js +10 -13
- package/lib/cloudflare/vectorize-metadata-index.js.map +1 -1
- package/lib/cloudflare/worker.d.ts +18 -3
- package/lib/cloudflare/worker.d.ts.map +1 -1
- package/lib/cloudflare/worker.js +11 -54
- package/lib/cloudflare/worker.js.map +1 -1
- package/lib/cloudflare/workflow.d.ts +1 -1
- package/lib/cloudflare/workflow.d.ts.map +1 -1
- package/lib/cloudflare/workflow.js.map +1 -1
- package/lib/cloudflare/zone.d.ts.map +1 -1
- package/lib/cloudflare/zone.js +48 -50
- package/lib/cloudflare/zone.js.map +1 -1
- package/lib/dns/godaddy.js +1 -1
- package/lib/dns/import-dns.js +1 -1
- package/lib/dns/import-dns.js.map +1 -1
- package/lib/env.js +7 -9
- package/lib/env.js.map +1 -1
- package/lib/esbuild/bundle.d.ts.map +1 -1
- package/lib/esbuild/bundle.js +8 -11
- package/lib/esbuild/bundle.js.map +1 -1
- package/lib/fs/copy-file.d.ts.map +1 -1
- package/lib/fs/copy-file.js +27 -29
- package/lib/fs/copy-file.js.map +1 -1
- package/lib/fs/file.d.ts +1 -1
- package/lib/fs/file.d.ts.map +1 -1
- package/lib/fs/file.js +1 -1
- package/lib/fs/file.js.map +1 -1
- package/lib/fs/folder.d.ts.map +1 -1
- package/lib/fs/folder.js +1 -3
- package/lib/fs/folder.js.map +1 -1
- package/lib/github/client.d.ts.map +1 -1
- package/lib/github/client.js +3 -5
- package/lib/github/client.js.map +1 -1
- package/lib/github/repository-environment.d.ts.map +1 -1
- package/lib/github/repository-environment.js +173 -176
- package/lib/github/repository-environment.js.map +1 -1
- package/lib/github/secret.d.ts.map +1 -1
- package/lib/github/secret.js +97 -99
- package/lib/github/secret.js.map +1 -1
- package/lib/internal/docs/providers.d.ts.map +1 -1
- package/lib/internal/docs/providers.js +5 -7
- package/lib/internal/docs/providers.js.map +1 -1
- package/lib/neon/api.js +1 -2
- package/lib/neon/api.js.map +1 -1
- package/lib/neon/project.js +2 -2
- package/lib/neon/project.js.map +1 -1
- package/lib/os/exec.d.ts +5 -0
- package/lib/os/exec.d.ts.map +1 -1
- package/lib/os/exec.js +88 -56
- package/lib/os/exec.js.map +1 -1
- package/lib/scope.d.ts +3 -0
- package/lib/scope.d.ts.map +1 -1
- package/lib/scope.js +10 -3
- package/lib/scope.js.map +1 -1
- package/lib/secret.d.ts.map +1 -1
- package/lib/secret.js +1 -3
- package/lib/secret.js.map +1 -1
- package/lib/serde.d.ts.map +1 -1
- package/lib/serde.js +13 -15
- package/lib/serde.js.map +1 -1
- package/lib/stripe/price.d.ts.map +1 -1
- package/lib/stripe/price.js +69 -73
- package/lib/stripe/price.js.map +1 -1
- package/lib/stripe/product.d.ts.map +1 -1
- package/lib/stripe/product.js +50 -52
- package/lib/stripe/product.js.map +1 -1
- package/lib/stripe/webhook.d.ts.map +1 -1
- package/lib/stripe/webhook.js +51 -53
- package/lib/stripe/webhook.js.map +1 -1
- package/lib/test/bun.d.ts +1 -1
- package/lib/test/bun.d.ts.map +1 -1
- package/lib/test/bun.js +3 -8
- package/lib/test/bun.js.map +1 -1
- package/lib/test/prune.d.ts.map +1 -1
- package/lib/test/prune.js.map +1 -1
- package/lib/util/dedent.js +4 -4
- package/lib/util/dedent.js.map +1 -1
- package/lib/web/astro.js +1 -1
- package/lib/web/shadcn.js +4 -4
- package/lib/web/shadcn.js.map +1 -1
- package/lib/web/tailwind.d.ts.map +1 -1
- package/lib/web/tailwind.js +0 -1
- package/lib/web/tailwind.js.map +1 -1
- package/lib/web/vite.js +3 -3
- package/lib/web/vitepress/home-page.d.ts.map +1 -1
- package/lib/web/vitepress/home-page.js +6 -8
- package/lib/web/vitepress/home-page.js.map +1 -1
- package/lib/web/vitepress/process-front-matter-files.js +1 -1
- package/lib/web/vitepress/process-front-matter-files.js.map +1 -1
- package/lib/web/vitepress/vitepress.js +2 -2
- package/lib/web/vitepress/vitepress.js.map +1 -1
- package/package.json +4 -1
- package/src/ai/astro-file.ts +4 -4
- package/src/ai/client.ts +4 -5
- package/src/ai/css-file.ts +4 -4
- package/src/ai/document.ts +3 -3
- package/src/ai/html-file.ts +4 -4
- package/src/ai/json-file.ts +1 -1
- package/src/ai/typescript-file.ts +4 -4
- package/src/ai/vue-file.ts +4 -4
- package/src/ai/yaml-file.ts +1 -1
- package/src/alchemy.ts +111 -104
- package/src/apply.ts +13 -6
- package/src/aws/bucket.ts +72 -75
- package/src/aws/function.ts +296 -297
- package/src/aws/oidc/github-oidc-provider.ts +1 -1
- package/src/aws/oidc/oidc-provider.ts +15 -15
- package/src/aws/policy-attachment.ts +10 -11
- package/src/aws/policy.ts +91 -94
- package/src/aws/queue.ts +111 -111
- package/src/aws/role.ts +24 -24
- package/src/aws/ses.ts +17 -17
- package/src/aws/table.ts +114 -115
- package/src/cloudflare/account-api-token.ts +11 -11
- package/src/cloudflare/ai-gateway.ts +4 -4
- package/src/cloudflare/ai.ts +1 -1
- package/src/cloudflare/api-error.ts +1 -1
- package/src/cloudflare/api.ts +70 -25
- package/src/cloudflare/assets.ts +4 -4
- package/src/cloudflare/auth.ts +49 -164
- package/src/cloudflare/bucket.ts +62 -63
- package/src/cloudflare/bundle/alias-plugin.ts +48 -0
- package/src/cloudflare/bundle/build-failures.ts +55 -0
- package/src/cloudflare/bundle/bundle-worker.ts +89 -0
- package/src/cloudflare/bundle/external.ts +9 -1
- package/src/cloudflare/bundle/local-dev-cloudflare-shim.ts +7 -6
- package/src/cloudflare/bundle/nodejs-compat-mode.ts +49 -0
- package/src/cloudflare/bundle/{hybrid-nodejs-compat.ts → nodejs-compat.ts} +10 -10
- package/src/cloudflare/custom-domain.ts +27 -28
- package/src/cloudflare/d1-database.ts +101 -102
- package/src/cloudflare/d1-migrations.ts +10 -10
- package/src/cloudflare/dns-records.ts +23 -24
- package/src/cloudflare/durable-object-namespace.ts +1 -1
- package/src/cloudflare/event-source.ts +1 -1
- package/src/cloudflare/hyperdrive.ts +3 -3
- package/src/cloudflare/kv-namespace.ts +36 -37
- package/src/cloudflare/nuxt.ts +1 -1
- package/src/cloudflare/permission-groups.ts +7 -7
- package/src/cloudflare/pipeline.ts +55 -56
- package/src/cloudflare/queue-consumer.ts +46 -53
- package/src/cloudflare/queue.ts +56 -57
- package/src/cloudflare/r2-rest-state-store.ts +11 -11
- package/src/cloudflare/redwood.ts +1 -1
- package/src/cloudflare/tanstack-start.ts +1 -1
- package/src/cloudflare/types.ts +1 -2
- package/src/cloudflare/user.ts +142 -0
- package/src/cloudflare/vectorize-index.ts +60 -61
- package/src/cloudflare/vectorize-metadata-index.ts +25 -25
- package/src/cloudflare/vite.ts +1 -1
- package/src/cloudflare/website.ts +3 -3
- package/src/cloudflare/worker.ts +83 -108
- package/src/cloudflare/workflow.ts +4 -4
- package/src/cloudflare/wrangler.json.ts +4 -4
- package/src/cloudflare/zone.ts +69 -70
- package/src/destroy.ts +4 -4
- package/src/dns/godaddy.ts +1 -1
- package/src/dns/import-dns.ts +5 -5
- package/src/encrypt.ts +6 -6
- package/src/env.ts +10 -10
- package/src/esbuild/bundle.ts +14 -15
- package/src/fs/copy-file.ts +35 -36
- package/src/fs/file-system-state-store.ts +4 -4
- package/src/fs/file.ts +9 -8
- package/src/fs/folder.ts +6 -7
- package/src/github/client.ts +15 -14
- package/src/github/repository-environment.ts +206 -210
- package/src/github/secret.ts +111 -116
- package/src/internal/docs/providers.ts +16 -17
- package/src/neon/api-error.ts +1 -1
- package/src/neon/api.ts +6 -6
- package/src/neon/project.ts +18 -17
- package/src/os/exec.ts +107 -66
- package/src/resource.ts +3 -3
- package/src/scope.ts +14 -4
- package/src/secret.ts +2 -3
- package/src/serde.ts +30 -22
- package/src/stripe/price.ts +74 -77
- package/src/stripe/product.ts +55 -56
- package/src/stripe/webhook.ts +56 -57
- package/src/test/bun.ts +9 -13
- package/src/test/prune.ts +4 -4
- package/src/util/dedent.ts +4 -4
- package/src/web/astro.ts +10 -10
- package/src/web/shadcn-component.ts +4 -4
- package/src/web/shadcn.ts +10 -10
- package/src/web/tailwind.ts +2 -3
- package/src/web/vite.ts +11 -11
- package/src/web/vitepress/config.ts +2 -2
- package/src/web/vitepress/custom-theme.ts +7 -7
- package/src/web/vitepress/dependencies.ts +4 -4
- package/src/web/vitepress/home-page.ts +8 -9
- package/src/web/vitepress/process-front-matter-files.ts +5 -5
- package/src/web/vitepress/vitepress.ts +7 -7
- package/lib/cloudflare/account-id.d.ts +0 -6
- package/lib/cloudflare/account-id.d.ts.map +0 -1
- package/lib/cloudflare/account-id.js +0 -6
- package/lib/cloudflare/account-id.js.map +0 -1
- package/lib/cloudflare/bundle/hybrid-nodejs-compat.d.ts.map +0 -1
- package/lib/cloudflare/bundle/hybrid-nodejs-compat.js.map +0 -1
- package/src/cloudflare/account-id.ts +0 -12
package/src/aws/role.ts
CHANGED
|
@@ -219,7 +219,7 @@ export const Role = Resource(
|
|
|
219
219
|
async function (
|
|
220
220
|
this: Context<Role>,
|
|
221
221
|
id: string,
|
|
222
|
-
props: RoleProps
|
|
222
|
+
props: RoleProps,
|
|
223
223
|
): Promise<Role> {
|
|
224
224
|
const client = new IAMClient({});
|
|
225
225
|
|
|
@@ -233,8 +233,8 @@ export const Role = Resource(
|
|
|
233
233
|
new DeleteRolePolicyCommand({
|
|
234
234
|
RoleName: props.roleName,
|
|
235
235
|
PolicyName: policy.policyName,
|
|
236
|
-
})
|
|
237
|
-
)
|
|
236
|
+
}),
|
|
237
|
+
),
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
}
|
|
@@ -245,7 +245,7 @@ export const Role = Resource(
|
|
|
245
245
|
const attachedPoliciesResponse = await client.send(
|
|
246
246
|
new ListAttachedRolePoliciesCommand({
|
|
247
247
|
RoleName: props.roleName,
|
|
248
|
-
})
|
|
248
|
+
}),
|
|
249
249
|
);
|
|
250
250
|
|
|
251
251
|
// Detach all managed policies
|
|
@@ -257,8 +257,8 @@ export const Role = Resource(
|
|
|
257
257
|
new DetachRolePolicyCommand({
|
|
258
258
|
RoleName: props.roleName,
|
|
259
259
|
PolicyArn: policy.PolicyArn!,
|
|
260
|
-
})
|
|
261
|
-
)
|
|
260
|
+
}),
|
|
261
|
+
),
|
|
262
262
|
);
|
|
263
263
|
}
|
|
264
264
|
} catch (error: any) {
|
|
@@ -273,8 +273,8 @@ export const Role = Resource(
|
|
|
273
273
|
client.send(
|
|
274
274
|
new DeleteRoleCommand({
|
|
275
275
|
RoleName: props.roleName,
|
|
276
|
-
})
|
|
277
|
-
)
|
|
276
|
+
}),
|
|
277
|
+
),
|
|
278
278
|
);
|
|
279
279
|
} catch (error: any) {
|
|
280
280
|
// If we get any other error besides NoSuchEntityException, log it but don't fail
|
|
@@ -316,7 +316,7 @@ export const Role = Resource(
|
|
|
316
316
|
Value: this.id,
|
|
317
317
|
},
|
|
318
318
|
],
|
|
319
|
-
})
|
|
319
|
+
}),
|
|
320
320
|
);
|
|
321
321
|
}
|
|
322
322
|
} catch (error: any) {
|
|
@@ -328,7 +328,7 @@ export const Role = Resource(
|
|
|
328
328
|
const existingRole = await client.send(
|
|
329
329
|
new GetRoleCommand({
|
|
330
330
|
RoleName: props.roleName,
|
|
331
|
-
})
|
|
331
|
+
}),
|
|
332
332
|
);
|
|
333
333
|
const roleTags =
|
|
334
334
|
existingRole.Role?.Tags?.reduce(
|
|
@@ -336,7 +336,7 @@ export const Role = Resource(
|
|
|
336
336
|
acc[tag.Key!] = tag.Value!;
|
|
337
337
|
return acc;
|
|
338
338
|
},
|
|
339
|
-
{} as Record<string, string
|
|
339
|
+
{} as Record<string, string>,
|
|
340
340
|
) || {};
|
|
341
341
|
|
|
342
342
|
if (
|
|
@@ -354,7 +354,7 @@ export const Role = Resource(
|
|
|
354
354
|
role = await client.send(
|
|
355
355
|
new GetRoleCommand({
|
|
356
356
|
RoleName: props.roleName,
|
|
357
|
-
})
|
|
357
|
+
}),
|
|
358
358
|
);
|
|
359
359
|
|
|
360
360
|
// Update assume role policy if it changed
|
|
@@ -363,7 +363,7 @@ export const Role = Resource(
|
|
|
363
363
|
new UpdateAssumeRolePolicyCommand({
|
|
364
364
|
RoleName: props.roleName,
|
|
365
365
|
PolicyDocument: assumeRolePolicyDocument,
|
|
366
|
-
})
|
|
366
|
+
}),
|
|
367
367
|
);
|
|
368
368
|
}
|
|
369
369
|
|
|
@@ -377,7 +377,7 @@ export const Role = Resource(
|
|
|
377
377
|
RoleName: props.roleName,
|
|
378
378
|
Description: props.description,
|
|
379
379
|
MaxSessionDuration: props.maxSessionDuration,
|
|
380
|
-
})
|
|
380
|
+
}),
|
|
381
381
|
);
|
|
382
382
|
}
|
|
383
383
|
|
|
@@ -395,7 +395,7 @@ export const Role = Resource(
|
|
|
395
395
|
new TagRoleCommand({
|
|
396
396
|
RoleName: props.roleName,
|
|
397
397
|
Tags: tags,
|
|
398
|
-
})
|
|
398
|
+
}),
|
|
399
399
|
);
|
|
400
400
|
|
|
401
401
|
// Handle policy changes
|
|
@@ -407,7 +407,7 @@ export const Role = Resource(
|
|
|
407
407
|
for (const oldPolicy of previousPolicies) {
|
|
408
408
|
if (
|
|
409
409
|
!currentPolicies.some(
|
|
410
|
-
(p: { policyName: string }) => p.policyName === oldPolicy.policyName
|
|
410
|
+
(p: { policyName: string }) => p.policyName === oldPolicy.policyName,
|
|
411
411
|
)
|
|
412
412
|
) {
|
|
413
413
|
await ignore(NoSuchEntityException.name, () =>
|
|
@@ -415,8 +415,8 @@ export const Role = Resource(
|
|
|
415
415
|
new DeleteRolePolicyCommand({
|
|
416
416
|
RoleName: props.roleName,
|
|
417
417
|
PolicyName: oldPolicy.policyName,
|
|
418
|
-
})
|
|
419
|
-
)
|
|
418
|
+
}),
|
|
419
|
+
),
|
|
420
420
|
);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
@@ -424,7 +424,7 @@ export const Role = Resource(
|
|
|
424
424
|
// Update or create policies
|
|
425
425
|
for (const policy of currentPolicies) {
|
|
426
426
|
const oldPolicy = previousPolicies.find(
|
|
427
|
-
(p) => p.policyName === policy.policyName
|
|
427
|
+
(p) => p.policyName === policy.policyName,
|
|
428
428
|
);
|
|
429
429
|
if (
|
|
430
430
|
!oldPolicy ||
|
|
@@ -436,7 +436,7 @@ export const Role = Resource(
|
|
|
436
436
|
RoleName: props.roleName,
|
|
437
437
|
PolicyName: policy.policyName,
|
|
438
438
|
PolicyDocument: JSON.stringify(policy.policyDocument),
|
|
439
|
-
})
|
|
439
|
+
}),
|
|
440
440
|
);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
@@ -446,7 +446,7 @@ export const Role = Resource(
|
|
|
446
446
|
const attachedPoliciesResponse = await client.send(
|
|
447
447
|
new ListAttachedRolePoliciesCommand({
|
|
448
448
|
RoleName: props.roleName,
|
|
449
|
-
})
|
|
449
|
+
}),
|
|
450
450
|
);
|
|
451
451
|
|
|
452
452
|
const currentAttachedPolicies =
|
|
@@ -464,7 +464,7 @@ export const Role = Resource(
|
|
|
464
464
|
new DetachRolePolicyCommand({
|
|
465
465
|
RoleName: props.roleName,
|
|
466
466
|
PolicyArn: policyArn,
|
|
467
|
-
})
|
|
467
|
+
}),
|
|
468
468
|
);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
@@ -476,7 +476,7 @@ export const Role = Resource(
|
|
|
476
476
|
new AttachRolePolicyCommand({
|
|
477
477
|
RoleName: props.roleName,
|
|
478
478
|
PolicyArn: policyArn,
|
|
479
|
-
})
|
|
479
|
+
}),
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
482
|
}
|
|
@@ -493,5 +493,5 @@ export const Role = Resource(
|
|
|
493
493
|
roleName: role.Role.RoleName ?? props.roleName,
|
|
494
494
|
createDate: role.Role.CreateDate!,
|
|
495
495
|
});
|
|
496
|
-
}
|
|
496
|
+
},
|
|
497
497
|
);
|
package/src/aws/ses.ts
CHANGED
|
@@ -161,7 +161,7 @@ export const SES = Resource(
|
|
|
161
161
|
async function (
|
|
162
162
|
this: Context<SES>,
|
|
163
163
|
id: string,
|
|
164
|
-
props: SESProps
|
|
164
|
+
props: SESProps,
|
|
165
165
|
): Promise<SES> {
|
|
166
166
|
// Create SES client
|
|
167
167
|
const client = new SESv2Client({});
|
|
@@ -180,8 +180,8 @@ export const SES = Resource(
|
|
|
180
180
|
client.send(
|
|
181
181
|
new DeleteConfigurationSetCommand({
|
|
182
182
|
ConfigurationSetName: output.configurationSetName,
|
|
183
|
-
})
|
|
184
|
-
)
|
|
183
|
+
}),
|
|
184
|
+
),
|
|
185
185
|
);
|
|
186
186
|
}
|
|
187
187
|
|
|
@@ -191,8 +191,8 @@ export const SES = Resource(
|
|
|
191
191
|
client.send(
|
|
192
192
|
new DeleteEmailIdentityCommand({
|
|
193
193
|
EmailIdentity: output.emailIdentity,
|
|
194
|
-
})
|
|
195
|
-
)
|
|
194
|
+
}),
|
|
195
|
+
),
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -214,7 +214,7 @@ export const SES = Resource(
|
|
|
214
214
|
await client.send(
|
|
215
215
|
new GetConfigurationSetCommand({
|
|
216
216
|
ConfigurationSetName: props.configurationSetName,
|
|
217
|
-
})
|
|
217
|
+
}),
|
|
218
218
|
);
|
|
219
219
|
configSetExists = true;
|
|
220
220
|
} catch (error) {
|
|
@@ -232,7 +232,7 @@ export const SES = Resource(
|
|
|
232
232
|
new PutConfigurationSetSendingOptionsCommand({
|
|
233
233
|
ConfigurationSetName: props.configurationSetName,
|
|
234
234
|
SendingEnabled: props.sendingOptions.SendingEnabled,
|
|
235
|
-
})
|
|
235
|
+
}),
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -242,7 +242,7 @@ export const SES = Resource(
|
|
|
242
242
|
ConfigurationSetName: props.configurationSetName,
|
|
243
243
|
ReputationMetricsEnabled:
|
|
244
244
|
props.reputationOptions.ReputationMetricsEnabled,
|
|
245
|
-
})
|
|
245
|
+
}),
|
|
246
246
|
);
|
|
247
247
|
}
|
|
248
248
|
|
|
@@ -251,7 +251,7 @@ export const SES = Resource(
|
|
|
251
251
|
new PutConfigurationSetTrackingOptionsCommand({
|
|
252
252
|
ConfigurationSetName: props.configurationSetName,
|
|
253
253
|
CustomRedirectDomain: props.trackingOptions.CustomRedirectDomain,
|
|
254
|
-
})
|
|
254
|
+
}),
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
257
|
|
|
@@ -260,7 +260,7 @@ export const SES = Resource(
|
|
|
260
260
|
new PutConfigurationSetSuppressionOptionsCommand({
|
|
261
261
|
ConfigurationSetName: props.configurationSetName,
|
|
262
262
|
SuppressedReasons: props.suppressionOptions.SuppressedReasons,
|
|
263
|
-
})
|
|
263
|
+
}),
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
|
|
@@ -270,7 +270,7 @@ export const SES = Resource(
|
|
|
270
270
|
ConfigurationSetName: props.configurationSetName,
|
|
271
271
|
TlsPolicy: props.deliveryOptions.TlsPolicy,
|
|
272
272
|
SendingPoolName: props.deliveryOptions.SendingPoolName,
|
|
273
|
-
})
|
|
273
|
+
}),
|
|
274
274
|
);
|
|
275
275
|
}
|
|
276
276
|
|
|
@@ -290,7 +290,7 @@ export const SES = Resource(
|
|
|
290
290
|
Key,
|
|
291
291
|
Value,
|
|
292
292
|
})),
|
|
293
|
-
})
|
|
293
|
+
}),
|
|
294
294
|
);
|
|
295
295
|
|
|
296
296
|
// In SESv2, the ARN isn't directly returned in the response
|
|
@@ -306,7 +306,7 @@ export const SES = Resource(
|
|
|
306
306
|
getIdentityResult = await client.send(
|
|
307
307
|
new GetEmailIdentityCommand({
|
|
308
308
|
EmailIdentity: props.emailIdentity,
|
|
309
|
-
})
|
|
309
|
+
}),
|
|
310
310
|
);
|
|
311
311
|
} catch (error) {
|
|
312
312
|
if (error instanceof NotFoundException) {
|
|
@@ -325,7 +325,7 @@ export const SES = Resource(
|
|
|
325
325
|
Key,
|
|
326
326
|
Value,
|
|
327
327
|
})),
|
|
328
|
-
})
|
|
328
|
+
}),
|
|
329
329
|
);
|
|
330
330
|
|
|
331
331
|
// If it's an email address, we don't need to explicitly verify in v2
|
|
@@ -350,7 +350,7 @@ export const SES = Resource(
|
|
|
350
350
|
new PutEmailIdentityDkimAttributesCommand({
|
|
351
351
|
EmailIdentity: props.emailIdentity,
|
|
352
352
|
SigningEnabled: true,
|
|
353
|
-
})
|
|
353
|
+
}),
|
|
354
354
|
);
|
|
355
355
|
|
|
356
356
|
// We can check the current status of DKIM
|
|
@@ -360,7 +360,7 @@ export const SES = Resource(
|
|
|
360
360
|
const updatedIdentity = await client.send(
|
|
361
361
|
new GetEmailIdentityCommand({
|
|
362
362
|
EmailIdentity: props.emailIdentity,
|
|
363
|
-
})
|
|
363
|
+
}),
|
|
364
364
|
);
|
|
365
365
|
|
|
366
366
|
if (updatedIdentity.DkimAttributes?.Status) {
|
|
@@ -379,5 +379,5 @@ export const SES = Resource(
|
|
|
379
379
|
emailIdentityVerificationStatus,
|
|
380
380
|
dkimVerificationStatus,
|
|
381
381
|
});
|
|
382
|
-
}
|
|
382
|
+
},
|
|
383
383
|
);
|
package/src/aws/table.ts
CHANGED
|
@@ -143,7 +143,7 @@ export const Table = Resource(
|
|
|
143
143
|
async function (
|
|
144
144
|
this: Context<Table>,
|
|
145
145
|
id: string,
|
|
146
|
-
props: TableProps
|
|
146
|
+
props: TableProps,
|
|
147
147
|
): Promise<Table> {
|
|
148
148
|
const client = new DynamoDBClient({});
|
|
149
149
|
|
|
@@ -154,13 +154,13 @@ export const Table = Resource(
|
|
|
154
154
|
client.send(
|
|
155
155
|
new DeleteTableCommand({
|
|
156
156
|
TableName: props.tableName,
|
|
157
|
-
})
|
|
158
|
-
)
|
|
157
|
+
}),
|
|
158
|
+
),
|
|
159
159
|
);
|
|
160
160
|
},
|
|
161
161
|
isRetryableError,
|
|
162
162
|
10, // Max attempts
|
|
163
|
-
200 // Initial delay in ms
|
|
163
|
+
200, // Initial delay in ms
|
|
164
164
|
);
|
|
165
165
|
|
|
166
166
|
// Wait for table to be deleted
|
|
@@ -173,7 +173,7 @@ export const Table = Resource(
|
|
|
173
173
|
await client.send(
|
|
174
174
|
new DescribeTableCommand({
|
|
175
175
|
TableName: props.tableName,
|
|
176
|
-
})
|
|
176
|
+
}),
|
|
177
177
|
);
|
|
178
178
|
// If we get here, table still exists
|
|
179
179
|
retryCount++;
|
|
@@ -191,138 +191,137 @@ export const Table = Resource(
|
|
|
191
191
|
|
|
192
192
|
if (!tableDeleted) {
|
|
193
193
|
throw new Error(
|
|
194
|
-
`Timed out waiting for table ${props.tableName} to be deleted
|
|
194
|
+
`Timed out waiting for table ${props.tableName} to be deleted`,
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
return this.destroy();
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
const keySchema: KeySchemaElement[] = [
|
|
209
|
-
{
|
|
210
|
-
AttributeName: props.partitionKey.name,
|
|
211
|
-
KeyType: "HASH",
|
|
212
|
-
},
|
|
213
|
-
];
|
|
214
|
-
|
|
215
|
-
if (props.sortKey) {
|
|
216
|
-
attributeDefinitions.push({
|
|
217
|
-
AttributeName: props.sortKey.name,
|
|
218
|
-
AttributeType: props.sortKey.type,
|
|
219
|
-
});
|
|
220
|
-
keySchema.push({
|
|
221
|
-
AttributeName: props.sortKey.name,
|
|
222
|
-
KeyType: "RANGE",
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// Attempt to create the table with exponential backoff for ResourceInUseException
|
|
227
|
-
await withExponentialBackoff(
|
|
228
|
-
async () => {
|
|
229
|
-
try {
|
|
230
|
-
// First check if table already exists
|
|
231
|
-
const describeResponse = await client.send(
|
|
232
|
-
new DescribeTableCommand({
|
|
233
|
-
TableName: props.tableName,
|
|
234
|
-
})
|
|
235
|
-
);
|
|
199
|
+
}
|
|
200
|
+
// Setup for table creation
|
|
201
|
+
const attributeDefinitions = [
|
|
202
|
+
{
|
|
203
|
+
AttributeName: props.partitionKey.name,
|
|
204
|
+
AttributeType: props.partitionKey.type,
|
|
205
|
+
},
|
|
206
|
+
];
|
|
236
207
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
208
|
+
const keySchema: KeySchemaElement[] = [
|
|
209
|
+
{
|
|
210
|
+
AttributeName: props.partitionKey.name,
|
|
211
|
+
KeyType: "HASH",
|
|
212
|
+
},
|
|
213
|
+
];
|
|
241
214
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
AttributeDefinitions: attributeDefinitions,
|
|
253
|
-
KeySchema: keySchema,
|
|
254
|
-
BillingMode: props.billingMode || "PAY_PER_REQUEST",
|
|
255
|
-
ProvisionedThroughput:
|
|
256
|
-
props.billingMode === "PROVISIONED"
|
|
257
|
-
? {
|
|
258
|
-
ReadCapacityUnits: props.readCapacity || 5,
|
|
259
|
-
WriteCapacityUnits: props.writeCapacity || 5,
|
|
260
|
-
}
|
|
261
|
-
: undefined,
|
|
262
|
-
Tags: props.tags
|
|
263
|
-
? Object.entries(props.tags).map(([Key, Value]) => ({
|
|
264
|
-
Key,
|
|
265
|
-
Value,
|
|
266
|
-
}))
|
|
267
|
-
: undefined,
|
|
268
|
-
})
|
|
269
|
-
);
|
|
270
|
-
} else {
|
|
271
|
-
throw error;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
isRetryableError,
|
|
276
|
-
10, // Max attempts
|
|
277
|
-
200 // Initial delay in ms
|
|
278
|
-
);
|
|
279
|
-
|
|
280
|
-
// Wait for table to be active with timeout
|
|
281
|
-
let tableActive = false;
|
|
282
|
-
let tableDescription;
|
|
283
|
-
let retryCount = 0;
|
|
284
|
-
const maxRetries = 60; // Wait up to 60 seconds
|
|
215
|
+
if (props.sortKey) {
|
|
216
|
+
attributeDefinitions.push({
|
|
217
|
+
AttributeName: props.sortKey.name,
|
|
218
|
+
AttributeType: props.sortKey.type,
|
|
219
|
+
});
|
|
220
|
+
keySchema.push({
|
|
221
|
+
AttributeName: props.sortKey.name,
|
|
222
|
+
KeyType: "RANGE",
|
|
223
|
+
});
|
|
224
|
+
}
|
|
285
225
|
|
|
286
|
-
|
|
226
|
+
// Attempt to create the table with exponential backoff for ResourceInUseException
|
|
227
|
+
await withExponentialBackoff(
|
|
228
|
+
async () => {
|
|
287
229
|
try {
|
|
288
|
-
|
|
230
|
+
// First check if table already exists
|
|
231
|
+
const describeResponse = await client.send(
|
|
289
232
|
new DescribeTableCommand({
|
|
290
233
|
TableName: props.tableName,
|
|
291
|
-
})
|
|
234
|
+
}),
|
|
292
235
|
);
|
|
293
236
|
|
|
294
|
-
|
|
295
|
-
if (
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
237
|
+
// If table exists and is ACTIVE, no need to create it
|
|
238
|
+
if (describeResponse.Table?.TableStatus === "ACTIVE") {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// If table exists but not ACTIVE, wait for it in the polling loop below
|
|
243
|
+
if (describeResponse.Table) {
|
|
244
|
+
return;
|
|
302
245
|
}
|
|
303
246
|
} catch (error) {
|
|
304
|
-
|
|
305
|
-
|
|
247
|
+
if (error instanceof ResourceNotFoundException) {
|
|
248
|
+
// Table doesn't exist, try to create it
|
|
249
|
+
await client.send(
|
|
250
|
+
new CreateTableCommand({
|
|
251
|
+
TableName: props.tableName,
|
|
252
|
+
AttributeDefinitions: attributeDefinitions,
|
|
253
|
+
KeySchema: keySchema,
|
|
254
|
+
BillingMode: props.billingMode || "PAY_PER_REQUEST",
|
|
255
|
+
ProvisionedThroughput:
|
|
256
|
+
props.billingMode === "PROVISIONED"
|
|
257
|
+
? {
|
|
258
|
+
ReadCapacityUnits: props.readCapacity || 5,
|
|
259
|
+
WriteCapacityUnits: props.writeCapacity || 5,
|
|
260
|
+
}
|
|
261
|
+
: undefined,
|
|
262
|
+
Tags: props.tags
|
|
263
|
+
? Object.entries(props.tags).map(([Key, Value]) => ({
|
|
264
|
+
Key,
|
|
265
|
+
Value,
|
|
266
|
+
}))
|
|
267
|
+
: undefined,
|
|
268
|
+
}),
|
|
269
|
+
);
|
|
270
|
+
} else {
|
|
306
271
|
throw error;
|
|
307
272
|
}
|
|
308
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
309
273
|
}
|
|
310
|
-
}
|
|
274
|
+
},
|
|
275
|
+
isRetryableError,
|
|
276
|
+
10, // Max attempts
|
|
277
|
+
200, // Initial delay in ms
|
|
278
|
+
);
|
|
311
279
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
280
|
+
// Wait for table to be active with timeout
|
|
281
|
+
let tableActive = false;
|
|
282
|
+
let tableDescription;
|
|
283
|
+
let retryCount = 0;
|
|
284
|
+
const maxRetries = 60; // Wait up to 60 seconds
|
|
285
|
+
|
|
286
|
+
while (!tableActive && retryCount < maxRetries) {
|
|
287
|
+
try {
|
|
288
|
+
const response = await client.send(
|
|
289
|
+
new DescribeTableCommand({
|
|
290
|
+
TableName: props.tableName,
|
|
291
|
+
}),
|
|
315
292
|
);
|
|
293
|
+
|
|
294
|
+
tableActive = response.Table?.TableStatus === "ACTIVE";
|
|
295
|
+
if (tableActive) {
|
|
296
|
+
tableDescription = response.Table;
|
|
297
|
+
} else {
|
|
298
|
+
retryCount++;
|
|
299
|
+
// Increasing delay for each retry with some jitter
|
|
300
|
+
const delay = Math.min(1000 * (1 + 0.1 * Math.random()), 5000);
|
|
301
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
302
|
+
}
|
|
303
|
+
} catch (error) {
|
|
304
|
+
retryCount++;
|
|
305
|
+
if (!(error instanceof ResourceNotFoundException)) {
|
|
306
|
+
throw error;
|
|
307
|
+
}
|
|
308
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
316
309
|
}
|
|
310
|
+
}
|
|
317
311
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
tableId: tableDescription!.TableId!,
|
|
323
|
-
});
|
|
312
|
+
if (!tableActive) {
|
|
313
|
+
throw new Error(
|
|
314
|
+
`Timed out waiting for table ${props.tableName} to become active`,
|
|
315
|
+
);
|
|
324
316
|
}
|
|
325
|
-
|
|
317
|
+
|
|
318
|
+
return this({
|
|
319
|
+
...props,
|
|
320
|
+
arn: tableDescription!.TableArn!,
|
|
321
|
+
streamArn: tableDescription!.LatestStreamArn,
|
|
322
|
+
tableId: tableDescription!.TableId!,
|
|
323
|
+
});
|
|
324
|
+
},
|
|
326
325
|
);
|
|
327
326
|
|
|
328
327
|
const retryableErrors = [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { alchemy } from "../alchemy.js";
|
|
2
2
|
import type { Context } from "../context.js";
|
|
3
3
|
import { Resource } from "../resource.js";
|
|
4
|
-
import { Secret } from "../secret.js";
|
|
4
|
+
import type { Secret } from "../secret.js";
|
|
5
5
|
import { sha256 } from "../util/sha256.js";
|
|
6
|
-
import {
|
|
6
|
+
import { type CloudflareApiOptions, createCloudflareApi } from "./api.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Permission group for a token policy
|
|
@@ -223,7 +223,7 @@ export const AccountApiToken = Resource(
|
|
|
223
223
|
async function (
|
|
224
224
|
this: Context<AccountApiToken>,
|
|
225
225
|
id: string,
|
|
226
|
-
props: AccountApiTokenProps
|
|
226
|
+
props: AccountApiTokenProps,
|
|
227
227
|
): Promise<AccountApiToken> {
|
|
228
228
|
// Create Cloudflare API client with automatic account discovery
|
|
229
229
|
const api = await createCloudflareApi(props);
|
|
@@ -233,7 +233,7 @@ export const AccountApiToken = Resource(
|
|
|
233
233
|
if (this.output?.id) {
|
|
234
234
|
try {
|
|
235
235
|
const deleteResponse = await api.delete(
|
|
236
|
-
`/accounts/${api.accountId}/tokens/${this.output.id}
|
|
236
|
+
`/accounts/${api.accountId}/tokens/${this.output.id}`,
|
|
237
237
|
);
|
|
238
238
|
|
|
239
239
|
if (!deleteResponse.ok && deleteResponse.status !== 404) {
|
|
@@ -291,20 +291,20 @@ export const AccountApiToken = Resource(
|
|
|
291
291
|
return dateStr.replace(/\.\d{3}Z$/, "Z");
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
let response;
|
|
295
|
-
let tokenValue;
|
|
294
|
+
let response: Response;
|
|
295
|
+
let tokenValue: Secret | undefined;
|
|
296
296
|
|
|
297
297
|
if (this.phase === "update" && this.output?.id) {
|
|
298
298
|
// Update existing token
|
|
299
299
|
response = await api.put(
|
|
300
300
|
`/accounts/${api.accountId}/tokens/${this.output.id}`,
|
|
301
|
-
apiPayload
|
|
301
|
+
apiPayload,
|
|
302
302
|
);
|
|
303
303
|
} else {
|
|
304
304
|
// Create new token
|
|
305
305
|
response = await api.post(
|
|
306
306
|
`/accounts/${api.accountId}/tokens`,
|
|
307
|
-
apiPayload
|
|
307
|
+
apiPayload,
|
|
308
308
|
);
|
|
309
309
|
}
|
|
310
310
|
|
|
@@ -316,7 +316,7 @@ export const AccountApiToken = Resource(
|
|
|
316
316
|
throw new Error(
|
|
317
317
|
`Error ${this.phase === "update" ? "updating" : "creating"} token '${props.name}': ${
|
|
318
318
|
errorData.errors?.[0]?.message || response.statusText
|
|
319
|
-
}
|
|
319
|
+
}`,
|
|
320
320
|
);
|
|
321
321
|
}
|
|
322
322
|
|
|
@@ -328,7 +328,7 @@ export const AccountApiToken = Resource(
|
|
|
328
328
|
} else {
|
|
329
329
|
if (!this.output?.value) {
|
|
330
330
|
throw new Error(
|
|
331
|
-
`Token '${props.name}' was created but we have no record of its value. Try deleting and recreating the token
|
|
331
|
+
`Token '${props.name}' was created but we have no record of its value. Try deleting and recreating the token.`,
|
|
332
332
|
);
|
|
333
333
|
}
|
|
334
334
|
tokenValue = this.output?.value;
|
|
@@ -365,5 +365,5 @@ export const AccountApiToken = Resource(
|
|
|
365
365
|
accessKeyId: tokenData.id,
|
|
366
366
|
secretAccessKey: sha256(tokenValue.unencrypted),
|
|
367
367
|
});
|
|
368
|
-
}
|
|
368
|
+
},
|
|
369
369
|
);
|