@twin.org/ts-to-schema 0.0.2-next.1 → 0.0.2-next.10
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 +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/locales/en.json +10 -69
- package/docs/changelog.md +126 -0
- package/package.json +17 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -90,7 +90,7 @@ async function tsToSchema(config, outputFolder, workingDirectory) {
|
|
|
90
90
|
else {
|
|
91
91
|
cliCore.CLIDisplay.task(core.I18n.formatMessage("commands.ts-to-schema.progress.generatingSchema"));
|
|
92
92
|
const autoExpandTypes = config.autoExpandTypes ?? [];
|
|
93
|
-
const defaultExpandTypes = ["ObjectOrArray
|
|
93
|
+
const defaultExpandTypes = ["/ObjectOrArray<.*>/"];
|
|
94
94
|
for (const defaultType of defaultExpandTypes) {
|
|
95
95
|
if (!autoExpandTypes.includes(defaultType)) {
|
|
96
96
|
autoExpandTypes.push(defaultType);
|
|
@@ -185,7 +185,7 @@ class CLI extends cliCore.CLIBase {
|
|
|
185
185
|
return this.execute({
|
|
186
186
|
title: "TWIN TypeScript To Schema",
|
|
187
187
|
appName: "ts-to-schema",
|
|
188
|
-
version: "0.0.2-next.
|
|
188
|
+
version: "0.0.2-next.10", // x-release-please-version
|
|
189
189
|
icon: "⚙️ ",
|
|
190
190
|
supportsEnvFiles: false,
|
|
191
191
|
overrideOutputWidth: options?.overrideOutputWidth
|
package/dist/esm/index.mjs
CHANGED
|
@@ -87,7 +87,7 @@ async function tsToSchema(config, outputFolder, workingDirectory) {
|
|
|
87
87
|
else {
|
|
88
88
|
CLIDisplay.task(I18n.formatMessage("commands.ts-to-schema.progress.generatingSchema"));
|
|
89
89
|
const autoExpandTypes = config.autoExpandTypes ?? [];
|
|
90
|
-
const defaultExpandTypes = ["ObjectOrArray
|
|
90
|
+
const defaultExpandTypes = ["/ObjectOrArray<.*>/"];
|
|
91
91
|
for (const defaultType of defaultExpandTypes) {
|
|
92
92
|
if (!autoExpandTypes.includes(defaultType)) {
|
|
93
93
|
autoExpandTypes.push(defaultType);
|
|
@@ -182,7 +182,7 @@ class CLI extends CLIBase {
|
|
|
182
182
|
return this.execute({
|
|
183
183
|
title: "TWIN TypeScript To Schema",
|
|
184
184
|
appName: "ts-to-schema",
|
|
185
|
-
version: "0.0.2-next.
|
|
185
|
+
version: "0.0.2-next.10", // x-release-please-version
|
|
186
186
|
icon: "⚙️ ",
|
|
187
187
|
supportsEnvFiles: false,
|
|
188
188
|
overrideOutputWidth: options?.overrideOutputWidth
|
package/dist/locales/en.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"optionInvalidHex": "The \"{option}\" does not appear to be hex. \"{value}\"",
|
|
7
7
|
"optionInvalidBase64": "The \"{option}\" does not appear to be base64. \"{value}\"",
|
|
8
8
|
"optionInvalidHexBase64": "The \"{option}\" does not appear to be hex or base64. \"{value}\"",
|
|
9
|
-
"optionInvalidBech32": "The \"{option}\" does not appear to be bech32. \"{value}\"",
|
|
10
9
|
"optionMinValue": "The \"{option}\" option must be greater than or equal to {minValue}, it is {value}.",
|
|
11
10
|
"optionMaxValue": "The \"{option}\" option must be less than or equal to {maxValue}, it is {value}."
|
|
12
11
|
},
|
|
@@ -53,9 +52,7 @@
|
|
|
53
52
|
"beUrn": "{fieldName} must be a correctly formatted urn",
|
|
54
53
|
"beUrl": "{fieldName} must be a correctly formatted url",
|
|
55
54
|
"beJSON": "{fieldName} must be correctly formatted JSON",
|
|
56
|
-
"beEmail": "{fieldName} must be a correctly formatted e-mail address"
|
|
57
|
-
"failed": "Validation failed",
|
|
58
|
-
"failedObject": "Validation of \"{objectName}\" failed"
|
|
55
|
+
"beEmail": "{fieldName} must be a correctly formatted e-mail address"
|
|
59
56
|
},
|
|
60
57
|
"guard": {
|
|
61
58
|
"undefined": "Property \"{property}\" must be defined, it is \"{value}\"",
|
|
@@ -86,11 +83,7 @@
|
|
|
86
83
|
"function": "Property \"{property}\" must be a function, it is \"{value}\"",
|
|
87
84
|
"urn": "Property \"{property}\" must be a Urn formatted string, it is \"{value}\"",
|
|
88
85
|
"url": "Property \"{property}\" must be a Url formatted string, it is \"{value}\"",
|
|
89
|
-
"email": "Property \"{property}\" must be string in e-mail format, it is \"{value}\""
|
|
90
|
-
"length32Multiple": "Property \"{property}\" should be a multiple of 32, it is {value}",
|
|
91
|
-
"lengthEntropy": "Property \"{property}\" should be a multiple of 4, >=16 and <= 32, it is {value}",
|
|
92
|
-
"length3Multiple": "Property \"{property}\" should be a multiple of 3, it is {value}",
|
|
93
|
-
"greaterThan0": "Property \"{property}\" must be greater than zero, it is {value}"
|
|
86
|
+
"email": "Property \"{property}\" must be string in e-mail format, it is \"{value}\""
|
|
94
87
|
},
|
|
95
88
|
"objectHelper": {
|
|
96
89
|
"failedBytesToJSON": "Failed converting bytes to JSON",
|
|
@@ -106,7 +99,7 @@
|
|
|
106
99
|
"noGet": "The requested {typeName} \"{name}\" does not exist in the factory"
|
|
107
100
|
},
|
|
108
101
|
"bitString": {
|
|
109
|
-
"outOfRange": "The index should be >= 0 and less than the length of the bit string"
|
|
102
|
+
"outOfRange": "The index should be >= 0 and less than the length of the bit string, the index is \"{index}\" and the number of bit is \"{numberBits}\""
|
|
110
103
|
},
|
|
111
104
|
"base32": {
|
|
112
105
|
"invalidCharacter": "Data contains a character \"{invalidCharacter}\" which is not in the charset"
|
|
@@ -119,64 +112,11 @@
|
|
|
119
112
|
},
|
|
120
113
|
"jsonHelper": {
|
|
121
114
|
"failedPatch": "Failed to patch the JSON object, patch index \"{index}\" failed"
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"ed25519": {
|
|
128
|
-
"privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
|
|
129
|
-
"publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
|
|
130
|
-
},
|
|
131
|
-
"secp256k1": {
|
|
132
|
-
"privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
|
|
133
|
-
"publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
|
|
134
|
-
},
|
|
135
|
-
"x25519": {
|
|
136
|
-
"invalidPublicKey": "Invalid Ed25519 Public Key"
|
|
137
|
-
},
|
|
138
|
-
"blake2b": {
|
|
139
|
-
"outputLength64": "The output length should be between 1 and 64, it is \"{outputLength}\"",
|
|
140
|
-
"keyLength64": "The key length should be between 1 and 64, it is \"{keyLength}\""
|
|
141
|
-
},
|
|
142
|
-
"sha512": {
|
|
143
|
-
"bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
|
|
144
|
-
},
|
|
145
|
-
"sha256": {
|
|
146
|
-
"bitSize": "Only 224 or 256 bits are supported, it is \"{bitSize}\""
|
|
147
|
-
},
|
|
148
|
-
"sha3": {
|
|
149
|
-
"bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
|
|
150
|
-
},
|
|
151
|
-
"hmacSha256": {
|
|
152
|
-
"bitSize": "Only 224 or 256 bits are supported, it is \"{bitSize}\""
|
|
153
|
-
},
|
|
154
|
-
"hmacSha512": {
|
|
155
|
-
"bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
|
|
156
|
-
},
|
|
157
|
-
"bech32": {
|
|
158
|
-
"decodeFailed": "The address contains decoding failed for address \"{bech32}\"",
|
|
159
|
-
"invalidChecksum": "The address contains an invalid checksum in address, \"{bech32}\"",
|
|
160
|
-
"separatorMisused": "The separator character '1' should only be used between hrp and data, \"{bech32}\"",
|
|
161
|
-
"lowerUpper": "The address my use either lowercase or uppercase, \"{bech32}\"",
|
|
162
|
-
"dataTooShort": "The address does not contain enough data to decode, \"{bech32}\""
|
|
163
|
-
},
|
|
164
|
-
"pbkdf2": {
|
|
165
|
-
"keyTooLong": "The requested key length \"{keyLength}\" is too long, based on the \"{macLength}\""
|
|
166
|
-
},
|
|
167
|
-
"chaCha20Poly1305": {
|
|
168
|
-
"noAadWithData": "You can not set the aad when there is already data",
|
|
169
|
-
"noAuthTag": "Can not finalise when the auth tag is not set",
|
|
170
|
-
"authenticationFailed": "The data could not be authenticated",
|
|
171
|
-
"authTagDecrypting": "Can not get the auth tag when decrypting",
|
|
172
|
-
"authTagEncrypting": "Can not set the auth tag when encrypting",
|
|
173
|
-
"noAuthTagSet": "The auth tag has not been set"
|
|
174
|
-
},
|
|
175
|
-
"bip44": {
|
|
176
|
-
"unsupportedKeyType": "The key type \"{keyType}\" is not supported"
|
|
177
|
-
},
|
|
178
|
-
"slip0010": {
|
|
179
|
-
"invalidSeed": "The seed is invalid \"{seed}\""
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"warn": {
|
|
118
|
+
"common": {
|
|
119
|
+
"devOnlyTool": "This tool is intended to be used for development purposes, it is not recommended for use in production scenarios."
|
|
180
120
|
}
|
|
181
121
|
},
|
|
182
122
|
"cli": {
|
|
@@ -231,7 +171,8 @@
|
|
|
231
171
|
"alreadyExistsError": "Already Exists",
|
|
232
172
|
"notImplementedError": "Not Implemented",
|
|
233
173
|
"validationError": "Validation",
|
|
234
|
-
"unprocessableError": "Unprocessable"
|
|
174
|
+
"unprocessableError": "Unprocessable",
|
|
175
|
+
"unauthorizedError": "Unauthorized"
|
|
235
176
|
},
|
|
236
177
|
"validation": {
|
|
237
178
|
"defaultFieldName": "The field"
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,131 @@
|
|
|
1
1
|
# @twin.org/ts-to-schema - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.10](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.9...ts-to-schema-v0.0.2-next.10) (2025-10-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add validate-locales ([97bb11f](https://github.com/twinfoundation/tools/commit/97bb11fd9e6ed400e7fa69671075ba78f36ca6e6))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/tools-core bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
16
|
+
|
|
17
|
+
## [0.0.2-next.9](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.8...ts-to-schema-v0.0.2-next.9) (2025-09-23)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Miscellaneous Chores
|
|
21
|
+
|
|
22
|
+
* **ts-to-schema:** Synchronize repo versions
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/tools-core bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
30
|
+
|
|
31
|
+
## [0.0.2-next.8](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.7...ts-to-schema-v0.0.2-next.8) (2025-09-05)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Miscellaneous Chores
|
|
35
|
+
|
|
36
|
+
* **ts-to-schema:** Synchronize repo versions
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
* The following workspace dependencies were updated
|
|
42
|
+
* dependencies
|
|
43
|
+
* @twin.org/tools-core bumped from 0.0.2-next.7 to 0.0.2-next.8
|
|
44
|
+
|
|
45
|
+
## [0.0.2-next.7](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.6...ts-to-schema-v0.0.2-next.7) (2025-08-29)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* eslint migration to flat config ([25acfcf](https://github.com/twinfoundation/tools/commit/25acfcf4c4e0c496fffeaf67659fe171bc15199a))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Dependencies
|
|
54
|
+
|
|
55
|
+
* The following workspace dependencies were updated
|
|
56
|
+
* dependencies
|
|
57
|
+
* @twin.org/tools-core bumped from 0.0.2-next.6 to 0.0.2-next.7
|
|
58
|
+
|
|
59
|
+
## [0.0.2-next.6](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.5...ts-to-schema-v0.0.2-next.6) (2025-08-21)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Miscellaneous Chores
|
|
63
|
+
|
|
64
|
+
* **ts-to-schema:** Synchronize repo versions
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Dependencies
|
|
68
|
+
|
|
69
|
+
* The following workspace dependencies were updated
|
|
70
|
+
* dependencies
|
|
71
|
+
* @twin.org/tools-core bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
72
|
+
|
|
73
|
+
## [0.0.2-next.5](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.4...ts-to-schema-v0.0.2-next.5) (2025-08-19)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Features
|
|
77
|
+
|
|
78
|
+
* correctly handle auto expand types ([57fce0f](https://github.com/twinfoundation/tools/commit/57fce0f9ec4a0876665d70adc6e885f6feb3caf7))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Dependencies
|
|
82
|
+
|
|
83
|
+
* The following workspace dependencies were updated
|
|
84
|
+
* dependencies
|
|
85
|
+
* @twin.org/tools-core bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
86
|
+
|
|
87
|
+
## [0.0.2-next.4](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.3...ts-to-schema-v0.0.2-next.4) (2025-08-19)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### Miscellaneous Chores
|
|
91
|
+
|
|
92
|
+
* **ts-to-schema:** Synchronize repo versions
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Dependencies
|
|
96
|
+
|
|
97
|
+
* The following workspace dependencies were updated
|
|
98
|
+
* dependencies
|
|
99
|
+
* @twin.org/tools-core bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
100
|
+
|
|
101
|
+
## [0.0.2-next.3](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.2...ts-to-schema-v0.0.2-next.3) (2025-08-05)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Miscellaneous Chores
|
|
105
|
+
|
|
106
|
+
* **ts-to-schema:** Synchronize repo versions
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Dependencies
|
|
110
|
+
|
|
111
|
+
* The following workspace dependencies were updated
|
|
112
|
+
* dependencies
|
|
113
|
+
* @twin.org/tools-core bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
114
|
+
|
|
115
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.1...ts-to-schema-v0.0.2-next.2) (2025-07-17)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Features
|
|
119
|
+
|
|
120
|
+
* improve auto expand types ([6181d1d](https://github.com/twinfoundation/tools/commit/6181d1daded1f91323195cf7efbc2f1881f38b41))
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Dependencies
|
|
124
|
+
|
|
125
|
+
* The following workspace dependencies were updated
|
|
126
|
+
* dependencies
|
|
127
|
+
* @twin.org/tools-core bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
128
|
+
|
|
3
129
|
## [0.0.2-next.1](https://github.com/twinfoundation/tools/compare/ts-to-schema-v0.0.2-next.0...ts-to-schema-v0.0.2-next.1) (2025-07-14)
|
|
4
130
|
|
|
5
131
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/ts-to-schema",
|
|
3
|
-
"version": "0.0.2-next.
|
|
3
|
+
"version": "0.0.2-next.10",
|
|
4
4
|
"description": "Tool to convert TypeScript definitions to JSON schemas",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@twin.org/cli-core": "next",
|
|
18
18
|
"@twin.org/core": "next",
|
|
19
19
|
"@twin.org/nameof": "next",
|
|
20
|
-
"@twin.org/tools-core": "0.0.2-next.
|
|
21
|
-
"commander": "14.0.
|
|
22
|
-
"glob": "11.0.
|
|
20
|
+
"@twin.org/tools-core": "0.0.2-next.10",
|
|
21
|
+
"commander": "14.0.1",
|
|
22
|
+
"glob": "11.0.3",
|
|
23
23
|
"ts-json-schema-generator": "2.4.0"
|
|
24
24
|
},
|
|
25
25
|
"main": "./dist/cjs/index.cjs",
|
|
@@ -43,5 +43,17 @@
|
|
|
43
43
|
],
|
|
44
44
|
"bin": {
|
|
45
45
|
"ts-to-schema": "bin/index.js"
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"twin",
|
|
49
|
+
"trade",
|
|
50
|
+
"iota",
|
|
51
|
+
"framework",
|
|
52
|
+
"blockchain",
|
|
53
|
+
"tools"
|
|
54
|
+
],
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "git+https://github.com/twinfoundation/tools/issues"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://twindev.org"
|
|
47
59
|
}
|