@lwrjs/diagnostics
Advanced tools
Comparing version 0.0.2-alpha49 to 0.0.2-alpha50
@@ -1,4 +0,5 @@ | ||
export declare type DiagnosticCategory = DiagnosticLwrConfigCategory | DiagnosticCompiler | '...more here'; | ||
export declare type DiagnosticCategory = DiagnosticLwrConfigCategory | DiagnosticCompiler | DiagnosticLwrUnresolvableCategory | '...more here'; | ||
export declare type DiagnosticLwrConfigCategory = 'lwrConfig/invalidJson' | 'lwrConfig/invalidSchema'; | ||
export declare type DiagnosticLwrUnresolvableCategory = 'lwrUnresolvable/asset' | 'lwrUnresolvable/module' | 'lwrUnresolvable/resource' | 'lwrUnresolvable/invalid' | 'lwrUnresolvable/fatal'; | ||
export declare type DiagnosticCompiler = 'compile/umd_transform'; | ||
//# sourceMappingURL=categories.d.ts.map |
@@ -99,4 +99,42 @@ import { DiagnosticDescription, DiagnosticAdvice, StaticMarkup } from '../types'; | ||
}>; | ||
UNRESOLVABLE: OutputMessagesCategory<{ | ||
ASSET: (assetPath: string) => { | ||
category: "lwrUnresolvable/asset"; | ||
message: string; | ||
}; | ||
DIR_ALIAS: (assetPath: string) => { | ||
category: "lwrUnresolvable/asset"; | ||
message: string; | ||
}; | ||
MODULE: (moduleSpecifier: string) => { | ||
category: "lwrUnresolvable/module"; | ||
message: string; | ||
}; | ||
MODULE_ENTRY: (moduleSpecifier: string) => { | ||
category: "lwrUnresolvable/module"; | ||
message: string; | ||
}; | ||
LWC_MODULE: (name: string) => { | ||
category: "lwrUnresolvable/module"; | ||
message: string; | ||
}; | ||
SIGNED_MODULE: (moduleSpecifier: string, signature: string) => { | ||
category: "lwrUnresolvable/module"; | ||
message: string; | ||
}; | ||
RESOURCE: (resourceSpecifier: string) => { | ||
category: "lwrUnresolvable/resource"; | ||
message: string; | ||
}; | ||
SERVER_ERROR: (name: string) => { | ||
category: "lwrUnresolvable/fatal"; | ||
message: string; | ||
}; | ||
INVALID_JSON: () => { | ||
category: "lwrUnresolvable/invalid"; | ||
message: string; | ||
}; | ||
}>; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
import { configParser } from './configParser.js'; | ||
import { unresolvable } from './unresolvable.js'; | ||
export function createDiagnosticsCategory(input) { | ||
@@ -32,3 +33,4 @@ const category = {}; | ||
CONFIG_PARSER: configParser, | ||
UNRESOLVABLE: unresolvable, | ||
}; | ||
//# sourceMappingURL=index.js.map |
import { Diagnostic, Diagnostics } from './types'; | ||
export declare function createSingleDiagnosticError(diag: Diagnostic): DiagnosticsError; | ||
export declare function createSingleDiagnosticError(diag: Diagnostic, errorClass?: typeof DiagnosticsError): DiagnosticsError; | ||
export declare class DiagnosticsError extends Error { | ||
@@ -12,2 +12,4 @@ constructor(message: undefined | string, diagnostics: Diagnostics); | ||
} | ||
export declare class LwrUnresolvableError extends DiagnosticsError { | ||
} | ||
//# sourceMappingURL=errors.d.ts.map |
@@ -1,3 +0,3 @@ | ||
export function createSingleDiagnosticError(diag) { | ||
return new DiagnosticsError(diag.description.message, [diag]); | ||
export function createSingleDiagnosticError(diag, errorClass = DiagnosticsError) { | ||
return new errorClass(diag.description.message, [diag]); | ||
} | ||
@@ -27,2 +27,4 @@ export class DiagnosticsError extends Error { | ||
} | ||
export class LwrUnresolvableError extends DiagnosticsError { | ||
} | ||
//# sourceMappingURL=errors.js.map |
@@ -36,3 +36,3 @@ import { DiagnosticCategory } from './categories'; | ||
description: DiagnosticDescription; | ||
location: DiagnosticLocation; | ||
location?: DiagnosticLocation; | ||
label?: StaticMarkup; | ||
@@ -39,0 +39,0 @@ origins?: DiagnosticOrigin[]; |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.0.2-alpha49", | ||
"version": "0.0.2-alpha50", | ||
"homepage": "https://lwr.dev/", | ||
@@ -34,3 +34,3 @@ "repository": { | ||
"devDependencies": { | ||
"@lwrjs/types": "0.0.2-alpha49" | ||
"@lwrjs/types": "0.0.2-alpha50" | ||
}, | ||
@@ -40,3 +40,3 @@ "engines": { | ||
}, | ||
"gitHead": "853a827e4377c1b9c63a8005ead350597cd6aee3" | ||
"gitHead": "e522a5ddddc83c076987e1b97a2c55f583fc9390" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
41517
26
1026