@twin.org/merge-locales 0.0.1-next.3 → 0.0.1-next.6
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/bin/index.js +0 -0
- package/dist/cjs/index.cjs +6 -3
- package/dist/esm/index.mjs +6 -3
- package/dist/types/cli.d.ts +5 -1
- package/docs/changelog.md +1 -1
- package/docs/reference/classes/CLI.md +9 -1
- package/package.json +2 -30
package/bin/index.js
CHANGED
|
File without changes
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -157,15 +157,18 @@ class CLI extends cliCore.CLIBase {
|
|
|
157
157
|
* Run the app.
|
|
158
158
|
* @param argv The process arguments.
|
|
159
159
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
160
|
+
* @param options Additional options.
|
|
161
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
160
162
|
* @returns The exit code.
|
|
161
163
|
*/
|
|
162
|
-
async run(argv, localesDirectory) {
|
|
164
|
+
async run(argv, localesDirectory, options) {
|
|
163
165
|
return this.execute({
|
|
164
166
|
title: "TWIN Merge Locales",
|
|
165
167
|
appName: "merge-locales",
|
|
166
|
-
version: "0.0.1-next.
|
|
168
|
+
version: "0.0.1-next.6",
|
|
167
169
|
icon: "⚙️ ",
|
|
168
|
-
supportsEnvFiles: false
|
|
170
|
+
supportsEnvFiles: false,
|
|
171
|
+
overrideOutputWidth: options?.overrideOutputWidth
|
|
169
172
|
}, localesDirectory ?? path.join(path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))), "../locales"), argv);
|
|
170
173
|
}
|
|
171
174
|
/**
|
package/dist/esm/index.mjs
CHANGED
|
@@ -154,15 +154,18 @@ class CLI extends CLIBase {
|
|
|
154
154
|
* Run the app.
|
|
155
155
|
* @param argv The process arguments.
|
|
156
156
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
157
|
+
* @param options Additional options.
|
|
158
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
157
159
|
* @returns The exit code.
|
|
158
160
|
*/
|
|
159
|
-
async run(argv, localesDirectory) {
|
|
161
|
+
async run(argv, localesDirectory, options) {
|
|
160
162
|
return this.execute({
|
|
161
163
|
title: "TWIN Merge Locales",
|
|
162
164
|
appName: "merge-locales",
|
|
163
|
-
version: "0.0.1-next.
|
|
165
|
+
version: "0.0.1-next.6",
|
|
164
166
|
icon: "⚙️ ",
|
|
165
|
-
supportsEnvFiles: false
|
|
167
|
+
supportsEnvFiles: false,
|
|
168
|
+
overrideOutputWidth: options?.overrideOutputWidth
|
|
166
169
|
}, localesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), "../locales"), argv);
|
|
167
170
|
}
|
|
168
171
|
/**
|
package/dist/types/cli.d.ts
CHANGED
|
@@ -8,9 +8,13 @@ export declare class CLI extends CLIBase {
|
|
|
8
8
|
* Run the app.
|
|
9
9
|
* @param argv The process arguments.
|
|
10
10
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
11
|
+
* @param options Additional options.
|
|
12
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
11
13
|
* @returns The exit code.
|
|
12
14
|
*/
|
|
13
|
-
run(argv: string[], localesDirectory?: string
|
|
15
|
+
run(argv: string[], localesDirectory?: string, options?: {
|
|
16
|
+
overrideOutputWidth?: number;
|
|
17
|
+
}): Promise<number>;
|
|
14
18
|
/**
|
|
15
19
|
* Configure any options or actions at the root program level.
|
|
16
20
|
* @param program The root program command.
|
package/docs/changelog.md
CHANGED
|
@@ -24,7 +24,7 @@ The main entry point for the CLI.
|
|
|
24
24
|
|
|
25
25
|
### run()
|
|
26
26
|
|
|
27
|
-
> **run**(`argv`, `localesDirectory`?): `Promise`\<`number`\>
|
|
27
|
+
> **run**(`argv`, `localesDirectory`?, `options`?): `Promise`\<`number`\>
|
|
28
28
|
|
|
29
29
|
Run the app.
|
|
30
30
|
|
|
@@ -38,6 +38,14 @@ The process arguments.
|
|
|
38
38
|
|
|
39
39
|
The directory for the locales, default to relative to the script.
|
|
40
40
|
|
|
41
|
+
• **options?**
|
|
42
|
+
|
|
43
|
+
Additional options.
|
|
44
|
+
|
|
45
|
+
• **options.overrideOutputWidth?**: `number`
|
|
46
|
+
|
|
47
|
+
Override the output width.
|
|
48
|
+
|
|
41
49
|
#### Returns
|
|
42
50
|
|
|
43
51
|
`Promise`\<`number`\>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/merge-locales",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.6",
|
|
4
4
|
"description": "Tool to merge locale files from all dependencies",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,41 +13,13 @@
|
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"clean": "rimraf dist coverage",
|
|
18
|
-
"build": "tspc",
|
|
19
|
-
"merge-locales": "copyfiles locales/en.json dist && npm run bundle:esm && node bin/index.js",
|
|
20
|
-
"test": "vitest --run --config ./vitest.config.ts --no-cache",
|
|
21
|
-
"coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
|
|
22
|
-
"bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
|
|
23
|
-
"bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
|
|
24
|
-
"bundle": "npm run bundle:esm && npm run bundle:cjs",
|
|
25
|
-
"docs:clean": "rimraf docs/reference",
|
|
26
|
-
"docs:generate": "typedoc",
|
|
27
|
-
"docs": "npm run docs:clean && npm run docs:generate",
|
|
28
|
-
"dist": "npm run clean && npm run build && npm run merge-locales && npm run test && npm run bundle && npm run docs"
|
|
29
|
-
},
|
|
30
16
|
"dependencies": {
|
|
31
17
|
"@twin.org/cli-core": "next",
|
|
32
18
|
"@twin.org/core": "next",
|
|
33
|
-
"@twin.org/nameof": "0.0.1-next.
|
|
19
|
+
"@twin.org/nameof": "0.0.1-next.6",
|
|
34
20
|
"commander": "12.1.0",
|
|
35
21
|
"glob": "11.0.0"
|
|
36
22
|
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@twin.org/nameof-transformer": "0.0.1-next.3",
|
|
39
|
-
"@types/node": "22.5.5",
|
|
40
|
-
"@vitest/coverage-v8": "2.1.1",
|
|
41
|
-
"copyfiles": "2.4.1",
|
|
42
|
-
"rimraf": "6.0.1",
|
|
43
|
-
"rollup": "4.21.3",
|
|
44
|
-
"rollup-plugin-typescript2": "0.36.0",
|
|
45
|
-
"ts-patch": "3.2.1",
|
|
46
|
-
"typedoc": "0.26.7",
|
|
47
|
-
"typedoc-plugin-markdown": "4.2.7",
|
|
48
|
-
"typescript": "5.6.2",
|
|
49
|
-
"vitest": "2.1.1"
|
|
50
|
-
},
|
|
51
23
|
"main": "./dist/cjs/index.cjs",
|
|
52
24
|
"module": "./dist/esm/index.mjs",
|
|
53
25
|
"types": "./dist/types/index.d.ts",
|