diff --git a/jest.config.js b/jest.config.js index 204a5e0e..5aca79c5 100644 --- a/jest.config.js +++ b/jest.config.js @@ -18,7 +18,7 @@ export default { coveragePathIgnorePatterns: ['index.ts', '/node_modules/'], moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', - '^@tsed/logger$': '/packages/logger/src/node/index.ts', + '^@tsed/logger$': '/packages/logger/src/index.ts', }, // An object that configures minimum threshold enforcement for coverage results diff --git a/packages/connect/.npmignore b/packages/connect/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/connect/.npmignore +++ b/packages/connect/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/file/.npmignore b/packages/file/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/file/.npmignore +++ b/packages/file/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/insight/.npmignore b/packages/insight/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/insight/.npmignore +++ b/packages/insight/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/logentries/.npmignore b/packages/logentries/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/logentries/.npmignore +++ b/packages/logentries/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/logger/.npmignore b/packages/logger/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/logger/.npmignore +++ b/packages/logger/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/logger/package.json b/packages/logger/package.json index 3dd29c70..6aeb1ff9 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -6,17 +6,17 @@ "name": "Romain Lenzotti" }, "license": "MIT", - "source": "./src/node/index.ts", - "main": "./lib/cjs/node/index.js", - "module": "./lib/esm/node/index.js", + "source": "./src/index.ts", + "main": "./lib/cjs/index.js", + "module": "./lib/esm/index.js", "browser": "./lib/browser/logger.umd.js", - "typings": "./lib/types/node/index.d.ts", + "typings": "./lib/types/index.d.ts", "exports": { - "types": "./lib/types/node/index.d.ts", + "types": "./lib/types/index.d.ts", "browser": "./lib/browser/logger.umd.js", - "import": "./lib/esm/node/index.js", - "require": "./lib/cjs/node/index.js", - "default": "./lib/esm/node/index.js" + "import": "./lib/esm/index.js", + "require": "./lib/cjs/index.js", + "default": "./lib/esm/index.js" }, "scripts": { "build": "yarn barrels && yarn run build:esm && yarn run build:cjs && yarn run build:browser", @@ -52,4 +52,4 @@ "vite": "5.1.6" }, "peerDependencies": {} -} \ No newline at end of file +} diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts new file mode 100644 index 00000000..4e2b5f55 --- /dev/null +++ b/packages/logger/src/index.ts @@ -0,0 +1,2 @@ +export * from "./common/index"; +export * from "./node/index"; diff --git a/packages/logger/src/logger.integration.spec.ts b/packages/logger/src/logger.integration.spec.ts index 3581f123..09df4d22 100644 --- a/packages/logger/src/logger.integration.spec.ts +++ b/packages/logger/src/logger.integration.spec.ts @@ -1,4 +1,4 @@ -import {Logger} from "./node"; +import {Logger} from "./index"; describe("Logger integration", () => { it("should log only on trace", () => { diff --git a/packages/logger/src/node/exports.ts b/packages/logger/src/node/exports.ts index af160ce7..aee29180 100644 --- a/packages/logger/src/node/exports.ts +++ b/packages/logger/src/node/exports.ts @@ -4,8 +4,6 @@ import {LayoutReplacer, Logger} from "../common/index"; import "./appenders/StdoutAppender"; import "./appenders/StderrAppender"; -export * from "../common/index"; - export const $log: Logger = new Logger("default"); $log.appenders diff --git a/packages/loggly/.npmignore b/packages/loggly/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/loggly/.npmignore +++ b/packages/loggly/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/logstash-http/.npmignore b/packages/logstash-http/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/logstash-http/.npmignore +++ b/packages/logstash-http/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/logstash-udp/.npmignore b/packages/logstash-udp/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/logstash-udp/.npmignore +++ b/packages/logstash-udp/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/rabbitmq/.npmignore b/packages/rabbitmq/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/rabbitmq/.npmignore +++ b/packages/rabbitmq/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/seq/.npmignore b/packages/seq/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/seq/.npmignore +++ b/packages/seq/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/slack/.npmignore b/packages/slack/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/slack/.npmignore +++ b/packages/slack/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo diff --git a/packages/smtp/.npmignore b/packages/smtp/.npmignore index 3fbb508a..07167b69 100644 --- a/packages/smtp/.npmignore +++ b/packages/smtp/.npmignore @@ -4,3 +4,6 @@ tsconfig.compile.json tsconfig.esm.json tsconfig.json *.spec.js +*.spec.js.map +*.spec.d.ts +*.tsbuildinfo