@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
- return type ? schema.type === type : true;
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
- return type ? schema.type === type : true;
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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CjPjJvVl.cjs');
3
+ var index = require('./index-lmnhNH-8.cjs');
4
4
  var _2019_js = require('ajv/dist/2019.js');
5
5
  var moleculer = require('moleculer');
6
6
  var addFormats = require('ajv-formats');
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-DNiA_V_T.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-DNiA_V_T.mjs';
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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('../index-CjPjJvVl.cjs');
3
+ var index = require('../index-lmnhNH-8.cjs');
4
4
  var moleculer = require('moleculer');
5
5
  var esToolkit = require('es-toolkit');
6
6
  var v4 = require('zod/v4');
@@ -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-DNiA_V_T.mjs';
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';
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "type": "git",
7
7
  "url": "https://github.com/treatwell/moleculer-essentials"
8
8
  },
9
- "version": "2.1.0-beta.2",
9
+ "version": "2.1.0",
10
10
  "main": "./dist/index.cjs",
11
11
  "module": "./dist/index.mjs",
12
12
  "types": "./dist/index.d.cts",