@feathersjs/typebox
Advanced tools
Comparing version 5.0.0-pre.37 to 5.0.0-pre.38
@@ -6,2 +6,8 @@ # Change Log | ||
# [5.0.0-pre.38](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.37...v5.0.0-pre.38) (2023-02-17) | ||
### Features | ||
- **schema:** Add schema helper for handling Object ids ([#3058](https://github.com/feathersjs/feathers/issues/3058)) ([1393bed](https://github.com/feathersjs/feathers/commit/1393bed81a9ee814de6aab0e537af83e667591a2)) | ||
# [5.0.0-pre.37](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.36...v5.0.0-pre.37) (2023-02-09) | ||
@@ -8,0 +14,0 @@ |
@@ -132,1 +132,2 @@ import { TObject, TInteger, TOptional, TSchema, TIntersect, ObjectOptions } from '@sinclair/typebox'; | ||
}>, TObject<X[K_2]>]>>]>>; } : never>>]>; | ||
export declare const ObjectIdSchema: () => import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, TObject<{}>]>; |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.querySyntax = exports.queryProperties = exports.queryProperty = exports.sortDefinition = exports.StringEnum = exports.getDataValidator = exports.getValidator = void 0; | ||
exports.ObjectIdSchema = exports.querySyntax = exports.queryProperties = exports.queryProperty = exports.sortDefinition = exports.StringEnum = exports.getDataValidator = exports.getValidator = void 0; | ||
const typebox_1 = require("@sinclair/typebox"); | ||
@@ -114,5 +114,2 @@ const schema_1 = require("@feathersjs/schema"); | ||
const value = definition.properties[key]; | ||
if (value.$ref) { | ||
throw new Error(`Can not create query syntax schema for reference property '${key}'`); | ||
} | ||
result[key] = (0, exports.queryProperty)(value, extensions[key]); | ||
@@ -150,2 +147,4 @@ return result; | ||
exports.querySyntax = querySyntax; | ||
const ObjectIdSchema = () => typebox_1.Type.Union([typebox_1.Type.String({ objectid: true }), typebox_1.Type.Object({}, { additionalProperties: false })]); | ||
exports.ObjectIdSchema = ObjectIdSchema; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@feathersjs/typebox", | ||
"description": "TypeBox integration for @feathersjs/schema", | ||
"version": "5.0.0-pre.37", | ||
"version": "5.0.0-pre.38", | ||
"homepage": "https://feathersjs.com", | ||
@@ -57,3 +57,3 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/schema": "^5.0.0-pre.37", | ||
"@feathersjs/schema": "^5.0.0-pre.38", | ||
"@sinclair/typebox": "^0.25.21" | ||
@@ -63,3 +63,3 @@ }, | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^18.11.18", | ||
"@types/node": "^18.13.0", | ||
"mocha": "^10.2.0", | ||
@@ -69,3 +69,3 @@ "shx": "^0.3.4", | ||
}, | ||
"gitHead": "17a8b3b2614876772472d3cab3d96d45c01db6ed" | ||
"gitHead": "7fc86307438ae8cf3f71ce3b677be8bcc55768c1" | ||
} |
@@ -132,6 +132,2 @@ import { Type, TObject, TInteger, TOptional, TSchema, TIntersect, ObjectOptions } from '@sinclair/typebox' | ||
if (value.$ref) { | ||
throw new Error(`Can not create query syntax schema for reference property '${key}'`) | ||
} | ||
result[key] = queryProperty(value, extensions[key]) | ||
@@ -186,1 +182,4 @@ | ||
} | ||
export const ObjectIdSchema = () => | ||
Type.Union([Type.String({ objectid: true }), Type.Object({}, { additionalProperties: false })]) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51685
752