@rushstack/localization-utilities 0.10.0 → 0.11.0
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.json +26 -0
- package/CHANGELOG.md +8 -1
- package/dist/localization-utilities.d.ts +14 -2
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/TypingsGenerator.d.ts +13 -3
- package/lib/TypingsGenerator.d.ts.map +1 -1
- package/lib/TypingsGenerator.js +31 -9
- package/lib/TypingsGenerator.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/localization-utilities",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.11.0",
|
|
6
|
+
"tag": "@rushstack/localization-utilities_v0.11.0",
|
|
7
|
+
"date": "Wed, 21 Aug 2024 05:43:04 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Expand the typings generator to take a richer set of options for default exports. See `exportAsDefault` in @rushstack/typings-generator's `StringValuesTypingsGenerator`. Also included is another property in `exportAsDefault`: `inferInterfaceNameFromFilename`."
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"dependency": [
|
|
15
|
+
{
|
|
16
|
+
"comment": "Updating dependency \"@rushstack/node-core-library\" to `5.7.0`"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"comment": "Updating dependency \"@rushstack/terminal\" to `0.14.0`"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"comment": "Updating dependency \"@rushstack/typings-generator\" to `0.13.0`"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"comment": "Updating dependency \"@rushstack/heft\" to `0.67.0`"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
4
30
|
{
|
|
5
31
|
"version": "0.10.0",
|
|
6
32
|
"tag": "@rushstack/localization-utilities_v0.10.0",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Change Log - @rushstack/localization-utilities
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 21 Aug 2024 05:43:04 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.11.0
|
|
6
|
+
Wed, 21 Aug 2024 05:43:04 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- Expand the typings generator to take a richer set of options for default exports. See `exportAsDefault` in @rushstack/typings-generator's `StringValuesTypingsGenerator`. Also included is another property in `exportAsDefault`: `inferInterfaceNameFromFilename`.
|
|
4
11
|
|
|
5
12
|
## 0.10.0
|
|
6
13
|
Mon, 12 Aug 2024 22:16:04 GMT
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { IExportAsDefaultOptions } from '@rushstack/typings-generator';
|
|
7
8
|
import type { ITerminal } from '@rushstack/terminal';
|
|
8
9
|
import { ITypingsGeneratorBaseOptions } from '@rushstack/typings-generator';
|
|
9
10
|
import { NewlineKind } from '@rushstack/node-core-library';
|
|
@@ -21,6 +22,17 @@ export declare function getPseudolocalizer(options: IPseudolocaleOptions): (str:
|
|
|
21
22
|
*/
|
|
22
23
|
export declare type IgnoreStringFunction = (filePath: string, stringName: string) => boolean;
|
|
23
24
|
|
|
25
|
+
/**
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export declare interface IInferInterfaceNameExportAsDefaultOptions extends Omit<IExportAsDefaultOptions, 'interfaceName'> {
|
|
29
|
+
/**
|
|
30
|
+
* When `exportAsDefault` is true and this option is true, the default export interface name will be inferred
|
|
31
|
+
* from the filename.
|
|
32
|
+
*/
|
|
33
|
+
inferInterfaceNameFromFilename?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
24
36
|
/**
|
|
25
37
|
* @public
|
|
26
38
|
*/
|
|
@@ -93,11 +105,11 @@ export declare interface IPseudolocaleOptions {
|
|
|
93
105
|
* @public
|
|
94
106
|
*/
|
|
95
107
|
export declare interface ITypingsGeneratorOptions extends ITypingsGeneratorBaseOptions {
|
|
96
|
-
exportAsDefault?: boolean;
|
|
108
|
+
exportAsDefault?: boolean | IExportAsDefaultOptions | IInferInterfaceNameExportAsDefaultOptions;
|
|
97
109
|
resxNewlineNormalization?: NewlineKind | undefined;
|
|
98
110
|
ignoreMissingResxComments?: boolean | undefined;
|
|
99
111
|
ignoreString?: IgnoreStringFunction;
|
|
100
|
-
processComment?: (comment: string | undefined,
|
|
112
|
+
processComment?: (comment: string | undefined, relativeFilePath: string, stringName: string) => string | undefined;
|
|
101
113
|
}
|
|
102
114
|
|
|
103
115
|
/**
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import { StringValuesTypingsGenerator, type ITypingsGeneratorBaseOptions } from '@rushstack/typings-generator';
|
|
1
|
+
import { StringValuesTypingsGenerator, type IExportAsDefaultOptions, type ITypingsGeneratorBaseOptions } from '@rushstack/typings-generator';
|
|
2
2
|
import type { NewlineKind } from '@rushstack/node-core-library';
|
|
3
3
|
import type { IgnoreStringFunction } from './interfaces';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface IInferInterfaceNameExportAsDefaultOptions extends Omit<IExportAsDefaultOptions, 'interfaceName'> {
|
|
8
|
+
/**
|
|
9
|
+
* When `exportAsDefault` is true and this option is true, the default export interface name will be inferred
|
|
10
|
+
* from the filename.
|
|
11
|
+
*/
|
|
12
|
+
inferInterfaceNameFromFilename?: boolean;
|
|
13
|
+
}
|
|
4
14
|
/**
|
|
5
15
|
* @public
|
|
6
16
|
*/
|
|
7
17
|
export interface ITypingsGeneratorOptions extends ITypingsGeneratorBaseOptions {
|
|
8
|
-
exportAsDefault?: boolean;
|
|
18
|
+
exportAsDefault?: boolean | IExportAsDefaultOptions | IInferInterfaceNameExportAsDefaultOptions;
|
|
9
19
|
resxNewlineNormalization?: NewlineKind | undefined;
|
|
10
20
|
ignoreMissingResxComments?: boolean | undefined;
|
|
11
21
|
ignoreString?: IgnoreStringFunction;
|
|
12
|
-
processComment?: (comment: string | undefined,
|
|
22
|
+
processComment?: (comment: string | undefined, relativeFilePath: string, stringName: string) => string | undefined;
|
|
13
23
|
}
|
|
14
24
|
/**
|
|
15
25
|
* This is a simple tool that generates .d.ts files for .loc.json, .resx.json, .resjson, and .resx files.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypingsGenerator.d.ts","sourceRoot":"","sources":["../src/TypingsGenerator.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,EAE5B,KAAK,4BAA4B,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAqB,MAAM,cAAc,CAAC;AAG5E;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,4BAA4B;IAC5E,eAAe,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TypingsGenerator.d.ts","sourceRoot":"","sources":["../src/TypingsGenerator.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,EAC5B,KAAK,uBAAuB,EAE5B,KAAK,4BAA4B,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAqB,MAAM,cAAc,CAAC;AAG5E;;GAEG;AACH,MAAM,WAAW,yCACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,eAAe,CAAC;IACtD;;;OAGG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,4BAA4B;IAC5E,eAAe,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAAG,yCAAyC,CAAC;IAEhG,wBAAwB,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAEnD,yBAAyB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEhD,YAAY,CAAC,EAAE,oBAAoB,CAAC;IAEpC,cAAc,CAAC,EAAE,CACf,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,KACf,MAAM,GAAG,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,4BAA4B;gBAC7C,OAAO,EAAE,wBAAwB;CAoErD"}
|
package/lib/TypingsGenerator.js
CHANGED
|
@@ -12,17 +12,20 @@ const LocFileParser_1 = require("./LocFileParser");
|
|
|
12
12
|
*/
|
|
13
13
|
class TypingsGenerator extends typings_generator_1.StringValuesTypingsGenerator {
|
|
14
14
|
constructor(options) {
|
|
15
|
-
const { ignoreString, processComment } = options;
|
|
15
|
+
const { ignoreString, processComment, resxNewlineNormalization, ignoreMissingResxComments, exportAsDefault } = options;
|
|
16
|
+
const inferDefaultExportInterfaceNameFromFilename = typeof exportAsDefault === 'object'
|
|
17
|
+
? exportAsDefault.inferInterfaceNameFromFilename
|
|
18
|
+
: undefined;
|
|
16
19
|
super({
|
|
17
20
|
...options,
|
|
18
21
|
fileExtensions: ['.resx', '.resx.json', '.loc.json', '.resjson'],
|
|
19
|
-
parseAndGenerateTypings: (
|
|
22
|
+
parseAndGenerateTypings: (content, filePath, relativeFilePath) => {
|
|
20
23
|
const locFileData = (0, LocFileParser_1.parseLocFile)({
|
|
21
|
-
filePath
|
|
22
|
-
content
|
|
23
|
-
terminal: this.
|
|
24
|
-
resxNewlineNormalization
|
|
25
|
-
ignoreMissingResxComments
|
|
24
|
+
filePath,
|
|
25
|
+
content,
|
|
26
|
+
terminal: this.terminal,
|
|
27
|
+
resxNewlineNormalization,
|
|
28
|
+
ignoreMissingResxComments,
|
|
26
29
|
ignoreString
|
|
27
30
|
});
|
|
28
31
|
const typings = [];
|
|
@@ -30,14 +33,33 @@ class TypingsGenerator extends typings_generator_1.StringValuesTypingsGenerator
|
|
|
30
33
|
for (const stringName in locFileData) {
|
|
31
34
|
let comment = locFileData[stringName].comment;
|
|
32
35
|
if (processComment) {
|
|
33
|
-
comment = processComment(comment,
|
|
36
|
+
comment = processComment(comment, relativeFilePath, stringName);
|
|
34
37
|
}
|
|
35
38
|
typings.push({
|
|
36
39
|
exportName: stringName,
|
|
37
40
|
comment
|
|
38
41
|
});
|
|
39
42
|
}
|
|
40
|
-
|
|
43
|
+
let exportAsDefaultInterfaceName;
|
|
44
|
+
if (inferDefaultExportInterfaceNameFromFilename) {
|
|
45
|
+
const lastSlashIndex = Math.max(filePath.lastIndexOf('/'), filePath.lastIndexOf('\\'));
|
|
46
|
+
let extensionIndex = filePath.lastIndexOf('.');
|
|
47
|
+
if (filePath.slice(extensionIndex).toLowerCase() === '.json') {
|
|
48
|
+
extensionIndex = filePath.lastIndexOf('.', extensionIndex - 1);
|
|
49
|
+
}
|
|
50
|
+
const fileNameWithoutExtension = filePath.substring(lastSlashIndex + 1, extensionIndex);
|
|
51
|
+
const normalizedFileName = fileNameWithoutExtension.replace(/[^a-zA-Z0-9$_]/g, '');
|
|
52
|
+
const firstCharUpperCased = normalizedFileName.charAt(0).toUpperCase();
|
|
53
|
+
exportAsDefaultInterfaceName = `I${firstCharUpperCased}${normalizedFileName.slice(1)}`;
|
|
54
|
+
if (!exportAsDefaultInterfaceName.endsWith('strings') &&
|
|
55
|
+
!exportAsDefaultInterfaceName.endsWith('Strings')) {
|
|
56
|
+
exportAsDefaultInterfaceName += 'Strings';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
typings,
|
|
61
|
+
exportAsDefaultInterfaceName
|
|
62
|
+
};
|
|
41
63
|
}
|
|
42
64
|
});
|
|
43
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypingsGenerator.js","sourceRoot":"","sources":["../src/TypingsGenerator.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,
|
|
1
|
+
{"version":3,"file":"TypingsGenerator.js","sourceRoot":"","sources":["../src/TypingsGenerator.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,oEAKsC;AAItC,mDAA+C;AAiC/C;;;;GAIG;AACH,MAAa,gBAAiB,SAAQ,gDAA4B;IAChE,YAAmB,OAAiC;QAClD,MAAM,EACJ,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EAChB,GAAG,OAAO,CAAC;QACZ,MAAM,2CAA2C,GAC/C,OAAO,eAAe,KAAK,QAAQ;YACjC,CAAC,CAAE,eAA6D,CAAC,8BAA8B;YAC/F,CAAC,CAAC,SAAS,CAAC;QAChB,KAAK,CAAC;YACJ,GAAG,OAAO;YACV,cAAc,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,CAAC;YAChE,uBAAuB,EAAE,CAAC,OAAe,EAAE,QAAgB,EAAE,gBAAwB,EAAE,EAAE;gBACvF,MAAM,WAAW,GAAsB,IAAA,4BAAY,EAAC;oBAClD,QAAQ;oBACR,OAAO;oBACP,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,wBAAwB;oBACxB,yBAAyB;oBACzB,YAAY;iBACb,CAAC,CAAC;gBAEH,MAAM,OAAO,GAAyB,EAAE,CAAC;gBAEzC,wCAAwC;gBACxC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;oBACrC,IAAI,OAAO,GAAuB,WAAW,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;oBAClE,IAAI,cAAc,EAAE,CAAC;wBACnB,OAAO,GAAG,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;oBAClE,CAAC;oBAED,OAAO,CAAC,IAAI,CAAC;wBACX,UAAU,EAAE,UAAU;wBACtB,OAAO;qBACR,CAAC,CAAC;gBACL,CAAC;gBAED,IAAI,4BAAgD,CAAC;gBACrD,IAAI,2CAA2C,EAAE,CAAC;oBAChD,MAAM,cAAc,GAAW,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;oBAC/F,IAAI,cAAc,GAAW,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;oBACvD,IAAI,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE,CAAC;wBAC7D,cAAc,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;oBACjE,CAAC;oBAED,MAAM,wBAAwB,GAAW,QAAQ,CAAC,SAAS,CAAC,cAAc,GAAG,CAAC,EAAE,cAAc,CAAC,CAAC;oBAChG,MAAM,kBAAkB,GAAW,wBAAwB,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;oBAC3F,MAAM,mBAAmB,GAAW,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;oBAC/E,4BAA4B,GAAG,IAAI,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;oBAEvF,IACE,CAAC,4BAA4B,CAAC,QAAQ,CAAC,SAAS,CAAC;wBACjD,CAAC,4BAA4B,CAAC,QAAQ,CAAC,SAAS,CAAC,EACjD,CAAC;wBACD,4BAA4B,IAAI,SAAS,CAAC;oBAC5C,CAAC;gBACH,CAAC;gBAED,OAAO;oBACL,OAAO;oBACP,4BAA4B;iBAC7B,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF;AArED,4CAqEC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n StringValuesTypingsGenerator,\n type IExportAsDefaultOptions,\n type IStringValueTyping,\n type ITypingsGeneratorBaseOptions\n} from '@rushstack/typings-generator';\nimport type { NewlineKind } from '@rushstack/node-core-library';\n\nimport type { IgnoreStringFunction, ILocalizationFile } from './interfaces';\nimport { parseLocFile } from './LocFileParser';\n\n/**\n * @public\n */\nexport interface IInferInterfaceNameExportAsDefaultOptions\n extends Omit<IExportAsDefaultOptions, 'interfaceName'> {\n /**\n * When `exportAsDefault` is true and this option is true, the default export interface name will be inferred\n * from the filename.\n */\n inferInterfaceNameFromFilename?: boolean;\n}\n\n/**\n * @public\n */\nexport interface ITypingsGeneratorOptions extends ITypingsGeneratorBaseOptions {\n exportAsDefault?: boolean | IExportAsDefaultOptions | IInferInterfaceNameExportAsDefaultOptions;\n\n resxNewlineNormalization?: NewlineKind | undefined;\n\n ignoreMissingResxComments?: boolean | undefined;\n\n ignoreString?: IgnoreStringFunction;\n\n processComment?: (\n comment: string | undefined,\n relativeFilePath: string,\n stringName: string\n ) => string | undefined;\n}\n\n/**\n * This is a simple tool that generates .d.ts files for .loc.json, .resx.json, .resjson, and .resx files.\n *\n * @public\n */\nexport class TypingsGenerator extends StringValuesTypingsGenerator {\n public constructor(options: ITypingsGeneratorOptions) {\n const {\n ignoreString,\n processComment,\n resxNewlineNormalization,\n ignoreMissingResxComments,\n exportAsDefault\n } = options;\n const inferDefaultExportInterfaceNameFromFilename: boolean | undefined =\n typeof exportAsDefault === 'object'\n ? (exportAsDefault as IInferInterfaceNameExportAsDefaultOptions).inferInterfaceNameFromFilename\n : undefined;\n super({\n ...options,\n fileExtensions: ['.resx', '.resx.json', '.loc.json', '.resjson'],\n parseAndGenerateTypings: (content: string, filePath: string, relativeFilePath: string) => {\n const locFileData: ILocalizationFile = parseLocFile({\n filePath,\n content,\n terminal: this.terminal,\n resxNewlineNormalization,\n ignoreMissingResxComments,\n ignoreString\n });\n\n const typings: IStringValueTyping[] = [];\n\n // eslint-disable-next-line guard-for-in\n for (const stringName in locFileData) {\n let comment: string | undefined = locFileData[stringName].comment;\n if (processComment) {\n comment = processComment(comment, relativeFilePath, stringName);\n }\n\n typings.push({\n exportName: stringName,\n comment\n });\n }\n\n let exportAsDefaultInterfaceName: string | undefined;\n if (inferDefaultExportInterfaceNameFromFilename) {\n const lastSlashIndex: number = Math.max(filePath.lastIndexOf('/'), filePath.lastIndexOf('\\\\'));\n let extensionIndex: number = filePath.lastIndexOf('.');\n if (filePath.slice(extensionIndex).toLowerCase() === '.json') {\n extensionIndex = filePath.lastIndexOf('.', extensionIndex - 1);\n }\n\n const fileNameWithoutExtension: string = filePath.substring(lastSlashIndex + 1, extensionIndex);\n const normalizedFileName: string = fileNameWithoutExtension.replace(/[^a-zA-Z0-9$_]/g, '');\n const firstCharUpperCased: string = normalizedFileName.charAt(0).toUpperCase();\n exportAsDefaultInterfaceName = `I${firstCharUpperCased}${normalizedFileName.slice(1)}`;\n\n if (\n !exportAsDefaultInterfaceName.endsWith('strings') &&\n !exportAsDefaultInterfaceName.endsWith('Strings')\n ) {\n exportAsDefaultInterfaceName += 'Strings';\n }\n }\n\n return {\n typings,\n exportAsDefaultInterfaceName\n };\n }\n });\n }\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export { parseLocJson } from './parsers/parseLocJson';
|
|
|
8
8
|
export { parseResJson } from './parsers/parseResJson';
|
|
9
9
|
export { parseResx, type IParseResxOptions, type IParseResxOptionsBase } from './parsers/parseResx';
|
|
10
10
|
export { parseLocFile, type IParseLocFileOptions, type ParserKind } from './LocFileParser';
|
|
11
|
-
export { type ITypingsGeneratorOptions, TypingsGenerator } from './TypingsGenerator';
|
|
11
|
+
export { type ITypingsGeneratorOptions, type IInferInterfaceNameExportAsDefaultOptions, TypingsGenerator } from './TypingsGenerator';
|
|
12
12
|
export { getPseudolocalizer } from './Pseudolocalization';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,KAAK,oBAAoB,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,KAAK,oBAAoB,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,yCAAyC,EAC9C,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAe3D,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,iDAAoG;AAA3F,sGAAA,SAAS,OAAA;AAClB,iDAA2F;AAAlF,6GAAA,YAAY,OAAA;AACrB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAe3D,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,iDAAoG;AAA3F,sGAAA,SAAS,OAAA;AAClB,iDAA2F;AAAlF,6GAAA,YAAY,OAAA;AACrB,uDAI4B;AAD1B,oHAAA,gBAAgB,OAAA;AAElB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * Some utilities for working with Rush Stack localization files.\n *\n * @packageDocumentation\n */\n\nexport type {\n ILocalizationFile,\n ILocalizedString,\n IPseudolocaleOptions,\n IParseFileOptions,\n IgnoreStringFunction\n} from './interfaces';\nexport { parseLocJson } from './parsers/parseLocJson';\nexport { parseResJson } from './parsers/parseResJson';\nexport { parseResx, type IParseResxOptions, type IParseResxOptionsBase } from './parsers/parseResx';\nexport { parseLocFile, type IParseLocFileOptions, type ParserKind } from './LocFileParser';\nexport {\n type ITypingsGeneratorOptions,\n type IInferInterfaceNameExportAsDefaultOptions,\n TypingsGenerator\n} from './TypingsGenerator';\nexport { getPseudolocalizer } from './Pseudolocalization';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/localization-utilities",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "This plugin contains some useful functions for localization.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "dist/localization-utilities.d.ts",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"pseudolocale": "~1.1.0",
|
|
15
15
|
"xmldoc": "~1.1.2",
|
|
16
|
-
"@rushstack/node-core-library": "5.
|
|
17
|
-
"@rushstack/terminal": "0.
|
|
18
|
-
"@rushstack/typings-generator": "0.
|
|
16
|
+
"@rushstack/node-core-library": "5.7.0",
|
|
17
|
+
"@rushstack/terminal": "0.14.0",
|
|
18
|
+
"@rushstack/typings-generator": "0.13.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/xmldoc": "1.1.4",
|
|
22
|
-
"@rushstack/heft": "0.
|
|
22
|
+
"@rushstack/heft": "0.67.0",
|
|
23
23
|
"local-node-rig": "1.0.0"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|