echoapi-converter 0.0.20 → 0.0.21

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5123,7 +5123,10 @@ class ThunderToApipost {
5123
5123
  str = `const data = response.headers['${_.toLower(test === null || test === void 0 ? void 0 : test.custom)}']`;
5124
5124
  }
5125
5125
  else if (lodash.isEqual(test === null || test === void 0 ? void 0 : test.type, "json-query")) {
5126
- str = `const data = _.get(response.json,${_.trimStart(test === null || test === void 0 ? void 0 : test.custom, "json.")})`;
5126
+ str = `const data = _.get(response.json,_.trimStart(
5127
+ ${test === null || test === void 0 ? void 0 : test.custom},
5128
+ "json."
5129
+ ))`;
5127
5130
  }
5128
5131
  if (action === "istype") {
5129
5132
  return {
@@ -5170,7 +5173,7 @@ class ThunderToApipost {
5170
5173
 
5171
5174
  pm.test("${test.action}", function () {
5172
5175
  ${str}
5173
- pm.expect(isType(data,${_.toUpper(test.value)})).to.true;
5176
+ pm.expect(isType(data,_.toUpper(${test.value}))).to.true;
5174
5177
  });`,
5175
5178
  };
5176
5179
  }
@@ -5515,7 +5518,7 @@ class ThunderToApipost {
5515
5518
  variables: [
5516
5519
  {
5517
5520
  param_id: ATools.snowflakeId(),
5518
- name: _.first(_.split(_.trim(test === null || test === void 0 ? void 0 : test.value, "{}"), ",")),
5521
+ name: lodash.first(lodash.split(lodash.trim(test === null || test === void 0 ? void 0 : test.value, "{}"), ",")),
5519
5522
  expression: lodash.replace((test === null || test === void 0 ? void 0 : test.custom) || "", "json.", "$.") || "",
5520
5523
  type: "globalVars",
5521
5524
  },
@@ -5534,7 +5537,7 @@ class ThunderToApipost {
5534
5537
  {
5535
5538
  param_id: ATools.snowflakeId(),
5536
5539
  // name: replace(test?.value, /\{\{(.+?)\}\}/, "$1"),
5537
- name: _.first(_.split(_.trim(test === null || test === void 0 ? void 0 : test.value, "{}"), ",")),
5540
+ name: lodash.first(lodash.split(lodash.trim(test === null || test === void 0 ? void 0 : test.value, "{}"), ",")),
5538
5541
  expression: lodash.replace((test === null || test === void 0 ? void 0 : test.custom) || "", "json.", "$.") || "",
5539
5542
  type: "globalVars",
5540
5543
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echoapi-converter",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "echoapi to swagger",
5
5
  "main": "dist/index.js",
6
6
  "files": [