@corva/create-app 0.17.0-1 → 0.18.0-1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [0.18.0-1](https://github.com/corva-ai/create-corva-app/compare/v0.18.0-0...v0.18.0-1) (2021-12-20)
6
+
7
+
8
+ ### Features
9
+
10
+ * **CQA-445:** DC local development test to CI config ([6a63221](https://github.com/corva-ai/create-corva-app/commit/6a6322182d02dbe56f8f50d3e406e04890c4a6fd))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **dc-2707:** check file existence before zipping it ([064add5](https://github.com/corva-ai/create-corva-app/commit/064add5b86dfb32073eb9f7b4d16f7d4f71d32c1))
16
+
17
+ ## [0.17.0-2](https://github.com/corva-ai/create-corva-app/compare/v0.17.0-0...v0.17.0-2) (2021-12-07)
18
+
19
+
20
+ ### Features
21
+
22
+ * add scheduler type option ([e2d3d3d](https://github.com/corva-ai/create-corva-app/commit/e2d3d3dcc7154d841b3da342a36a7edfbc8488e4))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * diff app types, runtimes and templates ([7c52817](https://github.com/corva-ai/create-corva-app/commit/7c528173535b9a915372ec469df8043b3830e387))
28
+
5
29
  ## [0.17.0-1](https://github.com/corva-ai/create-corva-app/compare/v0.17.0-0...v0.17.0-1) (2021-12-03)
6
30
 
7
31
 
@@ -95,6 +95,7 @@ const getManifestMandatoryKeys = (opts) => {
95
95
 
96
96
  if (appType === APP_TYPES.SCHEDULER) {
97
97
  keys.push('schedulerType');
98
+ keys.push('cronString');
98
99
  }
99
100
  }
100
101
 
@@ -120,7 +121,7 @@ const manifestOptions = (projectName) => [
120
121
  type: 'rawlist',
121
122
  name: 'schedulerType',
122
123
  message: 'Choose the scheduler type',
123
- default: SCHEDULER_TYPE_NATURAL_TIME.name,
124
+ default: SCHEDULER_TYPE_NATURAL_TIME.value,
124
125
  choices: [SCHEDULER_TYPE_NATURAL_TIME, SCHEDULER_TYPE_DATA_TIME, SCHEDULER_TYPE_DEPTH],
125
126
  when: (answers) => answers.appType === APP_TYPES.SCHEDULER,
126
127
  },
package/index.js CHANGED
@@ -88,15 +88,15 @@ async function initialChecks() {
88
88
  projectName = name;
89
89
  })
90
90
  .option('-z, --zip <type>', 'zip app source')
91
- .option('-t, --useTypescript', 'use typescript or javascript', false)
92
91
  .addOption(
93
- new commander.Option(`-p, --packageManager <value>`, 'package manager to use')
92
+ new commander.Option(`-p, --packageManager [string]`, 'package manager to use')
94
93
  .default(YARN_EXECUTABLE)
95
94
  .choices(['npm', YARN_EXECUTABLE])
96
95
  );
97
96
 
98
97
  manifestConstants.manifestOptions(projectName).forEach((value) => {
99
- const option = new commander.Option(`--${value.name} [value]`, value.message);
98
+ const type = typeof value.default;
99
+ const option = new commander.Option(`--${value.name} [${type !== 'undefined' && type || 'string'}]`, value.message);
100
100
 
101
101
  if (value.choices) {
102
102
  if (typeof value.choices === 'function') {
@@ -108,6 +108,10 @@ async function initialChecks() {
108
108
  }
109
109
  }
110
110
 
111
+ if (type === 'number') {
112
+ option.argParser(Number)
113
+ }
114
+
111
115
  program.addOption(option);
112
116
  });
113
117
 
@@ -117,10 +121,6 @@ async function initialChecks() {
117
121
 
118
122
  const opts = program.opts();
119
123
 
120
- if (opts.schedulerType) {
121
- opts.schedulerType = Number(opts.schedulerType);
122
- }
123
-
124
124
  packageManager = opts.packageManager || packageManager;
125
125
  useTypescript = opts.useTypescript || useTypescript;
126
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/create-app",
3
- "version": "0.17.0-1",
3
+ "version": "0.18.0-1",
4
4
  "private": false,
5
5
  "description": "Create app to use it in CORVA.AI",
6
6
  "keywords": [
@@ -36,9 +36,7 @@ async function compressAppToZip(useYarn) {
36
36
  archive.pipe(output);
37
37
 
38
38
  output.on('close', function () {
39
- console.log(archive.pointer() + ' total bytes');
40
-
41
- console.log('archiver has been finalized and the output file descriptor has closed.');
39
+ console.log(`Created ${zipPath.replace(dirname + '/', '')}, ${archive.pointer()} bytes written\n`);
42
40
 
43
41
  // clean up temp package.json file
44
42
  try {
@@ -90,7 +88,16 @@ async function compressAppToZip(useYarn) {
90
88
  'config-overrides.js',
91
89
  'tsconfig.json',
92
90
  useYarn ? 'yarn.lock' : 'package-lock.json',
93
- ].forEach((name) => archive.file(path.resolve(dirname, name), { name }));
91
+ ].forEach((name) => {
92
+ const file = path.resolve(dirname, name);
93
+
94
+ // not all app templates have the tsconfig, archive will raise an error with missing files, have to filter-out that
95
+ if (!fs.existsSync(file)) {
96
+ return;
97
+ }
98
+
99
+ archive.file(file, { name })
100
+ });
94
101
 
95
102
  archive.directory(path.resolve(dirname, 'src'), 'src');
96
103