@nocobase/plugin-client 1.2.13-alpha → 1.3.0-alpha.20240710084543
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/package.json +2 -2
- package/dist/client/index.d.ts +0 -13
- package/dist/client/index.js +0 -10
- package/dist/externalVersion.js +0 -15
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -48
- package/dist/locale/antd/ar_EG.js +0 -10
- package/dist/locale/antd/az_AZ.js +0 -10
- package/dist/locale/antd/bg_BG.js +0 -10
- package/dist/locale/antd/bn_BD.js +0 -10
- package/dist/locale/antd/by_BY.js +0 -10
- package/dist/locale/antd/ca_ES.js +0 -10
- package/dist/locale/antd/cs_CZ.js +0 -10
- package/dist/locale/antd/da_DK.js +0 -10
- package/dist/locale/antd/de_DE.js +0 -10
- package/dist/locale/antd/el_GR.js +0 -10
- package/dist/locale/antd/en_GB.js +0 -10
- package/dist/locale/antd/en_US.js +0 -10
- package/dist/locale/antd/es_ES.js +0 -10
- package/dist/locale/antd/et_EE.js +0 -10
- package/dist/locale/antd/eu_ES.js +0 -10
- package/dist/locale/antd/fa_IR.js +0 -10
- package/dist/locale/antd/fi_FI.js +0 -10
- package/dist/locale/antd/fr_BE.js +0 -10
- package/dist/locale/antd/fr_CA.js +0 -10
- package/dist/locale/antd/fr_FR.js +0 -10
- package/dist/locale/antd/ga_IE.js +0 -10
- package/dist/locale/antd/gl_ES.js +0 -10
- package/dist/locale/antd/he_IL.js +0 -10
- package/dist/locale/antd/hi_IN.js +0 -10
- package/dist/locale/antd/hr_HR.js +0 -10
- package/dist/locale/antd/hu_HU.js +0 -10
- package/dist/locale/antd/hy_AM.js +0 -10
- package/dist/locale/antd/id_ID.js +0 -10
- package/dist/locale/antd/index.js +0 -10
- package/dist/locale/antd/is_IS.js +0 -10
- package/dist/locale/antd/it_IT.js +0 -10
- package/dist/locale/antd/ja_JP.js +0 -10
- package/dist/locale/antd/ka_GE.js +0 -10
- package/dist/locale/antd/kk_KZ.js +0 -10
- package/dist/locale/antd/km_KH.js +0 -10
- package/dist/locale/antd/kmr_IQ.js +0 -10
- package/dist/locale/antd/kn_IN.js +0 -10
- package/dist/locale/antd/ko_KR.js +0 -10
- package/dist/locale/antd/ku_IQ.js +0 -10
- package/dist/locale/antd/lt_LT.js +0 -10
- package/dist/locale/antd/lv_LV.js +0 -10
- package/dist/locale/antd/mk_MK.js +0 -10
- package/dist/locale/antd/ml_IN.js +0 -10
- package/dist/locale/antd/mn_MN.js +0 -10
- package/dist/locale/antd/ms_MY.js +0 -10
- package/dist/locale/antd/my_MM.js +0 -10
- package/dist/locale/antd/nb_NO.js +0 -10
- package/dist/locale/antd/ne_NP.js +0 -10
- package/dist/locale/antd/nl_BE.js +0 -10
- package/dist/locale/antd/nl_NL.js +0 -10
- package/dist/locale/antd/pl_PL.js +0 -10
- package/dist/locale/antd/pt_BR.js +0 -10
- package/dist/locale/antd/pt_PT.js +0 -10
- package/dist/locale/antd/ro_RO.js +0 -10
- package/dist/locale/antd/ru_RU.js +0 -10
- package/dist/locale/antd/si_LK.js +0 -10
- package/dist/locale/antd/sk_SK.js +0 -10
- package/dist/locale/antd/sl_SI.js +0 -10
- package/dist/locale/antd/sr_RS.js +0 -10
- package/dist/locale/antd/sv_SE.js +0 -10
- package/dist/locale/antd/ta_IN.js +0 -10
- package/dist/locale/antd/th_TH.js +0 -10
- package/dist/locale/antd/tk_TK.js +0 -10
- package/dist/locale/antd/tr_TR.js +0 -10
- package/dist/locale/antd/uk_UA.js +0 -10
- package/dist/locale/antd/ur_PK.js +0 -10
- package/dist/locale/antd/useLocale.js +0 -10
- package/dist/locale/antd/vi_VN.js +0 -10
- package/dist/locale/antd/zh_CN.js +0 -10
- package/dist/locale/antd/zh_HK.js +0 -10
- package/dist/locale/antd/zh_TW.js +0 -10
- package/dist/locale/cron/zh_CN.js +0 -42
- package/dist/locale/cron/zh_TW.js +0 -42
- package/dist/locale/en_US.js +0 -844
- package/dist/locale/es_ES.js +0 -775
- package/dist/locale/fr_FR.js +0 -795
- package/dist/locale/index.js +0 -174
- package/dist/locale/ja_JP.js +0 -714
- package/dist/locale/ko_KR.js +0 -886
- package/dist/locale/pt_BR.js +0 -752
- package/dist/locale/ru_RU.js +0 -589
- package/dist/locale/tr_TR.js +0 -587
- package/dist/locale/uk_UA.js +0 -795
- package/dist/locale/zh-CN.js +0 -975
- package/dist/locale/zh-TW.js +0 -884
- package/dist/node_modules/cronstrue/LICENSE +0 -21
- package/dist/node_modules/cronstrue/bin/cli.js +0 -26
- package/dist/node_modules/cronstrue/dist/cronParser.d.ts +0 -12
- package/dist/node_modules/cronstrue/dist/cronstrue-i18n.d.ts +0 -4
- package/dist/node_modules/cronstrue/dist/cronstrue-i18n.js +0 -7912
- package/dist/node_modules/cronstrue/dist/cronstrue-i18n.min.js +0 -1
- package/dist/node_modules/cronstrue/dist/cronstrue.d.ts +0 -4
- package/dist/node_modules/cronstrue/dist/cronstrue.js +0 -1
- package/dist/node_modules/cronstrue/dist/cronstrue.min.js +0 -1
- package/dist/node_modules/cronstrue/dist/expressionDescriptor.d.ts +0 -31
- package/dist/node_modules/cronstrue/dist/i18n/allLocales.d.ts +0 -37
- package/dist/node_modules/cronstrue/dist/i18n/allLocalesLoader.d.ts +0 -6
- package/dist/node_modules/cronstrue/dist/i18n/enLocaleLoader.d.ts +0 -6
- package/dist/node_modules/cronstrue/dist/i18n/locale.d.ts +0 -62
- package/dist/node_modules/cronstrue/dist/i18n/localeLoader.d.ts +0 -6
- package/dist/node_modules/cronstrue/dist/i18n/locales/af.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/ar.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/be.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/bg.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/ca.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/cs.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/da.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/de.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/en.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/es.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/fa.d.ts +0 -57
- package/dist/node_modules/cronstrue/dist/i18n/locales/fi.d.ts +0 -58
- package/dist/node_modules/cronstrue/dist/i18n/locales/fr.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/he.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/hu.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/id.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/it.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/ja.d.ts +0 -60
- package/dist/node_modules/cronstrue/dist/i18n/locales/ko.d.ts +0 -60
- package/dist/node_modules/cronstrue/dist/i18n/locales/my.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/nb.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/nl.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/pl.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/pt_BR.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/pt_PT.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/ro.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/ru.d.ts +0 -58
- package/dist/node_modules/cronstrue/dist/i18n/locales/sk.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/sl.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/sv.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/sw.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/th.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/tr.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/uk.d.ts +0 -55
- package/dist/node_modules/cronstrue/dist/i18n/locales/vi.d.ts +0 -56
- package/dist/node_modules/cronstrue/dist/i18n/locales/zh_CN.d.ts +0 -61
- package/dist/node_modules/cronstrue/dist/i18n/locales/zh_TW.d.ts +0 -58
- package/dist/node_modules/cronstrue/dist/options.d.ts +0 -9
- package/dist/node_modules/cronstrue/dist/rangeValidator.d.ts +0 -8
- package/dist/node_modules/cronstrue/dist/stringUtilities.d.ts +0 -4
- package/dist/node_modules/cronstrue/i18n.d.ts +0 -4
- package/dist/node_modules/cronstrue/i18n.js +0 -5
- package/dist/node_modules/cronstrue/locales/af.js +0 -287
- package/dist/node_modules/cronstrue/locales/af.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/ar.js +0 -287
- package/dist/node_modules/cronstrue/locales/ar.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/be.js +0 -284
- package/dist/node_modules/cronstrue/locales/be.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/bg.js +0 -290
- package/dist/node_modules/cronstrue/locales/bg.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/ca.js +0 -284
- package/dist/node_modules/cronstrue/locales/ca.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/cs.js +0 -284
- package/dist/node_modules/cronstrue/locales/cs.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/da.js +0 -284
- package/dist/node_modules/cronstrue/locales/da.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/de.js +0 -284
- package/dist/node_modules/cronstrue/locales/de.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/en.js +0 -287
- package/dist/node_modules/cronstrue/locales/en.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/es.js +0 -284
- package/dist/node_modules/cronstrue/locales/es.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/fa.js +0 -277
- package/dist/node_modules/cronstrue/locales/fa.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/fi.js +0 -293
- package/dist/node_modules/cronstrue/locales/fi.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/fr.js +0 -287
- package/dist/node_modules/cronstrue/locales/fr.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/he.js +0 -271
- package/dist/node_modules/cronstrue/locales/he.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/hu.js +0 -287
- package/dist/node_modules/cronstrue/locales/hu.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/id.js +0 -287
- package/dist/node_modules/cronstrue/locales/id.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/it.js +0 -284
- package/dist/node_modules/cronstrue/locales/it.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/ja.js +0 -286
- package/dist/node_modules/cronstrue/locales/ja.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/ko.js +0 -286
- package/dist/node_modules/cronstrue/locales/ko.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/my.js +0 -287
- package/dist/node_modules/cronstrue/locales/my.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/nb.js +0 -284
- package/dist/node_modules/cronstrue/locales/nb.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/nl.js +0 -284
- package/dist/node_modules/cronstrue/locales/nl.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/pl.js +0 -284
- package/dist/node_modules/cronstrue/locales/pl.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/pt_BR.js +0 -284
- package/dist/node_modules/cronstrue/locales/pt_BR.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/pt_PT.js +0 -284
- package/dist/node_modules/cronstrue/locales/pt_PT.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/ro.js +0 -284
- package/dist/node_modules/cronstrue/locales/ro.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/ru.js +0 -327
- package/dist/node_modules/cronstrue/locales/ru.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/sk.js +0 -284
- package/dist/node_modules/cronstrue/locales/sk.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/sl.js +0 -284
- package/dist/node_modules/cronstrue/locales/sl.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/sv.js +0 -284
- package/dist/node_modules/cronstrue/locales/sv.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/sw.js +0 -284
- package/dist/node_modules/cronstrue/locales/sw.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/th.js +0 -287
- package/dist/node_modules/cronstrue/locales/th.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/tr.js +0 -284
- package/dist/node_modules/cronstrue/locales/tr.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/uk.js +0 -284
- package/dist/node_modules/cronstrue/locales/uk.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/vi.js +0 -287
- package/dist/node_modules/cronstrue/locales/vi.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/zh_CN.js +0 -289
- package/dist/node_modules/cronstrue/locales/zh_CN.min.js +0 -1
- package/dist/node_modules/cronstrue/locales/zh_TW.js +0 -280
- package/dist/node_modules/cronstrue/locales/zh_TW.min.js +0 -1
- package/dist/node_modules/cronstrue/package.json +0 -1
- package/dist/server/antd.d.ts +0 -9
- package/dist/server/antd.js +0 -54
- package/dist/server/cron.d.ts +0 -9
- package/dist/server/cron.js +0 -53
- package/dist/server/cronstrue.d.ts +0 -9
- package/dist/server/cronstrue.js +0 -145
- package/dist/server/index.d.ts +0 -9
- package/dist/server/index.js +0 -42
- package/dist/server/migrations/20230620203216-admin-ui-schema-uid.d.ts +0 -13
- package/dist/server/migrations/20230620203216-admin-ui-schema-uid.js +0 -73
- package/dist/server/migrations/20231215215247-admin-menu-uid.d.ts +0 -13
- package/dist/server/migrations/20231215215247-admin-menu-uid.js +0 -85
- package/dist/server/server.d.ts +0 -15
- package/dist/server/server.js +0 -155
- package/dist/swagger/index.json +0 -7
package/dist/server/cron.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var cron_exports = {};
|
|
28
|
-
__export(cron_exports, {
|
|
29
|
-
getCronLocale: () => getCronLocale
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(cron_exports);
|
|
32
|
-
var import_utils = require("@nocobase/utils");
|
|
33
|
-
var import_path = require("path");
|
|
34
|
-
const getCronLocale = (lang) => {
|
|
35
|
-
const lng = lang.replace("-", "_");
|
|
36
|
-
const files = [(0, import_path.resolve)(__dirname, `./../locale/cron/${lng}`)];
|
|
37
|
-
if (process.env.APP_ENV !== "production") {
|
|
38
|
-
files.push(`@nocobase/client/src/locale/cron/${lng}`, `@nocobase/client/lib/locale/cron/${lng}`);
|
|
39
|
-
}
|
|
40
|
-
for (const file of files) {
|
|
41
|
-
try {
|
|
42
|
-
require.resolve(file);
|
|
43
|
-
return (0, import_utils.requireModule)(file);
|
|
44
|
-
} catch (error) {
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return {};
|
|
49
|
-
};
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
getCronLocale
|
|
53
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export declare const getCronstrueLocale: (lang: any) => {};
|
package/dist/server/cronstrue.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var cronstrue_exports = {};
|
|
28
|
-
__export(cronstrue_exports, {
|
|
29
|
-
getCronstrueLocale: () => getCronstrueLocale
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(cronstrue_exports);
|
|
32
|
-
const methods = [
|
|
33
|
-
"atX0SecondsPastTheMinuteGt20",
|
|
34
|
-
"atX0MinutesPastTheHourGt20",
|
|
35
|
-
"commaMonthX0ThroughMonthX1",
|
|
36
|
-
"commaYearX0ThroughYearX1",
|
|
37
|
-
"use24HourTimeFormatByDefault",
|
|
38
|
-
"anErrorOccuredWhenGeneratingTheExpressionD",
|
|
39
|
-
"everyMinute",
|
|
40
|
-
"everyHour",
|
|
41
|
-
"atSpace",
|
|
42
|
-
"everyMinuteBetweenX0AndX1",
|
|
43
|
-
"at",
|
|
44
|
-
"spaceAnd",
|
|
45
|
-
"everySecond",
|
|
46
|
-
"everyX0Seconds",
|
|
47
|
-
"secondsX0ThroughX1PastTheMinute",
|
|
48
|
-
"atX0SecondsPastTheMinute",
|
|
49
|
-
"everyX0Minutes",
|
|
50
|
-
"minutesX0ThroughX1PastTheHour",
|
|
51
|
-
"atX0MinutesPastTheHour",
|
|
52
|
-
"everyX0Hours",
|
|
53
|
-
"betweenX0AndX1",
|
|
54
|
-
"atX0",
|
|
55
|
-
"commaEveryDay",
|
|
56
|
-
"commaEveryX0DaysOfTheWeek",
|
|
57
|
-
"commaX0ThroughX1",
|
|
58
|
-
"commaAndX0ThroughX1",
|
|
59
|
-
"first",
|
|
60
|
-
"second",
|
|
61
|
-
"third",
|
|
62
|
-
"fourth",
|
|
63
|
-
"fifth",
|
|
64
|
-
"commaOnThe",
|
|
65
|
-
"spaceX0OfTheMonth",
|
|
66
|
-
"lastDay",
|
|
67
|
-
"commaOnTheLastX0OfTheMonth",
|
|
68
|
-
"commaOnlyOnX0",
|
|
69
|
-
"commaAndOnX0",
|
|
70
|
-
"commaEveryX0Months",
|
|
71
|
-
"commaOnlyInX0",
|
|
72
|
-
"commaOnTheLastDayOfTheMonth",
|
|
73
|
-
"commaOnTheLastWeekdayOfTheMonth",
|
|
74
|
-
"commaDaysBeforeTheLastDayOfTheMonth",
|
|
75
|
-
"firstWeekday",
|
|
76
|
-
"weekdayNearestDayX0",
|
|
77
|
-
"commaOnTheX0OfTheMonth",
|
|
78
|
-
"commaEveryX0Days",
|
|
79
|
-
"commaBetweenDayX0AndX1OfTheMonth",
|
|
80
|
-
"commaOnDayX0OfTheMonth",
|
|
81
|
-
"commaEveryHour",
|
|
82
|
-
"commaEveryX0Years",
|
|
83
|
-
"commaStartingX0",
|
|
84
|
-
"daysOfTheWeek",
|
|
85
|
-
"monthsOfTheYear"
|
|
86
|
-
];
|
|
87
|
-
const langs = {
|
|
88
|
-
af: "af",
|
|
89
|
-
ar: "ar",
|
|
90
|
-
be: "be",
|
|
91
|
-
ca: "ca",
|
|
92
|
-
cs: "cs",
|
|
93
|
-
da: "da",
|
|
94
|
-
de: "de",
|
|
95
|
-
"en-US": "en",
|
|
96
|
-
es: "es",
|
|
97
|
-
fa: "fa",
|
|
98
|
-
fi: "fi",
|
|
99
|
-
fr: "fr",
|
|
100
|
-
he: "he",
|
|
101
|
-
hu: "hu",
|
|
102
|
-
id: "id",
|
|
103
|
-
it: "it",
|
|
104
|
-
"ja-JP": "ja",
|
|
105
|
-
ko: "ko",
|
|
106
|
-
nb: "nb",
|
|
107
|
-
nl: "nl",
|
|
108
|
-
pl: "pl",
|
|
109
|
-
pt_BR: "pt_BR",
|
|
110
|
-
pt_PT: "pt_PT",
|
|
111
|
-
ro: "ro",
|
|
112
|
-
"ru-RU": "ru",
|
|
113
|
-
sk: "sk",
|
|
114
|
-
sl: "sl",
|
|
115
|
-
sv: "sv",
|
|
116
|
-
sw: "sw",
|
|
117
|
-
"th-TH": "th",
|
|
118
|
-
"tr-TR": "tr",
|
|
119
|
-
uk: "uk",
|
|
120
|
-
"zh-CN": "zh_CN",
|
|
121
|
-
"zh-TW": "zh_TW"
|
|
122
|
-
};
|
|
123
|
-
const getCronstrueLocale = (lang) => {
|
|
124
|
-
const lng = langs[lang] || "en";
|
|
125
|
-
const Locale = require(`cronstrue/locales/${lng}`);
|
|
126
|
-
let locale;
|
|
127
|
-
if (Locale == null ? void 0 : Locale.default) {
|
|
128
|
-
locale = Locale.default.locales[lng];
|
|
129
|
-
} else {
|
|
130
|
-
const L = Locale[lng];
|
|
131
|
-
locale = new L();
|
|
132
|
-
}
|
|
133
|
-
const items = {};
|
|
134
|
-
for (const method of methods) {
|
|
135
|
-
try {
|
|
136
|
-
items[method] = locale[method]();
|
|
137
|
-
} catch (error) {
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return items;
|
|
141
|
-
};
|
|
142
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
143
|
-
0 && (module.exports = {
|
|
144
|
-
getCronstrueLocale
|
|
145
|
-
});
|
package/dist/server/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export { default } from './server';
|
package/dist/server/index.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var server_exports = {};
|
|
38
|
-
__export(server_exports, {
|
|
39
|
-
default: () => import_server.default
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(server_exports);
|
|
42
|
-
var import_server = __toESM(require("./server"));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Migration } from '@nocobase/server';
|
|
10
|
-
export default class extends Migration {
|
|
11
|
-
appVersion: string;
|
|
12
|
-
up(): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var admin_ui_schema_uid_exports = {};
|
|
28
|
-
__export(admin_ui_schema_uid_exports, {
|
|
29
|
-
default: () => admin_ui_schema_uid_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(admin_ui_schema_uid_exports);
|
|
32
|
-
var import_server = require("@nocobase/server");
|
|
33
|
-
class admin_ui_schema_uid_default extends import_server.Migration {
|
|
34
|
-
appVersion = "<0.14.0-alpha.1";
|
|
35
|
-
async up() {
|
|
36
|
-
var _a, _b, _c;
|
|
37
|
-
const result = await this.app.version.satisfies("<0.14.0-alpha.1");
|
|
38
|
-
if (!result) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
await this.db.getCollection("systemSettings").sync({
|
|
42
|
-
force: false,
|
|
43
|
-
alter: {
|
|
44
|
-
drop: false
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
const systemSettings = this.db.getRepository("systemSettings");
|
|
48
|
-
let instance = await systemSettings.findOne();
|
|
49
|
-
if ((_a = instance == null ? void 0 : instance.options) == null ? void 0 : _a.adminSchemaUid) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
const uiRoutes = this.db.getRepository("uiRoutes");
|
|
53
|
-
if (!uiRoutes) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const routes = await uiRoutes.find();
|
|
57
|
-
for (const route of routes) {
|
|
58
|
-
if (route.uiSchemaUid && ((_b = route == null ? void 0 : route.options) == null ? void 0 : _b.component) === "AdminLayout") {
|
|
59
|
-
const options = instance.options || {};
|
|
60
|
-
options["adminSchemaUid"] = route.uiSchemaUid;
|
|
61
|
-
instance.set("options", options);
|
|
62
|
-
instance.changed("options", true);
|
|
63
|
-
await instance.save();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
instance = await systemSettings.findOne();
|
|
68
|
-
if (!((_c = instance == null ? void 0 : instance.options) == null ? void 0 : _c.adminSchemaUid)) {
|
|
69
|
-
throw new Error("adminSchemaUid invalid");
|
|
70
|
-
}
|
|
71
|
-
this.app.log.info("systemSettings.options", instance.toJSON());
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Migration } from '@nocobase/server';
|
|
10
|
-
export default class extends Migration {
|
|
11
|
-
appVersion: string;
|
|
12
|
-
up(): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var admin_menu_uid_exports = {};
|
|
28
|
-
__export(admin_menu_uid_exports, {
|
|
29
|
-
default: () => admin_menu_uid_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(admin_menu_uid_exports);
|
|
32
|
-
var import_server = require("@nocobase/server");
|
|
33
|
-
class admin_menu_uid_default extends import_server.Migration {
|
|
34
|
-
appVersion = "<0.17.0-alpha.8";
|
|
35
|
-
async up() {
|
|
36
|
-
var _a, _b;
|
|
37
|
-
const result = await this.app.version.satisfies("<0.17.0-alpha.8");
|
|
38
|
-
if (!result) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const systemSettings = this.db.getRepository("systemSettings");
|
|
42
|
-
const instance = await systemSettings.findOne();
|
|
43
|
-
if (!((_a = instance == null ? void 0 : instance.options) == null ? void 0 : _a.adminSchemaUid)) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const UiSchemas = this.db.getModel("uiSchemas");
|
|
47
|
-
await this.db.sequelize.transaction(async (transaction) => {
|
|
48
|
-
var _a2, _b2, _c;
|
|
49
|
-
await UiSchemas.update(
|
|
50
|
-
{
|
|
51
|
-
"x-uid": "nocobase-admin-menu"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
transaction,
|
|
55
|
-
where: {
|
|
56
|
-
"x-uid": (_a2 = instance == null ? void 0 : instance.options) == null ? void 0 : _a2.adminSchemaUid
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
await this.db.getModel("uiSchemaTreePath").update(
|
|
61
|
-
{
|
|
62
|
-
descendant: "nocobase-admin-menu"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
transaction,
|
|
66
|
-
where: {
|
|
67
|
-
descendant: (_b2 = instance == null ? void 0 : instance.options) == null ? void 0 : _b2.adminSchemaUid
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
await this.db.getModel("uiSchemaTreePath").update(
|
|
72
|
-
{
|
|
73
|
-
ancestor: "nocobase-admin-menu"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
transaction,
|
|
77
|
-
where: {
|
|
78
|
-
ancestor: (_c = instance == null ? void 0 : instance.options) == null ? void 0 : _c.adminSchemaUid
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
});
|
|
83
|
-
console.log((_b = instance == null ? void 0 : instance.options) == null ? void 0 : _b.adminSchemaUid);
|
|
84
|
-
}
|
|
85
|
-
}
|
package/dist/server/server.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Plugin } from '@nocobase/server';
|
|
10
|
-
export declare class PluginClientServer extends Plugin {
|
|
11
|
-
beforeLoad(): Promise<void>;
|
|
12
|
-
install(): Promise<void>;
|
|
13
|
-
load(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
export default PluginClientServer;
|
package/dist/server/server.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var server_exports = {};
|
|
38
|
-
__export(server_exports, {
|
|
39
|
-
PluginClientServer: () => PluginClientServer,
|
|
40
|
-
default: () => server_default
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(server_exports);
|
|
43
|
-
var import_server = require("@nocobase/server");
|
|
44
|
-
var import_path = require("path");
|
|
45
|
-
var import_antd = require("./antd");
|
|
46
|
-
var import_cron = require("./cron");
|
|
47
|
-
var import_cronstrue = require("./cronstrue");
|
|
48
|
-
var process = __toESM(require("node:process"));
|
|
49
|
-
async function getLang(ctx) {
|
|
50
|
-
const SystemSetting = ctx.db.getRepository("systemSettings");
|
|
51
|
-
const systemSetting = await SystemSetting.findOne();
|
|
52
|
-
const enabledLanguages = systemSetting.get("enabledLanguages") || [];
|
|
53
|
-
const currentUser = ctx.state.currentUser;
|
|
54
|
-
let lang = (enabledLanguages == null ? void 0 : enabledLanguages[0]) || process.env.APP_LANG || "en-US";
|
|
55
|
-
if (enabledLanguages.includes(currentUser == null ? void 0 : currentUser.appLang)) {
|
|
56
|
-
lang = currentUser == null ? void 0 : currentUser.appLang;
|
|
57
|
-
}
|
|
58
|
-
if (ctx.request.query.locale && enabledLanguages.includes(ctx.request.query.locale)) {
|
|
59
|
-
lang = ctx.request.query.locale;
|
|
60
|
-
}
|
|
61
|
-
return lang;
|
|
62
|
-
}
|
|
63
|
-
class PluginClientServer extends import_server.Plugin {
|
|
64
|
-
async beforeLoad() {
|
|
65
|
-
}
|
|
66
|
-
async install() {
|
|
67
|
-
const uiSchemas = this.db.getRepository("uiSchemas");
|
|
68
|
-
await uiSchemas.insert({
|
|
69
|
-
type: "void",
|
|
70
|
-
"x-uid": "nocobase-admin-menu",
|
|
71
|
-
"x-component": "Menu",
|
|
72
|
-
"x-designer": "Menu.Designer",
|
|
73
|
-
"x-initializer": "MenuItemInitializers",
|
|
74
|
-
"x-component-props": {
|
|
75
|
-
mode: "mix",
|
|
76
|
-
theme: "dark",
|
|
77
|
-
// defaultSelectedUid: 'u8',
|
|
78
|
-
onSelect: "{{ onSelect }}",
|
|
79
|
-
sideMenuRefScopeKey: "sideMenuRef"
|
|
80
|
-
},
|
|
81
|
-
properties: {}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
async load() {
|
|
85
|
-
this.app.localeManager.setLocaleFn("antd", async (lang) => (0, import_antd.getAntdLocale)(lang));
|
|
86
|
-
this.app.localeManager.setLocaleFn("cronstrue", async (lang) => (0, import_cronstrue.getCronstrueLocale)(lang));
|
|
87
|
-
this.app.localeManager.setLocaleFn("cron", async (lang) => (0, import_cron.getCronLocale)(lang));
|
|
88
|
-
this.db.addMigrations({
|
|
89
|
-
namespace: "client",
|
|
90
|
-
directory: (0, import_path.resolve)(__dirname, "./migrations"),
|
|
91
|
-
context: {
|
|
92
|
-
plugin: this
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
this.app.acl.allow("app", "getLang");
|
|
96
|
-
this.app.acl.allow("app", "getInfo");
|
|
97
|
-
this.app.acl.registerSnippet({
|
|
98
|
-
name: "app",
|
|
99
|
-
actions: ["app:restart", "app:clearCache"]
|
|
100
|
-
});
|
|
101
|
-
const dialect = this.app.db.sequelize.getDialect();
|
|
102
|
-
this.app.resource({
|
|
103
|
-
name: "app",
|
|
104
|
-
actions: {
|
|
105
|
-
async getInfo(ctx, next) {
|
|
106
|
-
var _a, _b;
|
|
107
|
-
const SystemSetting = ctx.db.getRepository("systemSettings");
|
|
108
|
-
const systemSetting = await SystemSetting.findOne();
|
|
109
|
-
const enabledLanguages = systemSetting.get("enabledLanguages") || [];
|
|
110
|
-
const currentUser = ctx.state.currentUser;
|
|
111
|
-
let lang = (enabledLanguages == null ? void 0 : enabledLanguages[0]) || process.env.APP_LANG || "en-US";
|
|
112
|
-
if (enabledLanguages.includes(currentUser == null ? void 0 : currentUser.appLang)) {
|
|
113
|
-
lang = currentUser == null ? void 0 : currentUser.appLang;
|
|
114
|
-
}
|
|
115
|
-
const info = {
|
|
116
|
-
database: {
|
|
117
|
-
dialect
|
|
118
|
-
},
|
|
119
|
-
version: await ctx.app.version.get(),
|
|
120
|
-
lang,
|
|
121
|
-
name: ctx.app.name,
|
|
122
|
-
theme: ((_a = currentUser == null ? void 0 : currentUser.systemSettings) == null ? void 0 : _a.theme) || ((_b = systemSetting == null ? void 0 : systemSetting.options) == null ? void 0 : _b.theme) || "default"
|
|
123
|
-
};
|
|
124
|
-
if (process.env["EXPORT_LIMIT"]) {
|
|
125
|
-
info.exportLimit = parseInt(process.env["EXPORT_LIMIT"]);
|
|
126
|
-
}
|
|
127
|
-
ctx.body = info;
|
|
128
|
-
await next();
|
|
129
|
-
},
|
|
130
|
-
async getLang(ctx, next) {
|
|
131
|
-
const lang = await getLang(ctx);
|
|
132
|
-
const resources = await ctx.app.localeManager.get(lang);
|
|
133
|
-
ctx.body = {
|
|
134
|
-
lang,
|
|
135
|
-
...resources
|
|
136
|
-
};
|
|
137
|
-
await next();
|
|
138
|
-
},
|
|
139
|
-
async clearCache(ctx, next) {
|
|
140
|
-
await ctx.cache.reset();
|
|
141
|
-
await next();
|
|
142
|
-
},
|
|
143
|
-
async restart(ctx, next) {
|
|
144
|
-
ctx.app.runAsCLI(["restart"], { from: "user" });
|
|
145
|
-
await next();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
var server_default = PluginClientServer;
|
|
152
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
153
|
-
0 && (module.exports = {
|
|
154
|
-
PluginClientServer
|
|
155
|
-
});
|