@digitaldefiance/i18n-lib 3.6.1 → 3.6.3
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 +9 -0
- package/package.json +1 -1
- package/src/active-context.d.ts +12 -6
- package/src/active-context.d.ts.map +1 -1
- package/src/component-registry.d.ts +44 -12
- package/src/component-registry.d.ts.map +1 -1
- package/src/component-registry.js +44 -12
- package/src/component-registry.js.map +1 -1
- package/src/context-error-type.d.ts +4 -0
- package/src/context-error-type.d.ts.map +1 -1
- package/src/context-error-type.js +4 -0
- package/src/context-error-type.js.map +1 -1
- package/src/core/component-store.d.ts +69 -1
- package/src/core/component-store.d.ts.map +1 -1
- package/src/core/component-store.js +69 -1
- package/src/core/component-store.js.map +1 -1
- package/src/core/context-manager.d.ts +53 -1
- package/src/core/context-manager.d.ts.map +1 -1
- package/src/core/context-manager.js +52 -4
- package/src/core/context-manager.js.map +1 -1
- package/src/core/enum-registry.d.ts +34 -0
- package/src/core/enum-registry.d.ts.map +1 -1
- package/src/core/enum-registry.js +34 -0
- package/src/core/enum-registry.js.map +1 -1
- package/src/core/i18n-engine.d.ts +186 -0
- package/src/core/i18n-engine.d.ts.map +1 -1
- package/src/core/i18n-engine.js +189 -17
- package/src/core/i18n-engine.js.map +1 -1
- package/src/core/language-registry.d.ts +139 -0
- package/src/core/language-registry.d.ts.map +1 -1
- package/src/core/language-registry.js +138 -0
- package/src/core/language-registry.js.map +1 -1
- package/src/core-i18n.d.ts.map +1 -1
- package/src/core-i18n.js +16 -416
- package/src/core-i18n.js.map +1 -1
- package/src/enum-registry.d.ts +41 -21
- package/src/enum-registry.d.ts.map +1 -1
- package/src/enum-registry.js +44 -24
- package/src/enum-registry.js.map +1 -1
- package/src/errors/context-error.d.ts +11 -0
- package/src/errors/context-error.d.ts.map +1 -1
- package/src/errors/context-error.js +11 -0
- package/src/errors/context-error.js.map +1 -1
- package/src/errors/handleable.d.ts +33 -0
- package/src/errors/handleable.d.ts.map +1 -1
- package/src/errors/handleable.js +33 -0
- package/src/errors/handleable.js.map +1 -1
- package/src/errors/i18n-error.d.ts +107 -0
- package/src/errors/i18n-error.d.ts.map +1 -1
- package/src/errors/i18n-error.js +104 -0
- package/src/errors/i18n-error.js.map +1 -1
- package/src/gender/gender-categories.d.ts +11 -0
- package/src/gender/gender-categories.d.ts.map +1 -1
- package/src/gender/gender-categories.js +5 -0
- package/src/gender/gender-categories.js.map +1 -1
- package/src/gender/gender-resolver.d.ts +6 -1
- package/src/gender/gender-resolver.d.ts.map +1 -1
- package/src/gender/gender-resolver.js +6 -1
- package/src/gender/gender-resolver.js.map +1 -1
- package/src/interfaces/component-config.interface.d.ts +6 -0
- package/src/interfaces/component-config.interface.d.ts.map +1 -1
- package/src/interfaces/engine-config.interface.d.ts +9 -0
- package/src/interfaces/engine-config.interface.d.ts.map +1 -1
- package/src/interfaces/handleable-error-options.d.ts +7 -0
- package/src/interfaces/handleable-error-options.d.ts.map +1 -1
- package/src/interfaces/handleable.d.ts +15 -0
- package/src/interfaces/handleable.d.ts.map +1 -1
- package/src/interfaces/i18n-engine.interface.d.ts +20 -0
- package/src/interfaces/i18n-engine.interface.d.ts.map +1 -1
- package/src/interfaces/language-definition.interface.d.ts +7 -0
- package/src/interfaces/language-definition.interface.d.ts.map +1 -1
- package/src/interfaces/translation-options.interface.d.ts +6 -0
- package/src/interfaces/translation-options.interface.d.ts.map +1 -1
- package/src/interfaces/validation-result.interface.d.ts +10 -0
- package/src/interfaces/validation-result.interface.d.ts.map +1 -1
- package/src/registry-error-type.d.ts +7 -0
- package/src/registry-error-type.d.ts.map +1 -1
- package/src/registry-error-type.js +7 -0
- package/src/registry-error-type.js.map +1 -1
- package/src/strings/de.d.ts +3 -0
- package/src/strings/de.d.ts.map +1 -0
- package/src/strings/de.js +57 -0
- package/src/strings/de.js.map +1 -0
- package/src/strings/en-GB.d.ts +3 -0
- package/src/strings/en-GB.d.ts.map +1 -0
- package/src/strings/en-GB.js +57 -0
- package/src/strings/en-GB.js.map +1 -0
- package/src/strings/en-US.d.ts +3 -0
- package/src/strings/en-US.d.ts.map +1 -0
- package/src/strings/en-US.js +57 -0
- package/src/strings/en-US.js.map +1 -0
- package/src/strings/es.d.ts +3 -0
- package/src/strings/es.d.ts.map +1 -0
- package/src/strings/es.js +57 -0
- package/src/strings/es.js.map +1 -0
- package/src/strings/fr.d.ts +3 -0
- package/src/strings/fr.d.ts.map +1 -0
- package/src/strings/fr.js +57 -0
- package/src/strings/fr.js.map +1 -0
- package/src/strings/ja.d.ts +3 -0
- package/src/strings/ja.d.ts.map +1 -0
- package/src/strings/ja.js +57 -0
- package/src/strings/ja.js.map +1 -0
- package/src/strings/uk.d.ts +3 -0
- package/src/strings/uk.d.ts.map +1 -0
- package/src/strings/uk.js +57 -0
- package/src/strings/uk.js.map +1 -0
- package/src/strings/zh-CN.d.ts +3 -0
- package/src/strings/zh-CN.d.ts.map +1 -0
- package/src/strings/zh-CN.js +57 -0
- package/src/strings/zh-CN.js.map +1 -0
- package/src/types/plural-types.d.ts +10 -3
- package/src/types/plural-types.d.ts.map +1 -1
- package/src/types/plural-types.js +8 -2
- package/src/types/plural-types.js.map +1 -1
- package/src/utils/currency.d.ts +53 -0
- package/src/utils/currency.d.ts.map +1 -1
- package/src/utils/currency.js +35 -0
- package/src/utils/currency.js.map +1 -1
- package/src/utils/html-escape.d.ts +14 -0
- package/src/utils/html-escape.d.ts.map +1 -1
- package/src/utils/html-escape.js +20 -0
- package/src/utils/html-escape.js.map +1 -1
- package/src/utils/lru-cache.d.ts +29 -0
- package/src/utils/lru-cache.d.ts.map +1 -1
- package/src/utils/lru-cache.js +29 -0
- package/src/utils/lru-cache.js.map +1 -1
- package/src/utils/plural-helpers.d.ts +16 -0
- package/src/utils/plural-helpers.d.ts.map +1 -1
- package/src/utils/plural-helpers.js +16 -0
- package/src/utils/plural-helpers.js.map +1 -1
- package/src/utils/safe-object.d.ts +30 -0
- package/src/utils/safe-object.d.ts.map +1 -1
- package/src/utils/safe-object.js +33 -0
- package/src/utils/safe-object.js.map +1 -1
- package/src/utils/string-utils.d.ts +19 -0
- package/src/utils/string-utils.d.ts.map +1 -1
- package/src/utils/string-utils.js +18 -1
- package/src/utils/string-utils.js.map +1 -1
- package/src/utils/timezone.d.ts +36 -0
- package/src/utils/timezone.d.ts.map +1 -1
- package/src/utils/timezone.js +36 -0
- package/src/utils/timezone.js.map +1 -1
- package/src/utils/validation.d.ts +25 -0
- package/src/utils/validation.d.ts.map +1 -1
- package/src/utils/validation.js +25 -0
- package/src/utils/validation.js.map +1 -1
- package/src/validation/plural-validator.d.ts +25 -2
- package/src/validation/plural-validator.d.ts.map +1 -1
- package/src/validation/plural-validator.js +22 -4
- package/src/validation/plural-validator.js.map +1 -1
|
@@ -7,7 +7,9 @@ exports.replaceVariables = replaceVariables;
|
|
|
7
7
|
exports.isTemplate = isTemplate;
|
|
8
8
|
const html_escape_1 = require("./html-escape");
|
|
9
9
|
/**
|
|
10
|
-
* Extract the actual value from an object that might be a wrapper (CurrencyCode, Timezone, etc.)
|
|
10
|
+
* Extract the actual value from an object that might be a wrapper (CurrencyCode, Timezone, etc.).
|
|
11
|
+
* @param value - The value to extract from
|
|
12
|
+
* @returns The extracted value or the original value if not a wrapper
|
|
11
13
|
*/
|
|
12
14
|
function extractValue(value) {
|
|
13
15
|
// Handle objects with a 'value' property (CurrencyCode, Timezone, etc.)
|
|
@@ -16,6 +18,15 @@ function extractValue(value) {
|
|
|
16
18
|
}
|
|
17
19
|
return value;
|
|
18
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Replaces variables in a string template with values from vars or constants.
|
|
23
|
+
* Variables are denoted by {variableName} in the template string.
|
|
24
|
+
* @param str - The template string containing variables
|
|
25
|
+
* @param vars - Optional object mapping variable names to values
|
|
26
|
+
* @param constants - Optional object containing constant values
|
|
27
|
+
* @param options - Optional configuration including HTML escaping
|
|
28
|
+
* @returns The string with variables replaced
|
|
29
|
+
*/
|
|
19
30
|
function replaceVariables(str, vars, constants, options) {
|
|
20
31
|
if (typeof str !== 'string') {
|
|
21
32
|
str = String(str);
|
|
@@ -40,6 +51,12 @@ function replaceVariables(str, vars, constants, options) {
|
|
|
40
51
|
}
|
|
41
52
|
return result;
|
|
42
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Checks if a string key indicates a template that expects variable replacement.
|
|
56
|
+
* Template keys end with 'template' (case-insensitive).
|
|
57
|
+
* @param key - The key to check
|
|
58
|
+
* @returns True if the key indicates a template, false otherwise
|
|
59
|
+
*/
|
|
43
60
|
function isTemplate(key) {
|
|
44
61
|
return key.trim().toLowerCase().endsWith('template');
|
|
45
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string-utils.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/string-utils.ts"],"names":[],"mappings":";AAAA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"string-utils.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/string-utils.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAkCH,4CA8BC;AAQD,gCAEC;AAxED,+CAA0D;AAE1D;;;;GAIG;AACH,SAAS,YAAY,CAAC,KAAU;IAC9B,wEAAwE;IACxE,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;QAChG,OAAO,KAAK,CAAC,KAAK,CAAC;IACrB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAUD;;;;;;;;GAQG;AACH,SAAgB,gBAAgB,CAC9B,GAAW,EACX,IAA0B,EAC1B,SAA+B,EAC/B,OAAiC;IAEjC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,SAAS,GAAG,GAAG,CAAC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one for validation and timezone database.
|
|
7
|
+
*/
|
|
4
8
|
export declare class Timezone {
|
|
5
9
|
private readonly _value;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new Timezone instance.
|
|
12
|
+
* @param timezone - The timezone name (e.g., 'America/New_York', 'UTC')
|
|
13
|
+
* @throws {Error} If the timezone is invalid
|
|
14
|
+
*/
|
|
6
15
|
constructor(timezone: string);
|
|
16
|
+
/**
|
|
17
|
+
* Gets the timezone name.
|
|
18
|
+
* @returns The timezone name
|
|
19
|
+
*/
|
|
7
20
|
get value(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the timezone name (alias for value).
|
|
23
|
+
* @returns The timezone name
|
|
24
|
+
*/
|
|
8
25
|
get name(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Checks if a timezone name is valid.
|
|
28
|
+
* @param timezone - The timezone name to validate
|
|
29
|
+
* @returns True if the timezone is valid, false otherwise
|
|
30
|
+
*/
|
|
9
31
|
static isValid(timezone: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Gets all available timezone names.
|
|
34
|
+
* @returns Array of timezone names
|
|
35
|
+
*/
|
|
10
36
|
static getAll(): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Attempts to guess the user's timezone based on their system settings.
|
|
39
|
+
* @returns The guessed timezone name
|
|
40
|
+
*/
|
|
11
41
|
static guess(): string;
|
|
12
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Checks if a timezone name is valid.
|
|
45
|
+
* This is a convenience function that delegates to Timezone.isValid().
|
|
46
|
+
* @param timezone - The timezone name to validate
|
|
47
|
+
* @returns True if the timezone is valid, false otherwise
|
|
48
|
+
*/
|
|
13
49
|
export declare function isValidTimezone(timezone: string): boolean;
|
|
14
50
|
//# sourceMappingURL=timezone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/timezone.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;
|
|
1
|
+
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/timezone.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;GAGG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;;;OAIG;gBACS,QAAQ,EAAE,MAAM;IAO5B;;;OAGG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;;OAGG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIzC;;;OAGG;IACH,MAAM,CAAC,MAAM,IAAI,MAAM,EAAE;IAIzB;;;OAGG;IACH,MAAM,CAAC,KAAK,IAAI,MAAM;CAGvB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD"}
|
package/src/utils/timezone.js
CHANGED
|
@@ -7,31 +7,67 @@ exports.Timezone = void 0;
|
|
|
7
7
|
exports.isValidTimezone = isValidTimezone;
|
|
8
8
|
const tslib_1 = require("tslib");
|
|
9
9
|
const moment_timezone_1 = tslib_1.__importDefault(require("moment-timezone"));
|
|
10
|
+
/**
|
|
11
|
+
* Represents a valid timezone with validation.
|
|
12
|
+
* Uses moment-timezone for validation and timezone database.
|
|
13
|
+
*/
|
|
10
14
|
class Timezone {
|
|
11
15
|
_value;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new Timezone instance.
|
|
18
|
+
* @param timezone - The timezone name (e.g., 'America/New_York', 'UTC')
|
|
19
|
+
* @throws {Error} If the timezone is invalid
|
|
20
|
+
*/
|
|
12
21
|
constructor(timezone) {
|
|
13
22
|
if (!Timezone.isValid(timezone)) {
|
|
14
23
|
throw new Error(`Invalid timezone: ${timezone}`);
|
|
15
24
|
}
|
|
16
25
|
this._value = timezone;
|
|
17
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Gets the timezone name.
|
|
29
|
+
* @returns The timezone name
|
|
30
|
+
*/
|
|
18
31
|
get value() {
|
|
19
32
|
return this._value;
|
|
20
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Gets the timezone name (alias for value).
|
|
36
|
+
* @returns The timezone name
|
|
37
|
+
*/
|
|
21
38
|
get name() {
|
|
22
39
|
return this._value;
|
|
23
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Checks if a timezone name is valid.
|
|
43
|
+
* @param timezone - The timezone name to validate
|
|
44
|
+
* @returns True if the timezone is valid, false otherwise
|
|
45
|
+
*/
|
|
24
46
|
static isValid(timezone) {
|
|
25
47
|
return moment_timezone_1.default.tz.zone(timezone) !== null;
|
|
26
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Gets all available timezone names.
|
|
51
|
+
* @returns Array of timezone names
|
|
52
|
+
*/
|
|
27
53
|
static getAll() {
|
|
28
54
|
return moment_timezone_1.default.tz.names();
|
|
29
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Attempts to guess the user's timezone based on their system settings.
|
|
58
|
+
* @returns The guessed timezone name
|
|
59
|
+
*/
|
|
30
60
|
static guess() {
|
|
31
61
|
return moment_timezone_1.default.tz.guess();
|
|
32
62
|
}
|
|
33
63
|
}
|
|
34
64
|
exports.Timezone = Timezone;
|
|
65
|
+
/**
|
|
66
|
+
* Checks if a timezone name is valid.
|
|
67
|
+
* This is a convenience function that delegates to Timezone.isValid().
|
|
68
|
+
* @param timezone - The timezone name to validate
|
|
69
|
+
* @returns True if the timezone is valid, false otherwise
|
|
70
|
+
*/
|
|
35
71
|
function isValidTimezone(timezone) {
|
|
36
72
|
return Timezone.isValid(timezone);
|
|
37
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/timezone.ts"],"names":[],"mappings":";AAAA;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"timezone.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/timezone.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAuEH,0CAEC;;AAvED,8EAAqC;AAErC;;;GAGG;AACH,MAAa,QAAQ;IACF,MAAM,CAAS;IAEhC;;;;OAIG;IACH,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,qBAAqB,QAAQ,EAAE,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,QAAgB;QAC7B,OAAO,yBAAM,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,MAAM;QACX,OAAO,yBAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,KAAK;QACV,OAAO,yBAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;CACF;AAvDD,4BAuDC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,QAAgB;IAC9C,OAAO,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Input validation utilities
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* Security limits for various input types to prevent abuse.
|
|
6
|
+
*/
|
|
4
7
|
export declare const LIMITS: {
|
|
5
8
|
readonly MAX_TEMPLATE_LENGTH: 10000;
|
|
6
9
|
readonly MAX_KEY_LENGTH: 200;
|
|
@@ -8,8 +11,30 @@ export declare const LIMITS: {
|
|
|
8
11
|
readonly MAX_LANGUAGE_CODE_LENGTH: 10;
|
|
9
12
|
readonly MAX_NESTING_DEPTH: 10;
|
|
10
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Validates that a template string does not exceed the maximum allowed length.
|
|
16
|
+
* @param template - The template string to validate
|
|
17
|
+
* @throws {Error} If the template exceeds the maximum length
|
|
18
|
+
*/
|
|
11
19
|
export declare function validateTemplateLength(template: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Validates that a key does not exceed the maximum allowed length.
|
|
22
|
+
* @param key - The key to validate
|
|
23
|
+
* @throws {Error} If the key exceeds the maximum length
|
|
24
|
+
*/
|
|
12
25
|
export declare function validateKeyLength(key: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Validates that a component ID meets length and character requirements.
|
|
28
|
+
* Component IDs must contain only alphanumeric characters, underscores, and hyphens.
|
|
29
|
+
* @param componentId - The component ID to validate
|
|
30
|
+
* @throws {Error} If the component ID is invalid
|
|
31
|
+
*/
|
|
13
32
|
export declare function validateComponentId(componentId: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Validates that a language code meets BCP 47 format requirements.
|
|
35
|
+
* Expected format: two lowercase letters, optionally followed by a hyphen and two uppercase letters (e.g., 'en', 'en-US').
|
|
36
|
+
* @param language - The language code to validate
|
|
37
|
+
* @throws {Error} If the language code is invalid
|
|
38
|
+
*/
|
|
14
39
|
export declare function validateLanguageCode(language: string): void;
|
|
15
40
|
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,MAAM;;;;;;CAMT,CAAC;AAEX,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAI7D;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAInD;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAO7D;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAO3D"}
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;CAMT,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAI7D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAInD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAO7D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAO3D"}
|
package/src/utils/validation.js
CHANGED
|
@@ -8,6 +8,9 @@ exports.validateTemplateLength = validateTemplateLength;
|
|
|
8
8
|
exports.validateKeyLength = validateKeyLength;
|
|
9
9
|
exports.validateComponentId = validateComponentId;
|
|
10
10
|
exports.validateLanguageCode = validateLanguageCode;
|
|
11
|
+
/**
|
|
12
|
+
* Security limits for various input types to prevent abuse.
|
|
13
|
+
*/
|
|
11
14
|
exports.LIMITS = {
|
|
12
15
|
MAX_TEMPLATE_LENGTH: 10000,
|
|
13
16
|
MAX_KEY_LENGTH: 200,
|
|
@@ -15,16 +18,32 @@ exports.LIMITS = {
|
|
|
15
18
|
MAX_LANGUAGE_CODE_LENGTH: 10,
|
|
16
19
|
MAX_NESTING_DEPTH: 10,
|
|
17
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Validates that a template string does not exceed the maximum allowed length.
|
|
23
|
+
* @param template - The template string to validate
|
|
24
|
+
* @throws {Error} If the template exceeds the maximum length
|
|
25
|
+
*/
|
|
18
26
|
function validateTemplateLength(template) {
|
|
19
27
|
if (template.length > exports.LIMITS.MAX_TEMPLATE_LENGTH) {
|
|
20
28
|
throw new Error(`Template exceeds maximum length of ${exports.LIMITS.MAX_TEMPLATE_LENGTH}`);
|
|
21
29
|
}
|
|
22
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Validates that a key does not exceed the maximum allowed length.
|
|
33
|
+
* @param key - The key to validate
|
|
34
|
+
* @throws {Error} If the key exceeds the maximum length
|
|
35
|
+
*/
|
|
23
36
|
function validateKeyLength(key) {
|
|
24
37
|
if (key.length > exports.LIMITS.MAX_KEY_LENGTH) {
|
|
25
38
|
throw new Error(`Key exceeds maximum length of ${exports.LIMITS.MAX_KEY_LENGTH}`);
|
|
26
39
|
}
|
|
27
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Validates that a component ID meets length and character requirements.
|
|
43
|
+
* Component IDs must contain only alphanumeric characters, underscores, and hyphens.
|
|
44
|
+
* @param componentId - The component ID to validate
|
|
45
|
+
* @throws {Error} If the component ID is invalid
|
|
46
|
+
*/
|
|
28
47
|
function validateComponentId(componentId) {
|
|
29
48
|
if (componentId.length > exports.LIMITS.MAX_COMPONENT_ID_LENGTH) {
|
|
30
49
|
throw new Error(`Component ID exceeds maximum length of ${exports.LIMITS.MAX_COMPONENT_ID_LENGTH}`);
|
|
@@ -33,6 +52,12 @@ function validateComponentId(componentId) {
|
|
|
33
52
|
throw new Error('Component ID contains invalid characters');
|
|
34
53
|
}
|
|
35
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Validates that a language code meets BCP 47 format requirements.
|
|
57
|
+
* Expected format: two lowercase letters, optionally followed by a hyphen and two uppercase letters (e.g., 'en', 'en-US').
|
|
58
|
+
* @param language - The language code to validate
|
|
59
|
+
* @throws {Error} If the language code is invalid
|
|
60
|
+
*/
|
|
36
61
|
function validateLanguageCode(language) {
|
|
37
62
|
if (language.length > exports.LIMITS.MAX_LANGUAGE_CODE_LENGTH) {
|
|
38
63
|
throw new Error(`Language code exceeds maximum length of ${exports.LIMITS.MAX_LANGUAGE_CODE_LENGTH}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/validation.ts"],"names":[],"mappings":";AAAA;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/utils/validation.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkBH,wDAIC;AAOD,8CAIC;AAQD,kDAOC;AAQD,oDAOC;AA7DD;;GAEG;AACU,QAAA,MAAM,GAAG;IACpB,mBAAmB,EAAE,KAAK;IAC1B,cAAc,EAAE,GAAG;IACnB,uBAAuB,EAAE,GAAG;IAC5B,wBAAwB,EAAE,EAAE;IAC5B,iBAAiB,EAAE,EAAE;CACb,CAAC;AAEX;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,QAAgB;IACrD,IAAI,QAAQ,CAAC,MAAM,GAAG,cAAM,CAAC,mBAAmB,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CAAC,sCAAsC,cAAM,CAAC,mBAAmB,EAAE,CAAC,CAAC;IACtF,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,GAAW;IAC3C,IAAI,GAAG,CAAC,MAAM,GAAG,cAAM,CAAC,cAAc,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,iCAAiC,cAAM,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,WAAmB;IACrD,IAAI,WAAW,CAAC,MAAM,GAAG,cAAM,CAAC,uBAAuB,EAAE,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,0CAA0C,cAAM,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAC9F,CAAC;IACD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,QAAgB;IACnD,IAAI,QAAQ,CAAC,MAAM,GAAG,cAAM,CAAC,wBAAwB,EAAE,CAAC;QACtD,MAAM,IAAI,KAAK,CAAC,2CAA2C,cAAM,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAChG,CAAC;IACD,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;AACH,CAAC"}
|
|
@@ -2,22 +2,45 @@
|
|
|
2
2
|
* Plural form validation
|
|
3
3
|
*/
|
|
4
4
|
import { PluralString } from '../types/plural-types';
|
|
5
|
+
/**
|
|
6
|
+
* Result of validating plural forms.
|
|
7
|
+
*/
|
|
5
8
|
export interface PluralValidationResult {
|
|
9
|
+
/** Whether the validation passed */
|
|
6
10
|
isValid: boolean;
|
|
11
|
+
/** Array of validation errors */
|
|
7
12
|
errors: string[];
|
|
13
|
+
/** Array of validation warnings */
|
|
8
14
|
warnings: string[];
|
|
9
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Options for plural form validation.
|
|
18
|
+
*/
|
|
10
19
|
export interface PluralValidationOptions {
|
|
20
|
+
/** If true, treat missing required forms as errors instead of warnings */
|
|
11
21
|
strict?: boolean;
|
|
22
|
+
/** If true, warn about unused plural forms */
|
|
12
23
|
checkUnused?: boolean;
|
|
24
|
+
/** If true, check for consistent variable usage across forms */
|
|
13
25
|
checkVariables?: boolean;
|
|
14
26
|
}
|
|
15
27
|
/**
|
|
16
|
-
* Validate plural forms for a specific language
|
|
28
|
+
* Validate plural forms for a specific language.
|
|
29
|
+
* Checks that all required plural forms are present and optionally validates variable consistency.
|
|
30
|
+
* @param value - The plural string value to validate
|
|
31
|
+
* @param language - The language code
|
|
32
|
+
* @param key - The translation key (for error messages)
|
|
33
|
+
* @param options - Validation options
|
|
34
|
+
* @returns Validation result with errors and warnings
|
|
17
35
|
*/
|
|
18
36
|
export declare function validatePluralForms(value: PluralString, language: string, key: string, options?: PluralValidationOptions): PluralValidationResult;
|
|
19
37
|
/**
|
|
20
|
-
* Validate that count variable exists when plural forms are used
|
|
38
|
+
* Validate that count variable exists when plural forms are used.
|
|
39
|
+
* Pluralization requires a 'count' variable to determine which form to use.
|
|
40
|
+
* @param value - The plural string value
|
|
41
|
+
* @param variables - The variables object to check
|
|
42
|
+
* @param key - The translation key (for error messages)
|
|
43
|
+
* @returns Validation result with warnings if count is missing
|
|
21
44
|
*/
|
|
22
45
|
export declare function validateCountVariable(value: PluralString, variables: Record<string, any> | undefined, key: string): PluralValidationResult;
|
|
23
46
|
//# sourceMappingURL=plural-validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plural-validator.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/validation/plural-validator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAC;AAGrE,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED
|
|
1
|
+
{"version":3,"file":"plural-validator.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/validation/plural-validator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAkB,MAAM,uBAAuB,CAAC;AAGrE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,oCAAoC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gEAAgE;IAChE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CA8CxB;AAsDD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,EAC1C,GAAG,EAAE,MAAM,GACV,sBAAsB,CASxB"}
|
|
@@ -8,7 +8,13 @@ exports.validateCountVariable = validateCountVariable;
|
|
|
8
8
|
const plural_types_1 = require("../types/plural-types");
|
|
9
9
|
const language_plural_map_1 = require("../pluralization/language-plural-map");
|
|
10
10
|
/**
|
|
11
|
-
* Validate plural forms for a specific language
|
|
11
|
+
* Validate plural forms for a specific language.
|
|
12
|
+
* Checks that all required plural forms are present and optionally validates variable consistency.
|
|
13
|
+
* @param value - The plural string value to validate
|
|
14
|
+
* @param language - The language code
|
|
15
|
+
* @param key - The translation key (for error messages)
|
|
16
|
+
* @param options - Validation options
|
|
17
|
+
* @returns Validation result with errors and warnings
|
|
12
18
|
*/
|
|
13
19
|
function validatePluralForms(value, language, key, options = {}) {
|
|
14
20
|
const errors = [];
|
|
@@ -53,7 +59,10 @@ function validatePluralForms(value, language, key, options = {}) {
|
|
|
53
59
|
};
|
|
54
60
|
}
|
|
55
61
|
/**
|
|
56
|
-
* Extract all variables from plural forms
|
|
62
|
+
* Extract all variables from plural forms.
|
|
63
|
+
* Scans all plural form texts for {variable} patterns.
|
|
64
|
+
* @param value - The plural string value
|
|
65
|
+
* @returns Set of all variable names found
|
|
57
66
|
*/
|
|
58
67
|
function extractVariables(value) {
|
|
59
68
|
const vars = new Set();
|
|
@@ -70,7 +79,11 @@ function extractVariables(value) {
|
|
|
70
79
|
return vars;
|
|
71
80
|
}
|
|
72
81
|
/**
|
|
73
|
-
* Find forms with inconsistent variables
|
|
82
|
+
* Find forms with inconsistent variables.
|
|
83
|
+
* Identifies plural forms that are missing variables used in other forms.
|
|
84
|
+
* @param value - The plural string value
|
|
85
|
+
* @param allVars - Set of all variables found across all forms
|
|
86
|
+
* @returns Object mapping form names to arrays of missing variable names
|
|
74
87
|
*/
|
|
75
88
|
function findInconsistentVariables(value, allVars) {
|
|
76
89
|
const inconsistent = {};
|
|
@@ -92,7 +105,12 @@ function findInconsistentVariables(value, allVars) {
|
|
|
92
105
|
return inconsistent;
|
|
93
106
|
}
|
|
94
107
|
/**
|
|
95
|
-
* Validate that count variable exists when plural forms are used
|
|
108
|
+
* Validate that count variable exists when plural forms are used.
|
|
109
|
+
* Pluralization requires a 'count' variable to determine which form to use.
|
|
110
|
+
* @param value - The plural string value
|
|
111
|
+
* @param variables - The variables object to check
|
|
112
|
+
* @param key - The translation key (for error messages)
|
|
113
|
+
* @returns Validation result with warnings if count is missing
|
|
96
114
|
*/
|
|
97
115
|
function validateCountVariable(value, variables, key) {
|
|
98
116
|
const errors = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plural-validator.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/validation/plural-validator.ts"],"names":[],"mappings":";AAAA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"plural-validator.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/validation/plural-validator.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAuCH,kDAmDC;AA8DD,sDAaC;AAlKD,wDAAqE;AACrE,8EAAiG;AA0BjG;;;;;;;;GAQG;AACH,SAAgB,mBAAmB,CACjC,KAAmB,EACnB,QAAgB,EAChB,GAAW,EACX,UAAmC,EAAE;IAErC,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,IAAI,CAAC,IAAA,6BAAc,EAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC7C,CAAC;IAED,MAAM,QAAQ,GAAG,IAAA,4CAAsB,EAAC,QAAQ,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,IAAA,uCAAiB,EAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAqB,CAAC;IAExD,uBAAuB;IACvB,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,IAAsB,CAAC,EAAE,CAAC;YACnC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,MAAM,CAAC,IAAI,CAAC,iCAAiC,IAAI,mBAAmB,QAAQ,aAAa,GAAG,GAAG,CAAC,CAAC;YACnG,CAAC;iBAAM,CAAC;gBACN,QAAQ,CAAC,IAAI,CAAC,iCAAiC,IAAI,mBAAmB,QAAQ,aAAa,GAAG,GAAG,CAA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