@alienplatform/core 2.1.6 → 3.0.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/dist/index.d.ts +213 -132
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1246,7 +1246,7 @@ const AwsEmailDomainImportDataSchema = z$2.object({ get "dkimTokens"() {
|
|
|
1246
1246
|
z$2.object({
|
|
1247
1247
|
"configurationSet": z$2.string().describe("SES configuration set name (used when sending)."),
|
|
1248
1248
|
"domains": z$2.object({}).catchall(z$2.lazy(() => AwsEmailDomainImportDataSchema).describe("Per-domain import payload for an AWS Email resource.")).describe("Per-seed-domain DNS data, keyed by mail domain."),
|
|
1249
|
-
"ruleSetName": z$2.string().describe("SES receipt rule set name, present only when inbound mail is
|
|
1249
|
+
"ruleSetName": z$2.string().describe("SES receipt rule set name, present only when inbound mail is configured.").nullish()
|
|
1250
1250
|
}).describe("AWS Email ImportData.\n\nMirrors the `emit_import_ref` payload of the AWS SES email emitter: the\nshared configuration set name, one entry per seed domain carrying its\nEasy-DKIM CNAME records, and — when inbound mail is configured — the\nreceipt rule set name. Identities created at runtime through the\n`email/manage-identities` grant are application data and never appear\nhere.");
|
|
1251
1251
|
//#endregion
|
|
1252
1252
|
//#region src/generated/zod/aws-failure-domain-subnets-schema.ts
|
|
@@ -1389,6 +1389,36 @@ const AwsNetworkImportDataSchema = z$2.object({
|
|
|
1389
1389
|
"vpcId": z$2.string().describe("VPC ID. Absent when default-VPC mode defers lookup to AWS at runtime.").nullish()
|
|
1390
1390
|
}).describe("AWS Network ImportData.");
|
|
1391
1391
|
//#endregion
|
|
1392
|
+
//#region src/generated/zod/aws-open-search-capacity-range-schema.ts
|
|
1393
|
+
/**
|
|
1394
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
1395
|
+
* Do not edit manually.
|
|
1396
|
+
*/
|
|
1397
|
+
/**
|
|
1398
|
+
* @description Minimum and maximum OCU bounds for one OpenSearch compute component.
|
|
1399
|
+
*/
|
|
1400
|
+
const AwsOpenSearchCapacityRangeSchema = z$2.object({
|
|
1401
|
+
"maxOcu": z$2.int().min(2).max(1696).describe("Maximum OCUs the component may scale to.").nullish(),
|
|
1402
|
+
"minOcu": z$2.int().min(0).max(1696).describe("Minimum OCUs kept available. Zero enables scale-to-zero.").nullish()
|
|
1403
|
+
}).describe("Minimum and maximum OCU bounds for one OpenSearch compute component.");
|
|
1404
|
+
//#endregion
|
|
1405
|
+
//#region src/generated/zod/aws-open-search-capacity-schema.ts
|
|
1406
|
+
/**
|
|
1407
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
1408
|
+
* Do not edit manually.
|
|
1409
|
+
*/
|
|
1410
|
+
/**
|
|
1411
|
+
* @description Indexing and search capacity limits for an OpenSearch collection group.
|
|
1412
|
+
*/
|
|
1413
|
+
const AwsOpenSearchCapacitySchema = z$2.object({
|
|
1414
|
+
get "indexing"() {
|
|
1415
|
+
return z$2.union([AwsOpenSearchCapacityRangeSchema, z$2.null()]).optional();
|
|
1416
|
+
},
|
|
1417
|
+
get "search"() {
|
|
1418
|
+
return z$2.union([AwsOpenSearchCapacityRangeSchema, z$2.null()]).optional();
|
|
1419
|
+
}
|
|
1420
|
+
}).describe("Indexing and search capacity limits for an OpenSearch collection group.");
|
|
1421
|
+
//#endregion
|
|
1392
1422
|
//#region src/generated/zod/aws-open-search-collection-type-schema.ts
|
|
1393
1423
|
/**
|
|
1394
1424
|
* Generated by Kubb (https://kubb.dev/).
|
|
@@ -1415,14 +1445,17 @@ z$2.object({
|
|
|
1415
1445
|
* Do not edit manually.
|
|
1416
1446
|
*/
|
|
1417
1447
|
/**
|
|
1418
|
-
* @description An Amazon OpenSearch Serverless collection (next generation).\n\n# Experimental namespace\n\nThis is the first resource under the `experimental/` resource-type\nnamespace. Experimental resources are provider-specific (they do not\nabstract over clouds), may change or be promoted to a portable resource\nin a breaking way, and are only registered for the platforms they\nsupport. `AwsOpenSearch` registers an AWS CloudFormation emitter only;\ndeploying it to any other platform fails with a typed\n`ImportRegistrationMissing` error at generation time.\n\n# What gets provisioned\n\nThe AWS emitter provisions next-generation OpenSearch Serverless:\na collection group (`Generation: NEXTGEN`, compute/storage decoupled
|
|
1448
|
+
* @description An Amazon OpenSearch Serverless collection (next generation).\n\n# Experimental namespace\n\nThis is the first resource under the `experimental/` resource-type\nnamespace. Experimental resources are provider-specific (they do not\nabstract over clouds), may change or be promoted to a portable resource\nin a breaking way, and are only registered for the platforms they\nsupport. `AwsOpenSearch` registers an AWS CloudFormation emitter only;\ndeploying it to any other platform fails with a typed\n`ImportRegistrationMissing` error at generation time.\n\n# What gets provisioned\n\nThe AWS emitter provisions next-generation OpenSearch Serverless:\na collection group (`Generation: NEXTGEN`, compute/storage decoupled)\nplus a collection inside it, an AWS-owned-key encryption configuration,\na public network policy, and a data-access policy for service-account\nroles granted `experimental/aws-opensearch/data-access`. Collection groups\nscale to zero by default; configure a non-zero minimum capacity when the\nworkload requires predictable interactive latency.\nThe collection endpoint is public but every request must be SigV4-signed\nand pass both IAM (`aoss:APIAccessAll`) and the data-access policy.\n\n# Naming\n\nThe physical collection (and collection group) name is\n`{id}-{stack-suffix}` and must satisfy the AOSS name grammar, so `id`\nmust match `[a-z][a-z0-9-]*` and be at most 23 characters. The emitter\nrejects ids that don\'t fit.\n\n# Runtime access\n\nWorkers reach the collection over HTTPS with SigV4. The SigV4 signing\nservice name for OpenSearch Serverless is `aoss` (not `es`); the runtime\nbinding payload carries `\"service\": \"aoss\"` so clients sign correctly.\nRequests with a body must also send an `x-amz-content-sha256` header\n(the AOSS gateway rejects body-carrying requests without it with an\nempty 403); official OpenSearch clients with an `aoss` signer handle\nthis automatically.
|
|
1419
1449
|
*/
|
|
1420
1450
|
const AwsOpenSearchSchema = z$2.object({
|
|
1451
|
+
get "capacity"() {
|
|
1452
|
+
return z$2.union([AwsOpenSearchCapacitySchema, z$2.null()]).optional();
|
|
1453
|
+
},
|
|
1421
1454
|
get "collectionType"() {
|
|
1422
1455
|
return AwsOpenSearchCollectionTypeSchema.describe("Workload type for an OpenSearch Serverless collection.\n\n`TIMESERIES` is intentionally not exposed: next-generation serverless\nscale-to-zero targets search and vector workloads.").optional();
|
|
1423
1456
|
},
|
|
1424
1457
|
"id": z$2.string().describe("Identifier for the collection. Becomes part of the physical collection\nname, so it must match `[a-z][a-z0-9-]*` and be at most 23 characters.")
|
|
1425
|
-
}).describe("An Amazon OpenSearch Serverless collection (next generation).\n\n# Experimental namespace\n\nThis is the first resource under the `experimental/` resource-type\nnamespace. Experimental resources are provider-specific (they do not\nabstract over clouds), may change or be promoted to a portable resource\nin a breaking way, and are only registered for the platforms they\nsupport. `AwsOpenSearch` registers an AWS CloudFormation emitter only;\ndeploying it to any other platform fails with a typed\n`ImportRegistrationMissing` error at generation time.\n\n# What gets provisioned\n\nThe AWS emitter provisions next-generation OpenSearch Serverless:\na collection group (`Generation: NEXTGEN`, compute/storage decoupled
|
|
1458
|
+
}).describe("An Amazon OpenSearch Serverless collection (next generation).\n\n# Experimental namespace\n\nThis is the first resource under the `experimental/` resource-type\nnamespace. Experimental resources are provider-specific (they do not\nabstract over clouds), may change or be promoted to a portable resource\nin a breaking way, and are only registered for the platforms they\nsupport. `AwsOpenSearch` registers an AWS CloudFormation emitter only;\ndeploying it to any other platform fails with a typed\n`ImportRegistrationMissing` error at generation time.\n\n# What gets provisioned\n\nThe AWS emitter provisions next-generation OpenSearch Serverless:\na collection group (`Generation: NEXTGEN`, compute/storage decoupled)\nplus a collection inside it, an AWS-owned-key encryption configuration,\na public network policy, and a data-access policy for service-account\nroles granted `experimental/aws-opensearch/data-access`. Collection groups\nscale to zero by default; configure a non-zero minimum capacity when the\nworkload requires predictable interactive latency.\nThe collection endpoint is public but every request must be SigV4-signed\nand pass both IAM (`aoss:APIAccessAll`) and the data-access policy.\n\n# Naming\n\nThe physical collection (and collection group) name is\n`{id}-{stack-suffix}` and must satisfy the AOSS name grammar, so `id`\nmust match `[a-z][a-z0-9-]*` and be at most 23 characters. The emitter\nrejects ids that don't fit.\n\n# Runtime access\n\nWorkers reach the collection over HTTPS with SigV4. The SigV4 signing\nservice name for OpenSearch Serverless is `aoss` (not `es`); the runtime\nbinding payload carries `\"service\": \"aoss\"` so clients sign correctly.\nRequests with a body must also send an `x-amz-content-sha256` header\n(the AOSS gateway rejects body-carrying requests without it with an\nempty 403); official OpenSearch clients with an `aoss` signer handle\nthis automatically.");
|
|
1426
1459
|
//#endregion
|
|
1427
1460
|
//#region src/generated/zod/vault-heartbeat-status-schema.ts
|
|
1428
1461
|
/**
|
|
@@ -4410,7 +4443,7 @@ const EmailInboundSchema = z$2.object({ get "storage"() {
|
|
|
4410
4443
|
z$2.object({
|
|
4411
4444
|
"configurationSet": z$2.string().describe("The provisioned configuration set name (used when sending)."),
|
|
4412
4445
|
"domains": z$2.object({}).catchall(z$2.lazy(() => EmailDomainOutputsSchema).describe("Per-domain DNS records the operator must create.")).describe("DNS records per mail domain."),
|
|
4413
|
-
"ruleSetName": z$2.string().describe("The inbound receipt rule set name, when `inbound` is configured
|
|
4446
|
+
"ruleSetName": z$2.string().describe("The inbound receipt rule set name, when `inbound` is configured.").nullish()
|
|
4414
4447
|
}).describe("Outputs generated by a successfully provisioned Email resource.\n\nDomain verification status cannot be known at provisioning time — SES\nverifies a domain asynchronously once its DKIM records exist in DNS — so\nthe outputs carry the records the operator must create rather than a\nverification result.");
|
|
4415
4448
|
//#endregion
|
|
4416
4449
|
//#region src/generated/zod/email-schema.ts
|
|
@@ -4419,7 +4452,7 @@ z$2.object({
|
|
|
4419
4452
|
* Do not edit manually.
|
|
4420
4453
|
*/
|
|
4421
4454
|
/**
|
|
4422
|
-
* @description Email infrastructure for sending and receiving mail on customer-owned\ndomains. On AWS this is backed by SES: a shared configuration set, optional\ninbound/event wiring, and one email identity (Easy DKIM) per seed domain.\n\n# Infrastructure vs runtime data\n\nThis resource owns the email *infrastructure* and the capability to use it,\nnot the domain lifecycle. Deployment manages the configuration set, the\nevent topology, the inbound receipt topology, and any seed identities\nlisted in `domains`. Email identities created at runtime through the\n`email/manage-identities` grant are application data: they are not tracked\nby the deployment, are not removed when the stack is deleted, and their\nlifecycle — including deletion — belongs to the application.\n\nThe operator (or the application, for runtime-created identities) owns DNS:\nthe per-domain DKIM CNAME records surfaced in [`EmailOutputs`] must be\ncreated before SES verifies a domain and allows sending from it.\n\n# Inbound mail (AWS)\n\nWhen `inbound` is set, a SES receipt rule set is provisioned that writes\nraw incoming mail into the linked Storage bucket. The receipt rule is a\ncatch-all (no recipient filter), so mail for identities verified at runtime\nlands in the bucket without any infrastructure change
|
|
4455
|
+
* @description Email infrastructure for sending and receiving mail on customer-owned\ndomains. On AWS this is backed by SES: a shared configuration set, optional\ninbound/event wiring, and one email identity (Easy DKIM) per seed domain.\n\n# Infrastructure vs runtime data\n\nThis resource owns the email *infrastructure* and the capability to use it,\nnot the domain lifecycle. Deployment manages the configuration set, the\nevent topology, the inbound receipt topology, and any seed identities\nlisted in `domains`. Email identities created at runtime through the\n`email/manage-identities` grant are application data: they are not tracked\nby the deployment, are not removed when the stack is deleted, and their\nlifecycle — including deletion — belongs to the application.\n\nThe operator (or the application, for runtime-created identities) owns DNS:\nthe per-domain DKIM CNAME records surfaced in [`EmailOutputs`] must be\ncreated before SES verifies a domain and allows sending from it.\n\n# Inbound mail (AWS)\n\nWhen `inbound` is set, a SES receipt rule set is provisioned that writes\nraw incoming mail into the linked Storage bucket. The receipt rule is a\ncatch-all (no recipient filter), so mail for identities verified at runtime\nlands in the bucket without any infrastructure change.\n\nAlien activates the provisioned receipt rule set as part of setup. Because\nSES permits only one active receipt rule set per AWS account and region, an\nAWS stack may contain only one email resource with inbound delivery, and\ninstalling it makes its rule set the account\'s active rule set. SES email\nreceiving is available only in a subset of AWS regions; deploying `inbound`\nto an unsupported region fails during setup.\n\n# Update semantics\n\n`domains` is append-friendly: adding a domain provisions a new identity,\nremoving a domain deletes its identity (and its DKIM verification state).\nThe list may be empty. `inbound` and `events` may be added, removed, or\nrepointed; removing them tears down the corresponding receipt rule set /\nevent destination wiring.
|
|
4423
4456
|
*/
|
|
4424
4457
|
const EmailSchema = z$2.object({
|
|
4425
4458
|
"domains": z$2.optional(z$2.array(z$2.string()).describe("Seed mail domains provisioned at deploy time (one SES identity each).\nUseful for day-0 bootstrap and products with a static domain set.\nMay be empty (the default): products that create and verify domains\ndynamically should manage identities at runtime through the\n`email/manage-identities` grant instead of listing them here.")),
|
|
@@ -4430,7 +4463,7 @@ const EmailSchema = z$2.object({
|
|
|
4430
4463
|
get "inbound"() {
|
|
4431
4464
|
return z$2.union([EmailInboundSchema, z$2.null()]).optional();
|
|
4432
4465
|
}
|
|
4433
|
-
}).describe("Email infrastructure for sending and receiving mail on customer-owned\ndomains. On AWS this is backed by SES: a shared configuration set, optional\ninbound/event wiring, and one email identity (Easy DKIM) per seed domain.\n\n# Infrastructure vs runtime data\n\nThis resource owns the email *infrastructure* and the capability to use it,\nnot the domain lifecycle. Deployment manages the configuration set, the\nevent topology, the inbound receipt topology, and any seed identities\nlisted in `domains`. Email identities created at runtime through the\n`email/manage-identities` grant are application data: they are not tracked\nby the deployment, are not removed when the stack is deleted, and their\nlifecycle — including deletion — belongs to the application.\n\nThe operator (or the application, for runtime-created identities) owns DNS:\nthe per-domain DKIM CNAME records surfaced in [`EmailOutputs`] must be\ncreated before SES verifies a domain and allows sending from it.\n\n# Inbound mail (AWS)\n\nWhen `inbound` is set, a SES receipt rule set is provisioned that writes\nraw incoming mail into the linked Storage bucket. The receipt rule is a\ncatch-all (no recipient filter), so mail for identities verified at runtime\nlands in the bucket without any infrastructure change
|
|
4466
|
+
}).describe("Email infrastructure for sending and receiving mail on customer-owned\ndomains. On AWS this is backed by SES: a shared configuration set, optional\ninbound/event wiring, and one email identity (Easy DKIM) per seed domain.\n\n# Infrastructure vs runtime data\n\nThis resource owns the email *infrastructure* and the capability to use it,\nnot the domain lifecycle. Deployment manages the configuration set, the\nevent topology, the inbound receipt topology, and any seed identities\nlisted in `domains`. Email identities created at runtime through the\n`email/manage-identities` grant are application data: they are not tracked\nby the deployment, are not removed when the stack is deleted, and their\nlifecycle — including deletion — belongs to the application.\n\nThe operator (or the application, for runtime-created identities) owns DNS:\nthe per-domain DKIM CNAME records surfaced in [`EmailOutputs`] must be\ncreated before SES verifies a domain and allows sending from it.\n\n# Inbound mail (AWS)\n\nWhen `inbound` is set, a SES receipt rule set is provisioned that writes\nraw incoming mail into the linked Storage bucket. The receipt rule is a\ncatch-all (no recipient filter), so mail for identities verified at runtime\nlands in the bucket without any infrastructure change.\n\nAlien activates the provisioned receipt rule set as part of setup. Because\nSES permits only one active receipt rule set per AWS account and region, an\nAWS stack may contain only one email resource with inbound delivery, and\ninstalling it makes its rule set the account's active rule set. SES email\nreceiving is available only in a subset of AWS regions; deploying `inbound`\nto an unsupported region fails during setup.\n\n# Update semantics\n\n`domains` is append-friendly: adding a domain provisions a new identity,\nremoving a domain deletes its identity (and its DKIM verification state).\nThe list may be empty. `inbound` and `events` may be added, removed, or\nrepointed; removing them tears down the corresponding receipt rule set /\nevent destination wiring.");
|
|
4434
4467
|
//#endregion
|
|
4435
4468
|
//#region src/generated/zod/response-handling-schema.ts
|
|
4436
4469
|
/**
|
|
@@ -6072,6 +6105,7 @@ const ResourceEntrySchema = z$2.object({
|
|
|
6072
6105
|
get "dependencies"() {
|
|
6073
6106
|
return z$2.array(ResourceRefSchema.describe("Reference to a resource by its stable id and resource type.")).describe("Additional dependencies for this resource beyond those defined in the resource itself.\nThe total dependencies are: resource.get_dependencies() + this list");
|
|
6074
6107
|
},
|
|
6108
|
+
"enabledWhen": z$2.string().describe("Id of the boolean stack input that decides whether this resource is\ncreated at all. `None` means always create it.\n\nSet by `.enabled(input)` in the SDK. Setup emitters render the resource\nconditionally on the matching template variable, so a deployer who says no\nnever gets the resource, its outputs, or anything derived from it.").nullish(),
|
|
6075
6109
|
get "lifecycle"() {
|
|
6076
6110
|
return ResourceLifecycleSchema.describe("Describes the lifecycle of a resource within a stack, determining how it's managed and deployed.");
|
|
6077
6111
|
},
|
|
@@ -6675,6 +6709,7 @@ const StorageOutputsSchema = z$2.object({ "bucketName": z$2.string().describe("T
|
|
|
6675
6709
|
* @description Represents an object storage bucket.
|
|
6676
6710
|
*/
|
|
6677
6711
|
const StorageSchema = z$2.object({
|
|
6712
|
+
"corsAllowedOrigins": z$2.optional(z$2.array(z$2.string()).describe("Browser origins allowed to read objects through signed URLs.\n\nWhen non-empty, providers configure CORS for `GET` and `HEAD` requests.\nAn origin of `*` is appropriate for private buckets whose signed URLs\nare bearer credentials and do not use browser cookies.\nDefault: `[]` (CORS disabled).")),
|
|
6678
6713
|
"id": z$2.string().describe("Name of the the storage bucket.\nFor names with dots, each dot-separated label must be ≤ 63 characters."),
|
|
6679
6714
|
get "lifecycleRules"() {
|
|
6680
6715
|
return z$2.array(LifecycleRuleSchema.describe("Defines a rule for managing the lifecycle of objects within a storage bucket.")).describe("List of rules for automatic object management (e.g., expiration).\nDefault: `[]` (empty list)").optional();
|
|
@@ -6833,7 +6868,7 @@ const WorkerSchema = z$2.object({
|
|
|
6833
6868
|
get "links"() {
|
|
6834
6869
|
return z$2.array(ResourceRefSchema.describe("Reference to a resource by its stable id and resource type.")).describe("List of resource references this worker depends on.");
|
|
6835
6870
|
},
|
|
6836
|
-
"memoryMb": z$2.optional(z$2.int().min(0).default(
|
|
6871
|
+
"memoryMb": z$2.optional(z$2.int().min(0).default(512).describe("Memory allocated to the worker in megabytes (MB).\nDefault: 512\n\nPlatform-specific constraints:\n- **AWS Lambda**: 128–10240 MB in 1 MB increments\n- **GCP Cloud Run**: 128–32768 MB\n- **Azure Container Apps**: fixed CPU/memory pairs — 512, 1024, 1536, 2048, 2560,\n 3072, 3584, 4096 MB. Values below 512 are automatically rounded up at deploy time.")),
|
|
6837
6872
|
"permissions": z$2.string().describe("Permission profile name that defines the permissions granted to this worker.\nThis references a profile defined in the stack's permission definitions."),
|
|
6838
6873
|
get "publicEndpoints"() {
|
|
6839
6874
|
return z$2.array(WorkerPublicEndpointSchema.describe("Public endpoint configuration for Worker resources.")).describe("Public endpoints exposed by this worker.").optional();
|
|
@@ -6857,9 +6892,11 @@ var Resource = class {
|
|
|
6857
6892
|
/**
|
|
6858
6893
|
* Creates a new Resource instance.
|
|
6859
6894
|
* @param config The configuration object for this specific resource type.
|
|
6895
|
+
* @param enabledWhen Id of the boolean stack input gating this resource's creation.
|
|
6860
6896
|
*/
|
|
6861
|
-
constructor(config) {
|
|
6897
|
+
constructor(config, enabledWhen) {
|
|
6862
6898
|
this.config = config;
|
|
6899
|
+
if (enabledWhen !== void 0) this.enabledWhen = enabledWhen;
|
|
6863
6900
|
}
|
|
6864
6901
|
/**
|
|
6865
6902
|
* Returns a reference to this resource.
|
|
@@ -6873,22 +6910,52 @@ var Resource = class {
|
|
|
6873
6910
|
};
|
|
6874
6911
|
}
|
|
6875
6912
|
};
|
|
6913
|
+
/**
|
|
6914
|
+
* Base class for the per-resource builders, giving every resource type the same
|
|
6915
|
+
* `.enabled()` gate without each builder reimplementing it.
|
|
6916
|
+
*/
|
|
6917
|
+
var ResourceBuilder = class {
|
|
6918
|
+
_enabledWhen;
|
|
6919
|
+
/**
|
|
6920
|
+
* Creates this resource only when the given boolean stack input is true.
|
|
6921
|
+
* A deployer who answers no never gets the resource, its outputs, or anything derived from it.
|
|
6922
|
+
* A frozen resource's answer is fixed when the deployment is created; a live
|
|
6923
|
+
* resource follows later edits to the input, and turning it off deletes the
|
|
6924
|
+
* resource together with its data.
|
|
6925
|
+
* @param input A boolean stack input declared with alien.inputs({...}).
|
|
6926
|
+
* @returns The builder instance.
|
|
6927
|
+
*/
|
|
6928
|
+
enabled(input) {
|
|
6929
|
+
this._enabledWhen = input.id;
|
|
6930
|
+
return this;
|
|
6931
|
+
}
|
|
6932
|
+
/**
|
|
6933
|
+
* Carries the `.enabled()` gate into the Resource.
|
|
6934
|
+
* @param config The validated configuration for this resource type.
|
|
6935
|
+
* @returns An immutable Resource.
|
|
6936
|
+
*/
|
|
6937
|
+
resource(config) {
|
|
6938
|
+
return new Resource(config, this._enabledWhen);
|
|
6939
|
+
}
|
|
6940
|
+
};
|
|
6876
6941
|
//#endregion
|
|
6877
6942
|
//#region src/storage.ts
|
|
6878
6943
|
/**
|
|
6879
6944
|
* Represents an object storage bucket.
|
|
6880
6945
|
*/
|
|
6881
|
-
var Storage = class {
|
|
6946
|
+
var Storage = class extends ResourceBuilder {
|
|
6882
6947
|
_config = {
|
|
6883
6948
|
publicRead: false,
|
|
6884
6949
|
versioning: false,
|
|
6885
|
-
lifecycleRules: []
|
|
6950
|
+
lifecycleRules: [],
|
|
6951
|
+
corsAllowedOrigins: []
|
|
6886
6952
|
};
|
|
6887
6953
|
/**
|
|
6888
6954
|
* Creates a new Storage builder.
|
|
6889
6955
|
* @param id ID of the storage bucket. For names with dots, each dot-separated label must be ≤ 63 characters.
|
|
6890
6956
|
*/
|
|
6891
6957
|
constructor(id) {
|
|
6958
|
+
super();
|
|
6892
6959
|
this._config.id = id;
|
|
6893
6960
|
}
|
|
6894
6961
|
/**
|
|
@@ -6929,14 +6996,26 @@ var Storage = class {
|
|
|
6929
6996
|
return this;
|
|
6930
6997
|
}
|
|
6931
6998
|
/**
|
|
6999
|
+
* Allows browser reads from the listed origins through signed URLs.
|
|
7000
|
+
* Providers enable `GET` and `HEAD`; use `*` only when the signed URL itself
|
|
7001
|
+
* is the credential and browser cookies are not involved.
|
|
7002
|
+
* @param origins Allowed browser origins.
|
|
7003
|
+
* @returns The Storage builder instance.
|
|
7004
|
+
*/
|
|
7005
|
+
corsAllowedOrigins(origins) {
|
|
7006
|
+
this._config.corsAllowedOrigins = origins;
|
|
7007
|
+
return this;
|
|
7008
|
+
}
|
|
7009
|
+
/**
|
|
6932
7010
|
* Builds and validates the storage configuration.
|
|
6933
7011
|
* @returns An immutable Resource representing the configured storage bucket.
|
|
6934
7012
|
* @throws Error if the storage configuration is invalid.
|
|
6935
7013
|
*/
|
|
6936
7014
|
build() {
|
|
6937
|
-
|
|
7015
|
+
const config = StorageSchema.parse(this._config);
|
|
7016
|
+
return this.resource({
|
|
6938
7017
|
type: "storage",
|
|
6939
|
-
...
|
|
7018
|
+
...config
|
|
6940
7019
|
});
|
|
6941
7020
|
}
|
|
6942
7021
|
};
|
|
@@ -6980,7 +7059,7 @@ var Worker = class {
|
|
|
6980
7059
|
/**
|
|
6981
7060
|
* Sets the memory allocated to the worker in megabytes (MB).
|
|
6982
7061
|
* Constraints: 128‑32768 MB (platform-specific limits may apply).
|
|
6983
|
-
* Default:
|
|
7062
|
+
* Default: 512 MB.
|
|
6984
7063
|
* @param mb The memory in MB.
|
|
6985
7064
|
* @returns The Worker builder instance.
|
|
6986
7065
|
*/
|
|
@@ -7928,13 +8007,14 @@ var ArtifactRegistry = class {
|
|
|
7928
8007
|
*
|
|
7929
8008
|
* The vault acts as a namespace for secrets and controls access permissions for workers and services.
|
|
7930
8009
|
*/
|
|
7931
|
-
var Vault = class {
|
|
8010
|
+
var Vault = class extends ResourceBuilder {
|
|
7932
8011
|
_config = {};
|
|
7933
8012
|
/**
|
|
7934
8013
|
* Creates a new Vault builder.
|
|
7935
8014
|
* @param id Identifier for the vault. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
|
|
7936
8015
|
*/
|
|
7937
8016
|
constructor(id) {
|
|
8017
|
+
super();
|
|
7938
8018
|
this._config.id = id;
|
|
7939
8019
|
}
|
|
7940
8020
|
/**
|
|
@@ -7951,9 +8031,10 @@ var Vault = class {
|
|
|
7951
8031
|
* @throws Error if the vault configuration is invalid.
|
|
7952
8032
|
*/
|
|
7953
8033
|
build() {
|
|
7954
|
-
|
|
8034
|
+
const config = VaultSchema.parse(this._config);
|
|
8035
|
+
return this.resource({
|
|
7955
8036
|
type: "vault",
|
|
7956
|
-
...
|
|
8037
|
+
...config
|
|
7957
8038
|
});
|
|
7958
8039
|
}
|
|
7959
8040
|
};
|
|
@@ -7991,13 +8072,14 @@ var Vault = class {
|
|
|
7991
8072
|
* - Clients must de-duplicate keys across pages
|
|
7992
8073
|
* - No completeness guarantee under concurrent writes
|
|
7993
8074
|
*/
|
|
7994
|
-
var Kv = class {
|
|
8075
|
+
var Kv = class extends ResourceBuilder {
|
|
7995
8076
|
_config = {};
|
|
7996
8077
|
/**
|
|
7997
8078
|
* Creates a new KV builder.
|
|
7998
8079
|
* @param id Identifier for the KV store. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
|
|
7999
8080
|
*/
|
|
8000
8081
|
constructor(id) {
|
|
8082
|
+
super();
|
|
8001
8083
|
this._config.id = id;
|
|
8002
8084
|
}
|
|
8003
8085
|
/**
|
|
@@ -8014,9 +8096,10 @@ var Kv = class {
|
|
|
8014
8096
|
* @throws Error if the KV configuration is invalid.
|
|
8015
8097
|
*/
|
|
8016
8098
|
build() {
|
|
8017
|
-
|
|
8099
|
+
const config = KvSchema.parse(this._config);
|
|
8100
|
+
return this.resource({
|
|
8018
8101
|
type: "kv",
|
|
8019
|
-
...
|
|
8102
|
+
...config
|
|
8020
8103
|
});
|
|
8021
8104
|
}
|
|
8022
8105
|
};
|
|
@@ -8026,7 +8109,7 @@ var Kv = class {
|
|
|
8026
8109
|
* Represents a managed PostgreSQL database. The target platform decides the backend;
|
|
8027
8110
|
* the database is private and reachable only by same-stack workloads.
|
|
8028
8111
|
*/
|
|
8029
|
-
var Postgres = class {
|
|
8112
|
+
var Postgres = class extends ResourceBuilder {
|
|
8030
8113
|
_config = {
|
|
8031
8114
|
version: "17",
|
|
8032
8115
|
storage: "20Gi",
|
|
@@ -8037,6 +8120,7 @@ var Postgres = class {
|
|
|
8037
8120
|
* @param id ID of the database. A database of this name is created on the server.
|
|
8038
8121
|
*/
|
|
8039
8122
|
constructor(id) {
|
|
8123
|
+
super();
|
|
8040
8124
|
this._config.id = id;
|
|
8041
8125
|
}
|
|
8042
8126
|
/**
|
|
@@ -8103,9 +8187,10 @@ var Postgres = class {
|
|
|
8103
8187
|
* @throws Error if the configuration is invalid.
|
|
8104
8188
|
*/
|
|
8105
8189
|
build() {
|
|
8106
|
-
|
|
8190
|
+
const config = PostgresSchema.parse(this._config);
|
|
8191
|
+
return this.resource({
|
|
8107
8192
|
type: "postgres",
|
|
8108
|
-
...
|
|
8193
|
+
...config
|
|
8109
8194
|
});
|
|
8110
8195
|
}
|
|
8111
8196
|
};
|
|
@@ -8115,13 +8200,14 @@ var Postgres = class {
|
|
|
8115
8200
|
* Represents a message queue resource with minimal, portable semantics.
|
|
8116
8201
|
* Queue integrates with platform-native services (AWS SQS, GCP Pub/Sub, Azure Service Bus).
|
|
8117
8202
|
*/
|
|
8118
|
-
var Queue = class {
|
|
8203
|
+
var Queue = class extends ResourceBuilder {
|
|
8119
8204
|
_config = {};
|
|
8120
8205
|
/**
|
|
8121
8206
|
* Creates a new Queue builder.
|
|
8122
8207
|
* @param id Identifier for the queue. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
|
|
8123
8208
|
*/
|
|
8124
8209
|
constructor(id) {
|
|
8210
|
+
super();
|
|
8125
8211
|
this._config.id = id;
|
|
8126
8212
|
}
|
|
8127
8213
|
/**
|
|
@@ -8138,9 +8224,10 @@ var Queue = class {
|
|
|
8138
8224
|
* @throws Error if the queue configuration is invalid.
|
|
8139
8225
|
*/
|
|
8140
8226
|
build() {
|
|
8141
|
-
|
|
8227
|
+
const config = QueueSchema.parse(this._config);
|
|
8228
|
+
return this.resource({
|
|
8142
8229
|
type: "queue",
|
|
8143
|
-
...
|
|
8230
|
+
...config
|
|
8144
8231
|
});
|
|
8145
8232
|
}
|
|
8146
8233
|
};
|
|
@@ -8163,10 +8250,10 @@ var Queue = class {
|
|
|
8163
8250
|
*
|
|
8164
8251
|
* When inbound mail is configured, the receipt rule is a catch-all (no
|
|
8165
8252
|
* recipient filter), so mail for runtime-verified identities lands in the
|
|
8166
|
-
* bucket without redeployment.
|
|
8167
|
-
*
|
|
8168
|
-
*
|
|
8169
|
-
*
|
|
8253
|
+
* bucket without redeployment. Setup activates the provisioned receipt rule
|
|
8254
|
+
* set automatically. SES permits one active receipt rule set per account and
|
|
8255
|
+
* region, so an AWS stack may contain only one Email with inbound delivery,
|
|
8256
|
+
* and installing it makes its rule set the account's active rule set.
|
|
8170
8257
|
*/
|
|
8171
8258
|
var Email = class {
|
|
8172
8259
|
_config = { domains: [] };
|
|
@@ -8529,6 +8616,7 @@ var Stack = class {
|
|
|
8529
8616
|
dependencies: []
|
|
8530
8617
|
};
|
|
8531
8618
|
if (options?.remoteAccess) entry.remoteAccess = true;
|
|
8619
|
+
if (resource.enabledWhen !== void 0) entry.enabledWhen = resource.enabledWhen;
|
|
8532
8620
|
this._config.resources[resource.config.id] = entry;
|
|
8533
8621
|
return this;
|
|
8534
8622
|
}
|
|
@@ -9210,8 +9298,8 @@ function getResourceOutputs(params) {
|
|
|
9210
9298
|
//#region src/experimental/aws-opensearch.ts
|
|
9211
9299
|
/**
|
|
9212
9300
|
* An Amazon OpenSearch Serverless collection (next generation): compute and
|
|
9213
|
-
* storage are decoupled, the collection
|
|
9214
|
-
*
|
|
9301
|
+
* storage are decoupled, and the collection lives inside a dedicated
|
|
9302
|
+
* collection group. By default, its compute can scale to zero.
|
|
9215
9303
|
*
|
|
9216
9304
|
* Experimental and AWS-only: deploying a stack containing this resource to any
|
|
9217
9305
|
* other platform fails at template generation with a clear error.
|
|
@@ -9255,6 +9343,21 @@ var AwsOpenSearch = class {
|
|
|
9255
9343
|
return this;
|
|
9256
9344
|
}
|
|
9257
9345
|
/**
|
|
9346
|
+
* Sets the collection group's indexing and search capacity limits.
|
|
9347
|
+
*
|
|
9348
|
+
* Omit this setting to retain the provider defaults, including scale-to-zero.
|
|
9349
|
+
* Set a minimum of 1 OCU for latency-sensitive workloads that should remain
|
|
9350
|
+
* warm.
|
|
9351
|
+
*
|
|
9352
|
+
* @param value Indexing and search capacity limits.
|
|
9353
|
+
* @returns The AwsOpenSearch builder instance.
|
|
9354
|
+
*/
|
|
9355
|
+
capacity(value) {
|
|
9356
|
+
validateCapacity(value);
|
|
9357
|
+
this._config.capacity = value;
|
|
9358
|
+
return this;
|
|
9359
|
+
}
|
|
9360
|
+
/**
|
|
9258
9361
|
* Builds and validates the collection configuration.
|
|
9259
9362
|
* @returns An immutable Resource representing the configured collection.
|
|
9260
9363
|
* @throws Error if the configuration is invalid.
|
|
@@ -9266,6 +9369,20 @@ var AwsOpenSearch = class {
|
|
|
9266
9369
|
});
|
|
9267
9370
|
}
|
|
9268
9371
|
};
|
|
9372
|
+
function validateCapacity(capacity) {
|
|
9373
|
+
const components = [["indexing", capacity.indexing], ["search", capacity.search]];
|
|
9374
|
+
if (components.every(([, range]) => range == null)) throw new Error("OpenSearch capacity must configure indexing, search, or both");
|
|
9375
|
+
for (const [component, range] of components) {
|
|
9376
|
+
if (range == null) continue;
|
|
9377
|
+
if (range.minOcu == null && range.maxOcu == null) throw new Error(`OpenSearch ${component} capacity must configure minOcu, maxOcu, or both`);
|
|
9378
|
+
if (range.minOcu != null) validateOcu(`${component}.minOcu`, range.minOcu, true);
|
|
9379
|
+
if (range.maxOcu != null) validateOcu(`${component}.maxOcu`, range.maxOcu, false);
|
|
9380
|
+
if (range.minOcu != null && range.maxOcu != null && range.minOcu > range.maxOcu) throw new Error(`OpenSearch ${component} minOcu must not exceed maxOcu`);
|
|
9381
|
+
}
|
|
9382
|
+
}
|
|
9383
|
+
function validateOcu(field, value, allowZero) {
|
|
9384
|
+
if (!(Number.isInteger(value) && value <= 1696 && (allowZero && value === 0 || value === 1 || value === 2 || value === 4 || value === 8 || value === 16 || value > 16 && value % 16 === 0))) throw new Error(`OpenSearch ${field} must be ${allowZero ? "0, " : ""}1, 2, 4, 8, 16, or a multiple of 16 up to 1696`);
|
|
9385
|
+
}
|
|
9269
9386
|
//#endregion
|
|
9270
9387
|
//#region src/index.ts
|
|
9271
9388
|
const experimental = { AwsOpenSearch };
|