@fecommunity/reactpress-server 3.7.0 → 4.0.0-beta.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.
- package/dist/app.module.js +8 -45
- package/dist/app.module.js.map +1 -1
- package/dist/common/api-messages.d.ts +9 -0
- package/dist/common/api-messages.js +9 -0
- package/dist/common/api-messages.js.map +1 -1
- package/dist/database/typeorm-options.d.ts +3 -0
- package/dist/database/typeorm-options.js +60 -0
- package/dist/database/typeorm-options.js.map +1 -0
- package/dist/filters/http-exception.filter.js.map +1 -1
- package/dist/generate-swagger.js +1 -1
- package/dist/generate-swagger.js.map +1 -1
- package/dist/interceptors/transform.interceptor.d.ts +2 -6
- package/dist/interceptors/transform.interceptor.js +8 -3
- package/dist/interceptors/transform.interceptor.js.map +1 -1
- package/dist/logger/index.js +5 -4
- package/dist/logger/index.js.map +1 -1
- package/dist/main.js +40 -19
- package/dist/main.js.map +1 -1
- package/dist/modules/api-key/api-key.controller.js.map +1 -1
- package/dist/modules/api-key/api-key.entity.js.map +1 -1
- package/dist/modules/api-key/api-key.guard.js +2 -3
- package/dist/modules/api-key/api-key.guard.js.map +1 -1
- package/dist/modules/api-key/api-key.module.js.map +1 -1
- package/dist/modules/api-key/api-key.service.js +1 -1
- package/dist/modules/api-key/api-key.service.js.map +1 -1
- package/dist/modules/article/article-revision.entity.js +3 -3
- package/dist/modules/article/article-revision.entity.js.map +1 -1
- package/dist/modules/article/article-slug.util.d.ts +2 -0
- package/dist/modules/article/article-slug.util.js +19 -0
- package/dist/modules/article/article-slug.util.js.map +1 -0
- package/dist/modules/article/article.controller.d.ts +1 -1
- package/dist/modules/article/article.controller.js +6 -4
- package/dist/modules/article/article.controller.js.map +1 -1
- package/dist/modules/article/article.entity.d.ts +3 -0
- package/dist/modules/article/article.entity.js +23 -8
- package/dist/modules/article/article.entity.js.map +1 -1
- package/dist/modules/article/article.module.js +6 -3
- package/dist/modules/article/article.module.js.map +1 -1
- package/dist/modules/article/article.service.d.ts +9 -3
- package/dist/modules/article/article.service.js +84 -16
- package/dist/modules/article/article.service.js.map +1 -1
- package/dist/modules/article/scheduled-publish.service.js.map +1 -1
- package/dist/modules/auth/auth.controller.js.map +1 -1
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/auth.service.js +1 -1
- package/dist/modules/auth/auth.service.js.map +1 -1
- package/dist/modules/auth/jwt-auth.guard.js +1 -1
- package/dist/modules/auth/jwt-auth.guard.js.map +1 -1
- package/dist/modules/auth/jwt.strategy.js +1 -1
- package/dist/modules/auth/jwt.strategy.js.map +1 -1
- package/dist/modules/auth/roles.guard.js.map +1 -1
- package/dist/modules/bootstrap/bootstrap.constants.d.ts +20 -0
- package/dist/modules/bootstrap/bootstrap.constants.js +171 -0
- package/dist/modules/bootstrap/bootstrap.constants.js.map +1 -0
- package/dist/modules/bootstrap/bootstrap.service.d.ts +22 -0
- package/dist/modules/bootstrap/bootstrap.service.js +183 -0
- package/dist/modules/bootstrap/bootstrap.service.js.map +1 -0
- package/dist/modules/bootstrap/install-locale.d.ts +2 -0
- package/dist/modules/bootstrap/install-locale.js +11 -0
- package/dist/modules/bootstrap/install-locale.js.map +1 -0
- package/dist/modules/category/category.controller.js.map +1 -1
- package/dist/modules/category/category.entity.js +1 -1
- package/dist/modules/category/category.entity.js.map +1 -1
- package/dist/modules/category/category.module.js.map +1 -1
- package/dist/modules/category/category.service.js +1 -1
- package/dist/modules/category/category.service.js.map +1 -1
- package/dist/modules/comment/comment.controller.js.map +1 -1
- package/dist/modules/comment/comment.entity.js +3 -3
- package/dist/modules/comment/comment.entity.js.map +1 -1
- package/dist/modules/comment/comment.module.js +1 -1
- package/dist/modules/comment/comment.module.js.map +1 -1
- package/dist/modules/comment/comment.service.d.ts +3 -1
- package/dist/modules/comment/comment.service.js +20 -4
- package/dist/modules/comment/comment.service.js.map +1 -1
- package/dist/modules/comment/html.d.ts +1 -1
- package/dist/modules/comment/html.js +1 -1
- package/dist/modules/comment/html.js.map +1 -1
- package/dist/modules/extension/extension.module.d.ts +9 -0
- package/dist/modules/extension/extension.module.js +50 -0
- package/dist/modules/extension/extension.module.js.map +1 -0
- package/dist/modules/extension/plugin-loader.service.d.ts +12 -0
- package/dist/modules/extension/plugin-loader.service.js +96 -0
- package/dist/modules/extension/plugin-loader.service.js.map +1 -0
- package/dist/modules/extension/plugin-registry.bridge.d.ts +3 -0
- package/dist/modules/extension/plugin-registry.bridge.js +44 -0
- package/dist/modules/extension/plugin-registry.bridge.js.map +1 -0
- package/dist/modules/extension/plugin.controller.d.ts +22 -0
- package/dist/modules/extension/plugin.controller.js +155 -0
- package/dist/modules/extension/plugin.controller.js.map +1 -0
- package/dist/modules/extension/plugin.service.d.ts +52 -0
- package/dist/modules/extension/plugin.service.js +391 -0
- package/dist/modules/extension/plugin.service.js.map +1 -0
- package/dist/modules/extension/preview-draft.store.d.ts +13 -0
- package/dist/modules/extension/preview-draft.store.js +41 -0
- package/dist/modules/extension/preview-draft.store.js.map +1 -0
- package/dist/modules/extension/theme-registry.bridge.d.ts +56 -0
- package/dist/modules/extension/theme-registry.bridge.js +46 -0
- package/dist/modules/extension/theme-registry.bridge.js.map +1 -0
- package/dist/modules/extension/theme.controller.d.ts +66 -0
- package/dist/modules/extension/theme.controller.js +301 -0
- package/dist/modules/extension/theme.controller.js.map +1 -0
- package/dist/modules/extension/theme.service.d.ts +140 -0
- package/dist/modules/extension/theme.service.js +1039 -0
- package/dist/modules/extension/theme.service.js.map +1 -0
- package/dist/modules/file/file-optimization.controller.d.ts +12 -0
- package/dist/modules/file/file-optimization.controller.js +79 -0
- package/dist/modules/file/file-optimization.controller.js.map +1 -0
- package/dist/modules/file/file-optimization.service.d.ts +36 -0
- package/dist/modules/file/file-optimization.service.js +385 -0
- package/dist/modules/file/file-optimization.service.js.map +1 -0
- package/dist/modules/file/file-optimization.types.d.ts +66 -0
- package/dist/modules/file/file-optimization.types.js +5 -0
- package/dist/modules/file/file-optimization.types.js.map +1 -0
- package/dist/modules/file/file.controller.d.ts +1 -1
- package/dist/modules/file/file.controller.js +5 -4
- package/dist/modules/file/file.controller.js.map +1 -1
- package/dist/modules/file/file.entity.d.ts +7 -0
- package/dist/modules/file/file.entity.js +5 -0
- package/dist/modules/file/file.entity.js.map +1 -1
- package/dist/modules/file/file.module.js +15 -3
- package/dist/modules/file/file.module.js.map +1 -1
- package/dist/modules/file/file.service.d.ts +5 -1
- package/dist/modules/file/file.service.js +62 -17
- package/dist/modules/file/file.service.js.map +1 -1
- package/dist/modules/file/image-optimizer-plugin.guard.d.ts +7 -0
- package/dist/modules/file/image-optimizer-plugin.guard.js +33 -0
- package/dist/modules/file/image-optimizer-plugin.guard.js.map +1 -0
- package/dist/modules/health/health.controller.js +2 -4
- package/dist/modules/health/health.controller.js.map +1 -1
- package/dist/modules/health/health.module.js.map +1 -1
- package/dist/modules/hook/hook.module.d.ts +2 -0
- package/dist/modules/hook/hook.module.js +22 -0
- package/dist/modules/hook/hook.module.js.map +1 -0
- package/dist/modules/hook/hook.service.d.ts +26 -0
- package/dist/modules/hook/hook.service.js +105 -0
- package/dist/modules/hook/hook.service.js.map +1 -0
- package/dist/modules/knowledge/knowledge.controller.js.map +1 -1
- package/dist/modules/knowledge/knowledge.entity.js +5 -5
- package/dist/modules/knowledge/knowledge.entity.js.map +1 -1
- package/dist/modules/knowledge/knowledge.module.js.map +1 -1
- package/dist/modules/knowledge/knowledge.service.js +1 -1
- package/dist/modules/knowledge/knowledge.service.js.map +1 -1
- package/dist/modules/page/page.controller.js.map +1 -1
- package/dist/modules/page/page.entity.js +5 -5
- package/dist/modules/page/page.entity.js.map +1 -1
- package/dist/modules/page/page.module.js.map +1 -1
- package/dist/modules/page/page.service.js +3 -4
- package/dist/modules/page/page.service.js.map +1 -1
- package/dist/modules/search/search.controller.js.map +1 -1
- package/dist/modules/search/search.entity.js.map +1 -1
- package/dist/modules/search/search.module.js.map +1 -1
- package/dist/modules/search/search.service.js.map +1 -1
- package/dist/modules/setting/setting.constant.d.ts +4 -2
- package/dist/modules/setting/setting.constant.js +3 -19
- package/dist/modules/setting/setting.constant.js.map +1 -1
- package/dist/modules/setting/setting.controller.js.map +1 -1
- package/dist/modules/setting/setting.entity.d.ts +3 -0
- package/dist/modules/setting/setting.entity.js +15 -0
- package/dist/modules/setting/setting.entity.js.map +1 -1
- package/dist/modules/setting/setting.module.js.map +1 -1
- package/dist/modules/setting/setting.service.d.ts +13 -2
- package/dist/modules/setting/setting.service.js +167 -22
- package/dist/modules/setting/setting.service.js.map +1 -1
- package/dist/modules/smtp/mail.util.d.ts +7 -6
- package/dist/modules/smtp/mail.util.js +5 -9
- package/dist/modules/smtp/mail.util.js.map +1 -1
- package/dist/modules/smtp/smtp.controller.d.ts +3 -0
- package/dist/modules/smtp/smtp.controller.js +13 -0
- package/dist/modules/smtp/smtp.controller.js.map +1 -1
- package/dist/modules/smtp/smtp.entity.js.map +1 -1
- package/dist/modules/smtp/smtp.module.js.map +1 -1
- package/dist/modules/smtp/smtp.service.d.ts +14 -0
- package/dist/modules/smtp/smtp.service.js +37 -10
- package/dist/modules/smtp/smtp.service.js.map +1 -1
- package/dist/modules/tag/tag.controller.js.map +1 -1
- package/dist/modules/tag/tag.entity.js +1 -1
- package/dist/modules/tag/tag.entity.js.map +1 -1
- package/dist/modules/tag/tag.module.js.map +1 -1
- package/dist/modules/tag/tag.service.js +1 -1
- package/dist/modules/tag/tag.service.js.map +1 -1
- package/dist/modules/user/user.controller.js +9 -1
- package/dist/modules/user/user.controller.js.map +1 -1
- package/dist/modules/user/user.entity.js +2 -2
- package/dist/modules/user/user.entity.js.map +1 -1
- package/dist/modules/user/user.module.js.map +1 -1
- package/dist/modules/user/user.service.js +4 -1
- package/dist/modules/user/user.service.js.map +1 -1
- package/dist/modules/view/view.controller.js.map +1 -1
- package/dist/modules/view/view.entity.js.map +1 -1
- package/dist/modules/view/view.module.js.map +1 -1
- package/dist/modules/view/view.service.js.map +1 -1
- package/dist/modules/webhook/webhook.controller.js.map +1 -1
- package/dist/modules/webhook/webhook.entity.js.map +1 -1
- package/dist/modules/webhook/webhook.module.js.map +1 -1
- package/dist/modules/webhook/webhook.service.d.ts +1 -1
- package/dist/modules/webhook/webhook.service.js +5 -2
- package/dist/modules/webhook/webhook.service.js.map +1 -1
- package/dist/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
- package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
- package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
- package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
- package/dist/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
- package/dist/starter.d.ts +2 -1
- package/dist/starter.js +184 -11
- package/dist/starter.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils/image-processor.util.d.ts +23 -0
- package/dist/utils/image-processor.util.js +88 -0
- package/dist/utils/image-processor.util.js.map +1 -0
- package/dist/utils/local-api-quiet.util.d.ts +1 -0
- package/dist/utils/local-api-quiet.util.js +8 -0
- package/dist/utils/local-api-quiet.util.js.map +1 -0
- package/dist/utils/markdown.util.js +1 -1
- package/dist/utils/markdown.util.js.map +1 -1
- package/dist/utils/oss/aliyun-oss-client.d.ts +3 -1
- package/dist/utils/oss/aliyun-oss-client.js +5 -0
- package/dist/utils/oss/aliyun-oss-client.js.map +1 -1
- package/dist/utils/oss/oss-client.d.ts +3 -1
- package/dist/utils/oss/oss-client.js.map +1 -1
- package/dist/utils/oss.util.d.ts +3 -1
- package/dist/utils/oss.util.js +5 -1
- package/dist/utils/oss.util.js.map +1 -1
- package/dist/utils/project-root.util.d.ts +2 -0
- package/dist/utils/project-root.util.js +42 -0
- package/dist/utils/project-root.util.js.map +1 -0
- package/dist/utils/upload.util.d.ts +6 -2
- package/dist/utils/upload.util.js +23 -8
- package/dist/utils/upload.util.js.map +1 -1
- package/dist/utils/user.util.d.ts +1 -0
- package/dist/utils/user.util.js +6 -2
- package/dist/utils/user.util.js.map +1 -1
- package/package.json +8 -9
- package/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
- package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
- package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
- package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
- package/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../src/modules/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,qCAAwC;AACxC,+CAAkD;AAElD,8DAA0D;AAC1D,qDAAiD;AACjD,qDAAiD;AACjD,uDAAmD;AACnD,iDAA6C;AAC7C,iDAA6C;AAE7C,MAAM,UAAU,GAAG,yBAAc,CAAC,QAAQ,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC;AACvE,MAAM,SAAS,GAAG,eAAS,CAAC,QAAQ,CAAC;IACnC,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;CACjC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../src/modules/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,qCAAwC;AACxC,+CAAkD;AAElD,8DAA0D;AAC1D,qDAAiD;AACjD,qDAAiD;AACjD,uDAAmD;AACnD,iDAA6C;AAC7C,iDAA6C;AAE7C,MAAM,UAAU,GAAG,yBAAc,CAAC,QAAQ,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC;AACvE,MAAM,SAAS,GAAG,eAAS,CAAC,QAAQ,CAAC;IACnC,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;CACjC,CAAC,CAAC;AAcI,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,UAAU;IAZtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,UAAU;YACV,SAAS;YACT,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC;YAC/B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;SAC7B;QACD,SAAS,EAAE,CAAC,0BAAW,EAAE,0BAAW,CAAC;QACrC,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;KACjC,CAAC;GACW,UAAU,CAAG;AAAb,gCAAU"}
|
|
@@ -10,11 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AuthService = void 0;
|
|
13
|
-
const api_messages_1 = require("../../common/api-messages");
|
|
14
13
|
const common_1 = require("@nestjs/common");
|
|
15
14
|
const config_1 = require("@nestjs/config");
|
|
16
15
|
const jwt_1 = require("@nestjs/jwt");
|
|
17
16
|
const axios_1 = require("axios");
|
|
17
|
+
const api_messages_1 = require("../../common/api-messages");
|
|
18
18
|
const uniqueid_util_1 = require("../../utils/uniqueid.util");
|
|
19
19
|
const setting_service_1 = require("../setting/setting.service");
|
|
20
20
|
const smtp_service_1 = require("../smtp/smtp.service");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../src/modules/auth/auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
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,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBAChD,OAAO,GAAG,CAAC;aACZ;iBAAM;gBACL,MAAM,IAAI,sBAAa,CAAC,qBAAM,CAAC,qBAAqB,EAAE,mBAAU,CAAC,WAAW,CAAC,CAAC;aAC/E;SACF;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,sBAAa,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,EAAE,mBAAU,CAAC,WAAW,CAAC,CAAC;SACjE;IACH,CAAC;CACF,CAAA;AA1GY,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAGqB,0BAAW;QACZ,gBAAU;QACP,sBAAa;QACZ,gCAAc;QACjB,0BAAW;GANhC,WAAW,CA0GvB;AA1GY,kCAAW"}
|
|
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.JwtAuthGuard = void 0;
|
|
10
|
-
const api_messages_1 = require("../../common/api-messages");
|
|
11
10
|
const common_1 = require("@nestjs/common");
|
|
12
11
|
const passport_1 = require("@nestjs/passport");
|
|
12
|
+
const api_messages_1 = require("../../common/api-messages");
|
|
13
13
|
let JwtAuthGuard = class JwtAuthGuard extends (0, passport_1.AuthGuard)('jwt') {
|
|
14
14
|
getRequest(context) {
|
|
15
15
|
const ctx = context.switchToHttp();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt-auth.guard.js","sourceRoot":"","sources":["../../../src/modules/auth/jwt-auth.guard.ts"],"names":[],"mappings":";;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"jwt-auth.guard.js","sourceRoot":"","sources":["../../../src/modules/auth/jwt-auth.guard.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAqF;AACrF,+CAA6C;AAE7C,4DAAmD;AAG5C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,IAAA,oBAAS,EAAC,KAAK,CAAC;IAChD,UAAU,CAAC,OAAyB;QAClC,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;QACjC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,aAAa,CAAO,GAAG,EAAE,IAAU;QACjC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;YAChB,MAAM,IAAI,8BAAqB,CAAC,qBAAM,CAAC,WAAW,CAAC,CAAC;SACrD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AAbY,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAaxB;AAbY,oCAAY"}
|
|
@@ -10,10 +10,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.JwtStrategy = void 0;
|
|
13
|
-
const api_messages_1 = require("../../common/api-messages");
|
|
14
13
|
const common_1 = require("@nestjs/common");
|
|
15
14
|
const passport_1 = require("@nestjs/passport");
|
|
16
15
|
const passport_jwt_1 = require("passport-jwt");
|
|
16
|
+
const api_messages_1 = require("../../common/api-messages");
|
|
17
17
|
const auth_service_1 = require("./auth.service");
|
|
18
18
|
let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
19
19
|
constructor(authService) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../../src/modules/auth/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"jwt.strategy.js","sourceRoot":"","sources":["../../../src/modules/auth/jwt.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAmE;AACnE,+CAAoD;AACpD,+CAAoD;AAEpD,4DAAmD;AAEnD,iDAA6C;AAGtC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,IAAA,2BAAgB,EAAC,uBAAQ,CAAC;IACzD,YAA6B,WAAwB;QACnD,KAAK,CAAC;YACJ,cAAc,EAAE,yBAAU,CAAC,2BAA2B,EAAE;YACxD,WAAW,EAAE,YAAY;SAC1B,CAAC,CAAC;QAJwB,gBAAW,GAAX,WAAW,CAAa;IAKrD,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAa;QAC1B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAE1D,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,IAAI,8BAAqB,CAAC,qBAAM,CAAC,WAAW,CAAC,CAAC;SACrD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AAhBY,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAE+B,0BAAW;GAD1C,WAAW,CAgBvB;AAhBY,kCAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.guard.js","sourceRoot":"","sources":["../../../src/modules/auth/roles.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwF;AACxF,uCAAyC;AACzC,qCAAyC;AAIlC,MAAM,KAAK,GAAG,CAAC,GAAG,KAAe,EAAE,EAAE,CAAC,IAAA,oBAAW,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAA5D,QAAA,KAAK,SAAuD;
|
|
1
|
+
{"version":3,"file":"roles.guard.js","sourceRoot":"","sources":["../../../src/modules/auth/roles.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwF;AACxF,uCAAyC;AACzC,qCAAyC;AAIlC,MAAM,KAAK,GAAG,CAAC,GAAG,KAAe,EAAE,EAAE,CAAC,IAAA,oBAAW,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAA5D,QAAA,KAAK,SAAuD;AAGlE,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,YAA6B,SAAoB,EAAmB,UAAsB;QAA7D,cAAS,GAAT,SAAS,CAAW;QAAmB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE9F,WAAW,CAAC,OAAyB;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAW,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,IAAI,CAAC;SACb;QACD,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;QAEpD,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC;QAE1C,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAExB,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;SAChC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAS,CAAC;QACnD,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,KAAK,CAAC;SACd;QACD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC;IACtC,CAAC;CACF,CAAA;AAxBY,UAAU;IADtB,IAAA,mBAAU,GAAE;qCAE6B,gBAAS,EAA+B,gBAAU;GAD/E,UAAU,CAwBtB;AAxBY,gCAAU"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InstallLocale } from './install-locale';
|
|
2
|
+
export declare const HELLO_WORLD_SEED_MARKER = "reactpress-seed:v4";
|
|
3
|
+
export declare const HELLO_WORLD_LEGACY_TITLES: readonly ["Hello World", "世界,您好!"];
|
|
4
|
+
export declare function getHelloWorldSeed(locale: InstallLocale): {
|
|
5
|
+
markdown: string;
|
|
6
|
+
systemTitle: string;
|
|
7
|
+
systemSubTitle: string;
|
|
8
|
+
seoKeyword: string;
|
|
9
|
+
seoDesc: string;
|
|
10
|
+
articleTitle: string;
|
|
11
|
+
category: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
};
|
|
15
|
+
tags: readonly {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
export declare function getSystemSettingSeedDefaults(locale: InstallLocale): Record<string, string>;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSystemSettingSeedDefaults = exports.getHelloWorldSeed = exports.HELLO_WORLD_LEGACY_TITLES = exports.HELLO_WORLD_SEED_MARKER = void 0;
|
|
4
|
+
exports.HELLO_WORLD_SEED_MARKER = 'reactpress-seed:v4';
|
|
5
|
+
exports.HELLO_WORLD_LEGACY_TITLES = ['Hello World', '世界,您好!'];
|
|
6
|
+
const SHARED_QUICK_START = `\`\`\`bash
|
|
7
|
+
npm i -g @fecommunity/reactpress@3
|
|
8
|
+
mkdir my-blog && cd my-blog
|
|
9
|
+
reactpress init
|
|
10
|
+
reactpress dev
|
|
11
|
+
\`\`\``;
|
|
12
|
+
const SEED_BY_LOCALE = {
|
|
13
|
+
zh: {
|
|
14
|
+
systemTitle: 'ReactPress',
|
|
15
|
+
systemSubTitle: '又一个 ReactPress 站点',
|
|
16
|
+
seoKeyword: 'React,博客,CMS,ReactPress',
|
|
17
|
+
seoDesc: '又一个 ReactPress 站点。',
|
|
18
|
+
articleTitle: '世界,您好!',
|
|
19
|
+
category: { label: '未分类', value: 'uncategorized' },
|
|
20
|
+
tags: [
|
|
21
|
+
{ label: 'ReactPress', value: 'reactpress' },
|
|
22
|
+
{ label: '入门', value: 'getting-started' },
|
|
23
|
+
{ label: 'CMS', value: 'cms' },
|
|
24
|
+
],
|
|
25
|
+
markdown: `# 世界,您好!
|
|
26
|
+
|
|
27
|
+
欢迎光临 ReactPress。这是您的第一篇示例文章,同时演示 Markdown 常用写法。编辑或删掉它,然后开始写作吧!
|
|
28
|
+
|
|
29
|
+
这是一个普通段落。段落之间用**空行**分隔,行内可以写 **粗体**、*斜体*、~~删除线~~ 和 \`行内代码\`。
|
|
30
|
+
|
|
31
|
+
## 什么是 ReactPress?
|
|
32
|
+
|
|
33
|
+
**ReactPress 3.0** 是基于 React、Next.js 与 NestJS 的现代化全栈发布平台。安装 CLI 后执行 \`init\` 与 \`dev\`,即可获得前台站点、管理后台与 API,无需手写复杂配置或手动接数据库。
|
|
34
|
+
|
|
35
|
+
> **一个内容中心,多种呈现方式。** 在同一后台发布内容,通过 Web、管理端或 Headless API 展示。
|
|
36
|
+
|
|
37
|
+
### 列表示例
|
|
38
|
+
|
|
39
|
+
无序列表:
|
|
40
|
+
|
|
41
|
+
- 编辑或删除本篇示例文章
|
|
42
|
+
- 在「外观」中切换主题
|
|
43
|
+
- 在「设置」中配置站点信息
|
|
44
|
+
|
|
45
|
+
有序列表:
|
|
46
|
+
|
|
47
|
+
1. 安装 CLI 并初始化项目
|
|
48
|
+
2. 运行 \`reactpress dev\` 启动开发环境
|
|
49
|
+
3. 运行 \`reactpress doctor\` 做环境诊断
|
|
50
|
+
|
|
51
|
+
#### 图片与链接
|
|
52
|
+
|
|
53
|
+
站点 Logo 示例(可将 \`/logo.png\` 换成媒体库中的地址):
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
项目链接:[ReactPress 项目主页](https://github.com/fecommunity/reactpress)
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 快速开始
|
|
62
|
+
|
|
63
|
+
${SHARED_QUICK_START}
|
|
64
|
+
|
|
65
|
+
| 服务 | 说明 |
|
|
66
|
+
| :--- | :--- |
|
|
67
|
+
| 前台站点 | \`http://localhost:3001\` |
|
|
68
|
+
| 管理后台 | \`http://localhost:3001/admin\` |
|
|
69
|
+
| API | \`http://localhost:3002/api\` |
|
|
70
|
+
|
|
71
|
+
代码块示例:
|
|
72
|
+
|
|
73
|
+
\`\`\`js
|
|
74
|
+
console.log('Hello ReactPress');
|
|
75
|
+
\`\`\`
|
|
76
|
+
|
|
77
|
+
> 提示:使用后台编辑器工具栏可快速插入标题、图片、表格与代码块;右侧栏可设置分类、标签与发布选项。
|
|
78
|
+
|
|
79
|
+
祝您使用愉快!`,
|
|
80
|
+
},
|
|
81
|
+
en: {
|
|
82
|
+
systemTitle: 'ReactPress',
|
|
83
|
+
systemSubTitle: 'Just another ReactPress site',
|
|
84
|
+
seoKeyword: 'React,blog,CMS,ReactPress',
|
|
85
|
+
seoDesc: 'Just another ReactPress site.',
|
|
86
|
+
articleTitle: 'Hello World',
|
|
87
|
+
category: { label: 'Uncategorized', value: 'uncategorized' },
|
|
88
|
+
tags: [
|
|
89
|
+
{ label: 'ReactPress', value: 'reactpress' },
|
|
90
|
+
{ label: 'Getting Started', value: 'getting-started' },
|
|
91
|
+
{ label: 'CMS', value: 'cms' },
|
|
92
|
+
],
|
|
93
|
+
markdown: `# Hello World
|
|
94
|
+
|
|
95
|
+
Welcome to ReactPress. This is your first sample post and a quick tour of common Markdown syntax. Edit or delete it, then start writing!
|
|
96
|
+
|
|
97
|
+
This is a normal paragraph. Separate paragraphs with a **blank line**. Inline styles: **bold**, *italic*, ~~strikethrough~~, and \`inline code\`.
|
|
98
|
+
|
|
99
|
+
## What is ReactPress?
|
|
100
|
+
|
|
101
|
+
**ReactPress** is a modern publishing platform built with React, Next.js, and NestJS. Run \`init\` and \`dev\` after installing the CLI to get a public site, admin console, and API — without hand-writing config or wiring a database yourself.
|
|
102
|
+
|
|
103
|
+
> **One backend, many fronts.** Publish in one place; show content on the web, in admin, or through your own apps via the API.
|
|
104
|
+
|
|
105
|
+
### Lists
|
|
106
|
+
|
|
107
|
+
Bullet list:
|
|
108
|
+
|
|
109
|
+
- Edit or delete this sample post
|
|
110
|
+
- Switch themes under Appearance
|
|
111
|
+
- Configure your site under Settings
|
|
112
|
+
|
|
113
|
+
Numbered list:
|
|
114
|
+
|
|
115
|
+
1. Install the CLI and initialize a project
|
|
116
|
+
2. Run \`reactpress dev\` to start developing
|
|
117
|
+
3. Run \`reactpress doctor\` for environment diagnostics
|
|
118
|
+
|
|
119
|
+
#### Images and links
|
|
120
|
+
|
|
121
|
+
Site logo example (replace \`/logo.png\` with a URL from the media library):
|
|
122
|
+
|
|
123
|
+

|
|
124
|
+
|
|
125
|
+
Project link: [ReactPress on GitHub](https://github.com/fecommunity/reactpress)
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Quick start
|
|
130
|
+
|
|
131
|
+
${SHARED_QUICK_START}
|
|
132
|
+
|
|
133
|
+
| Service | URL |
|
|
134
|
+
| :------ | :-- |
|
|
135
|
+
| Public site | \`http://localhost:3001\` |
|
|
136
|
+
| Admin | \`http://localhost:3001/admin\` |
|
|
137
|
+
| API | \`http://localhost:3002/api\` |
|
|
138
|
+
|
|
139
|
+
Code block example:
|
|
140
|
+
|
|
141
|
+
\`\`\`js
|
|
142
|
+
console.log('Hello ReactPress');
|
|
143
|
+
\`\`\`
|
|
144
|
+
|
|
145
|
+
> Tip: Use the admin editor toolbar for headings, images, tables, and code blocks. Set category, tags, and publish options in the sidebar.
|
|
146
|
+
|
|
147
|
+
Happy publishing!`,
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
function getHelloWorldSeed(locale) {
|
|
151
|
+
const seed = SEED_BY_LOCALE[locale];
|
|
152
|
+
const marker = `<!-- ${exports.HELLO_WORLD_SEED_MARKER}:${locale} -->`;
|
|
153
|
+
return Object.assign(Object.assign({}, seed), { markdown: `${marker}\n${seed.markdown}` });
|
|
154
|
+
}
|
|
155
|
+
exports.getHelloWorldSeed = getHelloWorldSeed;
|
|
156
|
+
function getSystemSettingSeedDefaults(locale) {
|
|
157
|
+
const seed = SEED_BY_LOCALE[locale];
|
|
158
|
+
return {
|
|
159
|
+
systemTitle: seed.systemTitle,
|
|
160
|
+
systemSubTitle: seed.systemSubTitle,
|
|
161
|
+
systemLogo: '/logo.png',
|
|
162
|
+
systemFavicon: '/favicon.png',
|
|
163
|
+
systemNoticeInfo: '[]',
|
|
164
|
+
seoKeyword: seed.seoKeyword,
|
|
165
|
+
seoDesc: seed.seoDesc,
|
|
166
|
+
baiduAnalyticsId: '',
|
|
167
|
+
googleAnalyticsId: '',
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
exports.getSystemSettingSeedDefaults = getSystemSettingSeedDefaults;
|
|
171
|
+
//# sourceMappingURL=bootstrap.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.constants.js","sourceRoot":"","sources":["../../../src/modules/bootstrap/bootstrap.constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAG,oBAAoB,CAAC;AAE/C,QAAA,yBAAyB,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAU,CAAC;AAE5E,MAAM,kBAAkB,GAAG;;;;;OAKpB,CAAC;AAER,MAAM,cAAc,GAYhB;IACF,EAAE,EAAE;QACF,WAAW,EAAE,YAAY;QACzB,cAAc,EAAE,mBAAmB;QACnC,UAAU,EAAE,yBAAyB;QACrC,OAAO,EAAE,oBAAoB;QAC7B,YAAY,EAAE,QAAQ;QACtB,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE;QAClD,IAAI,EAAE;YACJ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;YAC5C,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,iBAAiB,EAAE;YACzC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;SAC/B;QACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,EAAE,EAAE;KACtB,CAAC;AACJ,CAAC;AAbD,oEAaC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import { Repository } from 'typeorm';
|
|
4
|
+
import { ArticleService } from '../article/article.service';
|
|
5
|
+
import { Article } from '../article/article.entity';
|
|
6
|
+
import { Category } from '../category/category.entity';
|
|
7
|
+
import { Tag } from '../tag/tag.entity';
|
|
8
|
+
export declare class BootstrapService implements OnModuleInit {
|
|
9
|
+
private readonly articleRepository;
|
|
10
|
+
private readonly categoryRepository;
|
|
11
|
+
private readonly tagRepository;
|
|
12
|
+
private readonly articleService;
|
|
13
|
+
private readonly configService;
|
|
14
|
+
private readonly logger;
|
|
15
|
+
constructor(articleRepository: Repository<Article>, categoryRepository: Repository<Category>, tagRepository: Repository<Tag>, articleService: ArticleService, configService: ConfigService);
|
|
16
|
+
onModuleInit(): void;
|
|
17
|
+
private resolveLocale;
|
|
18
|
+
private runFirstRunBootstrap;
|
|
19
|
+
seedHelloWorldArticle(): Promise<void>;
|
|
20
|
+
private findOrCreateCategory;
|
|
21
|
+
private findOrCreateTag;
|
|
22
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var BootstrapService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.BootstrapService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const config_1 = require("@nestjs/config");
|
|
19
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
20
|
+
const typeorm_2 = require("typeorm");
|
|
21
|
+
const markdown_util_1 = require("../../utils/markdown.util");
|
|
22
|
+
const article_service_1 = require("../article/article.service");
|
|
23
|
+
const article_entity_1 = require("../article/article.entity");
|
|
24
|
+
const category_entity_1 = require("../category/category.entity");
|
|
25
|
+
const tag_entity_1 = require("../tag/tag.entity");
|
|
26
|
+
const bootstrap_constants_1 = require("./bootstrap.constants");
|
|
27
|
+
const install_locale_1 = require("./install-locale");
|
|
28
|
+
function extractSummary(markdown) {
|
|
29
|
+
var _a;
|
|
30
|
+
const plain = (_a = markdown
|
|
31
|
+
.replace(/^<!--.*-->$/gm, '')
|
|
32
|
+
.replace(/^#+\s+.*$/gm, '')
|
|
33
|
+
.replace(/\*\*([^*]+)\*\*/g, '$1')
|
|
34
|
+
.replace(/`([^`]+)`/g, '$1')
|
|
35
|
+
.replace(/^\d+\.\s+/gm, '')
|
|
36
|
+
.replace(/^>\s+.*/gm, '')
|
|
37
|
+
.replace(/^---$/gm, '')
|
|
38
|
+
.trim()
|
|
39
|
+
.split('\n\n')
|
|
40
|
+
.find((block) => block.trim() && !block.startsWith('```'))) !== null && _a !== void 0 ? _a : '';
|
|
41
|
+
const line = plain.replace(/\n/g, ' ').trim();
|
|
42
|
+
if (!line)
|
|
43
|
+
return '';
|
|
44
|
+
return line.length > 160 ? `${line.slice(0, 157)}...` : line;
|
|
45
|
+
}
|
|
46
|
+
function needsTocRepair(toc) {
|
|
47
|
+
if (!(toc === null || toc === void 0 ? void 0 : toc.trim()))
|
|
48
|
+
return true;
|
|
49
|
+
try {
|
|
50
|
+
const parsed = JSON.parse(toc);
|
|
51
|
+
if (!Array.isArray(parsed) || parsed.length === 0)
|
|
52
|
+
return true;
|
|
53
|
+
const first = parsed[0];
|
|
54
|
+
return Array.isArray(first) || !(first && typeof first === 'object' && 'id' in first);
|
|
55
|
+
}
|
|
56
|
+
catch (_a) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function needsContentRefresh(content, locale) {
|
|
61
|
+
if (!(content === null || content === void 0 ? void 0 : content.trim()))
|
|
62
|
+
return true;
|
|
63
|
+
const marker = `<!-- ${bootstrap_constants_1.HELLO_WORLD_SEED_MARKER}:${locale} -->`;
|
|
64
|
+
if (content.includes(marker))
|
|
65
|
+
return false;
|
|
66
|
+
return (content.includes('## English') ||
|
|
67
|
+
content.includes('## 中文') ||
|
|
68
|
+
content.includes('Hello World / 欢迎使用') ||
|
|
69
|
+
content.includes('reactpress-seed:'));
|
|
70
|
+
}
|
|
71
|
+
const HELLO_WORLD_COVER = '/logo.png';
|
|
72
|
+
function ensureHelloWorldHomeRecommend(article) {
|
|
73
|
+
var _a;
|
|
74
|
+
let changed = false;
|
|
75
|
+
if (!article.isRecommended) {
|
|
76
|
+
article.isRecommended = true;
|
|
77
|
+
changed = true;
|
|
78
|
+
}
|
|
79
|
+
if (!((_a = article.cover) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
80
|
+
article.cover = HELLO_WORLD_COVER;
|
|
81
|
+
changed = true;
|
|
82
|
+
}
|
|
83
|
+
return changed;
|
|
84
|
+
}
|
|
85
|
+
let BootstrapService = BootstrapService_1 = class BootstrapService {
|
|
86
|
+
constructor(articleRepository, categoryRepository, tagRepository, articleService, configService) {
|
|
87
|
+
this.articleRepository = articleRepository;
|
|
88
|
+
this.categoryRepository = categoryRepository;
|
|
89
|
+
this.tagRepository = tagRepository;
|
|
90
|
+
this.articleService = articleService;
|
|
91
|
+
this.configService = configService;
|
|
92
|
+
this.logger = new common_1.Logger(BootstrapService_1.name);
|
|
93
|
+
}
|
|
94
|
+
onModuleInit() {
|
|
95
|
+
void this.runFirstRunBootstrap();
|
|
96
|
+
}
|
|
97
|
+
resolveLocale() {
|
|
98
|
+
return (0, install_locale_1.resolveInstallLocale)(this.configService.get('REACTPRESS_LANG') || this.configService.get('LANG'));
|
|
99
|
+
}
|
|
100
|
+
async runFirstRunBootstrap() {
|
|
101
|
+
try {
|
|
102
|
+
await this.seedHelloWorldArticle();
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
this.logger.error('First-run bootstrap failed', error instanceof Error ? error.stack : String(error));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async seedHelloWorldArticle() {
|
|
109
|
+
const locale = this.resolveLocale();
|
|
110
|
+
const seed = (0, bootstrap_constants_1.getHelloWorldSeed)(locale);
|
|
111
|
+
const { html, toc } = (0, markdown_util_1.marked)(seed.markdown);
|
|
112
|
+
const summary = extractSummary(seed.markdown);
|
|
113
|
+
const existing = await this.articleRepository.findOne({
|
|
114
|
+
where: { title: (0, typeorm_2.In)([...bootstrap_constants_1.HELLO_WORLD_LEGACY_TITLES, seed.articleTitle]) },
|
|
115
|
+
});
|
|
116
|
+
if (existing) {
|
|
117
|
+
const refreshContent = needsContentRefresh(existing.content, locale);
|
|
118
|
+
const refreshToc = needsTocRepair(existing.toc);
|
|
119
|
+
const refreshRecommend = ensureHelloWorldHomeRecommend(existing);
|
|
120
|
+
if (!refreshContent && !refreshToc && !refreshRecommend)
|
|
121
|
+
return;
|
|
122
|
+
if (refreshContent) {
|
|
123
|
+
existing.title = seed.articleTitle;
|
|
124
|
+
existing.content = seed.markdown;
|
|
125
|
+
existing.summary = summary;
|
|
126
|
+
}
|
|
127
|
+
if (refreshContent || refreshToc) {
|
|
128
|
+
existing.html = html;
|
|
129
|
+
existing.toc = toc;
|
|
130
|
+
}
|
|
131
|
+
await this.articleRepository.save(existing);
|
|
132
|
+
this.logger.log(`Hello World sample article updated (${locale})`);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if ((await this.articleRepository.count()) > 0)
|
|
136
|
+
return;
|
|
137
|
+
const category = await this.findOrCreateCategory(seed.category);
|
|
138
|
+
const tags = await Promise.all(seed.tags.map((tag) => this.findOrCreateTag(tag)));
|
|
139
|
+
await this.articleService.create({
|
|
140
|
+
title: seed.articleTitle,
|
|
141
|
+
content: seed.markdown,
|
|
142
|
+
html,
|
|
143
|
+
toc,
|
|
144
|
+
summary,
|
|
145
|
+
status: 'publish',
|
|
146
|
+
cover: HELLO_WORLD_COVER,
|
|
147
|
+
category: category.id,
|
|
148
|
+
tags: tags.map((tag) => tag.id).join(','),
|
|
149
|
+
isRecommended: true,
|
|
150
|
+
isCommentable: true,
|
|
151
|
+
});
|
|
152
|
+
this.logger.log(`Hello World sample article seeded (${locale})`);
|
|
153
|
+
}
|
|
154
|
+
async findOrCreateCategory(def) {
|
|
155
|
+
var _a;
|
|
156
|
+
let category = (_a = (await this.categoryRepository.findOne({ where: { value: def.value } }))) !== null && _a !== void 0 ? _a : (await this.categoryRepository.findOne({ where: { label: def.label } }));
|
|
157
|
+
if (category)
|
|
158
|
+
return category;
|
|
159
|
+
category = this.categoryRepository.create(def);
|
|
160
|
+
return this.categoryRepository.save(category);
|
|
161
|
+
}
|
|
162
|
+
async findOrCreateTag(def) {
|
|
163
|
+
var _a;
|
|
164
|
+
let tag = (_a = (await this.tagRepository.findOne({ where: { value: def.value } }))) !== null && _a !== void 0 ? _a : (await this.tagRepository.findOne({ where: { label: def.label } }));
|
|
165
|
+
if (tag)
|
|
166
|
+
return tag;
|
|
167
|
+
tag = this.tagRepository.create(def);
|
|
168
|
+
return this.tagRepository.save(tag);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
BootstrapService = BootstrapService_1 = __decorate([
|
|
172
|
+
(0, common_1.Injectable)(),
|
|
173
|
+
__param(0, (0, typeorm_1.InjectRepository)(article_entity_1.Article)),
|
|
174
|
+
__param(1, (0, typeorm_1.InjectRepository)(category_entity_1.Category)),
|
|
175
|
+
__param(2, (0, typeorm_1.InjectRepository)(tag_entity_1.Tag)),
|
|
176
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
177
|
+
typeorm_2.Repository,
|
|
178
|
+
typeorm_2.Repository,
|
|
179
|
+
article_service_1.ArticleService,
|
|
180
|
+
config_1.ConfigService])
|
|
181
|
+
], BootstrapService);
|
|
182
|
+
exports.BootstrapService = BootstrapService;
|
|
183
|
+
//# sourceMappingURL=bootstrap.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.service.js","sourceRoot":"","sources":["../../../src/modules/bootstrap/bootstrap.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAkE;AAClE,2CAA+C;AAC/C,6CAAmD;AACnD,qCAAyC;AAEzC,6DAAmD;AACnD,gEAA4D;AAC5D,8DAAoD;AACpD,iEAAuD;AACvD,kDAAwC;AACxC,+DAI+B;AAC/B,qDAAuE;AAEvE,SAAS,cAAc,CAAC,QAAgB;;IACtC,MAAM,KAAK,GAAG,MAAA,QAAQ;SACnB,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC5B,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;SAC1B,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC;SACjC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;SAC1B,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;SACxB,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;SACtB,IAAI,EAAE;SACN,KAAK,CAAC,MAAM,CAAC;SACb,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IA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AgB,EAAC,wBAAO,CAAC,CAAA;IAEzB,WAAA,IAAA,0BAAgB,EAAC,0BAAQ,CAAC,CAAA;IAE1B,WAAA,IAAA,0BAAgB,EAAC,gBAAG,CAAC,CAAA;qCAHc,oBAAU;QAET,oBAAU;QAEf,oBAAU;QACT,gCAAc;QACf,sBAAa;GAXpC,gBAAgB,CA0G5B;AA1GY,4CAAgB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveInstallLocale = void 0;
|
|
4
|
+
function resolveInstallLocale(raw) {
|
|
5
|
+
const code = String(raw || process.env.REACTPRESS_LANG || process.env.LANG || 'en')
|
|
6
|
+
.split(/[._-]/)[0]
|
|
7
|
+
.toLowerCase();
|
|
8
|
+
return code === 'zh' ? 'zh' : 'en';
|
|
9
|
+
}
|
|
10
|
+
exports.resolveInstallLocale = resolveInstallLocale;
|
|
11
|
+
//# sourceMappingURL=install-locale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-locale.js","sourceRoot":"","sources":["../../../src/modules/bootstrap/install-locale.ts"],"names":[],"mappings":";;;AAGA,SAAgB,oBAAoB,CAAC,GAAY;IAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;SAChF,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;SACjB,WAAW,EAAE,CAAC;IACjB,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACrC,CAAC;AALD,oDAKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.controller.js","sourceRoot":"","sources":["../../../src/modules/category/category.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAq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YAAG,GAAE;IACG,WAAA,IAAA,cAAK,GAAE,CAAA;;;;iDAEf;AAMD;IAAC,IAAA,YAAG,EAAC,KAAK,CAAC;IACD,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;kDAEpB;AAOD;IAAC,IAAA,cAAK,EAAC,KAAK,CAAC;IACZ,IAAA,mBAAK,EAAC,OAAO,CAAC;IACd,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACZ,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAM,WAAA,IAAA,aAAI,GAAE,CAAA;;;;oDAElC;AAMD;IAAC,IAAA,eAAM,EAAC,KAAK,CAAC;IACb,IAAA,mBAAK,EAAC,OAAO,CAAC;IACd,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACZ,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;oDAEtB;AArDU,kBAAkB;IAH9B,IAAA,iBAAO,EAAC,UAAU,CAAC;IACnB,IAAA,mBAAU,EAAC,UAAU,CAAC;IACtB,IAAA,kBAAS,EAAC,wBAAU,CAAC;qCAE0B,kCAAe;GADlD,kBAAkB,CAsD9B;AAtDY,gDAAkB"}
|
|
@@ -31,7 +31,7 @@ __decorate([
|
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], Category.prototype, "value", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
(0, swagger_1.ApiProperty)(),
|
|
34
|
+
(0, swagger_1.ApiProperty)({ type: () => article_entity_1.Article, isArray: true }),
|
|
35
35
|
(0, typeorm_1.OneToMany)(() => article_entity_1.Article, (article) => article.category),
|
|
36
36
|
__metadata("design:type", Array)
|
|
37
37
|
], Category.prototype, "articles", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../src/modules/category/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qCAAgH;AAEhH,8DAAoD;
|
|
1
|
+
{"version":3,"file":"category.entity.js","sourceRoot":"","sources":["../../../src/modules/category/category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qCAAgH;AAEhH,8DAAoD;AAG7C,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAmCpB,CAAA;AAlCC;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,gCAAsB,EAAC,MAAM,CAAC;;oCACpB;AAEX;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,gBAAM,GAAE;;uCACK;AAEd;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,gBAAM,GAAE;;uCACK;AAEd;IAAC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,wBAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACnD,IAAA,mBAAS,EACR,GAAG,EAAE,CAAC,wBAAO,EACb,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAC9B;8BACS,KAAK;0CAAU;AAEzB;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAgB,EAAC;QAChB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,WAAW;KAClB,CAAC;8BACQ,IAAI;0CAAC;AAEf;IAAC,IAAA,qBAAW,GAAE;IACb,IAAA,0BAAgB,EAAC;QAChB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,WAAW;KAClB,CAAC;8BACQ,IAAI;0CAAC;AAlCJ,QAAQ;IADpB,IAAA,gBAAM,GAAE;GACI,QAAQ,CAmCpB;AAnCY,4BAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.module.js","sourceRoot":"","sources":["../../../src/modules/category/category.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAEhD,qDAAiD;AACjD,+DAA2D;AAC3D,uDAA6C;AAC7C,yDAAqD;
|
|
1
|
+
{"version":3,"file":"category.module.js","sourceRoot":"","sources":["../../../src/modules/category/category.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAEhD,qDAAiD;AACjD,+DAA2D;AAC3D,uDAA6C;AAC7C,yDAAqD;AAQ9C,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,cAAc;IAN1B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,0BAAQ,CAAC,CAAC,EAAE,wBAAU,CAAC;QAC3D,OAAO,EAAE,CAAC,kCAAe,CAAC;QAC1B,SAAS,EAAE,CAAC,kCAAe,CAAC;QAC5B,WAAW,EAAE,CAAC,wCAAkB,CAAC;KAClC,CAAC;GACW,cAAc,CAAG;AAAjB,wCAAc"}
|
|
@@ -13,10 +13,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CategoryService = void 0;
|
|
16
|
-
const api_messages_1 = require("../../common/api-messages");
|
|
17
16
|
const common_1 = require("@nestjs/common");
|
|
18
17
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
18
|
const typeorm_2 = require("typeorm");
|
|
19
|
+
const api_messages_1 = require("../../common/api-messages");
|
|
20
20
|
const category_entity_1 = require("./category.entity");
|
|
21
21
|
let CategoryService = class CategoryService {
|
|
22
22
|
constructor(categoryRepository) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.service.js","sourceRoot":"","sources":["../../../src/modules/category/category.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"category.service.js","sourceRoot":"","sources":["../../../src/modules/category/category.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuE;AACvE,6CAAmD;AACnD,qCAAqC;AAErC,4DAAmD;AACn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AAmB,EAAE,mBAAU,CAAC,WAAW,CAAC,CAAC;SAC7E;IACH,CAAC;CACF,CAAA;AAhGY,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,0BAAQ,CAAC,CAAA;qCACU,oBAAU;GAHtC,eAAe,CAgG3B;AAhGY,0CAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.controller.js","sourceRoot":"","sources":["../../../src/modules/comment/comment.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8G;AAC9G,6CAAuD;AAEvD,2DAAsD;AACtD,qDAAwD;AACxD,qDAA2C;AAC3C,uDAAmD;
|
|
1
|
+
{"version":3,"file":"comment.controller.js","sourceRoot":"","sources":["../../../src/modules/comment/comment.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8G;AAC9G,6CAAuD;AAEvD,2DAAsD;AACtD,qDAAwD;AACxD,qDAA2C;AAC3C,uDAAmD;AAK5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YAA6B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAS/D,MAAM,CAAY,GAAG,EAAU,OAAO;QACpC,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAMD,OAAO,CAAU,WAAW;QAC1B,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;IAOD,QAAQ,CAAc,EAAE;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC1C,CAAC;IAOD,kBAAkB,CAAkB,MAAM,EAAW,KAAK;QACxD,OAAO,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAA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C,IAAI,CAAC,CAAA;;;;mDAEtB;AA9DU,iBAAiB;IAH7B,IAAA,iBAAO,EAAC,SAAS,CAAC;IAClB,IAAA,mBAAU,EAAC,SAAS,CAAC;IACrB,IAAA,kBAAS,EAAC,wBAAU,CAAC;qCAEyB,gCAAc;GADhD,iBAAiB,CA+D7B;AA/DY,8CAAiB"}
|
|
@@ -36,12 +36,12 @@ __decorate([
|
|
|
36
36
|
], Comment.prototype, "avatar", void 0);
|
|
37
37
|
__decorate([
|
|
38
38
|
(0, swagger_1.ApiProperty)(),
|
|
39
|
-
(0, typeorm_1.Column)({ type: '
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'text', default: null }),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], Comment.prototype, "content", void 0);
|
|
42
42
|
__decorate([
|
|
43
43
|
(0, swagger_1.ApiProperty)(),
|
|
44
|
-
(0, typeorm_1.Column)({ type: '
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'text', default: null }),
|
|
45
45
|
__metadata("design:type", String)
|
|
46
46
|
], Comment.prototype, "html", void 0);
|
|
47
47
|
__decorate([
|
|
@@ -51,7 +51,7 @@ __decorate([
|
|
|
51
51
|
], Comment.prototype, "pass", void 0);
|
|
52
52
|
__decorate([
|
|
53
53
|
(0, swagger_1.ApiProperty)(),
|
|
54
|
-
(0, typeorm_1.Column)({ type: '
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'text', default: null }),
|
|
55
55
|
__metadata("design:type", String)
|
|
56
56
|
], Comment.prototype, "userAgent", void 0);
|
|
57
57
|
__decorate([
|