nebula-starter-kit 0.0.1 → 0.0.3
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/dist/run.js +6 -6
- package/package.json +1 -1
- package/templates/package.json +1 -1
package/dist/run.js
CHANGED
|
@@ -38,7 +38,7 @@ async function run() {
|
|
|
38
38
|
},
|
|
39
39
|
]);
|
|
40
40
|
let selectedServices = [];
|
|
41
|
-
const modulesDir = path_1.default.join(ROOT, '
|
|
41
|
+
const modulesDir = path_1.default.join(ROOT, './../templates/modules');
|
|
42
42
|
if (!fs_extra_1.default.existsSync(modulesDir)) {
|
|
43
43
|
console.log(`❌ Modules directory not found\n`);
|
|
44
44
|
throw new Error('Modules directory not found');
|
|
@@ -50,7 +50,7 @@ async function run() {
|
|
|
50
50
|
type: 'checkbox',
|
|
51
51
|
name: 'services',
|
|
52
52
|
message: 'Select services',
|
|
53
|
-
choices: fs_extra_1.default.readdirSync(path_1.default.join(ROOT, '
|
|
53
|
+
choices: fs_extra_1.default.readdirSync(path_1.default.join(ROOT, './../templates/modules')),
|
|
54
54
|
},
|
|
55
55
|
]);
|
|
56
56
|
selectedServices = services;
|
|
@@ -73,11 +73,11 @@ async function run() {
|
|
|
73
73
|
// Move core module into app
|
|
74
74
|
const coreDir = path_1.default.join(OUTPUT, 'core');
|
|
75
75
|
await fs_extra_1.default.ensureDir(coreDir);
|
|
76
|
-
fs_extra_1.default.copySync(path_1.default.
|
|
76
|
+
fs_extra_1.default.copySync(path_1.default.resolve(__dirname, '../templates/core'), coreDir);
|
|
77
77
|
// Move UI module into app
|
|
78
78
|
const uiDir = path_1.default.join(OUTPUT, 'ui');
|
|
79
79
|
await fs_extra_1.default.ensureDir(uiDir);
|
|
80
|
-
fs_extra_1.default.copySync(path_1.default.
|
|
80
|
+
fs_extra_1.default.copySync(path_1.default.resolve(__dirname, '../templates/ui'), uiDir);
|
|
81
81
|
// Generate nebula json
|
|
82
82
|
(0, generateFiles_1.generateNebulaJson)(appName, selectedServices, OUTPUT);
|
|
83
83
|
(0, generateSchemas_1.generateSchemas)(OUTPUT);
|
|
@@ -90,9 +90,9 @@ async function run() {
|
|
|
90
90
|
// Generate serverless.yml for infra/cognito
|
|
91
91
|
await (0, generateFiles_1.generateInfraCognitoFile)(appName, OUTPUT);
|
|
92
92
|
// Move package.json into app
|
|
93
|
-
await fs_extra_1.default.copy(path_1.default.
|
|
93
|
+
await fs_extra_1.default.copy(path_1.default.resolve(__dirname, '../templates/package.json'), path_1.default.join(OUTPUT, 'package.json'));
|
|
94
94
|
// Move tsconfig into app
|
|
95
|
-
await fs_extra_1.default.copy(path_1.default.
|
|
95
|
+
await fs_extra_1.default.copy(path_1.default.resolve(__dirname, '../templates/tsconfig.json'), path_1.default.join(OUTPUT, 'tsconfig.json'));
|
|
96
96
|
// Handle content for services
|
|
97
97
|
await (0, generateFiles_1.generateServerlessFiles)(selectedServices, ROOT, OUTPUT, appNamePlaceHolder);
|
|
98
98
|
// Create env file for Root environment variables
|
package/package.json
CHANGED