@go-to-k/cdkd 0.17.0 → 0.18.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/README.md +68 -14
- package/dist/cli.js +230 -38
- package/dist/cli.js.map +4 -4
- package/dist/go-to-k-cdkd-0.18.0.tgz +0 -0
- package/dist/index.js +9 -5
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.17.0.tgz +0 -0
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -2846,7 +2846,7 @@ var S3StateBackend = class {
|
|
|
2846
2846
|
*
|
|
2847
2847
|
* Returns true for either layout: the new region-scoped key, or the legacy
|
|
2848
2848
|
* key when its embedded `region` matches the requested region. This lets
|
|
2849
|
-
* `cdkd state
|
|
2849
|
+
* `cdkd state orphan <stack> --region X` and `cdkd destroy <stack>` see legacy
|
|
2850
2850
|
* state without forcing a write-through migration first.
|
|
2851
2851
|
*/
|
|
2852
2852
|
async stateExists(stackName, region) {
|
|
@@ -7124,13 +7124,15 @@ import {
|
|
|
7124
7124
|
init_aws_clients();
|
|
7125
7125
|
|
|
7126
7126
|
// src/provisioning/resource-name.ts
|
|
7127
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7127
7128
|
import { createHash } from "node:crypto";
|
|
7128
|
-
var
|
|
7129
|
-
function
|
|
7130
|
-
|
|
7129
|
+
var stackNameStore = new AsyncLocalStorage();
|
|
7130
|
+
function withStackName(stackName, fn) {
|
|
7131
|
+
return stackNameStore.run(stackName, fn);
|
|
7131
7132
|
}
|
|
7132
7133
|
function generateResourceName(name, options) {
|
|
7133
7134
|
const { maxLength, lowercase = false, allowedPattern = /[^a-zA-Z0-9-]/g } = options;
|
|
7135
|
+
const currentStackName = stackNameStore.getStore();
|
|
7134
7136
|
const fullName = currentStackName ? `${currentStackName}-${name}` : name;
|
|
7135
7137
|
let sanitized = lowercase ? fullName.toLowerCase() : fullName;
|
|
7136
7138
|
sanitized = sanitized.replace(allowedPattern, "-");
|
|
@@ -8064,9 +8066,11 @@ var DeployEngine = class {
|
|
|
8064
8066
|
* Deploy a CloudFormation template
|
|
8065
8067
|
*/
|
|
8066
8068
|
async deploy(stackName, template) {
|
|
8069
|
+
return withStackName(stackName, () => this.doDeploy(stackName, template));
|
|
8070
|
+
}
|
|
8071
|
+
async doDeploy(stackName, template) {
|
|
8067
8072
|
const startTime = Date.now();
|
|
8068
8073
|
this.logger.debug(`Starting deployment for stack: ${stackName}`);
|
|
8069
|
-
setCurrentStackName(stackName);
|
|
8070
8074
|
await this.lockManager.acquireLockWithRetry(stackName, this.stackRegion, void 0, "deploy");
|
|
8071
8075
|
const renderer = getLiveRenderer();
|
|
8072
8076
|
renderer.start();
|