@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.
Files changed (54) hide show
  1. package/lib/daemon/update.js +18 -6
  2. package/lib/index.js +1165 -465
  3. package/lib/update-notifier.js +260 -0
  4. package/package.json +24 -17
  5. package/replace-committers.sh +69 -0
  6. package/s-linux +0 -0
  7. package/s-macos +0 -0
  8. package/s-win.exe +0 -0
  9. package/lib/command/clean/index.js +0 -125
  10. package/lib/command/config/command/add.js +0 -100
  11. package/lib/command/config/command/default.js +0 -78
  12. package/lib/command/config/command/get.js +0 -100
  13. package/lib/command/config/command/remove.js +0 -77
  14. package/lib/command/config/command/rename.js +0 -84
  15. package/lib/command/config/index.js +0 -27
  16. package/lib/command/config/utils/index.js +0 -19
  17. package/lib/command/custom/help.js +0 -231
  18. package/lib/command/custom/index.js +0 -177
  19. package/lib/command/custom/types.js +0 -3
  20. package/lib/command/custom/v1/index.js +0 -293
  21. package/lib/command/index.js +0 -95
  22. package/lib/command/init/constant.js +0 -600
  23. package/lib/command/init/index.js +0 -101
  24. package/lib/command/init/manager.js +0 -181
  25. package/lib/command/registry/command/detail.js +0 -71
  26. package/lib/command/registry/command/list.js +0 -69
  27. package/lib/command/registry/command/login.js +0 -90
  28. package/lib/command/registry/command/publish.js +0 -67
  29. package/lib/command/registry/command/remove.js +0 -70
  30. package/lib/command/registry/index.js +0 -27
  31. package/lib/command/set/command/analysis.js +0 -94
  32. package/lib/command/set/command/log.js +0 -94
  33. package/lib/command/set/command/proxy.js +0 -98
  34. package/lib/command/set/command/registry.js +0 -115
  35. package/lib/command/set/index.js +0 -25
  36. package/lib/constant.js +0 -25
  37. package/lib/daemon/template.js +0 -20
  38. package/lib/error/command-error.js +0 -29
  39. package/lib/error/config-delete-error.js +0 -29
  40. package/lib/error/config-error.js +0 -29
  41. package/lib/error/config-get-error.js +0 -29
  42. package/lib/error/human-error.js +0 -71
  43. package/lib/error/human-warning.js +0 -18
  44. package/lib/error/index.js +0 -68
  45. package/lib/error/init-error.js +0 -29
  46. package/lib/error/serverless-error.js +0 -12
  47. package/lib/i18n/en.js +0 -4
  48. package/lib/i18n/index.js +0 -16
  49. package/lib/i18n/zh.js +0 -4
  50. package/lib/logger.js +0 -82
  51. package/lib/utils/check-node-version.js +0 -15
  52. package/lib/utils/get-pid.js +0 -55
  53. package/lib/utils/index.js +0 -43
  54. package/lib/utils/set-proxy.js +0 -21
@@ -1,9 +1,21 @@
1
1
  const UpdateNotifier = require('../update-notifier');
2
2
 
3
3
  (async () => {
4
- const updateNotifier = new UpdateNotifier();
5
- await updateNotifier.update();
6
- process.exit();
7
- })().catch(() => {
8
- process.exit(1);
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
+ })()