Skip to content

Commit b885f2e

Browse files
Chore(deps-dev): bump the update-npm-dependencies group with 2 updates (#110)
1 parent af98434 commit b885f2e

File tree

4 files changed

+67
-49
lines changed

4 files changed

+67
-49
lines changed

package-lock.json

Lines changed: 39 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"@types/lodash": "^4.17.0",
8989
"@types/luxon": "^3.4.2",
9090
"@types/qrcode": "^1.5.5",
91-
"ts-json-schema-generator": "^2.0.1"
91+
"ts-json-schema-generator": "^2.1.0"
9292
},
9393
"publishConfig": {
9494
"access": "public",
Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
const tsj = require("ts-json-schema-generator");
21
const fs = require("fs");
32
const path = require("path");
43

5-
const config = {
6-
tsconfig: path.join(__dirname, "../tsconfig.json"),
7-
type: "*",
8-
extraTags: ["errorMessage"]
9-
};
4+
import("ts-json-schema-generator").then((tsj) => {
5+
const config = {
6+
tsconfig: path.join(__dirname, "../tsconfig.json"),
7+
type: "*",
8+
extraTags: ["errorMessage"]
9+
};
1010

11-
const schemaGenerator = tsj.createGenerator(config);
11+
const schemaGenerator = tsj.createGenerator(config);
1212

13-
const requestTypes = schemaGenerator
14-
.getRootNodes()
15-
.map((x) => x.symbol.escapedName)
16-
.filter((x) => x.endsWith("Request"));
13+
const requestTypes = schemaGenerator
14+
.getRootNodes()
15+
.map((x) => x.symbol.escapedName)
16+
.filter((x) => x.endsWith("Request"));
1717

18-
const schemaDeclarations = requestTypes
19-
.map((type) => {
20-
try {
21-
const schema = schemaGenerator.createSchema(type);
22-
return `export const ${type}: any = ${JSON.stringify(schema, undefined, 4)}`;
23-
} catch (e) {
24-
if (!(e instanceof tsj.NoRootTypeError)) throw e;
25-
}
26-
})
27-
.filter((s) => s)
28-
.join("\n\n");
18+
const schemaDeclarations = requestTypes
19+
.map((type) => {
20+
try {
21+
const schema = schemaGenerator.createSchema(type);
22+
return `export const ${type}: any = ${JSON.stringify(schema, undefined, 4)}`;
23+
} catch (e) {
24+
if (!(e instanceof tsj.NoRootTypeError)) throw e;
25+
}
26+
})
27+
.filter((s) => s)
28+
.join("\n\n");
2929

30-
const output_path = path.join(__dirname, "../src/useCases/common/Schemas.ts");
30+
const output_path = path.join(__dirname, "../src/useCases/common/Schemas.ts");
3131

32-
fs.writeFile(output_path, schemaDeclarations, (err) => {
33-
if (err) throw err;
32+
fs.writeFile(output_path, schemaDeclarations, (err) => {
33+
if (err) throw err;
34+
});
3435
});

packages/transport/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"@types/json-stringify-safe": "^5.0.3",
9393
"@types/lodash": "^4.17.0",
9494
"@types/luxon": "^3.4.2",
95-
"@types/qs": "^6.9.14",
95+
"@types/qs": "^6.9.15",
9696
"@types/uuid": "^9.0.8",
9797
"expect": "^29.7.0",
9898
"ts-mockito": "^2.6.1"

0 commit comments

Comments
 (0)