@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.
Files changed (238) hide show
  1. package/package.json +2 -2
  2. package/dist/client/index.d.ts +0 -13
  3. package/dist/client/index.js +0 -10
  4. package/dist/externalVersion.js +0 -15
  5. package/dist/index.d.ts +0 -10
  6. package/dist/index.js +0 -48
  7. package/dist/locale/antd/ar_EG.js +0 -10
  8. package/dist/locale/antd/az_AZ.js +0 -10
  9. package/dist/locale/antd/bg_BG.js +0 -10
  10. package/dist/locale/antd/bn_BD.js +0 -10
  11. package/dist/locale/antd/by_BY.js +0 -10
  12. package/dist/locale/antd/ca_ES.js +0 -10
  13. package/dist/locale/antd/cs_CZ.js +0 -10
  14. package/dist/locale/antd/da_DK.js +0 -10
  15. package/dist/locale/antd/de_DE.js +0 -10
  16. package/dist/locale/antd/el_GR.js +0 -10
  17. package/dist/locale/antd/en_GB.js +0 -10
  18. package/dist/locale/antd/en_US.js +0 -10
  19. package/dist/locale/antd/es_ES.js +0 -10
  20. package/dist/locale/antd/et_EE.js +0 -10
  21. package/dist/locale/antd/eu_ES.js +0 -10
  22. package/dist/locale/antd/fa_IR.js +0 -10
  23. package/dist/locale/antd/fi_FI.js +0 -10
  24. package/dist/locale/antd/fr_BE.js +0 -10
  25. package/dist/locale/antd/fr_CA.js +0 -10
  26. package/dist/locale/antd/fr_FR.js +0 -10
  27. package/dist/locale/antd/ga_IE.js +0 -10
  28. package/dist/locale/antd/gl_ES.js +0 -10
  29. package/dist/locale/antd/he_IL.js +0 -10
  30. package/dist/locale/antd/hi_IN.js +0 -10
  31. package/dist/locale/antd/hr_HR.js +0 -10
  32. package/dist/locale/antd/hu_HU.js +0 -10
  33. package/dist/locale/antd/hy_AM.js +0 -10
  34. package/dist/locale/antd/id_ID.js +0 -10
  35. package/dist/locale/antd/index.js +0 -10
  36. package/dist/locale/antd/is_IS.js +0 -10
  37. package/dist/locale/antd/it_IT.js +0 -10
  38. package/dist/locale/antd/ja_JP.js +0 -10
  39. package/dist/locale/antd/ka_GE.js +0 -10
  40. package/dist/locale/antd/kk_KZ.js +0 -10
  41. package/dist/locale/antd/km_KH.js +0 -10
  42. package/dist/locale/antd/kmr_IQ.js +0 -10
  43. package/dist/locale/antd/kn_IN.js +0 -10
  44. package/dist/locale/antd/ko_KR.js +0 -10
  45. package/dist/locale/antd/ku_IQ.js +0 -10
  46. package/dist/locale/antd/lt_LT.js +0 -10
  47. package/dist/locale/antd/lv_LV.js +0 -10
  48. package/dist/locale/antd/mk_MK.js +0 -10
  49. package/dist/locale/antd/ml_IN.js +0 -10
  50. package/dist/locale/antd/mn_MN.js +0 -10
  51. package/dist/locale/antd/ms_MY.js +0 -10
  52. package/dist/locale/antd/my_MM.js +0 -10
  53. package/dist/locale/antd/nb_NO.js +0 -10
  54. package/dist/locale/antd/ne_NP.js +0 -10
  55. package/dist/locale/antd/nl_BE.js +0 -10
  56. package/dist/locale/antd/nl_NL.js +0 -10
  57. package/dist/locale/antd/pl_PL.js +0 -10
  58. package/dist/locale/antd/pt_BR.js +0 -10
  59. package/dist/locale/antd/pt_PT.js +0 -10
  60. package/dist/locale/antd/ro_RO.js +0 -10
  61. package/dist/locale/antd/ru_RU.js +0 -10
  62. package/dist/locale/antd/si_LK.js +0 -10
  63. package/dist/locale/antd/sk_SK.js +0 -10
  64. package/dist/locale/antd/sl_SI.js +0 -10
  65. package/dist/locale/antd/sr_RS.js +0 -10
  66. package/dist/locale/antd/sv_SE.js +0 -10
  67. package/dist/locale/antd/ta_IN.js +0 -10
  68. package/dist/locale/antd/th_TH.js +0 -10
  69. package/dist/locale/antd/tk_TK.js +0 -10
  70. package/dist/locale/antd/tr_TR.js +0 -10
  71. package/dist/locale/antd/uk_UA.js +0 -10
  72. package/dist/locale/antd/ur_PK.js +0 -10
  73. package/dist/locale/antd/useLocale.js +0 -10
  74. package/dist/locale/antd/vi_VN.js +0 -10
  75. package/dist/locale/antd/zh_CN.js +0 -10
  76. package/dist/locale/antd/zh_HK.js +0 -10
  77. package/dist/locale/antd/zh_TW.js +0 -10
  78. package/dist/locale/cron/zh_CN.js +0 -42
  79. package/dist/locale/cron/zh_TW.js +0 -42
  80. package/dist/locale/en_US.js +0 -844
  81. package/dist/locale/es_ES.js +0 -775
  82. package/dist/locale/fr_FR.js +0 -795
  83. package/dist/locale/index.js +0 -174
  84. package/dist/locale/ja_JP.js +0 -714
  85. package/dist/locale/ko_KR.js +0 -886
  86. package/dist/locale/pt_BR.js +0 -752
  87. package/dist/locale/ru_RU.js +0 -589
  88. package/dist/locale/tr_TR.js +0 -587
  89. package/dist/locale/uk_UA.js +0 -795
  90. package/dist/locale/zh-CN.js +0 -975
  91. package/dist/locale/zh-TW.js +0 -884
  92. package/dist/node_modules/cronstrue/LICENSE +0 -21
  93. package/dist/node_modules/cronstrue/bin/cli.js +0 -26
  94. package/dist/node_modules/cronstrue/dist/cronParser.d.ts +0 -12
  95. package/dist/node_modules/cronstrue/dist/cronstrue-i18n.d.ts +0 -4
  96. package/dist/node_modules/cronstrue/dist/cronstrue-i18n.js +0 -7912
  97. package/dist/node_modules/cronstrue/dist/cronstrue-i18n.min.js +0 -1
  98. package/dist/node_modules/cronstrue/dist/cronstrue.d.ts +0 -4
  99. package/dist/node_modules/cronstrue/dist/cronstrue.js +0 -1
  100. package/dist/node_modules/cronstrue/dist/cronstrue.min.js +0 -1
  101. package/dist/node_modules/cronstrue/dist/expressionDescriptor.d.ts +0 -31
  102. package/dist/node_modules/cronstrue/dist/i18n/allLocales.d.ts +0 -37
  103. package/dist/node_modules/cronstrue/dist/i18n/allLocalesLoader.d.ts +0 -6
  104. package/dist/node_modules/cronstrue/dist/i18n/enLocaleLoader.d.ts +0 -6
  105. package/dist/node_modules/cronstrue/dist/i18n/locale.d.ts +0 -62
  106. package/dist/node_modules/cronstrue/dist/i18n/localeLoader.d.ts +0 -6
  107. package/dist/node_modules/cronstrue/dist/i18n/locales/af.d.ts +0 -56
  108. package/dist/node_modules/cronstrue/dist/i18n/locales/ar.d.ts +0 -56
  109. package/dist/node_modules/cronstrue/dist/i18n/locales/be.d.ts +0 -55
  110. package/dist/node_modules/cronstrue/dist/i18n/locales/bg.d.ts +0 -56
  111. package/dist/node_modules/cronstrue/dist/i18n/locales/ca.d.ts +0 -55
  112. package/dist/node_modules/cronstrue/dist/i18n/locales/cs.d.ts +0 -55
  113. package/dist/node_modules/cronstrue/dist/i18n/locales/da.d.ts +0 -55
  114. package/dist/node_modules/cronstrue/dist/i18n/locales/de.d.ts +0 -55
  115. package/dist/node_modules/cronstrue/dist/i18n/locales/en.d.ts +0 -56
  116. package/dist/node_modules/cronstrue/dist/i18n/locales/es.d.ts +0 -55
  117. package/dist/node_modules/cronstrue/dist/i18n/locales/fa.d.ts +0 -57
  118. package/dist/node_modules/cronstrue/dist/i18n/locales/fi.d.ts +0 -58
  119. package/dist/node_modules/cronstrue/dist/i18n/locales/fr.d.ts +0 -56
  120. package/dist/node_modules/cronstrue/dist/i18n/locales/he.d.ts +0 -55
  121. package/dist/node_modules/cronstrue/dist/i18n/locales/hu.d.ts +0 -56
  122. package/dist/node_modules/cronstrue/dist/i18n/locales/id.d.ts +0 -56
  123. package/dist/node_modules/cronstrue/dist/i18n/locales/it.d.ts +0 -55
  124. package/dist/node_modules/cronstrue/dist/i18n/locales/ja.d.ts +0 -60
  125. package/dist/node_modules/cronstrue/dist/i18n/locales/ko.d.ts +0 -60
  126. package/dist/node_modules/cronstrue/dist/i18n/locales/my.d.ts +0 -56
  127. package/dist/node_modules/cronstrue/dist/i18n/locales/nb.d.ts +0 -55
  128. package/dist/node_modules/cronstrue/dist/i18n/locales/nl.d.ts +0 -55
  129. package/dist/node_modules/cronstrue/dist/i18n/locales/pl.d.ts +0 -55
  130. package/dist/node_modules/cronstrue/dist/i18n/locales/pt_BR.d.ts +0 -55
  131. package/dist/node_modules/cronstrue/dist/i18n/locales/pt_PT.d.ts +0 -55
  132. package/dist/node_modules/cronstrue/dist/i18n/locales/ro.d.ts +0 -55
  133. package/dist/node_modules/cronstrue/dist/i18n/locales/ru.d.ts +0 -58
  134. package/dist/node_modules/cronstrue/dist/i18n/locales/sk.d.ts +0 -55
  135. package/dist/node_modules/cronstrue/dist/i18n/locales/sl.d.ts +0 -55
  136. package/dist/node_modules/cronstrue/dist/i18n/locales/sv.d.ts +0 -55
  137. package/dist/node_modules/cronstrue/dist/i18n/locales/sw.d.ts +0 -55
  138. package/dist/node_modules/cronstrue/dist/i18n/locales/th.d.ts +0 -56
  139. package/dist/node_modules/cronstrue/dist/i18n/locales/tr.d.ts +0 -55
  140. package/dist/node_modules/cronstrue/dist/i18n/locales/uk.d.ts +0 -55
  141. package/dist/node_modules/cronstrue/dist/i18n/locales/vi.d.ts +0 -56
  142. package/dist/node_modules/cronstrue/dist/i18n/locales/zh_CN.d.ts +0 -61
  143. package/dist/node_modules/cronstrue/dist/i18n/locales/zh_TW.d.ts +0 -58
  144. package/dist/node_modules/cronstrue/dist/options.d.ts +0 -9
  145. package/dist/node_modules/cronstrue/dist/rangeValidator.d.ts +0 -8
  146. package/dist/node_modules/cronstrue/dist/stringUtilities.d.ts +0 -4
  147. package/dist/node_modules/cronstrue/i18n.d.ts +0 -4
  148. package/dist/node_modules/cronstrue/i18n.js +0 -5
  149. package/dist/node_modules/cronstrue/locales/af.js +0 -287
  150. package/dist/node_modules/cronstrue/locales/af.min.js +0 -1
  151. package/dist/node_modules/cronstrue/locales/ar.js +0 -287
  152. package/dist/node_modules/cronstrue/locales/ar.min.js +0 -1
  153. package/dist/node_modules/cronstrue/locales/be.js +0 -284
  154. package/dist/node_modules/cronstrue/locales/be.min.js +0 -1
  155. package/dist/node_modules/cronstrue/locales/bg.js +0 -290
  156. package/dist/node_modules/cronstrue/locales/bg.min.js +0 -1
  157. package/dist/node_modules/cronstrue/locales/ca.js +0 -284
  158. package/dist/node_modules/cronstrue/locales/ca.min.js +0 -1
  159. package/dist/node_modules/cronstrue/locales/cs.js +0 -284
  160. package/dist/node_modules/cronstrue/locales/cs.min.js +0 -1
  161. package/dist/node_modules/cronstrue/locales/da.js +0 -284
  162. package/dist/node_modules/cronstrue/locales/da.min.js +0 -1
  163. package/dist/node_modules/cronstrue/locales/de.js +0 -284
  164. package/dist/node_modules/cronstrue/locales/de.min.js +0 -1
  165. package/dist/node_modules/cronstrue/locales/en.js +0 -287
  166. package/dist/node_modules/cronstrue/locales/en.min.js +0 -1
  167. package/dist/node_modules/cronstrue/locales/es.js +0 -284
  168. package/dist/node_modules/cronstrue/locales/es.min.js +0 -1
  169. package/dist/node_modules/cronstrue/locales/fa.js +0 -277
  170. package/dist/node_modules/cronstrue/locales/fa.min.js +0 -1
  171. package/dist/node_modules/cronstrue/locales/fi.js +0 -293
  172. package/dist/node_modules/cronstrue/locales/fi.min.js +0 -1
  173. package/dist/node_modules/cronstrue/locales/fr.js +0 -287
  174. package/dist/node_modules/cronstrue/locales/fr.min.js +0 -1
  175. package/dist/node_modules/cronstrue/locales/he.js +0 -271
  176. package/dist/node_modules/cronstrue/locales/he.min.js +0 -1
  177. package/dist/node_modules/cronstrue/locales/hu.js +0 -287
  178. package/dist/node_modules/cronstrue/locales/hu.min.js +0 -1
  179. package/dist/node_modules/cronstrue/locales/id.js +0 -287
  180. package/dist/node_modules/cronstrue/locales/id.min.js +0 -1
  181. package/dist/node_modules/cronstrue/locales/it.js +0 -284
  182. package/dist/node_modules/cronstrue/locales/it.min.js +0 -1
  183. package/dist/node_modules/cronstrue/locales/ja.js +0 -286
  184. package/dist/node_modules/cronstrue/locales/ja.min.js +0 -1
  185. package/dist/node_modules/cronstrue/locales/ko.js +0 -286
  186. package/dist/node_modules/cronstrue/locales/ko.min.js +0 -1
  187. package/dist/node_modules/cronstrue/locales/my.js +0 -287
  188. package/dist/node_modules/cronstrue/locales/my.min.js +0 -1
  189. package/dist/node_modules/cronstrue/locales/nb.js +0 -284
  190. package/dist/node_modules/cronstrue/locales/nb.min.js +0 -1
  191. package/dist/node_modules/cronstrue/locales/nl.js +0 -284
  192. package/dist/node_modules/cronstrue/locales/nl.min.js +0 -1
  193. package/dist/node_modules/cronstrue/locales/pl.js +0 -284
  194. package/dist/node_modules/cronstrue/locales/pl.min.js +0 -1
  195. package/dist/node_modules/cronstrue/locales/pt_BR.js +0 -284
  196. package/dist/node_modules/cronstrue/locales/pt_BR.min.js +0 -1
  197. package/dist/node_modules/cronstrue/locales/pt_PT.js +0 -284
  198. package/dist/node_modules/cronstrue/locales/pt_PT.min.js +0 -1
  199. package/dist/node_modules/cronstrue/locales/ro.js +0 -284
  200. package/dist/node_modules/cronstrue/locales/ro.min.js +0 -1
  201. package/dist/node_modules/cronstrue/locales/ru.js +0 -327
  202. package/dist/node_modules/cronstrue/locales/ru.min.js +0 -1
  203. package/dist/node_modules/cronstrue/locales/sk.js +0 -284
  204. package/dist/node_modules/cronstrue/locales/sk.min.js +0 -1
  205. package/dist/node_modules/cronstrue/locales/sl.js +0 -284
  206. package/dist/node_modules/cronstrue/locales/sl.min.js +0 -1
  207. package/dist/node_modules/cronstrue/locales/sv.js +0 -284
  208. package/dist/node_modules/cronstrue/locales/sv.min.js +0 -1
  209. package/dist/node_modules/cronstrue/locales/sw.js +0 -284
  210. package/dist/node_modules/cronstrue/locales/sw.min.js +0 -1
  211. package/dist/node_modules/cronstrue/locales/th.js +0 -287
  212. package/dist/node_modules/cronstrue/locales/th.min.js +0 -1
  213. package/dist/node_modules/cronstrue/locales/tr.js +0 -284
  214. package/dist/node_modules/cronstrue/locales/tr.min.js +0 -1
  215. package/dist/node_modules/cronstrue/locales/uk.js +0 -284
  216. package/dist/node_modules/cronstrue/locales/uk.min.js +0 -1
  217. package/dist/node_modules/cronstrue/locales/vi.js +0 -287
  218. package/dist/node_modules/cronstrue/locales/vi.min.js +0 -1
  219. package/dist/node_modules/cronstrue/locales/zh_CN.js +0 -289
  220. package/dist/node_modules/cronstrue/locales/zh_CN.min.js +0 -1
  221. package/dist/node_modules/cronstrue/locales/zh_TW.js +0 -280
  222. package/dist/node_modules/cronstrue/locales/zh_TW.min.js +0 -1
  223. package/dist/node_modules/cronstrue/package.json +0 -1
  224. package/dist/server/antd.d.ts +0 -9
  225. package/dist/server/antd.js +0 -54
  226. package/dist/server/cron.d.ts +0 -9
  227. package/dist/server/cron.js +0 -53
  228. package/dist/server/cronstrue.d.ts +0 -9
  229. package/dist/server/cronstrue.js +0 -145
  230. package/dist/server/index.d.ts +0 -9
  231. package/dist/server/index.js +0 -42
  232. package/dist/server/migrations/20230620203216-admin-ui-schema-uid.d.ts +0 -13
  233. package/dist/server/migrations/20230620203216-admin-ui-schema-uid.js +0 -73
  234. package/dist/server/migrations/20231215215247-admin-menu-uid.d.ts +0 -13
  235. package/dist/server/migrations/20231215215247-admin-menu-uid.js +0 -85
  236. package/dist/server/server.d.ts +0 -15
  237. package/dist/server/server.js +0 -155
  238. package/dist/swagger/index.json +0 -7
@@ -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) => {};
@@ -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
- });
@@ -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';
@@ -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
- }
@@ -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;
@@ -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
- });
@@ -1,7 +0,0 @@
1
- {
2
- "openapi": "3.0.2",
3
- "info": {
4
- "title": "NocoBase API - Client plugin"
5
- },
6
- "paths": {}
7
- }