@wx-sab/renkei 1.0.0 → 1.0.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.
package/lib/commands/api.js
CHANGED
|
@@ -26,7 +26,7 @@ const readProjectConfigFile = () => {
|
|
|
26
26
|
const parse = new commander_1.default.Command('api').option('-s, --service <service>', '只获取指定的服务,多个服务用","分隔', ',').action((param, options) => {
|
|
27
27
|
var _a;
|
|
28
28
|
// 只生成指定服务
|
|
29
|
-
const services = ((_a = param.service) === null || _a === void 0 ? void 0 : _a.split(',')) || [];
|
|
29
|
+
const services = (((_a = param.service) === null || _a === void 0 ? void 0 : _a.split(',')) || []).filter(Boolean);
|
|
30
30
|
const config = readProjectConfigFile();
|
|
31
31
|
if (!config) {
|
|
32
32
|
console.warn('未找到配置文件');
|
package/package.json
CHANGED
|
@@ -117,7 +117,7 @@ const dataTypes = [
|
|
|
117
117
|
const dataArgs = [
|
|
118
118
|
{
|
|
119
119
|
// name: 'data',
|
|
120
|
-
name: pathParams.length ? `{ ${_.join(pathParamsNames, ", ")},
|
|
120
|
+
name: pathParams.length ? `{ ${_.join(pathParamsNames, ", ")}, ...data }` : 'data',
|
|
121
121
|
type: dataTypes.map(getFullType).join(' & '),
|
|
122
122
|
optional: false,
|
|
123
123
|
},
|