@emarketeer/ts-microservice-commons 7.0.4 → 7.0.5

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.
@@ -3041,13 +3041,15 @@ var cleanup = function () {
3041
3041
  fs.unlinkSync('./generated.serverless.json');
3042
3042
  }
3043
3043
  };
3044
+ var escapeShellArg = function (arg) {
3045
+ return "'" + arg.replace(/'/g, "'\\''") + "'";
3046
+ };
3044
3047
  var runCommand = function (command, additionalArgs) {
3045
3048
  if (additionalArgs === void 0) { additionalArgs = []; }
3046
- var commandParts = command.split(' ');
3047
- var program = commandParts[0];
3048
- var args = commandParts.slice(1).concat(additionalArgs);
3049
- console.log('running ', program, args.join(' '));
3050
- return crossSpawn.sync(program, args, { stdio: 'inherit' });
3049
+ var escapedArgs = additionalArgs.map(escapeShellArg).join(' ');
3050
+ var fullCommand = additionalArgs.length > 0 ? command + ' ' + escapedArgs : command;
3051
+ console.log('running ', fullCommand);
3052
+ return crossSpawn.sync(fullCommand, [], { stdio: 'inherit', shell: true });
3051
3053
  };
3052
3054
 
3053
3055
  process.on('unhandledRejection', function (err) {
@@ -3079,7 +3081,7 @@ try {
3079
3081
  result = runCommand('npx tsc --noEmit', scriptArgs);
3080
3082
  }
3081
3083
  if (script === 'jest') {
3082
- result = runCommand('npx cross-env NODE_OPTIONS=--max_old_space_size=4096 jest -w 4 --ci --forceExit --config node_modules/@emarketeer/ts-microservice-commons/dist/lib/jest.config.js', scriptArgs);
3084
+ result = runCommand('npx cross-env NODE_OPTIONS="--max_old_space_size=4096 --experimental-vm-modules" jest -w 4 --ci --forceExit --config node_modules/@emarketeer/ts-microservice-commons/dist/lib/jest.config.js', scriptArgs);
3083
3085
  }
3084
3086
  if (!supportedCommands.includes(script)) {
3085
3087
  generateServerlessConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emarketeer/ts-microservice-commons",
3
- "version": "7.0.4",
3
+ "version": "7.0.5",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "bin": {