echoapi-converter 0.0.39 → 0.0.40
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 +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3876,6 +3876,7 @@ const completionPostmanTarget = (targetItem) => {
|
|
|
3876
3876
|
};
|
|
3877
3877
|
return {
|
|
3878
3878
|
raw: (targetItem === null || targetItem === void 0 ? void 0 : targetItem.url) || '',
|
|
3879
|
+
host: [(targetItem === null || targetItem === void 0 ? void 0 : targetItem.url) || ''],
|
|
3879
3880
|
query: getPostmanQuery((_b = (_a = targetItem === null || targetItem === void 0 ? void 0 : targetItem.request) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.parameter),
|
|
3880
3881
|
variable: getPostmanVariable((_d = (_c = targetItem === null || targetItem === void 0 ? void 0 : targetItem.request) === null || _c === void 0 ? void 0 : _c.restful) === null || _d === void 0 ? void 0 : _d.parameter)
|
|
3881
3882
|
};
|
|
@@ -5473,6 +5474,7 @@ class InsomniaToApipost {
|
|
|
5473
5474
|
|
|
5474
5475
|
// @ts-nocheck
|
|
5475
5476
|
const DEFAULT_FIELD_TYPE = ["string", "file"];
|
|
5477
|
+
const APIPOST_GRANT_TYPES = ['authorization_code', 'password_credentials', 'authorization_code_with_pkce'];
|
|
5476
5478
|
class PostmanToApipost {
|
|
5477
5479
|
constructor() {
|
|
5478
5480
|
Object.defineProperty(this, "apis", {
|
|
@@ -5570,7 +5572,7 @@ class PostmanToApipost {
|
|
|
5570
5572
|
addTokenTo: (authMap === null || authMap === void 0 ? void 0 : authMap.addTokenTo) || 'header',
|
|
5571
5573
|
headerPrefix: (authMap === null || authMap === void 0 ? void 0 : authMap.headerPrefix) || 'Bearer',
|
|
5572
5574
|
access_token: '',
|
|
5573
|
-
grant_type: 'authorization_code',
|
|
5575
|
+
grant_type: APIPOST_GRANT_TYPES.includes(authMap === null || authMap === void 0 ? void 0 : authMap.grant_type) ? authMap === null || authMap === void 0 ? void 0 : authMap.grant_type : 'authorization_code',
|
|
5574
5576
|
redirect_uri: (authMap === null || authMap === void 0 ? void 0 : authMap.redirect_uri) || '',
|
|
5575
5577
|
authUrl: (authMap === null || authMap === void 0 ? void 0 : authMap.authUrl) || '',
|
|
5576
5578
|
accessTokenUrl: (authMap === null || authMap === void 0 ? void 0 : authMap.accessTokenUrl) || '',
|