echoapi-converter 0.0.29 → 0.0.31

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 +4 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4387,7 +4387,7 @@ class InsomniaToApipost {
4387
4387
  completionGraphqlRequestBody(body) {
4388
4388
  return {
4389
4389
  query_schema: {},
4390
- query_list: [Object.assign({ param_id: ATools.snowflakeId(), name: 'New Query' }, this.getGraphQLQuery(body))],
4390
+ query_list: [Object.assign({ param_id: ATools.snowflakeId(), name: 'New Query' }, this.getGraphQLQuery(body === null || body === void 0 ? void 0 : body.text))],
4391
4391
  };
4392
4392
  }
4393
4393
  completionGraphqlTarget(item) {
@@ -4526,6 +4526,7 @@ class InsomniaToApipost {
4526
4526
  }
4527
4527
  completionApis(resources) {
4528
4528
  return resources === null || resources === void 0 ? void 0 : resources.reduce((pre, item) => {
4529
+ var _a;
4529
4530
  if ((item === null || item === void 0 ? void 0 : item._type) === "request_group" && lodash.has(this.foldersMap, item === null || item === void 0 ? void 0 : item._id)) {
4530
4531
  pre.push({
4531
4532
  target_id: this.foldersMap[item === null || item === void 0 ? void 0 : item._id] || ATools.snowflakeId(),
@@ -4544,7 +4545,7 @@ class InsomniaToApipost {
4544
4545
  });
4545
4546
  }
4546
4547
  if ((item === null || item === void 0 ? void 0 : item._type) === "request") {
4547
- if ((item === null || item === void 0 ? void 0 : item.body) === 'application/graphql') {
4548
+ if (((_a = item === null || item === void 0 ? void 0 : item.body) === null || _a === void 0 ? void 0 : _a.mimeType) === 'application/graphql') {
4548
4549
  const target = this.completionGraphqlTarget(item);
4549
4550
  pre.push(target);
4550
4551
  }
@@ -4817,7 +4818,7 @@ class PostmanToApipost {
4817
4818
  field_type: DEFAULT_FIELD_TYPE.includes(item === null || item === void 0 ? void 0 : item.type)
4818
4819
  ? item.type.charAt(0).toUpperCase() + item.type.slice(1)
4819
4820
  : "String",
4820
- is_checked: 1,
4821
+ is_checked: (item === null || item === void 0 ? void 0 : item.disabled) ? -1 : 1,
4821
4822
  key: (item === null || item === void 0 ? void 0 : item.key) || "",
4822
4823
  value: (item === null || item === void 0 ? void 0 : item.value) || "",
4823
4824
  not_null: -1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echoapi-converter",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "description": "echoapi to swagger",
5
5
  "main": "dist/index.js",
6
6
  "files": [