@lwrjs/diagnostics 0.10.0-alpha.15 → 0.10.0-alpha.17
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/build/es/categories.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export type DiagnosticCategory = DiagnosticLwrConfigCategory | DiagnosticCompiler | DiagnosticLwrUnresolvableCategory | DiagnosticLwrServer | '...more here';
|
|
2
|
+
export type DiagnosticLwrConfigCategory = 'lwrConfig/invalidJson' | 'lwrConfig/invalidSchema';
|
|
3
|
+
export type DiagnosticLwrUnresolvableCategory = 'lwrUnresolvable/asset' | 'lwrUnresolvable/module' | 'lwrUnresolvable/bundle' | 'lwrUnresolvable/label' | 'lwrUnresolvable/routes' | 'lwrUnresolvable/resource' | 'lwrUnresolvable/view' | 'lwrUnresolvable/invalid' | 'lwrUnresolvable/fatal';
|
|
4
|
+
export type DiagnosticCompiler = 'compile/umd_transform';
|
|
5
|
+
export type DiagnosticLwrServer = 'lwrServer/warmupError' | `lwrServer/invalidMode`;
|
|
6
6
|
//# sourceMappingURL=categories.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { DiagnosticDescription, DiagnosticAdvice, StaticMarkup } from '../types';
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import type { DiagnosticDescription, DiagnosticAdvice, StaticMarkup } from '../types';
|
|
2
|
+
type InputMessagesFactory = (...params: any[]) => Partial<DiagnosticDescription>;
|
|
3
|
+
export type InputMessagesCategory = {
|
|
4
4
|
[key: string]: Partial<DiagnosticDescription> | InputMessagesFactory;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type OuputMessagesFactoryReturn<Ret extends Partial<DiagnosticDescription>> = Omit<Ret, 'message' | 'advice'> & {
|
|
7
7
|
advice: DiagnosticAdvice;
|
|
8
8
|
message: StaticMarkup;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type OutputMessagesFactory<Func extends InputMessagesFactory> = (...params: Parameters<Func>) => OuputMessagesFactoryReturn<ReturnType<Func>>;
|
|
11
|
+
type OutputMessagesValue<Value> = Value extends StaticMarkup ? {
|
|
12
12
|
message: StaticMarkup;
|
|
13
13
|
advice: DiagnosticAdvice;
|
|
14
14
|
} : Value extends Partial<DiagnosticDescription> ? OuputMessagesFactoryReturn<Value> : Value extends InputMessagesFactory ? OutputMessagesFactory<Value> : never;
|
|
15
|
-
|
|
15
|
+
type OutputMessagesCategory<Input extends InputMessagesCategory> = {
|
|
16
16
|
[Key in keyof Input]: OutputMessagesValue<Input[Key]>;
|
|
17
17
|
};
|
|
18
18
|
export declare function createDiagnosticsCategory<Input extends InputMessagesCategory>(input: Input): OutputMessagesCategory<Input>;
|
package/build/es/errors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Diagnostic, Diagnostics } from './types.js';
|
|
2
|
+
import type { Diagnostic, Diagnostics } from './types.js';
|
|
3
3
|
export declare function isNodeError(error: unknown): error is NodeJS.ErrnoException;
|
|
4
4
|
export declare function createSingleDiagnosticError(diag: Diagnostic, errorClass?: typeof DiagnosticsError): DiagnosticsError;
|
|
5
5
|
export declare class DiagnosticsError extends Error {
|
package/build/es/types.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { DiagnosticCategory } from './categories';
|
|
2
|
-
import { Dict } from '@lwrjs/types';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
import type { DiagnosticCategory } from './categories';
|
|
2
|
+
import type { Dict } from '@lwrjs/types';
|
|
3
|
+
export type StaticMarkup = string;
|
|
4
|
+
export type SourceLocation = {
|
|
5
5
|
filename?: string;
|
|
6
6
|
identifierName?: string;
|
|
7
7
|
offset?: number;
|
|
8
8
|
start: Position;
|
|
9
9
|
end: Position;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type Position = {
|
|
12
12
|
line: number;
|
|
13
13
|
column: number;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type DiagnosticLocation = {
|
|
16
16
|
sourceText?: string;
|
|
17
17
|
integrity?: DiagnosticIntegrity;
|
|
18
18
|
marker?: StaticMarkup;
|
|
@@ -21,17 +21,17 @@ export declare type DiagnosticLocation = {
|
|
|
21
21
|
start?: Position;
|
|
22
22
|
end?: Position;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type DiagnosticOrigin = {
|
|
25
25
|
category: string;
|
|
26
26
|
message?: string;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
28
|
+
export type DiagnosticLogCategory = 'none' | 'info' | 'warn' | 'error';
|
|
29
|
+
export type DiagnosticLanguage = 'json' | 'js' | 'css' | 'html' | 'markdown' | 'text' | 'unknown';
|
|
30
|
+
export type DiagnosticTag = 'fixable' | 'internal' | 'unique' | 'fatal';
|
|
31
|
+
export type DiagnosticTags = {
|
|
32
32
|
[key in DiagnosticTag]?: boolean;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type Diagnostic = {
|
|
35
35
|
description: DiagnosticDescription;
|
|
36
36
|
location?: DiagnosticLocation;
|
|
37
37
|
label?: StaticMarkup;
|
|
@@ -42,50 +42,50 @@ export declare type Diagnostic = {
|
|
|
42
42
|
}[];
|
|
43
43
|
tags?: DiagnosticTags;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
46
|
-
export
|
|
45
|
+
export type Diagnostics = Diagnostic[];
|
|
46
|
+
export type DiagnosticIntegrity = {
|
|
47
47
|
hash: string;
|
|
48
48
|
};
|
|
49
|
-
export
|
|
49
|
+
export type DiagnosticDescription = {
|
|
50
50
|
category: DiagnosticCategory;
|
|
51
51
|
categoryValue?: string;
|
|
52
52
|
message: StaticMarkup;
|
|
53
53
|
advice: DiagnosticAdvice;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type DiagnosticDescriptionOptional = {
|
|
56
56
|
category?: DiagnosticCategory;
|
|
57
57
|
categoryValue?: string;
|
|
58
58
|
message: StaticMarkup;
|
|
59
59
|
advice?: DiagnosticAdvice;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
62
|
-
export
|
|
61
|
+
export type DiagnosticAdviceItem = DiagnosticAdviceLog | DiagnosticAdviceList | DiagnosticAdviceInspect | DiagnosticAdviceCode | DiagnosticAdviceFrame | DiagnosticAdviceDiff | DiagnosticAdviceStacktrace | DiagnosticAdviceCommand | DiagnosticAdviceAction | DiagnosticAdviceGroup;
|
|
62
|
+
export type DiagnosticAdviceGroup = {
|
|
63
63
|
type: 'group';
|
|
64
64
|
title: StaticMarkup;
|
|
65
65
|
advice: DiagnosticAdvice;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type DiagnosticAdviceCommand = {
|
|
68
68
|
type: 'command';
|
|
69
69
|
command: string;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type DiagnosticAdviceLog = {
|
|
72
72
|
type: 'log';
|
|
73
73
|
category: DiagnosticLogCategory;
|
|
74
74
|
text: StaticMarkup;
|
|
75
75
|
compact?: boolean;
|
|
76
76
|
};
|
|
77
|
-
export
|
|
77
|
+
export type DiagnosticAdviceList = {
|
|
78
78
|
type: 'list';
|
|
79
79
|
list: StaticMarkup[];
|
|
80
80
|
truncate?: boolean;
|
|
81
81
|
reverse?: boolean;
|
|
82
82
|
ordered?: boolean;
|
|
83
83
|
};
|
|
84
|
-
export
|
|
84
|
+
export type DiagnosticAdviceInspect = {
|
|
85
85
|
type: 'inspect';
|
|
86
86
|
data: any;
|
|
87
87
|
};
|
|
88
|
-
export
|
|
88
|
+
export type DiagnosticAdviceAction = {
|
|
89
89
|
type: 'action';
|
|
90
90
|
hidden?: boolean;
|
|
91
91
|
extra?: boolean;
|
|
@@ -97,17 +97,17 @@ export declare type DiagnosticAdviceAction = {
|
|
|
97
97
|
requestFlags?: any;
|
|
98
98
|
args?: string[];
|
|
99
99
|
};
|
|
100
|
-
export
|
|
100
|
+
export type DiagnosticAdviceCode = {
|
|
101
101
|
type: 'code';
|
|
102
102
|
sourceText: string;
|
|
103
103
|
sourceTypeJS?: any;
|
|
104
104
|
language: DiagnosticLanguage;
|
|
105
105
|
};
|
|
106
|
-
export
|
|
106
|
+
export type DiagnosticAdviceFrame = {
|
|
107
107
|
type: 'frame';
|
|
108
108
|
location: DiagnosticLocation;
|
|
109
109
|
};
|
|
110
|
-
export
|
|
110
|
+
export type DiagnosticAdviceDiff = {
|
|
111
111
|
type: 'diff';
|
|
112
112
|
diff: any;
|
|
113
113
|
language: DiagnosticLanguage;
|
|
@@ -117,15 +117,15 @@ export declare type DiagnosticAdviceDiff = {
|
|
|
117
117
|
delete: string;
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
|
-
export
|
|
120
|
+
export type DiagnosticAdviceStacktrace = {
|
|
121
121
|
type: 'stacktrace';
|
|
122
122
|
title?: StaticMarkup;
|
|
123
123
|
truncate?: boolean;
|
|
124
124
|
importantFilenames?: string[];
|
|
125
125
|
frames: DiagnosticAdviceStackFrame[];
|
|
126
126
|
};
|
|
127
|
-
export
|
|
128
|
-
export
|
|
127
|
+
export type DiagnosticAdvice = DiagnosticAdviceItem[];
|
|
128
|
+
export type DiagnosticAdviceStackFrame = {
|
|
129
129
|
prefix?: string;
|
|
130
130
|
suffix?: string;
|
|
131
131
|
object?: string;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.10.0-alpha.
|
|
7
|
+
"version": "0.10.0-alpha.17",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"build/**/*.d.ts"
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@lwrjs/types": "0.10.0-alpha.
|
|
33
|
+
"@lwrjs/types": "0.10.0-alpha.17"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=16.0.0 <20"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "36cfce3a18bf3dc71a7d5203bbaa9aa752ccce06"
|
|
39
39
|
}
|