@serverless-devs/s 3.0.0-beta.2 → 3.0.0-beta.4
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/lib/daemon/update.js +18 -6
- package/lib/index.js +1165 -465
- package/lib/update-notifier.js +260 -0
- package/package.json +24 -17
- package/replace-committers.sh +69 -0
- package/s-linux +0 -0
- package/s-macos +0 -0
- package/s-win.exe +0 -0
- package/lib/command/clean/index.js +0 -125
- package/lib/command/config/command/add.js +0 -100
- package/lib/command/config/command/default.js +0 -78
- package/lib/command/config/command/get.js +0 -100
- package/lib/command/config/command/remove.js +0 -77
- package/lib/command/config/command/rename.js +0 -84
- package/lib/command/config/index.js +0 -27
- package/lib/command/config/utils/index.js +0 -19
- package/lib/command/custom/help.js +0 -231
- package/lib/command/custom/index.js +0 -177
- package/lib/command/custom/types.js +0 -3
- package/lib/command/custom/v1/index.js +0 -293
- package/lib/command/index.js +0 -95
- package/lib/command/init/constant.js +0 -600
- package/lib/command/init/index.js +0 -101
- package/lib/command/init/manager.js +0 -181
- package/lib/command/registry/command/detail.js +0 -71
- package/lib/command/registry/command/list.js +0 -69
- package/lib/command/registry/command/login.js +0 -90
- package/lib/command/registry/command/publish.js +0 -67
- package/lib/command/registry/command/remove.js +0 -70
- package/lib/command/registry/index.js +0 -27
- package/lib/command/set/command/analysis.js +0 -94
- package/lib/command/set/command/log.js +0 -94
- package/lib/command/set/command/proxy.js +0 -98
- package/lib/command/set/command/registry.js +0 -115
- package/lib/command/set/index.js +0 -25
- package/lib/constant.js +0 -25
- package/lib/daemon/template.js +0 -20
- package/lib/error/command-error.js +0 -29
- package/lib/error/config-delete-error.js +0 -29
- package/lib/error/config-error.js +0 -29
- package/lib/error/config-get-error.js +0 -29
- package/lib/error/human-error.js +0 -71
- package/lib/error/human-warning.js +0 -18
- package/lib/error/index.js +0 -68
- package/lib/error/init-error.js +0 -29
- package/lib/error/serverless-error.js +0 -12
- package/lib/i18n/en.js +0 -4
- package/lib/i18n/index.js +0 -16
- package/lib/i18n/zh.js +0 -4
- package/lib/logger.js +0 -82
- package/lib/utils/check-node-version.js +0 -15
- package/lib/utils/get-pid.js +0 -55
- package/lib/utils/index.js +0 -43
- package/lib/utils/set-proxy.js +0 -21
package/lib/daemon/update.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
const UpdateNotifier = require('../update-notifier');
|
|
2
2
|
|
|
3
3
|
(async () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
try {
|
|
5
|
+
console.log('Starting update daemon...');
|
|
6
|
+
|
|
7
|
+
// Exit process when offline
|
|
8
|
+
setTimeout(process.exit, 1000 * 30);
|
|
9
|
+
|
|
10
|
+
const updateNotifier = new UpdateNotifier();
|
|
11
|
+
await updateNotifier.update();
|
|
12
|
+
console.log('Update daemon finished successfully');
|
|
13
|
+
// Call process exit explicitly to terminate the child process,
|
|
14
|
+
// otherwise the child process will run forever, according to the Node.js docs
|
|
15
|
+
process.exit();
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.error(error);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
})()
|