@whyour/qinglong 2.19.0-1 → 2.19.0-3
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/docker/310.Dockerfile
CHANGED
|
@@ -75,7 +75,7 @@ ENV PNPM_HOME=${QL_DIR}/data/dep_cache/node \
|
|
|
75
75
|
PYTHON_HOME=${QL_DIR}/data/dep_cache/python3 \
|
|
76
76
|
PYTHONUSERBASE=${QL_DIR}/data/dep_cache/python3
|
|
77
77
|
|
|
78
|
-
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PNPM_HOME} \
|
|
78
|
+
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PNPM_HOME}:${PYTHON_HOME}/bin \
|
|
79
79
|
NODE_PATH=/usr/local/bin:/usr/local/lib/node_modules:${PNPM_HOME}/global/5/node_modules \
|
|
80
80
|
PIP_CACHE_DIR=${PYTHON_HOME}/pip \
|
|
81
81
|
PYTHONPATH=${PYTHON_HOME}:${PYTHON_HOME}/lib/python${PYTHON_SHORT_VERSION}:${PYTHON_HOME}/lib/python${PYTHON_SHORT_VERSION}/site-packages:${PYTHONPATH}
|
package/docker/Dockerfile
CHANGED
|
@@ -76,7 +76,7 @@ ENV PNPM_HOME=${QL_DIR}/data/dep_cache/node \
|
|
|
76
76
|
PYTHON_HOME=${QL_DIR}/data/dep_cache/python3 \
|
|
77
77
|
PYTHONUSERBASE=${QL_DIR}/data/dep_cache/python3
|
|
78
78
|
|
|
79
|
-
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PNPM_HOME} \
|
|
79
|
+
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PNPM_HOME}:${PYTHON_HOME}/bin \
|
|
80
80
|
NODE_PATH=/usr/local/bin:/usr/local/lib/node_modules:${PNPM_HOME}/global/5/node_modules \
|
|
81
81
|
PIP_CACHE_DIR=${PYTHON_HOME}/pip \
|
|
82
82
|
PYTHONPATH=${PYTHON_HOME}:${PYTHON_HOME}/lib/python${PYTHON_SHORT_VERSION}:${PYTHON_HOME}/lib/python${PYTHON_SHORT_VERSION}/site-packages:${PYTHONPATH}
|
package/package.json
CHANGED
|
@@ -29,7 +29,6 @@ exports.default = (app) => {
|
|
|
29
29
|
remark: celebrate_1.Joi.string().optional().allow(''),
|
|
30
30
|
})),
|
|
31
31
|
}), async (req, res, next) => {
|
|
32
|
-
const logger = typedi_1.Container.get('logger');
|
|
33
32
|
try {
|
|
34
33
|
const dependenceService = typedi_1.Container.get(dependence_1.default);
|
|
35
34
|
const data = await dependenceService.create(req.body);
|
|
@@ -47,7 +46,6 @@ exports.default = (app) => {
|
|
|
47
46
|
remark: celebrate_1.Joi.string().optional().allow(''),
|
|
48
47
|
}),
|
|
49
48
|
}), async (req, res, next) => {
|
|
50
|
-
const logger = typedi_1.Container.get('logger');
|
|
51
49
|
try {
|
|
52
50
|
const dependenceService = typedi_1.Container.get(dependence_1.default);
|
|
53
51
|
const data = await dependenceService.update(req.body);
|
|
@@ -60,7 +58,6 @@ exports.default = (app) => {
|
|
|
60
58
|
route.delete('/', (0, celebrate_1.celebrate)({
|
|
61
59
|
body: celebrate_1.Joi.array().items(celebrate_1.Joi.number().required()),
|
|
62
60
|
}), async (req, res, next) => {
|
|
63
|
-
const logger = typedi_1.Container.get('logger');
|
|
64
61
|
try {
|
|
65
62
|
const dependenceService = typedi_1.Container.get(dependence_1.default);
|
|
66
63
|
const data = await dependenceService.remove(req.body);
|
|
@@ -73,7 +70,6 @@ exports.default = (app) => {
|
|
|
73
70
|
route.delete('/force', (0, celebrate_1.celebrate)({
|
|
74
71
|
body: celebrate_1.Joi.array().items(celebrate_1.Joi.number().required()),
|
|
75
72
|
}), async (req, res, next) => {
|
|
76
|
-
const logger = typedi_1.Container.get('logger');
|
|
77
73
|
try {
|
|
78
74
|
const dependenceService = typedi_1.Container.get(dependence_1.default);
|
|
79
75
|
const data = await dependenceService.remove(req.body, true);
|
|
@@ -88,7 +84,6 @@ exports.default = (app) => {
|
|
|
88
84
|
id: celebrate_1.Joi.number().required(),
|
|
89
85
|
}),
|
|
90
86
|
}), async (req, res, next) => {
|
|
91
|
-
const logger = typedi_1.Container.get('logger');
|
|
92
87
|
try {
|
|
93
88
|
const dependenceService = typedi_1.Container.get(dependence_1.default);
|
|
94
89
|
const data = await dependenceService.getDb({ id: req.params.id });
|
|
@@ -101,7 +96,6 @@ exports.default = (app) => {
|
|
|
101
96
|
route.put('/reinstall', (0, celebrate_1.celebrate)({
|
|
102
97
|
body: celebrate_1.Joi.array().items(celebrate_1.Joi.number().required()),
|
|
103
98
|
}), async (req, res, next) => {
|
|
104
|
-
const logger = typedi_1.Container.get('logger');
|
|
105
99
|
try {
|
|
106
100
|
const dependenceService = typedi_1.Container.get(dependence_1.default);
|
|
107
101
|
const data = await dependenceService.reInstall(req.body);
|
|
@@ -70,6 +70,9 @@ let DependenceService = class DependenceService {
|
|
|
70
70
|
}
|
|
71
71
|
async remove(ids, force = false) {
|
|
72
72
|
const docs = await dependence_1.DependenceModel.findAll({ where: { id: ids } });
|
|
73
|
+
for (const doc of docs) {
|
|
74
|
+
pLimit_1.default.removeQueuedDependency(doc);
|
|
75
|
+
}
|
|
73
76
|
const unInstalledDeps = docs.filter((x) => x.status !== dependence_1.DependenceStatus.installed);
|
|
74
77
|
const installedDeps = docs.filter((x) => x.status === dependence_1.DependenceStatus.installed);
|
|
75
78
|
await this.removeDb(unInstalledDeps.map((x) => x.id));
|
|
@@ -114,6 +117,9 @@ let DependenceService = class DependenceService {
|
|
|
114
117
|
async reInstall(ids) {
|
|
115
118
|
await dependence_1.DependenceModel.update({ status: dependence_1.DependenceStatus.queued, log: [] }, { where: { id: ids } });
|
|
116
119
|
const docs = await dependence_1.DependenceModel.findAll({ where: { id: ids } });
|
|
120
|
+
for (const doc of docs) {
|
|
121
|
+
pLimit_1.default.removeQueuedDependency(doc);
|
|
122
|
+
}
|
|
117
123
|
this.installDependenceOneByOne(docs, true, true);
|
|
118
124
|
return docs;
|
|
119
125
|
}
|
|
@@ -298,12 +298,13 @@ let UserService = class UserService {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
async resetAuthInfo(info) {
|
|
301
|
-
const { retries, twoFactorActivated, password } = info;
|
|
301
|
+
const { retries, twoFactorActivated, password, username } = info;
|
|
302
302
|
const authInfo = await this.getAuthInfo();
|
|
303
303
|
await this.updateAuthInfo(authInfo, {
|
|
304
304
|
retries,
|
|
305
305
|
twoFactorActivated,
|
|
306
306
|
password,
|
|
307
|
+
username
|
|
307
308
|
});
|
|
308
309
|
}
|
|
309
310
|
};
|