@go-to-k/cdkd 0.159.3 → 0.160.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 +36 -12
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BzrECC3i.js → deploy-engine-BXWv-yRb.js} +296 -165
- package/dist/deploy-engine-BXWv-yRb.js.map +1 -0
- package/dist/index.d.ts +34 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-BzrECC3i.js.map +0 -1
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 { $ as CdkdError, A as shouldRetainResource, B as resolveSkipPrefix, C as IntrinsicFunctionResolver, D as TemplateParser, E as DagBuilder, F as Synthesizer, G as CFN_TEMPLATE_URL_LIMIT, H as resolveStateBucketWithDefaultAndSource, I as getDefaultStateBucketName, J as uploadCfnTemplate, K as MIGRATE_TMP_PREFIX, L as getLegacyStateBucketName, M as stringifyValue, N as WorkGraph, O as LockManager, P as buildDockerImage, R as resolveApp, S as assertRegionMatch, T as DiffCalculator, U as warnDeprecatedNoPrefixCliFlag, V as resolveStateBucketWithDefault, W as CFN_TEMPLATE_BODY_LIMIT, Y as AssemblyReader, Z as resolveBucketRegion, _ as matchesCdkPath, a as withRetry, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as PartialFailureError, d as green, dt as ResourceUpdateNotSupportedError, f as red, ft as RouteDiscoveryError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalStartServiceError, j as AssetPublisher, k as S3StateBackend, l as cyan, lt as ProvisioningError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LocalInvokeBuildError, o as IMPLICIT_DELETE_DEPENDENCIES, ot as MissingCdkCliError, p as yellow, pt as StackHasActiveImportsError, q as findLargeInlineResources, r as DeployEngine, rt as LocalMigrateError, s as formatResourceLine, st as NestedStackChildDirectDestroyError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ResourceTimeoutError, v as normalizeAwsTagsToCfn, w as applyRoleArnIfSet, x as CloudControlProvider, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveCaptureObservedState } from "./deploy-engine-
|
|
3
|
+
import { $ as CdkdError, A as shouldRetainResource, B as resolveSkipPrefix, C as IntrinsicFunctionResolver, D as TemplateParser, E as DagBuilder, F as Synthesizer, G as CFN_TEMPLATE_URL_LIMIT, H as resolveStateBucketWithDefaultAndSource, I as getDefaultStateBucketName, J as uploadCfnTemplate, K as MIGRATE_TMP_PREFIX, L as getLegacyStateBucketName, M as stringifyValue, N as WorkGraph, O as LockManager, P as buildDockerImage, R as resolveApp, S as assertRegionMatch, T as DiffCalculator, U as warnDeprecatedNoPrefixCliFlag, V as resolveStateBucketWithDefault, W as CFN_TEMPLATE_BODY_LIMIT, Y as AssemblyReader, Z as resolveBucketRegion, _ as matchesCdkPath, a as withRetry, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as PartialFailureError, d as green, dt as ResourceUpdateNotSupportedError, f as red, ft as RouteDiscoveryError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalStartServiceError, j as AssetPublisher, k as S3StateBackend, l as cyan, lt as ProvisioningError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LocalInvokeBuildError, o as IMPLICIT_DELETE_DEPENDENCIES, ot as MissingCdkCliError, p as yellow, pt as StackHasActiveImportsError, q as findLargeInlineResources, r as DeployEngine, rt as LocalMigrateError, s as formatResourceLine, st as NestedStackChildDirectDestroyError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ResourceTimeoutError, v as normalizeAwsTagsToCfn, w as applyRoleArnIfSet, x as CloudControlProvider, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveCaptureObservedState } from "./deploy-engine-BXWv-yRb.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 { createHash, createHmac, createPublicKey, createVerify, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -32190,7 +32190,10 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
32190
32190
|
const baseLabel = `Deleting ${logicalId} (${resource.resourceType})`;
|
|
32191
32191
|
renderer.addTask(logicalId, baseLabel);
|
|
32192
32192
|
try {
|
|
32193
|
-
const provider = destroyProviderRegistry.
|
|
32193
|
+
const provider = destroyProviderRegistry.getProviderFor({
|
|
32194
|
+
resourceType: resource.resourceType,
|
|
32195
|
+
provisionedBy: resource.provisionedBy
|
|
32196
|
+
}).provider;
|
|
32194
32197
|
const providerMinTimeoutMs = provider.getMinResourceTimeoutMs?.() ?? 0;
|
|
32195
32198
|
const warnAfterMs = ctx.resourceWarnAfterByType?.[resource.resourceType] ?? ctx.resourceWarnAfterMs ?? 3e5;
|
|
32196
32199
|
const globalTimeoutMs = ctx.resourceTimeoutMs ?? 18e5;
|
|
@@ -34306,7 +34309,7 @@ async function loadStateOrEmpty(stackName, region, stateBackend) {
|
|
|
34306
34309
|
region,
|
|
34307
34310
|
resources: {},
|
|
34308
34311
|
outputs: {},
|
|
34309
|
-
version:
|
|
34312
|
+
version: 7,
|
|
34310
34313
|
lastModified: Date.now()
|
|
34311
34314
|
};
|
|
34312
34315
|
}
|
|
@@ -35078,7 +35081,10 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
35078
35081
|
}
|
|
35079
35082
|
let provider;
|
|
35080
35083
|
try {
|
|
35081
|
-
provider = providerRegistry.
|
|
35084
|
+
provider = providerRegistry.getProviderFor({
|
|
35085
|
+
resourceType: resource.resourceType,
|
|
35086
|
+
provisionedBy: resource.provisionedBy
|
|
35087
|
+
}).provider;
|
|
35082
35088
|
} catch {
|
|
35083
35089
|
outcomes.push({
|
|
35084
35090
|
kind: "unsupported",
|
|
@@ -35355,7 +35361,10 @@ async function runRevert(reports, providerRegistry, stateConfig, awsClients, opt
|
|
|
35355
35361
|
logger.error(` ✗ ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): resource missing from state; skipped.`);
|
|
35356
35362
|
return;
|
|
35357
35363
|
}
|
|
35358
|
-
const provider = providerRegistry.
|
|
35364
|
+
const provider = providerRegistry.getProviderFor({
|
|
35365
|
+
resourceType: outcome.resourceType,
|
|
35366
|
+
provisionedBy: stateResource.provisionedBy
|
|
35367
|
+
}).provider;
|
|
35359
35368
|
const desiredProperties = stateResource.observedProperties ?? stateResource.properties ?? {};
|
|
35360
35369
|
const newProperties = buildRevertNewProperties(outcome.changes, desiredProperties, outcome.awsProperties);
|
|
35361
35370
|
try {
|
|
@@ -35871,7 +35880,10 @@ var AttributeFetcher = class {
|
|
|
35871
35880
|
};
|
|
35872
35881
|
let provider;
|
|
35873
35882
|
try {
|
|
35874
|
-
provider = this.providerRegistry.
|
|
35883
|
+
provider = this.providerRegistry.getProviderFor({
|
|
35884
|
+
resourceType: orphan.resourceType,
|
|
35885
|
+
provisionedBy: orphan.provisionedBy
|
|
35886
|
+
}).provider;
|
|
35875
35887
|
} catch (err) {
|
|
35876
35888
|
return {
|
|
35877
35889
|
ok: false,
|
|
@@ -39741,6 +39753,8 @@ function renderStateBlock(state, lockInfo) {
|
|
|
39741
39753
|
lines.push(logicalId);
|
|
39742
39754
|
lines.push(` Type: ${resource.resourceType}`);
|
|
39743
39755
|
lines.push(` PhysicalID: ${resource.physicalId}`);
|
|
39756
|
+
const provisionedBy = resource.provisionedBy ?? "(sdk, legacy default)";
|
|
39757
|
+
lines.push(` ProvisionedBy: ${provisionedBy}`);
|
|
39744
39758
|
const deps = resource.dependencies ?? [];
|
|
39745
39759
|
lines.push(` Dependencies: ${deps.length > 0 ? deps.join(", ") : "(none)"}`);
|
|
39746
39760
|
const attrEntries = Object.entries(resource.attributes ?? {});
|
|
@@ -40371,7 +40385,10 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
|
|
|
40371
40385
|
for (const [, resource] of entries) {
|
|
40372
40386
|
let provider;
|
|
40373
40387
|
try {
|
|
40374
|
-
provider = providerRegistry.
|
|
40388
|
+
provider = providerRegistry.getProviderFor({
|
|
40389
|
+
resourceType: resource.resourceType,
|
|
40390
|
+
provisionedBy: resource.provisionedBy
|
|
40391
|
+
}).provider;
|
|
40375
40392
|
} catch {
|
|
40376
40393
|
wouldUnsupported++;
|
|
40377
40394
|
continue;
|
|
@@ -40400,7 +40417,10 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
|
|
|
40400
40417
|
}
|
|
40401
40418
|
let provider;
|
|
40402
40419
|
try {
|
|
40403
|
-
provider = providerRegistry.
|
|
40420
|
+
provider = providerRegistry.getProviderFor({
|
|
40421
|
+
resourceType: resource.resourceType,
|
|
40422
|
+
provisionedBy: resource.provisionedBy
|
|
40423
|
+
}).provider;
|
|
40404
40424
|
} catch {
|
|
40405
40425
|
unsupported++;
|
|
40406
40426
|
return;
|
|
@@ -40939,11 +40959,12 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
|
|
|
40939
40959
|
resourceType: row.resourceType,
|
|
40940
40960
|
properties: tmplResource.Properties ?? {},
|
|
40941
40961
|
attributes: {},
|
|
40942
|
-
dependencies: [...deps]
|
|
40962
|
+
dependencies: [...deps],
|
|
40963
|
+
provisionedBy: "sdk"
|
|
40943
40964
|
};
|
|
40944
40965
|
}
|
|
40945
40966
|
return {
|
|
40946
|
-
version:
|
|
40967
|
+
version: 7,
|
|
40947
40968
|
stackName,
|
|
40948
40969
|
region,
|
|
40949
40970
|
resources,
|
|
@@ -41136,7 +41157,10 @@ async function captureObservedForImportedResources(stackState, providerRegistry,
|
|
|
41136
41157
|
if (entries.length === 0) return;
|
|
41137
41158
|
await Promise.all(entries.map(async ([logicalId, resource]) => {
|
|
41138
41159
|
try {
|
|
41139
|
-
const provider = providerRegistry.
|
|
41160
|
+
const provider = providerRegistry.getProviderFor({
|
|
41161
|
+
resourceType: resource.resourceType,
|
|
41162
|
+
provisionedBy: resource.provisionedBy
|
|
41163
|
+
}).provider;
|
|
41140
41164
|
if (!provider.readCurrentState) return;
|
|
41141
41165
|
const observed = await provider.readCurrentState(resource.physicalId, logicalId, resource.resourceType, resource.properties ?? {}, buildReadCurrentStateContext(stackState, logicalId));
|
|
41142
41166
|
if (observed !== void 0) resource.observedProperties = observed;
|
|
@@ -59513,7 +59537,7 @@ function reorderArgs(argv) {
|
|
|
59513
59537
|
*/
|
|
59514
59538
|
async function main() {
|
|
59515
59539
|
const program = new Command();
|
|
59516
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
59540
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.160.0");
|
|
59517
59541
|
program.addCommand(createBootstrapCommand());
|
|
59518
59542
|
program.addCommand(createSynthCommand());
|
|
59519
59543
|
program.addCommand(createListCommand());
|