@adobe/aio-cli-lib-app-config 2.0.1 → 3.0.1
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/package.json +5 -5
- package/schema/app.config.yaml.schema.json +12 -2
- package/src/index.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aio-cli-lib-app-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "node lib to provide a consistent interface to various config files that make up Adobe Developer App Builder applications and extensions",
|
|
5
5
|
"repository": "https://github.com/adobe/aio-cli-lib-app-config/",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"eslint": "^8",
|
|
35
35
|
"eslint-config-standard": "^17",
|
|
36
36
|
"eslint-plugin-import": "^2.25.3",
|
|
37
|
-
"eslint-plugin-jest": "^
|
|
38
|
-
"eslint-plugin-jsdoc": "^
|
|
39
|
-
"eslint-plugin-n": "^15",
|
|
37
|
+
"eslint-plugin-jest": "^27",
|
|
38
|
+
"eslint-plugin-jsdoc": "^42",
|
|
39
|
+
"eslint-plugin-n": "^15.7.0",
|
|
40
40
|
"eslint-plugin-node": "^11.1.0",
|
|
41
41
|
"eslint-plugin-promise": "^6",
|
|
42
42
|
"eslint-plugin-standard": "^4.0.0",
|
|
43
|
-
"jest": "^
|
|
43
|
+
"jest": "^29",
|
|
44
44
|
"jest-junit": "^10.0.0",
|
|
45
45
|
"jest-plugin-fs": "^2.9.0",
|
|
46
46
|
"jsdoc": "^3.6.3",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"packages": {
|
|
104
104
|
"type": "object",
|
|
105
105
|
"patternProperties": {
|
|
106
|
-
"^[
|
|
106
|
+
"^([\\w]|[\\w][\\w@ .-]*[\\w@.-]+)$": {
|
|
107
107
|
"$ref": "#/definitions/package"
|
|
108
108
|
}
|
|
109
109
|
},
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"actions": {
|
|
120
120
|
"type": "object",
|
|
121
121
|
"patternProperties": {
|
|
122
|
-
"^[
|
|
122
|
+
"^([\\w]|[\\w][\\w@ .-]*[\\w@.-]+)$": {
|
|
123
123
|
"$ref": "#/definitions/action"
|
|
124
124
|
}
|
|
125
125
|
},
|
|
@@ -202,6 +202,15 @@
|
|
|
202
202
|
}
|
|
203
203
|
},
|
|
204
204
|
"configSchema": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"properties": {
|
|
207
|
+
"description": { "type": "string", "maxLength": 1000 },
|
|
208
|
+
"title": { "type": "string", "maxLength": 200 },
|
|
209
|
+
"properties": { "$ref": "#/definitions/configSchemaItems" }
|
|
210
|
+
},
|
|
211
|
+
"required": ["properties"]
|
|
212
|
+
},
|
|
213
|
+
"configSchemaItems": {
|
|
205
214
|
"type": "array",
|
|
206
215
|
"maxItems": 50,
|
|
207
216
|
"items": {
|
|
@@ -209,6 +218,7 @@
|
|
|
209
218
|
"properties": {
|
|
210
219
|
"type": { "type": "string", "enum": ["string", "boolean"] },
|
|
211
220
|
"title": { "type": "string", "maxLength": 200 },
|
|
221
|
+
"description": { "type": "string", "maxLength": 1000 },
|
|
212
222
|
"envKey": { "type": "string", "pattern": "[a-zA-Z_]{1,}[a-zA-Z0-9_]{0,}", "maxLength": 100 },
|
|
213
223
|
"enum": { "type": "array", "items": { "$ref": "#/definitions/configSchemaValue" }, "minItems": 1, "maxItems": 100 },
|
|
214
224
|
"default": { "$ref": "#/definitions/configSchemaValue" },
|
package/src/index.js
CHANGED
|
@@ -179,7 +179,7 @@ async function load (options = {}) {
|
|
|
179
179
|
throw new Error(`Couldn't find configuration in '${process.cwd()}', make sure to add at least one extension or a standalone app`)
|
|
180
180
|
}
|
|
181
181
|
return {
|
|
182
|
-
configSchema: appConfig?.configSchema ||
|
|
182
|
+
configSchema: appConfig?.configSchema || {},
|
|
183
183
|
productDependencies: appConfig?.productDependencies || [],
|
|
184
184
|
all,
|
|
185
185
|
implements: impl, // e.g. 'dx/excshell/1', 'application'
|
|
@@ -272,7 +272,7 @@ async function loadCommonConfig (/* istanbul ignore next */options = {}) {
|
|
|
272
272
|
*
|
|
273
273
|
* @param {string} appConfigFile path to the app.config.yaml
|
|
274
274
|
* @param {object} options options
|
|
275
|
-
* @param {
|
|
275
|
+
* @param {boolean} options.absolutePaths boolean, true for rewriting
|
|
276
276
|
* configuration paths to absolute, false for relative to the appConfigFile
|
|
277
277
|
* directory. Defaults to false. Note, that config values will never be
|
|
278
278
|
* rewritten as relative to the cwd. But also note that
|