@serverless-devs/s3 0.0.3-beta.6 → 0.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/lib/daemon/lib.js +123 -123
- package/lib/daemon/update-templates.js +19 -0
- package/lib/index.js +1252 -857
- package/package.json +4 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { Templates } = require('./lib');
|
|
2
|
+
|
|
3
|
+
(async () => {
|
|
4
|
+
try {
|
|
5
|
+
console.log('******** Starting update templates in daemon ********');
|
|
6
|
+
// Exit process when offline
|
|
7
|
+
setTimeout(process.exit, 1000 * 30);
|
|
8
|
+
|
|
9
|
+
const instance = new Templates();
|
|
10
|
+
await instance.update();
|
|
11
|
+
console.log('******** Update templates successfully in daemon ********');
|
|
12
|
+
// Call process exit explicitly to terminate the child process,
|
|
13
|
+
// otherwise the child process will run forever, according to the Node.js docs
|
|
14
|
+
process.exit();
|
|
15
|
+
} catch (error) {
|
|
16
|
+
console.error(error);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
})();
|