isolated-function 0.1.29 → 0.1.31
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/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "isolated-function",
|
|
3
3
|
"description": "Runs untrusted code in a Node.js v8 sandbox.",
|
|
4
4
|
"homepage": "https://github.com/Kikobeats/isolated-function",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.31",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.js"
|
|
@@ -7,7 +7,9 @@ const path = require('path')
|
|
|
7
7
|
|
|
8
8
|
const install = (() => {
|
|
9
9
|
try {
|
|
10
|
-
execSync('which pnpm')
|
|
10
|
+
execSync('which pnpm', { stdio: ['pipe', 'pipe', 'ignore'] })
|
|
11
|
+
.toString()
|
|
12
|
+
.trim()
|
|
11
13
|
return 'pnpm install --no-lockfile --silent'
|
|
12
14
|
} catch {
|
|
13
15
|
return 'npm install --no-package-lock --silent'
|
package/src/template/index.js
CHANGED
|
@@ -5,7 +5,8 @@ const SERIALIZE_ERROR = require('./serialize-error')
|
|
|
5
5
|
module.exports = snippet => `
|
|
6
6
|
const args = JSON.parse(process.argv[2])
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/* https://github.com/Kikobeats/null-prototype-object */
|
|
9
|
+
const logging = new (/* @__PURE__ */ (() => { let e = function(){}; return e.prototype = Object.create(null), Object.freeze(e.prototype), e })());
|
|
9
10
|
|
|
10
11
|
for (const method of ['log', 'info', 'debug', 'warn', 'error']) {
|
|
11
12
|
console[method] = function (...args) {
|