@socketsecurity/cli-with-sentry 0.14.112 → 0.14.114

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.
@@ -41,7 +41,7 @@ const relConstantsPath = './constants'
41
41
  Sentry.setTag(
42
42
  'version',
43
43
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
44
- '0.14.112:79a6e07:49616d8e:pub'
44
+ '0.14.114:6709538:d8784340:pub'
45
45
  )
46
46
  const constants = require(relConstantsPath)
47
47
  if (constants.ENV.SOCKET_CLI_DEBUG) {
@@ -56,5 +56,5 @@ const relConstantsPath = './constants'
56
56
  } = constants
57
57
  setSentry(Sentry)
58
58
  }
59
- //# debugId=b2414c60-2740-4931-bee9-243c3bbe685c
59
+ //# debugId=e2a7e44f-121f-464d-9f46-d3200dfb95e9
60
60
  //# sourceMappingURL=instrument-with-sentry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instrument-with-sentry.js","sources":["../../src/instrument-with-sentry.ts"],"sourcesContent":["// This should ONLY be included in the special Sentry build!\n// Otherwise the Sentry dependency won't even be present in the manifest.\n\nimport { logger } from '@socketsecurity/registry/lib/logger'\n\n// Require constants with require(relConstantsPath) instead of require('./constants')\n// so Rollup doesn't generate a constants2.js chunk.\nconst relConstantsPath = './constants'\n// The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']\".\nif (process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']) {\n const Sentry = require('@sentry/node')\n Sentry.init({\n onFatalError(error: Error) {\n // Defer module loads until after Sentry.init is called.\n if (require(relConstantsPath).ENV.SOCKET_CLI_DEBUG) {\n logger.fail('[DEBUG] [Sentry onFatalError]:', error)\n }\n },\n dsn: 'https://66736701db8e4ffac046bd09fa6aaced@o555220.ingest.us.sentry.io/4508846967619585',\n enabled: true,\n integrations: []\n })\n Sentry.setTag(\n 'environment',\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\".\n process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\n ? 'pub'\n : // The NODE_ENV convention is used by apps to define the runtime environment.\n // https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production\n process.env['NODE_ENV']\n )\n Sentry.setTag(\n 'version',\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_VERSION_HASH']\".\n process.env['INLINED_SOCKET_CLI_VERSION_HASH']\n )\n const constants = require(relConstantsPath)\n if (constants.ENV.SOCKET_CLI_DEBUG) {\n Sentry.setTag('debugging', true)\n logger.log('[DEBUG] Set up Sentry.')\n } else {\n Sentry.setTag('debugging', false)\n }\n const {\n kInternalsSymbol,\n [kInternalsSymbol as unknown as 'Symbol(kInternalsSymbol)']: { setSentry }\n } = constants\n setSentry(Sentry)\n} else if (require(relConstantsPath).ENV.SOCKET_CLI_DEBUG) {\n logger.log('[DEBUG] Sentry disabled explicitly.')\n}\n"],"names":["logger","dsn","enabled","integrations","process","Sentry","setSentry"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;;;AAIA;AACA;AACA;AACA;AACoD;AAClD;;;AAGI;;AAEEA;AACF;;AAEFC;AACAC;AACAC;AACF;;AAGE;AACAC;;AAQA;AACAA;AAEF;AACA;AACEC;AACAL;AACF;AACEK;AACF;;;AAGE;AAA+DC;AAAU;AAC3E;;AAEF","debugId":"b2414c60-2740-4931-bee9-243c3bbe685c"}
1
+ {"version":3,"file":"instrument-with-sentry.js","sources":["../../src/instrument-with-sentry.ts"],"sourcesContent":["// This should ONLY be included in the special Sentry build!\n// Otherwise the Sentry dependency won't even be present in the manifest.\n\nimport { logger } from '@socketsecurity/registry/lib/logger'\n\n// Require constants with require(relConstantsPath) instead of require('./constants')\n// so Rollup doesn't generate a constants2.js chunk.\nconst relConstantsPath = './constants'\n// The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']\".\nif (process.env['INLINED_SOCKET_CLI_SENTRY_BUILD']) {\n const Sentry = require('@sentry/node')\n Sentry.init({\n onFatalError(error: Error) {\n // Defer module loads until after Sentry.init is called.\n if (require(relConstantsPath).ENV.SOCKET_CLI_DEBUG) {\n logger.fail('[DEBUG] [Sentry onFatalError]:', error)\n }\n },\n dsn: 'https://66736701db8e4ffac046bd09fa6aaced@o555220.ingest.us.sentry.io/4508846967619585',\n enabled: true,\n integrations: []\n })\n Sentry.setTag(\n 'environment',\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\".\n process.env['INLINED_SOCKET_CLI_PUBLISHED_BUILD']\n ? 'pub'\n : // The NODE_ENV convention is used by apps to define the runtime environment.\n // https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production\n process.env['NODE_ENV']\n )\n Sentry.setTag(\n 'version',\n // The '@rollup/plugin-replace' will replace \"process.env['INLINED_SOCKET_CLI_VERSION_HASH']\".\n process.env['INLINED_SOCKET_CLI_VERSION_HASH']\n )\n const constants = require(relConstantsPath)\n if (constants.ENV.SOCKET_CLI_DEBUG) {\n Sentry.setTag('debugging', true)\n logger.log('[DEBUG] Set up Sentry.')\n } else {\n Sentry.setTag('debugging', false)\n }\n const {\n kInternalsSymbol,\n [kInternalsSymbol as unknown as 'Symbol(kInternalsSymbol)']: { setSentry }\n } = constants\n setSentry(Sentry)\n} else if (require(relConstantsPath).ENV.SOCKET_CLI_DEBUG) {\n logger.log('[DEBUG] Sentry disabled explicitly.')\n}\n"],"names":["logger","dsn","enabled","integrations","process","Sentry","setSentry"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;;;AAIA;AACA;AACA;AACA;AACoD;AAClD;;;AAGI;;AAEEA;AACF;;AAEFC;AACAC;AACAC;AACF;;AAGE;AACAC;;AAQA;AACAA;AAEF;AACA;AACEC;AACAL;AACF;AACEK;AACF;;;AAGE;AAA+DC;AAAU;AAC3E;;AAEF","debugId":"e2a7e44f-121f-464d-9f46-d3200dfb95e9"}
@@ -917,7 +917,7 @@ function emitBanner(name) {
917
917
  logger.logger.error(getAsciiHeader(name))
918
918
  }
919
919
  function getAsciiHeader(command) {
920
- const cliVersion = '0.14.112:79a6e07:49616d8e:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
920
+ const cliVersion = '0.14.114:6709538:d8784340:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
921
921
  const nodeVersion = process$1.version
922
922
  const apiToken = shadowNpmInject.getDefaultToken()
923
923
  const defaultOrg = shadowNpmInject.getConfigValue('defaultOrg')
@@ -4090,14 +4090,14 @@ async function npmFix(
4090
4090
  const testedSpecs = new Set()
4091
4091
  const unavailableSpecs = new Set()
4092
4092
  const revertedSpecs = new Set()
4093
- for (const oldVersion of oldVersions) {
4094
- const oldSpec = `${name}@${oldVersion}`
4095
- const oldPurl = `pkg:npm/${oldSpec}`
4096
- for (const {
4097
- firstPatchedVersionIdentifier,
4098
- vulnerableVersionRange
4099
- } of infos) {
4100
- for (const pkgJsonPath of pkgJsonPaths) {
4093
+ for (const pkgJsonPath of pkgJsonPaths) {
4094
+ for (const oldVersion of oldVersions) {
4095
+ const oldSpec = `${name}@${oldVersion}`
4096
+ const oldPurl = `pkg:npm/${oldSpec}`
4097
+ for (const {
4098
+ firstPatchedVersionIdentifier,
4099
+ vulnerableVersionRange
4100
+ } of infos) {
4101
4101
  const revertTree = arb.idealTree
4102
4102
  arb.idealTree = null
4103
4103
  // eslint-disable-next-line no-await-in-loop
@@ -4509,21 +4509,24 @@ async function pnpmFix(
4509
4509
  const testedSpecs = new Set()
4510
4510
  const unavailableSpecs = new Set()
4511
4511
  const revertedSpecs = new Set()
4512
- for (const oldVersion of oldVersions) {
4513
- const oldSpec = `${name}@${oldVersion}`
4514
- const oldPurl = `pkg:npm/${oldSpec}`
4515
- for (const {
4516
- firstPatchedVersionIdentifier,
4517
- vulnerableVersionRange
4518
- } of infos) {
4519
- debug.debugLog('pkgJsonPaths', pkgJsonPaths)
4520
- for (const pkgJsonPath of pkgJsonPaths) {
4512
+ for (const pkgJsonPath of pkgJsonPaths) {
4513
+ for (const oldVersion of oldVersions) {
4514
+ const oldSpec = `${name}@${oldVersion}`
4515
+ const oldPurl = `pkg:npm/${oldSpec}`
4516
+ for (const {
4517
+ firstPatchedVersionIdentifier,
4518
+ vulnerableVersionRange
4519
+ } of infos) {
4520
+ debug.debugLog('name', name)
4521
+ debug.debugLog('oldVersion', oldVersion)
4522
+ debug.debugLog('pkgJsonPath', pkgJsonPath)
4521
4523
  const node = shadowNpmInject.findPackageNode(
4522
4524
  actualTree,
4523
4525
  name,
4524
4526
  oldVersion
4525
4527
  )
4526
4528
  if (!node) {
4529
+ debug.debugLog('skipping no node', pkgJsonPath)
4527
4530
  continue
4528
4531
  }
4529
4532
  const availableVersions = Object.keys(packument.versions)
@@ -12312,7 +12315,7 @@ void (async () => {
12312
12315
  await vendor.updater({
12313
12316
  name: SOCKET_CLI_BIN_NAME,
12314
12317
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
12315
- version: '0.14.112',
12318
+ version: '0.14.114',
12316
12319
  ttl: 86_400_000 /* 24 hours in milliseconds */
12317
12320
  })
12318
12321
  try {
@@ -12380,5 +12383,5 @@ void (async () => {
12380
12383
  await shadowNpmInject.captureException(e)
12381
12384
  }
12382
12385
  })()
12383
- //# debugId=d1400c3c-29d5-4f5d-9766-57e761274a4b
12386
+ //# debugId=79766fe4-6a25-4f10-93af-69276e4074ab
12384
12387
  //# sourceMappingURL=cli.js.map