@serverless-devs/s3 0.0.1

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.
@@ -0,0 +1,24 @@
1
+ const { Report } = require('./lib');
2
+
3
+ (async () => {
4
+ try {
5
+ console.log('********Starting report in daemon********');
6
+
7
+ // Exit process when offline
8
+ setTimeout(process.exit, 1000 * 30);
9
+ const { type, template, uid, argv } = JSON.parse(process.argv[2]);
10
+ console.log('type', type);
11
+ console.log('template', template);
12
+ console.log('uid', uid);
13
+ console.log('argv', argv);
14
+ const instance = new Report();
15
+ type === 'init' ? await instance.reportInit({ template }) : await instance.reportCommand({ uid, argv });
16
+ console.log('********report successfully in daemon********');
17
+ // Call process exit explicitly to terminate the child process,
18
+ // otherwise the child process will run forever, according to the Node.js docs
19
+ process.exit();
20
+ } catch (error) {
21
+ console.error(error);
22
+ process.exit(1);
23
+ }
24
+ })();
@@ -0,0 +1,20 @@
1
+ const { UpdateNotifier } = require('./lib');
2
+
3
+ (async () => {
4
+ try {
5
+ console.log('********Starting update cli in 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 cli successfully in daemon********');
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
+ })();
@@ -0,0 +1,21 @@
1
+ const { Component } = require('./lib');
2
+
3
+ (async () => {
4
+ try {
5
+ console.log('********Starting update component in daemon********');
6
+
7
+ // Exit process when offline
8
+ setTimeout(process.exit, 1000 * 30);
9
+ const { component } = JSON.parse(process.argv[2]);
10
+ console.log('component', component);
11
+ const instance = new Component(component);
12
+ await instance.update();
13
+ console.log('********Update component successfully in daemon********');
14
+ // Call process exit explicitly to terminate the child process,
15
+ // otherwise the child process will run forever, according to the Node.js docs
16
+ process.exit();
17
+ } catch (error) {
18
+ console.error(error);
19
+ process.exit(1);
20
+ }
21
+ })();