From 9123cc66217bce21c54a350f3a5de1cbe83ae19c Mon Sep 17 00:00:00 2001 From: Sam Davidoff Date: Fri, 2 May 2025 19:09:35 +0000 Subject: [PATCH 1/6] update dependencies --- package.json | 20 +- pnpm-lock.yaml | 539 ++++++++++++++++++++++++++----------------------- 2 files changed, 300 insertions(+), 259 deletions(-) diff --git a/package.json b/package.json index a79ac20..485548b 100644 --- a/package.json +++ b/package.json @@ -15,22 +15,22 @@ "author": "Sam Davidoff", "license": "MIT", "devDependencies": { - "@eslint/js": "^9.15.0", + "@eslint/js": "^9.25.1", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.14", - "@types/node": "^20.17.8", - "eslint": "^9.15.0", + "@types/node": "^22.15.3", + "eslint": "^9.25.1", "jest": "^29.7.0", - "prettier": "^3.4.1", + "prettier": "^3.5.3", "rimraf": "^6.0.1", - "ts-jest": "^29.2.5", - "ts-loader": "^9.5.1", - "typescript": "^5.7.2", - "typescript-eslint": "^8.16.0", - "webpack": "^5.96.1", + "ts-jest": "^29.3.2", + "ts-loader": "^9.5.2", + "typescript": "^5.8.3", + "typescript-eslint": "^8.31.1", + "webpack": "^5.99.7", "webpack-cli": "^5.1.4" }, "dependencies": { - "open": "^10.1.0" + "open": "^10.1.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1c35d60..5fdae6d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,12 +9,12 @@ importers: .: dependencies: open: - specifier: ^10.1.0 - version: 10.1.0 + specifier: ^10.1.2 + version: 10.1.2 devDependencies: '@eslint/js': - specifier: ^9.15.0 - version: 9.15.0 + specifier: ^9.25.1 + version: 9.25.1 '@types/eslint__js': specifier: ^8.42.3 version: 8.42.3 @@ -22,38 +22,38 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^20.17.8 - version: 20.17.8 + specifier: ^22.15.3 + version: 22.15.3 eslint: - specifier: ^9.15.0 - version: 9.15.0 + specifier: ^9.25.1 + version: 9.25.1 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.17.8) + version: 29.7.0(@types/node@22.15.3) prettier: - specifier: ^3.4.1 - version: 3.4.1 + specifier: ^3.5.3 + version: 3.5.3 rimraf: specifier: ^6.0.1 version: 6.0.1 ts-jest: - specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.8))(typescript@5.7.2) + specifier: ^29.3.2 + version: 29.3.2(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.15.3))(typescript@5.8.3) ts-loader: - specifier: ^9.5.1 - version: 9.5.1(typescript@5.7.2)(webpack@5.96.1) + specifier: ^9.5.2 + version: 9.5.2(typescript@5.8.3)(webpack@5.99.7) typescript: - specifier: ^5.7.2 - version: 5.7.2 + specifier: ^5.8.3 + version: 5.8.3 typescript-eslint: - specifier: ^8.16.0 - version: 8.16.0(eslint@9.15.0)(typescript@5.7.2) + specifier: ^8.31.1 + version: 8.31.1(eslint@9.25.1)(typescript@5.8.3) webpack: - specifier: ^5.96.1 - version: 5.96.1(webpack-cli@5.1.4) + specifier: ^5.99.7 + version: 5.99.7(webpack-cli@5.1.4) webpack-cli: specifier: ^5.1.4 - version: 5.1.4(webpack@5.96.1) + version: 5.1.4(webpack@5.99.7) packages: @@ -261,28 +261,32 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.19.0': - resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} + '@eslint/config-array@0.20.0': + resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.9.0': - resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} + '@eslint/config-helpers@0.2.2': + resolution: {integrity: sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/eslintrc@3.2.0': - resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + '@eslint/core@0.13.0': + resolution: {integrity: sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.15.0': - resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} + '@eslint/eslintrc@3.3.1': + resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + '@eslint/js@9.25.1': + resolution: {integrity: sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.3': - resolution: {integrity: sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==} + '@eslint/object-schema@2.1.6': + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.8': + resolution: {integrity: sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanfs/core@0.19.1': @@ -301,8 +305,8 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.1': - resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + '@humanwhocodes/retry@0.4.2': + resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==} engines: {node: '>=18.18'} '@isaacs/cliui@8.0.2': @@ -467,8 +471,8 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/node@20.17.8': - resolution: {integrity: sha512-ahz2g6/oqbKalW9sPv6L2iRbhLnojxjYWspAqhjvqSWBgGebEJT5GvRmk0QXPj3sbC6rU0GTQjPLQkmR8CObvA==} + '@types/node@22.15.3': + resolution: {integrity: sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -479,66 +483,51 @@ packages: '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - '@typescript-eslint/eslint-plugin@8.16.0': - resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} + '@typescript-eslint/eslint-plugin@8.31.1': + resolution: {integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.16.0': - resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==} + '@typescript-eslint/parser@8.31.1': + resolution: {integrity: sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/scope-manager@8.16.0': - resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} + '@typescript-eslint/scope-manager@8.31.1': + resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.16.0': - resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} + '@typescript-eslint/type-utils@8.31.1': + resolution: {integrity: sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/types@8.16.0': - resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} + '@typescript-eslint/types@8.31.1': + resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.16.0': - resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} + '@typescript-eslint/typescript-estree@8.31.1': + resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/utils@8.16.0': - resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} + '@typescript-eslint/utils@8.31.1': + resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/visitor-keys@8.16.0': - resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} + '@typescript-eslint/visitor-keys@8.31.1': + resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@webassemblyjs/ast@1.14.1': @@ -627,14 +616,25 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - ajv-keywords@3.5.2: - resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} + ajv-formats@2.1.1: + resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-keywords@5.1.0: + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} peerDependencies: - ajv: ^6.9.1 + ajv: ^8.8.2 ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -906,8 +906,8 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@8.2.0: - resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + eslint-scope@8.3.0: + resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: @@ -918,8 +918,8 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.15.0: - resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} + eslint@9.25.1: + resolution: {integrity: sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -986,6 +986,9 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@3.0.6: + resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} + fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} @@ -1381,6 +1384,9 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -1518,8 +1524,8 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} - open@10.1.0: - resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} + open@10.1.2: + resolution: {integrity: sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==} engines: {node: '>=18'} optionator@0.9.4: @@ -1595,8 +1601,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.4.1: - resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} + prettier@3.5.3: + resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} engines: {node: '>=14'} hasBin: true @@ -1632,6 +1638,10 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -1671,8 +1681,8 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - schema-utils@3.3.0: - resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} + schema-utils@4.3.2: + resolution: {integrity: sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==} engines: {node: '>= 10.13.0'} semver@6.3.1: @@ -1684,6 +1694,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + engines: {node: '>=10'} + hasBin: true + serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} @@ -1782,8 +1797,8 @@ packages: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} - terser-webpack-plugin@5.3.10: - resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} + terser-webpack-plugin@5.3.14: + resolution: {integrity: sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==} engines: {node: '>= 10.13.0'} peerDependencies: '@swc/core': '*' @@ -1814,14 +1829,14 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - ts-api-utils@1.4.2: - resolution: {integrity: sha512-ZF5gQIQa/UmzfvxbHZI3JXN0/Jt+vnAfAviNRAMc491laiK6YCLpCW9ft8oaCRFOTxCZtUTE6XB0ZQAe3olntw==} - engines: {node: '>=16'} + ts-api-utils@2.1.0: + resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + engines: {node: '>=18.12'} peerDependencies: - typescript: '>=4.2.0' + typescript: '>=4.8.4' - ts-jest@29.2.5: - resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} + ts-jest@29.3.2: + resolution: {integrity: sha512-bJJkrWc6PjFVz5g2DGCNUo8z7oFEYaz1xP1NpeDU7KNLMWPpEyV8Chbpkn8xjzgRDpQhnGMyvyldoL7h8JXyug==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -1844,8 +1859,8 @@ packages: esbuild: optional: true - ts-loader@9.5.1: - resolution: {integrity: sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==} + ts-loader@9.5.2: + resolution: {integrity: sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw==} engines: {node: '>=12.0.0'} peerDependencies: typescript: '*' @@ -1863,23 +1878,24 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - typescript-eslint@8.16.0: - resolution: {integrity: sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==} + type-fest@4.40.1: + resolution: {integrity: sha512-9YvLNnORDpI+vghLU/Nf+zSv0kL47KbVJ1o3sKgoTefl6i+zebxbiDQWoe/oWWqPhIgQdRZRT1KA9sCPL810SA==} + engines: {node: '>=16'} + + typescript-eslint@8.31.1: + resolution: {integrity: sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.9.0' - typescript@5.7.2: - resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} engines: {node: '>=14.17'} hasBin: true - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} update-browserslist-db@1.1.1: resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} @@ -1926,8 +1942,8 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} - webpack@5.96.1: - resolution: {integrity: sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==} + webpack@5.99.7: + resolution: {integrity: sha512-CNqKBRMQjwcmKR0idID5va1qlhrqVUKpovi+Ec79ksW8ux7iS1+A6VqzfZXgVYCFRKl7XL5ap3ZoMpwBJxcg0w==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -2203,24 +2219,28 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} - '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.25.1)': dependencies: - eslint: 9.15.0 + eslint: 9.25.1 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.19.0': + '@eslint/config-array@0.20.0': dependencies: - '@eslint/object-schema': 2.1.4 + '@eslint/object-schema': 2.1.6 debug: 4.3.7 minimatch: 3.1.2 transitivePeerDependencies: - supports-color - '@eslint/core@0.9.0': {} + '@eslint/config-helpers@0.2.2': {} - '@eslint/eslintrc@3.2.0': + '@eslint/core@0.13.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.1': dependencies: ajv: 6.12.6 debug: 4.3.7 @@ -2234,12 +2254,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.15.0': {} + '@eslint/js@9.25.1': {} - '@eslint/object-schema@2.1.4': {} + '@eslint/object-schema@2.1.6': {} - '@eslint/plugin-kit@0.2.3': + '@eslint/plugin-kit@0.2.8': dependencies: + '@eslint/core': 0.13.0 levn: 0.4.1 '@humanfs/core@0.19.1': {} @@ -2253,7 +2274,7 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} - '@humanwhocodes/retry@0.4.1': {} + '@humanwhocodes/retry@0.4.2': {} '@isaacs/cliui@8.0.2': dependencies: @@ -2277,7 +2298,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2290,14 +2311,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.8) + jest-config: 29.7.0(@types/node@22.15.3) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2322,7 +2343,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -2340,7 +2361,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.17.8 + '@types/node': 22.15.3 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2362,7 +2383,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.17.8 + '@types/node': 22.15.3 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2432,7 +2453,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.17.8 + '@types/node': 22.15.3 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -2519,7 +2540,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.17.8 + '@types/node': 22.15.3 '@types/istanbul-lib-coverage@2.0.6': {} @@ -2538,9 +2559,9 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/node@20.17.8': + '@types/node@22.15.3': dependencies: - undici-types: 6.19.8 + undici-types: 6.21.0 '@types/stack-utils@2.0.3': {} @@ -2550,86 +2571,81 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1)(typescript@5.8.3))(eslint@9.25.1)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.16.0(eslint@9.15.0)(typescript@5.7.2) - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/type-utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.16.0 - eslint: 9.15.0 + '@typescript-eslint/parser': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/type-utils': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 + eslint: 9.25.1 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.2(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/parser@8.31.1(eslint@9.25.1)(typescript@5.8.3)': dependencies: - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.3.7 - eslint: 9.15.0 - optionalDependencies: - typescript: 5.7.2 + eslint: 9.25.1 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.16.0': + '@typescript-eslint/scope-manager@8.31.1': dependencies: - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 - '@typescript-eslint/type-utils@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.31.1(eslint@9.25.1)(typescript@5.8.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1)(typescript@5.8.3) debug: 4.3.7 - eslint: 9.15.0 - ts-api-utils: 1.4.2(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 + eslint: 9.25.1 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.16.0': {} + '@typescript-eslint/types@8.31.1': {} - '@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.8.3)': dependencies: - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.2(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/utils@8.31.1(eslint@9.25.1)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - eslint: 9.15.0 - optionalDependencies: - typescript: 5.7.2 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.25.1) + '@typescript-eslint/scope-manager': 8.31.1 + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + eslint: 9.25.1 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.16.0': + '@typescript-eslint/visitor-keys@8.31.1': dependencies: - '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/types': 8.31.1 eslint-visitor-keys: 4.2.0 '@webassemblyjs/ast@1.14.1': @@ -2708,20 +2724,20 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.96.1)': + '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.99.7)': dependencies: - webpack: 5.96.1(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.96.1) + webpack: 5.99.7(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.99.7) - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.96.1)': + '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.99.7)': dependencies: - webpack: 5.96.1(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.96.1) + webpack: 5.99.7(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.99.7) - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack@5.96.1)': + '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack@5.99.7)': dependencies: - webpack: 5.96.1(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack@5.96.1) + webpack: 5.99.7(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.99.7) '@xtuc/ieee754@1.2.0': {} @@ -2733,9 +2749,14 @@ snapshots: acorn@8.14.0: {} - ajv-keywords@3.5.2(ajv@6.12.6): + ajv-formats@2.1.1(ajv@8.17.1): + optionalDependencies: + ajv: 8.17.1 + + ajv-keywords@5.1.0(ajv@8.17.1): dependencies: - ajv: 6.12.6 + ajv: 8.17.1 + fast-deep-equal: 3.1.3 ajv@6.12.6: dependencies: @@ -2744,6 +2765,13 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ajv@8.17.1: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.0.6 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -2917,13 +2945,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@20.17.8): + create-jest@29.7.0(@types/node@22.15.3): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.17.8) + jest-config: 29.7.0(@types/node@22.15.3) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -2999,7 +3027,7 @@ snapshots: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.2.0: + eslint-scope@8.3.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -3008,18 +3036,19 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.15.0: + eslint@9.25.1: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.25.1) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.0 - '@eslint/core': 0.9.0 - '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.15.0 - '@eslint/plugin-kit': 0.2.3 + '@eslint/config-array': 0.20.0 + '@eslint/config-helpers': 0.2.2 + '@eslint/core': 0.13.0 + '@eslint/eslintrc': 3.3.1 + '@eslint/js': 9.25.1 + '@eslint/plugin-kit': 0.2.8 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.1 + '@humanwhocodes/retry': 0.4.2 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 @@ -3027,7 +3056,7 @@ snapshots: cross-spawn: 7.0.6 debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint-scope: 8.2.0 + eslint-scope: 8.3.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 esquery: 1.6.0 @@ -3107,6 +3136,8 @@ snapshots: fast-levenshtein@2.0.6: {} + fast-uri@3.0.6: {} + fastest-levenshtein@1.0.16: {} fastq@1.17.1: @@ -3339,7 +3370,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -3359,16 +3390,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.17.8): + jest-cli@29.7.0(@types/node@22.15.3): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.17.8) + create-jest: 29.7.0(@types/node@22.15.3) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.17.8) + jest-config: 29.7.0(@types/node@22.15.3) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -3378,7 +3409,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.17.8): + jest-config@29.7.0(@types/node@22.15.3): dependencies: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 @@ -3403,7 +3434,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.17.8 + '@types/node': 22.15.3 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -3432,7 +3463,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -3442,7 +3473,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.17.8 + '@types/node': 22.15.3 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -3481,7 +3512,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -3516,7 +3547,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -3544,7 +3575,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 chalk: 4.1.2 cjs-module-lexer: 1.4.1 collect-v8-coverage: 1.0.2 @@ -3590,7 +3621,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -3609,7 +3640,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.8 + '@types/node': 22.15.3 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -3618,23 +3649,23 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 20.17.8 + '@types/node': 22.15.3 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 20.17.8 + '@types/node': 22.15.3 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.17.8): + jest@29.7.0(@types/node@22.15.3): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.17.8) + jest-cli: 29.7.0(@types/node@22.15.3) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -3660,6 +3691,8 @@ snapshots: json-schema-traverse@0.4.1: {} + json-schema-traverse@1.0.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} json5@2.2.3: {} @@ -3770,7 +3803,7 @@ snapshots: dependencies: mimic-fn: 2.1.0 - open@10.1.0: + open@10.1.2: dependencies: default-browser: 5.2.1 define-lazy-prop: 3.0.0 @@ -3842,7 +3875,7 @@ snapshots: prelude-ls@1.2.1: {} - prettier@3.4.1: {} + prettier@3.5.3: {} pretty-format@29.7.0: dependencies: @@ -3873,6 +3906,8 @@ snapshots: require-directory@2.1.1: {} + require-from-string@2.0.2: {} + resolve-cwd@3.0.0: dependencies: resolve-from: 5.0.0 @@ -3904,16 +3939,19 @@ snapshots: safe-buffer@5.2.1: {} - schema-utils@3.3.0: + schema-utils@4.3.2: dependencies: '@types/json-schema': 7.0.15 - ajv: 6.12.6 - ajv-keywords: 3.5.2(ajv@6.12.6) + ajv: 8.17.1 + ajv-formats: 2.1.1(ajv@8.17.1) + ajv-keywords: 5.1.0(ajv@8.17.1) semver@6.3.1: {} semver@7.6.3: {} + semver@7.7.1: {} + serialize-javascript@6.0.2: dependencies: randombytes: 2.1.0 @@ -3999,14 +4037,14 @@ snapshots: tapable@2.2.1: {} - terser-webpack-plugin@5.3.10(webpack@5.96.1): + terser-webpack-plugin@5.3.14(webpack@5.99.7): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 - schema-utils: 3.3.0 + schema-utils: 4.3.2 serialize-javascript: 6.0.2 terser: 5.36.0 - webpack: 5.96.1(webpack-cli@5.1.4) + webpack: 5.99.7(webpack-cli@5.1.4) terser@5.36.0: dependencies: @@ -4027,22 +4065,23 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@1.4.2(typescript@5.7.2): + ts-api-utils@2.1.0(typescript@5.8.3): dependencies: - typescript: 5.7.2 + typescript: 5.8.3 - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.8))(typescript@5.7.2): + ts-jest@29.3.2(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.15.3))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.17.8) + jest: 29.7.0(@types/node@22.15.3) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.6.3 - typescript: 5.7.2 + semver: 7.7.1 + type-fest: 4.40.1 + typescript: 5.8.3 yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.26.0 @@ -4050,15 +4089,15 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.26.0) - ts-loader@9.5.1(typescript@5.7.2)(webpack@5.96.1): + ts-loader@9.5.2(typescript@5.8.3)(webpack@5.99.7): dependencies: chalk: 4.1.2 enhanced-resolve: 5.17.1 micromatch: 4.0.8 semver: 7.6.3 source-map: 0.7.4 - typescript: 5.7.2 - webpack: 5.96.1(webpack-cli@5.1.4) + typescript: 5.8.3 + webpack: 5.99.7(webpack-cli@5.1.4) type-check@0.4.0: dependencies: @@ -4068,20 +4107,21 @@ snapshots: type-fest@0.21.3: {} - typescript-eslint@8.16.0(eslint@9.15.0)(typescript@5.7.2): + type-fest@4.40.1: {} + + typescript-eslint@8.31.1(eslint@9.25.1)(typescript@5.8.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2) - '@typescript-eslint/parser': 8.16.0(eslint@9.15.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) - eslint: 9.15.0 - optionalDependencies: - typescript: 5.7.2 + '@typescript-eslint/eslint-plugin': 8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1)(typescript@5.8.3))(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/parser': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + '@typescript-eslint/utils': 8.31.1(eslint@9.25.1)(typescript@5.8.3) + eslint: 9.25.1 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - typescript@5.7.2: {} + typescript@5.8.3: {} - undici-types@6.19.8: {} + undici-types@6.21.0: {} update-browserslist-db@1.1.1(browserslist@4.24.2): dependencies: @@ -4108,12 +4148,12 @@ snapshots: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 - webpack-cli@5.1.4(webpack@5.96.1): + webpack-cli@5.1.4(webpack@5.99.7): dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.96.1) - '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.96.1) - '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack@5.96.1) + '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.99.7) + '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.99.7) + '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack@5.99.7) colorette: 2.0.20 commander: 10.0.1 cross-spawn: 7.0.6 @@ -4122,7 +4162,7 @@ snapshots: import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.96.1(webpack-cli@5.1.4) + webpack: 5.99.7(webpack-cli@5.1.4) webpack-merge: 5.10.0 webpack-merge@5.10.0: @@ -4133,10 +4173,11 @@ snapshots: webpack-sources@3.2.3: {} - webpack@5.96.1(webpack-cli@5.1.4): + webpack@5.99.7(webpack-cli@5.1.4): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 @@ -4153,13 +4194,13 @@ snapshots: loader-runner: 4.3.0 mime-types: 2.1.35 neo-async: 2.6.2 - schema-utils: 3.3.0 + schema-utils: 4.3.2 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.96.1) + terser-webpack-plugin: 5.3.14(webpack@5.99.7) watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: - webpack-cli: 5.1.4(webpack@5.96.1) + webpack-cli: 5.1.4(webpack@5.99.7) transitivePeerDependencies: - '@swc/core' - esbuild From e56a46d28385fcee092c75647cee38f6b1999531 Mon Sep 17 00:00:00 2001 From: Sam Davidoff Date: Fri, 2 May 2025 19:34:21 +0000 Subject: [PATCH 2/6] add global npm install ability --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++--- browser-global.sh | 15 +++++++++++++ package.json | 26 ++++++++++++++++++++++- prepend-shebang.js | 28 +++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 4 deletions(-) create mode 100755 browser-global.sh create mode 100644 prepend-shebang.js diff --git a/README.md b/README.md index b8cbbf9..1453437 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,39 @@ This utility works by changing the flow above as follows using a client-server p This helper is written in Typescript and compiles down to two Javascript scripts, one for the server and one for the client. -### Download +### Option 1: Install via npm (Recommended) -Download the latest release from this repo. The release consists of a filed named `oauth2-forwarder.zip` which contains two Javascript scripts: `o2f-server.js` and `o2f-client.js` plus a helper `browser.sh` script, all in a directory called `o2f`. These can be placed wherever you want, but these instructions assume they are placed in the home directories of the host and container. +You can install oauth2-forwarder globally via npm: + +```bash +npm install -g oauth2-forwarder +``` + +After installation, you'll have the following commands available globally: +- `o2f-server` - Run on the host machine +- `o2f-client` - Run on the container +- `o2f-browser` - Browser script for the container + +#### On the host + +Run `o2f-server` on the host machine. This will start the server and display the port it's listening on. + +#### In the container + +1. Set the server info environment variable based on the output from the host: + ```bash + export OAUTH2_FORWARDER_SERVER="host.docker.internal:PORT" + ``` + where PORT is the port displayed when you ran `o2f-server`. + +2. Set the BROWSER environment variable to use the browser script: + ```bash + export BROWSER=o2f-browser + ``` + +### Option 2: Download Manually + +Download the latest release from this repo. The release consists of a file named `oauth2-forwarder.zip` which contains two Javascript scripts: `o2f-server.js` and `o2f-client.js` plus a helper `browser.sh` script, all in a directory called `o2f`. These can be placed wherever you want, but these instructions assume they are placed in the home directories of the host and container. ### On the host @@ -62,9 +92,25 @@ Notes: Here's a strategy to make this fairly easy to use with a Docker container built with a Dockerfile. +#### Option 1: Using npm (Recommended) + +On the host, set a specific port that you will listen on by configuring the env variable `OAUTH2_FORWARDER_PORT`. + +Add these lines in the Dockerfile: + +``` +RUN npm install -g oauth2-forwarder +ENV OAUTH2_FORWARDER_SERVER host.docker.internal:[PORT] +ENV BROWSER o2f-browser +``` + +Replace `[PORT]` with the actual port number (or use Docker's `ARG` command). + +#### Option 2: Using the zip release + On the host, set a specific port that you will listen on by configuring the env variable `OAUTH2_FORWARDER_PORT`. -Add these lines in the Dockerfile +Add these lines in the Dockerfile: ``` RUN curl -LO https://github.com/sam-mfb/oauth2-forwarder/releases/download/v[VERSION]/oauth2-forwarder.zip diff --git a/browser-global.sh b/browser-global.sh new file mode 100755 index 0000000..76eafcf --- /dev/null +++ b/browser-global.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +# +# Assing this script to the BROWSER env variable via: +# export BROWSER=o2f-browser +# +# This will ensure requests to open a browser get forwarded +# through to the proxy +# +LOG_FILE="/tmp/oauth2-forwarder.log" + +# fork and return 0 as some apps (e.g., az cli) expect a zero return +# before they will launch their redirect listener +o2f-client "$@" >> "$LOG_FILE" 2>&1 & + +exit 0 \ No newline at end of file diff --git a/package.json b/package.json index 485548b..b002cf4 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,13 @@ "version": "1.0.0", "description": "utilities for forwarding oauth2 interactive flow (e.g. container to host)", "main": "dist/index.js", + "bin": { + "o2f-server": "./dist/o2f-server.js", + "o2f-client": "./dist/o2f-client.js", + "o2f-browser": "./browser-global.sh" + }, "scripts": { - "build": "rimraf ./dist && webpack", + "build": "rimraf ./dist && webpack && node prepend-shebang.js", "zip-release": "./release.sh", "test": "jest --watch", "e2e-test": "jest -c ./jest.e2e.config.js", @@ -14,6 +19,25 @@ }, "author": "Sam Davidoff", "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sam-mfb/oauth2-forwarder.git" + }, + "files": [ + "dist", + "browser.sh", + "browser-global.sh" + ], + "keywords": [ + "oauth2", + "docker", + "container", + "authentication", + "browser" + ], + "engines": { + "node": ">=18.0.0" + }, "devDependencies": { "@eslint/js": "^9.25.1", "@types/eslint__js": "^8.42.3", diff --git a/prepend-shebang.js b/prepend-shebang.js new file mode 100644 index 0000000..4b11cc2 --- /dev/null +++ b/prepend-shebang.js @@ -0,0 +1,28 @@ +const fs = require('fs'); +const path = require('path'); + +const shebang = '#!/usr/bin/env node\n'; +const files = ['o2f-server.js', 'o2f-client.js']; +const distPath = path.join(__dirname, 'dist'); + +files.forEach(file => { + const filePath = path.join(distPath, file); + + if (fs.existsSync(filePath)) { + // Read the file content + const content = fs.readFileSync(filePath, 'utf8'); + + // Check if shebang is already there + if (!content.startsWith('#!')) { + console.log(`Adding shebang to ${file}`); + // Write the file with shebang prepended + fs.writeFileSync(filePath, shebang + content); + // Make the file executable + fs.chmodSync(filePath, '755'); + } else { + console.log(`Shebang already exists in ${file}`); + } + } else { + console.error(`File not found: ${filePath}`); + } +}); \ No newline at end of file From 873d057605b1a42e5194a937904acb7898c41c25 Mon Sep 17 00:00:00 2001 From: Sam Davidoff Date: Fri, 2 May 2025 19:48:58 +0000 Subject: [PATCH 3/6] add workflows --- .github/workflows/npm-publish.yml | 45 +++++++++++++++++++++++++++++++ .github/workflows/unit-tests.yml | 31 +++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .github/workflows/npm-publish.yml create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..4093a67 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,45 @@ +name: Publish to NPM + +on: + release: + types: [released] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run tests + run: npm test -- --no-watch + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Publish to NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..2bb6030 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,31 @@ +name: Unit Tests + +on: + pull_request: + branches: [ main ] + push: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run linting + run: npm run lint + + - name: Run unit tests + run: npm test -- --no-watch + + - name: Build + run: npm run build \ No newline at end of file From 314032a1fa619263e3a6e1aa02ce537fe73131e0 Mon Sep 17 00:00:00 2001 From: Sam Davidoff Date: Fri, 2 May 2025 19:58:47 +0000 Subject: [PATCH 4/6] address pr comments and test failure --- .github/workflows/npm-publish.yml | 46 +++++++++++++++++++++++++------ .github/workflows/unit-tests.yml | 29 +++++++++++++++---- prepend-shebang.js | 36 ++++++++++++++++++++---- 3 files changed, 92 insertions(+), 19 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 4093a67..7381a2a 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -9,37 +9,67 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 with: node-version: '18.x' registry-url: 'https://registry.npmjs.org' + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install dependencies - run: npm ci + run: pnpm install - name: Build - run: npm run build + run: pnpm run build - name: Run tests - run: npm test -- --no-watch + run: pnpm test -- --no-watch publish-npm: needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 with: node-version: '18.x' registry-url: 'https://registry.npmjs.org' + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + - name: Install dependencies - run: npm ci + run: pnpm install - name: Build - run: npm run build + run: pnpm run build - name: Publish to NPM - run: npm publish + run: pnpm publish --no-git-checks env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 2bb6030..639f0c9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -16,16 +16,35 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18.x' - cache: 'npm' + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: npm ci + run: pnpm install - name: Run linting - run: npm run lint + run: pnpm run lint - name: Run unit tests - run: npm test -- --no-watch + run: pnpm test -- --no-watch - name: Build - run: npm run build \ No newline at end of file + run: pnpm run build \ No newline at end of file diff --git a/prepend-shebang.js b/prepend-shebang.js index 4b11cc2..a650352 100644 --- a/prepend-shebang.js +++ b/prepend-shebang.js @@ -1,11 +1,15 @@ const fs = require('fs'); const path = require('path'); -const shebang = '#!/usr/bin/env node\n'; -const files = ['o2f-server.js', 'o2f-client.js']; +const nodeShebang = '#!/usr/bin/env node\n'; +const shFiles = '#!/usr/bin/env sh\n'; + +// Node.js files +const jsFiles = ['o2f-server.js', 'o2f-client.js']; const distPath = path.join(__dirname, 'dist'); -files.forEach(file => { +// Handle JS files +jsFiles.forEach(file => { const filePath = path.join(distPath, file); if (fs.existsSync(filePath)) { @@ -14,9 +18,9 @@ files.forEach(file => { // Check if shebang is already there if (!content.startsWith('#!')) { - console.log(`Adding shebang to ${file}`); + console.log(`Adding node shebang to ${file}`); // Write the file with shebang prepended - fs.writeFileSync(filePath, shebang + content); + fs.writeFileSync(filePath, nodeShebang + content); // Make the file executable fs.chmodSync(filePath, '755'); } else { @@ -25,4 +29,24 @@ files.forEach(file => { } else { console.error(`File not found: ${filePath}`); } -}); \ No newline at end of file +}); + +// Handle browser script +const browserFile = path.join(__dirname, 'browser-global.sh'); +if (fs.existsSync(browserFile)) { + // Read the file content + const content = fs.readFileSync(browserFile, 'utf8'); + + // Check if shebang is already there and set executable flag regardless + fs.chmodSync(browserFile, '755'); + + if (!content.startsWith('#!')) { + console.log(`Adding sh shebang to browser-global.sh`); + // Write the file with shebang prepended + fs.writeFileSync(browserFile, shFiles + content); + } else { + console.log(`Shebang already exists in browser-global.sh`); + } +} else { + console.error(`File not found: ${browserFile}`); +} \ No newline at end of file From ee9eb9ebb068d35680cf560c518ba7896af00f4f Mon Sep 17 00:00:00 2001 From: Sam Davidoff Date: Fri, 2 May 2025 19:59:48 +0000 Subject: [PATCH 5/6] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b002cf4..51a433c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oauth2-forwarder", - "version": "1.0.0", + "version": "1.1.0", "description": "utilities for forwarding oauth2 interactive flow (e.g. container to host)", "main": "dist/index.js", "bin": { From 9e800cad639398761115ae4a9d212e9fd4f13c77 Mon Sep 17 00:00:00 2001 From: Sam Davidoff Date: Fri, 2 May 2025 20:05:40 +0000 Subject: [PATCH 6/6] fix eslint errors --- src/__tests__/extractPort.test.ts | 104 ++++++++++++++++++++++++++++++ src/extractPort.ts | 4 +- src/parseOauth2Url.ts | 1 + 3 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 src/__tests__/extractPort.test.ts diff --git a/src/__tests__/extractPort.test.ts b/src/__tests__/extractPort.test.ts new file mode 100644 index 0000000..6116c6b --- /dev/null +++ b/src/__tests__/extractPort.test.ts @@ -0,0 +1,104 @@ +import { extractPort } from '../extractPort' +import { Result } from '../result' + +describe('extractPort', () => { + it('should extract the port number from a localhost URL with port', () => { + const uri = 'http://localhost:3000' + const result = extractPort(uri) + + expect(Result.isSuccess(result)).toBe(true) + if (Result.isSuccess(result)) { + expect(result.value).toBe(3000) + } + }) + + it('should return undefined for a localhost URL without port', () => { + const uri = 'http://localhost' + const result = extractPort(uri) + + expect(Result.isSuccess(result)).toBe(true) + if (Result.isSuccess(result)) { + expect(result.value).toBeUndefined() + } + }) + + it('should fail for a non-localhost URL', () => { + const uri = 'http://example.com:3000' + const result = extractPort(uri) + + expect(Result.isFailure(result)).toBe(true) + if (Result.isFailure(result)) { + expect(result.error.message).toBe('Invalid URL format') + } + }) + + it('should fail for a localhost URL with an invalid port number', () => { + const uri = 'http://localhost:99999' + const result = extractPort(uri) + + expect(Result.isFailure(result)).toBe(true) + if (Result.isFailure(result)) { + expect(result.error.message).toBe('Not a valid port: 99999') + } + }) + + it('should fail for a localhost URL with a negative port number', () => { + const uri = 'http://localhost:-1' + const result = extractPort(uri) + + expect(Result.isFailure(result)).toBe(true) + if (Result.isFailure(result)) { + expect(result.error.message).toBe('Invalid URL format') + } + }) + + it('should fail for a localhost URL with a non-numeric port', () => { + const uri = 'http://localhost:abc' + const result = extractPort(uri) + + expect(Result.isFailure(result)).toBe(true) + if (Result.isFailure(result)) { + expect(result.error.message).toBe('Invalid URL format') + } + }) + + it('should fail for URLs with incorrect protocol', () => { + const uri = 'https://localhost:3000' + const result = extractPort(uri) + + expect(Result.isFailure(result)).toBe(true) + if (Result.isFailure(result)) { + expect(result.error.message).toBe('Invalid URL format') + } + }) + + it('should fail for non-URL strings', () => { + const uri = 'not a url' + const result = extractPort(uri) + + expect(Result.isFailure(result)).toBe(true) + if (Result.isFailure(result)) { + expect(result.error.message).toBe('Invalid URL format') + } + }) + + it('should handle boundary value 0 for port', () => { + const uri = 'http://localhost:0' + const result = extractPort(uri) + + expect(Result.isSuccess(result)).toBe(true) + if (Result.isSuccess(result)) { + expect(result.value).toBe(0) + } + }) + + it('should handle boundary value 65535 for port', () => { + const uri = 'http://localhost:65535' + const result = extractPort(uri) + + expect(Result.isSuccess(result)).toBe(true) + if (Result.isSuccess(result)) { + expect(result.value).toBe(65535) + } + }) +}) \ No newline at end of file diff --git a/src/extractPort.ts b/src/extractPort.ts index 7bbf13a..62dbc20 100644 --- a/src/extractPort.ts +++ b/src/extractPort.ts @@ -1,7 +1,7 @@ import { Result } from "./result" export function extractPort(uri: string): Result { - const localhostUrlRegex = /^http:\/\/localhost(?:\:(\d{1,5}))?$/ + const localhostUrlRegex = /^http:\/\/localhost(?::(\d{1,5}))?$/ const match = uri.match(localhostUrlRegex) if (!match) { @@ -9,7 +9,7 @@ export function extractPort(uri: string): Result { } const port = match[1] ? parseInt(match[1], 10) : undefined - if (!port) { + if (port === undefined) { return Result.success(undefined) } if (isNaN(port) || port < 0 || port > 65535) { diff --git a/src/parseOauth2Url.ts b/src/parseOauth2Url.ts index 6338aaa..aa294da 100644 --- a/src/parseOauth2Url.ts +++ b/src/parseOauth2Url.ts @@ -27,6 +27,7 @@ export function parseOauth2Url( } // Validate enums + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion if (!["S256", "plain"].includes(params["code_challenge_method"]!)) { return Result.failure( new Error(