@socketsecurity/cli-with-sentry 1.1.3 → 1.1.5

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 (111) hide show
  1. package/CHANGELOG.md +432 -0
  2. package/bin/cli.js +3 -1
  3. package/dist/cli.js +816 -688
  4. package/dist/cli.js.map +1 -1
  5. package/dist/constants.js +232 -19
  6. package/dist/constants.js.map +1 -1
  7. package/dist/flags.js +17 -11
  8. package/dist/flags.js.map +1 -1
  9. package/dist/instrument-with-sentry.js +8 -8
  10. package/dist/instrument-with-sentry.js.map +1 -1
  11. package/dist/shadow-npm-bin.js +14 -14
  12. package/dist/shadow-npm-bin.js.map +1 -1
  13. package/dist/shadow-npm-inject.js +16 -16
  14. package/dist/shadow-npm-inject.js.map +1 -1
  15. package/dist/tsconfig.dts.tsbuildinfo +1 -1
  16. package/dist/types/commands/analytics/cmd-analytics.d.mts.map +1 -1
  17. package/dist/types/commands/analytics/handle-analytics.d.mts +6 -5
  18. package/dist/types/commands/analytics/handle-analytics.d.mts.map +1 -1
  19. package/dist/types/commands/analytics/output-analytics.d.mts +6 -5
  20. package/dist/types/commands/analytics/output-analytics.d.mts.map +1 -1
  21. package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +1 -1
  22. package/dist/types/commands/ci/handle-ci.d.mts.map +1 -1
  23. package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
  24. package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
  25. package/dist/types/commands/fix/handle-fix.d.mts +1 -1
  26. package/dist/types/commands/fix/handle-fix.d.mts.map +1 -1
  27. package/dist/types/commands/fix/pull-request.d.mts +2 -2
  28. package/dist/types/commands/fix/pull-request.d.mts.map +1 -1
  29. package/dist/types/commands/fix/types.d.mts +1 -4
  30. package/dist/types/commands/fix/types.d.mts.map +1 -1
  31. package/dist/types/commands/login/cmd-login.d.mts.map +1 -1
  32. package/dist/types/commands/npm/cmd-npm.d.mts +1 -1
  33. package/dist/types/commands/npm/cmd-npm.d.mts.map +1 -1
  34. package/dist/types/commands/optimize/add-overrides.d.mts.map +1 -1
  35. package/dist/types/commands/organization/fetch-organization-list.d.mts +1 -1
  36. package/dist/types/commands/organization/fetch-organization-list.d.mts.map +1 -1
  37. package/dist/types/commands/patch/cmd-patch.d.mts.map +1 -1
  38. package/dist/types/commands/patch/handle-patch.d.mts +5 -4
  39. package/dist/types/commands/patch/handle-patch.d.mts.map +1 -1
  40. package/dist/types/commands/patch/output-patch-result.d.mts +1 -1
  41. package/dist/types/commands/patch/output-patch-result.d.mts.map +1 -1
  42. package/dist/types/commands/repository/cmd-repository-create.d.mts.map +1 -1
  43. package/dist/types/commands/repository/cmd-repository-del.d.mts.map +1 -1
  44. package/dist/types/commands/repository/cmd-repository-update.d.mts.map +1 -1
  45. package/dist/types/commands/repository/cmd-repository-view.d.mts.map +1 -1
  46. package/dist/types/commands/scan/cmd-scan-create.d.mts.map +1 -1
  47. package/dist/types/commands/scan/cmd-scan-github.d.mts.map +1 -1
  48. package/dist/types/commands/scan/cmd-scan-list.d.mts.map +1 -1
  49. package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +1 -1
  50. package/dist/types/commands/scan/cmd-scan-report.d.mts.map +1 -1
  51. package/dist/types/commands/scan/create-scan-from-github.d.mts.map +1 -1
  52. package/dist/types/commands/scan/generate-report.d.mts +9 -8
  53. package/dist/types/commands/scan/generate-report.d.mts.map +1 -1
  54. package/dist/types/commands/scan/handle-create-new-scan.d.mts +5 -2
  55. package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
  56. package/dist/types/commands/scan/handle-scan-report.d.mts +7 -5
  57. package/dist/types/commands/scan/handle-scan-report.d.mts.map +1 -1
  58. package/dist/types/commands/scan/output-scan-report.d.mts +10 -8
  59. package/dist/types/commands/scan/output-scan-report.d.mts.map +1 -1
  60. package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +1 -1
  61. package/dist/types/commands/scan/types.d.mts +3 -0
  62. package/dist/types/commands/scan/types.d.mts.map +1 -0
  63. package/dist/types/constants.d.mts +113 -46
  64. package/dist/types/constants.d.mts.map +1 -1
  65. package/dist/types/flags.d.mts.map +1 -1
  66. package/dist/types/shadow/npm/arborist-helpers.d.mts +1 -17
  67. package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -1
  68. package/dist/types/shadow/npm/bin.d.mts +4 -3
  69. package/dist/types/shadow/npm/bin.d.mts.map +1 -1
  70. package/dist/types/utils/api.d.mts +8 -7
  71. package/dist/types/utils/api.d.mts.map +1 -1
  72. package/dist/types/utils/coana.d.mts.map +1 -1
  73. package/dist/types/utils/config.d.mts.map +1 -1
  74. package/dist/types/utils/ecosystem.d.mts.map +1 -1
  75. package/dist/types/utils/get-output-kind.d.mts.map +1 -1
  76. package/dist/types/utils/git.d.mts +1 -0
  77. package/dist/types/utils/git.d.mts.map +1 -1
  78. package/dist/types/utils/glob.d.mts.map +1 -1
  79. package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
  80. package/dist/types/utils/package-environment.d.mts.map +1 -1
  81. package/dist/types/utils/purl.d.mts +39 -8
  82. package/dist/types/utils/purl.d.mts.map +1 -1
  83. package/dist/types/utils/socket-package-alert.d.mts.map +1 -1
  84. package/dist/types/utils/spec.d.mts +1 -1
  85. package/dist/types/utils/spec.d.mts.map +1 -1
  86. package/dist/utils.js +209 -163
  87. package/dist/utils.js.map +1 -1
  88. package/dist/vendor.js +596 -4972
  89. package/external/@socketsecurity/registry/lib/constants/env.js +0 -3
  90. package/external/@socketsecurity/registry/lib/constants/ext-cjs.js +3 -0
  91. package/external/@socketsecurity/registry/lib/constants/ext-cts.js +3 -0
  92. package/external/@socketsecurity/registry/lib/constants/ext-dts.js +3 -0
  93. package/external/@socketsecurity/registry/lib/constants/ext-js.js +3 -0
  94. package/external/@socketsecurity/registry/lib/constants/ext-json.js +3 -0
  95. package/external/@socketsecurity/registry/lib/constants/ext-lock.js +3 -0
  96. package/external/@socketsecurity/registry/lib/constants/ext-lockb.js +3 -0
  97. package/external/@socketsecurity/registry/lib/constants/ext-md.js +3 -0
  98. package/external/@socketsecurity/registry/lib/constants/ext-mjs.js +3 -0
  99. package/external/@socketsecurity/registry/lib/constants/ext-mts.js +3 -0
  100. package/external/@socketsecurity/registry/lib/constants/index.js +82 -83
  101. package/external/@socketsecurity/registry/lib/constants/ipc-promise.js +4 -5
  102. package/external/@socketsecurity/registry/lib/constants/node-debug-flags.js +9 -0
  103. package/external/@socketsecurity/registry/lib/constants/pnpm.js +3 -0
  104. package/external/@socketsecurity/registry/lib/constants/skip-tests-by-ecosystem.js +0 -1
  105. package/external/@socketsecurity/registry/lib/constants/yarn-lock.js +3 -0
  106. package/external/@socketsecurity/registry/lib/json.js +11 -0
  107. package/external/@socketsecurity/registry/lib/strings.js +16 -0
  108. package/package.json +17 -15
  109. package/external/@socketsecurity/registry/lib/constants/socket-public-api-key.js +0 -3
  110. package/external/@socketsecurity/registry/lib/constants/tap.js +0 -3
  111. /package/external/@socketsecurity/registry/lib/constants/{ipc.js → ipc-object.js} +0 -0
@@ -39,9 +39,6 @@ module.exports = ObjectFreeze({
39
39
  PRE_COMMIT: envAsBoolean(env.PRE_COMMIT),
40
40
  // Enable debug logging in Socket CLI.
41
41
  SOCKET_CLI_DEBUG: !!DEBUG || envAsBoolean(env.SOCKET_CLI_DEBUG),
42
- // TAP=1 is set by the tap-run test runner.
43
- // https://node-tap.org/environment/#environment-variables-used-by-tap
44
- TAP: envAsBoolean(env.TAP),
45
42
  // VITEST=true is set by the Vitest test runner.
46
43
  // https://vitest.dev/config/#configuring-vitest
47
44
  VITEST: envAsBoolean(env.VITEST)
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.cjs'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.cts'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.d.ts'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.js'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.json'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.lock'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.lockb'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.md'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.mjs'
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = '.mts'
@@ -2,78 +2,77 @@
2
2
 
3
3
  const getIpc = /*@__PURE__*/ require('./get-ipc')
4
4
  const { createConstantsObject } = /*@__PURE__*/ require('../objects')
5
+ const { toKebabCase } = /*@__PURE__*/ require('../strings')
5
6
 
6
- /*@__NO_SIDE_EFFECTS__*/
7
- function toKebabCase(str) {
8
- return (
9
- str
10
- // Convert camelCase to kebab-case
11
- .replace(/([a-z]+[0-9]*)([A-Z])/g, '$1-$2')
12
- // Convert underscores to hyphens
13
- .replace(/_/g, '-')
14
- .toLowerCase()
15
- )
16
- }
17
-
18
- const constantsObj = {
7
+ const props = {
19
8
  // Lazily defined values are initialized as `undefined` to keep their key order.
20
- AT_LATEST: undefined,
21
- BIOME_JSON: undefined,
22
- CI: undefined,
23
- COLUMN_LIMIT: undefined,
9
+ AT_LATEST: '@latest',
10
+ BIOME_JSON: 'biome.json',
11
+ CI: 'CI',
12
+ COLUMN_LIMIT: 80,
24
13
  DARWIN: undefined,
25
- EMPTY_FILE: undefined,
14
+ EMPTY_FILE: '/* empty */\n',
26
15
  ENV: undefined,
27
- ESLINT_CONFIG_JS: undefined,
28
- ESNEXT: undefined,
29
- EXT_CMD: undefined,
30
- EXT_PS1: undefined,
31
- EXTENSIONS: undefined,
32
- EXTENSIONS_JSON: undefined,
33
- GITIGNORE: undefined,
34
- HIDDEN_PACKAGE_LOCK_JSON: undefined,
35
- IPC: undefined,
36
- LATEST: undefined,
37
- LICENSE: undefined,
38
- LICENSE_GLOB: undefined,
39
- LICENSE_GLOB_RECURSIVE: undefined,
40
- LICENSE_ORIGINAL: undefined,
41
- LICENSE_ORIGINAL_GLOB: undefined,
42
- LICENSE_ORIGINAL_GLOB_RECURSIVE: undefined,
43
- LOOP_SENTINEL: undefined,
44
- MANIFEST_JSON: undefined,
45
- MIT: undefined,
46
- NODE_AUTH_TOKEN: undefined,
47
- NODE_ENV: undefined,
48
- NODE_MODULES: undefined,
49
- NODE_MODULES_GLOB_RECURSIVE: undefined,
50
- NODE_WORKSPACES: undefined,
16
+ ESLINT_CONFIG_JS: 'eslint.config.js',
17
+ ESNEXT: 'esnext',
18
+ EXT_CJS: '.cjs',
19
+ EXT_CMD: '.cmd',
20
+ EXT_CTS: '.cts',
21
+ EXT_DTS: '.d.ts',
22
+ EXT_JS: '.js',
23
+ EXT_JSON: '.json',
24
+ EXT_LOCK: '.lock',
25
+ EXT_LOCKB: '.lockb',
26
+ EXT_MD: '.md',
27
+ EXT_MJS: '.mjs',
28
+ EXT_MTS: '.mts',
29
+ EXT_PS1: '.ps1',
30
+ EXTENSIONS: 'extensions',
31
+ EXTENSIONS_JSON: 'extensions.json',
32
+ GITIGNORE: '.gitignore',
33
+ HIDDEN_PACKAGE_LOCK_JSON: '.package-lock.json',
34
+ LATEST: 'latest',
35
+ LICENSE: 'LICENSE',
36
+ LICENSE_GLOB: 'LICEN[CS]E{[.-]*,}',
37
+ LICENSE_GLOB_RECURSIVE: '**/LICEN[CS]E{[.-]*,}',
38
+ LICENSE_ORIGINAL: 'LICENSE.original',
39
+ LICENSE_ORIGINAL_GLOB: '*.original{.*,}',
40
+ LICENSE_ORIGINAL_GLOB_RECURSIVE: '**/*.original{.*,}',
41
+ LOOP_SENTINEL: 1000000,
42
+ MANIFEST_JSON: 'manifest.json',
43
+ MIT: 'MIT',
44
+ NODE_AUTH_TOKEN: 'NODE_AUTH_TOKEN',
45
+ NODE_ENV: 'NODE_ENV',
46
+ NODE_MODULES: 'node_modules',
47
+ NODE_MODULES_GLOB_RECURSIVE: '**/node_modules',
48
+ NODE_WORKSPACES: 'node_workspaces',
51
49
  NODE_VERSION: undefined,
52
- NPM: undefined,
53
- NPX: undefined,
54
- OVERRIDES: undefined,
50
+ NPM: 'npm',
51
+ NPX: 'npx',
52
+ OVERRIDES: 'overrides',
55
53
  PACKAGE_DEFAULT_SOCKET_CATEGORIES: undefined,
56
54
  PACKAGE_DEFAULT_NODE_RANGE: undefined,
57
- PACKAGE_DEFAULT_VERSION: undefined,
58
- PACKAGE_JSON: undefined,
59
- PACKAGE_LOCK_JSON: undefined,
60
- PRE_COMMIT: undefined,
61
- README_GLOB: undefined,
62
- README_GLOB_RECURSIVE: undefined,
63
- README_MD: undefined,
64
- REGISTRY_SCOPE_DELIMITER: undefined,
65
- REGISTRY: undefined,
66
- RESOLUTIONS: undefined,
67
- SOCKET_GITHUB_ORG: undefined,
68
- SOCKET_IPC_HANDSHAKE: undefined,
69
- SOCKET_OVERRIDE_SCOPE: undefined,
70
- SOCKET_PUBLIC_API_KEY: undefined,
71
- SOCKET_PUBLIC_API_TOKEN: undefined,
72
- SOCKET_REGISTRY_NPM_ORG: undefined,
73
- SOCKET_REGISTRY_PACKAGE_NAME: undefined,
74
- SOCKET_REGISTRY_REPO_NAME: undefined,
75
- SOCKET_REGISTRY_SCOPE: undefined,
76
- SOCKET_SECURITY_SCOPE: undefined,
55
+ PACKAGE_DEFAULT_VERSION: '1.0.0',
56
+ PACKAGE_JSON: 'package.json',
57
+ PACKAGE_LOCK_JSON: 'package-lock.json',
58
+ PNPM: 'pnpm',
59
+ PRE_COMMIT: 'PRE_COMMIT',
60
+ README_GLOB: 'README{.*,}',
61
+ README_GLOB_RECURSIVE: '**/README{.*,}',
62
+ README_MD: 'README.md',
63
+ REGISTRY_SCOPE_DELIMITER: '__',
64
+ REGISTRY: 'registry',
65
+ RESOLUTIONS: 'resolutions',
66
+ SOCKET_GITHUB_ORG: 'SocketDev',
67
+ SOCKET_IPC_HANDSHAKE: 'SOCKET_IPC_HANDSHAKE',
68
+ SOCKET_OVERRIDE_SCOPE: '@socketoverride',
69
+ SOCKET_PUBLIC_API_TOKEN:
70
+ 'sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api',
71
+ SOCKET_REGISTRY_NPM_ORG: 'socketregistry',
72
+ SOCKET_REGISTRY_PACKAGE_NAME: '@socketsecurity/registry',
73
+ SOCKET_REGISTRY_REPO_NAME: 'socket-registry',
74
+ SOCKET_REGISTRY_SCOPE: '@socketregistry',
75
+ SOCKET_SECURITY_SCOPE: '@socketsecurity',
77
76
  SUPPORTS_NODE_COMPILE_CACHE_API: undefined,
78
77
  SUPPORTS_NODE_COMPILE_CACHE_ENV_VAR: undefined,
79
78
  SUPPORTS_NODE_DISABLE_WARNING_FLAG: undefined,
@@ -81,27 +80,28 @@ const constantsObj = {
81
80
  SUPPORTS_NODE_REQUIRE_MODULE: undefined,
82
81
  SUPPORTS_NODE_RUN: undefined,
83
82
  SUPPORTS_PROCESS_SEND: undefined,
84
- TAP: undefined,
85
- TEMPLATE_CJS: undefined,
86
- TEMPLATE_CJS_BROWSER: undefined,
87
- TEMPLATE_CJS_ESM: undefined,
88
- TEMPLATE_ES_SHIM_CONSTRUCTOR: undefined,
89
- TEMPLATE_ES_SHIM_PROTOTYPE_METHOD: undefined,
90
- TEMPLATE_ES_SHIM_STATIC_METHOD: undefined,
91
- TSCONFIG_JSON: undefined,
83
+ TEMPLATE_CJS: 'cjs',
84
+ TEMPLATE_CJS_BROWSER: 'cjs-browser',
85
+ TEMPLATE_CJS_ESM: 'cjs-esm',
86
+ TEMPLATE_ES_SHIM_CONSTRUCTOR: 'es-shim-constructor',
87
+ TEMPLATE_ES_SHIM_PROTOTYPE_METHOD: 'es-shim-prototype-method',
88
+ TEMPLATE_ES_SHIM_STATIC_METHOD: 'es-shim-static-method',
89
+ TSCONFIG_JSON: 'tsconfig.json',
92
90
  UNDEFINED_TOKEN: undefined,
93
- UNLICENCED: undefined,
94
- UNLICENSED: undefined,
95
- UTF8: undefined,
96
- VITEST: undefined,
91
+ UNLICENCED: 'UNLICENCED',
92
+ UNLICENSED: 'UNLICENSED',
93
+ UTF8: 'utf8',
94
+ VITEST: 'VITEST',
97
95
  WIN32: undefined,
96
+ YARN_LOCK: 'yarn.lock',
98
97
  abortController: undefined,
99
98
  abortSignal: undefined,
100
99
  copyLeftLicenses: undefined,
101
100
  execPath: undefined,
102
- ignoreGlobs: undefined,
101
+ ipcObject: undefined,
103
102
  lifecycleScriptNames: undefined,
104
103
  maintainedNodeVersions: undefined,
104
+ nodeDebugFlags: undefined,
105
105
  nodeHardenFlags: undefined,
106
106
  nodeNoWarningsFlags: undefined,
107
107
  npmExecPath: undefined,
@@ -117,12 +117,11 @@ const constantsObj = {
117
117
  win32EnsureTestsByEcosystem: undefined
118
118
  }
119
119
 
120
- module.exports = createConstantsObject(constantsObj, {
120
+ module.exports = createConstantsObject(props, {
121
121
  getters: Object.fromEntries(
122
- Object.keys(constantsObj).map(k => [
123
- k,
124
- () => require(`./${toKebabCase(k)}`)
125
- ])
122
+ Object.keys(props)
123
+ .filter(k => props[k] === undefined)
124
+ .map(k => [k, () => require(`./${toKebabCase(k)}`)])
126
125
  ),
127
126
  internals: {
128
127
  createConstantsObject,
@@ -11,14 +11,14 @@ module.exports = new Promise(
11
11
  // because constants is not initialized yet.
12
12
  typeof process.send !== 'function'
13
13
  ) {
14
- resolve(/*@__PURE__*/ require('./ipc'))
14
+ resolve(/*@__PURE__*/ require('./ipc-object'))
15
15
  return
16
16
  }
17
17
  const abortSignal = /*@__PURE__*/ require('./abort-signal')
18
18
  const finish = () => {
19
19
  abortSignal.removeEventListener('abort', finish)
20
20
  process.removeListener('message', onmessage)
21
- resolve(/*@__PURE__*/ require('./ipc'))
21
+ resolve(/*@__PURE__*/ require('./ipc-object'))
22
22
  }
23
23
  const onmessage = rawData => {
24
24
  if (rawData !== null && typeof rawData === 'object') {
@@ -40,9 +40,8 @@ module.exports = new Promise(
40
40
  }
41
41
  abortSignal.addEventListener('abort', finish, { once: true })
42
42
  process.on('message', onmessage)
43
- // The timeout of 1,000 milliseconds, i.e. 1 second, is to prevent an
44
- // unresolved promised. It should be more than enough time for the IPC
45
- // handshake.
43
+ // The timeout of 1,000 milliseconds, i.e. 1 second, is to prevent an unresolved
44
+ // promised. It should be more than enough time for the ipc object handshake.
46
45
  setTimeout(finish, 1000)
47
46
  }
48
47
  )
@@ -0,0 +1,9 @@
1
+ 'use strict'
2
+
3
+ const { freeze: ObjectFreeze } = Object
4
+
5
+ const ENV = /*@__PURE__*/ require('./env')
6
+
7
+ module.exports = ObjectFreeze(
8
+ ENV.SOCKET_CLI_DEBUG ? ['--trace-uncaught', '--trace-warnings'] : []
9
+ )
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = 'pnpm'
@@ -17,7 +17,6 @@ module.exports = new Map([
17
17
  // Win32 environments for the time being.
18
18
  // https://github.com/es-shims/Date/issues/3
19
19
  // https://github.com/es-shims/Date/tree/v2.0.5
20
- // Lazily access constants.ENV.
21
20
  ...(WIN32 ? [] : ['date']),
22
21
  // es6-object-assign has no unit tests.
23
22
  // https://github.com/rubennorte/es6-object-assign/tree/v1.1.0
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = 'yarn.lock'
@@ -20,6 +20,16 @@ function isBuffer(x) {
20
20
  return !!(typeof Ctor?.isBuffer === 'function' && Ctor.isBuffer(x))
21
21
  }
22
22
 
23
+ /*@__NO_SIDE_EFFECTS__*/
24
+ function isJsonPrimitive(value) {
25
+ return (
26
+ value === null ||
27
+ typeof value === 'boolean' ||
28
+ typeof value === 'number' ||
29
+ typeof value === 'string'
30
+ )
31
+ }
32
+
23
33
  /*@__NO_SIDE_EFFECTS__*/
24
34
  function jsonParse(content, options) {
25
35
  const { filepath, reviver, throws } = { __proto__: null, ...options }
@@ -38,5 +48,6 @@ function jsonParse(content, options) {
38
48
  return null
39
49
  }
40
50
  module.exports = {
51
+ isJsonPrimitive,
41
52
  jsonParse
42
53
  }
@@ -58,6 +58,21 @@ function stripBom(str) {
58
58
  return str.length > 0 && str.charCodeAt(0) === 0xfeff ? str.slice(1) : str
59
59
  }
60
60
 
61
+ /*@__NO_SIDE_EFFECTS__*/
62
+ function toKebabCase(str) {
63
+ if (!str.length) {
64
+ return str
65
+ }
66
+ return (
67
+ str
68
+ // Convert camelCase to kebab-case
69
+ .replace(/([a-z]+[0-9]*)([A-Z])/g, '$1-$2')
70
+ // Convert underscores to hyphens
71
+ .replace(/_/g, '-')
72
+ .toLowerCase()
73
+ )
74
+ }
75
+
61
76
  /*@__NO_SIDE_EFFECTS__*/
62
77
  function trimNewlines(str) {
63
78
  const { length } = str
@@ -101,5 +116,6 @@ module.exports = {
101
116
  search,
102
117
  stripAnsi,
103
118
  stripBom,
119
+ toKebabCase,
104
120
  trimNewlines
105
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/cli-with-sentry",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "CLI for Socket.dev, includes Sentry error handling, otherwise identical to the regular `socket` package",
5
5
  "homepage": "https://github.com/SocketDev/socket-cli",
6
6
  "license": "MIT",
@@ -85,8 +85,8 @@
85
85
  "@babel/plugin-transform-runtime": "7.28.3",
86
86
  "@babel/preset-typescript": "7.27.1",
87
87
  "@babel/runtime": "7.28.4",
88
- "@biomejs/biome": "2.2.3",
89
- "@coana-tech/cli": "14.12.17",
88
+ "@biomejs/biome": "2.2.4",
89
+ "@coana-tech/cli": "14.12.22",
90
90
  "@cyclonedx/cdxgen": "11.7.0",
91
91
  "@dotenvx/dotenvx": "1.49.0",
92
92
  "@eslint/compat": "1.3.2",
@@ -113,8 +113,8 @@
113
113
  "@socketregistry/is-interactive": "1.0.6",
114
114
  "@socketregistry/packageurl-js": "1.0.9",
115
115
  "@socketsecurity/config": "3.0.1",
116
- "@socketsecurity/registry": "1.0.282",
117
- "@socketsecurity/sdk": "1.4.86",
116
+ "@socketsecurity/registry": "1.1.5",
117
+ "@socketsecurity/sdk": "1.4.88",
118
118
  "@types/blessed": "0.1.25",
119
119
  "@types/cmd-shim": "5.0.2",
120
120
  "@types/js-yaml": "4.0.9",
@@ -127,8 +127,8 @@
127
127
  "@types/semver": "7.7.1",
128
128
  "@types/which": "3.0.4",
129
129
  "@types/yargs-parser": "21.0.3",
130
- "@typescript-eslint/parser": "8.42.0",
131
- "@typescript/native-preview": "7.0.0-dev.20250904.1",
130
+ "@typescript-eslint/parser": "8.43.0",
131
+ "@typescript/native-preview": "7.0.0-dev.20250910.1",
132
132
  "@vitest/coverage-v8": "3.2.4",
133
133
  "blessed": "0.1.81",
134
134
  "blessed-contrib": "4.11.0",
@@ -145,14 +145,14 @@
145
145
  "eslint-plugin-sort-destructure-keys": "2.0.0",
146
146
  "eslint-plugin-unicorn": "56.0.1",
147
147
  "fast-glob": "3.3.3",
148
- "globals": "16.3.0",
148
+ "globals": "16.4.0",
149
149
  "hpagent": "1.2.0",
150
150
  "husky": "9.1.7",
151
151
  "ignore": "7.0.5",
152
152
  "js-yaml": "npm:@zkochan/js-yaml@0.0.10",
153
153
  "knip": "5.63.1",
154
154
  "lint-staged": "16.1.6",
155
- "magic-string": "0.30.18",
155
+ "magic-string": "0.30.19",
156
156
  "meow": "13.2.0",
157
157
  "micromatch": "4.0.8",
158
158
  "mock-fs": "5.5.0",
@@ -164,14 +164,14 @@
164
164
  "pony-cause": "2.1.11",
165
165
  "registry-auth-token": "5.1.0",
166
166
  "registry-url": "7.2.0",
167
- "rollup": "4.50.0",
167
+ "rollup": "4.50.1",
168
168
  "semver": "7.7.2",
169
169
  "synp": "1.9.14",
170
170
  "terminal-link": "2.1.1",
171
171
  "tiny-updater": "3.5.3",
172
- "trash": "9.0.0",
172
+ "trash": "10.0.0",
173
173
  "type-coverage": "2.29.7",
174
- "typescript-eslint": "8.42.0",
174
+ "typescript-eslint": "8.43.0",
175
175
  "unplugin-purge-polyfills": "0.1.0",
176
176
  "vitest": "3.2.4",
177
177
  "which": "5.0.0",
@@ -209,9 +209,10 @@
209
209
  "tiny-colors": "$yoctocolors-cjs",
210
210
  "typedarray": "npm:@socketregistry/typedarray@^1",
211
211
  "undici": "6.21.3",
212
- "vite": "7.1.1",
212
+ "vite": "7.1.5",
213
213
  "xml2js": "0.6.2",
214
- "yaml": "2.8.1"
214
+ "yaml": "2.8.1",
215
+ "yargs-parser": "$yargs-parser"
215
216
  },
216
217
  "engines": {
217
218
  "node": ">=18"
@@ -221,6 +222,7 @@
221
222
  "dist/**",
222
223
  "external/**",
223
224
  "shadow-bin/**",
225
+ "CHANGELOG.md",
224
226
  "requirements.json",
225
227
  "translations.json"
226
228
  ],
@@ -242,6 +244,6 @@
242
244
  "strict": true
243
245
  },
244
246
  "dependencies": {
245
- "@sentry/node": "10.10.0"
247
+ "@sentry/node": "10.11.0"
246
248
  }
247
249
  }
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = /*@__PURE__*/ require('./socket-public-api-token')
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = 'TAP'