html-validate 9.2.2 → 9.4.0

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.
@@ -2,6 +2,422 @@
2
2
 
3
3
  var core = require('./core.js');
4
4
 
5
+ function isSourceHooks(value) {
6
+ if (!value || typeof value === "string") {
7
+ return false;
8
+ }
9
+ return Boolean(value.processAttribute || value.processElement);
10
+ }
11
+ function isConfigData(value) {
12
+ if (!value || typeof value === "string") {
13
+ return false;
14
+ }
15
+ return !(value.processAttribute || value.processElement);
16
+ }
17
+ class HtmlValidate {
18
+ configLoader;
19
+ constructor(arg) {
20
+ const [loader, config] = arg instanceof core.ConfigLoader ? [arg, void 0] : [void 0, arg];
21
+ this.configLoader = loader ?? new core.StaticConfigLoader(config);
22
+ }
23
+ /* eslint-enable @typescript-eslint/unified-signatures */
24
+ validateString(str, arg1, arg2, arg3) {
25
+ const filename = typeof arg1 === "string" ? arg1 : "inline";
26
+ const options = isConfigData(arg1) ? arg1 : isConfigData(arg2) ? arg2 : void 0;
27
+ const hooks = isSourceHooks(arg1) ? arg1 : isSourceHooks(arg2) ? arg2 : arg3;
28
+ const source = {
29
+ data: str,
30
+ filename,
31
+ line: 1,
32
+ column: 1,
33
+ offset: 0,
34
+ hooks
35
+ };
36
+ return this.validateSource(source, options);
37
+ }
38
+ /* eslint-enable @typescript-eslint/unified-signatures */
39
+ validateStringSync(str, arg1, arg2, arg3) {
40
+ const filename = typeof arg1 === "string" ? arg1 : "inline";
41
+ const options = isConfigData(arg1) ? arg1 : isConfigData(arg2) ? arg2 : void 0;
42
+ const hooks = isSourceHooks(arg1) ? arg1 : isSourceHooks(arg2) ? arg2 : arg3;
43
+ const source = {
44
+ data: str,
45
+ filename,
46
+ line: 1,
47
+ column: 1,
48
+ offset: 0,
49
+ hooks
50
+ };
51
+ return this.validateSourceSync(source, options);
52
+ }
53
+ /**
54
+ * Parse and validate HTML from [[Source]].
55
+ *
56
+ * @public
57
+ * @param input - Source to parse.
58
+ * @returns Report output.
59
+ */
60
+ async validateSource(input, configOverride) {
61
+ const source = core.normalizeSource(input);
62
+ const config = await this.getConfigFor(source.filename, configOverride);
63
+ const resolvers = this.configLoader.getResolvers();
64
+ const transformedSource = await core.transformSource(resolvers, config, source);
65
+ const engine = new core.Engine(config, core.Parser);
66
+ return engine.lint(transformedSource);
67
+ }
68
+ /**
69
+ * Parse and validate HTML from [[Source]].
70
+ *
71
+ * @public
72
+ * @param input - Source to parse.
73
+ * @returns Report output.
74
+ */
75
+ validateSourceSync(input, configOverride) {
76
+ const source = core.normalizeSource(input);
77
+ const config = this.getConfigForSync(source.filename, configOverride);
78
+ const resolvers = this.configLoader.getResolvers();
79
+ const transformedSource = core.transformSourceSync(resolvers, config, source);
80
+ const engine = new core.Engine(config, core.Parser);
81
+ return engine.lint(transformedSource);
82
+ }
83
+ /**
84
+ * Parse and validate HTML from file.
85
+ *
86
+ * @public
87
+ * @param filename - Filename to read and parse.
88
+ * @returns Report output.
89
+ */
90
+ async validateFile(filename, fs) {
91
+ const config = await this.getConfigFor(filename);
92
+ const resolvers = this.configLoader.getResolvers();
93
+ const source = await core.transformFilename(resolvers, config, filename, fs);
94
+ const engine = new core.Engine(config, core.Parser);
95
+ return Promise.resolve(engine.lint(source));
96
+ }
97
+ /**
98
+ * Parse and validate HTML from file.
99
+ *
100
+ * @public
101
+ * @param filename - Filename to read and parse.
102
+ * @returns Report output.
103
+ */
104
+ validateFileSync(filename, fs) {
105
+ const config = this.getConfigForSync(filename);
106
+ const resolvers = this.configLoader.getResolvers();
107
+ const source = core.transformFilenameSync(resolvers, config, filename, fs);
108
+ const engine = new core.Engine(config, core.Parser);
109
+ return engine.lint(source);
110
+ }
111
+ /**
112
+ * Parse and validate HTML from multiple files. Result is merged together to a
113
+ * single report.
114
+ *
115
+ * @param filenames - Filenames to read and parse.
116
+ * @returns Report output.
117
+ */
118
+ async validateMultipleFiles(filenames, fs) {
119
+ return core.Reporter.merge(filenames.map((filename) => this.validateFile(filename, fs)));
120
+ }
121
+ /**
122
+ * Parse and validate HTML from multiple files. Result is merged together to a
123
+ * single report.
124
+ *
125
+ * @param filenames - Filenames to read and parse.
126
+ * @returns Report output.
127
+ */
128
+ validateMultipleFilesSync(filenames, fs) {
129
+ return core.Reporter.merge(filenames.map((filename) => this.validateFileSync(filename, fs)));
130
+ }
131
+ /**
132
+ * Returns true if the given filename can be validated.
133
+ *
134
+ * A file is considered to be validatable if the extension is `.html` or if a
135
+ * transformer matches the filename.
136
+ *
137
+ * This is mostly useful for tooling to determine whenever to validate the
138
+ * file or not. CLI tools will run on all the given files anyway.
139
+ */
140
+ async canValidate(filename) {
141
+ if (filename.toLowerCase().endsWith(".html")) {
142
+ return true;
143
+ }
144
+ const config = await this.getConfigFor(filename);
145
+ return config.canTransform(filename);
146
+ }
147
+ /**
148
+ * Returns true if the given filename can be validated.
149
+ *
150
+ * A file is considered to be validatable if the extension is `.html` or if a
151
+ * transformer matches the filename.
152
+ *
153
+ * This is mostly useful for tooling to determine whenever to validate the
154
+ * file or not. CLI tools will run on all the given files anyway.
155
+ */
156
+ canValidateSync(filename) {
157
+ if (filename.toLowerCase().endsWith(".html")) {
158
+ return true;
159
+ }
160
+ const config = this.getConfigForSync(filename);
161
+ return config.canTransform(filename);
162
+ }
163
+ /**
164
+ * Tokenize filename and output all tokens.
165
+ *
166
+ * Using CLI this is enabled with `--dump-tokens`. Mostly useful for
167
+ * debugging.
168
+ *
169
+ * @internal
170
+ * @param filename - Filename to tokenize.
171
+ */
172
+ async dumpTokens(filename, fs) {
173
+ const config = await this.getConfigFor(filename);
174
+ const resolvers = this.configLoader.getResolvers();
175
+ const source = await core.transformFilename(resolvers, config, filename, fs);
176
+ const engine = new core.Engine(config, core.Parser);
177
+ return engine.dumpTokens(source);
178
+ }
179
+ /**
180
+ * Parse filename and output all events.
181
+ *
182
+ * Using CLI this is enabled with `--dump-events`. Mostly useful for
183
+ * debugging.
184
+ *
185
+ * @internal
186
+ * @param filename - Filename to dump events from.
187
+ */
188
+ async dumpEvents(filename, fs) {
189
+ const config = await this.getConfigFor(filename);
190
+ const resolvers = this.configLoader.getResolvers();
191
+ const source = await core.transformFilename(resolvers, config, filename, fs);
192
+ const engine = new core.Engine(config, core.Parser);
193
+ return engine.dumpEvents(source);
194
+ }
195
+ /**
196
+ * Parse filename and output DOM tree.
197
+ *
198
+ * Using CLI this is enabled with `--dump-tree`. Mostly useful for
199
+ * debugging.
200
+ *
201
+ * @internal
202
+ * @param filename - Filename to dump DOM tree from.
203
+ */
204
+ async dumpTree(filename, fs) {
205
+ const config = await this.getConfigFor(filename);
206
+ const resolvers = this.configLoader.getResolvers();
207
+ const source = await core.transformFilename(resolvers, config, filename, fs);
208
+ const engine = new core.Engine(config, core.Parser);
209
+ return engine.dumpTree(source);
210
+ }
211
+ /**
212
+ * Transform filename and output source data.
213
+ *
214
+ * Using CLI this is enabled with `--dump-source`. Mostly useful for
215
+ * debugging.
216
+ *
217
+ * @internal
218
+ * @param filename - Filename to dump source from.
219
+ */
220
+ async dumpSource(filename, fs) {
221
+ const config = await this.getConfigFor(filename);
222
+ const resolvers = this.configLoader.getResolvers();
223
+ const sources = await core.transformFilename(resolvers, config, filename, fs);
224
+ return sources.reduce((result, source) => {
225
+ const line = String(source.line);
226
+ const column = String(source.column);
227
+ const offset = String(source.offset);
228
+ result.push(`Source ${source.filename}@${line}:${column} (offset: ${offset})`);
229
+ if (source.transformedBy) {
230
+ result.push("Transformed by:");
231
+ result = result.concat(source.transformedBy.reverse().map((name) => ` - ${name}`));
232
+ }
233
+ if (source.hooks && Object.keys(source.hooks).length > 0) {
234
+ result.push("Hooks");
235
+ for (const [key, present] of Object.entries(source.hooks)) {
236
+ if (present) {
237
+ result.push(` - ${key}`);
238
+ }
239
+ }
240
+ }
241
+ result.push("---");
242
+ result = result.concat(source.data.split("\n"));
243
+ result.push("---");
244
+ return result;
245
+ }, []);
246
+ }
247
+ /**
248
+ * Get effective configuration schema.
249
+ */
250
+ getConfigurationSchema() {
251
+ return Promise.resolve(core.configurationSchema);
252
+ }
253
+ /**
254
+ * Get effective metadata element schema.
255
+ *
256
+ * If a filename is given the configured plugins can extend the
257
+ * schema. Filename must not be an existing file or a filetype normally
258
+ * handled by html-validate but the path will be used when resolving
259
+ * configuration. As a rule-of-thumb, set it to the elements json file.
260
+ */
261
+ async getElementsSchema(filename) {
262
+ const config = await this.getConfigFor(filename ?? "inline");
263
+ const metaTable = config.getMetaTable();
264
+ return metaTable.getJSONSchema();
265
+ }
266
+ /**
267
+ * Get effective metadata element schema.
268
+ *
269
+ * If a filename is given the configured plugins can extend the
270
+ * schema. Filename must not be an existing file or a filetype normally
271
+ * handled by html-validate but the path will be used when resolving
272
+ * configuration. As a rule-of-thumb, set it to the elements json file.
273
+ */
274
+ getElementsSchemaSync(filename) {
275
+ const config = this.getConfigForSync(filename ?? "inline");
276
+ const metaTable = config.getMetaTable();
277
+ return metaTable.getJSONSchema();
278
+ }
279
+ async getContextualDocumentation(message, filenameOrConfig = "inline") {
280
+ const config = typeof filenameOrConfig === "string" ? await this.getConfigFor(filenameOrConfig) : await filenameOrConfig;
281
+ const engine = new core.Engine(config, core.Parser);
282
+ return engine.getRuleDocumentation(message);
283
+ }
284
+ getContextualDocumentationSync(message, filenameOrConfig = "inline") {
285
+ const config = typeof filenameOrConfig === "string" ? this.getConfigForSync(filenameOrConfig) : filenameOrConfig;
286
+ const engine = new core.Engine(config, core.Parser);
287
+ return engine.getRuleDocumentation(message);
288
+ }
289
+ /**
290
+ * Get contextual documentation for the given rule.
291
+ *
292
+ * Typical usage:
293
+ *
294
+ * ```js
295
+ * const report = await htmlvalidate.validateFile("my-file.html");
296
+ * for (const result of report.results){
297
+ * const config = await htmlvalidate.getConfigFor(result.filePath);
298
+ * for (const message of result.messages){
299
+ * const documentation = await htmlvalidate.getRuleDocumentation(message.ruleId, config, message.context);
300
+ * // do something with documentation
301
+ * }
302
+ * }
303
+ * ```
304
+ *
305
+ * @public
306
+ * @deprecated Deprecated since 8.0.0, use [[getContextualDocumentation]] instead.
307
+ * @param ruleId - Rule to get documentation for.
308
+ * @param config - If set it provides more accurate description by using the
309
+ * correct configuration for the file.
310
+ * @param context - If set to `Message.context` some rules can provide
311
+ * contextual details and suggestions.
312
+ */
313
+ async getRuleDocumentation(ruleId, config = null, context = null) {
314
+ const c = config ?? this.getConfigFor("inline");
315
+ const engine = new core.Engine(await c, core.Parser);
316
+ return engine.getRuleDocumentation({ ruleId, context });
317
+ }
318
+ /**
319
+ * Get contextual documentation for the given rule.
320
+ *
321
+ * Typical usage:
322
+ *
323
+ * ```js
324
+ * const report = htmlvalidate.validateFileSync("my-file.html");
325
+ * for (const result of report.results){
326
+ * const config = htmlvalidate.getConfigForSync(result.filePath);
327
+ * for (const message of result.messages){
328
+ * const documentation = htmlvalidate.getRuleDocumentationSync(message.ruleId, config, message.context);
329
+ * // do something with documentation
330
+ * }
331
+ * }
332
+ * ```
333
+ *
334
+ * @public
335
+ * @deprecated Deprecated since 8.0.0, use [[getContextualDocumentationSync]] instead.
336
+ * @param ruleId - Rule to get documentation for.
337
+ * @param config - If set it provides more accurate description by using the
338
+ * correct configuration for the file.
339
+ * @param context - If set to `Message.context` some rules can provide
340
+ * contextual details and suggestions.
341
+ */
342
+ getRuleDocumentationSync(ruleId, config = null, context = null) {
343
+ const c = config ?? this.getConfigForSync("inline");
344
+ const engine = new core.Engine(c, core.Parser);
345
+ return engine.getRuleDocumentation({ ruleId, context });
346
+ }
347
+ /**
348
+ * Create a parser configured for given filename.
349
+ *
350
+ * @internal
351
+ * @param source - Source to use.
352
+ */
353
+ async getParserFor(source) {
354
+ const config = await this.getConfigFor(source.filename);
355
+ return new core.Parser(config);
356
+ }
357
+ /**
358
+ * Get configuration for given filename.
359
+ *
360
+ * See [[FileSystemConfigLoader]] for details.
361
+ *
362
+ * @public
363
+ * @param filename - Filename to get configuration for.
364
+ * @param configOverride - Configuration to apply last.
365
+ */
366
+ getConfigFor(filename, configOverride) {
367
+ const config = this.configLoader.getConfigFor(filename, configOverride);
368
+ return Promise.resolve(config);
369
+ }
370
+ /**
371
+ * Get configuration for given filename.
372
+ *
373
+ * See [[FileSystemConfigLoader]] for details.
374
+ *
375
+ * @public
376
+ * @param filename - Filename to get configuration for.
377
+ * @param configOverride - Configuration to apply last.
378
+ */
379
+ getConfigForSync(filename, configOverride) {
380
+ const config = this.configLoader.getConfigFor(filename, configOverride);
381
+ if (core.isThenable(config)) {
382
+ throw new core.UserError("Cannot use asynchronous config loader with synchronous api");
383
+ }
384
+ return config;
385
+ }
386
+ /**
387
+ * Get current configuration loader.
388
+ *
389
+ * @public
390
+ * @since %version%
391
+ * @returns Current configuration loader.
392
+ */
393
+ /* istanbul ignore next -- not testing setters/getters */
394
+ getConfigLoader() {
395
+ return this.configLoader;
396
+ }
397
+ /**
398
+ * Set configuration loader.
399
+ *
400
+ * @public
401
+ * @since %version%
402
+ * @param loader - New configuration loader to use.
403
+ */
404
+ /* istanbul ignore next -- not testing setters/getters */
405
+ setConfigLoader(loader) {
406
+ this.configLoader = loader;
407
+ }
408
+ /**
409
+ * Flush configuration cache. Clears full cache unless a filename is given.
410
+ *
411
+ * See [[FileSystemConfigLoader]] for details.
412
+ *
413
+ * @public
414
+ * @param filename - If set, only flush cache for given filename.
415
+ */
416
+ flushConfigCache(filename) {
417
+ this.configLoader.flushCache(filename);
418
+ }
419
+ }
420
+
5
421
  function importFunction(id) {
6
422
  return import(id);
7
423
  }
@@ -45,6 +461,7 @@ function compatibilityCheck(name, declared, options) {
45
461
  });
46
462
  }
47
463
 
464
+ exports.HtmlValidate = HtmlValidate;
48
465
  exports.compatibilityCheck = compatibilityCheck;
49
466
  exports.esmResolver = esmResolver;
50
467
  //# sourceMappingURL=core-browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-browser.js","sources":["../../src/config/resolver/browser/import-function.ts","../../src/config/resolver/browser/esm-resolver.ts","../../src/utils/compatibility-check.browser.ts"],"sourcesContent":["/* istanbul ignore file: this file is only for easier mocking */\n\n/**\n * Wrapper around import() so we can mock it in unittests.\n *\n * @internal\n */\nexport function importFunction(id: string): unknown {\n\treturn import(id);\n}\n","import { UserError } from \"../../../error\";\nimport { type MetaDataTable } from \"../../../meta\";\nimport { type Plugin } from \"../../../plugin\";\nimport { type Transformer } from \"../../../transform\";\nimport { type ConfigData } from \"../../config-data\";\nimport { type Resolver } from \"../resolver\";\nimport { importFunction } from \"./import-function\";\n\nexport async function internalImport<T = unknown>(id: string): Promise<T | null> {\n\tconst { default: defaultImport } = (await importFunction(id)) as { default?: T };\n\tif (!defaultImport) {\n\t\tthrow new UserError(`\"${id}\" does not have a default export`);\n\t}\n\treturn defaultImport;\n}\n\n/**\n * ESM resolver.\n *\n * @public\n * @since 9.0.0\n */\nexport type ESMResolver = Required<Resolver>;\n\n/**\n * Create a new resolver for using `import(..)`.\n *\n * @public\n * @since 9.0.0\n */\nexport function esmResolver(): ESMResolver {\n\treturn {\n\t\tname: \"esm-resolver\",\n\n\t\tresolveElements(id: string): Promise<MetaDataTable | null> {\n\t\t\treturn internalImport(id);\n\t\t},\n\n\t\tresolveConfig(id: string): Promise<ConfigData | null> {\n\t\t\treturn internalImport(id);\n\t\t},\n\n\t\tresolvePlugin(id: string): Promise<Plugin | null> {\n\t\t\treturn internalImport<Plugin>(id);\n\t\t},\n\n\t\tasync resolveTransformer(id: string): Promise<Transformer | null> {\n\t\t\treturn internalImport(id);\n\t\t},\n\t};\n}\n","import { version } from \"../generated/package\";\nimport { type CompatibilityOptions, compatibilityCheckImpl } from \"./compatibility-check\";\n\nconst defaults: CompatibilityOptions = {\n\tsilent: false,\n\tversion,\n\tlogger(text: string): void {\n\t\t/* eslint-disable-next-line no-console -- expected to log */\n\t\tconsole.error(text);\n\t},\n};\n\n/**\n * Tests if plugin is compatible with html-validate library. Unless the `silent`\n * option is used a warning is displayed on the console.\n *\n * @public\n * @since v5.0.0\n * @param name - Name of plugin\n * @param declared - What library versions the plugin support (e.g. declared peerDependencies)\n * @returns - `true` if version is compatible\n */\nexport function compatibilityCheck(\n\tname: string,\n\tdeclared: string,\n\toptions?: Partial<CompatibilityOptions>,\n): boolean {\n\treturn compatibilityCheckImpl(name, declared, {\n\t\t...defaults,\n\t\t...options,\n\t});\n}\n"],"names":["UserError","version","compatibilityCheckImpl"],"mappings":";;;;AAOO,SAAS,eAAe,EAAqB,EAAA;AACnD,EAAA,OAAO,OAAO,EAAA,CAAA;AACf;;ACDA,eAAsB,eAA4B,EAA+B,EAAA;AAChF,EAAA,MAAM,EAAE,OAAS,EAAA,aAAA,EAAmB,GAAA,MAAM,eAAe,EAAE,CAAA;AAC3D,EAAA,IAAI,CAAC,aAAe,EAAA;AACnB,IAAA,MAAM,IAAIA,cAAA,CAAU,CAAI,CAAA,EAAA,EAAE,CAAkC,gCAAA,CAAA,CAAA;AAAA;AAE7D,EAAO,OAAA,aAAA;AACR;AAgBO,SAAS,WAA2B,GAAA;AAC1C,EAAO,OAAA;AAAA,IACN,IAAM,EAAA,cAAA;AAAA,IAEN,gBAAgB,EAA2C,EAAA;AAC1D,MAAA,OAAO,eAAe,EAAE,CAAA;AAAA,KACzB;AAAA,IAEA,cAAc,EAAwC,EAAA;AACrD,MAAA,OAAO,eAAe,EAAE,CAAA;AAAA,KACzB;AAAA,IAEA,cAAc,EAAoC,EAAA;AACjD,MAAA,OAAO,eAAuB,EAAE,CAAA;AAAA,KACjC;AAAA,IAEA,MAAM,mBAAmB,EAAyC,EAAA;AACjE,MAAA,OAAO,eAAe,EAAE,CAAA;AAAA;AACzB,GACD;AACD;;AC/CA,MAAM,QAAiC,GAAA;AAAA,EACtC,MAAQ,EAAA,KAAA;AAAA,WACRC,YAAA;AAAA,EACA,OAAO,IAAoB,EAAA;AAE1B,IAAA,OAAA,CAAQ,MAAM,IAAI,CAAA;AAAA;AAEpB,CAAA;AAYgB,SAAA,kBAAA,CACf,IACA,EAAA,QAAA,EACA,OACU,EAAA;AACV,EAAO,OAAAC,2BAAA,CAAuB,MAAM,QAAU,EAAA;AAAA,IAC7C,GAAG,QAAA;AAAA,IACH,GAAG;AAAA,GACH,CAAA;AACF;;;;;"}
1
+ {"version":3,"file":"core-browser.js","sources":["../../src/htmlvalidate.browser.ts","../../src/config/resolver/browser/import-function.ts","../../src/config/resolver/browser/esm-resolver.ts","../../src/utils/compatibility-check.browser.ts"],"sourcesContent":["import { type SchemaObject } from \"ajv\";\nimport { type ConfigData, type ResolvedConfig, ConfigLoader } from \"./config\";\nimport { normalizeSource, type Source } from \"./context\";\nimport { type SourceHooks } from \"./context/source\";\nimport { type EventDump, type TokenDump, Engine } from \"./engine\";\nimport { type Message } from \"./message\";\nimport { Parser } from \"./parser\";\nimport { type Report, Reporter } from \"./reporter\";\nimport { type RuleDocumentation } from \"./rule\";\nimport configurationSchema from \"./schema/config.json\";\nimport { StaticConfigLoader } from \"./config/loaders/static\";\nimport { isThenable } from \"./utils\";\nimport { UserError } from \"./error\";\nimport {\n\ttype TransformFS,\n\ttransformFilename,\n\ttransformFilenameSync,\n\ttransformSource,\n\ttransformSourceSync,\n} from \"./transform\";\n\nfunction isSourceHooks(value: any): value is SourceHooks {\n\tif (!value || typeof value === \"string\") {\n\t\treturn false;\n\t}\n\treturn Boolean(value.processAttribute || value.processElement);\n}\n\nfunction isConfigData(value: any): value is ConfigData {\n\tif (!value || typeof value === \"string\") {\n\t\treturn false;\n\t}\n\treturn !(value.processAttribute || value.processElement);\n}\n\n/**\n * Primary API for using HTML-validate.\n *\n * Provides high-level abstractions for common operations.\n *\n * @public\n */\nexport class HtmlValidate {\n\tprotected configLoader: ConfigLoader;\n\n\t/**\n\t * Create a new validator.\n\t *\n\t * @public\n\t * @param configLoader - Use a custom configuration loader.\n\t * @param config - If set it provides the global default configuration. By\n\t * default `Config.defaultConfig()` is used.\n\t */\n\tpublic constructor(config?: ConfigData);\n\tpublic constructor(configLoader: ConfigLoader);\n\tpublic constructor(arg?: ConfigLoader | ConfigData) {\n\t\tconst [loader, config] = arg instanceof ConfigLoader ? [arg, undefined] : [undefined, arg];\n\t\tthis.configLoader = loader ?? new StaticConfigLoader(config);\n\t}\n\n\t/**\n\t * Parse and validate HTML from string.\n\t *\n\t * @public\n\t * @param str - Text to parse.\n\t * @param filename - If set configuration is loaded for given filename.\n\t * @param hooks - Optional hooks (see [[Source]]) for definition.\n\t * @returns Report output.\n\t */\n\t/* eslint-disable @typescript-eslint/unified-signatures -- for easier readability */\n\tpublic validateString(str: string): Promise<Report>;\n\tpublic validateString(str: string, filename: string): Promise<Report>;\n\tpublic validateString(str: string, hooks: SourceHooks): Promise<Report>;\n\tpublic validateString(str: string, options: ConfigData): Promise<Report>;\n\tpublic validateString(str: string, filename: string, hooks: SourceHooks): Promise<Report>;\n\tpublic validateString(str: string, filename: string, options: ConfigData): Promise<Report>;\n\tpublic validateString(\n\t\tstr: string,\n\t\tfilename: string,\n\t\toptions: ConfigData,\n\t\thooks: SourceHooks,\n\t): Promise<Report>;\n\t/* eslint-enable @typescript-eslint/unified-signatures */\n\tpublic validateString(\n\t\tstr: string,\n\t\targ1?: string | SourceHooks | ConfigData,\n\t\targ2?: SourceHooks | ConfigData,\n\t\targ3?: SourceHooks,\n\t): Promise<Report> {\n\t\tconst filename = typeof arg1 === \"string\" ? arg1 : \"inline\";\n\t\tconst options = isConfigData(arg1) ? arg1 : isConfigData(arg2) ? arg2 : undefined;\n\t\tconst hooks = isSourceHooks(arg1) ? arg1 : isSourceHooks(arg2) ? arg2 : arg3;\n\t\tconst source = {\n\t\t\tdata: str,\n\t\t\tfilename,\n\t\t\tline: 1,\n\t\t\tcolumn: 1,\n\t\t\toffset: 0,\n\t\t\thooks,\n\t\t};\n\t\treturn this.validateSource(source, options);\n\t}\n\n\t/**\n\t * Parse and validate HTML from string.\n\t *\n\t * @public\n\t * @param str - Text to parse.\n\t * @param filename - If set configuration is loaded for given filename.\n\t * @param hooks - Optional hooks (see [[Source]]) for definition.\n\t * @returns Report output.\n\t */\n\t/* eslint-disable @typescript-eslint/unified-signatures -- for easier readability */\n\tpublic validateStringSync(str: string): Report;\n\tpublic validateStringSync(str: string, filename: string): Report;\n\tpublic validateStringSync(str: string, hooks: SourceHooks): Report;\n\tpublic validateStringSync(str: string, options: ConfigData): Report;\n\tpublic validateStringSync(str: string, filename: string, hooks: SourceHooks): Report;\n\tpublic validateStringSync(str: string, filename: string, options: ConfigData): Report;\n\tpublic validateStringSync(\n\t\tstr: string,\n\t\tfilename: string,\n\t\toptions: ConfigData,\n\t\thooks: SourceHooks,\n\t): Report;\n\t/* eslint-enable @typescript-eslint/unified-signatures */\n\tpublic validateStringSync(\n\t\tstr: string,\n\t\targ1?: string | SourceHooks | ConfigData,\n\t\targ2?: SourceHooks | ConfigData,\n\t\targ3?: SourceHooks,\n\t): Report {\n\t\tconst filename = typeof arg1 === \"string\" ? arg1 : \"inline\";\n\t\tconst options = isConfigData(arg1) ? arg1 : isConfigData(arg2) ? arg2 : undefined;\n\t\tconst hooks = isSourceHooks(arg1) ? arg1 : isSourceHooks(arg2) ? arg2 : arg3;\n\t\tconst source = {\n\t\t\tdata: str,\n\t\t\tfilename,\n\t\t\tline: 1,\n\t\t\tcolumn: 1,\n\t\t\toffset: 0,\n\t\t\thooks,\n\t\t};\n\t\treturn this.validateSourceSync(source, options);\n\t}\n\n\t/**\n\t * Parse and validate HTML from [[Source]].\n\t *\n\t * @public\n\t * @param input - Source to parse.\n\t * @returns Report output.\n\t */\n\tpublic async validateSource(input: Source, configOverride?: ConfigData): Promise<Report> {\n\t\tconst source = normalizeSource(input);\n\t\tconst config = await this.getConfigFor(source.filename, configOverride);\n\t\tconst resolvers = this.configLoader.getResolvers();\n\t\tconst transformedSource = await transformSource(resolvers, config, source);\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn engine.lint(transformedSource);\n\t}\n\n\t/**\n\t * Parse and validate HTML from [[Source]].\n\t *\n\t * @public\n\t * @param input - Source to parse.\n\t * @returns Report output.\n\t */\n\tpublic validateSourceSync(input: Source, configOverride?: ConfigData): Report {\n\t\tconst source = normalizeSource(input);\n\t\tconst config = this.getConfigForSync(source.filename, configOverride);\n\t\tconst resolvers = this.configLoader.getResolvers();\n\t\tconst transformedSource = transformSourceSync(resolvers, config, source);\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn engine.lint(transformedSource);\n\t}\n\n\t/**\n\t * Parse and validate HTML from file.\n\t *\n\t * @public\n\t * @param filename - Filename to read and parse.\n\t * @returns Report output.\n\t */\n\tpublic async validateFile(filename: string, fs: TransformFS): Promise<Report> {\n\t\tconst config = await this.getConfigFor(filename);\n\t\tconst resolvers = this.configLoader.getResolvers();\n\t\tconst source = await transformFilename(resolvers, config, filename, fs);\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn Promise.resolve(engine.lint(source));\n\t}\n\n\t/**\n\t * Parse and validate HTML from file.\n\t *\n\t * @public\n\t * @param filename - Filename to read and parse.\n\t * @returns Report output.\n\t */\n\tpublic validateFileSync(filename: string, fs: TransformFS): Report {\n\t\tconst config = this.getConfigForSync(filename);\n\t\tconst resolvers = this.configLoader.getResolvers();\n\t\tconst source = transformFilenameSync(resolvers, config, filename, fs);\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn engine.lint(source);\n\t}\n\n\t/**\n\t * Parse and validate HTML from multiple files. Result is merged together to a\n\t * single report.\n\t *\n\t * @param filenames - Filenames to read and parse.\n\t * @returns Report output.\n\t */\n\tpublic async validateMultipleFiles(filenames: string[], fs: TransformFS): Promise<Report> {\n\t\treturn Reporter.merge(filenames.map((filename) => this.validateFile(filename, fs)));\n\t}\n\n\t/**\n\t * Parse and validate HTML from multiple files. Result is merged together to a\n\t * single report.\n\t *\n\t * @param filenames - Filenames to read and parse.\n\t * @returns Report output.\n\t */\n\tpublic validateMultipleFilesSync(filenames: string[], fs: TransformFS): Report {\n\t\treturn Reporter.merge(filenames.map((filename) => this.validateFileSync(filename, fs)));\n\t}\n\n\t/**\n\t * Returns true if the given filename can be validated.\n\t *\n\t * A file is considered to be validatable if the extension is `.html` or if a\n\t * transformer matches the filename.\n\t *\n\t * This is mostly useful for tooling to determine whenever to validate the\n\t * file or not. CLI tools will run on all the given files anyway.\n\t */\n\tpublic async canValidate(filename: string): Promise<boolean> {\n\t\t/* .html is always supported */\n\t\tif (filename.toLowerCase().endsWith(\".html\")) {\n\t\t\treturn true;\n\t\t}\n\n\t\t/* test if there is a matching transformer */\n\t\tconst config = await this.getConfigFor(filename);\n\t\treturn config.canTransform(filename);\n\t}\n\n\t/**\n\t * Returns true if the given filename can be validated.\n\t *\n\t * A file is considered to be validatable if the extension is `.html` or if a\n\t * transformer matches the filename.\n\t *\n\t * This is mostly useful for tooling to determine whenever to validate the\n\t * file or not. CLI tools will run on all the given files anyway.\n\t */\n\tpublic canValidateSync(filename: string): boolean {\n\t\t/* .html is always supported */\n\t\tif (filename.toLowerCase().endsWith(\".html\")) {\n\t\t\treturn true;\n\t\t}\n\n\t\t/* test if there is a matching transformer */\n\t\tconst config = this.getConfigForSync(filename);\n\t\treturn config.canTransform(filename);\n\t}\n\n\t/**\n\t * Tokenize filename and output all tokens.\n\t *\n\t * Using CLI this is enabled with `--dump-tokens`. Mostly useful for\n\t * debugging.\n\t *\n\t * @internal\n\t * @param filename - Filename to tokenize.\n\t */\n\tpublic async dumpTokens(filename: string, fs: TransformFS): Promise<TokenDump[]> {\n\t\tconst config = await this.getConfigFor(filename);\n\t\tconst resolvers = this.configLoader.getResolvers();\n\t\tconst source = await transformFilename(resolvers, config, filename, fs);\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn engine.dumpTokens(source);\n\t}\n\n\t/**\n\t * Parse filename and output all events.\n\t *\n\t * Using CLI this is enabled with `--dump-events`. Mostly useful for\n\t * debugging.\n\t *\n\t * @internal\n\t * @param filename - Filename to dump events from.\n\t */\n\tpublic async dumpEvents(filename: string, fs: TransformFS): Promise<EventDump[]> {\n\t\tconst config = await this.getConfigFor(filename);\n\t\tconst resolvers = this.configLoader.getResolvers();\n\t\tconst source = await transformFilename(resolvers, config, filename, fs);\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn engine.dumpEvents(source);\n\t}\n\n\t/**\n\t * Parse filename and output DOM tree.\n\t *\n\t * Using CLI this is enabled with `--dump-tree`. Mostly useful for\n\t * debugging.\n\t *\n\t * @internal\n\t * @param filename - Filename to dump DOM tree from.\n\t */\n\tpublic async dumpTree(filename: string, fs: TransformFS): Promise<string[]> {\n\t\tconst config = await this.getConfigFor(filename);\n\t\tconst resolvers = this.configLoader.getResolvers();\n\t\tconst source = await transformFilename(resolvers, config, filename, fs);\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn engine.dumpTree(source);\n\t}\n\n\t/**\n\t * Transform filename and output source data.\n\t *\n\t * Using CLI this is enabled with `--dump-source`. Mostly useful for\n\t * debugging.\n\t *\n\t * @internal\n\t * @param filename - Filename to dump source from.\n\t */\n\tpublic async dumpSource(filename: string, fs: TransformFS): Promise<string[]> {\n\t\tconst config = await this.getConfigFor(filename);\n\t\tconst resolvers = this.configLoader.getResolvers();\n\t\tconst sources = await transformFilename(resolvers, config, filename, fs);\n\t\treturn sources.reduce<string[]>((result: string[], source: Source) => {\n\t\t\tconst line = String(source.line);\n\t\t\tconst column = String(source.column);\n\t\t\tconst offset = String(source.offset);\n\t\t\tresult.push(`Source ${source.filename}@${line}:${column} (offset: ${offset})`);\n\t\t\tif (source.transformedBy) {\n\t\t\t\tresult.push(\"Transformed by:\");\n\t\t\t\tresult = result.concat(source.transformedBy.reverse().map((name) => ` - ${name}`));\n\t\t\t}\n\t\t\tif (source.hooks && Object.keys(source.hooks).length > 0) {\n\t\t\t\tresult.push(\"Hooks\");\n\t\t\t\tfor (const [key, present] of Object.entries(source.hooks)) {\n\t\t\t\t\tif (present) {\n\t\t\t\t\t\tresult.push(` - ${key}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.push(\"---\");\n\t\t\tresult = result.concat(source.data.split(\"\\n\"));\n\t\t\tresult.push(\"---\");\n\t\t\treturn result;\n\t\t}, []);\n\t}\n\n\t/**\n\t * Get effective configuration schema.\n\t */\n\tpublic getConfigurationSchema(): Promise<SchemaObject> {\n\t\treturn Promise.resolve(configurationSchema);\n\t}\n\n\t/**\n\t * Get effective metadata element schema.\n\t *\n\t * If a filename is given the configured plugins can extend the\n\t * schema. Filename must not be an existing file or a filetype normally\n\t * handled by html-validate but the path will be used when resolving\n\t * configuration. As a rule-of-thumb, set it to the elements json file.\n\t */\n\tpublic async getElementsSchema(filename?: string): Promise<SchemaObject> {\n\t\tconst config = await this.getConfigFor(filename ?? \"inline\");\n\t\tconst metaTable = config.getMetaTable();\n\t\treturn metaTable.getJSONSchema();\n\t}\n\n\t/**\n\t * Get effective metadata element schema.\n\t *\n\t * If a filename is given the configured plugins can extend the\n\t * schema. Filename must not be an existing file or a filetype normally\n\t * handled by html-validate but the path will be used when resolving\n\t * configuration. As a rule-of-thumb, set it to the elements json file.\n\t */\n\tpublic getElementsSchemaSync(filename?: string): SchemaObject {\n\t\tconst config = this.getConfigForSync(filename ?? \"inline\");\n\t\tconst metaTable = config.getMetaTable();\n\t\treturn metaTable.getJSONSchema();\n\t}\n\n\t/**\n\t * Get contextual documentation for the given rule. Configuration will be\n\t * resolved for given filename.\n\t *\n\t * @example\n\t *\n\t * ```js\n\t * const report = await htmlvalidate.validateFile(\"my-file.html\");\n\t * for (const result of report.results){\n\t * for (const message of result.messages){\n\t * const documentation = await htmlvalidate.getContextualDocumentation(message, result.filePath);\n\t * // do something with documentation\n\t * }\n\t * }\n\t * ```\n\t *\n\t * @public\n\t * @since 8.0.0\n\t * @param message - Message reported during validation\n\t * @param filename - Filename used to resolve configuration.\n\t * @returns Contextual documentation or `null` if the rule does not exist.\n\t */\n\tpublic getContextualDocumentation(\n\t\tmessage: Pick<Message, \"ruleId\" | \"context\">,\n\t\tfilename?: string,\n\t): Promise<RuleDocumentation | null>;\n\n\t/**\n\t * Get contextual documentation for the given rule using provided\n\t * configuration.\n\t *\n\t * @example\n\t *\n\t * ```js\n\t * const report = await htmlvalidate.validateFile(\"my-file.html\");\n\t * for (const result of report.results){\n\t * for (const message of result.messages){\n\t * const documentation = await htmlvalidate.getRuleDocumentation(message, result.filePath);\n\t * // do something with documentation\n\t * }\n\t * }\n\t * ```\n\t *\n\t * @public\n\t * @since 8.0.0\n\t * @param message - Message reported during validation\n\t * @param config - Configuration to use.\n\t * @returns Contextual documentation or `null` if the rule does not exist.\n\t */\n\tpublic getContextualDocumentation(\n\t\tmessage: Pick<Message, \"ruleId\" | \"context\">,\n\t\tconfig: ResolvedConfig | Promise<ResolvedConfig>,\n\t): Promise<RuleDocumentation | null>;\n\n\tpublic async getContextualDocumentation(\n\t\tmessage: Pick<Message, \"ruleId\" | \"context\">,\n\t\tfilenameOrConfig: ResolvedConfig | Promise<ResolvedConfig> | string = \"inline\",\n\t): Promise<RuleDocumentation | null> {\n\t\tconst config =\n\t\t\ttypeof filenameOrConfig === \"string\"\n\t\t\t\t? await this.getConfigFor(filenameOrConfig)\n\t\t\t\t: await filenameOrConfig;\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn engine.getRuleDocumentation(message);\n\t}\n\n\t/**\n\t * Get contextual documentation for the given rule. Configuration will be\n\t * resolved for given filename.\n\t *\n\t * @example\n\t *\n\t * ```js\n\t * const report = htmlvalidate.validateFileSync(\"my-file.html\");\n\t * for (const result of report.results){\n\t * for (const message of result.messages){\n\t * const documentation = htmlvalidate.getRuleDocumentationSync(message, result.filePath);\n\t * // do something with documentation\n\t * }\n\t * }\n\t * ```\n\t *\n\t * @public\n\t * @since 8.0.0\n\t * @param message - Message reported during validation\n\t * @param filename - Filename used to resolve configuration.\n\t * @returns Contextual documentation or `null` if the rule does not exist.\n\t */\n\tpublic getContextualDocumentationSync(\n\t\tmessage: Pick<Message, \"ruleId\" | \"context\">,\n\t\tfilename?: string,\n\t): RuleDocumentation | null;\n\n\t/**\n\t * Get contextual documentation for the given rule using provided\n\t * configuration.\n\t *\n\t * @example\n\t *\n\t * ```js\n\t * const report = htmlvalidate.validateFileSync(\"my-file.html\");\n\t * for (const result of report.results){\n\t * for (const message of result.messages){\n\t * const documentation = htmlvalidate.getRuleDocumentationSync(message, result.filePath);\n\t * // do something with documentation\n\t * }\n\t * }\n\t * ```\n\t *\n\t * @public\n\t * @since 8.0.0\n\t * @param message - Message reported during validation\n\t * @param config - Configuration to use.\n\t * @returns Contextual documentation or `null` if the rule does not exist.\n\t */\n\tpublic getContextualDocumentationSync(\n\t\tmessage: Pick<Message, \"ruleId\" | \"context\">,\n\t\tconfig: ResolvedConfig,\n\t): RuleDocumentation | null;\n\n\tpublic getContextualDocumentationSync(\n\t\tmessage: Pick<Message, \"ruleId\" | \"context\">,\n\t\tfilenameOrConfig: ResolvedConfig | string = \"inline\",\n\t): RuleDocumentation | null {\n\t\tconst config =\n\t\t\ttypeof filenameOrConfig === \"string\"\n\t\t\t\t? this.getConfigForSync(filenameOrConfig)\n\t\t\t\t: filenameOrConfig;\n\t\tconst engine = new Engine(config, Parser);\n\t\treturn engine.getRuleDocumentation(message);\n\t}\n\n\t/**\n\t * Get contextual documentation for the given rule.\n\t *\n\t * Typical usage:\n\t *\n\t * ```js\n\t * const report = await htmlvalidate.validateFile(\"my-file.html\");\n\t * for (const result of report.results){\n\t * const config = await htmlvalidate.getConfigFor(result.filePath);\n\t * for (const message of result.messages){\n\t * const documentation = await htmlvalidate.getRuleDocumentation(message.ruleId, config, message.context);\n\t * // do something with documentation\n\t * }\n\t * }\n\t * ```\n\t *\n\t * @public\n\t * @deprecated Deprecated since 8.0.0, use [[getContextualDocumentation]] instead.\n\t * @param ruleId - Rule to get documentation for.\n\t * @param config - If set it provides more accurate description by using the\n\t * correct configuration for the file.\n\t * @param context - If set to `Message.context` some rules can provide\n\t * contextual details and suggestions.\n\t */\n\tpublic async getRuleDocumentation(\n\t\truleId: string,\n\t\tconfig: ResolvedConfig | Promise<ResolvedConfig> | null = null,\n\t\tcontext: unknown | null = null,\n\t): Promise<RuleDocumentation | null> {\n\t\tconst c = config ?? this.getConfigFor(\"inline\");\n\t\tconst engine = new Engine(await c, Parser);\n\t\treturn engine.getRuleDocumentation({ ruleId, context });\n\t}\n\n\t/**\n\t * Get contextual documentation for the given rule.\n\t *\n\t * Typical usage:\n\t *\n\t * ```js\n\t * const report = htmlvalidate.validateFileSync(\"my-file.html\");\n\t * for (const result of report.results){\n\t * const config = htmlvalidate.getConfigForSync(result.filePath);\n\t * for (const message of result.messages){\n\t * const documentation = htmlvalidate.getRuleDocumentationSync(message.ruleId, config, message.context);\n\t * // do something with documentation\n\t * }\n\t * }\n\t * ```\n\t *\n\t * @public\n\t * @deprecated Deprecated since 8.0.0, use [[getContextualDocumentationSync]] instead.\n\t * @param ruleId - Rule to get documentation for.\n\t * @param config - If set it provides more accurate description by using the\n\t * correct configuration for the file.\n\t * @param context - If set to `Message.context` some rules can provide\n\t * contextual details and suggestions.\n\t */\n\tpublic getRuleDocumentationSync(\n\t\truleId: string,\n\t\tconfig: ResolvedConfig | null = null,\n\t\tcontext: unknown | null = null,\n\t): RuleDocumentation | null {\n\t\tconst c = config ?? this.getConfigForSync(\"inline\");\n\t\tconst engine = new Engine(c, Parser);\n\t\treturn engine.getRuleDocumentation({ ruleId, context });\n\t}\n\n\t/**\n\t * Create a parser configured for given filename.\n\t *\n\t * @internal\n\t * @param source - Source to use.\n\t */\n\tpublic async getParserFor(source: Source): Promise<Parser> {\n\t\tconst config = await this.getConfigFor(source.filename);\n\t\treturn new Parser(config);\n\t}\n\n\t/**\n\t * Get configuration for given filename.\n\t *\n\t * See [[FileSystemConfigLoader]] for details.\n\t *\n\t * @public\n\t * @param filename - Filename to get configuration for.\n\t * @param configOverride - Configuration to apply last.\n\t */\n\tpublic getConfigFor(filename: string, configOverride?: ConfigData): Promise<ResolvedConfig> {\n\t\tconst config = this.configLoader.getConfigFor(filename, configOverride);\n\t\treturn Promise.resolve(config);\n\t}\n\n\t/**\n\t * Get configuration for given filename.\n\t *\n\t * See [[FileSystemConfigLoader]] for details.\n\t *\n\t * @public\n\t * @param filename - Filename to get configuration for.\n\t * @param configOverride - Configuration to apply last.\n\t */\n\tpublic getConfigForSync(filename: string, configOverride?: ConfigData): ResolvedConfig {\n\t\tconst config = this.configLoader.getConfigFor(filename, configOverride);\n\t\tif (isThenable(config)) {\n\t\t\tthrow new UserError(\"Cannot use asynchronous config loader with synchronous api\");\n\t\t}\n\t\treturn config;\n\t}\n\n\t/**\n\t * Get current configuration loader.\n\t *\n\t * @public\n\t * @since %version%\n\t * @returns Current configuration loader.\n\t */\n\t/* istanbul ignore next -- not testing setters/getters */\n\tpublic getConfigLoader(): ConfigLoader {\n\t\treturn this.configLoader;\n\t}\n\n\t/**\n\t * Set configuration loader.\n\t *\n\t * @public\n\t * @since %version%\n\t * @param loader - New configuration loader to use.\n\t */\n\t/* istanbul ignore next -- not testing setters/getters */\n\tpublic setConfigLoader(loader: ConfigLoader): void {\n\t\tthis.configLoader = loader;\n\t}\n\n\t/**\n\t * Flush configuration cache. Clears full cache unless a filename is given.\n\t *\n\t * See [[FileSystemConfigLoader]] for details.\n\t *\n\t * @public\n\t * @param filename - If set, only flush cache for given filename.\n\t */\n\tpublic flushConfigCache(filename?: string): void {\n\t\tthis.configLoader.flushCache(filename);\n\t}\n}\n","/* istanbul ignore file: this file is only for easier mocking */\n\n/**\n * Wrapper around import() so we can mock it in unittests.\n *\n * @internal\n */\nexport function importFunction(id: string): unknown {\n\treturn import(id);\n}\n","import { UserError } from \"../../../error\";\nimport { type MetaDataTable } from \"../../../meta\";\nimport { type Plugin } from \"../../../plugin\";\nimport { type Transformer } from \"../../../transform\";\nimport { type ConfigData } from \"../../config-data\";\nimport { type Resolver } from \"../resolver\";\nimport { importFunction } from \"./import-function\";\n\nexport async function internalImport<T = unknown>(id: string): Promise<T | null> {\n\tconst { default: defaultImport } = (await importFunction(id)) as { default?: T };\n\tif (!defaultImport) {\n\t\tthrow new UserError(`\"${id}\" does not have a default export`);\n\t}\n\treturn defaultImport;\n}\n\n/**\n * ESM resolver.\n *\n * @public\n * @since 9.0.0\n */\nexport type ESMResolver = Required<Resolver>;\n\n/**\n * Create a new resolver for using `import(..)`.\n *\n * @public\n * @since 9.0.0\n */\nexport function esmResolver(): ESMResolver {\n\treturn {\n\t\tname: \"esm-resolver\",\n\n\t\tresolveElements(id: string): Promise<MetaDataTable | null> {\n\t\t\treturn internalImport(id);\n\t\t},\n\n\t\tresolveConfig(id: string): Promise<ConfigData | null> {\n\t\t\treturn internalImport(id);\n\t\t},\n\n\t\tresolvePlugin(id: string): Promise<Plugin | null> {\n\t\t\treturn internalImport<Plugin>(id);\n\t\t},\n\n\t\tasync resolveTransformer(id: string): Promise<Transformer | null> {\n\t\t\treturn internalImport(id);\n\t\t},\n\t};\n}\n","import { version } from \"../generated/package\";\nimport { type CompatibilityOptions, compatibilityCheckImpl } from \"./compatibility-check\";\n\nconst defaults: CompatibilityOptions = {\n\tsilent: false,\n\tversion,\n\tlogger(text: string): void {\n\t\t/* eslint-disable-next-line no-console -- expected to log */\n\t\tconsole.error(text);\n\t},\n};\n\n/**\n * Tests if plugin is compatible with html-validate library. Unless the `silent`\n * option is used a warning is displayed on the console.\n *\n * @public\n * @since v5.0.0\n * @param name - Name of plugin\n * @param declared - What library versions the plugin support (e.g. declared peerDependencies)\n * @returns - `true` if version is compatible\n */\nexport function compatibilityCheck(\n\tname: string,\n\tdeclared: string,\n\toptions?: Partial<CompatibilityOptions>,\n): boolean {\n\treturn compatibilityCheckImpl(name, declared, {\n\t\t...defaults,\n\t\t...options,\n\t});\n}\n"],"names":["ConfigLoader","StaticConfigLoader","normalizeSource","transformSource","Engine","Parser","transformSourceSync","transformFilename","transformFilenameSync","Reporter","configurationSchema","isThenable","UserError","version","compatibilityCheckImpl"],"mappings":";;;;AAqBA,SAAS,cAAc,KAAkC,EAAA;AACxD,EAAA,IAAI,CAAC,KAAA,IAAS,OAAO,KAAA,KAAU,QAAU,EAAA;AACxC,IAAO,OAAA,KAAA;AAAA;AAER,EAAA,OAAO,OAAQ,CAAA,KAAA,C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