@nocobase/plugin-error-handler 1.3.38-beta → 1.4.0-alpha

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.
@@ -8,9 +8,9 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.3.38-beta",
11
+ "@nocobase/client": "1.4.0-alpha",
12
12
  "@formily/json-schema": "2.3.0",
13
- "@nocobase/database": "1.3.38-beta",
14
- "@nocobase/server": "1.3.38-beta",
13
+ "@nocobase/database": "1.4.0-alpha",
14
+ "@nocobase/server": "1.4.0-alpha",
15
15
  "lodash": "4.17.21"
16
16
  };
@@ -0,0 +1,6 @@
1
+ {
2
+ "unique violation": "{{field}} must be unique",
3
+ "notNull violation": "notNull violation",
4
+ "Validation error": "{{field}} validation error",
5
+ "notNull Violation": "{{field}} cannot be null"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "unique violation": "{{field}} debe ser único",
3
+ "notNull violation": "notNull violación",
4
+ "Validation error": "{{field}} error de validación",
5
+ "notNull Violation": "{{field}} no puede ser null"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "unique violation": "{{field}} doit être unique",
3
+ "notNull violation": "Violation de contrainte notNull",
4
+ "Validation error": "Erreur de validation de {{field}}",
5
+ "notNull Violation": "{{field}} ne peut pas être null"
6
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "unique violation": "{{field}} は一意でなくてはなりません",
3
+ "notNull Violation": "{{field}} はNullにできません"
4
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "unique violation": "{{field}} deve ser único",
3
+ "notNull violation": "violação de não nulo",
4
+ "Validation error": "erro de validação de {{field}}",
5
+ "notNull Violation": "{{field}} não pode ser nulo"
6
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "unique violation": "{{field}} 字段值是唯一的",
3
+ "notNull violation": "{{field}} 字段不能为空",
4
+ "Validation error": "{{field}} 字段规则验证失败"
5
+ }
@@ -44,8 +44,6 @@ var import_database = require("@nocobase/database");
44
44
  var import_server = require("@nocobase/server");
45
45
  var import_lodash = __toESM(require("lodash"));
46
46
  var import_error_handler = require("./error-handler");
47
- var import_en_US = __toESM(require("./locale/en_US"));
48
- var import_zh_CN = __toESM(require("./locale/zh_CN"));
49
47
  class PluginErrorHandlerServer extends import_server.Plugin {
50
48
  errorHandler = new import_error_handler.ErrorHandler();
51
49
  i18nNs = "error-handler";
@@ -93,8 +91,6 @@ class PluginErrorHandlerServer extends import_server.Plugin {
93
91
  );
94
92
  }
95
93
  async load() {
96
- this.app.i18n.addResources("zh-CN", this.i18nNs, import_zh_CN.default);
97
- this.app.i18n.addResources("en-US", this.i18nNs, import_en_US.default);
98
94
  this.app.use(this.errorHandler.middleware(), { before: "cors", tag: "errorHandler" });
99
95
  }
100
96
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "错误处理器",
5
5
  "description": "Handling application errors and exceptions.",
6
6
  "description.zh-CN": "处理应用程序中的错误和异常。",
7
- "version": "1.3.38-beta",
7
+ "version": "1.4.0-alpha",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "devDependencies": {
@@ -23,5 +23,5 @@
23
23
  "url": "git+https://github.com/nocobase/nocobase.git",
24
24
  "directory": "packages/plugin-error-handler"
25
25
  },
26
- "gitHead": "1b9490667c9224cd0b179cbf75e10a581c49b230"
26
+ "gitHead": "f097a2bddec152522b5645bd5d451f4c866d2060"
27
27
  }
@@ -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
- declare const _default: {
10
- 'unique violation': string;
11
- 'notNull violation': string;
12
- 'Validation error': string;
13
- 'notNull Violation': string;
14
- };
15
- export default _default;
@@ -1,37 +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 en_US_exports = {};
28
- __export(en_US_exports, {
29
- default: () => en_US_default
30
- });
31
- module.exports = __toCommonJS(en_US_exports);
32
- var en_US_default = {
33
- "unique violation": "{{field}} must be unique",
34
- "notNull violation": "notNull violation",
35
- "Validation error": "{{field}} validation error",
36
- "notNull Violation": "{{field}} cannot be null"
37
- };
@@ -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
- declare const _default: {
10
- "unique violation": string;
11
- "notNull violation": string;
12
- "Validation error": string;
13
- "notNull Violation": string;
14
- };
15
- export default _default;
@@ -1,37 +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 es_ES_exports = {};
28
- __export(es_ES_exports, {
29
- default: () => es_ES_default
30
- });
31
- module.exports = __toCommonJS(es_ES_exports);
32
- var es_ES_default = {
33
- "unique violation": "{{field}} debe ser \xFAnico",
34
- "notNull violation": "notNull violaci\xF3n",
35
- "Validation error": "{{field}} error de validaci\xF3n",
36
- "notNull Violation": "{{field}} no puede ser null"
37
- };
@@ -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
- declare const _default: {
10
- 'unique violation': string;
11
- 'notNull violation': string;
12
- 'Validation error': string;
13
- 'notNull Violation': string;
14
- };
15
- export default _default;
@@ -1,37 +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 fr_FR_exports = {};
28
- __export(fr_FR_exports, {
29
- default: () => fr_FR_default
30
- });
31
- module.exports = __toCommonJS(fr_FR_exports);
32
- var fr_FR_default = {
33
- "unique violation": "{{field}} doit \xEAtre unique",
34
- "notNull violation": "Violation de contrainte notNull",
35
- "Validation error": "Erreur de validation de {{field}}",
36
- "notNull Violation": "{{field}} ne peut pas \xEAtre null"
37
- };
@@ -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
- declare const _default: {
10
- 'unique violation': string;
11
- 'notNull Violation': string;
12
- };
13
- export default _default;
@@ -1,35 +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 ja_JP_exports = {};
28
- __export(ja_JP_exports, {
29
- default: () => ja_JP_default
30
- });
31
- module.exports = __toCommonJS(ja_JP_exports);
32
- var ja_JP_default = {
33
- "unique violation": "{{field}} \u306F\u4E00\u610F\u3067\u306A\u304F\u3066\u306F\u306A\u308A\u307E\u305B\u3093",
34
- "notNull Violation": "{{field}} \u306FNull\u306B\u3067\u304D\u307E\u305B\u3093"
35
- };
@@ -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
- declare const _default: {
10
- 'unique violation': string;
11
- 'notNull violation': string;
12
- 'Validation error': string;
13
- 'notNull Violation': string;
14
- };
15
- export default _default;
@@ -1,37 +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 pt_BR_exports = {};
28
- __export(pt_BR_exports, {
29
- default: () => pt_BR_default
30
- });
31
- module.exports = __toCommonJS(pt_BR_exports);
32
- var pt_BR_default = {
33
- "unique violation": "{{field}} deve ser \xFAnico",
34
- "notNull violation": "viola\xE7\xE3o de n\xE3o nulo",
35
- "Validation error": "erro de valida\xE7\xE3o de {{field}}",
36
- "notNull Violation": "{{field}} n\xE3o pode ser nulo"
37
- };
@@ -1,14 +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
- declare const _default: {
10
- 'unique violation': string;
11
- 'notNull violation': string;
12
- 'Validation error': string;
13
- };
14
- export default _default;
@@ -1,36 +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 zh_CN_exports = {};
28
- __export(zh_CN_exports, {
29
- default: () => zh_CN_default
30
- });
31
- module.exports = __toCommonJS(zh_CN_exports);
32
- var zh_CN_default = {
33
- "unique violation": "{{field}} \u5B57\u6BB5\u503C\u662F\u552F\u4E00\u7684",
34
- "notNull violation": "{{field}} \u5B57\u6BB5\u4E0D\u80FD\u4E3A\u7A7A",
35
- "Validation error": "{{field}} \u5B57\u6BB5\u89C4\u5219\u9A8C\u8BC1\u5931\u8D25"
36
- };
File without changes
File without changes
File without changes
File without changes
File without changes