@k8slens/extensions 5.3.1-git.589472c2b5.0 → 5.3.1-git.5ca194b401.0

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.
@@ -33368,7 +33368,7 @@ eval("/* WEBPACK VAR INJECTION */(function(module) {if (__webpack_require__.c[__
33368
33368
  /*! no static exports found */
33369
33369
  /***/ (function(module, exports, __webpack_require__) {
33370
33370
 
33371
- eval("/* WEBPACK VAR INJECTION */(function(__dirname) {var common = __webpack_require__(/*! ./common */ \"./node_modules/shelljs/src/common.js\");\nvar _tempDir = __webpack_require__(/*! ./tempdir */ \"./node_modules/shelljs/src/tempdir.js\").tempDir;\nvar _pwd = __webpack_require__(/*! ./pwd */ \"./node_modules/shelljs/src/pwd.js\");\nvar path = __webpack_require__(/*! path */ \"path\");\nvar fs = __webpack_require__(/*! fs */ \"fs\");\nvar child = __webpack_require__(/*! child_process */ \"child_process\");\n\nvar DEFAULT_MAXBUFFER_SIZE = 20 * 1024 * 1024;\nvar DEFAULT_ERROR_CODE = 1;\n\ncommon.register('exec', _exec, {\n unix: false,\n canReceivePipe: true,\n wrapOutput: false,\n});\n\n// We use this function to run `exec` synchronously while also providing realtime\n// output.\nfunction execSync(cmd, opts, pipe) {\n if (!common.config.execPath) {\n common.error('Unable to find a path to the node binary. Please manually set config.execPath');\n }\n\n var tempDir = _tempDir();\n var paramsFile = path.resolve(tempDir + '/' + common.randomFileName());\n var stderrFile = path.resolve(tempDir + '/' + common.randomFileName());\n var stdoutFile = path.resolve(tempDir + '/' + common.randomFileName());\n\n opts = common.extend({\n silent: common.config.silent,\n cwd: _pwd().toString(),\n env: process.env,\n maxBuffer: DEFAULT_MAXBUFFER_SIZE,\n encoding: 'utf8',\n }, opts);\n\n if (fs.existsSync(paramsFile)) common.unlinkSync(paramsFile);\n if (fs.existsSync(stderrFile)) common.unlinkSync(stderrFile);\n if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile);\n\n opts.cwd = path.resolve(opts.cwd);\n\n var paramsToSerialize = {\n command: cmd,\n execOptions: opts,\n pipe: pipe,\n stdoutFile: stdoutFile,\n stderrFile: stderrFile,\n };\n\n fs.writeFileSync(paramsFile, JSON.stringify(paramsToSerialize), 'utf8');\n\n var execArgs = [\n path.join(__dirname, 'exec-child.js'),\n paramsFile,\n ];\n\n /* istanbul ignore else */\n if (opts.silent) {\n opts.stdio = 'ignore';\n } else {\n opts.stdio = [0, 1, 2];\n }\n\n var code = 0;\n\n // Welcome to the future\n try {\n // Bad things if we pass in a `shell` option to child_process.execFileSync,\n // so we need to explicitly remove it here.\n delete opts.shell;\n\n child.execFileSync(common.config.execPath, execArgs, opts);\n } catch (e) {\n // Commands with non-zero exit code raise an exception.\n code = e.status || DEFAULT_ERROR_CODE;\n }\n\n // fs.readFileSync uses buffer encoding by default, so call\n // it without the encoding option if the encoding is 'buffer'.\n // Also, if the exec timeout is too short for node to start up,\n // the files will not be created, so these calls will throw.\n var stdout = '';\n var stderr = '';\n if (opts.encoding === 'buffer') {\n stdout = fs.readFileSync(stdoutFile);\n stderr = fs.readFileSync(stderrFile);\n } else {\n stdout = fs.readFileSync(stdoutFile, opts.encoding);\n stderr = fs.readFileSync(stderrFile, opts.encoding);\n }\n\n // No biggie if we can't erase the files now -- they're in a temp dir anyway\n try { common.unlinkSync(paramsFile); } catch (e) {}\n try { common.unlinkSync(stderrFile); } catch (e) {}\n try { common.unlinkSync(stdoutFile); } catch (e) {}\n\n if (code !== 0) {\n // Note: `silent` should be unconditionally true to avoid double-printing\n // the command's stderr, and to avoid printing any stderr when the user has\n // set `shell.config.silent`.\n common.error(stderr, code, { continue: true, silent: true });\n }\n var obj = common.ShellString(stdout, stderr, code);\n return obj;\n} // execSync()\n\n// Wrapper around exec() to enable echoing output to console in real time\nfunction execAsync(cmd, opts, pipe, callback) {\n opts = common.extend({\n silent: common.config.silent,\n cwd: _pwd().toString(),\n env: process.env,\n maxBuffer: DEFAULT_MAXBUFFER_SIZE,\n encoding: 'utf8',\n }, opts);\n\n var c = child.exec(cmd, opts, function (err, stdout, stderr) {\n if (callback) {\n if (!err) {\n callback(0, stdout, stderr);\n } else if (err.code === undefined) {\n // See issue #536\n /* istanbul ignore next */\n callback(1, stdout, stderr);\n } else {\n callback(err.code, stdout, stderr);\n }\n }\n });\n\n if (pipe) c.stdin.end(pipe);\n\n if (!opts.silent) {\n c.stdout.pipe(process.stdout);\n c.stderr.pipe(process.stderr);\n }\n\n return c;\n}\n\n//@\n//@ ### exec(command [, options] [, callback])\n//@\n//@ Available options:\n//@\n//@ + `async`: Asynchronous execution. If a callback is provided, it will be set to\n//@ `true`, regardless of the passed value (default: `false`).\n//@ + `silent`: Do not echo program output to console (default: `false`).\n//@ + `encoding`: Character encoding to use. Affects the values returned to stdout and stderr, and\n//@ what is written to stdout and stderr when not in silent mode (default: `'utf8'`).\n//@ + and any option available to Node.js's\n//@ [`child_process.exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)\n//@\n//@ Examples:\n//@\n//@ ```javascript\n//@ var version = exec('node --version', {silent:true}).stdout;\n//@\n//@ var child = exec('some_long_running_process', {async:true});\n//@ child.stdout.on('data', function(data) {\n//@ /* ... do something with data ... */\n//@ });\n//@\n//@ exec('some_long_running_process', function(code, stdout, stderr) {\n//@ console.log('Exit code:', code);\n//@ console.log('Program output:', stdout);\n//@ console.log('Program stderr:', stderr);\n//@ });\n//@ ```\n//@\n//@ Executes the given `command` _synchronously_, unless otherwise specified. When in synchronous\n//@ mode, this returns a `ShellString` (compatible with ShellJS v0.6.x, which returns an object\n//@ of the form `{ code:..., stdout:... , stderr:... }`). Otherwise, this returns the child process\n//@ object, and the `callback` receives the arguments `(code, stdout, stderr)`.\n//@\n//@ Not seeing the behavior you want? `exec()` runs everything through `sh`\n//@ by default (or `cmd.exe` on Windows), which differs from `bash`. If you\n//@ need bash-specific behavior, try out the `{shell: 'path/to/bash'}` option.\nfunction _exec(command, options, callback) {\n options = options || {};\n if (!command) common.error('must specify command');\n\n var pipe = common.readFromPipe();\n\n // Callback is defined instead of options.\n if (typeof options === 'function') {\n callback = options;\n options = { async: true };\n }\n\n // Callback is defined with options.\n if (typeof options === 'object' && typeof callback === 'function') {\n options.async = true;\n }\n\n options = common.extend({\n silent: common.config.silent,\n async: false,\n }, options);\n\n if (options.async) {\n return execAsync(command, options, pipe, callback);\n } else {\n return execSync(command, options, pipe);\n }\n}\nmodule.exports = _exec;\n\n/* WEBPACK VAR INJECTION */}.call(this, \"/\"))\n\n//# sourceURL=webpack:///./node_modules/shelljs/src/exec.js?");
33371
+ eval("/* WEBPACK VAR INJECTION */(function(__dirname) {var common = __webpack_require__(/*! ./common */ \"./node_modules/shelljs/src/common.js\");\nvar _tempDir = __webpack_require__(/*! ./tempdir */ \"./node_modules/shelljs/src/tempdir.js\").tempDir;\nvar _pwd = __webpack_require__(/*! ./pwd */ \"./node_modules/shelljs/src/pwd.js\");\nvar path = __webpack_require__(/*! path */ \"path\");\nvar fs = __webpack_require__(/*! fs */ \"fs\");\nvar child = __webpack_require__(/*! child_process */ \"child_process\");\n\nvar DEFAULT_MAXBUFFER_SIZE = 20 * 1024 * 1024;\nvar DEFAULT_ERROR_CODE = 1;\n\ncommon.register('exec', _exec, {\n unix: false,\n canReceivePipe: true,\n wrapOutput: false,\n});\n\n// We use this function to run `exec` synchronously while also providing realtime\n// output.\nfunction execSync(cmd, opts, pipe) {\n if (!common.config.execPath) {\n common.error('Unable to find a path to the node binary. Please manually set config.execPath');\n }\n\n var tempDir = _tempDir();\n var paramsFile = path.resolve(tempDir + '/' + common.randomFileName());\n var stderrFile = path.resolve(tempDir + '/' + common.randomFileName());\n var stdoutFile = path.resolve(tempDir + '/' + common.randomFileName());\n\n opts = common.extend({\n silent: common.config.silent,\n cwd: _pwd().toString(),\n env: process.env,\n maxBuffer: DEFAULT_MAXBUFFER_SIZE,\n encoding: 'utf8',\n }, opts);\n\n if (fs.existsSync(paramsFile)) common.unlinkSync(paramsFile);\n if (fs.existsSync(stderrFile)) common.unlinkSync(stderrFile);\n if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile);\n\n opts.cwd = path.resolve(opts.cwd);\n\n var paramsToSerialize = {\n command: cmd,\n execOptions: opts,\n pipe: pipe,\n stdoutFile: stdoutFile,\n stderrFile: stderrFile,\n };\n\n // Create the files and ensure these are locked down (for read and write) to\n // the current user. The main concerns here are:\n //\n // * If we execute a command which prints sensitive output, then\n // stdoutFile/stderrFile must not be readable by other users.\n // * paramsFile must not be readable by other users, or else they can read it\n // to figure out the path for stdoutFile/stderrFile and create these first\n // (locked down to their own access), which will crash exec() when it tries\n // to write to the files.\n function writeFileLockedDown(filePath, data) {\n fs.writeFileSync(filePath, data, {\n encoding: 'utf8',\n mode: parseInt('600', 8),\n });\n }\n writeFileLockedDown(stdoutFile, '');\n writeFileLockedDown(stderrFile, '');\n writeFileLockedDown(paramsFile, JSON.stringify(paramsToSerialize));\n\n var execArgs = [\n path.join(__dirname, 'exec-child.js'),\n paramsFile,\n ];\n\n /* istanbul ignore else */\n if (opts.silent) {\n opts.stdio = 'ignore';\n } else {\n opts.stdio = [0, 1, 2];\n }\n\n var code = 0;\n\n // Welcome to the future\n try {\n // Bad things if we pass in a `shell` option to child_process.execFileSync,\n // so we need to explicitly remove it here.\n delete opts.shell;\n\n child.execFileSync(common.config.execPath, execArgs, opts);\n } catch (e) {\n // Commands with non-zero exit code raise an exception.\n code = e.status || DEFAULT_ERROR_CODE;\n }\n\n // fs.readFileSync uses buffer encoding by default, so call\n // it without the encoding option if the encoding is 'buffer'.\n // Also, if the exec timeout is too short for node to start up,\n // the files will not be created, so these calls will throw.\n var stdout = '';\n var stderr = '';\n if (opts.encoding === 'buffer') {\n stdout = fs.readFileSync(stdoutFile);\n stderr = fs.readFileSync(stderrFile);\n } else {\n stdout = fs.readFileSync(stdoutFile, opts.encoding);\n stderr = fs.readFileSync(stderrFile, opts.encoding);\n }\n\n // No biggie if we can't erase the files now -- they're in a temp dir anyway\n // and we locked down permissions (see the note above).\n try { common.unlinkSync(paramsFile); } catch (e) {}\n try { common.unlinkSync(stderrFile); } catch (e) {}\n try { common.unlinkSync(stdoutFile); } catch (e) {}\n\n if (code !== 0) {\n // Note: `silent` should be unconditionally true to avoid double-printing\n // the command's stderr, and to avoid printing any stderr when the user has\n // set `shell.config.silent`.\n common.error(stderr, code, { continue: true, silent: true });\n }\n var obj = common.ShellString(stdout, stderr, code);\n return obj;\n} // execSync()\n\n// Wrapper around exec() to enable echoing output to console in real time\nfunction execAsync(cmd, opts, pipe, callback) {\n opts = common.extend({\n silent: common.config.silent,\n cwd: _pwd().toString(),\n env: process.env,\n maxBuffer: DEFAULT_MAXBUFFER_SIZE,\n encoding: 'utf8',\n }, opts);\n\n var c = child.exec(cmd, opts, function (err, stdout, stderr) {\n if (callback) {\n if (!err) {\n callback(0, stdout, stderr);\n } else if (err.code === undefined) {\n // See issue #536\n /* istanbul ignore next */\n callback(1, stdout, stderr);\n } else {\n callback(err.code, stdout, stderr);\n }\n }\n });\n\n if (pipe) c.stdin.end(pipe);\n\n if (!opts.silent) {\n c.stdout.pipe(process.stdout);\n c.stderr.pipe(process.stderr);\n }\n\n return c;\n}\n\n//@\n//@ ### exec(command [, options] [, callback])\n//@\n//@ Available options:\n//@\n//@ + `async`: Asynchronous execution. If a callback is provided, it will be set to\n//@ `true`, regardless of the passed value (default: `false`).\n//@ + `silent`: Do not echo program output to console (default: `false`).\n//@ + `encoding`: Character encoding to use. Affects the values returned to stdout and stderr, and\n//@ what is written to stdout and stderr when not in silent mode (default: `'utf8'`).\n//@ + and any option available to Node.js's\n//@ [`child_process.exec()`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback)\n//@\n//@ Examples:\n//@\n//@ ```javascript\n//@ var version = exec('node --version', {silent:true}).stdout;\n//@\n//@ var child = exec('some_long_running_process', {async:true});\n//@ child.stdout.on('data', function(data) {\n//@ /* ... do something with data ... */\n//@ });\n//@\n//@ exec('some_long_running_process', function(code, stdout, stderr) {\n//@ console.log('Exit code:', code);\n//@ console.log('Program output:', stdout);\n//@ console.log('Program stderr:', stderr);\n//@ });\n//@ ```\n//@\n//@ Executes the given `command` _synchronously_, unless otherwise specified. When in synchronous\n//@ mode, this returns a `ShellString` (compatible with ShellJS v0.6.x, which returns an object\n//@ of the form `{ code:..., stdout:... , stderr:... }`). Otherwise, this returns the child process\n//@ object, and the `callback` receives the arguments `(code, stdout, stderr)`.\n//@\n//@ Not seeing the behavior you want? `exec()` runs everything through `sh`\n//@ by default (or `cmd.exe` on Windows), which differs from `bash`. If you\n//@ need bash-specific behavior, try out the `{shell: 'path/to/bash'}` option.\nfunction _exec(command, options, callback) {\n options = options || {};\n if (!command) common.error('must specify command');\n\n var pipe = common.readFromPipe();\n\n // Callback is defined instead of options.\n if (typeof options === 'function') {\n callback = options;\n options = { async: true };\n }\n\n // Callback is defined with options.\n if (typeof options === 'object' && typeof callback === 'function') {\n options.async = true;\n }\n\n options = common.extend({\n silent: common.config.silent,\n async: false,\n }, options);\n\n if (options.async) {\n return execAsync(command, options, pipe, callback);\n } else {\n return execSync(command, options, pipe);\n }\n}\nmodule.exports = _exec;\n\n/* WEBPACK VAR INJECTION */}.call(this, \"/\"))\n\n//# sourceURL=webpack:///./node_modules/shelljs/src/exec.js?");
33372
33372
 
33373
33373
  /***/ }),
33374
33374
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@k8slens/extensions",
3
3
  "productName": "OpenLens extensions",
4
4
  "description": "OpenLens - Open Source Kubernetes IDE: extensions",
5
- "version": "5.3.1-git.589472c2b5.0",
5
+ "version": "5.3.1-git.5ca194b401.0",
6
6
  "copyright": "© 2021 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",