echoapi-converter 0.0.21 → 0.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.
Files changed (2) hide show
  1. package/dist/index.js +15 -19
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5068,7 +5068,6 @@ class YapiToApipost {
5068
5068
  }
5069
5069
  }
5070
5070
 
5071
- // @ts-nocheck
5072
5071
  class ThunderToApipost {
5073
5072
  constructor() {
5074
5073
  Object.defineProperty(this, "apis", {
@@ -5120,13 +5119,10 @@ class ThunderToApipost {
5120
5119
  str = `const data = response.headers['content-encoding']`;
5121
5120
  }
5122
5121
  else if (lodash.isEqual(test === null || test === void 0 ? void 0 : test.type, "custom-headers")) {
5123
- str = `const data = response.headers['${_.toLower(test === null || test === void 0 ? void 0 : test.custom)}']`;
5122
+ str = `const data = response.headers['${lodash.toLower(test === null || test === void 0 ? void 0 : test.custom)}']`;
5124
5123
  }
5125
5124
  else if (lodash.isEqual(test === null || test === void 0 ? void 0 : test.type, "json-query")) {
5126
- str = `const data = _.get(response.json,_.trimStart(
5127
- ${test === null || test === void 0 ? void 0 : test.custom},
5128
- "json."
5129
- ))`;
5125
+ str = `const data = _.get(response.json, ${lodash.toString(lodash.trimStart(test === null || test === void 0 ? void 0 : test.custom, "json."))})`;
5130
5126
  }
5131
5127
  if (action === "istype") {
5132
5128
  return {
@@ -5142,29 +5138,29 @@ class ThunderToApipost {
5142
5138
 
5143
5139
  const typeString = Object.prototype.toString.call(value);
5144
5140
  switch (type) {
5145
- case 'Array':
5141
+ case 'array':
5146
5142
  return typeString === '[object Array]';
5147
- case 'Object':
5143
+ case 'object':
5148
5144
  return typeString === '[object Object]' && !Array.isArray(value);
5149
- case 'Function':
5145
+ case 'function':
5150
5146
  return typeString === '[object Function]';
5151
- case 'Date':
5147
+ case 'date':
5152
5148
  return typeString === '[object Date]';
5153
- case 'RegExp':
5149
+ case 'regexp':
5154
5150
  return typeString === '[object RegExp]';
5155
- case 'Null':
5151
+ case 'null':
5156
5152
  return value === null;
5157
- case 'Undefined':
5153
+ case 'undefined':
5158
5154
  return value === undefined;
5159
- case 'Number':
5155
+ case 'number':
5160
5156
  return typeof value === 'number' && isFinite(value);
5161
- case 'String':
5157
+ case 'string':
5162
5158
  return typeof value === 'string';
5163
- case 'Boolean':
5159
+ case 'boolean':
5164
5160
  return typeof value === 'boolean';
5165
- case 'Symbol':
5161
+ case 'symbol':
5166
5162
  return typeof value === 'symbol';
5167
- case 'BigInt':
5163
+ case 'bigint':
5168
5164
  return typeof value === 'bigint';
5169
5165
  default:
5170
5166
  return false;
@@ -5173,7 +5169,7 @@ class ThunderToApipost {
5173
5169
 
5174
5170
  pm.test("${test.action}", function () {
5175
5171
  ${str}
5176
- pm.expect(isType(data,_.toUpper(${test.value}))).to.true;
5172
+ pm.expect(isType(data,${lodash.toString(lodash.toLower(test.value))})).to.true;
5177
5173
  });`,
5178
5174
  };
5179
5175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echoapi-converter",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "echoapi to swagger",
5
5
  "main": "dist/index.js",
6
6
  "files": [