cdk-local 0.160.1 → 0.161.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 +5 -1
- package/dist/assembly-path-R96uhMm1.js +208 -0
- package/dist/assembly-path-R96uhMm1.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{docker-cmd-CoZdbeos.js → docker-cmd-Cjg3jGYF.js} +5 -223
- package/dist/docker-cmd-Cjg3jGYF.js.map +1 -0
- package/dist/docker-runner-CnXQIUjd.js +1810 -0
- package/dist/docker-runner-CnXQIUjd.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +141 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +5 -3
- package/dist/{local-studio-Ur6enHho.js → local-studio-DNWiPLme.js} +310 -2273
- package/dist/local-studio-DNWiPLme.js.map +1 -0
- package/dist/{local-studio-DgWD3_iK.d.ts → local-studio-DYKegdhd.d.ts} +18 -2
- package/dist/local-studio-DYKegdhd.d.ts.map +1 -0
- package/dist/rolldown-runtime-w6R9maHv.js +18 -0
- package/dist/workload-aws-wiring-BIxf0jtl.js +916 -0
- package/dist/workload-aws-wiring-BIxf0jtl.js.map +1 -0
- package/package.json +1 -1
- package/dist/docker-cmd-CoZdbeos.js.map +0 -1
- package/dist/local-studio-DgWD3_iK.d.ts.map +0 -1
- package/dist/local-studio-Ur6enHho.js.map +0 -1
package/README.md
CHANGED
|
@@ -227,7 +227,11 @@ The same overlay can redirect the AWS SDK itself. Set the SDK's standard per-ser
|
|
|
227
227
|
|
|
228
228
|
DynamoDB and S3 calls resolve to the local endpoint; Secrets Manager, SSM Parameter Store, and everything else have no override, so they hit real AWS through your `--assume-role` / `--from-cfn-stack` credentials. The suffix is the service name uppercased (`DYNAMODB`, `S3`, `SECRETS_MANAGER`, ...); the bare `AWS_ENDPOINT_URL` (no suffix) redirects every service at once, so the per-service form is what makes the split selective. cdk-local only injects these variables — it does not run the endpoint for you; start the local server separately and point the URL at it.
|
|
229
229
|
|
|
230
|
-
`host.docker.internal` resolves to the host from inside the container — Docker Desktop (macOS / Windows) provides it natively, and on Linux native dockerd `cdkl` adds the `host-gateway` alias for you on the `invoke` / `run-task` / `start-service` / `start-alb` container runs (Docker 20.10+). On an older daemon the alias is skipped; use the Docker bridge address (e.g. `http://172.17.0.1:8000`) or put the local server on the same Docker network.
|
|
230
|
+
A host NAME such as `host.docker.internal` makes the JavaScript, Java and Go SDKs address S3 virtual-hosted style (`<bucket>.host.docker.internal`); for an S3-compatible endpoint, export `AWS_ENDPOINT_URL_S3=http://127.0.0.1:<port>` in your shell instead and cdk-local forwards it with the URL unchanged (see Local AWS endpoints below). `host.docker.internal` resolves to the host from inside the container — Docker Desktop (macOS / Windows) provides it natively, and on Linux native dockerd `cdkl` adds the `host-gateway` alias for you on the `invoke` / `run-task` / `start-service` / `start-alb` container runs (Docker 20.10+). On an older daemon the alias is skipped; use the Docker bridge address (e.g. `http://172.17.0.1:8000`) or put the local server on the same Docker network.
|
|
231
|
+
|
|
232
|
+
### Local AWS endpoints
|
|
233
|
+
|
|
234
|
+
An `AWS_ENDPOINT_URL` / `AWS_ENDPOINT_URL_<SERVICE>` exported in your shell (or a profile's `endpoint_url`) is forwarded to every workload container by default, together with your `AWS_CA_BUNDLE`; a `127.0.0.1` endpoint keeps working inside the container unchanged, TLS verification included. To run a whole command against a local AWS Emulator — cdk-local's own `--from-cfn-stack` reads included, containers given only the emulator's credentials — pass `--aws-emulator` (default `https://127.0.0.1:9297`). Rules: [docs/cli-reference.md#aws-endpoints-ca-bundles-and-credentials-inside-containers](docs/cli-reference.md#aws-endpoints-ca-bundles-and-credentials-inside-containers).
|
|
231
235
|
|
|
232
236
|
## Hot reload — `--watch`
|
|
233
237
|
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { t as getLogger } from "./logger-Co5XVwco.js";
|
|
2
|
+
import { readlinkSync, realpathSync } from "node:fs";
|
|
3
|
+
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
+
|
|
5
|
+
//#region src/local/credential-error.ts
|
|
6
|
+
const SERVICE_MESSAGE_MAX = 512;
|
|
7
|
+
function stringifyThrown(err) {
|
|
8
|
+
try {
|
|
9
|
+
return err instanceof Error ? String(err.message) : String(err);
|
|
10
|
+
} catch {
|
|
11
|
+
return "[unstringifiable throw]";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function clampErrorName(err) {
|
|
15
|
+
let rawKind;
|
|
16
|
+
try {
|
|
17
|
+
rawKind = err instanceof Error ? err.name : "unknown";
|
|
18
|
+
} catch {
|
|
19
|
+
return "unknown";
|
|
20
|
+
}
|
|
21
|
+
return typeof rawKind === "string" && /^[A-Za-z0-9_.-]{1,64}$/.test(rawKind) ? rawKind : "unknown";
|
|
22
|
+
}
|
|
23
|
+
function clampErrorCode(err) {
|
|
24
|
+
if (!err || typeof err !== "object") return void 0;
|
|
25
|
+
let raw;
|
|
26
|
+
try {
|
|
27
|
+
raw = err.code;
|
|
28
|
+
} catch {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (typeof raw !== "string") return void 0;
|
|
32
|
+
return /^[A-Za-z0-9_.-]{1,64}$/.test(raw) ? raw : void 0;
|
|
33
|
+
}
|
|
34
|
+
function isAwsServiceException(err) {
|
|
35
|
+
if (!err || typeof err !== "object") return false;
|
|
36
|
+
const candidate = err;
|
|
37
|
+
try {
|
|
38
|
+
return Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function flattenToOneLine(message) {
|
|
44
|
+
return message.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}\p{Cs}]/gu, " ");
|
|
45
|
+
}
|
|
46
|
+
function sanitizeServiceExceptionMessage(message) {
|
|
47
|
+
const points = [...flattenToOneLine(message)];
|
|
48
|
+
if (points.length <= SERVICE_MESSAGE_MAX) return points.join("");
|
|
49
|
+
return `${points.slice(0, SERVICE_MESSAGE_MAX).join("")}[... truncated; ${points.length}-character message]`;
|
|
50
|
+
}
|
|
51
|
+
function describeCredentialLoadFailure(err) {
|
|
52
|
+
const code = clampErrorCode(err);
|
|
53
|
+
return `${code === void 0 ? clampErrorName(err) : `${clampErrorName(err)} ${code}`}; ${stringifyThrown(err).length}-character message withheld, logged at debug level under --verbose`;
|
|
54
|
+
}
|
|
55
|
+
function describeAwsFailureForWarn(err, operation) {
|
|
56
|
+
if (isAwsServiceException(err)) return `${clampErrorName(err)}: ${sanitizeServiceExceptionMessage(stringifyThrown(err))}`;
|
|
57
|
+
getLogger().debug(`${operation}: the AWS SDK's own failure message was: ${flattenToOneLine(stringifyThrown(err))}`);
|
|
58
|
+
return describeCredentialLoadFailure(err);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/utils/assembly-path.ts
|
|
63
|
+
function isInside(base, candidate) {
|
|
64
|
+
const rel = relative(base, candidate);
|
|
65
|
+
if (rel === "" || rel === "..") return false;
|
|
66
|
+
if (rel.startsWith(`..${sep}`)) return false;
|
|
67
|
+
return !isAbsolute(rel);
|
|
68
|
+
}
|
|
69
|
+
function tryRealpath(p) {
|
|
70
|
+
try {
|
|
71
|
+
return realpathSync.native(p);
|
|
72
|
+
} catch {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function tryReadlink(p) {
|
|
77
|
+
try {
|
|
78
|
+
return readlinkSync(p);
|
|
79
|
+
} catch {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const MAX_LINK_HOPS = 40;
|
|
84
|
+
const MAX_PATH_COMPONENTS = 1e3;
|
|
85
|
+
function resolveThroughLinks(target, hops = 0, climbs = 0) {
|
|
86
|
+
const direct = tryRealpath(target);
|
|
87
|
+
if (direct !== void 0) return direct;
|
|
88
|
+
if (hops >= MAX_LINK_HOPS) return void 0;
|
|
89
|
+
if (climbs >= MAX_PATH_COMPONENTS) return void 0;
|
|
90
|
+
const parent = dirname(target);
|
|
91
|
+
if (parent === target) return void 0;
|
|
92
|
+
const realParent = resolveThroughLinks(parent, hops, climbs + 1);
|
|
93
|
+
if (realParent === void 0) return void 0;
|
|
94
|
+
const link = tryReadlink(target);
|
|
95
|
+
if (link === void 0) return join(realParent, basename(target));
|
|
96
|
+
return resolveThroughLinks(resolve(realParent, link), hops + 1, climbs);
|
|
97
|
+
}
|
|
98
|
+
function resolveAssemblyPath(dir, candidate, options) {
|
|
99
|
+
const base = resolve(dir);
|
|
100
|
+
const bound = options?.containWithin === void 0 ? base : resolve(options.containWithin);
|
|
101
|
+
const joined = resolve(join(base, candidate));
|
|
102
|
+
if (!isInside(bound, joined)) return {
|
|
103
|
+
contained: false,
|
|
104
|
+
escape: "lexical",
|
|
105
|
+
path: joined
|
|
106
|
+
};
|
|
107
|
+
const realBound = resolveThroughLinks(bound);
|
|
108
|
+
if (realBound !== void 0) {
|
|
109
|
+
const realTarget = resolveThroughLinks(joined);
|
|
110
|
+
if (realTarget !== void 0 && !isInside(realBound, realTarget)) return {
|
|
111
|
+
contained: false,
|
|
112
|
+
escape: "symlink",
|
|
113
|
+
path: joined,
|
|
114
|
+
realPath: realTarget
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
contained: true,
|
|
119
|
+
path: joined
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function absoluteAssemblyPathEscape(bound, absolutePath) {
|
|
123
|
+
const resolvedBound = resolve(bound);
|
|
124
|
+
const target = resolve(absolutePath);
|
|
125
|
+
const lexicallyOutside = !isInside(resolvedBound, target) && target !== resolvedBound;
|
|
126
|
+
const realBound = resolveThroughLinks(resolvedBound);
|
|
127
|
+
const realTarget = resolveThroughLinks(target);
|
|
128
|
+
const reallyOutside = realBound === void 0 || realTarget === void 0 ? void 0 : !isInside(realBound, realTarget) && realTarget !== realBound;
|
|
129
|
+
if (lexicallyOutside) {
|
|
130
|
+
if (reallyOutside === false) return void 0;
|
|
131
|
+
return {
|
|
132
|
+
contained: false,
|
|
133
|
+
escape: "lexical",
|
|
134
|
+
path: target
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
if (reallyOutside === true) return {
|
|
138
|
+
contained: false,
|
|
139
|
+
escape: "symlink",
|
|
140
|
+
path: target,
|
|
141
|
+
realPath: realTarget
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function namesTheSameDirectory(bound, candidate) {
|
|
145
|
+
const resolvedBound = resolve(bound);
|
|
146
|
+
const target = resolve(candidate);
|
|
147
|
+
if (target === resolvedBound) return true;
|
|
148
|
+
const realBound = resolveThroughLinks(resolvedBound);
|
|
149
|
+
const realTarget = resolveThroughLinks(target);
|
|
150
|
+
return realBound !== void 0 && realTarget !== void 0 && realBound === realTarget;
|
|
151
|
+
}
|
|
152
|
+
function assemblyPathEscape(base, bound, candidate) {
|
|
153
|
+
if (isAbsolute(candidate)) return absoluteAssemblyPathEscape(bound, candidate);
|
|
154
|
+
const resolved = resolveAssemblyPath(base, candidate, { containWithin: bound });
|
|
155
|
+
if (resolved.contained || namesTheSameDirectory(bound, resolved.path)) return void 0;
|
|
156
|
+
return resolved;
|
|
157
|
+
}
|
|
158
|
+
function renderAssemblyPathEscape(escape, dir, action, provenanceOverride) {
|
|
159
|
+
const provenance = provenanceOverride ?? `CDK emits assembly paths that stay inside the assembly directory; one that leaves it indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to ${action}.`;
|
|
160
|
+
const base = resolve(dir);
|
|
161
|
+
const realBase = resolveThroughLinks(base) ?? base;
|
|
162
|
+
const shownPath = displayUntrustedValue(escape.path);
|
|
163
|
+
const shownBase = displayUntrustedValue(base);
|
|
164
|
+
if (escape.escape === "symlink") {
|
|
165
|
+
if (escape.realPath === realBase) return `resolves to ${shownPath}, a symbolic link to the directory ${shownBase} itself rather than to a path inside it. ${provenance}`;
|
|
166
|
+
return `resolves to ${shownPath}, which leads through a symbolic link to ${displayUntrustedValue(escape.realPath)}, outside ${shownBase}. ${provenance}`;
|
|
167
|
+
}
|
|
168
|
+
if (escape.path === base) return `names the directory ${shownBase} itself rather than a path inside it. ${provenance}`;
|
|
169
|
+
return `resolves to ${shownPath}, outside ${shownBase}. ${provenance}`;
|
|
170
|
+
}
|
|
171
|
+
const VISIBLE_LETTER = new RegExp(String.raw`^(?![\p{Default_Ignorable_Code_Point}\u02b0-\u02ff\u0374\u0559\u07f4\u07f5\ua78b\ua78c\uff9e\uff9f])[\p{L}\p{N}]$`, "u");
|
|
172
|
+
const COMBINING_MARK = /^\p{M}$/u;
|
|
173
|
+
const DEFAULT_IGNORABLE = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
174
|
+
const BARE_PUNCTUATION = /^[/\\._~+@:=-]$/;
|
|
175
|
+
function classify(chars) {
|
|
176
|
+
let afterLetter = false;
|
|
177
|
+
return chars.map((ch) => {
|
|
178
|
+
if (DEFAULT_IGNORABLE.test(ch)) {
|
|
179
|
+
afterLetter = false;
|
|
180
|
+
return "escaped";
|
|
181
|
+
}
|
|
182
|
+
if (COMBINING_MARK.test(ch)) return afterLetter ? "bare" : "escaped";
|
|
183
|
+
afterLetter = VISIBLE_LETTER.test(ch);
|
|
184
|
+
if (afterLetter || BARE_PUNCTUATION.test(ch)) return "bare";
|
|
185
|
+
return ch >= " " && ch <= "~" ? "shown" : "escaped";
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function displayUntrustedValue(value) {
|
|
189
|
+
const clean = sanitizeServiceExceptionMessage(value);
|
|
190
|
+
const chars = Array.from(clean);
|
|
191
|
+
const kinds = classify(chars);
|
|
192
|
+
if (clean === value && chars.length > 0 && kinds.every((k) => k === "bare")) return clean;
|
|
193
|
+
let body = "";
|
|
194
|
+
chars.forEach((ch, i) => {
|
|
195
|
+
if (ch === "\"" || ch === "\\") body += `\\${ch}`;
|
|
196
|
+
else if (kinds[i] !== "escaped") body += ch;
|
|
197
|
+
else for (let u = 0; u < ch.length; u++) body += `\\u${ch.charCodeAt(u).toString(16).padStart(4, "0")}`;
|
|
198
|
+
});
|
|
199
|
+
return `"${body}"`;
|
|
200
|
+
}
|
|
201
|
+
const PASTEABLE_COMMAND_ARG = /^[A-Za-z0-9][A-Za-z0-9~_.-]*$/;
|
|
202
|
+
function isPasteableCommandArg(value) {
|
|
203
|
+
return PASTEABLE_COMMAND_ARG.test(value) && displayUntrustedValue(value) === value;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
//#endregion
|
|
207
|
+
export { namesTheSameDirectory as a, clampErrorName as c, flattenToOneLine as d, isAwsServiceException as f, isPasteableCommandArg as i, describeAwsFailureForWarn as l, stringifyThrown as m, assemblyPathEscape as n, renderAssemblyPathEscape as o, sanitizeServiceExceptionMessage as p, displayUntrustedValue as r, resolveAssemblyPath as s, absoluteAssemblyPathEscape as t, describeCredentialLoadFailure as u };
|
|
208
|
+
//# sourceMappingURL=assembly-path-R96uhMm1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assembly-path-R96uhMm1.js","names":[],"sources":["../src/local/credential-error.ts","../src/utils/assembly-path.ts"],"mappings":";;;;;AA6LA,MAAM,sBAAsB;AA2B5B,SAAgB,gBAAgB,KAAsB;CACpD,IAAI;EACF,OAAO,eAAe,QAAQ,OAAO,IAAI,OAAO,IAAI,OAAO,GAAG;CAChE,QAAQ;EACN,OAAO;CACT;AACF;AA0BA,SAAgB,eAAe,KAAsB;CAMnD,IAAI;CACJ,IAAI;EACF,UAAU,eAAe,QAAQ,IAAI,OAAO;CAC9C,QAAQ;EACN,OAAO;CACT;CACA,OAAO,OAAO,YAAY,YAAY,yBAAyB,KAAK,OAAO,IACvE,UACA;AACN;AA4BA,SAAgB,eAAe,KAAkC;CAC/D,IAAI,CAAC,OAAO,OAAO,QAAQ,UAAU,OAAO;CAC5C,IAAI;CAC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AAG,IAAI,GAAG,QAAQ,KAC7B,QAAQ,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CAGjE,CAAC;CACD,OAAO,IAAI,KAAK;AAClB;AASA,MAAM,wBAAwB;AAW9B,SAAgB,sBAAsB,OAAwB;CAC5D,OAAO,sBAAsB,KAAK,KAAK,KAAK,sBAAsB,KAAK,MAAM;AAC/E"}
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Bn as createLocalStartAlbCommand, Dr as createLocalInvokeAgentCoreCommand, Kn as createLocalStartServiceCommand, O as createLocalStartMicrovmCommand, Qr as createLocalInvokeCommand, Yn as createLocalRunTaskCommand, a as createLocalStudioCommand, dt as createLocalStartWebFunctionCommand, ei as createLocalStartApiCommand, pt as createLocalStartAgentCoreCommand, w as createLocalListCommand, xt as createLocalStartCloudFrontCommand } from "./local-studio-
|
|
2
|
+
import { Bn as createLocalStartAlbCommand, Dr as createLocalInvokeAgentCoreCommand, Kn as createLocalStartServiceCommand, O as createLocalStartMicrovmCommand, Qr as createLocalInvokeCommand, Yn as createLocalRunTaskCommand, a as createLocalStudioCommand, dt as createLocalStartWebFunctionCommand, ei as createLocalStartApiCommand, pt as createLocalStartAgentCoreCommand, w as createLocalListCommand, xt as createLocalStartCloudFrontCommand } from "./local-studio-DNWiPLme.js";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/index.ts
|
|
6
6
|
const program = new Command();
|
|
7
|
-
program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.
|
|
7
|
+
program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.161.0");
|
|
8
8
|
program.addCommand(createLocalInvokeCommand());
|
|
9
9
|
program.addCommand(createLocalInvokeAgentCoreCommand());
|
|
10
10
|
program.addCommand(createLocalStartApiCommand());
|
|
@@ -1,228 +1,10 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-w6R9maHv.js";
|
|
1
2
|
import { c as getEmbedConfig, t as getLogger } from "./logger-Co5XVwco.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { r as displayUntrustedValue } from "./assembly-path-R96uhMm1.js";
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
4
5
|
import { spinner } from "@clack/prompts";
|
|
5
6
|
import { spawn } from "node:child_process";
|
|
6
7
|
|
|
7
|
-
//#region \0rolldown/runtime.js
|
|
8
|
-
var __defProp = Object.defineProperty;
|
|
9
|
-
var __exportAll = (all, no_symbols) => {
|
|
10
|
-
let target = {};
|
|
11
|
-
for (var name in all) {
|
|
12
|
-
__defProp(target, name, {
|
|
13
|
-
get: all[name],
|
|
14
|
-
enumerable: true
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
if (!no_symbols) {
|
|
18
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
19
|
-
}
|
|
20
|
-
return target;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/local/credential-error.ts
|
|
25
|
-
const SERVICE_MESSAGE_MAX = 512;
|
|
26
|
-
function stringifyThrown(err) {
|
|
27
|
-
try {
|
|
28
|
-
return err instanceof Error ? String(err.message) : String(err);
|
|
29
|
-
} catch {
|
|
30
|
-
return "[unstringifiable throw]";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function clampErrorName(err) {
|
|
34
|
-
let rawKind;
|
|
35
|
-
try {
|
|
36
|
-
rawKind = err instanceof Error ? err.name : "unknown";
|
|
37
|
-
} catch {
|
|
38
|
-
return "unknown";
|
|
39
|
-
}
|
|
40
|
-
return typeof rawKind === "string" && /^[A-Za-z0-9_.-]{1,64}$/.test(rawKind) ? rawKind : "unknown";
|
|
41
|
-
}
|
|
42
|
-
function clampErrorCode(err) {
|
|
43
|
-
if (!err || typeof err !== "object") return void 0;
|
|
44
|
-
let raw;
|
|
45
|
-
try {
|
|
46
|
-
raw = err.code;
|
|
47
|
-
} catch {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (typeof raw !== "string") return void 0;
|
|
51
|
-
return /^[A-Za-z0-9_.-]{1,64}$/.test(raw) ? raw : void 0;
|
|
52
|
-
}
|
|
53
|
-
function isAwsServiceException(err) {
|
|
54
|
-
if (!err || typeof err !== "object") return false;
|
|
55
|
-
const candidate = err;
|
|
56
|
-
try {
|
|
57
|
-
return Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
|
|
58
|
-
} catch {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function flattenToOneLine(message) {
|
|
63
|
-
return message.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}\p{Cs}]/gu, " ");
|
|
64
|
-
}
|
|
65
|
-
function sanitizeServiceExceptionMessage(message) {
|
|
66
|
-
const points = [...flattenToOneLine(message)];
|
|
67
|
-
if (points.length <= SERVICE_MESSAGE_MAX) return points.join("");
|
|
68
|
-
return `${points.slice(0, SERVICE_MESSAGE_MAX).join("")}[... truncated; ${points.length}-character message]`;
|
|
69
|
-
}
|
|
70
|
-
function describeCredentialLoadFailure(err) {
|
|
71
|
-
const code = clampErrorCode(err);
|
|
72
|
-
return `${code === void 0 ? clampErrorName(err) : `${clampErrorName(err)} ${code}`}; ${stringifyThrown(err).length}-character message withheld, logged at debug level under --verbose`;
|
|
73
|
-
}
|
|
74
|
-
function describeAwsFailureForWarn(err, operation) {
|
|
75
|
-
if (isAwsServiceException(err)) return `${clampErrorName(err)}: ${sanitizeServiceExceptionMessage(stringifyThrown(err))}`;
|
|
76
|
-
getLogger().debug(`${operation}: the AWS SDK's own failure message was: ${flattenToOneLine(stringifyThrown(err))}`);
|
|
77
|
-
return describeCredentialLoadFailure(err);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/utils/assembly-path.ts
|
|
82
|
-
function isInside(base, candidate) {
|
|
83
|
-
const rel = relative(base, candidate);
|
|
84
|
-
if (rel === "" || rel === "..") return false;
|
|
85
|
-
if (rel.startsWith(`..${sep}`)) return false;
|
|
86
|
-
return !isAbsolute(rel);
|
|
87
|
-
}
|
|
88
|
-
function tryRealpath(p) {
|
|
89
|
-
try {
|
|
90
|
-
return realpathSync.native(p);
|
|
91
|
-
} catch {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function tryReadlink(p) {
|
|
96
|
-
try {
|
|
97
|
-
return readlinkSync(p);
|
|
98
|
-
} catch {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
const MAX_LINK_HOPS = 40;
|
|
103
|
-
const MAX_PATH_COMPONENTS = 1e3;
|
|
104
|
-
function resolveThroughLinks(target, hops = 0, climbs = 0) {
|
|
105
|
-
const direct = tryRealpath(target);
|
|
106
|
-
if (direct !== void 0) return direct;
|
|
107
|
-
if (hops >= MAX_LINK_HOPS) return void 0;
|
|
108
|
-
if (climbs >= MAX_PATH_COMPONENTS) return void 0;
|
|
109
|
-
const parent = dirname(target);
|
|
110
|
-
if (parent === target) return void 0;
|
|
111
|
-
const realParent = resolveThroughLinks(parent, hops, climbs + 1);
|
|
112
|
-
if (realParent === void 0) return void 0;
|
|
113
|
-
const link = tryReadlink(target);
|
|
114
|
-
if (link === void 0) return join(realParent, basename(target));
|
|
115
|
-
return resolveThroughLinks(resolve(realParent, link), hops + 1, climbs);
|
|
116
|
-
}
|
|
117
|
-
function resolveAssemblyPath(dir, candidate, options) {
|
|
118
|
-
const base = resolve(dir);
|
|
119
|
-
const bound = options?.containWithin === void 0 ? base : resolve(options.containWithin);
|
|
120
|
-
const joined = resolve(join(base, candidate));
|
|
121
|
-
if (!isInside(bound, joined)) return {
|
|
122
|
-
contained: false,
|
|
123
|
-
escape: "lexical",
|
|
124
|
-
path: joined
|
|
125
|
-
};
|
|
126
|
-
const realBound = resolveThroughLinks(bound);
|
|
127
|
-
if (realBound !== void 0) {
|
|
128
|
-
const realTarget = resolveThroughLinks(joined);
|
|
129
|
-
if (realTarget !== void 0 && !isInside(realBound, realTarget)) return {
|
|
130
|
-
contained: false,
|
|
131
|
-
escape: "symlink",
|
|
132
|
-
path: joined,
|
|
133
|
-
realPath: realTarget
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
contained: true,
|
|
138
|
-
path: joined
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
function absoluteAssemblyPathEscape(bound, absolutePath) {
|
|
142
|
-
const resolvedBound = resolve(bound);
|
|
143
|
-
const target = resolve(absolutePath);
|
|
144
|
-
const lexicallyOutside = !isInside(resolvedBound, target) && target !== resolvedBound;
|
|
145
|
-
const realBound = resolveThroughLinks(resolvedBound);
|
|
146
|
-
const realTarget = resolveThroughLinks(target);
|
|
147
|
-
const reallyOutside = realBound === void 0 || realTarget === void 0 ? void 0 : !isInside(realBound, realTarget) && realTarget !== realBound;
|
|
148
|
-
if (lexicallyOutside) {
|
|
149
|
-
if (reallyOutside === false) return void 0;
|
|
150
|
-
return {
|
|
151
|
-
contained: false,
|
|
152
|
-
escape: "lexical",
|
|
153
|
-
path: target
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
if (reallyOutside === true) return {
|
|
157
|
-
contained: false,
|
|
158
|
-
escape: "symlink",
|
|
159
|
-
path: target,
|
|
160
|
-
realPath: realTarget
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
function namesTheSameDirectory(bound, candidate) {
|
|
164
|
-
const resolvedBound = resolve(bound);
|
|
165
|
-
const target = resolve(candidate);
|
|
166
|
-
if (target === resolvedBound) return true;
|
|
167
|
-
const realBound = resolveThroughLinks(resolvedBound);
|
|
168
|
-
const realTarget = resolveThroughLinks(target);
|
|
169
|
-
return realBound !== void 0 && realTarget !== void 0 && realBound === realTarget;
|
|
170
|
-
}
|
|
171
|
-
function assemblyPathEscape(base, bound, candidate) {
|
|
172
|
-
if (isAbsolute(candidate)) return absoluteAssemblyPathEscape(bound, candidate);
|
|
173
|
-
const resolved = resolveAssemblyPath(base, candidate, { containWithin: bound });
|
|
174
|
-
if (resolved.contained || namesTheSameDirectory(bound, resolved.path)) return void 0;
|
|
175
|
-
return resolved;
|
|
176
|
-
}
|
|
177
|
-
function renderAssemblyPathEscape(escape, dir, action, provenanceOverride) {
|
|
178
|
-
const provenance = provenanceOverride ?? `CDK emits assembly paths that stay inside the assembly directory; one that leaves it indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to ${action}.`;
|
|
179
|
-
const base = resolve(dir);
|
|
180
|
-
const realBase = resolveThroughLinks(base) ?? base;
|
|
181
|
-
const shownPath = displayUntrustedValue(escape.path);
|
|
182
|
-
const shownBase = displayUntrustedValue(base);
|
|
183
|
-
if (escape.escape === "symlink") {
|
|
184
|
-
if (escape.realPath === realBase) return `resolves to ${shownPath}, a symbolic link to the directory ${shownBase} itself rather than to a path inside it. ${provenance}`;
|
|
185
|
-
return `resolves to ${shownPath}, which leads through a symbolic link to ${displayUntrustedValue(escape.realPath)}, outside ${shownBase}. ${provenance}`;
|
|
186
|
-
}
|
|
187
|
-
if (escape.path === base) return `names the directory ${shownBase} itself rather than a path inside it. ${provenance}`;
|
|
188
|
-
return `resolves to ${shownPath}, outside ${shownBase}. ${provenance}`;
|
|
189
|
-
}
|
|
190
|
-
const VISIBLE_LETTER = new RegExp(String.raw`^(?![\p{Default_Ignorable_Code_Point}\u02b0-\u02ff\u0374\u0559\u07f4\u07f5\ua78b\ua78c\uff9e\uff9f])[\p{L}\p{N}]$`, "u");
|
|
191
|
-
const COMBINING_MARK = /^\p{M}$/u;
|
|
192
|
-
const DEFAULT_IGNORABLE = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
193
|
-
const BARE_PUNCTUATION = /^[/\\._~+@:=-]$/;
|
|
194
|
-
function classify(chars) {
|
|
195
|
-
let afterLetter = false;
|
|
196
|
-
return chars.map((ch) => {
|
|
197
|
-
if (DEFAULT_IGNORABLE.test(ch)) {
|
|
198
|
-
afterLetter = false;
|
|
199
|
-
return "escaped";
|
|
200
|
-
}
|
|
201
|
-
if (COMBINING_MARK.test(ch)) return afterLetter ? "bare" : "escaped";
|
|
202
|
-
afterLetter = VISIBLE_LETTER.test(ch);
|
|
203
|
-
if (afterLetter || BARE_PUNCTUATION.test(ch)) return "bare";
|
|
204
|
-
return ch >= " " && ch <= "~" ? "shown" : "escaped";
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
function displayUntrustedValue(value) {
|
|
208
|
-
const clean = sanitizeServiceExceptionMessage(value);
|
|
209
|
-
const chars = Array.from(clean);
|
|
210
|
-
const kinds = classify(chars);
|
|
211
|
-
if (clean === value && chars.length > 0 && kinds.every((k) => k === "bare")) return clean;
|
|
212
|
-
let body = "";
|
|
213
|
-
chars.forEach((ch, i) => {
|
|
214
|
-
if (ch === "\"" || ch === "\\") body += `\\${ch}`;
|
|
215
|
-
else if (kinds[i] !== "escaped") body += ch;
|
|
216
|
-
else for (let u = 0; u < ch.length; u++) body += `\\u${ch.charCodeAt(u).toString(16).padStart(4, "0")}`;
|
|
217
|
-
});
|
|
218
|
-
return `"${body}"`;
|
|
219
|
-
}
|
|
220
|
-
const PASTEABLE_COMMAND_ARG = /^[A-Za-z0-9][A-Za-z0-9~_.-]*$/;
|
|
221
|
-
function isPasteableCommandArg(value) {
|
|
222
|
-
return PASTEABLE_COMMAND_ARG.test(value) && displayUntrustedValue(value) === value;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
//#endregion
|
|
226
8
|
//#region src/utils/docker-cmd.ts
|
|
227
9
|
var docker_cmd_exports = /* @__PURE__ */ __exportAll({
|
|
228
10
|
DOCKER_CLIENT_ENV_KEYS: () => DOCKER_CLIENT_ENV_KEYS,
|
|
@@ -530,5 +312,5 @@ function isMalformedEnvKey(key) {
|
|
|
530
312
|
}
|
|
531
313
|
|
|
532
314
|
//#endregion
|
|
533
|
-
export {
|
|
534
|
-
//# sourceMappingURL=docker-cmd-
|
|
315
|
+
export { isDockerClientEnvKey as a, runDockerStreaming as c, getDockerCmd as i, spawnStreaming as l, finchSecretArgvRefusal as n, isMalformedEnvKey as o, formatDockerLoginError as r, runDockerForeground as s, docker_cmd_exports as t, warnFinchArgvExposure as u };
|
|
316
|
+
//# sourceMappingURL=docker-cmd-Cjg3jGYF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docker-cmd-Cjg3jGYF.js","names":["createSpinner"],"sources":["../src/utils/docker-cmd.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgB,eAAuB;CACrC,MAAM,WAAW,QAAQ,IAAI;CAC7B,OAAO,YAAY,SAAS,SAAS,IAAI,WAAW;AACtD;AAmBA,SAAgB,gBACd,MAAc,aAAa,GAC3B,WAA4B,QAAQ,UAC3B;CACT,IAAI,aAAa,YAAY,aAAa,SAAS,OAAO;CAC1D,MAAM,QAAQ,IAAI,MAAM,OAAO,CAAC,CAAC,IAAI,KAAK,GAAE,CAAE,YAAY;CAC1D,OAAO,SAAS,WAAW,SAAS;AACtC;AASA,SAAgB,4BAAoC;CAClD,OAAO,GAAG,eAAe,CAAC,CAAC,UAAU;AACvC;AAEA,SAAS,uBAAgC;CACvC,MAAM,IAAI,QAAQ,IAAI,0BAA0B;CAChD,OAAO,MAAM,UAAa,CAAC,KAAK,MAAM,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,YAAY,CAAC;AACzE;AAsBA,SAAgB,uBACd,aACA,SACoB;CACpB,IAAI,YAAY,WAAW,KAAK,CAAC,gBAAgB,KAAK,qBAAqB,GAAG,OAAO;CACrF,MAAM,QAAQ,CAAC,GAAG,IAAI,IAAI,WAAW,CAAC;CACtC,OACE,GAAG,QAAQ,MAAM,GAAG,sBAAsB,QAAQ,IAAI,EAAE,kCACrD,MAAM,IAAI,qBAAqB,C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9B,IAAI,6BAA6B,IAAI,KAAK,GAAG,OAAO;CACpD,IAAI,oCAAoC,IAAI,KAAK,GAAG,OAAO;CAC3D,OAAO,2BAA2B,MAAM,WAAW,MAAM,WAAW,MAAM,CAAC;AAC7E;AAWA,MAAM,sBAAsB;AAa5B,SAAgB,kBAAkB,KAAsB;CACtD,OAAO,CAAC,oBAAoB,KAAK,GAAG;AACtC"}
|