@twin.org/ts-to-schema 0.0.1-next.9 → 0.0.1

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/docs/changelog.md CHANGED
@@ -1,5 +1,204 @@
1
1
  # @twin.org/ts-to-schema - Changelog
2
2
 
3
- ## v0.0.1-next.9
3
+ ## 0.0.1 (2025-07-03)
4
+
5
+
6
+ ### Features
7
+
8
+ * release to production ([ad24b7e](https://github.com/twinfoundation/tools/commit/ad24b7eb16784165b6c93b5c48788199f0e17526))
9
+
10
+ ## [0.0.1-next.29](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.28...ts-to-schema-v0.0.1-next.29) (2025-07-02)
11
+
12
+
13
+ ### Features
14
+
15
+ * move package to framework repo ([4490bda](https://github.com/twinfoundation/tools/commit/4490bda472d4dc8ddfe931e2fce81f3411de9ab3))
16
+
17
+ ## [0.0.1-next.28](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.27...ts-to-schema-v0.0.1-next.28) (2025-06-18)
18
+
19
+
20
+ ### Features
21
+
22
+ * improve schema type name normalisation ([1a18b26](https://github.com/twinfoundation/tools/commit/1a18b267d87e9179bda01b396b256c450ae2889e))
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/nameof bumped from 0.0.1-next.27 to 0.0.1-next.28
30
+ * devDependencies
31
+ * @twin.org/merge-locales bumped from 0.0.1-next.27 to 0.0.1-next.28
32
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.27 to 0.0.1-next.28
33
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.27 to 0.0.1-next.28
34
+
35
+ ## [0.0.1-next.27](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.26...ts-to-schema-v0.0.1-next.27) (2025-06-17)
36
+
37
+
38
+ ### Miscellaneous Chores
39
+
40
+ * **ts-to-schema:** Synchronize repo versions
41
+
42
+
43
+ ### Dependencies
44
+
45
+ * The following workspace dependencies were updated
46
+ * dependencies
47
+ * @twin.org/nameof bumped from 0.0.1-next.26 to 0.0.1-next.27
48
+ * devDependencies
49
+ * @twin.org/merge-locales bumped from 0.0.1-next.26 to 0.0.1-next.27
50
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.26 to 0.0.1-next.27
51
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.26 to 0.0.1-next.27
52
+
53
+ ## [0.0.1-next.26](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.25...ts-to-schema-v0.0.1-next.26) (2025-06-11)
54
+
55
+
56
+ ### Features
57
+
58
+ * use most recent JSON schema specs ([4598cbf](https://github.com/twinfoundation/tools/commit/4598cbf29f7b82dba4a9f3b19f81dfe66f5a6060))
59
+
60
+
61
+ ### Dependencies
62
+
63
+ * The following workspace dependencies were updated
64
+ * dependencies
65
+ * @twin.org/nameof bumped from 0.0.1-next.25 to 0.0.1-next.26
66
+ * devDependencies
67
+ * @twin.org/merge-locales bumped from 0.0.1-next.25 to 0.0.1-next.26
68
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.25 to 0.0.1-next.26
69
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.25 to 0.0.1-next.26
70
+
71
+ ## [0.0.1-next.25](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.24...ts-to-schema-v0.0.1-next.25) (2025-06-10)
72
+
73
+
74
+ ### Features
75
+
76
+ * add ts-to-schema overrides ([3c54504](https://github.com/twinfoundation/tools/commit/3c5450468eb998204a75576b7791a7ca4027da62))
77
+
78
+
79
+ ### Dependencies
80
+
81
+ * The following workspace dependencies were updated
82
+ * dependencies
83
+ * @twin.org/nameof bumped from 0.0.1-next.24 to 0.0.1-next.25
84
+ * devDependencies
85
+ * @twin.org/merge-locales bumped from 0.0.1-next.24 to 0.0.1-next.25
86
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.24 to 0.0.1-next.25
87
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.24 to 0.0.1-next.25
88
+
89
+ ## [0.0.1-next.24](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.23...ts-to-schema-v0.0.1-next.24) (2025-06-05)
90
+
91
+
92
+ ### Miscellaneous Chores
93
+
94
+ * **ts-to-schema:** Synchronize repo versions
95
+
96
+
97
+ ### Dependencies
98
+
99
+ * The following workspace dependencies were updated
100
+ * dependencies
101
+ * @twin.org/nameof bumped from 0.0.1-next.23 to 0.0.1-next.24
102
+ * devDependencies
103
+ * @twin.org/merge-locales bumped from 0.0.1-next.23 to 0.0.1-next.24
104
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.23 to 0.0.1-next.24
105
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.23 to 0.0.1-next.24
106
+
107
+ ## [0.0.1-next.23](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.22...ts-to-schema-v0.0.1-next.23) (2025-06-03)
108
+
109
+
110
+ ### Miscellaneous Chores
111
+
112
+ * **ts-to-schema:** Synchronize repo versions
113
+
114
+
115
+ ### Dependencies
116
+
117
+ * The following workspace dependencies were updated
118
+ * dependencies
119
+ * @twin.org/nameof bumped from 0.0.1-next.22 to 0.0.1-next.23
120
+ * devDependencies
121
+ * @twin.org/merge-locales bumped from 0.0.1-next.22 to 0.0.1-next.23
122
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.22 to 0.0.1-next.23
123
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.22 to 0.0.1-next.23
124
+
125
+ ## [0.0.1-next.22](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.21...ts-to-schema-v0.0.1-next.22) (2025-06-03)
126
+
127
+
128
+ ### Features
129
+
130
+ * generate schemas as individual entities ([9f372ab](https://github.com/twinfoundation/tools/commit/9f372abdfc27aba93b303c7b214991919c0c18c3))
131
+
132
+
133
+ ### Bug Fixes
134
+
135
+ * remove debugging ([4def3d1](https://github.com/twinfoundation/tools/commit/4def3d1ef6a41a3b3358f864214e6a7ec3f9c638))
136
+
137
+
138
+ ### Dependencies
139
+
140
+ * The following workspace dependencies were updated
141
+ * dependencies
142
+ * @twin.org/nameof bumped from 0.0.1-next.21 to 0.0.1-next.22
143
+ * devDependencies
144
+ * @twin.org/merge-locales bumped from 0.0.1-next.21 to 0.0.1-next.22
145
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.21 to 0.0.1-next.22
146
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.21 to 0.0.1-next.22
147
+
148
+ ## [0.0.1-next.21](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.20...ts-to-schema-v0.0.1-next.21) (2025-04-17)
149
+
150
+
151
+ ### Features
152
+
153
+ * use shared store mechanism ([#31](https://github.com/twinfoundation/tools/issues/31)) ([d9fe68b](https://github.com/twinfoundation/tools/commit/d9fe68b903d1268c7cb3c64772df5cb78fd63667))
154
+
155
+
156
+ ### Dependencies
157
+
158
+ * The following workspace dependencies were updated
159
+ * dependencies
160
+ * @twin.org/nameof bumped from 0.0.1-next.20 to 0.0.1-next.21
161
+ * devDependencies
162
+ * @twin.org/merge-locales bumped from 0.0.1-next.20 to 0.0.1-next.21
163
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.20 to 0.0.1-next.21
164
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.20 to 0.0.1-next.21
165
+
166
+ ## [0.0.1-next.20](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.19...ts-to-schema-v0.0.1-next.20) (2025-03-28)
167
+
168
+
169
+ ### Miscellaneous Chores
170
+
171
+ * **ts-to-schema:** Synchronize repo versions
172
+
173
+
174
+ ### Dependencies
175
+
176
+ * The following workspace dependencies were updated
177
+ * dependencies
178
+ * @twin.org/nameof bumped from 0.0.1-next.19 to 0.0.1-next.20
179
+ * devDependencies
180
+ * @twin.org/merge-locales bumped from 0.0.1-next.19 to 0.0.1-next.20
181
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.19 to 0.0.1-next.20
182
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.19 to 0.0.1-next.20
183
+
184
+ ## [0.0.1-next.19](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.1-next.18...ts-to-schema-v0.0.1-next.19) (2025-03-26)
185
+
186
+
187
+ ### Miscellaneous Chores
188
+
189
+ * **ts-to-schema:** Synchronize repo versions
190
+
191
+
192
+ ### Dependencies
193
+
194
+ * The following workspace dependencies were updated
195
+ * dependencies
196
+ * @twin.org/nameof bumped from 0.0.1-next.18 to 0.0.1-next.19
197
+ * devDependencies
198
+ * @twin.org/merge-locales bumped from 0.0.1-next.18 to 0.0.1-next.19
199
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.18 to 0.0.1-next.19
200
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.18 to 0.0.1-next.19
201
+
202
+ ## v0.0.1-next.18
4
203
 
5
204
  - Initial Release
@@ -8,13 +8,13 @@ The main entry point for the CLI.
8
8
 
9
9
  ## Constructors
10
10
 
11
- ### new CLI()
11
+ ### Constructor
12
12
 
13
- > **new CLI**(): [`CLI`](CLI.md)
13
+ > **new CLI**(): `CLI`
14
14
 
15
15
  #### Returns
16
16
 
17
- [`CLI`](CLI.md)
17
+ `CLI`
18
18
 
19
19
  #### Inherited from
20
20
 
@@ -24,25 +24,31 @@ The main entry point for the CLI.
24
24
 
25
25
  ### run()
26
26
 
27
- > **run**(`argv`, `localesDirectory`?, `options`?): `Promise`\<`number`\>
27
+ > **run**(`argv`, `localesDirectory?`, `options?`): `Promise`\<`number`\>
28
28
 
29
29
  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,15 +6,21 @@ Action the root command.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **configFile**: `string`
9
+ ### configFile
10
+
11
+ `string`
10
12
 
11
13
  The optional configuration file.
12
14
 
13
- **outputFolder**: `string`
15
+ ### outputFolder
16
+
17
+ `string`
14
18
 
15
19
  The output folder for the schemas.
16
20
 
17
- **opts**: `unknown`
21
+ ### opts
22
+
23
+ `unknown`
18
24
 
19
25
  The options for the command.
20
26
 
@@ -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,15 +6,21 @@ Convert the TypeScript definitions to JSON Schemas.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **config**: [`ITsToSchemaConfig`](../interfaces/ITsToSchemaConfig.md)
9
+ ### config
10
+
11
+ [`ITsToSchemaConfig`](../interfaces/ITsToSchemaConfig.md)
10
12
 
11
13
  The configuration for the app.
12
14
 
13
- **outputFolder**: `string`
15
+ ### outputFolder
16
+
17
+ `string`
14
18
 
15
19
  The location of the folder to output the JSON schemas.
16
20
 
17
- **workingDirectory**: `string`
21
+ ### workingDirectory
22
+
23
+ `string`
18
24
 
19
25
  The folder the app was run from.
20
26
 
@@ -12,19 +12,11 @@ The base url for the type references e.g. https://schema.twindev.org/my-namespac
12
12
 
13
13
  ***
14
14
 
15
- ### sources
16
-
17
- > **sources**: `string`[]
18
-
19
- The list of glob sources that can be used to generate the schemas.
20
-
21
- ***
22
-
23
15
  ### types
24
16
 
25
17
  > **types**: `string`[]
26
18
 
27
- The list of types to generate.
19
+ The source files to generate the types from.
28
20
 
29
21
  ***
30
22
 
@@ -36,4 +28,16 @@ External type references
36
28
 
37
29
  #### Index Signature
38
30
 
39
- \[`id`: `string`\]: `string`
31
+ \[`id`: `string`\]: `string`
32
+
33
+ ***
34
+
35
+ ### overrides?
36
+
37
+ > `optional` **overrides**: `object`
38
+
39
+ Override for specific types, to be used when the type cannot be generated automatically, or is generated incorrectly.
40
+
41
+ #### Index Signature
42
+
43
+ \[`id`: `string`\]: `AnySchemaObject`
package/locales/en.json CHANGED
@@ -22,8 +22,8 @@
22
22
  "progress": {
23
23
  "loadingConfigJson": "Loading Config JSON",
24
24
  "creatingWorkingDir": "Creating Working Directory",
25
- "generatingSchemas": "Generating Schemas",
26
- "finalisingSchemas": "Finalising Schemas",
25
+ "generatingSchema": "Generating Schema",
26
+ "overridingSchema": "Overriding Schema",
27
27
  "writingSchemas": "Writing Schemas",
28
28
  "writingSchema": "Writing Schema",
29
29
  "models": "Models"
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@twin.org/ts-to-schema",
3
- "version": "0.0.1-next.9",
3
+ "version": "0.0.1",
4
4
  "description": "Tool to convert TypeScript definitions to JSON schemas",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/twinfoundation/tools.git",
8
- "directory": "packages/ts-to-schema"
8
+ "directory": "apps/ts-to-schema"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
11
11
  "license": "Apache-2.0",
@@ -14,22 +14,22 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/cli-core": "next",
18
- "@twin.org/core": "next",
19
- "@twin.org/nameof": "0.0.1-next.9",
20
- "commander": "12.1.0",
21
- "glob": "11.0.0",
22
- "jsonschema": "1.4.1",
23
- "ts-json-schema-generator": "2.4.0-next.1"
17
+ "@twin.org/cli-core": "^0.0.1",
18
+ "@twin.org/core": "^0.0.1",
19
+ "@twin.org/nameof": "^0.0.1",
20
+ "ajv": "8.17.1",
21
+ "commander": "14.0.0",
22
+ "glob": "11.0.2",
23
+ "ts-json-schema-generator": "2.4.0"
24
24
  },
25
25
  "main": "./dist/cjs/index.cjs",
26
26
  "module": "./dist/esm/index.mjs",
27
27
  "types": "./dist/types/index.d.ts",
28
28
  "exports": {
29
29
  ".": {
30
+ "types": "./dist/types/index.d.ts",
30
31
  "require": "./dist/cjs/index.cjs",
31
- "import": "./dist/esm/index.mjs",
32
- "types": "./dist/types/index.d.ts"
32
+ "import": "./dist/esm/index.mjs"
33
33
  }
34
34
  },
35
35
  "files": [