From 291803c31f829fe0d32bb3207bc11def95a7408c Mon Sep 17 00:00:00 2001 From: Nevena Bojovic Date: Tue, 1 Mar 2022 20:05:50 +0100 Subject: Urađena test aplikacija. Povezan front i back. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@npmcli/run-script/lib/make-spawn-args.js | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sandbox/testAppNevena/Front/node_modules/@npmcli/run-script/lib/make-spawn-args.js (limited to 'sandbox/testAppNevena/Front/node_modules/@npmcli/run-script/lib/make-spawn-args.js') diff --git a/sandbox/testAppNevena/Front/node_modules/@npmcli/run-script/lib/make-spawn-args.js b/sandbox/testAppNevena/Front/node_modules/@npmcli/run-script/lib/make-spawn-args.js new file mode 100644 index 00000000..8f299954 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@npmcli/run-script/lib/make-spawn-args.js @@ -0,0 +1,40 @@ +/* eslint camelcase: "off" */ +const isWindows = require('./is-windows.js') +const setPATH = require('./set-path.js') +const {resolve} = require('path') +const npm_config_node_gyp = require.resolve('node-gyp/bin/node-gyp.js') + +const makeSpawnArgs = options => { + const { + event, + path, + scriptShell = isWindows ? process.env.ComSpec || 'cmd' : 'sh', + env = {}, + stdio, + cmd, + stdioString = false, + } = options + + const isCmd = /(?:^|\\)cmd(?:\.exe)?$/i.test(scriptShell) + const args = isCmd ? ['/d', '/s', '/c', cmd] : ['-c', cmd] + + const spawnOpts = { + env: setPATH(path, { + // we need to at least save the PATH environment var + ...process.env, + ...env, + npm_package_json: resolve(path, 'package.json'), + npm_lifecycle_event: event, + npm_lifecycle_script: cmd, + npm_config_node_gyp, + }), + stdioString, + stdio, + cwd: path, + ...(isCmd ? { windowsVerbatimArguments: true } : {}), + } + + return [scriptShell, args, spawnOpts] +} + +module.exports = makeSpawnArgs -- cgit v1.2.3