@quintype/framework 7.30.9-host-to-api.0 → 7.30.9

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 CHANGED
@@ -2,6 +2,8 @@
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.30.9](https://github.com/quintype/quintype-node-framework/compare/v7.30.8...v7.30.9) (2024-11-22)
6
+
5
7
  ### [7.30.8](https://github.com/quintype/quintype-node-framework/compare/v7.30.7...v7.30.8) (2024-11-05)
6
8
 
7
9
  ### [7.30.7](https://github.com/quintype/quintype-node-framework/compare/v7.30.6...v7.30.7) (2024-10-30)
@@ -1,6 +1,6 @@
1
1
  #!/bin/bash -e
2
2
 
3
- npm install --legacy-peer-deps
3
+ npm install
4
4
  git diff --quiet
5
5
  npm run docs
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/framework",
3
- "version": "7.30.9-host-to-api.0",
3
+ "version": "7.30.9",
4
4
  "description": "Libraries to help build Quintype Node.js apps",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@ampproject/toolbox-optimizer": "2.8.3",
34
34
  "@quintype/amp": "^2.20.0",
35
- "@quintype/backend": "2.6.0-host-to-api.1",
35
+ "@quintype/backend": "2.5.1",
36
36
  "@quintype/components": "^3.5.0",
37
37
  "@quintype/prerender-node": "^3.2.26",
38
38
  "@quintype/seo": "^1.46.1",
@@ -11,6 +11,7 @@
11
11
  */
12
12
  // istanbul ignore file
13
13
 
14
+ const config = require("./publisher-config");
14
15
  const {
15
16
  getClientImpl,
16
17
  Client,
@@ -28,31 +29,16 @@ const {
28
29
  const defaultClient = new Client(config.sketches_host);
29
30
  const cachedSecondaryClients = {};
30
31
 
31
- let config = require("./publisher-config");
32
-
33
- const xHostAPIToken = config["x_host_mapping_token"];
34
- const hostInternalDomain = config["x_host_internal_domain"];
35
- const enableSketchesHostResolution = config["x_enable_sketches_host_resolution"];
36
-
37
- if (enableSketchesHostResolution && xHostAPIToken && hostInternalDomain) {
38
- const hostMapping = {};
39
- const sketchesHostMapping = Client.getHostToAPIMappingCache(xHostAPIToken);
40
-
41
- for (const [key, value] of Object.entries(sketchesHostMapping)) {
42
- hostMapping[key] = `http://${value}${hostInternalDomain}`;
43
- }
44
-
45
- config.host_to_api_host = { ...hostMapping, ...config["host_to_api_host"] };
46
- }
47
-
48
32
  function getClient(hostname) {
49
- return getClientImpl(config, cachedSecondaryClients, hostname) || defaultClient;
33
+ return (
34
+ getClientImpl(config, cachedSecondaryClients, hostname) || defaultClient
35
+ );
50
36
  }
51
37
 
52
38
  function initializeAllClients() {
53
39
  const promises = [defaultClient.getConfig()];
54
40
  if (!config.skip_warm_config) {
55
- Object.entries(config["host_to_api_host"] || []).forEach(([host, apiHost]) => {
41
+ Object.entries(config.host_to_api_host || []).forEach(([host, apiHost]) => {
56
42
  const client = new Client(apiHost);
57
43
  cachedSecondaryClients[host] = client;
58
44
  promises.push(client.getConfig());
@@ -10,7 +10,6 @@
10
10
  */
11
11
  // istanbul ignore file
12
12
 
13
-
14
13
  const fs = require("fs");
15
14
  const yaml = require("js-yaml");
16
15