cc-core-cli 1.0.4 → 1.0.6

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/bin/index.js CHANGED
@@ -54,21 +54,12 @@ if (action === 'init') {
54
54
 
55
55
  if (action === 'upgrade') {
56
56
  const project = options['_'][1] || '.'
57
- if (!['core', 'admin'].includes(project)) {
57
+ if (!['core', 'admin', 'module'].includes(project)) {
58
58
  console.log('Project should be one of [core|admin|module]!')
59
59
  return false
60
60
  }
61
61
 
62
- const spinner = ora('(1/2) Running npm install!').start();
63
- exec('npm install', (err) => {
64
- if (err) {
65
- return spinner.fail('(1/2) Running npm install!')
66
- }
67
-
68
- spinner.succeed('(1/2) Running npm install!')
69
- })
70
-
71
- spinner.start('(2/2) Copying files!')
62
+ spinner.start('(1/2) Copying files!')
72
63
 
73
64
  fs.copySync(`${__dirname}/../template/${project}`, '.', {
74
65
  recursive: true,
@@ -77,8 +68,16 @@ if (action === 'upgrade') {
77
68
  }
78
69
  })
79
70
 
80
- spinner.succeed('(2/2) Copying files!')
81
-
71
+ spinner.succeed('(1/2) Copying files!')
72
+
73
+ const spinner = ora('(2/2) Running npm install!').start();
74
+ exec('npm install', (err) => {
75
+ if (err) {
76
+ return spinner.fail('(2/2) Running npm install!')
77
+ }
78
+
79
+ spinner.succeed('(2/2) Running npm install!')
80
+ })
82
81
  }
83
82
 
84
83
  if (action === 'admin') {
@@ -95,8 +94,8 @@ if (action === 'admin') {
95
94
 
96
95
  if (action === 'genpkg') {
97
96
  const mode = options['_'][1] || '';
98
- if (!['core-lib', 'admin-lib'].includes(mode)) {
99
- console.error('Please type a valid mode [core-lib | admin-lib]');
97
+ if (!['core', 'admin'].includes(mode)) {
98
+ console.error('Please type a valid mode [core|admin]');
100
99
  return false;
101
100
  }
102
101
  const path = options['_'][2] || '.';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-core-cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Command Line Interface tool for generating project templates for the (Your Platform's Name) platform.",
5
5
  "main": "bin/index.js",
6
6
  "scripts": {
@@ -5,8 +5,7 @@ import { Controller, Get, Module, Param } from "@nestjs/common";
5
5
  import { MongooseModule } from "@nestjs/mongoose";
6
6
 
7
7
  import { ClsModule } from "nestjs-cls";
8
- import { AttachmentService, AuthModule } from "./core";
9
- import { AttachmentModule } from "./core/attachment/attachment.module";
8
+ import { AttachmentService, AuthModule, AttachmentModule } from "@shopstack/cc-core-lib/core";
10
9
 
11
10
  const mongoConfig = {};
12
11
  if (+process.env.MONGODB_MIN_POOL_SIZE) {
File without changes
File without changes