@go-to-k/cdkd 0.115.2 → 0.115.3
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.
|
@@ -2896,6 +2896,33 @@ async function spawnStreaming(cmd, args, options = {}) {
|
|
|
2896
2896
|
}
|
|
2897
2897
|
});
|
|
2898
2898
|
}
|
|
2899
|
+
/**
|
|
2900
|
+
* Format the stderr from a failed `docker login` so the surfaced cdkd
|
|
2901
|
+
* error gives the user an actionable workaround when the underlying
|
|
2902
|
+
* failure is a credential-helper persistence bug (which has nothing to
|
|
2903
|
+
* do with cdkd, AWS, or IAM perms — the docker CLI itself fails to
|
|
2904
|
+
* save the auth token to the platform's credential store). The most
|
|
2905
|
+
* common shape is `osxkeychain` on macOS rejecting an overwrite for
|
|
2906
|
+
* an existing entry, but `wincred` (Windows), `pass` (Linux), and
|
|
2907
|
+
* `secretservice` (Linux) hit the same class of `Error saving
|
|
2908
|
+
* credentials` failure, so the rewritten message stays platform-
|
|
2909
|
+
* agnostic — `docker logout <endpoint>` is the correct recovery on
|
|
2910
|
+
* every backend.
|
|
2911
|
+
*
|
|
2912
|
+
* Detected docker / docker-credential-* output patterns:
|
|
2913
|
+
* - `error storing credentials - err: exit status 1, out: \`The
|
|
2914
|
+
* specified item already exists in the keychain.\`` (osxkeychain)
|
|
2915
|
+
* - `Error saving credentials: ...` (any backend)
|
|
2916
|
+
*
|
|
2917
|
+
* Non-matching failures (genuine IAM / network / endpoint problems)
|
|
2918
|
+
* pass through with just the stderr trimmed — the original message
|
|
2919
|
+
* stays load-bearing for diagnosis.
|
|
2920
|
+
*/
|
|
2921
|
+
function formatDockerLoginError(stderr, endpoint) {
|
|
2922
|
+
const trimmed = stderr.trim();
|
|
2923
|
+
if (trimmed.includes("already exists in the keychain") || trimmed.includes("Error saving credentials")) return `docker's credential helper (osxkeychain on macOS / wincred on Windows / pass / secretservice on Linux) failed to persist the ECR auth token. The "already exists in the keychain" / "Error saving credentials" output is a known docker-credential-helpers issue — unrelated to cdkd, AWS credentials, or IAM perms. Quick fix: run \`docker logout ${endpoint}\` to clear the stale entry, then retry the cdkd command. Permanent fix: edit ~/.docker/config.json and remove (or empty) the platform-specific "credsStore" entry (e.g. "osxkeychain" → "" or "desktop" on macOS Docker Desktop). Original docker stderr: ${trimmed}`;
|
|
2924
|
+
return trimmed;
|
|
2925
|
+
}
|
|
2899
2926
|
function mergeEnv(overrides) {
|
|
2900
2927
|
const merged = { ...process.env };
|
|
2901
2928
|
for (const [k, v] of Object.entries(overrides)) if (v === void 0) delete merged[k];
|
|
@@ -3129,7 +3156,7 @@ var DockerAssetPublisher = class {
|
|
|
3129
3156
|
], { input: password });
|
|
3130
3157
|
} catch (err) {
|
|
3131
3158
|
const e = err;
|
|
3132
|
-
throw new AssetError(`ECR login failed: ${e.stderr
|
|
3159
|
+
throw new AssetError(`ECR login failed: ${formatDockerLoginError(e.stderr || e.message || String(err), endpoint)}`);
|
|
3133
3160
|
}
|
|
3134
3161
|
}
|
|
3135
3162
|
/**
|
|
@@ -9740,5 +9767,5 @@ var DeployEngine = class {
|
|
|
9740
9767
|
};
|
|
9741
9768
|
|
|
9742
9769
|
//#endregion
|
|
9743
|
-
export {
|
|
9744
|
-
//# sourceMappingURL=deploy-engine-
|
|
9770
|
+
export { StackHasActiveImportsError as $, Synthesizer as A, clearBucketRegionCache as B, AssetPublisher as C, formatDockerLoginError as D, buildDockerImage as E, resolveSkipPrefix as F, DependencyError as G, AssetError as H, resolveStateBucketWithDefault as I, PartialFailureError as J, LocalInvokeBuildError as K, resolveStateBucketWithDefaultAndSource as L, getLegacyStateBucketName as M, resolveApp as N, getDockerCmd as O, resolveCaptureObservedState as P, RouteDiscoveryError as Q, warnDeprecatedNoPrefixCliFlag as R, shouldRetainResource as S, WorkGraph as T, CdkdError as U, resolveBucketRegion as V, ConfigError as W, ResourceTimeoutError as X, ProvisioningError as Y, ResourceUpdateNotSupportedError as Z, DiffCalculator as _, withStackName as _t, withRetry as a, normalizeAwsError as at, LockManager as b, collectInlinePolicyNamesManagedBySiblings as c, getLogger as ct, normalizeAwsTagsToCfn as d, getLiveRenderer as dt, StackTerminationProtectionError as et, resolveExplicitPhysicalId as f, PATTERN_B_NAME_PROPERTIES as ft, IntrinsicFunctionResolver as g, withSkipPrefix as gt, assertRegionMatch as h, generateResourceNameWithFallback as ht, withResourceDeadline as i, isCdkdError as it, getDefaultStateBucketName as j, runDockerStreaming as k, CDK_PATH_TAG as l, setLogger as lt, CloudControlProvider as m, generateResourceName as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, SynthesisError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, withErrorHandling as ot, ProviderRegistry as p, PATTERN_B_RESOURCE_TYPES as pt, LockError as q, DeployEngine as r, formatError as rt, IAMRoleProvider as s, ConsoleLogger as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, StateError as tt, matchesCdkPath as u, runStackBuffered as ut, DagBuilder as v, stringifyValue as w, S3StateBackend as x, TemplateParser as y, AssemblyReader as z };
|
|
9771
|
+
//# sourceMappingURL=deploy-engine-VFIYh_NY.js.map
|