@degen/common-utils
Advanced tools
Comparing version 1.3.1-thin to 1.3.1
@@ -6,2 +6,3 @@ declare class EnvConstants { | ||
LOG_DNA_DEFAULT: string; | ||
SENTRY_IO_DSN: string; | ||
constructor(config: EnvConstantsType); | ||
@@ -16,2 +17,3 @@ } | ||
LOG_DNA_DEFAULT: string; | ||
SENTRY_IO_DSN: string; | ||
}; |
@@ -16,2 +16,3 @@ "use strict"; | ||
this.LOG_DNA_TOKEN = config.LOG_DNA_TOKEN; | ||
this.SENTRY_IO_DSN = config.SENTRY_IO_DSN; | ||
this.LOG_DNA_DEFAULT = (_a = config.LOG_DNA_DEFAULT) !== null && _a !== void 0 ? _a : 'info'; | ||
@@ -39,2 +40,5 @@ const errors = (0, class_validator_1.validateSync)(this); | ||
], EnvConstants.prototype, "LOG_DNA_DEFAULT", void 0); | ||
__decorate([ | ||
(0, class_validator_1.IsString)() | ||
], EnvConstants.prototype, "SENTRY_IO_DSN", void 0); | ||
exports.default = new EnvConstants({ | ||
@@ -45,3 +49,4 @@ APP_ENV: process.env.APP_ENV, | ||
LOG_DNA_DEFAULT: process.env.LOG_DNA_DEFAULT, | ||
SENTRY_IO_DSN: process.env.SENTRY_IO_DSN, | ||
}); | ||
//# sourceMappingURL=EnvConstants.js.map |
import Log from './Log'; | ||
import LogUtils from './LogUtils'; | ||
import SentryUtils, { command, message_event } from './SentryUtils'; | ||
import { LogOptions } from '@logdna/logger'; | ||
@@ -9,2 +10,3 @@ import EnvConstants from './EnvConstants'; | ||
export { LogOptions }; | ||
export { SentryUtils, command, message_event, }; | ||
export { Log, LogUtils, }; | ||
@@ -11,0 +13,0 @@ export { Validate, }; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -6,3 +29,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ChainListIds = exports.EnvConstants = exports.ValidationError = exports.Validate = exports.LogUtils = exports.Log = void 0; | ||
exports.ChainListIds = exports.EnvConstants = exports.ValidationError = exports.Validate = exports.LogUtils = exports.Log = exports.message_event = exports.command = exports.SentryUtils = void 0; | ||
const Log_1 = __importDefault(require("./Log")); | ||
@@ -12,2 +35,6 @@ exports.Log = Log_1.default; | ||
exports.LogUtils = LogUtils_1.default; | ||
const SentryUtils_1 = __importStar(require("./SentryUtils")); | ||
exports.SentryUtils = SentryUtils_1.default; | ||
Object.defineProperty(exports, "command", { enumerable: true, get: function () { return SentryUtils_1.command; } }); | ||
Object.defineProperty(exports, "message_event", { enumerable: true, get: function () { return SentryUtils_1.message_event; } }); | ||
const EnvConstants_1 = __importDefault(require("./EnvConstants")); | ||
@@ -14,0 +41,0 @@ exports.EnvConstants = EnvConstants_1.default; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -6,2 +29,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Sentry = __importStar(require("@sentry/node")); | ||
const Log_1 = __importDefault(require("./Log")); | ||
@@ -47,2 +71,3 @@ const EnvConstants_1 = __importDefault(require("./EnvConstants")); | ||
if (error != null && error instanceof Error) { | ||
Sentry.captureException(error); | ||
Log_1.default.error(message, { | ||
@@ -49,0 +74,0 @@ indexMeta: true, |
{ | ||
"name": "@degen/common-utils", | ||
"version": "1.3.1-thin", | ||
"version": "1.3.1", | ||
"description": "NPM package containing common utilities for various node projects.", | ||
@@ -23,12 +23,10 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@logdna/logger": "^2.6.4", | ||
"@sentry/integrations": "^6.19.7", | ||
"@sentry/node": "^6.19.7", | ||
"@sentry/tracing": "^6.19.7", | ||
"@logdna/logger": "^2.6.6", | ||
"@sentry/integrations": "^7.7.0", | ||
"@sentry/node": "^7.7.0", | ||
"@sentry/tracing": "^7.7.0", | ||
"discord.js": "13.7.0", | ||
"slash-create": "5.6.1" | ||
"slash-create": "5.7.1" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^16.2.3", | ||
"@commitlint/config-conventional": "^16.2.1", | ||
"@types/jest": "~27.4.1", | ||
@@ -43,3 +41,2 @@ "@types/node": "^16.11.26", | ||
"jest": "~27.4.7", | ||
"standard-version": "^9.3.2", | ||
"ts-jest": "^27.1.4", | ||
@@ -50,3 +47,3 @@ "typescript": "^4.6.3" | ||
"discord.js": "13.7.0", | ||
"slash-create": "5.6.1" | ||
"slash-create": "5.7.1" | ||
}, | ||
@@ -53,0 +50,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
61299
11
26
709
1
6
+ Added@sentry-internal/tracing@7.120.0(transitive)
+ Added@sentry/core@7.120.0(transitive)
+ Added@sentry/integrations@7.120.0(transitive)
+ Added@sentry/node@7.120.0(transitive)
+ Added@sentry/tracing@7.120.0(transitive)
+ Added@sentry/types@7.120.0(transitive)
+ Added@sentry/utils@7.120.0(transitive)
+ Addedslash-create@5.7.1(transitive)
- Removed@sentry/core@6.19.7(transitive)
- Removed@sentry/hub@6.19.7(transitive)
- Removed@sentry/integrations@6.19.7(transitive)
- Removed@sentry/minimal@6.19.7(transitive)
- Removed@sentry/node@6.19.7(transitive)
- Removed@sentry/tracing@6.19.7(transitive)
- Removed@sentry/types@6.19.7(transitive)
- Removed@sentry/utils@6.19.7(transitive)
- Removedagent-base@6.0.2(transitive)
- Removedcookie@0.4.2(transitive)
- Removedhttps-proxy-agent@5.0.1(transitive)
- Removedlru_map@0.3.3(transitive)
- Removedslash-create@5.6.1(transitive)
- Removedtslib@1.14.1(transitive)
Updated@logdna/logger@^2.6.6
Updated@sentry/integrations@^7.7.0
Updated@sentry/node@^7.7.0
Updated@sentry/tracing@^7.7.0
Updatedslash-create@5.7.1