@corva/create-app 0.11.0-0 → 0.12.0-0
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 +7 -0
- package/constants/manifest.js +12 -7
- package/helpers/manifest.js +12 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.12.0-0](https://github.com/corva-ai/create-corva-app/compare/v0.11.0-0...v0.12.0-0) (2021-09-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **DC-2132:** add scheduler type to manifest template ([#112](https://corvaqa.atlassian.net/browse/112)) ([4955186](https://github.com/corva-ai/create-corva-app/commit/4955186a4d2e5ee8c0d5a3e44ecd54752d561de3))
|
|
11
|
+
|
|
5
12
|
## [0.11.0-0](https://github.com/corva-ai/create-corva-app/compare/v0.10.0-0...v0.11.0-0) (2021-08-31)
|
|
6
13
|
|
|
7
14
|
## [0.10.0-0](https://github.com/corva-ai/create-corva-app/compare/v0.9.0-0...v0.10.0-0) (2021-08-18)
|
package/constants/manifest.js
CHANGED
|
@@ -68,10 +68,14 @@ const defaultDataAppPythonManifest = {
|
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
const defaultTimeSchedulerSettings = {
|
|
72
|
+
scheduler_type: "data_time",
|
|
73
|
+
cron_string: "*/5 * * * *",
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const defaultDepthSchedulerSettings = {
|
|
77
|
+
scheduler_type: "data_depth",
|
|
78
|
+
depth_milestone: 1,
|
|
75
79
|
};
|
|
76
80
|
|
|
77
81
|
const MANIFEST_MANDATORY_KEYS = [
|
|
@@ -86,7 +90,6 @@ const MANIFEST_MANDATORY_KEYS = [
|
|
|
86
90
|
const manifestOptions = {
|
|
87
91
|
developerName: "O&G Company",
|
|
88
92
|
developerIdentifier: "oandgc",
|
|
89
|
-
|
|
90
93
|
appType: ["ui", "scheduler", "stream", "task"],
|
|
91
94
|
appKey: "app.key-goes-here",
|
|
92
95
|
appName: "Name of My App",
|
|
@@ -96,7 +99,8 @@ const manifestOptions = {
|
|
|
96
99
|
category: "",
|
|
97
100
|
website: "https://www.oandgexample.com/my-app/",
|
|
98
101
|
segments: ["drilling", "completion"],
|
|
99
|
-
runtime: ["ui", "python3.8", "nodejs12.x"]
|
|
102
|
+
runtime: ["ui", "python3.8", "nodejs12.x"],
|
|
103
|
+
schedulerType: ["data_time", "data_depth", "natural_time"]
|
|
100
104
|
};
|
|
101
105
|
|
|
102
106
|
module.exports = {
|
|
@@ -104,7 +108,8 @@ module.exports = {
|
|
|
104
108
|
defaultUIAppManifest,
|
|
105
109
|
defaultDataAppNodeManifest,
|
|
106
110
|
defaultDataAppPythonManifest,
|
|
107
|
-
|
|
111
|
+
defaultTimeSchedulerSettings,
|
|
112
|
+
defaultDepthSchedulerSettings,
|
|
108
113
|
manifestOptions,
|
|
109
114
|
MANIFEST_MANDATORY_KEYS,
|
|
110
115
|
};
|
package/helpers/manifest.js
CHANGED
|
@@ -30,7 +30,7 @@ function fillManifest(answers) {
|
|
|
30
30
|
settings: {
|
|
31
31
|
...defaultManifestProperties.settings,
|
|
32
32
|
runtime: answers.runtime,
|
|
33
|
-
...defaultAppSettings({ type: answers.appType }),
|
|
33
|
+
...defaultAppSettings({ type: answers.appType, schedulerType: answers.schedulerType }),
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -49,9 +49,18 @@ function _defaultManifestProperties({ type, runtime }) {
|
|
|
49
49
|
return manifestConstants.defaultDataAppNodeManifest;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
function defaultAppSettings({ type }) {
|
|
52
|
+
function defaultAppSettings({ type, schedulerType }) {
|
|
53
53
|
if (type === 'scheduler') {
|
|
54
|
-
|
|
54
|
+
const schedulerAppSettings = schedulerType == 'data_depth'
|
|
55
|
+
? manifestConstants.defaultDepthSchedulerSettings
|
|
56
|
+
: manifestConstants.defaultTimeSchedulerSettings;
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
app: {
|
|
60
|
+
...schedulerAppSettings,
|
|
61
|
+
scheduler_type: schedulerType || 'data_time',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
55
64
|
}
|
|
56
65
|
|
|
57
66
|
return {};
|