@alienplatform/core 3.3.41 → 3.3.42-dev.6e3a661b219b3886d55014b3cef8af0ecdcc65fe
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 +180 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -23
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
- package/LICENSE.md +0 -105
package/dist/index.js
CHANGED
|
@@ -99,6 +99,8 @@ const DeploymentStatusSchema = z$2.enum([
|
|
|
99
99
|
"delete-failed",
|
|
100
100
|
"teardown-required",
|
|
101
101
|
"teardown-failed",
|
|
102
|
+
"retention-required",
|
|
103
|
+
"retained",
|
|
102
104
|
"deleted",
|
|
103
105
|
"error"
|
|
104
106
|
]).describe("Deployment status in the deployment lifecycle.\n\nFor observe-only deployments with no release or stack state, `Running`\nmeans the Operator is attached. Connectivity comes from `lastHeartbeatAt`;\nresource health comes from inventory and resource heartbeat data.");
|
|
@@ -532,6 +534,8 @@ const StackResourceStateSchema = z$2.object({
|
|
|
532
534
|
get "dependencies"() {
|
|
533
535
|
return z$2.array(ResourceRefSchema.describe("Reference to a resource by its stable id and resource type.")).describe("Complete list of dependencies for this resource, including infrastructure dependencies.\nThis preserves the full dependency information from the stack definition.").optional();
|
|
534
536
|
},
|
|
537
|
+
"description": z$2.string().nullish(),
|
|
538
|
+
"displayName": z$2.string().describe("Presentation metadata from the effective resource entry, outside runtime configuration.").nullish(),
|
|
535
539
|
get "error"() {
|
|
536
540
|
return z$2.union([AlienErrorSchema, z$2.null()]).optional();
|
|
537
541
|
},
|
|
@@ -545,6 +549,7 @@ const StackResourceStateSchema = z$2.object({
|
|
|
545
549
|
get "previousConfig"() {
|
|
546
550
|
return z$2.union([BaseResourceSchema, z$2.null()]).optional();
|
|
547
551
|
},
|
|
552
|
+
"progress": z$2.string().describe("Last reported step explanation for display only; not a machine-readable status.").nullish(),
|
|
548
553
|
"remoteBindingParams": z$2.optional(z$2.any().describe("Binding parameters for remote access.\nOnly populated when the resource has `remote_access: true` in its ResourceEntry.\nThis is the JSON serialization of the binding configuration (e.g., StorageBinding, VaultBinding).\nPopulated by controllers during provisioning using get_binding_params().")),
|
|
549
554
|
"retryAttempt": z$2.optional(z$2.int().min(0).describe("Tracks consecutive retry attempts for the current state transition.")),
|
|
550
555
|
get "status"() {
|
|
@@ -1961,6 +1966,7 @@ z$2.object({
|
|
|
1961
1966
|
"database": z$2.string().describe("Default database name."),
|
|
1962
1967
|
"engineVersion": z$2.string().describe("Engine version the cluster reports."),
|
|
1963
1968
|
"instanceIdentifier": z$2.string().describe("Writer instance identifier within the cluster."),
|
|
1969
|
+
"managedPassword": z$2.optional(z$2.boolean().describe("True when RDS owns the JSON username/password secret and its rotation.")),
|
|
1964
1970
|
"passwordSecretArn": z$2.string().describe("Secrets Manager ARN of the master password (never the password itself)."),
|
|
1965
1971
|
"securityGroupId": z$2.string().describe("Dedicated security group admitting 5432 from the stack security group."),
|
|
1966
1972
|
"subnetGroupName": z$2.string().describe("DB subnet group spanning the private subnets."),
|
|
@@ -5756,6 +5762,7 @@ const LocalPostgresBindingSchema = z$2.object({
|
|
|
5756
5762
|
*/
|
|
5757
5763
|
const PostgresBindingSchema = z$2.union([
|
|
5758
5764
|
z$2.lazy(() => AuroraPostgresBindingSchema).and(z$2.object({ "service": z$2.enum(["aurora"]) })).describe("AWS Aurora Serverless v2 binding."),
|
|
5765
|
+
z$2.lazy(() => AuroraPostgresBindingSchema).and(z$2.object({ "service": z$2.enum(["aurora-managed"]) })).describe("AWS Aurora Serverless v2 binding."),
|
|
5759
5766
|
z$2.lazy(() => CloudSqlPostgresBindingSchema).and(z$2.object({ "service": z$2.enum(["cloud-sql"]) })).describe("GCP Cloud SQL binding."),
|
|
5760
5767
|
z$2.lazy(() => FlexibleServerPostgresBindingSchema).and(z$2.object({ "service": z$2.enum(["flexible-server"]) })).describe("Azure Flexible Server binding."),
|
|
5761
5768
|
z$2.lazy(() => ExternalPostgresBindingSchema).and(z$2.object({ "service": z$2.enum(["external"]) })).describe("Operator-provided / BYO database binding."),
|
|
@@ -7721,6 +7728,8 @@ const ResourceEntrySchema = z$2.object({
|
|
|
7721
7728
|
get "dependencies"() {
|
|
7722
7729
|
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");
|
|
7723
7730
|
},
|
|
7731
|
+
"description": z$2.string().describe("Authored purpose, displayed as plain text. Does not affect resource configuration.").nullish(),
|
|
7732
|
+
"displayName": z$2.string().describe("Optional human-readable name. The stable resource ID is the display fallback.").nullish(),
|
|
7724
7733
|
"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(),
|
|
7725
7734
|
get "lifecycle"() {
|
|
7726
7735
|
return ResourceLifecycleSchema.describe("Describes the lifecycle of a resource within a stack, determining how it's managed and deployed.");
|
|
@@ -8702,8 +8711,10 @@ var Resource = class {
|
|
|
8702
8711
|
* @param config The configuration object for this specific resource type.
|
|
8703
8712
|
* @param enabledWhen Id of the boolean stack input gating this resource's creation.
|
|
8704
8713
|
*/
|
|
8705
|
-
constructor(config, enabledWhen) {
|
|
8714
|
+
constructor(config, enabledWhen, displayName, description) {
|
|
8706
8715
|
this.config = config;
|
|
8716
|
+
if (displayName !== void 0) this.displayName = displayName;
|
|
8717
|
+
if (description !== void 0) this.description = description;
|
|
8707
8718
|
if (enabledWhen !== void 0) this.enabledWhen = enabledWhen;
|
|
8708
8719
|
}
|
|
8709
8720
|
/**
|
|
@@ -8719,10 +8730,27 @@ var Resource = class {
|
|
|
8719
8730
|
}
|
|
8720
8731
|
};
|
|
8721
8732
|
/**
|
|
8722
|
-
*
|
|
8723
|
-
* `.enabled()` gate without each builder reimplementing it.
|
|
8733
|
+
* Shared display metadata for resource builders.
|
|
8724
8734
|
*/
|
|
8725
|
-
var
|
|
8735
|
+
var ResourceMetadataBuilder = class {
|
|
8736
|
+
_displayName;
|
|
8737
|
+
_description;
|
|
8738
|
+
/** Sets a friendly name; the resource ID remains its stable identity. */
|
|
8739
|
+
displayName(name) {
|
|
8740
|
+
this._displayName = name;
|
|
8741
|
+
return this;
|
|
8742
|
+
}
|
|
8743
|
+
/** Describes this resource's purpose as plain text. */
|
|
8744
|
+
description(description) {
|
|
8745
|
+
this._description = description;
|
|
8746
|
+
return this;
|
|
8747
|
+
}
|
|
8748
|
+
resource(config, enabledWhen) {
|
|
8749
|
+
return new Resource(config, enabledWhen, this._displayName, this._description);
|
|
8750
|
+
}
|
|
8751
|
+
};
|
|
8752
|
+
/** Shared conditional creation for resource types that support gates. */
|
|
8753
|
+
var ResourceBuilder = class extends ResourceMetadataBuilder {
|
|
8726
8754
|
_enabledWhen;
|
|
8727
8755
|
/**
|
|
8728
8756
|
* Creates this resource only when the given boolean stack input is true.
|
|
@@ -8743,7 +8771,7 @@ var ResourceBuilder = class {
|
|
|
8743
8771
|
* @returns An immutable Resource.
|
|
8744
8772
|
*/
|
|
8745
8773
|
resource(config) {
|
|
8746
|
-
return
|
|
8774
|
+
return super.resource(config, this._enabledWhen);
|
|
8747
8775
|
}
|
|
8748
8776
|
};
|
|
8749
8777
|
// src/ai.ts
|
|
@@ -8788,13 +8816,14 @@ var AI = class extends ResourceBuilder {
|
|
|
8788
8816
|
* This is a high-level wrapper resource that provides a cloud-agnostic interface over
|
|
8789
8817
|
* AWS ECR, GCP Artifact Registry, and Azure Container Registry.
|
|
8790
8818
|
*/
|
|
8791
|
-
var ArtifactRegistry = class {
|
|
8819
|
+
var ArtifactRegistry = class extends ResourceMetadataBuilder {
|
|
8792
8820
|
_config = {};
|
|
8793
8821
|
/**
|
|
8794
8822
|
* Creates a new ArtifactRegistry builder.
|
|
8795
8823
|
* @param id Identifier for the artifact registry. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
|
|
8796
8824
|
*/
|
|
8797
8825
|
constructor(id) {
|
|
8826
|
+
super();
|
|
8798
8827
|
this._config.id = id;
|
|
8799
8828
|
}
|
|
8800
8829
|
/**
|
|
@@ -8806,11 +8835,9 @@ var ArtifactRegistry = class {
|
|
|
8806
8835
|
return "artifact-registry";
|
|
8807
8836
|
}
|
|
8808
8837
|
/**
|
|
8809
|
-
* AWS
|
|
8810
|
-
*
|
|
8811
|
-
*
|
|
8812
|
-
* compute runs in a different region).
|
|
8813
|
-
* @param regions - AWS region codes to replicate to (e.g., ["us-east-2", "eu-west-1"])
|
|
8838
|
+
* Legacy AWS replication setting. Accepted with a warning; account replication is unchanged.
|
|
8839
|
+
* Configure destination regions through the account infrastructure owner.
|
|
8840
|
+
* @deprecated Per-deployment ECR replication is unsupported.
|
|
8814
8841
|
*/
|
|
8815
8842
|
replicationRegions(regions) {
|
|
8816
8843
|
this._config.replicationRegions = regions;
|
|
@@ -8822,9 +8849,10 @@ var ArtifactRegistry = class {
|
|
|
8822
8849
|
* @throws Error if the artifact registry configuration is invalid.
|
|
8823
8850
|
*/
|
|
8824
8851
|
build() {
|
|
8825
|
-
|
|
8852
|
+
const config = ArtifactRegistrySchema.parse(this._config);
|
|
8853
|
+
return this.resource({
|
|
8826
8854
|
type: "artifact-registry",
|
|
8827
|
-
...
|
|
8855
|
+
...config
|
|
8828
8856
|
});
|
|
8829
8857
|
}
|
|
8830
8858
|
};
|
|
@@ -8834,7 +8862,7 @@ var ArtifactRegistry = class {
|
|
|
8834
8862
|
* Builds are designed to be stateless and can be triggered on-demand to compile,
|
|
8835
8863
|
* test, or package application code.
|
|
8836
8864
|
*/
|
|
8837
|
-
var Build = class {
|
|
8865
|
+
var Build = class extends ResourceMetadataBuilder {
|
|
8838
8866
|
_config = {
|
|
8839
8867
|
links: [],
|
|
8840
8868
|
environment: {}
|
|
@@ -8844,6 +8872,7 @@ var Build = class {
|
|
|
8844
8872
|
* @param id Identifier for the build resource. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
|
|
8845
8873
|
*/
|
|
8846
8874
|
constructor(id) {
|
|
8875
|
+
super();
|
|
8847
8876
|
this._config.id = id;
|
|
8848
8877
|
}
|
|
8849
8878
|
/**
|
|
@@ -8901,9 +8930,10 @@ var Build = class {
|
|
|
8901
8930
|
* @throws Error if the build configuration is invalid.
|
|
8902
8931
|
*/
|
|
8903
8932
|
build() {
|
|
8904
|
-
|
|
8933
|
+
const config = BuildSchema.parse(this._config);
|
|
8934
|
+
return this.resource({
|
|
8905
8935
|
type: "build",
|
|
8906
|
-
...
|
|
8936
|
+
...config
|
|
8907
8937
|
});
|
|
8908
8938
|
}
|
|
8909
8939
|
};
|
|
@@ -9527,9 +9557,10 @@ const BindingNotFoundError = defineError({
|
|
|
9527
9557
|
* Provider instance types, selected zones, custom container CIDRs, GPU, and
|
|
9528
9558
|
* nested virtualization requirements are unsupported and fail validation.
|
|
9529
9559
|
*/
|
|
9530
|
-
var ComputeCluster = class {
|
|
9560
|
+
var ComputeCluster = class extends ResourceMetadataBuilder {
|
|
9531
9561
|
_config = { capacityGroups: [] };
|
|
9532
9562
|
constructor(id) {
|
|
9563
|
+
super();
|
|
9533
9564
|
this._config.id = id;
|
|
9534
9565
|
}
|
|
9535
9566
|
/**
|
|
@@ -9580,9 +9611,10 @@ var ComputeCluster = class {
|
|
|
9580
9611
|
*/
|
|
9581
9612
|
build() {
|
|
9582
9613
|
if (this._config.dynamicContainerPool !== void 0 && !this._config.capacityGroups?.some((group) => group.groupId === this._config.dynamicContainerPool)) throw new Error("Dynamic container pool must be declared in the compute cluster");
|
|
9583
|
-
|
|
9614
|
+
const config = ComputeClusterSchema.parse(this._config);
|
|
9615
|
+
return this.resource({
|
|
9584
9616
|
type: "compute-cluster",
|
|
9585
|
-
...
|
|
9617
|
+
...config
|
|
9586
9618
|
});
|
|
9587
9619
|
}
|
|
9588
9620
|
};
|
|
@@ -10821,8 +10853,16 @@ var Postgres = class extends ResourceBuilder {
|
|
|
10821
10853
|
return this;
|
|
10822
10854
|
}
|
|
10823
10855
|
/**
|
|
10824
|
-
* Requests memory (e.g. "
|
|
10856
|
+
* Requests memory (e.g. "2Gi", "8Gi"). Drives the size on AWS (the ACU ceiling) and, together
|
|
10825
10857
|
* with `cpu`, the tier on GCP and Azure.
|
|
10858
|
+
*
|
|
10859
|
+
* Use binary units: Ki, Mi, Gi or Ti (e.g. "512Mi", "4Gi"). Decimal units are powers of 1000,
|
|
10860
|
+
* as in Kubernetes: "8G" is 8×10^9 bytes, about 7.45 GiB, so it can pick a smaller tier than
|
|
10861
|
+
* "8Gi". A number without a unit retains its historical meaning in GiB.
|
|
10862
|
+
*
|
|
10863
|
+
* On AWS (Aurora Serverless v2) the ceiling is memory / 2 GiB per ACU, with a minimum of 1 ACU
|
|
10864
|
+
* (about 2 GiB): Aurora rejects a lower maximum capacity, so anything under "2Gi" is sized
|
|
10865
|
+
* up to 1 ACU.
|
|
10826
10866
|
* @param value The requested memory.
|
|
10827
10867
|
* @returns The Postgres builder instance.
|
|
10828
10868
|
*/
|
|
@@ -10841,6 +10881,7 @@ var Postgres = class extends ResourceBuilder {
|
|
|
10841
10881
|
}
|
|
10842
10882
|
/**
|
|
10843
10883
|
* Enables multi-AZ / regional / zone-redundant high availability. Default `false`.
|
|
10884
|
+
* AWS currently keeps one Aurora compute instance and warns when this is true.
|
|
10844
10885
|
* @param value Whether to enable HA.
|
|
10845
10886
|
* @returns The Postgres builder instance.
|
|
10846
10887
|
*/
|
|
@@ -11026,13 +11067,14 @@ var Sandbox = class extends ResourceBuilder {
|
|
|
11026
11067
|
* .build()
|
|
11027
11068
|
* ```
|
|
11028
11069
|
*/
|
|
11029
|
-
var ServiceAccount = class {
|
|
11070
|
+
var ServiceAccount = class extends ResourceMetadataBuilder {
|
|
11030
11071
|
_config = { stackPermissionSets: [] };
|
|
11031
11072
|
/**
|
|
11032
11073
|
* Creates a new ServiceAccount builder.
|
|
11033
11074
|
* @param id Identifier for the service account. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
|
|
11034
11075
|
*/
|
|
11035
11076
|
constructor(id) {
|
|
11077
|
+
super();
|
|
11036
11078
|
this._config.id = id;
|
|
11037
11079
|
}
|
|
11038
11080
|
/**
|
|
@@ -11082,9 +11124,10 @@ var ServiceAccount = class {
|
|
|
11082
11124
|
* @throws Error if the service account configuration is invalid.
|
|
11083
11125
|
*/
|
|
11084
11126
|
build() {
|
|
11085
|
-
|
|
11127
|
+
const config = ServiceAccountSchema.parse(this._config);
|
|
11128
|
+
return this.resource({
|
|
11086
11129
|
type: "service-account",
|
|
11087
|
-
...
|
|
11130
|
+
...config
|
|
11088
11131
|
});
|
|
11089
11132
|
}
|
|
11090
11133
|
};
|
|
@@ -11125,6 +11168,8 @@ var Stack = class {
|
|
|
11125
11168
|
dependencies: []
|
|
11126
11169
|
};
|
|
11127
11170
|
if (options?.remoteAccess) entry.remoteAccess = true;
|
|
11171
|
+
if (resource.displayName !== void 0) entry.displayName = resource.displayName;
|
|
11172
|
+
if (resource.description !== void 0) entry.description = resource.description;
|
|
11128
11173
|
if (resource.enabledWhen !== void 0) entry.enabledWhen = resource.enabledWhen;
|
|
11129
11174
|
this._config.resources[resource.config.id] = entry;
|
|
11130
11175
|
return this;
|