@forklaunch/validator 0.10.15 → 0.10.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/lib/src/typebox/index.js
CHANGED
|
@@ -561,7 +561,7 @@ var TypeboxSchemaValidator = class {
|
|
|
561
561
|
format: "date-time"
|
|
562
562
|
});
|
|
563
563
|
} else {
|
|
564
|
-
processedSchema =
|
|
564
|
+
processedSchema = (0, import_common.deepCloneWithoutUndefined)(schemified);
|
|
565
565
|
}
|
|
566
566
|
const newSchema = Object.assign({}, processedSchema);
|
|
567
567
|
if (Object.hasOwn(newSchema, "properties")) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export * from "@sinclair/typebox";
|
|
3
3
|
|
|
4
4
|
// src/typebox/typeboxSchemaValidator.ts
|
|
5
|
-
import { InMemoryBlob } from "@forklaunch/common";
|
|
5
|
+
import { deepCloneWithoutUndefined, InMemoryBlob } from "@forklaunch/common";
|
|
6
6
|
import {
|
|
7
7
|
FormatRegistry,
|
|
8
8
|
Kind,
|
|
@@ -512,7 +512,7 @@ var TypeboxSchemaValidator = class {
|
|
|
512
512
|
format: "date-time"
|
|
513
513
|
});
|
|
514
514
|
} else {
|
|
515
|
-
processedSchema =
|
|
515
|
+
processedSchema = deepCloneWithoutUndefined(schemified);
|
|
516
516
|
}
|
|
517
517
|
const newSchema = Object.assign({}, processedSchema);
|
|
518
518
|
if (Object.hasOwn(newSchema, "properties")) {
|
package/lib/src/zod/index.js
CHANGED
|
@@ -58,6 +58,7 @@ __export(zod_exports, {
|
|
|
58
58
|
module.exports = __toCommonJS(zod_exports);
|
|
59
59
|
|
|
60
60
|
// src/zod/zodSchemaValidator.ts
|
|
61
|
+
var import_common = require("@forklaunch/common");
|
|
61
62
|
var import_v32 = require("zod/v3");
|
|
62
63
|
|
|
63
64
|
// shims/zod-v3-openapi/zod-openapi.ts
|
|
@@ -979,7 +980,8 @@ var ZodSchemaValidator = class {
|
|
|
979
980
|
* @returns {SchemaObject} The OpenAPI schema object.
|
|
980
981
|
*/
|
|
981
982
|
openapi(schema) {
|
|
982
|
-
|
|
983
|
+
const schemified = this.schemify(schema);
|
|
984
|
+
return generateSchema((0, import_common.deepCloneWithoutUndefined)(schemified));
|
|
983
985
|
}
|
|
984
986
|
};
|
|
985
987
|
|
package/lib/src/zod/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/zod/zodSchemaValidator.ts
|
|
2
|
+
import { deepCloneWithoutUndefined } from "@forklaunch/common";
|
|
2
3
|
import {
|
|
3
4
|
z as z2,
|
|
4
5
|
ZodType
|
|
@@ -923,7 +924,8 @@ var ZodSchemaValidator = class {
|
|
|
923
924
|
* @returns {SchemaObject} The OpenAPI schema object.
|
|
924
925
|
*/
|
|
925
926
|
openapi(schema) {
|
|
926
|
-
|
|
927
|
+
const schemified = this.schemify(schema);
|
|
928
|
+
return generateSchema(deepCloneWithoutUndefined(schemified));
|
|
927
929
|
}
|
|
928
930
|
};
|
|
929
931
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/validator",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.17",
|
|
4
4
|
"description": "Schema validator for ForkLaunch components.",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@sinclair/typebox": "^0.34.41",
|
|
62
62
|
"ts-deepmerge": "^7.0.3",
|
|
63
|
-
"zod": "^4.1.
|
|
64
|
-
"@forklaunch/common": "0.6.
|
|
63
|
+
"zod": "^4.1.12",
|
|
64
|
+
"@forklaunch/common": "0.6.17"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@eslint/js": "^9.37.0",
|
|
68
68
|
"@types/jest": "^30.0.0",
|
|
69
|
-
"@types/node": "^24.
|
|
70
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
69
|
+
"@types/node": "^24.7.0",
|
|
70
|
+
"@typescript/native-preview": "7.0.0-dev.20251007.1",
|
|
71
71
|
"@vitest/coverage-v8": "^3.2.4",
|
|
72
72
|
"eslint-config-prettier": "^10.1.8",
|
|
73
73
|
"eslint-plugin-prettier": "^5.5.4",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"ts-node": "^10.9.2",
|
|
79
79
|
"tsup": "^8.5.0",
|
|
80
80
|
"typedoc": "^0.28.13",
|
|
81
|
-
"typescript-eslint": "^8.
|
|
81
|
+
"typescript-eslint": "^8.46.0"
|
|
82
82
|
},
|
|
83
83
|
"scripts": {
|
|
84
84
|
"build": "tsgo --noEmit && tsup index.ts src/typebox/index.ts src/zod/index.ts __test__/utils/mockSchemaValidator.ts shims/zod-v3-openapi/zod-extensions.ts --format cjs,esm --no-splitting --tsconfig tsconfig.json --outDir lib --dts --clean",
|