@socketsecurity/cli-with-sentry 0.14.127 → 0.14.128
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 +13 -12
- 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 +13 -12
- 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 +2 -2
|
@@ -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.128:ec33790:2e43d170: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=ba17586f-d812-43e4-9ceb-0db3b2084b5a
|
|
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":"ba17586f-d812-43e4-9ceb-0db3b2084b5a"}
|
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.128:ec33790:2e43d170: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')
|
|
@@ -3811,6 +3811,11 @@ async function gitCheckoutBaseBranchIfAvailable(
|
|
|
3811
3811
|
debug.debugLog(e)
|
|
3812
3812
|
}
|
|
3813
3813
|
}
|
|
3814
|
+
async function gitCleanFdx(cwd = process.cwd()) {
|
|
3815
|
+
await spawn.spawn('git', ['clean', '-fdx'], {
|
|
3816
|
+
cwd
|
|
3817
|
+
})
|
|
3818
|
+
}
|
|
3814
3819
|
async function gitCreateAndPushBranchIfNeeded(
|
|
3815
3820
|
branch,
|
|
3816
3821
|
commitMsg,
|
|
@@ -3846,8 +3851,8 @@ async function gitCreateAndPushBranchIfNeeded(
|
|
|
3846
3851
|
})
|
|
3847
3852
|
return true
|
|
3848
3853
|
}
|
|
3849
|
-
async function gitHardReset(cwd = process.cwd()) {
|
|
3850
|
-
await spawn.spawn('git', ['reset', '--hard'], {
|
|
3854
|
+
async function gitHardReset(branch = 'HEAD', cwd = process.cwd()) {
|
|
3855
|
+
await spawn.spawn('git', ['reset', '--hard', branch], {
|
|
3851
3856
|
cwd
|
|
3852
3857
|
})
|
|
3853
3858
|
}
|
|
@@ -4689,13 +4694,11 @@ async function pnpmFix(
|
|
|
4689
4694
|
}
|
|
4690
4695
|
if (errored) {
|
|
4691
4696
|
editablePkgJson.update(revertData)
|
|
4692
|
-
|
|
4693
4697
|
// eslint-disable-next-line no-await-in-loop
|
|
4694
4698
|
await Promise.all([
|
|
4695
4699
|
shadowNpmInject.removeNodeModules(cwd),
|
|
4696
4700
|
editablePkgJson.save()
|
|
4697
4701
|
])
|
|
4698
|
-
|
|
4699
4702
|
// eslint-disable-next-line no-await-in-loop
|
|
4700
4703
|
actualTree = await install(pkgEnvDetails, {
|
|
4701
4704
|
spinner
|
|
@@ -4706,11 +4709,9 @@ async function pnpmFix(
|
|
|
4706
4709
|
)
|
|
4707
4710
|
} else if (isCi) {
|
|
4708
4711
|
// eslint-disable-next-line no-await-in-loop
|
|
4709
|
-
await
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
])
|
|
4713
|
-
|
|
4712
|
+
await gitHardReset(baseBranch, cwd)
|
|
4713
|
+
// eslint-disable-next-line no-await-in-loop
|
|
4714
|
+
await gitCleanFdx(cwd)
|
|
4714
4715
|
// eslint-disable-next-line no-await-in-loop
|
|
4715
4716
|
actualTree = await install(pkgEnvDetails, {
|
|
4716
4717
|
spinner
|
|
@@ -12288,7 +12289,7 @@ void (async () => {
|
|
|
12288
12289
|
await vendor.updater({
|
|
12289
12290
|
name: SOCKET_CLI_BIN_NAME,
|
|
12290
12291
|
// The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
|
|
12291
|
-
version: '0.14.
|
|
12292
|
+
version: '0.14.128',
|
|
12292
12293
|
ttl: 86_400_000 /* 24 hours in milliseconds */
|
|
12293
12294
|
})
|
|
12294
12295
|
try {
|
|
@@ -12356,5 +12357,5 @@ void (async () => {
|
|
|
12356
12357
|
await shadowNpmInject.captureException(e)
|
|
12357
12358
|
}
|
|
12358
12359
|
})()
|
|
12359
|
-
//# debugId=
|
|
12360
|
+
//# debugId=c19d3f6a-66fb-44e0-86a9-334f1e0e0447
|
|
12360
12361
|
//# sourceMappingURL=cli.js.map
|