@parel/sandbox-vercel 0.3.3 → 0.3.4
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/index.js +7 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3,6 +3,12 @@ import { Buffer } from "buffer";
|
|
|
3
3
|
|
|
4
4
|
// ../../capabilities/sandbox/dist/index.js
|
|
5
5
|
var PAREL_SANDBOX_CAPABILITY = "parel.sandbox";
|
|
6
|
+
function renderCommandText(result) {
|
|
7
|
+
if (result.exitCode === 0) return result.stdout;
|
|
8
|
+
const detail = [result.stdout, result.stderr].filter(Boolean).join("\n");
|
|
9
|
+
return `Exit code: ${result.exitCode}${detail ? `
|
|
10
|
+
${detail}` : ""}`;
|
|
11
|
+
}
|
|
6
12
|
var PROCESS_VIEW_STORE_PREFIX = "sandbox_process:";
|
|
7
13
|
var PORT_VIEW_STORE_PREFIX = "sandbox_port:";
|
|
8
14
|
function viewShellQuote(value) {
|
|
@@ -53,13 +59,7 @@ function createSandboxCapabilityViews(capability, store) {
|
|
|
53
59
|
};
|
|
54
60
|
const exec = {
|
|
55
61
|
async run(command) {
|
|
56
|
-
|
|
57
|
-
if (result.exitCode !== 0) {
|
|
58
|
-
const detail = [result.stdout, result.stderr].filter(Boolean).join("\n");
|
|
59
|
-
return `Exit code: ${result.exitCode}${detail ? `
|
|
60
|
-
${detail}` : ""}`;
|
|
61
|
-
}
|
|
62
|
-
return result.stdout;
|
|
62
|
+
return renderCommandText(await shell(command));
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
const processKey = (id) => `${PROCESS_VIEW_STORE_PREFIX}${id}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parel/sandbox-vercel",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "PAREL sandbox capability provider plugin for Vercel Sandbox.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@vercel/sandbox": "^2.1.1",
|
|
30
|
-
"@parel/capability-sandbox": "0.
|
|
31
|
-
"@parel/plugin-sdk": "0.
|
|
30
|
+
"@parel/capability-sandbox": "0.4.0",
|
|
31
|
+
"@parel/plugin-sdk": "0.14.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^25.9.1",
|