@twin.org/ts-to-schema 0.0.1-next.2 → 0.0.1-next.3
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.
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var path = require('node:path');
|
|
4
|
+
var node_url = require('node:url');
|
|
5
|
+
var cliCore = require('@twin.org/cli-core');
|
|
6
|
+
var promises = require('node:fs/promises');
|
|
7
|
+
var core = require('@twin.org/core');
|
|
8
|
+
var tsJsonSchemaGenerator = require('ts-json-schema-generator');
|
|
9
|
+
|
|
10
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
11
|
+
// Copyright 2024 IOTA Stiftung.
|
|
12
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
13
|
+
/**
|
|
14
|
+
* Build the root command to be consumed by the CLI.
|
|
15
|
+
* @param program The command to build on.
|
|
16
|
+
*/
|
|
17
|
+
function buildCommandTsToSchema(program) {
|
|
18
|
+
program
|
|
19
|
+
.argument(core.I18n.formatMessage("commands.ts-to-schema.options.config.param"), core.I18n.formatMessage("commands.ts-to-schema.options.config.description"))
|
|
20
|
+
.argument(core.I18n.formatMessage("commands.ts-to-schema.options.output-folder.param"), core.I18n.formatMessage("commands.ts-to-schema.options.output-folder.description"))
|
|
21
|
+
.action(async (config, outputFolder, opts) => {
|
|
22
|
+
await actionCommandTsToSchema(config, outputFolder);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Action the root command.
|
|
27
|
+
* @param configFile The optional configuration file.
|
|
28
|
+
* @param outputFolder The output folder for the schemas.
|
|
29
|
+
* @param opts The options for the command.
|
|
30
|
+
*/
|
|
31
|
+
async function actionCommandTsToSchema(configFile, outputFolder, opts) {
|
|
32
|
+
let outputWorkingDir;
|
|
33
|
+
try {
|
|
34
|
+
let config;
|
|
35
|
+
const fullConfigFile = path.resolve(configFile);
|
|
36
|
+
const fullOutputFolder = path.resolve(outputFolder);
|
|
37
|
+
outputWorkingDir = path.join(fullOutputFolder, "working");
|
|
38
|
+
cliCore.CLIDisplay.value(core.I18n.formatMessage("commands.ts-to-schema.labels.configJson"), fullConfigFile);
|
|
39
|
+
cliCore.CLIDisplay.value(core.I18n.formatMessage("commands.ts-to-schema.labels.outputFolder"), fullOutputFolder);
|
|
40
|
+
cliCore.CLIDisplay.value(core.I18n.formatMessage("commands.ts-to-schema.labels.outputWorkingDir"), outputWorkingDir);
|
|
41
|
+
cliCore.CLIDisplay.break();
|
|
42
|
+
try {
|
|
43
|
+
cliCore.CLIDisplay.task(core.I18n.formatMessage("commands.ts-to-schema.progress.loadingConfigJson"));
|
|
44
|
+
cliCore.CLIDisplay.break();
|
|
45
|
+
config = await cliCore.CLIUtils.readJsonFile(fullConfigFile);
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
throw new core.GeneralError("commands", "commands.ts-to-schema.configFailed", undefined, err);
|
|
49
|
+
}
|
|
50
|
+
if (core.Is.empty(config)) {
|
|
51
|
+
throw new core.GeneralError("commands", "commands.ts-to-schema.configFailed");
|
|
52
|
+
}
|
|
53
|
+
cliCore.CLIDisplay.task(core.I18n.formatMessage("commands.ts-to-schema.progress.creatingWorkingDir"));
|
|
54
|
+
await promises.mkdir(outputWorkingDir, { recursive: true });
|
|
55
|
+
cliCore.CLIDisplay.break();
|
|
56
|
+
await tsToSchema(config ?? {}, fullOutputFolder, outputWorkingDir);
|
|
57
|
+
cliCore.CLIDisplay.break();
|
|
58
|
+
cliCore.CLIDisplay.done();
|
|
59
|
+
}
|
|
60
|
+
finally {
|
|
61
|
+
try {
|
|
62
|
+
if (outputWorkingDir) {
|
|
63
|
+
await promises.rm(outputWorkingDir, { recursive: true });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
catch { }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Convert the TypeScript definitions to JSON Schemas.
|
|
71
|
+
* @param config The configuration for the app.
|
|
72
|
+
* @param outputFolder The location of the folder to output the JSON schemas.
|
|
73
|
+
* @param workingDirectory The folder the app was run from.
|
|
74
|
+
*/
|
|
75
|
+
async function tsToSchema(config, outputFolder, workingDirectory) {
|
|
76
|
+
await promises.writeFile(path.join(workingDirectory, "tsconfig.json"), JSON.stringify({
|
|
77
|
+
compilerOptions: {}
|
|
78
|
+
}, undefined, "\t"));
|
|
79
|
+
cliCore.CLIDisplay.task(core.I18n.formatMessage("commands.ts-to-schema.progress.generatingSchemas"));
|
|
80
|
+
const schemas = await generateSchemas(config.sources, config.types, workingDirectory);
|
|
81
|
+
cliCore.CLIDisplay.break();
|
|
82
|
+
cliCore.CLIDisplay.task(core.I18n.formatMessage("commands.ts-to-schema.progress.writingSchemas"));
|
|
83
|
+
for (const type of config.types) {
|
|
84
|
+
if (core.Is.empty(schemas[type])) {
|
|
85
|
+
throw new core.GeneralError("commands", "commands.ts-to-schema.schemaNotFound", { type });
|
|
86
|
+
}
|
|
87
|
+
let content = JSON.stringify(schemas[type], undefined, "\t");
|
|
88
|
+
if (core.Is.objectValue(config.externalReferences)) {
|
|
89
|
+
for (const external in config.externalReferences) {
|
|
90
|
+
content = content.replace(new RegExp(`#/definitions/${external}`, "g"), config.externalReferences[external]);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
content = content.replace(/#\/definitions\/I?/g, config.baseUrl);
|
|
94
|
+
const filename = path.join(outputFolder, `${core.StringHelper.stripPrefix(type)}.json`);
|
|
95
|
+
cliCore.CLIDisplay.value(core.I18n.formatMessage("commands.ts-to-schema.progress.writingSchema"), filename, 1);
|
|
96
|
+
await promises.writeFile(filename, content);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Generate schemas for the models.
|
|
101
|
+
* @param modelDirWildcards The filenames for all the models.
|
|
102
|
+
* @param types The types of the schema objects.
|
|
103
|
+
* @param outputWorkingDir The working directory.
|
|
104
|
+
* @returns Nothing.
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
async function generateSchemas(modelDirWildcards, types, outputWorkingDir) {
|
|
108
|
+
const allSchemas = {};
|
|
109
|
+
const arraySingularTypes = [];
|
|
110
|
+
for (const type of types) {
|
|
111
|
+
if (type.endsWith("[]")) {
|
|
112
|
+
const singularType = type.slice(0, -2);
|
|
113
|
+
arraySingularTypes.push(singularType);
|
|
114
|
+
if (!types.includes(singularType)) {
|
|
115
|
+
types.push(singularType);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
for (const files of modelDirWildcards) {
|
|
120
|
+
cliCore.CLIDisplay.value(core.I18n.formatMessage("commands.ts-to-schema.progress.models"), files.replace(/\\/g, "/"), 1);
|
|
121
|
+
const generator = tsJsonSchemaGenerator.createGenerator({
|
|
122
|
+
path: files.replace(/\\/g, "/"),
|
|
123
|
+
type: "*",
|
|
124
|
+
tsconfig: path.join(outputWorkingDir, "tsconfig.json"),
|
|
125
|
+
skipTypeCheck: true,
|
|
126
|
+
expose: "all"
|
|
127
|
+
});
|
|
128
|
+
const schema = generator.createSchema("*");
|
|
129
|
+
if (schema.definitions) {
|
|
130
|
+
for (const def in schema.definitions) {
|
|
131
|
+
// Remove the partial markers
|
|
132
|
+
let defSub = def.replace(/^Partial<(.*?)>/g, "$1");
|
|
133
|
+
// Cleanup the generic markers
|
|
134
|
+
defSub = defSub.replace(/</g, "%3C").replace(/>/g, "%3E");
|
|
135
|
+
allSchemas[defSub] = schema.definitions[def];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const referencedSchemas = {};
|
|
140
|
+
extractTypes(allSchemas, types, referencedSchemas);
|
|
141
|
+
for (const arraySingularType of arraySingularTypes) {
|
|
142
|
+
referencedSchemas[`${arraySingularType}[]`] = {
|
|
143
|
+
type: "array",
|
|
144
|
+
items: {
|
|
145
|
+
$ref: `#/components/schemas/${arraySingularType}`
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return referencedSchemas;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Extract the required types from all the known schemas.
|
|
153
|
+
* @param allSchemas All the known schemas.
|
|
154
|
+
* @param requiredTypes The required types.
|
|
155
|
+
* @param referencedSchemas The references schemas.
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
function extractTypes(allSchemas, requiredTypes, referencedSchemas) {
|
|
159
|
+
for (const type of requiredTypes) {
|
|
160
|
+
if (allSchemas[type] && !referencedSchemas[type]) {
|
|
161
|
+
referencedSchemas[type] = allSchemas[type];
|
|
162
|
+
extractTypesFromSchema(allSchemas, allSchemas[type], referencedSchemas);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Extract type from properties definition.
|
|
168
|
+
* @param allTypes All the known types.
|
|
169
|
+
* @param schema The schema to extract from.
|
|
170
|
+
* @param output The output types.
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
function extractTypesFromSchema(allTypes, schema, output) {
|
|
174
|
+
const additionalTypes = [];
|
|
175
|
+
if (core.Is.stringValue(schema.$ref)) {
|
|
176
|
+
additionalTypes.push(schema.$ref.replace("#/definitions/", "").replace(/^Partial%3C(.*?)%3E/g, "$1"));
|
|
177
|
+
}
|
|
178
|
+
else if (core.Is.object(schema.items)) {
|
|
179
|
+
if (core.Is.arrayValue(schema.items)) {
|
|
180
|
+
for (const itemSchema of schema.items) {
|
|
181
|
+
extractTypesFromSchema(allTypes, itemSchema, output);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
extractTypesFromSchema(allTypes, schema.items, output);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else if (core.Is.object(schema.properties) || core.Is.object(schema.additionalProperties)) {
|
|
189
|
+
if (core.Is.object(schema.properties)) {
|
|
190
|
+
for (const prop in schema.properties) {
|
|
191
|
+
const p = schema.properties[prop];
|
|
192
|
+
if (core.Is.object(p)) {
|
|
193
|
+
extractTypesFromSchema(allTypes, p, output);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (core.Is.object(schema.additionalProperties)) {
|
|
198
|
+
extractTypesFromSchema(allTypes, schema.additionalProperties, output);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
else if (core.Is.arrayValue(schema.anyOf)) {
|
|
202
|
+
for (const prop of schema.anyOf) {
|
|
203
|
+
if (core.Is.object(prop)) {
|
|
204
|
+
extractTypesFromSchema(allTypes, prop, output);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
else if (core.Is.arrayValue(schema.oneOf)) {
|
|
209
|
+
for (const prop of schema.oneOf) {
|
|
210
|
+
if (core.Is.object(prop)) {
|
|
211
|
+
extractTypesFromSchema(allTypes, prop, output);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (additionalTypes.length > 0) {
|
|
216
|
+
extractTypes(allTypes, additionalTypes, output);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Copyright 2024 IOTA Stiftung.
|
|
221
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
222
|
+
/**
|
|
223
|
+
* The main entry point for the CLI.
|
|
224
|
+
*/
|
|
225
|
+
class CLI extends cliCore.CLIBase {
|
|
226
|
+
/**
|
|
227
|
+
* Run the app.
|
|
228
|
+
* @param argv The process arguments.
|
|
229
|
+
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
230
|
+
* @returns The exit code.
|
|
231
|
+
*/
|
|
232
|
+
async run(argv, localesDirectory) {
|
|
233
|
+
return this.execute({
|
|
234
|
+
title: "TWIN TypeScript To Schema",
|
|
235
|
+
appName: "ts-to-schema",
|
|
236
|
+
version: "0.0.1-next.3",
|
|
237
|
+
icon: "⚙️ ",
|
|
238
|
+
supportsEnvFiles: false
|
|
239
|
+
}, 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);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Configure any options or actions at the root program level.
|
|
243
|
+
* @param program The root program command.
|
|
244
|
+
*/
|
|
245
|
+
configureRoot(program) {
|
|
246
|
+
buildCommandTsToSchema(program);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
exports.CLI = CLI;
|
|
251
|
+
exports.actionCommandTsToSchema = actionCommandTsToSchema;
|
|
252
|
+
exports.buildCommandTsToSchema = buildCommandTsToSchema;
|
|
253
|
+
exports.tsToSchema = tsToSchema;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { CLIDisplay, CLIUtils, CLIBase } from '@twin.org/cli-core';
|
|
4
|
+
import { mkdir, rm, writeFile } from 'node:fs/promises';
|
|
5
|
+
import { I18n, GeneralError, Is, StringHelper } from '@twin.org/core';
|
|
6
|
+
import { createGenerator } from 'ts-json-schema-generator';
|
|
7
|
+
|
|
8
|
+
// Copyright 2024 IOTA Stiftung.
|
|
9
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
10
|
+
/**
|
|
11
|
+
* Build the root command to be consumed by the CLI.
|
|
12
|
+
* @param program The command to build on.
|
|
13
|
+
*/
|
|
14
|
+
function buildCommandTsToSchema(program) {
|
|
15
|
+
program
|
|
16
|
+
.argument(I18n.formatMessage("commands.ts-to-schema.options.config.param"), I18n.formatMessage("commands.ts-to-schema.options.config.description"))
|
|
17
|
+
.argument(I18n.formatMessage("commands.ts-to-schema.options.output-folder.param"), I18n.formatMessage("commands.ts-to-schema.options.output-folder.description"))
|
|
18
|
+
.action(async (config, outputFolder, opts) => {
|
|
19
|
+
await actionCommandTsToSchema(config, outputFolder);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Action the root command.
|
|
24
|
+
* @param configFile The optional configuration file.
|
|
25
|
+
* @param outputFolder The output folder for the schemas.
|
|
26
|
+
* @param opts The options for the command.
|
|
27
|
+
*/
|
|
28
|
+
async function actionCommandTsToSchema(configFile, outputFolder, opts) {
|
|
29
|
+
let outputWorkingDir;
|
|
30
|
+
try {
|
|
31
|
+
let config;
|
|
32
|
+
const fullConfigFile = path.resolve(configFile);
|
|
33
|
+
const fullOutputFolder = path.resolve(outputFolder);
|
|
34
|
+
outputWorkingDir = path.join(fullOutputFolder, "working");
|
|
35
|
+
CLIDisplay.value(I18n.formatMessage("commands.ts-to-schema.labels.configJson"), fullConfigFile);
|
|
36
|
+
CLIDisplay.value(I18n.formatMessage("commands.ts-to-schema.labels.outputFolder"), fullOutputFolder);
|
|
37
|
+
CLIDisplay.value(I18n.formatMessage("commands.ts-to-schema.labels.outputWorkingDir"), outputWorkingDir);
|
|
38
|
+
CLIDisplay.break();
|
|
39
|
+
try {
|
|
40
|
+
CLIDisplay.task(I18n.formatMessage("commands.ts-to-schema.progress.loadingConfigJson"));
|
|
41
|
+
CLIDisplay.break();
|
|
42
|
+
config = await CLIUtils.readJsonFile(fullConfigFile);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
throw new GeneralError("commands", "commands.ts-to-schema.configFailed", undefined, err);
|
|
46
|
+
}
|
|
47
|
+
if (Is.empty(config)) {
|
|
48
|
+
throw new GeneralError("commands", "commands.ts-to-schema.configFailed");
|
|
49
|
+
}
|
|
50
|
+
CLIDisplay.task(I18n.formatMessage("commands.ts-to-schema.progress.creatingWorkingDir"));
|
|
51
|
+
await mkdir(outputWorkingDir, { recursive: true });
|
|
52
|
+
CLIDisplay.break();
|
|
53
|
+
await tsToSchema(config ?? {}, fullOutputFolder, outputWorkingDir);
|
|
54
|
+
CLIDisplay.break();
|
|
55
|
+
CLIDisplay.done();
|
|
56
|
+
}
|
|
57
|
+
finally {
|
|
58
|
+
try {
|
|
59
|
+
if (outputWorkingDir) {
|
|
60
|
+
await rm(outputWorkingDir, { recursive: true });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch { }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Convert the TypeScript definitions to JSON Schemas.
|
|
68
|
+
* @param config The configuration for the app.
|
|
69
|
+
* @param outputFolder The location of the folder to output the JSON schemas.
|
|
70
|
+
* @param workingDirectory The folder the app was run from.
|
|
71
|
+
*/
|
|
72
|
+
async function tsToSchema(config, outputFolder, workingDirectory) {
|
|
73
|
+
await writeFile(path.join(workingDirectory, "tsconfig.json"), JSON.stringify({
|
|
74
|
+
compilerOptions: {}
|
|
75
|
+
}, undefined, "\t"));
|
|
76
|
+
CLIDisplay.task(I18n.formatMessage("commands.ts-to-schema.progress.generatingSchemas"));
|
|
77
|
+
const schemas = await generateSchemas(config.sources, config.types, workingDirectory);
|
|
78
|
+
CLIDisplay.break();
|
|
79
|
+
CLIDisplay.task(I18n.formatMessage("commands.ts-to-schema.progress.writingSchemas"));
|
|
80
|
+
for (const type of config.types) {
|
|
81
|
+
if (Is.empty(schemas[type])) {
|
|
82
|
+
throw new GeneralError("commands", "commands.ts-to-schema.schemaNotFound", { type });
|
|
83
|
+
}
|
|
84
|
+
let content = JSON.stringify(schemas[type], undefined, "\t");
|
|
85
|
+
if (Is.objectValue(config.externalReferences)) {
|
|
86
|
+
for (const external in config.externalReferences) {
|
|
87
|
+
content = content.replace(new RegExp(`#/definitions/${external}`, "g"), config.externalReferences[external]);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
content = content.replace(/#\/definitions\/I?/g, config.baseUrl);
|
|
91
|
+
const filename = path.join(outputFolder, `${StringHelper.stripPrefix(type)}.json`);
|
|
92
|
+
CLIDisplay.value(I18n.formatMessage("commands.ts-to-schema.progress.writingSchema"), filename, 1);
|
|
93
|
+
await writeFile(filename, content);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Generate schemas for the models.
|
|
98
|
+
* @param modelDirWildcards The filenames for all the models.
|
|
99
|
+
* @param types The types of the schema objects.
|
|
100
|
+
* @param outputWorkingDir The working directory.
|
|
101
|
+
* @returns Nothing.
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
async function generateSchemas(modelDirWildcards, types, outputWorkingDir) {
|
|
105
|
+
const allSchemas = {};
|
|
106
|
+
const arraySingularTypes = [];
|
|
107
|
+
for (const type of types) {
|
|
108
|
+
if (type.endsWith("[]")) {
|
|
109
|
+
const singularType = type.slice(0, -2);
|
|
110
|
+
arraySingularTypes.push(singularType);
|
|
111
|
+
if (!types.includes(singularType)) {
|
|
112
|
+
types.push(singularType);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
for (const files of modelDirWildcards) {
|
|
117
|
+
CLIDisplay.value(I18n.formatMessage("commands.ts-to-schema.progress.models"), files.replace(/\\/g, "/"), 1);
|
|
118
|
+
const generator = createGenerator({
|
|
119
|
+
path: files.replace(/\\/g, "/"),
|
|
120
|
+
type: "*",
|
|
121
|
+
tsconfig: path.join(outputWorkingDir, "tsconfig.json"),
|
|
122
|
+
skipTypeCheck: true,
|
|
123
|
+
expose: "all"
|
|
124
|
+
});
|
|
125
|
+
const schema = generator.createSchema("*");
|
|
126
|
+
if (schema.definitions) {
|
|
127
|
+
for (const def in schema.definitions) {
|
|
128
|
+
// Remove the partial markers
|
|
129
|
+
let defSub = def.replace(/^Partial<(.*?)>/g, "$1");
|
|
130
|
+
// Cleanup the generic markers
|
|
131
|
+
defSub = defSub.replace(/</g, "%3C").replace(/>/g, "%3E");
|
|
132
|
+
allSchemas[defSub] = schema.definitions[def];
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const referencedSchemas = {};
|
|
137
|
+
extractTypes(allSchemas, types, referencedSchemas);
|
|
138
|
+
for (const arraySingularType of arraySingularTypes) {
|
|
139
|
+
referencedSchemas[`${arraySingularType}[]`] = {
|
|
140
|
+
type: "array",
|
|
141
|
+
items: {
|
|
142
|
+
$ref: `#/components/schemas/${arraySingularType}`
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
return referencedSchemas;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Extract the required types from all the known schemas.
|
|
150
|
+
* @param allSchemas All the known schemas.
|
|
151
|
+
* @param requiredTypes The required types.
|
|
152
|
+
* @param referencedSchemas The references schemas.
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
function extractTypes(allSchemas, requiredTypes, referencedSchemas) {
|
|
156
|
+
for (const type of requiredTypes) {
|
|
157
|
+
if (allSchemas[type] && !referencedSchemas[type]) {
|
|
158
|
+
referencedSchemas[type] = allSchemas[type];
|
|
159
|
+
extractTypesFromSchema(allSchemas, allSchemas[type], referencedSchemas);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Extract type from properties definition.
|
|
165
|
+
* @param allTypes All the known types.
|
|
166
|
+
* @param schema The schema to extract from.
|
|
167
|
+
* @param output The output types.
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
function extractTypesFromSchema(allTypes, schema, output) {
|
|
171
|
+
const additionalTypes = [];
|
|
172
|
+
if (Is.stringValue(schema.$ref)) {
|
|
173
|
+
additionalTypes.push(schema.$ref.replace("#/definitions/", "").replace(/^Partial%3C(.*?)%3E/g, "$1"));
|
|
174
|
+
}
|
|
175
|
+
else if (Is.object(schema.items)) {
|
|
176
|
+
if (Is.arrayValue(schema.items)) {
|
|
177
|
+
for (const itemSchema of schema.items) {
|
|
178
|
+
extractTypesFromSchema(allTypes, itemSchema, output);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
extractTypesFromSchema(allTypes, schema.items, output);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
else if (Is.object(schema.properties) || Is.object(schema.additionalProperties)) {
|
|
186
|
+
if (Is.object(schema.properties)) {
|
|
187
|
+
for (const prop in schema.properties) {
|
|
188
|
+
const p = schema.properties[prop];
|
|
189
|
+
if (Is.object(p)) {
|
|
190
|
+
extractTypesFromSchema(allTypes, p, output);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (Is.object(schema.additionalProperties)) {
|
|
195
|
+
extractTypesFromSchema(allTypes, schema.additionalProperties, output);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
else if (Is.arrayValue(schema.anyOf)) {
|
|
199
|
+
for (const prop of schema.anyOf) {
|
|
200
|
+
if (Is.object(prop)) {
|
|
201
|
+
extractTypesFromSchema(allTypes, prop, output);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else if (Is.arrayValue(schema.oneOf)) {
|
|
206
|
+
for (const prop of schema.oneOf) {
|
|
207
|
+
if (Is.object(prop)) {
|
|
208
|
+
extractTypesFromSchema(allTypes, prop, output);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (additionalTypes.length > 0) {
|
|
213
|
+
extractTypes(allTypes, additionalTypes, output);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Copyright 2024 IOTA Stiftung.
|
|
218
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
219
|
+
/**
|
|
220
|
+
* The main entry point for the CLI.
|
|
221
|
+
*/
|
|
222
|
+
class CLI extends CLIBase {
|
|
223
|
+
/**
|
|
224
|
+
* Run the app.
|
|
225
|
+
* @param argv The process arguments.
|
|
226
|
+
* @param localesDirectory The directory for the locales, default to relative to the script.
|
|
227
|
+
* @returns The exit code.
|
|
228
|
+
*/
|
|
229
|
+
async run(argv, localesDirectory) {
|
|
230
|
+
return this.execute({
|
|
231
|
+
title: "TWIN TypeScript To Schema",
|
|
232
|
+
appName: "ts-to-schema",
|
|
233
|
+
version: "0.0.1-next.3",
|
|
234
|
+
icon: "⚙️ ",
|
|
235
|
+
supportsEnvFiles: false
|
|
236
|
+
}, localesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), "../locales"), argv);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Configure any options or actions at the root program level.
|
|
240
|
+
* @param program The root program command.
|
|
241
|
+
*/
|
|
242
|
+
configureRoot(program) {
|
|
243
|
+
buildCommandTsToSchema(program);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export { CLI, actionCommandTsToSchema, buildCommandTsToSchema, tsToSchema };
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
{
|
|
2
|
+
"error": {
|
|
3
|
+
"commands": {
|
|
4
|
+
"ts-to-schema": {
|
|
5
|
+
"configFailed": "Configuration failed to load.",
|
|
6
|
+
"schemaNotFound": "Could not find the requested schema in the generated types \"{type}\"."
|
|
7
|
+
},
|
|
8
|
+
"common": {
|
|
9
|
+
"missingEnv": "The \"{option}\" option is configured as an environment variable, but there is no environment variable with the name \"{value}\" set.",
|
|
10
|
+
"optionInvalidHex": "The \"{option}\" does not appear to be hex. \"{value}\"",
|
|
11
|
+
"optionInvalidBase64": "The \"{option}\" does not appear to be base64. \"{value}\"",
|
|
12
|
+
"optionInvalidHexBase64": "The \"{option}\" does not appear to be hex or base64. \"{value}\"",
|
|
13
|
+
"optionInvalidBech32": "The \"{option}\" does not appear to be bech32. \"{value}\"",
|
|
14
|
+
"optionMinValue": "The \"{option}\" option must be greater than or equal to {minValue}, it is {value}.",
|
|
15
|
+
"optionMaxValue": "The \"{option}\" option must be less than or equal to {maxValue}, it is {value}."
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"validation": {
|
|
19
|
+
"beEmpty": "{fieldName} must be empty",
|
|
20
|
+
"beNotEmpty": "{fieldName} must not be empty",
|
|
21
|
+
"beText": "{fieldName} must be text",
|
|
22
|
+
"beTextValue": "{fieldName} must contain some text",
|
|
23
|
+
"beTextMinMax": "{fieldName} must be longer than {minLength} and shorter than {maxLength} characters",
|
|
24
|
+
"beTextMin": "{fieldName} must be longer than {minLength} characters",
|
|
25
|
+
"beTextMax": "{fieldName} must be shorter than {maxLength} characters",
|
|
26
|
+
"beNumber": "{fieldName} must be a number",
|
|
27
|
+
"beNumberMinMax": "{fieldName} must be >= {minValue} and <= {maxValue}",
|
|
28
|
+
"beNumberMin": "{fieldName} must be >= {minValue}",
|
|
29
|
+
"beNumberMax": "{fieldName} must be <= {maxValue}",
|
|
30
|
+
"beWholeNumber": "{fieldName} must be a whole number",
|
|
31
|
+
"beWholeNumberMinMax": "{fieldName} must be a whole number >= {minValue} and <= {maxValue}",
|
|
32
|
+
"beWholeNumberMin": "{fieldName} must be a whole number >= {minValue}",
|
|
33
|
+
"beWholeNumberMax": "{fieldName} must be a whole number <= {maxValue}",
|
|
34
|
+
"beBigInteger": "{fieldName} must be a bigint",
|
|
35
|
+
"beBigIntegerMinMax": "{fieldName} must be a bigint >= {minValue} and <= {maxValue}",
|
|
36
|
+
"beBigIntegerMin": "{fieldName} must be a bigint >= {minValue}",
|
|
37
|
+
"beBigIntegerMax": "{fieldName} must be a bigint <= {maxValue}",
|
|
38
|
+
"beBoolean": "{fieldName} must be true or false",
|
|
39
|
+
"beDate": "{fieldName} must be a date",
|
|
40
|
+
"beDateTime": "{fieldName} must be a date/time",
|
|
41
|
+
"beTime": "{fieldName} must be a time",
|
|
42
|
+
"beTimestampMilliseconds": "{fieldName} must be a timestamp in milliseconds",
|
|
43
|
+
"beTimestampSeconds": "{fieldName} must be a timestamp in seconds",
|
|
44
|
+
"beObject": "{fieldName} must be an object",
|
|
45
|
+
"beArray": "{fieldName} must be an array",
|
|
46
|
+
"beArrayValue": "{fieldName} must be an array with at least one item",
|
|
47
|
+
"beIncluded": "{fieldName} is unrecognised",
|
|
48
|
+
"beByteArray": "{fieldName} must be a byte array",
|
|
49
|
+
"beUrn": "{fieldName} must be a correctly formatted urn",
|
|
50
|
+
"beUrl": "{fieldName} must be a correctly formatted url",
|
|
51
|
+
"beJSON": "{fieldName} must be correctly formatted JSON",
|
|
52
|
+
"beEmail": "{fieldName} must be a correctly formatted e-mail address",
|
|
53
|
+
"failed": "Validation failed",
|
|
54
|
+
"failedObject": "Validation of \"{objectName}\" failed"
|
|
55
|
+
},
|
|
56
|
+
"guard": {
|
|
57
|
+
"undefined": "Property \"{property}\" must be defined, it is \"{value}\"",
|
|
58
|
+
"string": "Property \"{property}\" must be a string, it is \"{value}\"",
|
|
59
|
+
"stringEmpty": "Property \"{property}\" must have a value, it is empty",
|
|
60
|
+
"stringBase64": "Property \"{property}\" must be a base64 encoded string, it is \"{value}\"",
|
|
61
|
+
"stringBase64Url": "Property \"{property}\" must be a base64 url encoded string, it is \"{value}\"",
|
|
62
|
+
"stringHex": "Property \"{property}\" must be a hex string, it is \"{value}\"",
|
|
63
|
+
"stringHexLength": "Property \"{property}\" must be a hex string of length \"{options}\", it is \"{value}\"",
|
|
64
|
+
"number": "Property \"{property}\" must be a number, it is \"{value}\"",
|
|
65
|
+
"integer": "Property \"{property}\" must be an integer, it is \"{value}\"",
|
|
66
|
+
"bigint": "Property \"{property}\" must be a bigint, it is \"{value}\"",
|
|
67
|
+
"boolean": "Property \"{property}\" must be a boolean, it is \"{value}\"",
|
|
68
|
+
"date": "Property \"{property}\" must be a date, it is \"{value}\"",
|
|
69
|
+
"timestampMilliseconds": "Property \"{property}\" must be a timestamp in milliseconds, it is \"{value}\"",
|
|
70
|
+
"timestampSeconds": "Property \"{property}\" must be a timestamp in seconds, it is \"{value}\"",
|
|
71
|
+
"objectUndefined": "Property \"{property}\" must be an object, it is \"undefined\"",
|
|
72
|
+
"object": "Property \"{property}\" must be an object, it is \"{value}\"",
|
|
73
|
+
"objectValue": "Property \"{property}\" must be an object, with at least one property, it is \"{value}\"",
|
|
74
|
+
"array": "Property \"{property}\" must be an array, it is \"{value}\"",
|
|
75
|
+
"arrayValue": "Property \"{property}\" must be an array with at least one item",
|
|
76
|
+
"arrayOneOf": "Property \"{property}\" must be one of [{options}], it is \"{value}\"",
|
|
77
|
+
"uint8Array": "Property \"{property}\" must be a Uint8Array, it is \"{value}\"",
|
|
78
|
+
"function": "Property \"{property}\" must be a function, it is \"{value}\"",
|
|
79
|
+
"urn": "Property \"{property}\" must be a Urn formatted string, it is \"{value}\"",
|
|
80
|
+
"url": "Property \"{property}\" must be a Url formatted string, it is \"{value}\"",
|
|
81
|
+
"email": "Property \"{property}\" must be string in e-mail format, it is \"{value}\"",
|
|
82
|
+
"length32Multiple": "Property \"{property}\" should be a multiple of 32, it is {value}",
|
|
83
|
+
"lengthEntropy": "Property \"{property}\" should be a multiple of 4, >=16 and <= 32, it is {value}",
|
|
84
|
+
"length3Multiple": "Property \"{property}\" should be a multiple of 3, it is {value}",
|
|
85
|
+
"greaterThan0": "Property \"{property}\" must be greater than zero, it is {value}"
|
|
86
|
+
},
|
|
87
|
+
"objectHelper": {
|
|
88
|
+
"failedBytesToJSON": "Failed converting bytes to JSON"
|
|
89
|
+
},
|
|
90
|
+
"common": {
|
|
91
|
+
"notImplementedMethod": "The method \"{method}\" has not been implemented",
|
|
92
|
+
"validation": "Validation failed"
|
|
93
|
+
},
|
|
94
|
+
"factory": {
|
|
95
|
+
"noUnregister": "There is no {typeName} registered with the name \"{name}\"",
|
|
96
|
+
"noGet": "The requested {typeName} \"{name}\" does not exist in the factory"
|
|
97
|
+
},
|
|
98
|
+
"bitString": {
|
|
99
|
+
"outOfRange": "The index should be >= 0 and less than the length of the bit string"
|
|
100
|
+
},
|
|
101
|
+
"bip39": {
|
|
102
|
+
"missingMnemonicWord": "The mnemonic contains a word not in the wordlist, \"{value}\"",
|
|
103
|
+
"checksumMismatch": "The checksum does not match \"{newChecksum}\" != \"{checksumBits}\""
|
|
104
|
+
},
|
|
105
|
+
"ed25519": {
|
|
106
|
+
"privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
|
|
107
|
+
"publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
|
|
108
|
+
},
|
|
109
|
+
"secp256k1": {
|
|
110
|
+
"privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
|
|
111
|
+
"publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
|
|
112
|
+
},
|
|
113
|
+
"x25519": {
|
|
114
|
+
"invalidPublicKey": "Invalid Ed25519 Public Key"
|
|
115
|
+
},
|
|
116
|
+
"blake2b": {
|
|
117
|
+
"outputLength64": "The output length should be between 1 and 64, it is \"{outputLength}\"",
|
|
118
|
+
"keyLength64": "The key length should be between 1 and 64, it is \"{keyLength}\""
|
|
119
|
+
},
|
|
120
|
+
"sha512": {
|
|
121
|
+
"bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
|
|
122
|
+
},
|
|
123
|
+
"sha256": {
|
|
124
|
+
"bitSize": "Only 224 or 256 bits are supported, it is \"{bitSize}\""
|
|
125
|
+
},
|
|
126
|
+
"hmacSha256": {
|
|
127
|
+
"bitSize": "Only 224 or 256 bits are supported, it is \"{bitSize}\""
|
|
128
|
+
},
|
|
129
|
+
"hmacSha512": {
|
|
130
|
+
"bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
|
|
131
|
+
},
|
|
132
|
+
"base32": {
|
|
133
|
+
"invalidCharacter": "Data contains a character \"{invalidCharacter}\" which is not in the charset"
|
|
134
|
+
},
|
|
135
|
+
"base64": {
|
|
136
|
+
"length4Multiple": "Invalid length should be a multiple of 4, it is \"{value}\""
|
|
137
|
+
},
|
|
138
|
+
"bech32": {
|
|
139
|
+
"decodeFailed": "The address contains decoding failed for address \"{bech32}\"",
|
|
140
|
+
"invalidChecksum": "The address contains an invalid checksum in address, \"{bech32}\"",
|
|
141
|
+
"separatorMisused": "The separator character '1' should only be used between hrp and data, \"{bech32}\"",
|
|
142
|
+
"lowerUpper": "The address my use either lowercase or uppercase, \"{bech32}\"",
|
|
143
|
+
"dataTooShort": "The address does not contain enough data to decode, \"{bech32}\""
|
|
144
|
+
},
|
|
145
|
+
"pbkdf2": {
|
|
146
|
+
"keyTooLong": "The requested key length \"{keyLength}\" is too long, based on the \"{macLength}\""
|
|
147
|
+
},
|
|
148
|
+
"chaCha20Poly1305": {
|
|
149
|
+
"noAadWithData": "You can not set the aad when there is already data",
|
|
150
|
+
"noAuthTag": "Can not finalise when the auth tag is not set",
|
|
151
|
+
"authenticationFailed": "The data could not be authenticated",
|
|
152
|
+
"authTagDecrypting": "Can not get the auth tag when decrypting",
|
|
153
|
+
"authTagEncrypting": "Can not set the auth tag when encrypting",
|
|
154
|
+
"noAuthTagSet": "The auth tag has not been set"
|
|
155
|
+
},
|
|
156
|
+
"bip44": {
|
|
157
|
+
"unsupportedKeyType": "The key type \"{keyType}\" is not supported"
|
|
158
|
+
},
|
|
159
|
+
"slip0010": {
|
|
160
|
+
"invalidSeed": "The seed is invalid \"{seed}\""
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"commands": {
|
|
164
|
+
"ts-to-schema": {
|
|
165
|
+
"options": {
|
|
166
|
+
"config": {
|
|
167
|
+
"param": "'<'config'>'",
|
|
168
|
+
"description": "Path to the JSON configuration file."
|
|
169
|
+
},
|
|
170
|
+
"output-folder": {
|
|
171
|
+
"param": "'<'output-folder'>'",
|
|
172
|
+
"description": "The folder to write the schema files."
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"progress": {
|
|
176
|
+
"loadingConfigJson": "Loading Config JSON",
|
|
177
|
+
"creatingWorkingDir": "Creating Working Directory",
|
|
178
|
+
"generatingSchemas": "Generating Schemas",
|
|
179
|
+
"finalisingSchemas": "Finalising Schemas",
|
|
180
|
+
"writingSchemas": "Writing Schemas",
|
|
181
|
+
"writingSchema": "Writing Schema",
|
|
182
|
+
"models": "Models"
|
|
183
|
+
},
|
|
184
|
+
"labels": {
|
|
185
|
+
"configJson": "Config JSON",
|
|
186
|
+
"outputFolder": "Output Folder",
|
|
187
|
+
"outputWorkingDir": "Output Working Directory"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"cli": {
|
|
192
|
+
"progress": {
|
|
193
|
+
"done": "Done.",
|
|
194
|
+
"error": "Error",
|
|
195
|
+
"loadingEnvFiles": "Loading env files",
|
|
196
|
+
"pleaseWait": "Please wait...",
|
|
197
|
+
"writingJsonFile": "Writing JSON file",
|
|
198
|
+
"writingEnvFile": "Writing env file",
|
|
199
|
+
"readingJsonFile": "Reading JSON file",
|
|
200
|
+
"readingEnvFile": "Reading env file"
|
|
201
|
+
},
|
|
202
|
+
"options": {
|
|
203
|
+
"lang": {
|
|
204
|
+
"param": "--lang '<'lang'>'",
|
|
205
|
+
"description": "The language to display the output in."
|
|
206
|
+
},
|
|
207
|
+
"load-env": {
|
|
208
|
+
"param": "--load-env [env...]",
|
|
209
|
+
"description": "Load the env files to initialise any environment variables."
|
|
210
|
+
},
|
|
211
|
+
"no-console": {
|
|
212
|
+
"param": "--no-console",
|
|
213
|
+
"description": "Hides the output in the console."
|
|
214
|
+
},
|
|
215
|
+
"json": {
|
|
216
|
+
"param": "--json '<'filename'>'",
|
|
217
|
+
"description": "Creates a JSON file containing the output."
|
|
218
|
+
},
|
|
219
|
+
"env": {
|
|
220
|
+
"param": "--env '<'filename'>'",
|
|
221
|
+
"description": "Creates an env file containing the output."
|
|
222
|
+
},
|
|
223
|
+
"merge-json": {
|
|
224
|
+
"param": "--merge-json",
|
|
225
|
+
"description": "If the JSON file already exists merge the data instead of overwriting."
|
|
226
|
+
},
|
|
227
|
+
"merge-env": {
|
|
228
|
+
"param": "--merge-env",
|
|
229
|
+
"description": "If the env file already exists merge the data instead of overwriting."
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"errorNames": {
|
|
234
|
+
"error": "Error",
|
|
235
|
+
"generalError": "General",
|
|
236
|
+
"guardError": "Guard",
|
|
237
|
+
"conflictError": "Conflict",
|
|
238
|
+
"notFoundError": "Not Found",
|
|
239
|
+
"notSupportedError": "Not Supported",
|
|
240
|
+
"alreadyExistsError": "Already Exists",
|
|
241
|
+
"notImplementedError": "Not Implemented",
|
|
242
|
+
"validationError": "Validation",
|
|
243
|
+
"unprocessableError": "Unprocessable"
|
|
244
|
+
},
|
|
245
|
+
"validation": {
|
|
246
|
+
"defaultFieldName": "The field"
|
|
247
|
+
}
|
|
248
|
+
}
|
package/docs/changelog.md
CHANGED
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.3",
|
|
4
4
|
"description": "Tool to convert TypeScript definitions to JSON schemas",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@twin.org/cli-core": "next",
|
|
32
32
|
"@twin.org/core": "next",
|
|
33
|
-
"@twin.org/nameof": "0.0.1-next.
|
|
33
|
+
"@twin.org/nameof": "0.0.1-next.3",
|
|
34
34
|
"commander": "12.1.0",
|
|
35
35
|
"glob": "11.0.0",
|
|
36
36
|
"jsonschema": "1.4.1",
|
|
37
37
|
"ts-json-schema-generator": "2.4.0-next.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@twin.org/merge-locales": "0.0.1-next.
|
|
41
|
-
"@twin.org/nameof-transformer": "0.0.1-next.
|
|
40
|
+
"@twin.org/merge-locales": "0.0.1-next.3",
|
|
41
|
+
"@twin.org/nameof-transformer": "0.0.1-next.3",
|
|
42
42
|
"@types/node": "22.5.5",
|
|
43
43
|
"@vitest/coverage-v8": "2.1.1",
|
|
44
44
|
"copyfiles": "2.4.1",
|
|
File without changes
|