@fecommunity/reactpress 3.0.0 → 3.0.2
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/README.md +67 -21
- package/bin/reactpress.js +8 -5
- package/dist/index.js +0 -0
- package/lib/api-dev.js +4 -4
- package/lib/bootstrap.js +2 -2
- package/lib/build.js +130 -13
- package/lib/dev.js +2 -14
- package/lib/i18n/strings.js +32 -2
- package/lib/lifecycle.js +8 -8
- package/lib/paths.js +39 -19
- package/lib/pm2.js +2 -2
- package/lib/publish.js +9 -0
- package/lib/root.js +63 -6
- package/lib/spawn.js +15 -10
- package/lib/status.js +1 -1
- package/package.json +7 -4
- package/server/dist/app.module.js +1 -26
- package/server/dist/app.module.js.map +1 -1
- package/server/dist/modules/article/article.controller.d.ts +1 -6
- package/server/dist/modules/article/article.controller.js +1 -45
- package/server/dist/modules/article/article.controller.js.map +1 -1
- package/server/dist/modules/article/article.entity.d.ts +0 -1
- package/server/dist/modules/article/article.entity.js +0 -5
- package/server/dist/modules/article/article.entity.js.map +1 -1
- package/server/dist/modules/article/article.module.js +2 -14
- package/server/dist/modules/article/article.module.js.map +1 -1
- package/server/dist/modules/article/article.service.d.ts +1 -9
- package/server/dist/modules/article/article.service.js +5 -59
- package/server/dist/modules/article/article.service.js.map +1 -1
- package/server/dist/modules/auth/auth.service.js +3 -4
- package/server/dist/modules/auth/auth.service.js.map +1 -1
- package/server/dist/modules/auth/jwt-auth.guard.js +1 -2
- package/server/dist/modules/auth/jwt-auth.guard.js.map +1 -1
- package/server/dist/modules/auth/jwt.strategy.js +1 -2
- package/server/dist/modules/auth/jwt.strategy.js.map +1 -1
- package/server/dist/modules/category/category.service.js +2 -3
- package/server/dist/modules/category/category.service.js.map +1 -1
- package/server/dist/modules/comment/comment.module.js +1 -10
- package/server/dist/modules/comment/comment.module.js.map +1 -1
- package/server/dist/modules/comment/comment.service.d.ts +1 -3
- package/server/dist/modules/comment/comment.service.js +5 -15
- package/server/dist/modules/comment/comment.service.js.map +1 -1
- package/server/dist/modules/knowledge/knowledge.service.js +2 -3
- package/server/dist/modules/knowledge/knowledge.service.js.map +1 -1
- package/server/dist/modules/page/page.service.js +1 -2
- package/server/dist/modules/page/page.service.js.map +1 -1
- package/server/dist/modules/smtp/smtp.service.js +1 -2
- package/server/dist/modules/smtp/smtp.service.js.map +1 -1
- package/server/dist/modules/tag/tag.service.js +2 -3
- package/server/dist/modules/tag/tag.service.js.map +1 -1
- package/server/dist/modules/user/user.controller.js +3 -4
- package/server/dist/modules/user/user.controller.js.map +1 -1
- package/server/dist/modules/user/user.service.js +9 -10
- package/server/dist/modules/user/user.service.js.map +1 -1
- package/server/dist/starter.js +1 -1
- package/server/dist/tsconfig.build.tsbuildinfo +11335 -11537
- package/server/dist/utils/oss.util.js +1 -2
- package/server/dist/utils/oss.util.js.map +1 -1
- package/templates/env.default +1 -1
- package/templates/package.json +3 -2
- package/ui/banner.js +2 -2
- package/ui/interactive.js +20 -4
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Oss = void 0;
|
|
4
|
-
const api_messages_1 = require("../common/api-messages");
|
|
5
4
|
const common_1 = require("@nestjs/common");
|
|
6
5
|
const aliyun_oss_client_1 = require("./oss/aliyun-oss-client");
|
|
7
6
|
class Oss {
|
|
@@ -22,7 +21,7 @@ class Oss {
|
|
|
22
21
|
const data = await this.settingService.findAll(true);
|
|
23
22
|
const config = JSON.parse(data.oss);
|
|
24
23
|
if (!config) {
|
|
25
|
-
throw new common_1.HttpException(
|
|
24
|
+
throw new common_1.HttpException('OSS 配置不完善,无法进行操作', common_1.HttpStatus.BAD_REQUEST);
|
|
26
25
|
}
|
|
27
26
|
return config;
|
|
28
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oss.util.js","sourceRoot":"","sources":["../../src/utils/oss.util.ts"],"names":[],"mappings":";;;A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YAAY,EAAE,CAAC;QACzC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,GAAW;QAC1B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QACzC,MAAM,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;CACF;AApDD,kBAoDC"}
|
package/templates/env.default
CHANGED
package/templates/package.json
CHANGED
package/ui/banner.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
const { brand } = require('./theme');
|
|
3
|
-
const { getMonorepoRoot } = require('../lib/root');
|
|
4
3
|
const path = require('path');
|
|
4
|
+
const { getCliPackageRoot } = require('../lib/paths');
|
|
5
5
|
const { t } = require('../lib/i18n');
|
|
6
6
|
|
|
7
7
|
function printBanner() {
|
|
8
|
-
const version = require(path.join(
|
|
8
|
+
const version = require(path.join(getCliPackageRoot(), 'package.json')).version;
|
|
9
9
|
console.log('');
|
|
10
10
|
console.log(brand.primary(' ╭─────────────────────────────────────────╮'));
|
|
11
11
|
console.log(
|
package/ui/interactive.js
CHANGED
|
@@ -10,7 +10,7 @@ const { runLifecycleCommand } = require('../lib/lifecycle');
|
|
|
10
10
|
const { runDockerCommand } = require('../lib/docker');
|
|
11
11
|
const { printUnifiedStatus } = require('../lib/status');
|
|
12
12
|
const { runDoctor } = require('../lib/doctor');
|
|
13
|
-
const { runBuild } = require('../lib/build');
|
|
13
|
+
const { runBuild, TARGETS } = require('../lib/build');
|
|
14
14
|
const { runNodeScript } = require('../lib/spawn');
|
|
15
15
|
const { getClientBin } = require('../lib/paths');
|
|
16
16
|
const { loadClientSiteUrl } = require('../lib/http');
|
|
@@ -64,7 +64,7 @@ async function runMenuAction(action, projectRoot) {
|
|
|
64
64
|
await runApiDev(projectRoot);
|
|
65
65
|
return false;
|
|
66
66
|
case 'dev:client':
|
|
67
|
-
await runNodeScript(getClientBin(), [], { cwd: projectRoot });
|
|
67
|
+
await runNodeScript(getClientBin(projectRoot), [], { cwd: projectRoot });
|
|
68
68
|
return false;
|
|
69
69
|
case 'server:start': {
|
|
70
70
|
const code = await runLifecycleCommand('start', projectRoot);
|
|
@@ -79,9 +79,25 @@ async function runMenuAction(action, projectRoot) {
|
|
|
79
79
|
if (code !== 0) process.exit(code);
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
82
|
-
case 'build':
|
|
83
|
-
|
|
82
|
+
case 'build': {
|
|
83
|
+
const buildChoices = TARGETS.map((target) => ({
|
|
84
|
+
name:
|
|
85
|
+
target === 'all'
|
|
86
|
+
? t('menu.buildAll')
|
|
87
|
+
: t(`build.label.${target}`),
|
|
88
|
+
value: target,
|
|
89
|
+
}));
|
|
90
|
+
const { target } = await inquirer.prompt([
|
|
91
|
+
{
|
|
92
|
+
type: 'list',
|
|
93
|
+
name: 'target',
|
|
94
|
+
message: t('menu.buildTarget'),
|
|
95
|
+
choices: buildChoices,
|
|
96
|
+
},
|
|
97
|
+
]);
|
|
98
|
+
await runBuild(target, projectRoot);
|
|
84
99
|
return true;
|
|
100
|
+
}
|
|
85
101
|
case 'docker:start':
|
|
86
102
|
await runDockerCommand('start', projectRoot);
|
|
87
103
|
return false;
|