@twin.org/ts-to-schema 0.0.1-next.4 → 0.0.1-next.7
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/dist/cjs/index.cjs +7 -4
- 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 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -227,16 +227,19 @@ class CLI extends cliCore.CLIBase {
|
|
|
227
227
|
* Run the app.
|
|
228
228
|
* @param argv The process arguments.
|
|
229
229
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
230
|
+
* @param options Additional options.
|
|
231
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
230
232
|
* @returns The exit code.
|
|
231
233
|
*/
|
|
232
|
-
async run(argv, localesDirectory) {
|
|
234
|
+
async run(argv, localesDirectory, options) {
|
|
233
235
|
return this.execute({
|
|
234
236
|
title: "TWIN TypeScript To Schema",
|
|
235
237
|
appName: "ts-to-schema",
|
|
236
|
-
version: "0.0.1-next.
|
|
238
|
+
version: "0.0.1-next.7",
|
|
237
239
|
icon: "⚙️ ",
|
|
238
|
-
supportsEnvFiles: false
|
|
239
|
-
|
|
240
|
+
supportsEnvFiles: false,
|
|
241
|
+
overrideOutputWidth: options?.overrideOutputWidth
|
|
242
|
+
}, localesDirectory ?? path.join(path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))), "../locales"), argv);
|
|
240
243
|
}
|
|
241
244
|
/**
|
|
242
245
|
* Configure any options or actions at the root program level.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -224,15 +224,18 @@ class CLI extends CLIBase {
|
|
|
224
224
|
* Run the app.
|
|
225
225
|
* @param argv The process arguments.
|
|
226
226
|
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
227
|
+
* @param options Additional options.
|
|
228
|
+
* @param options.overrideOutputWidth Override the output width.
|
|
227
229
|
* @returns The exit code.
|
|
228
230
|
*/
|
|
229
|
-
async run(argv, localesDirectory) {
|
|
231
|
+
async run(argv, localesDirectory, options) {
|
|
230
232
|
return this.execute({
|
|
231
233
|
title: "TWIN TypeScript To Schema",
|
|
232
234
|
appName: "ts-to-schema",
|
|
233
|
-
version: "0.0.1-next.
|
|
235
|
+
version: "0.0.1-next.7",
|
|
234
236
|
icon: "⚙️ ",
|
|
235
|
-
supportsEnvFiles: false
|
|
237
|
+
supportsEnvFiles: false,
|
|
238
|
+
overrideOutputWidth: options?.overrideOutputWidth
|
|
236
239
|
}, localesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), "../locales"), argv);
|
|
237
240
|
}
|
|
238
241
|
/**
|
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/ts-to-schema",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.7",
|
|
4
4
|
"description": "Tool to convert TypeScript definitions to JSON schemas",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/cli-core": "next",
|
|
18
18
|
"@twin.org/core": "next",
|
|
19
|
-
"@twin.org/nameof": "0.0.1-next.
|
|
19
|
+
"@twin.org/nameof": "0.0.1-next.7",
|
|
20
20
|
"commander": "12.1.0",
|
|
21
21
|
"glob": "11.0.0",
|
|
22
22
|
"jsonschema": "1.4.1",
|