@prisma/composer-cli 0.39.0-dev.11 → 0.39.0-dev.13
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/{app-converge-bS1l9jIf-B1FOgxBQ.mjs → app-converge-CHMILMYi-Duhv9T-w.mjs} +5 -5
- package/dist/app-converge-CHMILMYi-Duhv9T-w.mjs.map +1 -0
- package/dist/{composer-config-QKdY85G--CEXrb2Uc.mjs → composer-config-aL0W4HPG-CTpDJKz4.mjs} +3 -3
- package/dist/composer-config-aL0W4HPG-CTpDJKz4.mjs.map +1 -0
- package/dist/{deploy-Br1yvLe3.mjs → deploy-Cu7Wtrf0.mjs} +6 -6
- package/dist/deploy-Cu7Wtrf0.mjs.map +1 -0
- package/dist/{dev-converge-messages-DML4rTz7-B6uxtpZG.mjs → dev-converge-messages-CElmPylA-6X7D08mQ.mjs} +6 -6
- package/dist/dev-converge-messages-CElmPylA-6X7D08mQ.mjs.map +1 -0
- package/dist/dev-converge-worker.mjs +4 -4
- package/dist/dev-converge-worker.mjs.map +1 -1
- package/dist/{dev-current-lAlj53eX-DvAHNZFo.mjs → dev-current-C7R8uqyQ-CgyoTX9q.mjs} +7 -7
- package/dist/dev-current-C7R8uqyQ-CgyoTX9q.mjs.map +1 -0
- package/dist/{dev-environment-name-6eEr5PW8-CCY7WNWz.mjs → dev-environment-name-6eEr5PW8-DSJ7HrEe.mjs} +2 -3
- package/dist/{dev-environment-name-6eEr5PW8-CCY7WNWz.mjs.map → dev-environment-name-6eEr5PW8-DSJ7HrEe.mjs.map} +1 -1
- package/dist/{dist-C0OGaDnj.mjs → dist-CZTXNHtS.mjs} +1 -2
- package/dist/{dist-C0OGaDnj.mjs.map → dist-CZTXNHtS.mjs.map} +1 -1
- package/dist/execute-deploy-destroy-BIRdFfwR-Czj9JB8M.mjs +517 -0
- package/dist/execute-deploy-destroy-BIRdFfwR-Czj9JB8M.mjs.map +1 -0
- package/dist/{execute-dev-DnVmNpc1-BzK9Qns_.mjs → execute-dev-D9PxdbV3-D-pdqLmO.mjs} +11 -13
- package/dist/execute-dev-D9PxdbV3-D-pdqLmO.mjs.map +1 -0
- package/dist/{execute-dev-current-CZdmxVQ4-DxDflvNG.mjs → execute-dev-current-BghQ0HLe-BY5COM8c.mjs} +6 -7
- package/dist/{execute-dev-current-CZdmxVQ4-DxDflvNG.mjs.map → execute-dev-current-BghQ0HLe-BY5COM8c.mjs.map} +1 -1
- package/dist/{family-DfwviKFj-CS1L-EvS.d.mts → family-5lQ0X01--mh7Vm2zv.d.mts} +74 -129
- package/dist/family-5lQ0X01--mh7Vm2zv.d.mts.map +1 -0
- package/dist/family.d.mts +1 -1
- package/dist/family.mjs +17 -11
- package/dist/family.mjs.map +1 -1
- package/dist/{list-deployed-D6vTzpWu.mjs → list-deployed-COZmPVO2.mjs} +3 -3
- package/dist/{list-deployed-D6vTzpWu.mjs.map → list-deployed-COZmPVO2.mjs.map} +1 -1
- package/dist/{local-target-CZzICh5R.mjs → local-target-bTjNRplR.mjs} +31 -3
- package/dist/local-target-bTjNRplR.mjs.map +1 -0
- package/dist/{redaction-DY6eDC12-BrK1aSN5.mjs → redaction-DHaXoToJ-zcuc7Sgf.mjs} +5 -5
- package/dist/redaction-DHaXoToJ-zcuc7Sgf.mjs.map +1 -0
- package/dist/{steps-BZXNqW6U-BM2Aa8Bp.mjs → steps-Det-FSAL-4BEaFT3G.mjs} +5 -118
- package/dist/steps-Det-FSAL-4BEaFT3G.mjs.map +1 -0
- package/dist/testing.d.mts +1 -1
- package/dist/{validate-environment-DCZiNSlR-idVge-kq.mjs → validate-environment-BevPErw8-BRVXeBjT.mjs} +6 -6
- package/dist/{validate-environment-DCZiNSlR-idVge-kq.mjs.map → validate-environment-BevPErw8-BRVXeBjT.mjs.map} +1 -1
- package/package.json +7 -8
- package/dist/app-config-CErnR6NK-DnKH4Kqc.mjs +0 -32
- package/dist/app-config-CErnR6NK-DnKH4Kqc.mjs.map +0 -1
- package/dist/app-converge-bS1l9jIf-B1FOgxBQ.mjs.map +0 -1
- package/dist/composer-config-QKdY85G--CEXrb2Uc.mjs.map +0 -1
- package/dist/deploy-Br1yvLe3.mjs.map +0 -1
- package/dist/dev-converge-messages-DML4rTz7-B6uxtpZG.mjs.map +0 -1
- package/dist/dev-current-lAlj53eX-DvAHNZFo.mjs.map +0 -1
- package/dist/execute-deploy-destroy-DN16ETAk-CzORriUO.mjs +0 -893
- package/dist/execute-deploy-destroy-DN16ETAk-CzORriUO.mjs.map +0 -1
- package/dist/execute-dev-DnVmNpc1-BzK9Qns_.mjs.map +0 -1
- package/dist/family-DfwviKFj-CS1L-EvS.d.mts.map +0 -1
- package/dist/local-target-CZzICh5R.mjs.map +0 -1
- package/dist/preflight-transport-2d6iIchu-ArIJUY1L.mjs +0 -56
- package/dist/preflight-transport-2d6iIchu-ArIJUY1L.mjs.map +0 -1
- package/dist/redaction-DY6eDC12-BrK1aSN5.mjs.map +0 -1
- package/dist/steps-BZXNqW6U-BM2Aa8Bp.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as CliStructuredError } from "./errors-CVYwN2km.mjs";
|
|
2
2
|
import { inspect } from "node:util";
|
|
3
|
-
//#region ../../0-framework/3-tooling/cli/dist/redaction-
|
|
3
|
+
//#region ../../0-framework/3-tooling/cli/dist/redaction-DHaXoToJ.mjs
|
|
4
4
|
const REDACTED = "[redacted]";
|
|
5
|
-
/** Env var names whose values are credentials: the service token
|
|
6
|
-
const SECRET_ENV_NAME = /TOKEN|SECRET|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|AUTH|API_?KEY|ACCESS_?KEY|_KEY$|DATABASE_URL|_DSN
|
|
5
|
+
/** Env var names whose values are credentials: the service token and the usual secret spellings. */
|
|
6
|
+
const SECRET_ENV_NAME = /TOKEN|SECRET|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|AUTH|API_?KEY|ACCESS_?KEY|_KEY$|DATABASE_URL|_DSN$/i;
|
|
7
7
|
/**
|
|
8
8
|
* The credential-looking values in `variables`: text of eight characters or more under a name
|
|
9
9
|
* that looks like a credential's. The length limit keeps a one-letter placeholder from blanking
|
|
@@ -71,7 +71,7 @@ function redactShapes(text) {
|
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* The known secrets of one command: the values under the secrets keys the graph names, in the app
|
|
74
|
-
* secrets and the app configuration (ADR-0062).
|
|
74
|
+
* secrets and the app configuration (ADR-0062). A plain value must not hold any of them.
|
|
75
75
|
*/
|
|
76
76
|
var KnownSecrets = class {
|
|
77
77
|
#names = /* @__PURE__ */ new Map();
|
|
@@ -324,4 +324,4 @@ var StreamRedactor = class {
|
|
|
324
324
|
//#endregion
|
|
325
325
|
export { redactError as a, redactUnsetPlatformVariable as c, redactDevEvent as i, valuesUnderSecretsKeys as l, StreamRedactor as n, redactSummary as o, credentialLookingValues as r, redactThrown as s, SecretRedaction as t };
|
|
326
326
|
|
|
327
|
-
//# sourceMappingURL=redaction-
|
|
327
|
+
//# sourceMappingURL=redaction-DHaXoToJ-zcuc7Sgf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redaction-DHaXoToJ-zcuc7Sgf.mjs","names":["#names"],"sources":["../../../0-framework/3-tooling/cli/dist/redaction-DHaXoToJ.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport { inspect } from \"node:util\";\n//#region src/redaction.ts\nconst REDACTED = \"[redacted]\";\n/** Env var names whose values are credentials: the service token and the usual secret spellings. */\nconst SECRET_ENV_NAME = /TOKEN|SECRET|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|AUTH|API_?KEY|ACCESS_?KEY|_KEY$|DATABASE_URL|_DSN$/i;\n/**\n* The credential-looking values in `variables`: text of eight characters or more under a name\n* that looks like a credential's. The length limit keeps a one-letter placeholder from blanking\n* every matching letter.\n*/\nfunction credentialLookingValues(variables) {\n\treturn Object.entries(variables).flatMap(([name, value]) => SECRET_ENV_NAME.test(name) && typeof value === \"string\" && value.length >= 8 ? [value] : []);\n}\n/** `value` as it appears inside a string that `JSON.stringify` or `util.inspect` printed, where a newline, quote or backslash is escaped. */\nfunction escapedForms(value) {\n\treturn [\n\t\tvalue,\n\t\tJSON.stringify(value).slice(1, -1),\n\t\tinspect(value).slice(1, -1)\n\t];\n}\n/**\n* Finds every secret in a text, as written or as `JSON.stringify` and `util.format` escape it:\n* one regular expression for all of them, built once. A match is the span of the longest\n* secret that starts at a position, and spans that overlap are merged, so two overlapping\n* secrets are hidden whole.\n*/\nvar SecretMatcher = class {\n\tstarts;\n\tprefixes = /* @__PURE__ */ new Set();\n\tlongestPrefix;\n\tconstructor(values) {\n\t\tconst sorted = [...new Set([...values].flatMap(escapedForms))].filter((value) => value.length > 0).sort((a, b) => b.length - a.length);\n\t\tthis.starts = sorted.length === 0 ? void 0 : new RegExp(`(?=(${sorted.map((value) => value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")).join(\"|\")}))`, \"g\");\n\t\tfor (const value of sorted) for (let length = 1; length < value.length; length++) this.prefixes.add(value.slice(0, length));\n\t\tthis.longestPrefix = Math.max(0, (sorted[0]?.length ?? 0) - 1);\n\t}\n\t/** The merged spans of every secret in `text`, in order, as `[start, end)`. */\n\tspans(text) {\n\t\tconst spans = [];\n\t\tif (this.starts === void 0) return spans;\n\t\tfor (const match of text.matchAll(this.starts)) {\n\t\t\tconst start = match.index;\n\t\t\tconst end = start + (match[1]?.length ?? 0);\n\t\t\tconst last = spans.at(-1);\n\t\t\tif (last !== void 0 && start < last[1]) last[1] = Math.max(last[1], end);\n\t\t\telse spans.push([start, end]);\n\t\t}\n\t\treturn spans;\n\t}\n\t/** The length of the longest end of `text` that is the start, not the whole, of a secret. */\n\tstartOfSecretAtEnd(text) {\n\t\tfor (let length = Math.min(this.longestPrefix, text.length); length > 0; length--) if (this.prefixes.has(text.slice(text.length - length))) return length;\n\t\treturn 0;\n\t}\n\t/** `text` with each span replaced by `[redacted]`. */\n\tredact(text) {\n\t\tlet out = \"\";\n\t\tlet from = 0;\n\t\tfor (const [start, end] of this.spans(text)) {\n\t\t\tout += text.slice(from, start) + REDACTED;\n\t\t\tfrom = end;\n\t\t}\n\t\treturn from === 0 ? text : out + text.slice(from);\n\t}\n};\n/** `text` with bearer and basic tokens, JWTs, the password in a URL, and `token=…`-style pairs replaced by `[redacted]`. The `<value>` placeholder in a printed command is kept. */\nfunction redactShapes(text) {\n\treturn text.replace(/\\b(Bearer|Basic)\\s+[\\w.~+/=-]+/gi, `$1 ${REDACTED}`).replace(/\\beyJ[\\w-]+\\.[\\w-]+\\.[\\w-]*/g, REDACTED).replace(/(\\b[a-z][\\w+.-]*:\\/\\/[^\\s:/@]*:)[^\\s/@]+@/gi, `$1${REDACTED}@`).replace(/\\b((?:[\\w-]*[_-])?(?:token|secret|password|passwd|api[_-]?key|access[_-]?key|private[_-]?key)[\"']?\\s*[:=]\\s*[\"']?)(?!<value>(?:[\\s\"',;&]|$))[^\\s\"',;&]+/gi, `$1${REDACTED}`);\n}\n/**\n* The known secrets of one command: the values under the secrets keys the graph names, in the app\n* secrets and the app configuration (ADR-0062). A plain value must not hold any of them.\n*/\nvar KnownSecrets = class {\n\t#names = /* @__PURE__ */ new Map();\n\tconstructor(secrets = []) {\n\t\tthis.add(secrets);\n\t}\n\t/** Adds each secret whose value is not empty. A value already known keeps its first name. */\n\tadd(secrets) {\n\t\tfor (const { name, value } of secrets) if (value.length > 0 && !this.#names.has(value)) this.#names.set(value, name);\n\t}\n\tvalues() {\n\t\treturn new Set(this.#names.keys());\n\t}\n\t/**\n\t* The name of a known secret `text` holds, or undefined. A secret of\n\t* `MIN_SECRET_LENGTH_INSIDE_A_VALUE` characters or more is found anywhere in `text`; a shorter\n\t* one only when it is all of `text`.\n\t*/\n\tnameIn(text) {\n\t\tfor (const [value, name] of this.#names) if (value.length >= 8 ? text.includes(value) : text === value) return name;\n\t}\n};\n/**\n* What one command hides from everything it prints, returns or reports (ADR-0062): its known\n* secrets, and the credential-looking values, which only look like secrets by the name of the\n* variable they are under. It starts with the credential-looking values of the process\n* environment.\n*/\nvar SecretRedaction = class {\n\tknownSecrets = new KnownSecrets();\n\tcredentialLooking = /* @__PURE__ */ new Set();\n\tmatcher;\n\tconstructor(env) {\n\t\tthis.addCredentialLookingValues(credentialLookingValues(env));\n\t}\n\taddKnownSecrets(secrets) {\n\t\tthis.knownSecrets.add(secrets);\n\t}\n\taddCredentialLookingValues(values) {\n\t\tfor (const value of values) if (value.length > 0) this.credentialLooking.add(value);\n\t}\n\t/** The known secrets and the credential-looking values, longest first. */\n\tallValues() {\n\t\treturn [.../* @__PURE__ */ new Set([...this.knownSecrets.values(), ...this.credentialLooking])].sort((a, b) => b.length - a.length);\n\t}\n\t/** `text` with every known secret and credential-looking value replaced by `[redacted]` at any length, then bearer tokens, JWTs, URL passwords and `token=…` pairs. */\n\tredact(text) {\n\t\tconst size = this.knownSecrets.values().size + this.credentialLooking.size;\n\t\tif (this.matcher?.size !== size) this.matcher = {\n\t\t\tsize,\n\t\t\tmatcher: new SecretMatcher(this.allValues())\n\t\t};\n\t\treturn redactShapes(this.matcher.matcher.redact(text));\n\t}\n};\n/** The text under each name in `secretsKeys`, in the app configuration and in the app secrets, at any length. */\nfunction valuesUnderSecretsKeys(configuration, secrets, secretsKeys) {\n\treturn secretsKeys.flatMap((name) => [configuration[name], secrets[name]].flatMap((value) => typeof value === \"string\" ? [{\n\t\tname,\n\t\tvalue\n\t}] : []));\n}\nfunction redactReader(reader, redaction) {\n\tswitch (reader.kind) {\n\t\tcase \"field\": return {\n\t\t\tkind: \"field\",\n\t\t\tservice: redaction.redact(reader.service),\n\t\t\tpath: redaction.redact(reader.path)\n\t\t};\n\t\tcase \"unread\": return {\n\t\t\tkind: \"unread\",\n\t\t\tnode: redaction.redact(reader.node)\n\t\t};\n\t}\n}\n/** `variable` with every text in it redacted: its name, each reader's names and each command. */\nfunction redactUnsetPlatformVariable(variable, redaction) {\n\treturn {\n\t\tname: redaction.redact(variable.name),\n\t\treaders: variable.readers.map((reader) => redactReader(reader, redaction)),\n\t\tcommands: variable.commands.map((command) => redaction.redact(command))\n\t};\n}\nfunction redactData(value, redaction) {\n\tif (typeof value === \"string\") return redaction.redact(value);\n\tif (Array.isArray(value)) return value.map((member) => redactData(member, redaction));\n\tif (typeof value === \"object\" && value !== null && Object.getPrototypeOf(value) === Object.prototype) return Object.fromEntries(Object.entries(value).map(([key, member]) => [key, redactData(member, redaction)]));\n\treturn value;\n}\n/**\n* `error` with every value `redaction` hides removed from its summary, `why`, `fix` and every string in\n* its `meta`. The code, severity, `where` and docs link are kept. The cause is dropped, because\n* it holds the same text unredacted and a renderer may print it.\n*/\nfunction redactError(error, redaction) {\n\treturn new CliStructuredError(error.code, redaction.redact(error.message), {\n\t\tseverity: error.severity,\n\t\t...error.why === void 0 ? {} : { why: redaction.redact(error.why) },\n\t\t...error.fix === void 0 ? {} : { fix: redaction.redact(error.fix) },\n\t\t...error.where === void 0 ? {} : { where: error.where },\n\t\t...error.meta === void 0 ? {} : { meta: Object.fromEntries(Object.entries(error.meta).map(([key, value]) => [key, redactData(value, redaction)])) },\n\t\t...error.docsUrl === void 0 ? {} : { docsUrl: error.docsUrl }\n\t});\n}\nfunction setOwn(error, name, value) {\n\tObject.defineProperty(error, name, {\n\t\tvalue,\n\t\twritable: true,\n\t\tconfigurable: true\n\t});\n}\nconst UNPRINTABLE = \"A value was thrown that cannot be turned into text.\";\nfunction safeString(value) {\n\ttry {\n\t\treturn String(value);\n\t} catch {\n\t\ttry {\n\t\t\treturn Object.prototype.toString.call(value);\n\t\t} catch {\n\t\t\treturn UNPRINTABLE;\n\t\t}\n\t}\n}\n/**\n* The error to rethrow in place of a thrown defect, with every secret removed from its message\n* and stack, and from those of each error in its `cause` chain and in an `AggregateError`'s\n* `errors`. A cause that is text or plain data becomes a redacted copy. Each error is redacted\n* in place where it can be. One whose properties cannot change, such as a frozen error, is\n* replaced by a new error with the redacted message, stack and cause. A thrown value that is not\n* an `Error` becomes an `Error` whose message is its redacted text. Never throws: when reading\n* the error fails, the result is a new `Error` holding the redacted text of what was thrown.\n*/\nfunction redactThrown(thrown, redaction) {\n\ttry {\n\t\treturn thrown instanceof Error ? redactErrorChain(thrown, redaction, /* @__PURE__ */ new Map()) : new Error(redaction.redact(safeString(thrown)));\n\t} catch {\n\t\treturn new Error(redaction.redact(safeString(thrown)));\n\t}\n}\nfunction redactErrorChain(error, redaction, seen) {\n\tconst done = seen.get(error);\n\tif (done !== void 0) return done;\n\tseen.set(error, error);\n\tconst message = redaction.redact(typeof error.message === \"string\" ? error.message : safeString(error.message));\n\tconst stack = typeof error.stack === \"string\" ? redaction.redact(error.stack) : void 0;\n\tconst cause = error.cause instanceof Error ? redactErrorChain(error.cause, redaction, seen) : redactData(error.cause, redaction);\n\tconst members = error instanceof AggregateError ? error.errors.map((member) => member instanceof Error ? redactErrorChain(member, redaction, seen) : redactData(member, redaction)) : void 0;\n\ttry {\n\t\tsetOwn(error, \"message\", message);\n\t\tif (stack !== void 0) setOwn(error, \"stack\", stack);\n\t\tif (error.cause !== void 0) setOwn(error, \"cause\", cause);\n\t\tif (members !== void 0) setOwn(error, \"errors\", members);\n\t\treturn error;\n\t} catch {\n\t\tconst options = cause === void 0 ? void 0 : { cause };\n\t\tconst copy = members === void 0 ? new Error(message, options) : new AggregateError(members, message, options);\n\t\tcopy.name = error.name;\n\t\tsetOwn(copy, \"stack\", stack ?? `${error.name}: ${message}`);\n\t\tseen.set(error, copy);\n\t\treturn copy;\n\t}\n}\n/** `event` with every value `redaction` hides removed from the text it carries: a message, an Alchemy log line, a converge failure's reasons, or a dev server's output line. */\nfunction redactDevEvent(event, redaction) {\n\tswitch (event.kind) {\n\t\tcase \"target-warning\":\n\t\tcase \"rebuild-failed\":\n\t\tcase \"watch-error\":\n\t\tcase \"stop-error\": return {\n\t\t\t...event,\n\t\t\tmessage: redaction.redact(event.message)\n\t\t};\n\t\tcase \"message\": return {\n\t\t\t...event,\n\t\t\ttext: redaction.redact(event.text)\n\t\t};\n\t\tcase \"converge-failed\": return {\n\t\t\t...event,\n\t\t\tmessage: redaction.redact(event.message),\n\t\t\treasons: event.reasons.map(({ tag, message }) => ({\n\t\t\t\ttag,\n\t\t\t\tmessage: redaction.redact(message)\n\t\t\t}))\n\t\t};\n\t\tcase \"dev-server-output\": return {\n\t\t\t...event,\n\t\t\tline: redaction.redact(event.line)\n\t\t};\n\t\tdefault: return event;\n\t}\n}\n/** `summary` with every value `redaction` hides removed from each entity's id, url and details. */\nfunction redactSummary(summary, redaction) {\n\tif (summary === void 0) return void 0;\n\treturn {\n\t\tapp: summary.app,\n\t\tfindings: { unset: summary.findings.unset.map((variable) => redactUnsetPlatformVariable(variable, redaction)) },\n\t\tnodes: summary.nodes.map((node) => ({\n\t\t\taddress: node.address,\n\t\t\tentities: node.entities.map((entity) => ({\n\t\t\t\t...entity,\n\t\t\t\tid: redaction.redact(entity.id),\n\t\t\t\t...entity.url === void 0 ? {} : { url: redaction.redact(entity.url) },\n\t\t\t\t...entity.details === void 0 ? {} : { details: Object.fromEntries(Object.entries(entity.details).map(([key, value]) => [key, redaction.redact(value)])) }\n\t\t\t}))\n\t\t}))\n\t};\n}\nfunction isHighSurrogate(code) {\n\treturn code >= 55296 && code <= 56319;\n}\n/**\n* Redacts a stream of text chunk by chunk: every value in `values` becomes `[redacted]`, and\n* overlapping values are hidden whole. It holds back only the end of the text that could still\n* be part of a value: the longest end that could start one, or a match that a later value could\n* extend. So a value split across two chunks is still replaced, and text that cannot start one,\n* such as a prompt, is returned at once. It never splits a surrogate pair. `push` returns the\n* text that is ready; `end` returns the rest.\n*/\nvar StreamRedactor = class {\n\theld = \"\";\n\tmatcher;\n\tconstructor(values) {\n\t\tthis.matcher = new SecretMatcher(values);\n\t}\n\tpush(chunk) {\n\t\tconst text = this.held + chunk;\n\t\tconst cut = text.length - this.matcher.startOfSecretAtEnd(text);\n\t\tlet out = \"\";\n\t\tlet from = 0;\n\t\tlet ready = cut;\n\t\tfor (const [start, end] of this.matcher.spans(text)) {\n\t\t\tif (end > cut) {\n\t\t\t\tready = Math.min(cut, start);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tout += text.slice(from, start) + REDACTED;\n\t\t\tfrom = end;\n\t\t}\n\t\tif (ready > from && ready < text.length && isHighSurrogate(text.charCodeAt(ready - 1))) ready -= 1;\n\t\tthis.held = text.slice(ready);\n\t\treturn out + text.slice(from, ready);\n\t}\n\tend() {\n\t\tconst text = this.held;\n\t\tthis.held = \"\";\n\t\treturn this.matcher.redact(text);\n\t}\n};\n//#endregion\nexport { redactError as a, redactUnsetPlatformVariable as c, redactDevEvent as i, valuesUnderSecretsKeys as l, StreamRedactor as n, redactSummary as o, credentialLookingValues as r, redactThrown as s, SecretRedaction as t };\n\n//# sourceMappingURL=redaction-DHaXoToJ.mjs.map"],"mappings":";;;AAGA,MAAM,WAAW;;AAEjB,MAAM,kBAAkB;;;;;;AAMxB,SAAS,wBAAwB,WAAW;CAC3C,OAAO,OAAO,QAAQ,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,WAAW,gBAAgB,KAAK,IAAI,KAAK,OAAO,UAAU,YAAY,MAAM,UAAU,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;AACxJ;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO;EACN;EACA,KAAK,UAAU,KAAK,CAAC,CAAC,MAAM,GAAG,EAAE;EACjC,QAAQ,KAAK,CAAC,CAAC,MAAM,GAAG,EAAE;CAC3B;AACD;;;;;;;AAOA,IAAI,gBAAgB,MAAM;CACzB;CACA,2BAA2B,IAAI,IAAI;CACnC;CACA,YAAY,QAAQ;EACnB,MAAM,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,QAAQ,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,UAAU,MAAM,SAAS,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM;EAC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AO,KAAK,OAAO;EACzB,MAAM,MAAM,KAAK,SAAS,KAAK,QAAQ,mBAAmB,IAAI;EAC9D,IAAI,MAAM;EACV,IAAI,OAAO;EACX,IAAI,QAAQ;EACZ,KAAK,MAAM,CAAC,OAAO,QAAQ,KAAK,QAAQ,MAAM,IAAI,GAAG;GACpD,IAAI,MAAM,KAAK;IACd,QAAQ,KAAK,IAAI,KAAK,KAAK;IAC3B;GACD;GACA,OAAO,KAAK,MAAM,MAAM,KAAK,IAAI;GACjC,OAAO;EACR;EACA,IAAI,QAAQ,QAAQ,QAAQ,KAAK,UAAU,gBAAgB,KAAK,WAAW,QAAQ,CAAC,CAAC,GAAG,SAAS;EACjG,KAAK,OAAO,KAAK,MAAM,KAAK;EAC5B,OAAO,MAAM,KAAK,MAAM,MAAM,KAAK;CACpC;CACA,MAAM;EACL,MAAM,OAAO,KAAK;EAClB,KAAK,OAAO;EACZ,OAAO,KAAK,QAAQ,OAAO,IAAI;CAChC;AACD"}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import { t as CliStructuredError } from "./errors-CVYwN2km.mjs";
|
|
2
|
-
import { n as StreamRedactor } from "./redaction-
|
|
3
|
-
|
|
4
|
-
import * as fs from "node:fs";
|
|
5
|
-
import * as path from "node:path";
|
|
6
|
-
import "node:util";
|
|
7
|
-
//#region ../../0-framework/3-tooling/cli/dist/deployment-summary-CVJZn2v0.mjs
|
|
8
|
-
/**
|
|
9
|
-
* The deploy result as data, and what a stack file run as a child hands back
|
|
10
|
-
* to the CLI: the summary file the report hook writes, and the failure cause
|
|
11
|
-
* the child records when it exits non-zero. `DeploymentResult` holds live
|
|
12
|
-
* graph nodes (ADR-0033), so the summary keeps only what can be serialized.
|
|
13
|
-
* Both files are best-effort: a write failure never fails the child.
|
|
14
|
-
*/
|
|
15
|
-
/** Env var the deploy operation sets on the alchemy child: when present,
|
|
16
|
-
* the report hook also writes the JSON DeploymentSummary there. */
|
|
17
|
-
const DEPLOYMENT_RESULT_FILE_ENV = "PRISMA_COMPOSER_DEPLOYMENT_RESULT_FILE";
|
|
2
|
+
import { n as StreamRedactor } from "./redaction-DHaXoToJ-zcuc7Sgf.mjs";
|
|
3
|
+
//#region ../../0-framework/3-tooling/cli/dist/steps-Det-FSAL.mjs
|
|
18
4
|
/** Pure projection: keeps app, each node's address/entities and the findings, drops the in-process `node`. */
|
|
19
5
|
function toDeploymentSummary(result) {
|
|
20
6
|
return {
|
|
@@ -26,11 +12,7 @@ function toDeploymentSummary(result) {
|
|
|
26
12
|
findings: result.findings
|
|
27
13
|
};
|
|
28
14
|
}
|
|
29
|
-
/**
|
|
30
|
-
function engineFailureFilePath(resultFilePath) {
|
|
31
|
-
return `${resultFilePath}.failure.txt`;
|
|
32
|
-
}
|
|
33
|
-
/** Fits the platform's 5000-character build `errorMessage` with room for the exit-status prefix. */
|
|
15
|
+
/** Fits the platform's 5000-character build `errorMessage`. */
|
|
34
16
|
const ENGINE_FAILURE_CAUSE_LIMIT = 1e3;
|
|
35
17
|
/** Alchemy's advice to rerun its own CLI with `--adopt` or to import a resource with adoption, which a Composer user has no way to do. */
|
|
36
18
|
const ALCHEMY_ADOPT_ADVICE = [
|
|
@@ -44,22 +26,10 @@ const ALCHEMY_ADOPT_ADVICE = [
|
|
|
44
26
|
function withComposerAdvice(text) {
|
|
45
27
|
return ALCHEMY_ADOPT_ADVICE.reduce((current, [advice, replacement]) => current.replace(advice, replacement), text);
|
|
46
28
|
}
|
|
47
|
-
/** Parent half: the cause the child recorded, passed through `redact`, or undefined when it recorded none. The child redacts only what its own environment names as a credential; the parent also knows the known secrets. */
|
|
48
|
-
function readEngineFailureCause(resultFilePath, redact) {
|
|
49
|
-
let cause;
|
|
50
|
-
try {
|
|
51
|
-
cause = fs.readFileSync(engineFailureFilePath(resultFilePath), "utf8");
|
|
52
|
-
} catch {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
return cause.length > 0 ? redact(cause) : void 0;
|
|
56
|
-
}
|
|
57
29
|
/** A failure cause capped to fit the platform build's error message. */
|
|
58
30
|
function capFailureCause(cause) {
|
|
59
31
|
return cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;
|
|
60
32
|
}
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region ../../0-framework/3-tooling/cli/dist/app-configuration-file-D0rB5g65.mjs
|
|
63
33
|
function textIn(value, at) {
|
|
64
34
|
if (typeof value === "string") return [{
|
|
65
35
|
at,
|
|
@@ -93,89 +63,6 @@ function refuseSecretsInPlainVariables(plainVariableText, knownSecrets, conseque
|
|
|
93
63
|
throw new CliStructuredError("CONFIG.SECRET_AS_PLAIN_VALUE", `The platform variable "${variable}", which prisma dev read from the \`config\` adapters, holds the value of the platform secret "${name}". ${consequence}`, { fix: `Keep the value of "${name}" out of the platform variable "${variable}", or give "${variable}" a different value.` });
|
|
94
64
|
}
|
|
95
65
|
}
|
|
96
|
-
/** Names the app configuration file the first process wrote for this run (ADR-0062). */
|
|
97
|
-
const APP_CONFIGURATION_FILE_ENV = "PRISMA_COMPOSER_APP_CONFIGURATION_FILE";
|
|
98
|
-
const FILE_NAME = /^app-configuration-(\d+)(-[^/]*)?\.json$/;
|
|
99
|
-
/** The app configuration file a destroy run writes: unique per run, so concurrent runs from one checkout never share one. */
|
|
100
|
-
function deployAppConfigurationFile(cwd, runId) {
|
|
101
|
-
return path.join(cwd, ".prisma-composer", `app-configuration-${String(process.pid)}-${runId}.json`);
|
|
102
|
-
}
|
|
103
|
-
function isRunning(pid) {
|
|
104
|
-
try {
|
|
105
|
-
process.kill(pid, 0);
|
|
106
|
-
return true;
|
|
107
|
-
} catch (error) {
|
|
108
|
-
return error instanceof Error && "code" in error && error.code === "EPERM";
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Deletes the app configuration files that earlier runs left in `.prisma-composer/` and in
|
|
113
|
-
* each dev environment's folder: a run killed before its exit handler ran leaves its file. A
|
|
114
|
-
* file is deleted only when its process is not running and it is older than
|
|
115
|
-
* `LEFTOVER_APP_CONFIGURATION_FILE_AGE_MS`. Never throws.
|
|
116
|
-
*/
|
|
117
|
-
function removeLeftoverAppConfigurationFiles(cwd) {
|
|
118
|
-
const devRoot = path.join(cwd, DEV_DIR);
|
|
119
|
-
const dirs = [path.join(cwd, ".prisma-composer")];
|
|
120
|
-
try {
|
|
121
|
-
for (const entry of fs.readdirSync(devRoot, { withFileTypes: true })) if (entry.isDirectory()) dirs.push(path.join(devRoot, entry.name));
|
|
122
|
-
} catch {}
|
|
123
|
-
for (const dir of dirs) {
|
|
124
|
-
let names;
|
|
125
|
-
try {
|
|
126
|
-
names = fs.readdirSync(dir);
|
|
127
|
-
} catch {
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
for (const name of names) {
|
|
131
|
-
const pid = Number(FILE_NAME.exec(name)?.[1]);
|
|
132
|
-
if (Number.isNaN(pid) || pid === process.pid || isRunning(pid)) continue;
|
|
133
|
-
const file = path.join(dir, name);
|
|
134
|
-
try {
|
|
135
|
-
if (Date.now() - fs.statSync(file).mtimeMs < 6e5) continue;
|
|
136
|
-
fs.rmSync(file, { force: true });
|
|
137
|
-
} catch {}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* First process: the app configuration file and the environment the second process starts with (ADR-0062).
|
|
143
|
-
* Refuses a file that would hold any of `knownSecrets`.
|
|
144
|
-
*/
|
|
145
|
-
function prepareSecondProcess(input) {
|
|
146
|
-
const { file } = input;
|
|
147
|
-
refuseSecretsInRootInput(input.appConfigurationRead, input.knownSecrets, "Composer hands the second process every plain value Load read, in a file, and never writes a secret to a file.");
|
|
148
|
-
refuseSecretsInPlainVariables(input.plainVariableText, input.knownSecrets, "Composer hands the second process every plain value in a file, and never writes a secret to a file.");
|
|
149
|
-
const contents = {
|
|
150
|
-
appConfigurationRead: input.appConfigurationRead,
|
|
151
|
-
plainVariableText: input.plainVariableText,
|
|
152
|
-
nodeAddresses: input.nodeAddresses
|
|
153
|
-
};
|
|
154
|
-
const env = { [APP_CONFIGURATION_FILE_ENV]: file };
|
|
155
|
-
const remove = () => {
|
|
156
|
-
try {
|
|
157
|
-
fs.rmSync(file, { force: true });
|
|
158
|
-
} catch {}
|
|
159
|
-
};
|
|
160
|
-
return {
|
|
161
|
-
env,
|
|
162
|
-
writeFile() {
|
|
163
|
-
fs.rmSync(file, { force: true });
|
|
164
|
-
fs.writeFileSync(file, JSON.stringify(contents), {
|
|
165
|
-
mode: 384,
|
|
166
|
-
flag: "wx"
|
|
167
|
-
});
|
|
168
|
-
process.off("exit", remove);
|
|
169
|
-
process.on("exit", remove);
|
|
170
|
-
},
|
|
171
|
-
removeFile() {
|
|
172
|
-
process.off("exit", remove);
|
|
173
|
-
remove();
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region ../../0-framework/3-tooling/cli/dist/steps-BZXNqW6U.mjs
|
|
179
66
|
/**
|
|
180
67
|
* Times each step for the host's `onEvent`. Steps are matched by `keyOf`, so
|
|
181
68
|
* a step can finish under a newer status than it started with. `emit` sends
|
|
@@ -282,6 +169,6 @@ function interactionMessages(steps, redaction) {
|
|
|
282
169
|
};
|
|
283
170
|
}
|
|
284
171
|
//#endregion
|
|
285
|
-
export {
|
|
172
|
+
export { reportConvergeEvent as a, withComposerAdvice as c, refuseSecretsInRootInput as i, interactionMessages as n, stepTracker as o, refuseSecretsInPlainVariables as r, toDeploymentSummary as s, capFailureCause as t };
|
|
286
173
|
|
|
287
|
-
//# sourceMappingURL=steps-
|
|
174
|
+
//# sourceMappingURL=steps-Det-FSAL-4BEaFT3G.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps-Det-FSAL-4BEaFT3G.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/steps-Det-FSAL.mjs"],"sourcesContent":["import { n as StreamRedactor } from \"./redaction-DHaXoToJ.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\n//#region src/deployment-summary.ts\n/** Pure projection: keeps app, each node's address/entities and the findings, drops the in-process `node`. */\nfunction toDeploymentSummary(result) {\n\treturn {\n\t\tapp: result.app,\n\t\tnodes: result.nodes.map((node) => ({\n\t\t\taddress: node.address,\n\t\t\tentities: node.entities\n\t\t})),\n\t\tfindings: result.findings\n\t};\n}\n/** Fits the platform's 5000-character build `errorMessage`. */\nconst ENGINE_FAILURE_CAUSE_LIMIT = 1e3;\n/** Alchemy's advice to rerun its own CLI with `--adopt` or to import a resource with adoption, which a Composer user has no way to do. */\nconst ALCHEMY_ADOPT_ADVICE = [\n\t[/Re-run with `--adopt` \\(or wrap the effect in `adopt\\(true\\)`\\) to take it over\\./g, \"Something other than this app holds it. Remove that resource, then deploy again.\"],\n\t[/Re-run with `--adopt` \\(or wrap the effect in `adopt\\(true\\)`\\) to replace it anyway\\./g, \"Remove that resource, then deploy again.\"],\n\t[/\\(re-deploy with --adopt to take ownership, then destroy\\)/g, \"(remove it by hand)\"],\n\t[/Import it with explicit adoption (?:instead of silently taking it over|or choose a different [\\w ]+ name)\\./g, \"Something other than this app holds it. Remove that resource, then deploy again.\"],\n\t[/; rerun with adoption enabled if it is the intended [\\w ]+\\./g, \". Remove that resource, then deploy again.\"]\n];\n/** Replaces Alchemy CLI advice in engine output with steps that work from Composer. */\nfunction withComposerAdvice(text) {\n\treturn ALCHEMY_ADOPT_ADVICE.reduce((current, [advice, replacement]) => current.replace(advice, replacement), text);\n}\n/** A failure cause capped to fit the platform build's error message. */\nfunction capFailureCause(cause) {\n\treturn cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;\n}\n//#endregion\n//#region src/secret-as-plain-value.ts\nfunction textIn(value, at) {\n\tif (typeof value === \"string\") return [{\n\t\tat,\n\t\ttext: value\n\t}];\n\tif (typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"bigint\") return [{\n\t\tat,\n\t\ttext: String(value)\n\t}];\n\tif (Array.isArray(value)) return value.flatMap((member, index) => textIn(member, [...at, String(index)]));\n\tif (typeof value === \"object\" && value !== null) return Object.entries(value).flatMap(([key, member]) => textIn(member, [...at, key]));\n\treturn [];\n}\n/** Throws `CONFIG.SECRET_AS_PLAIN_VALUE` when a root input field Load read holds a known secret. */\nfunction refuseSecretsInRootInput(read, knownSecrets, consequence) {\n\tconst readPlaces = read.rootInput.flatMap((field) => textIn(field.value, field.path).map(({ at, text }) => ({\n\t\twhere: `Root input field input.${at.join(\".\")}`,\n\t\ttext\n\t})));\n\tfor (const { where, text } of readPlaces) {\n\t\tconst name = knownSecrets.nameIn(text);\n\t\tif (name === void 0) continue;\n\t\tthrow new CliStructuredError(\"CONFIG.SECRET_AS_PLAIN_VALUE\", `${where} holds the value of the platform secret \"${name}\". ${consequence}`, { fix: `Pass the value of the platform secret \"${name}\" to where this value is used, or give this plain value text that does not contain the value of \"${name}\".` });\n\t}\n}\n/** Throws `CONFIG.SECRET_AS_PLAIN_VALUE` when a plain platform variable's text holds a known secret. */\nfunction refuseSecretsInPlainVariables(plainVariableText, knownSecrets, consequence) {\n\tfor (const [variable, text] of Object.entries(plainVariableText)) {\n\t\tconst name = knownSecrets.nameIn(text);\n\t\tif (name === void 0) continue;\n\t\tthrow new CliStructuredError(\"CONFIG.SECRET_AS_PLAIN_VALUE\", `The platform variable \"${variable}\", which prisma dev read from the \\`config\\` adapters, holds the value of the platform secret \"${name}\". ${consequence}`, { fix: `Keep the value of \"${name}\" out of the platform variable \"${variable}\", or give \"${variable}\" a different value.` });\n\t}\n}\n//#endregion\n//#region src/operations/steps.ts\n/**\n* Times each step for the host's `onEvent`. Steps are matched by `keyOf`, so\n* a step can finish under a newer status than it started with. `emit` sends\n* the operation's other events. A host `onEvent` that throws is the host's\n* bug and cannot fail the operation.\n*/\nfunction stepTracker(keyOf, onEvent) {\n\tconst open = /* @__PURE__ */ new Map();\n\tconst emit = (event) => {\n\t\ttry {\n\t\t\tonEvent?.(event);\n\t\t} catch {}\n\t};\n\tconst finish = (step, outcome, data) => {\n\t\tconst entry = open.get(keyOf(step));\n\t\tif (entry === void 0) return;\n\t\topen.delete(keyOf(step));\n\t\tconst durationMs = Math.round(performance.now() - entry.startedAt);\n\t\temit({\n\t\t\tkind: \"step-finished\",\n\t\t\tstep,\n\t\t\toutcome,\n\t\t\tdurationMs,\n\t\t\tdata\n\t\t});\n\t};\n\treturn {\n\t\tstart(step) {\n\t\t\topen.set(keyOf(step), {\n\t\t\t\tstep,\n\t\t\t\tstartedAt: performance.now()\n\t\t\t});\n\t\t\temit({\n\t\t\t\tkind: \"step-started\",\n\t\t\t\tstep\n\t\t\t});\n\t\t},\n\t\tfinish(step, data) {\n\t\t\tfinish(step, \"ok\", data);\n\t\t},\n\t\tfail(step) {\n\t\t\tfinish(step, \"failed\");\n\t\t},\n\t\t/** Closes every open step with `outcome`, innermost first. */\n\t\tcloseOpen(outcome) {\n\t\t\tfor (const { step } of [...open.values()].reverse()) finish(step, outcome);\n\t\t},\n\t\tisOpen(step) {\n\t\t\treturn open.has(keyOf(step));\n\t\t},\n\t\tmessage(severity, text) {\n\t\t\temit({\n\t\t\t\tkind: \"message\",\n\t\t\t\tseverity,\n\t\t\t\ttext\n\t\t\t});\n\t\t},\n\t\temit\n\t};\n}\n/** One converge event as step events: each resource is a step, made by `resourceStep`; a log line is a message. */\nfunction reportConvergeEvent(steps, event, redact, resourceStep) {\n\tif (event.kind === \"log\") {\n\t\tsteps.message(event.severity, redact(withComposerAdvice(event.text)));\n\t\treturn;\n\t}\n\tconst step = resourceStep({\n\t\tresourceId: event.fqn,\n\t\tresourceType: event.resourceType,\n\t\tstatus: event.status\n\t});\n\tswitch (event.phase) {\n\t\tcase \"running\":\n\t\t\tif (!steps.isOpen(step)) steps.start(step);\n\t\t\treturn;\n\t\tcase \"done\":\n\t\t\tif (!steps.isOpen(step)) steps.start(step);\n\t\t\tsteps.finish(step);\n\t\t\treturn;\n\t\tcase \"failed\":\n\t\t\tif (!steps.isOpen(step)) steps.start(step);\n\t\t\tsteps.fail(step);\n\t\t\tif (event.message !== void 0) steps.message(\"warn\", redact(`${event.fqn}: ${withComposerAdvice(event.message)}`));\n\t\t\treturn;\n\t\tcase \"pending\": return;\n\t}\n}\n/**\n* Alchemy's terminal text as `info` messages, one per complete line, redacted. A secret split\n* across writes or lines is still found, because the text passes through a `StreamRedactor`\n* before it is cut into lines. `end` sends the last line that has no line break.\n*/\nfunction interactionMessages(steps, redaction) {\n\tconst stream = new StreamRedactor(redaction.allValues());\n\tlet partial = \"\";\n\tconst send = (text, last) => {\n\t\tconst lines = (partial + text).split(\"\\n\");\n\t\tpartial = last ? \"\" : lines.pop() ?? \"\";\n\t\tfor (const line of lines) if (line.trim() !== \"\") steps.message(\"info\", redaction.redact(line));\n\t};\n\treturn {\n\t\tpush: (text) => send(stream.push(text), false),\n\t\tend: () => send(stream.end(), true)\n\t};\n}\n//#endregion\nexport { refuseSecretsInRootInput as a, withComposerAdvice as c, refuseSecretsInPlainVariables as i, reportConvergeEvent as n, capFailureCause as o, stepTracker as r, toDeploymentSummary as s, interactionMessages as t };\n\n//# sourceMappingURL=steps-Det-FSAL.mjs.map"],"mappings":";;;;AAIA,SAAS,oBAAoB,QAAQ;CACpC,OAAO;EACN,KAAK,OAAO;EACZ,OAAO,OAAO,MAAM,KAAK,UAAU;GAClC,SAAS,KAAK;GACd,UAAU,KAAK;EAChB,EAAE;EACF,UAAU,OAAO;CAClB;AACD;;AAEA,MAAM,6BAA6B;;AAEnC,MAAM,uBAAuB;CAC5B,CAAC,sFAAsF,kFAAkF;CACzK,CAAC,2FAA2F,0CAA0C;CACtI,CAAC,+DAA+D,qBAAqB;CACrF,CAAC,gHAAgH,kFAAkF;CACnM,CAAC,iEAAiE,4CAA4C;AAC/G;;AAEA,SAAS,mBAAmB,MAAM;CACjC,OAAO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ServiceEndpoint, a as DeployEvent, c as DevStopInput, d as DevUrlInput, g as OperationDeps, h as DevSession, l as DevStopped, m as DevInput, o as DeployInput, p as DevEvent, s as DeploySuccess, t as ComposerOperations, u as DevUrl, v as Result, y as CliStructuredError } from "./family-
|
|
1
|
+
import { _ as ServiceEndpoint, a as DeployEvent, c as DevStopInput, d as DevUrlInput, g as OperationDeps, h as DevSession, l as DevStopped, m as DevInput, o as DeployInput, p as DevEvent, s as DeploySuccess, t as ComposerOperations, u as DevUrl, v as Result, y as CliStructuredError } from "./family-5lQ0X01--mh7Vm2zv.mjs";
|
|
2
2
|
//#region ../../0-framework/3-tooling/cli/dist/testing.d.mts
|
|
3
3
|
//#region src/testing/operations-double.d.ts
|
|
4
4
|
interface OperationsDoubleFixtures {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require, t as __commonJSMin } from "./rolldown-runtime-C7HZzL1F.mjs";
|
|
2
|
-
import { n as configFileMissing, r as entryMissing, t as checkComposerConfig } from "./composer-config-
|
|
2
|
+
import { n as configFileMissing, r as entryMissing, t as checkComposerConfig } from "./composer-config-aL0W4HPG-CTpDJKz4.mjs";
|
|
3
3
|
import { t as InternalError } from "./internal-error-Dfur7Zqt-B8J8e7ac.mjs";
|
|
4
|
-
import { a as loadEntry, c as GraphCheckError, d as assertAppName, l as Load, m as describeKind, p as secretsKeys } from "./deploy-
|
|
4
|
+
import { a as loadEntry, c as GraphCheckError, d as assertAppName, l as Load, m as describeKind, p as secretsKeys } from "./deploy-Cu7Wtrf0.mjs";
|
|
5
5
|
import { t as CliStructuredError } from "./errors-CVYwN2km.mjs";
|
|
6
|
-
import { l as valuesUnderSecretsKeys, r as credentialLookingValues, t as SecretRedaction } from "./redaction-
|
|
6
|
+
import { l as valuesUnderSecretsKeys, r as credentialLookingValues, t as SecretRedaction } from "./redaction-DHaXoToJ-zcuc7Sgf.mjs";
|
|
7
7
|
import * as fs from "node:fs";
|
|
8
8
|
import * as path from "node:path";
|
|
9
9
|
import { spawnSync } from "node:child_process";
|
|
@@ -745,7 +745,7 @@ async function assembleServices(graph, config, cwd, run, onEvent, options = {})
|
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
747
|
//#endregion
|
|
748
|
-
//#region ../../0-framework/3-tooling/cli/dist/validate-environment-
|
|
748
|
+
//#region ../../0-framework/3-tooling/cli/dist/validate-environment-BevPErw8.mjs
|
|
749
749
|
function adapterInvalid(list, index, input, summary, fix) {
|
|
750
750
|
return new CliStructuredError("CONFIG.ADAPTER_INVALID", summary, {
|
|
751
751
|
fix,
|
|
@@ -843,7 +843,7 @@ function validateRegistryCoverage(graph, config) {
|
|
|
843
843
|
* The shared prefix of `deploy`/`destroy`/`dev` (deploy-cli.md § The
|
|
844
844
|
* pipeline; local-dev spec § 6): entry load, Load,
|
|
845
845
|
* registry coverage validation, name resolution, assemble. Deploy and dev
|
|
846
|
-
* diverge after this — deploy resolves containers
|
|
846
|
+
* diverge after this — deploy resolves containers and runs its preflight
|
|
847
847
|
* against the hosted providers, dev against the local ones — so everything
|
|
848
848
|
* up to and including assemble lives here once, consumed verbatim by both
|
|
849
849
|
* `run()` (main.ts) and `runDev()` (dev/run-dev.ts), so the two pipelines
|
|
@@ -980,4 +980,4 @@ function validateEnvironmentName(environment, spawn = spawnSync) {
|
|
|
980
980
|
//#endregion
|
|
981
981
|
export { validateEnvironmentName as i, resolveAppIdentity as n, runPipeline as r, checkConfigSource as t };
|
|
982
982
|
|
|
983
|
-
//# sourceMappingURL=validate-environment-
|
|
983
|
+
//# sourceMappingURL=validate-environment-BevPErw8-BRVXeBjT.mjs.map
|