@socketsecurity/cli-with-sentry 0.14.129 → 0.14.131

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 (59) hide show
  1. package/bin/cli.js +37 -44
  2. package/bin/npx-cli.js +1 -3
  3. package/dist/{module-sync/cli.js → cli.js} +336 -338
  4. package/dist/cli.js.map +1 -0
  5. package/dist/constants.js +8 -25
  6. package/dist/constants.js.map +1 -1
  7. package/dist/instrument-with-sentry.js +3 -14
  8. package/dist/instrument-with-sentry.js.map +1 -1
  9. package/dist/{module-sync/shadow-bin.js → shadow-bin.js} +52 -1
  10. package/dist/shadow-bin.js.map +1 -0
  11. package/dist/{module-sync/shadow-npm-inject.js → shadow-npm-inject.js} +67 -48
  12. package/dist/shadow-npm-inject.js.map +1 -0
  13. package/dist/shadow-npm-paths.js.map +1 -0
  14. package/dist/{module-sync/vendor.js → vendor.js} +10320 -4778
  15. package/dist/vendor.js.map +1 -0
  16. package/package.json +16 -26
  17. package/dist/constants.d.ts +0 -285
  18. package/dist/instrument-with-sentry.d.ts +0 -1
  19. package/dist/module-sync/arborist-helpers.d.ts +0 -69
  20. package/dist/module-sync/artifact.d.ts +0 -63
  21. package/dist/module-sync/cli.d.ts +0 -2
  22. package/dist/module-sync/cli.js.map +0 -1
  23. package/dist/module-sync/cmd.d.ts +0 -4
  24. package/dist/module-sync/config.d.ts +0 -44
  25. package/dist/module-sync/constants.js +0 -3
  26. package/dist/module-sync/edge.d.ts +0 -78
  27. package/dist/module-sync/errors.d.ts +0 -29
  28. package/dist/module-sync/fs.d.ts +0 -63
  29. package/dist/module-sync/index.d.ts +0 -34
  30. package/dist/module-sync/node.d.ts +0 -121
  31. package/dist/module-sync/override-set.d.ts +0 -43
  32. package/dist/module-sync/package-environment.d.ts +0 -83
  33. package/dist/module-sync/path-resolve.d.ts +0 -15
  34. package/dist/module-sync/sdk.d.ts +0 -9
  35. package/dist/module-sync/semver.d.ts +0 -17
  36. package/dist/module-sync/shadow-bin.d.ts +0 -5
  37. package/dist/module-sync/shadow-bin.js.map +0 -1
  38. package/dist/module-sync/shadow-npm-inject.d.ts +0 -1
  39. package/dist/module-sync/shadow-npm-inject.js.map +0 -1
  40. package/dist/module-sync/shadow-npm-paths.d.ts +0 -27
  41. package/dist/module-sync/shadow-npm-paths.js.map +0 -1
  42. package/dist/module-sync/socket-package-alert.d.ts +0 -104
  43. package/dist/module-sync/vendor.d.ts +0 -0
  44. package/dist/module-sync/vendor.js.map +0 -1
  45. package/dist/require/cli.d.ts +0 -2
  46. package/dist/require/cli.js +0 -12361
  47. package/dist/require/cli.js.map +0 -1
  48. package/dist/require/constants.js +0 -3
  49. package/dist/require/shadow-bin.d.ts +0 -5
  50. package/dist/require/shadow-bin.js +0 -110
  51. package/dist/require/shadow-bin.js.map +0 -1
  52. package/dist/require/shadow-npm-inject.d.ts +0 -1
  53. package/dist/require/shadow-npm-inject.js +0 -2616
  54. package/dist/require/shadow-npm-inject.js.map +0 -1
  55. package/dist/require/shadow-npm-paths.d.ts +0 -27
  56. package/dist/require/shadow-npm-paths.js +0 -292
  57. package/dist/require/shadow-npm-paths.js.map +0 -1
  58. package/dist/require/vendor.js +0 -3
  59. /package/dist/{module-sync/shadow-npm-paths.js → shadow-npm-paths.js} +0 -0
package/bin/cli.js CHANGED
@@ -3,51 +3,44 @@
3
3
 
4
4
  const process = require('node:process')
5
5
 
6
+ const { spawn } = require('@socketsecurity/registry/lib/spawn')
7
+
6
8
  const constants = require('../dist/constants')
7
9
 
8
- const { DIST_TYPE, INLINED_SOCKET_CLI_SENTRY_BUILD } = constants
10
+ const { INLINED_SOCKET_CLI_SENTRY_BUILD } = constants
11
+
12
+ process.exitCode = 1
9
13
 
10
- if (
11
- DIST_TYPE === 'require' &&
12
- // Lazily access constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD].
13
- !constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD]
14
- ) {
15
- // Lazily access constants.distCliPath.
16
- require(constants.distCliPath)
17
- } else {
18
- process.exitCode = 1
19
- const { spawn } = require('@socketsecurity/registry/lib/spawn')
20
- spawn(
21
- // Lazily access constants.execPath.
22
- constants.execPath,
23
- [
24
- // Lazily access constants.nodeHardenFlags.
25
- ...constants.nodeHardenFlags,
26
- // Lazily access constants.nodeNoWarningsFlags.
27
- ...constants.nodeNoWarningsFlags,
28
- // Lazily access constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD].
29
- ...(constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD]
30
- ? [
31
- '--require',
32
- // Lazily access constants.distInstrumentWithSentryPath.
33
- constants.distInstrumentWithSentryPath
34
- ]
35
- : []),
36
- // Lazily access constants.distCliPath.
37
- constants.distCliPath,
38
- ...process.argv.slice(2)
39
- ],
40
- {
41
- stdio: 'inherit'
14
+ spawn(
15
+ // Lazily access constants.execPath.
16
+ constants.execPath,
17
+ [
18
+ // Lazily access constants.nodeHardenFlags.
19
+ ...constants.nodeHardenFlags,
20
+ // Lazily access constants.nodeNoWarningsFlags.
21
+ ...constants.nodeNoWarningsFlags,
22
+ // Lazily access constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD].
23
+ ...(constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD]
24
+ ? [
25
+ '--require',
26
+ // Lazily access constants.distInstrumentWithSentryPath.
27
+ constants.distInstrumentWithSentryPath
28
+ ]
29
+ : []),
30
+ // Lazily access constants.distCliPath.
31
+ constants.distCliPath,
32
+ ...process.argv.slice(2)
33
+ ],
34
+ {
35
+ stdio: 'inherit'
36
+ }
37
+ )
38
+ // See https://nodejs.org/api/all.html#all_child_process_event-exit.
39
+ .process.on('exit', (code, signalName) => {
40
+ if (signalName) {
41
+ process.kill(process.pid, signalName)
42
+ } else if (code !== null) {
43
+ // eslint-disable-next-line n/no-process-exit
44
+ process.exit(code)
42
45
  }
43
- )
44
- // See https://nodejs.org/api/all.html#all_child_process_event-exit.
45
- .process.on('exit', (code, signalName) => {
46
- if (signalName) {
47
- process.kill(process.pid, signalName)
48
- } else if (code !== null) {
49
- // eslint-disable-next-line n/no-process-exit
50
- process.exit(code)
51
- }
52
- })
53
- }
46
+ })
package/bin/npx-cli.js CHANGED
@@ -2,7 +2,5 @@
2
2
  'use strict'
3
3
 
4
4
  const constants = require('../dist/constants')
5
- const shadowBin = require(
6
- `${constants.distPath}/${constants.SHADOW_NPM_BIN}.js`
7
- )
5
+ const shadowBin = require(constants.distShadowNpmBinPath)
8
6
  shadowBin(constants.NPX)