@socketsecurity/cli-with-sentry 0.14.57 → 0.14.59
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/bin/cli.js +2 -0
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +11 -6
- package/dist/constants.js.map +1 -1
- package/dist/instrument-with-sentry.js +2 -2
- package/dist/instrument-with-sentry.js.map +1 -1
- package/dist/module-sync/artifact.d.ts +75 -0
- package/dist/module-sync/cli.js +1063 -802
- package/dist/module-sync/cli.js.map +1 -1
- package/dist/module-sync/index.d.ts +4 -3
- package/dist/module-sync/shadow-bin.js +3 -1
- package/dist/module-sync/shadow-bin.js.map +1 -1
- package/dist/module-sync/shadow-npm-inject.js +1414 -1287
- package/dist/module-sync/shadow-npm-inject.js.map +1 -1
- package/dist/module-sync/shadow-npm-paths.js.map +1 -1
- package/dist/module-sync/socket-package-alert.d.ts +46 -0
- package/dist/module-sync/types.d.ts +11 -3
- package/dist/require/cli.js +1063 -802
- package/dist/require/cli.js.map +1 -1
- package/package.json +12 -10
- package/dist/module-sync/color-or-markdown.d.ts +0 -16
- package/dist/module-sync/socket-url.d.ts +0 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { CompactSocketArtifact } from "./artifact.js";
|
|
3
|
+
import { Spinner } from '@socketsecurity/registry/lib/spinner';
|
|
4
|
+
type SocketPackageAlert = {
|
|
5
|
+
key: string;
|
|
6
|
+
type: string;
|
|
7
|
+
block: boolean;
|
|
8
|
+
critical: boolean;
|
|
9
|
+
display: boolean;
|
|
10
|
+
fixable: boolean;
|
|
11
|
+
raw: any;
|
|
12
|
+
upgrade: boolean;
|
|
13
|
+
};
|
|
14
|
+
type AlertsByPkgId = Map<string, SocketPackageAlert[]>;
|
|
15
|
+
type AlertIncludeFilter = {
|
|
16
|
+
critical?: boolean | undefined;
|
|
17
|
+
cve?: boolean | undefined;
|
|
18
|
+
existing?: boolean | undefined;
|
|
19
|
+
unfixable?: boolean | undefined;
|
|
20
|
+
upgrade?: boolean | undefined;
|
|
21
|
+
};
|
|
22
|
+
type AddSocketArtifactAlertToAlertsMapOptions = {
|
|
23
|
+
consolidate?: boolean | undefined;
|
|
24
|
+
include?: AlertIncludeFilter | undefined;
|
|
25
|
+
overrides?: {
|
|
26
|
+
[key: string]: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
spinner?: Spinner | undefined;
|
|
29
|
+
};
|
|
30
|
+
declare function addArtifactToAlertsMap(artifact: CompactSocketArtifact, alertsByPkgId: AlertsByPkgId, options?: AddSocketArtifactAlertToAlertsMapOptions | undefined): Promise<void>;
|
|
31
|
+
type CveExcludeFilter = {
|
|
32
|
+
upgrade?: boolean | undefined;
|
|
33
|
+
};
|
|
34
|
+
type CveInfoByPkgId = Map<string, Array<{
|
|
35
|
+
firstPatchedVersionIdentifier: string;
|
|
36
|
+
vulnerableVersionRange: string;
|
|
37
|
+
}>>;
|
|
38
|
+
type GetCveInfoByPackageOptions = {
|
|
39
|
+
exclude?: CveExcludeFilter | undefined;
|
|
40
|
+
};
|
|
41
|
+
declare function getCveInfoByAlertsMap(alertsMap: AlertsByPkgId, options?: GetCveInfoByPackageOptions | undefined): CveInfoByPkgId | null;
|
|
42
|
+
type LogAlertsMapOptions = {
|
|
43
|
+
output?: NodeJS.WriteStream | undefined;
|
|
44
|
+
};
|
|
45
|
+
declare function logAlertsMap(alertsMap: AlertsByPkgId, options: LogAlertsMapOptions): void;
|
|
46
|
+
export { SocketPackageAlert, AlertsByPkgId, addArtifactToAlertsMap, getCveInfoByAlertsMap, logAlertsMap };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="npmcli__arborist" />
|
|
2
2
|
import { SafeNode } from "./node.js";
|
|
3
|
-
import { ReifyOptions } from '@npmcli/arborist';
|
|
3
|
+
import { BuildIdealTreeOptions, ReifyOptions } from '@npmcli/arborist';
|
|
4
4
|
import { Options as ArboristOptions } from "@npmcli/arborist";
|
|
5
5
|
import { Advisory as BaseAdvisory } from "@npmcli/arborist";
|
|
6
6
|
import { Arborist as BaseArborist } from "@npmcli/arborist";
|
|
@@ -9,11 +9,14 @@ import { Diff as BaseDiff } from "@npmcli/arborist";
|
|
|
9
9
|
type ArboristClass = ArboristInstance & {
|
|
10
10
|
new (...args: any): ArboristInstance;
|
|
11
11
|
};
|
|
12
|
-
type ArboristInstance = Omit<typeof BaseArborist, 'actualTree' | 'auditReport' | 'diff' | 'idealTree' | 'reify'> & {
|
|
12
|
+
type ArboristInstance = Omit<typeof BaseArborist, 'actualTree' | 'auditReport' | 'buildIdealTree' | 'diff' | 'idealTree' | 'loadActual' | 'loadVirtual' | 'reify'> & {
|
|
13
13
|
auditReport?: AuditReportInstance | null | undefined;
|
|
14
14
|
actualTree?: SafeNode | null | undefined;
|
|
15
15
|
diff: Diff | null;
|
|
16
16
|
idealTree?: SafeNode | null | undefined;
|
|
17
|
+
buildIdealTree(options?: BuildIdealTreeOptions): Promise<SafeNode>;
|
|
18
|
+
loadActual(options?: ArboristOptions): Promise<SafeNode>;
|
|
19
|
+
loadVirtual(options?: ArboristOptions): Promise<SafeNode>;
|
|
17
20
|
reify(options?: ArboristReifyOptions): Promise<SafeNode>;
|
|
18
21
|
};
|
|
19
22
|
type ArboristReifyOptions = ReifyOptions & ArboristOptions;
|
|
@@ -31,6 +34,11 @@ type AuditAdvisory = Omit<BaseAdvisory, 'id'> & {
|
|
|
31
34
|
};
|
|
32
35
|
vulnerable_versions: string;
|
|
33
36
|
};
|
|
37
|
+
declare enum DiffAction {
|
|
38
|
+
add = "ADD",
|
|
39
|
+
change = "CHANGE",
|
|
40
|
+
remove = "REMOVE"
|
|
41
|
+
}
|
|
34
42
|
type Diff = Omit<BaseDiff, 'actual' | 'children' | 'filterSet' | 'ideal' | 'leaves' | 'removed' | 'shrinkwrapInflated' | 'unchanged'> & {
|
|
35
43
|
actual: SafeNode;
|
|
36
44
|
children: Diff[];
|
|
@@ -42,4 +50,4 @@ type Diff = Omit<BaseDiff, 'actual' | 'children' | 'filterSet' | 'ideal' | 'leav
|
|
|
42
50
|
shrinkwrapInflated: Set<SafeNode>;
|
|
43
51
|
unchanged: SafeNode[];
|
|
44
52
|
};
|
|
45
|
-
export { ArboristClass, ArboristInstance, ArboristReifyOptions, AuditReportInstance, AuditAdvisory, Diff };
|
|
53
|
+
export { ArboristClass, ArboristInstance, ArboristReifyOptions, AuditReportInstance, AuditAdvisory, DiffAction, Diff };
|