@adobe/helix-shared-config 10.2.2 → 10.3.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/helix-shared-config-v10.3.0](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v10.2.3...@adobe/helix-shared-config-v10.3.0) (2023-07-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * set origin of sitemap ([#820](https://github.com/adobe/helix-shared/issues/820)) ([ad12143](https://github.com/adobe/helix-shared/commit/ad12143538c425d251f022518904f7508cc8323d))
7
+
8
+ # [@adobe/helix-shared-config-v10.2.3](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v10.2.2...@adobe/helix-shared-config-v10.2.3) (2023-06-03)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update external fixes ([#815](https://github.com/adobe/helix-shared/issues/815)) ([c76c8ba](https://github.com/adobe/helix-shared/commit/c76c8baec24e71a9da1c642888a7711c81bb547c))
14
+
1
15
  # [@adobe/helix-shared-config-v10.2.2](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config-v10.2.1...@adobe/helix-shared-config-v10.2.2) (2023-05-28)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-shared-config",
3
- "version": "10.2.2",
3
+ "version": "10.3.0",
4
4
  "description": "Shared modules of the Helix Project - config",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -38,7 +38,7 @@
38
38
  "cookie": "0.5.0",
39
39
  "fs-extra": "11.1.1",
40
40
  "ignore": "5.2.4",
41
- "lru-cache": "9.1.1",
41
+ "lru-cache": "9.1.2",
42
42
  "object-hash": "3.0.0",
43
43
  "uri-js": "4.4.1",
44
44
  "yaml": "2.3.1"
@@ -114,4 +114,28 @@ export class SitemapConfig extends SchemaDerivedConfig {
114
114
  this._document = null;
115
115
  return languages[name];
116
116
  }
117
+
118
+ /**
119
+ * Set the origin of a sitemap.
120
+ *
121
+ * @param {string} sitemapName sitemap name
122
+ * @param {string} origin sitemap origin
123
+ */
124
+ setOrigin(sitemapName, origin) {
125
+ const { sitemaps } = this._cfg;
126
+
127
+ const sitemap = sitemaps[sitemapName];
128
+ if (!sitemap) {
129
+ throw new Error(`Unable to set origin, sitemap not found: ${sitemapName}`);
130
+ }
131
+ sitemap.origin = origin;
132
+
133
+ const proxySitemap = this.sitemaps.find((proxy) => proxy.name === sitemapName);
134
+ if (proxySitemap) {
135
+ proxySitemap.origin = origin;
136
+ }
137
+
138
+ // let BaseConfig.toYAML() use the JSON output
139
+ this._document = null;
140
+ }
117
141
  }