@jayfong/x-server 2.96.0 → 2.96.2

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.
@@ -192,11 +192,12 @@ class ApiGenerator {
192
192
  let valueSymbolName = valueSymbol?.getName() || '';
193
193
  const comment = this.getComment(keySymbol);
194
194
  let isRequired = keySymbol ? !(keySymbol.getFlags() & _tsMorph.ts.SymbolFlags.Optional) : false;
195
+ const apiName = keySymbolName || '__type';
195
196
 
196
197
  // Decimal, Prisma 生成的
197
198
  if (valueSymbolName === 'Decimal') {
198
199
  return {
199
- name: 'decimal',
200
+ name: apiName,
200
201
  desc: comment.description,
201
202
  required: isRequired,
202
203
  type: 'number',
@@ -273,7 +274,6 @@ class ApiGenerator {
273
274
  const isObject = !isArray && !isString && !isNumber && !isBoolean && hasTypeFlag(_tsMorph.ts.TypeFlags.Object) ||
274
275
  // 交集类型视为对象
275
276
  isIntersection;
276
- const apiName = keySymbolName || '__type';
277
277
  const apiDesc = keySymbol && this.getComment(keySymbol).description || '';
278
278
  const apiEnum = (isUnion ? unionTypes.map(item => item.value) : isLiteral ? [type.value] : []).filter(v => v != null);
279
279
  const apiType = isArray ? 'array' : isString ? 'string' : isNumber ? 'number' : isBoolean ? 'boolean' : 'object';
File without changes
@@ -187,11 +187,12 @@ export class ApiGenerator {
187
187
  let valueSymbolName = valueSymbol?.getName() || '';
188
188
  const comment = this.getComment(keySymbol);
189
189
  let isRequired = keySymbol ? !(keySymbol.getFlags() & ts.SymbolFlags.Optional) : false;
190
+ const apiName = keySymbolName || '__type';
190
191
 
191
192
  // Decimal, Prisma 生成的
192
193
  if (valueSymbolName === 'Decimal') {
193
194
  return {
194
- name: 'decimal',
195
+ name: apiName,
195
196
  desc: comment.description,
196
197
  required: isRequired,
197
198
  type: 'number',
@@ -268,7 +269,6 @@ export class ApiGenerator {
268
269
  const isObject = !isArray && !isString && !isNumber && !isBoolean && hasTypeFlag(ts.TypeFlags.Object) ||
269
270
  // 交集类型视为对象
270
271
  isIntersection;
271
- const apiName = keySymbolName || '__type';
272
272
  const apiDesc = keySymbol && this.getComment(keySymbol).description || '';
273
273
  const apiEnum = (isUnion ? unionTypes.map(item => item.value) : isLiteral ? [type.value] : []).filter(v => v != null);
274
274
  const apiType = isArray ? 'array' : isString ? 'string' : isNumber ? 'number' : isBoolean ? 'boolean' : 'object';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.96.0",
3
+ "version": "2.96.2",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",
@@ -42,8 +42,8 @@
42
42
  "cron": "^3.1.6",
43
43
  "cuid": "^2.1.8",
44
44
  "debug": "^4.3.4",
45
- "esbuild": "^0.19.10",
46
- "esbuild-register": "^3.5.0",
45
+ "esbuild": "^0.25.5",
46
+ "esbuild-register": "^3.6.0",
47
47
  "execa": "^5.1.1",
48
48
  "exit-hook": "^2.2.1",
49
49
  "fast-escape-html": "^1.1.0",