@alterior/logging
Advanced tools
Comparing version 3.0.0-beta.62 to 3.0.0-beta.66
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./inspect"), exports); | ||
__exportStar(require("./logger"), exports); | ||
__exportStar(require("./trace"), exports); | ||
__exportStar(require("./logging.module"), exports); | ||
var tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./inspect"), exports); | ||
tslib_1.__exportStar(require("./logger"), exports); | ||
tslib_1.__exportStar(require("./trace"), exports); | ||
tslib_1.__exportStar(require("./logging.module"), exports); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DEFAULT_LISTENERS = exports.DEFAULT_FORMAT = exports.Logger = exports.ZonedLogger = exports.FileLogger = exports.ConsoleLogger = exports.LogFormatter = exports.LoggingOptionsRef = void 0; | ||
var tslib_1 = require("tslib"); | ||
var di_1 = require("@alterior/di"); | ||
var runtime_1 = require("@alterior/runtime"); | ||
var fs = require("fs"); | ||
var fs = tslib_1.__importStar(require("fs")); | ||
var inspect_1 = require("./inspect"); | ||
@@ -152,5 +92,5 @@ var LoggingOptionsRef = /** @class */ (function () { | ||
ConsoleLogger.prototype.log = function (message) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var messageText, finalMessage, finalMessageStr; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
messageText = message.message; | ||
@@ -193,5 +133,5 @@ if (message.type === 'inspect') { | ||
FileLogger.prototype.open = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -218,5 +158,5 @@ case 0: | ||
FileLogger.prototype.write = function (str) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var fd; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -244,5 +184,5 @@ case 0: return [4 /*yield*/, this.open()]; | ||
FileLogger.prototype.log = function (message) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var formattedMessage; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -378,5 +318,5 @@ case 0: | ||
ZonedLogger.prototype.withContext = function (context, label, callback) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var zone; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -402,3 +342,3 @@ case 0: | ||
var Logger = /** @class */ (function (_super) { | ||
__extends(Logger, _super); | ||
tslib_1.__extends(Logger, _super); | ||
function Logger(optionsRef, app) { | ||
@@ -428,6 +368,6 @@ return _super.call(this, optionsRef, app) || this; | ||
var Logger_1; | ||
Logger = Logger_1 = __decorate([ | ||
Logger = Logger_1 = tslib_1.__decorate([ | ||
di_1.Injectable(), | ||
__param(0, di_1.Optional()), | ||
__metadata("design:paramtypes", [LoggingOptionsRef, | ||
tslib_1.__param(0, di_1.Optional()), | ||
tslib_1.__metadata("design:paramtypes", [LoggingOptionsRef, | ||
runtime_1.Application]) | ||
@@ -434,0 +374,0 @@ ], Logger); |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LoggingModule = void 0; | ||
var tslib_1 = require("tslib"); | ||
var di_1 = require("@alterior/di"); | ||
@@ -25,3 +20,3 @@ var logger_1 = require("./logger"); | ||
var LoggingModule_1; | ||
LoggingModule = LoggingModule_1 = __decorate([ | ||
LoggingModule = LoggingModule_1 = tslib_1.__decorate([ | ||
di_1.Module({ | ||
@@ -28,0 +23,0 @@ providers: [ |
@@ -5,15 +5,5 @@ "use strict"; | ||
*/ | ||
var __values = (this && this.__values) || function(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ReportExceptionsToConsole = exports.Trace = exports.setTracingEnabled = exports.getTracingEnabled = void 0; | ||
var tslib_1 = require("tslib"); | ||
var annotations_1 = require("@alterior/annotations"); | ||
@@ -124,3 +114,3 @@ var common_1 = require("@alterior/common"); | ||
try { | ||
for (var args_1 = __values(args), args_1_1 = args_1.next(); !args_1_1.done; args_1_1 = args_1.next()) { | ||
for (var args_1 = tslib_1.__values(args), args_1_1 = args_1.next(); !args_1_1.done; args_1_1 = args_1.next()) { | ||
var arg = args_1_1.value; | ||
@@ -127,0 +117,0 @@ if (arg === null) |
{ | ||
"name": "@alterior/logging", | ||
"version": "3.0.0-beta.62", | ||
"version": "3.0.0-beta.66", | ||
"access": "public", | ||
@@ -10,7 +10,12 @@ "publishConfig": { | ||
"main": "./dist/index.js", | ||
"module": "./dist.esm/index.js", | ||
"typings": "./dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc -p .", | ||
"clean": "rimraf dist && rimraf dist.esm", | ||
"build": "npm run clean && npm run build:cjs && npm run build:esm", | ||
"build:cjs": "tsc -p .", | ||
"build:esm": "tsc -p tsconfig.esm.json", | ||
"prepare": "npm run test", | ||
"test": "npm run build && node dist/test.js" | ||
"test": "npm run build && node dist/test.js", | ||
"docs": "typedoc ." | ||
}, | ||
@@ -28,6 +33,6 @@ "repository": { | ||
"dependencies": { | ||
"@alterior/annotations": "^3.0.0-beta.62", | ||
"@alterior/common": "^3.0.0-beta.62", | ||
"@alterior/di": "^3.0.0-beta.62", | ||
"@alterior/runtime": "^3.0.0-beta.62", | ||
"@alterior/annotations": "^3.0.0-beta.66", | ||
"@alterior/common": "^3.0.0-beta.66", | ||
"@alterior/di": "^3.0.0-beta.66", | ||
"@alterior/runtime": "^3.0.0-beta.66", | ||
"dotenv": "^6.0.0", | ||
@@ -44,6 +49,7 @@ "rxjs": "^6.5.5" | ||
"chai": "^4.2.0", | ||
"razmin": "^0.6.10", | ||
"razmin": "^0.6.11", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^3.9.3" | ||
}, | ||
"gitHead": "5dd294650d98114b091f32d47feafbe3413880e4" | ||
"gitHead": "e88f5f0cd30ed482ef2fd13e9eecf68e5a976de1" | ||
} |
@@ -5,12 +5,18 @@ { | ||
"baseUrl": "./src", | ||
"outDir": "./dist", | ||
"typeRoots": [ | ||
"./node_modules/@types", | ||
"./node_modules" | ||
], | ||
"types": [ | ||
"node" | ||
] | ||
"outDir": "./dist" | ||
}, | ||
"include": [ "./src/**/*.ts" ] | ||
"include": [ "./src/**/*.ts" ], | ||
"typedocOptions": { | ||
"mode": "file", | ||
"out": "../../docs/logging", | ||
"target": "ES5", | ||
"excludeExternals": true, | ||
"excludePrivate": true, | ||
"externalPattern": "**/node_modules/**", | ||
"exclude": "**/node_modules/**,**/dist*/**,**/example/**,**/*.test.ts", | ||
"categoryOrder": [ | ||
"Entrypoint", | ||
"*" | ||
] | ||
} | ||
} |
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
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
180962
54
2623
7
3