@prisma/composer-cli 0.38.0 → 0.39.0-dev.10
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-C_YkTIBF-RmqGOR45.mjs +88 -0
- package/dist/app-converge-C_YkTIBF-RmqGOR45.mjs.map +1 -0
- package/dist/composer-config-QKdY85G--CEXrb2Uc.mjs +254 -0
- package/dist/composer-config-QKdY85G--CEXrb2Uc.mjs.map +1 -0
- package/dist/{validate-environment-CpQLC3CA-Ct-PXoKN.mjs → deploy-Br1yvLe3.mjs} +341 -1082
- package/dist/deploy-Br1yvLe3.mjs.map +1 -0
- package/dist/dev-converge-messages-DML4rTz7-B6uxtpZG.mjs +256 -0
- package/dist/dev-converge-messages-DML4rTz7-B6uxtpZG.mjs.map +1 -0
- package/dist/dev-converge-worker.d.mts +1 -0
- package/dist/dev-converge-worker.mjs +143 -0
- package/dist/dev-converge-worker.mjs.map +1 -0
- package/dist/{dev-current-D-Qb6Yem-CvaY4xsk.mjs → dev-current-DANgmcle-RwunETUJ.mjs} +12 -18
- package/dist/dev-current-DANgmcle-RwunETUJ.mjs.map +1 -0
- package/dist/dev-environment-name-6eEr5PW8-CCY7WNWz.mjs +43 -0
- package/dist/dev-environment-name-6eEr5PW8-CCY7WNWz.mjs.map +1 -0
- package/dist/{dist-BH6HQ6zZ.mjs → dist-C0OGaDnj.mjs} +4 -3
- package/dist/{dist-BH6HQ6zZ.mjs.map → dist-C0OGaDnj.mjs.map} +1 -1
- package/dist/errors-CVYwN2km.mjs +93 -0
- package/dist/errors-CVYwN2km.mjs.map +1 -0
- package/dist/{execute-deploy-destroy-C6EsdmLz-DqdToZ_i.mjs → execute-deploy-destroy-DIR9uvA_-Bk0HBMTz.mjs} +385 -141
- package/dist/execute-deploy-destroy-DIR9uvA_-Bk0HBMTz.mjs.map +1 -0
- package/dist/{execute-dev-gjIKYybU-hRndPEgC.mjs → execute-dev-Cu9_LsQi-CsyIqphZ.mjs} +450 -127
- package/dist/execute-dev-Cu9_LsQi-CsyIqphZ.mjs.map +1 -0
- package/dist/{execute-dev-current-tBKmDAjV-DOOMGrl5.mjs → execute-dev-current-Bs0lE_5--BU3A2hsC.mjs} +9 -6
- package/dist/{execute-dev-current-tBKmDAjV-DOOMGrl5.mjs.map → execute-dev-current-Bs0lE_5--BU3A2hsC.mjs.map} +1 -1
- package/dist/{redaction-Bf8FvTFH-D0dXGsO8.d.mts → family-DfwviKFj-CS1L-EvS.d.mts} +484 -204
- package/dist/family-DfwviKFj-CS1L-EvS.d.mts.map +1 -0
- package/dist/family.d.mts +1 -1
- package/dist/family.mjs +350 -270
- package/dist/family.mjs.map +1 -1
- package/dist/internal-error-Dfur7Zqt-B8J8e7ac.mjs +58 -0
- package/dist/internal-error-Dfur7Zqt-B8J8e7ac.mjs.map +1 -0
- package/dist/{list-deployed-IL0MgmTX.mjs → list-deployed-slo4P7dl.mjs} +6 -5
- package/dist/list-deployed-slo4P7dl.mjs.map +1 -0
- package/dist/local-target-CZzICh5R.mjs +34 -0
- package/dist/local-target-CZzICh5R.mjs.map +1 -0
- package/dist/{config-DiZaanS3.mjs → preflight-transport-2d6iIchu-ArIJUY1L.mjs} +11 -19
- package/dist/preflight-transport-2d6iIchu-ArIJUY1L.mjs.map +1 -0
- package/dist/{redaction-HnbkSFrK-CCKJNRwi.mjs → redaction-DY6eDC12-BrK1aSN5.mjs} +55 -262
- package/dist/redaction-DY6eDC12-BrK1aSN5.mjs.map +1 -0
- package/dist/result-CttmabB6.mjs +91 -0
- package/dist/result-CttmabB6.mjs.map +1 -0
- package/dist/rolldown-runtime-C7HZzL1F.mjs +26 -0
- package/dist/steps-BZXNqW6U-BM2Aa8Bp.mjs +287 -0
- package/dist/steps-BZXNqW6U-BM2Aa8Bp.mjs.map +1 -0
- package/dist/testing.d.mts +4 -49
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +2 -75
- package/dist/testing.mjs.map +1 -1
- package/dist/validate-environment-DCZiNSlR-idVge-kq.mjs +983 -0
- package/dist/validate-environment-DCZiNSlR-idVge-kq.mjs.map +1 -0
- package/dist/value-reads-change-text-DcRCv7Zy-Ca8m3bal.mjs +15 -0
- package/dist/value-reads-change-text-DcRCv7Zy-Ca8m3bal.mjs.map +1 -0
- package/package.json +11 -11
- package/src/exports/dev-converge-worker.ts +2 -0
- package/src/exports/testing.ts +1 -4
- package/dist/app-configuration-file-CeJvBAti-Dk65W3Az.mjs +0 -140
- package/dist/app-configuration-file-CeJvBAti-Dk65W3Az.mjs.map +0 -1
- package/dist/config-DiZaanS3.mjs.map +0 -1
- package/dist/dev-current-D-Qb6Yem-CvaY4xsk.mjs.map +0 -1
- package/dist/dev-environment-name-6eEr5PW8-DpdGjmTb.mjs +0 -71
- package/dist/dev-environment-name-6eEr5PW8-DpdGjmTb.mjs.map +0 -1
- package/dist/execute-deploy-destroy-C6EsdmLz-DqdToZ_i.mjs.map +0 -1
- package/dist/execute-dev-gjIKYybU-hRndPEgC.mjs.map +0 -1
- package/dist/generate-dev-stack-BV_n-X9n-BDBjgphH.mjs +0 -100
- package/dist/generate-dev-stack-BV_n-X9n-BDBjgphH.mjs.map +0 -1
- package/dist/list-deployed-IL0MgmTX.mjs.map +0 -1
- package/dist/redaction-Bf8FvTFH-D0dXGsO8.d.mts.map +0 -1
- package/dist/redaction-HnbkSFrK-CCKJNRwi.mjs.map +0 -1
- package/dist/result-sR7PBi61.mjs +0 -229
- package/dist/result-sR7PBi61.mjs.map +0 -1
- package/dist/run-alchemy-OS_ix5g0-DSlHsv2p.mjs +0 -236
- package/dist/run-alchemy-OS_ix5g0-DSlHsv2p.mjs.map +0 -1
- package/dist/validate-environment-CpQLC3CA-Ct-PXoKN.mjs.map +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { n as blindCast } from "./internal-error-Dfur7Zqt-B8J8e7ac.mjs";
|
|
2
|
+
//#region ../../0-framework/0-foundation/foundation/dist/errors.mjs
|
|
3
|
+
/**
|
|
4
|
+
* Returns an object with the key/value if value is defined, otherwise an empty object.
|
|
5
|
+
*
|
|
6
|
+
* Use with spread to conditionally include optional properties while satisfying
|
|
7
|
+
* exactOptionalPropertyTypes. This is explicit about which properties are optional
|
|
8
|
+
* and won't inadvertently strip other undefined values.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Instead of:
|
|
13
|
+
* const obj = {
|
|
14
|
+
* required: 'value',
|
|
15
|
+
* ...(optional ? { optional } : {}),
|
|
16
|
+
* };
|
|
17
|
+
*
|
|
18
|
+
* // Use:
|
|
19
|
+
* const obj = {
|
|
20
|
+
* required: 'value',
|
|
21
|
+
* ...ifDefined('optional', optional),
|
|
22
|
+
* };
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
function ifDefined(key, value) {
|
|
26
|
+
return value !== void 0 ? blindCast({ [key]: value }) : {};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Structured CLI error that contains all information needed for error envelopes.
|
|
30
|
+
* Call sites throw these errors with full context.
|
|
31
|
+
*
|
|
32
|
+
* A `CliStructuredError` is a `StructuredError` (see
|
|
33
|
+
* `./structured-error.ts`): `code` is a dotted
|
|
34
|
+
* `NAMESPACE.SUBCODE` string, and the namespace prefix is the error's
|
|
35
|
+
* category — there is no separate `domain` field. See ADR 239 in
|
|
36
|
+
* prisma/prisma and composer's ADR-0044 for the namespace taxonomy.
|
|
37
|
+
*/
|
|
38
|
+
var CliStructuredError = class extends Error {
|
|
39
|
+
code;
|
|
40
|
+
severity;
|
|
41
|
+
constructor(code, summary, options) {
|
|
42
|
+
super(summary, options?.cause !== void 0 ? { cause: options.cause } : void 0);
|
|
43
|
+
this.name = "CliStructuredError";
|
|
44
|
+
this.code = code;
|
|
45
|
+
this.severity = options?.severity ?? "error";
|
|
46
|
+
const fix = options?.fix === options?.why ? void 0 : options?.fix;
|
|
47
|
+
const where = options?.where ? {
|
|
48
|
+
...ifDefined("path", options.where.path),
|
|
49
|
+
...ifDefined("line", options.where.line)
|
|
50
|
+
} : void 0;
|
|
51
|
+
Object.assign(this, {
|
|
52
|
+
...ifDefined("why", options?.why),
|
|
53
|
+
...ifDefined("fix", fix),
|
|
54
|
+
...ifDefined("where", where),
|
|
55
|
+
...ifDefined("meta", options?.meta),
|
|
56
|
+
...ifDefined("docsUrl", options?.docsUrl)
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Converts this error to a CLI error envelope for output formatting.
|
|
61
|
+
*/
|
|
62
|
+
toEnvelope() {
|
|
63
|
+
return {
|
|
64
|
+
ok: false,
|
|
65
|
+
code: this.code,
|
|
66
|
+
severity: this.severity,
|
|
67
|
+
summary: this.message,
|
|
68
|
+
...ifDefined("why", this.why),
|
|
69
|
+
...ifDefined("fix", this.fix),
|
|
70
|
+
...ifDefined("where", this.where),
|
|
71
|
+
...ifDefined("meta", this.meta),
|
|
72
|
+
...ifDefined("docsUrl", this.docsUrl)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Type guard to check if an error is a CliStructuredError.
|
|
77
|
+
* Uses duck-typing to work across module boundaries where instanceof may fail.
|
|
78
|
+
*/
|
|
79
|
+
static is(error) {
|
|
80
|
+
if (!(error instanceof Error)) return false;
|
|
81
|
+
const candidate = blindCast(error);
|
|
82
|
+
return candidate.name === "CliStructuredError" && typeof candidate.code === "string" && typeof candidate.toEnvelope === "function";
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
function quotedList(names) {
|
|
86
|
+
const quoted = names.map((name) => `"${name}"`);
|
|
87
|
+
const last = quoted.pop() ?? "";
|
|
88
|
+
return quoted.length === 0 ? last : `${quoted.join(", ")} and ${last}`;
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { quotedList as n, CliStructuredError as t };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=errors-CVYwN2km.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-CVYwN2km.mjs","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/errors.mjs"],"sourcesContent":["import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\nimport { t as describeKind } from \"./describe-kind-Cpm_euxo.mjs\";\nimport { n as assertNever, r as isInternalError, t as InternalError } from \"./internal-error-Dfur7Zqt.mjs\";\n//#region src/defined.ts\n/**\n* Returns an object with the key/value if value is defined, otherwise an empty object.\n*\n* Use with spread to conditionally include optional properties while satisfying\n* exactOptionalPropertyTypes. This is explicit about which properties are optional\n* and won't inadvertently strip other undefined values.\n*\n* @example\n* ```typescript\n* // Instead of:\n* const obj = {\n* required: 'value',\n* ...(optional ? { optional } : {}),\n* };\n*\n* // Use:\n* const obj = {\n* required: 'value',\n* ...ifDefined('optional', optional),\n* };\n* ```\n*/\nfunction ifDefined(key, value) {\n\treturn value !== void 0 ? blindCast({ [key]: value }) : {};\n}\n//#endregion\n//#region src/cli-structured-error.ts\n/**\n* Structured CLI error that contains all information needed for error envelopes.\n* Call sites throw these errors with full context.\n*\n* A `CliStructuredError` is a `StructuredError` (see\n* `./structured-error.ts`): `code` is a dotted\n* `NAMESPACE.SUBCODE` string, and the namespace prefix is the error's\n* category — there is no separate `domain` field. See ADR 239 in\n* prisma/prisma and composer's ADR-0044 for the namespace taxonomy.\n*/\nvar CliStructuredError = class extends Error {\n\tcode;\n\tseverity;\n\tconstructor(code, summary, options) {\n\t\tsuper(summary, options?.cause !== void 0 ? { cause: options.cause } : void 0);\n\t\tthis.name = \"CliStructuredError\";\n\t\tthis.code = code;\n\t\tthis.severity = options?.severity ?? \"error\";\n\t\tconst fix = options?.fix === options?.why ? void 0 : options?.fix;\n\t\tconst where = options?.where ? {\n\t\t\t...ifDefined(\"path\", options.where.path),\n\t\t\t...ifDefined(\"line\", options.where.line)\n\t\t} : void 0;\n\t\tObject.assign(this, {\n\t\t\t...ifDefined(\"why\", options?.why),\n\t\t\t...ifDefined(\"fix\", fix),\n\t\t\t...ifDefined(\"where\", where),\n\t\t\t...ifDefined(\"meta\", options?.meta),\n\t\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t\t});\n\t}\n\t/**\n\t* Converts this error to a CLI error envelope for output formatting.\n\t*/\n\ttoEnvelope() {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tcode: this.code,\n\t\t\tseverity: this.severity,\n\t\t\tsummary: this.message,\n\t\t\t...ifDefined(\"why\", this.why),\n\t\t\t...ifDefined(\"fix\", this.fix),\n\t\t\t...ifDefined(\"where\", this.where),\n\t\t\t...ifDefined(\"meta\", this.meta),\n\t\t\t...ifDefined(\"docsUrl\", this.docsUrl)\n\t\t};\n\t}\n\t/**\n\t* Type guard to check if an error is a CliStructuredError.\n\t* Uses duck-typing to work across module boundaries where instanceof may fail.\n\t*/\n\tstatic is(error) {\n\t\tif (!(error instanceof Error)) return false;\n\t\tconst candidate = blindCast(error);\n\t\treturn candidate.name === \"CliStructuredError\" && typeof candidate.code === \"string\" && typeof candidate.toEnvelope === \"function\";\n\t}\n};\n//#endregion\n//#region src/quoted-list.ts\nfunction quotedList(names) {\n\tconst quoted = names.map((name) => `\"${name}\"`);\n\tconst last = quoted.pop() ?? \"\";\n\treturn quoted.length === 0 ? last : `${quoted.join(\", \")} and ${last}`;\n}\n//#endregion\n//#region src/structured-error.ts\nconst STRUCTURED_CODE_RE = /^[A-Z][A-Z0-9]*\\.[A-Z][A-Z0-9_]*$/;\nfunction isStructuredError(e) {\n\treturn typeof e === \"object\" && e !== null && \"code\" in e && typeof e.code === \"string\" && STRUCTURED_CODE_RE.test(e.code) && \"message\" in e && typeof e.message === \"string\";\n}\nfunction structuredError(code, message, options) {\n\tconst error = options?.cause !== void 0 ? new Error(message, { cause: options.cause }) : new Error(message);\n\tObject.defineProperty(error, \"name\", {\n\t\tvalue: \"StructuredError\",\n\t\tconfigurable: true\n\t});\n\treturn Object.assign(error, {\n\t\tcode,\n\t\t...ifDefined(\"why\", options?.why),\n\t\t...ifDefined(\"fix\", options?.fix),\n\t\t...ifDefined(\"where\", options?.where),\n\t\t...ifDefined(\"severity\", options?.severity),\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t});\n}\nconst DOCS_BASE = `https://docs.prisma.io/docs/orm/next/reference/error-reference`;\nfunction docsUrlFor(code) {\n\treturn `${DOCS_BASE}#${code}`;\n}\n//#endregion\nexport { CliStructuredError, DOCS_BASE, InternalError, assertNever, describeKind, docsUrlFor, isInternalError, isStructuredError, quotedList, structuredError };\n\n//# sourceMappingURL=errors.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAS,UAAU,KAAK,OAAO;CAC9B,OAAO,UAAU,KAAK,IAAI,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC;AAC1D;;;;;;;;;;;AAaA,IAAI,qBAAqB,cAAc,MAAM;CAC5C;CACA;CACA,YAAY,MAAM,SAAS,SAAS;EACnC,MAAM,SAAS,SAAS,UAAU,KAAK,IAAI,EAAE,OAAO,QAAQ,MAAM,IAAI,KAAK,CAAC;EAC5E,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,WAAW,SAAS,YAAY;EACrC,MAAM,MAAM,SAAS,QAAQ,SAAS,MAAM,KAAK,IAAI,SAAS;EAC9D,MAAM,QAAQ,SAAS,QAAQ;GAC9B,GAAG,UAAU,QAAQ,QAAQ,MAAM,IAAI;GACvC,GAAG,UAAU,QAAQ,QAAQ,MAAM,IAAI;EACxC,IAAI,KAAK;EACT,OAAO,OAAO,MAAM;GACnB,GAAG,UAAU,OAAO,SAAS,GAAG;GAChC,GAAG,UAAU,OAAO,GAAG;GACvB,GAAG,UAAU,SAAS,KAAK;GAC3B,GAAG,UAAU,QAAQ,SAAS,IAAI;GAClC,GAAG,UAAU,WAAW,SAAS,OAAO;EACzC,CAAC;CACF;;;;CAIA,aAAa;EACZ,OAAO;GACN,IAAI;GACJ,MAAM,KAAK;GACX,UAAU,KAAK;GACf,SAAS,KAAK;GACd,GAAG,UAAU,OAAO,KAAK,GAAG;GAC5B,GAAG,UAAU,OAAO,KAAK,GAAG;GAC5B,GAAG,UAAU,SAAS,KAAK,KAAK;GAChC,GAAG,UAAU,QAAQ,KAAK,IAAI;GAC9B,GAAG,UAAU,WAAW,KAAK,OAAO;EACrC;CACD;;;;;CAKA,OAAO,GAAG,OAAO;EAChB,IAAI,EAAE,iBAAiB,QAAQ,OAAO;EACtC,MAAM,YAAY,UAAU,KAAK;EACjC,OAAO,UAAU,SAAS,wBAAwB,OAAO,UAAU,SAAS,YAAY,OAAO,UAAU,eAAe;CACzH;AACD;AAGA,SAAS,WAAW,OAAO;CAC1B,MAAM,SAAS,MAAM,KAAK,SAAS,IAAI,KAAK,EAAE;CAC9C,MAAM,OAAO,OAAO,IAAI,KAAK;CAC7B,OAAO,OAAO,WAAW,IAAI,OAAO,GAAG,OAAO,KAAK,IAAI,EAAE,OAAO;AACjE"}
|