yuppi 1.3.16 → 1.3.17
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/main.js +3 -3
- package/dist/main.mjs +3 -3
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -38,7 +38,7 @@ module.exports = __toCommonJS(main_exports);
|
|
|
38
38
|
// src/Yuppi.class.ts
|
|
39
39
|
var import_json_schema_to_typescript = require("json-schema-to-typescript");
|
|
40
40
|
var import_lodash = __toESM(require("lodash.merge"));
|
|
41
|
-
var
|
|
41
|
+
var import_promises = __toESM(require("fs/promises"));
|
|
42
42
|
var import_path = __toESM(require("path"));
|
|
43
43
|
|
|
44
44
|
// src/utils/ConvertToJSONSchema.util.ts
|
|
@@ -256,8 +256,8 @@ var Yuppi = class {
|
|
|
256
256
|
*/`;
|
|
257
257
|
void (async () => {
|
|
258
258
|
const type = await (0, import_json_schema_to_typescript.compile)(this.convertToJSONSchema(schema), name, { bannerComment: banner_comment });
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
await import_promises.default.mkdir(types_dir, { recursive: true });
|
|
260
|
+
await import_promises.default.writeFile(import_path.default.join(types_dir, `${name}.d.ts`), type);
|
|
261
261
|
})();
|
|
262
262
|
}
|
|
263
263
|
convertToYup(schema) {
|
package/dist/main.mjs
CHANGED
|
@@ -7,7 +7,7 @@ var __export = (target, all) => {
|
|
|
7
7
|
// src/Yuppi.class.ts
|
|
8
8
|
import { compile } from "json-schema-to-typescript";
|
|
9
9
|
import merge from "lodash.merge";
|
|
10
|
-
import fs from "fs";
|
|
10
|
+
import fs from "fs/promises";
|
|
11
11
|
import path from "path";
|
|
12
12
|
|
|
13
13
|
// src/utils/ConvertToJSONSchema.util.ts
|
|
@@ -225,8 +225,8 @@ var Yuppi = class {
|
|
|
225
225
|
*/`;
|
|
226
226
|
void (async () => {
|
|
227
227
|
const type = await compile(this.convertToJSONSchema(schema), name, { bannerComment: banner_comment });
|
|
228
|
-
fs.
|
|
229
|
-
fs.
|
|
228
|
+
await fs.mkdir(types_dir, { recursive: true });
|
|
229
|
+
await fs.writeFile(path.join(types_dir, `${name}.d.ts`), type);
|
|
230
230
|
})();
|
|
231
231
|
}
|
|
232
232
|
convertToYup(schema) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yuppi",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.17",
|
|
4
4
|
"description": "Schemas that can be converted to Yup and JSON Schema.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/keift/yuppi",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"lint": "eslint ./"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sinclair/typebox": "^0.34.
|
|
18
|
+
"@sinclair/typebox": "^0.34.47",
|
|
19
19
|
"@types/lodash.merge": "^4.6.9",
|
|
20
20
|
"json-schema-to-typescript": "^15.0.4",
|
|
21
21
|
"lodash.merge": "^4.6.2",
|