@jayfong/x-server 2.95.1 → 2.96.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.
- package/lib/_cjs/cli/api_generator.js +12 -0
- package/lib/_cjs/cli/cli.js +5 -2
- package/lib/cli/api_generator.js +12 -0
- package/lib/cli/cli.js +4 -2
- package/package.json +1 -1
|
@@ -193,6 +193,18 @@ class ApiGenerator {
|
|
|
193
193
|
const comment = this.getComment(keySymbol);
|
|
194
194
|
let isRequired = keySymbol ? !(keySymbol.getFlags() & _tsMorph.ts.SymbolFlags.Optional) : false;
|
|
195
195
|
|
|
196
|
+
// Decimal, Prisma 生成的
|
|
197
|
+
if (valueSymbolName === 'Decimal') {
|
|
198
|
+
return {
|
|
199
|
+
name: 'decimal',
|
|
200
|
+
desc: comment.description,
|
|
201
|
+
required: isRequired,
|
|
202
|
+
type: 'number',
|
|
203
|
+
enum: [],
|
|
204
|
+
children: []
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
196
208
|
// WS
|
|
197
209
|
if (valueSymbolName === 'SocketStream') {
|
|
198
210
|
return {
|
package/lib/_cjs/cli/cli.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
6
|
var _path = _interopRequireDefault(require("path"));
|
|
6
7
|
var _chokidar = _interopRequireDefault(require("chokidar"));
|
|
7
8
|
var _execa = _interopRequireDefault(require("execa"));
|
|
8
9
|
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
9
10
|
var _vscodeGenerateIndexStandalone = require("vscode-generate-index-standalone");
|
|
10
|
-
var _vtils = require("vtils");
|
|
11
|
+
var _vtils = _interopRequireWildcard(require("vtils"));
|
|
12
|
+
var vtils = _vtils;
|
|
11
13
|
var _yargs = _interopRequireDefault(require("yargs"));
|
|
12
14
|
var _api_generator = require("./api_generator");
|
|
13
15
|
var _build_util = require("./build_util");
|
|
@@ -215,7 +217,8 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
215
217
|
excludeFiles: (argv.exclude ? (0, _vtils.castArray)(argv.exclude) : []).map(item => {
|
|
216
218
|
return _vtils.StringTemplate.render(item, {
|
|
217
219
|
...envMap,
|
|
218
|
-
_:
|
|
220
|
+
_: vtils,
|
|
221
|
+
__: vtils.escapeRegExp
|
|
219
222
|
}, {
|
|
220
223
|
code: true,
|
|
221
224
|
onlyCode: true
|
package/lib/cli/api_generator.js
CHANGED
|
@@ -188,6 +188,18 @@ export class ApiGenerator {
|
|
|
188
188
|
const comment = this.getComment(keySymbol);
|
|
189
189
|
let isRequired = keySymbol ? !(keySymbol.getFlags() & ts.SymbolFlags.Optional) : false;
|
|
190
190
|
|
|
191
|
+
// Decimal, Prisma 生成的
|
|
192
|
+
if (valueSymbolName === 'Decimal') {
|
|
193
|
+
return {
|
|
194
|
+
name: 'decimal',
|
|
195
|
+
desc: comment.description,
|
|
196
|
+
required: isRequired,
|
|
197
|
+
type: 'number',
|
|
198
|
+
enum: [],
|
|
199
|
+
children: []
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
191
203
|
// WS
|
|
192
204
|
if (valueSymbolName === 'SocketStream') {
|
|
193
205
|
return {
|
package/lib/cli/cli.js
CHANGED
|
@@ -4,8 +4,9 @@ import chokidar from 'chokidar';
|
|
|
4
4
|
import execa from 'execa';
|
|
5
5
|
import fs from 'fs-extra';
|
|
6
6
|
import { generateManyIndex } from 'vscode-generate-index-standalone';
|
|
7
|
-
import { castArray, debounce
|
|
7
|
+
import { castArray, debounce } from 'vtils';
|
|
8
8
|
import { StringTemplate } from 'vtils';
|
|
9
|
+
import * as vtils from 'vtils';
|
|
9
10
|
import yargs from 'yargs';
|
|
10
11
|
import { ApiGenerator } from "./api_generator";
|
|
11
12
|
import { BuildUtil } from "./build_util";
|
|
@@ -213,7 +214,8 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
213
214
|
excludeFiles: (argv.exclude ? castArray(argv.exclude) : []).map(item => {
|
|
214
215
|
return StringTemplate.render(item, {
|
|
215
216
|
...envMap,
|
|
216
|
-
_:
|
|
217
|
+
_: vtils,
|
|
218
|
+
__: vtils.escapeRegExp
|
|
217
219
|
}, {
|
|
218
220
|
code: true,
|
|
219
221
|
onlyCode: true
|