@twin.org/validate-locales 0.0.3-next.9 → 0.0.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.
@@ -22,7 +22,71 @@ The main entry point for the CLI.
22
22
 
23
23
  ## Methods
24
24
 
25
- ### run()
25
+ ### execute() {#execute}
26
+
27
+ > **execute**(`options`, `localesDirectory`, `argv`): `Promise`\<`number`\>
28
+
29
+ Execute the command line processing.
30
+
31
+ #### Parameters
32
+
33
+ ##### options
34
+
35
+ `ICliOptions`
36
+
37
+ The options for the CLI.
38
+
39
+ ##### localesDirectory
40
+
41
+ `string`
42
+
43
+ The path to load the locales from.
44
+
45
+ ##### argv
46
+
47
+ `string`[]
48
+
49
+ The process arguments.
50
+
51
+ #### Returns
52
+
53
+ `Promise`\<`number`\>
54
+
55
+ The exit code.
56
+
57
+ #### Inherited from
58
+
59
+ `CLIBase.execute`
60
+
61
+ ***
62
+
63
+ ### getCommands() {#getcommands}
64
+
65
+ > `protected` **getCommands**(`program`): `Command`[]
66
+
67
+ Get the commands for the CLI, override in derived class to supply your own.
68
+
69
+ #### Parameters
70
+
71
+ ##### program
72
+
73
+ `Command`
74
+
75
+ The main program that the commands will be added to.
76
+
77
+ #### Returns
78
+
79
+ `Command`[]
80
+
81
+ The commands for the CLI.
82
+
83
+ #### Inherited from
84
+
85
+ `CLIBase.getCommands`
86
+
87
+ ***
88
+
89
+ ### run() {#run}
26
90
 
27
91
  > **run**(`argv`, `localesDirectory?`, `options?`): `Promise`\<`number`\>
28
92
 
@@ -60,7 +124,7 @@ The exit code.
60
124
 
61
125
  ***
62
126
 
63
- ### configureRoot()
127
+ ### configureRoot() {#configureroot}
64
128
 
65
129
  > `protected` **configureRoot**(`program`): `void`
66
130
 
package/docs/usage.md ADDED
@@ -0,0 +1,35 @@
1
+ # Validate Locales Usage
2
+
3
+ Use this page to confirm validation options before scanning source files.
4
+
5
+ ## Running
6
+
7
+ To install and run the CLI locally use the following commands:
8
+
9
+ ```shell
10
+ npm install @twin.org/validate-locales -g
11
+ validate-locales
12
+ ```
13
+
14
+ or run directly using NPX:
15
+
16
+ ```shell
17
+ npx "@twin.org/validate-locales"
18
+ ```
19
+
20
+ ## Help
21
+
22
+ ```shell
23
+ validate-locales --help
24
+
25
+ Usage: validate-locales [options]
26
+
27
+ Options:
28
+ --cwd <path> Current working directory to scan. (default: ".")
29
+ --source-glob <glob> Glob for source files to validate.
30
+ --locale-file <path> Locale dictionary file to validate against.
31
+ --ignore-key-pattern <pattern> Regex pattern for keys to ignore.
32
+ --report-unused Include unused locale keys in the report.
33
+ --lang <lang> The language to display the output in. (default: "en")
34
+ -h, --help display help for command
35
+ ```
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/validate-locales",
3
- "version": "0.0.3-next.9",
4
- "description": "Tool to validate source files against the locales",
3
+ "version": "0.0.3",
4
+ "description": "Validate source files against the locales",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/framework.git",
7
+ "url": "git+https://github.com/iotaledger/framework.git",
8
8
  "directory": "apps/validate-locales"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -14,13 +14,13 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/cli-core": "0.0.3-next.9",
18
- "@twin.org/core": "0.0.3-next.9",
19
- "@twin.org/nameof": "0.0.3-next.9",
20
- "@twin.org/nameof-transformer": "0.0.3-next.9",
21
- "commander": "14.0.2",
22
- "glob": "11.0.3",
23
- "typescript": "5.9.3"
17
+ "@twin.org/cli-core": "^0.0.3",
18
+ "@twin.org/core": "^0.0.3",
19
+ "@twin.org/nameof": "^0.0.3",
20
+ "@twin.org/nameof-transformer": "^0.0.3",
21
+ "commander": "14.0.3",
22
+ "glob": "13.0.6",
23
+ "typescript": "6.0.3"
24
24
  },
25
25
  "main": "./dist/es/index.js",
26
26
  "types": "./dist/types/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "test": "tests"
48
48
  },
49
49
  "bugs": {
50
- "url": "git+https://github.com/twinfoundation/framework/issues"
50
+ "url": "git+https://github.com/iotaledger/framework/issues"
51
51
  },
52
52
  "homepage": "https://twindev.org",
53
53
  "keywords": [
package/docs/examples.md DELETED
@@ -1,15 +0,0 @@
1
- # @twin.org/validate-locales - Examples
2
-
3
- ## Command Line Tool
4
-
5
- First install the tool with the following script.
6
-
7
- ```shell
8
- npm install @twin.org/validate-locales
9
- ```
10
-
11
- You can then run the tool from the command line e.g.
12
-
13
- ```shell
14
- validate-locales
15
- ```