From 433e24bf75117c7e7d9496deb2b4df8358b6f9fb Mon Sep 17 00:00:00 2001 From: Nick Volynkin Date: Thu, 4 Jul 2024 10:51:37 +0300 Subject: [PATCH] qaseio: enable using http://api.qase.lo as API host --- qaseio/changelog.md | 6 ++++++ qaseio/package.json | 2 +- qaseio/src/qaseio.ts | 10 ++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/qaseio/changelog.md b/qaseio/changelog.md index 200de211..27fedd70 100644 --- a/qaseio/changelog.md +++ b/qaseio/changelog.md @@ -1,3 +1,9 @@ +# qaseio@2.1.5 + +## What's new + +Enable using 'http://api.qase.lo' as API host for Qase development. + # qaseio@2.1.4 ## What's new diff --git a/qaseio/package.json b/qaseio/package.json index 8e150625..af5dab7b 100644 --- a/qaseio/package.json +++ b/qaseio/package.json @@ -1,6 +1,6 @@ { "name": "qaseio", - "version": "2.1.4", + "version": "2.1.5", "description": "Qase TMS Javascript API Client", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/qaseio/src/qaseio.ts b/qaseio/src/qaseio.ts index 3e1381e5..098ba264 100644 --- a/qaseio/src/qaseio.ts +++ b/qaseio/src/qaseio.ts @@ -97,10 +97,16 @@ export class QaseApi implements QaseApiInterface { formDataCtor, }); + // default path is https://api.qase.io, defined in + // qaseio/src/generated/base.ts if (host != undefined) { - if (host == 'qase.io') { - configuration.basePath = `https://api.${host}`; + if (host == 'qase.io' || host == 'api.qase.io' || host == 'https://api.qase.io') { + configuration.basePath = `https://api.qase.io`; + } else if (host == 'http://api.qase.lo') { + // Qase on local machine, development mode + configuration.basePath = host } else { + // Custom Qase host configuration.basePath = `https://${host}`; } }