@socketsecurity/cli-with-sentry 0.14.44
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/LICENSE +21 -0
- package/README.md +121 -0
- package/bin/cli.js +57 -0
- package/bin/npm-cli.js +6 -0
- package/bin/npx-cli.js +6 -0
- package/dist/constants.d.ts +162 -0
- package/dist/constants.js +8 -0
- package/dist/constants.js.map +1 -0
- package/dist/init.gradle +250 -0
- package/dist/instrument-with-sentry.d.ts +1 -0
- package/dist/instrument-with-sentry.js +58 -0
- package/dist/instrument-with-sentry.js.map +1 -0
- package/dist/module-sync/cli.d.ts +2 -0
- package/dist/module-sync/cli.js +6851 -0
- package/dist/module-sync/cli.js.map +1 -0
- package/dist/module-sync/constants.js +3 -0
- package/dist/module-sync/constants2.d.ts +0 -0
- package/dist/module-sync/constants2.js +231 -0
- package/dist/module-sync/constants2.js.map +1 -0
- package/dist/module-sync/debug.d.ts +3 -0
- package/dist/module-sync/edge.d.ts +66 -0
- package/dist/module-sync/errors.d.ts +14 -0
- package/dist/module-sync/index.d.ts +192 -0
- package/dist/module-sync/index.js +1879 -0
- package/dist/module-sync/index.js.map +1 -0
- package/dist/module-sync/logging.d.ts +16 -0
- package/dist/module-sync/node.d.ts +84 -0
- package/dist/module-sync/npm-injection.d.ts +1 -0
- package/dist/module-sync/npm-injection.js +26 -0
- package/dist/module-sync/npm-injection.js.map +1 -0
- package/dist/module-sync/npm-paths.d.ts +15 -0
- package/dist/module-sync/npm-paths.js +423 -0
- package/dist/module-sync/npm-paths.js.map +1 -0
- package/dist/module-sync/npm.d.ts +24 -0
- package/dist/module-sync/npm.js +99 -0
- package/dist/module-sync/npm.js.map +1 -0
- package/dist/module-sync/path-resolve.d.ts +12 -0
- package/dist/module-sync/proc-log.d.ts +3 -0
- package/dist/module-sync/reify.d.ts +1018 -0
- package/dist/module-sync/sdk.d.ts +5 -0
- package/dist/module-sync/settings.d.ts +15 -0
- package/dist/module-sync/shadow-bin.d.ts +2 -0
- package/dist/module-sync/shadow-bin.js +103 -0
- package/dist/module-sync/shadow-bin.js.map +1 -0
- package/dist/module-sync/types.d.ts +45 -0
- package/dist/require/cli.js +6848 -0
- package/dist/require/constants.js +3 -0
- package/dist/require/index.js +3 -0
- package/dist/require/npm-injection.js +3 -0
- package/dist/require/npm-paths.js +3 -0
- package/dist/require/npm.js +3 -0
- package/dist/require/shadow-bin.js +3 -0
- package/dist/require/vendor.js +11474 -0
- package/package.json +245 -0
- package/shadow-bin/npm +4 -0
- package/shadow-bin/npx +4 -0
- package/translations.json +592 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _socketInterop(e) {
|
|
4
|
+
let c = 0
|
|
5
|
+
for (const k in e ?? {}) {
|
|
6
|
+
c = c === 0 && k === 'default' ? 1 : 0
|
|
7
|
+
if (!c && k !== '__esModule') break
|
|
8
|
+
}
|
|
9
|
+
return c ? e.default : e
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var require$$0 = _socketInterop(require('@sentry/node'));
|
|
13
|
+
var constants = require('./constants2.js');
|
|
14
|
+
|
|
15
|
+
var instrumentWithSentry = {};
|
|
16
|
+
|
|
17
|
+
// This should ONLY be included in the special Sentry build!
|
|
18
|
+
// Otherwise the Sentry dependency won't even be present in the manifest.
|
|
19
|
+
|
|
20
|
+
// The '@rollup/plugin-replace' will replace "process.env['SOCKET_CLI_SENTRY_BUILD']".
|
|
21
|
+
{
|
|
22
|
+
const Sentry = require$$0;
|
|
23
|
+
Sentry.init({
|
|
24
|
+
onFatalError(error) {
|
|
25
|
+
// Defer module loads until after Sentry.init is called.
|
|
26
|
+
if (constants.require$$1.ENV.SOCKET_CLI_DEBUG) {
|
|
27
|
+
console.error('[DEBUG] [Sentry onFatalError]:', error);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
dsn: 'https://66736701db8e4ffac046bd09fa6aaced@o555220.ingest.us.sentry.io/4508846967619585',
|
|
31
|
+
enabled: true,
|
|
32
|
+
integrations: []
|
|
33
|
+
});
|
|
34
|
+
Sentry.setTag('environment',
|
|
35
|
+
// The '@rollup/plugin-replace' will replace "process.env['SOCKET_CLI_PUBLISHED_BUILD']".
|
|
36
|
+
'pub' );
|
|
37
|
+
Sentry.setTag('version',
|
|
38
|
+
// The '@rollup/plugin-replace' will replace "process.env['SOCKET_CLI_VERSION_HASH']".
|
|
39
|
+
"0.14.44:d759761:ba5ca849:pub");
|
|
40
|
+
const constants$1 = constants.require$$1;
|
|
41
|
+
if (constants$1.ENV.SOCKET_CLI_DEBUG) {
|
|
42
|
+
Sentry.setTag('debugging', true);
|
|
43
|
+
console.log('[DEBUG] Set up Sentry.');
|
|
44
|
+
} else {
|
|
45
|
+
Sentry.setTag('debugging', false);
|
|
46
|
+
}
|
|
47
|
+
const {
|
|
48
|
+
kInternalsSymbol,
|
|
49
|
+
[kInternalsSymbol]: {
|
|
50
|
+
setSentry
|
|
51
|
+
}
|
|
52
|
+
} = constants$1;
|
|
53
|
+
setSentry(Sentry);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
module.exports = instrumentWithSentry;
|
|
57
|
+
//# debugId=9ffcf668-7565-4e0f-b4dd-d1c71b2a7e83
|
|
58
|
+
//# sourceMappingURL=instrument-with-sentry.js.map
|
|
@@ -0,0 +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\n// The '@rollup/plugin-replace' will replace \"process.env['SOCKET_CLI_SENTRY_BUILD']\".\nif (process.env['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('./constants').ENV.SOCKET_CLI_DEBUG) {\n console.error('[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['SOCKET_CLI_PUBLISHED_BUILD']\".\n process.env['SOCKET_CLI_PUBLISHED_BUILD'] ? 'pub' : process.env['NODE_ENV']\n )\n Sentry.setTag(\n 'version',\n // The '@rollup/plugin-replace' will replace \"process.env['SOCKET_CLI_VERSION_HASH']\".\n process.env['SOCKET_CLI_VERSION_HASH']\n )\n const constants = require('./constants')\n if (constants.ENV.SOCKET_CLI_DEBUG) {\n Sentry.setTag('debugging', true)\n console.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('./constants').ENV.SOCKET_CLI_DEBUG) {\n console.log('[DEBUG] Sentry disabled explicitly.')\n}\n"],"names":["console","dsn","enabled","integrations","process","Sentry","setSentry"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;;AAEA;AAC4C;AAC1C;;;AAGI;;AAEEA;AACF;;AAEFC;AACAC;AACAC;AACF;;AAGE;AACAC;;AAIA;AACAA;AAEF;AACA;AACEC;AACAL;AACF;AACEK;AACF;;;AAGE;AAA+DC;AAAU;AAC3E;;AAEF;;","debugId":"9ffcf668-7565-4e0f-b4dd-d1c71b2a7e83"}
|