@corva/create-app 0.17.0-1 → 0.17.0-2
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 +12 -0
- package/constants/manifest.js +2 -1
- package/index.js +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
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.17.0-2](https://github.com/corva-ai/create-corva-app/compare/v0.17.0-0...v0.17.0-2) (2021-12-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add scheduler type option ([e2d3d3d](https://github.com/corva-ai/create-corva-app/commit/e2d3d3dcc7154d841b3da342a36a7edfbc8488e4))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* diff app types, runtimes and templates ([7c52817](https://github.com/corva-ai/create-corva-app/commit/7c528173535b9a915372ec469df8043b3830e387))
|
|
16
|
+
|
|
5
17
|
## [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
18
|
|
|
7
19
|
|
package/constants/manifest.js
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
|
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
|
|