@twin.org/ts-to-openapi 0.0.1-next.2 → 0.0.1-next.21

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.
@@ -607,6 +607,7 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
607
607
  }
608
608
  }
609
609
  const substituteSchemas = [];
610
+ const finalExternals = {};
610
611
  // Remove the I, < and > from names
611
612
  const finalSchemas = {};
612
613
  for (const schema in schemas) {
@@ -629,8 +630,10 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
629
630
  // If the schema is external then remove it from the final schemas
630
631
  if (core.Is.object(externalReferences)) {
631
632
  for (const external in externalReferences) {
632
- if (new RegExp(`^${external}$`).test(schema)) {
633
+ const re = new RegExp(`^I?${external}(?<!Request|Response)$`);
634
+ if (re.test(schema)) {
633
635
  skipSchema = true;
636
+ finalExternals[core.StringHelper.stripPrefix(schema)] = schema.replace(re, externalReferences[external]);
634
637
  break;
635
638
  }
636
639
  }
@@ -659,6 +662,9 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
659
662
  if (finalSchemas.HttpStatusCode) {
660
663
  delete finalSchemas.HttpStatusCode;
661
664
  }
665
+ if (finalSchemas.Uint8Array) {
666
+ delete finalSchemas.Uint8Array;
667
+ }
662
668
  const schemaKeys = Object.keys(finalSchemas);
663
669
  schemaKeys.sort();
664
670
  const sortedSchemas = {};
@@ -669,7 +675,7 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
669
675
  schemas: sortedSchemas,
670
676
  securitySchemes
671
677
  };
672
- let json = JSON.stringify(openApi, undefined, " ");
678
+ let json = JSON.stringify(openApi, undefined, "\t");
673
679
  // Remove the reference only schemas, repeating until no more substitutions
674
680
  let performedSubstitution;
675
681
  do {
@@ -695,17 +701,15 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
695
701
  // Cleanup the generic markers
696
702
  json = json.replace(/%3Cunknown%3E/g, "");
697
703
  // Remove external references
698
- if (core.Is.objectValue(externalReferences)) {
699
- for (const external in externalReferences) {
700
- json = json.replace(new RegExp(`#/components/schemas/${core.StringHelper.stripPrefix(external)}`, "g"), externalReferences[external]);
701
- }
704
+ for (const finalExternal in finalExternals) {
705
+ json = json.replace(new RegExp(`"#/components/schemas/${core.StringHelper.stripPrefix(finalExternal)}"`, "g"), `"${finalExternals[finalExternal]}"`);
702
706
  }
703
707
  cliCore.CLIDisplay.task(core.I18n.formatMessage("commands.ts-to-openapi.progress.writingOutputFile"), outputFile);
704
708
  try {
705
709
  await promises.mkdir(path.dirname(outputFile), { recursive: true });
706
710
  }
707
711
  catch { }
708
- await promises.writeFile(outputFile, json);
712
+ await promises.writeFile(outputFile, `${json}\n`);
709
713
  }
710
714
  /**
711
715
  * Build the security schemas from the config.
@@ -1098,16 +1102,19 @@ class CLI extends cliCore.CLIBase {
1098
1102
  * Run the app.
1099
1103
  * @param argv The process arguments.
1100
1104
  * @param localesDirectory The directory for the locales, default to relative to the script.
1105
+ * @param options Additional options.
1106
+ * @param options.overrideOutputWidth Override the output width.
1101
1107
  * @returns The exit code.
1102
1108
  */
1103
- async run(argv, localesDirectory) {
1109
+ async run(argv, localesDirectory, options) {
1104
1110
  return this.execute({
1105
1111
  title: "TWIN TypeScript To OpenAPI",
1106
1112
  appName: "ts-to-openapi",
1107
- version: "0.0.1-next.2",
1113
+ version: "0.0.1-next.21", // x-release-please-version
1108
1114
  icon: "⚙️ ",
1109
- supportsEnvFiles: false
1110
- }, localesDirectory ?? path.join(path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))), "../locales"), argv);
1115
+ supportsEnvFiles: false,
1116
+ overrideOutputWidth: options?.overrideOutputWidth
1117
+ }, 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);
1111
1118
  }
1112
1119
  /**
1113
1120
  * Configure any options or actions at the root program level.
@@ -604,6 +604,7 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
604
604
  }
605
605
  }
606
606
  const substituteSchemas = [];
607
+ const finalExternals = {};
607
608
  // Remove the I, < and > from names
608
609
  const finalSchemas = {};
609
610
  for (const schema in schemas) {
@@ -626,8 +627,10 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
626
627
  // If the schema is external then remove it from the final schemas
627
628
  if (Is.object(externalReferences)) {
628
629
  for (const external in externalReferences) {
629
- if (new RegExp(`^${external}$`).test(schema)) {
630
+ const re = new RegExp(`^I?${external}(?<!Request|Response)$`);
631
+ if (re.test(schema)) {
630
632
  skipSchema = true;
633
+ finalExternals[StringHelper.stripPrefix(schema)] = schema.replace(re, externalReferences[external]);
631
634
  break;
632
635
  }
633
636
  }
@@ -656,6 +659,9 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
656
659
  if (finalSchemas.HttpStatusCode) {
657
660
  delete finalSchemas.HttpStatusCode;
658
661
  }
662
+ if (finalSchemas.Uint8Array) {
663
+ delete finalSchemas.Uint8Array;
664
+ }
659
665
  const schemaKeys = Object.keys(finalSchemas);
660
666
  schemaKeys.sort();
661
667
  const sortedSchemas = {};
@@ -666,7 +672,7 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
666
672
  schemas: sortedSchemas,
667
673
  securitySchemes
668
674
  };
669
- let json = JSON.stringify(openApi, undefined, " ");
675
+ let json = JSON.stringify(openApi, undefined, "\t");
670
676
  // Remove the reference only schemas, repeating until no more substitutions
671
677
  let performedSubstitution;
672
678
  do {
@@ -692,17 +698,15 @@ async function finaliseOutput(usedCommonResponseTypes, schemas, openApi, securit
692
698
  // Cleanup the generic markers
693
699
  json = json.replace(/%3Cunknown%3E/g, "");
694
700
  // Remove external references
695
- if (Is.objectValue(externalReferences)) {
696
- for (const external in externalReferences) {
697
- json = json.replace(new RegExp(`#/components/schemas/${StringHelper.stripPrefix(external)}`, "g"), externalReferences[external]);
698
- }
701
+ for (const finalExternal in finalExternals) {
702
+ json = json.replace(new RegExp(`"#/components/schemas/${StringHelper.stripPrefix(finalExternal)}"`, "g"), `"${finalExternals[finalExternal]}"`);
699
703
  }
700
704
  CLIDisplay.task(I18n.formatMessage("commands.ts-to-openapi.progress.writingOutputFile"), outputFile);
701
705
  try {
702
706
  await mkdir(path.dirname(outputFile), { recursive: true });
703
707
  }
704
708
  catch { }
705
- await writeFile(outputFile, json);
709
+ await writeFile(outputFile, `${json}\n`);
706
710
  }
707
711
  /**
708
712
  * Build the security schemas from the config.
@@ -1095,15 +1099,18 @@ class CLI extends CLIBase {
1095
1099
  * Run the app.
1096
1100
  * @param argv The process arguments.
1097
1101
  * @param localesDirectory The directory for the locales, default to relative to the script.
1102
+ * @param options Additional options.
1103
+ * @param options.overrideOutputWidth Override the output width.
1098
1104
  * @returns The exit code.
1099
1105
  */
1100
- async run(argv, localesDirectory) {
1106
+ async run(argv, localesDirectory, options) {
1101
1107
  return this.execute({
1102
1108
  title: "TWIN TypeScript To OpenAPI",
1103
1109
  appName: "ts-to-openapi",
1104
- version: "0.0.1-next.2",
1110
+ version: "0.0.1-next.21", // x-release-please-version
1105
1111
  icon: "⚙️ ",
1106
- supportsEnvFiles: false
1112
+ supportsEnvFiles: false,
1113
+ overrideOutputWidth: options?.overrideOutputWidth
1107
1114
  }, localesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), "../locales"), argv);
1108
1115
  }
1109
1116
  /**
@@ -1,274 +1,301 @@
1
1
  {
2
- "error": {
3
- "commands": {
4
- "ts-to-openapi": {
5
- "configFailed": "Configuration failed to load.",
6
- "missingRestRoutesEntryPoints": "Missing REST routes method \"{method}\" in package \"{package}\".",
7
- "missingRestRoutesEntryPoint": "Missing REST routes entryPoint \"{entryPoint}\" in package \"{package}\".",
8
- "unsupportedProperties": "Unsupported properties found in the request object \"{keys}\"."
9
- },
10
- "common": {
11
- "missingEnv": "The \"{option}\" option is configured as an environment variable, but there is no environment variable with the name \"{value}\" set.",
12
- "optionInvalidHex": "The \"{option}\" does not appear to be hex. \"{value}\"",
13
- "optionInvalidBase64": "The \"{option}\" does not appear to be base64. \"{value}\"",
14
- "optionInvalidHexBase64": "The \"{option}\" does not appear to be hex or base64. \"{value}\"",
15
- "optionInvalidBech32": "The \"{option}\" does not appear to be bech32. \"{value}\"",
16
- "optionMinValue": "The \"{option}\" option must be greater than or equal to {minValue}, it is {value}.",
17
- "optionMaxValue": "The \"{option}\" option must be less than or equal to {maxValue}, it is {value}."
18
- }
19
- },
20
- "baseRestClient": {
21
- "missingRouteProp": "Missing route parameter in data \"{routeProp}\" for route \"{route}\"",
22
- "decodingFailed": "Decoding JSON failed for route \"{route}\"",
23
- "failureStatusText": "The request to the API failed: \"{statusText}\""
24
- },
25
- "validation": {
26
- "beEmpty": "{fieldName} must be empty",
27
- "beNotEmpty": "{fieldName} must not be empty",
28
- "beText": "{fieldName} must be text",
29
- "beTextValue": "{fieldName} must contain some text",
30
- "beTextMinMax": "{fieldName} must be longer than {minLength} and shorter than {maxLength} characters",
31
- "beTextMin": "{fieldName} must be longer than {minLength} characters",
32
- "beTextMax": "{fieldName} must be shorter than {maxLength} characters",
33
- "beNumber": "{fieldName} must be a number",
34
- "beNumberMinMax": "{fieldName} must be >= {minValue} and <= {maxValue}",
35
- "beNumberMin": "{fieldName} must be >= {minValue}",
36
- "beNumberMax": "{fieldName} must be <= {maxValue}",
37
- "beWholeNumber": "{fieldName} must be a whole number",
38
- "beWholeNumberMinMax": "{fieldName} must be a whole number >= {minValue} and <= {maxValue}",
39
- "beWholeNumberMin": "{fieldName} must be a whole number >= {minValue}",
40
- "beWholeNumberMax": "{fieldName} must be a whole number <= {maxValue}",
41
- "beBigInteger": "{fieldName} must be a bigint",
42
- "beBigIntegerMinMax": "{fieldName} must be a bigint >= {minValue} and <= {maxValue}",
43
- "beBigIntegerMin": "{fieldName} must be a bigint >= {minValue}",
44
- "beBigIntegerMax": "{fieldName} must be a bigint <= {maxValue}",
45
- "beBoolean": "{fieldName} must be true or false",
46
- "beDate": "{fieldName} must be a date",
47
- "beDateTime": "{fieldName} must be a date/time",
48
- "beTime": "{fieldName} must be a time",
49
- "beTimestampMilliseconds": "{fieldName} must be a timestamp in milliseconds",
50
- "beTimestampSeconds": "{fieldName} must be a timestamp in seconds",
51
- "beObject": "{fieldName} must be an object",
52
- "beArray": "{fieldName} must be an array",
53
- "beArrayValue": "{fieldName} must be an array with at least one item",
54
- "beIncluded": "{fieldName} is unrecognised",
55
- "beByteArray": "{fieldName} must be a byte array",
56
- "beUrn": "{fieldName} must be a correctly formatted urn",
57
- "beUrl": "{fieldName} must be a correctly formatted url",
58
- "beJSON": "{fieldName} must be correctly formatted JSON",
59
- "beEmail": "{fieldName} must be a correctly formatted e-mail address",
60
- "failed": "Validation failed",
61
- "failedObject": "Validation of \"{objectName}\" failed"
62
- },
63
- "guard": {
64
- "undefined": "Property \"{property}\" must be defined, it is \"{value}\"",
65
- "string": "Property \"{property}\" must be a string, it is \"{value}\"",
66
- "stringEmpty": "Property \"{property}\" must have a value, it is empty",
67
- "stringBase64": "Property \"{property}\" must be a base64 encoded string, it is \"{value}\"",
68
- "stringBase64Url": "Property \"{property}\" must be a base64 url encoded string, it is \"{value}\"",
69
- "stringHex": "Property \"{property}\" must be a hex string, it is \"{value}\"",
70
- "stringHexLength": "Property \"{property}\" must be a hex string of length \"{options}\", it is \"{value}\"",
71
- "number": "Property \"{property}\" must be a number, it is \"{value}\"",
72
- "integer": "Property \"{property}\" must be an integer, it is \"{value}\"",
73
- "bigint": "Property \"{property}\" must be a bigint, it is \"{value}\"",
74
- "boolean": "Property \"{property}\" must be a boolean, it is \"{value}\"",
75
- "date": "Property \"{property}\" must be a date, it is \"{value}\"",
76
- "timestampMilliseconds": "Property \"{property}\" must be a timestamp in milliseconds, it is \"{value}\"",
77
- "timestampSeconds": "Property \"{property}\" must be a timestamp in seconds, it is \"{value}\"",
78
- "objectUndefined": "Property \"{property}\" must be an object, it is \"undefined\"",
79
- "object": "Property \"{property}\" must be an object, it is \"{value}\"",
80
- "objectValue": "Property \"{property}\" must be an object, with at least one property, it is \"{value}\"",
81
- "array": "Property \"{property}\" must be an array, it is \"{value}\"",
82
- "arrayValue": "Property \"{property}\" must be an array with at least one item",
83
- "arrayOneOf": "Property \"{property}\" must be one of [{options}], it is \"{value}\"",
84
- "uint8Array": "Property \"{property}\" must be a Uint8Array, it is \"{value}\"",
85
- "function": "Property \"{property}\" must be a function, it is \"{value}\"",
86
- "urn": "Property \"{property}\" must be a Urn formatted string, it is \"{value}\"",
87
- "url": "Property \"{property}\" must be a Url formatted string, it is \"{value}\"",
88
- "email": "Property \"{property}\" must be string in e-mail format, it is \"{value}\"",
89
- "length32Multiple": "Property \"{property}\" should be a multiple of 32, it is {value}",
90
- "lengthEntropy": "Property \"{property}\" should be a multiple of 4, >=16 and <= 32, it is {value}",
91
- "length3Multiple": "Property \"{property}\" should be a multiple of 3, it is {value}",
92
- "greaterThan0": "Property \"{property}\" must be greater than zero, it is {value}"
93
- },
94
- "objectHelper": {
95
- "failedBytesToJSON": "Failed converting bytes to JSON"
96
- },
97
- "common": {
98
- "notImplementedMethod": "The method \"{method}\" has not been implemented",
99
- "validation": "Validation failed"
100
- },
101
- "factory": {
102
- "noUnregister": "There is no {typeName} registered with the name \"{name}\"",
103
- "noGet": "The requested {typeName} \"{name}\" does not exist in the factory"
104
- },
105
- "bitString": {
106
- "outOfRange": "The index should be >= 0 and less than the length of the bit string"
107
- },
108
- "fetchHelper": {
109
- "decodingJSON": "Decoding JSON failed for route \"{route}\"",
110
- "failureStatusText": "The request to the API failed: \"{statusText}\"",
111
- "connectivity": "The request failed, the API could be offline, or there are other connectivity issues",
112
- "timeout": "The request timed out",
113
- "general": "A general failure occurred during the request"
114
- },
115
- "jwt": {
116
- "noKeyOrSigner": "No key or signer was provided for JWT creation",
117
- "noKeyOrVerifier": "No key or verifier was provided for JWT creation"
118
- },
119
- "bip39": {
120
- "missingMnemonicWord": "The mnemonic contains a word not in the wordlist, \"{value}\"",
121
- "checksumMismatch": "The checksum does not match \"{newChecksum}\" != \"{checksumBits}\""
122
- },
123
- "ed25519": {
124
- "privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
125
- "publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
126
- },
127
- "secp256k1": {
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
- "x25519": {
132
- "invalidPublicKey": "Invalid Ed25519 Public Key"
133
- },
134
- "blake2b": {
135
- "outputLength64": "The output length should be between 1 and 64, it is \"{outputLength}\"",
136
- "keyLength64": "The key length should be between 1 and 64, it is \"{keyLength}\""
137
- },
138
- "sha512": {
139
- "bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
140
- },
141
- "sha256": {
142
- "bitSize": "Only 224 or 256 bits are supported, it is \"{bitSize}\""
143
- },
144
- "hmacSha256": {
145
- "bitSize": "Only 224 or 256 bits are supported, it is \"{bitSize}\""
146
- },
147
- "hmacSha512": {
148
- "bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
149
- },
150
- "base32": {
151
- "invalidCharacter": "Data contains a character \"{invalidCharacter}\" which is not in the charset"
152
- },
153
- "base64": {
154
- "length4Multiple": "Invalid length should be a multiple of 4, it is \"{value}\""
155
- },
156
- "bech32": {
157
- "decodeFailed": "The address contains decoding failed for address \"{bech32}\"",
158
- "invalidChecksum": "The address contains an invalid checksum in address, \"{bech32}\"",
159
- "separatorMisused": "The separator character '1' should only be used between hrp and data, \"{bech32}\"",
160
- "lowerUpper": "The address my use either lowercase or uppercase, \"{bech32}\"",
161
- "dataTooShort": "The address does not contain enough data to decode, \"{bech32}\""
162
- },
163
- "pbkdf2": {
164
- "keyTooLong": "The requested key length \"{keyLength}\" is too long, based on the \"{macLength}\""
165
- },
166
- "chaCha20Poly1305": {
167
- "noAadWithData": "You can not set the aad when there is already data",
168
- "noAuthTag": "Can not finalise when the auth tag is not set",
169
- "authenticationFailed": "The data could not be authenticated",
170
- "authTagDecrypting": "Can not get the auth tag when decrypting",
171
- "authTagEncrypting": "Can not set the auth tag when encrypting",
172
- "noAuthTagSet": "The auth tag has not been set"
173
- },
174
- "bip44": {
175
- "unsupportedKeyType": "The key type \"{keyType}\" is not supported"
176
- },
177
- "slip0010": {
178
- "invalidSeed": "The seed is invalid \"{seed}\""
179
- }
180
- },
181
- "commands": {
182
- "ts-to-openapi": {
183
- "options": {
184
- "config": {
185
- "param": "'<'config'>'",
186
- "description": "Path to the JSON configuration file."
187
- },
188
- "output-file": {
189
- "param": "'<'output-file'>'",
190
- "description": "The JSON file to write the OpenAPI spec."
191
- }
192
- },
193
- "progress": {
194
- "loadingConfigJson": "Loading Config JSON",
195
- "creatingWorkingDir": "Creating Working Directory",
196
- "creatingSecuritySchemas": "Creating Security Schemas",
197
- "generatingSchemas": "Generating Schemas",
198
- "finalisingSchemas": "Finalising Schemas",
199
- "writingOutputFile": "Writing Output File",
200
- "models": "Models",
201
- "installingNpmPackages": "Installing NPM Packages",
202
- "processingPackage": "Processing Package",
203
- "importingModule": "Importing Module",
204
- "processingRoutes": "Processing Routes"
205
- },
206
- "labels": {
207
- "configJson": "Config JSON",
208
- "outputFile": "Output File",
209
- "outputWorkingDir": "Output Working Directory",
210
- "route": "Route"
211
- }
212
- }
213
- },
214
- "errorNames": {
215
- "error": "Error",
216
- "generalError": "General",
217
- "guardError": "Guard",
218
- "conflictError": "Conflict",
219
- "notFoundError": "Not Found",
220
- "notSupportedError": "Not Supported",
221
- "alreadyExistsError": "Already Exists",
222
- "notImplementedError": "Not Implemented",
223
- "validationError": "Validation",
224
- "unprocessableError": "Unprocessable"
225
- },
226
- "validation": {
227
- "defaultFieldName": "The field"
228
- },
229
- "errorMessages": {
230
- "fetch": "Fetch"
231
- },
232
- "cli": {
233
- "progress": {
234
- "done": "Done.",
235
- "error": "Error",
236
- "loadingEnvFiles": "Loading env files",
237
- "pleaseWait": "Please wait...",
238
- "writingJsonFile": "Writing JSON file",
239
- "writingEnvFile": "Writing env file",
240
- "readingJsonFile": "Reading JSON file",
241
- "readingEnvFile": "Reading env file"
242
- },
243
- "options": {
244
- "lang": {
245
- "param": "--lang '<'lang'>'",
246
- "description": "The language to display the output in."
247
- },
248
- "load-env": {
249
- "param": "--load-env [env...]",
250
- "description": "Load the env files to initialise any environment variables."
251
- },
252
- "no-console": {
253
- "param": "--no-console",
254
- "description": "Hides the output in the console."
255
- },
256
- "json": {
257
- "param": "--json '<'filename'>'",
258
- "description": "Creates a JSON file containing the output."
259
- },
260
- "env": {
261
- "param": "--env '<'filename'>'",
262
- "description": "Creates an env file containing the output."
263
- },
264
- "merge-json": {
265
- "param": "--merge-json",
266
- "description": "If the JSON file already exists merge the data instead of overwriting."
267
- },
268
- "merge-env": {
269
- "param": "--merge-env",
270
- "description": "If the env file already exists merge the data instead of overwriting."
271
- }
272
- }
273
- }
274
- }
2
+ "error": {
3
+ "baseRestClient": {
4
+ "missingRouteProp": "Missing route parameter in data \"{routeProp}\" for route \"{route}\"",
5
+ "decodingFailed": "Decoding JSON failed for route \"{route}\"",
6
+ "failureStatusText": "The request to the API failed: \"{statusText}\""
7
+ },
8
+ "validation": {
9
+ "beEmpty": "{fieldName} must be empty",
10
+ "beNotEmpty": "{fieldName} must not be empty",
11
+ "beText": "{fieldName} must be text",
12
+ "beTextValue": "{fieldName} must contain some text",
13
+ "beTextMinMax": "{fieldName} must be longer than {minLength} and shorter than {maxLength} characters",
14
+ "beTextMin": "{fieldName} must be longer than {minLength} characters",
15
+ "beTextMax": "{fieldName} must be shorter than {maxLength} characters",
16
+ "beTextBase58": "{fieldName} must be text formatted using Base58 characters",
17
+ "beTextBase64": "{fieldName} must be text formatted using Base64 characters",
18
+ "beTextHex": "{fieldName} must be text formatted using Hex characters",
19
+ "beTextRegExp": "{fieldName} must be text formatted using the matching pattern {format}",
20
+ "beNumber": "{fieldName} must be a number",
21
+ "beNumberMinMax": "{fieldName} must be >= {minValue} and <= {maxValue}",
22
+ "beNumberMin": "{fieldName} must be >= {minValue}",
23
+ "beNumberMax": "{fieldName} must be <= {maxValue}",
24
+ "beWholeNumber": "{fieldName} must be a whole number",
25
+ "beWholeNumberMinMax": "{fieldName} must be a whole number >= {minValue} and <= {maxValue}",
26
+ "beWholeNumberMin": "{fieldName} must be a whole number >= {minValue}",
27
+ "beWholeNumberMax": "{fieldName} must be a whole number <= {maxValue}",
28
+ "beBigInteger": "{fieldName} must be a bigint",
29
+ "beBigIntegerMinMax": "{fieldName} must be a bigint >= {minValue} and <= {maxValue}",
30
+ "beBigIntegerMin": "{fieldName} must be a bigint >= {minValue}",
31
+ "beBigIntegerMax": "{fieldName} must be a bigint <= {maxValue}",
32
+ "beBoolean": "{fieldName} must be true or false",
33
+ "beDate": "{fieldName} must be a date",
34
+ "beDateTime": "{fieldName} must be a date/time",
35
+ "beTime": "{fieldName} must be a time",
36
+ "beTimestampMilliseconds": "{fieldName} must be a timestamp in milliseconds",
37
+ "beTimestampSeconds": "{fieldName} must be a timestamp in seconds",
38
+ "beObject": "{fieldName} must be an object",
39
+ "beArray": "{fieldName} must be an array",
40
+ "beArrayValue": "{fieldName} must be an array with at least one item",
41
+ "beIncluded": "{fieldName} is unrecognised",
42
+ "beByteArray": "{fieldName} must be a byte array",
43
+ "beUrn": "{fieldName} must be a correctly formatted urn",
44
+ "beUrl": "{fieldName} must be a correctly formatted url",
45
+ "beJSON": "{fieldName} must be correctly formatted JSON",
46
+ "beEmail": "{fieldName} must be a correctly formatted e-mail address",
47
+ "failed": "Validation failed",
48
+ "failedObject": "Validation of \"{objectName}\" failed"
49
+ },
50
+ "guard": {
51
+ "undefined": "Property \"{property}\" must be defined, it is \"{value}\"",
52
+ "string": "Property \"{property}\" must be a string, it is \"{value}\"",
53
+ "stringEmpty": "Property \"{property}\" must have a value, it is empty",
54
+ "stringBase64": "Property \"{property}\" must be a base64 encoded string, it is \"{value}\"",
55
+ "stringBase64Url": "Property \"{property}\" must be a base64 url encoded string, it is \"{value}\"",
56
+ "stringBase58": "Property \"{property}\" must be a base58 encoded string, it is \"{value}\"",
57
+ "stringHex": "Property \"{property}\" must be a hex string, it is \"{value}\"",
58
+ "stringHexLength": "Property \"{property}\" must be a hex string of length \"{options}\", it is \"{value}\"",
59
+ "stringJson": "Property \"{property}\" must be a JSON string",
60
+ "number": "Property \"{property}\" must be a number, it is \"{value}\"",
61
+ "integer": "Property \"{property}\" must be an integer, it is \"{value}\"",
62
+ "bigint": "Property \"{property}\" must be a bigint, it is \"{value}\"",
63
+ "boolean": "Property \"{property}\" must be a boolean, it is \"{value}\"",
64
+ "date": "Property \"{property}\" must be a date, it is \"{value}\"",
65
+ "timestampMilliseconds": "Property \"{property}\" must be a timestamp in milliseconds, it is \"{value}\"",
66
+ "timestampSeconds": "Property \"{property}\" must be a timestamp in seconds, it is \"{value}\"",
67
+ "objectUndefined": "Property \"{property}\" must be an object, it is \"undefined\"",
68
+ "object": "Property \"{property}\" must be an object, it is \"{value}\"",
69
+ "objectValue": "Property \"{property}\" must be an object, with at least one property, it is \"{value}\"",
70
+ "array": "Property \"{property}\" must be an array, it is \"{value}\"",
71
+ "arrayValue": "Property \"{property}\" must be an array with at least one item",
72
+ "arrayOneOf": "Property \"{property}\" must be one of [{options}], it is \"{value}\"",
73
+ "uint8Array": "Property \"{property}\" must be a Uint8Array, it is \"{value}\"",
74
+ "function": "Property \"{property}\" must be a function, it is \"{value}\"",
75
+ "urn": "Property \"{property}\" must be a Urn formatted string, it is \"{value}\"",
76
+ "url": "Property \"{property}\" must be a Url formatted string, it is \"{value}\"",
77
+ "email": "Property \"{property}\" must be string in e-mail format, it is \"{value}\"",
78
+ "length32Multiple": "Property \"{property}\" should be a multiple of 32, it is {value}",
79
+ "lengthEntropy": "Property \"{property}\" should be a multiple of 4, >=16 and <= 32, it is {value}",
80
+ "length3Multiple": "Property \"{property}\" should be a multiple of 3, it is {value}",
81
+ "greaterThan0": "Property \"{property}\" must be greater than zero, it is {value}"
82
+ },
83
+ "objectHelper": {
84
+ "failedBytesToJSON": "Failed converting bytes to JSON",
85
+ "cannotSetArrayIndex": "Cannot set property \"{property}\" using index \"{index}\" as it is not an array",
86
+ "cannotSetProperty": "Cannot set property \"{property}\" when the target is not an object"
87
+ },
88
+ "common": {
89
+ "notImplementedMethod": "The method \"{method}\" has not been implemented",
90
+ "validation": "Validation failed"
91
+ },
92
+ "factory": {
93
+ "noUnregister": "There is no {typeName} registered with the name \"{name}\"",
94
+ "noGet": "The requested {typeName} \"{name}\" does not exist in the factory"
95
+ },
96
+ "bitString": {
97
+ "outOfRange": "The index should be >= 0 and less than the length of the bit string"
98
+ },
99
+ "base32": {
100
+ "invalidCharacter": "Data contains a character \"{invalidCharacter}\" which is not in the charset"
101
+ },
102
+ "base64": {
103
+ "length4Multiple": "Invalid length should be a multiple of 4, it is \"{value}\""
104
+ },
105
+ "base58": {
106
+ "invalidCharacter": "Data contains a character \"{invalidCharacter}\" which is not in the charset"
107
+ },
108
+ "jsonHelper": {
109
+ "failedPatch": "Failed to patch the JSON object, patch index \"{index}\" failed"
110
+ },
111
+ "fetchHelper": {
112
+ "decodingJSON": "Decoding JSON failed for route \"{route}\"",
113
+ "failureStatusText": "The request to the API failed: \"{statusText}\"",
114
+ "connectivity": "The request failed, the API could be offline, or there are other connectivity issues",
115
+ "timeout": "The request timed out",
116
+ "general": "A general failure occurred during the request"
117
+ },
118
+ "jwt": {
119
+ "noKeyOrSigner": "No key or signer was provided for JWT creation",
120
+ "noKeyOrVerifier": "No key or verifier was provided for JWT creation",
121
+ "verifyFailed": "Failed to verify JWT",
122
+ "invalidTokenParts": "The JSON Web Token could not be parsed, it should contain three parts separated by dots",
123
+ "invalidSigningBytes": "The signing bytes are invalid, it should contain two parts separated by a dot"
124
+ },
125
+ "jwk": {
126
+ "jwkImportFailed": "Failed to import JWK"
127
+ },
128
+ "jws": {
129
+ "createFailed": "Failed to create JWS",
130
+ "verifyFailed": "Failed to verify JWS"
131
+ },
132
+ "bip39": {
133
+ "missingMnemonicWord": "The mnemonic contains a word not in the wordlist, \"{value}\"",
134
+ "checksumMismatch": "The checksum does not match \"{newChecksum}\" != \"{checksumBits}\""
135
+ },
136
+ "ed25519": {
137
+ "privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
138
+ "publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
139
+ },
140
+ "secp256k1": {
141
+ "privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
142
+ "publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
143
+ },
144
+ "x25519": {
145
+ "invalidPublicKey": "Invalid Ed25519 Public Key"
146
+ },
147
+ "blake2b": {
148
+ "outputLength64": "The output length should be between 1 and 64, it is \"{outputLength}\"",
149
+ "keyLength64": "The key length should be between 1 and 64, it is \"{keyLength}\""
150
+ },
151
+ "sha512": {
152
+ "bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
153
+ },
154
+ "sha256": {
155
+ "bitSize": "Only 224 or 256 bits are supported, it is \"{bitSize}\""
156
+ },
157
+ "sha3": {
158
+ "bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
159
+ },
160
+ "hmacSha256": {
161
+ "bitSize": "Only 224 or 256 bits are supported, it is \"{bitSize}\""
162
+ },
163
+ "hmacSha512": {
164
+ "bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
165
+ },
166
+ "bech32": {
167
+ "decodeFailed": "The address contains decoding failed for address \"{bech32}\"",
168
+ "invalidChecksum": "The address contains an invalid checksum in address, \"{bech32}\"",
169
+ "separatorMisused": "The separator character '1' should only be used between hrp and data, \"{bech32}\"",
170
+ "lowerUpper": "The address my use either lowercase or uppercase, \"{bech32}\"",
171
+ "dataTooShort": "The address does not contain enough data to decode, \"{bech32}\""
172
+ },
173
+ "pbkdf2": {
174
+ "keyTooLong": "The requested key length \"{keyLength}\" is too long, based on the \"{macLength}\""
175
+ },
176
+ "chaCha20Poly1305": {
177
+ "noAadWithData": "You can not set the aad when there is already data",
178
+ "noAuthTag": "Can not finalise when the auth tag is not set",
179
+ "authenticationFailed": "The data could not be authenticated",
180
+ "authTagDecrypting": "Can not get the auth tag when decrypting",
181
+ "authTagEncrypting": "Can not set the auth tag when encrypting",
182
+ "noAuthTagSet": "The auth tag has not been set"
183
+ },
184
+ "bip44": {
185
+ "unsupportedKeyType": "The key type \"{keyType}\" is not supported"
186
+ },
187
+ "slip0010": {
188
+ "invalidSeed": "The seed is invalid \"{seed}\""
189
+ },
190
+ "commands": {
191
+ "common": {
192
+ "missingEnv": "The \"{option}\" option is configured as an environment variable, but there is no environment variable with the name \"{value}\" set.",
193
+ "optionInvalidHex": "The \"{option}\" does not appear to be hex. \"{value}\"",
194
+ "optionInvalidBase64": "The \"{option}\" does not appear to be base64. \"{value}\"",
195
+ "optionInvalidHexBase64": "The \"{option}\" does not appear to be hex or base64. \"{value}\"",
196
+ "optionInvalidBech32": "The \"{option}\" does not appear to be bech32. \"{value}\"",
197
+ "optionMinValue": "The \"{option}\" option must be greater than or equal to {minValue}, it is {value}.",
198
+ "optionMaxValue": "The \"{option}\" option must be less than or equal to {maxValue}, it is {value}."
199
+ },
200
+ "ts-to-openapi": {
201
+ "configFailed": "Configuration failed to load.",
202
+ "missingRestRoutesEntryPoints": "Missing REST routes method \"{method}\" in package \"{package}\".",
203
+ "missingRestRoutesEntryPoint": "Missing REST routes entryPoint \"{entryPoint}\" in package \"{package}\".",
204
+ "unsupportedProperties": "Unsupported properties found in the request object \"{keys}\"."
205
+ }
206
+ }
207
+ },
208
+ "errorNames": {
209
+ "error": "Error",
210
+ "generalError": "General",
211
+ "guardError": "Guard",
212
+ "conflictError": "Conflict",
213
+ "notFoundError": "Not Found",
214
+ "notSupportedError": "Not Supported",
215
+ "alreadyExistsError": "Already Exists",
216
+ "notImplementedError": "Not Implemented",
217
+ "validationError": "Validation",
218
+ "unprocessableError": "Unprocessable"
219
+ },
220
+ "validation": {
221
+ "defaultFieldName": "The field"
222
+ },
223
+ "errorMessages": {
224
+ "fetch": "Fetch"
225
+ },
226
+ "cli": {
227
+ "progress": {
228
+ "done": "Done.",
229
+ "error": "Error",
230
+ "loadingEnvFiles": "Loading env files",
231
+ "pleaseWait": "Please wait...",
232
+ "writingJsonFile": "Writing JSON file",
233
+ "writingEnvFile": "Writing env file",
234
+ "readingJsonFile": "Reading JSON file",
235
+ "readingEnvFile": "Reading env file"
236
+ },
237
+ "options": {
238
+ "lang": {
239
+ "param": "--lang '<'lang'>'",
240
+ "description": "The language to display the output in."
241
+ },
242
+ "load-env": {
243
+ "param": "--load-env [env...]",
244
+ "description": "Load the env files to initialise any environment variables."
245
+ },
246
+ "no-console": {
247
+ "param": "--no-console",
248
+ "description": "Hides the output in the console."
249
+ },
250
+ "json": {
251
+ "param": "--json '<'filename'>'",
252
+ "description": "Creates a JSON file containing the output."
253
+ },
254
+ "env": {
255
+ "param": "--env '<'filename'>'",
256
+ "description": "Creates an env file containing the output."
257
+ },
258
+ "merge-json": {
259
+ "param": "--merge-json",
260
+ "description": "If the JSON file already exists merge the data instead of overwriting."
261
+ },
262
+ "merge-env": {
263
+ "param": "--merge-env",
264
+ "description": "If the env file already exists merge the data instead of overwriting."
265
+ }
266
+ }
267
+ },
268
+ "commands": {
269
+ "ts-to-openapi": {
270
+ "options": {
271
+ "config": {
272
+ "param": "'<'config'>'",
273
+ "description": "Path to the JSON configuration file."
274
+ },
275
+ "output-file": {
276
+ "param": "'<'output-file'>'",
277
+ "description": "The JSON file to write the OpenAPI spec."
278
+ }
279
+ },
280
+ "progress": {
281
+ "loadingConfigJson": "Loading Config JSON",
282
+ "creatingWorkingDir": "Creating Working Directory",
283
+ "creatingSecuritySchemas": "Creating Security Schemas",
284
+ "generatingSchemas": "Generating Schemas",
285
+ "finalisingSchemas": "Finalising Schemas",
286
+ "writingOutputFile": "Writing Output File",
287
+ "models": "Models",
288
+ "installingNpmPackages": "Installing NPM Packages",
289
+ "processingPackage": "Processing Package",
290
+ "importingModule": "Importing Module",
291
+ "processingRoutes": "Processing Routes"
292
+ },
293
+ "labels": {
294
+ "configJson": "Config JSON",
295
+ "outputFile": "Output File",
296
+ "outputWorkingDir": "Output Working Directory",
297
+ "route": "Route"
298
+ }
299
+ }
300
+ }
301
+ }
@@ -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): Promise<number>;
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
@@ -1,5 +1,59 @@
1
1
  # @twin.org/ts-to-openapi - Changelog
2
2
 
3
- ## v0.0.4
3
+ ## [0.0.1-next.21](https://github.com/twinfoundation/tools/compare/ts-to-openapi-v0.0.1-next.20...ts-to-openapi-v0.0.1-next.21) (2025-04-17)
4
+
5
+
6
+ ### Features
7
+
8
+ * use shared store mechanism ([#31](https://github.com/twinfoundation/tools/issues/31)) ([d9fe68b](https://github.com/twinfoundation/tools/commit/d9fe68b903d1268c7cb3c64772df5cb78fd63667))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/nameof bumped from 0.0.1-next.20 to 0.0.1-next.21
16
+ * devDependencies
17
+ * @twin.org/merge-locales bumped from 0.0.1-next.20 to 0.0.1-next.21
18
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.20 to 0.0.1-next.21
19
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.20 to 0.0.1-next.21
20
+
21
+ ## [0.0.1-next.20](https://github.com/twinfoundation/tools/compare/ts-to-openapi-v0.0.1-next.19...ts-to-openapi-v0.0.1-next.20) (2025-03-28)
22
+
23
+
24
+ ### Miscellaneous Chores
25
+
26
+ * **ts-to-openapi:** Synchronize repo versions
27
+
28
+
29
+ ### Dependencies
30
+
31
+ * The following workspace dependencies were updated
32
+ * dependencies
33
+ * @twin.org/nameof bumped from 0.0.1-next.19 to 0.0.1-next.20
34
+ * devDependencies
35
+ * @twin.org/merge-locales bumped from 0.0.1-next.19 to 0.0.1-next.20
36
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.19 to 0.0.1-next.20
37
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.19 to 0.0.1-next.20
38
+
39
+ ## [0.0.1-next.19](https://github.com/twinfoundation/tools/compare/ts-to-openapi-v0.0.1-next.18...ts-to-openapi-v0.0.1-next.19) (2025-03-26)
40
+
41
+
42
+ ### Miscellaneous Chores
43
+
44
+ * **ts-to-openapi:** Synchronize repo versions
45
+
46
+
47
+ ### Dependencies
48
+
49
+ * The following workspace dependencies were updated
50
+ * dependencies
51
+ * @twin.org/nameof bumped from 0.0.1-next.18 to 0.0.1-next.19
52
+ * devDependencies
53
+ * @twin.org/merge-locales bumped from 0.0.1-next.18 to 0.0.1-next.19
54
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.18 to 0.0.1-next.19
55
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.18 to 0.0.1-next.19
56
+
57
+ ## v0.0.1-next.18
4
58
 
5
59
  - 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,20 +24,34 @@ 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
 
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
 
45
+ ##### options?
46
+
47
+ Additional options.
48
+
49
+ ###### overrideOutputWidth?
50
+
51
+ `number`
52
+
53
+ Override the output width.
54
+
41
55
  #### Returns
42
56
 
43
57
  `Promise`\<`number`\>
@@ -54,7 +68,9 @@ Configure any options or actions at the root program level.
54
68
 
55
69
  #### Parameters
56
70
 
57
- **program**: `Command`
71
+ ##### program
72
+
73
+ `Command`
58
74
 
59
75
  The root program command.
60
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
- **outputFile**: `string`
15
+ ### outputFile
16
+
17
+ `string`
14
18
 
15
19
  The output file for the generation OpenApi spec.
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 OpenAPI spec.
6
6
 
7
7
  ## Parameters
8
8
 
9
- **config**: [`ITsToOpenApiConfig`](../interfaces/ITsToOpenApiConfig.md)
9
+ ### config
10
+
11
+ [`ITsToOpenApiConfig`](../interfaces/ITsToOpenApiConfig.md)
10
12
 
11
13
  The configuration for the app.
12
14
 
13
- **outputFile**: `string`
15
+ ### outputFile
16
+
17
+ `string`
14
18
 
15
19
  The location of the file to output the OpenAPI spec.
16
20
 
17
- **workingDirectory**: `string`
21
+ ### workingDirectory
22
+
23
+ `string`
18
24
 
19
25
  The folder the app was run from.
20
26
 
@@ -66,6 +66,30 @@ The authentication methods.
66
66
 
67
67
  The packages containing routes.
68
68
 
69
+ #### package?
70
+
71
+ > `optional` **package**: `string`
72
+
73
+ The package containing the routes.
74
+
75
+ #### version?
76
+
77
+ > `optional` **version**: `string`
78
+
79
+ The version of the package to use, defaults to latest.
80
+
81
+ #### packageRoot?
82
+
83
+ > `optional` **packageRoot**: `string`
84
+
85
+ To point to a local instance of a package use this property instead of package/version.
86
+
87
+ #### entryPoints?
88
+
89
+ > `optional` **entryPoints**: [`ITsToOpenApiConfigEntryPoint`](ITsToOpenApiConfigEntryPoint.md)[]
90
+
91
+ The rest entry points to include, defaults to all exported entry points.
92
+
69
93
  ***
70
94
 
71
95
  ### externalReferences?
@@ -76,4 +100,4 @@ External type references
76
100
 
77
101
  #### Index Signature
78
102
 
79
- \[`id`: `string`\]: `string`
103
+ \[`id`: `string`\]: `string`
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@twin.org/ts-to-openapi",
3
- "version": "0.0.1-next.2",
3
+ "version": "0.0.1-next.21",
4
4
  "description": "Tool to convert TypeScript REST route definitions to OpenAPI Specifications",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/twinfoundation/tools.git",
8
- "directory": "packages/ts-to-openapi"
8
+ "directory": "apps/ts-to-openapi"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
11
11
  "license": "Apache-2.0",
@@ -13,54 +13,25 @@
13
13
  "engines": {
14
14
  "node": ">=20.0.0"
15
15
  },
16
- "scripts": {
17
- "clean": "rimraf dist coverage",
18
- "build": "tspc",
19
- "merge-locales": "merge-locales",
20
- "test": "vitest --run --config ./vitest.config.ts --no-cache",
21
- "coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
22
- "bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
23
- "bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
24
- "bundle": "npm run bundle:esm && npm run bundle:cjs",
25
- "docs:clean": "rimraf docs/reference",
26
- "docs:generate": "typedoc",
27
- "docs": "npm run docs:clean && npm run docs:generate",
28
- "dist": "npm run clean && npm run build && npm run merge-locales && npm run test && npm run bundle && npm run docs"
29
- },
30
16
  "dependencies": {
31
17
  "@twin.org/api-models": "next",
32
18
  "@twin.org/cli-core": "next",
33
19
  "@twin.org/core": "next",
34
- "@twin.org/nameof": "0.0.1-next.2",
20
+ "@twin.org/nameof": "0.0.1-next.21",
35
21
  "@twin.org/web": "next",
36
- "commander": "12.1.0",
37
- "glob": "11.0.0",
38
- "jsonschema": "1.4.1",
39
- "ts-json-schema-generator": "2.4.0-next.1"
40
- },
41
- "devDependencies": {
42
- "@twin.org/merge-locales": "0.0.1-next.2",
43
- "@twin.org/nameof-transformer": "0.0.1-next.2",
44
- "@types/node": "22.5.5",
45
- "@vitest/coverage-v8": "2.1.1",
46
- "copyfiles": "2.4.1",
47
- "rimraf": "6.0.1",
48
- "rollup": "4.21.3",
49
- "rollup-plugin-typescript2": "0.36.0",
50
- "ts-patch": "3.2.1",
51
- "typedoc": "0.26.7",
52
- "typedoc-plugin-markdown": "4.2.7",
53
- "typescript": "5.6.2",
54
- "vitest": "2.1.1"
22
+ "commander": "13.1.0",
23
+ "glob": "11.0.1",
24
+ "jsonschema": "1.5.0",
25
+ "ts-json-schema-generator": "2.4.0"
55
26
  },
56
27
  "main": "./dist/cjs/index.cjs",
57
28
  "module": "./dist/esm/index.mjs",
58
29
  "types": "./dist/types/index.d.ts",
59
30
  "exports": {
60
31
  ".": {
32
+ "types": "./dist/types/index.d.ts",
61
33
  "require": "./dist/cjs/index.cjs",
62
- "import": "./dist/esm/index.mjs",
63
- "types": "./dist/types/index.d.ts"
34
+ "import": "./dist/esm/index.mjs"
64
35
  }
65
36
  },
66
37
  "files": [