@alienplatform/core 3.3.45 → 3.3.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.d.ts +119 -59
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -539,6 +539,7 @@ const StackResourceStateSchema = z$2.object({
|
|
|
539
539
|
get "error"() {
|
|
540
540
|
return z$2.union([AlienErrorSchema, z$2.null()]).optional();
|
|
541
541
|
},
|
|
542
|
+
"externalBinding": z$2.optional(z$2.boolean().describe("Whether this resource was adopted from an external binding instead of provisioned.\nThe binding may exist only where the adopting executor ran (a Helm value or a\nchart-created database), so the record carries it: deleting the resource releases it\nand never touches what the binding points at.")),
|
|
542
543
|
"lastFailedState": z$2.optional(z$2.any().describe("Stores the controller state that failed, used for manual retry operations.\nThis allows resuming from the exact point where the failure occurred.\nStored as JSON to make the struct serializable and movable to alien-core.")),
|
|
543
544
|
get "lifecycle"() {
|
|
544
545
|
return z$2.union([ResourceLifecycleSchema, z$2.null()]).optional();
|
|
@@ -1350,6 +1351,15 @@ const AwsComputeClusterImportDataSchema = z$2.object({
|
|
|
1350
1351
|
"isolatedInstanceProfileArn": z$2.string().describe("Optional isolated node instance profile ARN.").nullish(),
|
|
1351
1352
|
"securityGroupId": z$2.string().describe("Security group ID attached to cluster machines.")
|
|
1352
1353
|
}).describe("AWS ComputeCluster ImportData.");
|
|
1354
|
+
// src/generated/zod/aws-condition-value-schema.ts
|
|
1355
|
+
/**
|
|
1356
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
1357
|
+
* Do not edit manually.
|
|
1358
|
+
*/
|
|
1359
|
+
/**
|
|
1360
|
+
* @description An IAM condition accepts one string or a list of alternative string values.
|
|
1361
|
+
*/
|
|
1362
|
+
const AwsConditionValueSchema = z$2.union([z$2.array(z$2.string()), z$2.string()]).describe("An IAM condition accepts one string or a list of alternative string values.");
|
|
1353
1363
|
// src/generated/zod/aws-custom-certificate-config-schema.ts
|
|
1354
1364
|
/**
|
|
1355
1365
|
* Generated by Kubb (https://kubb.dev/).
|
|
@@ -1914,12 +1924,12 @@ const AwsPermissionEffectSchema = z$2.enum(["Allow", "Deny"]);
|
|
|
1914
1924
|
*/
|
|
1915
1925
|
const BindingConfigurationAwsBindingSpecSchema = z$2.object({
|
|
1916
1926
|
"resource": z$2.optional(z$2.object({
|
|
1917
|
-
"condition": z$2.object({}).catchall(z$2.object({}).catchall(z$2.
|
|
1927
|
+
"condition": z$2.object({}).catchall(z$2.object({}).catchall(z$2.lazy(() => AwsConditionValueSchema).describe("An IAM condition accepts one string or a list of alternative string values."))).describe("Optional condition for additional filtering (rare)").nullish(),
|
|
1918
1928
|
"notResources": z$2.optional(z$2.array(z$2.string()).describe("ARN patterns rendered as IAM `NotResource`, in place of `resources`. Its one use is a\ntag-on-create grant whose implied check AWS authorizes against no resource; the build\nrefuses it anywhere else.")),
|
|
1919
1929
|
"resources": z$2.array(z$2.string()).describe("Resource ARNs to bind to")
|
|
1920
1930
|
}).describe("AWS-specific binding specification")),
|
|
1921
1931
|
"stack": z$2.optional(z$2.object({
|
|
1922
|
-
"condition": z$2.object({}).catchall(z$2.object({}).catchall(z$2.
|
|
1932
|
+
"condition": z$2.object({}).catchall(z$2.object({}).catchall(z$2.lazy(() => AwsConditionValueSchema).describe("An IAM condition accepts one string or a list of alternative string values."))).describe("Optional condition for additional filtering (rare)").nullish(),
|
|
1923
1933
|
"notResources": z$2.optional(z$2.array(z$2.string()).describe("ARN patterns rendered as IAM `NotResource`, in place of `resources`. Its one use is a\ntag-on-create grant whose implied check AWS authorizes against no resource; the build\nrefuses it anywhere else.")),
|
|
1924
1934
|
"resources": z$2.array(z$2.string()).describe("Resource ARNs to bind to")
|
|
1925
1935
|
}).describe("AWS-specific binding specification"))
|
|
@@ -2031,6 +2041,8 @@ const AwsRemoteStackManagementHeartbeatDataSchema = z$2.object({
|
|
|
2031
2041
|
*/
|
|
2032
2042
|
const AwsRemoteStackManagementImportDataSchema = z$2.object({
|
|
2033
2043
|
"managementPermissionsApplied": z$2.boolean().describe("Whether the management inline policy was attached by the generated stack."),
|
|
2044
|
+
"permissionsBoundaryArn": z$2.string().describe("Setup-owned permissions boundary for roles written by management. Absent in older setups.").nullish(),
|
|
2045
|
+
"permissionsBoundaryDocument": z$2.optional(z$2.any().describe("Installed boundary document with setup template parameters resolved. Required with its ARN.")),
|
|
2034
2046
|
"roleArn": z$2.string().describe("Cross-account management role ARN."),
|
|
2035
2047
|
"roleName": z$2.string().describe("Cross-account management role name.")
|
|
2036
2048
|
}).describe("AWS RemoteStackManagement ImportData.");
|
|
@@ -8552,6 +8564,33 @@ const StorageEventSchema = z$2.object({
|
|
|
8552
8564
|
* @description A wrapper type for a list of storage events.
|
|
8553
8565
|
*/
|
|
8554
8566
|
const StorageEventsSchema = z$2.array(z$2.lazy(() => StorageEventSchema).describe("Represents an event triggered by an action in an object storage service.\n\nThis struct provides a generic representation for events from services like\nAWS S3, Google Cloud Storage (GCS), and Azure Blob Storage.")).describe("A wrapper type for a list of storage events.");
|
|
8567
|
+
// src/generated/zod/storage-notification-event-schema.ts
|
|
8568
|
+
/**
|
|
8569
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
8570
|
+
* Do not edit manually.
|
|
8571
|
+
*/
|
|
8572
|
+
/**
|
|
8573
|
+
* @description Object events that can be delivered to a queue.
|
|
8574
|
+
*/
|
|
8575
|
+
const StorageNotificationEventSchema = z$2.enum(["created"]).describe("Object events that can be delivered to a queue.");
|
|
8576
|
+
// src/generated/zod/storage-notification-schema.ts
|
|
8577
|
+
/**
|
|
8578
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
8579
|
+
* Do not edit manually.
|
|
8580
|
+
*/
|
|
8581
|
+
/**
|
|
8582
|
+
* @description Delivers matching object events to a queue in the same stack.\nRules on one Storage must not overlap: no object key may match two of them.\nDelivery is at least once, so consumers must tolerate duplicates.
|
|
8583
|
+
*/
|
|
8584
|
+
const StorageNotificationSchema = z$2.object({
|
|
8585
|
+
get "events"() {
|
|
8586
|
+
return z$2.array(StorageNotificationEventSchema.describe("Object events that can be delivered to a queue.")).describe("Events to deliver. Defaults to object creation; v1 supports only `created`.").optional();
|
|
8587
|
+
},
|
|
8588
|
+
"prefix": z$2.string().describe("Literal object key prefix, non-empty and at most 512 UTF-8 bytes when set.").nullish(),
|
|
8589
|
+
get "queue"() {
|
|
8590
|
+
return ResourceRefSchema.describe("Reference to a resource by its stable id and resource type.");
|
|
8591
|
+
},
|
|
8592
|
+
"suffix": z$2.string().describe("Literal object key suffix, non-empty and at most 128 UTF-8 bytes when set.").nullish()
|
|
8593
|
+
}).describe("Delivers matching object events to a queue in the same stack.\nRules on one Storage must not overlap: no object key may match two of them.\nDelivery is at least once, so consumers must tolerate duplicates.");
|
|
8555
8594
|
// src/generated/zod/storage-outputs-schema.ts
|
|
8556
8595
|
/**
|
|
8557
8596
|
* Generated by Kubb (https://kubb.dev/).
|
|
@@ -8578,6 +8617,9 @@ const StorageSchema = z$2.object({
|
|
|
8578
8617
|
get "lifecycleRules"() {
|
|
8579
8618
|
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();
|
|
8580
8619
|
},
|
|
8620
|
+
get "notifications"() {
|
|
8621
|
+
return z$2.array(StorageNotificationSchema.describe("Delivers matching object events to a queue in the same stack.\nRules on one Storage must not overlap: no object key may match two of them.\nDelivery is at least once, so consumers must tolerate duplicates.")).max(10).describe("Object notification rules delivered into queues (at most 10).\nOmitted when empty to preserve existing serialized configurations and setup digests.").optional();
|
|
8622
|
+
},
|
|
8581
8623
|
"publicRead": z$2.optional(z$2.boolean().describe("Allows public read access to objects without authentication.\nDefault: `false`")),
|
|
8582
8624
|
"versioning": z$2.optional(z$2.boolean().describe("Enables object versioning.\nDefault: `false`"))
|
|
8583
8625
|
}).describe("Represents an object storage bucket.");
|
|
@@ -11342,6 +11384,14 @@ var Stack = class {
|
|
|
11342
11384
|
}
|
|
11343
11385
|
};
|
|
11344
11386
|
// src/storage.ts
|
|
11387
|
+
const InvalidStorageNotification = defineError({
|
|
11388
|
+
code: "INVALID_STORAGE_NOTIFICATION",
|
|
11389
|
+
context: z.object({ reason: z.string() }),
|
|
11390
|
+
message: ({ reason }) => `Invalid storage notification: ${reason}`,
|
|
11391
|
+
retryable: false,
|
|
11392
|
+
internal: false,
|
|
11393
|
+
httpStatusCode: 400
|
|
11394
|
+
});
|
|
11345
11395
|
/**
|
|
11346
11396
|
* Represents an object storage bucket.
|
|
11347
11397
|
*/
|
|
@@ -11409,6 +11459,23 @@ var Storage = class extends ResourceBuilder {
|
|
|
11409
11459
|
return this;
|
|
11410
11460
|
}
|
|
11411
11461
|
/**
|
|
11462
|
+
* Delivers matching object creation events into a Queue in the same stack.
|
|
11463
|
+
* Prefix and suffix are literal and case sensitive. Rules on one Storage must not
|
|
11464
|
+
* overlap (no key may match two of them); delivery is at least once. Storage and Queue
|
|
11465
|
+
* must both be Frozen or both be Live.
|
|
11466
|
+
*/
|
|
11467
|
+
notify(queue, options = {}) {
|
|
11468
|
+
if (queue.config.type !== "queue") throw new AlienError(InvalidStorageNotification.create({ reason: `expected a Queue, received '${queue.config.type}'` }));
|
|
11469
|
+
const notification = {
|
|
11470
|
+
queue: queue.ref(),
|
|
11471
|
+
events: options.events === void 0 ? ["created"] : [...options.events],
|
|
11472
|
+
...options.prefix !== void 0 ? { prefix: options.prefix } : {},
|
|
11473
|
+
...options.suffix !== void 0 ? { suffix: options.suffix } : {}
|
|
11474
|
+
};
|
|
11475
|
+
this._config.notifications = [...this._config.notifications ?? [], notification];
|
|
11476
|
+
return this;
|
|
11477
|
+
}
|
|
11478
|
+
/**
|
|
11412
11479
|
* Uses an Alien Key for provider-native encryption of objects in this Storage resource.
|
|
11413
11480
|
* The Key and Storage must both be added to the same stack.
|
|
11414
11481
|
*/
|