@lwrjs/diagnostics 0.17.2-alpha.0 → 0.17.2-alpha.2
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/cjs/descriptions/application.cjs +11 -27
- package/build/cjs/descriptions/config.cjs +41 -0
- package/build/cjs/descriptions/index.cjs +2 -3
- package/build/cjs/descriptions/server.cjs +5 -31
- package/build/cjs/descriptions/unresolvable.cjs +16 -100
- package/build/cjs/errors.cjs +39 -33
- package/build/cjs/index.cjs +0 -1
- package/build/es/descriptions/application.d.ts +11 -10
- package/build/es/descriptions/application.js +11 -11
- package/build/es/descriptions/config.d.ts +30 -0
- package/build/es/descriptions/config.js +31 -0
- package/build/es/descriptions/index.d.ts +60 -234
- package/build/es/descriptions/index.js +2 -3
- package/build/es/descriptions/server.d.ts +5 -14
- package/build/es/descriptions/server.js +5 -15
- package/build/es/descriptions/unresolvable.d.ts +15 -82
- package/build/es/descriptions/unresolvable.js +15 -83
- package/build/es/errors.d.ts +36 -15
- package/build/es/errors.js +42 -34
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -1
- package/package.json +3 -3
- package/build/cjs/descriptions/compiler.cjs +0 -35
- package/build/cjs/descriptions/configParser.cjs +0 -150
- package/build/cjs/descriptions/core-diagnostics.cjs +0 -37
- package/build/cjs/types.cjs +0 -5
- package/build/es/descriptions/compiler.d.ts +0 -7
- package/build/es/descriptions/compiler.js +0 -8
- package/build/es/descriptions/configParser.d.ts +0 -129
- package/build/es/descriptions/configParser.js +0 -123
- package/build/es/descriptions/core-diagnostics.d.ts +0 -3
- package/build/es/descriptions/core-diagnostics.js +0 -27
- package/build/es/types.d.ts +0 -160
- package/build/es/types.js +0 -2
package/build/es/types.d.ts
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import type { Dict } from '@lwrjs/types';
|
|
2
|
-
export type StaticMarkup = string;
|
|
3
|
-
export type SourceLocation = {
|
|
4
|
-
filename?: string;
|
|
5
|
-
identifierName?: string;
|
|
6
|
-
offset?: number;
|
|
7
|
-
start: Position;
|
|
8
|
-
end: Position;
|
|
9
|
-
};
|
|
10
|
-
export type Position = {
|
|
11
|
-
line: number;
|
|
12
|
-
column: number;
|
|
13
|
-
};
|
|
14
|
-
export type DiagnosticLocation = {
|
|
15
|
-
sourceText?: string;
|
|
16
|
-
integrity?: DiagnosticIntegrity;
|
|
17
|
-
marker?: StaticMarkup;
|
|
18
|
-
language?: DiagnosticLanguage;
|
|
19
|
-
filename?: string;
|
|
20
|
-
start?: Position;
|
|
21
|
-
end?: Position;
|
|
22
|
-
};
|
|
23
|
-
export type DiagnosticOrigin = {
|
|
24
|
-
category: string;
|
|
25
|
-
message?: string;
|
|
26
|
-
};
|
|
27
|
-
export type DiagnosticLogCategory = 'none' | 'info' | 'warn' | 'error';
|
|
28
|
-
export type DiagnosticLanguage = 'json' | 'js' | 'css' | 'html' | 'markdown' | 'text' | 'unknown';
|
|
29
|
-
export type DiagnosticTag = 'fixable' | 'internal' | 'unique' | 'fatal';
|
|
30
|
-
export type DiagnosticTags = {
|
|
31
|
-
[key in DiagnosticTag]?: boolean;
|
|
32
|
-
};
|
|
33
|
-
export type Diagnostic = {
|
|
34
|
-
description: DiagnosticDescription;
|
|
35
|
-
location?: DiagnosticLocation;
|
|
36
|
-
label?: StaticMarkup;
|
|
37
|
-
origins?: DiagnosticOrigin[];
|
|
38
|
-
dependencies?: {
|
|
39
|
-
filename: string;
|
|
40
|
-
integrity: DiagnosticIntegrity;
|
|
41
|
-
}[];
|
|
42
|
-
tags?: DiagnosticTags;
|
|
43
|
-
};
|
|
44
|
-
export type Diagnostics = Diagnostic[];
|
|
45
|
-
export type DiagnosticIntegrity = {
|
|
46
|
-
hash: string;
|
|
47
|
-
};
|
|
48
|
-
export type DiagnosticDescription = {
|
|
49
|
-
category: DiagnosticCategory;
|
|
50
|
-
categoryValue?: string;
|
|
51
|
-
message: StaticMarkup;
|
|
52
|
-
advice: DiagnosticAdvice;
|
|
53
|
-
};
|
|
54
|
-
export type DiagnosticDescriptionOptional = {
|
|
55
|
-
category?: DiagnosticCategory;
|
|
56
|
-
categoryValue?: string;
|
|
57
|
-
message: StaticMarkup;
|
|
58
|
-
advice?: DiagnosticAdvice;
|
|
59
|
-
};
|
|
60
|
-
export type DiagnosticAdviceItem = DiagnosticAdviceLog | DiagnosticAdviceList | DiagnosticAdviceInspect | DiagnosticAdviceCode | DiagnosticAdviceFrame | DiagnosticAdviceDiff | DiagnosticAdviceStacktrace | DiagnosticAdviceCommand | DiagnosticAdviceAction | DiagnosticAdviceGroup;
|
|
61
|
-
export type DiagnosticAdviceGroup = {
|
|
62
|
-
type: 'group';
|
|
63
|
-
title: StaticMarkup;
|
|
64
|
-
advice: DiagnosticAdvice;
|
|
65
|
-
};
|
|
66
|
-
export type DiagnosticAdviceCommand = {
|
|
67
|
-
type: 'command';
|
|
68
|
-
command: string;
|
|
69
|
-
};
|
|
70
|
-
export type DiagnosticAdviceLog = {
|
|
71
|
-
type: 'log';
|
|
72
|
-
category: DiagnosticLogCategory;
|
|
73
|
-
text: StaticMarkup;
|
|
74
|
-
compact?: boolean;
|
|
75
|
-
};
|
|
76
|
-
export type DiagnosticAdviceList = {
|
|
77
|
-
type: 'list';
|
|
78
|
-
list: StaticMarkup[];
|
|
79
|
-
truncate?: boolean;
|
|
80
|
-
reverse?: boolean;
|
|
81
|
-
ordered?: boolean;
|
|
82
|
-
};
|
|
83
|
-
export type DiagnosticAdviceInspect = {
|
|
84
|
-
type: 'inspect';
|
|
85
|
-
data: any;
|
|
86
|
-
};
|
|
87
|
-
export type DiagnosticAdviceAction = {
|
|
88
|
-
type: 'action';
|
|
89
|
-
hidden?: boolean;
|
|
90
|
-
extra?: boolean;
|
|
91
|
-
shortcut?: string;
|
|
92
|
-
instruction: StaticMarkup;
|
|
93
|
-
noun: StaticMarkup;
|
|
94
|
-
command: string;
|
|
95
|
-
commandFlags?: Dict<boolean | string | string[]>;
|
|
96
|
-
requestFlags?: any;
|
|
97
|
-
args?: string[];
|
|
98
|
-
};
|
|
99
|
-
export type DiagnosticAdviceCode = {
|
|
100
|
-
type: 'code';
|
|
101
|
-
sourceText: string;
|
|
102
|
-
sourceTypeJS?: any;
|
|
103
|
-
language: DiagnosticLanguage;
|
|
104
|
-
};
|
|
105
|
-
export type DiagnosticAdviceFrame = {
|
|
106
|
-
type: 'frame';
|
|
107
|
-
location: DiagnosticLocation;
|
|
108
|
-
};
|
|
109
|
-
export type DiagnosticAdviceDiff = {
|
|
110
|
-
type: 'diff';
|
|
111
|
-
diff: any;
|
|
112
|
-
language: DiagnosticLanguage;
|
|
113
|
-
sourceTypeJS?: any;
|
|
114
|
-
legend?: {
|
|
115
|
-
add: string;
|
|
116
|
-
delete: string;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
export type DiagnosticAdviceStacktrace = {
|
|
120
|
-
type: 'stacktrace';
|
|
121
|
-
title?: StaticMarkup;
|
|
122
|
-
truncate?: boolean;
|
|
123
|
-
importantFilenames?: string[];
|
|
124
|
-
frames: DiagnosticAdviceStackFrame[];
|
|
125
|
-
};
|
|
126
|
-
export type DiagnosticAdvice = DiagnosticAdviceItem[];
|
|
127
|
-
export type DiagnosticAdviceStackFrame = {
|
|
128
|
-
prefix?: string;
|
|
129
|
-
suffix?: string;
|
|
130
|
-
object?: string;
|
|
131
|
-
property?: string;
|
|
132
|
-
filename?: string;
|
|
133
|
-
line?: number;
|
|
134
|
-
column?: number;
|
|
135
|
-
language: undefined | DiagnosticLanguage;
|
|
136
|
-
sourceText?: string;
|
|
137
|
-
};
|
|
138
|
-
export type DiagnosticCategory = DiagnosticLwrConfigCategory | DiagnosticCompiler | DiagnosticLwrUnresolvableCategory | DiagnosticLwrServer | DiagnosticLwrApplication | '...more here';
|
|
139
|
-
export type DiagnosticLwrConfigCategory = 'lwrConfig/invalidJson' | 'lwrConfig/invalidSchema';
|
|
140
|
-
export type DiagnosticLwrUnresolvableCategory = 'lwrUnresolvable/asset' | 'lwrUnresolvable/module' | 'lwrUnresolvable/bundle' | 'lwrUnresolvable/label' | 'lwrUnresolvable/routes' | 'lwrUnresolvable/resource' | 'lwrUnresolvable/view' | 'lwrUnresolvable/ssr' | 'lwrUnresolvable/invalid';
|
|
141
|
-
export type DiagnosticCompiler = 'compile/umd_transform';
|
|
142
|
-
export type DiagnosticLwrServer = 'lwrServer/warmupError' | 'lwrServer/invalidMode' | 'lwrServer/fatal';
|
|
143
|
-
export type DiagnosticLwrApplication = 'lwrApplication/routeHandler' | 'lwrApplication/ssr';
|
|
144
|
-
export type InputMessagesFactory = (...params: any[]) => Partial<DiagnosticDescription>;
|
|
145
|
-
export type InputMessagesCategory = {
|
|
146
|
-
[key: string]: Partial<DiagnosticDescription> | InputMessagesFactory;
|
|
147
|
-
};
|
|
148
|
-
export type OuputMessagesFactoryReturn<Ret extends Partial<DiagnosticDescription>> = Omit<Ret, 'message' | 'advice'> & {
|
|
149
|
-
advice: DiagnosticAdvice;
|
|
150
|
-
message: StaticMarkup;
|
|
151
|
-
};
|
|
152
|
-
export type OutputMessagesFactory<Func extends InputMessagesFactory> = (...params: Parameters<Func>) => OuputMessagesFactoryReturn<ReturnType<Func>>;
|
|
153
|
-
export type OutputMessagesValue<Value> = Value extends StaticMarkup ? {
|
|
154
|
-
message: StaticMarkup;
|
|
155
|
-
advice: DiagnosticAdvice;
|
|
156
|
-
} : Value extends Partial<DiagnosticDescription> ? OuputMessagesFactoryReturn<Value> : Value extends InputMessagesFactory ? OutputMessagesFactory<Value> : never;
|
|
157
|
-
export type OutputMessagesCategory<Input extends InputMessagesCategory> = {
|
|
158
|
-
[Key in keyof Input]: OutputMessagesValue<Input[Key]>;
|
|
159
|
-
};
|
|
160
|
-
//# sourceMappingURL=types.d.ts.map
|
package/build/es/types.js
DELETED