@adobe/helix-shared-config 2.0.5 → 2.1.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 +33 -0
- package/package.json +6 -6
- package/src/IndexConfig.js +29 -0
- package/src/fetchconfig/cache.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.1.0](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config@2.0.7...@adobe/helix-shared-config@2.1.0) (2022-05-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add index configuration ([#684](https://github.com/adobe/helix-shared/issues/684)) ([2cdec6f](https://github.com/adobe/helix-shared/commit/2cdec6f0c27b114d239ac524e3776e2d7e65fb18))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.0.7](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config@2.0.6...@adobe/helix-shared-config@2.0.7) (2022-05-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **deps:** update external fixes ([#680](https://github.com/adobe/helix-shared/issues/680)) ([75dc78e](https://github.com/adobe/helix-shared/commit/75dc78ef83e862f199c2fd56f298f2f9459dd742))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [2.0.6](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config@2.0.5...@adobe/helix-shared-config@2.0.6) (2022-05-06)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* suppress deprecation warning (maxAge has been replaced by ttl) ([#678](https://github.com/adobe/helix-shared/issues/678)) ([7fb2df9](https://github.com/adobe/helix-shared/commit/7fb2df94f4f06d984c326b5ee897f877d69e86b0))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [2.0.5](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-config@2.0.4...@adobe/helix-shared-config@2.0.5) (2022-05-03)
|
|
7
40
|
|
|
8
41
|
**Note:** Version bump only for package @adobe/helix-shared-config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-shared-config",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Shared modules of the Helix Project - config",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@adobe/helix-fetch": "^3.0.3",
|
|
30
|
-
"@adobe/helix-shared-git": "^2.0.
|
|
30
|
+
"@adobe/helix-shared-git": "^2.0.3",
|
|
31
31
|
"@adobe/helix-shared-prune": "^1.0.5",
|
|
32
|
-
"@adobe/helix-shared-utils": "^2.0.
|
|
32
|
+
"@adobe/helix-shared-utils": "^2.0.10",
|
|
33
33
|
"ajv": "8.11.0",
|
|
34
34
|
"ajv-formats": "2.1.1",
|
|
35
35
|
"cookie": "0.5.0",
|
|
36
36
|
"fs-extra": "10.1.0",
|
|
37
37
|
"ignore": "5.2.0",
|
|
38
|
-
"lru-cache": "7.
|
|
38
|
+
"lru-cache": "7.10.1",
|
|
39
39
|
"object-hash": "3.0.0",
|
|
40
40
|
"uri-js": "4.4.1",
|
|
41
|
-
"yaml": "2.0
|
|
41
|
+
"yaml": "2.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@adobe/helix-shared-wrap": "^1.0.5",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"mocha": "10.0.0",
|
|
50
50
|
"nock": "13.2.4"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "e77cc809f42f4b6b13e4274ddf106a6c84f8abfa"
|
|
53
53
|
}
|
package/src/IndexConfig.js
CHANGED
|
@@ -35,6 +35,35 @@ class IndexConfig extends SchemaDerivedConfig {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Adds an index definition.
|
|
40
|
+
*
|
|
41
|
+
* @param {Object} index index configuration
|
|
42
|
+
* @param {string} index.name index name
|
|
43
|
+
* @param {Array} index.include paths to include
|
|
44
|
+
* @param {Array} index.exclude paths to exclude
|
|
45
|
+
* @param {string} index.target target
|
|
46
|
+
* @param {object} index.properties properties to add to the index
|
|
47
|
+
*/
|
|
48
|
+
addIndex({
|
|
49
|
+
name, include, exclude, target, properties,
|
|
50
|
+
}) {
|
|
51
|
+
const { indices } = this._cfg;
|
|
52
|
+
if (indices[name]) {
|
|
53
|
+
throw new Error(`Unable to add index definition with existing name: ${name}`);
|
|
54
|
+
}
|
|
55
|
+
indices[name] = {
|
|
56
|
+
name,
|
|
57
|
+
include,
|
|
58
|
+
exclude,
|
|
59
|
+
target,
|
|
60
|
+
properties,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// let BaseConfig.toYAML() use the JSON output
|
|
64
|
+
this._document = null;
|
|
65
|
+
}
|
|
66
|
+
|
|
38
67
|
/**
|
|
39
68
|
* Evaluates a variable expression
|
|
40
69
|
* @param {string} expression the expression to encode
|