From ca4e69932168ad955fb0ee84536544569ab1ed17 Mon Sep 17 00:00:00 2001 From: Peter van Vliet Date: Tue, 9 Dec 2025 11:00:02 +0100 Subject: [PATCH 1/3] #1: modernized TypeScript setup --- packages/authentication/README.md | 4 ++-- packages/authentication/package.json | 6 ++++-- packages/authentication/src/client.ts | 2 ++ packages/authentication/src/index.ts | 3 --- packages/authentication/src/server.ts | 2 ++ packages/database/src/index.ts | 2 +- packages/eventbroker/src/index.ts | 2 +- packages/filestore/src/index.ts | 2 +- packages/http/src/index.ts | 4 ++-- packages/notification/src/index.ts | 2 +- tsconfig.json | 4 ++-- 11 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 packages/authentication/src/client.ts delete mode 100644 packages/authentication/src/index.ts create mode 100644 packages/authentication/src/server.ts diff --git a/packages/authentication/README.md b/packages/authentication/README.md index c9e9709..81b2daa 100644 --- a/packages/authentication/README.md +++ b/packages/authentication/README.md @@ -54,7 +54,7 @@ The requester middleware operates on the client side (web browser) and provides ```ts // src/middleware/requesterMiddleware.ts -import { RequesterMiddleware } from '@jitar-plugins/authentication'; +import { RequesterMiddleware } from '@jitar-plugins/authentication/client'; // The server provides a session key after login that needs to be captured. const key = new URLSearchParams(globalThis.location?.search).get('key'); @@ -68,7 +68,7 @@ To make sure the client redirects to the original location after login, we also ```ts // src/middleware/originMiddleware.ts -import OriginMiddleware from '@jitar-plugins/http'; +import { OriginMiddleware } from '@jitar-plugins/http'; export default new OriginMiddleware(); ``` diff --git a/packages/authentication/package.json b/packages/authentication/package.json index 44b2efa..2fe2d65 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -14,8 +14,10 @@ "README.md", "dist" ], - "types": "dist/index.d.ts", - "exports": "./dist/index.js", + "exports": { + ".": "./dist/server.js", + "./client": "./dist/client.js" + }, "peerDependencies": { "@theshelf/authentication": "^0.0.2", "jitar": "^0.10.3" diff --git a/packages/authentication/src/client.ts b/packages/authentication/src/client.ts new file mode 100644 index 0000000..96765c8 --- /dev/null +++ b/packages/authentication/src/client.ts @@ -0,0 +1,2 @@ + +export { default as RequesterMiddleware } from './RequesterMiddleware.js'; diff --git a/packages/authentication/src/index.ts b/packages/authentication/src/index.ts deleted file mode 100644 index d1ecbd6..0000000 --- a/packages/authentication/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ - -export { default as AuthenticationMiddleware } from './AuthenticationMiddleware'; -export { default as RequesterMiddleware } from './RequesterMiddleware'; diff --git a/packages/authentication/src/server.ts b/packages/authentication/src/server.ts new file mode 100644 index 0000000..ed75518 --- /dev/null +++ b/packages/authentication/src/server.ts @@ -0,0 +1,2 @@ + +export { default as AuthenticationMiddleware } from './AuthenticationMiddleware.js'; diff --git a/packages/database/src/index.ts b/packages/database/src/index.ts index 9b78919..7bd758e 100644 --- a/packages/database/src/index.ts +++ b/packages/database/src/index.ts @@ -1,2 +1,2 @@ -export { default as DatabaseHealthCheck } from './DatabaseHealthCheck'; +export { default as DatabaseHealthCheck } from './DatabaseHealthCheck.js'; diff --git a/packages/eventbroker/src/index.ts b/packages/eventbroker/src/index.ts index cef23a3..ae1b071 100644 --- a/packages/eventbroker/src/index.ts +++ b/packages/eventbroker/src/index.ts @@ -1,2 +1,2 @@ -export { default as EventBrokerHealthCheck } from './EventBrokerHealthCheck'; +export { default as EventBrokerHealthCheck } from './EventBrokerHealthCheck.js'; diff --git a/packages/filestore/src/index.ts b/packages/filestore/src/index.ts index f5145da..bf73a2a 100644 --- a/packages/filestore/src/index.ts +++ b/packages/filestore/src/index.ts @@ -1,2 +1,2 @@ -export { default as FileStoreHealthCheck } from './FileStoreHealthCheck'; \ No newline at end of file +export { default as FileStoreHealthCheck } from './FileStoreHealthCheck.js'; \ No newline at end of file diff --git a/packages/http/src/index.ts b/packages/http/src/index.ts index b26d8a4..70400b5 100644 --- a/packages/http/src/index.ts +++ b/packages/http/src/index.ts @@ -1,3 +1,3 @@ -export { default as CorsMiddleware } from './CorsMiddleware'; -export { default as OriginMiddleware } from './OriginMiddleware'; +export { default as CorsMiddleware } from './CorsMiddleware.js'; +export { default as OriginMiddleware } from './OriginMiddleware.js'; diff --git a/packages/notification/src/index.ts b/packages/notification/src/index.ts index b783a52..280f091 100644 --- a/packages/notification/src/index.ts +++ b/packages/notification/src/index.ts @@ -1,2 +1,2 @@ -export { default as NotificationHealthCheck } from './NotificationHealthCheck'; +export { default as NotificationHealthCheck } from './NotificationHealthCheck.js'; diff --git a/tsconfig.json b/tsconfig.json index 5849eb6..dfb7daf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "module": "esnext", - "moduleResolution": "node10", + "module": "nodenext", + "moduleResolution": "nodenext", "isolatedModules": true, "noEmit": false, "declaration": true, From b8e01626a9a9796e38360dc3920ad7b5f445b815 Mon Sep 17 00:00:00 2001 From: Peter van Vliet Date: Tue, 9 Dec 2025 14:18:52 +0100 Subject: [PATCH 2/3] #1: updated theshelf dependencies --- packages/authentication/package.json | 2 +- packages/database/package.json | 2 +- packages/eventbroker/package.json | 2 +- packages/filestore/package.json | 2 +- packages/http/package.json | 2 +- packages/notification/package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/authentication/package.json b/packages/authentication/package.json index 2fe2d65..6ae6b24 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -19,7 +19,7 @@ "./client": "./dist/client.js" }, "peerDependencies": { - "@theshelf/authentication": "^0.0.2", + "@theshelf/authentication": "^0.0.3", "jitar": "^0.10.3" } } diff --git a/packages/database/package.json b/packages/database/package.json index c829515..a8cb814 100644 --- a/packages/database/package.json +++ b/packages/database/package.json @@ -17,7 +17,7 @@ "types": "dist/index.d.ts", "exports": "./dist/index.js", "peerDependencies": { - "@theshelf/database": "^0.0.2", + "@theshelf/database": "^0.0.3", "jitar": "^0.10.3" } } diff --git a/packages/eventbroker/package.json b/packages/eventbroker/package.json index 17cdf28..c32462f 100644 --- a/packages/eventbroker/package.json +++ b/packages/eventbroker/package.json @@ -17,7 +17,7 @@ "types": "dist/index.d.ts", "exports": "./dist/index.js", "peerDependencies": { - "@theshelf/eventbroker": "^0.0.2", + "@theshelf/eventbroker": "^0.0.3", "jitar": "^0.10.3" } } diff --git a/packages/filestore/package.json b/packages/filestore/package.json index de4ced7..f278e88 100644 --- a/packages/filestore/package.json +++ b/packages/filestore/package.json @@ -17,7 +17,7 @@ "types": "dist/index.d.ts", "exports": "./dist/index.js", "peerDependencies": { - "@theshelf/filestore": "^0.0.2", + "@theshelf/filestore": "^0.0.3", "jitar": "^0.10.3" } } diff --git a/packages/http/package.json b/packages/http/package.json index 2df9e29..76b0975 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -17,7 +17,7 @@ "types": "dist/index.d.ts", "exports": "./dist/index.js", "peerDependencies": { - "@theshelf/validation": "^0.0.2", + "@theshelf/validation": "^0.0.3", "jitar": "^0.10.3" } } diff --git a/packages/notification/package.json b/packages/notification/package.json index b52daf8..2d93625 100644 --- a/packages/notification/package.json +++ b/packages/notification/package.json @@ -17,7 +17,7 @@ "types": "dist/index.d.ts", "exports": "./dist/index.js", "peerDependencies": { - "@theshelf/notification": "^0.0.2", + "@theshelf/notification": "^0.0.3", "jitar": "^0.10.3" } } From faef73ac836f7c2a21ed0449459c16f26a143d15 Mon Sep 17 00:00:00 2001 From: Peter van Vliet Date: Tue, 9 Dec 2025 14:21:45 +0100 Subject: [PATCH 3/3] #1: updated package lock file --- package-lock.json | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23b780a..d822d41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1137,18 +1137,18 @@ "license": "MIT" }, "node_modules/@theshelf/authentication": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@theshelf/authentication/-/authentication-0.0.2.tgz", - "integrity": "sha512-8B3L0l/rn4Ue8qd4SfvrbLQuTzXhz9h1rV53kdGlHgmPJkAnS52oVnLvzxRBPAKdH5NdPffW025WtiXJXtNQTg==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@theshelf/authentication/-/authentication-0.0.3.tgz", + "integrity": "sha512-V8tPDc3AZOCsVpP8QMRjHICDiepHrxXwkDfFVhUcelBRkpZ4vis9NqmulnHZ3HGZR5Gt69zFc81c2Z4gWfIVCA==", "peer": true, "dependencies": { "openid-client": "6.8.1" } }, "node_modules/@theshelf/database": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@theshelf/database/-/database-0.0.2.tgz", - "integrity": "sha512-mitjgVc0WbVGOBuB94YJB9nltCj9qYdp8gwcY4IYtTx1Xpm7/vllrpo2VHYHZwDuDMASmo2IfW8hJiK0bSh0lw==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@theshelf/database/-/database-0.0.3.tgz", + "integrity": "sha512-eRxlIsV33KFBSswHpmzS3HrP0SZ0lwJLda8F8mQRCfke1oDiXvp1D5CY2kmm49KcXvfAgCrIGT+hQ3JvF4JbPg==", "peer": true, "dependencies": { "mongodb": "7.0.0", @@ -1156,33 +1156,33 @@ } }, "node_modules/@theshelf/eventbroker": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@theshelf/eventbroker/-/eventbroker-0.0.2.tgz", - "integrity": "sha512-FsRUtUD8lySUU/5ObBuVWjFQGY8uasiKoJkHKVSGcnki4LPRDIaFH1YmDSkdtN2wY3fHbBNnHcWrJTeSSumcLg==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@theshelf/eventbroker/-/eventbroker-0.0.3.tgz", + "integrity": "sha512-fi/Hs+9/TolAsC8Q98Q2dRMAzuhllvX76zJQ/syXIJDi62KEh9vvTvaRq6TioAVWuKkIbosjLMihu0QN1bhKSA==", "peer": true }, "node_modules/@theshelf/filestore": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@theshelf/filestore/-/filestore-0.0.2.tgz", - "integrity": "sha512-H3ajl7cdWlu7S1ArqLDWxDc2rnWg5gtHSkzhSAXee9bFUHLmZvCeXWD++kFlRTQBOzFfnNub5K9k9yi7ERg7qA==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@theshelf/filestore/-/filestore-0.0.3.tgz", + "integrity": "sha512-UEOLFDhfQ1CBCkx2CP9pXkoTEFHYx2bD0Nj7ShzIgASivXQRlRLSXjVUiio5BetC5eu29bEJeindNKWvOu3Wug==", "peer": true, "dependencies": { "minio": "8.0.6" } }, "node_modules/@theshelf/notification": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@theshelf/notification/-/notification-0.0.2.tgz", - "integrity": "sha512-X0O0MQcwa7OgJkcgFV5dQtLuBsKcK0zHCmtgNgoah65I+w4L70CF0CcD4kzj0b3kXIM0Kmxoxalzizrm58FvWg==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@theshelf/notification/-/notification-0.0.3.tgz", + "integrity": "sha512-Jp+4YR1kVbWVyOysntsHHuo6URncrupI3Kxe7wip3Mjm2JjcdIPCRtPlkEItVeWUVVRvQfNDs12kRyiNkL/XFQ==", "peer": true, "dependencies": { "web-push": "3.6.7" } }, "node_modules/@theshelf/validation": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@theshelf/validation/-/validation-0.0.2.tgz", - "integrity": "sha512-rPGgnELSd7GqUSHk+m02qEhzex1d3IRd/M1jx7+jPjmICtmXjEY6xToF+Wtup5Km+YjzQ0OO9+cepGhHWsuFgA==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@theshelf/validation/-/validation-0.0.3.tgz", + "integrity": "sha512-00BLFjQbyIj9bvDIOwTjGhViOH1IJJ5WocM5ddNVz/JH8NtXkU/zTa8jQQLxQoR5azRJLKPvNleP5/xmPxiyyQ==", "peer": true, "dependencies": { "zod": "4.1.12" @@ -5618,7 +5618,7 @@ "name": "@jitar-plugins/authentication", "version": "0.0.1", "peerDependencies": { - "@theshelf/authentication": "^0.0.2", + "@theshelf/authentication": "^0.0.3", "jitar": "^0.10.3" } }, @@ -5626,7 +5626,7 @@ "name": "@jitar-plugins/database", "version": "0.0.1", "peerDependencies": { - "@theshelf/database": "^0.0.2", + "@theshelf/database": "^0.0.3", "jitar": "^0.10.3" } }, @@ -5634,7 +5634,7 @@ "name": "@jitar-plugins/eventbroker", "version": "0.0.1", "peerDependencies": { - "@theshelf/eventbroker": "^0.0.2", + "@theshelf/eventbroker": "^0.0.3", "jitar": "^0.10.3" } }, @@ -5642,7 +5642,7 @@ "name": "@jitar-plugins/filestore", "version": "0.0.1", "peerDependencies": { - "@theshelf/filestore": "^0.0.2", + "@theshelf/filestore": "^0.0.3", "jitar": "^0.10.3" } }, @@ -5650,7 +5650,7 @@ "name": "@jitar-plugins/http", "version": "0.0.1", "peerDependencies": { - "@theshelf/validation": "^0.0.2", + "@theshelf/validation": "^0.0.3", "jitar": "^0.10.3" } }, @@ -5658,7 +5658,7 @@ "name": "@jitar-plugins/notification", "version": "0.0.1", "peerDependencies": { - "@theshelf/notification": "^0.0.2", + "@theshelf/notification": "^0.0.3", "jitar": "^0.10.3" } }