@quintype/framework 7.5.0-internal-api.0 → 7.5.0
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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/server/impl/api-client-impl.js +1 -1
- package/test/unit/api-client-test.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [7.5.0](https://github.com/quintype/quintype-node-framework/compare/v7.4.1...v7.5.0) (2022-06-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **api-client:** Implement wildcard_to_api_host ⚡ ([#308](https://github.com/quintype/quintype-node-framework/issues/308)) ([9c585f4](https://github.com/quintype/quintype-node-framework/commit/9c585f49fece1cba7271a47465633ca9c40034ff))
|
|
11
|
+
|
|
5
12
|
### [7.4.1](https://github.com/quintype/quintype-node-framework/compare/v7.4.0...v7.4.1) (2022-06-02)
|
|
6
13
|
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -286,7 +286,7 @@ Preloading app.js and /route-data.json can be triggered by passing preloadJS tru
|
|
|
286
286
|
|
|
287
287
|
### multiple publishers
|
|
288
288
|
|
|
289
|
-
FIXME: Write notes on `host_to_api_host`, `host_to_automatic_api_host` and `skip_warm_config`
|
|
289
|
+
FIXME: Write notes on `host_to_api_host`, `host_to_automatic_api_host`, `wildcard_to_api_host` and `skip_warm_config`
|
|
290
290
|
|
|
291
291
|
### forwardFavicon
|
|
292
292
|
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ function createTemporaryClient(config, hostname) {
|
|
|
29
29
|
return new Client(configuredHosts[hostname], true);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
const matchedMadridUrl = (config.
|
|
32
|
+
const matchedMadridUrl = (config.wildcard_to_api_host || []).find((str) => hostname.includes(str));
|
|
33
33
|
|
|
34
34
|
if (matchedMadridUrl) return new Client(`http://${hostname.replace(matchedMadridUrl, ".internal")}`, true);
|
|
35
35
|
|
|
@@ -33,9 +33,9 @@ describe("ApiClient", function () {
|
|
|
33
33
|
assert.equal("https://foo.quintype.io", client.baseUrl);
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
it("creates a
|
|
36
|
+
it("creates a wildcard temporary client if it matches a string", function () {
|
|
37
37
|
const client = getClientImpl(
|
|
38
|
-
{
|
|
38
|
+
{ wildcard_to_api_host: [".madrid", "-madrid"] },
|
|
39
39
|
{},
|
|
40
40
|
"foo.madrid.quintype.io"
|
|
41
41
|
);
|