@whyour/qinglong 0.15.4 → 0.15.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/package.json
CHANGED
|
@@ -31,6 +31,7 @@ const tar_1 = __importDefault(require("tar"));
|
|
|
31
31
|
const path_1 = __importDefault(require("path"));
|
|
32
32
|
const fs_1 = __importDefault(require("fs"));
|
|
33
33
|
const sum_1 = __importDefault(require("lodash/sum"));
|
|
34
|
+
const dependence_1 = require("../data/dependence");
|
|
34
35
|
let SystemService = class SystemService {
|
|
35
36
|
constructor(logger, scheduleService, sockService) {
|
|
36
37
|
this.logger = logger;
|
|
@@ -109,7 +110,13 @@ let SystemService = class SystemService {
|
|
|
109
110
|
if (info.nodeMirror) {
|
|
110
111
|
cmd = `pnpm config set registry ${info.nodeMirror}`;
|
|
111
112
|
}
|
|
112
|
-
|
|
113
|
+
let command = `cd && ${cmd}`;
|
|
114
|
+
const docs = await dependence_1.DependenceModel.findAll({
|
|
115
|
+
where: { type: dependence_1.DependenceTypes.nodejs },
|
|
116
|
+
});
|
|
117
|
+
if (docs.length > 0) {
|
|
118
|
+
command += ` && pnpm i -g`;
|
|
119
|
+
}
|
|
113
120
|
this.scheduleService.runTask(command, {
|
|
114
121
|
onStart: async (cp) => {
|
|
115
122
|
res === null || res === void 0 ? void 0 : res.setHeader('QL-Task-Pid', `${cp.pid}`);
|