From 1adaaec3d948cfa4c81013d4bdbd0d21f3a97797 Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Fri, 15 Apr 2022 02:44:09 +0200 Subject: [PATCH] fix(seq): remove deprecated package `@tsed/seq` BREAKING CHANGE: `@tsed/seq` have been removed. Use logger seq configuration instead --- packages/third-parties/seq/.npmignore | 4 - packages/third-parties/seq/package.json | 52 --------- packages/third-parties/seq/readme.md | 105 ------------------ packages/third-parties/seq/src/SeqModule.ts | 28 ----- packages/third-parties/seq/src/index.ts | 2 - .../seq/src/interfaces/LoggerSeqSettings.ts | 4 - .../third-parties/seq/src/interfaces/index.ts | 11 -- .../seq/tsconfig.compile.esm.json | 12 -- .../third-parties/seq/tsconfig.compile.json | 9 -- 9 files changed, 227 deletions(-) delete mode 100644 packages/third-parties/seq/.npmignore delete mode 100644 packages/third-parties/seq/package.json delete mode 100644 packages/third-parties/seq/readme.md delete mode 100644 packages/third-parties/seq/src/SeqModule.ts delete mode 100644 packages/third-parties/seq/src/index.ts delete mode 100644 packages/third-parties/seq/src/interfaces/LoggerSeqSettings.ts delete mode 100644 packages/third-parties/seq/src/interfaces/index.ts delete mode 100644 packages/third-parties/seq/tsconfig.compile.esm.json delete mode 100644 packages/third-parties/seq/tsconfig.compile.json diff --git a/packages/third-parties/seq/.npmignore b/packages/third-parties/seq/.npmignore deleted file mode 100644 index 7f50c0fb80c..00000000000 --- a/packages/third-parties/seq/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -src -test -tsconfig.compile.json -tsconfig.json diff --git a/packages/third-parties/seq/package.json b/packages/third-parties/seq/package.json deleted file mode 100644 index e927084d89e..00000000000 --- a/packages/third-parties/seq/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@tsed/seq", - "version": "7.0.0-beta.8", - "description": "Seq package for Ts.ED framework", - "private": false, - "author": { - "name": "OskarLebuda" - }, - "contributors": [ - { - "name": "OskarLebuda" - }, - { - "name": "Romain Lenzotti" - } - ], - "source": "./src/index.ts", - "main": "./lib/cjs/index.js", - "module": "./lib/esm/index.js", - "typings": "./lib/types/index.d.ts", - "exports": { - "types": "./lib/types/index.d.ts", - "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js", - "default": "./lib/esm/index.js" - }, - "scripts": { - "build": "yarn run build:esm && yarn run build:cjs", - "build:cjs": "tsc --build tsconfig.compile.json", - "build:esm": "tsc --build tsconfig.compile.esm.json" - }, - "dependencies": { - "@tsed/logger-seq": ">=6.0.0", - "tslib": "2.3.1" - }, - "devDependencies": { - "@tsed/common": "7.0.0-beta.8", - "@tsed/core": "7.0.0-beta.8" - }, - "peerDependencies": { - "@tsed/common": "^7.0.0-beta.8", - "@tsed/core": "^7.0.0-beta.8", - "@tsed/di": "^7.0.0-beta.8", - "@tsed/json-mapper": "^7.0.0-beta.8", - "@tsed/logger": ">=6.1.1", - "@tsed/openspec": "^7.0.0-beta.8", - "@tsed/schema": "^7.0.0-beta.8" - }, - "publishConfig": { - "tag": "deprecated" - } -} \ No newline at end of file diff --git a/packages/third-parties/seq/readme.md b/packages/third-parties/seq/readme.md deleted file mode 100644 index 4b8c0b12856..00000000000 --- a/packages/third-parties/seq/readme.md +++ /dev/null @@ -1,105 +0,0 @@ -

- Ts.ED logo -

- -
-

Seq

- -[![Build & Release](https://github.com/tsedio/tsed/workflows/Build%20&%20Release/badge.svg)](https://github.com/tsedio/tsed/actions?query=workflow%3A%22Build+%26+Release%22) -[![PR Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/tsedio/tsed/blob/master/CONTRIBUTING.md) -[![Coverage Status](https://coveralls.io/repos/github/tsedio/tsed/badge.svg?branch=production)](https://coveralls.io/github/tsedio/tsed?branch=production) -[![npm version](https://badge.fury.io/js/%40tsed%2Fcommon.svg)](https://badge.fury.io/js/%40tsed%2Fcommon) -[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) -[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) -[![backers](https://opencollective.com/tsed/tiers/badge.svg)](https://opencollective.com/tsed) - -
- -
- Website -   •   - Getting started -   •   - Slack -   •   - Twitter -
- -
- -A package of Ts.ED framework. See website: https://tsed.io/#/tutorials/seq - -## Installation - -Run npm command (or yarn): - -```bash -npm install --save @tsed/seq bunyan bunyan-seq @types/bunyan @types/bunyan-seq -``` - -Then add the following configuration in your Server: - -```typescript -import {Configuration} from "@tsed/common"; -import "@tsed/seq"; // import seq Ts.ED module - -@Configuration({ - seq: { - url: "http://localhost:5341" - } -}) -export class Server {} -``` - -> Note: Seq module use the [@tsed/logger](https://logger.tsed.io) as a default system logger - -> Note: Seq module use the log level from the [LoggerSettings](https://tsed.io/api/common/config/interfaces/ILoggerSettings.md) (default level is debug) - -## Example - -```typescript -import {Controller, Get, QueryParams} from "@tsed/common"; -import {$log} from "@tsed/logger"; - -@Controller("/calendars") -export class Calendar { - @Get("/:id") - async getCalendar(@QueryParams("id") id: string): Promise { - $log.info(id); - } -} -``` - -Then we should see the log in the Seq panel (by default `localhost:80`) - -## Maintainer - -Thanks to [OskarLebuda](https://github.com/OskarLebuda) to his contribution. - -## Contributors - -Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html) - - - -## Backers - -Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)] - - - -## Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)] - -## License - -The MIT License (MIT) - -Copyright (c) 2016 - 2018 Romain Lenzotti - OskarLebuda - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/third-parties/seq/src/SeqModule.ts b/packages/third-parties/seq/src/SeqModule.ts deleted file mode 100644 index 5f4e07a9300..00000000000 --- a/packages/third-parties/seq/src/SeqModule.ts +++ /dev/null @@ -1,28 +0,0 @@ -import {AfterRoutesInit, Inject, InjectorService} from "@tsed/common"; -import {Constant, Module} from "@tsed/di"; -import "@tsed/logger-seq"; -import {LoggerSeqSettings} from "./interfaces/LoggerSeqSettings"; - -@Module({}) -export class SeqModule implements AfterRoutesInit { - @Constant("seq", { - url: "http://localhost:5341" - }) - private config: LoggerSeqSettings; - - @Inject() - private injector: InjectorService; - - $afterRoutesInit() { - if (this.injector.logger && this.injector.logger.appenders) { - this.injector.logger.appenders.set("seq", { - type: "seq", - levels: ["info", "debug", "trace", "fatal", "error", "warn"], - options: { - serverUrl: this.config.url, - ...this.config - } - }); - } - } -} diff --git a/packages/third-parties/seq/src/index.ts b/packages/third-parties/seq/src/index.ts deleted file mode 100644 index 93cb62762a6..00000000000 --- a/packages/third-parties/seq/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./interfaces/index"; -export * from "./SeqModule"; diff --git a/packages/third-parties/seq/src/interfaces/LoggerSeqSettings.ts b/packages/third-parties/seq/src/interfaces/LoggerSeqSettings.ts deleted file mode 100644 index 51a202dab65..00000000000 --- a/packages/third-parties/seq/src/interfaces/LoggerSeqSettings.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface LoggerSeqSettings { - url?: string; - apiKey?: string; -} diff --git a/packages/third-parties/seq/src/interfaces/index.ts b/packages/third-parties/seq/src/interfaces/index.ts deleted file mode 100644 index 719beed4dbc..00000000000 --- a/packages/third-parties/seq/src/interfaces/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {LoggerSeqSettings} from "./LoggerSeqSettings"; - -declare global { - namespace TsED { - interface Configuration { - seq: LoggerSeqSettings; - } - } -} - -export * from "./LoggerSeqSettings"; diff --git a/packages/third-parties/seq/tsconfig.compile.esm.json b/packages/third-parties/seq/tsconfig.compile.esm.json deleted file mode 100644 index 06456ae6499..00000000000 --- a/packages/third-parties/seq/tsconfig.compile.esm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "./tsconfig.compile.json", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "rootDir": "src", - "outDir": "./lib/esm", - "declaration": true, - "declarationDir": "./lib/types" - }, - "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"] -} diff --git a/packages/third-parties/seq/tsconfig.compile.json b/packages/third-parties/seq/tsconfig.compile.json deleted file mode 100644 index 5f397a0f01b..00000000000 --- a/packages/third-parties/seq/tsconfig.compile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../../tsconfig.compile.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "lib/cjs", - "declaration": false - }, - "exclude": ["node_modules", "test", "lib", "coverage", ".nyc_output", "**/*.spec.ts"] -}