@socketsecurity/cli-with-sentry 1.17.0 → 1.18.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 (42) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +5 -5
  3. package/dist/.config/tsconfig.dts.tsbuildinfo +1 -1
  4. package/dist/cli.js +426 -257
  5. package/dist/cli.js.map +1 -1
  6. package/dist/constants.js +4 -4
  7. package/dist/constants.js.map +1 -1
  8. package/dist/types/commands/fix/generated-socket-facts.d.mts +3 -2
  9. package/dist/types/commands/manifest/build-root-config.d.mts +18 -1
  10. package/dist/types/commands/manifest/generate-recursive-manifests.d.mts +3 -1
  11. package/dist/types/commands/manifest/run-manifest-facts.d.mts +4 -0
  12. package/dist/types/commands/manifest/scripts/build-tool.d.mts +0 -4
  13. package/dist/types/commands/manifest/setup-manifest-config.d.mts +9 -1
  14. package/dist/types/constants.d.mts +1 -1
  15. package/dist/types/utils/coana.d.mts +0 -2
  16. package/dist/types/utils/socket-json.d.mts +38 -0
  17. package/dist/utils.js +201 -29
  18. package/dist/utils.js.map +1 -1
  19. package/package.json +1 -3
  20. package/dist/manifest-scripts/dotnet-tool/Microsoft.Build.Locator.dll +0 -0
  21. package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.deps.json +0 -42
  22. package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.dll +0 -0
  23. package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.dll.config +0 -623
  24. package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.runtimeconfig.json +0 -15
  25. package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
  26. package/dist/manifest-scripts/socket-facts.init.gradle +0 -832
  27. package/dist/manifest-scripts/socket-facts.plugin.scala +0 -1018
  28. package/dist/manifest-scripts/socket-workspaces.init.gradle +0 -123
  29. package/dist/manifest-scripts/socket-workspaces.plugin.scala +0 -147
  30. package/dist/types/commands/manifest/scripts/assemble.d.mts +0 -14
  31. package/dist/types/commands/manifest/scripts/exclude-paths-glob.d.mts +0 -8
  32. package/dist/types/commands/manifest/scripts/facts.d.mts +0 -111
  33. package/dist/types/commands/manifest/scripts/records.d.mts +0 -124
  34. package/dist/types/commands/manifest/scripts/resolution-report-gradle.d.mts +0 -10
  35. package/dist/types/commands/manifest/scripts/resolution-report-ivy.d.mts +0 -6
  36. package/dist/types/commands/manifest/scripts/resolution-report-maven.d.mts +0 -7
  37. package/dist/types/commands/manifest/scripts/resolution-report-nuget.d.mts +0 -6
  38. package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts +0 -63
  39. package/dist/types/commands/manifest/scripts/resolution-report.d.mts +0 -28
  40. package/dist/types/commands/manifest/scripts/run.d.mts +0 -67
  41. package/dist/types/commands/manifest/scripts/sidecar.d.mts +0 -60
  42. package/dist/types/commands/manifest/scripts/test/assemble-records.d.mts +0 -1
@@ -1,67 +0,0 @@
1
- import type { BuildTool } from './build-tool.mts';
2
- import type { ResolvedArtifactPaths, SocketFactsSbom, SocketFactsSbomProject } from './facts.mts';
3
- import type { ResolutionReport } from './resolution-report.mts';
4
- export type ManifestScriptOptions = {
5
- projectDir: string;
6
- // Unset ⇒ resolved to the project wrapper, else PATH (resolveBuildToolBin).
7
- bin?: string | undefined;
8
- // The file in projectDir to build: Maven's POM (unset leaves Maven's
9
- // default), dotnet's solution or project (required).
10
- entryFile?: string | undefined;
11
- // Reachability-only: also materialize resolved artifact paths (artifactPaths).
12
- withFiles?: boolean | undefined;
13
- // sbt only: caller-supplied directory to use as sbt's isolated global base.
14
- // sbt provisions the project's Scala toolchain (compiler/library/reflect)
15
- // under `<global base>/boot`, which withFiles' artifactPaths point into, so
16
- // the directory must outlive this call; the caller owns creating it and
17
- // deleting it once those paths are no longer needed. Unset ⇒ an ephemeral
18
- // dir is created and cleaned up before this call returns (the withFiles-less
19
- // default, and the case for a standalone `socket manifest sbt --facts`).
20
- tmpDir?: string | undefined;
21
- // Newline-delimited GAV file scoping withFiles materialization; absent ⇒ all.
22
- populateFilesFor?: string | undefined;
23
- includeConfigs?: string | undefined;
24
- excludeConfigs?: string | undefined;
25
- // `--exclude-paths`, relative to excludeBase. Passed to the build script, which
26
- // skips resolving a wholly excluded subproject. Source-file-level exclusion is
27
- // left to the reachability analysis (coana's --exclude-dirs), not applied here.
28
- excludePaths?: string[] | undefined;
29
- // The scan root, which a build's modules can lie outside of (Maven `../x`
30
- // modules); projectDir when unset.
31
- excludeBase?: string | undefined;
32
- toolOpts?: string[] | undefined;
33
- stdio?: 'inherit' | 'pipe' | undefined;
34
- env?: NodeJS.ProcessEnv | undefined;
35
- signal?: AbortSignal | undefined;
36
- };
37
- export type ManifestRunResult = {
38
- code: number;
39
- facts: SocketFactsSbom;
40
- // Undefined when the build did not report it.
41
- buildRoot: string | undefined;
42
- // Undefined when a file-addressed build did not report its entry file.
43
- factsFileName: string | undefined;
44
- report: ResolutionReport;
45
- artifactPaths: ResolvedArtifactPaths;
46
- // Captured build-tool output (empty when stdio is 'inherit', which streams it
47
- // to stderr).
48
- stderr: string;
49
- stdout: string;
50
- };
51
- export type WorkspaceEnumerationResult = {
52
- // Absolute; what each project's subprojectDir and manifestFiles are relative to.
53
- buildRoot: string | undefined;
54
- code: number;
55
- projects: SocketFactsSbomProject[];
56
- stderr: string;
57
- stdout: string;
58
- };
59
- // Runs the build-tool script (which emits a records file) and assembles it.
60
- // Writes no files; the caller persists facts or consumes artifactPaths.
61
- export declare function runManifestScript(tool: BuildTool, opts: ManifestScriptOptions): Promise<ManifestRunResult>;
62
- // Emits only `project` records, never resolving dependencies, for discovery
63
- // before committing to a full `runManifestScript` resolution cost.
64
- export declare function enumerateWorkspaces(tool: BuildTool, opts: ManifestScriptOptions): Promise<WorkspaceEnumerationResult>;
65
- // Undefined when the SDK cannot read the entry (a .slnx before SDK 9.0.200);
66
- // empty when the listing fails, which the build itself then reports.
67
- export declare function listDotnetEntryProjects(opts: ManifestScriptOptions): Promise<string[] | undefined>;
@@ -1,60 +0,0 @@
1
- import type { ComponentFramework, ProjectFramework, ResolvedArtifactPaths, SocketFactsSbom, SocketFactsSbomComponent, SocketFactsSbomProject } from './facts.mts';
2
- export type SidecarComponentEntry = SocketFactsSbomComponent & {
3
- // Classpath entries (jars, or a sibling project's own build output dirs
4
- // when this component is that project). `[]` means resolved and found
5
- // nothing (e.g. a pom/BOM); undefined means paths were not resolved.
6
- targets?: string[] | undefined;
7
- // First-party source roots; `[]` for a genuinely external dependency (still
8
- // attempted, nothing to find), not undefined.
9
- sources?: string[] | undefined;
10
- // dotnet: `targets` per target framework, which differ by framework.
11
- frameworks?: ComponentFramework[] | undefined;
12
- };
13
- export type SidecarProjectEntry = Omit<SocketFactsSbomProject, 'children'> & {
14
- targets?: string[] | undefined;
15
- sources?: string[] | undefined;
16
- // Ids of this facts file's components[] the project depends on directly.
17
- dependencies: string[];
18
- // Ids of this facts file's components[] forming the project's full
19
- // transitive classpath across all its configurations.
20
- classpath: string[];
21
- // dotnet: each build of the project, by target framework.
22
- frameworks?: ProjectFramework[] | undefined;
23
- };
24
- // Frozen contract with `coana run --compute-artifacts-sidecar`; change only
25
- // in sync with the coana consumer. Keyed by the absolute path of the
26
- // `*.socket.facts.json` file whose own projects[]/components[] these entries
27
- // describe - the key IS the scope, so two independent reactors that happen to
28
- // emit the same purl identity (e.g. a shared internal module name) can never
29
- // collide: each is only ever looked up within its own key. No cross-reactor
30
- // deduplication - the same external dependency resolved by several
31
- // independent reactors is intentionally duplicated across all of their
32
- // components[].
33
- export type ResolvedPathsSidecar = Record<string, {
34
- // This facts file's own first-party modules.
35
- projects: SidecarProjectEntry[];
36
- // This reactor's dependency-position entries: genuinely external
37
- // artifacts, and dependency edges that resolve to a sibling first-party
38
- // project (reported via that project's own source/target roots instead
39
- // of a jar path).
40
- components: SidecarComponentEntry[];
41
- }>;
42
- export type SidecarAccumulator = Map<string, {
43
- projects: SidecarProjectEntry[];
44
- components: SidecarComponentEntry[];
45
- }>;
46
- // Emit an entry for every SBOM component AND every first-party project: a
47
- // top-level module is a project, not a dependency component, yet its source
48
- // roots are where reachability starts, so the sidecar must carry them.
49
- // A run writing a facts file another run wrote replaces its entry.
50
- export declare function accumulateSidecar(acc: SidecarAccumulator, facts: SocketFactsSbom, artifactPaths: ResolvedArtifactPaths, factsFile: string,
51
- // Off when artifact paths were not resolved; entries then omit `targets` and `sources`.
52
- withPaths?: boolean): void;
53
- export declare function hasResolvedPathsSidecarEntries(sidecar: ResolvedPathsSidecar): boolean;
54
- export declare function hasSidecarEntries(acc: SidecarAccumulator): boolean;
55
- // Combines two already-serialized sidecars (e.g. the recursive-discovery path
56
- // and the plain conda/bazel auto-manifest path). Keys are already scoped to
57
- // one facts file each and can't collide between the two inputs in practice,
58
- // so this is a plain merge; the later input wins on a genuine key collision.
59
- export declare function mergeResolvedPathsSidecars(a: ResolvedPathsSidecar, b: ResolvedPathsSidecar): ResolvedPathsSidecar;
60
- export declare function serializeSidecar(acc: SidecarAccumulator): ResolvedPathsSidecar;