@socketsecurity/cli-with-sentry 0.14.83 → 0.14.85
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/dist/constants.d.ts +1 -7
- 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/cli.js +17 -14
- package/dist/module-sync/cli.js.map +1 -1
- package/dist/module-sync/fs.d.ts +61 -0
- package/dist/module-sync/shadow-npm-inject.js +8 -20
- package/dist/module-sync/shadow-npm-inject.js.map +1 -1
- package/dist/require/cli.js +17 -14
- package/dist/require/cli.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Remap } from '@socketsecurity/registry/lib/objects'
|
|
3
|
+
import { Abortable } from 'node:events'
|
|
4
|
+
import {
|
|
5
|
+
ObjectEncodingOptions,
|
|
6
|
+
OpenMode,
|
|
7
|
+
PathLike,
|
|
8
|
+
PathOrFileDescriptor
|
|
9
|
+
} from 'node:fs'
|
|
10
|
+
import { FileHandle } from 'node:fs/promises'
|
|
11
|
+
type FindUpOptions = {
|
|
12
|
+
cwd?: string | undefined
|
|
13
|
+
signal?: AbortSignal | undefined
|
|
14
|
+
}
|
|
15
|
+
declare function findUp(
|
|
16
|
+
name: string | string[],
|
|
17
|
+
{ cwd, signal }: FindUpOptions
|
|
18
|
+
): Promise<string | undefined>
|
|
19
|
+
type ReadFileOptions = Remap<
|
|
20
|
+
ObjectEncodingOptions &
|
|
21
|
+
Abortable & {
|
|
22
|
+
flag?: OpenMode | undefined
|
|
23
|
+
}
|
|
24
|
+
>
|
|
25
|
+
declare function readFileBinary(
|
|
26
|
+
filepath: PathLike | FileHandle,
|
|
27
|
+
options?: ReadFileOptions | undefined
|
|
28
|
+
): Promise<Buffer>
|
|
29
|
+
declare function readFileUtf8(
|
|
30
|
+
filepath: PathLike | FileHandle,
|
|
31
|
+
options?: ReadFileOptions | undefined
|
|
32
|
+
): Promise<string>
|
|
33
|
+
declare function safeReadFile(
|
|
34
|
+
filepath: PathLike | FileHandle,
|
|
35
|
+
options?:
|
|
36
|
+
| 'utf8'
|
|
37
|
+
| 'utf-8'
|
|
38
|
+
| {
|
|
39
|
+
encoding: 'utf8' | 'utf-8'
|
|
40
|
+
}
|
|
41
|
+
| undefined
|
|
42
|
+
): Promise<string | undefined>
|
|
43
|
+
declare function safeReadFileSync(
|
|
44
|
+
filepath: PathOrFileDescriptor,
|
|
45
|
+
options?:
|
|
46
|
+
| 'utf8'
|
|
47
|
+
| 'utf-8'
|
|
48
|
+
| {
|
|
49
|
+
encoding: 'utf8' | 'utf-8'
|
|
50
|
+
}
|
|
51
|
+
| undefined
|
|
52
|
+
): string | undefined
|
|
53
|
+
export {
|
|
54
|
+
FindUpOptions,
|
|
55
|
+
findUp,
|
|
56
|
+
ReadFileOptions,
|
|
57
|
+
readFileBinary,
|
|
58
|
+
readFileUtf8,
|
|
59
|
+
safeReadFile,
|
|
60
|
+
safeReadFileSync
|
|
61
|
+
}
|
|
@@ -406,7 +406,7 @@ async function setupSdk(
|
|
|
406
406
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_NAME']".
|
|
407
407
|
name: '@socketsecurity/cli',
|
|
408
408
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
409
|
-
version: '0.14.
|
|
409
|
+
version: '0.14.85',
|
|
410
410
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_HOMEPAGE']".
|
|
411
411
|
homepage: 'https://github.com/SocketDev/socket-cli'
|
|
412
412
|
})
|
|
@@ -1890,51 +1890,39 @@ function findBestPatchVersion(
|
|
|
1890
1890
|
return semver.maxSatisfying(eligibleVersions, '*')
|
|
1891
1891
|
}
|
|
1892
1892
|
function findPackageNode(tree, name, version) {
|
|
1893
|
-
const queue = [
|
|
1894
|
-
{
|
|
1895
|
-
node: tree
|
|
1896
|
-
}
|
|
1897
|
-
]
|
|
1893
|
+
const queue = [tree]
|
|
1898
1894
|
let sentinel = 0
|
|
1899
1895
|
while (queue.length) {
|
|
1900
1896
|
if (sentinel++ === LOOP_SENTINEL) {
|
|
1901
1897
|
throw new Error('Detected infinite loop in findPackageNodes')
|
|
1902
1898
|
}
|
|
1903
|
-
const
|
|
1899
|
+
const currentNode = queue.pop()
|
|
1904
1900
|
const node = currentNode.children.get(name)
|
|
1905
1901
|
if (node && (typeof version !== 'string' || node.version === version)) {
|
|
1906
1902
|
return node
|
|
1907
1903
|
}
|
|
1908
1904
|
const children = [...currentNode.children.values()]
|
|
1909
1905
|
for (let i = children.length - 1; i >= 0; i -= 1) {
|
|
1910
|
-
queue.push(
|
|
1911
|
-
node: children[i]
|
|
1912
|
-
})
|
|
1906
|
+
queue.push(children[i])
|
|
1913
1907
|
}
|
|
1914
1908
|
}
|
|
1915
1909
|
}
|
|
1916
1910
|
function findPackageNodes(tree, name, version) {
|
|
1917
|
-
const queue = [
|
|
1918
|
-
{
|
|
1919
|
-
node: tree
|
|
1920
|
-
}
|
|
1921
|
-
]
|
|
1911
|
+
const queue = [tree]
|
|
1922
1912
|
const matches = []
|
|
1923
1913
|
let sentinel = 0
|
|
1924
1914
|
while (queue.length) {
|
|
1925
1915
|
if (sentinel++ === LOOP_SENTINEL) {
|
|
1926
1916
|
throw new Error('Detected infinite loop in findPackageNodes')
|
|
1927
1917
|
}
|
|
1928
|
-
const
|
|
1918
|
+
const currentNode = queue.pop()
|
|
1929
1919
|
const node = currentNode.children.get(name)
|
|
1930
1920
|
if (node && 'undefined' !== 'string') {
|
|
1931
1921
|
matches.push(node)
|
|
1932
1922
|
}
|
|
1933
1923
|
const children = [...currentNode.children.values()]
|
|
1934
1924
|
for (let i = children.length - 1; i >= 0; i -= 1) {
|
|
1935
|
-
queue.push(
|
|
1936
|
-
node: children[i]
|
|
1937
|
-
})
|
|
1925
|
+
queue.push(children[i])
|
|
1938
1926
|
}
|
|
1939
1927
|
}
|
|
1940
1928
|
return matches
|
|
@@ -2326,5 +2314,5 @@ exports.supportedConfigKeys = supportedConfigKeys
|
|
|
2326
2314
|
exports.updateConfigValue = updateConfigValue
|
|
2327
2315
|
exports.updateNode = updateNode
|
|
2328
2316
|
exports.updatePackageJsonFromNode = updatePackageJsonFromNode
|
|
2329
|
-
//# debugId=
|
|
2317
|
+
//# debugId=e9e522b6-8938-43e5-949b-412e0854fcc5
|
|
2330
2318
|
//# sourceMappingURL=shadow-npm-inject.js.map
|