@nocobase/server 0.7.0-alpha.22 → 0.7.0-alpha.23
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/esm/commands/index.d.ts +1 -1
- package/esm/commands/index.js +2 -2
- package/esm/commands/index.js.map +1 -1
- package/esm/commands/install.js +16 -8
- package/esm/commands/install.js.map +1 -1
- package/esm/commands/start.js +3 -1
- package/esm/commands/start.js.map +1 -1
- package/lib/commands/index.d.ts +1 -1
- package/lib/commands/index.js +2 -2
- package/lib/commands/index.js.map +1 -1
- package/lib/commands/install.js +16 -8
- package/lib/commands/install.js.map +1 -1
- package/lib/commands/start.js +3 -1
- package/lib/commands/start.js.map +1 -1
- package/package.json +6 -6
package/esm/commands/index.d.ts
CHANGED
package/esm/commands/index.js
CHANGED
|
@@ -12,8 +12,8 @@ export function createCli(app) {
|
|
|
12
12
|
process.exit(1);
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
program.command('start').description('start NocoBase application').action(runSubCommand('start'));
|
|
16
|
-
program.command('install').option('-f, --force').option('-c, --clean').action(runSubCommand('install'));
|
|
15
|
+
program.command('start').description('start NocoBase application').option('-s, --silent').action(runSubCommand('start'));
|
|
16
|
+
program.command('install').option('-f, --force').option('-c, --clean').option('-s, --silent').action(runSubCommand('install'));
|
|
17
17
|
program.command('db:sync').option('-f, --force').action(runSubCommand('db-sync'));
|
|
18
18
|
program.command('console').action(runSubCommand('console'));
|
|
19
19
|
program
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,UAAU,SAAS,CAAC,GAAgB;IACxC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE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OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { Command } from 'commander';\nimport Application from '../application';\n\nexport function createCli(app: Application) {\n const program = new Command();\n\n const runSubCommand =\n (name) =>\n (...cliArgs) => {\n const command = require(`./${name}`).default;\n\n Promise.resolve()\n .then(() => {\n return command({ app, cliArgs });\n })\n .catch((error) => {\n console.error(error);\n process.exit(1);\n });\n };\n\n program.command('start').description('start NocoBase application').option('-s, --silent').action(runSubCommand('start'));\n program.command('install').option('-f, --force').option('-c, --clean').option('-s, --silent').action(runSubCommand('install'));\n program.command('db:sync').option('-f, --force').action(runSubCommand('db-sync'));\n program.command('console').action(runSubCommand('console'));\n\n program\n .command('create-plugin')\n .argument('<name>', 'name of plugin')\n .description('create NocoBase plugin')\n .action(runSubCommand('create-plugin'));\n\n return program;\n}\n"]}
|
package/esm/commands/install.js
CHANGED
|
@@ -13,17 +13,22 @@ export default ({ app, cliArgs }) => __awaiter(void 0, void 0, void 0, function*
|
|
|
13
13
|
if (!(opts === null || opts === void 0 ? void 0 : opts.clean) && !(opts === null || opts === void 0 ? void 0 : opts.force)) {
|
|
14
14
|
const tables = yield app.db.sequelize.getQueryInterface().showAllTables();
|
|
15
15
|
if (tables.includes('collections')) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
if (!opts.silent) {
|
|
17
|
+
console.log();
|
|
18
|
+
console.log();
|
|
19
|
+
console.log(chalk.yellow('NocoBase is already installed. To reinstall, please execute:'));
|
|
20
|
+
console.log();
|
|
21
|
+
let command = 'yarn nocobase install -f';
|
|
22
|
+
console.log(chalk.yellow(command));
|
|
23
|
+
console.log();
|
|
24
|
+
console.log();
|
|
25
|
+
}
|
|
24
26
|
return;
|
|
25
27
|
}
|
|
26
28
|
}
|
|
29
|
+
if (!opts.silent) {
|
|
30
|
+
console.log(`NocoBase installing`);
|
|
31
|
+
}
|
|
27
32
|
yield app.install({
|
|
28
33
|
cliArgs,
|
|
29
34
|
clean: opts.clean,
|
|
@@ -34,5 +39,8 @@ export default ({ app, cliArgs }) => __awaiter(void 0, void 0, void 0, function*
|
|
|
34
39
|
yield app.stop({
|
|
35
40
|
cliArgs,
|
|
36
41
|
});
|
|
42
|
+
if (!opts.silent) {
|
|
43
|
+
console.log(`NocoBase installed`);
|
|
44
|
+
}
|
|
37
45
|
});
|
|
38
46
|
//# sourceMappingURL=install.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAe,CAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAe,CAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAEvB,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAA,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAA,EAAE;QAChC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC,aAAa,EAAE,CAAC;QAC1E,IAAI,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;gBAChB,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,8DAA8D,CAAC,CAAC,CAAC;gBAC1F,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,IAAI,OAAO,GAAG,0BAA0B,CAAC;gBACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;gBACnC,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,EAAE,CAAC;aACf;YACD,OAAO;SACR;KACF;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;KACpC;IAED,MAAM,GAAG,CAAC,OAAO,CAAC;QAChB,OAAO;QACP,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,IAAI,EAAE;YACJ,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB;KACF,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,IAAI,CAAC;QACb,OAAO;KACR,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;KACnC;AACH,CAAC,CAAA,CAAC","sourcesContent":["import chalk from 'chalk';\n\nexport default async ({ app, cliArgs }) => {\n const [opts] = cliArgs;\n\n if (!opts?.clean && !opts?.force) {\n const tables = await app.db.sequelize.getQueryInterface().showAllTables();\n if (tables.includes('collections')) {\n if (!opts.silent) {\n console.log();\n console.log();\n console.log(chalk.yellow('NocoBase is already installed. To reinstall, please execute:'));\n console.log();\n let command = 'yarn nocobase install -f';\n console.log(chalk.yellow(command));\n console.log();\n console.log();\n }\n return;\n }\n }\n\n if (!opts.silent) {\n console.log(`NocoBase installing`);\n }\n\n await app.install({\n cliArgs,\n clean: opts.clean,\n sync: {\n force: opts.force,\n },\n });\n\n await app.stop({\n cliArgs,\n });\n\n if (!opts.silent) {\n console.log(`NocoBase installed`);\n }\n};\n"]}
|
package/esm/commands/start.js
CHANGED
|
@@ -18,6 +18,8 @@ export default ({ app, cliArgs }) => __awaiter(void 0, void 0, void 0, function*
|
|
|
18
18
|
host,
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
if (!opts.silent) {
|
|
22
|
+
console.log(`🚀 NocoBase server running at: http://${host === '0.0.0.0' ? 'localhost' : host}:${port}/`);
|
|
23
|
+
}
|
|
22
24
|
});
|
|
23
25
|
//# sourceMappingURL=start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;;;;;;;;AAAA,eAAe,CAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC;IAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,SAAS,CAAC;IAE/D,MAAM,GAAG,CAAC,KAAK,CAAC;QACd,OAAO;QACP,MAAM,EAAE;YACN,IAAI;YACJ,IAAI;SACL;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;;;;;;;;AAAA,eAAe,CAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC;IAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,SAAS,CAAC;IAE/D,MAAM,GAAG,CAAC,KAAK,CAAC;QACd,OAAO;QACP,MAAM,EAAE;YACN,IAAI;YACJ,IAAI;SACL;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,yCAAyC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC;KAC1G;AACH,CAAC,CAAA,CAAC","sourcesContent":["export default async ({ app, cliArgs }) => {\n const [opts] = cliArgs;\n const port = opts.port || process.env.SERVER_PORT || 3000;\n const host = opts.host || process.env.SERVER_HOST || '0.0.0.0';\n\n await app.start({\n cliArgs,\n listen: {\n port,\n host,\n },\n });\n\n if (!opts.silent) {\n console.log(`🚀 NocoBase server running at: http://${host === '0.0.0.0' ? 'localhost' : host}:${port}/`);\n }\n};\n"]}
|
package/lib/commands/index.d.ts
CHANGED
package/lib/commands/index.js
CHANGED
|
@@ -15,8 +15,8 @@ function createCli(app) {
|
|
|
15
15
|
process.exit(1);
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
program.command('start').description('start NocoBase application').action(runSubCommand('start'));
|
|
19
|
-
program.command('install').option('-f, --force').option('-c, --clean').action(runSubCommand('install'));
|
|
18
|
+
program.command('start').description('start NocoBase application').option('-s, --silent').action(runSubCommand('start'));
|
|
19
|
+
program.command('install').option('-f, --force').option('-c, --clean').option('-s, --silent').action(runSubCommand('install'));
|
|
20
20
|
program.command('db:sync').option('-f, --force').action(runSubCommand('db-sync'));
|
|
21
21
|
program.command('console').action(runSubCommand('console'));
|
|
22
22
|
program
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AAGpC,SAAg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BAAwB,CAAC;SACrC,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC;IAE1C,OAAO,OAAO,CAAC;AACjB,CAAC;AA9BD,8BA8BC","sourcesContent":["import { Command } from 'commander';\nimport Application from '../application';\n\nexport function createCli(app: Application) {\n const program = new Command();\n\n const runSubCommand =\n (name) =>\n (...cliArgs) => {\n const command = require(`./${name}`).default;\n\n Promise.resolve()\n .then(() => {\n return command({ app, cliArgs });\n })\n .catch((error) => {\n console.error(error);\n process.exit(1);\n });\n };\n\n program.command('start').description('start NocoBase application').option('-s, --silent').action(runSubCommand('start'));\n program.command('install').option('-f, --force').option('-c, --clean').option('-s, --silent').action(runSubCommand('install'));\n program.command('db:sync').option('-f, --force').action(runSubCommand('db-sync'));\n program.command('console').action(runSubCommand('console'));\n\n program\n .command('create-plugin')\n .argument('<name>', 'name of plugin')\n .description('create NocoBase plugin')\n .action(runSubCommand('create-plugin'));\n\n return program;\n}\n"]}
|
package/lib/commands/install.js
CHANGED
|
@@ -18,17 +18,22 @@ exports.default = ({ app, cliArgs }) => __awaiter(void 0, void 0, void 0, functi
|
|
|
18
18
|
if (!(opts === null || opts === void 0 ? void 0 : opts.clean) && !(opts === null || opts === void 0 ? void 0 : opts.force)) {
|
|
19
19
|
const tables = yield app.db.sequelize.getQueryInterface().showAllTables();
|
|
20
20
|
if (tables.includes('collections')) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
if (!opts.silent) {
|
|
22
|
+
console.log();
|
|
23
|
+
console.log();
|
|
24
|
+
console.log(chalk_1.default.yellow('NocoBase is already installed. To reinstall, please execute:'));
|
|
25
|
+
console.log();
|
|
26
|
+
let command = 'yarn nocobase install -f';
|
|
27
|
+
console.log(chalk_1.default.yellow(command));
|
|
28
|
+
console.log();
|
|
29
|
+
console.log();
|
|
30
|
+
}
|
|
29
31
|
return;
|
|
30
32
|
}
|
|
31
33
|
}
|
|
34
|
+
if (!opts.silent) {
|
|
35
|
+
console.log(`NocoBase installing`);
|
|
36
|
+
}
|
|
32
37
|
yield app.install({
|
|
33
38
|
cliArgs,
|
|
34
39
|
clean: opts.clean,
|
|
@@ -39,5 +44,8 @@ exports.default = ({ app, cliArgs }) => __awaiter(void 0, void 0, void 0, functi
|
|
|
39
44
|
yield app.stop({
|
|
40
45
|
cliArgs,
|
|
41
46
|
});
|
|
47
|
+
if (!opts.silent) {
|
|
48
|
+
console.log(`NocoBase installed`);
|
|
49
|
+
}
|
|
42
50
|
});
|
|
43
51
|
//# sourceMappingURL=install.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAE1B,kBAAe,CAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAE1B,kBAAe,CAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAEvB,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAA,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAA,EAAE;QAChC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC,aAAa,EAAE,CAAC;QAC1E,IAAI,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;gBAChB,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,8DAA8D,CAAC,CAAC,CAAC;gBAC1F,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,IAAI,OAAO,GAAG,0BAA0B,CAAC;gBACzC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;gBACnC,OAAO,CAAC,GAAG,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,EAAE,CAAC;aACf;YACD,OAAO;SACR;KACF;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;KACpC;IAED,MAAM,GAAG,CAAC,OAAO,CAAC;QAChB,OAAO;QACP,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,IAAI,EAAE;YACJ,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB;KACF,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,IAAI,CAAC;QACb,OAAO;KACR,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;KACnC;AACH,CAAC,CAAA,CAAC","sourcesContent":["import chalk from 'chalk';\n\nexport default async ({ app, cliArgs }) => {\n const [opts] = cliArgs;\n\n if (!opts?.clean && !opts?.force) {\n const tables = await app.db.sequelize.getQueryInterface().showAllTables();\n if (tables.includes('collections')) {\n if (!opts.silent) {\n console.log();\n console.log();\n console.log(chalk.yellow('NocoBase is already installed. To reinstall, please execute:'));\n console.log();\n let command = 'yarn nocobase install -f';\n console.log(chalk.yellow(command));\n console.log();\n console.log();\n }\n return;\n }\n }\n\n if (!opts.silent) {\n console.log(`NocoBase installing`);\n }\n\n await app.install({\n cliArgs,\n clean: opts.clean,\n sync: {\n force: opts.force,\n },\n });\n\n await app.stop({\n cliArgs,\n });\n\n if (!opts.silent) {\n console.log(`NocoBase installed`);\n }\n};\n"]}
|
package/lib/commands/start.js
CHANGED
|
@@ -20,6 +20,8 @@ exports.default = ({ app, cliArgs }) => __awaiter(void 0, void 0, void 0, functi
|
|
|
20
20
|
host,
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
if (!opts.silent) {
|
|
24
|
+
console.log(`🚀 NocoBase server running at: http://${host === '0.0.0.0' ? 'localhost' : host}:${port}/`);
|
|
25
|
+
}
|
|
24
26
|
});
|
|
25
27
|
//# sourceMappingURL=start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,kBAAe,CAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC;IAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,SAAS,CAAC;IAE/D,MAAM,GAAG,CAAC,KAAK,CAAC;QACd,OAAO;QACP,MAAM,EAAE;YACN,IAAI;YACJ,IAAI;SACL;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,kBAAe,CAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC;IAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,SAAS,CAAC;IAE/D,MAAM,GAAG,CAAC,KAAK,CAAC;QACd,OAAO;QACP,MAAM,EAAE;YACN,IAAI;YACJ,IAAI;SACL;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,yCAAyC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC;KAC1G;AACH,CAAC,CAAA,CAAC","sourcesContent":["export default async ({ app, cliArgs }) => {\n const [opts] = cliArgs;\n const port = opts.port || process.env.SERVER_PORT || 3000;\n const host = opts.host || process.env.SERVER_HOST || '0.0.0.0';\n\n await app.start({\n cliArgs,\n listen: {\n port,\n host,\n },\n });\n\n if (!opts.silent) {\n console.log(`🚀 NocoBase server running at: http://${host === '0.0.0.0' ? 'localhost' : host}:${port}/`);\n }\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/server",
|
|
3
|
-
"version": "0.7.0-alpha.
|
|
3
|
+
"version": "0.7.0-alpha.23",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@koa/cors": "^3.1.0",
|
|
20
20
|
"@koa/router": "^9.4.0",
|
|
21
|
-
"@nocobase/acl": "0.7.0-alpha.
|
|
22
|
-
"@nocobase/actions": "0.7.0-alpha.
|
|
23
|
-
"@nocobase/database": "0.7.0-alpha.
|
|
24
|
-
"@nocobase/resourcer": "0.7.0-alpha.
|
|
21
|
+
"@nocobase/acl": "0.7.0-alpha.23",
|
|
22
|
+
"@nocobase/actions": "0.7.0-alpha.23",
|
|
23
|
+
"@nocobase/database": "0.7.0-alpha.23",
|
|
24
|
+
"@nocobase/resourcer": "0.7.0-alpha.23",
|
|
25
25
|
"chalk": "^4.1.1",
|
|
26
26
|
"commander": "^8.1.0",
|
|
27
27
|
"dotenv": "^8.2.0",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"koa-static": "^5.0.0",
|
|
33
33
|
"lodash": "^4.17.21"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "32ce4ea85201140eeb78f33f443038dfffb02083"
|
|
36
36
|
}
|