@lwrjs/config 0.15.0-alpha.23 → 0.15.0-alpha.25
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.
|
@@ -188,10 +188,16 @@ var ValidationContext = class {
|
|
|
188
188
|
if (node) {
|
|
189
189
|
const children = node.children || [];
|
|
190
190
|
for (const [index, child] of children.entries()) {
|
|
191
|
-
const
|
|
192
|
-
|
|
191
|
+
const matchObj = (0, import_jsonc_parser.findNodeAtLocation)(child, ["match"]);
|
|
192
|
+
let matcher;
|
|
193
|
+
if (matchObj?.type === "array") {
|
|
194
|
+
matcher = (0, import_jsonc_parser.findNodeAtLocation)(child, ["match"])?.children?.map((val) => val.value) || [];
|
|
195
|
+
} else {
|
|
196
|
+
matcher = (0, import_jsonc_parser.findNodeAtLocation)(child, ["match"])?.value || "";
|
|
197
|
+
}
|
|
198
|
+
if (typeof matcher === "string" && !fileExtRegex.test(matcher) || typeof matcher === "object" && matcher.find((match) => !fileExtRegex.test(match))) {
|
|
193
199
|
this.diagnostics.push({
|
|
194
|
-
description: import_diagnostics.descriptions.CONFIG_PARSER.INVALID_FILE_PATTERN(`${property}[${index}].match`,
|
|
200
|
+
description: import_diagnostics.descriptions.CONFIG_PARSER.INVALID_FILE_PATTERN(`${property}[${index}].match`, matcher),
|
|
195
201
|
location: this.getLocationFromNode(node)
|
|
196
202
|
});
|
|
197
203
|
break;
|
|
@@ -151,10 +151,18 @@ export class ValidationContext {
|
|
|
151
151
|
if (node) {
|
|
152
152
|
const children = node.children || [];
|
|
153
153
|
for (const [index, child] of children.entries()) {
|
|
154
|
-
const
|
|
155
|
-
|
|
154
|
+
const matchObj = findNodeAtLocation(child, ['match']);
|
|
155
|
+
let matcher;
|
|
156
|
+
if (matchObj?.type === 'array') {
|
|
157
|
+
matcher = findNodeAtLocation(child, ['match'])?.children?.map(val => val.value) || [];
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
matcher = findNodeAtLocation(child, ['match'])?.value || '';
|
|
161
|
+
}
|
|
162
|
+
if ((typeof matcher === 'string' && !fileExtRegex.test(matcher)) ||
|
|
163
|
+
(typeof matcher === 'object' && matcher.find((match) => !fileExtRegex.test(match)))) {
|
|
156
164
|
this.diagnostics.push({
|
|
157
|
-
description: descriptions.CONFIG_PARSER.INVALID_FILE_PATTERN(`${property}[${index}].match`,
|
|
165
|
+
description: descriptions.CONFIG_PARSER.INVALID_FILE_PATTERN(`${property}[${index}].match`, matcher),
|
|
158
166
|
location: this.getLocationFromNode(node)
|
|
159
167
|
});
|
|
160
168
|
break;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.15.0-alpha.
|
|
7
|
+
"version": "0.15.0-alpha.25",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"test": "jest"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@lwrjs/diagnostics": "0.15.0-alpha.
|
|
46
|
-
"@lwrjs/instrumentation": "0.15.0-alpha.
|
|
47
|
-
"@lwrjs/shared-utils": "0.15.0-alpha.
|
|
45
|
+
"@lwrjs/diagnostics": "0.15.0-alpha.25",
|
|
46
|
+
"@lwrjs/instrumentation": "0.15.0-alpha.25",
|
|
47
|
+
"@lwrjs/shared-utils": "0.15.0-alpha.25",
|
|
48
48
|
"fs-extra": "^11.2.0",
|
|
49
49
|
"jsonc-parser": "^3.3.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@lwrjs/types": "0.15.0-alpha.
|
|
52
|
+
"@lwrjs/types": "0.15.0-alpha.25",
|
|
53
53
|
"jest": "^26.6.3",
|
|
54
|
-
"memfs": "^4.
|
|
54
|
+
"memfs": "^4.13.0",
|
|
55
55
|
"ts-jest": "^26.5.6"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"volta": {
|
|
72
72
|
"extends": "../../../package.json"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "0e430bd7cbd44f66c9a30d86d2dc69fa592af0ea"
|
|
75
75
|
}
|