@embeddable.com/sdk-core 0.0.7 → 0.0.8
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/bin/embeddable +11 -2
- package/package.json +1 -1
package/bin/embeddable
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const { push } = require("../scripts/push");
|
|
5
4
|
const { build } = require("../scripts/build");
|
|
5
|
+
const { login } = require("../scripts/login");
|
|
6
|
+
const { push } = require("../scripts/push");
|
|
7
|
+
|
|
8
|
+
const COMMANDS_MAP = {
|
|
9
|
+
build,
|
|
10
|
+
login,
|
|
11
|
+
push
|
|
12
|
+
};
|
|
6
13
|
|
|
7
14
|
async function main () {
|
|
8
15
|
const command = process.argv[2];
|
|
9
16
|
|
|
10
|
-
const runScript = command
|
|
17
|
+
const runScript = COMMANDS_MAP[command];
|
|
18
|
+
|
|
19
|
+
if (!runScript) process.exit(1); // TODO: proper handling.
|
|
11
20
|
|
|
12
21
|
await runScript();
|
|
13
22
|
}
|