@go-to-k/cdkd 0.177.0 → 0.178.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/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { _ as withSkipPrefix, a as runDockerStreaming, c as getLogger, d as getLiveRenderer, f as PATTERN_B_NAME_PROPERTIES, g as generateResourceNameWithFallback, h as generateResourceName, i as runDockerForeground, n as formatDockerLoginError, p as PATTERN_B_RESOURCE_TYPES, r as getDockerCmd, u as runStackBuffered, v as withStackName } from "./docker-cmd-iDMcWcre.js";
|
|
3
|
-
import { A as S3StateBackend, B as resolveCaptureObservedState, C as assertRegionMatch, D as DagBuilder, E as DiffCalculator, F as buildDockerImage, G as CFN_TEMPLATE_BODY_LIMIT, H as resolveStateBucketWithDefault, I as Synthesizer, J as findLargeInlineResources, K as CFN_TEMPLATE_URL_LIMIT, L as getDefaultStateBucketName, M as AssetPublisher, N as stringifyValue, O as TemplateParser, P as WorkGraph, Q as resolveBucketRegion, R as getLegacyStateBucketName, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as warnDeprecatedNoPrefixCliFlag, X as AssemblyReader, Y as uploadCfnTemplate, _ as matchesCdkPath, a as withRetry, at as LocalStartServiceError, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as NestedStackChildDirectDestroyError, d as green, dt as ResourceTimeoutError, et as CdkdError, f as red, ft as ResourceUpdateNotSupportedError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalMigrateError, j as shouldRetainResource, k as LockManager, l as cyan, lt as PartialFailureError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as StackHasActiveImportsError, q as MIGRATE_TMP_PREFIX, r as DeployEngine, rt as LocalInvokeBuildError$1, s as formatResourceLine, st as MissingCdkCliError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ProvisioningError, v as normalizeAwsTagsToCfn, w as IntrinsicFunctionResolver, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveApp } from "./deploy-engine-
|
|
3
|
+
import { A as S3StateBackend, B as resolveCaptureObservedState, C as assertRegionMatch, D as DagBuilder, E as DiffCalculator, F as buildDockerImage, G as CFN_TEMPLATE_BODY_LIMIT, H as resolveStateBucketWithDefault, I as Synthesizer, J as findLargeInlineResources, K as CFN_TEMPLATE_URL_LIMIT, L as getDefaultStateBucketName, M as AssetPublisher, N as stringifyValue, O as TemplateParser, P as WorkGraph, Q as resolveBucketRegion, R as getLegacyStateBucketName, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as warnDeprecatedNoPrefixCliFlag, X as AssemblyReader, Y as uploadCfnTemplate, _ as matchesCdkPath, a as withRetry, at as LocalStartServiceError, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as NestedStackChildDirectDestroyError, d as green, dt as ResourceTimeoutError, et as CdkdError, f as red, ft as ResourceUpdateNotSupportedError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalMigrateError, j as shouldRetainResource, k as LockManager, l as cyan, lt as PartialFailureError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as StackHasActiveImportsError, q as MIGRATE_TMP_PREFIX, r as DeployEngine, rt as LocalInvokeBuildError$1, s as formatResourceLine, st as MissingCdkCliError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ProvisioningError, v as normalizeAwsTagsToCfn, w as IntrinsicFunctionResolver, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveApp } from "./deploy-engine-DNfN9SJO.js";
|
|
4
4
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-B15NAPbL.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
@@ -15932,21 +15932,30 @@ var ApiGatewayV2Provider = class {
|
|
|
15932
15932
|
"ProtocolType",
|
|
15933
15933
|
"Description",
|
|
15934
15934
|
"CorsConfiguration",
|
|
15935
|
-
"Tags"
|
|
15935
|
+
"Tags",
|
|
15936
|
+
"DisableExecuteApiEndpoint",
|
|
15937
|
+
"Version",
|
|
15938
|
+
"RouteSelectionExpression",
|
|
15939
|
+
"ApiKeySelectionExpression"
|
|
15936
15940
|
])],
|
|
15937
15941
|
["AWS::ApiGatewayV2::Stage", new Set([
|
|
15938
15942
|
"ApiId",
|
|
15939
15943
|
"StageName",
|
|
15940
15944
|
"AutoDeploy",
|
|
15941
15945
|
"Description",
|
|
15942
|
-
"Tags"
|
|
15946
|
+
"Tags",
|
|
15947
|
+
"StageVariables",
|
|
15948
|
+
"DefaultRouteSettings"
|
|
15943
15949
|
])],
|
|
15944
15950
|
["AWS::ApiGatewayV2::Integration", new Set([
|
|
15945
15951
|
"ApiId",
|
|
15946
15952
|
"IntegrationType",
|
|
15947
15953
|
"IntegrationUri",
|
|
15948
15954
|
"IntegrationMethod",
|
|
15949
|
-
"PayloadFormatVersion"
|
|
15955
|
+
"PayloadFormatVersion",
|
|
15956
|
+
"TimeoutInMillis",
|
|
15957
|
+
"RequestParameters",
|
|
15958
|
+
"Description"
|
|
15950
15959
|
])],
|
|
15951
15960
|
["AWS::ApiGatewayV2::Route", new Set([
|
|
15952
15961
|
"ApiId",
|
|
@@ -15982,7 +15991,10 @@ var ApiGatewayV2Provider = class {
|
|
|
15982
15991
|
["BodyS3Location", "OpenAPI/Swagger spec on S3; routed through ImportApi, not the field-by-field CreateApi path."],
|
|
15983
15992
|
["FailOnWarnings", "OpenAPI-import-only flag; meaningful only on the ImportApi code path."],
|
|
15984
15993
|
["DisableSchemaValidation", "Schema-validation toggle on CreateApi/UpdateApi that AWS docs scope to WebSocket APIs using AWS::ApiGatewayV2::Model — that resource type is not yet registered in cdkd, so the toggle has no effect to wire."],
|
|
15985
|
-
["BasePath", "OpenAPI-import-only basePath override; meaningful only on the ImportApi code path."]
|
|
15994
|
+
["BasePath", "OpenAPI-import-only basePath override; meaningful only on the ImportApi code path."],
|
|
15995
|
+
["RouteKey", "Quick-create shortcut: CreateApi inline-creates a default route+integration from RouteKey/Target/CredentialsArn. cdkd models routes/integrations as explicit AWS::ApiGatewayV2::Route/::Integration resources, so this convenience field is not wired."],
|
|
15996
|
+
["Target", "Quick-create shortcut (paired with RouteKey/CredentialsArn); cdkd models the integration as an explicit AWS::ApiGatewayV2::Integration resource instead."],
|
|
15997
|
+
["CredentialsArn", "Quick-create shortcut (paired with RouteKey/Target); cdkd models the integration as an explicit AWS::ApiGatewayV2::Integration resource instead."]
|
|
15986
15998
|
])]]);
|
|
15987
15999
|
getClient() {
|
|
15988
16000
|
if (!this.client) this.client = new ApiGatewayV2Client(this.providerRegion ? { region: this.providerRegion } : {});
|
|
@@ -16052,6 +16064,10 @@ var ApiGatewayV2Provider = class {
|
|
|
16052
16064
|
ProtocolType: protocolType,
|
|
16053
16065
|
Description: properties["Description"],
|
|
16054
16066
|
CorsConfiguration: properties["CorsConfiguration"],
|
|
16067
|
+
DisableExecuteApiEndpoint: properties["DisableExecuteApiEndpoint"],
|
|
16068
|
+
Version: properties["Version"],
|
|
16069
|
+
RouteSelectionExpression: properties["RouteSelectionExpression"],
|
|
16070
|
+
ApiKeySelectionExpression: properties["ApiKeySelectionExpression"],
|
|
16055
16071
|
Tags: this.cfnTagsToRecord(properties["Tags"])
|
|
16056
16072
|
}));
|
|
16057
16073
|
const apiId = response.ApiId;
|
|
@@ -16098,6 +16114,8 @@ var ApiGatewayV2Provider = class {
|
|
|
16098
16114
|
StageName: stageName,
|
|
16099
16115
|
AutoDeploy: properties["AutoDeploy"],
|
|
16100
16116
|
Description: properties["Description"],
|
|
16117
|
+
StageVariables: properties["StageVariables"],
|
|
16118
|
+
DefaultRouteSettings: properties["DefaultRouteSettings"],
|
|
16101
16119
|
Tags: this.cfnTagsToRecord(properties["Tags"])
|
|
16102
16120
|
}));
|
|
16103
16121
|
this.logger.debug(`Successfully created API Gateway V2 Stage ${logicalId}: ${stageName}`);
|
|
@@ -16144,7 +16162,10 @@ var ApiGatewayV2Provider = class {
|
|
|
16144
16162
|
IntegrationType: integrationType,
|
|
16145
16163
|
IntegrationUri: properties["IntegrationUri"],
|
|
16146
16164
|
IntegrationMethod: properties["IntegrationMethod"],
|
|
16147
|
-
PayloadFormatVersion: properties["PayloadFormatVersion"]
|
|
16165
|
+
PayloadFormatVersion: properties["PayloadFormatVersion"],
|
|
16166
|
+
TimeoutInMillis: properties["TimeoutInMillis"],
|
|
16167
|
+
RequestParameters: properties["RequestParameters"],
|
|
16168
|
+
Description: properties["Description"]
|
|
16148
16169
|
}))).IntegrationId;
|
|
16149
16170
|
this.logger.debug(`Successfully created API Gateway V2 Integration ${logicalId}: ${integrationId}`);
|
|
16150
16171
|
return {
|
|
@@ -16301,6 +16322,9 @@ var ApiGatewayV2Provider = class {
|
|
|
16301
16322
|
result["Description"] = resp.Description ?? "";
|
|
16302
16323
|
if (resp.ProtocolType === "HTTP") result["CorsConfiguration"] = resp.CorsConfiguration ?? {};
|
|
16303
16324
|
if (resp.ProtocolType === "WEBSOCKET" && resp.RouteSelectionExpression !== void 0) result["RouteSelectionExpression"] = resp.RouteSelectionExpression;
|
|
16325
|
+
if (resp.ProtocolType === "WEBSOCKET" && resp.ApiKeySelectionExpression !== void 0) result["ApiKeySelectionExpression"] = resp.ApiKeySelectionExpression;
|
|
16326
|
+
if (resp.DisableExecuteApiEndpoint !== void 0) result["DisableExecuteApiEndpoint"] = resp.DisableExecuteApiEndpoint;
|
|
16327
|
+
if (resp.Version !== void 0) result["Version"] = resp.Version;
|
|
16304
16328
|
result["Tags"] = normalizeAwsTagsToCfn(resp.Tags);
|
|
16305
16329
|
return result;
|
|
16306
16330
|
} catch (err) {
|
|
@@ -16320,6 +16344,8 @@ var ApiGatewayV2Provider = class {
|
|
|
16320
16344
|
if (resp.StageName !== void 0) result["StageName"] = resp.StageName;
|
|
16321
16345
|
result["AutoDeploy"] = resp.AutoDeploy ?? false;
|
|
16322
16346
|
result["Description"] = resp.Description ?? "";
|
|
16347
|
+
if (resp.StageVariables !== void 0) result["StageVariables"] = resp.StageVariables;
|
|
16348
|
+
if (resp.DefaultRouteSettings !== void 0) result["DefaultRouteSettings"] = resp.DefaultRouteSettings;
|
|
16323
16349
|
return result;
|
|
16324
16350
|
} catch (err) {
|
|
16325
16351
|
if (err instanceof NotFoundException$3) return void 0;
|
|
@@ -16339,6 +16365,9 @@ var ApiGatewayV2Provider = class {
|
|
|
16339
16365
|
if (resp.IntegrationType === "AWS" || resp.IntegrationType === "AWS_PROXY" || resp.IntegrationType === "HTTP" || resp.IntegrationType === "HTTP_PROXY") result["IntegrationUri"] = resp.IntegrationUri ?? "";
|
|
16340
16366
|
result["IntegrationMethod"] = resp.IntegrationMethod ?? "";
|
|
16341
16367
|
result["PayloadFormatVersion"] = resp.PayloadFormatVersion ?? "";
|
|
16368
|
+
if (resp.TimeoutInMillis !== void 0) result["TimeoutInMillis"] = resp.TimeoutInMillis;
|
|
16369
|
+
if (resp.RequestParameters !== void 0) result["RequestParameters"] = resp.RequestParameters;
|
|
16370
|
+
if (resp.Description !== void 0) result["Description"] = resp.Description;
|
|
16342
16371
|
return result;
|
|
16343
16372
|
} catch (err) {
|
|
16344
16373
|
if (err instanceof NotFoundException$3) return void 0;
|
|
@@ -16440,9 +16469,11 @@ var ApiGatewayV2Provider = class {
|
|
|
16440
16469
|
/**
|
|
16441
16470
|
* `UpdateApi` accepts the full Update input shape (not JSON Patch).
|
|
16442
16471
|
* Mutable fields cdkd manages: `Name` / `Description` /
|
|
16443
|
-
* `CorsConfiguration
|
|
16444
|
-
*
|
|
16445
|
-
* `
|
|
16472
|
+
* `CorsConfiguration` / `DisableExecuteApiEndpoint` / `Version` /
|
|
16473
|
+
* `RouteSelectionExpression` / `ApiKeySelectionExpression`.
|
|
16474
|
+
* `ProtocolType` is immutable — the deploy engine handles changes via
|
|
16475
|
+
* the replacement path; we surface a `ResourceUpdateNotSupportedError`
|
|
16476
|
+
* if it ever reaches us anyway.
|
|
16446
16477
|
*/
|
|
16447
16478
|
async updateApi(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
16448
16479
|
if (properties["ProtocolType"] !== void 0 && previousProperties["ProtocolType"] !== void 0 && properties["ProtocolType"] !== previousProperties["ProtocolType"]) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "ProtocolType is immutable on AWS::ApiGatewayV2::Api; re-deploy with cdkd deploy --replace");
|
|
@@ -16460,6 +16491,22 @@ var ApiGatewayV2Provider = class {
|
|
|
16460
16491
|
input.CorsConfiguration = properties["CorsConfiguration"];
|
|
16461
16492
|
changed = true;
|
|
16462
16493
|
}
|
|
16494
|
+
if (properties["DisableExecuteApiEndpoint"] !== void 0 && properties["DisableExecuteApiEndpoint"] !== previousProperties["DisableExecuteApiEndpoint"]) {
|
|
16495
|
+
input.DisableExecuteApiEndpoint = properties["DisableExecuteApiEndpoint"];
|
|
16496
|
+
changed = true;
|
|
16497
|
+
}
|
|
16498
|
+
if (properties["Version"] !== void 0 && properties["Version"] !== previousProperties["Version"]) {
|
|
16499
|
+
input.Version = properties["Version"];
|
|
16500
|
+
changed = true;
|
|
16501
|
+
}
|
|
16502
|
+
if (properties["RouteSelectionExpression"] !== void 0 && properties["RouteSelectionExpression"] !== previousProperties["RouteSelectionExpression"]) {
|
|
16503
|
+
input.RouteSelectionExpression = properties["RouteSelectionExpression"];
|
|
16504
|
+
changed = true;
|
|
16505
|
+
}
|
|
16506
|
+
if (properties["ApiKeySelectionExpression"] !== void 0 && properties["ApiKeySelectionExpression"] !== previousProperties["ApiKeySelectionExpression"]) {
|
|
16507
|
+
input.ApiKeySelectionExpression = properties["ApiKeySelectionExpression"];
|
|
16508
|
+
changed = true;
|
|
16509
|
+
}
|
|
16463
16510
|
if (!changed) {
|
|
16464
16511
|
this.logger.debug(`No mutable Api fields changed for ${logicalId}; skipping UpdateApi`);
|
|
16465
16512
|
return {
|
|
@@ -16482,8 +16529,9 @@ var ApiGatewayV2Provider = class {
|
|
|
16482
16529
|
/**
|
|
16483
16530
|
* `UpdateStage` keys on `(ApiId, StageName)` — `StageName` is the
|
|
16484
16531
|
* physicalId and immutable. Mutable fields cdkd manages:
|
|
16485
|
-
* `AutoDeploy` / `Description
|
|
16486
|
-
*
|
|
16532
|
+
* `AutoDeploy` / `Description` / `StageVariables` /
|
|
16533
|
+
* `DefaultRouteSettings`. `ApiId` is also immutable (a stage cannot be
|
|
16534
|
+
* moved between APIs).
|
|
16487
16535
|
*/
|
|
16488
16536
|
async updateStage(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
16489
16537
|
const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
|
|
@@ -16503,6 +16551,14 @@ var ApiGatewayV2Provider = class {
|
|
|
16503
16551
|
input.Description = properties["Description"];
|
|
16504
16552
|
changed = true;
|
|
16505
16553
|
}
|
|
16554
|
+
if (properties["StageVariables"] !== void 0 && !this.deepEqual(properties["StageVariables"], previousProperties["StageVariables"])) {
|
|
16555
|
+
input.StageVariables = properties["StageVariables"];
|
|
16556
|
+
changed = true;
|
|
16557
|
+
}
|
|
16558
|
+
if (properties["DefaultRouteSettings"] !== void 0 && !this.deepEqual(properties["DefaultRouteSettings"], previousProperties["DefaultRouteSettings"])) {
|
|
16559
|
+
input.DefaultRouteSettings = properties["DefaultRouteSettings"];
|
|
16560
|
+
changed = true;
|
|
16561
|
+
}
|
|
16506
16562
|
if (!changed) {
|
|
16507
16563
|
this.logger.debug(`No mutable Stage fields changed for ${logicalId}; skipping UpdateStage`);
|
|
16508
16564
|
return {
|
|
@@ -16525,7 +16581,8 @@ var ApiGatewayV2Provider = class {
|
|
|
16525
16581
|
/**
|
|
16526
16582
|
* `UpdateIntegration` keys on `(ApiId, IntegrationId)`. Mutable
|
|
16527
16583
|
* fields cdkd manages: `IntegrationType` / `IntegrationUri` /
|
|
16528
|
-
* `IntegrationMethod` / `PayloadFormatVersion
|
|
16584
|
+
* `IntegrationMethod` / `PayloadFormatVersion` / `TimeoutInMillis` /
|
|
16585
|
+
* `RequestParameters` / `Description`.
|
|
16529
16586
|
*/
|
|
16530
16587
|
async updateIntegration(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
16531
16588
|
const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
|
|
@@ -16552,6 +16609,18 @@ var ApiGatewayV2Provider = class {
|
|
|
16552
16609
|
input.PayloadFormatVersion = properties["PayloadFormatVersion"];
|
|
16553
16610
|
changed = true;
|
|
16554
16611
|
}
|
|
16612
|
+
if (properties["TimeoutInMillis"] !== void 0 && properties["TimeoutInMillis"] !== previousProperties["TimeoutInMillis"]) {
|
|
16613
|
+
input.TimeoutInMillis = properties["TimeoutInMillis"];
|
|
16614
|
+
changed = true;
|
|
16615
|
+
}
|
|
16616
|
+
if (properties["RequestParameters"] !== void 0 && !this.deepEqual(properties["RequestParameters"], previousProperties["RequestParameters"])) {
|
|
16617
|
+
input.RequestParameters = properties["RequestParameters"];
|
|
16618
|
+
changed = true;
|
|
16619
|
+
}
|
|
16620
|
+
if (properties["Description"] !== void 0 && properties["Description"] !== previousProperties["Description"]) {
|
|
16621
|
+
input.Description = properties["Description"];
|
|
16622
|
+
changed = true;
|
|
16623
|
+
}
|
|
16555
16624
|
if (!changed) {
|
|
16556
16625
|
this.logger.debug(`No mutable Integration fields changed for ${logicalId}; skipping UpdateIntegration`);
|
|
16557
16626
|
return {
|
|
@@ -51378,7 +51447,7 @@ function reorderArgs(argv) {
|
|
|
51378
51447
|
*/
|
|
51379
51448
|
async function main() {
|
|
51380
51449
|
const program = new Command();
|
|
51381
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
51450
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.178.0");
|
|
51382
51451
|
program.addCommand(createBootstrapCommand());
|
|
51383
51452
|
program.addCommand(createSynthCommand());
|
|
51384
51453
|
program.addCommand(createListCommand());
|