cc-core-cli 1.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.
- package/README.md +107 -0
- package/admin/.env +10 -0
- package/admin/docker-compose.yml +9 -0
- package/bin/index.js +113 -0
- package/genpkg/core-lib/package.json +49 -0
- package/package.json +28 -0
- package/template/media/system/icons/company.svg +1 -0
- package/template/media/system/icons/deploy.svg +2 -0
- package/template/media/system/icons/entities.svg +55 -0
- package/template/media/system/icons/gateway.svg +1 -0
- package/template/media/system/icons/import-export.svg +41 -0
- package/template/media/system/icons/integration.svg +1 -0
- package/template/media/system/icons/master_data.svg +53 -0
- package/template/media/system/icons/monitoring.svg +114 -0
- package/template/media/system/icons/provider.svg +1 -0
- package/template/media/system/icons/report.svg +69 -0
- package/template/media/system/icons/schedule.svg +1 -0
- package/template/media/system/icons/security.svg +1 -0
- package/template/media/system/icons/storage.svg +1 -0
- package/template/media/system/icons/template.svg +44 -0
- package/template/media/system/icons/theme-layout.svg +1 -0
- package/template/newrelic.sh +15 -0
- package/template/package-lock.json +13944 -0
- package/template/package.json +165 -0
- package/template/src/app.controller.ts +33 -0
- package/template/src/app.module.ts +163 -0
- package/template/src/app.service.ts +21 -0
- package/template/src/app_cluster.service.ts +58 -0
- package/template/src/core/core.controller.ts +410 -0
- package/template/src/core/core.module.ts +86 -0
- package/template/src/core/core.service.ts +715 -0
- package/template/src/core/setting/_settings/about.layout.json +49 -0
- package/template/src/core/setting/_settings/cache.layout.json +309 -0
- package/template/src/core/setting/_settings/schedule.layout.json +132 -0
- package/template/src/core/setting/_settings/security.layout.json +1622 -0
- package/template/src/core/setting/_settings/storage.layout.json +520 -0
- package/template/src/core/setting/_settings/swagger.layout.json +128 -0
- package/template/src/core/setting/_settings/theme_layout.layout.json +1195 -0
- package/template/src/main.ts +299 -0
- package/template/src/modules/modules.ts +16 -0
- package/template/tsconfig.build.json +4 -0
- package/template/tsconfig.json +22 -0
- package/template/version.json +5 -0
- package/template_admin/.env +10 -0
- package/template_admin/README.md +29 -0
- package/template_admin/config/service-account.json +1 -0
- package/template_admin/index.js +63 -0
- package/template_admin/newrelic.js +78 -0
- package/template_admin/next.config.js +76 -0
- package/template_admin/package-lock.json +7379 -0
- package/template_admin/package.json +23 -0
- package/template_admin/pages/404.js +13 -0
- package/template_admin/pages/[...url_key].js +21 -0
- package/template_admin/pages/_app.js +10 -0
- package/template_admin/pages/_document.js +43 -0
- package/template_admin/pages/callback.js +13 -0
- package/template_admin/pages/cognito.js +13 -0
- package/template_admin/pages/confirmpassword.js +12 -0
- package/template_admin/pages/forgotpassword.js +12 -0
- package/template_admin/pages/index.js +13 -0
- package/template_admin/pages/login.js +13 -0
- package/template_admin/pages/maintenance.js +12 -0
- package/template_admin/pages/newrelic.js +78 -0
- package/template_admin/pages/password_expired.js +13 -0
- package/template_admin/pages/permission_denied.js +13 -0
- package/template_admin/pages/profile.js +14 -0
- package/template_admin/pages/setting/[...setting_url_key].js +13 -0
- package/template_admin/pages/setting/entities/[subList]/detail.js +14 -0
- package/template_admin/pages/setting/entities/[subList]/detail_compare.js +8 -0
- package/template_admin/pages/setting/entities/[subList]/index.js +7 -0
- package/template_admin/pages/setting/entities/detail/index.js +14 -0
- package/template_admin/pages/setting/entities/index.js +14 -0
- package/template_admin/pages/social.js +13 -0
- package/template_admin/pages/token_expired.js +12 -0
- package/template_admin/public/icon-192x192.png +0 -0
- package/template_admin/public/icon-256x256.png +0 -0
- package/template_admin/public/icon-384x384.png +0 -0
- package/template_admin/public/icon-512x512.png +0 -0
- package/template_admin/public/manifest.json +32 -0
- package/template_admin/public/static/images/aws-cognito.png +0 -0
- package/template_admin/public/static/images/bin_icon.svg +1 -0
- package/template_admin/public/static/images/color-picker.png +0 -0
- package/template_admin/public/static/images/csv_icon.svg +1 -0
- package/template_admin/public/static/images/default-file.png +0 -0
- package/template_admin/public/static/images/default-img.png +0 -0
- package/template_admin/public/static/images/default-map.png +0 -0
- package/template_admin/public/static/images/default-profile.png +0 -0
- package/template_admin/public/static/images/doc_icon.svg +1 -0
- package/template_admin/public/static/images/exe_icon.svg +1 -0
- package/template_admin/public/static/images/gif_icon.svg +1 -0
- package/template_admin/public/static/images/google.png +0 -0
- package/template_admin/public/static/images/id-connect.png +0 -0
- package/template_admin/public/static/images/iso_icon.svg +1 -0
- package/template_admin/public/static/images/json_icon.png +0 -0
- package/template_admin/public/static/images/lang/af-ZA.svg +41 -0
- package/template_admin/public/static/images/lang/ar-AE.svg +38 -0
- package/template_admin/public/static/images/lang/ar-BH.svg +36 -0
- package/template_admin/public/static/images/lang/ar-DZ.svg +40 -0
- package/template_admin/public/static/images/lang/ar-EG.svg +38 -0
- package/template_admin/public/static/images/lang/ar-IQ.svg +46 -0
- package/template_admin/public/static/images/lang/ar-JO.svg +39 -0
- package/template_admin/public/static/images/lang/ar-KW.svg +38 -0
- package/template_admin/public/static/images/lang/ar-LB.svg +40 -0
- package/template_admin/public/static/images/lang/ar-LY.svg +41 -0
- package/template_admin/public/static/images/lang/ar-MA.svg +36 -0
- package/template_admin/public/static/images/lang/ar-OM.svg +70 -0
- package/template_admin/public/static/images/lang/ar-QA.svg +36 -0
- package/template_admin/public/static/images/lang/ar-SA.svg +62 -0
- package/template_admin/public/static/images/lang/ar-TN.svg +40 -0
- package/template_admin/public/static/images/lang/ar-YE.svg +37 -0
- package/template_admin/public/static/images/lang/az-AZ.svg +41 -0
- package/template_admin/public/static/images/lang/be-BY.svg +38 -0
- package/template_admin/public/static/images/lang/bg-BG.svg +37 -0
- package/template_admin/public/static/images/lang/bs-BA.svg +48 -0
- package/template_admin/public/static/images/lang/ca-ES.svg +89 -0
- package/template_admin/public/static/images/lang/cs-CZ.svg +37 -0
- package/template_admin/public/static/images/lang/cy-GB.svg +43 -0
- package/template_admin/public/static/images/lang/da-DK.svg +36 -0
- package/template_admin/public/static/images/lang/de-AT.svg +39 -0
- package/template_admin/public/static/images/lang/de-CH.svg +36 -0
- package/template_admin/public/static/images/lang/de-DE.svg +37 -0
- package/template_admin/public/static/images/lang/de-LI.svg +45 -0
- package/template_admin/public/static/images/lang/de-LU.svg +37 -0
- package/template_admin/public/static/images/lang/dv-MV.svg +37 -0
- package/template_admin/public/static/images/lang/el-GR.svg +46 -0
- package/template_admin/public/static/images/lang/en-AU.svg +51 -0
- package/template_admin/public/static/images/lang/en-BZ.svg +196 -0
- package/template_admin/public/static/images/lang/en-CA.svg +43 -0
- package/template_admin/public/static/images/lang/en-GB.svg +43 -0
- package/template_admin/public/static/images/lang/en-IE.svg +37 -0
- package/template_admin/public/static/images/lang/en-JM.svg +40 -0
- package/template_admin/public/static/images/lang/en-NZ.svg +51 -0
- package/template_admin/public/static/images/lang/en-PH.svg +51 -0
- package/template_admin/public/static/images/lang/en-SG.svg +44 -0
- package/template_admin/public/static/images/lang/en-TT.svg +40 -0
- package/template_admin/public/static/images/lang/en-US.svg +88 -0
- package/template_admin/public/static/images/lang/en-ZA.svg +41 -0
- package/template_admin/public/static/images/lang/en-ZW.svg +50 -0
- package/template_admin/public/static/images/lang/es-AR.svg +41 -0
- package/template_admin/public/static/images/lang/es-BO.svg +101 -0
- package/template_admin/public/static/images/lang/es-CL.svg +38 -0
- package/template_admin/public/static/images/lang/es-CO.svg +37 -0
- package/template_admin/public/static/images/lang/es-CR.svg +111 -0
- package/template_admin/public/static/images/lang/es-DO.svg +103 -0
- package/template_admin/public/static/images/lang/es-EC.svg +87 -0
- package/template_admin/public/static/images/lang/es-ES.svg +89 -0
- package/template_admin/public/static/images/lang/es-GT.svg +109 -0
- package/template_admin/public/static/images/lang/es-HN.svg +46 -0
- package/template_admin/public/static/images/lang/es-MX.svg +60 -0
- package/template_admin/public/static/images/lang/es-NI.svg +82 -0
- package/template_admin/public/static/images/lang/es-PA.svg +41 -0
- package/template_admin/public/static/images/lang/es-PE.svg +37 -0
- package/template_admin/public/static/images/lang/es-PR.svg +43 -0
- package/template_admin/public/static/images/lang/es-PY.svg +41 -0
- package/template_admin/public/static/images/lang/es-SV.svg +115 -0
- package/template_admin/public/static/images/lang/es-UY.svg +75 -0
- package/template_admin/public/static/images/lang/es-VE.svg +49 -0
- package/template_admin/public/static/images/lang/et-EE.svg +37 -0
- package/template_admin/public/static/images/lang/eu-ES.svg +89 -0
- package/template_admin/public/static/images/lang/fa-IR.svg +81 -0
- package/template_admin/public/static/images/lang/fi-FI.svg +36 -0
- package/template_admin/public/static/images/lang/fr-BE.svg +37 -0
- package/template_admin/public/static/images/lang/fr-CA.svg +43 -0
- package/template_admin/public/static/images/lang/fr-CH.svg +36 -0
- package/template_admin/public/static/images/lang/fr-FR.svg +37 -0
- package/template_admin/public/static/images/lang/fr-LU.svg +37 -0
- package/template_admin/public/static/images/lang/fr-MC.svg +36 -0
- package/template_admin/public/static/images/lang/gl-ES.svg +89 -0
- package/template_admin/public/static/images/lang/gu-IN.svg +59 -0
- package/template_admin/public/static/images/lang/he-IL.svg +37 -0
- package/template_admin/public/static/images/lang/hi-IN.svg +59 -0
- package/template_admin/public/static/images/lang/hr-BA.svg +48 -0
- package/template_admin/public/static/images/lang/hr-HR.svg +101 -0
- package/template_admin/public/static/images/lang/hu-HU.svg +37 -0
- package/template_admin/public/static/images/lang/hy-AM.svg +37 -0
- package/template_admin/public/static/images/lang/id-ID.svg +36 -0
- package/template_admin/public/static/images/lang/is-IS.svg +37 -0
- package/template_admin/public/static/images/lang/it-CH.svg +36 -0
- package/template_admin/public/static/images/lang/it-IT.svg +37 -0
- package/template_admin/public/static/images/lang/ja-JP.svg +36 -0
- package/template_admin/public/static/images/lang/ka-GE.svg +42 -0
- package/template_admin/public/static/images/lang/kk-KZ.svg +72 -0
- package/template_admin/public/static/images/lang/kn-IN.svg +59 -0
- package/template_admin/public/static/images/lang/ko-KR.svg +57 -0
- package/template_admin/public/static/images/lang/kok-IN.svg +59 -0
- package/template_admin/public/static/images/lang/ky-KG.svg +54 -0
- package/template_admin/public/static/images/lang/lt-LT.svg +37 -0
- package/template_admin/public/static/images/lang/lv-LV.svg +36 -0
- package/template_admin/public/static/images/lang/mi-NZ.svg +51 -0
- package/template_admin/public/static/images/lang/mk-MK.svg +46 -0
- package/template_admin/public/static/images/lang/mn-MN.svg +50 -0
- package/template_admin/public/static/images/lang/mr-IN.svg +59 -0
- package/template_admin/public/static/images/lang/ms-BN.svg +47 -0
- package/template_admin/public/static/images/lang/ms-MY.svg +53 -0
- package/template_admin/public/static/images/lang/mt-MT.svg +50 -0
- package/template_admin/public/static/images/lang/nb-NO.svg +37 -0
- package/template_admin/public/static/images/lang/nl-BE.svg +37 -0
- package/template_admin/public/static/images/lang/nl-NL.svg +37 -0
- package/template_admin/public/static/images/lang/nn-NO.svg +37 -0
- package/template_admin/public/static/images/lang/ns-ZA.svg +41 -0
- package/template_admin/public/static/images/lang/pa-IN.svg +59 -0
- package/template_admin/public/static/images/lang/pl-PL.svg +36 -0
- package/template_admin/public/static/images/lang/ps-AR.svg +68 -0
- package/template_admin/public/static/images/lang/pt-BR.svg +51 -0
- package/template_admin/public/static/images/lang/pt-PT.svg +55 -0
- package/template_admin/public/static/images/lang/qu-BO.svg +101 -0
- package/template_admin/public/static/images/lang/qu-EC.svg +87 -0
- package/template_admin/public/static/images/lang/qu-PE.svg +37 -0
- package/template_admin/public/static/images/lang/ro-RO.svg +37 -0
- package/template_admin/public/static/images/lang/ru-RU.svg +37 -0
- package/template_admin/public/static/images/lang/sa-IN.svg +59 -0
- package/template_admin/public/static/images/lang/se-FI.svg +36 -0
- package/template_admin/public/static/images/lang/se-NO.svg +37 -0
- package/template_admin/public/static/images/lang/se-SE.svg +36 -0
- package/template_admin/public/static/images/lang/sk-SK.svg +41 -0
- package/template_admin/public/static/images/lang/sl-SI.svg +51 -0
- package/template_admin/public/static/images/lang/sq-AL.svg +36 -0
- package/template_admin/public/static/images/lang/sr-BA.svg +48 -0
- package/template_admin/public/static/images/lang/sr-SP.svg +79 -0
- package/template_admin/public/static/images/lang/sv-FI.svg +36 -0
- package/template_admin/public/static/images/lang/sv-SE.svg +36 -0
- package/template_admin/public/static/images/lang/sw-KE.svg +55 -0
- package/template_admin/public/static/images/lang/syr-SY.svg +41 -0
- package/template_admin/public/static/images/lang/ta-IN.svg +59 -0
- package/template_admin/public/static/images/lang/te-IN.svg +59 -0
- package/template_admin/public/static/images/lang/th-TH.svg +40 -0
- package/template_admin/public/static/images/lang/tl-PH.svg +51 -0
- package/template_admin/public/static/images/lang/tn-ZA.svg +41 -0
- package/template_admin/public/static/images/lang/tr-TR.svg +39 -0
- package/template_admin/public/static/images/lang/tt-RU.svg +37 -0
- package/template_admin/public/static/images/lang/uk-UA.svg +36 -0
- package/template_admin/public/static/images/lang/ur-PK.svg +40 -0
- package/template_admin/public/static/images/lang/vi-VN.svg +36 -0
- package/template_admin/public/static/images/lang/xh-ZA.svg +41 -0
- package/template_admin/public/static/images/lang/zh-CN.svg +42 -0
- package/template_admin/public/static/images/lang/zh-HK.svg +42 -0
- package/template_admin/public/static/images/lang/zh-SG.svg +44 -0
- package/template_admin/public/static/images/lang/zh-TW.svg +43 -0
- package/template_admin/public/static/images/lang/zu-ZA.svg +41 -0
- package/template_admin/public/static/images/logo-company-default.svg +1 -0
- package/template_admin/public/static/images/logo.png +0 -0
- package/template_admin/public/static/images/m_logo.png +0 -0
- package/template_admin/public/static/images/maintenance-icon.png +0 -0
- package/template_admin/public/static/images/member_logo.png +0 -0
- package/template_admin/public/static/images/pdf_icon.svg +1 -0
- package/template_admin/public/static/images/png_icon.svg +1 -0
- package/template_admin/public/static/images/security.png +0 -0
- package/template_admin/public/static/images/translation.svg +82 -0
- package/template_admin/public/static/images/txt_icon.svg +1 -0
- package/template_admin/public/static/images/widget-bubble.png +0 -0
- package/template_admin/public/static/images/widget-column.png +0 -0
- package/template_admin/public/static/images/widget-combo.png +0 -0
- package/template_admin/public/static/images/widget-doughnut.png +0 -0
- package/template_admin/public/static/images/widget-line.png +0 -0
- package/template_admin/public/static/images/widget-pie.png +0 -0
- package/template_admin/public/static/images/widget-scatter.png +0 -0
- package/template_admin/public/static/images/widget-summary_box.png +0 -0
- package/template_admin/public/static/images/widget-treemap.png +0 -0
- package/template_admin/public/static/images/xls_icon.svg +1 -0
- package/template_admin/public/static/images/xml_icon.svg +1 -0
- package/template_admin/public/static/images/zip_icon.svg +1 -0
- package/template_admin/public/static/styles/activity_log.less +157 -0
- package/template_admin/public/static/styles/calendar.less +132 -0
- package/template_admin/public/static/styles/collections.less +123 -0
- package/template_admin/public/static/styles/compute_field.less +250 -0
- package/template_admin/public/static/styles/custom-antd.less +78 -0
- package/template_admin/public/static/styles/custom.less +0 -0
- package/template_admin/public/static/styles/custom_icon.less +556 -0
- package/template_admin/public/static/styles/date_search.less +53 -0
- package/template_admin/public/static/styles/detail.less +2670 -0
- package/template_admin/public/static/styles/entities.less +891 -0
- package/template_admin/public/static/styles/filter.less +24 -0
- package/template_admin/public/static/styles/filter_new.less +154 -0
- package/template_admin/public/static/styles/hook.less +136 -0
- package/template_admin/public/static/styles/import_export.less +62 -0
- package/template_admin/public/static/styles/input.less +386 -0
- package/template_admin/public/static/styles/layout.less +1211 -0
- package/template_admin/public/static/styles/login.less +222 -0
- package/template_admin/public/static/styles/mainheader.less +32 -0
- package/template_admin/public/static/styles/permission_denied.less +13 -0
- package/template_admin/public/static/styles/print_template.less +36 -0
- package/template_admin/public/static/styles/rabbitmq.less +3 -0
- package/template_admin/public/static/styles/restful.less +22 -0
- package/template_admin/public/static/styles/setting.less +409 -0
- package/template_admin/public/static/styles/style.less +1736 -0
- package/template_admin/public/static/styles/system.less +11 -0
- package/template_admin/public/static/styles/versioning_control.less +24 -0
- package/template_admin/public/static/styles/wysiwyg.less +8 -0
- package/template_admin/theme/main.less +1 -0
- package/template_admin/theme/vars.less +34 -0
- package/template_admin/version.json +1 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import * as dotenv from "dotenv";
|
|
2
|
+
dotenv.config();
|
|
3
|
+
require("newrelic");
|
|
4
|
+
const now = require("performance-now");
|
|
5
|
+
import { Reflector } from "@nestjs/core";
|
|
6
|
+
|
|
7
|
+
import * as _ from "lodash";
|
|
8
|
+
|
|
9
|
+
import { v4 as uuid } from "uuid";
|
|
10
|
+
import * as rTracer from "cls-rtracer";
|
|
11
|
+
import { NestFactory } from "@nestjs/core";
|
|
12
|
+
import {
|
|
13
|
+
FastifyAdapter,
|
|
14
|
+
NestFastifyApplication
|
|
15
|
+
} from "@nestjs/platform-fastify";
|
|
16
|
+
import { AppModule } from "./app.module";
|
|
17
|
+
import { join } from "path";
|
|
18
|
+
import { AppClusterService } from "./app_cluster.service";
|
|
19
|
+
import { CUSTOM_MODULES as LIB_CUSTOM_MODULES } from 'cc-core-lib/module'
|
|
20
|
+
import { Logger } from "@nestjs/common";
|
|
21
|
+
import {
|
|
22
|
+
IGNORE_ENDPOINT_PATHS,
|
|
23
|
+
CONST,
|
|
24
|
+
EntitiesService,
|
|
25
|
+
TemplateService,
|
|
26
|
+
SettingService,
|
|
27
|
+
TranslateService,
|
|
28
|
+
AllExceptionsFilter,
|
|
29
|
+
AuthService,
|
|
30
|
+
UserRolePermissonService,
|
|
31
|
+
UserRoleService,
|
|
32
|
+
UserService,
|
|
33
|
+
ActivityLogService,
|
|
34
|
+
DeployLogService,
|
|
35
|
+
ImportExportLogService,
|
|
36
|
+
LanguageService,
|
|
37
|
+
ImportExportService,
|
|
38
|
+
AttachmentService,
|
|
39
|
+
CommentDataService,
|
|
40
|
+
AddressService,
|
|
41
|
+
CountryService,
|
|
42
|
+
DistrictService,
|
|
43
|
+
ProvinceService,
|
|
44
|
+
SubdistrictService,
|
|
45
|
+
TimeZoneService,
|
|
46
|
+
CompanyService,
|
|
47
|
+
DeployDestinationService,
|
|
48
|
+
DeployPackageService,
|
|
49
|
+
CustomFunctionService,
|
|
50
|
+
SFTPSettingService,
|
|
51
|
+
SftpLogService,
|
|
52
|
+
SmsService,
|
|
53
|
+
ReasonDataService,
|
|
54
|
+
ReasonMasterService,
|
|
55
|
+
ReasonOptionService,
|
|
56
|
+
WidgetService,
|
|
57
|
+
VersionDataService,
|
|
58
|
+
ScheduleActionService,
|
|
59
|
+
ScheduleLogService,
|
|
60
|
+
MapLocationService,
|
|
61
|
+
MailSettingService,
|
|
62
|
+
MailLogService,
|
|
63
|
+
request,
|
|
64
|
+
SmsLogService,
|
|
65
|
+
ExecutionLogService,
|
|
66
|
+
initialCustomModules,
|
|
67
|
+
initialCustomProviders,
|
|
68
|
+
initialSettingLayouts,
|
|
69
|
+
NotificationSubscriptionService,
|
|
70
|
+
NotificationMessageService,
|
|
71
|
+
NotificationMessageQueueService,
|
|
72
|
+
NotificationLogService,
|
|
73
|
+
ShortlyUrlService,
|
|
74
|
+
LayoutShareWidgetService,
|
|
75
|
+
ReportReportService,
|
|
76
|
+
ApiKeyService,
|
|
77
|
+
JWTAuthGuard,
|
|
78
|
+
CsrfGuard,
|
|
79
|
+
CacheInterceptor
|
|
80
|
+
} from 'cc-core-lib/core'
|
|
81
|
+
|
|
82
|
+
import { CUSTOM_MODULES } from "src/modules/modules";
|
|
83
|
+
import * as packageData from "../package.json";
|
|
84
|
+
|
|
85
|
+
async function initialService(app: NestFastifyApplication, serviceClass: any) {
|
|
86
|
+
let start = now();
|
|
87
|
+
const service = await app.resolve<typeof serviceClass>(serviceClass);
|
|
88
|
+
await service.init();
|
|
89
|
+
let end = now();
|
|
90
|
+
Logger.log(
|
|
91
|
+
`${service.constructor.name} initial done (${(end - start).toFixed(3)})`,
|
|
92
|
+
"MAIN"
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async function refreshService(app: NestFastifyApplication, serviceClass: any) {
|
|
97
|
+
let start = now();
|
|
98
|
+
const service = await app.resolve<typeof serviceClass>(serviceClass);
|
|
99
|
+
await service.initRefresh();
|
|
100
|
+
let end = now();
|
|
101
|
+
Logger.log(
|
|
102
|
+
`${service.constructor.name} initial refresh done (${(end - start).toFixed(
|
|
103
|
+
3
|
|
104
|
+
)})`,
|
|
105
|
+
"MAIN"
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function initialCustomService(app: NestFastifyApplication) {
|
|
110
|
+
const SPECIFY_CUSTOM_MODULES =
|
|
111
|
+
process.env.CUSTOM_MODULES === "" ||
|
|
112
|
+
process.env.CUSTOM_MODULES === undefined
|
|
113
|
+
? []
|
|
114
|
+
: process.env.CUSTOM_MODULES.split(",");
|
|
115
|
+
const RUN_CUSTOM_SERVICES = [];
|
|
116
|
+
SPECIFY_CUSTOM_MODULES.length === 0
|
|
117
|
+
? CUSTOM_MODULES.forEach(c => {
|
|
118
|
+
RUN_CUSTOM_SERVICES.push(...(c.services || []));
|
|
119
|
+
})
|
|
120
|
+
: CUSTOM_MODULES.filter(c =>
|
|
121
|
+
SPECIFY_CUSTOM_MODULES.includes(c.module.name)
|
|
122
|
+
).forEach(c => {
|
|
123
|
+
RUN_CUSTOM_SERVICES.push(...(c.services || []));
|
|
124
|
+
});
|
|
125
|
+
for (const customService of RUN_CUSTOM_SERVICES) {
|
|
126
|
+
await initialService(app, customService);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async function initial(app: NestFastifyApplication) {
|
|
131
|
+
|
|
132
|
+
LIB_CUSTOM_MODULES.push(...CUSTOM_MODULES)
|
|
133
|
+
|
|
134
|
+
await initialService(app, ApiKeyService);
|
|
135
|
+
await initialService(app, SettingService);
|
|
136
|
+
await initialService(app, EntitiesService);
|
|
137
|
+
await initialService(app, UserRolePermissonService);
|
|
138
|
+
await initialService(app, UserRoleService);
|
|
139
|
+
await initialService(app, UserService);
|
|
140
|
+
await initialService(app, LanguageService);
|
|
141
|
+
await initialService(app, TranslateService);
|
|
142
|
+
await initialService(app, ActivityLogService);
|
|
143
|
+
await initialService(app, TemplateService);
|
|
144
|
+
await initialService(app, AttachmentService);
|
|
145
|
+
|
|
146
|
+
await initialService(app, TimeZoneService);
|
|
147
|
+
await initialService(app, CountryService);
|
|
148
|
+
await initialService(app, ProvinceService);
|
|
149
|
+
await initialService(app, DistrictService);
|
|
150
|
+
await initialService(app, SubdistrictService);
|
|
151
|
+
await initialService(app, AddressService);
|
|
152
|
+
await initialService(app, CompanyService);
|
|
153
|
+
|
|
154
|
+
await initialService(app, SFTPSettingService);
|
|
155
|
+
await initialService(app, SftpLogService);
|
|
156
|
+
await initialService(app, MailSettingService);
|
|
157
|
+
await initialService(app, MailLogService);
|
|
158
|
+
await initialService(app, SmsLogService);
|
|
159
|
+
await initialService(app, SmsService);
|
|
160
|
+
|
|
161
|
+
await initialService(app, ReasonMasterService);
|
|
162
|
+
await initialService(app, ReasonOptionService);
|
|
163
|
+
await initialService(app, ReasonDataService);
|
|
164
|
+
|
|
165
|
+
await initialService(app, ReportReportService);
|
|
166
|
+
|
|
167
|
+
await initialService(app, WidgetService);
|
|
168
|
+
await initialService(app, MapLocationService);
|
|
169
|
+
await initialService(app, VersionDataService);
|
|
170
|
+
await initialService(app, CommentDataService);
|
|
171
|
+
|
|
172
|
+
await initialService(app, ScheduleLogService);
|
|
173
|
+
await initialService(app, ScheduleActionService);
|
|
174
|
+
|
|
175
|
+
await initialService(app, NotificationSubscriptionService);
|
|
176
|
+
await initialService(app, NotificationMessageService);
|
|
177
|
+
await initialService(app, NotificationMessageQueueService);
|
|
178
|
+
await initialService(app, NotificationLogService);
|
|
179
|
+
|
|
180
|
+
await initialService(app, ShortlyUrlService);
|
|
181
|
+
|
|
182
|
+
await initialService(app, DeployDestinationService);
|
|
183
|
+
await initialService(app, DeployPackageService);
|
|
184
|
+
await initialService(app, DeployLogService);
|
|
185
|
+
|
|
186
|
+
await initialService(app, CustomFunctionService);
|
|
187
|
+
|
|
188
|
+
await initialService(app, ExecutionLogService);
|
|
189
|
+
|
|
190
|
+
await initialService(app, LayoutShareWidgetService);
|
|
191
|
+
|
|
192
|
+
await initialCustomModules();
|
|
193
|
+
await initialCustomProviders();
|
|
194
|
+
await initialSettingLayouts();
|
|
195
|
+
|
|
196
|
+
await initialCustomService(app);
|
|
197
|
+
|
|
198
|
+
await initialService(app, ImportExportService);
|
|
199
|
+
await initialService(app, ImportExportLogService);
|
|
200
|
+
|
|
201
|
+
await initialService(app, EntitiesService);
|
|
202
|
+
await refreshService(app, EntitiesService);
|
|
203
|
+
await refreshService(app, ScheduleActionService);
|
|
204
|
+
await refreshService(app, SettingService);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
async function bootstrap() {
|
|
208
|
+
dotenv.config();
|
|
209
|
+
// const whitelist = _.concat(["0.0.0.0", "127.0.0.1"], [`${process.env.LOOP_BACK_IP}`]);
|
|
210
|
+
const fastify = new FastifyAdapter({ logger: true, bodyLimit: 104857600 });
|
|
211
|
+
// fastify.register(require("fastify-rate-limit"), {
|
|
212
|
+
// whitelist,
|
|
213
|
+
// timeWindow: 15 * 60 * 1000, // 15 minutes
|
|
214
|
+
// max: 100 // limit each IP to 100 requests per windowMs
|
|
215
|
+
// });
|
|
216
|
+
fastify.register(require("@fastify/cors"), {
|
|
217
|
+
// put your options here
|
|
218
|
+
});
|
|
219
|
+
fastify.register(require("fastify-xml-body-parser"));
|
|
220
|
+
|
|
221
|
+
// fastify.register(require("fastify-raw-body"), {
|
|
222
|
+
// field: 'rawBody', // change the default request.rawBody property name
|
|
223
|
+
// global: false, // add the rawBody to every request. **Default true**
|
|
224
|
+
// encoding: 'utf8', // set it to false to set rawBody as a Buffer **Default utf8**
|
|
225
|
+
// runFirst: true, // get the body before any preParsing hook change/uncompress it. **Default false**
|
|
226
|
+
// routes: [] // array of routes, **`global`** will be ignored, wildcard routes not supported
|
|
227
|
+
// });
|
|
228
|
+
|
|
229
|
+
fastify.register(rTracer.fastifyPlugin, {
|
|
230
|
+
requestIdFactory: req => ({
|
|
231
|
+
request_id: uuid(),
|
|
232
|
+
user_ip: req.headers["client-ip"],
|
|
233
|
+
user_agent: req.headers["user-agent"]
|
|
234
|
+
})
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
const app = await NestFactory.create<NestFastifyApplication>(
|
|
238
|
+
AppModule,
|
|
239
|
+
fastify
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
if (process.env.SERVE_STATIC === "true") {
|
|
243
|
+
app.useStaticAssets({
|
|
244
|
+
root: join(__dirname, "../..", process.env.SERVE_STATIC_PATH),
|
|
245
|
+
prefix: `/${process.env.SERVE_STATIC_PATH}`
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
_.set(CONST, "app", app);
|
|
250
|
+
await initial(app);
|
|
251
|
+
// const location = await app.resolve<LocationService>(LocationService);
|
|
252
|
+
// await location.init();
|
|
253
|
+
// Logger.log(`INVENTORY LOCATION:: init `, "MAIN");
|
|
254
|
+
|
|
255
|
+
// const apiKey = await app.resolve<ApiKeyService>(ApiKeyService);
|
|
256
|
+
// await apiKey.init();
|
|
257
|
+
// Logger.log(`INIT APIKEY ENTITY`, "MAIN");
|
|
258
|
+
|
|
259
|
+
const reflector = app.get(Reflector);
|
|
260
|
+
const auth = app.get(AuthService);
|
|
261
|
+
app.useGlobalGuards(new JWTAuthGuard(reflector, auth));
|
|
262
|
+
app.useGlobalGuards(new CsrfGuard(reflector));
|
|
263
|
+
app.setGlobalPrefix("api/v1");
|
|
264
|
+
app.use(request);
|
|
265
|
+
// app.useGlobalInterceptors(new FilterInterceptor(reflector));
|
|
266
|
+
app.useGlobalInterceptors(new CacheInterceptor(reflector));
|
|
267
|
+
|
|
268
|
+
// app.enableCors();
|
|
269
|
+
app.useGlobalFilters(new AllExceptionsFilter());
|
|
270
|
+
|
|
271
|
+
const routes = [];
|
|
272
|
+
const ignoreRouteRegex = new RegExp(IGNORE_ENDPOINT_PATHS.join("|"));
|
|
273
|
+
app
|
|
274
|
+
.getHttpAdapter()
|
|
275
|
+
.getInstance()
|
|
276
|
+
.addHook("onRoute", route => {
|
|
277
|
+
if (!ignoreRouteRegex.test(route.path)) {
|
|
278
|
+
routes.push({
|
|
279
|
+
path: route.path.replace("/api/v1/", ""),
|
|
280
|
+
method: route.method
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
app
|
|
285
|
+
.getHttpAdapter()
|
|
286
|
+
.getInstance()
|
|
287
|
+
.addHook("onReady", done => {
|
|
288
|
+
CONST.ENDPOINT_PATHS = routes;
|
|
289
|
+
done();
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
await app.listen(parseInt(process.env.PORT, 10), "0.0.0.0");
|
|
293
|
+
CONST.HEALTH_CHECK = true;
|
|
294
|
+
CONST.SYSTEM_NAME = process.env.SYSTEM_NAME || _.get(packageData, "name");
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
AppClusterService.clusterize(bootstrap);
|
|
298
|
+
// +process.env.QUEUE_CONCURRENCY > 0 || process.env.ENABLE_SCHEDULE_ACTION === "true" ? bootstrap() : AppClusterService.clusterize(bootstrap);
|
|
299
|
+
// bootstrap();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/***
|
|
2
|
+
* This example structure when developer config custom module
|
|
3
|
+
* const CUSTOM_MODULES = [
|
|
4
|
+
* { module: CarriersModule, services: [CarrierCarrierService, CarrierLogService] },
|
|
5
|
+
* { module: CustomersModule, services: [CustomerService, AddressService] },
|
|
6
|
+
* { module: ProductsModule, services: [ProductService] },
|
|
7
|
+
* { module: OrdersModule, services: [ChannelService, OrderService, OrderItemService] }
|
|
8
|
+
* ];
|
|
9
|
+
|
|
10
|
+
export { CUSTOM_MODULES };
|
|
11
|
+
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const CUSTOM_MODULES = [];
|
|
15
|
+
|
|
16
|
+
export { CUSTOM_MODULES };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"removeComments": true,
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"target": "es2017",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"baseUrl": "./",
|
|
12
|
+
"incremental": true,
|
|
13
|
+
"allowSyntheticDefaultImports": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
},
|
|
17
|
+
"exclude": [
|
|
18
|
+
"node_modules",
|
|
19
|
+
"dist",
|
|
20
|
+
"media"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# README #
|
|
2
|
+
|
|
3
|
+
This README would normally document whatever steps are necessary to get your application up and running.
|
|
4
|
+
|
|
5
|
+
### What is this repository for? ###
|
|
6
|
+
|
|
7
|
+
* Quick summary
|
|
8
|
+
* Version
|
|
9
|
+
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
|
10
|
+
|
|
11
|
+
### How do I get set up? ###
|
|
12
|
+
|
|
13
|
+
* Summary of set up
|
|
14
|
+
* Configuration
|
|
15
|
+
* Dependencies
|
|
16
|
+
* Database configuration
|
|
17
|
+
* How to run tests
|
|
18
|
+
* Deployment instructions
|
|
19
|
+
|
|
20
|
+
### Contribution guidelines ###
|
|
21
|
+
|
|
22
|
+
* Writing tests
|
|
23
|
+
* Code review
|
|
24
|
+
* Other guidelines
|
|
25
|
+
|
|
26
|
+
### Who do I talk to? ###
|
|
27
|
+
|
|
28
|
+
* Repo owner or admin
|
|
29
|
+
* Other community or team contact
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
require('dotenv').config()
|
|
2
|
+
require('log-timestamp')
|
|
3
|
+
const _ = require('lodash')
|
|
4
|
+
const express = require('express')
|
|
5
|
+
const next = require('next')
|
|
6
|
+
const app = next({ dev: process.env.NODE_ENV !== 'production' })
|
|
7
|
+
const handler = app.getRequestHandler()
|
|
8
|
+
const cookieParser = require('cookie-parser')
|
|
9
|
+
const bodyParser = require('body-parser')
|
|
10
|
+
const { apis, request } = require('cc-admin-lib/server')
|
|
11
|
+
|
|
12
|
+
const PORT = process.env.PORT || 3000
|
|
13
|
+
|
|
14
|
+
app
|
|
15
|
+
.prepare()
|
|
16
|
+
.then(() => {
|
|
17
|
+
const server = express()
|
|
18
|
+
server.use(cookieParser())
|
|
19
|
+
server.use(bodyParser.urlencoded({
|
|
20
|
+
extended: true
|
|
21
|
+
}))
|
|
22
|
+
server.use(bodyParser.json({
|
|
23
|
+
type: 'application/json',
|
|
24
|
+
limit: '100mb'
|
|
25
|
+
}))
|
|
26
|
+
server.get('/health_check', (req, res) => {
|
|
27
|
+
res.json({ message: 'ok' })
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const setAbout = async () => {
|
|
31
|
+
try {
|
|
32
|
+
await request.setAbout()
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
console.log('setAbout error: ', e)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
setAbout()
|
|
39
|
+
|
|
40
|
+
apis(server)
|
|
41
|
+
|
|
42
|
+
server.get(
|
|
43
|
+
'*',
|
|
44
|
+
(req, res) => {
|
|
45
|
+
req.env = {
|
|
46
|
+
ENV: process.env.NODE_ENV,
|
|
47
|
+
PORT: process.env.PORT,
|
|
48
|
+
API_GATEWAY: process.env.API_GATEWAY,
|
|
49
|
+
API_GATEWAY_MEDIA: process.env.API_GATEWAY_MEDIA,
|
|
50
|
+
API_DOCUMENT_URL: process.env.API_DOCUMENT_URL,
|
|
51
|
+
GOOGLE_MAP_KEY: process.env.GOOGLE_MAP_KEY,
|
|
52
|
+
EDITOR_LICENSE_KEY: process.env.EDITOR_LICENSE_KEY
|
|
53
|
+
}
|
|
54
|
+
return handler(req, res)
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
server.listen(PORT, (err) => {
|
|
59
|
+
if (err) throw err
|
|
60
|
+
console.log('Server start on port : ', PORT)
|
|
61
|
+
console.log('Start on mode : ', process.env.NODE_ENV)
|
|
62
|
+
})
|
|
63
|
+
})
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
require('dotenv').config()
|
|
3
|
+
|
|
4
|
+
const ENABLE_NEW_RELIC = process.env.NEW_RELIC_APP_NAME && process.env.NEW_RELIC_LICENSE_KEY
|
|
5
|
+
/**
|
|
6
|
+
* New Relic agent configuration.
|
|
7
|
+
*
|
|
8
|
+
* See lib/config/default.js in the agent distribution for a more complete
|
|
9
|
+
* description of configuration variables and their potential values.
|
|
10
|
+
*/
|
|
11
|
+
exports.config = {
|
|
12
|
+
agent_enabled: ENABLE_NEW_RELIC,
|
|
13
|
+
/**
|
|
14
|
+
* Array of application names.
|
|
15
|
+
*/
|
|
16
|
+
app_name: [process.env.NEW_RELIC_APP_NAME],
|
|
17
|
+
/**
|
|
18
|
+
* Your New Relic license key.
|
|
19
|
+
*/
|
|
20
|
+
license_key: process.env.NEW_RELIC_LICENSE_KEY,
|
|
21
|
+
/**
|
|
22
|
+
* This setting controls distributed tracing.
|
|
23
|
+
* Distributed tracing lets you see the path that a request takes through your
|
|
24
|
+
* distributed system. Enabling distributed tracing changes the behavior of some
|
|
25
|
+
* New Relic features, so carefully consult the transition guide before you enable
|
|
26
|
+
* this feature: https://docs.newrelic.com/docs/transition-guide-distributed-tracing
|
|
27
|
+
* Default is true.
|
|
28
|
+
*/
|
|
29
|
+
distributed_tracing: {
|
|
30
|
+
/**
|
|
31
|
+
* Enables/disables distributed tracing.
|
|
32
|
+
*
|
|
33
|
+
* @env NEW_RELIC_DISTRIBUTED_TRACING_ENABLED
|
|
34
|
+
*/
|
|
35
|
+
enabled: true,
|
|
36
|
+
},
|
|
37
|
+
logging: {
|
|
38
|
+
/**
|
|
39
|
+
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
|
|
40
|
+
* issues with the agent, 'info' and higher will impose the least overhead on
|
|
41
|
+
* production applications.
|
|
42
|
+
*/
|
|
43
|
+
level: "info",
|
|
44
|
+
},
|
|
45
|
+
application_logging: {
|
|
46
|
+
forwarding: {
|
|
47
|
+
enabled: true,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* When true, all request headers except for those listed in attributes.exclude
|
|
52
|
+
* will be captured for all traces, unless otherwise specified in a destination's
|
|
53
|
+
* attributes include/exclude lists.
|
|
54
|
+
*/
|
|
55
|
+
allow_all_headers: true,
|
|
56
|
+
attributes: {
|
|
57
|
+
/**
|
|
58
|
+
* Prefix of attributes to exclude from all destinations. Allows * as wildcard
|
|
59
|
+
* at end.
|
|
60
|
+
*
|
|
61
|
+
* NOTE: If excluding headers, they must be in camelCase form to be filtered.
|
|
62
|
+
*
|
|
63
|
+
* @env NEW_RELIC_ATTRIBUTES_EXCLUDE
|
|
64
|
+
*/
|
|
65
|
+
exclude: [
|
|
66
|
+
"request.headers.cookie",
|
|
67
|
+
"request.headers.authorization",
|
|
68
|
+
"request.headers.proxyAuthorization",
|
|
69
|
+
"request.headers.setCookie*",
|
|
70
|
+
"request.headers.x*",
|
|
71
|
+
"response.headers.cookie",
|
|
72
|
+
"response.headers.authorization",
|
|
73
|
+
"response.headers.proxyAuthorization",
|
|
74
|
+
"response.headers.setCookie*",
|
|
75
|
+
"response.headers.x*",
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
require('dotenv').config()
|
|
2
|
+
|
|
3
|
+
const withPlugins = require('next-compose-plugins')
|
|
4
|
+
const withLess = require('next-with-less')
|
|
5
|
+
const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin')
|
|
6
|
+
const withPWA = require('next-pwa')
|
|
7
|
+
const generateTheme = require('next-dynamic-antd-theme/plugin')
|
|
8
|
+
|
|
9
|
+
const prefix = '/'
|
|
10
|
+
const path = require('path')
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const withAntdTheme = generateTheme({
|
|
14
|
+
antDir: path.join(__dirname, './node_modules/antd'),
|
|
15
|
+
stylesDir: path.join(__dirname, './theme'),
|
|
16
|
+
varFile: path.join(__dirname, './theme/vars.less'),
|
|
17
|
+
mainLessFile: path.join(__dirname, './theme/main.less'),
|
|
18
|
+
outputFilePath: path.join(__dirname, './.next/static/color.less')
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const withAntd = (nextConfig = {}) => {
|
|
22
|
+
return Object.assign({}, nextConfig, {
|
|
23
|
+
onDemandEntries: {
|
|
24
|
+
maxInactiveAge: 1000 * 60 * 60,
|
|
25
|
+
pagesBufferLength: 5
|
|
26
|
+
},
|
|
27
|
+
lessLoaderOptions: {
|
|
28
|
+
javascriptEnabled: true
|
|
29
|
+
},
|
|
30
|
+
poweredByHeader: false,
|
|
31
|
+
cssModules: true,
|
|
32
|
+
cssLoaderOptions: {
|
|
33
|
+
camelCase: true,
|
|
34
|
+
localIdentName: '[local]___[hash:base64:5]',
|
|
35
|
+
getLocalIdent: (context, localIdentName, localName, options) => {
|
|
36
|
+
return localName
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = withPlugins([
|
|
43
|
+
[withLess, {
|
|
44
|
+
lessLoaderOptions: {}
|
|
45
|
+
}],
|
|
46
|
+
[
|
|
47
|
+
withPWA, {
|
|
48
|
+
pwa: {
|
|
49
|
+
dest: 'public',
|
|
50
|
+
register: true,
|
|
51
|
+
skipWaiting: true,
|
|
52
|
+
disable: process.env.NODE_ENV === 'development'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
withAntd,
|
|
57
|
+
withAntdTheme,
|
|
58
|
+
], {
|
|
59
|
+
serverRuntimeConfig: {},
|
|
60
|
+
publicRuntimeConfig: { prefix },
|
|
61
|
+
assetPrefix: prefix,
|
|
62
|
+
// experimental: {
|
|
63
|
+
// //largePageDataBytes: 128 * 1000, // 128KB by default
|
|
64
|
+
// largePageDataBytes: 128 * 100000,
|
|
65
|
+
// },
|
|
66
|
+
plugins: [
|
|
67
|
+
new AntdDayjsWebpackPlugin()
|
|
68
|
+
],
|
|
69
|
+
generateBuildId: async () => {
|
|
70
|
+
if (process.env.BUILD_ID) {
|
|
71
|
+
console.log('Build with build id : ' + process.env.BUILD_ID)
|
|
72
|
+
return process.env.BUILD_ID
|
|
73
|
+
}
|
|
74
|
+
return null
|
|
75
|
+
}
|
|
76
|
+
})
|