@deftai/directive 0.129.0 → 0.129.1
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/bin.js +16 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1078,6 +1078,16 @@ To make ${pm} available:
|
|
|
1078
1078
|
- Or install ${pm} yourself and ensure its directory is on PATH
|
|
1079
1079
|
Directive does not install, upgrade, or switch package managers.`;
|
|
1080
1080
|
}
|
|
1081
|
+
function isPnpmIgnoredBuildsFailure(text) {
|
|
1082
|
+
return /ERR_PNPM_IGNORED_BUILDS/i.test(text);
|
|
1083
|
+
}
|
|
1084
|
+
function formatPnpmIgnoredBuildsRecovery() {
|
|
1085
|
+
return `pnpm refused dependency builds (ERR_PNPM_IGNORED_BUILDS).
|
|
1086
|
+
Recover with pnpm's own policy tools \u2014 Directive does not write allowBuilds:
|
|
1087
|
+
- Run: pnpm approve-builds
|
|
1088
|
+
- Or set a real true/false under allowBuilds in pnpm-workspace.yaml
|
|
1089
|
+
Do not commit pnpm's interactive placeholder text.`;
|
|
1090
|
+
}
|
|
1081
1091
|
function ensurePackageManagerAvailable(pm, env = process.env, declaredVersion = null, projectRoot) {
|
|
1082
1092
|
const result = spawnSync4(pm, ["--version"], {
|
|
1083
1093
|
...projectRoot !== void 0 ? { cwd: projectRoot } : {},
|
|
@@ -3023,6 +3033,12 @@ function reportPmFailure(io, add) {
|
|
|
3023
3033
|
`);
|
|
3024
3034
|
if (add.stderr) io.writeErr(`${add.stderr}
|
|
3025
3035
|
`);
|
|
3036
|
+
const blob = `${add.message}
|
|
3037
|
+
${add.stderr ?? ""}`;
|
|
3038
|
+
if (isPnpmIgnoredBuildsFailure(blob)) {
|
|
3039
|
+
io.writeErr(`${formatPnpmIgnoredBuildsRecovery()}
|
|
3040
|
+
`);
|
|
3041
|
+
}
|
|
3026
3042
|
if (add.interrupted) {
|
|
3027
3043
|
if (!/partial changes may remain/i.test(add.message)) {
|
|
3028
3044
|
io.writeErr(`${PARTIAL_CHANGES_MAY_REMAIN}
|
package/package.json
CHANGED