@socketsecurity/cli-with-sentry 0.14.52 → 0.14.55

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.
@@ -24,7 +24,7 @@ type EdgeOptions = {
24
24
  from: SafeNode;
25
25
  accept?: string | undefined;
26
26
  overrides?: SafeOverrideSet | undefined;
27
- to?: SafeNode;
27
+ to?: SafeNode | undefined;
28
28
  };
29
29
  type ErrorStatus = DependencyProblem | 'OK';
30
30
  type Explanation = {
@@ -50,15 +50,15 @@ declare class SafeOverrideSet extends OverrideSet {
50
50
  }
51
51
  declare const depValid: (child: SafeNode, requested: string, accept: string | undefined, requester: SafeNode) => boolean;
52
52
  declare function getSocketDevAlertUrl(alertType: string): string;
53
- declare function getSocketDevPackageOverviewUrl(eco: string, name: string, version?: string): string;
53
+ declare function getSocketDevPackageOverviewUrl(eco: string, name: string, version?: string | undefined): string;
54
54
  declare class ColorOrMarkdown {
55
55
  useMarkdown: boolean;
56
56
  constructor(useMarkdown: boolean);
57
57
  bold(text: string): string;
58
58
  header(text: string, level?: number): string;
59
59
  hyperlink(text: string, url: string | undefined, { fallback, fallbackToUrl }?: {
60
- fallback?: boolean;
61
- fallbackToUrl?: boolean;
60
+ fallback?: boolean | undefined;
61
+ fallbackToUrl?: boolean | undefined;
62
62
  }): string;
63
63
  indent(...args: Parameters<typeof indentString>): ReturnType<typeof indentString>;
64
64
  italic(text: string): string;
@@ -103,38 +103,38 @@ type SocketArtifactAlert = {
103
103
  type: string;
104
104
  severity: string;
105
105
  category: string;
106
- action?: string;
107
- actionPolicyIndex?: number;
108
- file?: string;
109
- props?: any;
110
- start?: number;
111
- end?: number;
106
+ action?: string | undefined;
107
+ actionPolicyIndex?: number | undefined;
108
+ file?: string | undefined;
109
+ props?: any | undefined;
110
+ start?: number | undefined;
111
+ end?: number | undefined;
112
112
  };
113
113
  type SocketArtifact = {
114
114
  type: string;
115
115
  name: string;
116
- namespace?: string;
117
- version?: string;
118
- subpath?: string;
119
- release?: string;
120
- id?: string;
116
+ namespace?: string | undefined;
117
+ version?: string | undefined;
118
+ subpath?: string | undefined;
119
+ release?: string | undefined;
120
+ id?: string | undefined;
121
121
  author?: string[];
122
- license?: string;
123
- licenseDetails?: {
122
+ license?: string | undefined;
123
+ licenseDetails?: Array<{
124
124
  spdxDisj: string;
125
125
  provenance: string;
126
126
  filepath: string;
127
127
  match_strength: number;
128
- }[];
129
- licenseAttrib?: {
128
+ }>;
129
+ licenseAttrib?: Array<{
130
130
  attribText: string;
131
- attribData: {
131
+ attribData: Array<{
132
132
  purl: string;
133
133
  foundInFilepath: string;
134
134
  spdxExpr: string;
135
135
  foundAuthors: string[];
136
- }[];
137
- }[];
136
+ }>;
137
+ }>;
138
138
  score?: {
139
139
  supplyChain: number;
140
140
  quality: number;
@@ -144,8 +144,8 @@ type SocketArtifact = {
144
144
  overall: number;
145
145
  };
146
146
  alerts?: SocketArtifactAlert[];
147
- size?: number;
148
- batchIndex?: number;
147
+ size?: number | undefined;
148
+ batchIndex?: number | undefined;
149
149
  };
150
150
  declare function batchScan(pkgIds: string[], concurrencyLimit?: number): AsyncGenerator<SocketArtifact>;
151
151
  declare function isArtifactAlertCveFixable(alert: SocketArtifactAlert): alert is ArtifactAlertCveFixable;
@@ -156,18 +156,18 @@ type PackageDetail = {
156
156
  existing?: SafeNode | undefined;
157
157
  };
158
158
  type GetPackagesToQueryFromDiffOptions = {
159
- includeUnchanged?: boolean;
160
- includeUnknownOrigin?: boolean;
159
+ includeUnchanged?: boolean | undefined;
160
+ includeUnknownOrigin?: boolean | undefined;
161
161
  };
162
- declare function getPackagesToQueryFromDiff(diff_: Diff | null, options?: GetPackagesToQueryFromDiffOptions): PackageDetail[];
162
+ declare function getPackagesToQueryFromDiff(diff_: Diff | null, options?: GetPackagesToQueryFromDiffOptions | undefined): PackageDetail[];
163
163
  declare function findUp(name: string | string[], { cwd }: {
164
164
  cwd: string;
165
165
  }): Promise<string | undefined>;
166
166
  type ReadFileOptions = ObjectEncodingOptions & Abortable & {
167
167
  flag?: OpenMode | undefined;
168
168
  };
169
- declare function readFileBinary(filepath: PathLike | FileHandle, options?: ReadFileOptions): Promise<Buffer>;
170
- declare function readFileUtf8(filepath: PathLike | FileHandle, options?: ReadFileOptions): Promise<string>;
169
+ declare function readFileBinary(filepath: PathLike | FileHandle, options?: ReadFileOptions | undefined): Promise<Buffer>;
170
+ declare function readFileUtf8(filepath: PathLike | FileHandle, options?: ReadFileOptions | undefined): Promise<string>;
171
171
  declare function safeReadFile(...args: Parameters<typeof fs.readFile>): ReturnType<typeof fs.readFile> | undefined;
172
172
  declare function safeReadFileSync(...args: Parameters<typeof fsReadFileSync>): ReturnType<typeof fsReadFileSync> | undefined;
173
173
  declare const Arborist: ArboristClass;
@@ -1773,6 +1773,9 @@ async function reify(...args) {
1773
1773
  }
1774
1774
 
1775
1775
  const {
1776
+ SOCKET_CLI_LEGACY_PACKAGE_NAME,
1777
+ SOCKET_CLI_PACKAGE_NAME,
1778
+ SOCKET_CLI_SENTRY_PACKAGE_NAME,
1776
1779
  SOCKET_CLI_SAFE_WRAPPER,
1777
1780
  kInternalsSymbol,
1778
1781
  [kInternalsSymbol]: {
@@ -1826,13 +1829,17 @@ class SafeArborist extends Arborist {
1826
1829
  __proto__: null,
1827
1830
  ...(args.length ? args[0] : undefined)
1828
1831
  };
1832
+ const {
1833
+ add
1834
+ } = options;
1835
+ const skipSocketCliUpgrade = options.global && options['npmCommand'] === 'install' && Array.isArray(add) && add.length === 1 && (add[0] === SOCKET_CLI_PACKAGE_NAME || add[0] === SOCKET_CLI_LEGACY_PACKAGE_NAME || add[0] === SOCKET_CLI_SENTRY_PACKAGE_NAME);
1836
+ if (options.dryRun || skipSocketCliUpgrade || !(await getIPC(SOCKET_CLI_SAFE_WRAPPER))) {
1837
+ return await this[kRiskyReify](...args);
1838
+ }
1829
1839
  const safeArgs = [{
1830
1840
  ...options,
1831
1841
  progress: false
1832
1842
  }, ...args.slice(1)];
1833
- if (options.dryRun || !(await getIPC(SOCKET_CLI_SAFE_WRAPPER))) {
1834
- return await this[kRiskyReify](...safeArgs);
1835
- }
1836
1843
  Object.assign(options, SAFE_ARBORIST_REIFY_OPTIONS_OVERRIDES);
1837
1844
  const old = args[0];
1838
1845
  args[0] = options;
@@ -1867,5 +1874,5 @@ exports.safeReadFile = safeReadFile;
1867
1874
  exports.setupSdk = setupSdk;
1868
1875
  exports.updateNode = updateNode;
1869
1876
  exports.updateSetting = updateSetting;
1870
- //# debugId=30e57097-6100-437d-9b6d-904604eeaa8d
1877
+ //# debugId=14750542-62bb-4def-b7d6-41139d5b566
1871
1878
  //# sourceMappingURL=index.js.map