@treatwell/moleculer-essentials 2.1.0-beta.2 → 2.1.0
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.
|
@@ -248,7 +248,11 @@ function isZodSchema(schema, type) {
|
|
|
248
248
|
if (!_isZodType(schema)) {
|
|
249
249
|
return false;
|
|
250
250
|
}
|
|
251
|
-
|
|
251
|
+
if (!type) {
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
const sType = schema.type || schema._zod.def.type;
|
|
255
|
+
return sType === type;
|
|
252
256
|
}
|
|
253
257
|
|
|
254
258
|
const ServerErrorSchema = {
|
|
@@ -250,7 +250,11 @@ function isZodSchema(schema, type) {
|
|
|
250
250
|
if (!_isZodType(schema)) {
|
|
251
251
|
return false;
|
|
252
252
|
}
|
|
253
|
-
|
|
253
|
+
if (!type) {
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
const sType = schema.type || schema._zod.def.type;
|
|
257
|
+
return sType === type;
|
|
254
258
|
}
|
|
255
259
|
|
|
256
260
|
const ServerErrorSchema = {
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SCHEMA_REF_NAME, i as isZodSchema, z as zodToOpenAPISchema, o as omitFields, G as GetOpenApiParamsSchema, V as ValidationErrorSchema, F as FileTooBigSchema, a as FileNotExistSchema, U as UnauthorizedErrorSchema, b as ServerErrorSchema, C as COERCE_ARRAY_ATTRIBUTE } from './index-
|
|
2
|
-
export { D as DATE_TYPE, E as EMPTY_OBJECT_SCHEMA, O as OBJECTID_TYPE, c as addFieldsToSchema, d as composeSchemas, e as createOpenAPIResponses, f as optionalExceptFields, g as optionalFields, p as pickFields, t as toPartialSchema, h as zodCoerceArray, j as zodDate, k as zodObjectId } from './index-
|
|
1
|
+
import { S as SCHEMA_REF_NAME, i as isZodSchema, z as zodToOpenAPISchema, o as omitFields, G as GetOpenApiParamsSchema, V as ValidationErrorSchema, F as FileTooBigSchema, a as FileNotExistSchema, U as UnauthorizedErrorSchema, b as ServerErrorSchema, C as COERCE_ARRAY_ATTRIBUTE } from './index-8Cv0B4uH.mjs';
|
|
2
|
+
export { D as DATE_TYPE, E as EMPTY_OBJECT_SCHEMA, O as OBJECTID_TYPE, c as addFieldsToSchema, d as composeSchemas, e as createOpenAPIResponses, f as optionalExceptFields, g as optionalFields, p as pickFields, t as toPartialSchema, h as zodCoerceArray, j as zodDate, k as zodObjectId } from './index-8Cv0B4uH.mjs';
|
|
3
3
|
import { Ajv2019 } from 'ajv/dist/2019.js';
|
|
4
4
|
import { Validators, Errors, Context, ServiceBroker, Service, TracerExporters, MetricReporters } from 'moleculer';
|
|
5
5
|
import addFormats from 'ajv-formats';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as optionalFields, o as omitFields, S as SCHEMA_REF_NAME, O as OBJECTID_TYPE, C as COERCE_ARRAY_ATTRIBUTE, i as isZodSchema, k as zodObjectId, h as zodCoerceArray, e as createOpenAPIResponses } from '../index-
|
|
1
|
+
import { g as optionalFields, o as omitFields, S as SCHEMA_REF_NAME, O as OBJECTID_TYPE, C as COERCE_ARRAY_ATTRIBUTE, i as isZodSchema, k as zodObjectId, h as zodCoerceArray, e as createOpenAPIResponses } from '../index-8Cv0B4uH.mjs';
|
|
2
2
|
import { Errors } from 'moleculer';
|
|
3
3
|
import { isEqual as isEqual$1 } from 'es-toolkit';
|
|
4
4
|
import { z } from 'zod/v4';
|