@certik/skynet 0.10.52 → 0.10.54
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/CHANGELOG.md +9 -1
- package/address.js +2 -2
- package/app.js +25 -25
- package/deploy.js +2 -2
- package/indexer.js +2 -2
- package/monitor.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.54
|
|
4
|
+
|
|
5
|
+
- Supported await on return value from `app()`
|
|
6
|
+
|
|
7
|
+
## 0.10.53
|
|
8
|
+
|
|
9
|
+
- Fixed: handle edge cases that token address has multiply ':'
|
|
10
|
+
|
|
3
11
|
## 0.10.52
|
|
4
12
|
|
|
5
|
-
-
|
|
13
|
+
- Refactored: `getDateOnly` now accepts both date strings and date objects
|
|
6
14
|
|
|
7
15
|
## 0.10.50 & 0.10.51
|
|
8
16
|
|
package/address.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function parseAddress(address) {
|
|
2
2
|
const parts = address.split(":");
|
|
3
3
|
|
|
4
|
-
if (parts.length
|
|
4
|
+
if (parts.length > 1) {
|
|
5
5
|
return [parts[0], parts[1].toLowerCase()];
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -14,5 +14,5 @@ function composeAddress(protocol, addr) {
|
|
|
14
14
|
|
|
15
15
|
module.exports = {
|
|
16
16
|
parseAddress,
|
|
17
|
-
composeAddress
|
|
17
|
+
composeAddress,
|
|
18
18
|
};
|
package/app.js
CHANGED
|
@@ -78,7 +78,7 @@ function createApp({ parameterErrors, env, check, onRun, onDeploy, onCheck }) {
|
|
|
78
78
|
process.exit(1);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
return () => {
|
|
81
|
+
return async () => {
|
|
82
82
|
const subCommand = process.argv[2];
|
|
83
83
|
|
|
84
84
|
// emulate command line call without subcmd
|
|
@@ -87,7 +87,7 @@ function createApp({ parameterErrors, env, check, onRun, onDeploy, onCheck }) {
|
|
|
87
87
|
if (subCommand === "run") {
|
|
88
88
|
checkAndSetEnv(env);
|
|
89
89
|
|
|
90
|
-
onRun();
|
|
90
|
+
await onRun();
|
|
91
91
|
} else if (subCommand === "deploy" || isDeleteCommand(subCommand)) {
|
|
92
92
|
if (isDeleteCommand(subCommand)) {
|
|
93
93
|
process.argv.push("--stop");
|
|
@@ -98,12 +98,12 @@ function createApp({ parameterErrors, env, check, onRun, onDeploy, onCheck }) {
|
|
|
98
98
|
.then(() => onDeploy())
|
|
99
99
|
.catch(console.error);
|
|
100
100
|
} else {
|
|
101
|
-
onDeploy();
|
|
101
|
+
await onDeploy();
|
|
102
102
|
}
|
|
103
103
|
} else if (!!check && subCommand === "check") {
|
|
104
104
|
checkAndSetEnv(env);
|
|
105
105
|
|
|
106
|
-
onCheck();
|
|
106
|
+
await onCheck();
|
|
107
107
|
} else {
|
|
108
108
|
printAppHelp(!!check);
|
|
109
109
|
}
|
|
@@ -188,9 +188,9 @@ function indexer({ name, selector, build, check, env = {}, region = "us-east-1"
|
|
|
188
188
|
maxRetry: build.maxRetry,
|
|
189
189
|
});
|
|
190
190
|
|
|
191
|
-
run();
|
|
192
|
-
|
|
193
191
|
process.title = name;
|
|
192
|
+
|
|
193
|
+
return run();
|
|
194
194
|
},
|
|
195
195
|
onDeploy: () => {
|
|
196
196
|
const bin = detectBin();
|
|
@@ -217,7 +217,7 @@ function indexer({ name, selector, build, check, env = {}, region = "us-east-1"
|
|
|
217
217
|
},
|
|
218
218
|
});
|
|
219
219
|
|
|
220
|
-
deploy();
|
|
220
|
+
return deploy();
|
|
221
221
|
},
|
|
222
222
|
onCheck: () => {
|
|
223
223
|
const { monitor } = createMonitor({
|
|
@@ -229,7 +229,7 @@ function indexer({ name, selector, build, check, env = {}, region = "us-east-1"
|
|
|
229
229
|
maxRetry: check.maxRetry,
|
|
230
230
|
});
|
|
231
231
|
|
|
232
|
-
monitor();
|
|
232
|
+
return monitor();
|
|
233
233
|
},
|
|
234
234
|
});
|
|
235
235
|
}
|
|
@@ -298,9 +298,9 @@ function modeIndexer({ name, selector, state, build, validate, check, env = {},
|
|
|
298
298
|
state,
|
|
299
299
|
});
|
|
300
300
|
|
|
301
|
-
run();
|
|
302
|
-
|
|
303
301
|
process.title = name;
|
|
302
|
+
|
|
303
|
+
return run();
|
|
304
304
|
},
|
|
305
305
|
onDeploy: () => {
|
|
306
306
|
const bin = detectBin();
|
|
@@ -337,7 +337,7 @@ function modeIndexer({ name, selector, state, build, validate, check, env = {},
|
|
|
337
337
|
},
|
|
338
338
|
});
|
|
339
339
|
|
|
340
|
-
deploy();
|
|
340
|
+
return deploy();
|
|
341
341
|
},
|
|
342
342
|
onCheck: () => {
|
|
343
343
|
const { monitor } = createMonitor({
|
|
@@ -356,7 +356,7 @@ function modeIndexer({ name, selector, state, build, validate, check, env = {},
|
|
|
356
356
|
maxRetry: check.maxRetry,
|
|
357
357
|
});
|
|
358
358
|
|
|
359
|
-
monitor();
|
|
359
|
+
return monitor();
|
|
360
360
|
},
|
|
361
361
|
});
|
|
362
362
|
}
|
|
@@ -421,9 +421,9 @@ function producer({ name, selector, produce, check, state, env = {}, region = "u
|
|
|
421
421
|
state,
|
|
422
422
|
});
|
|
423
423
|
|
|
424
|
-
run();
|
|
425
|
-
|
|
426
424
|
process.title = name;
|
|
425
|
+
|
|
426
|
+
return run();
|
|
427
427
|
},
|
|
428
428
|
onDeploy: () => {
|
|
429
429
|
const bin = detectBin();
|
|
@@ -449,7 +449,7 @@ function producer({ name, selector, produce, check, state, env = {}, region = "u
|
|
|
449
449
|
},
|
|
450
450
|
});
|
|
451
451
|
|
|
452
|
-
deploy();
|
|
452
|
+
return deploy();
|
|
453
453
|
},
|
|
454
454
|
onCheck: () => {
|
|
455
455
|
const { monitor } = createMonitor({
|
|
@@ -465,7 +465,7 @@ function producer({ name, selector, produce, check, state, env = {}, region = "u
|
|
|
465
465
|
maxRetry: check.maxRetry,
|
|
466
466
|
});
|
|
467
467
|
|
|
468
|
-
monitor();
|
|
468
|
+
return monitor();
|
|
469
469
|
},
|
|
470
470
|
});
|
|
471
471
|
}
|
|
@@ -521,9 +521,9 @@ function consumer({ name, selector, consume, check, env = {}, region = "us-east-
|
|
|
521
521
|
},
|
|
522
522
|
});
|
|
523
523
|
|
|
524
|
-
run();
|
|
525
|
-
|
|
526
524
|
process.title = name;
|
|
525
|
+
|
|
526
|
+
return run();
|
|
527
527
|
},
|
|
528
528
|
onDeploy: () => {
|
|
529
529
|
const bin = detectBin();
|
|
@@ -549,7 +549,7 @@ function consumer({ name, selector, consume, check, env = {}, region = "us-east-
|
|
|
549
549
|
},
|
|
550
550
|
});
|
|
551
551
|
|
|
552
|
-
deploy();
|
|
552
|
+
return deploy();
|
|
553
553
|
},
|
|
554
554
|
onCheck: () => {
|
|
555
555
|
const { monitor } = createMonitor({
|
|
@@ -560,7 +560,7 @@ function consumer({ name, selector, consume, check, env = {}, region = "us-east-
|
|
|
560
560
|
maxRetry: check.maxRetry,
|
|
561
561
|
});
|
|
562
562
|
|
|
563
|
-
monitor();
|
|
563
|
+
return monitor();
|
|
564
564
|
},
|
|
565
565
|
});
|
|
566
566
|
}
|
|
@@ -663,7 +663,9 @@ function api({ name, routes, serve, beforeListen, env = {}, region = "us-east-1"
|
|
|
663
663
|
env,
|
|
664
664
|
check,
|
|
665
665
|
onRun: () => {
|
|
666
|
-
|
|
666
|
+
process.title = name;
|
|
667
|
+
|
|
668
|
+
return startApiApp({
|
|
667
669
|
binaryName: `${getBinaryName()} run`,
|
|
668
670
|
name,
|
|
669
671
|
selector,
|
|
@@ -671,8 +673,6 @@ function api({ name, routes, serve, beforeListen, env = {}, region = "us-east-1"
|
|
|
671
673
|
serve,
|
|
672
674
|
beforeListen,
|
|
673
675
|
});
|
|
674
|
-
|
|
675
|
-
process.title = name;
|
|
676
676
|
},
|
|
677
677
|
onDeploy: () => {
|
|
678
678
|
const bin = detectBin();
|
|
@@ -709,7 +709,7 @@ function api({ name, routes, serve, beforeListen, env = {}, region = "us-east-1"
|
|
|
709
709
|
},
|
|
710
710
|
});
|
|
711
711
|
|
|
712
|
-
deploy();
|
|
712
|
+
return deploy();
|
|
713
713
|
},
|
|
714
714
|
onCheck: () => {
|
|
715
715
|
const { monitor } = createMonitor({
|
|
@@ -720,7 +720,7 @@ function api({ name, routes, serve, beforeListen, env = {}, region = "us-east-1"
|
|
|
720
720
|
maxRetry: check.maxRetry,
|
|
721
721
|
});
|
|
722
722
|
|
|
723
|
-
monitor();
|
|
723
|
+
return monitor();
|
|
724
724
|
},
|
|
725
725
|
});
|
|
726
726
|
}
|
package/deploy.js
CHANGED
|
@@ -529,7 +529,7 @@ ${getSelectorDesc(selector)}
|
|
|
529
529
|
}
|
|
530
530
|
);
|
|
531
531
|
|
|
532
|
-
deployMode(cli.flags).catch((err) => {
|
|
532
|
+
return deployMode(cli.flags).catch((err) => {
|
|
533
533
|
console.error(err);
|
|
534
534
|
process.exit(1);
|
|
535
535
|
});
|
|
@@ -681,7 +681,7 @@ ${getSelectorDesc(selector)}
|
|
|
681
681
|
}
|
|
682
682
|
);
|
|
683
683
|
|
|
684
|
-
deployModeless(cli.flags).catch((err) => {
|
|
684
|
+
return deployModeless(cli.flags).catch((err) => {
|
|
685
685
|
console.error(err);
|
|
686
686
|
process.exit(1);
|
|
687
687
|
});
|
package/indexer.js
CHANGED
|
@@ -534,7 +534,7 @@ ${getSelectorDesc(selector)}
|
|
|
534
534
|
}
|
|
535
535
|
);
|
|
536
536
|
|
|
537
|
-
runMode(cli.flags).catch((err) => {
|
|
537
|
+
return runMode(cli.flags).catch((err) => {
|
|
538
538
|
inline.error(err);
|
|
539
539
|
process.exit(1);
|
|
540
540
|
});
|
|
@@ -614,7 +614,7 @@ ${getSelectorDesc(selector)}
|
|
|
614
614
|
inline.log(`[INDEXER] build successfully in ${Date.now() - startTime}ms`);
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
-
runBuild(cli.flags).catch((err) => {
|
|
617
|
+
return runBuild(cli.flags).catch((err) => {
|
|
618
618
|
inline.error(err);
|
|
619
619
|
process.exit(1);
|
|
620
620
|
});
|
package/monitor.js
CHANGED
package/package.json
CHANGED