@cldmv/fix-headers 1.3.12 → 2.1.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.
Files changed (65) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +354 -25
  3. package/bin/fix-headers.mjs +64 -0
  4. package/dist/index.cjs +28 -0
  5. package/dist/index.mjs +15 -0
  6. package/package.json +39 -19
  7. package/types/src/cli.d.mts +20 -2
  8. package/types/src/config/load.d.mts +36 -0
  9. package/types/src/constants.d.mts +15 -23
  10. package/types/src/core/file-discovery.d.mts +17 -5
  11. package/types/src/core/fix-headers.d.mts +61 -4
  12. package/types/src/core/ignore-rules.d.mts +38 -0
  13. package/types/src/detect/project.d.mts +64 -15
  14. package/types/src/detectors/css.d.mts +0 -8
  15. package/types/src/detectors/go.d.mts +0 -8
  16. package/types/src/detectors/html.d.mts +0 -8
  17. package/types/src/detectors/index.d.mts +31 -8
  18. package/types/src/detectors/json.d.mts +0 -8
  19. package/types/src/detectors/node.d.mts +0 -8
  20. package/types/src/detectors/php.d.mts +0 -8
  21. package/types/src/detectors/python.d.mts +0 -8
  22. package/types/src/detectors/rust.d.mts +0 -8
  23. package/types/src/detectors/yaml.d.mts +0 -8
  24. package/types/src/drivers/go.d.mts +2 -0
  25. package/types/src/drivers/index.d.mts +154 -0
  26. package/types/src/drivers/node.d.mts +2 -0
  27. package/types/src/drivers/php.d.mts +2 -0
  28. package/types/src/drivers/python.d.mts +2 -0
  29. package/types/src/drivers/rust.d.mts +2 -0
  30. package/types/src/drivers/shared.d.mts +78 -0
  31. package/types/src/header/dates.d.mts +108 -0
  32. package/types/src/header/fields.d.mts +48 -0
  33. package/types/src/header/parser.d.mts +6 -2
  34. package/types/src/header/syntax.d.mts +8 -3
  35. package/types/src/header/template.d.mts +7 -4
  36. package/types/src/utils/diff.d.mts +53 -0
  37. package/types/src/utils/fs.d.mts +10 -3
  38. package/types/src/utils/git.d.mts +27 -0
  39. package/types/src/utils/time.d.mts +55 -0
  40. package/index.cjs +0 -39
  41. package/index.mjs +0 -20
  42. package/src/cli.mjs +0 -323
  43. package/src/constants.mjs +0 -50
  44. package/src/core/file-discovery.mjs +0 -213
  45. package/src/core/fix-headers.mjs +0 -413
  46. package/src/detect/project.mjs +0 -190
  47. package/src/detectors/css.mjs +0 -67
  48. package/src/detectors/go.mjs +0 -65
  49. package/src/detectors/html.mjs +0 -67
  50. package/src/detectors/index.mjs +0 -187
  51. package/src/detectors/json.mjs +0 -76
  52. package/src/detectors/node.mjs +0 -90
  53. package/src/detectors/php.mjs +0 -66
  54. package/src/detectors/python.mjs +0 -75
  55. package/src/detectors/rust.mjs +0 -62
  56. package/src/detectors/shared.mjs +0 -45
  57. package/src/detectors/yaml.mjs +0 -79
  58. package/src/fix-header.mjs +0 -30
  59. package/src/header/parser.mjs +0 -145
  60. package/src/header/syntax.mjs +0 -69
  61. package/src/header/template.mjs +0 -65
  62. package/src/utils/fs.mjs +0 -138
  63. package/src/utils/git.mjs +0 -135
  64. package/src/utils/time.mjs +0 -44
  65. package/types/src/detectors/shared.d.mts +0 -14
@@ -12,6 +12,12 @@ export type FixHeadersOptions = {
12
12
  cwd?: string;
13
13
  input?: string;
14
14
  dryRun?: boolean;
15
+ check?: boolean;
16
+ fixCreatedDate?: boolean;
17
+ strictCreatedDate?: boolean;
18
+ normalizeDateFormat?: boolean;
19
+ timezone?: string;
20
+ convertTimezone?: boolean;
15
21
  configFile?: string;
16
22
  sampleOutput?: boolean;
17
23
  forceAuthorUpdate?: boolean;
@@ -26,7 +32,10 @@ export type FixHeadersOptions = {
26
32
  blockLinePrefix?: string;
27
33
  blockEnd?: string;
28
34
  }>;
29
- includeFolders?: string[];
35
+ includeFolders?: Array<string | {
36
+ path: string;
37
+ recursive?: boolean;
38
+ }>;
30
39
  excludeFolders?: string[];
31
40
  includeExtensions?: string[];
32
41
  gitignore?: boolean | string | string[];
@@ -39,37 +48,85 @@ export type FixHeadersOptions = {
39
48
  company?: string;
40
49
  companyName?: string;
41
50
  copyrightStartYear?: number;
51
+ spacing?: number;
52
+ margin?: number;
53
+ };
54
+ export type HeaderFieldIssue = import("../header/fields.mjs").HeaderFieldIssue;
55
+ /**
56
+ * Rewrites a header date payload (format or zone), keeping its instant.
57
+ */
58
+ export type DateRewrite = (payload: {
59
+ date: string;
60
+ timestamp: number;
61
+ }) => {
62
+ date: string;
63
+ timestamp: number;
42
64
  };
65
+ /**
66
+ * Result of a run. With `sampleOutput: true`, each changed entry carries a `sample`:
67
+ * - `previousValue` / `newValue` - the header block before (null when the file had none) and after.
68
+ * - `diff` - a unified diff of the header block (`--- a/<file>` / `+++ b/<file>`, `/dev/null`
69
+ * when there was no previous header), with hunk line numbers relative to the file.
70
+ * - `issues` - one `{ field, previous, detected }` entry per header field whose written value
71
+ * differs from the existing header. Values are the field text as written in the header
72
+ * (dates keep their `date (timestamp)` form; `previous` is null when the field was missing).
73
+ * Fields fix-headers preserves - the original `@Author`/`@Email` and `@Last modified by`
74
+ * identity, unless `forceAuthorUpdate` / `forceLastModifiedAuthorUpdate` is set - are compared
75
+ * against what is actually written, so they only appear when they really change. Because an
76
+ * updated file gets a fresh `@Last modified time`, `lastModifiedAt` is listed for every
77
+ * changed file that already had a header.
78
+ * - `detectedValues` - the metadata resolved for the file. `projectNameSource` says where
79
+ * `projectName` came from: `{ from: "manifest", driver, manifest, dir }`,
80
+ * `{ from: "folder", dir }` or `{ from: "option" }`. `companyName` is the `@Copyright` holder
81
+ * (null when nothing provides one, and the line then carries none), and `companyNameSource`
82
+ * says where it came from: `{ from: "manifest", driver, manifest, dir }`, `{ from: "option" }`
83
+ * or `{ from: "none" }`. `copyrightStartYear` is the start year written for the file, and
84
+ * `copyrightStartYearSource` says where it came from: `"option"` (`copyrightStartYear`) or
85
+ * `"created-date"` (the year of the file's `@Date`).
86
+ *
87
+ * `metadata.copyrightStartYear` is the `copyrightStartYear` option, or null when it is not set.
88
+ */
43
89
  export type FixHeadersResult = {
44
90
  metadata: {
45
91
  projectName: string;
92
+ projectNameSource: import("../detect/project.mjs").ProjectNameSource;
46
93
  language: string;
47
94
  projectRoot: string;
48
95
  marker: string | null;
49
96
  authorName: string;
50
97
  authorEmail: string;
51
- companyName: string;
52
- copyrightStartYear: number;
98
+ companyName: string | null;
99
+ companyNameSource: import("../detect/project.mjs").CompanyNameSource;
100
+ copyrightStartYear: number | null;
53
101
  };
54
102
  detectedProjects: string[];
55
103
  filesScanned: number;
56
104
  filesUpdated: number;
57
105
  dryRun: boolean;
106
+ check: boolean;
107
+ filesWithDateDrift?: number;
108
+ dateAdvisories?: number;
58
109
  changes: Array<{
59
110
  file: string;
60
111
  changed: boolean;
112
+ dateIssues?: import("../header/dates.mjs").DateCheckIssue[];
61
113
  sample?: {
62
114
  previousValue: string | null;
63
115
  newValue: string;
116
+ diff: string;
117
+ issues: HeaderFieldIssue[];
64
118
  detectedValues?: {
65
119
  projectName: string;
120
+ projectNameSource: import("../detect/project.mjs").ProjectNameSource;
66
121
  language: string;
67
122
  projectRoot: string;
68
123
  marker: string | null;
69
124
  authorName: string;
70
125
  authorEmail: string;
71
- companyName: string;
126
+ companyName: string | null;
127
+ companyNameSource: import("../detect/project.mjs").CompanyNameSource;
72
128
  copyrightStartYear: number;
129
+ copyrightStartYearSource: "option" | "created-date";
73
130
  createdAtSource: string;
74
131
  lastModifiedAtSource: string;
75
132
  createdAt: {
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Creates the ignore filter for one discovery root.
3
+ * @param {{ root: string, gitignore?: boolean | string | string[] }} options - `gitignore`: `false`
4
+ * disables ignore files entirely; a path or array of paths (relative to the root) uses exactly
5
+ * those files, without asking git; anything else asks git / parses `.gitignore` files.
6
+ * @returns {{ isIgnored: (targetPath: string, isDirectory: boolean) => Promise<boolean> }} Filter.
7
+ */
8
+ export function createIgnoreFilter(options: {
9
+ root: string;
10
+ gitignore?: boolean | string | string[];
11
+ }): {
12
+ isIgnored: (targetPath: string, isDirectory: boolean) => Promise<boolean>;
13
+ };
14
+ /**
15
+ * Parsed rules of one ignore file, matched relative to `base`.
16
+ */
17
+ export type IgnoreMatcher = {
18
+ base: string;
19
+ rules: import("ignore").Ignore;
20
+ };
21
+ /**
22
+ * A folder's ignore state. `git`: the files git lists for the repository rooted at `root`;
23
+ * `rules`: parsed ignore files, innermost last; `nested` says whether `.gitignore` files and
24
+ * repositories below are picked up while walking (false for explicit ignore files); `excluded`
25
+ * marks a folder the rules ignore, so everything inside it is ignored too — as in git, a file
26
+ * cannot be re-included when a parent folder is excluded.
27
+ */
28
+ export type IgnoreContext = {
29
+ kind: "git";
30
+ root: string;
31
+ entries: Set<string>;
32
+ dirs: Set<string>;
33
+ } | {
34
+ kind: "rules";
35
+ nested: boolean;
36
+ excluded: boolean;
37
+ matchers: IgnoreMatcher[];
38
+ };
@@ -1,33 +1,45 @@
1
1
  /**
2
- * Detects project root and language by scanning known marker files.
3
- * @param {string} cwd - Starting working directory.
4
- * @param {{ detectors?: { id: string, extensions: string[], priority?: number, findNearestConfig: (path: string) => Promise<{ root: string, marker: string } | null>, parseProjectName: (marker: string, content: string, rootDirName: string) => string }[], enabledDetectors?: string[], disabledDetectors?: string[], preferredExtension?: string }} [options={}] - Detection options.
2
+ * Detects the project a path belongs to from the manifests of the project it sits in (see
3
+ * {@link resolveManifestProject}), independent of the file's type.
4
+ *
5
+ * `language` is the id of the file-type detector for `preferredExtension` when one handles
6
+ * it; otherwise the first driver claiming the project root, or `unknown` without one. With
7
+ * no manifest up to the repository root (a folder holding `.git`), that repository root is
8
+ * the project root; with neither, the start folder is. The project name is then that
9
+ * folder's name. The copyright holder (`companyName`) comes from the manifests' authors the same
10
+ * way, and is null when none of them provides one.
11
+ * @param {string} cwd - Starting directory (a file's folder, or the scan root).
12
+ * @param {{ detectors?: { id: string, extensions: string[] }[], enabledDetectors?: string[], disabledDetectors?: string[], preferredExtension?: string, drivers?: import("../drivers/index.mjs").ManifestDriver[], scanRoot?: string }} [options={}] - Detection options. `scanRoot` bounds how far values missing from the nearest manifests are looked up in ancestor folders; without it they aren't.
5
13
  * @returns {Promise<{
6
14
  * language: string,
7
15
  * rootDir: string,
8
16
  * marker: string | null,
9
- * projectName: string
17
+ * projectName: string,
18
+ * projectNameSource: ProjectNameSource,
19
+ * companyName: string | null,
20
+ * companyNameSource: CompanyNameSource,
21
+ * drivers: string[]
10
22
  * }>} Detection result.
11
23
  */
12
24
  export function detectProjectFromMarkers(cwd: string, options?: {
13
25
  detectors?: {
14
26
  id: string;
15
27
  extensions: string[];
16
- priority?: number;
17
- findNearestConfig: (path: string) => Promise<{
18
- root: string;
19
- marker: string;
20
- } | null>;
21
- parseProjectName: (marker: string, content: string, rootDirName: string) => string;
22
28
  }[];
23
29
  enabledDetectors?: string[];
24
30
  disabledDetectors?: string[];
25
31
  preferredExtension?: string;
32
+ drivers?: import("../drivers/index.mjs").ManifestDriver[];
33
+ scanRoot?: string;
26
34
  }): Promise<{
27
35
  language: string;
28
36
  rootDir: string;
29
37
  marker: string | null;
30
38
  projectName: string;
39
+ projectNameSource: ProjectNameSource;
40
+ companyName: string | null;
41
+ companyNameSource: CompanyNameSource;
42
+ drivers: string[];
31
43
  }>;
32
44
  /**
33
45
  * Resolves project metadata with override support for every auto-detected field.
@@ -49,14 +61,19 @@ export function detectProjectFromMarkers(cwd: string, options?: {
49
61
  * }} [options={}] - Detection options and overrides.
50
62
  * @returns {Promise<{
51
63
  * projectName: string,
64
+ * projectNameSource: ProjectNameSource,
52
65
  * language: string,
53
66
  * projectRoot: string,
54
67
  * marker: string | null,
55
68
  * authorName: string,
56
69
  * authorEmail: string,
57
- * companyName: string,
58
- * copyrightStartYear: number
59
- * }>} Final metadata.
70
+ * companyName: string | null,
71
+ * companyNameSource: CompanyNameSource,
72
+ * copyrightStartYear: number | null
73
+ * }>} Final metadata. `companyName` is the `companyName` option when it is set, else the
74
+ * holder the project's manifests provide, else null (no holder on the `@Copyright` line).
75
+ * `copyrightStartYear` is null when the option is not set: each file's start year then comes
76
+ * from its own `@Date`.
60
77
  */
61
78
  export function resolveProjectMetadata(options?: {
62
79
  cwd?: string;
@@ -75,11 +92,43 @@ export function resolveProjectMetadata(options?: {
75
92
  copyrightStartYear?: number;
76
93
  }): Promise<{
77
94
  projectName: string;
95
+ projectNameSource: ProjectNameSource;
78
96
  language: string;
79
97
  projectRoot: string;
80
98
  marker: string | null;
81
99
  authorName: string;
82
100
  authorEmail: string;
83
- companyName: string;
84
- copyrightStartYear: number;
101
+ companyName: string | null;
102
+ companyNameSource: CompanyNameSource;
103
+ copyrightStartYear: number | null;
85
104
  }>;
105
+ /**
106
+ * Where `projectName` came from: a manifest (the driver, its manifest and the folder it sits
107
+ * in), the project root's folder name, or the `projectName` option.
108
+ */
109
+ export type ProjectNameSource = {
110
+ from: "manifest";
111
+ driver: string;
112
+ manifest: string;
113
+ dir: string;
114
+ } | {
115
+ from: "folder";
116
+ dir: string;
117
+ } | {
118
+ from: "option";
119
+ };
120
+ /**
121
+ * Where `companyName` (the `@Copyright` holder) came from: a manifest's author (the driver, its
122
+ * manifest and the folder it sits in), the `companyName` option, or nothing (`companyName` is
123
+ * null and the `@Copyright` line carries no holder).
124
+ */
125
+ export type CompanyNameSource = {
126
+ from: "manifest";
127
+ driver: string;
128
+ manifest: string;
129
+ dir: string;
130
+ } | {
131
+ from: "option";
132
+ } | {
133
+ from: "none";
134
+ };
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(_marker: any, _markerContent: any, rootDirName: any): string;
12
5
  export function resolveCommentSyntax(filePath: any): {
13
6
  kind: "block";
14
7
  blockStart: string;
@@ -20,6 +13,5 @@ export namespace detector {
20
13
  * @fileoverview CSS detector implementation.
21
14
  * @module fix-headers/detectors/css
22
15
  */
23
- declare const markers: string[];
24
16
  declare const extensions: string[];
25
17
  export {};
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(_marker: any, markerContent: any, rootDirName: any): any;
12
5
  export function resolveCommentSyntax(filePath: any): {
13
6
  kind: "block";
14
7
  blockStart: string;
@@ -20,6 +13,5 @@ export namespace detector {
20
13
  * @fileoverview Go detector implementation.
21
14
  * @module fix-headers/detectors/go
22
15
  */
23
- declare const markers: string[];
24
16
  declare const extensions: string[];
25
17
  export {};
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(_marker: any, _markerContent: any, rootDirName: any): string;
12
5
  export function resolveCommentSyntax(filePath: any): {
13
6
  kind: "html";
14
7
  blockStart: string;
@@ -20,6 +13,5 @@ export namespace detector {
20
13
  * @fileoverview HTML detector implementation.
21
14
  * @module fix-headers/detectors/html
22
15
  */
23
- declare const markers: string[];
24
16
  declare const extensions: string[];
25
17
  export {};
@@ -26,7 +26,7 @@ export function getDetectorById(id: string): (typeof DETECTOR_PROFILES)[number]
26
26
  /**
27
27
  * Resolves comment syntax for a file path using detector-specific templates.
28
28
  * @param {string} filePath - File path.
29
- * @param {{ language?: string, enabledDetectors?: string[], disabledDetectors?: string[], detectors?: DetectorProfile[], detectorSyntaxOverrides?: Record<string, { linePrefix?: string, lineSeparator?: string, blockStart?: string, blockLinePrefix?: string, blockEnd?: string }> }} [options={}] - Runtime options. `detectors` overrides the enabled-detector set (matching {@link detectProjectFromMarkers}).
29
+ * @param {{ language?: string, enabledDetectors?: string[], disabledDetectors?: string[], detectors?: DetectorProfile[], detectorSyntaxOverrides?: Record<string, { linePrefix?: string, lineSeparator?: string, blockStart?: string, blockLinePrefix?: string, blockEnd?: string }>, spacing?: number, margin?: number }} [options={}] - Runtime options. `detectors` overrides the enabled-detector set (matching {@link detectProjectFromMarkers}).
30
30
  * @returns {{kind: "block" | "line" | "html", linePrefix?: string, lineSeparator?: string, blockStart?: string, blockLinePrefix?: string, blockEnd?: string}} Syntax descriptor.
31
31
  */
32
32
  export function getCommentSyntaxForFile(filePath: string, options?: {
@@ -41,6 +41,8 @@ export function getCommentSyntaxForFile(filePath: string, options?: {
41
41
  blockLinePrefix?: string;
42
42
  blockEnd?: string;
43
43
  }>;
44
+ spacing?: number;
45
+ margin?: number;
44
46
  }): {
45
47
  kind: "block" | "line" | "html";
46
48
  linePrefix?: string;
@@ -61,17 +63,39 @@ export function getPreservedPrefixForFile(filePath: string, content: string, opt
61
63
  enabledDetectors?: string[];
62
64
  disabledDetectors?: string[];
63
65
  }): string;
66
+ /**
67
+ * @fileoverview Detector registry and shared selector helpers.
68
+ * @module fix-headers/detectors
69
+ */
70
+ /**
71
+ * @typedef {{
72
+ * id: string,
73
+ * extensions: string[],
74
+ * enabledByDefault: boolean,
75
+ * resolveCommentSyntax: (filePath: string) => ({kind: "block" | "line" | "html", linePrefix?: string, lineSeparator?: string, blockStart?: string, blockLinePrefix?: string, blockEnd?: string} | null),
76
+ * resolvePreservedPrefix?: (filePath: string, content: string) => string
77
+ * }} DetectorProfile
78
+ * A file-type detector: which extensions it handles and the comment syntax (and preserved
79
+ * leading prefix) of those files. Which project a file belongs to is resolved separately,
80
+ * from the manifest drivers in `src/drivers/`.
81
+ */
82
+ /**
83
+ * Registered detector profiles, in alphabetical order by module name. Imported
84
+ * statically (not discovered from the directory at runtime) so the registry
85
+ * survives bundling into dist/. Add a new detector module here. The cast keeps the
86
+ * public type `DetectorProfile[]`: the detector modules' object literals widen their
87
+ * `kind` strings, which the typedef narrows to its literal union.
88
+ */
64
89
  export const DETECTOR_PROFILES: DetectorProfile[];
90
+ /**
91
+ * A file-type detector: which extensions it handles and the comment syntax (and preserved
92
+ * leading prefix) of those files. Which project a file belongs to is resolved separately,
93
+ * from the manifest drivers in `src/drivers/`.
94
+ */
65
95
  export type DetectorProfile = {
66
96
  id: string;
67
- markers: string[];
68
97
  extensions: string[];
69
98
  enabledByDefault: boolean;
70
- findNearestConfig: (startPath: string) => Promise<{
71
- root: string;
72
- marker: string;
73
- } | null>;
74
- parseProjectName: (marker: string, markerContent: string, rootDirName: string) => string;
75
99
  resolveCommentSyntax: (filePath: string) => ({
76
100
  kind: "block" | "line" | "html";
77
101
  linePrefix?: string;
@@ -81,5 +105,4 @@ export type DetectorProfile = {
81
105
  blockEnd?: string;
82
106
  } | null);
83
107
  resolvePreservedPrefix?: (filePath: string, content: string) => string;
84
- priority?: number;
85
108
  };
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(_marker: any, markerContent: any, rootDirName: any): string;
12
5
  export function resolveCommentSyntax(filePath: any): {
13
6
  kind: "block";
14
7
  blockStart: string;
@@ -20,6 +13,5 @@ export namespace detector {
20
13
  * @fileoverview JSON-family detector implementation.
21
14
  * @module fix-headers/detectors/json
22
15
  */
23
- declare const markers: string[];
24
16
  declare const extensions: string[];
25
17
  export {};
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(_marker: any, markerContent: any, rootDirName: any): string;
12
5
  export function resolvePreservedPrefix(filePath: any, content: any): string;
13
6
  export function resolveCommentSyntax(filePath: any): {
14
7
  kind: "block";
@@ -21,6 +14,5 @@ export namespace detector {
21
14
  * @fileoverview Node.js detector implementation.
22
15
  * @module fix-headers/detectors/node
23
16
  */
24
- declare const markers: string[];
25
17
  declare const extensions: string[];
26
18
  export {};
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(_marker: any, markerContent: any, rootDirName: any): any;
12
5
  export function resolveCommentSyntax(filePath: any): {
13
6
  kind: "block";
14
7
  blockStart: string;
@@ -20,6 +13,5 @@ export namespace detector {
20
13
  * @fileoverview PHP detector implementation.
21
14
  * @module fix-headers/detectors/php
22
15
  */
23
- declare const markers: string[];
24
16
  declare const extensions: string[];
25
17
  export {};
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(_marker: any, markerContent: any, rootDirName: any): string;
12
5
  export function resolvePreservedPrefix(filePath: any, content: any): string;
13
6
  export function resolveCommentSyntax(filePath: any): {
14
7
  kind: string;
@@ -19,6 +12,5 @@ export namespace detector {
19
12
  * @fileoverview Python detector implementation.
20
13
  * @module fix-headers/detectors/python
21
14
  */
22
- declare const markers: string[];
23
15
  declare const extensions: string[];
24
16
  export {};
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(_marker: any, markerContent: any, rootDirName: any): any;
12
5
  export function resolveCommentSyntax(filePath: any): {
13
6
  kind: "block";
14
7
  blockStart: string;
@@ -20,6 +13,5 @@ export namespace detector {
20
13
  * @fileoverview Rust detector implementation.
21
14
  * @module fix-headers/detectors/rust
22
15
  */
23
- declare const markers: string[];
24
16
  declare const extensions: string[];
25
17
  export {};
@@ -1,14 +1,7 @@
1
1
  export namespace detector {
2
2
  export let id: string;
3
- export let priority: number;
4
- export { markers };
5
3
  export { extensions };
6
4
  export let enabledByDefault: boolean;
7
- export function findNearestConfig(startPath: any): Promise<{
8
- root: string;
9
- marker: string;
10
- }>;
11
- export function parseProjectName(marker: any, markerContent: any, rootDirName: any): string;
12
5
  export function resolveCommentSyntax(filePath: any): {
13
6
  kind: "line";
14
7
  linePrefix: string;
@@ -18,6 +11,5 @@ export namespace detector {
18
11
  * @fileoverview YAML detector implementation.
19
12
  * @module fix-headers/detectors/yaml
20
13
  */
21
- declare const markers: string[];
22
14
  declare const extensions: string[];
23
15
  export {};
@@ -0,0 +1,2 @@
1
+ /** @type {import("./index.mjs").ManifestDriver} */
2
+ export const driver: import("./index.mjs").ManifestDriver;