@corva/create-app 0.28.0-1 → 0.28.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.
@@ -69,14 +69,6 @@ const defaultDataAppPythonManifest = {
69
69
  },
70
70
  };
71
71
 
72
- const defaultTimeSchedulerSettings = {
73
- cron_string: '*/5 * * * *',
74
- };
75
-
76
- const defaultDepthSchedulerSettings = {
77
- depth_milestone: 1,
78
- };
79
-
80
72
  const getManifestMandatoryKeys = (opts) => {
81
73
  const keys = manifestOptions(opts.projectName).reduce((acc, option) => {
82
74
  if (option.required) {
@@ -219,8 +211,6 @@ module.exports = {
219
211
  defaultUIAppManifest,
220
212
  defaultDataAppNodeManifest,
221
213
  defaultDataAppPythonManifest,
222
- defaultTimeSchedulerSettings,
223
- defaultDepthSchedulerSettings,
224
214
  manifestOptions,
225
215
  getManifestMandatoryKeys,
226
216
  SCHEDULER_TYPE_NATURAL_TIME,
@@ -34,7 +34,7 @@ function fillManifest(answers) {
34
34
  settings: {
35
35
  ...defaultManifestProperties.settings,
36
36
  runtime,
37
- ...defaultAppSettings({
37
+ app: defaultAppSettings({
38
38
  type: answers.appType,
39
39
  schedulerType: answers.schedulerType,
40
40
  cronString: answers.cronString,
@@ -63,19 +63,17 @@ function defaultAppSettings({ type, schedulerType, cronString, depthMilestone })
63
63
  return {};
64
64
  }
65
65
 
66
- const schedulerAppSettings =
67
- schedulerType === manifestConstants.SCHEDULER_TYPE_DEPTH.value
68
- ? manifestConstants.defaultDepthSchedulerSettings
69
- : manifestConstants.defaultTimeSchedulerSettings;
66
+ if (schedulerType === manifestConstants.SCHEDULER_TYPE_DEPTH.value) {
67
+ return {
68
+ scheduler_type: schedulerType,
69
+ depth_milestone: depthMilestone || 1
70
+ }
71
+ }
70
72
 
71
73
  return {
72
- app: {
73
- ...schedulerAppSettings,
74
- scheduler_type: schedulerType,
75
- cron_string: cronString,
76
- depth_milestone: depthMilestone,
77
- },
78
- };
74
+ scheduler_type: schedulerType,
75
+ cron_string: cronString || '*/5 * * * *',
76
+ }
79
77
  }
80
78
 
81
79
  module.exports = {
package/lib/index.js CHANGED
@@ -314,7 +314,7 @@ async function createApp(opts) {
314
314
  console.log(`${key} : ${values[key]}`);
315
315
  });
316
316
 
317
- const manifest = manifestHelpers.fillManifest(values);
317
+ const manifest = manifestHelpers.fillManifest(opts);
318
318
 
319
319
  await initPackage(manifest);
320
320
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/create-app",
3
- "version": "0.28.0-1",
3
+ "version": "0.28.0-2",
4
4
  "private": false,
5
5
  "description": "Create app to use it in CORVA.AI",
6
6
  "keywords": [