cc-core-cli 1.0.4 → 1.0.5
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 +14 -12
- package/package.json +1 -1
- package/template/core/src/storage.module.ts +1 -2
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
|
-
|
|
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,7 +68,18 @@ if (action === 'upgrade') {
|
|
|
77
68
|
}
|
|
78
69
|
})
|
|
79
70
|
|
|
80
|
-
spinner.succeed('(
|
|
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
|
+
})
|
|
81
|
+
|
|
82
|
+
|
|
81
83
|
|
|
82
84
|
}
|
|
83
85
|
|
package/package.json
CHANGED
|
@@ -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 "
|
|
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) {
|