nebula-starter-kit 0.0.7 → 0.0.9
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/utils/appName.js
CHANGED
|
@@ -14,9 +14,11 @@ async function promptAppName() {
|
|
|
14
14
|
const commands = ['create', 'add', 'list'];
|
|
15
15
|
const addListCommands = ['add', 'list'];
|
|
16
16
|
const nebulaConfig = path_1.default.join(process.cwd(), 'nebula.json');
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
if (addListCommands.includes(command)) {
|
|
18
|
+
if (!fs_extra_1.default.existsSync(nebulaConfig)) {
|
|
19
|
+
console.log(`❌ Not a nebula project\nUsage: Run nebula command only in specified locations\n`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
20
22
|
}
|
|
21
23
|
const config = fs_extra_1.default.readJsonSync(nebulaConfig);
|
|
22
24
|
if (!commands.includes(command)) {
|
|
@@ -276,7 +276,8 @@ const generateServerlessFiles = async (selectedServices, ROOT, OUTPUT, appNamePl
|
|
|
276
276
|
const serviceOutput = path.join(OUTPUT, 'services', service);
|
|
277
277
|
await fs.ensureDir(serviceOutput);
|
|
278
278
|
// copy base nest template
|
|
279
|
-
|
|
279
|
+
console.log('copy base service', path.resolve(__dirname, '../../templates/service'));
|
|
280
|
+
fs.copySync(path.resolve(__dirname, '../../templates/service'), serviceOutput);
|
|
280
281
|
// update service names
|
|
281
282
|
await (0, replaceServiceNames_1.replaceServiceNames)(serviceOutput, service, appNamePlaceHolder);
|
|
282
283
|
console.log(`✅ Service ${service} created\n`);
|