@dependabit/manifest 0.1.13 → 0.1.15
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/CHANGELOG.md +12 -0
- package/dist/config.d.ts +66 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +66 -6
- package/dist/config.js.map +1 -1
- package/dist/manifest.d.ts +131 -8
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +131 -8
- package/dist/manifest.js.map +1 -1
- package/dist/schema.d.ts +129 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +42 -0
- package/dist/schema.js.map +1 -1
- package/dist/size-check.js.map +1 -1
- package/dist/validator.d.ts +7 -1
- package/dist/validator.d.ts.map +1 -1
- package/dist/validator.js +7 -1
- package/dist/validator.js.map +1 -1
- package/package.json +25 -8
- package/src/config.test.ts +0 -266
- package/src/config.ts +0 -96
- package/src/index.ts +0 -16
- package/src/manifest.test.ts +0 -400
- package/src/manifest.ts +0 -278
- package/src/schema.test.ts +0 -293
- package/src/schema.ts +0 -266
- package/src/size-check.test.ts +0 -246
- package/src/size-check.ts +0 -124
- package/src/validator.test.ts +0 -161
- package/src/validator.ts +0 -131
- package/tsconfig.json +0 -10
- package/tsconfig.tsbuildinfo +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @dependabit/manifest
|
|
2
2
|
|
|
3
|
+
## 0.1.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#101](https://github.com/pradeepmouli/dependabit/pull/101) [`83b9818`](https://github.com/pradeepmouli/dependabit/commit/83b98187940da75a41fb41990ea03c8d962146b4) Thanks [@pradeepmouli](https://github.com/pradeepmouli)! - - chore: bump typedoc-plugin-to-skills to ^1.3.0
|
|
8
|
+
|
|
9
|
+
## 0.1.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#76](https://github.com/pradeepmouli/dependabit/pull/76) [`7952538`](https://github.com/pradeepmouli/dependabit/commit/7952538578b97472f9da49056db535abf8c6a26a) Thanks [@pradeepmouli](https://github.com/pradeepmouli)! - - test: trigger CI pipeline
|
|
14
|
+
|
|
3
15
|
## 0.1.13
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/config.d.ts
CHANGED
|
@@ -1,19 +1,68 @@
|
|
|
1
1
|
import { type DependabitConfig } from './schema.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Reads a YAML configuration file from disk, parses it, and validates it
|
|
4
|
+
* against `DependabitConfigSchema`.
|
|
5
|
+
*
|
|
6
|
+
* @param path - Path to the `.dependabit.yml` (or `.json`) file.
|
|
7
|
+
* @returns The validated `DependabitConfig` object.
|
|
8
|
+
*
|
|
9
|
+
* @throws {ValidationError} If the YAML does not match the config schema.
|
|
10
|
+
* @throws {Error} If the file cannot be read.
|
|
11
|
+
*
|
|
12
|
+
* @category Manifest
|
|
13
|
+
*
|
|
14
|
+
* @never
|
|
15
|
+
* - YAML comments are parsed but not preserved in the returned object.
|
|
16
|
+
* A subsequent `stringifyConfig` call will lose all comments.
|
|
17
|
+
* - Duplicate YAML keys are silently overwritten by the YAML parser (last
|
|
18
|
+
* value wins) — no warning is emitted.
|
|
4
19
|
*/
|
|
5
20
|
export declare function readConfig(path: string): Promise<DependabitConfig>;
|
|
6
21
|
/**
|
|
7
|
-
*
|
|
22
|
+
* Parses a YAML string into a validated `DependabitConfig`.
|
|
23
|
+
*
|
|
24
|
+
* @param yaml - Raw YAML or JSON string.
|
|
25
|
+
* @returns Validated config object.
|
|
26
|
+
*
|
|
27
|
+
* @throws {ValidationError} If the parsed data does not satisfy the schema.
|
|
28
|
+
*
|
|
29
|
+
* @category Manifest
|
|
30
|
+
*
|
|
31
|
+
* @useWhen
|
|
32
|
+
* Parsing config from an in-memory string (e.g., fetched from GitHub API).
|
|
8
33
|
*/
|
|
9
34
|
export declare function parseConfig(yaml: string): DependabitConfig;
|
|
10
35
|
/**
|
|
11
|
-
*
|
|
36
|
+
* Serialises a validated `DependabitConfig` to a YAML string.
|
|
37
|
+
*
|
|
38
|
+
* @param config - The config to serialise.
|
|
39
|
+
* @returns YAML string representation.
|
|
40
|
+
*
|
|
41
|
+
* @throws {ValidationError} If `config` fails schema validation before
|
|
42
|
+
* serialisation.
|
|
43
|
+
*
|
|
44
|
+
* @category Manifest
|
|
45
|
+
*
|
|
46
|
+
* @never
|
|
47
|
+
* - YAML comments present in the original file are **not** preserved;
|
|
48
|
+
* this function always produces comment-free YAML.
|
|
12
49
|
*/
|
|
13
50
|
export declare function stringifyConfig(config: DependabitConfig): string;
|
|
14
51
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
52
|
+
* Resolves the effective monitoring rules for a specific dependency URL by
|
|
53
|
+
* merging global config defaults with any per-URL override defined in
|
|
54
|
+
* `config.dependencies`.
|
|
55
|
+
*
|
|
56
|
+
* @param config - Root `DependabitConfig` object.
|
|
57
|
+
* @param dependencyUrl - The exact URL of the dependency to look up.
|
|
58
|
+
* @returns Resolved `enabled`, `checkFrequency`, and `ignoreChanges` values.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* Override matching is performed by exact URL equality. A trailing slash
|
|
62
|
+
* or query parameter difference between the stored URL and the override URL
|
|
63
|
+
* will cause the override to be silently ignored.
|
|
64
|
+
*
|
|
65
|
+
* @category Manifest
|
|
17
66
|
*/
|
|
18
67
|
export declare function getEffectiveMonitoringRules(config: DependabitConfig, dependencyUrl: string): {
|
|
19
68
|
enabled: boolean;
|
|
@@ -21,7 +70,18 @@ export declare function getEffectiveMonitoringRules(config: DependabitConfig, de
|
|
|
21
70
|
ignoreChanges: boolean;
|
|
22
71
|
};
|
|
23
72
|
/**
|
|
24
|
-
*
|
|
73
|
+
* Returns `true` if the given URL matches any exclusion rule defined in
|
|
74
|
+
* `config.ignore` (exact URL list or regex pattern list).
|
|
75
|
+
*
|
|
76
|
+
* @param config - Root `DependabitConfig` object.
|
|
77
|
+
* @param url - The URL to test.
|
|
78
|
+
* @returns `true` if the URL should be skipped; `false` otherwise.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* Invalid regex patterns in `config.ignore.patterns` are logged as warnings
|
|
82
|
+
* via `console.warn` and skipped rather than throwing.
|
|
83
|
+
*
|
|
84
|
+
* @category Manifest
|
|
25
85
|
*/
|
|
26
86
|
export declare function shouldIgnoreUrl(config: DependabitConfig, url: string): boolean;
|
|
27
87
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAIxE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAG1D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAIhE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,gBAAgB,EACxB,aAAa,EAAE,MAAM,GACpB;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC1D,aAAa,EAAE,OAAO,CAAC;CACxB,CAsBA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CA0B9E"}
|
package/dist/config.js
CHANGED
|
@@ -3,7 +3,22 @@ import YAML from 'yaml';
|
|
|
3
3
|
import {} from './schema.js';
|
|
4
4
|
import { validateConfig } from './validator.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Reads a YAML configuration file from disk, parses it, and validates it
|
|
7
|
+
* against `DependabitConfigSchema`.
|
|
8
|
+
*
|
|
9
|
+
* @param path - Path to the `.dependabit.yml` (or `.json`) file.
|
|
10
|
+
* @returns The validated `DependabitConfig` object.
|
|
11
|
+
*
|
|
12
|
+
* @throws {ValidationError} If the YAML does not match the config schema.
|
|
13
|
+
* @throws {Error} If the file cannot be read.
|
|
14
|
+
*
|
|
15
|
+
* @category Manifest
|
|
16
|
+
*
|
|
17
|
+
* @never
|
|
18
|
+
* - YAML comments are parsed but not preserved in the returned object.
|
|
19
|
+
* A subsequent `stringifyConfig` call will lose all comments.
|
|
20
|
+
* - Duplicate YAML keys are silently overwritten by the YAML parser (last
|
|
21
|
+
* value wins) — no warning is emitted.
|
|
7
22
|
*/
|
|
8
23
|
export async function readConfig(path) {
|
|
9
24
|
const content = await readFile(path, 'utf-8');
|
|
@@ -11,14 +26,36 @@ export async function readConfig(path) {
|
|
|
11
26
|
return validateConfig(data);
|
|
12
27
|
}
|
|
13
28
|
/**
|
|
14
|
-
*
|
|
29
|
+
* Parses a YAML string into a validated `DependabitConfig`.
|
|
30
|
+
*
|
|
31
|
+
* @param yaml - Raw YAML or JSON string.
|
|
32
|
+
* @returns Validated config object.
|
|
33
|
+
*
|
|
34
|
+
* @throws {ValidationError} If the parsed data does not satisfy the schema.
|
|
35
|
+
*
|
|
36
|
+
* @category Manifest
|
|
37
|
+
*
|
|
38
|
+
* @useWhen
|
|
39
|
+
* Parsing config from an in-memory string (e.g., fetched from GitHub API).
|
|
15
40
|
*/
|
|
16
41
|
export function parseConfig(yaml) {
|
|
17
42
|
const data = YAML.parse(yaml);
|
|
18
43
|
return validateConfig(data);
|
|
19
44
|
}
|
|
20
45
|
/**
|
|
21
|
-
*
|
|
46
|
+
* Serialises a validated `DependabitConfig` to a YAML string.
|
|
47
|
+
*
|
|
48
|
+
* @param config - The config to serialise.
|
|
49
|
+
* @returns YAML string representation.
|
|
50
|
+
*
|
|
51
|
+
* @throws {ValidationError} If `config` fails schema validation before
|
|
52
|
+
* serialisation.
|
|
53
|
+
*
|
|
54
|
+
* @category Manifest
|
|
55
|
+
*
|
|
56
|
+
* @never
|
|
57
|
+
* - YAML comments present in the original file are **not** preserved;
|
|
58
|
+
* this function always produces comment-free YAML.
|
|
22
59
|
*/
|
|
23
60
|
export function stringifyConfig(config) {
|
|
24
61
|
// Validate before stringifying
|
|
@@ -26,8 +63,20 @@ export function stringifyConfig(config) {
|
|
|
26
63
|
return YAML.stringify(config);
|
|
27
64
|
}
|
|
28
65
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
66
|
+
* Resolves the effective monitoring rules for a specific dependency URL by
|
|
67
|
+
* merging global config defaults with any per-URL override defined in
|
|
68
|
+
* `config.dependencies`.
|
|
69
|
+
*
|
|
70
|
+
* @param config - Root `DependabitConfig` object.
|
|
71
|
+
* @param dependencyUrl - The exact URL of the dependency to look up.
|
|
72
|
+
* @returns Resolved `enabled`, `checkFrequency`, and `ignoreChanges` values.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* Override matching is performed by exact URL equality. A trailing slash
|
|
76
|
+
* or query parameter difference between the stored URL and the override URL
|
|
77
|
+
* will cause the override to be silently ignored.
|
|
78
|
+
*
|
|
79
|
+
* @category Manifest
|
|
31
80
|
*/
|
|
32
81
|
export function getEffectiveMonitoringRules(config, dependencyUrl) {
|
|
33
82
|
// Start with global defaults
|
|
@@ -49,7 +98,18 @@ export function getEffectiveMonitoringRules(config, dependencyUrl) {
|
|
|
49
98
|
};
|
|
50
99
|
}
|
|
51
100
|
/**
|
|
52
|
-
*
|
|
101
|
+
* Returns `true` if the given URL matches any exclusion rule defined in
|
|
102
|
+
* `config.ignore` (exact URL list or regex pattern list).
|
|
103
|
+
*
|
|
104
|
+
* @param config - Root `DependabitConfig` object.
|
|
105
|
+
* @param url - The URL to test.
|
|
106
|
+
* @returns `true` if the URL should be skipped; `false` otherwise.
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* Invalid regex patterns in `config.ignore.patterns` are logged as warnings
|
|
110
|
+
* via `console.warn` and skipped rather than throwing.
|
|
111
|
+
*
|
|
112
|
+
* @category Manifest
|
|
53
113
|
*/
|
|
54
114
|
export function shouldIgnoreUrl(config, url) {
|
|
55
115
|
if (!config.ignore) {
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAyB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAyB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY;IAC3C,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACj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;;;;;;;;;GAaG;AACH,MAAM,UAAU,eAAe,CAAC,MAAwB,EAAE,GAAW;IACnE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0BAA0B;IAC1B,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2CAA2C;IAC3C,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC3B,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC7C,IAAI,CAAC;gBACH,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;gBAClC,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;oBACpB,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,mDAAmD;gBACnD,OAAO,CAAC,IAAI,CAAC,oDAAoD,OAAO,EAAE,CAAC,CAAC;YAC9E,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/manifest.d.ts
CHANGED
|
@@ -1,10 +1,46 @@
|
|
|
1
1
|
import { type DependencyManifest, type DependencyEntry } from './schema.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Reads a manifest JSON file from disk and validates it against
|
|
4
|
+
* `DependencyManifestSchema`.
|
|
5
|
+
*
|
|
6
|
+
* @param path - Absolute or process-relative path to the manifest file.
|
|
7
|
+
* @returns The validated manifest object.
|
|
8
|
+
*
|
|
9
|
+
* @throws {ValidationError} If the file content does not match the schema.
|
|
10
|
+
* @throws {Error} If the file cannot be read (e.g., not found, permissions).
|
|
11
|
+
*
|
|
12
|
+
* @category Manifest
|
|
13
|
+
*
|
|
14
|
+
* @useWhen Loading an existing manifest to pass to the monitor or detector.
|
|
15
|
+
*
|
|
16
|
+
* @never
|
|
17
|
+
* - The file is parsed as JSON, not YAML. Passing a YAML manifest path
|
|
18
|
+
* will throw a `SyntaxError`; use `readConfig` for YAML.
|
|
4
19
|
*/
|
|
5
20
|
export declare function readManifest(path: string): Promise<DependencyManifest>;
|
|
6
21
|
/**
|
|
7
|
-
*
|
|
22
|
+
* Serialises a manifest to pretty-printed JSON and writes it to disk.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* The directory is created recursively if it does not exist.
|
|
26
|
+
* When `strict` is `false` (the default) the file is written even if
|
|
27
|
+
* validation fails; validation errors are returned in the result so callers
|
|
28
|
+
* can surface them as warnings.
|
|
29
|
+
*
|
|
30
|
+
* @param path - Destination file path.
|
|
31
|
+
* @param manifest - Manifest object to write.
|
|
32
|
+
* @param options - Optional write behaviour overrides.
|
|
33
|
+
* @returns An object that may contain `validationErrors` if the manifest
|
|
34
|
+
* has schema violations and `strict` is `false`.
|
|
35
|
+
*
|
|
36
|
+
* @throws {ValidationError} Only when `options.strict` is `true` and the
|
|
37
|
+
* manifest fails validation.
|
|
38
|
+
*
|
|
39
|
+
* @category Manifest
|
|
40
|
+
*
|
|
41
|
+
* @never
|
|
42
|
+
* - Writing a manifest with `strict: false` can persist invalid data that
|
|
43
|
+
* later fails to parse. Prefer `strict: true` in production pipelines.
|
|
8
44
|
*/
|
|
9
45
|
export declare function writeManifest(path: string, manifest: DependencyManifest, options?: {
|
|
10
46
|
strict?: boolean;
|
|
@@ -12,27 +48,114 @@ export declare function writeManifest(path: string, manifest: DependencyManifest
|
|
|
12
48
|
validationErrors?: string[];
|
|
13
49
|
}>;
|
|
14
50
|
/**
|
|
15
|
-
*
|
|
51
|
+
* Updates a single dependency entry in the on-disk manifest by ID.
|
|
52
|
+
*
|
|
53
|
+
* @param path - Path to the manifest file.
|
|
54
|
+
* @param dependencyId - UUID of the dependency to update.
|
|
55
|
+
* @param updates - Partial `DependencyEntry` fields to merge.
|
|
56
|
+
* @returns The updated manifest.
|
|
57
|
+
*
|
|
58
|
+
* @throws {Error} If no dependency with `dependencyId` is found.
|
|
59
|
+
* @throws {ValidationError} If the merged entry fails schema validation.
|
|
60
|
+
*
|
|
61
|
+
* @category Manifest
|
|
62
|
+
*
|
|
63
|
+
* @never
|
|
64
|
+
* - This function performs a **read–modify–write** cycle. Concurrent calls
|
|
65
|
+
* with the same `path` and different `dependencyId` values will race and
|
|
66
|
+
* one write will silently overwrite the other. Use a file lock or
|
|
67
|
+
* serialise calls if running multiple monitors in parallel.
|
|
16
68
|
*/
|
|
17
69
|
export declare function updateDependency(path: string, dependencyId: string, updates: Partial<DependencyEntry>): Promise<DependencyManifest>;
|
|
18
70
|
/**
|
|
19
|
-
*
|
|
71
|
+
* Appends a new dependency entry to the on-disk manifest.
|
|
72
|
+
*
|
|
73
|
+
* @param path - Path to the manifest file.
|
|
74
|
+
* @param dependency - The new `DependencyEntry` to add.
|
|
75
|
+
* @returns The updated manifest.
|
|
76
|
+
*
|
|
77
|
+
* @throws {Error} If a dependency with the same `id` or `url` already exists.
|
|
78
|
+
*
|
|
79
|
+
* @category Manifest
|
|
80
|
+
*
|
|
81
|
+
* @never
|
|
82
|
+
* - Duplicate URL detection is exact-match only. Trailing slashes or
|
|
83
|
+
* fragment identifiers will not be treated as duplicates.
|
|
84
|
+
* - Same race condition as {@link updateDependency} applies.
|
|
20
85
|
*/
|
|
21
86
|
export declare function addDependency(path: string, dependency: DependencyEntry): Promise<DependencyManifest>;
|
|
22
87
|
/**
|
|
23
|
-
*
|
|
88
|
+
* Removes a dependency from the on-disk manifest by ID.
|
|
89
|
+
*
|
|
90
|
+
* @param path - Path to the manifest file.
|
|
91
|
+
* @param dependencyId - UUID of the dependency to remove.
|
|
92
|
+
* @returns The updated manifest.
|
|
93
|
+
*
|
|
94
|
+
* @throws {Error} If no dependency with `dependencyId` is found.
|
|
95
|
+
*
|
|
96
|
+
* @category Manifest
|
|
24
97
|
*/
|
|
25
98
|
export declare function removeDependency(path: string, dependencyId: string): Promise<DependencyManifest>;
|
|
26
99
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
100
|
+
* Merges an `updated` manifest generated by the detector over an `existing`
|
|
101
|
+
* one, optionally preserving manual entries and accumulated change history.
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* The merge strategy is:
|
|
105
|
+
* - All entries from `updated` are taken as the new ground truth.
|
|
106
|
+
* - If `preserveManual` is `true` (default), manual entries in `existing`
|
|
107
|
+
* that are absent from `updated` are appended as-is.
|
|
108
|
+
* - If `preserveHistory` is `true` (default), any `changeHistory` from
|
|
109
|
+
* `existing` is prepended to the corresponding entry in `updated`.
|
|
110
|
+
*
|
|
111
|
+
* Statistics are recalculated from the merged dependency list.
|
|
112
|
+
*
|
|
113
|
+
* @param existing - The current on-disk manifest.
|
|
114
|
+
* @param updated - The freshly-detected manifest to merge.
|
|
115
|
+
* @param options - Merge strategy options.
|
|
116
|
+
* @returns A new manifest object (does not mutate either input).
|
|
117
|
+
*
|
|
118
|
+
* @category Manifest
|
|
119
|
+
*
|
|
120
|
+
* @useWhen
|
|
121
|
+
* Applying the output of {@link Detector} to an existing manifest without
|
|
122
|
+
* losing manually-curated entries or historical change records.
|
|
123
|
+
*
|
|
124
|
+
* @avoidWhen
|
|
125
|
+
* You want to completely replace the existing manifest — just write
|
|
126
|
+
* `updated` directly via {@link writeManifest}.
|
|
127
|
+
*
|
|
128
|
+
* @never
|
|
129
|
+
* - Matching between `existing` and `updated` uses `id` **or** `url`.
|
|
130
|
+
* If the URL of a dependency changes (e.g. a redirect is resolved), the
|
|
131
|
+
* entry will be treated as new and history will not be preserved.
|
|
132
|
+
* - `preserveManual: true` can re-add entries that were intentionally
|
|
133
|
+
* removed from the repository. Set it to `false` when performing a
|
|
134
|
+
* deliberate full refresh.
|
|
29
135
|
*/
|
|
30
136
|
export declare function mergeManifests(existing: DependencyManifest, updated: DependencyManifest, options?: {
|
|
31
137
|
preserveManual?: boolean;
|
|
32
138
|
preserveHistory?: boolean;
|
|
33
139
|
}): DependencyManifest;
|
|
34
140
|
/**
|
|
35
|
-
*
|
|
141
|
+
* Creates a minimal, valid manifest with an empty `dependencies` array.
|
|
142
|
+
*
|
|
143
|
+
* @remarks
|
|
144
|
+
* Use this as the starting point when generating a manifest from scratch
|
|
145
|
+
* (e.g. on first run in a new repository).
|
|
146
|
+
*
|
|
147
|
+
* @returns A new `DependencyManifest` with zeroed statistics.
|
|
148
|
+
*
|
|
149
|
+
* @category Manifest
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```ts
|
|
153
|
+
* const manifest = createEmptyManifest({
|
|
154
|
+
* owner: 'my-org', name: 'my-repo',
|
|
155
|
+
* branch: 'main', commit: 'abc123',
|
|
156
|
+
* });
|
|
157
|
+
* await writeManifest('.dependabit/manifest.json', manifest);
|
|
158
|
+
* ```
|
|
36
159
|
*/
|
|
37
160
|
export declare function createEmptyManifest(options: {
|
|
38
161
|
owner: string;
|
package/dist/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAG5E
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAG5E;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAI5E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kBAAkB,EAC5B,O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HANGED
|
@@ -3,7 +3,22 @@ import { dirname } from 'node:path';
|
|
|
3
3
|
import {} from './schema.js';
|
|
4
4
|
import { validateManifest, validateDependencyEntry, safeValidateManifest } from './validator.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Reads a manifest JSON file from disk and validates it against
|
|
7
|
+
* `DependencyManifestSchema`.
|
|
8
|
+
*
|
|
9
|
+
* @param path - Absolute or process-relative path to the manifest file.
|
|
10
|
+
* @returns The validated manifest object.
|
|
11
|
+
*
|
|
12
|
+
* @throws {ValidationError} If the file content does not match the schema.
|
|
13
|
+
* @throws {Error} If the file cannot be read (e.g., not found, permissions).
|
|
14
|
+
*
|
|
15
|
+
* @category Manifest
|
|
16
|
+
*
|
|
17
|
+
* @useWhen Loading an existing manifest to pass to the monitor or detector.
|
|
18
|
+
*
|
|
19
|
+
* @never
|
|
20
|
+
* - The file is parsed as JSON, not YAML. Passing a YAML manifest path
|
|
21
|
+
* will throw a `SyntaxError`; use `readConfig` for YAML.
|
|
7
22
|
*/
|
|
8
23
|
export async function readManifest(path) {
|
|
9
24
|
const content = await readFile(path, 'utf-8');
|
|
@@ -11,7 +26,28 @@ export async function readManifest(path) {
|
|
|
11
26
|
return validateManifest(data);
|
|
12
27
|
}
|
|
13
28
|
/**
|
|
14
|
-
*
|
|
29
|
+
* Serialises a manifest to pretty-printed JSON and writes it to disk.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* The directory is created recursively if it does not exist.
|
|
33
|
+
* When `strict` is `false` (the default) the file is written even if
|
|
34
|
+
* validation fails; validation errors are returned in the result so callers
|
|
35
|
+
* can surface them as warnings.
|
|
36
|
+
*
|
|
37
|
+
* @param path - Destination file path.
|
|
38
|
+
* @param manifest - Manifest object to write.
|
|
39
|
+
* @param options - Optional write behaviour overrides.
|
|
40
|
+
* @returns An object that may contain `validationErrors` if the manifest
|
|
41
|
+
* has schema violations and `strict` is `false`.
|
|
42
|
+
*
|
|
43
|
+
* @throws {ValidationError} Only when `options.strict` is `true` and the
|
|
44
|
+
* manifest fails validation.
|
|
45
|
+
*
|
|
46
|
+
* @category Manifest
|
|
47
|
+
*
|
|
48
|
+
* @never
|
|
49
|
+
* - Writing a manifest with `strict: false` can persist invalid data that
|
|
50
|
+
* later fails to parse. Prefer `strict: true` in production pipelines.
|
|
15
51
|
*/
|
|
16
52
|
export async function writeManifest(path, manifest, options) {
|
|
17
53
|
const strict = options?.strict ?? false;
|
|
@@ -34,7 +70,23 @@ export async function writeManifest(path, manifest, options) {
|
|
|
34
70
|
return result;
|
|
35
71
|
}
|
|
36
72
|
/**
|
|
37
|
-
*
|
|
73
|
+
* Updates a single dependency entry in the on-disk manifest by ID.
|
|
74
|
+
*
|
|
75
|
+
* @param path - Path to the manifest file.
|
|
76
|
+
* @param dependencyId - UUID of the dependency to update.
|
|
77
|
+
* @param updates - Partial `DependencyEntry` fields to merge.
|
|
78
|
+
* @returns The updated manifest.
|
|
79
|
+
*
|
|
80
|
+
* @throws {Error} If no dependency with `dependencyId` is found.
|
|
81
|
+
* @throws {ValidationError} If the merged entry fails schema validation.
|
|
82
|
+
*
|
|
83
|
+
* @category Manifest
|
|
84
|
+
*
|
|
85
|
+
* @never
|
|
86
|
+
* - This function performs a **read–modify–write** cycle. Concurrent calls
|
|
87
|
+
* with the same `path` and different `dependencyId` values will race and
|
|
88
|
+
* one write will silently overwrite the other. Use a file lock or
|
|
89
|
+
* serialise calls if running multiple monitors in parallel.
|
|
38
90
|
*/
|
|
39
91
|
export async function updateDependency(path, dependencyId, updates) {
|
|
40
92
|
const manifest = await readManifest(path);
|
|
@@ -53,7 +105,20 @@ export async function updateDependency(path, dependencyId, updates) {
|
|
|
53
105
|
return manifest;
|
|
54
106
|
}
|
|
55
107
|
/**
|
|
56
|
-
*
|
|
108
|
+
* Appends a new dependency entry to the on-disk manifest.
|
|
109
|
+
*
|
|
110
|
+
* @param path - Path to the manifest file.
|
|
111
|
+
* @param dependency - The new `DependencyEntry` to add.
|
|
112
|
+
* @returns The updated manifest.
|
|
113
|
+
*
|
|
114
|
+
* @throws {Error} If a dependency with the same `id` or `url` already exists.
|
|
115
|
+
*
|
|
116
|
+
* @category Manifest
|
|
117
|
+
*
|
|
118
|
+
* @never
|
|
119
|
+
* - Duplicate URL detection is exact-match only. Trailing slashes or
|
|
120
|
+
* fragment identifiers will not be treated as duplicates.
|
|
121
|
+
* - Same race condition as {@link updateDependency} applies.
|
|
57
122
|
*/
|
|
58
123
|
export async function addDependency(path, dependency) {
|
|
59
124
|
const manifest = await readManifest(path);
|
|
@@ -75,7 +140,15 @@ export async function addDependency(path, dependency) {
|
|
|
75
140
|
return manifest;
|
|
76
141
|
}
|
|
77
142
|
/**
|
|
78
|
-
*
|
|
143
|
+
* Removes a dependency from the on-disk manifest by ID.
|
|
144
|
+
*
|
|
145
|
+
* @param path - Path to the manifest file.
|
|
146
|
+
* @param dependencyId - UUID of the dependency to remove.
|
|
147
|
+
* @returns The updated manifest.
|
|
148
|
+
*
|
|
149
|
+
* @throws {Error} If no dependency with `dependencyId` is found.
|
|
150
|
+
*
|
|
151
|
+
* @category Manifest
|
|
79
152
|
*/
|
|
80
153
|
export async function removeDependency(path, dependencyId) {
|
|
81
154
|
const manifest = await readManifest(path);
|
|
@@ -92,8 +165,41 @@ export async function removeDependency(path, dependencyId) {
|
|
|
92
165
|
return manifest;
|
|
93
166
|
}
|
|
94
167
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
168
|
+
* Merges an `updated` manifest generated by the detector over an `existing`
|
|
169
|
+
* one, optionally preserving manual entries and accumulated change history.
|
|
170
|
+
*
|
|
171
|
+
* @remarks
|
|
172
|
+
* The merge strategy is:
|
|
173
|
+
* - All entries from `updated` are taken as the new ground truth.
|
|
174
|
+
* - If `preserveManual` is `true` (default), manual entries in `existing`
|
|
175
|
+
* that are absent from `updated` are appended as-is.
|
|
176
|
+
* - If `preserveHistory` is `true` (default), any `changeHistory` from
|
|
177
|
+
* `existing` is prepended to the corresponding entry in `updated`.
|
|
178
|
+
*
|
|
179
|
+
* Statistics are recalculated from the merged dependency list.
|
|
180
|
+
*
|
|
181
|
+
* @param existing - The current on-disk manifest.
|
|
182
|
+
* @param updated - The freshly-detected manifest to merge.
|
|
183
|
+
* @param options - Merge strategy options.
|
|
184
|
+
* @returns A new manifest object (does not mutate either input).
|
|
185
|
+
*
|
|
186
|
+
* @category Manifest
|
|
187
|
+
*
|
|
188
|
+
* @useWhen
|
|
189
|
+
* Applying the output of {@link Detector} to an existing manifest without
|
|
190
|
+
* losing manually-curated entries or historical change records.
|
|
191
|
+
*
|
|
192
|
+
* @avoidWhen
|
|
193
|
+
* You want to completely replace the existing manifest — just write
|
|
194
|
+
* `updated` directly via {@link writeManifest}.
|
|
195
|
+
*
|
|
196
|
+
* @never
|
|
197
|
+
* - Matching between `existing` and `updated` uses `id` **or** `url`.
|
|
198
|
+
* If the URL of a dependency changes (e.g. a redirect is resolved), the
|
|
199
|
+
* entry will be treated as new and history will not be preserved.
|
|
200
|
+
* - `preserveManual: true` can re-add entries that were intentionally
|
|
201
|
+
* removed from the repository. Set it to `false` when performing a
|
|
202
|
+
* deliberate full refresh.
|
|
97
203
|
*/
|
|
98
204
|
export function mergeManifests(existing, updated, options = {}) {
|
|
99
205
|
const { preserveManual = true, preserveHistory = true } = options;
|
|
@@ -171,7 +277,24 @@ function calculateStatistics(dependencies) {
|
|
|
171
277
|
};
|
|
172
278
|
}
|
|
173
279
|
/**
|
|
174
|
-
*
|
|
280
|
+
* Creates a minimal, valid manifest with an empty `dependencies` array.
|
|
281
|
+
*
|
|
282
|
+
* @remarks
|
|
283
|
+
* Use this as the starting point when generating a manifest from scratch
|
|
284
|
+
* (e.g. on first run in a new repository).
|
|
285
|
+
*
|
|
286
|
+
* @returns A new `DependencyManifest` with zeroed statistics.
|
|
287
|
+
*
|
|
288
|
+
* @category Manifest
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* ```ts
|
|
292
|
+
* const manifest = createEmptyManifest({
|
|
293
|
+
* owner: 'my-org', name: 'my-repo',
|
|
294
|
+
* branch: 'main', commit: 'abc123',
|
|
295
|
+
* });
|
|
296
|
+
* await writeManifest('.dependabit/manifest.json', manifest);
|
|
297
|
+
* ```
|
|
175
298
|
*/
|
|
176
299
|
export function createEmptyManifest(options) {
|
|
177
300
|
return {
|
package/dist/manifest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAiD,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEjG
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAiD,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEjG;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM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