@corva/create-app 0.34.0-4 → 0.34.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.
@@ -158,3 +158,4 @@ cython_debug/
158
158
  # and can be added to the global gitignore or merged into this file. For a more nuclear
159
159
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
160
  #.idea/
161
+ venv
package/lib/index.js CHANGED
@@ -34,6 +34,7 @@ const { ZIP_FLOW } = require('./flows/zip');
34
34
  const { bumpVersionOptionDeprecated, bumpVersionOption } = require('./bump-version.option');
35
35
  const { Manifest } = require('./flows/lib/manifest');
36
36
  const { resolveAppRuntime } = require('./helpers/resolve-app-runtime');
37
+ const { existsSync } = require('fs');
37
38
 
38
39
  const writejsonOptions = {
39
40
  spaces: 2,
@@ -54,7 +55,7 @@ function checkNodeVersion() {
54
55
  console.log(
55
56
  chalk.red(
56
57
  `\nYou are using Node ${process.version}.\n\n` +
57
- `Please update to Node 16 or higher for a better, fully supported experience.\n`
58
+ `Please update to Node 16 or higher for a better, fully supported experience.\n`
58
59
  )
59
60
  );
60
61
  // Fall back to latest supported react-scripts on Node 4
@@ -84,7 +85,7 @@ function checkOptions(opts) {
84
85
  const printDeprecationNotice = (param) =>
85
86
  console.warn(
86
87
  chalk.bgYellowBright`DEPRECATED OPTION: ${param}` +
87
- ` Use ${chalk.cyan(`create-corva-app ${param} .`)} instead`
88
+ ` Use ${chalk.cyan(`create-corva-app ${param} .`)} instead`
88
89
  );
89
90
 
90
91
  async function initialChecks() {
@@ -106,8 +107,7 @@ async function initialChecks() {
106
107
  manifestConstants.manifestOptions().forEach((value) => {
107
108
  const type = typeof value.default;
108
109
  const option = new Option(
109
- `${value.alias ? `-${value.alias}, ` : ''}--${value.name} [${
110
- (type !== 'undefined' && type) || 'string'
110
+ `${value.alias ? `-${value.alias}, ` : ''}--${value.name} [${(type !== 'undefined' && type) || 'string'
111
111
  }]`,
112
112
  value.message
113
113
  );
@@ -457,8 +457,8 @@ async function installApp(root, manifest, runtime) {
457
457
  const opts = { stdio: ['inherit', 'inherit', 'pipe'], cwd: root }
458
458
 
459
459
  console.log(chalk.yellow(`Installing template dependencies using ${runtime.packageManager}...`));
460
- const proc = manifest.isJs() ?
461
- spawn.sync(`\\. ~/.nvm/nvm.sh && nvm use && ${command} ${args.join(' ')}`, { shell: true, ...opts }) :
460
+ const proc = manifest.isJs() && existsSync(`${os.homedir()}/.nvm/nvm.sh`) ?
461
+ spawn.sync(`\\. ${os.homedir()}/.nvm/nvm.sh && nvm i && ${command} ${args.join(' ')}`, { shell: true, ...opts }) :
462
462
  spawn.sync(command, args, opts);
463
463
 
464
464
  if (proc.stderr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/create-app",
3
- "version": "0.34.0-4",
3
+ "version": "0.34.0-5",
4
4
  "private": false,
5
5
  "description": "Create app to use it in CORVA.AI",
6
6
  "keywords": [