generaltranslation 8.2.12 → 8.2.14
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/CHANGELOG.md +19 -0
- package/dist/{ApiError-IYfaOR30.mjs → ApiError-0DxxIHLp.mjs} +1 -1
- package/dist/{ApiError-CZ45tkW6.cjs.map → ApiError-0DxxIHLp.mjs.map} +1 -1
- package/dist/{ApiError-CZ45tkW6.cjs → ApiError-D-IBuHj6.cjs} +1 -1
- package/dist/{ApiError-IYfaOR30.mjs.map → ApiError-D-IBuHj6.cjs.map} +1 -1
- package/dist/LocaleConfig.d.ts +1 -0
- package/dist/LocaleConfig.js +1 -0
- package/dist/backwards-compatability/dataConversion.d.ts +23 -0
- package/dist/backwards-compatability/dataConversion.js +207 -0
- package/dist/backwards-compatability/oldHashJsxChildren.d.ts +23 -0
- package/dist/backwards-compatability/oldHashJsxChildren.js +79 -0
- package/dist/backwards-compatability/oldTypes.d.ts +21 -0
- package/dist/backwards-compatability/oldTypes.js +1 -0
- package/dist/backwards-compatability/typeChecking.d.ts +21 -0
- package/dist/backwards-compatability/typeChecking.js +61 -0
- package/dist/{base64-2fu94Klt.cjs → base64-C6BHySOc.cjs} +17 -1
- package/dist/base64-C6BHySOc.cjs.map +1 -0
- package/dist/{base64-DH0STixb.mjs → base64-CWITCfhU.mjs} +6 -2
- package/dist/base64-CWITCfhU.mjs.map +1 -0
- package/dist/core.cjs +9 -8
- package/dist/core.d.cts +1 -2
- package/dist/core.d.mts +1 -2
- package/dist/core.d.ts +1 -0
- package/dist/core.js +1 -0
- package/dist/core.mjs +2 -2
- package/dist/derive/condenseVars.d.ts +7 -0
- package/dist/derive/condenseVars.js +30 -0
- package/dist/derive/declareVar.d.ts +26 -0
- package/dist/derive/declareVar.js +38 -0
- package/dist/derive/decodeVars.d.ts +9 -0
- package/dist/derive/decodeVars.js +52 -0
- package/dist/derive/derive.d.ts +53 -0
- package/dist/derive/derive.js +55 -0
- package/dist/derive/extractVars.d.ts +9 -0
- package/dist/derive/extractVars.js +34 -0
- package/dist/derive/index.d.ts +7 -0
- package/dist/derive/index.js +7 -0
- package/dist/derive/indexVars.d.ts +6 -0
- package/dist/derive/indexVars.js +52 -0
- package/dist/derive/utils/constants.d.ts +2 -0
- package/dist/derive/utils/constants.js +2 -0
- package/dist/derive/utils/regex.d.ts +2 -0
- package/dist/derive/utils/regex.js +4 -0
- package/dist/derive/utils/sanitizeVar.d.ts +12 -0
- package/dist/derive/utils/sanitizeVar.js +38 -0
- package/dist/derive/utils/traverseHelpers.d.ts +4 -0
- package/dist/derive/utils/traverseHelpers.js +22 -0
- package/dist/derive/utils/traverseIcu.d.ts +20 -0
- package/dist/derive/utils/traverseIcu.js +49 -0
- package/dist/derive/utils/types.d.ts +23 -0
- package/dist/derive/utils/types.js +1 -0
- package/dist/errors/ApiError.d.ts +7 -0
- package/dist/errors/ApiError.js +33 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +1 -0
- package/dist/errors.mjs +1 -1
- package/dist/id/hashSource.d.ts +25 -0
- package/dist/id/hashSource.js +98 -0
- package/dist/id/hashTemplate.d.ts +4 -0
- package/dist/id/hashTemplate.js +6 -0
- package/dist/id/types.d.ts +7 -0
- package/dist/id/types.js +1 -0
- package/dist/{id-CyiXsQrY.cjs → id-C2orn1MA.cjs} +2 -2
- package/dist/{id-CyiXsQrY.cjs.map → id-C2orn1MA.cjs.map} +1 -1
- package/dist/{id-DbD7K-HL.mjs → id-DEaFhGqX.mjs} +2 -2
- package/dist/{id-DbD7K-HL.mjs.map → id-DEaFhGqX.mjs.map} +1 -1
- package/dist/id.cjs +1 -1
- package/dist/id.d.cts +1 -1
- package/dist/id.d.mts +1 -1
- package/dist/id.d.ts +3 -0
- package/dist/id.js +3 -0
- package/dist/id.mjs +1 -1
- package/dist/index.cjs +368 -385
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -242
- package/dist/index.d.mts +4 -242
- package/dist/index.d.ts +786 -0
- package/dist/index.js +1345 -0
- package/dist/index.mjs +215 -352
- package/dist/index.mjs.map +1 -1
- package/dist/internal.cjs +7 -7
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +7 -6
- package/dist/internal.d.mts +7 -6
- package/dist/internal.d.ts +19 -0
- package/dist/internal.js +17 -0
- package/dist/internal.mjs +5 -5
- package/dist/internal.mjs.map +1 -1
- package/dist/{isVariable-B08mggBy.cjs → isVariable-Ba1gLXdB.cjs} +1 -1
- package/dist/{isVariable-B08mggBy.cjs.map → isVariable-Ba1gLXdB.cjs.map} +1 -1
- package/dist/{isVariable-CYsKFHvR.mjs → isVariable-fAKEB7gF.mjs} +1 -1
- package/dist/{isVariable-CYsKFHvR.mjs.map → isVariable-fAKEB7gF.mjs.map} +1 -1
- package/dist/locales/getPluralForm.d.ts +9 -0
- package/dist/locales/getPluralForm.js +63 -0
- package/dist/logging/errors.d.ts +10 -0
- package/dist/logging/errors.js +29 -0
- package/dist/logging/logger.d.ts +118 -0
- package/dist/logging/logger.js +256 -0
- package/dist/projects/getProjectData.d.ts +1 -0
- package/dist/projects/getProjectData.js +87 -0
- package/dist/settings/plurals.d.ts +3 -0
- package/dist/settings/plurals.js +14 -0
- package/dist/settings/settings.d.ts +2 -0
- package/dist/settings/settings.js +2 -0
- package/dist/settings/settingsUrls.d.ts +3 -0
- package/dist/settings/settingsUrls.js +3 -0
- package/dist/translate/api.d.ts +1 -0
- package/dist/translate/api.js +1 -0
- package/dist/translate/awaitJobs.d.ts +19 -0
- package/dist/translate/awaitJobs.js +112 -0
- package/dist/translate/checkJobStatus.d.ts +8 -0
- package/dist/translate/checkJobStatus.js +55 -0
- package/dist/translate/createBranch.d.ts +10 -0
- package/dist/translate/createBranch.js +53 -0
- package/dist/translate/createTag.d.ts +19 -0
- package/dist/translate/createTag.js +67 -0
- package/dist/translate/downloadFileBatch.d.ts +1 -0
- package/dist/translate/downloadFileBatch.js +77 -0
- package/dist/translate/enqueueFiles.d.ts +8 -0
- package/dist/translate/enqueueFiles.js +96 -0
- package/dist/translate/getOrphanedFiles.d.ts +8 -0
- package/dist/translate/getOrphanedFiles.js +97 -0
- package/dist/translate/processFileMoves.d.ts +25 -0
- package/dist/translate/processFileMoves.js +90 -0
- package/dist/translate/publishFiles.d.ts +17 -0
- package/dist/translate/publishFiles.js +56 -0
- package/dist/translate/queryBranchData.d.ts +3 -0
- package/dist/translate/queryBranchData.js +53 -0
- package/dist/translate/queryFileData.d.ts +42 -0
- package/dist/translate/queryFileData.js +71 -0
- package/dist/translate/querySourceFile.d.ts +1 -0
- package/dist/translate/querySourceFile.js +67 -0
- package/dist/translate/setupProject.d.ts +11 -0
- package/dist/translate/setupProject.js +63 -0
- package/dist/translate/submitUserEditDiffs.d.ts +12 -0
- package/dist/translate/submitUserEditDiffs.js +68 -0
- package/dist/translate/translateMany.d.ts +1 -0
- package/dist/translate/translateMany.js +103 -0
- package/dist/translate/uploadSourceFiles.d.ts +1 -0
- package/dist/translate/uploadSourceFiles.js +87 -0
- package/dist/translate/uploadTranslations.d.ts +1 -0
- package/dist/translate/uploadTranslations.js +101 -0
- package/dist/translate/utils/apiRequest.d.ts +1 -0
- package/dist/translate/utils/apiRequest.js +130 -0
- package/dist/translate/utils/batch.d.ts +52 -0
- package/dist/translate/utils/batch.js +126 -0
- package/dist/translate/utils/fetchWithTimeout.d.ts +1 -0
- package/dist/translate/utils/fetchWithTimeout.js +93 -0
- package/dist/translate/utils/generateRequestHeaders.d.ts +2 -0
- package/dist/translate/utils/generateRequestHeaders.js +26 -0
- package/dist/translate/utils/handleFetchError.d.ts +1 -0
- package/dist/translate/utils/handleFetchError.js +12 -0
- package/dist/translate/utils/validateFileFormatTransform.d.ts +16 -0
- package/dist/translate/utils/validateFileFormatTransform.js +29 -0
- package/dist/translate/utils/validateResponse.d.ts +1 -0
- package/dist/translate/utils/validateResponse.js +72 -0
- package/dist/{types-V5rqd1WR.d.cts → types-73XFwmhH.d.mts} +39 -115
- package/dist/{types-BsGsgJWF.d.mts → types-YrrGRHBP.d.cts} +39 -115
- package/dist/types-dir/api/branch.d.ts +10 -0
- package/dist/types-dir/api/branch.js +1 -0
- package/dist/types-dir/api/checkFileTranslations.d.ts +37 -0
- package/dist/types-dir/api/checkFileTranslations.js +1 -0
- package/dist/types-dir/api/downloadFile.d.ts +3 -0
- package/dist/types-dir/api/downloadFile.js +1 -0
- package/dist/types-dir/api/downloadFileBatch.d.ts +35 -0
- package/dist/types-dir/api/downloadFileBatch.js +1 -0
- package/dist/types-dir/api/enqueueEntries.d.ts +21 -0
- package/dist/types-dir/api/enqueueEntries.js +1 -0
- package/dist/types-dir/api/enqueueFiles.d.ts +70 -0
- package/dist/types-dir/api/enqueueFiles.js +1 -0
- package/dist/types-dir/api/entry.d.ts +39 -0
- package/dist/types-dir/api/entry.js +1 -0
- package/dist/types-dir/api/fetchTranslations.d.ts +12 -0
- package/dist/types-dir/api/fetchTranslations.js +1 -0
- package/dist/types-dir/api/file.d.ts +57 -0
- package/dist/types-dir/api/file.js +1 -0
- package/dist/types-dir/api/json.d.ts +5 -0
- package/dist/types-dir/api/json.js +1 -0
- package/dist/types-dir/api/project.d.ts +7 -0
- package/dist/types-dir/api/project.js +1 -0
- package/dist/types-dir/api/translate.d.ts +34 -0
- package/dist/types-dir/api/translate.js +1 -0
- package/dist/types-dir/api/translateMany.d.ts +5 -0
- package/dist/types-dir/api/translateMany.js +1 -0
- package/dist/types-dir/api/translationStatus.d.ts +9 -0
- package/dist/types-dir/api/translationStatus.js +1 -0
- package/dist/types-dir/api/uploadFiles.d.ts +44 -0
- package/dist/types-dir/api/uploadFiles.js +1 -0
- package/dist/types-dir/transformations.d.ts +8 -0
- package/dist/types-dir/transformations.js +1 -0
- package/dist/types.cjs +7 -16
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +127 -0
- package/dist/types.js +1 -0
- package/dist/types.mjs +1 -15
- package/dist/utils/base64.d.ts +2 -0
- package/dist/utils/base64.js +28 -0
- package/dist/utils/isSupportedFileFormatTransform.d.ts +8 -0
- package/dist/utils/isSupportedFileFormatTransform.js +26 -0
- package/dist/utils/isVariable.d.ts +2 -0
- package/dist/utils/isVariable.js +22 -0
- package/dist/utils/minify.d.ts +2 -0
- package/dist/utils/minify.js +10 -0
- package/dist/utils/stableStringify.d.ts +1 -0
- package/dist/utils/stableStringify.js +40 -0
- package/package.json +5 -4
- package/dist/IntlCache-CAW8tKhd.cjs +0 -212
- package/dist/IntlCache-CAW8tKhd.cjs.map +0 -1
- package/dist/IntlCache-WZk0rKvj.mjs +0 -195
- package/dist/IntlCache-WZk0rKvj.mjs.map +0 -1
- package/dist/base64-2fu94Klt.cjs.map +0 -1
- package/dist/base64-DH0STixb.mjs.map +0 -1
- package/dist/core-7RJsqw6c.mjs +0 -1498
- package/dist/core-7RJsqw6c.mjs.map +0 -1
- package/dist/core-CGhlXrrK.d.mts +0 -209
- package/dist/core-CST4J4WU.cjs +0 -1677
- package/dist/core-CST4J4WU.cjs.map +0 -1
- package/dist/core-D-E8qhLn.d.cts +0 -209
- package/dist/types.cjs.map +0 -1
- package/dist/types.mjs.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TYPE, } from '@formatjs/icu-messageformat-parser/types.js';
|
|
2
|
+
import { printAST } from '@formatjs/icu-messageformat-parser/printer.js';
|
|
3
|
+
import { traverseIcu } from './utils/traverseIcu';
|
|
4
|
+
import { VAR_IDENTIFIER } from './utils/constants';
|
|
5
|
+
import { isGTIndexedSelectElement } from './utils/traverseHelpers';
|
|
6
|
+
/**
|
|
7
|
+
* Given an indexed ICU string, condenses any select to an argument
|
|
8
|
+
* indexVars('Hello {_gt_1, select, other {World}}') => 'Hello {_gt_1}'
|
|
9
|
+
* @param {string} icuString - The ICU string to condense.
|
|
10
|
+
* @returns {string} The condensed ICU string.
|
|
11
|
+
*/
|
|
12
|
+
export function condenseVars(icuString) {
|
|
13
|
+
// Check if the string contains _gt_
|
|
14
|
+
if (!icuString.includes(VAR_IDENTIFIER)) {
|
|
15
|
+
return icuString;
|
|
16
|
+
}
|
|
17
|
+
// Replace with argument
|
|
18
|
+
function visitor(child) {
|
|
19
|
+
child.type = TYPE.argument;
|
|
20
|
+
Reflect.deleteProperty(child, 'options');
|
|
21
|
+
}
|
|
22
|
+
var ast = traverseIcu({
|
|
23
|
+
icuString: icuString,
|
|
24
|
+
shouldVisit: isGTIndexedSelectElement,
|
|
25
|
+
visitor: visitor,
|
|
26
|
+
options: { recurseIntoVisited: false },
|
|
27
|
+
});
|
|
28
|
+
// Serialize
|
|
29
|
+
return printAST(ast);
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mark as a non-translatable string. Use within a derive() call to mark content as not derivable (e.g., not possible to statically analyze).
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* function nonDerivableFunction() {
|
|
6
|
+
* return Math.random();
|
|
7
|
+
* }
|
|
8
|
+
*
|
|
9
|
+
* function derivableFunction() {
|
|
10
|
+
* if (condition) {
|
|
11
|
+
* return declareVar(nonDerivableFunction())
|
|
12
|
+
* }
|
|
13
|
+
* return 'John Doe';
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* const gt = useGT();
|
|
17
|
+
* gt(`My name is ${derive(derivableFunction())}`);
|
|
18
|
+
*
|
|
19
|
+
* @param {string | number | boolean | null | undefined} variable - The variable to sanitize.
|
|
20
|
+
* @param {Object} [options] - The options for the sanitization.
|
|
21
|
+
* @param {string} [options.$name] - The name of the variable.
|
|
22
|
+
* @returns {string} The sanitized value.
|
|
23
|
+
*/
|
|
24
|
+
export declare function declareVar(variable: string | number | boolean | null | undefined, options?: {
|
|
25
|
+
$name?: string;
|
|
26
|
+
}): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { VAR_IDENTIFIER, VAR_NAME_IDENTIFIER } from './utils/constants';
|
|
2
|
+
import { sanitizeVar } from './utils/sanitizeVar';
|
|
3
|
+
/**
|
|
4
|
+
* Mark as a non-translatable string. Use within a derive() call to mark content as not derivable (e.g., not possible to statically analyze).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* function nonDerivableFunction() {
|
|
8
|
+
* return Math.random();
|
|
9
|
+
* }
|
|
10
|
+
*
|
|
11
|
+
* function derivableFunction() {
|
|
12
|
+
* if (condition) {
|
|
13
|
+
* return declareVar(nonDerivableFunction())
|
|
14
|
+
* }
|
|
15
|
+
* return 'John Doe';
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* const gt = useGT();
|
|
19
|
+
* gt(`My name is ${derive(derivableFunction())}`);
|
|
20
|
+
*
|
|
21
|
+
* @param {string | number | boolean | null | undefined} variable - The variable to sanitize.
|
|
22
|
+
* @param {Object} [options] - The options for the sanitization.
|
|
23
|
+
* @param {string} [options.$name] - The name of the variable.
|
|
24
|
+
* @returns {string} The sanitized value.
|
|
25
|
+
*/
|
|
26
|
+
export function declareVar(variable, options) {
|
|
27
|
+
// Variable section.
|
|
28
|
+
var sanitizedVariable = sanitizeVar(String(variable !== null && variable !== void 0 ? variable : ''));
|
|
29
|
+
var variableSection = " other {".concat(sanitizedVariable, "}");
|
|
30
|
+
// Name section.
|
|
31
|
+
var nameSection = '';
|
|
32
|
+
if (options === null || options === void 0 ? void 0 : options.$name) {
|
|
33
|
+
var sanitizedName = sanitizeVar(options.$name);
|
|
34
|
+
nameSection = " ".concat(VAR_NAME_IDENTIFIER, " {").concat(sanitizedName, "}");
|
|
35
|
+
}
|
|
36
|
+
// interpolate
|
|
37
|
+
return "{".concat(VAR_IDENTIFIER, ", select,").concat(variableSection).concat(nameSection, "}");
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given an encoded ICU string, interpolate only _gt_ variables that have been marked with declareVar()
|
|
3
|
+
* @example
|
|
4
|
+
* const encodedIcu = "Hi" + declareVar("Brian") + ", my name is {name}"
|
|
5
|
+
* // 'Hi {_gt_, select, other {Brian}}, my name is {name}'
|
|
6
|
+
* decodeVars(encodedIcu)
|
|
7
|
+
* // 'Hi Brian, my name is {name}'
|
|
8
|
+
*/
|
|
9
|
+
export declare function decodeVars(icuString: string): string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { traverseIcu } from './utils/traverseIcu';
|
|
2
|
+
import { VAR_IDENTIFIER } from './utils/constants';
|
|
3
|
+
import { isGTUnindexedSelectElement } from './utils/traverseHelpers';
|
|
4
|
+
/**
|
|
5
|
+
* Given an encoded ICU string, interpolate only _gt_ variables that have been marked with declareVar()
|
|
6
|
+
* @example
|
|
7
|
+
* const encodedIcu = "Hi" + declareVar("Brian") + ", my name is {name}"
|
|
8
|
+
* // 'Hi {_gt_, select, other {Brian}}, my name is {name}'
|
|
9
|
+
* decodeVars(encodedIcu)
|
|
10
|
+
* // 'Hi Brian, my name is {name}'
|
|
11
|
+
*/
|
|
12
|
+
export function decodeVars(icuString) {
|
|
13
|
+
// Check if the string contains _gt_
|
|
14
|
+
if (!icuString.includes(VAR_IDENTIFIER)) {
|
|
15
|
+
return icuString;
|
|
16
|
+
}
|
|
17
|
+
// Record the location of the variable
|
|
18
|
+
var variableLocations = [];
|
|
19
|
+
function visitor(child) {
|
|
20
|
+
var _a, _b, _c, _d;
|
|
21
|
+
variableLocations.push({
|
|
22
|
+
start: (_b = (_a = child.location) === null || _a === void 0 ? void 0 : _a.start.offset) !== null && _b !== void 0 ? _b : 0,
|
|
23
|
+
end: (_d = (_c = child.location) === null || _c === void 0 ? void 0 : _c.end.offset) !== null && _d !== void 0 ? _d : 0,
|
|
24
|
+
value: child.options.other.value.length > 0
|
|
25
|
+
? child.options.other.value[0].value
|
|
26
|
+
: '',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
// Find all variable identifiers.
|
|
30
|
+
traverseIcu({
|
|
31
|
+
icuString: icuString,
|
|
32
|
+
shouldVisit: isGTUnindexedSelectElement,
|
|
33
|
+
visitor: visitor,
|
|
34
|
+
options: {
|
|
35
|
+
recurseIntoVisited: false,
|
|
36
|
+
captureLocation: true,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
// Construct output string
|
|
40
|
+
var previousIndex = 0;
|
|
41
|
+
var outputList = [];
|
|
42
|
+
for (var i = 0; i < variableLocations.length; i++) {
|
|
43
|
+
outputList.push(icuString.slice(previousIndex, variableLocations[i].start));
|
|
44
|
+
outputList.push(variableLocations[i].value);
|
|
45
|
+
previousIndex = variableLocations[i].end;
|
|
46
|
+
}
|
|
47
|
+
if (previousIndex < icuString.length) {
|
|
48
|
+
outputList.push(icuString.slice(previousIndex));
|
|
49
|
+
}
|
|
50
|
+
var outputString = outputList.join('');
|
|
51
|
+
return outputString;
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marks content as derivable by the GT compiler and CLI.
|
|
3
|
+
*
|
|
4
|
+
* Use `derive()` when a translation string or context needs content that is
|
|
5
|
+
* computed from source code, but should still be discovered during extraction
|
|
6
|
+
* instead of treated as a runtime interpolation variable. The CLI attempts to
|
|
7
|
+
* resolve the derivable expression into every possible static value and
|
|
8
|
+
* includes those values in the source content that gets translated.
|
|
9
|
+
*
|
|
10
|
+
* `derive()` returns its argument unchanged at runtime.
|
|
11
|
+
*
|
|
12
|
+
* Run `gt validate` after adding or changing `derive()` calls to verify that
|
|
13
|
+
* each derivable expression can be resolved by the CLI before translating or
|
|
14
|
+
* building.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```jsx
|
|
18
|
+
* function getSubject() {
|
|
19
|
+
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
20
|
+
* }
|
|
21
|
+
* ...
|
|
22
|
+
* gt(`My name is ${derive(getSubject())}`);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param {T extends string | boolean | number | null | undefined} content - Content to derive for translation extraction.
|
|
26
|
+
* @returns {T} The same content, unchanged at runtime.
|
|
27
|
+
*/
|
|
28
|
+
export declare function derive<T extends string | boolean | number | null | undefined>(content: T): T;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use derive() instead.
|
|
31
|
+
*
|
|
32
|
+
* Marks content as derivable by the GT compiler and CLI.
|
|
33
|
+
*
|
|
34
|
+
* Use `derive()` instead of `declareStatic()` for new code. This alias is kept
|
|
35
|
+
* for backwards compatibility and returns its argument unchanged at runtime.
|
|
36
|
+
*
|
|
37
|
+
* Run `gt validate` after adding or changing derived content to verify that
|
|
38
|
+
* each derivable expression can be resolved by the CLI before translating or
|
|
39
|
+
* building.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```jsx
|
|
43
|
+
* function getSubject() {
|
|
44
|
+
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
45
|
+
* }
|
|
46
|
+
* ...
|
|
47
|
+
* gt(`My name is ${declareStatic(getSubject())}`);
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @param {T extends string | boolean | number | null | undefined} content - Content to derive for translation extraction.
|
|
51
|
+
* @returns {T} The same content, unchanged at runtime.
|
|
52
|
+
*/
|
|
53
|
+
export declare const declareStatic: typeof derive;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marks content as derivable by the GT compiler and CLI.
|
|
3
|
+
*
|
|
4
|
+
* Use `derive()` when a translation string or context needs content that is
|
|
5
|
+
* computed from source code, but should still be discovered during extraction
|
|
6
|
+
* instead of treated as a runtime interpolation variable. The CLI attempts to
|
|
7
|
+
* resolve the derivable expression into every possible static value and
|
|
8
|
+
* includes those values in the source content that gets translated.
|
|
9
|
+
*
|
|
10
|
+
* `derive()` returns its argument unchanged at runtime.
|
|
11
|
+
*
|
|
12
|
+
* Run `gt validate` after adding or changing `derive()` calls to verify that
|
|
13
|
+
* each derivable expression can be resolved by the CLI before translating or
|
|
14
|
+
* building.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```jsx
|
|
18
|
+
* function getSubject() {
|
|
19
|
+
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
20
|
+
* }
|
|
21
|
+
* ...
|
|
22
|
+
* gt(`My name is ${derive(getSubject())}`);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param {T extends string | boolean | number | null | undefined} content - Content to derive for translation extraction.
|
|
26
|
+
* @returns {T} The same content, unchanged at runtime.
|
|
27
|
+
*/
|
|
28
|
+
export function derive(content) {
|
|
29
|
+
return content;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use derive() instead.
|
|
33
|
+
*
|
|
34
|
+
* Marks content as derivable by the GT compiler and CLI.
|
|
35
|
+
*
|
|
36
|
+
* Use `derive()` instead of `declareStatic()` for new code. This alias is kept
|
|
37
|
+
* for backwards compatibility and returns its argument unchanged at runtime.
|
|
38
|
+
*
|
|
39
|
+
* Run `gt validate` after adding or changing derived content to verify that
|
|
40
|
+
* each derivable expression can be resolved by the CLI before translating or
|
|
41
|
+
* building.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```jsx
|
|
45
|
+
* function getSubject() {
|
|
46
|
+
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
47
|
+
* }
|
|
48
|
+
* ...
|
|
49
|
+
* gt(`My name is ${declareStatic(getSubject())}`);
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param {T extends string | boolean | number | null | undefined} content - Content to derive for translation extraction.
|
|
53
|
+
* @returns {T} The same content, unchanged at runtime.
|
|
54
|
+
*/
|
|
55
|
+
export var declareStatic = derive;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given an unindexed ICU string, extracts all the _gt_ variables and an indexed mapping of the variable to the values
|
|
3
|
+
*
|
|
4
|
+
* extractVars('Hello {_gt_, select, other {World}}') => { _gt_1: 'World' }
|
|
5
|
+
*
|
|
6
|
+
* @param {string} icuString - The ICU string to extract variables from.
|
|
7
|
+
* @returns {Record<string, string>} A mapping of the variable to the value.
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractVars(icuString: string): Record<string, string>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VAR_IDENTIFIER } from './utils/constants';
|
|
2
|
+
import { isGTUnindexedSelectElement } from './utils/traverseHelpers';
|
|
3
|
+
import { traverseIcu } from './utils/traverseIcu';
|
|
4
|
+
/**
|
|
5
|
+
* Given an unindexed ICU string, extracts all the _gt_ variables and an indexed mapping of the variable to the values
|
|
6
|
+
*
|
|
7
|
+
* extractVars('Hello {_gt_, select, other {World}}') => { _gt_1: 'World' }
|
|
8
|
+
*
|
|
9
|
+
* @param {string} icuString - The ICU string to extract variables from.
|
|
10
|
+
* @returns {Record<string, string>} A mapping of the variable to the value.
|
|
11
|
+
*/
|
|
12
|
+
export function extractVars(icuString) {
|
|
13
|
+
// Check if the string contains _gt_
|
|
14
|
+
if (!icuString.includes(VAR_IDENTIFIER)) {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
// Extract all the _gt_# variables
|
|
18
|
+
var index = 1;
|
|
19
|
+
var variables = {};
|
|
20
|
+
function visitor(child) {
|
|
21
|
+
var _a;
|
|
22
|
+
variables[child.value + index] = child.options.other.value.length
|
|
23
|
+
? (_a = child.options.other.value[0]) === null || _a === void 0 ? void 0 : _a.value
|
|
24
|
+
: '';
|
|
25
|
+
index += 1;
|
|
26
|
+
}
|
|
27
|
+
traverseIcu({
|
|
28
|
+
icuString: icuString,
|
|
29
|
+
shouldVisit: isGTUnindexedSelectElement,
|
|
30
|
+
visitor: visitor,
|
|
31
|
+
options: { recurseIntoVisited: false },
|
|
32
|
+
});
|
|
33
|
+
return variables;
|
|
34
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IcuMessage } from '@generaltranslation/format/types';
|
|
2
|
+
/**
|
|
3
|
+
* Given an ICU string adds identifiers to each _gt_ placeholder
|
|
4
|
+
* indexVars('Hello {_gt_} {_gt_} World') => 'Hello {_gt_1_} {_gt_2_} World'
|
|
5
|
+
*/
|
|
6
|
+
export declare function indexVars(icuString: IcuMessage): string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { VAR_IDENTIFIER } from './utils/constants';
|
|
2
|
+
import { traverseIcu } from './utils/traverseIcu';
|
|
3
|
+
import { isGTUnindexedSelectElement } from './utils/traverseHelpers';
|
|
4
|
+
/**
|
|
5
|
+
* Given an ICU string adds identifiers to each _gt_ placeholder
|
|
6
|
+
* indexVars('Hello {_gt_} {_gt_} World') => 'Hello {_gt_1_} {_gt_2_} World'
|
|
7
|
+
*/
|
|
8
|
+
export function indexVars(icuString) {
|
|
9
|
+
// Check if the string contains _gt_
|
|
10
|
+
if (!icuString.includes(VAR_IDENTIFIER)) {
|
|
11
|
+
return icuString;
|
|
12
|
+
}
|
|
13
|
+
// Record the location of the variable
|
|
14
|
+
var variableLocations = [];
|
|
15
|
+
function visitor(child) {
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
17
|
+
variableLocations.push({
|
|
18
|
+
start: (_b = (_a = child.location) === null || _a === void 0 ? void 0 : _a.start.offset) !== null && _b !== void 0 ? _b : 0,
|
|
19
|
+
end: (_d = (_c = child.location) === null || _c === void 0 ? void 0 : _c.end.offset) !== null && _d !== void 0 ? _d : 0,
|
|
20
|
+
otherStart: (_f = (_e = child.options.other.location) === null || _e === void 0 ? void 0 : _e.start.offset) !== null && _f !== void 0 ? _f : 0,
|
|
21
|
+
otherEnd: (_h = (_g = child.options.other.location) === null || _g === void 0 ? void 0 : _g.end.offset) !== null && _h !== void 0 ? _h : 0,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
// Find all variable identifiers.
|
|
25
|
+
traverseIcu({
|
|
26
|
+
icuString: icuString,
|
|
27
|
+
shouldVisit: isGTUnindexedSelectElement,
|
|
28
|
+
visitor: visitor,
|
|
29
|
+
options: { recurseIntoVisited: false, captureLocation: true },
|
|
30
|
+
});
|
|
31
|
+
// Index each variable and collapse the other option.
|
|
32
|
+
var result = [];
|
|
33
|
+
var current = 0;
|
|
34
|
+
for (var i = 0; i < variableLocations.length; i++) {
|
|
35
|
+
var _a = variableLocations[i], start = _a.start, end = _a.end, otherStart = _a.otherStart, otherEnd = _a.otherEnd;
|
|
36
|
+
// Before the variable
|
|
37
|
+
result.push(icuString.slice(current, start));
|
|
38
|
+
// Replace the variable with the new identifier (+1 is for the curly brace)
|
|
39
|
+
result.push(icuString.slice(start, start + VAR_IDENTIFIER.length + 1));
|
|
40
|
+
// Add the new identifier.
|
|
41
|
+
result.push(String(i + 1));
|
|
42
|
+
// After the variable
|
|
43
|
+
result.push(icuString.slice(start + VAR_IDENTIFIER.length + 1, otherStart));
|
|
44
|
+
// Before the other option
|
|
45
|
+
result.push('{}');
|
|
46
|
+
// The other option
|
|
47
|
+
result.push(icuString.slice(otherEnd, end));
|
|
48
|
+
current = end;
|
|
49
|
+
}
|
|
50
|
+
result.push(icuString.slice(current, icuString.length));
|
|
51
|
+
return result.join('');
|
|
52
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitizes string by escaping ICU syntax
|
|
3
|
+
*
|
|
4
|
+
* Sanitize arbitrary string so it does not break the following ICU message syntax:
|
|
5
|
+
* {_gt_, select, other {string_here}}
|
|
6
|
+
*
|
|
7
|
+
* Escapes ICU special characters by:
|
|
8
|
+
* 1. Doubling all single quotes (U+0027 ')
|
|
9
|
+
* 2. Adding a single quote before the first special character ({}<>)
|
|
10
|
+
* 3. Adding a single quote after the last special character ({}<>)
|
|
11
|
+
*/
|
|
12
|
+
export declare function sanitizeVar(string: string): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitizes string by escaping ICU syntax
|
|
3
|
+
*
|
|
4
|
+
* Sanitize arbitrary string so it does not break the following ICU message syntax:
|
|
5
|
+
* {_gt_, select, other {string_here}}
|
|
6
|
+
*
|
|
7
|
+
* Escapes ICU special characters by:
|
|
8
|
+
* 1. Doubling all single quotes (U+0027 ')
|
|
9
|
+
* 2. Adding a single quote before the first special character ({}<>)
|
|
10
|
+
* 3. Adding a single quote after the last special character ({}<>)
|
|
11
|
+
*/
|
|
12
|
+
export function sanitizeVar(string) {
|
|
13
|
+
// First, double all single quotes (both ASCII and Unicode).
|
|
14
|
+
var result = string.replace(/'/g, "''");
|
|
15
|
+
// Find first and last positions of special characters
|
|
16
|
+
var specialChars = /[{}<>]/;
|
|
17
|
+
var firstSpecialIndex = result.search(specialChars);
|
|
18
|
+
if (firstSpecialIndex === -1) {
|
|
19
|
+
// No special characters; return with just doubled quotes.
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
// Find last special character position
|
|
23
|
+
var lastSpecialIndex = -1;
|
|
24
|
+
for (var i = result.length - 1; i >= 0; i--) {
|
|
25
|
+
if (specialChars.test(result[i])) {
|
|
26
|
+
lastSpecialIndex = i;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// Insert quotes around the special character region.
|
|
31
|
+
result =
|
|
32
|
+
result.slice(0, firstSpecialIndex) +
|
|
33
|
+
"'" +
|
|
34
|
+
result.slice(firstSpecialIndex, lastSpecialIndex + 1) +
|
|
35
|
+
"'" +
|
|
36
|
+
result.slice(lastSpecialIndex + 1);
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GTIndexedSelectElement, GTUnindexedSelectElement } from './types';
|
|
2
|
+
import { type MessageFormatElement } from '@formatjs/icu-messageformat-parser/types.js';
|
|
3
|
+
export declare function isGTIndexedSelectElement(child: MessageFormatElement): child is GTIndexedSelectElement;
|
|
4
|
+
export declare function isGTUnindexedSelectElement(child: MessageFormatElement): child is GTUnindexedSelectElement;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GT_INDEXED_IDENTIFIER_REGEX, GT_UNINDEXED_IDENTIFIER_REGEX, } from './regex';
|
|
2
|
+
import { TYPE, } from '@formatjs/icu-messageformat-parser/types.js';
|
|
3
|
+
// Visit any _gt_# select
|
|
4
|
+
export function isGTIndexedSelectElement(child) {
|
|
5
|
+
var _a;
|
|
6
|
+
return (child.type === TYPE.select &&
|
|
7
|
+
GT_INDEXED_IDENTIFIER_REGEX.test(child.value) &&
|
|
8
|
+
!!child.options.other &&
|
|
9
|
+
(child.options.other.value.length === 0 ||
|
|
10
|
+
(child.options.other.value.length > 0 &&
|
|
11
|
+
((_a = child.options.other.value[0]) === null || _a === void 0 ? void 0 : _a.type) === TYPE.literal)));
|
|
12
|
+
}
|
|
13
|
+
// Visit any _gt_ select
|
|
14
|
+
export function isGTUnindexedSelectElement(child) {
|
|
15
|
+
var _a;
|
|
16
|
+
return (child.type === TYPE.select &&
|
|
17
|
+
GT_UNINDEXED_IDENTIFIER_REGEX.test(child.value) &&
|
|
18
|
+
!!child.options.other &&
|
|
19
|
+
(child.options.other.value.length === 0 ||
|
|
20
|
+
(child.options.other.value.length > 0 &&
|
|
21
|
+
((_a = child.options.other.value[0]) === null || _a === void 0 ? void 0 : _a.type) === TYPE.literal)));
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MessageFormatElement, ParserOptions } from '@formatjs/icu-messageformat-parser';
|
|
2
|
+
type TraverseIcuOptions = ParserOptions & {
|
|
3
|
+
recurseIntoVisited?: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Given an ICU string, traverse the AST and call the visitor function for each element that matches the type T
|
|
7
|
+
* @param icu - The ICU string to traverse
|
|
8
|
+
* @param shouldVisit - A function that returns true if the element should be visited
|
|
9
|
+
* @param visitor - A function that is called for each element that matches the type T
|
|
10
|
+
* @returns The modified AST of the ICU string.
|
|
11
|
+
*
|
|
12
|
+
* @note This function is a heavy operation, use sparingly
|
|
13
|
+
*/
|
|
14
|
+
export declare function traverseIcu<T extends MessageFormatElement>({ icuString, shouldVisit, visitor, options: { recurseIntoVisited, ...otherOptions }, }: {
|
|
15
|
+
icuString: string;
|
|
16
|
+
shouldVisit: (element: MessageFormatElement) => element is T;
|
|
17
|
+
visitor: (element: T) => void;
|
|
18
|
+
options: TraverseIcuOptions;
|
|
19
|
+
}): MessageFormatElement[];
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { parse, TYPE, } from '@formatjs/icu-messageformat-parser';
|
|
13
|
+
/**
|
|
14
|
+
* Given an ICU string, traverse the AST and call the visitor function for each element that matches the type T
|
|
15
|
+
* @param icu - The ICU string to traverse
|
|
16
|
+
* @param shouldVisit - A function that returns true if the element should be visited
|
|
17
|
+
* @param visitor - A function that is called for each element that matches the type T
|
|
18
|
+
* @returns The modified AST of the ICU string.
|
|
19
|
+
*
|
|
20
|
+
* @note This function is a heavy operation, use sparingly
|
|
21
|
+
*/
|
|
22
|
+
export function traverseIcu(_a) {
|
|
23
|
+
var icuString = _a.icuString, shouldVisit = _a.shouldVisit, visitor = _a.visitor, _b = _a.options, _c = _b.recurseIntoVisited, recurseIntoVisited = _c === void 0 ? true : _c, otherOptions = __rest(_b, ["recurseIntoVisited"]);
|
|
24
|
+
var ast = parse(icuString, otherOptions);
|
|
25
|
+
handleChildren(ast);
|
|
26
|
+
return ast;
|
|
27
|
+
function handleChildren(children) {
|
|
28
|
+
children.map(handleChild);
|
|
29
|
+
}
|
|
30
|
+
function handleChild(child) {
|
|
31
|
+
// handle select var
|
|
32
|
+
var visited = false;
|
|
33
|
+
if (shouldVisit(child)) {
|
|
34
|
+
visitor(child);
|
|
35
|
+
visited = true;
|
|
36
|
+
}
|
|
37
|
+
// recurse on children
|
|
38
|
+
if (!visited || recurseIntoVisited) {
|
|
39
|
+
if (child.type === TYPE.select || child.type === TYPE.plural) {
|
|
40
|
+
Object.values(child.options)
|
|
41
|
+
.map(function (option) { return option.value; })
|
|
42
|
+
.map(handleChildren);
|
|
43
|
+
}
|
|
44
|
+
else if (child.type === TYPE.tag) {
|
|
45
|
+
handleChildren(child.children);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VAR_IDENTIFIER } from './constants';
|
|
2
|
+
import type { PluralOrSelectOption, LiteralElement, SelectElement } from '@formatjs/icu-messageformat-parser/types.js';
|
|
3
|
+
interface GTIndexedSelectOption extends PluralOrSelectOption {
|
|
4
|
+
value: Array<LiteralElement>;
|
|
5
|
+
}
|
|
6
|
+
export interface GTIndexedSelectElement extends SelectElement {
|
|
7
|
+
value: `${typeof VAR_IDENTIFIER}${number}`;
|
|
8
|
+
options: {
|
|
9
|
+
other: GTIndexedSelectOption;
|
|
10
|
+
[key: string]: PluralOrSelectOption;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface GTUnindexedSelectOption extends PluralOrSelectOption {
|
|
14
|
+
value: Array<LiteralElement>;
|
|
15
|
+
}
|
|
16
|
+
export interface GTUnindexedSelectElement extends SelectElement {
|
|
17
|
+
value: typeof VAR_IDENTIFIER;
|
|
18
|
+
options: {
|
|
19
|
+
other: GTUnindexedSelectOption;
|
|
20
|
+
[key: string]: PluralOrSelectOption;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var ApiError = /** @class */ (function (_super) {
|
|
17
|
+
__extends(ApiError, _super);
|
|
18
|
+
function ApiError(error, code, message) {
|
|
19
|
+
var _this = _super.call(this, error) || this;
|
|
20
|
+
_this.name = 'ApiError';
|
|
21
|
+
_this.code = code;
|
|
22
|
+
_this.message = message;
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
ApiError.prototype.getCode = function () {
|
|
26
|
+
return this.code;
|
|
27
|
+
};
|
|
28
|
+
ApiError.prototype.getMessage = function () {
|
|
29
|
+
return this.message;
|
|
30
|
+
};
|
|
31
|
+
return ApiError;
|
|
32
|
+
}(Error));
|
|
33
|
+
export { ApiError };
|
package/dist/errors.cjs
CHANGED
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './errors/ApiError';
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './errors/ApiError';
|
package/dist/errors.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ApiError } from "./ApiError-
|
|
1
|
+
import { t as ApiError } from "./ApiError-0DxxIHLp.mjs";
|
|
2
2
|
export { ApiError };
|