@trustify-da/trustify-da-javascript-client 0.3.0-ea.7ed8d8c → 0.3.0-ea.7ee4047

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 (98) hide show
  1. package/README.md +388 -20
  2. package/dist/package.json +39 -26
  3. package/dist/src/analysis.d.ts +58 -20
  4. package/dist/src/analysis.js +134 -78
  5. package/dist/src/batch_opts.d.ts +24 -0
  6. package/dist/src/batch_opts.js +35 -0
  7. package/dist/src/cli.js +427 -12
  8. package/dist/src/config.d.ts +120 -0
  9. package/dist/src/config.js +260 -0
  10. package/dist/src/cyclone_dx_sbom.d.ts +30 -2
  11. package/dist/src/cyclone_dx_sbom.js +95 -9
  12. package/dist/src/index.d.ts +154 -16
  13. package/dist/src/index.js +372 -36
  14. package/dist/src/license/index.d.ts +28 -0
  15. package/dist/src/license/index.js +106 -0
  16. package/dist/src/license/license_utils.d.ts +40 -0
  17. package/dist/src/license/license_utils.js +137 -0
  18. package/dist/src/license/licenses_api.d.ts +34 -0
  19. package/dist/src/license/licenses_api.js +98 -0
  20. package/dist/src/license/project_license.d.ts +20 -0
  21. package/dist/src/license/project_license.js +62 -0
  22. package/dist/src/oci_image/images.d.ts +1 -1
  23. package/dist/src/oci_image/images.js +15 -1
  24. package/dist/src/oci_image/utils.d.ts +5 -5
  25. package/dist/src/oci_image/utils.js +11 -2
  26. package/dist/src/package_version.d.ts +8 -0
  27. package/dist/src/package_version.js +31 -0
  28. package/dist/src/provider.d.ts +16 -3
  29. package/dist/src/provider.js +33 -5
  30. package/dist/src/providers/base_java.d.ts +67 -12
  31. package/dist/src/providers/base_java.js +82 -61
  32. package/dist/src/providers/base_javascript.d.ts +99 -12
  33. package/dist/src/providers/base_javascript.js +244 -28
  34. package/dist/src/providers/base_pyproject.d.ts +158 -0
  35. package/dist/src/providers/base_pyproject.js +322 -0
  36. package/dist/src/providers/containerfile_parser.d.ts +5 -0
  37. package/dist/src/providers/containerfile_parser.js +20 -0
  38. package/dist/src/providers/golang_gomodules.d.ts +30 -13
  39. package/dist/src/providers/golang_gomodules.js +219 -122
  40. package/dist/src/providers/gomod_parser.d.ts +4 -0
  41. package/dist/src/providers/gomod_parser.js +16 -0
  42. package/dist/src/providers/java_gradle.d.ts +73 -0
  43. package/dist/src/providers/java_gradle.js +331 -23
  44. package/dist/src/providers/java_gradle_groovy.d.ts +1 -1
  45. package/dist/src/providers/java_gradle_kotlin.d.ts +1 -1
  46. package/dist/src/providers/java_maven.d.ts +44 -9
  47. package/dist/src/providers/java_maven.js +299 -13
  48. package/dist/src/providers/javascript_bun.d.ts +22 -0
  49. package/dist/src/providers/javascript_bun.js +141 -0
  50. package/dist/src/providers/javascript_npm.d.ts +19 -0
  51. package/dist/src/providers/javascript_npm.js +61 -1
  52. package/dist/src/providers/javascript_pnpm.d.ts +14 -1
  53. package/dist/src/providers/javascript_pnpm.js +55 -5
  54. package/dist/src/providers/javascript_yarn.d.ts +12 -0
  55. package/dist/src/providers/javascript_yarn.js +75 -2
  56. package/dist/src/providers/manifest.d.ts +2 -0
  57. package/dist/src/providers/manifest.js +28 -7
  58. package/dist/src/providers/marker_evaluator.d.ts +14 -0
  59. package/dist/src/providers/marker_evaluator.js +191 -0
  60. package/dist/src/providers/oci_dockerfile.d.ts +51 -0
  61. package/dist/src/providers/oci_dockerfile.js +177 -0
  62. package/dist/src/providers/processors/yarn_berry_processor.d.ts +6 -2
  63. package/dist/src/providers/processors/yarn_berry_processor.js +91 -7
  64. package/dist/src/providers/processors/yarn_classic_processor.d.ts +6 -2
  65. package/dist/src/providers/processors/yarn_classic_processor.js +8 -6
  66. package/dist/src/providers/python_controller.d.ts +5 -1
  67. package/dist/src/providers/python_controller.js +69 -8
  68. package/dist/src/providers/python_pip.d.ts +12 -0
  69. package/dist/src/providers/python_pip.js +18 -8
  70. package/dist/src/providers/python_pip_pyproject.d.ts +61 -0
  71. package/dist/src/providers/python_pip_pyproject.js +146 -0
  72. package/dist/src/providers/python_poetry.d.ts +98 -0
  73. package/dist/src/providers/python_poetry.js +286 -0
  74. package/dist/src/providers/python_uv.d.ts +46 -0
  75. package/dist/src/providers/python_uv.js +275 -0
  76. package/dist/src/providers/requirements_parser.js +6 -9
  77. package/dist/src/providers/rust_cargo.d.ts +56 -0
  78. package/dist/src/providers/rust_cargo.js +682 -0
  79. package/dist/src/providers/tree-sitter-containerfile.wasm +0 -0
  80. package/dist/src/providers/tree-sitter-gomod.wasm +0 -0
  81. package/dist/src/providers/tree-sitter-requirements.wasm +0 -0
  82. package/dist/src/remediate.d.ts +107 -0
  83. package/dist/src/remediate.js +244 -0
  84. package/dist/src/remediation.d.ts +81 -0
  85. package/dist/src/remediation.js +475 -0
  86. package/dist/src/remediation_report.d.ts +23 -0
  87. package/dist/src/remediation_report.js +180 -0
  88. package/dist/src/sbom.d.ts +28 -2
  89. package/dist/src/sbom.js +26 -4
  90. package/dist/src/tools.d.ts +53 -11
  91. package/dist/src/tools.js +147 -13
  92. package/dist/src/updaters/maven_updater.d.ts +58 -0
  93. package/dist/src/updaters/maven_updater.js +345 -0
  94. package/dist/src/updaters/toml_updater.d.ts +62 -0
  95. package/dist/src/updaters/toml_updater.js +276 -0
  96. package/dist/src/workspace.d.ts +71 -0
  97. package/dist/src/workspace.js +257 -0
  98. package/package.json +40 -27
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Resolve ignore globs for workspace discovery. Unlike scalar options, ignore patterns are additive:
3
+ * defaults + `opts.TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE`/environment + `opts.workspaceDiscoveryIgnore`.
4
+ * Patterns are fast-glob / micromatch style, relative to the workspace root (forward slashes).
5
+ *
6
+ * @param {{ workspaceDiscoveryIgnore?: string[], TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE?: string, [key: string]: unknown }} [opts={}]
7
+ * @returns {string[]}
8
+ */
9
+ export function resolveWorkspaceDiscoveryIgnore(opts?: {
10
+ workspaceDiscoveryIgnore?: string[];
11
+ TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE?: string;
12
+ [key: string]: unknown;
13
+ }): string[];
14
+ /**
15
+ * Drop manifest paths whose location matches an ignore pattern (e.g. root unshift, Cargo paths).
16
+ *
17
+ * @param {string[]} manifestPaths
18
+ * @param {string} root
19
+ * @param {string[]} ignorePatterns
20
+ * @returns {string[]}
21
+ */
22
+ export function filterManifestPathsByDiscoveryIgnore(manifestPaths: string[], root: string, ignorePatterns: string[]): string[];
23
+ /**
24
+ * @typedef {{ valid: true, name: string, version: string } | { valid: false, error: string }} ValidatePackageJsonResult
25
+ */
26
+ /**
27
+ * Validate a package.json has non-empty `name` and `version` (required for stable SBOM root identity in batch).
28
+ *
29
+ * @param {string} packageJsonPath - Absolute or relative path to package.json
30
+ * @returns {ValidatePackageJsonResult}
31
+ */
32
+ export function validatePackageJson(packageJsonPath: string): ValidatePackageJsonResult;
33
+ /**
34
+ * Discover all package.json paths in a JS/TS workspace.
35
+ * Reads pnpm-workspace.yaml or package.json workspaces.
36
+ *
37
+ * @param {string} workspaceRoot - Absolute or relative path to workspace root
38
+ * @param {{ workspaceDiscoveryIgnore?: string[], TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE?: string, [key: string]: unknown }} [opts={}] - optional `workspaceDiscoveryIgnore` globs (merged with defaults and env)
39
+ * @returns {Promise<string[]>} Paths to package.json files (absolute)
40
+ */
41
+ export function discoverWorkspacePackages(workspaceRoot: string, opts?: {
42
+ workspaceDiscoveryIgnore?: string[];
43
+ TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE?: string;
44
+ [key: string]: unknown;
45
+ }): Promise<string[]>;
46
+ /**
47
+ * Convert workspace glob patterns to manifest-file glob patterns,
48
+ * correctly handling negation prefixes.
49
+ *
50
+ * @param {string[]} patterns - Workspace glob patterns (may include negations)
51
+ * @param {string} manifestFileName - e.g. 'package.json' or 'Cargo.toml'
52
+ * @returns {string[]}
53
+ */
54
+ export function toManifestGlobPatterns(patterns: string[], manifestFileName: string): string[];
55
+ /**
56
+ * Discover all Cargo.toml manifest paths in a Cargo workspace.
57
+ * Uses `cargo metadata` to get workspace members.
58
+ *
59
+ * @param {string} workspaceRoot - Absolute or relative path to workspace root (must contain Cargo.toml and Cargo.lock)
60
+ * @param {import('./index.js').Options} [opts={}]
61
+ * @returns {Promise<string[]>} Paths to Cargo.toml files (absolute)
62
+ */
63
+ export function discoverWorkspaceCrates(workspaceRoot: string, opts?: import("./index.js").Options): Promise<string[]>;
64
+ export type ValidatePackageJsonResult = {
65
+ valid: true;
66
+ name: string;
67
+ version: string;
68
+ } | {
69
+ valid: false;
70
+ error: string;
71
+ };
@@ -0,0 +1,257 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import fg from 'fast-glob';
4
+ import { load as yamlLoad } from 'js-yaml';
5
+ import micromatch from 'micromatch';
6
+ import { getCustom, getCustomPath, invokeCommand } from './tools.js';
7
+ /** Default paths skipped during JS workspace discovery (merged with user patterns). */
8
+ const DEFAULT_WORKSPACE_DISCOVERY_IGNORE = [
9
+ '**/node_modules/**',
10
+ '**/.git/**',
11
+ ];
12
+ /**
13
+ * Resolve ignore globs for workspace discovery. Unlike scalar options, ignore patterns are additive:
14
+ * defaults + `opts.TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE`/environment + `opts.workspaceDiscoveryIgnore`.
15
+ * Patterns are fast-glob / micromatch style, relative to the workspace root (forward slashes).
16
+ *
17
+ * @param {{ workspaceDiscoveryIgnore?: string[], TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE?: string, [key: string]: unknown }} [opts={}]
18
+ * @returns {string[]}
19
+ */
20
+ export function resolveWorkspaceDiscoveryIgnore(opts = {}) {
21
+ const merged = [...DEFAULT_WORKSPACE_DISCOVERY_IGNORE];
22
+ const fromEnv = getCustom('TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE', null, opts);
23
+ if (fromEnv && String(fromEnv).trim()) {
24
+ merged.push(...String(fromEnv).split(',').map(s => s.trim()).filter(Boolean));
25
+ }
26
+ const extra = opts.workspaceDiscoveryIgnore;
27
+ if (Array.isArray(extra)) {
28
+ for (const p of extra) {
29
+ if (typeof p === 'string' && p.trim()) {
30
+ merged.push(p.trim());
31
+ }
32
+ }
33
+ }
34
+ return [...new Set(merged)];
35
+ }
36
+ /**
37
+ * @param {string} root - Workspace root (absolute)
38
+ * @param {string[]} ignorePatterns
39
+ */
40
+ function buildWorkspaceDiscoveryGlobOptions(root, ignorePatterns) {
41
+ return {
42
+ cwd: root,
43
+ absolute: true,
44
+ onlyFiles: true,
45
+ ignore: ignorePatterns,
46
+ followSymbolicLinks: false,
47
+ };
48
+ }
49
+ /**
50
+ * @param {string} filePath - Absolute path
51
+ * @param {string} root - Workspace root (absolute)
52
+ * @returns {string} Relative path with forward slashes
53
+ */
54
+ function relativePathForGlobMatch(filePath, root) {
55
+ const rel = path.relative(root, filePath);
56
+ return rel.split(path.sep).join('/');
57
+ }
58
+ /**
59
+ * Drop manifest paths whose location matches an ignore pattern (e.g. root unshift, Cargo paths).
60
+ *
61
+ * @param {string[]} manifestPaths
62
+ * @param {string} root
63
+ * @param {string[]} ignorePatterns
64
+ * @returns {string[]}
65
+ */
66
+ export function filterManifestPathsByDiscoveryIgnore(manifestPaths, root, ignorePatterns) {
67
+ if (!ignorePatterns.length) {
68
+ return manifestPaths;
69
+ }
70
+ const resolvedRoot = path.resolve(root);
71
+ return manifestPaths.filter(absPath => {
72
+ const rel = relativePathForGlobMatch(absPath, resolvedRoot);
73
+ if (rel === '') {
74
+ return true;
75
+ }
76
+ return !ignorePatterns.some(pattern => micromatch.isMatch(rel, pattern, { dot: true }));
77
+ });
78
+ }
79
+ /**
80
+ * @typedef {{ valid: true, name: string, version: string } | { valid: false, error: string }} ValidatePackageJsonResult
81
+ */
82
+ /**
83
+ * Validate a package.json has non-empty `name` and `version` (required for stable SBOM root identity in batch).
84
+ *
85
+ * @param {string} packageJsonPath - Absolute or relative path to package.json
86
+ * @returns {ValidatePackageJsonResult}
87
+ */
88
+ export function validatePackageJson(packageJsonPath) {
89
+ let content;
90
+ try {
91
+ const raw = fs.readFileSync(packageJsonPath, 'utf-8');
92
+ content = JSON.parse(raw);
93
+ }
94
+ catch (err) {
95
+ const msg = err instanceof Error ? err.message : String(err);
96
+ return { valid: false, error: `Invalid package.json: ${msg}` };
97
+ }
98
+ if (!content || typeof content !== 'object') {
99
+ return { valid: false, error: 'package.json must be a JSON object' };
100
+ }
101
+ const name = content.name;
102
+ const version = content.version;
103
+ if (typeof name !== 'string' || !name.trim()) {
104
+ return { valid: false, error: 'Missing or invalid name' };
105
+ }
106
+ if (typeof version !== 'string' || !version.trim()) {
107
+ return { valid: false, error: 'Missing or invalid version' };
108
+ }
109
+ return { valid: true, name: name.trim(), version: version.trim() };
110
+ }
111
+ /**
112
+ * Discover all package.json paths in a JS/TS workspace.
113
+ * Reads pnpm-workspace.yaml or package.json workspaces.
114
+ *
115
+ * @param {string} workspaceRoot - Absolute or relative path to workspace root
116
+ * @param {{ workspaceDiscoveryIgnore?: string[], TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE?: string, [key: string]: unknown }} [opts={}] - optional `workspaceDiscoveryIgnore` globs (merged with defaults and env)
117
+ * @returns {Promise<string[]>} Paths to package.json files (absolute)
118
+ */
119
+ export async function discoverWorkspacePackages(workspaceRoot, opts = {}) {
120
+ const root = path.resolve(workspaceRoot);
121
+ const ignorePatterns = resolveWorkspaceDiscoveryIgnore(opts);
122
+ const globOpts = buildWorkspaceDiscoveryGlobOptions(root, ignorePatterns);
123
+ const pnpmWorkspace = path.join(root, 'pnpm-workspace.yaml');
124
+ const packageJson = path.join(root, 'package.json');
125
+ if (fs.existsSync(pnpmWorkspace)) {
126
+ return discoverFromPnpmWorkspace(root, pnpmWorkspace, globOpts, ignorePatterns);
127
+ }
128
+ if (fs.existsSync(packageJson)) {
129
+ return discoverFromPackageJsonWorkspaces(root, packageJson, globOpts, ignorePatterns);
130
+ }
131
+ return [];
132
+ }
133
+ /**
134
+ * @param {string} root
135
+ * @param {string} pnpmWorkspacePath
136
+ * @param {object} globOpts - fast-glob options (cwd, ignore, followSymbolicLinks, …)
137
+ * @param {string[]} ignorePatterns - for post-filter
138
+ * @returns {Promise<string[]>}
139
+ */
140
+ async function discoverFromPnpmWorkspace(root, pnpmWorkspacePath, globOpts, ignorePatterns) {
141
+ const content = fs.readFileSync(pnpmWorkspacePath, 'utf-8');
142
+ const packages = parsePnpmPackages(content);
143
+ if (packages.length === 0) {
144
+ return [];
145
+ }
146
+ const patterns = toManifestGlobPatterns(packages, 'package.json');
147
+ const manifestPaths = await fg(patterns, globOpts);
148
+ return filterManifestPathsByDiscoveryIgnore(manifestPaths, root, ignorePatterns);
149
+ }
150
+ /**
151
+ * Parse the `packages` array from pnpm-workspace.yaml content.
152
+ * @param {string} content - Raw YAML content
153
+ * @returns {string[]}
154
+ */
155
+ function parsePnpmPackages(content) {
156
+ let doc;
157
+ try {
158
+ doc = yamlLoad(content);
159
+ }
160
+ catch {
161
+ return [];
162
+ }
163
+ if (!doc || typeof doc !== 'object' || !Array.isArray(doc.packages)) {
164
+ return [];
165
+ }
166
+ return doc.packages.filter(p => typeof p === 'string' && p.trim()).map(p => p.trim());
167
+ }
168
+ /**
169
+ * Convert workspace glob patterns to manifest-file glob patterns,
170
+ * correctly handling negation prefixes.
171
+ *
172
+ * @param {string[]} patterns - Workspace glob patterns (may include negations)
173
+ * @param {string} manifestFileName - e.g. 'package.json' or 'Cargo.toml'
174
+ * @returns {string[]}
175
+ */
176
+ export function toManifestGlobPatterns(patterns, manifestFileName) {
177
+ return patterns.map(p => {
178
+ if (p.startsWith('!')) {
179
+ return `!${p.slice(1)}/${manifestFileName}`;
180
+ }
181
+ return `${p}/${manifestFileName}`;
182
+ });
183
+ }
184
+ /**
185
+ * @param {string} root
186
+ * @param {string} packageJsonPath
187
+ * @param {object} globOpts
188
+ * @param {string[]} ignorePatterns
189
+ * @returns {Promise<string[]>}
190
+ */
191
+ async function discoverFromPackageJsonWorkspaces(root, packageJsonPath, globOpts, ignorePatterns) {
192
+ let pkg;
193
+ try {
194
+ pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
195
+ }
196
+ catch {
197
+ return [];
198
+ }
199
+ const workspaces = pkg.workspaces;
200
+ if (!workspaces) {
201
+ return [];
202
+ }
203
+ const raw = Array.isArray(workspaces) ? workspaces : workspaces.packages || [];
204
+ const patterns = toManifestGlobPatterns(raw.filter(p => typeof p === 'string'), 'package.json');
205
+ if (patterns.length === 0) {
206
+ return [];
207
+ }
208
+ const manifestPaths = await fg(patterns, globOpts);
209
+ const rootPkg = path.join(root, 'package.json');
210
+ if (fs.existsSync(rootPkg) && !manifestPaths.includes(rootPkg)) {
211
+ manifestPaths.unshift(rootPkg);
212
+ }
213
+ return filterManifestPathsByDiscoveryIgnore(manifestPaths, root, ignorePatterns);
214
+ }
215
+ /**
216
+ * Discover all Cargo.toml manifest paths in a Cargo workspace.
217
+ * Uses `cargo metadata` to get workspace members.
218
+ *
219
+ * @param {string} workspaceRoot - Absolute or relative path to workspace root (must contain Cargo.toml and Cargo.lock)
220
+ * @param {import('./index.js').Options} [opts={}]
221
+ * @returns {Promise<string[]>} Paths to Cargo.toml files (absolute)
222
+ */
223
+ export async function discoverWorkspaceCrates(workspaceRoot, opts = {}) {
224
+ const root = path.resolve(workspaceRoot);
225
+ const cargoToml = path.join(root, 'Cargo.toml');
226
+ const cargoLock = path.join(root, 'Cargo.lock');
227
+ if (!fs.existsSync(cargoToml) || !fs.existsSync(cargoLock)) {
228
+ return [];
229
+ }
230
+ const cargoBin = getCustomPath('cargo', opts);
231
+ let output;
232
+ try {
233
+ output = invokeCommand(cargoBin, ['metadata', '--format-version', '1', '--no-deps'], { cwd: root });
234
+ }
235
+ catch {
236
+ return [];
237
+ }
238
+ let metadata;
239
+ try {
240
+ metadata = JSON.parse(output.toString().trim());
241
+ }
242
+ catch {
243
+ return [];
244
+ }
245
+ const memberIds = new Set(metadata.workspace_members || []);
246
+ const manifestPaths = [];
247
+ for (const pkg of metadata.packages || []) {
248
+ if (memberIds.has(pkg.id) && pkg.manifest_path) {
249
+ const manifestPath = path.resolve(pkg.manifest_path);
250
+ if (fs.existsSync(manifestPath)) {
251
+ manifestPaths.push(manifestPath);
252
+ }
253
+ }
254
+ }
255
+ const ignorePatterns = resolveWorkspaceDiscoveryIgnore(opts);
256
+ return filterManifestPathsByDiscoveryIgnore(manifestPaths, root, ignorePatterns);
257
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustify-da/trustify-da-javascript-client",
3
- "version": "0.3.0-ea.7ed8d8c",
3
+ "version": "0.3.0-ea.7ee4047",
4
4
  "description": "Code-Ready Dependency Analytics JavaScript API.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/guacsec/trustify-da-javascript-client#README.md",
@@ -25,7 +25,9 @@
25
25
  "provenance": true
26
26
  },
27
27
  "type": "module",
28
- "bin": "dist/src/cli.js",
28
+ "bin": {
29
+ "trustify-da": "dist/src/cli.js"
30
+ },
29
31
  "main": "dist/src/index.js",
30
32
  "module": "dist/src/index.js",
31
33
  "types": "dist/src/index.d.ts",
@@ -35,47 +37,57 @@
35
37
  "config/**/*"
36
38
  ],
37
39
  "scripts": {
38
- "lint": "eslint src test --ext js",
39
- "lint:fix": "eslint src test --ext js --fix",
40
+ "lint": "eslint src test",
41
+ "lint:fix": "eslint src test --fix",
40
42
  "test": "c8 npm run tests",
41
- "tests": "mocha --config .mocharc.json --grep \".*analysis module.*\" --invert",
43
+ "tests": "mocha --config .mocharc.json",
42
44
  "tests:rep": "mocha --reporter-option maxDiffSize=0 --reporter json > unit-tests-result.json",
45
+ "pretest": "cp node_modules/tree-sitter-requirements/tree-sitter-requirements.wasm src/providers/tree-sitter-requirements.wasm && cp node_modules/tree-sitter-gomod/tree-sitter-gomod.wasm src/providers/tree-sitter-gomod.wasm && cp node_modules/tree-sitter-containerfile/tree-sitter-containerfile.wasm src/providers/tree-sitter-containerfile.wasm",
43
46
  "precompile": "rm -rf dist",
44
- "compile": "tsc -p tsconfig.json"
47
+ "compile": "tsc -p tsconfig.json",
48
+ "compile:dev": "tsc -p tsconfig.dev.json",
49
+ "postcompile": "cp node_modules/tree-sitter-requirements/tree-sitter-requirements.wasm dist/src/providers/tree-sitter-requirements.wasm && cp node_modules/tree-sitter-gomod/tree-sitter-gomod.wasm dist/src/providers/tree-sitter-gomod.wasm && cp node_modules/tree-sitter-containerfile/tree-sitter-containerfile.wasm dist/src/providers/tree-sitter-containerfile.wasm"
45
50
  },
46
51
  "dependencies": {
47
- "@babel/core": "^7.23.2",
48
- "@cyclonedx/cyclonedx-library": "^6.13.0",
52
+ "@yarnpkg/parsers": "^3.1.0",
49
53
  "eslint-import-resolver-typescript": "^4.4.4",
50
- "fast-toml": "^0.5.4",
54
+ "fast-glob": "^3.3.3",
51
55
  "fast-xml-parser": "^5.3.4",
52
56
  "help": "^3.0.2",
53
- "https-proxy-agent": "^7.0.6",
57
+ "https-proxy-agent": "^9.0.0",
58
+ "js-yaml": "^4.1.1",
59
+ "jsonc-parser": "^3.3.1",
60
+ "micromatch": "^4.0.8",
54
61
  "node-fetch": "^3.3.2",
62
+ "p-limit": "^7.3.0",
55
63
  "packageurl-js": "~1.0.2",
64
+ "smol-toml": "^1.6.0",
65
+ "tree-sitter-containerfile": "^0.8.1",
66
+ "tree-sitter-gomod": "github:strum355/tree-sitter-go-mod#56326f2ad478892ace58ff247a97d492a3cbcdda",
56
67
  "tree-sitter-requirements": "github:Strum355/tree-sitter-requirements#d0261ee76b84253997fe70d7d397e78c006c3801",
57
- "web-tree-sitter": "^0.26.6",
68
+ "web-tree-sitter": "^0.26.7",
58
69
  "yargs": "^18.0.0"
59
70
  },
60
71
  "devDependencies": {
61
- "@babel/core": "^7.23.2",
62
- "@trustify-da/trustify-da-api-model": "^2.0.1",
63
- "@types/node": "^20.17.30",
72
+ "@cyclonedx/cyclonedx-library": "^10.2.0",
73
+ "@eslint/js": "^10.0.0",
74
+ "@trustify-da/trustify-da-api-model": "^2.0.12",
75
+ "@types/node": "^25.9.1",
64
76
  "@types/which": "^3.0.4",
65
- "babel-plugin-rewire": "^1.2.0",
77
+ "ajv": "^8.20.0",
66
78
  "c8": "^11.0.0",
67
- "chai": "^4.3.7",
68
- "eslint": "^8.42.0",
79
+ "chai": "^6.2.2",
80
+ "eslint": "^10.4.1",
69
81
  "eslint-import-resolver-typescript": "^4.4.4",
70
- "eslint-plugin-editorconfig": "^4.0.3",
71
- "eslint-plugin-import": "^2.29.1",
82
+ "eslint-plugin-import-x": "^4.16.2",
72
83
  "esmock": "^2.6.2",
73
- "mocha": "^10.2.0",
84
+ "globals": "^17.6.0",
85
+ "mocha": "^11.7.6",
74
86
  "msw": "^2.12.7",
75
- "sinon": "^15.1.2",
76
- "sinon-chai": "^3.7.0",
77
- "typescript": "^5.1.3",
78
- "which": "^5.0.0"
87
+ "sinon": "^22.0.0",
88
+ "sinon-chai": "^4.0.1",
89
+ "typescript": "^6.0.3",
90
+ "which": "^7.0.0"
79
91
  },
80
92
  "mocha": {
81
93
  "check-leaks": false,
@@ -103,12 +115,13 @@
103
115
  "reporter": [
104
116
  "html",
105
117
  "json",
118
+ "lcov",
106
119
  "text"
107
120
  ]
108
121
  },
109
- "eslintIgnore": [
110
- "index.js"
111
- ],
122
+ "overrides": {
123
+ "tree-sitter": "0.22.4"
124
+ },
112
125
  "resolutions": {
113
126
  "@hapi/joi": "17.1.1"
114
127
  }