@go-to-k/cdkd 0.245.0 → 0.246.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 +77 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1890,7 +1890,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
1890
1890
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
1891
1891
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
1892
1892
|
function getCdkdVersion() {
|
|
1893
|
-
return "0.
|
|
1893
|
+
return "0.246.0";
|
|
1894
1894
|
}
|
|
1895
1895
|
/**
|
|
1896
1896
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -37818,6 +37818,81 @@ var CodeCommitRepositoryProvider = class {
|
|
|
37818
37818
|
}
|
|
37819
37819
|
}
|
|
37820
37820
|
/**
|
|
37821
|
+
* Read the currently-deployed properties for `cdkd drift`.
|
|
37822
|
+
*
|
|
37823
|
+
* Maps the CodeCommit read side back to the flat CFn inputs cdkd stores
|
|
37824
|
+
* in state:
|
|
37825
|
+
* - `repositoryName` -> `RepositoryName`
|
|
37826
|
+
* - `repositoryDescription` -> `RepositoryDescription` (placeholder `''`)
|
|
37827
|
+
* - `kmsKeyId` -> `KmsKeyId`
|
|
37828
|
+
* - `ListTagsForResource` -> `Tags` (CFn `[{Key, Value}]` list)
|
|
37829
|
+
*
|
|
37830
|
+
* Every user-controllable top-level key `update()` can mutate is emitted
|
|
37831
|
+
* ALWAYS — with a `?? ''` / `?? []` placeholder when AWS returns the field
|
|
37832
|
+
* as undefined / empty (docs/provider-development.md §3b). Omitting the key
|
|
37833
|
+
* on the empty path would let a resource deployed WITHOUT a description
|
|
37834
|
+
* never carry `RepositoryDescription` in `observedProperties`, making a
|
|
37835
|
+
* console-side ADD of a description invisible to drift forever. `Tags` are
|
|
37836
|
+
* returned in the CFn list shape and the comparator canonicalizes tag lists
|
|
37837
|
+
* order-independently (`drift-normalize.ts`), so a tag reorder never
|
|
37838
|
+
* surfaces as phantom drift. `aws:*` tags (CDK's `aws:cdk:path` etc.) are
|
|
37839
|
+
* dropped by `normalizeAwsTagsToCfn` so a CDK-deployed repository does not
|
|
37840
|
+
* report drift on the metadata tag cdkd never templated.
|
|
37841
|
+
*
|
|
37842
|
+
* Returns `undefined` when the repository no longer exists (or
|
|
37843
|
+
* `GetRepository` returns no metadata) so the caller reports it as
|
|
37844
|
+
* drift-unknown rather than throwing — mirrors the optional `import`
|
|
37845
|
+
* method's incremental opt-in shape. A repository deleted BETWEEN the
|
|
37846
|
+
* `GetRepository` and `ListTagsForResource` calls (a race with a
|
|
37847
|
+
* concurrent destroy) is handled the same way rather than aborting the
|
|
37848
|
+
* whole `cdkd drift` run.
|
|
37849
|
+
*
|
|
37850
|
+
* Caveat: `KmsKeyId` is returned as AWS resolves it — the full key ARN.
|
|
37851
|
+
* On the normal drift path the baseline is `observedProperties` (captured
|
|
37852
|
+
* via this same method at deploy time), so ARN == ARN and there is no
|
|
37853
|
+
* phantom drift; but on the `properties`-fallback path (older state with
|
|
37854
|
+
* no `observedProperties`) a template that set `KmsKeyId` as an alias or
|
|
37855
|
+
* bare key id would phantom-drift against the returned ARN. This is a
|
|
37856
|
+
* general fallback-path limitation shared with other providers.
|
|
37857
|
+
*/
|
|
37858
|
+
async readCurrentState(physicalId, _logicalId, _resourceType) {
|
|
37859
|
+
let metadata;
|
|
37860
|
+
try {
|
|
37861
|
+
metadata = await this.getRepositoryMetadata(physicalId);
|
|
37862
|
+
} catch (err) {
|
|
37863
|
+
if (err instanceof RepositoryDoesNotExistException) return void 0;
|
|
37864
|
+
throw err;
|
|
37865
|
+
}
|
|
37866
|
+
if (!metadata) return void 0;
|
|
37867
|
+
let tags = [];
|
|
37868
|
+
if (metadata.Arn) try {
|
|
37869
|
+
tags = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn: metadata.Arn }))).tags);
|
|
37870
|
+
} catch (err) {
|
|
37871
|
+
if (err instanceof RepositoryDoesNotExistException) return void 0;
|
|
37872
|
+
throw err;
|
|
37873
|
+
}
|
|
37874
|
+
return {
|
|
37875
|
+
RepositoryName: metadata.repositoryName ?? "",
|
|
37876
|
+
RepositoryDescription: metadata.repositoryDescription ?? "",
|
|
37877
|
+
KmsKeyId: metadata.kmsKeyId ?? "",
|
|
37878
|
+
Tags: tags
|
|
37879
|
+
};
|
|
37880
|
+
}
|
|
37881
|
+
/**
|
|
37882
|
+
* State property paths this provider cannot read back from AWS, skipped by
|
|
37883
|
+
* the drift comparator to avoid a guaranteed false positive.
|
|
37884
|
+
*
|
|
37885
|
+
* `Code` (create-only S3-zip seed content unpacked into an initial commit)
|
|
37886
|
+
* and `Triggers` (repository trigger management, not wired) are both
|
|
37887
|
+
* `unhandledByDesign` — normally rejected pre-flight, but a state written
|
|
37888
|
+
* under `--allow-unsupported-properties` could still carry them, and neither
|
|
37889
|
+
* is read back by `readCurrentState`, so exclude both defensively to avoid a
|
|
37890
|
+
* guaranteed false-positive drift on every run.
|
|
37891
|
+
*/
|
|
37892
|
+
getDriftUnknownPaths(_resourceType) {
|
|
37893
|
+
return ["Code", "Triggers"];
|
|
37894
|
+
}
|
|
37895
|
+
/**
|
|
37821
37896
|
* Adopt an existing CodeCommit repository into cdkd state.
|
|
37822
37897
|
*
|
|
37823
37898
|
* Lookup order:
|
|
@@ -60189,7 +60264,7 @@ function reorderArgs(argv) {
|
|
|
60189
60264
|
async function main() {
|
|
60190
60265
|
installPipeCloseHandler();
|
|
60191
60266
|
const program = new Command();
|
|
60192
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
60267
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.246.0");
|
|
60193
60268
|
program.addCommand(createBootstrapCommand());
|
|
60194
60269
|
program.addCommand(createSynthCommand());
|
|
60195
60270
|
program.addCommand(createListCommand());
|