echoapi-converter 0.0.20 → 0.0.22
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 +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5120,10 +5120,10 @@ class ThunderToApipost {
|
|
|
5120
5120
|
str = `const data = response.headers['content-encoding']`;
|
|
5121
5121
|
}
|
|
5122
5122
|
else if (lodash.isEqual(test === null || test === void 0 ? void 0 : test.type, "custom-headers")) {
|
|
5123
|
-
str = `const data = response.headers['${
|
|
5123
|
+
str = `const data = response.headers['${lodash.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
|
|
5126
|
+
str = `const data = _.get(response.json, ${lodash.toString(lodash.trimStart(test === null || test === void 0 ? void 0 : test.custom, "json."))})`;
|
|
5127
5127
|
}
|
|
5128
5128
|
if (action === "istype") {
|
|
5129
5129
|
return {
|
|
@@ -5170,7 +5170,7 @@ class ThunderToApipost {
|
|
|
5170
5170
|
|
|
5171
5171
|
pm.test("${test.action}", function () {
|
|
5172
5172
|
${str}
|
|
5173
|
-
pm.expect(isType(data,${
|
|
5173
|
+
pm.expect(isType(data,${lodash.toString(toUpper(test.value))})).to.true;
|
|
5174
5174
|
});`,
|
|
5175
5175
|
};
|
|
5176
5176
|
}
|
|
@@ -5515,7 +5515,7 @@ class ThunderToApipost {
|
|
|
5515
5515
|
variables: [
|
|
5516
5516
|
{
|
|
5517
5517
|
param_id: ATools.snowflakeId(),
|
|
5518
|
-
name:
|
|
5518
|
+
name: lodash.first(lodash.split(lodash.trim(test === null || test === void 0 ? void 0 : test.value, "{}"), ",")),
|
|
5519
5519
|
expression: lodash.replace((test === null || test === void 0 ? void 0 : test.custom) || "", "json.", "$.") || "",
|
|
5520
5520
|
type: "globalVars",
|
|
5521
5521
|
},
|
|
@@ -5534,7 +5534,7 @@ class ThunderToApipost {
|
|
|
5534
5534
|
{
|
|
5535
5535
|
param_id: ATools.snowflakeId(),
|
|
5536
5536
|
// name: replace(test?.value, /\{\{(.+?)\}\}/, "$1"),
|
|
5537
|
-
name:
|
|
5537
|
+
name: lodash.first(lodash.split(lodash.trim(test === null || test === void 0 ? void 0 : test.value, "{}"), ",")),
|
|
5538
5538
|
expression: lodash.replace((test === null || test === void 0 ? void 0 : test.custom) || "", "json.", "$.") || "",
|
|
5539
5539
|
type: "globalVars",
|
|
5540
5540
|
},
|