apipost-cli 2.0.3 → 2.0.23
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/dist/index.js +8 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -528518,7 +528518,7 @@ const runtime = __nccwpck_require__(835591);
|
|
|
528518
528518
|
// 将api转postman请求参数
|
|
528519
528519
|
const convert2PostmanRequest = (request, option) => {
|
|
528520
528520
|
const pmRequest = {};
|
|
528521
|
-
const
|
|
528521
|
+
const systemConfigs = _.get(option, 'system_configs', {});
|
|
528522
528522
|
|
|
528523
528523
|
// 自动识别请求参数的Mock变量
|
|
528524
528524
|
const autoReplaceMockVar = (para) => {
|
|
@@ -529914,7 +529914,7 @@ const convert2PostmanEvent = (request, listen, option) => {
|
|
|
529914
529914
|
!(function(){
|
|
529915
529915
|
let pickVars = ${JSON.stringify(varItem)};
|
|
529916
529916
|
try{
|
|
529917
|
-
pm[${JSON.stringify(varTypeMap[varItem?.type])}].set(_.get(pickVars,"name"),
|
|
529917
|
+
pm[${JSON.stringify(varTypeMap[varItem?.type])}].set(_.get(pickVars,"name"), _.get(varSource, lodashv4.toLower(_.trim(_.get(pickVars,"expression")))));
|
|
529918
529918
|
}catch(e){}
|
|
529919
529919
|
})();
|
|
529920
529920
|
`;
|
|
@@ -644232,10 +644232,11 @@ class Minimatch {
|
|
|
644232
644232
|
for (let i = 0; i < globParts.length - 1; i++) {
|
|
644233
644233
|
for (let j = i + 1; j < globParts.length; j++) {
|
|
644234
644234
|
const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
|
|
644235
|
-
if (
|
|
644236
|
-
|
|
644237
|
-
|
|
644238
|
-
|
|
644235
|
+
if (matched) {
|
|
644236
|
+
globParts[i] = [];
|
|
644237
|
+
globParts[j] = matched;
|
|
644238
|
+
break;
|
|
644239
|
+
}
|
|
644239
644240
|
}
|
|
644240
644241
|
}
|
|
644241
644242
|
return globParts.filter(gs => gs.length);
|
|
@@ -823120,7 +823121,7 @@ function findMockValue(obj2) {
|
|
|
823120
823121
|
const keysToSearch = ["mock.mock", "x-schema-mock", "x-mock", "x-apidog-mock", "x-apifox-mock"];
|
|
823121
823122
|
for (const type of keysToSearch) {
|
|
823122
823123
|
const mock2 = import_lodash3.default.get(obj2, type);
|
|
823123
|
-
if (!import_lodash3.default.isUndefined(mock2)) {
|
|
823124
|
+
if (!import_lodash3.default.isUndefined(mock2) && !import_lodash3.default.isEmpty(mock2)) {
|
|
823124
823125
|
return { mock: mock2, type };
|
|
823125
823126
|
}
|
|
823126
823127
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apipost-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.23",
|
|
4
4
|
"description": "Apipost 命令行运行工具。适合Apipost8及以上版本。",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"electron": "npm:lodash@^4.17.21",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
34
|
"node-fetch": "^3.3.2",
|
|
35
|
-
"runner-runtime": "^1.0.
|
|
35
|
+
"runner-runtime": "^1.0.87",
|
|
36
36
|
"crypto": "^1.0.1",
|
|
37
37
|
"uuid": "^11.1.0"
|
|
38
38
|
},
|