@corva/create-app 0.20.0-0 → 0.20.0-rc.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.20.0-rc.1](https://github.com/corva-ai/create-corva-app/compare/v0.20.0-1...v0.20.0-rc.1) (2022-02-01)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **DC-2798:** add .env file ([42eb6fb](https://github.com/corva-ai/create-corva-app/commit/42eb6fb256c6b5238b449fa0d81bafa930dbbd91))
11
+ * **dc-2955:** get back -t option ([074d8ee](https://github.com/corva-ai/create-corva-app/commit/074d8ee8a629f211cd8991d71faf7ccbbeb1051e))
12
+
13
+ ## [0.20.0-rc.0](https://github.com/corva-ai/create-corva-app/compare/v0.20.0-2...v0.20.0-rc.0) (2022-01-18)
14
+
15
+ ## [0.20.0-2](https://github.com/corva-ai/create-corva-app/compare/v0.20.0-1...v0.20.0-2) (2022-01-17)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **DC-2798:** add .env file ([42eb6fb](https://github.com/corva-ai/create-corva-app/commit/42eb6fb256c6b5238b449fa0d81bafa930dbbd91))
21
+
22
+ ## [0.20.0-1](https://github.com/corva-ai/create-corva-app/compare/v0.20.0-0...v0.20.0-1) (2022-01-05)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * allow to specify depth_milestone ([833d570](https://github.com/corva-ai/create-corva-app/commit/833d570ef11bc73605524d479db43e293bf2e31f))
28
+
5
29
  ## [0.20.0-0](https://github.com/corva-ai/create-corva-app/compare/v0.19.0-0...v0.20.0-0) (2022-01-04)
6
30
 
7
31
  ## [0.19.0-0](https://github.com/corva-ai/create-corva-app/compare/v0.18.0-1...v0.19.0-0) (2021-12-21)
@@ -86,7 +86,7 @@ const getManifestMandatoryKeys = (opts) => {
86
86
  return acc;
87
87
  }, []);
88
88
 
89
- const { appType } = opts;
89
+ const { appType, schedulerType } = opts;
90
90
 
91
91
  if (appType) {
92
92
  if (appType !== APP_TYPES.UI) {
@@ -94,8 +94,13 @@ const getManifestMandatoryKeys = (opts) => {
94
94
  }
95
95
 
96
96
  if (appType === APP_TYPES.SCHEDULER) {
97
- keys.push('schedulerType');
98
- keys.push('cronString');
97
+ if (!schedulerType) {
98
+ keys.push('schedulerType');
99
+ } else if (schedulerType === SCHEDULER_TYPE_DEPTH.value) {
100
+ keys.push('depthMilestone');
101
+ } else {
102
+ keys.push('cronString');
103
+ }
99
104
  }
100
105
  }
101
106
 
@@ -129,7 +134,13 @@ const manifestOptions = (projectName) => [
129
134
  name: 'cronString',
130
135
  message: 'Provide CRON string for the scheduler',
131
136
  default: '*/5 * * * *',
132
- when: (answers) => answers.appType === APP_TYPES.SCHEDULER,
137
+ when: (answers) => answers.schedulerType && answers.schedulerType !== SCHEDULER_TYPE_DEPTH.value,
138
+ },
139
+ {
140
+ name: 'depthMilestone',
141
+ message: 'Provide depth milestone for the scheduler',
142
+ default: 1,
143
+ when: (answers) => answers.schedulerType === SCHEDULER_TYPE_DEPTH.value,
133
144
  },
134
145
  {
135
146
  name: 'appKey',
@@ -191,6 +202,7 @@ const manifestOptions = (projectName) => [
191
202
  {
192
203
  type: 'confirm',
193
204
  name: 'useTypescript',
205
+ alias: 't',
194
206
  message: 'Would you like to use TypesScript?',
195
207
  default: false,
196
208
  when: (answers) =>
@@ -57,7 +57,7 @@ function _defaultManifestProperties({ type, runtime }) {
57
57
  return manifestConstants.defaultDataAppNodeManifest;
58
58
  }
59
59
 
60
- function defaultAppSettings({ type, schedulerType, cronString }) {
60
+ function defaultAppSettings({ type, schedulerType, cronString, depthMilestone }) {
61
61
  if (!schedulerType) {
62
62
  return {};
63
63
  }
@@ -72,6 +72,7 @@ function defaultAppSettings({ type, schedulerType, cronString }) {
72
72
  ...schedulerAppSettings,
73
73
  scheduler_type: schedulerType,
74
74
  cron_string: cronString,
75
+ depth_milestone: depthMilestone
75
76
  },
76
77
  };
77
78
  }
package/index.js CHANGED
@@ -96,7 +96,7 @@ async function initialChecks() {
96
96
 
97
97
  manifestConstants.manifestOptions(projectName).forEach((value) => {
98
98
  const type = typeof value.default;
99
- const option = new commander.Option(`--${value.name} [${type !== 'undefined' && type || 'string'}]`, value.message);
99
+ const option = new commander.Option(`${value.alias ? `-${value.alias}, ` : ''}--${value.name} [${type !== 'undefined' && type || 'string'}]`, value.message);
100
100
 
101
101
  if (value.choices) {
102
102
  if (typeof value.choices === 'function') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/create-app",
3
- "version": "0.20.0-0",
3
+ "version": "0.20.0-rc.1",
4
4
  "private": false,
5
5
  "description": "Create app to use it in CORVA.AI",
6
6
  "keywords": [
@@ -32,7 +32,7 @@
32
32
  "release": "git add -A && standard-version -a"
33
33
  },
34
34
  "dependencies": {
35
- "archiver": "^5.0.0",
35
+ "archiver": "^5.3.0",
36
36
  "chalk": "4.1.0",
37
37
  "commander": "^8.2.0",
38
38
  "conventional-changelog-cli": "^2.1.0",
@@ -0,0 +1,2 @@
1
+ HOST=localhost
2
+ PORT=8080
@@ -0,0 +1,6 @@
1
+ # One of: localhost | 127.0.0.1 | app.local.corva.ai
2
+ # For app.local.corva.ai you need to add: 127.0.0.1 app.local.corva.ai to /etc/hosts
3
+ HOST=localhost
4
+
5
+ # Single sign-on works ONLY with PORTS 8080, 9000 or 80.
6
+ PORT=8080
@@ -0,0 +1,2 @@
1
+ HOST=localhost
2
+ PORT=8080
@@ -0,0 +1,6 @@
1
+ # One of: localhost | 127.0.0.1 | app.local.corva.ai
2
+ # For app.local.corva.ai you need to add: 127.0.0.1 app.local.corva.ai to /etc/hosts
3
+ HOST=localhost
4
+
5
+ # Single sign-on works ONLY with PORTS 8080, 9000 or 80.
6
+ PORT=8080