doc-freshness-checker 2.2.2 → 3.0.1

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.
@@ -1,44 +0,0 @@
1
- /**
2
- * Plugin interface for extending doc-freshness functionality.
3
- *
4
- * @deprecated `Plugin` is not consumed by `run()`. Supported extension points are
5
- * `DocFreshnessConfig.customExtractors` and `DocFreshnessConfig.customValidators`.
6
- * Planned for removal in v3.0.0.
7
- */
8
- export class Plugin {
9
- name;
10
- constructor(name) {
11
- this.name = name;
12
- }
13
- /**
14
- * Called when the plugin is registered
15
- */
16
- async initialize(_config) { }
17
- /**
18
- * Return custom extractors
19
- */
20
- getExtractors() {
21
- return [];
22
- }
23
- /**
24
- * Return custom validators
25
- */
26
- getValidators() {
27
- return {};
28
- }
29
- /**
30
- * Return custom reporters
31
- */
32
- getReporters() {
33
- return {};
34
- }
35
- /**
36
- * Called before validation starts
37
- */
38
- async beforeValidation(_documents) { }
39
- /**
40
- * Called after validation completes
41
- */
42
- async afterValidation(_results) { }
43
- }
44
- //# sourceMappingURL=plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/plugins/plugin.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,OAAO,MAAM;IACjB,IAAI,CAAS;IAEb,YAAY,IAAY;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,OAA2B,IAAkB,CAAC;IAE/D;;OAEG;IACH,aAAa;QACX,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;OAEG;IACH,aAAa;QACX,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,gBAAgB,CAAC,UAAsB,IAAkB,CAAC;IAEhE;;OAEG;IACH,KAAK,CAAC,eAAe,CAAC,QAA2B,IAAkB,CAAC;CACrE"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,23 +0,0 @@
1
- import { Plugin } from './plugin.js';
2
- describe('Plugin', () => {
3
- it('has a name', () => {
4
- const plugin = new Plugin('test-plugin');
5
- expect(plugin.name).toBe('test-plugin');
6
- });
7
- it('returns empty arrays/objects from default methods', () => {
8
- const plugin = new Plugin('test');
9
- expect(plugin.getExtractors()).toEqual([]);
10
- expect(plugin.getValidators()).toEqual({});
11
- expect(plugin.getReporters()).toEqual({});
12
- });
13
- it('lifecycle hooks resolve without error', async () => {
14
- const plugin = new Plugin('test');
15
- await expect(plugin.initialize({})).resolves.not.toThrow();
16
- await expect(plugin.beforeValidation([])).resolves.not.toThrow();
17
- await expect(plugin.afterValidation({
18
- documents: [],
19
- summary: { total: 0, valid: 0, errors: 0, warnings: 0, skipped: 0 },
20
- })).resolves.not.toThrow();
21
- });
22
- });
23
- //# sourceMappingURL=plugin.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.test.js","sourceRoot":"","sources":["../../src/plugins/plugin.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;QACpB,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC;QACzC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3C,MAAM,CAAC,MAAM,CAAC,aAAa,EAA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