nebula-starter-kit 0.0.8 → 0.0.10

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.
@@ -13,12 +13,15 @@ async function promptAppName() {
13
13
  const [, , command, argAppName] = process.argv;
14
14
  const commands = ['create', 'add', 'list'];
15
15
  const addListCommands = ['add', 'list'];
16
- const nebulaConfig = path_1.default.join(process.cwd(), 'nebula.json');
17
- if (!fs_extra_1.default.existsSync(nebulaConfig)) {
18
- console.log(`❌ Not a nebula project\nUsage: Run nebula command only in specified locations\n`);
19
- process.exit(1);
16
+ let config;
17
+ if (addListCommands.includes(command)) {
18
+ const nebulaConfig = path_1.default.join(process.cwd(), 'nebula.json');
19
+ if (!fs_extra_1.default.existsSync(nebulaConfig)) {
20
+ console.log(`❌ Not a nebula project\nUsage: Run nebula command only in specified locations\n`);
21
+ process.exit(1);
22
+ }
23
+ config = fs_extra_1.default.readJsonSync(nebulaConfig);
20
24
  }
21
- const config = fs_extra_1.default.readJsonSync(nebulaConfig);
22
25
  if (!commands.includes(command)) {
23
26
  console.log(`❌ Unknown command\nAvailable commands\n1. nebula create <app-name>\n2. nebula add service <service-name>\n3. nebula list services\n`);
24
27
  process.exit(1);
@@ -276,7 +276,7 @@ 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
- console.log(path.resolve(__dirname, '../../templates/service'));
279
+ console.log('copy base service', path.resolve(__dirname, '../../templates/service'));
280
280
  fs.copySync(path.resolve(__dirname, '../../templates/service'), serviceOutput);
281
281
  // update service names
282
282
  await (0, replaceServiceNames_1.replaceServiceNames)(serviceOutput, service, appNamePlaceHolder);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nebula-starter-kit",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "bin": {
5
5
  "nebula": "./dist/index.js"
6
6
  },