@twin.org/merge-locales 0.0.1-next.13 → 0.0.1-next.15

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.
@@ -145,6 +145,15 @@ async function findDependencies(npmRoot, packageJsonPath, packageNames) {
145
145
  }
146
146
  }
147
147
  }
148
+ if (core.Is.objectValue(packageJson?.peerDependencies)) {
149
+ for (const pkg in packageJson.peerDependencies) {
150
+ if (pkg.startsWith("@twin.org") && !packageNames.includes(pkg)) {
151
+ packageNames.push(pkg);
152
+ const packagePath = path.join(npmRoot, pkg, "package.json");
153
+ await findDependencies(npmRoot, packagePath, packageNames);
154
+ }
155
+ }
156
+ }
148
157
  return packageJson ?? {};
149
158
  }
150
159
 
@@ -166,7 +175,7 @@ class CLI extends cliCore.CLIBase {
166
175
  return this.execute({
167
176
  title: "TWIN Merge Locales",
168
177
  appName: "merge-locales",
169
- version: "0.0.1-next.13",
178
+ version: "0.0.1-next.15",
170
179
  icon: "⚙️ ",
171
180
  supportsEnvFiles: false,
172
181
  overrideOutputWidth: options?.overrideOutputWidth
@@ -142,6 +142,15 @@ async function findDependencies(npmRoot, packageJsonPath, packageNames) {
142
142
  }
143
143
  }
144
144
  }
145
+ if (Is.objectValue(packageJson?.peerDependencies)) {
146
+ for (const pkg in packageJson.peerDependencies) {
147
+ if (pkg.startsWith("@twin.org") && !packageNames.includes(pkg)) {
148
+ packageNames.push(pkg);
149
+ const packagePath = path.join(npmRoot, pkg, "package.json");
150
+ await findDependencies(npmRoot, packagePath, packageNames);
151
+ }
152
+ }
153
+ }
145
154
  return packageJson ?? {};
146
155
  }
147
156
 
@@ -163,7 +172,7 @@ class CLI extends CLIBase {
163
172
  return this.execute({
164
173
  title: "TWIN Merge Locales",
165
174
  appName: "merge-locales",
166
- version: "0.0.1-next.13",
175
+ version: "0.0.1-next.15",
167
176
  icon: "⚙️ ",
168
177
  supportsEnvFiles: false,
169
178
  overrideOutputWidth: options?.overrideOutputWidth
@@ -12,4 +12,10 @@ export interface IPackageJson {
12
12
  dependencies?: {
13
13
  [id: string]: string;
14
14
  };
15
+ /**
16
+ * The peer dependencies for the package.
17
+ */
18
+ peerDependencies?: {
19
+ [id: string]: string;
20
+ };
15
21
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/ts-to-openapi - Changelog
2
2
 
3
- ## v0.0.1-next.13
3
+ ## v0.0.1-next.15
4
4
 
5
5
  - Initial Release
@@ -30,19 +30,25 @@ Run the app.
30
30
 
31
31
  #### Parameters
32
32
 
33
- **argv**: `string`[]
33
+ ##### argv
34
+
35
+ `string`[]
34
36
 
35
37
  The process arguments.
36
38
 
37
- **localesDirectory?**: `string`
39
+ ##### localesDirectory?
40
+
41
+ `string`
38
42
 
39
43
  The directory for the locales, default to relative to the script.
40
44
 
41
- **options?**
45
+ ##### options?
42
46
 
43
47
  Additional options.
44
48
 
45
- **options.overrideOutputWidth?**: `number`
49
+ ###### overrideOutputWidth
50
+
51
+ `number`
46
52
 
47
53
  Override the output width.
48
54
 
@@ -62,7 +68,9 @@ Configure any options or actions at the root program level.
62
68
 
63
69
  #### Parameters
64
70
 
65
- **program**: `Command`
71
+ ##### program
72
+
73
+ `Command`
66
74
 
67
75
  The root program command.
68
76
 
@@ -6,11 +6,13 @@ Action the root command.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **opts**
9
+ ### opts
10
10
 
11
11
  The options for the command.
12
12
 
13
- **opts.config?**: `string`
13
+ #### config
14
+
15
+ `string`
14
16
 
15
17
  The optional configuration file.
16
18
 
@@ -6,7 +6,9 @@ Build the root command to be consumed by the CLI.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **program**: `Command`
9
+ ### program
10
+
11
+ `Command`
10
12
 
11
13
  The command to build on.
12
14
 
@@ -6,11 +6,15 @@ Merge the locales.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **workingDirectory**: `string`
9
+ ### workingDirectory
10
+
11
+ `string`
10
12
 
11
13
  The folder the app was run from.
12
14
 
13
- **config**: [`IMergeLocalesConfig`](../interfaces/IMergeLocalesConfig.md)
15
+ ### config
16
+
17
+ [`IMergeLocalesConfig`](../interfaces/IMergeLocalesConfig.md)
14
18
 
15
19
  The configuration for the app.
16
20
 
package/locales/en.json CHANGED
@@ -35,6 +35,12 @@
35
35
  "progress": {
36
36
  "done": "Done.",
37
37
  "error": "Error"
38
+ },
39
+ "options": {
40
+ "lang": {
41
+ "param": "--lang '<'lang'>'",
42
+ "description": "The language to display the output in."
43
+ }
38
44
  }
39
45
  }
40
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/merge-locales",
3
- "version": "0.0.1-next.13",
3
+ "version": "0.0.1-next.15",
4
4
  "description": "Tool to merge locale files from all dependencies",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,8 +16,8 @@
16
16
  "dependencies": {
17
17
  "@twin.org/cli-core": "next",
18
18
  "@twin.org/core": "next",
19
- "@twin.org/nameof": "0.0.1-next.13",
20
- "commander": "12.1.0",
19
+ "@twin.org/nameof": "0.0.1-next.15",
20
+ "commander": "13.0.0",
21
21
  "glob": "11.0.0"
22
22
  },
23
23
  "main": "./dist/cjs/index.cjs",