@digitaldefiance/i18n-lib 3.7.2 → 3.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -34
- package/package.json +4 -1
- package/src/component-registry.d.ts.map +1 -1
- package/src/component-registry.js.map +1 -1
- package/src/core/component-store.d.ts.map +1 -1
- package/src/core/component-store.js +2 -2
- package/src/core/component-store.js.map +1 -1
- package/src/core/enum-registry.d.ts +1 -1
- package/src/core/enum-registry.d.ts.map +1 -1
- package/src/core/enum-registry.js +4 -1
- package/src/core/enum-registry.js.map +1 -1
- package/src/core/i18n-engine.d.ts.map +1 -1
- package/src/core/i18n-engine.js +24 -12
- package/src/core/i18n-engine.js.map +1 -1
- package/src/core-i18n.d.ts +2 -2
- package/src/core-i18n.d.ts.map +1 -1
- package/src/core-i18n.js +11 -8
- package/src/core-i18n.js.map +1 -1
- package/src/errors/context-error.d.ts.map +1 -1
- package/src/errors/context-error.js.map +1 -1
- package/src/errors/enhanced-error-base.d.ts +5 -0
- package/src/errors/enhanced-error-base.d.ts.map +1 -1
- package/src/errors/i18n-error.d.ts.map +1 -1
- package/src/errors/i18n-error.js +97 -30
- package/src/errors/i18n-error.js.map +1 -1
- package/src/errors/index.d.ts +3 -2
- package/src/errors/index.d.ts.map +1 -1
- package/src/errors/index.js +3 -2
- package/src/errors/index.js.map +1 -1
- package/src/errors/simple-typed-error.d.ts +53 -0
- package/src/errors/simple-typed-error.d.ts.map +1 -0
- package/src/errors/simple-typed-error.js +51 -0
- package/src/errors/simple-typed-error.js.map +1 -0
- package/src/errors/translatable-generic.d.ts.map +1 -1
- package/src/errors/translatable-generic.js.map +1 -1
- package/src/errors/translatable.d.ts.map +1 -1
- package/src/errors/translatable.js.map +1 -1
- package/src/errors/typed-handleable.d.ts +1 -1
- package/src/errors/typed-handleable.d.ts.map +1 -1
- package/src/errors/typed-handleable.js +3 -1
- package/src/errors/typed-handleable.js.map +1 -1
- package/src/errors/typed.d.ts +7 -5
- package/src/errors/typed.d.ts.map +1 -1
- package/src/errors/typed.js +23 -16
- package/src/errors/typed.js.map +1 -1
- package/src/global-active-context.d.ts +2 -2
- package/src/global-active-context.d.ts.map +1 -1
- package/src/global-active-context.js +2 -2
- package/src/global-active-context.js.map +1 -1
- package/src/pluralization/language-plural-map.d.ts +2 -2
- package/src/pluralization/language-plural-map.d.ts.map +1 -1
- package/src/pluralization/language-plural-map.js +90 -71
- package/src/pluralization/language-plural-map.js.map +1 -1
- package/src/registry-error.d.ts +1 -1
- package/src/registry-error.d.ts.map +1 -1
- package/src/registry-error.js +2 -2
- package/src/registry-error.js.map +1 -1
- package/src/types/engine.d.ts +47 -0
- package/src/types/engine.d.ts.map +1 -0
- package/src/types/engine.js +8 -0
- package/src/types/engine.js.map +1 -0
- package/src/types/index.d.ts +1 -0
- package/src/types/index.d.ts.map +1 -1
- package/src/types/index.js +1 -0
- package/src/types/index.js.map +1 -1
- package/src/utils/safe-object.d.ts.map +1 -1
- package/src/utils/safe-object.js +1 -0
- package/src/utils/safe-object.js.map +1 -1
- package/src/utils.d.ts.map +1 -1
- package/src/utils.js.map +1 -1
package/src/core-i18n.js
CHANGED
|
@@ -19,19 +19,19 @@ exports.getCoreI18nEngine = getCoreI18nEngine;
|
|
|
19
19
|
exports.resetCoreI18nEngine = resetCoreI18nEngine;
|
|
20
20
|
exports.getCoreTranslation = getCoreTranslation;
|
|
21
21
|
exports.safeCoreTranslation = safeCoreTranslation;
|
|
22
|
+
const core_1 = require("./core");
|
|
22
23
|
const core_string_key_1 = require("./core-string-key");
|
|
23
24
|
const language_codes_1 = require("./language-codes");
|
|
24
25
|
const plugin_i18n_engine_1 = require("./plugin-i18n-engine");
|
|
25
26
|
const strict_types_1 = require("./strict-types");
|
|
26
|
-
const
|
|
27
|
-
const en_US_1 = require("./strings/en-US");
|
|
27
|
+
const de_1 = require("./strings/de");
|
|
28
28
|
const en_GB_1 = require("./strings/en-GB");
|
|
29
|
-
const
|
|
29
|
+
const en_US_1 = require("./strings/en-US");
|
|
30
30
|
const es_1 = require("./strings/es");
|
|
31
|
-
const
|
|
32
|
-
const zh_CN_1 = require("./strings/zh-CN");
|
|
31
|
+
const fr_1 = require("./strings/fr");
|
|
33
32
|
const ja_1 = require("./strings/ja");
|
|
34
33
|
const uk_1 = require("./strings/uk");
|
|
34
|
+
const zh_CN_1 = require("./strings/zh-CN");
|
|
35
35
|
/**
|
|
36
36
|
* Helper function to create multiple language definitions
|
|
37
37
|
*/
|
|
@@ -181,7 +181,8 @@ function getCorePluginI18nEngine() {
|
|
|
181
181
|
// Getter for direct reference - lazily initialized
|
|
182
182
|
exports.corePluginI18nEngine = new Proxy({}, {
|
|
183
183
|
get(_target, prop) {
|
|
184
|
-
|
|
184
|
+
const engine = getCorePluginI18nEngine();
|
|
185
|
+
return engine[prop];
|
|
185
186
|
},
|
|
186
187
|
});
|
|
187
188
|
// Reset function for tests
|
|
@@ -194,7 +195,9 @@ function resetCorePluginI18nEngine() {
|
|
|
194
195
|
*/
|
|
195
196
|
function getCorePluginTranslation(stringKey, variables, language, instanceKey) {
|
|
196
197
|
// Use core engine if no instance key specified, otherwise use specified instance
|
|
197
|
-
const engine = instanceKey
|
|
198
|
+
const engine = instanceKey
|
|
199
|
+
? plugin_i18n_engine_1.PluginI18nEngine.getInstance(instanceKey)
|
|
200
|
+
: getCoreI18nEngine();
|
|
198
201
|
return engine.translate(exports.CoreI18nComponentId, stringKey, variables, language);
|
|
199
202
|
}
|
|
200
203
|
/**
|
|
@@ -256,7 +259,7 @@ function getCoreI18nEngine() {
|
|
|
256
259
|
exports.coreI18nEngine = new Proxy({}, {
|
|
257
260
|
get(target, prop) {
|
|
258
261
|
return getCoreI18nEngine()[prop];
|
|
259
|
-
}
|
|
262
|
+
},
|
|
260
263
|
});
|
|
261
264
|
/**
|
|
262
265
|
* Reset function for tests
|
package/src/core-i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-i18n.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/core-i18n.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA2DH,wDA4CC;AAgBD,gEAWC;AAKD,0EAQC;AAKD,8DAMC;AAKD,oDAEC;AAKD,gEAEC;AAQD,gEAYC;AAMD,0DAeC;
|
|
1
|
+
{"version":3,"file":"core-i18n.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/core-i18n.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA2DH,wDA4CC;AAgBD,gEAWC;AAKD,0EAQC;AAKD,8DAMC;AAKD,oDAEC;AAKD,gEAEC;AAQD,gEAYC;AAMD,0DAeC;AAWD,8DAEC;AAWD,4DAWC;AAKD,8DAgBC;AAgCD,8CAmBC;AAcD,kDAEC;AAKD,gDAWC;AAKD,kDAUC;AAvWD,iCAAoC;AACpC,uDAAkD;AAElD,qDAAiD;AAEjD,6DAAwD;AAExD,iDAAgE;AAChE,qCAA6C;AAC7C,2CAAwD;AACxD,2CAAwD;AACxD,qCAA8C;AAC9C,qCAA6C;AAC7C,qCAA+C;AAC/C,qCAAgD;AAChD,2CAAkD;AAElD;;GAEG;AACH,SAAS,yBAAyB,CAChC,SAKE;IAEF,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC9B,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,KAAK;KACnC,CAAC,CAAC,CAAC;AACN,CAAC;AAgBD,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAErC;;GAEG;AACH,SAAgB,sBAAsB;IACpC,OAAO,yBAAyB,CAAC;QAC/B;YACE,EAAE,EAAE,8BAAa,CAAC,KAAK;YACvB,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,I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AS,EACT,QAAQ,CACT,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CACjC,SAAwB,EACxB,SAA2C,EAC3C,QAAiB;IAEjB,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,SAAS,GAAG,CAAC;IAC1B,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-error.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/context-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAKzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,gCAAgC;IAChC,
|
|
1
|
+
{"version":3,"file":"context-error.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/context-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAKzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,gCAAgC;IAChC,SAAyB,IAAI,EAAE,gBAAgB,CAAC;IAChD,2DAA2D;IAC3D,SAAgB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpC,kCAAkC;IAClC,SAAyB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAExD;;;;;;OAMG;gBAED,IAAI,EAAE,gBAAgB,EACtB,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM;IAwBnB;;;OAGG;IACH,MAAM,CAAC,cAAc,CACnB,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,MAAM,EACnB,QAAQ,SAAU,GACjB,YAAY;IAaf;;;OAGG;IACH,MAAM,CAAC,SAAS,CACd,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,SAAU,GACjB,YAAY;CAGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-error.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/context-error.ts"],"names":[],"mappings":";;;AACA,4CAAsE;AACtE,wDAAmD;AACnD,+DAA4D;AAE5D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,YAAa,SAAQ,KAAK;IACrC,gCAAgC;
|
|
1
|
+
{"version":3,"file":"context-error.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/context-error.ts"],"names":[],"mappings":";;;AACA,4CAAsE;AACtE,wDAAmD;AACnD,+DAA4D;AAE5D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,YAAa,SAAQ,KAAK;IACrC,gCAAgC;IACP,IAAI,CAAmB;IAChD,2DAA2D;IAC3C,UAAU,CAAU;IACpC,kCAAkC;IACT,QAAQ,CAAuB;IAExD;;;;;;OAMG;IACH,YACE,IAAsB,EACtB,UAAmB,EACnB,SAA2C,EAC3C,QAAiB;QAEjB,MAAM,MAAM,GAAG,IAAA,6BAAiB,GAAE,CAAC;QACnC,MAAM,OAAO,GAAG,EAAE,GAAG,SAAS,EAAE,UAAU,EAAE,UAAU,IAAI,EAAE,EAAE,CAAC;QAC/D,MAAM,OAAO,GAAG,UAAU;YACxB,CAAC,CAAC,MAAM,CAAC,aAAa,CAClB,+BAAmB,EACnB,+BAAa,CAAC,4BAA4B,EAC1C,OAAO,EACP,QAAQ,CACT;YACH,CAAC,CAAC,MAAM,CAAC,aAAa,CAClB,+BAAmB,EACnB,+BAAa,CAAC,oBAAoB,EAClC,OAAO,EACP,QAAQ,CACT,CAAC;QACN,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,cAAc,CACnB,IAAsB,EACtB,WAAmB,EACnB,QAAQ,GAAG,OAAO;QAElB,MAAM,QAAQ,GAAG,yCAAmB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QACjE,OAAO,IAAI,YAAY,CACrB,IAAI,EACJ,WAAW,EACX;YACE,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;SAC/C,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,SAAS,CACd,IAAsB,EACtB,UAAkB,EAClB,KAAa,EACb,QAAQ,GAAG,OAAO;QAElB,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAC;IACjE,CAAC;CACF;AA5ED,oCA4EC"}
|
|
@@ -115,6 +115,11 @@ export declare function withEnhancedI18n<T extends new (...args: any[]) => Error
|
|
|
115
115
|
message: string;
|
|
116
116
|
stack?: string;
|
|
117
117
|
cause?: unknown;
|
|
118
|
+
disposedAt?: string;
|
|
119
|
+
type?: string;
|
|
120
|
+
componentId?: string;
|
|
121
|
+
reasonMap?: Record<string, unknown>;
|
|
122
|
+
metadata?: Record<string, unknown>;
|
|
118
123
|
};
|
|
119
124
|
} & T;
|
|
120
125
|
//# sourceMappingURL=enhanced-error-base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enhanced-error-base.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/enhanced-error-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACtD,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,aAAa,CAClB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,oBAAyB,GACjC,MAAM;IAaT;;;;;;;OAOG;IACH,MAAM,CAAC,YAAY,CACjB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAM,GAChD,MAAM;IAKT;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CACjB,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,EACjD,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAM,GACjD,MAAM;IAMT;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,oBAAyB,GACjC,MAAM;IAWT;;;;;;;OAOG;IACH,MAAM,CAAC,YAAY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B,MAAM;4BAKA,MAAM,UACL,SAAS,GAAG,UAAU,GAAG,SAAS,WACjC,MAAM,YACN,oBAAoB,GAC5B,MAAM
|
|
1
|
+
{"version":3,"file":"enhanced-error-base.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/enhanced-error-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACtD,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,aAAa,CAClB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,oBAAyB,GACjC,MAAM;IAaT;;;;;;;OAOG;IACH,MAAM,CAAC,YAAY,CACjB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAM,GAChD,MAAM;IAKT;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CACjB,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,EACjD,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAM,GACjD,MAAM;IAMT;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,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,CAAC,CAAC,UACzC,cAAc,YACb,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,GAC5C,MAAM;8BAKC,MAAM,WACL,MAAM,YACN,oBAAoB,GAC5B,MAAM;4BAKA,MAAM,UACL,SAAS,GAAG,UAAU,GAAG,SAAS,WACjC,MAAM,YACN,oBAAoB,GAC5B,MAAM;;;;;;;;;;;MAIZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-error.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/i18n-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB,sCAAsC;;IAEtC,wCAAwC;;IAExC,qCAAqC;;IAErC,yDAAyD;;IAEzD,qCAAqC;;IAErC,8CAA8C;;IAE9C,6CAA6C;;IAE7C,4CAA4C;;IAE5C,8BAA8B;;IAE9B,mCAAmC;;IAEnC,mCAAmC;;IAEnC,sDAAsD;;IAEtD,uCAAuC;;IAEvC,oDAAoD;;IAEpD,oCAAoC;;IAEpC,wCAAwC;;IAExC,0BAA0B;;IAE1B,2CAA2C;;CAEnC,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK;aAQhB,IAAI,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"i18n-error.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/i18n-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB,sCAAsC;;IAEtC,wCAAwC;;IAExC,qCAAqC;;IAErC,yDAAyD;;IAEzD,qCAAqC;;IAErC,8CAA8C;;IAE9C,6CAA6C;;IAE7C,4CAA4C;;IAE5C,8BAA8B;;IAE9B,mCAAm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AAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,MAAM,EACzB,QAAQ,SAAU,GACjB,SAAS;IAoBZ;;;;;;;;;;OAUG;IACH,MAAM,CAAC,qBAAqB,CAC1B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,EACnD,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,EAChD,QAAQ,SAAU,GACjB,SAAS;CAcb"}
|
package/src/errors/i18n-error.js
CHANGED
|
@@ -74,8 +74,10 @@ class I18nError extends Error {
|
|
|
74
74
|
*/
|
|
75
75
|
static componentNotFound(componentId, language = 'en-US') {
|
|
76
76
|
const hasNamespace = componentId.includes('.');
|
|
77
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
78
|
-
return new I18nError(exports.I18nErrorCode.COMPONENT_NOT_FOUND, message, {
|
|
77
|
+
const message = (0, helpers_1.formatICUMessage)('{hasNamespace, select, true {Namespaced component {componentId}} other {Component {componentId}}} not found in registry', { componentId, hasNamespace: hasNamespace ? 'true' : 'false' }, language);
|
|
78
|
+
return new I18nError(exports.I18nErrorCode.COMPONENT_NOT_FOUND, message, {
|
|
79
|
+
componentId,
|
|
80
|
+
});
|
|
79
81
|
}
|
|
80
82
|
/**
|
|
81
83
|
* Creates an error for when a string key is not found in a component with nested ICU formatting.
|
|
@@ -87,8 +89,11 @@ class I18nError extends Error {
|
|
|
87
89
|
static stringKeyNotFound(componentId, stringKey, language = 'en-US') {
|
|
88
90
|
const depth = stringKey.split('.').length;
|
|
89
91
|
const isNested = depth > 1;
|
|
90
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
91
|
-
return new I18nError(exports.I18nErrorCode.STRING_KEY_NOT_FOUND, message, {
|
|
92
|
+
const message = (0, helpers_1.formatICUMessage)('{isNested, select, true {Nested string key at {depth, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} level {stringKey}} other {String key {stringKey}}} not found in component {componentId}', { componentId, stringKey, depth, isNested: isNested ? 'true' : 'false' }, language);
|
|
93
|
+
return new I18nError(exports.I18nErrorCode.STRING_KEY_NOT_FOUND, message, {
|
|
94
|
+
componentId,
|
|
95
|
+
stringKey,
|
|
96
|
+
});
|
|
92
97
|
}
|
|
93
98
|
/**
|
|
94
99
|
* Creates an error for when a language is not found with ICU formatting.
|
|
@@ -97,8 +102,10 @@ class I18nError extends Error {
|
|
|
97
102
|
* @returns An I18nError instance
|
|
98
103
|
*/
|
|
99
104
|
static languageNotFound(language, messageLanguage = 'en-US') {
|
|
100
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
101
|
-
return new I18nError(exports.I18nErrorCode.LANGUAGE_NOT_FOUND, message, {
|
|
105
|
+
const message = (0, helpers_1.formatICUMessage)('Language {language} not found', { language }, messageLanguage);
|
|
106
|
+
return new I18nError(exports.I18nErrorCode.LANGUAGE_NOT_FOUND, message, {
|
|
107
|
+
language,
|
|
108
|
+
});
|
|
102
109
|
}
|
|
103
110
|
/**
|
|
104
111
|
* Creates an error for when a translation is missing with nested ICU formatting.
|
|
@@ -110,8 +117,17 @@ class I18nError extends Error {
|
|
|
110
117
|
*/
|
|
111
118
|
static translationMissing(componentId, stringKey, language, messageLanguage = 'en-US') {
|
|
112
119
|
const hasNestedKey = stringKey.includes('.');
|
|
113
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
114
|
-
|
|
120
|
+
const message = (0, helpers_1.formatICUMessage)('Translation missing: {hasNested, select, true {nested path} other {key}} {componentId}.{stringKey} not found in language {language}', {
|
|
121
|
+
componentId,
|
|
122
|
+
stringKey,
|
|
123
|
+
language,
|
|
124
|
+
hasNested: hasNestedKey ? 'true' : 'false',
|
|
125
|
+
}, messageLanguage);
|
|
126
|
+
return new I18nError(exports.I18nErrorCode.TRANSLATION_MISSING, message, {
|
|
127
|
+
componentId,
|
|
128
|
+
stringKey,
|
|
129
|
+
language,
|
|
130
|
+
});
|
|
115
131
|
}
|
|
116
132
|
/**
|
|
117
133
|
* Creates an error for invalid configuration.
|
|
@@ -129,8 +145,10 @@ class I18nError extends Error {
|
|
|
129
145
|
*/
|
|
130
146
|
static duplicateComponent(componentId, language = 'en-US') {
|
|
131
147
|
const hasNamespace = componentId.includes('.');
|
|
132
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
133
|
-
return new I18nError(exports.I18nErrorCode.DUPLICATE_COMPONENT, message, {
|
|
148
|
+
const message = (0, helpers_1.formatICUMessage)('{hasNamespace, select, true {Namespaced component {componentId}} other {Component {componentId}}} is already registered {hasNamespace, select, true {in this namespace} other {in the registry}}', { componentId, hasNamespace: hasNamespace ? 'true' : 'false' }, language);
|
|
149
|
+
return new I18nError(exports.I18nErrorCode.DUPLICATE_COMPONENT, message, {
|
|
150
|
+
componentId,
|
|
151
|
+
});
|
|
134
152
|
}
|
|
135
153
|
/**
|
|
136
154
|
* Creates an error for duplicate language registration with ICU formatting.
|
|
@@ -140,7 +158,9 @@ class I18nError extends Error {
|
|
|
140
158
|
*/
|
|
141
159
|
static duplicateLanguage(language, messageLanguage = 'en-US') {
|
|
142
160
|
const message = `Language '${language}' already registered`;
|
|
143
|
-
return new I18nError(exports.I18nErrorCode.DUPLICATE_LANGUAGE, message, {
|
|
161
|
+
return new I18nError(exports.I18nErrorCode.DUPLICATE_LANGUAGE, message, {
|
|
162
|
+
language,
|
|
163
|
+
});
|
|
144
164
|
}
|
|
145
165
|
/**
|
|
146
166
|
* Creates an error for validation failure with ICU plural formatting and number formatting.
|
|
@@ -150,7 +170,10 @@ class I18nError extends Error {
|
|
|
150
170
|
*/
|
|
151
171
|
static validationFailed(errors, language = 'en-US') {
|
|
152
172
|
const message = (0, helpers_1.formatICUMessage)('Validation failed with {count, plural, one {{count, number, integer} error} other {{count, number, integer} errors}}: {details}', { count: errors.length, details: errors.join(', ') }, language);
|
|
153
|
-
return new I18nError(exports.I18nErrorCode.VALIDATION_FAILED, message, {
|
|
173
|
+
return new I18nError(exports.I18nErrorCode.VALIDATION_FAILED, message, {
|
|
174
|
+
errors,
|
|
175
|
+
count: errors.length,
|
|
176
|
+
});
|
|
154
177
|
}
|
|
155
178
|
/**
|
|
156
179
|
* Creates an error for when an i18n instance is not found with nested ICU select formatting.
|
|
@@ -160,7 +183,7 @@ class I18nError extends Error {
|
|
|
160
183
|
*/
|
|
161
184
|
static instanceNotFound(key, language = 'en-US') {
|
|
162
185
|
const isDefault = key === 'default' || key === '';
|
|
163
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
186
|
+
const message = (0, helpers_1.formatICUMessage)('{isDefault, select, true {Default i18n instance not found} other {I18n instance {key} not found}} in registry', { key, isDefault: isDefault ? 'true' : 'false' }, language);
|
|
164
187
|
return new I18nError(exports.I18nErrorCode.INSTANCE_NOT_FOUND, message, { key });
|
|
165
188
|
}
|
|
166
189
|
/**
|
|
@@ -181,8 +204,10 @@ class I18nError extends Error {
|
|
|
181
204
|
* @returns An I18nError instance
|
|
182
205
|
*/
|
|
183
206
|
static invalidContext(contextKey, language = 'en-US') {
|
|
184
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
185
|
-
return new I18nError(exports.I18nErrorCode.INVALID_CONTEXT, message, {
|
|
207
|
+
const message = (0, helpers_1.formatICUMessage)('Invalid context key {contextKey}', { contextKey }, language);
|
|
208
|
+
return new I18nError(exports.I18nErrorCode.INVALID_CONTEXT, message, {
|
|
209
|
+
contextKey,
|
|
210
|
+
});
|
|
186
211
|
}
|
|
187
212
|
/**
|
|
188
213
|
* Creates an error for when a plural form is not found with nested ICU select and plural formatting.
|
|
@@ -194,15 +219,21 @@ class I18nError extends Error {
|
|
|
194
219
|
*/
|
|
195
220
|
static pluralFormNotFound(category, language, key, availableForms) {
|
|
196
221
|
const formCount = availableForms.length;
|
|
197
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
222
|
+
const message = (0, helpers_1.formatICUMessage)('Plural form {category} not found for language {language}{hasKey, select, true { in key {keyName}} other {}}. {formCount, plural, one {Available form} other {Available forms}} ({formCount, number, integer}): {forms}', {
|
|
198
223
|
category,
|
|
199
224
|
language,
|
|
200
225
|
keyName: key,
|
|
201
226
|
hasKey: key ? 'true' : 'false',
|
|
202
227
|
forms: availableForms.join(', '),
|
|
203
|
-
formCount
|
|
228
|
+
formCount,
|
|
204
229
|
}, language);
|
|
205
|
-
return new I18nError(exports.I18nErrorCode.PLURAL_FORM_NOT_FOUND, message, {
|
|
230
|
+
return new I18nError(exports.I18nErrorCode.PLURAL_FORM_NOT_FOUND, message, {
|
|
231
|
+
category,
|
|
232
|
+
language,
|
|
233
|
+
key,
|
|
234
|
+
availableForms,
|
|
235
|
+
formCount,
|
|
236
|
+
});
|
|
206
237
|
}
|
|
207
238
|
/**
|
|
208
239
|
* Creates an error for an invalid plural category with nested ICU plural and number formatting.
|
|
@@ -213,12 +244,16 @@ class I18nError extends Error {
|
|
|
213
244
|
*/
|
|
214
245
|
static invalidPluralCategory(category, validCategories, language = 'en-US') {
|
|
215
246
|
const count = validCategories.length;
|
|
216
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
247
|
+
const message = (0, helpers_1.formatICUMessage)('Invalid plural category {category}. {count, plural, one {Valid category ({count, number, integer})} other {Valid categories ({count, number, integer})}}: {categories}', {
|
|
217
248
|
category,
|
|
218
249
|
categories: validCategories.join(', '),
|
|
219
|
-
count
|
|
250
|
+
count,
|
|
220
251
|
}, language);
|
|
221
|
-
return new I18nError(exports.I18nErrorCode.INVALID_PLURAL_CATEGORY, message, {
|
|
252
|
+
return new I18nError(exports.I18nErrorCode.INVALID_PLURAL_CATEGORY, message, {
|
|
253
|
+
category,
|
|
254
|
+
validCategories,
|
|
255
|
+
count,
|
|
256
|
+
});
|
|
222
257
|
}
|
|
223
258
|
/**
|
|
224
259
|
* Creates an error for when the count variable is missing for plural forms with ICU formatting.
|
|
@@ -228,7 +263,9 @@ class I18nError extends Error {
|
|
|
228
263
|
*/
|
|
229
264
|
static missingCountVariable(key, language = 'en-US') {
|
|
230
265
|
const message = (0, helpers_1.formatICUMessage)("Plural forms used in key {key} but no 'count' variable provided", { key }, language);
|
|
231
|
-
return new I18nError(exports.I18nErrorCode.MISSING_COUNT_VARIABLE, message, {
|
|
266
|
+
return new I18nError(exports.I18nErrorCode.MISSING_COUNT_VARIABLE, message, {
|
|
267
|
+
key,
|
|
268
|
+
});
|
|
232
269
|
}
|
|
233
270
|
/**
|
|
234
271
|
* Creates an error for validation threshold violations with ICU number formatting.
|
|
@@ -241,8 +278,17 @@ class I18nError extends Error {
|
|
|
241
278
|
* @returns An I18nError instance
|
|
242
279
|
*/
|
|
243
280
|
static validationThresholdExceeded(fieldName, value, threshold, thresholdType = 'integer', language = 'en-US') {
|
|
244
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
245
|
-
|
|
281
|
+
const message = (0, helpers_1.formatICUMessage)('Validation failed for {fieldName}: value {value, number, ' +
|
|
282
|
+
thresholdType +
|
|
283
|
+
'} exceeds maximum threshold of {threshold, number, ' +
|
|
284
|
+
thresholdType +
|
|
285
|
+
'}', { fieldName, value, threshold }, language);
|
|
286
|
+
return new I18nError(exports.I18nErrorCode.VALIDATION_THRESHOLD_EXCEEDED, message, {
|
|
287
|
+
fieldName,
|
|
288
|
+
value,
|
|
289
|
+
threshold,
|
|
290
|
+
thresholdType,
|
|
291
|
+
});
|
|
246
292
|
}
|
|
247
293
|
/**
|
|
248
294
|
* Creates an error for operation failures at specific steps with ICU selectordinal formatting.
|
|
@@ -254,8 +300,12 @@ class I18nError extends Error {
|
|
|
254
300
|
* @returns An I18nError instance
|
|
255
301
|
*/
|
|
256
302
|
static operationStepFailed(stepNumber, operationName, reason, language = 'en-US') {
|
|
257
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
258
|
-
return new I18nError(exports.I18nErrorCode.OPERATION_STEP_FAILED, message, {
|
|
303
|
+
const message = (0, helpers_1.formatICUMessage)('Operation {operationName} failed at {stepNumber, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} step: {reason}', { stepNumber, operationName, reason }, language);
|
|
304
|
+
return new I18nError(exports.I18nErrorCode.OPERATION_STEP_FAILED, message, {
|
|
305
|
+
stepNumber,
|
|
306
|
+
operationName,
|
|
307
|
+
reason,
|
|
308
|
+
});
|
|
259
309
|
}
|
|
260
310
|
/**
|
|
261
311
|
* Creates an error for rate limit violations with nested ICU messages.
|
|
@@ -268,8 +318,19 @@ class I18nError extends Error {
|
|
|
268
318
|
* @returns An I18nError instance
|
|
269
319
|
*/
|
|
270
320
|
static rateLimitExceeded(requestCount, limit, windowSeconds, retryAfterSeconds, language = 'en-US') {
|
|
271
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
272
|
-
|
|
321
|
+
const message = (0, helpers_1.formatICUMessage)('Rate limit exceeded: {requestCount, plural, one {# request} other {# requests}} made, exceeding limit of {limit, number, integer} {limit, plural, one {request} other {requests}} per {windowSeconds, number, integer} {windowSeconds, plural, one {second} other {seconds}}. {hasRetry, select, true {Retry after {retryAfterSeconds, number, integer} {retryAfterSeconds, plural, one {second} other {seconds}}.} other {Retry immediately.}}', {
|
|
322
|
+
requestCount,
|
|
323
|
+
limit,
|
|
324
|
+
windowSeconds,
|
|
325
|
+
retryAfterSeconds,
|
|
326
|
+
hasRetry: retryAfterSeconds > 0 ? 'true' : 'false',
|
|
327
|
+
}, language);
|
|
328
|
+
return new I18nError(exports.I18nErrorCode.RATE_LIMIT_EXCEEDED, message, {
|
|
329
|
+
requestCount,
|
|
330
|
+
limit,
|
|
331
|
+
windowSeconds,
|
|
332
|
+
retryAfterSeconds,
|
|
333
|
+
});
|
|
273
334
|
}
|
|
274
335
|
/**
|
|
275
336
|
* Creates a nested validation error with multiple layers of context.
|
|
@@ -283,8 +344,14 @@ class I18nError extends Error {
|
|
|
283
344
|
* @returns An I18nError instance
|
|
284
345
|
*/
|
|
285
346
|
static nestedValidationError(componentId, fieldPath, errorCount, errorType, severity, language = 'en-US') {
|
|
286
|
-
const message = (0, helpers_1.formatICUMessage)(
|
|
287
|
-
return new I18nError(exports.I18nErrorCode.NESTED_VALIDATION_ERROR, message, {
|
|
347
|
+
const message = (0, helpers_1.formatICUMessage)('Validation error in component {componentId}: {severity, select, low {Minor issue} medium {Moderate issue} high {Serious issue} critical {Critical issue} other {Issue}} detected in nested field {fieldPath} - {errorType, select, type {Type mismatch} range {Value out of range} format {Invalid format} required {Required field missing} other {Validation error}} with {errorCount, plural, one {# occurrence} other {# occurrences}}', { componentId, fieldPath, errorCount, errorType, severity }, language);
|
|
348
|
+
return new I18nError(exports.I18nErrorCode.NESTED_VALIDATION_ERROR, message, {
|
|
349
|
+
componentId,
|
|
350
|
+
fieldPath,
|
|
351
|
+
errorCount,
|
|
352
|
+
errorType,
|
|
353
|
+
severity,
|
|
354
|
+
});
|
|
288
355
|
}
|
|
289
356
|
}
|
|
290
357
|
exports.I18nError = I18nError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-error.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/i18n-error.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAAkD;AAElD;;GAEG;AACU,QAAA,aAAa,GAAG;IAC3B,sCAAsC;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,wCAAwC;IACxC,oBAAoB,EAAE,sBAAsB;IAC5C,qCAAqC;IACrC,kBAAkB,EAAE,oBAAoB;IACxC,yDAAyD;IACzD,mBAAmB,EAAE,qBAAqB;IAC1C,qCAAqC;IACrC,cAAc,EAAE,gBAAgB;IAChC,8CAA8C;IAC9C,mBAAmB,EAAE,qBAAqB;IAC1C,6CAA6C;IAC7C,kBAAkB,EAAE,oBAAoB;IACxC,4CAA4C;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,8BAA8B;IAC9B,kBAAkB,EAAE,oBAAoB;IACxC,mCAAmC;IACnC,eAAe,EAAE,iBAAiB;IAClC,mCAAmC;IACnC,eAAe,EAAE,iBAAiB;IAClC,sDAAsD;IACtD,qBAAqB,EAAE,uBAAuB;IAC9C,uCAAuC;IACvC,uBAAuB,EAAE,yBAAyB;IAClD,oDAAoD;IACpD,sBAAsB,EAAE,wBAAwB;IAChD,oCAAoC;IACpC,6BAA6B,EAAE,+BAA+B;IAC9D,wCAAwC;IACxC,qBAAqB,EAAE,uBAAuB;IAC9C,0BAA0B;IAC1B,mBAAmB,EAAE,qBAAqB;IAC1C,2CAA2C;IAC3C,uBAAuB,EAAE,yBAAyB;CAC1C,CAAC;AAOX;;;GAGG;AACH,MAAa,SAAU,SAAQ,KAAK;IAQhB;
|
|
1
|
+
{"version":3,"file":"i18n-error.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/i18n-error.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAAkD;AAElD;;GAEG;AACU,QAAA,aAAa,GAAG;IAC3B,sCAAsC;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,wCAAwC;IACxC,oBAAoB,EAAE,sBAAsB;IAC5C,qCAAqC;IACrC,kBAAkB,EAAE,oBAAoB;IACxC,yDAAyD;IACzD,mBAAmB,EAAE,qBAAqB;IAC1C,qCAAqC;IACrC,cAAc,EAAE,gBAAgB;IAChC,8CAA8C;IAC9C,mBAAmB,EAAE,qBAAqB;IAC1C,6CAA6C;IAC7C,kBAAkB,EAAE,oBAAoB;IACxC,4CAA4C;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,8BAA8B;IAC9B,kBAAkB,EAAE,oBAAoB;IACxC,mCAAmC;IACnC,eAAe,EAAE,iBAAiB;IAClC,mCAAmC;IACnC,eAAe,EAAE,iBAAiB;IAClC,sDAAsD;IACtD,qBAAqB,EAAE,uBAAuB;IAC9C,uCAAuC;IACvC,uBAAuB,EAAE,yBAAyB;IAClD,oDAAoD;IACpD,sBAAsB,EAAE,wBAAwB;IAChD,oCAAoC;IACpC,6BAA6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,GAAG,OAAO;QAElB,MAAM,OAAO,GAAG,IAAA,0BAAgB,EAC9B,4aAA4a,EAC5a,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC3D,QAAQ,CACT,CAAC;QACF,OAAO,IAAI,SAAS,CAAC,qBAAa,CAAC,uBAAuB,EAAE,OAAO,EAAE;YACnE,WAAW;YACX,SAAS;YACT,UAAU;YACV,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;CACF;AApbD,8BAobC"}
|
package/src/errors/index.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ export * from './context-error';
|
|
|
5
5
|
export * from './enhanced-error-base';
|
|
6
6
|
export * from './handleable';
|
|
7
7
|
export * from './i18n-error';
|
|
8
|
+
export * from './simple-typed-error';
|
|
9
|
+
export * from './translatable';
|
|
8
10
|
export * from './translatable-generic';
|
|
9
11
|
export * from './translatable-handleable-generic';
|
|
10
|
-
export * from './translatable';
|
|
11
|
-
export * from './typed-handleable';
|
|
12
12
|
export * from './typed';
|
|
13
|
+
export * from './typed-handleable';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC"}
|
package/src/errors/index.js
CHANGED
|
@@ -8,9 +8,10 @@ tslib_1.__exportStar(require("./context-error"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./enhanced-error-base"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./handleable"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./i18n-error"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./simple-typed-error"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./translatable"), exports);
|
|
11
13
|
tslib_1.__exportStar(require("./translatable-generic"), exports);
|
|
12
14
|
tslib_1.__exportStar(require("./translatable-handleable-generic"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./translatable"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./typed-handleable"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./typed"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./typed-handleable"), exports);
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
package/src/errors/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0DAAgC;AAChC,gEAAsC;AACtC,uDAA6B;AAC7B,uDAA6B;AAC7B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0DAAgC;AAChC,gEAAsC;AACtC,uDAA6B;AAC7B,uDAA6B;AAC7B,+DAAqC;AACrC,yDAA+B;AAC/B,iEAAuC;AACvC,4EAAkD;AAClD,kDAAwB;AACxB,6DAAmC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypedError class with proper type safety
|
|
3
|
+
*
|
|
4
|
+
* This class provides a type-safe way to create errors with additional
|
|
5
|
+
* properties without using type casts. It extends the standard Error class
|
|
6
|
+
* and adds support for:
|
|
7
|
+
* - type: Error type classification
|
|
8
|
+
* - componentId: Component identifier where error originated
|
|
9
|
+
* - reasonMap: Map of reasons or context for the error
|
|
10
|
+
* - metadata: Additional metadata associated with the error
|
|
11
|
+
* - cause: Error cause chaining (ES2022 standard)
|
|
12
|
+
*/
|
|
13
|
+
export interface TypedErrorOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Error type classification (e.g., 'validation', 'network', 'auth')
|
|
16
|
+
*/
|
|
17
|
+
type: string;
|
|
18
|
+
/**
|
|
19
|
+
* Component identifier where the error originated
|
|
20
|
+
*/
|
|
21
|
+
componentId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Map of reasons or context for the error
|
|
24
|
+
*/
|
|
25
|
+
reasonMap?: Record<string, unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Additional metadata associated with the error
|
|
28
|
+
*/
|
|
29
|
+
metadata?: Record<string, unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* The cause of this error (for error chaining)
|
|
32
|
+
*/
|
|
33
|
+
cause?: Error;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* TypedError class that extends Error with additional type-safe properties
|
|
37
|
+
*/
|
|
38
|
+
export declare class TypedError extends Error {
|
|
39
|
+
readonly type: string;
|
|
40
|
+
readonly componentId?: string;
|
|
41
|
+
readonly reasonMap?: Record<string, unknown>;
|
|
42
|
+
readonly metadata?: Record<string, unknown>;
|
|
43
|
+
constructor(message: string, options: TypedErrorOptions);
|
|
44
|
+
/**
|
|
45
|
+
* Check if an error is a TypedError
|
|
46
|
+
*/
|
|
47
|
+
static isTypedError(error: unknown): error is TypedError;
|
|
48
|
+
/**
|
|
49
|
+
* Convert a standard Error to a TypedError
|
|
50
|
+
*/
|
|
51
|
+
static fromError(error: Error, options: Omit<TypedErrorOptions, 'cause'>): TypedError;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=simple-typed-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-typed-error.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/simple-typed-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,SAAyB,IAAI,EAAE,MAAM,CAAC;IACtC,SAAyB,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9C,SAAyB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7D,SAAyB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEhD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB;IAYvD;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU;IAIxD;;OAEG;IACH,MAAM,CAAC,SAAS,CACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,GACxC,UAAU;CAMd"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TypedError class with proper type safety
|
|
4
|
+
*
|
|
5
|
+
* This class provides a type-safe way to create errors with additional
|
|
6
|
+
* properties without using type casts. It extends the standard Error class
|
|
7
|
+
* and adds support for:
|
|
8
|
+
* - type: Error type classification
|
|
9
|
+
* - componentId: Component identifier where error originated
|
|
10
|
+
* - reasonMap: Map of reasons or context for the error
|
|
11
|
+
* - metadata: Additional metadata associated with the error
|
|
12
|
+
* - cause: Error cause chaining (ES2022 standard)
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.TypedError = void 0;
|
|
16
|
+
/**
|
|
17
|
+
* TypedError class that extends Error with additional type-safe properties
|
|
18
|
+
*/
|
|
19
|
+
class TypedError extends Error {
|
|
20
|
+
type;
|
|
21
|
+
componentId;
|
|
22
|
+
reasonMap;
|
|
23
|
+
metadata;
|
|
24
|
+
constructor(message, options) {
|
|
25
|
+
super(message, { cause: options.cause });
|
|
26
|
+
this.type = options.type;
|
|
27
|
+
this.componentId = options.componentId;
|
|
28
|
+
this.reasonMap = options.reasonMap;
|
|
29
|
+
this.metadata = options.metadata;
|
|
30
|
+
this.name = 'TypedError';
|
|
31
|
+
// Maintain proper prototype chain
|
|
32
|
+
Object.setPrototypeOf(this, TypedError.prototype);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Check if an error is a TypedError
|
|
36
|
+
*/
|
|
37
|
+
static isTypedError(error) {
|
|
38
|
+
return error instanceof TypedError;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Convert a standard Error to a TypedError
|
|
42
|
+
*/
|
|
43
|
+
static fromError(error, options) {
|
|
44
|
+
return new TypedError(error.message, {
|
|
45
|
+
...options,
|
|
46
|
+
cause: error,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.TypedError = TypedError;
|
|
51
|
+
//# sourceMappingURL=simple-typed-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-typed-error.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/simple-typed-error.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA6BH;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IACV,IAAI,CAAS;IACb,WAAW,CAAU;IACrB,SAAS,CAA2B;IACpC,QAAQ,CAA2B;IAE5D,YAAY,OAAe,EAAE,OAA0B;QACrD,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QAEzB,kCAAkC;QAClC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,KAAc;QAChC,OAAO,KAAK,YAAY,UAAU,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CACd,KAAY,EACZ,OAAyC;QAEzC,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE;YACnC,GAAG,OAAO;YACV,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;CACF;AArCD,gCAqCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translatable-generic.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"translatable-generic.d.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