steedos-cli 3.0.0-beta.98 → 3.0.0
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const confOclif = require(
|
|
4
|
-
const rl = require(
|
|
5
|
-
const chalk = require(
|
|
3
|
+
const confOclif = require("@oclif/command");
|
|
4
|
+
const rl = require("readline-sync");
|
|
5
|
+
const chalk = require("chalk");
|
|
6
6
|
const metadata_core_1 = require("@steedos/metadata-core");
|
|
7
7
|
class ConfigCommand extends confOclif.Command {
|
|
8
8
|
async run() {
|
|
@@ -12,31 +12,31 @@ class ConfigCommand extends confOclif.Command {
|
|
|
12
12
|
rooturl = process.env.ROOT_URL;
|
|
13
13
|
}
|
|
14
14
|
if (!rooturl) {
|
|
15
|
-
rooturl =
|
|
15
|
+
rooturl = "http://localhost:5100";
|
|
16
16
|
}
|
|
17
17
|
var server = rl.question(`metadata server:(${rooturl})`);
|
|
18
|
-
var apikey = rl.question(
|
|
19
|
-
if (server ==
|
|
18
|
+
var apikey = rl.question("metadata api key:");
|
|
19
|
+
if (server == "") {
|
|
20
20
|
server = rooturl;
|
|
21
21
|
}
|
|
22
|
-
if (!server.startsWith(
|
|
22
|
+
if (!server.startsWith("http")) {
|
|
23
23
|
server = `http://${server}`;
|
|
24
24
|
}
|
|
25
|
-
if (server.endsWith(
|
|
25
|
+
if (server.endsWith("/")) {
|
|
26
26
|
server = server.substring(0, server.length - 1);
|
|
27
27
|
}
|
|
28
28
|
var localEnvPath = (0, metadata_core_1.getLocalEnvPath)();
|
|
29
|
-
console.log(chalk.yellow(
|
|
30
|
-
console.log(
|
|
31
|
-
console.log(
|
|
32
|
-
var isOK = rl.question(
|
|
33
|
-
if (isOK ==
|
|
29
|
+
console.log(chalk.yellow("About to write to " + localEnvPath) + ":");
|
|
30
|
+
console.log("METADATA_SERVER=" + server);
|
|
31
|
+
console.log("METADATA_APIKEY=" + apikey);
|
|
32
|
+
var isOK = rl.question("Is this OK? [y/n]:(y)");
|
|
33
|
+
if (isOK == "" || isOK.toLowerCase() == "y") {
|
|
34
34
|
try {
|
|
35
35
|
var config = { server, apikey };
|
|
36
36
|
(0, metadata_core_1.saveSourceConfig)(config);
|
|
37
37
|
}
|
|
38
38
|
catch (error) {
|
|
39
|
-
console.error(
|
|
39
|
+
console.error("Error: " + error.message);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/source/config.ts"],"names":[],"mappings":";;AAAA,MAAM,SAAS,GAAG,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/source/config.ts"],"names":[],"mappings":";;AAAA,MAAM,SAAS,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE5C,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACpC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/B,0DAIgC;AAEhC,MAAM,aAAc,SAAQ,SAAS,CAAC,OAAO;IAC3C,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAIlD,IAAI,OAAO,GAAG,IAAA,0BAAU,GAAE,CAAC;QAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,uBAAuB,CAAC;QACpC,CAAC;QACD,IAAI,MAAM,GAAG,EAAE,CAAC,QAAQ,CAAC,oBAAoB,OAAO,GAAG,CAAC,CAAC;QACz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18 +39,10 @@ const path = __importStar(require("path"));
|
|
|
39
39
|
class StartCommand extends command_1.Command {
|
|
40
40
|
async run() {
|
|
41
41
|
try {
|
|
42
|
-
this.checkModuleExists("@builder6/server");
|
|
43
42
|
this.checkModuleExists("@steedos/server");
|
|
44
|
-
const serverPath = require.resolve("@builder6/server");
|
|
45
43
|
const steedosPath = require.resolve("@steedos/server");
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const { version } = require("@steedos/server/package.json");
|
|
49
|
-
const i18n = require("@steedos/i18n");
|
|
50
|
-
global.t = i18n.t;
|
|
51
|
-
global._ = require("underscore");
|
|
52
|
-
process.env.STEEDOS_VERSION = version;
|
|
53
|
-
server.bootstrap(appConfig);
|
|
44
|
+
const server = require(steedosPath);
|
|
45
|
+
server.bootstrap();
|
|
54
46
|
}
|
|
55
47
|
catch (error) {
|
|
56
48
|
this.error(error.message, { exit: 1 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAyC;AACzC,uCAAyB;AACzB,2CAA6B;AAE7B,MAAM,YAAa,SAAQ,iBAAO;IAChC,KAAK,CAAC,GAAG;QACP,IAAI,CAAC;YAEH,IAAI,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAyC;AACzC,uCAAyB;AACzB,2CAA6B;AAE7B,MAAM,YAAa,SAAQ,iBAAO;IAChC,KAAK,CAAC,GAAG;QACP,IAAI,CAAC;YAEH,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;YAE1C,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;YAEvD,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;YAEpC,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAEO,iBAAiB,CAAC,UAAkB;QAC1C,IAAI,CAAC;YACH,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC9B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;YACxE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CACb,oBAAoB,UAAU,+CAA+C,UAAU,GAAG,CAC3F,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,KAAK,CACb,6BAA6B,UAAU,MAAM,GAAG,CAAC,OAAO,EAAE,CAC3D,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAED,YAAY,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAElD,MAAM,CAAC,OAAO,GAAG,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steedos-cli",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Develop and run your enterprise apps in miniutes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@oclif/command": "^1.8.16",
|
|
34
34
|
"@oclif/config": "^1.8.3",
|
|
35
35
|
"@oclif/plugin-help": "^5.1.12",
|
|
36
|
-
"@steedos/metadata-core": "3.0.0
|
|
37
|
-
"@steedos/metadata-registrar": "3.0.0
|
|
36
|
+
"@steedos/metadata-core": "3.0.0",
|
|
37
|
+
"@steedos/metadata-registrar": "3.0.0",
|
|
38
38
|
"archiver": "^5.0.2",
|
|
39
39
|
"chalk": "2.4.2",
|
|
40
40
|
"change-case": "^3.1.0",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"kleur": "^4.1.3",
|
|
51
51
|
"latest-version": "^5.1.0",
|
|
52
52
|
"lodash": "^4.17.21",
|
|
53
|
-
"moleculer": "^0.14.
|
|
53
|
+
"moleculer": "^0.14.35",
|
|
54
54
|
"readline-sync": "^1.4.10",
|
|
55
|
-
"reflect-metadata": "^0.
|
|
55
|
+
"reflect-metadata": "^0.2.0",
|
|
56
56
|
"request": "^2.88.2",
|
|
57
57
|
"request-promise": "^4.2.5",
|
|
58
58
|
"rimraf": "3.0.2",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "20ea485d800dd4ad0a99c82b26000879c2f85741"
|
|
81
81
|
}
|