@lwrjs/diagnostics 0.6.5 → 0.7.0-alpha.10
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/LICENSE +10 -0
- package/build/cjs/descriptions/configParser.cjs +4 -0
- package/build/cjs/descriptions/unresolvable.cjs +5 -0
- package/build/es/categories.d.ts +1 -1
- package/build/es/descriptions/configParser.d.ts +7 -0
- package/build/es/descriptions/configParser.js +4 -0
- package/build/es/descriptions/index.d.ts +14 -0
- package/build/es/descriptions/unresolvable.d.ts +7 -0
- package/build/es/descriptions/unresolvable.js +4 -0
- package/package.json +4 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
MIT LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020, Salesforce.com, Inc.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
7
|
+
|
|
8
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -91,6 +91,10 @@ var configParser = (0, import_core_diagnostics.createDiagnosticsCategory)({
|
|
|
91
91
|
category: "lwrConfig/invalidSchema",
|
|
92
92
|
message: `Property "${configProperty}" must be a URI path string which starts but does not end with a slash, received ${actualProp}`
|
|
93
93
|
}),
|
|
94
|
+
INVALID_BASEPATH: (configProperty, actualProp) => ({
|
|
95
|
+
category: "lwrConfig/invalidSchema",
|
|
96
|
+
message: `Property "${configProperty}" must be a URI base path string which starts with a slash, received ${actualProp}`
|
|
97
|
+
}),
|
|
94
98
|
INVALID_SERVICE: (configProperty, actualProp) => ({
|
|
95
99
|
category: "lwrConfig/invalidSchema",
|
|
96
100
|
message: `Property "${configProperty}" must be a valid service (a non-empty string or array with [non-empty string, any]), received ${actualProp}`
|
|
@@ -67,6 +67,11 @@ var unresolvable = (0, import_core_diagnostics.createDiagnosticsCategory)({
|
|
|
67
67
|
LABEL_MODULE: (file, error) => ({
|
|
68
68
|
category: "lwrUnresolvable/label",
|
|
69
69
|
message: `Invalid JSON: Labels file ${file} must be a JSON object with string values or nested string values
|
|
70
|
+
${error}`
|
|
71
|
+
}),
|
|
72
|
+
ROUTES_MODULE: (file, error) => ({
|
|
73
|
+
category: "lwrUnresolvable/routes",
|
|
74
|
+
message: `Invalid JSON: Route config file ${file} is invalid
|
|
70
75
|
${error}`
|
|
71
76
|
})
|
|
72
77
|
});
|
package/build/es/categories.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare type DiagnosticCategory = DiagnosticLwrConfigCategory | DiagnosticCompiler | DiagnosticLwrUnresolvableCategory | DiagnosticLwrServer | '...more here';
|
|
2
2
|
export declare type DiagnosticLwrConfigCategory = 'lwrConfig/invalidJson' | 'lwrConfig/invalidSchema';
|
|
3
|
-
export declare type DiagnosticLwrUnresolvableCategory = 'lwrUnresolvable/asset' | 'lwrUnresolvable/module' | 'lwrUnresolvable/label' | 'lwrUnresolvable/resource' | 'lwrUnresolvable/invalid' | 'lwrUnresolvable/fatal';
|
|
3
|
+
export declare type DiagnosticLwrUnresolvableCategory = 'lwrUnresolvable/asset' | 'lwrUnresolvable/module' | 'lwrUnresolvable/label' | 'lwrUnresolvable/routes' | 'lwrUnresolvable/resource' | 'lwrUnresolvable/invalid' | 'lwrUnresolvable/fatal';
|
|
4
4
|
export declare type DiagnosticCompiler = 'compile/umd_transform';
|
|
5
5
|
export declare type DiagnosticLwrServer = 'lwrServer/warmupError';
|
|
6
6
|
//# sourceMappingURL=categories.d.ts.map
|
|
@@ -114,6 +114,13 @@ export declare const configParser: {
|
|
|
114
114
|
advice: import("../types.js").DiagnosticAdvice;
|
|
115
115
|
message: string;
|
|
116
116
|
};
|
|
117
|
+
INVALID_BASEPATH: (configProperty: string, actualProp: string) => Omit<{
|
|
118
|
+
category: "lwrConfig/invalidSchema";
|
|
119
|
+
message: string;
|
|
120
|
+
}, "message" | "advice"> & {
|
|
121
|
+
advice: import("../types.js").DiagnosticAdvice;
|
|
122
|
+
message: string;
|
|
123
|
+
};
|
|
117
124
|
INVALID_SERVICE: (configProperty: string, actualProp: string) => Omit<{
|
|
118
125
|
category: "lwrConfig/invalidSchema";
|
|
119
126
|
message: string;
|
|
@@ -63,6 +63,10 @@ export const configParser = createDiagnosticsCategory({
|
|
|
63
63
|
category: 'lwrConfig/invalidSchema',
|
|
64
64
|
message: `Property "${configProperty}" must be a URI path string which starts but does not end with a slash, received ${actualProp}`,
|
|
65
65
|
}),
|
|
66
|
+
INVALID_BASEPATH: (configProperty, actualProp) => ({
|
|
67
|
+
category: 'lwrConfig/invalidSchema',
|
|
68
|
+
message: `Property "${configProperty}" must be a URI base path string which starts with a slash, received ${actualProp}`,
|
|
69
|
+
}),
|
|
66
70
|
INVALID_SERVICE: (configProperty, actualProp) => ({
|
|
67
71
|
category: 'lwrConfig/invalidSchema',
|
|
68
72
|
message: `Property "${configProperty}" must be a valid service (a non-empty string or array with [non-empty string, any]), received ${actualProp}`,
|
|
@@ -114,6 +114,13 @@ export declare const descriptions: {
|
|
|
114
114
|
advice: import("../types.js").DiagnosticAdvice;
|
|
115
115
|
message: string;
|
|
116
116
|
};
|
|
117
|
+
INVALID_BASEPATH: (configProperty: string, actualProp: string) => Omit<{
|
|
118
|
+
category: "lwrConfig/invalidSchema";
|
|
119
|
+
message: string;
|
|
120
|
+
}, "message" | "advice"> & {
|
|
121
|
+
advice: import("../types.js").DiagnosticAdvice;
|
|
122
|
+
message: string;
|
|
123
|
+
};
|
|
117
124
|
INVALID_SERVICE: (configProperty: string, actualProp: string) => Omit<{
|
|
118
125
|
category: "lwrConfig/invalidSchema";
|
|
119
126
|
message: string;
|
|
@@ -228,6 +235,13 @@ export declare const descriptions: {
|
|
|
228
235
|
advice: import("../types.js").DiagnosticAdvice;
|
|
229
236
|
message: string;
|
|
230
237
|
};
|
|
238
|
+
ROUTES_MODULE: (file: string, error: string) => Omit<{
|
|
239
|
+
category: "lwrUnresolvable/routes";
|
|
240
|
+
message: string;
|
|
241
|
+
}, "message" | "advice"> & {
|
|
242
|
+
advice: import("../types.js").DiagnosticAdvice;
|
|
243
|
+
message: string;
|
|
244
|
+
};
|
|
231
245
|
};
|
|
232
246
|
SERVER: {
|
|
233
247
|
WARMUP_ERROR: (error: string) => Omit<{
|
|
@@ -69,5 +69,12 @@ export declare const unresolvable: {
|
|
|
69
69
|
advice: import("../types.js").DiagnosticAdvice;
|
|
70
70
|
message: string;
|
|
71
71
|
};
|
|
72
|
+
ROUTES_MODULE: (file: string, error: string) => Omit<{
|
|
73
|
+
category: "lwrUnresolvable/routes";
|
|
74
|
+
message: string;
|
|
75
|
+
}, "message" | "advice"> & {
|
|
76
|
+
advice: import("../types.js").DiagnosticAdvice;
|
|
77
|
+
message: string;
|
|
78
|
+
};
|
|
72
79
|
};
|
|
73
80
|
//# sourceMappingURL=unresolvable.d.ts.map
|
|
@@ -40,5 +40,9 @@ export const unresolvable = createDiagnosticsCategory({
|
|
|
40
40
|
category: 'lwrUnresolvable/label',
|
|
41
41
|
message: `Invalid JSON: Labels file ${file} must be a JSON object with string values or nested string values\n${error}`,
|
|
42
42
|
}),
|
|
43
|
+
ROUTES_MODULE: (file, error) => ({
|
|
44
|
+
category: 'lwrUnresolvable/routes',
|
|
45
|
+
message: `Invalid JSON: Route config file ${file} is invalid\n${error}`,
|
|
46
|
+
}),
|
|
43
47
|
});
|
|
44
48
|
//# sourceMappingURL=unresolvable.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.7.0-alpha.10",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -30,9 +30,10 @@
|
|
|
30
30
|
"build/**/*.d.ts"
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@lwrjs/types": "0.
|
|
33
|
+
"@lwrjs/types": "0.7.0-alpha.10"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=14.15.4 <17"
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
"gitHead": "83c1e65e2169094cb55ac2c37e5aef16d3a9aa4a"
|
|
38
39
|
}
|