@socketsecurity/cli-with-sentry 0.14.108 → 0.14.110
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/instrument-with-sentry.js +2 -2
- package/dist/instrument-with-sentry.js.map +1 -1
- package/dist/module-sync/cli.js +18 -4
- package/dist/module-sync/cli.js.map +1 -1
- package/dist/module-sync/shadow-npm-inject.js +2 -2
- package/dist/module-sync/shadow-npm-inject.js.map +1 -1
- package/dist/require/cli.js +18 -4
- package/dist/require/cli.js.map +1 -1
- package/dist/require/shadow-npm-inject.js +2 -2
- package/dist/require/shadow-npm-inject.js.map +1 -1
- package/package.json +1 -1
- package/dist/module-sync/fs.d.ts +0 -61
|
@@ -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.
|
|
44
|
+
'0.14.110:bce799e:490fe869: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=
|
|
59
|
+
//# debugId=3efb1e59-0327-4c9e-8335-27f75df55aed
|
|
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":"
|
|
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":"3efb1e59-0327-4c9e-8335-27f75df55aed"}
|
package/dist/module-sync/cli.js
CHANGED
|
@@ -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.
|
|
920
|
+
const cliVersion = '0.14.110:bce799e:490fe869: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')
|
|
@@ -3828,6 +3828,11 @@ async function gitCreateAndPushBranchIfNeeded(
|
|
|
3828
3828
|
basename === 'pnpm-lock.yaml'
|
|
3829
3829
|
)
|
|
3830
3830
|
})
|
|
3831
|
+
debug.debugLog('branch', branch)
|
|
3832
|
+
debug.debugLog(
|
|
3833
|
+
'gitCreateAndPushBranchIfNeeded > moddedFilepaths',
|
|
3834
|
+
moddedFilepaths
|
|
3835
|
+
)
|
|
3831
3836
|
if (moddedFilepaths.length) {
|
|
3832
3837
|
await spawn.spawn('git', ['add', ...moddedFilepaths], {
|
|
3833
3838
|
cwd
|
|
@@ -4626,19 +4631,24 @@ async function pnpmFix(
|
|
|
4626
4631
|
if (updateData) {
|
|
4627
4632
|
editablePkgJson.update(updateData)
|
|
4628
4633
|
}
|
|
4629
|
-
shadowNpmInject.updatePackageJsonFromNode(
|
|
4634
|
+
const modded = shadowNpmInject.updatePackageJsonFromNode(
|
|
4630
4635
|
editablePkgJson,
|
|
4631
4636
|
actualTree,
|
|
4632
4637
|
node,
|
|
4633
4638
|
newVersion,
|
|
4634
4639
|
rangeStyle
|
|
4635
4640
|
)
|
|
4641
|
+
debug.debugLog('updatePackageJsonFromNode', modded)
|
|
4642
|
+
debug.debugLog(branch, editablePkgJson.filename)
|
|
4636
4643
|
let error
|
|
4637
4644
|
let errored = false
|
|
4638
4645
|
let installed = false
|
|
4639
4646
|
|
|
4640
4647
|
// eslint-disable-next-line no-await-in-loop
|
|
4641
4648
|
if (!(await editablePkgJson.save())) {
|
|
4649
|
+
debug.debugLog(
|
|
4650
|
+
`Skipping nothing changed in ${editablePkgJson.filename}`
|
|
4651
|
+
)
|
|
4642
4652
|
continue
|
|
4643
4653
|
}
|
|
4644
4654
|
if (!installedSpecs.has(newSpecKey)) {
|
|
@@ -4671,13 +4681,17 @@ async function pnpmFix(
|
|
|
4671
4681
|
error = e
|
|
4672
4682
|
errored = true
|
|
4673
4683
|
}
|
|
4684
|
+
debug.debugLog('check "shouldOpenPr":', shouldOpenPr)
|
|
4685
|
+
debug.debugLog('check "errored":', errored)
|
|
4674
4686
|
if (!errored && shouldOpenPr) {
|
|
4687
|
+
debug.debugLog('1: gitCreateAndPushBranchIfNeeded')
|
|
4675
4688
|
// eslint-disable-next-line no-await-in-loop
|
|
4676
4689
|
await gitCreateAndPushBranchIfNeeded(
|
|
4677
4690
|
branch,
|
|
4678
4691
|
getSocketCommitMessage(oldPurl, newVersion, workspaceName),
|
|
4679
4692
|
cwd
|
|
4680
4693
|
)
|
|
4694
|
+
debug.debugLog('2: openGitHubPullRequest')
|
|
4681
4695
|
// eslint-disable-next-line no-await-in-loop
|
|
4682
4696
|
const prResponse = await openGitHubPullRequest(
|
|
4683
4697
|
owner,
|
|
@@ -12295,7 +12309,7 @@ void (async () => {
|
|
|
12295
12309
|
await vendor.updater({
|
|
12296
12310
|
name: SOCKET_CLI_BIN_NAME,
|
|
12297
12311
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
12298
|
-
version: '0.14.
|
|
12312
|
+
version: '0.14.110',
|
|
12299
12313
|
ttl: 86_400_000 /* 24 hours in milliseconds */
|
|
12300
12314
|
})
|
|
12301
12315
|
try {
|
|
@@ -12363,5 +12377,5 @@ void (async () => {
|
|
|
12363
12377
|
await shadowNpmInject.captureException(e)
|
|
12364
12378
|
}
|
|
12365
12379
|
})()
|
|
12366
|
-
//# debugId=
|
|
12380
|
+
//# debugId=6e5eec15-0ea0-46ad-90c2-b1d3435c8a63
|
|
12367
12381
|
//# sourceMappingURL=cli.js.map
|