@nocobase/server 0.7.0-alpha.2 → 0.7.0-alpha.20
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/install.js
CHANGED
|
@@ -7,8 +7,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import chalk from 'chalk';
|
|
10
11
|
export default ({ app, cliArgs }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
11
12
|
const [opts] = cliArgs;
|
|
13
|
+
if (!(opts === null || opts === void 0 ? void 0 : opts.clean) || !(opts === null || opts === void 0 ? void 0 : opts.force)) {
|
|
14
|
+
const tables = yield app.db.sequelize.getQueryInterface().showAllTables();
|
|
15
|
+
if (tables.includes('collections')) {
|
|
16
|
+
console.log();
|
|
17
|
+
console.log();
|
|
18
|
+
console.log(chalk.yellow('NocoBase is already installed. To reinstall, please execute:'));
|
|
19
|
+
console.log();
|
|
20
|
+
let command = 'yarn nocobase install -f';
|
|
21
|
+
console.log(chalk.yellow(command));
|
|
22
|
+
console.log();
|
|
23
|
+
console.log();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
12
27
|
yield app.install({
|
|
13
28
|
cliArgs,
|
|
14
29
|
clean: opts.clean,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":";;;;;;;;;AAAA,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,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,8DAA8D,CAAC,CAAC,CAAC;YAC1F,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,IAAI,OAAO,GAAG,0BAA0B,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACnC,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO;SACR;KACF;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;IACH,MAAM,GAAG,CAAC,IAAI,CAAC;QACb,OAAO;KACR,CAAC,CAAC;AACL,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 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 return;\n }\n }\n\n await app.install({\n cliArgs,\n clean: opts.clean,\n sync: {\n force: opts.force,\n },\n });\n await app.stop({\n cliArgs,\n });\n};\n"]}
|
package/lib/commands/install.js
CHANGED
|
@@ -8,9 +8,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
12
16
|
exports.default = ({ app, cliArgs }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
17
|
const [opts] = cliArgs;
|
|
18
|
+
if (!(opts === null || opts === void 0 ? void 0 : opts.clean) || !(opts === null || opts === void 0 ? void 0 : opts.force)) {
|
|
19
|
+
const tables = yield app.db.sequelize.getQueryInterface().showAllTables();
|
|
20
|
+
if (tables.includes('collections')) {
|
|
21
|
+
console.log();
|
|
22
|
+
console.log();
|
|
23
|
+
console.log(chalk_1.default.yellow('NocoBase is already installed. To reinstall, please execute:'));
|
|
24
|
+
console.log();
|
|
25
|
+
let command = 'yarn nocobase install -f';
|
|
26
|
+
console.log(chalk_1.default.yellow(command));
|
|
27
|
+
console.log();
|
|
28
|
+
console.log();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
14
32
|
yield app.install({
|
|
15
33
|
cliArgs,
|
|
16
34
|
clean: opts.clean,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"
|
|
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,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,8DAA8D,CAAC,CAAC,CAAC;YAC1F,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,IAAI,OAAO,GAAG,0BAA0B,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACnC,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,OAAO;SACR;KACF;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;IACH,MAAM,GAAG,CAAC,IAAI,CAAC;QACb,OAAO;KACR,CAAC,CAAC;AACL,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 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 return;\n }\n }\n\n await app.install({\n cliArgs,\n clean: opts.clean,\n sync: {\n force: opts.force,\n },\n });\n await app.stop({\n cliArgs,\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.20",
|
|
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.20",
|
|
22
|
+
"@nocobase/actions": "0.7.0-alpha.20",
|
|
23
|
+
"@nocobase/database": "0.7.0-alpha.20",
|
|
24
|
+
"@nocobase/resourcer": "0.7.0-alpha.20",
|
|
25
25
|
"commander": "^8.1.0",
|
|
26
26
|
"dotenv": "^8.2.0",
|
|
27
27
|
"find-package-json": "^1.2.0",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"koa-static": "^5.0.0",
|
|
32
32
|
"lodash": "^4.17.21"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "d2e0cbdb5d26ba66e87a9d7660b10f3ec30a3c4b"
|
|
35
35
|
}
|