@arcgis/node-toolkit 5.2.0-next.46 → 5.2.0-next.47
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/file.js +10 -0
- package/package.json +1 -1
package/dist/file.js
CHANGED
|
@@ -31,6 +31,7 @@ async function asyncSh(command, options = {}) {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
function sp(command, args, options = {}) {
|
|
34
|
+
validatePnpmUsage(command, options);
|
|
34
35
|
const normalizedOptions = { encoding: "utf8", ...options };
|
|
35
36
|
const result = spawnSync(command, args, normalizedOptions);
|
|
36
37
|
if (result.error) {
|
|
@@ -47,6 +48,7 @@ ${output}`.trim()
|
|
|
47
48
|
return output;
|
|
48
49
|
}
|
|
49
50
|
async function asyncSp(command, args, options = {}) {
|
|
51
|
+
validatePnpmUsage(command, options);
|
|
50
52
|
const child = spawn(command, args, options);
|
|
51
53
|
const stdoutChunks = [];
|
|
52
54
|
const stderrChunks = [];
|
|
@@ -76,6 +78,14 @@ ${output}`.trim()
|
|
|
76
78
|
});
|
|
77
79
|
});
|
|
78
80
|
}
|
|
81
|
+
function validatePnpmUsage(command, options) {
|
|
82
|
+
if (command === "pnpm" && // Don't error for explicit shell:false to permit system-dependent handling
|
|
83
|
+
!("shell" in options)) {
|
|
84
|
+
throw Error(
|
|
85
|
+
'If invoking pnpm using sp/asyncSp, must provide {shell:true} or {shell:process.platform==="win32"} option and manually handle shell escaping'
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
79
89
|
function makeExecErrorReadable(error) {
|
|
80
90
|
if (error instanceof Error && error.stack && "output" in error && Array.isArray(error.output) && "status" in error) {
|
|
81
91
|
const stackIndex = error.stack.indexOf("\n at ");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/node-toolkit",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.47",
|
|
4
4
|
"description": "Collection of common internal build-time patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
|
|
5
5
|
"homepage": "https://developers.arcgis.com/javascript/latest/",
|
|
6
6
|
"type": "module",
|