From 4fe052fd5c4b928cab0eecfe5b5ca03a264c06a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 22:02:36 +0000 Subject: [PATCH 01/62] build(deps): bump jsdom from 22.1.0 to 23.0.0 Bumps [jsdom](https://github.com/jsdom/jsdom) from 22.1.0 to 23.0.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/22.1.0...23.0.0) --- updated-dependencies: - dependency-name: jsdom dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 358 ++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 155 insertions(+), 205 deletions(-) diff --git a/package-lock.json b/package-lock.json index 98d6998c..c1189403 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "dotenv": "^16.3.1", "fast-csv": "^4.3.6", "got": "^13.0.0", - "jsdom": "^22.1.0", + "jsdom": "^23.0.0", "rss-parser": "^3.13.0" }, "devDependencies": { @@ -85,14 +85,6 @@ "node": ">=14.16" } }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "engines": { - "node": ">= 10" - } - }, "node_modules/@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", @@ -112,20 +104,15 @@ "form-data": "^3.0.0" } }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==" - }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/asynckit": { @@ -181,16 +168,15 @@ } }, "node_modules/data-urls": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", - "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.0" + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/dayjs": { @@ -260,17 +246,6 @@ "node": ">=0.4.0" } }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/dotenv": { "version": "16.3.1", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", @@ -379,14 +354,14 @@ } }, "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", "dependencies": { - "whatwg-encoding": "^2.0.0" + "whatwg-encoding": "^3.1.1" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/http-cache-semantics": { @@ -395,16 +370,15 @@ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/http2-wrapper": { @@ -420,15 +394,15 @@ } }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/iconv-lite": { @@ -460,39 +434,37 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "node_modules/jsdom": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", - "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "version": "23.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.0.tgz", + "integrity": "sha512-cbL/UCtohJguhFC7c2/hgW6BeZCNvP7URQGnx9tSJRYKCdnfbfWOrtuLTMfiB2VxKsx5wPHVsh/J0aBy9lIIhQ==", "dependencies": { - "abab": "^2.0.6", "cssstyle": "^3.0.0", - "data-urls": "^4.0.0", + "data-urls": "^5.0.0", "decimal.js": "^10.4.3", - "domexception": "^4.0.0", "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.4", + "nwsapi": "^2.2.7", "parse5": "^7.1.2", "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", + "tough-cookie": "^4.1.3", + "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.1", - "ws": "^8.13.0", - "xml-name-validator": "^4.0.0" + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.14.2", + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "peerDependencies": { - "canvas": "^2.5.0" + "canvas": "^3.0.0" }, "peerDependenciesMeta": { "canvas": { @@ -662,9 +634,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.5.tgz", - "integrity": "sha512-6xpotnECFy/og7tKSBVmUNft7J3jyXAka4XvG6AUhFWRz+Q/Ljus7znJAA3bxColfQLdS+XsjoodtJfCgeTEFQ==" + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" }, "node_modules/p-cancelable": { "version": "3.0.0", @@ -702,9 +674,9 @@ "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -790,9 +762,9 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "node_modules/tough-cookie": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", - "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -804,14 +776,14 @@ } }, "node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", "dependencies": { - "punycode": "^2.3.0" + "punycode": "^2.3.1" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/universalify": { @@ -832,14 +804,14 @@ } }, "node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dependencies": { - "xml-name-validator": "^4.0.0" + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/webidl-conversions": { @@ -851,40 +823,40 @@ } }, "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dependencies": { "iconv-lite": "0.6.3" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "dependencies": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "engines": { "node": ">=10.0.0" }, @@ -902,11 +874,11 @@ } }, "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/xml2js": { @@ -985,11 +957,6 @@ "defer-to-connect": "^2.0.1" } }, - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" - }, "@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", @@ -1009,17 +976,12 @@ "form-data": "^3.0.0" } }, - "abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==" - }, "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", "requires": { - "debug": "4" + "debug": "^4.3.4" } }, "asynckit": { @@ -1063,13 +1025,12 @@ } }, "data-urls": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", - "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", "requires": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.0" + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" } }, "dayjs": { @@ -1115,14 +1076,6 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "requires": { - "webidl-conversions": "^7.0.0" - } - }, "dotenv": { "version": "16.3.1", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", @@ -1187,11 +1140,11 @@ } }, "html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", "requires": { - "whatwg-encoding": "^2.0.0" + "whatwg-encoding": "^3.1.1" } }, "http-cache-semantics": { @@ -1200,13 +1153,12 @@ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" + "agent-base": "^7.1.0", + "debug": "^4.3.4" } }, "http2-wrapper": { @@ -1219,11 +1171,11 @@ } }, "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "requires": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" } }, @@ -1250,33 +1202,31 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "jsdom": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", - "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "version": "23.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.0.tgz", + "integrity": "sha512-cbL/UCtohJguhFC7c2/hgW6BeZCNvP7URQGnx9tSJRYKCdnfbfWOrtuLTMfiB2VxKsx5wPHVsh/J0aBy9lIIhQ==", "requires": { - "abab": "^2.0.6", "cssstyle": "^3.0.0", - "data-urls": "^4.0.0", + "data-urls": "^5.0.0", "decimal.js": "^10.4.3", - "domexception": "^4.0.0", "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.4", + "nwsapi": "^2.2.7", "parse5": "^7.1.2", "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", + "tough-cookie": "^4.1.3", + "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.1", - "ws": "^8.13.0", - "xml-name-validator": "^4.0.0" + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.14.2", + "xml-name-validator": "^5.0.0" }, "dependencies": { "form-data": { @@ -1407,9 +1357,9 @@ "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==" }, "nwsapi": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.5.tgz", - "integrity": "sha512-6xpotnECFy/og7tKSBVmUNft7J3jyXAka4XvG6AUhFWRz+Q/Ljus7znJAA3bxColfQLdS+XsjoodtJfCgeTEFQ==" + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" }, "p-cancelable": { "version": "3.0.0", @@ -1437,9 +1387,9 @@ "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" }, "querystringify": { "version": "2.2.0", @@ -1507,9 +1457,9 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "tough-cookie": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", - "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -1518,11 +1468,11 @@ } }, "tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", "requires": { - "punycode": "^2.3.0" + "punycode": "^2.3.1" } }, "universalify": { @@ -1540,11 +1490,11 @@ } }, "w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "requires": { - "xml-name-validator": "^4.0.0" + "xml-name-validator": "^5.0.0" } }, "webidl-conversions": { @@ -1553,37 +1503,37 @@ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" }, "whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "requires": { "iconv-lite": "0.6.3" } }, "whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==" }, "whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "requires": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" } }, "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "requires": {} }, "xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==" }, "xml2js": { "version": "0.5.0", diff --git a/package.json b/package.json index bc9202dd..dff4d19a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dotenv": "^16.3.1", "fast-csv": "^4.3.6", "got": "^13.0.0", - "jsdom": "^22.1.0", + "jsdom": "^23.0.0", "rss-parser": "^3.13.0" }, "devDependencies": { From 218a65c9829ecdb77bde508781fe0530d370d238 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 22:34:48 +0000 Subject: [PATCH 02/62] build(deps): bump jsdom from 23.0.0 to 23.0.1 Bumps [jsdom](https://github.com/jsdom/jsdom) from 23.0.0 to 23.0.1. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/23.0.0...23.0.1) --- updated-dependencies: - dependency-name: jsdom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index c1189403..efce1152 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "dotenv": "^16.3.1", "fast-csv": "^4.3.6", "got": "^13.0.0", - "jsdom": "^23.0.0", + "jsdom": "^23.0.1", "rss-parser": "^3.13.0" }, "devDependencies": { @@ -434,9 +434,9 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "node_modules/jsdom": { - "version": "23.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.0.tgz", - "integrity": "sha512-cbL/UCtohJguhFC7c2/hgW6BeZCNvP7URQGnx9tSJRYKCdnfbfWOrtuLTMfiB2VxKsx5wPHVsh/J0aBy9lIIhQ==", + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.1.tgz", + "integrity": "sha512-2i27vgvlUsGEBO9+/kJQRbtqtm+191b5zAZrU/UezVmnC2dlDAFLgDYJvAEi94T4kjsRKkezEtLQTgsNEsW2lQ==", "dependencies": { "cssstyle": "^3.0.0", "data-urls": "^5.0.0", @@ -464,7 +464,7 @@ "node": ">=18" }, "peerDependencies": { - "canvas": "^3.0.0" + "canvas": "^2.11.2" }, "peerDependenciesMeta": { "canvas": { @@ -1202,9 +1202,9 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "jsdom": { - "version": "23.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.0.tgz", - "integrity": "sha512-cbL/UCtohJguhFC7c2/hgW6BeZCNvP7URQGnx9tSJRYKCdnfbfWOrtuLTMfiB2VxKsx5wPHVsh/J0aBy9lIIhQ==", + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.1.tgz", + "integrity": "sha512-2i27vgvlUsGEBO9+/kJQRbtqtm+191b5zAZrU/UezVmnC2dlDAFLgDYJvAEi94T4kjsRKkezEtLQTgsNEsW2lQ==", "requires": { "cssstyle": "^3.0.0", "data-urls": "^5.0.0", diff --git a/package.json b/package.json index dff4d19a..7151d151 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dotenv": "^16.3.1", "fast-csv": "^4.3.6", "got": "^13.0.0", - "jsdom": "^23.0.0", + "jsdom": "^23.0.1", "rss-parser": "^3.13.0" }, "devDependencies": { From 367a0f0c98ec7c5816da11985b38194ddc141b62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 22:34:35 +0000 Subject: [PATCH 03/62] build(deps): bump @notionhq/client from 2.2.13 to 2.2.14 Bumps [@notionhq/client](https://github.com/makenotion/notion-sdk-js) from 2.2.13 to 2.2.14. - [Release notes](https://github.com/makenotion/notion-sdk-js/releases) - [Commits](https://github.com/makenotion/notion-sdk-js/compare/v2.2.13...v2.2.14) --- updated-dependencies: - dependency-name: "@notionhq/client" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index efce1152..633625df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "@notionhq/client": "^2.2.13", + "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", "dotenv": "^16.3.1", "fast-csv": "^4.3.6", @@ -52,9 +52,9 @@ } }, "node_modules/@notionhq/client": { - "version": "2.2.13", - "resolved": "https://registry.npmjs.org/@notionhq/client/-/client-2.2.13.tgz", - "integrity": "sha512-wJpEl30QUSy2K3/Q2c2knNiZlLXJ17JnQgaIiFbN68IMJy+2TE9fXLxvV1N/cMVs2+SpteAa6PlyrUgfGdlmDg==", + "version": "2.2.14", + "resolved": "https://registry.npmjs.org/@notionhq/client/-/client-2.2.14.tgz", + "integrity": "sha512-oqUefZtCiJPCX+74A1Os9OVTef3fSnVWe2eVQtU1HJSD+nsfxfhwvDKnzJTh2Tw1ZHKLxpieHB/nzGdY+Uo12A==", "dependencies": { "@types/node-fetch": "^2.5.10", "node-fetch": "^2.6.1" @@ -936,9 +936,9 @@ } }, "@notionhq/client": { - "version": "2.2.13", - "resolved": "https://registry.npmjs.org/@notionhq/client/-/client-2.2.13.tgz", - "integrity": "sha512-wJpEl30QUSy2K3/Q2c2knNiZlLXJ17JnQgaIiFbN68IMJy+2TE9fXLxvV1N/cMVs2+SpteAa6PlyrUgfGdlmDg==", + "version": "2.2.14", + "resolved": "https://registry.npmjs.org/@notionhq/client/-/client-2.2.14.tgz", + "integrity": "sha512-oqUefZtCiJPCX+74A1Os9OVTef3fSnVWe2eVQtU1HJSD+nsfxfhwvDKnzJTh2Tw1ZHKLxpieHB/nzGdY+Uo12A==", "requires": { "@types/node-fetch": "^2.5.10", "node-fetch": "^2.6.1" diff --git a/package.json b/package.json index 7151d151..93e6da50 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "node": ">=16" }, "dependencies": { - "@notionhq/client": "^2.2.13", + "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", "dotenv": "^16.3.1", "fast-csv": "^4.3.6", From 09e0db67de26f65c41841b9d88b99c48940a51d8 Mon Sep 17 00:00:00 2001 From: bamboo Date: Mon, 11 Dec 2023 23:55:36 +0800 Subject: [PATCH 04/62] :arrow_up: Deps: upgrade got to v14 and it requires nodejs 20. --- .github/workflows/sync-rss.js.yml | 4 +- package-lock.json | 170 +++++++++++++++++------------- package.json | 4 +- 3 files changed, 98 insertions(+), 80 deletions(-) diff --git a/.github/workflows/sync-rss.js.yml b/.github/workflows/sync-rss.js.yml index e953ac28..c9350b46 100644 --- a/.github/workflows/sync-rss.js.yml +++ b/.github/workflows/sync-rss.js.yml @@ -17,8 +17,8 @@ jobs: strategy: matrix: - node-version: [18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + node-version: [20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/previous-releases env: NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} diff --git a/package-lock.json b/package-lock.json index 633625df..af8b43b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "dayjs": "^1.11.10", "dotenv": "^16.3.1", "fast-csv": "^4.3.6", - "got": "^13.0.0", + "got": "^14.0.0", "jsdom": "^23.0.1", "rss-parser": "^3.13.0" }, @@ -64,11 +64,11 @@ } }, "node_modules/@sindresorhus/is": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.4.1.tgz", - "integrity": "sha512-axlrvsHlHlFmKKMEg4VyvMzFr93JWJj4eIfXY1STVuO2fsImCa7ncaiG5gC8HKOX590AW5RtRsC41/B+OfrSqw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.1.0.tgz", + "integrity": "sha512-BuvU07zq3tQ/2SIgBsEuxKYDyDjC0n7Zir52bpHy2xnBbW81+po43aLFPLbeV3HRAheFbGud1qgcqSYfhtHMAg==", "engines": { - "node": ">=14.16" + "node": ">=16" }, "funding": { "url": "https://github.com/sindresorhus/is?sponsor=1" @@ -86,9 +86,9 @@ } }, "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" }, "node_modules/@types/node": { "version": "14.14.22", @@ -129,14 +129,14 @@ } }, "node_modules/cacheable-request": { - "version": "10.2.10", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.10.tgz", - "integrity": "sha512-v6WB+Epm/qO4Hdlio/sfUn69r5Shgh39SsE9DSd4bIezP0mblOlObI+I0kUEM7J0JFc+I7pSeMeYaOYtX1N/VQ==", + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", "dependencies": { - "@types/http-cache-semantics": "^4.0.1", + "@types/http-cache-semantics": "^4.0.2", "get-stream": "^6.0.1", "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.2", + "keyv": "^4.5.3", "mimic-response": "^4.0.0", "normalize-url": "^8.0.0", "responselike": "^3.0.0" @@ -145,6 +145,17 @@ "node": ">=14.16" } }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -311,43 +322,43 @@ } }, "node_modules/form-data-encoder": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", - "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-4.0.2.tgz", + "integrity": "sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw==", "engines": { - "node": ">= 14.17" + "node": ">= 18" } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/got": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/got/-/got-13.0.0.tgz", - "integrity": "sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/got/-/got-14.0.0.tgz", + "integrity": "sha512-X01vTgaX9SwaMq5DfImvS+3GMQFFs5HtrrlS9CuzUSzkxAf/tWGEyynuI+Qy7BjciMczZGjyVSmawYbP4eYhYA==", "dependencies": { - "@sindresorhus/is": "^5.2.0", + "@sindresorhus/is": "^6.1.0", "@szmarczak/http-timer": "^5.0.1", "cacheable-lookup": "^7.0.0", - "cacheable-request": "^10.2.8", + "cacheable-request": "^10.2.14", "decompress-response": "^6.0.0", - "form-data-encoder": "^2.1.2", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", + "form-data-encoder": "^4.0.2", + "get-stream": "^8.0.1", + "http2-wrapper": "^2.2.1", "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", + "p-cancelable": "^4.0.1", "responselike": "^3.0.0" }, "engines": { - "node": ">=16" + "node": ">=20" }, "funding": { "url": "https://github.com/sindresorhus/got?sponsor=1" @@ -382,9 +393,9 @@ } }, "node_modules/http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.2.0" @@ -491,9 +502,9 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, "node_modules/keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dependencies": { "json-buffer": "3.0.1" } @@ -639,11 +650,11 @@ "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" }, "node_modules/p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-4.0.1.tgz", + "integrity": "sha512-wBowNApzd45EIKdO1LaU+LrMBwAcjfPaYtVzV3lmfM3gf8Z4CHZsiIqlM8TZZ8okYvh5A1cP6gTfCRQtwUpaUg==", "engines": { - "node": ">=12.20" + "node": ">=14.16" } }, "node_modules/parse5": { @@ -945,9 +956,9 @@ } }, "@sindresorhus/is": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.4.1.tgz", - "integrity": "sha512-axlrvsHlHlFmKKMEg4VyvMzFr93JWJj4eIfXY1STVuO2fsImCa7ncaiG5gC8HKOX590AW5RtRsC41/B+OfrSqw==" + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.1.0.tgz", + "integrity": "sha512-BuvU07zq3tQ/2SIgBsEuxKYDyDjC0n7Zir52bpHy2xnBbW81+po43aLFPLbeV3HRAheFbGud1qgcqSYfhtHMAg==" }, "@szmarczak/http-timer": { "version": "5.0.1", @@ -958,9 +969,9 @@ } }, "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" }, "@types/node": { "version": "14.14.22", @@ -995,17 +1006,24 @@ "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==" }, "cacheable-request": { - "version": "10.2.10", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.10.tgz", - "integrity": "sha512-v6WB+Epm/qO4Hdlio/sfUn69r5Shgh39SsE9DSd4bIezP0mblOlObI+I0kUEM7J0JFc+I7pSeMeYaOYtX1N/VQ==", + "version": "10.2.14", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", + "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", "requires": { - "@types/http-cache-semantics": "^4.0.1", + "@types/http-cache-semantics": "^4.0.2", "get-stream": "^6.0.1", "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.2", + "keyv": "^4.5.3", "mimic-response": "^4.0.0", "normalize-url": "^8.0.0", "responselike": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + } } }, "combined-stream": { @@ -1112,30 +1130,30 @@ } }, "form-data-encoder": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", - "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-4.0.2.tgz", + "integrity": "sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw==" }, "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==" }, "got": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/got/-/got-13.0.0.tgz", - "integrity": "sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/got/-/got-14.0.0.tgz", + "integrity": "sha512-X01vTgaX9SwaMq5DfImvS+3GMQFFs5HtrrlS9CuzUSzkxAf/tWGEyynuI+Qy7BjciMczZGjyVSmawYbP4eYhYA==", "requires": { - "@sindresorhus/is": "^5.2.0", + "@sindresorhus/is": "^6.1.0", "@szmarczak/http-timer": "^5.0.1", "cacheable-lookup": "^7.0.0", - "cacheable-request": "^10.2.8", + "cacheable-request": "^10.2.14", "decompress-response": "^6.0.0", - "form-data-encoder": "^2.1.2", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", + "form-data-encoder": "^4.0.2", + "get-stream": "^8.0.1", + "http2-wrapper": "^2.2.1", "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", + "p-cancelable": "^4.0.1", "responselike": "^3.0.0" } }, @@ -1162,9 +1180,9 @@ } }, "http2-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", - "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", "requires": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.2.0" @@ -1247,9 +1265,9 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, "keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "requires": { "json-buffer": "3.0.1" } @@ -1362,9 +1380,9 @@ "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" }, "p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-4.0.1.tgz", + "integrity": "sha512-wBowNApzd45EIKdO1LaU+LrMBwAcjfPaYtVzV3lmfM3gf8Z4CHZsiIqlM8TZZ8okYvh5A1cP6gTfCRQtwUpaUg==" }, "parse5": { "version": "7.1.2", diff --git a/package.json b/package.json index 93e6da50..0503fcbe 100644 --- a/package.json +++ b/package.json @@ -17,14 +17,14 @@ "author": "zhuzi ", "license": "MIT", "engines": { - "node": ">=16" + "node": ">=20" }, "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", "dotenv": "^16.3.1", "fast-csv": "^4.3.6", - "got": "^13.0.0", + "got": "^14.0.0", "jsdom": "^23.0.1", "rss-parser": "^3.13.0" }, From 47690e41ee1a92910775ef9fb5eff0e9a3c0eb2d Mon Sep 17 00:00:00 2001 From: bamboo Date: Fri, 29 Dec 2023 00:33:19 +0800 Subject: [PATCH 05/62] :bug: Fix: comment_text & rating_grade for neodb cannot be undefined. --- sync-rss.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync-rss.js b/sync-rss.js index ccc3d19c..08f5ba2c 100644 --- a/sync-rss.js +++ b/sync-rss.js @@ -194,8 +194,8 @@ async function markItemNeodb(neodbItem, item) { json: { shelf_type: item.status, visibility: 2, - comment_text: item.comment, - rating_grade: item.rating ? item.rating * 2 : undefined, + comment_text: item.comment || '', + rating_grade: item.rating ? item.rating * 2 : 0, created_time: item.time, post_to_fediverse: false, }, From 004fd69d498a0cd90207604c56fbf1ce1a275bf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 22:52:30 +0000 Subject: [PATCH 06/62] build(deps): bump jsdom from 23.0.1 to 23.2.0 Bumps [jsdom](https://github.com/jsdom/jsdom) from 23.0.1 to 23.2.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/23.0.1...23.2.0) --- updated-dependencies: - dependency-name: jsdom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 157 +++++++++++++++++++++++++++++++++++----------- package.json | 2 +- 2 files changed, 121 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index af8b43b4..b686c1c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,14 +14,24 @@ "dotenv": "^16.3.1", "fast-csv": "^4.3.6", "got": "^14.0.0", - "jsdom": "^23.0.1", + "jsdom": "^23.2.0", "rss-parser": "^3.13.0" }, "devDependencies": { "image-downloader": "^4.3.0" }, "engines": { - "node": ">=16" + "node": ">=20" + } + }, + "node_modules/@asamuzakjp/dom-selector": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-2.0.1.tgz", + "integrity": "sha512-QJAJffmCiymkv6YyQ7voyQb5caCth6jzZsQncYCpHXrJ7RqdYG5y43+is8mnFcYubdOkr7cn1+na9BdFMxqw7w==", + "dependencies": { + "bidi-js": "^1.0.3", + "css-tree": "^2.3.1", + "is-potential-custom-element-name": "^1.0.1" } }, "node_modules/@fast-csv/format": { @@ -120,6 +130,14 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "node_modules/bidi-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", + "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", + "dependencies": { + "require-from-string": "^2.0.2" + } + }, "node_modules/cacheable-lookup": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", @@ -167,15 +185,27 @@ "node": ">= 0.8" } }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, "node_modules/cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz", + "integrity": "sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==", "dependencies": { "rrweb-cssom": "^0.6.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/data-urls": { @@ -445,11 +475,12 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "node_modules/jsdom": { - "version": "23.0.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.1.tgz", - "integrity": "sha512-2i27vgvlUsGEBO9+/kJQRbtqtm+191b5zAZrU/UezVmnC2dlDAFLgDYJvAEi94T4kjsRKkezEtLQTgsNEsW2lQ==", + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.2.0.tgz", + "integrity": "sha512-L88oL7D/8ufIES+Zjz7v0aes+oBMh2Xnh3ygWvL0OaICOomKEPKuPnIfBJekiXr+BHbbMjrWn/xqrDQuxFTeyA==", "dependencies": { - "cssstyle": "^3.0.0", + "@asamuzakjp/dom-selector": "^2.0.1", + "cssstyle": "^4.0.1", "data-urls": "^5.0.0", "decimal.js": "^10.4.3", "form-data": "^4.0.0", @@ -457,7 +488,6 @@ "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.7", "parse5": "^7.1.2", "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", @@ -468,7 +498,7 @@ "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.14.2", + "ws": "^8.16.0", "xml-name-validator": "^5.0.0" }, "engines": { @@ -560,6 +590,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" + }, "node_modules/mime-db": { "version": "1.47.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", @@ -644,11 +679,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" - }, "node_modules/p-cancelable": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-4.0.1.tgz", @@ -708,6 +738,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -767,6 +805,14 @@ "node": ">=v12.22.7" } }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -865,9 +911,9 @@ } }, "node_modules/ws": { - "version": "8.14.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", - "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "engines": { "node": ">=10.0.0" }, @@ -919,6 +965,16 @@ } }, "dependencies": { + "@asamuzakjp/dom-selector": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-2.0.1.tgz", + "integrity": "sha512-QJAJffmCiymkv6YyQ7voyQb5caCth6jzZsQncYCpHXrJ7RqdYG5y43+is8mnFcYubdOkr7cn1+na9BdFMxqw7w==", + "requires": { + "bidi-js": "^1.0.3", + "css-tree": "^2.3.1", + "is-potential-custom-element-name": "^1.0.1" + } + }, "@fast-csv/format": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", @@ -1000,6 +1056,14 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "bidi-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", + "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", + "requires": { + "require-from-string": "^2.0.2" + } + }, "cacheable-lookup": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", @@ -1034,10 +1098,19 @@ "delayed-stream": "~1.0.0" } }, + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "requires": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + } + }, "cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz", + "integrity": "sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==", "requires": { "rrweb-cssom": "^0.6.0" } @@ -1220,11 +1293,12 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "jsdom": { - "version": "23.0.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.1.tgz", - "integrity": "sha512-2i27vgvlUsGEBO9+/kJQRbtqtm+191b5zAZrU/UezVmnC2dlDAFLgDYJvAEi94T4kjsRKkezEtLQTgsNEsW2lQ==", + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.2.0.tgz", + "integrity": "sha512-L88oL7D/8ufIES+Zjz7v0aes+oBMh2Xnh3ygWvL0OaICOomKEPKuPnIfBJekiXr+BHbbMjrWn/xqrDQuxFTeyA==", "requires": { - "cssstyle": "^3.0.0", + "@asamuzakjp/dom-selector": "^2.0.1", + "cssstyle": "^4.0.1", "data-urls": "^5.0.0", "decimal.js": "^10.4.3", "form-data": "^4.0.0", @@ -1232,7 +1306,6 @@ "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.7", "parse5": "^7.1.2", "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", @@ -1243,7 +1316,7 @@ "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.14.2", + "ws": "^8.16.0", "xml-name-validator": "^5.0.0" }, "dependencies": { @@ -1317,6 +1390,11 @@ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==" }, + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" + }, "mime-db": { "version": "1.47.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", @@ -1374,11 +1452,6 @@ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==" }, - "nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" - }, "p-cancelable": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-4.0.1.tgz", @@ -1419,6 +1492,11 @@ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -1469,6 +1547,11 @@ "xmlchars": "^2.2.0" } }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -1543,9 +1626,9 @@ } }, "ws": { - "version": "8.14.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", - "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "requires": {} }, "xml-name-validator": { diff --git a/package.json b/package.json index 0503fcbe..d32f63eb 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dotenv": "^16.3.1", "fast-csv": "^4.3.6", "got": "^14.0.0", - "jsdom": "^23.0.1", + "jsdom": "^23.2.0", "rss-parser": "^3.13.0" }, "devDependencies": { From b1dee6b043eace46cb20d7152fa935ad5a35f3b8 Mon Sep 17 00:00:00 2001 From: bamboo Date: Mon, 15 Jan 2024 23:49:04 +0800 Subject: [PATCH 07/62] :memo: Docs: update tutorial link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c5ca8fdd..1e1a7824 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![sync-rss](https://github.com/bambooom/douban-backup/actions/workflows/sync-rss.js.yml/badge.svg) -> 详细教程 -> https://zhuzi.dev/2021/06/05/douban-backup-sync-notion/ +> 详细教程 -> https://zhuzi.dev/posts/2021-06-05-douban-backup-sync-notion/ > > 油猴脚本 -> https://greasyfork.org/en/scripts/420999 From 4955604637e58094bcfd576e68b999e500a27e19 Mon Sep 17 00:00:00 2001 From: bamboo Date: Tue, 16 Jan 2024 00:41:42 +0800 Subject: [PATCH 08/62] :sparkles: Feat: add custom cols json file for one can set customized column namt in notion --- .env.example | 1 + .github/workflows/sync-rss.js.yml | 1 + cols.custom.json | 25 ++++++++++ sync-rss.js | 5 +- util.js | 83 +++++++++++++++++++------------ 5 files changed, 83 insertions(+), 32 deletions(-) create mode 100644 cols.custom.json diff --git a/.env.example b/.env.example index 4762d730..f595bcd1 100644 --- a/.env.example +++ b/.env.example @@ -6,3 +6,4 @@ NOTION_GAME_DATABASE_ID= NOTION_DRAMA_DATABASE_ID= DOUBAN_USER_ID= NEODB_API_TOKEN= +CUSTOM_COLUMN_NAME="./cols.custom.json" diff --git a/.github/workflows/sync-rss.js.yml b/.github/workflows/sync-rss.js.yml index c9350b46..91e05023 100644 --- a/.github/workflows/sync-rss.js.yml +++ b/.github/workflows/sync-rss.js.yml @@ -29,6 +29,7 @@ jobs: NOTION_DRAMA_DATABASE_ID: ${{ secrets.NOTION_DRAMA_DATABASE_ID }} DOUBAN_USER_ID: ${{ secrets.DOUBAN_USER_ID }} NEODB_API_TOKEN: ${{ secrets.NEODB_API_TOKEN }} + CUSTOM_COLUMN_NAME: ${{ secrets.CUSTOM_COLUMN_NAME }} steps: - uses: actions/checkout@v3 diff --git a/cols.custom.json b/cols.custom.json new file mode 100644 index 00000000..ff8457d6 --- /dev/null +++ b/cols.custom.json @@ -0,0 +1,25 @@ +{ + "NAME": "name", + "POSTER": "海报", + "MOVIE_TITLE": "电影/电视剧/番组", + "YEAR": "上映年份", + "DIRECTORS": "导演", + "ACTORS": "主演", + "GENRE": "类型", + "IMDB_LINK": "IMDb 链接", + "COVER": "封面", + "MUSIC_TITLE": "单曲/专辑", + "RELEASE_DATE": "发行日期", + "MUSICIAN": "音乐家", + "BOOK_TITLE": "书名", + "PUBLICATION_DATE": "出版日期", + "PUBLISHING_HOUSE": "出版社", + "WRITER": "作者", + "ISBN": "ISBN", + "GAME_TITLE": "游戏名称", + "DRAMA_TITLE": "舞台剧名称", + "RATING": "个人评分", + "RATING_DATE": "打分日期", + "COMMENTS": "我的短评", + "ITEM_LINK": "条目链接" +} diff --git a/sync-rss.js b/sync-rss.js index 08f5ba2c..719e416e 100644 --- a/sync-rss.js +++ b/sync-rss.js @@ -4,7 +4,7 @@ import dayjs from 'dayjs'; import got from 'got'; import { JSDOM } from 'jsdom'; import Parser from 'rss-parser'; -import { DB_PROPERTIES, PropertyType, sleep } from './util.js'; +import { getColumnNames, PropertyType, sleep } from './util.js'; dotenv.config(); const parser = new Parser(); @@ -52,8 +52,11 @@ const bookDBID = process.env.NOTION_BOOK_DATABASE_ID; const gameDBID = process.env.NOTION_GAME_DATABASE_ID; const dramaDBID = process.env.NOTION_DRAMA_DATABASE_ID; const neodbToken = process.env.NEODB_API_TOKEN; +let DB_PROPERTIES;; async function main() { + DB_PROPERTIES = await getColumnNames(); + console.log('Refreshing feeds from RSS...'); let feeds; try { diff --git a/util.js b/util.js index 0f02b303..db32d317 100644 --- a/util.js +++ b/util.js @@ -1,33 +1,54 @@ -export const DB_PROPERTIES = { - NAME: 'name', // 用于log - // movie - POSTER: '海报', - MOVIE_TITLE: '电影/电视剧/番组', - YEAR: '上映年份', - DIRECTORS: '导演', - ACTORS: '主演', - GENRE: '类型', // movie, game, drama - IMDB_LINK: 'IMDb 链接', - // music - COVER: '封面', // music, book, game - MUSIC_TITLE: '单曲/专辑', - RELEASE_DATE: '发行日期', // music and game - MUSICIAN: '音乐家', - // book - BOOK_TITLE: '书名', - PUBLICATION_DATE: '出版日期', - PUBLISHING_HOUSE: '出版社', - WRITER: '作者', - ISBN: 'ISBN', - // game - GAME_TITLE: '游戏名称', - // drama - DRAMA_TITLE: '舞台剧名称', - // common - RATING: '个人评分', // common - RATING_DATE: '打分日期', // common - COMMENTS: '我的短评', // common - ITEM_LINK: '条目链接', // common +import dotenv from 'dotenv'; + +dotenv.config(); + +const customColsFile = process.env.CUSTOM_COLUMN_NAME; + +export const getColumnNames = async () => { + const base = { + NAME: 'name', // 用于log + // movie + POSTER: '海报', + MOVIE_TITLE: '电影/电视剧/番组', + YEAR: '上映年份', + DIRECTORS: '导演', + ACTORS: '主演', + GENRE: '类型', // movie, game, drama + IMDB_LINK: 'IMDb 链接', + // music + COVER: '封面', // music, book, game + MUSIC_TITLE: '单曲/专辑', + RELEASE_DATE: '发行日期', // music and game + MUSICIAN: '音乐家', + // book + BOOK_TITLE: '书名', + PUBLICATION_DATE: '出版日期', + PUBLISHING_HOUSE: '出版社', + WRITER: '作者', + ISBN: 'ISBN', + // game + GAME_TITLE: '游戏名称', + // drama + DRAMA_TITLE: '舞台剧名称', + // common + RATING: '个人评分', // common + RATING_DATE: '打分日期', // common + COMMENTS: '我的短评', // common + ITEM_LINK: '条目链接', // common + }; + if (customColsFile) { + try { + const customCols = await import(customColsFile, { + assert: { type: 'json' }, + }); + if (customCols) { + return { ...base, ...customCols }; + } + } catch (error) { + console.log('Failed to load custom columns setting: ', error); + } + } + return base; }; export const PropertyType = { @@ -56,5 +77,5 @@ export const PropertyType = { }; export function sleep(ms) { - return new Promise(r => setTimeout(r, ms)); + return new Promise((r) => setTimeout(r, ms)); } From 05e4e60e237c098d92f8ce9353d53a00f1f8fa21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:10:48 +0000 Subject: [PATCH 09/62] build(deps): bump fast-csv from 4.3.6 to 5.0.0 Bumps [fast-csv](https://github.com/C2FO/fast-csv/tree/HEAD/packages/fast-csv) from 4.3.6 to 5.0.0. - [Release notes](https://github.com/C2FO/fast-csv/releases) - [Changelog](https://github.com/C2FO/fast-csv/blob/main/packages/fast-csv/CHANGELOG.md) - [Commits](https://github.com/C2FO/fast-csv/commits/v5.0.0/packages/fast-csv) --- updated-dependencies: - dependency-name: fast-csv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 78 ++++++++++++++++++++++------------------------- package.json | 2 +- 2 files changed, 38 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index b686c1c9..30cb3b99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", "dotenv": "^16.3.1", - "fast-csv": "^4.3.6", + "fast-csv": "^5.0.0", "got": "^14.0.0", "jsdom": "^23.2.0", "rss-parser": "^3.13.0" @@ -35,11 +35,10 @@ } }, "node_modules/@fast-csv/format": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", - "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-5.0.0.tgz", + "integrity": "sha512-IyMpHwYIOGa2f0BJi6Wk55UF0oBA5urdIydoEDYxPo88LFbeb3Yr4rgpu98OAO1glUWheSnNtUgS80LE+/dqmw==", "dependencies": { - "@types/node": "^14.0.1", "lodash.escaperegexp": "^4.1.2", "lodash.isboolean": "^3.0.3", "lodash.isequal": "^4.5.0", @@ -48,11 +47,10 @@ } }, "node_modules/@fast-csv/parse": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-4.3.6.tgz", - "integrity": "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-5.0.0.tgz", + "integrity": "sha512-ecF8tCm3jVxeRjEB6VPzmA+1wGaJ5JgaUX2uesOXdXD6qQp0B3EdshOIed4yT1Xlj/F2f8v4zHSo0Oi31L697g==", "dependencies": { - "@types/node": "^14.0.1", "lodash.escaperegexp": "^4.1.2", "lodash.groupby": "^4.6.0", "lodash.isfunction": "^3.0.9", @@ -307,12 +305,12 @@ } }, "node_modules/fast-csv": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-4.3.6.tgz", - "integrity": "sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.0.tgz", + "integrity": "sha512-CEwsCv2W+0AvlZRfS4rpagcP2gpMbMjbkFOn9SZ5T6F8gvl040fwPf7/8Rx9/Pxz3NQWbHYOsRFhK/MH/xjaaQ==", "dependencies": { - "@fast-csv/format": "4.3.5", - "@fast-csv/parse": "4.3.6" + "@fast-csv/format": "5.0.0", + "@fast-csv/parse": "5.0.0" }, "engines": { "node": ">=10.0.0" @@ -542,22 +540,22 @@ "node_modules/lodash.escaperegexp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" + "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==" }, "node_modules/lodash.groupby": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", - "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=" + "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==" }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, "node_modules/lodash.isfunction": { "version": "3.0.9", @@ -567,17 +565,17 @@ "node_modules/lodash.isnil": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", - "integrity": "sha1-SeKM1VkBNFjIFMVHnTxmOiG/qmw=" + "integrity": "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng==" }, "node_modules/lodash.isundefined": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", - "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g=" + "integrity": "sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA==" }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" }, "node_modules/lowercase-keys": { "version": "3.0.0", @@ -976,11 +974,10 @@ } }, "@fast-csv/format": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-4.3.5.tgz", - "integrity": "sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-5.0.0.tgz", + "integrity": "sha512-IyMpHwYIOGa2f0BJi6Wk55UF0oBA5urdIydoEDYxPo88LFbeb3Yr4rgpu98OAO1glUWheSnNtUgS80LE+/dqmw==", "requires": { - "@types/node": "^14.0.1", "lodash.escaperegexp": "^4.1.2", "lodash.isboolean": "^3.0.3", "lodash.isequal": "^4.5.0", @@ -989,11 +986,10 @@ } }, "@fast-csv/parse": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-4.3.6.tgz", - "integrity": "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-5.0.0.tgz", + "integrity": "sha512-ecF8tCm3jVxeRjEB6VPzmA+1wGaJ5JgaUX2uesOXdXD6qQp0B3EdshOIed4yT1Xlj/F2f8v4zHSo0Oi31L697g==", "requires": { - "@types/node": "^14.0.1", "lodash.escaperegexp": "^4.1.2", "lodash.groupby": "^4.6.0", "lodash.isfunction": "^3.0.9", @@ -1178,12 +1174,12 @@ "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" }, "fast-csv": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-4.3.6.tgz", - "integrity": "sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.0.tgz", + "integrity": "sha512-CEwsCv2W+0AvlZRfS4rpagcP2gpMbMjbkFOn9SZ5T6F8gvl040fwPf7/8Rx9/Pxz3NQWbHYOsRFhK/MH/xjaaQ==", "requires": { - "@fast-csv/format": "4.3.5", - "@fast-csv/parse": "4.3.6" + "@fast-csv/format": "5.0.0", + "@fast-csv/parse": "5.0.0" } }, "follow-redirects": { @@ -1348,22 +1344,22 @@ "lodash.escaperegexp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" + "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==" }, "lodash.groupby": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", - "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=" + "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==" }, "lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" }, "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, "lodash.isfunction": { "version": "3.0.9", @@ -1373,17 +1369,17 @@ "lodash.isnil": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", - "integrity": "sha1-SeKM1VkBNFjIFMVHnTxmOiG/qmw=" + "integrity": "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng==" }, "lodash.isundefined": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", - "integrity": "sha1-I+89lTVWUgOmbO/VuDD4SJEa+0g=" + "integrity": "sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA==" }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" }, "lowercase-keys": { "version": "3.0.0", diff --git a/package.json b/package.json index d32f63eb..26652823 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", "dotenv": "^16.3.1", - "fast-csv": "^4.3.6", + "fast-csv": "^5.0.0", "got": "^14.0.0", "jsdom": "^23.2.0", "rss-parser": "^3.13.0" From 3a6e9dfb8efd07516205bcdde23134f78e16fe23 Mon Sep 17 00:00:00 2001 From: bamboo Date: Tue, 16 Jan 2024 23:20:10 +0800 Subject: [PATCH 10/62] :recycle: Refactor: add folder for not using scripts --- .gitignore | 3 +-- db-notes-img-dl.js => scripts/db-notes-img-dl.js | 2 +- export-note.user.js => scripts/export-note.user.js | 0 export.user.js => scripts/export.user.js | 0 update-notion.js => scripts/update-notion.js | 2 +- 5 files changed, 3 insertions(+), 4 deletions(-) rename db-notes-img-dl.js => scripts/db-notes-img-dl.js (98%) rename export-note.user.js => scripts/export-note.user.js (100%) rename export.user.js => scripts/export.user.js (100%) rename update-notion.js => scripts/update-notion.js (99%) diff --git a/.gitignore b/.gitignore index 8ca46c6e..3b03a2b0 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,5 @@ test.* # tmp file tmp* -# douban notes and assets folder -douban-notes-* +# assets folder assets diff --git a/db-notes-img-dl.js b/scripts/db-notes-img-dl.js similarity index 98% rename from db-notes-img-dl.js rename to scripts/db-notes-img-dl.js index e1bc5101..f358896b 100644 --- a/db-notes-img-dl.js +++ b/scripts/db-notes-img-dl.js @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import { promisify } from 'node:util'; import download from 'image-downloader'; -import { sleep } from './util'; +import { sleep } from '../util'; // const pinyin = require("pinyin"); // no need to convert Chinese titles now const writeFile = promisify(fs.writeFile); diff --git a/export-note.user.js b/scripts/export-note.user.js similarity index 100% rename from export-note.user.js rename to scripts/export-note.user.js diff --git a/export.user.js b/scripts/export.user.js similarity index 100% rename from export.user.js rename to scripts/export.user.js diff --git a/update-notion.js b/scripts/update-notion.js similarity index 99% rename from update-notion.js rename to scripts/update-notion.js index 3af06927..4ece7893 100644 --- a/update-notion.js +++ b/scripts/update-notion.js @@ -13,7 +13,7 @@ import { Client, LogLevel } from '@notionhq/client'; import dayjs from 'dayjs'; import got from 'got'; import { JSDOM } from 'jsdom'; -import { DB_PROPERTIES, sleep } from './util.js'; +import { DB_PROPERTIES, sleep } from '../util.js'; dotenv.config(); From f3ef9f3bd3ef1b479dee2c038b88651df923314d Mon Sep 17 00:00:00 2001 From: bamboo Date: Thu, 18 Jan 2024 00:14:56 +0800 Subject: [PATCH 11/62] :construction_worker: Deps: use tsx to act as ts executer --- package-lock.json | 1410 +++++++++++++++++++-------------------------- package.json | 25 +- 2 files changed, 614 insertions(+), 821 deletions(-) diff --git a/package-lock.json b/package-lock.json index 30cb3b99..5550d588 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "douban-backup", - "version": "0.0.1", - "lockfileVersion": 2, + "version": "1.0.0", + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "douban-backup", - "version": "0.0.1", + "version": "1.0.0", "license": "MIT", "dependencies": { "@notionhq/client": "^2.2.14", @@ -18,22 +18,391 @@ "rss-parser": "^3.13.0" }, "devDependencies": { - "image-downloader": "^4.3.0" + "@types/jsdom": "^21.1.6", + "tsx": "^4.7.0" }, "engines": { "node": ">=20" } }, "node_modules/@asamuzakjp/dom-selector": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-2.0.1.tgz", - "integrity": "sha512-QJAJffmCiymkv6YyQ7voyQb5caCth6jzZsQncYCpHXrJ7RqdYG5y43+is8mnFcYubdOkr7cn1+na9BdFMxqw7w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-2.0.2.tgz", + "integrity": "sha512-x1KXOatwofR6ZAYzXRBL5wrdV0vwNxlTCK9NCuLqAzQYARqGcvFwiJA6A1ERuh+dgeA4Dxm3JBYictIes+SqUQ==", "dependencies": { "bidi-js": "^1.0.3", "css-tree": "^2.3.1", "is-potential-custom-element-name": "^1.0.1" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", + "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", + "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", + "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", + "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", + "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", + "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", + "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", + "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", + "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", + "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", + "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", + "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", + "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", + "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", + "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", + "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", + "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", + "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", + "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", + "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", + "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", + "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@fast-csv/format": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-5.0.0.tgz", @@ -98,20 +467,40 @@ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" }, + "node_modules/@types/jsdom": { + "version": "21.1.6", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.6.tgz", + "integrity": "sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, "node_modules/@types/node": { - "version": "14.14.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz", - "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==" + "version": "20.11.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", + "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", "dependencies": { "@types/node": "*", - "form-data": "^3.0.0" + "form-data": "^4.0.0" } }, + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true + }, "node_modules/agent-base": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", @@ -126,7 +515,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/bidi-js": { "version": "1.0.3", @@ -218,6 +607,37 @@ "node": ">=18" } }, + "node_modules/data-urls/node_modules/tr46": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/data-urls/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/data-urls/node_modules/whatwg-url": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", + "dependencies": { + "tr46": "^5.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/dayjs": { "version": "1.11.10", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", @@ -280,7 +700,7 @@ "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "engines": { "node": ">=0.4.0" } @@ -297,13 +717,54 @@ } }, "node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/esbuild": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" + } + }, "node_modules/fast-csv": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.0.tgz", @@ -316,30 +777,10 @@ "node": ">=10.0.0" } }, - "node_modules/follow-redirects": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.0.tgz", - "integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -357,6 +798,20 @@ "node": ">= 18" } }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/get-stream": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", @@ -368,6 +823,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-tsconfig": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", + "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/got": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/got/-/got-14.0.0.tgz", @@ -455,18 +922,6 @@ "node": ">=0.10.0" } }, - "node_modules/image-downloader": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/image-downloader/-/image-downloader-4.3.0.tgz", - "integrity": "sha512-UBioN0E+8zu8N0lLC6wkZmPA/MA1A3yx9B1whjy5O/YiOV9XrSxLLKi7JqLLj6knQ3n9N1OBoHFS7shp8sehBQ==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.15.0" - }, - "engines": { - "node": ">=6.10.1" - } - }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -511,17 +966,35 @@ } } }, - "node_modules/jsdom/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "node_modules/jsdom/node_modules/tr46": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "punycode": "^2.3.1" }, "engines": { - "node": ">= 6" + "node": ">=18" + } + }, + "node_modules/jsdom/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/jsdom/node_modules/whatwg-url": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", + "dependencies": { + "tr46": "^5.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" } }, "node_modules/json-buffer": { @@ -594,19 +1067,19 @@ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" }, "node_modules/mime-db": { - "version": "1.47.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", - "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.30", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", - "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { - "mime-db": "1.47.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" @@ -629,9 +1102,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -647,25 +1120,6 @@ } } }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/normalize-url": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", @@ -696,17 +1150,6 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/parse5/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -754,6 +1197,15 @@ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/responselike": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", @@ -782,15 +1234,23 @@ "xml2js": "^0.5.0" } }, + "node_modules/rss-parser/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" }, "node_modules/saxes": { "version": "6.0.0", @@ -831,16 +1291,34 @@ } }, "node_modules/tr46": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", - "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/tsx": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.0.tgz", + "integrity": "sha512-I+t79RYPlEYlHn9a+KzwrvEwhJg35h/1zHsLC2JXvhC2mdynMv6Zxzvhv5EMV6VF5qJlLlkSnMVvdZV3PSIGcg==", + "dev": true, "dependencies": { - "punycode": "^2.3.1" + "esbuild": "~0.19.10", + "get-tsconfig": "^4.7.2" + }, + "bin": { + "tsx": "dist/cli.mjs" }, "engines": { - "node": ">=18" + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/universalify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", @@ -870,12 +1348,9 @@ } }, "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "engines": { - "node": ">=12" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/whatwg-encoding": { "version": "3.1.1", @@ -897,15 +1372,12 @@ } }, "node_modules/whatwg-url": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", - "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dependencies": { - "tr46": "^5.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=18" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, "node_modules/ws": { @@ -961,695 +1433,5 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" } - }, - "dependencies": { - "@asamuzakjp/dom-selector": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-2.0.1.tgz", - "integrity": "sha512-QJAJffmCiymkv6YyQ7voyQb5caCth6jzZsQncYCpHXrJ7RqdYG5y43+is8mnFcYubdOkr7cn1+na9BdFMxqw7w==", - "requires": { - "bidi-js": "^1.0.3", - "css-tree": "^2.3.1", - "is-potential-custom-element-name": "^1.0.1" - } - }, - "@fast-csv/format": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@fast-csv/format/-/format-5.0.0.tgz", - "integrity": "sha512-IyMpHwYIOGa2f0BJi6Wk55UF0oBA5urdIydoEDYxPo88LFbeb3Yr4rgpu98OAO1glUWheSnNtUgS80LE+/dqmw==", - "requires": { - "lodash.escaperegexp": "^4.1.2", - "lodash.isboolean": "^3.0.3", - "lodash.isequal": "^4.5.0", - "lodash.isfunction": "^3.0.9", - "lodash.isnil": "^4.0.0" - } - }, - "@fast-csv/parse": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@fast-csv/parse/-/parse-5.0.0.tgz", - "integrity": "sha512-ecF8tCm3jVxeRjEB6VPzmA+1wGaJ5JgaUX2uesOXdXD6qQp0B3EdshOIed4yT1Xlj/F2f8v4zHSo0Oi31L697g==", - "requires": { - "lodash.escaperegexp": "^4.1.2", - "lodash.groupby": "^4.6.0", - "lodash.isfunction": "^3.0.9", - "lodash.isnil": "^4.0.0", - "lodash.isundefined": "^3.0.1", - "lodash.uniq": "^4.5.0" - } - }, - "@notionhq/client": { - "version": "2.2.14", - "resolved": "https://registry.npmjs.org/@notionhq/client/-/client-2.2.14.tgz", - "integrity": "sha512-oqUefZtCiJPCX+74A1Os9OVTef3fSnVWe2eVQtU1HJSD+nsfxfhwvDKnzJTh2Tw1ZHKLxpieHB/nzGdY+Uo12A==", - "requires": { - "@types/node-fetch": "^2.5.10", - "node-fetch": "^2.6.1" - } - }, - "@sindresorhus/is": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.1.0.tgz", - "integrity": "sha512-BuvU07zq3tQ/2SIgBsEuxKYDyDjC0n7Zir52bpHy2xnBbW81+po43aLFPLbeV3HRAheFbGud1qgcqSYfhtHMAg==" - }, - "@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", - "requires": { - "defer-to-connect": "^2.0.1" - } - }, - "@types/http-cache-semantics": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", - "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" - }, - "@types/node": { - "version": "14.14.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz", - "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==" - }, - "@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", - "requires": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, - "agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "requires": { - "debug": "^4.3.4" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "bidi-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", - "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", - "requires": { - "require-from-string": "^2.0.2" - } - }, - "cacheable-lookup": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", - "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==" - }, - "cacheable-request": { - "version": "10.2.14", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", - "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", - "requires": { - "@types/http-cache-semantics": "^4.0.2", - "get-stream": "^6.0.1", - "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.3", - "mimic-response": "^4.0.0", - "normalize-url": "^8.0.0", - "responselike": "^3.0.0" - }, - "dependencies": { - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" - } - } - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "requires": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - } - }, - "cssstyle": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz", - "integrity": "sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==", - "requires": { - "rrweb-cssom": "^0.6.0" - } - }, - "data-urls": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", - "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", - "requires": { - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0" - } - }, - "dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "requires": { - "mimic-response": "^3.1.0" - }, - "dependencies": { - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" - } - } - }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==" - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" - }, - "fast-csv": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.0.tgz", - "integrity": "sha512-CEwsCv2W+0AvlZRfS4rpagcP2gpMbMjbkFOn9SZ5T6F8gvl040fwPf7/8Rx9/Pxz3NQWbHYOsRFhK/MH/xjaaQ==", - "requires": { - "@fast-csv/format": "5.0.0", - "@fast-csv/parse": "5.0.0" - } - }, - "follow-redirects": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.0.tgz", - "integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==", - "dev": true - }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "form-data-encoder": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-4.0.2.tgz", - "integrity": "sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw==" - }, - "get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==" - }, - "got": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/got/-/got-14.0.0.tgz", - "integrity": "sha512-X01vTgaX9SwaMq5DfImvS+3GMQFFs5HtrrlS9CuzUSzkxAf/tWGEyynuI+Qy7BjciMczZGjyVSmawYbP4eYhYA==", - "requires": { - "@sindresorhus/is": "^6.1.0", - "@szmarczak/http-timer": "^5.0.1", - "cacheable-lookup": "^7.0.0", - "cacheable-request": "^10.2.14", - "decompress-response": "^6.0.0", - "form-data-encoder": "^4.0.2", - "get-stream": "^8.0.1", - "http2-wrapper": "^2.2.1", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^4.0.1", - "responselike": "^3.0.0" - } - }, - "html-encoding-sniffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", - "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", - "requires": { - "whatwg-encoding": "^3.1.1" - } - }, - "http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" - }, - "http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "requires": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - } - }, - "http2-wrapper": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", - "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", - "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - } - }, - "https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "requires": { - "agent-base": "^7.0.2", - "debug": "4" - } - }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "image-downloader": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/image-downloader/-/image-downloader-4.3.0.tgz", - "integrity": "sha512-UBioN0E+8zu8N0lLC6wkZmPA/MA1A3yx9B1whjy5O/YiOV9XrSxLLKi7JqLLj6knQ3n9N1OBoHFS7shp8sehBQ==", - "dev": true, - "requires": { - "follow-redirects": "^1.15.0" - } - }, - "is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" - }, - "jsdom": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.2.0.tgz", - "integrity": "sha512-L88oL7D/8ufIES+Zjz7v0aes+oBMh2Xnh3ygWvL0OaICOomKEPKuPnIfBJekiXr+BHbbMjrWn/xqrDQuxFTeyA==", - "requires": { - "@asamuzakjp/dom-selector": "^2.0.1", - "cssstyle": "^4.0.1", - "data-urls": "^5.0.0", - "decimal.js": "^10.4.3", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "is-potential-custom-element-name": "^1.0.1", - "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.3", - "w3c-xmlserializer": "^5.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^3.1.1", - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0", - "ws": "^8.16.0", - "xml-name-validator": "^5.0.0" - }, - "dependencies": { - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } - } - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "requires": { - "json-buffer": "3.0.1" - } - }, - "lodash.escaperegexp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==" - }, - "lodash.groupby": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", - "integrity": "sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==" - }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" - }, - "lodash.isfunction": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", - "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==" - }, - "lodash.isnil": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isnil/-/lodash.isnil-4.0.0.tgz", - "integrity": "sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng==" - }, - "lodash.isundefined": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz", - "integrity": "sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA==" - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" - }, - "lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==" - }, - "mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" - }, - "mime-db": { - "version": "1.47.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", - "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" - }, - "mime-types": { - "version": "2.1.30", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", - "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", - "requires": { - "mime-db": "1.47.0" - } - }, - "mimic-response": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", - "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } - } - }, - "normalize-url": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", - "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==" - }, - "p-cancelable": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-4.0.1.tgz", - "integrity": "sha512-wBowNApzd45EIKdO1LaU+LrMBwAcjfPaYtVzV3lmfM3gf8Z4CHZsiIqlM8TZZ8okYvh5A1cP6gTfCRQtwUpaUg==" - }, - "parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "requires": { - "entities": "^4.4.0" - }, - "dependencies": { - "entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" - } - } - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" - }, - "resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" - }, - "responselike": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz", - "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==", - "requires": { - "lowercase-keys": "^3.0.0" - } - }, - "rrweb-cssom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz", - "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==" - }, - "rss-parser": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/rss-parser/-/rss-parser-3.13.0.tgz", - "integrity": "sha512-7jWUBV5yGN3rqMMj7CZufl/291QAhvrrGpDNE4k/02ZchL0npisiYYqULF71jCEKoIiHvK/Q2e6IkDwPziT7+w==", - "requires": { - "entities": "^2.0.3", - "xml2js": "^0.5.0" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "saxes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "requires": { - "xmlchars": "^2.2.0" - } - }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" - }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" - }, - "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - } - }, - "tr46": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", - "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", - "requires": { - "punycode": "^2.3.1" - } - }, - "universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" - }, - "url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "w3c-xmlserializer": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", - "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", - "requires": { - "xml-name-validator": "^5.0.0" - } - }, - "webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" - }, - "whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "requires": { - "iconv-lite": "0.6.3" - } - }, - "whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==" - }, - "whatwg-url": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", - "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", - "requires": { - "tr46": "^5.0.0", - "webidl-conversions": "^7.0.0" - } - }, - "ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", - "requires": {} - }, - "xml-name-validator": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", - "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==" - }, - "xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - } - }, - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" - }, - "xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" - } } } diff --git a/package.json b/package.json index 26652823..fc274c7f 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,38 @@ { "name": "douban-backup", - "version": "0.0.1", + "version": "1.0.0", "description": "script to handle douban backup", "exports": "./index.js", + "type": "module", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "sync": "tsx src/index.ts" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/bambooom/douban-backup.git" }, "keywords": [ "douban", "notion", + "neodb", "backup", "csv", - "rss" + "rss", + "userscript" ], - "type": "module", "author": "zhuzi ", "license": "MIT", + "bugs": { + "url": "https://github.com/bambooom/douban-backup/issues" + }, + "homepage": "https://github.com/bambooom/douban-backup#readme", "engines": { "node": ">=20" }, + "devDependencies": { + "@types/jsdom": "^21.1.6", + "tsx": "^4.7.0" + }, "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", @@ -27,8 +41,5 @@ "got": "^14.0.0", "jsdom": "^23.2.0", "rss-parser": "^3.13.0" - }, - "devDependencies": { - "image-downloader": "^4.3.0" } } From 542a53c35bb4c5900144a6eadae9f4774b8923e5 Mon Sep 17 00:00:00 2001 From: bamboo Date: Fri, 19 Jan 2024 00:05:12 +0800 Subject: [PATCH 12/62] :construction: Refactor: original script split to several files --- src/const.ts | 9 ++++ src/fetch-rss.ts | 19 +++++++ src/handle-feeds.ts | 124 +++++++++++++++++++++++++++++++++++++++++++ src/handle-notion.ts | 57 ++++++++++++++++++++ src/index.ts | 29 ++++++++++ src/types.ts | 30 +++++++++++ src/utils.ts | 21 ++++++++ 7 files changed, 289 insertions(+) create mode 100644 src/const.ts create mode 100644 src/fetch-rss.ts create mode 100644 src/handle-feeds.ts create mode 100644 src/handle-notion.ts create mode 100644 src/index.ts create mode 100644 src/types.ts create mode 100644 src/utils.ts diff --git a/src/const.ts b/src/const.ts new file mode 100644 index 00000000..f412c95c --- /dev/null +++ b/src/const.ts @@ -0,0 +1,9 @@ +export const ALL_STATUS = /^(?:最近)?(看过|听过|读过|玩过|在看|在听|在读|在玩|想看|想听|想读|想玩)/; + +export const RATING_TEXT = { + 很差: 1, + 较差: 2, + 还行: 3, + 推荐: 4, + 力荐: 5, +}; diff --git a/src/fetch-rss.ts b/src/fetch-rss.ts new file mode 100644 index 00000000..af125f6c --- /dev/null +++ b/src/fetch-rss.ts @@ -0,0 +1,19 @@ +import Parser from 'rss-parser'; +import dotenv from 'dotenv'; +import type { RSSFeedItem } from './types'; + +dotenv.config(); + +export default async function fetchRSSFeeds(): Promise { + const DOUBAN_USER_ID = process.env.DOUBAN_USER_ID; + const parser = new Parser(); + try { + const feeds = await parser.parseURL( + `https://www.douban.com/feed/people/${DOUBAN_USER_ID}/interests` + ); + return feeds.items; + } catch (error) { + console.error('Failed to parse RSS url: ', error); + process.exit(1); + } +} diff --git a/src/handle-feeds.ts b/src/handle-feeds.ts new file mode 100644 index 00000000..af870ca3 --- /dev/null +++ b/src/handle-feeds.ts @@ -0,0 +1,124 @@ +import { JSDOM } from 'jsdom'; +import { ALL_STATUS, RATING_TEXT } from './const'; +import { ItemCategory, ItemStatus, type RSSFeedItem, type FeedItem } from './types'; + +type ItemInfo = { + category: ItemCategory; + id: string; + status: ItemStatus; +} + +const SeeState = { + '看过': ItemStatus.Complete, + '在看': ItemStatus.Progress, + '想看': ItemStatus.Wishlist, +}; + +const ReadState = { + '读过': ItemStatus.Complete, + '在读': ItemStatus.Progress, + '想读': ItemStatus.Wishlist, +}; + +const PlayState = { + '玩过': ItemStatus.Complete, + '在玩': ItemStatus.Progress, + '想玩': ItemStatus.Wishlist, +}; + +const ListenState = { + '听过': ItemStatus.Complete, + '在听': ItemStatus.Progress, + '想听': ItemStatus.Wishlist, +}; + +/** + * Normalize the given array of RSS feed items. + * + * @param {RSSFeedItem[]} feeds - The array of RSS feed items to be normalized. + * @return {FeedItem[]} The normalized array of feed items. + */ +export default function handleFeeds(feeds: RSSFeedItem[]): FeedItem[] { + const normalizedFeeds: FeedItem[] = []; + + feeds.forEach((item) => { + const itemInfo = extractItemInfo(item.title!, item.link!); + if (!itemInfo) { + return; + } + const { category, id, status } = itemInfo; + const dom = new JSDOM(item.content!.trim()); + const contents = [...dom.window.document.querySelectorAll('td p')]; + const ratingElements = contents.filter((el) => el.textContent!.startsWith('推荐')); + let ratingNumber = 0; + if (ratingElements.length) { + const rating = ratingElements[0].textContent!.replace(/^推荐: /, '').trim(); + ratingNumber = RATING_TEXT[rating]; + } + const commentElements = contents.filter((el) => el.textContent!.startsWith('备注')); + let comment = ''; + if (commentElements.length) { + comment = commentElements[0].textContent!.replace(/^备注: /, '').trim(); + } + const result = { + id, + link: item.link, + rating: ratingNumber || null, + comment: typeof comment === 'string' ? comment : null, // 备注:XXX -> 短评 + time: item.isoDate, // '2021-05-30T06:49:34.000Z' + status, + category, + } as FeedItem; + normalizedFeeds.push(result); + }); + + return normalizedFeeds; +} + + +/** + * Extracts the category, ID, and status from the given title and link + * which are from RSS feed item. + * + * @param {string} title - The title to extract the information from. + * @param {string} link - The link to extract the information from. + * @return {ItemInfo} An object containing the extracted category, ID, and status. + */ +export function extractItemInfo(title: string, link: string): ItemInfo | undefined { + const m = title.match(ALL_STATUS)?.[1]; + + if (!m) { + return; + } + + if (Object.keys(SeeState).includes(m)) { + const isMovie = link.startsWith('http://movie.douban.com/'); + return { + category: isMovie ? ItemCategory.Movie : ItemCategory.Drama, + id: isMovie + ? link.match(/movie\.douban\.com\/subject\/(\d+)\/?/)?.[1]! + : link.match(/www\.douban\.com\/location\/drama\/(\d+)\/?/)?.[1]!, + status: SeeState[m], + }; + } else if (Object.keys(ReadState).includes(m)) { + return { + category: ItemCategory.Book, + id: link.match(/book\.douban\.com\/subject\/(\d+)\/?/)?.[1]!, + status: ReadState[m], + }; + } else if (Object.keys(ListenState).includes(m)) { + return { + category: ItemCategory.Music, + id: link.match(/music\.douban\.com\/subject\/(\d+)\/?/)?.[1]!, + status: ListenState[m], + }; + } else if (Object.keys(PlayState).includes(m)) { + return { + category: ItemCategory.Game, + id: link.match(/www\.douban\.com\/game\/(\d+)\/?/)?.[1]!, + status: PlayState[m], + }; + } + + return; +} diff --git a/src/handle-notion.ts b/src/handle-notion.ts new file mode 100644 index 00000000..a6ffe97d --- /dev/null +++ b/src/handle-notion.ts @@ -0,0 +1,57 @@ +import dotenv from 'dotenv'; +import { Client } from '@notionhq/client'; +import { ItemCategory, ItemStatus, type RSSFeedItem, type FeedItem } from './types'; +import { getDBID } from './utils'; + +dotenv.config(); + +export default async function handleNotion(feeds: FeedItem[]) { + const groupByCategory: Partial> = feeds.reduce( + (acc, feed) => { + if (!acc[feed.category]) { + acc[feed.category] = []; + } + acc[feed.category].push(feed); + return acc; + }, + {} + ); + + for (const category in groupByCategory) { + const categorizedFeeds = groupByCategory[category] as FeedItem[]; + } +} + +async function syncNotion(categorizedFeeds: FeedItem[], category: ItemCategory) { + if (categorizedFeeds.length === 0) { + console.log(`No new ${category} feeds.`); + return; + } + + const dbID = getDBID(category); + if (!dbID) { + console.log(`No notion database id for ${category}`); + return; + } + + console.log(`Handling ${category} feeds...`); + + const notion = new Client({ + auth: process.env.NOTION_TOKEN, + }); + + // const filtered = await notion.databases.query({ + // database_id: dbID, + // filter: { + // or: categorizedFeeds.map((item) => ({ + // property: DB_PROPERTIES.ITEM_LINK, + // url: { + // contains: item.id, + // }, + // })), + // }, + // }).catch((error) => { + // console.error(`Failed to query ${category} database to check already inserted items. `, error); + // process.exit(1); + // }); +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..215cfc27 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,29 @@ +import dotenv from 'dotenv'; +import fetchRSSFeeds from './fetch-rss'; +import handleFeeds from './handle-feeds'; +import handleNotion from './handle-notion'; +import { type ItemCategory, ItemStatus } from './types'; +import { getDBID } from './utils'; + +dotenv.config(); + +const neodbToken = process.env.NEODB_API_TOKEN; + + +async function main(): Promise { + const feeds = await fetchRSSFeeds(); + if (feeds.length === 0) { + console.log('No new items.'); + return; + } + + const normalizedFeeds = handleFeeds(feeds); + const completeFeeds = normalizedFeeds.filter(f => f.status === ItemStatus.Complete); + + + if (completeFeeds.length) { + await handleNotion(completeFeeds); + } +} + +main(); diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 00000000..d8629fb2 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,30 @@ +import Parser from 'rss-parser'; + +export enum ItemCategory { + Movie = 'movie', + Music = 'music', + Book = 'book', + Game = 'game', + Drama = 'drama', +}; + +// follow the schema value of Neodb +export enum ItemStatus { + Wishlist = 'wishlist', + Progress = 'progress', + Complete = 'complete', +}; + +export type RSSFeedItem = { + [key: string]: any; +} & Parser.Item; + +export type FeedItem = { + id: string; + link: string; + rating: number | null; + comment: string | null; + time: string; + status: ItemStatus; + category: ItemCategory; +}; diff --git a/src/utils.ts b/src/utils.ts new file mode 100644 index 00000000..a13a620a --- /dev/null +++ b/src/utils.ts @@ -0,0 +1,21 @@ +import dotenv from 'dotenv'; +import { ItemCategory } from './types'; + +dotenv.config(); + +/** + * Retrieves the database ID for the given category. + * + * @param {ItemCategory} category - The category of the item. + * @returns {string} The corresponding database ID. + */ +export function getDBID(category: ItemCategory): string { + const databasesMap = { + [ItemCategory.Movie]: process.env.NOTION_MOVIE_DATABASE_ID, + [ItemCategory.Music]: process.env.NOTION_MUSIC_DATABASE_ID, + [ItemCategory.Book]: process.env.NOTION_BOOK_DATABASE_ID, + [ItemCategory.Game]: process.env.NOTION_GAME_DATABASE_ID, + [ItemCategory.Drama]: process.env.NOTION_DRAMA_DATABASE_ID, + }; + return databasesMap[category] as string; +} From 5e1c1e915ca35c85baca1f976b35cfe2db24e151 Mon Sep 17 00:00:00 2001 From: bamboo Date: Fri, 19 Jan 2024 01:09:46 +0800 Subject: [PATCH 13/62] :construction: Refactor: re-writing handle notion and scraping douban part --- .env.example | 1 - cols.custom.json => cols.json | 0 src/handle-douban.ts | 11 ++++++ src/handle-notion.ts | 56 ++++++++++++++++++++++-------- src/types.ts | 64 +++++++++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+), 16 deletions(-) rename cols.custom.json => cols.json (100%) create mode 100644 src/handle-douban.ts diff --git a/.env.example b/.env.example index f595bcd1..4762d730 100644 --- a/.env.example +++ b/.env.example @@ -6,4 +6,3 @@ NOTION_GAME_DATABASE_ID= NOTION_DRAMA_DATABASE_ID= DOUBAN_USER_ID= NEODB_API_TOKEN= -CUSTOM_COLUMN_NAME="./cols.custom.json" diff --git a/cols.custom.json b/cols.json similarity index 100% rename from cols.custom.json rename to cols.json diff --git a/src/handle-douban.ts b/src/handle-douban.ts new file mode 100644 index 00000000..46e1a2f4 --- /dev/null +++ b/src/handle-douban.ts @@ -0,0 +1,11 @@ +import got from 'got'; +import { JSDOM } from 'jsdom'; +import { ItemCategory } from "./types"; + +export default async function scrapyDouban(link: string, category: ItemCategory) { + console.log(`Scraping ${category} item with link: ${link}`); + const response = await got(link); + const dom = new JSDOM(response.body); + + // @todo 分类处理 +} diff --git a/src/handle-notion.ts b/src/handle-notion.ts index a6ffe97d..8e8b97c9 100644 --- a/src/handle-notion.ts +++ b/src/handle-notion.ts @@ -1,7 +1,15 @@ import dotenv from 'dotenv'; import { Client } from '@notionhq/client'; -import { ItemCategory, ItemStatus, type RSSFeedItem, type FeedItem } from './types'; +import scrapyDouban from './handle-douban'; import { getDBID } from './utils'; +import DB_PROPERTIES from '../cols.json'; +import { + ItemCategory, + ItemStatus, + type RSSFeedItem, + type FeedItem, + type NotionUrlPropType, +} from './types'; dotenv.config(); @@ -19,6 +27,7 @@ export default async function handleNotion(feeds: FeedItem[]) { for (const category in groupByCategory) { const categorizedFeeds = groupByCategory[category] as FeedItem[]; + await syncNotion(categorizedFeeds, category as ItemCategory); } } @@ -40,18 +49,35 @@ async function syncNotion(categorizedFeeds: FeedItem[], category: ItemCategory) auth: process.env.NOTION_TOKEN, }); - // const filtered = await notion.databases.query({ - // database_id: dbID, - // filter: { - // or: categorizedFeeds.map((item) => ({ - // property: DB_PROPERTIES.ITEM_LINK, - // url: { - // contains: item.id, - // }, - // })), - // }, - // }).catch((error) => { - // console.error(`Failed to query ${category} database to check already inserted items. `, error); - // process.exit(1); - // }); + const queryItems = await notion.databases.query({ + database_id: dbID, + filter: { + or: categorizedFeeds.map((item) => ({ + property: DB_PROPERTIES.ITEM_LINK, + url: { + contains: item.id, + }, + })), + }, + }).catch((error) => { + console.error(`Failed to query ${category} database to check already inserted items. `, error); + process.exit(1); + }); + + const alreadyInsertedItems = new Set(queryItems.results.map((i) => { + if ('properties' in i) { + return (i.properties[DB_PROPERTIES.ITEM_LINK] as NotionUrlPropType).url; + } + return; + }).filter(v => v)); + + const newFeeds = categorizedFeeds.filter((item) => { + return !alreadyInsertedItems.has(item.link); + }); + + console.log(`There are total ${newFeeds.length} new ${category} item(s) need to insert.`); + + for (const newFeedItem of newFeeds) { + await scrapyDouban(newFeedItem.link, category); + } } diff --git a/src/types.ts b/src/types.ts index d8629fb2..cb937ea9 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,5 @@ import Parser from 'rss-parser'; +import DB_PROPERTIES from '../cols.json'; export enum ItemCategory { Movie = 'movie', @@ -28,3 +29,66 @@ export type FeedItem = { status: ItemStatus; category: ItemCategory; }; + +export type NotionRichTextPropType = { + id?: string; + type: 'rich_text'; + rich_text: { + type: 'text'; + text: { + content: string; + }; + }[]; +}; + +export type NotionTitlePropType = { + id?: 'title'; + type: 'title'; + title: { + text: { + content: string; + }; + }[]; +}; + +export type NotionFilesPropType = { + id?: string; + type: 'files'; + files: { + name: string; + type: 'external'; + external: { + url: string; + }; + }[]; +}; + +export type NotionDatePropType = { + id?: string; + type: 'date'; + date: { + start: string; + end: string | null; + time_zone: string | null; + }; +}; + +export type NotionMultiSelectPropType = { + id?: string; + type: 'multi_select'; + multi_select: { + name: string; + }[]; +}; + +export type NotionNumberPropType = { + id?: string; + type: 'number'; + number: number | null; +}; + +export type NotionUrlPropType = { + id?: string; + type: 'url'; + url: string; +}; From 12437b6c62eeb497c67e97a520c40728a32d89b5 Mon Sep 17 00:00:00 2001 From: bamboo Date: Sat, 20 Jan 2024 18:50:59 +0800 Subject: [PATCH 14/62] :construction: Refactor: re-writing handle notion part done --- src/const.ts | 35 ++++++ src/handle-douban.ts | 168 ++++++++++++++++++++++++++- src/handle-notion.ts | 264 ++++++++++++++++++++++++++++++++++++++++--- src/index.ts | 4 +- src/types.ts | 31 +++-- src/utils.ts | 10 ++ 6 files changed, 485 insertions(+), 27 deletions(-) diff --git a/src/const.ts b/src/const.ts index f412c95c..d2cc8f6a 100644 --- a/src/const.ts +++ b/src/const.ts @@ -1,3 +1,5 @@ +import { type DB_PROPERTIES_KEYS, NotionPropTypesEnum } from './types'; + export const ALL_STATUS = /^(?:最近)?(看过|听过|读过|玩过|在看|在听|在读|在玩|想看|想听|想读|想玩)/; export const RATING_TEXT = { @@ -7,3 +9,36 @@ export const RATING_TEXT = { 推荐: 4, 力荐: 5, }; + +export const PropertyTypeMap: Record = { + POSTER: NotionPropTypesEnum.FILES, + MOVIE_TITLE: NotionPropTypesEnum.TITLE, + MUSIC_TITLE: NotionPropTypesEnum.TITLE, + BOOK_TITLE: NotionPropTypesEnum.TITLE, + GAME_TITLE: NotionPropTypesEnum.TITLE, + DRAMA_TITLE: NotionPropTypesEnum.TITLE, + COVER: NotionPropTypesEnum.FILES, + RATING: NotionPropTypesEnum.MULTI_SELECT, + RATING_DATE: NotionPropTypesEnum.DATE, + COMMENTS: NotionPropTypesEnum.RICH_TEXT, + YEAR: NotionPropTypesEnum.NUMBER, + DIRECTORS: NotionPropTypesEnum.RICH_TEXT, + ACTORS: NotionPropTypesEnum.RICH_TEXT, + GENRE: NotionPropTypesEnum.MULTI_SELECT, + ITEM_LINK: NotionPropTypesEnum.URL, + IMDB_LINK: NotionPropTypesEnum.URL, + RELEASE_DATE: NotionPropTypesEnum.DATE, + MUSICIAN: NotionPropTypesEnum.RICH_TEXT, + PUBLICATION_DATE: NotionPropTypesEnum.DATE, + PUBLISHING_HOUSE: NotionPropTypesEnum.RICH_TEXT, + WRITER: NotionPropTypesEnum.RICH_TEXT, + ISBN: NotionPropTypesEnum.NUMBER, +}; + +export const EMOJI = { + movie: '🎞', + music: '🎶', + book: '📖', + game: '🕹', + drama: '💃🏻', +}; diff --git a/src/handle-douban.ts b/src/handle-douban.ts index 46e1a2f4..030e26c8 100644 --- a/src/handle-douban.ts +++ b/src/handle-douban.ts @@ -1,11 +1,173 @@ import got from 'got'; import { JSDOM } from 'jsdom'; -import { ItemCategory } from "./types"; +import dayjs from 'dayjs'; +import { ItemCategory } from './types'; +import DB_PROPERTIES from '../cols.json'; -export default async function scrapyDouban(link: string, category: ItemCategory) { +const ImgSelector = '#mainpic img'; +const ImgDefaultTitle = { + Poster: '点击看更多海报', + Cover: '点击上传封面图片', +}; +const InfoSelector = '#info span.pl'; + +export default async function scrapyDouban(link: string, category: ItemCategory): Promise<{ + [key: string]: string | string[] | number | null | undefined; +}> { console.log(`Scraping ${category} item with link: ${link}`); const response = await got(link); const dom = new JSDOM(response.body); + const doc = dom.window.document; + + switch (category) { + case ItemCategory.Movie: + return buildMovieItem(doc); + case ItemCategory.Music: + return buildMusicItem(doc); + case ItemCategory.Book: + return buildBookItem(doc); + case ItemCategory.Game: + return buildGameItem(doc); + case ItemCategory.Drama: + return buildDramaItem(doc); + default: + return {} + } +} + +function buildMovieItem(doc: Document) { + const title = doc.querySelector('#content h1 [property="v:itemreviewed"]')?.textContent?.trim() || ''; + const year = doc.querySelector('#content h1 .year')?.textContent?.slice(1, -1) || ''; + const img = doc.querySelector(ImgSelector) as HTMLImageElement; + const poster = img?.title === ImgDefaultTitle.Poster ? img?.src?.trim().replace(/\.webp$/, '.jpg') : ''; + const directors = doc.querySelector('#info .attrs')?.textContent || ''; + const actors = [...doc.querySelectorAll('#info .actor .attrs a')] + .slice(0, 5).map(i => i.textContent).join(' / '); + const genre = [...doc.querySelectorAll('#info [property="v:genre"]')].map(i => i.textContent || '').filter(v => v); + const imdbInfo = [...doc.querySelectorAll(InfoSelector)].filter(i => i.textContent?.startsWith('IMDb')); + const imdbLink = imdbInfo.length ? 'https://www.imdb.com/title/' + imdbInfo[0].nextSibling?.textContent?.trim() : ''; + + return { + [DB_PROPERTIES.NAME]: title, + [DB_PROPERTIES.MOVIE_TITLE]: title, + [DB_PROPERTIES.YEAR]: year, + [DB_PROPERTIES.POSTER]: poster, // optional + [DB_PROPERTIES.DIRECTORS]: directors, + [DB_PROPERTIES.ACTORS]: actors, + [DB_PROPERTIES.GENRE]: genre, + [DB_PROPERTIES.IMDB_LINK]: imdbLink, // optional + }; +} + +function buildMusicItem(doc: Document) { + const title = doc.querySelector('#wrapper h1 span')?.textContent?.trim() || ''; + const img = doc.querySelector(ImgSelector) as HTMLImageElement; + const cover = img?.title !== ImgDefaultTitle.Cover && img?.src.length <= 100 ? img?.src.replace(/\.webp$/, '.jpg') : ''; + const info = [...doc.querySelectorAll(InfoSelector)]; + const release = info.filter(i => i.textContent?.trim().startsWith('发行时间')); + const releaseDate = release.length ? dayjs(release[0].nextSibling?.textContent?.trim()).format('YYYY-MM-DD') : ''; + const musicianElems = info.filter((i) => i.textContent?.trim().startsWith('表演者')); + // split and trim to remove extra spaces, rich_text length limited to 2000 + const musician = musicianElems.length + ? musicianElems[0].textContent?.replace('表演者:', '').trim() + .split('\n').map((v) => v.trim()).join('') + : ''; + + return { + [DB_PROPERTIES.MUSIC_TITLE]: title, + [DB_PROPERTIES.NAME]: title, + [DB_PROPERTIES.COVER]: cover, // optional + [DB_PROPERTIES.RELEASE_DATE]: releaseDate, // optional + [DB_PROPERTIES.MUSICIAN]: musician, // optional + }; +} + +function buildBookItem(doc: Document) { + const title = doc.querySelector('#wrapper h1 [property="v:itemreviewed"]')?.textContent?.trim() || ''; + const img = doc.querySelector(ImgSelector) as HTMLImageElement; + const cover = img?.title !== ImgDefaultTitle.Cover && img?.src.length <= 100 ? img?.src.replace(/\.webp$/, '.jpg') : ''; + const info = [...doc.querySelectorAll(InfoSelector)]; + + let writer = '', publisher = '', bookTitle = '', publishDate = '', isbn = 0; + info.forEach(i => { + const text = i.textContent?.trim() || ''; + let nextText = i.nextSibling?.textContent?.trim() || ''; + + if (text.startsWith('作者')) { + writer = i.parentElement?.id === 'info' + // if only one writer, then parentElement is the #info container + ? i.nextElementSibling?.textContent?.replace(/\n/g, '').replace(/\s/g, '') || '' + // if multiple writers, there will be a separate element + : i.parentElement?.textContent?.trim().replace('作者:', '').trim() || ''; + + } else if (text.startsWith('出版社')) { + publisher = i.nextElementSibling?.tagName === 'BR' + ? nextText + // 出版社可能有单独链接 上海三联书店 + : i.parentElement?.textContent?.trim() || ''; + + } else if (text.startsWith('原作名')) { + bookTitle = title + nextText; + + } else if (text.startsWith('出版年')) { + if (/年|月|日/.test(nextText)) { + nextText = nextText.replace(/年|月|日/g, '-').slice(0, -1); // '2000年5月' special case + } + publishDate = dayjs(nextText).format('YYYY-MM-DD'); + + } else if (text.startsWith('ISBN')) { + isbn = Number(nextText); + } + }); + + return { + [DB_PROPERTIES.BOOK_TITLE]: title, + [DB_PROPERTIES.NAME]: title, + [DB_PROPERTIES.COVER]: cover, // optional + [DB_PROPERTIES.WRITER]: writer, // optional + [DB_PROPERTIES.PUBLISHING_HOUSE]: publisher, // optional + [DB_PROPERTIES.BOOK_TITLE]: bookTitle, // optional + [DB_PROPERTIES.PUBLICATION_DATE]: publishDate, // optional + [DB_PROPERTIES.ISBN]: isbn, // optional + }; +} + +function buildGameItem(doc: Document) { + const title = doc.querySelector('#wrapper #content h1')?.textContent?.trim() || ''; + const img = doc.querySelector('.item-subject-info .pic img') as HTMLImageElement; + const cover = img?.title !== ImgDefaultTitle.Cover && img?.src.length <= 100 ? img?.src.replace(/\.webp$/, '.jpg') : ''; + const gameInfo = doc.querySelector('#content .game-attr') as Element; + const dts = [...gameInfo.querySelectorAll('dt')]; + const genre: string[] = []; + let releaseDate = ''; + dts.forEach(dt => { + if (dt.textContent?.startsWith('类型')) { + const strs = [...dt.nextElementSibling!.querySelectorAll('a')].map((a) => a.textContent?.trim() || '').filter(v => v); + genre.push(...strs); + } else if (dt.textContent?.startsWith('发行日期')) { + const date = dt.nextElementSibling?.textContent?.trim() || ''; + releaseDate = date ? dayjs(date).format('YYYY-MM-DD') : ''; + } + }); + + return { + [DB_PROPERTIES.GAME_TITLE]: title, + [DB_PROPERTIES.NAME]: title, + [DB_PROPERTIES.COVER]: cover, // optional + [DB_PROPERTIES.GENRE]: genre, // optional string[] + [DB_PROPERTIES.RELEASE_DATE]: releaseDate, // optional + } +} - // @todo 分类处理 +function buildDramaItem(doc: Document) { + const title = doc.querySelector('#content .drama-info .meta h1')?.textContent?.trim() || ''; + const genre = doc.querySelector('#content .drama-info .meta [itemprop="genre"]')?.textContent?.trim() || ''; + const img = doc.querySelector('.drama-info .pic img') as HTMLImageElement; + const poster = img?.title !== ImgDefaultTitle.Cover && img?.src.length <= 100 ? img?.src.replace(/\.webp$/, '.jpg') : ''; + return { + [DB_PROPERTIES.DRAMA_TITLE]: title, + [DB_PROPERTIES.NAME]: title, + [DB_PROPERTIES.POSTER]: poster, // optional + [DB_PROPERTIES.GENRE]: genre ? [genre] : [], // optional + }; } diff --git a/src/handle-notion.ts b/src/handle-notion.ts index 8e8b97c9..29c7680f 100644 --- a/src/handle-notion.ts +++ b/src/handle-notion.ts @@ -1,37 +1,82 @@ +import dayjs from 'dayjs'; import dotenv from 'dotenv'; import { Client } from '@notionhq/client'; +import { type CreatePageParameters } from '@notionhq/client/build/src/api-endpoints'; import scrapyDouban from './handle-douban'; -import { getDBID } from './utils'; +import { getDBID, sleep } from './utils'; +import { PropertyTypeMap, EMOJI } from './const'; import DB_PROPERTIES from '../cols.json'; import { ItemCategory, - ItemStatus, - type RSSFeedItem, + NotionPropTypesEnum, type FeedItem, type NotionUrlPropType, + type DB_PROPERTIES_KEYS, + type FailedItem, } from './types'; +// https://github.com/makenotion/notion-sdk-js/issues/280#issuecomment-1178523498 +type EmojiRequest = Extract['emoji']; + dotenv.config(); -export default async function handleNotion(feeds: FeedItem[]) { +const notion = new Client({ + auth: process.env.NOTION_TOKEN, +}); + +/** + * Asynchronously handles the Notion feeds by grouping them by category and then + * syncing the categorized feeds to the Notion database as one category corresponding + * to one Notion database. + * + * @param {FeedItem[]} feeds - The array of feed items to be handled + * @return {Promise} A promise that resolves when all feeds are synced to + * the Notion database + */ +export default async function handleNotion(feeds: FeedItem[]): Promise { const groupByCategory: Partial> = feeds.reduce( (acc, feed) => { if (!acc[feed.category]) { acc[feed.category] = []; } - acc[feed.category].push(feed); + acc[feed.category]!.push(feed); return acc; }, - {} + {} as Partial>, ); + const AllFailedItems: FailedItem[] = []; + for (const category in groupByCategory) { - const categorizedFeeds = groupByCategory[category] as FeedItem[]; - await syncNotion(categorizedFeeds, category as ItemCategory); + try { + const categorizedFeeds = groupByCategory[category] as FeedItem[]; + const failed = await syncNotionDB(categorizedFeeds, category as ItemCategory); + if (failed) { + AllFailedItems.push(...failed); + } + } catch (error) { + console.error(`Failed to handle ${category} feeds. `, error); + process.exit(1); + } + } + + if (AllFailedItems.length) { + console.log('Failed to handle the following feeds to insert into Notion:'); + for (const item of AllFailedItems) { + console.log(`${item.title}: ${item.link}`); + } + process.exit(1); } } -async function syncNotion(categorizedFeeds: FeedItem[], category: ItemCategory) { +/** + * Asynchronously synchronizes the Notion database with categorized feeds. + * + * @param {FeedItem[]} categorizedFeeds - the array of categorized feed items + * @param {ItemCategory} category - the category of the feed items + * @return {Promise} an array of failed items or undefined + */ +async function syncNotionDB(categorizedFeeds: FeedItem[], category: ItemCategory): Promise { if (categorizedFeeds.length === 0) { console.log(`No new ${category} feeds.`); return; @@ -45,10 +90,6 @@ async function syncNotion(categorizedFeeds: FeedItem[], category: ItemCategory) console.log(`Handling ${category} feeds...`); - const notion = new Client({ - auth: process.env.NOTION_TOKEN, - }); - const queryItems = await notion.databases.query({ database_id: dbID, filter: { @@ -77,7 +118,202 @@ async function syncNotion(categorizedFeeds: FeedItem[], category: ItemCategory) console.log(`There are total ${newFeeds.length} new ${category} item(s) need to insert.`); + const failedItems: FailedItem[] = []; + for (const newFeedItem of newFeeds) { - await scrapyDouban(newFeedItem.link, category); + try { + const itemData = await scrapyDouban(newFeedItem.link, category); + itemData[DB_PROPERTIES.ITEM_LINK] = newFeedItem.link; + itemData[DB_PROPERTIES.RATING] = newFeedItem.rating; + itemData[DB_PROPERTIES.RATING_DATE] = dayjs(newFeedItem.time).format('YYYY-MM-DD'); + itemData[DB_PROPERTIES.COMMENTS] = newFeedItem.comment; + const successful = await addItemToNotion(itemData, category); + if (!successful) { + failedItems.push({ + link: newFeedItem.link, + title: itemData.title as string, + }); + } + await sleep(1000); + + } catch (error) { + console.error(error); + continue; + } + } + + if (failedItems.length) { + console.log(`Failed to insert ${failedItems.length} items into ${category} Notion database.`); + } + console.log(`${category} feeds done.`); + console.log('===================='); + return failedItems; +} + +/** + * Insert an item to Notion database. + * + * @param {object} itemData - The data of the item to be added to the Notion database. + * @param {ItemCategory} category - The category of the item. + * @return {boolean} Indicates whether the item was successfully added to the database. + */ +async function addItemToNotion(itemData: { + [key: string]: string | string[] | number | null | undefined; +}, category: ItemCategory): Promise { + console.log( + 'Going to insert ', + itemData[DB_PROPERTIES.RATING_DATE], + itemData[DB_PROPERTIES.NAME] + ); + try { + const properties: Record = {}; + const keys = Object.keys(DB_PROPERTIES) as DB_PROPERTIES_KEYS[]; + keys.shift(); // remove fist one NAME + keys.forEach((key) => { + if (itemData[DB_PROPERTIES[key]]) { + properties[DB_PROPERTIES[key]] = getPropertyValye( + itemData[DB_PROPERTIES[key]], + PropertyTypeMap[key], + DB_PROPERTIES[key] + ); + } + }); + + const dbid = getDBID(category); + if (!dbid) { + throw new Error('No databse id found for category: ' + category); + } + + const db = await notion.databases.retrieve({ database_id: dbid }); + const columns = Object.keys(db.properties); + // remove cols which are not in the current database + const propKeys = Object.keys(properties); + propKeys.map((prop) => { + if (columns.indexOf(prop) < 0) { + delete properties[prop]; + } + }); + + const postData: CreatePageParameters = { + parent: { + database_id: dbid, + }, + icon: { + type: 'emoji', + emoji: EMOJI[category] as EmojiRequest, + }, + // fill in properties by the format: https://developers.notion.com/reference/page#page-property-value + properties, + }; + + if (properties[DB_PROPERTIES.POSTER] || properties[DB_PROPERTIES.COVER]) { + // use poster for the page cover + postData.cover = { + type: 'external', + external: { + url: (properties[DB_PROPERTIES.POSTER] || properties[DB_PROPERTIES.COVER])?.files[0]?.external?.url, // cannot be empty string or null + }, + }; + } + + const response = await notion.pages.create(postData); + if (response && response.id) { + console.log( + itemData[DB_PROPERTIES.NAME] + + `[${itemData[DB_PROPERTIES.ITEM_LINK]}]` + + ' page inserted into Notion database.' + ); + } + return true; + } catch (error) { + console.warn( + 'Failed to create ' + + itemData[DB_PROPERTIES.NAME] + + `(${itemData[DB_PROPERTIES.ITEM_LINK]})` + + ' with error: ', + error + ); + return false; + } +} + +/** + * Generates the value for a property based on the given parameters, ready to insert + * into notion database. + * + * @param {any} value - the value to be processed + * @param {NotionPropTypesEnum} type - the type of the Notion database property + * @param {string} key - the key associated with the property + * @return {any} the generated value for the property later will be sent to notion to create an item + */ +function getPropertyValye(value: any, type: NotionPropTypesEnum, key: string): Record | undefined { + switch (type) { + case NotionPropTypesEnum.TITLE: + return { + type: NotionPropTypesEnum.TITLE, + title: [ + { + text: { + content: value, + }, + }, + ], + }; + case NotionPropTypesEnum.FILES: + return { + type: NotionPropTypesEnum.FILES, + files: [ + { + name: value, + type: 'external', + external: { + url: value + }, + }, + ], + }; + case NotionPropTypesEnum.DATE: + return { + type: NotionPropTypesEnum.DATE, + date: { + start: value, + }, + }; + case NotionPropTypesEnum.MULTI_SELECT: + return key === DB_PROPERTIES.RATING + ? { + type: NotionPropTypesEnum.MULTI_SELECT, + multi_select: value + ? [{ name: value.toString() }] + : [], + } + : { + type: NotionPropTypesEnum.MULTI_SELECT, + multi_select: (value || []).map(g => ({ name: g })), + }; + case NotionPropTypesEnum.RICH_TEXT: + return { + type: NotionPropTypesEnum.RICH_TEXT, + rich_text: [ + { + type: 'text', + text: { + content: value || '', + }, + }, + ], + }; + case NotionPropTypesEnum.NUMBER: + return { + type: NotionPropTypesEnum.NUMBER, + number: value ? Number(value) : null, + }; + case NotionPropTypesEnum.URL: + return { + type: NotionPropTypesEnum.URL, + url: value, + }; + default: + break; } } diff --git a/src/index.ts b/src/index.ts index 215cfc27..073bfeeb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,8 +2,7 @@ import dotenv from 'dotenv'; import fetchRSSFeeds from './fetch-rss'; import handleFeeds from './handle-feeds'; import handleNotion from './handle-notion'; -import { type ItemCategory, ItemStatus } from './types'; -import { getDBID } from './utils'; +import { ItemStatus } from './types'; dotenv.config(); @@ -20,7 +19,6 @@ async function main(): Promise { const normalizedFeeds = handleFeeds(feeds); const completeFeeds = normalizedFeeds.filter(f => f.status === ItemStatus.Complete); - if (completeFeeds.length) { await handleNotion(completeFeeds); } diff --git a/src/types.ts b/src/types.ts index cb937ea9..2dcc83f7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,6 +1,8 @@ import Parser from 'rss-parser'; import DB_PROPERTIES from '../cols.json'; +export type DB_PROPERTIES_KEYS = Exclude; + export enum ItemCategory { Movie = 'movie', Music = 'music', @@ -30,9 +32,19 @@ export type FeedItem = { category: ItemCategory; }; +export enum NotionPropTypesEnum { + TITLE = 'title', + RICH_TEXT = 'rich_text', + FILES = 'files', + DATE = 'date', + MULTI_SELECT = 'multi_select', + NUMBER = 'number', + URL = 'url', +}; + export type NotionRichTextPropType = { id?: string; - type: 'rich_text'; + type: NotionPropTypesEnum.RICH_TEXT; rich_text: { type: 'text'; text: { @@ -43,7 +55,7 @@ export type NotionRichTextPropType = { export type NotionTitlePropType = { id?: 'title'; - type: 'title'; + type: NotionPropTypesEnum.TITLE; title: { text: { content: string; @@ -53,7 +65,7 @@ export type NotionTitlePropType = { export type NotionFilesPropType = { id?: string; - type: 'files'; + type: NotionPropTypesEnum.FILES; files: { name: string; type: 'external'; @@ -65,7 +77,7 @@ export type NotionFilesPropType = { export type NotionDatePropType = { id?: string; - type: 'date'; + type: NotionPropTypesEnum.DATE; date: { start: string; end: string | null; @@ -75,7 +87,7 @@ export type NotionDatePropType = { export type NotionMultiSelectPropType = { id?: string; - type: 'multi_select'; + type: NotionPropTypesEnum.MULTI_SELECT; multi_select: { name: string; }[]; @@ -83,12 +95,17 @@ export type NotionMultiSelectPropType = { export type NotionNumberPropType = { id?: string; - type: 'number'; + type: NotionPropTypesEnum.NUMBER; number: number | null; }; export type NotionUrlPropType = { id?: string; - type: 'url'; + type: NotionPropTypesEnum.URL; url: string; }; + +export type FailedItem = { + link: string; + title: string; +}; diff --git a/src/utils.ts b/src/utils.ts index a13a620a..4ae3b413 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -19,3 +19,13 @@ export function getDBID(category: ItemCategory): string { }; return databasesMap[category] as string; } + +/** + * Delays the execution of a function by a specified number of milliseconds. + * + * @param {number} ms - The number of milliseconds to sleep + * @return {Promise} A Promise that resolves after the specified number of milliseconds + */ +export function sleep(ms: number): Promise { + return new Promise((r) => setTimeout(r, ms)); +} From feeda9010296fe2115bf5a176225ddddcc5b33cd Mon Sep 17 00:00:00 2001 From: bamboo Date: Sat, 20 Jan 2024 19:15:59 +0800 Subject: [PATCH 15/62] :construction: Refactor: rename and remove old files --- src/handle-notion.ts | 86 +-- src/{handle-feeds.ts => handle-rss.ts} | 2 +- src/index.ts | 4 +- src/utils.ts | 84 ++- sync-rss.js | 713 ------------------------- util.js | 81 --- 6 files changed, 88 insertions(+), 882 deletions(-) rename src/{handle-feeds.ts => handle-rss.ts} (97%) delete mode 100644 sync-rss.js delete mode 100644 util.js diff --git a/src/handle-notion.ts b/src/handle-notion.ts index 29c7680f..abefcada 100644 --- a/src/handle-notion.ts +++ b/src/handle-notion.ts @@ -3,12 +3,11 @@ import dotenv from 'dotenv'; import { Client } from '@notionhq/client'; import { type CreatePageParameters } from '@notionhq/client/build/src/api-endpoints'; import scrapyDouban from './handle-douban'; -import { getDBID, sleep } from './utils'; +import { getDBID, sleep, buildPropertyValue } from './utils'; import { PropertyTypeMap, EMOJI } from './const'; import DB_PROPERTIES from '../cols.json'; import { ItemCategory, - NotionPropTypesEnum, type FeedItem, type NotionUrlPropType, type DB_PROPERTIES_KEYS, @@ -171,7 +170,7 @@ async function addItemToNotion(itemData: { keys.shift(); // remove fist one NAME keys.forEach((key) => { if (itemData[DB_PROPERTIES[key]]) { - properties[DB_PROPERTIES[key]] = getPropertyValye( + properties[DB_PROPERTIES[key]] = buildPropertyValue( itemData[DB_PROPERTIES[key]], PropertyTypeMap[key], DB_PROPERTIES[key] @@ -236,84 +235,3 @@ async function addItemToNotion(itemData: { return false; } } - -/** - * Generates the value for a property based on the given parameters, ready to insert - * into notion database. - * - * @param {any} value - the value to be processed - * @param {NotionPropTypesEnum} type - the type of the Notion database property - * @param {string} key - the key associated with the property - * @return {any} the generated value for the property later will be sent to notion to create an item - */ -function getPropertyValye(value: any, type: NotionPropTypesEnum, key: string): Record | undefined { - switch (type) { - case NotionPropTypesEnum.TITLE: - return { - type: NotionPropTypesEnum.TITLE, - title: [ - { - text: { - content: value, - }, - }, - ], - }; - case NotionPropTypesEnum.FILES: - return { - type: NotionPropTypesEnum.FILES, - files: [ - { - name: value, - type: 'external', - external: { - url: value - }, - }, - ], - }; - case NotionPropTypesEnum.DATE: - return { - type: NotionPropTypesEnum.DATE, - date: { - start: value, - }, - }; - case NotionPropTypesEnum.MULTI_SELECT: - return key === DB_PROPERTIES.RATING - ? { - type: NotionPropTypesEnum.MULTI_SELECT, - multi_select: value - ? [{ name: value.toString() }] - : [], - } - : { - type: NotionPropTypesEnum.MULTI_SELECT, - multi_select: (value || []).map(g => ({ name: g })), - }; - case NotionPropTypesEnum.RICH_TEXT: - return { - type: NotionPropTypesEnum.RICH_TEXT, - rich_text: [ - { - type: 'text', - text: { - content: value || '', - }, - }, - ], - }; - case NotionPropTypesEnum.NUMBER: - return { - type: NotionPropTypesEnum.NUMBER, - number: value ? Number(value) : null, - }; - case NotionPropTypesEnum.URL: - return { - type: NotionPropTypesEnum.URL, - url: value, - }; - default: - break; - } -} diff --git a/src/handle-feeds.ts b/src/handle-rss.ts similarity index 97% rename from src/handle-feeds.ts rename to src/handle-rss.ts index af870ca3..445090fe 100644 --- a/src/handle-feeds.ts +++ b/src/handle-rss.ts @@ -38,7 +38,7 @@ const ListenState = { * @param {RSSFeedItem[]} feeds - The array of RSS feed items to be normalized. * @return {FeedItem[]} The normalized array of feed items. */ -export default function handleFeeds(feeds: RSSFeedItem[]): FeedItem[] { +export default function handleRSSFeeds(feeds: RSSFeedItem[]): FeedItem[] { const normalizedFeeds: FeedItem[] = []; feeds.forEach((item) => { diff --git a/src/index.ts b/src/index.ts index 073bfeeb..6d9cea96 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import dotenv from 'dotenv'; import fetchRSSFeeds from './fetch-rss'; -import handleFeeds from './handle-feeds'; +import handleRSSFeeds from './handle-rss'; import handleNotion from './handle-notion'; import { ItemStatus } from './types'; @@ -16,7 +16,7 @@ async function main(): Promise { return; } - const normalizedFeeds = handleFeeds(feeds); + const normalizedFeeds = handleRSSFeeds(feeds); const completeFeeds = normalizedFeeds.filter(f => f.status === ItemStatus.Complete); if (completeFeeds.length) { diff --git a/src/utils.ts b/src/utils.ts index 4ae3b413..2edba0b3 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,6 @@ import dotenv from 'dotenv'; -import { ItemCategory } from './types'; +import { ItemCategory, NotionPropTypesEnum } from './types'; +import DB_PROPERTIES from '../cols.json'; dotenv.config(); @@ -29,3 +30,84 @@ export function getDBID(category: ItemCategory): string { export function sleep(ms: number): Promise { return new Promise((r) => setTimeout(r, ms)); } + +/** + * Generates the value for a property based on the given parameters, ready to insert + * into notion database. + * + * @param {any} value - the value to be processed + * @param {NotionPropTypesEnum} type - the type of the Notion database property + * @param {string} key - the key associated with the property + * @return {any} the generated value for the property later will be sent to notion to create an item + */ +export function buildPropertyValue(value: any, type: NotionPropTypesEnum, key: string): Record | undefined { + switch (type) { + case NotionPropTypesEnum.TITLE: + return { + type: NotionPropTypesEnum.TITLE, + title: [ + { + text: { + content: value, + }, + }, + ], + }; + case NotionPropTypesEnum.FILES: + return { + type: NotionPropTypesEnum.FILES, + files: [ + { + name: value, + type: 'external', + external: { + url: value + }, + }, + ], + }; + case NotionPropTypesEnum.DATE: + return { + type: NotionPropTypesEnum.DATE, + date: { + start: value, + }, + }; + case NotionPropTypesEnum.MULTI_SELECT: + return key === DB_PROPERTIES.RATING + ? { + type: NotionPropTypesEnum.MULTI_SELECT, + multi_select: value + ? [{ name: value.toString() }] + : [], + } + : { + type: NotionPropTypesEnum.MULTI_SELECT, + multi_select: (value || []).map(g => ({ name: g })), + }; + case NotionPropTypesEnum.RICH_TEXT: + return { + type: NotionPropTypesEnum.RICH_TEXT, + rich_text: [ + { + type: 'text', + text: { + content: value || '', + }, + }, + ], + }; + case NotionPropTypesEnum.NUMBER: + return { + type: NotionPropTypesEnum.NUMBER, + number: value ? Number(value) : null, + }; + case NotionPropTypesEnum.URL: + return { + type: NotionPropTypesEnum.URL, + url: value, + }; + default: + break; + } +} diff --git a/sync-rss.js b/sync-rss.js deleted file mode 100644 index 719e416e..00000000 --- a/sync-rss.js +++ /dev/null @@ -1,713 +0,0 @@ -import dotenv from 'dotenv'; -import { Client } from '@notionhq/client'; -import dayjs from 'dayjs'; -import got from 'got'; -import { JSDOM } from 'jsdom'; -import Parser from 'rss-parser'; -import { getColumnNames, PropertyType, sleep } from './util.js'; - -dotenv.config(); -const parser = new Parser(); - -const RATING_TEXT = { - 很差: 1, - 较差: 2, - 还行: 3, - 推荐: 4, - 力荐: 5, -}; -const done = /^(看过|听过|读过|玩过)/; -const doing = /^(在看|在听|在读|在玩)/; -const wishlist = /^(想看|想听|想读|想玩)/; -const allStatus = - /^(?:最近)?(看过|听过|读过|玩过|在看|在听|在读|在玩|想看|想听|想读|想玩)/; -const CATEGORY = { - movie: 'movie', - music: 'music', - book: 'book', - game: 'game', - drama: 'drama', -}; -const EMOJI = { - movie: '🎞', - music: '🎶', - book: '📖', - game: '🕹', - drama: '💃🏻', -}; -// follow the schema value of Neodb -const STATUS = { - Complete: 'complete', - Progress: 'progress', - Wishlist: 'wishlist', -}; - -const DOUBAN_USER_ID = process.env.DOUBAN_USER_ID; -const notion = new Client({ - auth: process.env.NOTION_TOKEN, -}); -const movieDBID = process.env.NOTION_MOVIE_DATABASE_ID; -const musicDBID = process.env.NOTION_MUSIC_DATABASE_ID; -const bookDBID = process.env.NOTION_BOOK_DATABASE_ID; -const gameDBID = process.env.NOTION_GAME_DATABASE_ID; -const dramaDBID = process.env.NOTION_DRAMA_DATABASE_ID; -const neodbToken = process.env.NEODB_API_TOKEN; -let DB_PROPERTIES;; - -async function main() { - DB_PROPERTIES = await getColumnNames(); - - console.log('Refreshing feeds from RSS...'); - let feeds; - try { - feeds = await parser.parseURL( - `https://www.douban.com/feed/people/${DOUBAN_USER_ID}/interests` - ); - } catch (error) { - console.error('Failed to parse RSS url: ', error); - process.exit(1); - } - - feeds = feeds.items; - - if (feeds.length === 0) { - console.log('No new items.'); - return; - } - - let groupByCategoryFeeds = {}; - const allFeeds = []; - - feeds.forEach((item) => { - const { category, id, status } = extractItemInfo(item.title, item.link); - const dom = new JSDOM(item.content.trim()); - const contents = [...dom.window.document.querySelectorAll('td p')]; - let rating = contents.filter((el) => el.textContent.startsWith('推荐')); - if (rating.length) { - rating = rating[0].textContent.replace(/^推荐: /, '').trim(); - rating = RATING_TEXT[rating]; - } - let comment = contents.filter((el) => el.textContent.startsWith('备注')); - if (comment.length) { - comment = comment[0].textContent.replace(/^备注: /, '').trim(); - } - const result = { - id, - link: item.link, - rating: typeof rating === 'number' ? rating : null, - comment: typeof comment === 'string' ? comment : null, // 备注:XXX -> 短评 - time: item.isoDate, // '2021-05-30T06:49:34.000Z' - status, - category, - }; - if (status === STATUS.Complete) { - if (!groupByCategoryFeeds[category]) { - groupByCategoryFeeds[category] = []; - } - groupByCategoryFeeds[category].push(result); - } - allFeeds.push(result); - }); - - // 以下是和 notion 交互 - const categoryKeys = Object.keys(groupByCategoryFeeds); - const AllFailedItems = []; - if (categoryKeys.length) { - for (const cateKey of categoryKeys) { - try { - const failedItems = await handleFeedNotion(groupByCategoryFeeds[cateKey], cateKey); - AllFailedItems.push(...failedItems); - } catch (error) { - console.error(`Failed to handle ${cateKey} feeds. `, error); - process.exit(1); - } - } - } - - if (neodbToken) { - console.log('Going to sync to NeoDB...'); - // 同步标记到 neodb - for (let i = 0; i < allFeeds.length; i++) { - const item = allFeeds[i]; - await handleFeedNeodb(item); - } - console.log('NeoDB synced ✨'); - } - - if (AllFailedItems.length) { - console.log('Failed to handle the following feeds:'); - for (let i = 0; i < AllFailedItems.length; i++) { - const item = AllFailedItems[i]; - console.log(`${item.title}: ${item.link}`); - } - process.exit(1); - } else { - console.log('All feeds are handled.'); - } -}; - -main(); - -async function handleFeedNeodb(item) { - // fetch item by douban link - const neodbItem = await got('https://neodb.social/api/catalog/fetch', { - searchParams: { - url: item.link, - }, - headers: { - accept: 'application/json', - }, - }).json(); - // 条目不存在的话会被创建,但此时会返回 {message: 'Fetch in progress'} - if (neodbItem.uuid) { - try { - const mark = await got( - `https://neodb.social/api/me/shelf/item/${neodbItem.uuid}`, - { - headers: { - Authorization: `Bearer ${neodbToken}`, - accept: 'application/json', - }, - } - ).json(); - if (mark.shelf_type !== item.status) { - // 标记状态不一样,所以更新标记 - await markItemNeodb(neodbItem, item); - } - } catch (error) { - if (error.code === 'ERR_NON_2XX_3XX_RESPONSE') { - // 标记不存在,所以创建标记 - await markItemNeodb(neodbItem, item); - } - } - } else { - await sleep(1000); // wait for the item to be created - await handleFeedNeodb(item); // handle this feed again - } -} - -async function markItemNeodb(neodbItem, item) { - console.log('Going to mark on NeoDB: ', `${neodbItem.title}[${item.link}]`); - try { - await got.post(`https://neodb.social/api/me/shelf/item/${neodbItem.uuid}`, { - headers: { - Authorization: `Bearer ${neodbToken}`, - accept: 'application/json', - }, - json: { - shelf_type: item.status, - visibility: 2, - comment_text: item.comment || '', - rating_grade: item.rating ? item.rating * 2 : 0, - created_time: item.time, - post_to_fediverse: false, - }, - }); - } catch (error) { - console.error( - 'Failed to mark item: ', neodbItem?.item?.title, - ' with error: ', - error - ); - } -} - -/** - * Handles the feed for a given category. - * - * @param {Array} categorizedFeeds - The categorized feeds to handle. - * @param {string} category - The category of the feeds. - * @return {Array} - The list of failed items. - */ -async function handleFeedNotion(categorizedFeeds, category) { - if (categorizedFeeds.length === 0) { - console.log(`No new ${category} feeds.`); - return; - } - - const dbID = getDBID(category); - if (!dbID) { - console.log(`No notion database id for ${category}`); - return; - } - - console.log(`Handling ${category} feeds...`); - - const filtered = await notion.databases.query({ - database_id: dbID, - filter: { - or: categorizedFeeds.map((item) => ({ - property: DB_PROPERTIES.ITEM_LINK, - url: { - contains: item.id, - }, - })), - }, - }).catch((error) => { - console.error(`Failed to query ${category} database to check already inserted items. `, error); - process.exit(1); - }); - - const alreadyInsertedItems = new Set(filtered.results.map((i) => i.properties[DB_PROPERTIES.ITEM_LINK].url)); - - const newFeeds = categorizedFeeds.filter((item) => { - return !alreadyInsertedItems.has(item.link); - }); - - console.log(`There are total ${newFeeds.length} new ${category} item(s) need to insert.`); - - let failedItems = []; - - for (let i = 0; i < newFeeds.length; i++) { - const item = newFeeds[i]; - const link = item.link; - let itemData; - try { - itemData = await fetchItem(link, category); - itemData[DB_PROPERTIES.ITEM_LINK] = link; - itemData[DB_PROPERTIES.RATING] = item.rating; - itemData[DB_PROPERTIES.RATING_DATE] = dayjs(item.time).format('YYYY-MM-DD'); - itemData[DB_PROPERTIES.COMMENTS] = item.comment; - } catch (error) { - console.error(link, error); - } - - if (itemData) { - const successful = await addToNotion(itemData, category); - if (!successful) { - failedItems.push({ - link, - title: itemData.title, - }); - } - await sleep(1000); - } - } - - if (failedItems.length) { - console.log(`Failed to insert ${failedItems.length} items.`); - } - console.log(`${category} feeds done.`); - console.log('===================='); - return failedItems; -} - -/** - * Extracts the category, ID, and status from the given title and link. - * - * @param {string} title - The title to extract the information from. - * @param {string} link - The link to extract the information from. - * @return {object} An object containing the extracted category, ID, and status. - */ -function extractItemInfo(title, link) { - const m = title.match(allStatus)[1]; - let category, id, status; - - if (m === '看过' || m === '在看' || m === '想看') { - if (link.startsWith('http://movie.douban.com/')) { - category = CATEGORY.movie; - id = link.match(/movie\.douban\.com\/subject\/(\d+)\/?/)[1]; - } else { - category = CATEGORY.drama; - id = link.match(/www\.douban\.com\/location\/drama\/(\d+)\/?/)[1]; - } - status = m === '看过' ? STATUS.Complete : m === '在看' ? STATUS.Progress : STATUS.Wishlist; - } else if (m === '读过' || m === '在读' || m === '想读') { - category = CATEGORY.book; - id = link.match(/book\.douban\.com\/subject\/(\d+)\/?/)[1]; - status = m === '读过' ? STATUS.Complete : m === '在读' ? STATUS.Progress : STATUS.Wishlist; - } else if (m === '听过' || m === '在读' || m === '想听') { - category = CATEGORY.music; - id = link.match(/music\.douban\.com\/subject\/(\d+)\/?/)[1]; - status = m === '听过' ? STATUS.Complete : m === '在听' ? STATUS.Progress : STATUS.Wishlist; - } else if (m === '玩过' || m === '在玩' || m === '想玩') { - category = CATEGORY.game; - id = link.match(/www\.douban\.com\/game\/(\d+)\/?/)[1]; - status = m === '玩过' ? STATUS.Complete : m === '在玩' ? STATUS.Progress : STATUS.Wishlist; - } else { - return { category: undefined, id: undefined, status: undefined }; - } - - return { category, id, status }; -} - -/** - * Retrieves the database ID for the given category. - * - * @param {string} category - The category of the item. - * @return {string} The corresponding database ID. - */ -function getDBID(category) { - const databases = { - [CATEGORY.movie]: movieDBID, - [CATEGORY.music]: musicDBID, - [CATEGORY.book]: bookDBID, - [CATEGORY.game]: gameDBID, - [CATEGORY.drama]: dramaDBID, - }; - return databases[category]; -} - -/** - * Fetches an item from douban webpage based on the given link and category. - * - * @param {string} link - The link to fetch the item from. - * @param {string} category - The category of the item (movie, music, book, game, drama). - * @return {Object} - An object containing the fetched item data. - */ -async function fetchItem(link, category) { - console.log(`Fetching ${category} item with link: ${link}`); - const itemData = {}; - const response = await got(link); - const dom = new JSDOM(response.body); - - // movie item page - if (category === CATEGORY.movie) { - const title = dom.window.document - .querySelector('#content h1 [property="v:itemreviewed"]') - .textContent.trim(); - itemData[DB_PROPERTIES.NAME] = title; - itemData[DB_PROPERTIES.MOVIE_TITLE] = title; - itemData[DB_PROPERTIES.YEAR] = dom.window.document - .querySelector('#content h1 .year') - .textContent.slice(1, -1); - const img = dom.window.document.querySelector('#mainpic img'); - if (img?.title === '点击看更多海报') { - itemData[DB_PROPERTIES.POSTER] = img?.src - .trim() - .replace(/\.webp$/, '.jpg'); - } - itemData[DB_PROPERTIES.DIRECTORS] = - dom.window.document.querySelector('#info .attrs').textContent; - itemData[DB_PROPERTIES.ACTORS] = [ - ...dom.window.document.querySelectorAll('#info .actor .attrs a'), - ] - .slice(0, 5) - .map((i) => i.textContent) - .join(' / '); - itemData[DB_PROPERTIES.GENRE] = [ - ...dom.window.document.querySelectorAll('#info [property="v:genre"]'), - ].map((i) => i.textContent); // array - const imdbInfo = [ - ...dom.window.document.querySelectorAll('#info span.pl'), - ].filter((i) => i.textContent.startsWith('IMDb')); - if (imdbInfo.length) { - itemData[DB_PROPERTIES.IMDB_LINK] = - 'https://www.imdb.com/title/' + - imdbInfo[0].nextSibling.textContent.trim(); - } - - // music item page - } else if (category === CATEGORY.music) { - const title = dom.window.document - .querySelector('#wrapper h1 span') - .textContent.trim(); - itemData[DB_PROPERTIES.MUSIC_TITLE] = title; - itemData[DB_PROPERTIES.NAME] = title; - const img = dom.window.document.querySelector('#mainpic img'); - if (img?.title !== '点击上传封面图片' && img?.src.length <= 100) { - itemData[DB_PROPERTIES.COVER] = img?.src.replace(/\.webp$/, '.jpg'); - } - let info = [...dom.window.document.querySelectorAll('#info span.pl')]; - let release = info.filter((i) => - i.textContent.trim().startsWith('发行时间') - ); - if (release.length) { - let date = release[0].nextSibling.textContent.trim(); // 2021-05-31, or 2021-4-2 - itemData[DB_PROPERTIES.RELEASE_DATE] = dayjs(date).format('YYYY-MM-DD'); - } - let musician = info.filter((i) => - i.textContent.trim().startsWith('表演者') - ); - if (musician.length) { - itemData[DB_PROPERTIES.MUSICIAN] = musician[0].textContent - .replace('表演者:', '') - .trim() - .split('\n') - .map((v) => v.trim()) - .join(''); - // split and trim to remove extra spaces, rich_text length limited to 2000 - } - - // book item page - } else if (category === CATEGORY.book) { - const title = dom.window.document - .querySelector('#wrapper h1 [property="v:itemreviewed"]') - .textContent.trim(); - itemData[DB_PROPERTIES.BOOK_TITLE] = title; - itemData[DB_PROPERTIES.NAME] = title; - const img = dom.window.document.querySelector('#mainpic img'); - if (img?.title !== '点击上传封面图片' && img?.src.length <= 100) { - itemData[DB_PROPERTIES.COVER] = img?.src.replace(/\.webp$/, '.jpg'); - } - let info = [...dom.window.document.querySelectorAll('#info span.pl')]; - info.forEach((i) => { - let text = i.textContent.trim(); - let nextText = i.nextSibling?.textContent.trim(); - if (text.startsWith('作者')) { - let parent = i.parentElement; - if (parent.id === 'info') { - // if only one writer, then parentElement is the #info container - itemData[DB_PROPERTIES.WRITER] = i.nextElementSibling.textContent - .replace(/\n/g, '') - .replace(/\s/g, ''); - } else { - // if multiple writers, there will be a separate element - itemData[DB_PROPERTIES.WRITER] = i.parentElement.textContent - .trim() - .replace('作者:', '') - .trim(); - } - } else if (text.startsWith('出版社')) { - if (i.nextElementSibling.tagName === 'BR') { - itemData[DB_PROPERTIES.PUBLISHING_HOUSE] = nextText; - } else { - // 出版社可能有单独链接 上海三联书店 - itemData[DB_PROPERTIES.PUBLISHING_HOUSE] = i.nextElementSibling.textContent.trim(); - } - } else if (text.startsWith('原作名')) { - itemData[DB_PROPERTIES.BOOK_TITLE] += nextText; - } else if (text.startsWith('出版年')) { - if (/年|月|日/.test(nextText)) { - nextText = nextText.replace(/年|月|日/g, '-').slice(0, -1); // '2000年5月' special case - } - itemData[DB_PROPERTIES.PUBLICATION_DATE] = - dayjs(nextText).format('YYYY-MM-DD'); // this can have only year, month, but need to format to YYYY-MM-DD - } else if (text.startsWith('ISBN')) { - itemData[DB_PROPERTIES.ISBN] = Number(nextText); - } - }); - - // game item page - } else if (category === CATEGORY.game) { - const title = dom.window.document - .querySelector('#wrapper #content h1') - .textContent.trim(); - itemData[DB_PROPERTIES.GAME_TITLE] = title; - itemData[DB_PROPERTIES.NAME] = title; - const img = dom.window.document.querySelector('.item-subject-info .pic img'); - if (img?.title !== '点击上传封面图片' && img?.src.length <= 100) { - itemData[DB_PROPERTIES.COVER] = img?.src.replace(/\.webp$/, '.jpg'); - } - const gameInfo = dom.window.document.querySelector('#content .game-attr'); - const dts = [...gameInfo.querySelectorAll('dt')].filter( - (i) => - i.textContent.startsWith('类型') || i.textContent.startsWith('发行日期') - ); - if (dts.length) { - dts.forEach((dt) => { - if (dt.textContent.startsWith('类型')) { - itemData[DB_PROPERTIES.GENRE] = [ - ...dt.nextElementSibling.querySelectorAll('a'), - ].map((a) => a.textContent.trim()); //array - } else if (dt.textContent.startsWith('发行日期')) { - let date = dt.nextElementSibling.textContent.trim(); - itemData[DB_PROPERTIES.RELEASE_DATE] = - dayjs(date).format('YYYY-MM-DD'); - } - }); - } - - // drama item page - } else if (category === CATEGORY.drama) { - const title = dom.window.document - .querySelector('#content .drama-info .meta h1') - .textContent.trim(); - itemData[DB_PROPERTIES.DRAMA_TITLE] = title; - itemData[DB_PROPERTIES.NAME] = title; - let genre = dom.window.document - .querySelector('#content .drama-info .meta [itemprop="genre"]') - .textContent.trim(); - itemData[DB_PROPERTIES.GENRE] = [genre]; - const img = dom.window.document.querySelector('.drama-info .pic img'); - if (img?.title !== '点击上传封面图片' && img?.src.length <= 100) { - itemData[DB_PROPERTIES.POSTER] = img?.src.replace(/\.webp$/, '.jpg'); - } - } - - return itemData; -} - -/** - * Generates the value for a property based on the given parameters, ready to insert - * into notion database. - * - * @param {any} value - The value to be used for generating the property value. - * @param {string} type - The type of the property. - * @param {string} key - The key associated with the property. - * @return {object} The generated value for the property. - */ -function getPropertyValye(value, type, key) { - let res = null; - switch (type) { - case 'title': - res = { - type: 'title', - title: [ - { - text: { - content: value, - }, - }, - ], - }; - break; - case 'files': - res = { - type: 'files', - files: [ - { - // file: {}, - name: value, - type: 'external', - external: { - // need external:{} format to insert the files property, but still not successful - url: value, - }, - }, - ], - }; - break; - case 'date': - res = { - type: 'date', - date: { - start: value, - }, - }; - break; - case 'multi_select': - res = - key === DB_PROPERTIES.RATING - ? { - type: 'multi_select', - multi_select: value - ? [ - { - name: value.toString(), - }, - ] - : [], - } - : { - type: 'multi_select', - multi_select: (value || []).map((g) => ({ - name: g, // @Q: if the option is not created before, can not use it directly here? - })), - }; - break; - case 'rich_text': - res = { - type: 'rich_text', - rich_text: [ - { - type: 'text', - text: { - content: value || '', - }, - }, - ], - }; - break; - case 'number': - res = { - type: 'number', - number: value ? Number(value) : null, - }; - break; - case 'url': - res = { - type: 'url', - url: value || url, - }; - break; - default: - break; - } - - return res; -} - -/** - * Inserts an item into Notion database. - * - * @param {Object} itemData - The data of the item to be inserted. - * @param {string} category - The category of the item. - * @return {boolean} - Returns true if the item is successfully inserted, false otherwise. - */ -async function addToNotion(itemData, category) { - console.log( - 'Going to insert ', - itemData[DB_PROPERTIES.RATING_DATE], - itemData[DB_PROPERTIES.NAME] - ); - let result = true; - try { - let properties = {}; - const keys = Object.keys(DB_PROPERTIES); - keys.shift(); // remove fist one NAME - keys.forEach((key) => { - if (itemData[DB_PROPERTIES[key]]) { - properties[DB_PROPERTIES[key]] = getPropertyValye( - itemData[DB_PROPERTIES[key]], - PropertyType[key], - DB_PROPERTIES[key] - ); - } - }); - - const dbid = getDBID(category); - if (!dbid) { - throw new Error('No databse id found for category: ' + category); - } - const db = await notion.databases.retrieve({ database_id: dbid }); - const columns = Object.keys(db.properties); - // remove cols which are not in the current database - const propKeys = Object.keys(properties); - propKeys.map((prop) => { - if (columns.indexOf(prop) < 0) { - delete properties[prop]; - } - }); - - const postData = { - parent: { - database_id: dbid, - }, - icon: { - type: 'emoji', - emoji: EMOJI[category], - }, - // fill in properties by the format: https://developers.notion.com/reference/page#page-property-value - properties, - }; - if (properties[DB_PROPERTIES.POSTER] || properties[DB_PROPERTIES.COVER]) { - // use poster for the page cover - postData.cover = { - type: 'external', - external: { - url: (properties[DB_PROPERTIES.POSTER] || properties[DB_PROPERTIES.COVER])?.files[0]?.external?.url, // cannot be empty string or null - }, - }; - } - const response = await notion.pages.create(postData); - if (response && response.id) { - console.log( - itemData[DB_PROPERTIES.NAME] + - `[${itemData[DB_PROPERTIES.ITEM_LINK]}]` + - ' page created.' - ); - } - } catch (error) { - console.warn( - 'Failed to create ' + - itemData[DB_PROPERTIES.NAME] + - `(${itemData[DB_PROPERTIES.ITEM_LINK]})` + - ' with error: ', - error - ); - result = false; - } - - return result; -} diff --git a/util.js b/util.js deleted file mode 100644 index db32d317..00000000 --- a/util.js +++ /dev/null @@ -1,81 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -const customColsFile = process.env.CUSTOM_COLUMN_NAME; - -export const getColumnNames = async () => { - const base = { - NAME: 'name', // 用于log - // movie - POSTER: '海报', - MOVIE_TITLE: '电影/电视剧/番组', - YEAR: '上映年份', - DIRECTORS: '导演', - ACTORS: '主演', - GENRE: '类型', // movie, game, drama - IMDB_LINK: 'IMDb 链接', - // music - COVER: '封面', // music, book, game - MUSIC_TITLE: '单曲/专辑', - RELEASE_DATE: '发行日期', // music and game - MUSICIAN: '音乐家', - // book - BOOK_TITLE: '书名', - PUBLICATION_DATE: '出版日期', - PUBLISHING_HOUSE: '出版社', - WRITER: '作者', - ISBN: 'ISBN', - // game - GAME_TITLE: '游戏名称', - // drama - DRAMA_TITLE: '舞台剧名称', - // common - RATING: '个人评分', // common - RATING_DATE: '打分日期', // common - COMMENTS: '我的短评', // common - ITEM_LINK: '条目链接', // common - }; - if (customColsFile) { - try { - const customCols = await import(customColsFile, { - assert: { type: 'json' }, - }); - if (customCols) { - return { ...base, ...customCols }; - } - } catch (error) { - console.log('Failed to load custom columns setting: ', error); - } - } - return base; -}; - -export const PropertyType = { - POSTER: 'files', - MOVIE_TITLE: 'title', - MUSIC_TITLE: 'title', - BOOK_TITLE: 'title', - GAME_TITLE: 'title', - DRAMA_TITLE: 'title', - COVER: 'files', - RATING: 'multi_select', - RATING_DATE: 'date', - COMMENTS: 'rich_text', - YEAR: 'number', - DIRECTORS: 'rich_text', - ACTORS: 'rich_text', - GENRE: 'multi_select', - ITEM_LINK: 'url', - IMDB_LINK: 'url', - RELEASE_DATE: 'date', - MUSICIAN: 'rich_text', - PUBLICATION_DATE: 'date', - PUBLISHING_HOUSE: 'rich_text', - WRITER: 'rich_text', - ISBN: 'number', -}; - -export function sleep(ms) { - return new Promise((r) => setTimeout(r, ms)); -} From 85fbbca7cfc293baa50bf57e5f0d61906c0d7750 Mon Sep 17 00:00:00 2001 From: bamboo Date: Sun, 21 Jan 2024 00:33:53 +0800 Subject: [PATCH 16/62] :sparkles: Refactor: re-write handle-neodb part --- src/handle-neodb.ts | 124 ++++++++++++++++++++++++++++++++++++++++++++ src/index.ts | 9 ++-- 2 files changed, 127 insertions(+), 6 deletions(-) create mode 100644 src/handle-neodb.ts diff --git a/src/handle-neodb.ts b/src/handle-neodb.ts new file mode 100644 index 00000000..4bdbdd4a --- /dev/null +++ b/src/handle-neodb.ts @@ -0,0 +1,124 @@ +import dotenv from 'dotenv'; +import got from 'got'; +import type { FeedItem, ItemCategory } from "./types"; +import { sleep } from './utils'; + +dotenv.config(); +const neodbToken = process.env.NEODB_API_TOKEN; + +type NeodbItem = { + id: string; + type: string; + uuid: string; + url: string; + api_url: string; + category: ItemCategory; + parent_uuid: string; + display_title: string; + external_resources: { + url: string; + }[], + title: string; + brief: string; + cover_image_url: string; + rating: number; + rating_count: number; +}; + +/** + * Asynchronously handles syncing feed items to NeoDB. + * + * @param {FeedItem[]} feeds - the array of feed items to sync + * @return {Promise} + */ +export default async function handleNeodb(feeds: FeedItem[]): Promise { + if (!neodbToken) { + return; + } + + console.log('Going to sync to NeoDB...'); + // 同步标记到 neodb + for (const item of feeds) { + await insertToNeodb(item); + } + console.log('NeoDB synced ✨'); +} + +/** + * Inserts a FeedItem into Neodb and first fetching the item's data to check + * whether need to update the status. + * + * @param {FeedItem} item - the FeedItem to be inserted into Neodb + * @return {Promise} a Promise that resolves when the insertion is complete + */ +async function insertToNeodb(item: FeedItem): Promise { + // fetch item by douban link + const neodbItem = await got('https://neodb.social/api/catalog/fetch', { + searchParams: { + url: item.link, + }, + headers: { + accept: 'application/json', + }, + }).json() as NeodbItem; + // 条目不存在的话会被创建,但此时会返回 {message: 'Fetch in progress'} + if (neodbItem.uuid) { + try { + const mark = await got( + `https://neodb.social/api/me/shelf/item/${neodbItem.uuid}`, + { + headers: { + Authorization: `Bearer ${neodbToken}`, + accept: 'application/json', + }, + } + ).json(); + if (mark.shelf_type !== item.status) { + // 标记状态不一样,所以更新标记 + await markItem(neodbItem, item); + } + } catch (error) { + if (error.code === 'ERR_NON_2XX_3XX_RESPONSE') { + // 标记不存在,所以创建标记 + await markItem(neodbItem, item); + } + } + } else { + // 标记不存在,等待一点时间创建标记再去标记 + await sleep(1500); + await insertToNeodb(item); + } +} + +/** + * Marks an item on NeoDB with the specified parameters. + * + * @param {NeodbItem} neodbItem - the NeodbItem to be marked + * @param {FeedItem} item - the FeedItem containing information about the item + * @return {Promise} a Promise that resolves when the item is successfully marked + */ +async function markItem(neodbItem: NeodbItem, item: FeedItem): Promise { + console.log('Going to mark on NeoDB: ', `${neodbItem.title}[${item.link}]`); + try { + await got.post(`https://neodb.social/api/me/shelf/item/${neodbItem.uuid}`, { + headers: { + Authorization: `Bearer ${neodbToken}`, + accept: 'application/json', + }, + json: { + shelf_type: item.status, + visibility: 2, + comment_text: item.comment || '', + rating_grade: item.rating ? item.rating * 2 : 0, + created_time: item.time, + post_to_fediverse: false, + }, + }); + } catch (error) { + console.error( + 'Failed to mark item: ', neodbItem?.title, + ' with error: ', + error + ); + } +} diff --git a/src/index.ts b/src/index.ts index 6d9cea96..11f13664 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,9 @@ -import dotenv from 'dotenv'; import fetchRSSFeeds from './fetch-rss'; import handleRSSFeeds from './handle-rss'; import handleNotion from './handle-notion'; +import handleNeodb from './handle-neodb'; import { ItemStatus } from './types'; -dotenv.config(); - -const neodbToken = process.env.NEODB_API_TOKEN; - - async function main(): Promise { const feeds = await fetchRSSFeeds(); if (feeds.length === 0) { @@ -22,6 +17,8 @@ async function main(): Promise { if (completeFeeds.length) { await handleNotion(completeFeeds); } + + await handleNeodb(normalizedFeeds); } main(); From 58ef533bd30049b81a39b91716c07b23243ee151 Mon Sep 17 00:00:00 2001 From: bamboo Date: Sun, 21 Jan 2024 00:37:16 +0800 Subject: [PATCH 17/62] :construction_worker: Ci: update ci setting --- .github/workflows/sync-rss.js.yml | 3 +-- README.md | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-rss.js.yml b/.github/workflows/sync-rss.js.yml index 91e05023..3625ed3c 100644 --- a/.github/workflows/sync-rss.js.yml +++ b/.github/workflows/sync-rss.js.yml @@ -29,7 +29,6 @@ jobs: NOTION_DRAMA_DATABASE_ID: ${{ secrets.NOTION_DRAMA_DATABASE_ID }} DOUBAN_USER_ID: ${{ secrets.DOUBAN_USER_ID }} NEODB_API_TOKEN: ${{ secrets.NEODB_API_TOKEN }} - CUSTOM_COLUMN_NAME: ${{ secrets.CUSTOM_COLUMN_NAME }} steps: - uses: actions/checkout@v3 @@ -38,4 +37,4 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci - - run: node sync-rss.js || exit 1 + - run: npm run sync || exit 1 diff --git a/README.md b/README.md index 1e1a7824..6a9fdd16 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# 正在更新新版,教程也需要更新 + ![sync-rss](https://github.com/bambooom/douban-backup/actions/workflows/sync-rss.js.yml/badge.svg) > 详细教程 -> https://zhuzi.dev/posts/2021-06-05-douban-backup-sync-notion/ From 465090ffc9f5234a105ed69510a490340399b4c9 Mon Sep 17 00:00:00 2001 From: bamboo Date: Sun, 21 Jan 2024 01:11:40 +0800 Subject: [PATCH 18/62] :recycle: Refactor: rss put in one file --- src/const.ts | 26 +++++++++++++++++++++- src/fetch-rss.ts | 19 ---------------- src/handle-rss.ts | 56 ++++++++++++++++++++++++++--------------------- src/index.ts | 3 +-- src/types.ts | 9 ++++++++ src/utils.ts | 31 +++++++++++++++++--------- 6 files changed, 87 insertions(+), 57 deletions(-) delete mode 100644 src/fetch-rss.ts diff --git a/src/const.ts b/src/const.ts index d2cc8f6a..185cb2c5 100644 --- a/src/const.ts +++ b/src/const.ts @@ -1,4 +1,4 @@ -import { type DB_PROPERTIES_KEYS, NotionPropTypesEnum } from './types'; +import { type DB_PROPERTIES_KEYS, NotionPropTypesEnum, ItemStatus } from './types'; export const ALL_STATUS = /^(?:最近)?(看过|听过|读过|玩过|在看|在听|在读|在玩|想看|想听|想读|想玩)/; @@ -10,6 +10,30 @@ export const RATING_TEXT = { 力荐: 5, }; +export const SeeState = { + '看过': ItemStatus.Complete, + '在看': ItemStatus.Progress, + '想看': ItemStatus.Wishlist, +}; + +export const ReadState = { + '读过': ItemStatus.Complete, + '在读': ItemStatus.Progress, + '想读': ItemStatus.Wishlist, +}; + +export const PlayState = { + '玩过': ItemStatus.Complete, + '在玩': ItemStatus.Progress, + '想玩': ItemStatus.Wishlist, +}; + +export const ListenState = { + '听过': ItemStatus.Complete, + '在听': ItemStatus.Progress, + '想听': ItemStatus.Wishlist, +}; + export const PropertyTypeMap: Record = { POSTER: NotionPropTypesEnum.FILES, MOVIE_TITLE: NotionPropTypesEnum.TITLE, diff --git a/src/fetch-rss.ts b/src/fetch-rss.ts deleted file mode 100644 index af125f6c..00000000 --- a/src/fetch-rss.ts +++ /dev/null @@ -1,19 +0,0 @@ -import Parser from 'rss-parser'; -import dotenv from 'dotenv'; -import type { RSSFeedItem } from './types'; - -dotenv.config(); - -export default async function fetchRSSFeeds(): Promise { - const DOUBAN_USER_ID = process.env.DOUBAN_USER_ID; - const parser = new Parser(); - try { - const feeds = await parser.parseURL( - `https://www.douban.com/feed/people/${DOUBAN_USER_ID}/interests` - ); - return feeds.items; - } catch (error) { - console.error('Failed to parse RSS url: ', error); - process.exit(1); - } -} diff --git a/src/handle-rss.ts b/src/handle-rss.ts index 445090fe..b0faf591 100644 --- a/src/handle-rss.ts +++ b/src/handle-rss.ts @@ -1,6 +1,20 @@ +import Parser from 'rss-parser'; +import dotenv from 'dotenv'; import { JSDOM } from 'jsdom'; -import { ALL_STATUS, RATING_TEXT } from './const'; -import { ItemCategory, ItemStatus, type RSSFeedItem, type FeedItem } from './types'; +import { + ALL_STATUS, + RATING_TEXT, + SeeState, + ReadState, + PlayState, + ListenState, +} from './const'; +import { + ItemCategory, + ItemStatus, + type RSSFeedItem, + type FeedItem, +} from './types'; type ItemInfo = { category: ItemCategory; @@ -8,29 +22,21 @@ type ItemInfo = { status: ItemStatus; } -const SeeState = { - '看过': ItemStatus.Complete, - '在看': ItemStatus.Progress, - '想看': ItemStatus.Wishlist, -}; +dotenv.config(); -const ReadState = { - '读过': ItemStatus.Complete, - '在读': ItemStatus.Progress, - '想读': ItemStatus.Wishlist, -}; - -const PlayState = { - '玩过': ItemStatus.Complete, - '在玩': ItemStatus.Progress, - '想玩': ItemStatus.Wishlist, -}; - -const ListenState = { - '听过': ItemStatus.Complete, - '在听': ItemStatus.Progress, - '想听': ItemStatus.Wishlist, -}; +export async function fetchRSSFeeds(): Promise { + const DOUBAN_USER_ID = process.env.DOUBAN_USER_ID; + const parser = new Parser(); + try { + const feeds = await parser.parseURL( + `https://www.douban.com/feed/people/${DOUBAN_USER_ID}/interests` + ); + return feeds.items; + } catch (error) { + console.error('Failed to parse RSS url: ', error); + process.exit(1); + } +} /** * Normalize the given array of RSS feed items. @@ -38,7 +44,7 @@ const ListenState = { * @param {RSSFeedItem[]} feeds - The array of RSS feed items to be normalized. * @return {FeedItem[]} The normalized array of feed items. */ -export default function handleRSSFeeds(feeds: RSSFeedItem[]): FeedItem[] { +export function handleRSSFeeds(feeds: RSSFeedItem[]): FeedItem[] { const normalizedFeeds: FeedItem[] = []; feeds.forEach((item) => { diff --git a/src/index.ts b/src/index.ts index 11f13664..6c3c408f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,4 @@ -import fetchRSSFeeds from './fetch-rss'; -import handleRSSFeeds from './handle-rss'; +import { fetchRSSFeeds, handleRSSFeeds } from './handle-rss'; import handleNotion from './handle-notion'; import handleNeodb from './handle-neodb'; import { ItemStatus } from './types'; diff --git a/src/types.ts b/src/types.ts index 2dcc83f7..5116a906 100644 --- a/src/types.ts +++ b/src/types.ts @@ -105,6 +105,15 @@ export type NotionUrlPropType = { url: string; }; +export type NotionColPropTypes = + | NotionRichTextPropType + | NotionTitlePropType + | NotionFilesPropType + | NotionDatePropType + | NotionMultiSelectPropType + | NotionNumberPropType + | NotionUrlPropType; + export type FailedItem = { link: string; title: string; diff --git a/src/utils.ts b/src/utils.ts index 2edba0b3..6083e1a7 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,6 +1,17 @@ import dotenv from 'dotenv'; -import { ItemCategory, NotionPropTypesEnum } from './types'; import DB_PROPERTIES from '../cols.json'; +import { + ItemCategory, + NotionPropTypesEnum, + type NotionRichTextPropType, + type NotionTitlePropType, + type NotionFilesPropType, + type NotionDatePropType, + type NotionMultiSelectPropType, + type NotionNumberPropType, + type NotionUrlPropType, + type NotionColPropTypes, +} from './types'; dotenv.config(); @@ -40,7 +51,7 @@ export function sleep(ms: number): Promise { * @param {string} key - the key associated with the property * @return {any} the generated value for the property later will be sent to notion to create an item */ -export function buildPropertyValue(value: any, type: NotionPropTypesEnum, key: string): Record | undefined { +export function buildPropertyValue(value: any, type: NotionPropTypesEnum, key: string): NotionColPropTypes | undefined { switch (type) { case NotionPropTypesEnum.TITLE: return { @@ -52,7 +63,7 @@ export function buildPropertyValue(value: any, type: NotionPropTypesEnum, key: s }, }, ], - }; + } as NotionTitlePropType; case NotionPropTypesEnum.FILES: return { type: NotionPropTypesEnum.FILES, @@ -65,14 +76,14 @@ export function buildPropertyValue(value: any, type: NotionPropTypesEnum, key: s }, }, ], - }; + } as NotionFilesPropType; case NotionPropTypesEnum.DATE: return { type: NotionPropTypesEnum.DATE, date: { start: value, }, - }; + } as NotionDatePropType; case NotionPropTypesEnum.MULTI_SELECT: return key === DB_PROPERTIES.RATING ? { @@ -80,11 +91,11 @@ export function buildPropertyValue(value: any, type: NotionPropTypesEnum, key: s multi_select: value ? [{ name: value.toString() }] : [], - } + } as NotionMultiSelectPropType : { type: NotionPropTypesEnum.MULTI_SELECT, multi_select: (value || []).map(g => ({ name: g })), - }; + } as NotionMultiSelectPropType; case NotionPropTypesEnum.RICH_TEXT: return { type: NotionPropTypesEnum.RICH_TEXT, @@ -96,17 +107,17 @@ export function buildPropertyValue(value: any, type: NotionPropTypesEnum, key: s }, }, ], - }; + } as NotionRichTextPropType; case NotionPropTypesEnum.NUMBER: return { type: NotionPropTypesEnum.NUMBER, number: value ? Number(value) : null, - }; + } as NotionNumberPropType; case NotionPropTypesEnum.URL: return { type: NotionPropTypesEnum.URL, url: value, - }; + } as NotionUrlPropType; default: break; } From 439aa187601bb2a43c7c816f3f5ebeb7ee49110b Mon Sep 17 00:00:00 2001 From: bamboo Date: Sun, 21 Jan 2024 18:39:46 +0800 Subject: [PATCH 19/62] :truck: Refactor: rename folder and add userscript separate folder --- {trial => archive}/README.md | 0 {trial => archive}/crawler.js | 0 {trial => archive}/json2csv.js | 0 {trial => archive}/open-browser.js | 0 {scripts => userscript}/export-note.user.js | 0 {scripts => userscript}/export.user.js | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {trial => archive}/README.md (100%) rename {trial => archive}/crawler.js (100%) rename {trial => archive}/json2csv.js (100%) rename {trial => archive}/open-browser.js (100%) rename {scripts => userscript}/export-note.user.js (100%) rename {scripts => userscript}/export.user.js (100%) diff --git a/trial/README.md b/archive/README.md similarity index 100% rename from trial/README.md rename to archive/README.md diff --git a/trial/crawler.js b/archive/crawler.js similarity index 100% rename from trial/crawler.js rename to archive/crawler.js diff --git a/trial/json2csv.js b/archive/json2csv.js similarity index 100% rename from trial/json2csv.js rename to archive/json2csv.js diff --git a/trial/open-browser.js b/archive/open-browser.js similarity index 100% rename from trial/open-browser.js rename to archive/open-browser.js diff --git a/scripts/export-note.user.js b/userscript/export-note.user.js similarity index 100% rename from scripts/export-note.user.js rename to userscript/export-note.user.js diff --git a/scripts/export.user.js b/userscript/export.user.js similarity index 100% rename from scripts/export.user.js rename to userscript/export.user.js From 905b04f2ca17fb54ab2cc6bf7182dd6f274e0d7e Mon Sep 17 00:00:00 2001 From: bamboo Date: Sun, 21 Jan 2024 21:08:34 +0800 Subject: [PATCH 20/62] :hammer: Change: update seldom used scripts --- ...{db-notes-img-dl.js => db-notes-img-dl.ts} | 14 +++--- .../{update-notion.js => update-notion.ts} | 43 ++++++++++--------- 2 files changed, 31 insertions(+), 26 deletions(-) rename scripts/{db-notes-img-dl.js => db-notes-img-dl.ts} (86%) rename scripts/{update-notion.js => update-notion.ts} (79%) diff --git a/scripts/db-notes-img-dl.js b/scripts/db-notes-img-dl.ts similarity index 86% rename from scripts/db-notes-img-dl.js rename to scripts/db-notes-img-dl.ts index f358896b..11355509 100644 --- a/scripts/db-notes-img-dl.js +++ b/scripts/db-notes-img-dl.ts @@ -1,8 +1,12 @@ +/* + * Use to download images from exported 豆瓣日记 md files +*/ + import fs from "node:fs"; import path from "node:path"; import { promisify } from 'node:util'; import download from 'image-downloader'; -import { sleep } from '../util'; +import { sleep } from '../src/utils'; // const pinyin = require("pinyin"); // no need to convert Chinese titles now const writeFile = promisify(fs.writeFile); @@ -17,15 +21,13 @@ const IMG_PREFIX = '/assets/images/'; // for my blog setting (async () => { const notesFiles = await readDir(DIR); - let COUNT = 0, FAILED_URLS = []; + let COUNT = 0, FAILED_URLS: string[] = []; for (const notesFile of notesFiles) { let basename = path.basename(notesFile); // 2020-07-08-filename.md - basename = basename.match(/^\d{4}-\d{2}-\d{2}-(.+)\.md$/); - basename = basename[1]; // filename, no .md - basename = basename.replace(/\s/g, '-'); // `filename`, use as image folder name + basename = basename.match(/^\d{4}-\d{2}-\d{2}-(.+)\.md$/)?.[1].replace(/\s/g, '-')!; // filename, no .md, use as image folder name let file = await readFile(path.resolve(__dirname, `${DIR}/${notesFile}`), 'utf8'); - let imgs = []; + let imgs: string[] = []; file = file.replace(/!\[(.*?)\]\((.+?)\)/g, function (whole, desc, url) { imgs.push(url); let name = url.match(/\/([^/]*\.(?:jpg|webp))$/); // last p12344.jpg diff --git a/scripts/update-notion.js b/scripts/update-notion.ts similarity index 79% rename from scripts/update-notion.js rename to scripts/update-notion.ts index 4ece7893..fed1064b 100644 --- a/scripts/update-notion.js +++ b/scripts/update-notion.ts @@ -10,24 +10,27 @@ import fs from 'node:fs'; import dotenv from 'dotenv'; import csv from 'fast-csv'; import { Client, LogLevel } from '@notionhq/client'; +import type { QueryDatabaseResponse, PageObjectResponse, CreatePageBodyParameters } from '@notionhq/client/build/src/api-endpoints'; import dayjs from 'dayjs'; import got from 'got'; import { JSDOM } from 'jsdom'; -import { DB_PROPERTIES, sleep } from '../util.js'; +import { sleep } from '../src/utils'; +import DB_PROPERTIES from '../cols.json'; +import type { NotionDatePropType } from '../src/types'; dotenv.config(); // Initializing a client const notion = new Client({ auth: process.env.NOTION_TOKEN, - // logLevel: LogLevel.DEBUG, + logLevel: LogLevel.DEBUG, }); // example: https://github.com/makenotion/notion-sdk-js/blob/main/examples/database-update-send-email/index.js -const databaseId = process.env.NOTION_MOVIE_DATABASE_ID; +const databaseId = process.env.NOTION_MOVIE_DATABASE_ID as string; // read csv file to csvData, and these are going to be filled in notion database -let csvData = []; +const csvData: Record[] = []; async function main() { // get input csv file from cli arg @@ -46,7 +49,7 @@ async function main() { } // query current db last inserted item - const lastMovieItem = await notion.databases.query({ + const lastMovieItem: QueryDatabaseResponse = await notion.databases.query({ database_id: databaseId, sorts: [ { @@ -60,14 +63,14 @@ async function main() { // console.log(lastMovieItem.results[0].properties[DB_PROPERTIES.GENRE]); // get the last inserted item's date - const lastDate = lastMovieItem.results[0].properties[DB_PROPERTIES.RATING_DATE].date.start; // '2021-01-19' + const lastDate = ((lastMovieItem.results[0] as PageObjectResponse).properties[DB_PROPERTIES.RATING_DATE] as NotionDatePropType).date.start; // '2021-01-19' let skip = false; const rs = fs.createReadStream(inputFile); rs .pipe(csv.parse({ headers: true, discardUnmappedColumns: true, trim: true })) .on('error', error => console.error(error)) - .on('data', row => { + .on('data', (row: Record) => { if (Number(skipMode)) { if (skip) { return; } row[DB_PROPERTIES.RATING_DATE] = row[DB_PROPERTIES.RATING_DATE].replace(/\//g, '-'); @@ -89,7 +92,7 @@ async function main() { } async function handleNewItems() { - csvData = csvData.reverse(); + csvData.reverse(); for (let i = 0; i < csvData.length; i++) { const row = csvData[i]; // reverse the array const link = row[DB_PROPERTIES.ITEM_LINK]; @@ -101,7 +104,7 @@ async function handleNewItems() { itemData = {...itemData, ...row}; // merge all data } catch (error) { - console.error(row[DB_PROPERTIES.TITLE], error); + console.error(row[DB_PROPERTIES.MOVIE_TITLE], error); } if (itemData) { @@ -116,20 +119,20 @@ async function fetchItem(link) { const itemData = {}; const response = await got(link); const dom = new JSDOM(response.body); - itemData[DB_PROPERTIES.YEAR] = dom.window.document.querySelector('#content h1 .year').textContent.slice(1, -1); - itemData[DB_PROPERTIES.POSTER] = dom.window.document.querySelector('#mainpic img').src.replace(/\.webp$/, '.jpg'); - itemData[DB_PROPERTIES.DIRECTORS] = dom.window.document.querySelector('#info .attrs').textContent; + itemData[DB_PROPERTIES.YEAR] = dom.window.document.querySelector('#content h1 .year')?.textContent?.slice(1, -1); + itemData[DB_PROPERTIES.POSTER] = (dom.window.document.querySelector('#mainpic img') as HTMLImageElement).src.replace(/\.webp$/, '.jpg'); + itemData[DB_PROPERTIES.DIRECTORS] = dom.window.document.querySelector('#info .attrs')?.textContent; itemData[DB_PROPERTIES.ACTORS] = [...dom.window.document.querySelectorAll('#info .actor .attrs a')].slice(0, 5).map(i => i.textContent).join(' / '); itemData[DB_PROPERTIES.GENRE] = [...dom.window.document.querySelectorAll('#info [property="v:genre"]')].map(i => i.textContent); // array - const imdbInfo = [...dom.window.document.querySelectorAll('#info span.pl')].filter(i => i.textContent.startsWith('IMDb')); + const imdbInfo = [...dom.window.document.querySelectorAll('#info span.pl')].filter(i => i.textContent?.startsWith('IMDb')); if (imdbInfo.length) { - itemData[DB_PROPERTIES.IMDB_LINK] = 'https://www.imdb.com/title/' + imdbInfo[0].nextSibling.textContent.trim(); + itemData[DB_PROPERTIES.IMDB_LINK] = 'https://www.imdb.com/title/' + imdbInfo[0].nextSibling?.textContent?.trim(); } return itemData; } async function addToNotion(itemData) { - console.log('goint to insert ', itemData[DB_PROPERTIES.RATING_DATE], itemData[DB_PROPERTIES.TITLE]); + console.log('goint to insert ', itemData[DB_PROPERTIES.RATING_DATE], itemData[DB_PROPERTIES.MOVIE_TITLE]); try { const response = await notion.pages.create({ parent: { @@ -144,11 +147,11 @@ async function addToNotion(itemData) { } ], }, - [DB_PROPERTIES.TITLE]: { + [DB_PROPERTIES.MOVIE_TITLE]: { title: [ { text: { - content: itemData[DB_PROPERTIES.TITLE], + content: itemData[DB_PROPERTIES.MOVIE_TITLE], }, }, ] @@ -209,13 +212,13 @@ async function addToNotion(itemData) { [DB_PROPERTIES.IMDB_LINK]: { url: itemData[DB_PROPERTIES.IMDB_LINK] || null, }, - }, + } as CreatePageBodyParameters, }); if (response && response.id) { - console.log(itemData[DB_PROPERTIES.TITLE] + `(${itemData[DB_PROPERTIES.ITEM_LINK]})` + ' page created.'); + console.log(itemData[DB_PROPERTIES.MOVIE_TITLE] + `(${itemData[DB_PROPERTIES.ITEM_LINK]})` + ' page created.'); } } catch (error) { - console.warn('Failed to create ' + itemData[DB_PROPERTIES.TITLE] + `(${itemData[DB_PROPERTIES.ITEM_LINK]})` + ' with error: ', error); + console.warn('Failed to create ' + itemData[DB_PROPERTIES.MOVIE_TITLE] + `(${itemData[DB_PROPERTIES.ITEM_LINK]})` + ' with error: ', error); } } From 3f52fb8a59d60b697d2845a8f9d8d4ea000ecc1a Mon Sep 17 00:00:00 2001 From: bamboo Date: Sun, 21 Jan 2024 21:09:08 +0800 Subject: [PATCH 21/62] :memo: Docs: update readme --- README.md | 53 ++++++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 6a9fdd16..195b0b15 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,25 @@ -# 正在更新新版,教程也需要更新 - ![sync-rss](https://github.com/bambooom/douban-backup/actions/workflows/sync-rss.js.yml/badge.svg) > 详细教程 -> https://zhuzi.dev/posts/2021-06-05-douban-backup-sync-notion/ > > 油猴脚本 -> https://greasyfork.org/en/scripts/420999 -## update notion database from csv -在前一次导出后过了一段时间,在豆瓣上又有新的标记,但没有简单方法可以同步,又不想手动添加。 -终于等到了 notion public API 发布出来。 +``` +. +├── archive # 不再使用的实验时的爬虫脚本 +├── cols.json # 可修改自定义的 Notion 表格列名 +├── .env # 如果需要在本地 debug,可以添加这个文件 +├── scripts # 长期不需要使用的脚本,但未来有可能需要使用 +├── src # 会保持更新正在使用的脚本👩🏻‍💻👈 +└── userscript # 导出时可使用的油猴脚本 +``` -如果在豆瓣上又重新执行[油猴脚本(`export.user.js`)](https://greasyfork.org/en/scripts/420999)导出了一个更新的 csv 文件。 -其中大多数都已经在上一次导出到 notion database 中。少数(大约 80 个)新条目需要更新到 database 中。 -可以使用 `update-notion.js` 脚本,用最新的 csv 文件作为输入,跳过所有已经导入过的条目。 -针对新的条目,一一去从页面获取扩展信息,并更新到 notion 中。 -因为访问条目数比较少,所以不容易被禁 IP。 +## 从豆瓣 RSS 数据同步到 Notion 数据库
- example of one row of douban export.user.js csv data + 使用油猴脚本 export.user.js导出的 CSV 数据样例(one row)
 {
   '标题': '无间双龙:这份爱,才是正义 / ウロボロス~この愛こそ正  義。',
@@ -34,7 +34,7 @@
 
- example of notion database properties + Notion 数据库 properties 样例数据
 {
   '条目链接': {
@@ -81,16 +81,8 @@
   
- - -## sync database from douban rss -通过上面的脚本可以一次性处理添加几十个条目,但终究需要手动隔一段时间去执行。 -我想到的能够自动同步豆瓣标记的方法就是通过 RSS,所幸豆瓣的 RSS 功能一直健在。 - -以下是 RSS 数据解析之后的例子: -
- douban rss parsed example + 豆瓣RSS 数据解析之后的例子
 #竹子哟竹子#✨ 的收藏
 {
@@ -127,31 +119,26 @@
   
+--- + RSS 的好处一个是轻量,但又包含了个人标记的最重要的几个数据:名字、条目链接、时间、评分、短评。 所以需求可以转换为,定时获取 RSS 更新,并对新的条目进行抓取信息并同步到 notion database。 -由此完成了 `sync-rss.js` 脚本工具,即获取 RSS 数据,对新加入的条目进行抓取信息,处理后添加到对应的 notion database 中即可。 +但需要注意的是,豆瓣的 RSS 数据每次都只保留 10 个,并且包括想看、想听、想读。本人的脚本同步到 Notion 的部分仅处理看过、听过、读过的条目,如果某一天集中标记数量过多,可能使 RSS 数据并未全部被 workflow 获取。 +这种情况的时候请自己手动触发脚本的运行,或者将脚本运行间隔时间改短,比如每个小时或者每两个小时。 -这个脚本只要能定时自己跑就可以自动从豆瓣标记去更新 notion 了! - -需要一个能跑 cron job 的服务即可,贫穷又很懒的我在想过一圈之后,发现 GitHub Actions 可以跑 [scheduled workflow](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#schedule), 完美满足需求。 - -经过一番查找文档,设定好了 [sync-rss workflow](./.github/workflows/sync-rss.js.yml)。此处我的 schedule 是 "Runs every 6 hours",也就是一天也只运行 4 次。 - -但需要考虑的是,豆瓣的 RSS 数据每次都只保留 10 个,并且包括想看、想听、想读。本人仅处理看过、听过、读过的条目,所以如果某一天集中标记数量过多,可能使 RSS 数据并未全部被 workflow 获取。 -也在考虑改成 每小时或者每两个小时跑一次。 - -另,GitHub 免费用户的开源仓库,actions 暂时是完全免费,也不计时间。 +GitHub 免费用户的开源仓库,actions 暂时是完全免费,也不计时间。 [查看 workflow 运行结果 ->](https://github.com/bambooom/douban-backup/actions/workflows/sync-rss.js.yml) -## sync to NeoDB +## 同时同步标记到 NeoDB > [NeoDB 文档](https://neodb.social/developer/) 在文档页面先生成一个 Token,然后给 repo 添加一个 secret 叫 `NEODB_API_TOKEN`。 即可开启在豆瓣的标记会同步到 NeoDB 的功能。 + ## todo - [x] ~~补全 notion 中的海报~~ - 同步时会正常插入海报信息,海报图片是豆瓣上的图片的 URL,所以在 notion 中显示不稳定。但因为 notion API 不支持上传文件,所以也无法直接插入图片。暂时不做任何优化。 From 3d096c907bbf39716910e4324e8b6d8924938ee8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 23:01:48 +0000 Subject: [PATCH 22/62] build(deps): bump dotenv from 16.3.1 to 16.3.2 Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.3.1 to 16.3.2. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.3.2) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5550d588..fa70fefd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.3.1", + "dotenv": "^16.3.2", "fast-csv": "^5.0.0", "got": "^14.0.0", "jsdom": "^23.2.0", @@ -706,9 +706,9 @@ } }, "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "version": "16.3.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.2.tgz", + "integrity": "sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ==", "engines": { "node": ">=12" }, diff --git a/package.json b/package.json index fc274c7f..f312c4de 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.3.1", + "dotenv": "^16.3.2", "fast-csv": "^5.0.0", "got": "^14.0.0", "jsdom": "^23.2.0", From 7d1c5df2c53ae37c28a0916ead72688b64c9315f Mon Sep 17 00:00:00 2001 From: bamboo Date: Tue, 23 Jan 2024 22:50:32 +0800 Subject: [PATCH 23/62] :arrow_up: Deps: upgrade jsdom. --- package-lock.json | 66 +++++++---------------------------------------- package.json | 2 +- 2 files changed, 11 insertions(+), 57 deletions(-) diff --git a/package-lock.json b/package-lock.json index fa70fefd..2098527a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "dotenv": "^16.3.2", "fast-csv": "^5.0.0", "got": "^14.0.0", - "jsdom": "^23.2.0", + "jsdom": "^24.0.0", "rss-parser": "^3.13.0" }, "devDependencies": { @@ -25,16 +25,6 @@ "node": ">=20" } }, - "node_modules/@asamuzakjp/dom-selector": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-2.0.2.tgz", - "integrity": "sha512-x1KXOatwofR6ZAYzXRBL5wrdV0vwNxlTCK9NCuLqAzQYARqGcvFwiJA6A1ERuh+dgeA4Dxm3JBYictIes+SqUQ==", - "dependencies": { - "bidi-js": "^1.0.3", - "css-tree": "^2.3.1", - "is-potential-custom-element-name": "^1.0.1" - } - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.19.11", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", @@ -517,14 +507,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, - "node_modules/bidi-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", - "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", - "dependencies": { - "require-from-string": "^2.0.2" - } - }, "node_modules/cacheable-lookup": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", @@ -572,18 +554,6 @@ "node": ">= 0.8" } }, - "node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "dependencies": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, "node_modules/cssstyle": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz", @@ -928,11 +898,10 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, "node_modules/jsdom": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.2.0.tgz", - "integrity": "sha512-L88oL7D/8ufIES+Zjz7v0aes+oBMh2Xnh3ygWvL0OaICOomKEPKuPnIfBJekiXr+BHbbMjrWn/xqrDQuxFTeyA==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.0.0.tgz", + "integrity": "sha512-UDS2NayCvmXSXVP6mpTj+73JnNQadZlr9N68189xib2tx5Mls7swlTNao26IoHv46BZJFvXygyRtyXd1feAk1A==", "dependencies": { - "@asamuzakjp/dom-selector": "^2.0.1", "cssstyle": "^4.0.1", "data-urls": "^5.0.0", "decimal.js": "^10.4.3", @@ -941,6 +910,7 @@ "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.7", "parse5": "^7.1.2", "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", @@ -1061,11 +1031,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1131,6 +1096,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/nwsapi": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", + "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" + }, "node_modules/p-cancelable": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-4.0.1.tgz", @@ -1179,14 +1149,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -1263,14 +1225,6 @@ "node": ">=v12.22.7" } }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", diff --git a/package.json b/package.json index f312c4de..0a1b7255 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "dotenv": "^16.3.2", "fast-csv": "^5.0.0", "got": "^14.0.0", - "jsdom": "^23.2.0", + "jsdom": "^24.0.0", "rss-parser": "^3.13.0" } } From 6c90ca53a907b40e9e5b3b3448d37efb1dd64a24 Mon Sep 17 00:00:00 2001 From: bamboo Date: Tue, 30 Jan 2024 23:01:28 +0800 Subject: [PATCH 24/62] :arrow_up: Deps: upgrade dotenv & got --- package-lock.json | 16 ++++++++-------- package.json | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2098527a..6c152021 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,9 +11,9 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.3.2", + "dotenv": "^16.4.1", "fast-csv": "^5.0.0", - "got": "^14.0.0", + "got": "^14.1.0", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" }, @@ -676,9 +676,9 @@ } }, "node_modules/dotenv": { - "version": "16.3.2", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.2.tgz", - "integrity": "sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", + "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==", "engines": { "node": ">=12" }, @@ -806,9 +806,9 @@ } }, "node_modules/got": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/got/-/got-14.0.0.tgz", - "integrity": "sha512-X01vTgaX9SwaMq5DfImvS+3GMQFFs5HtrrlS9CuzUSzkxAf/tWGEyynuI+Qy7BjciMczZGjyVSmawYbP4eYhYA==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-14.1.0.tgz", + "integrity": "sha512-jGmSBfxa7jOGg464azcsf/cUlJBZldU8edFpiVebIJrVBE4vqVx0t3Z2f1kz1WrcMvLgQREoC/l2ttDmSHwyRg==", "dependencies": { "@sindresorhus/is": "^6.1.0", "@szmarczak/http-timer": "^5.0.1", diff --git a/package.json b/package.json index 0a1b7255..cd911bf8 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,9 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.3.2", + "dotenv": "^16.4.1", "fast-csv": "^5.0.0", - "got": "^14.0.0", + "got": "^14.1.0", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" } From ceaca051e12820583a21fda3a94b0c3c997ae7c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 22:29:14 +0000 Subject: [PATCH 25/62] build(deps): bump got from 14.1.0 to 14.2.0 Bumps [got](https://github.com/sindresorhus/got) from 14.1.0 to 14.2.0. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.1.0...v14.2.0) --- updated-dependencies: - dependency-name: got dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c152021..6d4d7b52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "dayjs": "^1.11.10", "dotenv": "^16.4.1", "fast-csv": "^5.0.0", - "got": "^14.1.0", + "got": "^14.2.0", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" }, @@ -806,9 +806,9 @@ } }, "node_modules/got": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-14.1.0.tgz", - "integrity": "sha512-jGmSBfxa7jOGg464azcsf/cUlJBZldU8edFpiVebIJrVBE4vqVx0t3Z2f1kz1WrcMvLgQREoC/l2ttDmSHwyRg==", + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/got/-/got-14.2.0.tgz", + "integrity": "sha512-dBq2KkHcQl3AwPoIWsLsQScCPpUgRulz1qZVthjPYKYOPmYfBnekR3vxecjZbm91Vc3JUGnV9mqFX7B+Fe2quw==", "dependencies": { "@sindresorhus/is": "^6.1.0", "@szmarczak/http-timer": "^5.0.1", diff --git a/package.json b/package.json index cd911bf8..a2db71fd 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "dayjs": "^1.11.10", "dotenv": "^16.4.1", "fast-csv": "^5.0.0", - "got": "^14.1.0", + "got": "^14.2.0", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" } From a8b4aae5fa3fe2df82c89204cc9022bf5ce3d323 Mon Sep 17 00:00:00 2001 From: bamboo Date: Thu, 8 Feb 2024 01:47:19 +0800 Subject: [PATCH 26/62] :construction_worker: Fix: update action --- .github/workflows/sync-rss.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-rss.js.yml b/.github/workflows/sync-rss.js.yml index 3625ed3c..7ed44d18 100644 --- a/.github/workflows/sync-rss.js.yml +++ b/.github/workflows/sync-rss.js.yml @@ -31,9 +31,9 @@ jobs: NEODB_API_TOKEN: ${{ secrets.NEODB_API_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm ci From 29d5bc50fa414919ac5e5619d726a69a80541492 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:52:38 +0000 Subject: [PATCH 27/62] build(deps): bump dotenv from 16.4.1 to 16.4.3 Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.1 to 16.4.3. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.4.1...v16.4.3) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6d4d7b52..9ab83df8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.4.1", + "dotenv": "^16.4.3", "fast-csv": "^5.0.0", "got": "^14.2.0", "jsdom": "^24.0.0", @@ -676,14 +676,14 @@ } }, "node_modules/dotenv": { - "version": "16.4.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", - "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==", + "version": "16.4.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.3.tgz", + "integrity": "sha512-II98GFrje5psQTSve0E7bnwMFybNLqT8Vu8JIFWRjsE3khyNUm/loZupuy5DVzG2IXf/ysxvrixYOQnM6mjD3A==", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" } }, "node_modules/entities": { diff --git a/package.json b/package.json index a2db71fd..f9a5babc 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.4.1", + "dotenv": "^16.4.3", "fast-csv": "^5.0.0", "got": "^14.2.0", "jsdom": "^24.0.0", From 845b6a785967936a1d330f3b1ee5cf241aebb8b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:52:44 +0000 Subject: [PATCH 28/62] build(deps-dev): bump tsx from 4.7.0 to 4.7.1 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.7.0 to 4.7.1. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/develop/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.7.0...v4.7.1) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9ab83df8..29b77721 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.7.0" + "tsx": "^4.7.1" }, "engines": { "node": ">=20" @@ -1250,9 +1250,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.0.tgz", - "integrity": "sha512-I+t79RYPlEYlHn9a+KzwrvEwhJg35h/1zHsLC2JXvhC2mdynMv6Zxzvhv5EMV6VF5qJlLlkSnMVvdZV3PSIGcg==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.1.tgz", + "integrity": "sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==", "dev": true, "dependencies": { "esbuild": "~0.19.10", diff --git a/package.json b/package.json index f9a5babc..7c821028 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.7.0" + "tsx": "^4.7.1" }, "dependencies": { "@notionhq/client": "^2.2.14", From 66bb6ff2f24bbc8c41eb26d21d8725b0fc890a05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 22:22:04 +0000 Subject: [PATCH 29/62] build(deps): bump dotenv from 16.4.3 to 16.4.4 Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.3 to 16.4.4. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.4.3...v16.4.4) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 29b77721..dfc34962 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.4.3", + "dotenv": "^16.4.4", "fast-csv": "^5.0.0", "got": "^14.2.0", "jsdom": "^24.0.0", @@ -676,9 +676,9 @@ } }, "node_modules/dotenv": { - "version": "16.4.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.3.tgz", - "integrity": "sha512-II98GFrje5psQTSve0E7bnwMFybNLqT8Vu8JIFWRjsE3khyNUm/loZupuy5DVzG2IXf/ysxvrixYOQnM6mjD3A==", + "version": "16.4.4", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.4.tgz", + "integrity": "sha512-XvPXc8XAQThSjAbY6cQ/9PcBXmFoWuw1sQ3b8HqUCR6ziGXjkTi//kB9SWa2UwqlgdAIuRqAa/9hVljzPehbYg==", "engines": { "node": ">=12" }, diff --git a/package.json b/package.json index 7c821028..58cfafaf 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.4.3", + "dotenv": "^16.4.4", "fast-csv": "^5.0.0", "got": "^14.2.0", "jsdom": "^24.0.0", From 267321d338ed476fd90422482d4da26421818b57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:25:41 +0000 Subject: [PATCH 30/62] build(deps): bump fast-csv from 5.0.0 to 5.0.1 Bumps [fast-csv](https://github.com/C2FO/fast-csv/tree/HEAD/packages/fast-csv) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/C2FO/fast-csv/releases) - [Changelog](https://github.com/C2FO/fast-csv/blob/main/packages/fast-csv/CHANGELOG.md) - [Commits](https://github.com/C2FO/fast-csv/commits/v5.0.1/packages/fast-csv) --- updated-dependencies: - dependency-name: fast-csv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index dfc34962..4aedd22e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", "dotenv": "^16.4.4", - "fast-csv": "^5.0.0", + "fast-csv": "^5.0.1", "got": "^14.2.0", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" @@ -736,9 +736,9 @@ } }, "node_modules/fast-csv": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.0.tgz", - "integrity": "sha512-CEwsCv2W+0AvlZRfS4rpagcP2gpMbMjbkFOn9SZ5T6F8gvl040fwPf7/8Rx9/Pxz3NQWbHYOsRFhK/MH/xjaaQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-5.0.1.tgz", + "integrity": "sha512-Q43zC4NdQD5MAWOVQOF8KA+D6ddvTJjX2ib8zqysm74jZhtk6+dc8C75/OqRV6Y9CLc4kgvbC3PLG8YL4YZfgw==", "dependencies": { "@fast-csv/format": "5.0.0", "@fast-csv/parse": "5.0.0" diff --git a/package.json b/package.json index 58cfafaf..478923d7 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", "dotenv": "^16.4.4", - "fast-csv": "^5.0.0", + "fast-csv": "^5.0.1", "got": "^14.2.0", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" From 918341cab18c9cb8298799d4ad2117364164d674 Mon Sep 17 00:00:00 2001 From: bamboo Date: Sat, 24 Feb 2024 15:37:14 +0800 Subject: [PATCH 31/62] :bug: Bugfix: fix book title wrong --- src/handle-douban.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/handle-douban.ts b/src/handle-douban.ts index 030e26c8..da4fbb2d 100644 --- a/src/handle-douban.ts +++ b/src/handle-douban.ts @@ -88,7 +88,7 @@ function buildBookItem(doc: Document) { const cover = img?.title !== ImgDefaultTitle.Cover && img?.src.length <= 100 ? img?.src.replace(/\.webp$/, '.jpg') : ''; const info = [...doc.querySelectorAll(InfoSelector)]; - let writer = '', publisher = '', bookTitle = '', publishDate = '', isbn = 0; + let writer = '', publisher = '', bookTitle = title, publishDate = '', isbn = 0; info.forEach(i => { const text = i.textContent?.trim() || ''; let nextText = i.nextSibling?.textContent?.trim() || ''; @@ -121,7 +121,6 @@ function buildBookItem(doc: Document) { }); return { - [DB_PROPERTIES.BOOK_TITLE]: title, [DB_PROPERTIES.NAME]: title, [DB_PROPERTIES.COVER]: cover, // optional [DB_PROPERTIES.WRITER]: writer, // optional From 2f6432e5fc199e1ddb6666303e24e218f586e5c0 Mon Sep 17 00:00:00 2001 From: bamboo Date: Sat, 24 Feb 2024 15:56:42 +0800 Subject: [PATCH 32/62] :bug: Bugfix: fix book publisher extract wrong --- src/handle-douban.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/handle-douban.ts b/src/handle-douban.ts index da4fbb2d..9a0018a9 100644 --- a/src/handle-douban.ts +++ b/src/handle-douban.ts @@ -91,7 +91,8 @@ function buildBookItem(doc: Document) { let writer = '', publisher = '', bookTitle = title, publishDate = '', isbn = 0; info.forEach(i => { const text = i.textContent?.trim() || ''; - let nextText = i.nextSibling?.textContent?.trim() || ''; + // nextSibling 也可能是个空的 #text node + let nextText = i.nextSibling?.textContent?.trim() || i.nextElementSibling?.textContent?.trim() || ''; if (text.startsWith('作者')) { writer = i.parentElement?.id === 'info' @@ -101,7 +102,8 @@ function buildBookItem(doc: Document) { : i.parentElement?.textContent?.trim().replace('作者:', '').trim() || ''; } else if (text.startsWith('出版社')) { - publisher = i.nextElementSibling?.tagName === 'BR' + // nextSibling 也可能是个空的 #text node,则需要跳过 + publisher = (i.nextElementSibling?.tagName === 'BR' || !i.nextSibling?.textContent?.trim()) ? nextText // 出版社可能有单独链接 上海三联书店 : i.parentElement?.textContent?.trim() || ''; From 9ce08c664a539fc8f510c6c7a4fa75f99dcb09a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:05:45 +0000 Subject: [PATCH 33/62] build(deps): bump dotenv from 16.4.4 to 16.4.5 Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.4 to 16.4.5. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.4.4...v16.4.5) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4aedd22e..e3be2b56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.4.4", + "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.2.0", "jsdom": "^24.0.0", @@ -676,9 +676,9 @@ } }, "node_modules/dotenv": { - "version": "16.4.4", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.4.tgz", - "integrity": "sha512-XvPXc8XAQThSjAbY6cQ/9PcBXmFoWuw1sQ3b8HqUCR6ziGXjkTi//kB9SWa2UwqlgdAIuRqAa/9hVljzPehbYg==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { "node": ">=12" }, diff --git a/package.json b/package.json index 478923d7..b582c1b9 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "@notionhq/client": "^2.2.14", "dayjs": "^1.11.10", - "dotenv": "^16.4.4", + "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.2.0", "jsdom": "^24.0.0", From 1378ffbe98ee81bd091ff84ca0552b1beb55773a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 22:03:20 +0000 Subject: [PATCH 34/62] build(deps): bump got from 14.2.0 to 14.2.1 Bumps [got](https://github.com/sindresorhus/got) from 14.2.0 to 14.2.1. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.2.0...v14.2.1) --- updated-dependencies: - dependency-name: got dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e3be2b56..026f3c79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "dayjs": "^1.11.10", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", - "got": "^14.2.0", + "got": "^14.2.1", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" }, @@ -806,9 +806,9 @@ } }, "node_modules/got": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/got/-/got-14.2.0.tgz", - "integrity": "sha512-dBq2KkHcQl3AwPoIWsLsQScCPpUgRulz1qZVthjPYKYOPmYfBnekR3vxecjZbm91Vc3JUGnV9mqFX7B+Fe2quw==", + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/got/-/got-14.2.1.tgz", + "integrity": "sha512-KOaPMremmsvx6l9BLC04LYE6ZFW4x7e4HkTe3LwBmtuYYQwpeS4XKqzhubTIkaQ1Nr+eXxeori0zuwupXMovBQ==", "dependencies": { "@sindresorhus/is": "^6.1.0", "@szmarczak/http-timer": "^5.0.1", diff --git a/package.json b/package.json index b582c1b9..a96cdbf7 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "dayjs": "^1.11.10", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", - "got": "^14.2.0", + "got": "^14.2.1", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" } From b027f2decdbd92d892c2c63b6d09a87ec42121c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:27:47 +0000 Subject: [PATCH 35/62] build(deps-dev): bump tsx from 4.7.1 to 4.7.2 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.7.1 to 4.7.2. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/develop/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.7.1...v4.7.2) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 026f3c79..4137956e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.7.1" + "tsx": "^4.7.2" }, "engines": { "node": ">=20" @@ -1250,9 +1250,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.1.tgz", - "integrity": "sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", + "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", "dev": true, "dependencies": { "esbuild": "~0.19.10", diff --git a/package.json b/package.json index a96cdbf7..e21fb46f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.7.1" + "tsx": "^4.7.2" }, "dependencies": { "@notionhq/client": "^2.2.14", From 1bb3c2bf092205482b4f9eb4e1e915eac687b983 Mon Sep 17 00:00:00 2001 From: bamboo Date: Tue, 9 Apr 2024 15:54:05 +0800 Subject: [PATCH 36/62] :sparkles: Feat: use consola to make pretty log. --- package-lock.json | 9 +++++++++ package.json | 1 + src/handle-douban.ts | 3 ++- src/handle-neodb.ts | 11 ++++++----- src/handle-notion.ts | 25 +++++++++++++------------ src/handle-rss.ts | 3 ++- src/index.ts | 3 ++- 7 files changed, 35 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4137956e..4d47faf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "MIT", "dependencies": { "@notionhq/client": "^2.2.14", + "consola": "^3.2.3", "dayjs": "^1.11.10", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", @@ -554,6 +555,14 @@ "node": ">= 0.8" } }, + "node_modules/consola": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", + "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/cssstyle": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz", diff --git a/package.json b/package.json index e21fb46f..6b48d0fe 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ }, "dependencies": { "@notionhq/client": "^2.2.14", + "consola": "^3.2.3", "dayjs": "^1.11.10", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", diff --git a/src/handle-douban.ts b/src/handle-douban.ts index 9a0018a9..27c0c974 100644 --- a/src/handle-douban.ts +++ b/src/handle-douban.ts @@ -1,6 +1,7 @@ import got from 'got'; import { JSDOM } from 'jsdom'; import dayjs from 'dayjs'; +import { consola } from 'consola'; import { ItemCategory } from './types'; import DB_PROPERTIES from '../cols.json'; @@ -14,7 +15,7 @@ const InfoSelector = '#info span.pl'; export default async function scrapyDouban(link: string, category: ItemCategory): Promise<{ [key: string]: string | string[] | number | null | undefined; }> { - console.log(`Scraping ${category} item with link: ${link}`); + consola.start(`Scraping ${category} item with link: ${link}`); const response = await got(link); const dom = new JSDOM(response.body); const doc = dom.window.document; diff --git a/src/handle-neodb.ts b/src/handle-neodb.ts index 4bdbdd4a..808d9315 100644 --- a/src/handle-neodb.ts +++ b/src/handle-neodb.ts @@ -1,5 +1,6 @@ import dotenv from 'dotenv'; import got from 'got'; +import { consola } from 'consola'; import type { FeedItem, ItemCategory } from "./types"; import { sleep } from './utils'; @@ -36,12 +37,12 @@ export default async function handleNeodb(feeds: FeedItem[]): Promise { return; } - console.log('Going to sync to NeoDB...'); + consola.start('Going to sync to NeoDB...'); // 同步标记到 neodb for (const item of feeds) { await insertToNeodb(item); } - console.log('NeoDB synced ✨'); + consola.success('NeoDB synced ✨'); } /** @@ -72,7 +73,7 @@ async function insertToNeodb(item: FeedItem): Promise { accept: 'application/json', }, } - ).json(); + ).json() as any; if (mark.shelf_type !== item.status) { // 标记状态不一样,所以更新标记 await markItem(neodbItem, item); @@ -98,7 +99,7 @@ async function insertToNeodb(item: FeedItem): Promise { * @return {Promise} a Promise that resolves when the item is successfully marked */ async function markItem(neodbItem: NeodbItem, item: FeedItem): Promise { - console.log('Going to mark on NeoDB: ', `${neodbItem.title}[${item.link}]`); + consola.info('Going to mark on NeoDB: ', `${neodbItem.title}[${item.link}]`); try { await got.post(`https://neodb.social/api/me/shelf/item/${neodbItem.uuid}`, { headers: { @@ -115,7 +116,7 @@ async function markItem(neodbItem: NeodbItem, item: FeedItem): Promise { }, }); } catch (error) { - console.error( + consola.error( 'Failed to mark item: ', neodbItem?.title, ' with error: ', error diff --git a/src/handle-notion.ts b/src/handle-notion.ts index abefcada..47dd9fa1 100644 --- a/src/handle-notion.ts +++ b/src/handle-notion.ts @@ -1,3 +1,4 @@ +import { consola } from 'consola'; import dayjs from 'dayjs'; import dotenv from 'dotenv'; import { Client } from '@notionhq/client'; @@ -54,15 +55,15 @@ export default async function handleNotion(feeds: FeedItem[]): Promise { AllFailedItems.push(...failed); } } catch (error) { - console.error(`Failed to handle ${category} feeds. `, error); + consola.error(`Failed to handle ${category} feeds. `, error); process.exit(1); } } if (AllFailedItems.length) { - console.log('Failed to handle the following feeds to insert into Notion:'); + consola.warn('Failed to handle the following feeds to insert into Notion:'); for (const item of AllFailedItems) { - console.log(`${item.title}: ${item.link}`); + consola.warn(`${item.title}: ${item.link}`); } process.exit(1); } @@ -77,17 +78,17 @@ export default async function handleNotion(feeds: FeedItem[]): Promise { */ async function syncNotionDB(categorizedFeeds: FeedItem[], category: ItemCategory): Promise { if (categorizedFeeds.length === 0) { - console.log(`No new ${category} feeds.`); + consola.info(`No new ${category} feeds.`); return; } const dbID = getDBID(category); if (!dbID) { - console.log(`No notion database id for ${category}`); + consola.warn(`No notion database id for ${category}`); return; } - console.log(`Handling ${category} feeds...`); + consola.start(`Handling ${category} feeds...`); const queryItems = await notion.databases.query({ database_id: dbID, @@ -100,7 +101,7 @@ async function syncNotionDB(categorizedFeeds: FeedItem[], category: ItemCategory })), }, }).catch((error) => { - console.error(`Failed to query ${category} database to check already inserted items. `, error); + consola.error(`Failed to query ${category} database to check already inserted items. `, error); process.exit(1); }); @@ -115,7 +116,7 @@ async function syncNotionDB(categorizedFeeds: FeedItem[], category: ItemCategory return !alreadyInsertedItems.has(item.link); }); - console.log(`There are total ${newFeeds.length} new ${category} item(s) need to insert.`); + consola.info(`There are total ${newFeeds.length} new ${category} item(s) need to insert.`); const failedItems: FailedItem[] = []; @@ -136,16 +137,16 @@ async function syncNotionDB(categorizedFeeds: FeedItem[], category: ItemCategory await sleep(1000); } catch (error) { - console.error(error); + consola.error(error); continue; } } if (failedItems.length) { - console.log(`Failed to insert ${failedItems.length} items into ${category} Notion database.`); + consola.warn(`Failed to insert ${failedItems.length} items into ${category} Notion database.`); } - console.log(`${category} feeds done.`); - console.log('===================='); + consola.success(`${category} feeds done.`); + consola.log('===================='); return failedItems; } diff --git a/src/handle-rss.ts b/src/handle-rss.ts index b0faf591..afdc8d31 100644 --- a/src/handle-rss.ts +++ b/src/handle-rss.ts @@ -1,6 +1,7 @@ import Parser from 'rss-parser'; import dotenv from 'dotenv'; import { JSDOM } from 'jsdom'; +import { consola } from 'consola'; import { ALL_STATUS, RATING_TEXT, @@ -33,7 +34,7 @@ export async function fetchRSSFeeds(): Promise { ); return feeds.items; } catch (error) { - console.error('Failed to parse RSS url: ', error); + consola.error('Failed to parse RSS url: ', error); process.exit(1); } } diff --git a/src/index.ts b/src/index.ts index 6c3c408f..32c089eb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import { consola } from 'consola'; import { fetchRSSFeeds, handleRSSFeeds } from './handle-rss'; import handleNotion from './handle-notion'; import handleNeodb from './handle-neodb'; @@ -6,7 +7,7 @@ import { ItemStatus } from './types'; async function main(): Promise { const feeds = await fetchRSSFeeds(); if (feeds.length === 0) { - console.log('No new items.'); + consola.info('No new items.'); return; } From 6e1ad3955d07c0132a1a38664bde145da4486ee5 Mon Sep 17 00:00:00 2001 From: bamboo Date: Tue, 9 Apr 2024 15:57:11 +0800 Subject: [PATCH 37/62] :sparkles: Feat: use consola complete. --- src/handle-notion.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/handle-notion.ts b/src/handle-notion.ts index 47dd9fa1..cac0a760 100644 --- a/src/handle-notion.ts +++ b/src/handle-notion.ts @@ -143,7 +143,7 @@ async function syncNotionDB(categorizedFeeds: FeedItem[], category: ItemCategory } if (failedItems.length) { - consola.warn(`Failed to insert ${failedItems.length} items into ${category} Notion database.`); + consola.error(`Failed to insert ${failedItems.length} items into ${category} Notion database.`); } consola.success(`${category} feeds done.`); consola.log('===================='); @@ -160,7 +160,7 @@ async function syncNotionDB(categorizedFeeds: FeedItem[], category: ItemCategory async function addItemToNotion(itemData: { [key: string]: string | string[] | number | null | undefined; }, category: ItemCategory): Promise { - console.log( + consola.start( 'Going to insert ', itemData[DB_PROPERTIES.RATING_DATE], itemData[DB_PROPERTIES.NAME] @@ -218,7 +218,7 @@ async function addItemToNotion(itemData: { const response = await notion.pages.create(postData); if (response && response.id) { - console.log( + consola.success( itemData[DB_PROPERTIES.NAME] + `[${itemData[DB_PROPERTIES.ITEM_LINK]}]` + ' page inserted into Notion database.' @@ -226,7 +226,7 @@ async function addItemToNotion(itemData: { } return true; } catch (error) { - console.warn( + consola.error( 'Failed to create ' + itemData[DB_PROPERTIES.NAME] + `(${itemData[DB_PROPERTIES.ITEM_LINK]})` + From d9e362195f699e4f3251311ef2c43da323fcca9b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:04:39 +0000 Subject: [PATCH 38/62] build(deps): bump @notionhq/client from 2.2.14 to 2.2.15 Bumps [@notionhq/client](https://github.com/makenotion/notion-sdk-js) from 2.2.14 to 2.2.15. - [Release notes](https://github.com/makenotion/notion-sdk-js/releases) - [Commits](https://github.com/makenotion/notion-sdk-js/compare/v2.2.14...v2.2.15) --- updated-dependencies: - dependency-name: "@notionhq/client" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4d47faf4..859ee9cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@notionhq/client": "^2.2.14", + "@notionhq/client": "^2.2.15", "consola": "^3.2.3", "dayjs": "^1.11.10", "dotenv": "^16.4.5", @@ -420,9 +420,9 @@ } }, "node_modules/@notionhq/client": { - "version": "2.2.14", - "resolved": "https://registry.npmjs.org/@notionhq/client/-/client-2.2.14.tgz", - "integrity": "sha512-oqUefZtCiJPCX+74A1Os9OVTef3fSnVWe2eVQtU1HJSD+nsfxfhwvDKnzJTh2Tw1ZHKLxpieHB/nzGdY+Uo12A==", + "version": "2.2.15", + "resolved": "https://registry.npmjs.org/@notionhq/client/-/client-2.2.15.tgz", + "integrity": "sha512-XhdSY/4B1D34tSco/GION+23GMjaS9S2zszcqYkMHo8RcWInymF6L1x+Gk7EmHdrSxNFva2WM8orhC4BwQCwgw==", "dependencies": { "@types/node-fetch": "^2.5.10", "node-fetch": "^2.6.1" diff --git a/package.json b/package.json index 6b48d0fe..d066fd11 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "tsx": "^4.7.2" }, "dependencies": { - "@notionhq/client": "^2.2.14", + "@notionhq/client": "^2.2.15", "consola": "^3.2.3", "dayjs": "^1.11.10", "dotenv": "^16.4.5", From 621e65127e01de6b308740e776d3426abf4b7f0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:37:13 +0000 Subject: [PATCH 39/62] build(deps-dev): bump tsx from 4.7.2 to 4.7.3 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.7.2 to 4.7.3. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.7.2...v4.7.3) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 859ee9cb..0c272677 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.7.2" + "tsx": "^4.7.3" }, "engines": { "node": ">=20" @@ -1259,9 +1259,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", - "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.3.tgz", + "integrity": "sha512-+fQnMqIp/jxZEXLcj6WzYy9FhcS5/Dfk8y4AtzJ6ejKcKqmfTF8Gso/jtrzDggCF2zTU20gJa6n8XqPYwDAUYQ==", "dev": true, "dependencies": { "esbuild": "~0.19.10", diff --git a/package.json b/package.json index d066fd11..93b86615 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.7.2" + "tsx": "^4.7.3" }, "dependencies": { "@notionhq/client": "^2.2.15", From bd0af6754394be18701a0d625ed85b097baefbd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:37:18 +0000 Subject: [PATCH 40/62] build(deps): bump dayjs from 1.11.10 to 1.11.11 Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.10 to 1.11.11. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/dev/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.11.10...v1.11.11) --- updated-dependencies: - dependency-name: dayjs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c272677..a9f9c371 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@notionhq/client": "^2.2.15", "consola": "^3.2.3", - "dayjs": "^1.11.10", + "dayjs": "^1.11.11", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.2.1", @@ -618,9 +618,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + "version": "1.11.11", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", + "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, "node_modules/debug": { "version": "4.3.4", diff --git a/package.json b/package.json index 93b86615..a0949675 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "@notionhq/client": "^2.2.15", "consola": "^3.2.3", - "dayjs": "^1.11.10", + "dayjs": "^1.11.11", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.2.1", From 3b931c3d09b103e3a657fffa5dbbd7f6545fd2d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 22:19:47 +0000 Subject: [PATCH 41/62] build(deps-dev): bump tsx from 4.7.3 to 4.9.3 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.7.3 to 4.9.3. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.7.3...v4.9.3) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 208 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9f9c371..a989a200 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,16 +20,16 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.7.3" + "tsx": "^4.9.3" }, "engines": { "node": ">=20" } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", - "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", "cpu": [ "ppc64" ], @@ -43,9 +43,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", - "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "cpu": [ "arm" ], @@ -59,9 +59,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", - "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "cpu": [ "arm64" ], @@ -75,9 +75,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", - "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "cpu": [ "x64" ], @@ -91,9 +91,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", - "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "cpu": [ "arm64" ], @@ -107,9 +107,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "cpu": [ "x64" ], @@ -123,9 +123,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", - "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "cpu": [ "arm64" ], @@ -139,9 +139,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", - "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "cpu": [ "x64" ], @@ -155,9 +155,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", - "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "cpu": [ "arm" ], @@ -171,9 +171,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", - "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "cpu": [ "arm64" ], @@ -187,9 +187,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", - "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "cpu": [ "ia32" ], @@ -203,9 +203,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", - "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "cpu": [ "loong64" ], @@ -219,9 +219,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", - "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "cpu": [ "mips64el" ], @@ -235,9 +235,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", - "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "cpu": [ "ppc64" ], @@ -251,9 +251,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", - "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "cpu": [ "riscv64" ], @@ -267,9 +267,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", - "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "cpu": [ "s390x" ], @@ -283,9 +283,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", - "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "cpu": [ "x64" ], @@ -299,9 +299,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", - "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "cpu": [ "x64" ], @@ -315,9 +315,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", - "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "cpu": [ "x64" ], @@ -331,9 +331,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", - "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "cpu": [ "x64" ], @@ -347,9 +347,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", - "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "cpu": [ "arm64" ], @@ -363,9 +363,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", - "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "cpu": [ "ia32" ], @@ -379,9 +379,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", - "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "cpu": [ "x64" ], @@ -707,9 +707,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, "bin": { @@ -719,29 +719,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "node_modules/fast-csv": { @@ -803,9 +803,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.4.tgz", + "integrity": "sha512-ofbkKj+0pjXjhejr007J/fLf+sW+8H7K5GCm+msC8q3IpvgjobpyPqSRFemNyIMxklC0zeJpi7VDFna19FacvQ==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -1259,13 +1259,13 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.3.tgz", - "integrity": "sha512-+fQnMqIp/jxZEXLcj6WzYy9FhcS5/Dfk8y4AtzJ6ejKcKqmfTF8Gso/jtrzDggCF2zTU20gJa6n8XqPYwDAUYQ==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.9.3.tgz", + "integrity": "sha512-czVbetlILiyJZI5zGlj2kw9vFiSeyra9liPD4nG+Thh4pKTi0AmMEQ8zdV/L2xbIVKrIqif4sUNrsMAOksx9Zg==", "dev": true, "dependencies": { - "esbuild": "~0.19.10", - "get-tsconfig": "^4.7.2" + "esbuild": "~0.20.2", + "get-tsconfig": "^4.7.3" }, "bin": { "tsx": "dist/cli.mjs" diff --git a/package.json b/package.json index a0949675..1157381c 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.7.3" + "tsx": "^4.9.3" }, "dependencies": { "@notionhq/client": "^2.2.15", From 6011e5eff3c91834ae4884b1d5c446ff32c25b32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 22:02:41 +0000 Subject: [PATCH 42/62] build(deps-dev): bump tsx from 4.9.3 to 4.10.2 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.9.3 to 4.10.2. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.9.3...v4.10.2) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index a989a200..1b7ae30a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.9.3" + "tsx": "^4.10.2" }, "engines": { "node": ">=20" @@ -1259,9 +1259,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.9.3.tgz", - "integrity": "sha512-czVbetlILiyJZI5zGlj2kw9vFiSeyra9liPD4nG+Thh4pKTi0AmMEQ8zdV/L2xbIVKrIqif4sUNrsMAOksx9Zg==", + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.10.2.tgz", + "integrity": "sha512-gOfACgv1ElsIjvt7Fp0rMJKGnMGjox0JfGOfX3kmZCV/yZumaNqtHGKBXt1KgaYS9KjDOmqGeI8gHk/W7kWVZg==", "dev": true, "dependencies": { "esbuild": "~0.20.2", diff --git a/package.json b/package.json index 1157381c..678dede4 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.9.3" + "tsx": "^4.10.2" }, "dependencies": { "@notionhq/client": "^2.2.15", From be5bfe338140c9d2c2030536d04383a971d22e14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 22:31:29 +0000 Subject: [PATCH 43/62] --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b7ae30a..90f59c4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.10.2" + "tsx": "^4.10.5" }, "engines": { "node": ">=20" @@ -803,9 +803,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.4.tgz", - "integrity": "sha512-ofbkKj+0pjXjhejr007J/fLf+sW+8H7K5GCm+msC8q3IpvgjobpyPqSRFemNyIMxklC0zeJpi7VDFna19FacvQ==", + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", + "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -1259,13 +1259,13 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.10.2.tgz", - "integrity": "sha512-gOfACgv1ElsIjvt7Fp0rMJKGnMGjox0JfGOfX3kmZCV/yZumaNqtHGKBXt1KgaYS9KjDOmqGeI8gHk/W7kWVZg==", + "version": "4.10.5", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.10.5.tgz", + "integrity": "sha512-twDSbf7Gtea4I2copqovUiNTEDrT8XNFXsuHpfGbdpW/z9ZW4fTghzzhAG0WfrCuJmJiOEY1nLIjq4u3oujRWQ==", "dev": true, "dependencies": { "esbuild": "~0.20.2", - "get-tsconfig": "^4.7.3" + "get-tsconfig": "^4.7.5" }, "bin": { "tsx": "dist/cli.mjs" diff --git a/package.json b/package.json index 678dede4..cfa21b73 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.10.2" + "tsx": "^4.10.5" }, "dependencies": { "@notionhq/client": "^2.2.15", From d5520a759b3f43a62eeb4eaa621764ee86b473d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 22:31:22 +0000 Subject: [PATCH 44/62] --- updated-dependencies: - dependency-name: got dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 68 ++++++++++++++++++++++++++++++----------------- package.json | 2 +- 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90f59c4c..51c2c478 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "dayjs": "^1.11.11", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", - "got": "^14.2.1", + "got": "^14.3.0", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" }, @@ -431,10 +431,15 @@ "node": ">=12" } }, + "node_modules/@sec-ant/readable-stream": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", + "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==" + }, "node_modules/@sindresorhus/is": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.1.0.tgz", - "integrity": "sha512-BuvU07zq3tQ/2SIgBsEuxKYDyDjC0n7Zir52bpHy2xnBbW81+po43aLFPLbeV3HRAheFbGud1qgcqSYfhtHMAg==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.3.1.tgz", + "integrity": "sha512-FX4MfcifwJyFOI2lPoX7PQxCqx8BG1HCho7WdiXwpEQx1Ycij0JxkfYtGK7yqNScrZGSlt6RE6sw8QYoH7eKnQ==", "engines": { "node": ">=16" }, @@ -517,28 +522,32 @@ } }, "node_modules/cacheable-request": { - "version": "10.2.14", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz", - "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-12.0.1.tgz", + "integrity": "sha512-Yo9wGIQUaAfIbk+qY0X4cDQgCosecfBe3V9NSyeY4qPC2SAkbCS4Xj79VP8WOzitpJUZKc/wsRCYF5ariDIwkg==", "dependencies": { - "@types/http-cache-semantics": "^4.0.2", - "get-stream": "^6.0.1", + "@types/http-cache-semantics": "^4.0.4", + "get-stream": "^9.0.1", "http-cache-semantics": "^4.1.1", - "keyv": "^4.5.3", + "keyv": "^4.5.4", "mimic-response": "^4.0.0", - "normalize-url": "^8.0.0", + "normalize-url": "^8.0.1", "responselike": "^3.0.0" }, "engines": { - "node": ">=14.16" + "node": ">=18" } }, "node_modules/cacheable-request/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", + "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", + "dependencies": { + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" + }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -815,14 +824,14 @@ } }, "node_modules/got": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/got/-/got-14.2.1.tgz", - "integrity": "sha512-KOaPMremmsvx6l9BLC04LYE6ZFW4x7e4HkTe3LwBmtuYYQwpeS4XKqzhubTIkaQ1Nr+eXxeori0zuwupXMovBQ==", + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/got/-/got-14.3.0.tgz", + "integrity": "sha512-vZkrXdq5BtPWTXqvjXSpl6zky3zpHaOVfSug/RfFHu3YrtSsvYzopVMDqrh2do77WnGoCSSRCHW25zXOSAQ9zw==", "dependencies": { - "@sindresorhus/is": "^6.1.0", + "@sindresorhus/is": "^6.3.1", "@szmarczak/http-timer": "^5.0.1", "cacheable-lookup": "^7.0.0", - "cacheable-request": "^10.2.14", + "cacheable-request": "^12.0.1", "decompress-response": "^6.0.0", "form-data-encoder": "^4.0.2", "get-stream": "^8.0.1", @@ -906,6 +915,17 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" }, + "node_modules/is-stream": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jsdom": { "version": "24.0.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.0.0.tgz", @@ -1095,9 +1115,9 @@ } }, "node_modules/normalize-url": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz", - "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", + "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", "engines": { "node": ">=14.16" }, diff --git a/package.json b/package.json index cfa21b73..b07e81e1 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "dayjs": "^1.11.11", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", - "got": "^14.2.1", + "got": "^14.3.0", "jsdom": "^24.0.0", "rss-parser": "^3.13.0" } From 89a4c7a398941ac1d0ed4b2ef7e14ccf80cd7a33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 22:59:26 +0000 Subject: [PATCH 45/62] build(deps-dev): bump tsx from 4.10.5 to 4.11.0 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.10.5 to 4.11.0. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.10.5...v4.11.0) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51c2c478..c72d2e0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.10.5" + "tsx": "^4.11.0" }, "engines": { "node": ">=20" @@ -1279,9 +1279,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.10.5", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.10.5.tgz", - "integrity": "sha512-twDSbf7Gtea4I2copqovUiNTEDrT8XNFXsuHpfGbdpW/z9ZW4fTghzzhAG0WfrCuJmJiOEY1nLIjq4u3oujRWQ==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.0.tgz", + "integrity": "sha512-vzGGELOgAupsNVssAmZjbUDfdm/pWP4R+Kg8TVdsonxbXk0bEpE1qh0yV6/QxUVXaVlNemgcPajGdJJ82n3stg==", "dev": true, "dependencies": { "esbuild": "~0.20.2", diff --git a/package.json b/package.json index b07e81e1..68bab640 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.10.5" + "tsx": "^4.11.0" }, "dependencies": { "@notionhq/client": "^2.2.15", From aa93fc606ca9e1321100a9865077550e357520dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 22:59:19 +0000 Subject: [PATCH 46/62] build(deps): bump jsdom from 24.0.0 to 24.1.0 Bumps [jsdom](https://github.com/jsdom/jsdom) from 24.0.0 to 24.1.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/24.0.0...24.1.0) --- updated-dependencies: - dependency-name: jsdom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 61 +++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index c72d2e0e..8e8c270d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.3.0", - "jsdom": "^24.0.0", + "jsdom": "^24.1.0", "rss-parser": "^3.13.0" }, "devDependencies": { @@ -498,9 +498,9 @@ "dev": true }, "node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dependencies": { "debug": "^4.3.4" }, @@ -864,9 +864,9 @@ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -888,9 +888,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -927,30 +927,30 @@ } }, "node_modules/jsdom": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.0.0.tgz", - "integrity": "sha512-UDS2NayCvmXSXVP6mpTj+73JnNQadZlr9N68189xib2tx5Mls7swlTNao26IoHv46BZJFvXygyRtyXd1feAk1A==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.0.tgz", + "integrity": "sha512-6gpM7pRXCwIOKxX47cgOyvyQDN/Eh0f1MeKySBV2xGdKtqJBLj8P25eY3EVCWo2mglDDzozR2r2MW4T+JiNUZA==", "dependencies": { "cssstyle": "^4.0.1", "data-urls": "^5.0.0", "decimal.js": "^10.4.3", "form-data": "^4.0.0", "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.4", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.7", + "nwsapi": "^2.2.10", "parse5": "^7.1.2", - "rrweb-cssom": "^0.6.0", + "rrweb-cssom": "^0.7.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.3", + "tough-cookie": "^4.1.4", "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.16.0", + "ws": "^8.17.0", "xml-name-validator": "^5.0.0" }, "engines": { @@ -965,6 +965,11 @@ } } }, + "node_modules/jsdom/node_modules/rrweb-cssom": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.0.tgz", + "integrity": "sha512-KlSv0pm9kgQSRxXEMgtivPJ4h826YHsuob8pSHcfSZsSXGtvpEAie8S0AnXuObEJ7nhikOb4ahwxDm0H2yW17g==" + }, "node_modules/jsdom/node_modules/tr46": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", @@ -1126,9 +1131,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==" + "version": "2.2.10", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.10.tgz", + "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==" }, "node_modules/p-cancelable": { "version": "4.0.1", @@ -1260,9 +1265,9 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -1364,9 +1369,9 @@ } }, "node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", + "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 68bab640..8320cdf4 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.3.0", - "jsdom": "^24.0.0", + "jsdom": "^24.1.0", "rss-parser": "^3.13.0" } } From 443a1f07a80fe13f6cb5f367a7757ab8a2d224e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:21:04 +0000 Subject: [PATCH 47/62] build(deps-dev): bump tsx from 4.11.0 to 4.11.2 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.11.0 to 4.11.2. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.11.0...v4.11.2) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e8c270d..5cadfafa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.11.0" + "tsx": "^4.11.2" }, "engines": { "node": ">=20" @@ -1284,9 +1284,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.0.tgz", - "integrity": "sha512-vzGGELOgAupsNVssAmZjbUDfdm/pWP4R+Kg8TVdsonxbXk0bEpE1qh0yV6/QxUVXaVlNemgcPajGdJJ82n3stg==", + "version": "4.11.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.2.tgz", + "integrity": "sha512-V5DL5v1BuItjsQ2FN9+4OjR7n5cr8hSgN+VGmm/fd2/0cgQdBIWHcQ3bFYm/5ZTmyxkTDBUIaRuW2divgfPe0A==", "dev": true, "dependencies": { "esbuild": "~0.20.2", diff --git a/package.json b/package.json index 8320cdf4..6f4f7ebd 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.6", - "tsx": "^4.11.0" + "tsx": "^4.11.2" }, "dependencies": { "@notionhq/client": "^2.2.15", From 6ff16b0505dab7712d22d455143964cbc91a6e15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 03:43:27 +0000 Subject: [PATCH 48/62] build(deps-dev): bump @types/jsdom from 21.1.6 to 21.1.7 Bumps [@types/jsdom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jsdom) from 21.1.6 to 21.1.7. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jsdom) --- updated-dependencies: - dependency-name: "@types/jsdom" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5cadfafa..dfe5e2d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "rss-parser": "^3.13.0" }, "devDependencies": { - "@types/jsdom": "^21.1.6", + "@types/jsdom": "^21.1.7", "tsx": "^4.11.2" }, "engines": { @@ -464,9 +464,9 @@ "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" }, "node_modules/@types/jsdom": { - "version": "21.1.6", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.6.tgz", - "integrity": "sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==", + "version": "21.1.7", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.7.tgz", + "integrity": "sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==", "dev": true, "dependencies": { "@types/node": "*", diff --git a/package.json b/package.json index 6f4f7ebd..fd21f0c9 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "node": ">=20" }, "devDependencies": { - "@types/jsdom": "^21.1.6", + "@types/jsdom": "^21.1.7", "tsx": "^4.11.2" }, "dependencies": { From 2b350c7192c05e4a1eb79d5b43a81e7ee5f96df6 Mon Sep 17 00:00:00 2001 From: bamboo Date: Fri, 7 Jun 2024 18:42:16 +0800 Subject: [PATCH 49/62] :bug: Fix: movie item directos and actors extracting ways need to be adapted. --- src/handle-douban.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/handle-douban.ts b/src/handle-douban.ts index 27c0c974..fe8d35dc 100644 --- a/src/handle-douban.ts +++ b/src/handle-douban.ts @@ -41,9 +41,15 @@ function buildMovieItem(doc: Document) { const year = doc.querySelector('#content h1 .year')?.textContent?.slice(1, -1) || ''; const img = doc.querySelector(ImgSelector) as HTMLImageElement; const poster = img?.title === ImgDefaultTitle.Poster ? img?.src?.trim().replace(/\.webp$/, '.jpg') : ''; - const directors = doc.querySelector('#info .attrs')?.textContent || ''; - const actors = [...doc.querySelectorAll('#info .actor .attrs a')] - .slice(0, 5).map(i => i.textContent).join(' / '); + + const infoPl = [...doc.querySelectorAll(InfoSelector)]; + const directorPl = infoPl.filter(i => i.textContent === '导演') + const directors = directorPl.length ? directorPl[0].nextElementSibling?.textContent?.trim() : ''; + const actorsPl = infoPl.filter(i => i.textContent === '主演') + const actors = actorsPl.length + ? [...actorsPl[0].nextElementSibling?.querySelectorAll('span a')!] + .slice(0, 5).map(i => i.textContent).join(' / ') + : ''; const genre = [...doc.querySelectorAll('#info [property="v:genre"]')].map(i => i.textContent || '').filter(v => v); const imdbInfo = [...doc.querySelectorAll(InfoSelector)].filter(i => i.textContent?.startsWith('IMDb')); const imdbLink = imdbInfo.length ? 'https://www.imdb.com/title/' + imdbInfo[0].nextSibling?.textContent?.trim() : ''; From 493a3bd85c18eb192a1541e341f299761fe4b31d Mon Sep 17 00:00:00 2001 From: bamboo Date: Fri, 7 Jun 2024 18:47:36 +0800 Subject: [PATCH 50/62] :bug: Fix: directors may not be there, use first pl attrs. --- src/handle-douban.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handle-douban.ts b/src/handle-douban.ts index fe8d35dc..ca3f42cb 100644 --- a/src/handle-douban.ts +++ b/src/handle-douban.ts @@ -44,7 +44,7 @@ function buildMovieItem(doc: Document) { const infoPl = [...doc.querySelectorAll(InfoSelector)]; const directorPl = infoPl.filter(i => i.textContent === '导演') - const directors = directorPl.length ? directorPl[0].nextElementSibling?.textContent?.trim() : ''; + const directors = (directorPl.length ? directorPl[0] : infoPl[0]).nextElementSibling?.textContent?.trim() || ''; const actorsPl = infoPl.filter(i => i.textContent === '主演') const actors = actorsPl.length ? [...actorsPl[0].nextElementSibling?.querySelectorAll('span a')!] From 0190b9d07e986b73dbccf0c986c4adb9fc7353a9 Mon Sep 17 00:00:00 2001 From: bamboo Date: Sat, 8 Jun 2024 23:35:00 +0800 Subject: [PATCH 51/62] =?UTF-8?q?:sparkles:=20Feat:=20add=20=E7=BC=96?= =?UTF-8?q?=E5=89=A7=20column=20for=20movie=20and=20scraping=20this=20info?= =?UTF-8?q?=20when=20syncing.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cols.json | 1 + scripts/update-notion.ts | 20 +++++++++++++++----- src/const.ts | 1 + src/handle-douban.ts | 11 +++++++++-- src/index.ts | 2 +- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/cols.json b/cols.json index ff8457d6..836c0ad7 100644 --- a/cols.json +++ b/cols.json @@ -4,6 +4,7 @@ "MOVIE_TITLE": "电影/电视剧/番组", "YEAR": "上映年份", "DIRECTORS": "导演", + "SCREENWRITERS": "编剧", "ACTORS": "主演", "GENRE": "类型", "IMDB_LINK": "IMDb 链接", diff --git a/scripts/update-notion.ts b/scripts/update-notion.ts index fed1064b..9e3215b4 100644 --- a/scripts/update-notion.ts +++ b/scripts/update-notion.ts @@ -10,7 +10,7 @@ import fs from 'node:fs'; import dotenv from 'dotenv'; import csv from 'fast-csv'; import { Client, LogLevel } from '@notionhq/client'; -import type { QueryDatabaseResponse, PageObjectResponse, CreatePageBodyParameters } from '@notionhq/client/build/src/api-endpoints'; +import type { QueryDatabaseResponse, PageObjectResponse, CreatePageParameters } from '@notionhq/client/build/src/api-endpoints'; import dayjs from 'dayjs'; import got from 'got'; import { JSDOM } from 'jsdom'; @@ -101,7 +101,7 @@ async function handleNewItems() { let itemData; try { itemData = await fetchItem(link); // https://movie.douban.com/subject/1291552/ - itemData = {...itemData, ...row}; // merge all data + itemData = { ...itemData, ...row }; // merge all data } catch (error) { console.error(row[DB_PROPERTIES.MOVIE_TITLE], error); @@ -132,7 +132,7 @@ async function fetchItem(link) { } async function addToNotion(itemData) { - console.log('goint to insert ', itemData[DB_PROPERTIES.RATING_DATE], itemData[DB_PROPERTIES.MOVIE_TITLE]); + console.log('Going to insert ', itemData[DB_PROPERTIES.RATING_DATE], itemData[DB_PROPERTIES.MOVIE_TITLE]); try { const response = await notion.pages.create({ parent: { @@ -191,6 +191,16 @@ async function addToNotion(itemData) { }, ], }, + [DB_PROPERTIES.SCREENWRITERS]: { + 'rich_text': [ + { + type: 'text', + text: { + content: itemData[DB_PROPERTIES.SCREENWRITERS], + }, + }, + ], + }, [DB_PROPERTIES.ACTORS]: { 'rich_text': [ { @@ -212,8 +222,8 @@ async function addToNotion(itemData) { [DB_PROPERTIES.IMDB_LINK]: { url: itemData[DB_PROPERTIES.IMDB_LINK] || null, }, - } as CreatePageBodyParameters, - }); + }, + } as CreatePageParameters); if (response && response.id) { console.log(itemData[DB_PROPERTIES.MOVIE_TITLE] + `(${itemData[DB_PROPERTIES.ITEM_LINK]})` + ' page created.'); } diff --git a/src/const.ts b/src/const.ts index 185cb2c5..b6a7fd8d 100644 --- a/src/const.ts +++ b/src/const.ts @@ -47,6 +47,7 @@ export const PropertyTypeMap: Record = COMMENTS: NotionPropTypesEnum.RICH_TEXT, YEAR: NotionPropTypesEnum.NUMBER, DIRECTORS: NotionPropTypesEnum.RICH_TEXT, + SCREENWRITERS: NotionPropTypesEnum.RICH_TEXT, ACTORS: NotionPropTypesEnum.RICH_TEXT, GENRE: NotionPropTypesEnum.MULTI_SELECT, ITEM_LINK: NotionPropTypesEnum.URL, diff --git a/src/handle-douban.ts b/src/handle-douban.ts index ca3f42cb..4667be98 100644 --- a/src/handle-douban.ts +++ b/src/handle-douban.ts @@ -43,13 +43,19 @@ function buildMovieItem(doc: Document) { const poster = img?.title === ImgDefaultTitle.Poster ? img?.src?.trim().replace(/\.webp$/, '.jpg') : ''; const infoPl = [...doc.querySelectorAll(InfoSelector)]; - const directorPl = infoPl.filter(i => i.textContent === '导演') + const directorPl = infoPl.filter(i => i.textContent === '导演'); const directors = (directorPl.length ? directorPl[0] : infoPl[0]).nextElementSibling?.textContent?.trim() || ''; - const actorsPl = infoPl.filter(i => i.textContent === '主演') + const actorsPl = infoPl.filter(i => i.textContent === '主演'); const actors = actorsPl.length ? [...actorsPl[0].nextElementSibling?.querySelectorAll('span a')!] .slice(0, 5).map(i => i.textContent).join(' / ') : ''; + const writersPl = infoPl.filter(i => i.textContent === '编剧'); + const writers = writersPl.length + ? [...writersPl[0].nextElementSibling?.querySelectorAll('span a')!] + .slice(0, 5).map(i => i.textContent).join(' / ') + : ''; + console.log('writers: ', writers); const genre = [...doc.querySelectorAll('#info [property="v:genre"]')].map(i => i.textContent || '').filter(v => v); const imdbInfo = [...doc.querySelectorAll(InfoSelector)].filter(i => i.textContent?.startsWith('IMDb')); const imdbLink = imdbInfo.length ? 'https://www.imdb.com/title/' + imdbInfo[0].nextSibling?.textContent?.trim() : ''; @@ -60,6 +66,7 @@ function buildMovieItem(doc: Document) { [DB_PROPERTIES.YEAR]: year, [DB_PROPERTIES.POSTER]: poster, // optional [DB_PROPERTIES.DIRECTORS]: directors, + [DB_PROPERTIES.SCREENWRITERS]: writers, // optional [DB_PROPERTIES.ACTORS]: actors, [DB_PROPERTIES.GENRE]: genre, [DB_PROPERTIES.IMDB_LINK]: imdbLink, // optional diff --git a/src/index.ts b/src/index.ts index 32c089eb..df819102 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,7 +18,7 @@ async function main(): Promise { await handleNotion(completeFeeds); } - await handleNeodb(normalizedFeeds); + // await handleNeodb(normalizedFeeds); } main(); From cad4295aa4ce7ead6a067ebba77bb590b40d6e84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 22:10:37 +0000 Subject: [PATCH 52/62] build(deps): bump got from 14.3.0 to 14.4.1 Bumps [got](https://github.com/sindresorhus/got) from 14.3.0 to 14.4.1. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.3.0...v14.4.1) --- updated-dependencies: - dependency-name: got dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 22 +++++++++++++++++----- package.json | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index dfe5e2d2..a685b7ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "dayjs": "^1.11.11", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", - "got": "^14.3.0", + "got": "^14.4.1", "jsdom": "^24.1.0", "rss-parser": "^3.13.0" }, @@ -824,9 +824,9 @@ } }, "node_modules/got": { - "version": "14.3.0", - "resolved": "https://registry.npmjs.org/got/-/got-14.3.0.tgz", - "integrity": "sha512-vZkrXdq5BtPWTXqvjXSpl6zky3zpHaOVfSug/RfFHu3YrtSsvYzopVMDqrh2do77WnGoCSSRCHW25zXOSAQ9zw==", + "version": "14.4.1", + "resolved": "https://registry.npmjs.org/got/-/got-14.4.1.tgz", + "integrity": "sha512-IvDJbJBUeexX74xNQuMIVgCRRuNOm5wuK+OC3Dc2pnSoh1AOmgc7JVj7WC+cJ4u0aPcO9KZ2frTXcqK4W/5qTQ==", "dependencies": { "@sindresorhus/is": "^6.3.1", "@szmarczak/http-timer": "^5.0.1", @@ -838,7 +838,8 @@ "http2-wrapper": "^2.2.1", "lowercase-keys": "^3.0.0", "p-cancelable": "^4.0.1", - "responselike": "^3.0.0" + "responselike": "^3.0.0", + "type-fest": "^4.19.0" }, "engines": { "node": ">=20" @@ -1302,6 +1303,17 @@ "fsevents": "~2.3.3" } }, + "node_modules/type-fest": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.20.0.tgz", + "integrity": "sha512-MBh+PHUHHisjXf4tlx0CFWoMdjx8zCMLJHOjnV1prABYZFHqtFOyauCIK2/7w4oIfwkF8iNhLtnJEfVY2vn3iw==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", diff --git a/package.json b/package.json index fd21f0c9..797d19a3 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "dayjs": "^1.11.11", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", - "got": "^14.3.0", + "got": "^14.4.1", "jsdom": "^24.1.0", "rss-parser": "^3.13.0" } From ca8941ca5c428750b91cbfe2613e4aa0d06edf29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 22:10:22 +0000 Subject: [PATCH 53/62] build(deps-dev): bump tsx from 4.11.2 to 4.15.1 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.11.2 to 4.15.1. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.11.2...v4.15.1) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 200 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 101 insertions(+), 101 deletions(-) diff --git a/package-lock.json b/package-lock.json index a685b7ff..90e7d7e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,16 +20,16 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.11.2" + "tsx": "^4.15.1" }, "engines": { "node": ">=20" } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", - "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ "ppc64" ], @@ -43,9 +43,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", - "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], @@ -59,9 +59,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", - "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], @@ -75,9 +75,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", - "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], @@ -91,9 +91,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", - "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], @@ -107,9 +107,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", - "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], @@ -123,9 +123,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", - "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], @@ -139,9 +139,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", - "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], @@ -155,9 +155,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", - "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], @@ -171,9 +171,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", - "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], @@ -187,9 +187,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", - "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], @@ -203,9 +203,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", - "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], @@ -219,9 +219,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", - "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], @@ -235,9 +235,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", - "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], @@ -251,9 +251,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", - "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], @@ -267,9 +267,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", - "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], @@ -283,9 +283,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", - "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], @@ -299,9 +299,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", - "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], @@ -315,9 +315,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", - "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], @@ -331,9 +331,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", - "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], @@ -347,9 +347,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", - "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], @@ -363,9 +363,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", - "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], @@ -379,9 +379,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", - "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], @@ -716,9 +716,9 @@ } }, "node_modules/esbuild": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", - "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, "bin": { @@ -728,29 +728,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.20.2", - "@esbuild/android-arm": "0.20.2", - "@esbuild/android-arm64": "0.20.2", - "@esbuild/android-x64": "0.20.2", - "@esbuild/darwin-arm64": "0.20.2", - "@esbuild/darwin-x64": "0.20.2", - "@esbuild/freebsd-arm64": "0.20.2", - "@esbuild/freebsd-x64": "0.20.2", - "@esbuild/linux-arm": "0.20.2", - "@esbuild/linux-arm64": "0.20.2", - "@esbuild/linux-ia32": "0.20.2", - "@esbuild/linux-loong64": "0.20.2", - "@esbuild/linux-mips64el": "0.20.2", - "@esbuild/linux-ppc64": "0.20.2", - "@esbuild/linux-riscv64": "0.20.2", - "@esbuild/linux-s390x": "0.20.2", - "@esbuild/linux-x64": "0.20.2", - "@esbuild/netbsd-x64": "0.20.2", - "@esbuild/openbsd-x64": "0.20.2", - "@esbuild/sunos-x64": "0.20.2", - "@esbuild/win32-arm64": "0.20.2", - "@esbuild/win32-ia32": "0.20.2", - "@esbuild/win32-x64": "0.20.2" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, "node_modules/fast-csv": { @@ -1285,12 +1285,12 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.11.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.11.2.tgz", - "integrity": "sha512-V5DL5v1BuItjsQ2FN9+4OjR7n5cr8hSgN+VGmm/fd2/0cgQdBIWHcQ3bFYm/5ZTmyxkTDBUIaRuW2divgfPe0A==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.1.tgz", + "integrity": "sha512-k/6h17jA1KfUR7SpcteOa880zGmF56s8gMIcSqUR5avyNFi9nlCEKpMiHLrzrqyARGr52A/JablmGey1DEWbCA==", "dev": true, "dependencies": { - "esbuild": "~0.20.2", + "esbuild": "~0.21.4", "get-tsconfig": "^4.7.5" }, "bin": { diff --git a/package.json b/package.json index 797d19a3..9e51fd6c 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.11.2" + "tsx": "^4.15.1" }, "dependencies": { "@notionhq/client": "^2.2.15", From c07f9a1045e1989129a45f9129255bdb327815e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:06:23 +0000 Subject: [PATCH 54/62] build(deps-dev): bump tsx from 4.15.1 to 4.15.6 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.15.1 to 4.15.6. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.15.1...v4.15.6) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90e7d7e4..026f7723 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.15.1" + "tsx": "^4.15.6" }, "engines": { "node": ">=20" @@ -1285,9 +1285,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.1.tgz", - "integrity": "sha512-k/6h17jA1KfUR7SpcteOa880zGmF56s8gMIcSqUR5avyNFi9nlCEKpMiHLrzrqyARGr52A/JablmGey1DEWbCA==", + "version": "4.15.6", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.6.tgz", + "integrity": "sha512-is0VQQlfNZRHEuSSTKA6m4xw74IU4AizmuB6lAYLRt9XtuyeQnyJYexhNZOPCB59SqC4JzmSzPnHGBXxf3k0hA==", "dev": true, "dependencies": { "esbuild": "~0.21.4", diff --git a/package.json b/package.json index 9e51fd6c..da532695 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.15.1" + "tsx": "^4.15.6" }, "dependencies": { "@notionhq/client": "^2.2.15", From 9852adfdeff4f9f4b970ba4cedecb2b029fc73d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:13:32 +0000 Subject: [PATCH 55/62] build(deps-dev): bump tsx from 4.15.6 to 4.15.7 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.15.6 to 4.15.7. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.15.6...v4.15.7) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 026f7723..e604dbcd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.15.6" + "tsx": "^4.15.7" }, "engines": { "node": ">=20" @@ -1285,9 +1285,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.15.6", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.6.tgz", - "integrity": "sha512-is0VQQlfNZRHEuSSTKA6m4xw74IU4AizmuB6lAYLRt9XtuyeQnyJYexhNZOPCB59SqC4JzmSzPnHGBXxf3k0hA==", + "version": "4.15.7", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.7.tgz", + "integrity": "sha512-u3H0iSFDZM3za+VxkZ1kywdCeHCn+8/qHQS1MNoO2sONDgD95HlWtt8aB23OzeTmFP9IU4/8bZUdg58Uu5J4cg==", "dev": true, "dependencies": { "esbuild": "~0.21.4", diff --git a/package.json b/package.json index da532695..cd052a84 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.15.6" + "tsx": "^4.15.7" }, "dependencies": { "@notionhq/client": "^2.2.15", From 59bbe01ff9a8affc6f6c6642bc9c8ecdc83550cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 03:53:42 +0000 Subject: [PATCH 56/62] build(deps): bump ws from 8.17.0 to 8.17.1 Bumps [ws](https://github.com/websockets/ws) from 8.17.0 to 8.17.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.17.0...8.17.1) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e604dbcd..800f1914 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1381,9 +1381,9 @@ } }, "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { "node": ">=10.0.0" }, From fb1c35149f5526e6a534e568ccc2f4374ab40a3d Mon Sep 17 00:00:00 2001 From: bamboo Date: Sun, 30 Jun 2024 22:43:25 +0800 Subject: [PATCH 57/62] :bug: Bugfix: restore neodb sync. --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index df819102..32c089eb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,7 +18,7 @@ async function main(): Promise { await handleNotion(completeFeeds); } - // await handleNeodb(normalizedFeeds); + await handleNeodb(normalizedFeeds); } main(); From 8075fb27acb3afdc122d859ac064e6f708882e79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:05:25 +0000 Subject: [PATCH 58/62] build(deps-dev): bump tsx from 4.15.7 to 4.16.0 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.15.7 to 4.16.0. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.15.7...v4.16.0) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 800f1914..0d5da375 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.15.7" + "tsx": "^4.16.0" }, "engines": { "node": ">=20" @@ -1285,12 +1285,12 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.15.7", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.7.tgz", - "integrity": "sha512-u3H0iSFDZM3za+VxkZ1kywdCeHCn+8/qHQS1MNoO2sONDgD95HlWtt8aB23OzeTmFP9IU4/8bZUdg58Uu5J4cg==", + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.16.0.tgz", + "integrity": "sha512-MPgN+CuY+4iKxGoJNPv+1pyo5YWZAQ5XfsyobUG+zoKG7IkvCPLZDEyoIb8yLS2FcWci1nlxAqmvPlFWD5AFiQ==", "dev": true, "dependencies": { - "esbuild": "~0.21.4", + "esbuild": "~0.21.5", "get-tsconfig": "^4.7.5" }, "bin": { diff --git a/package.json b/package.json index cd052a84..7290d3b3 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.15.7" + "tsx": "^4.16.0" }, "dependencies": { "@notionhq/client": "^2.2.15", From 73ea246fdbc977677a6d15cb8b745a0c7c1c04d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 23:00:08 +0000 Subject: [PATCH 59/62] build(deps-dev): bump tsx from 4.16.0 to 4.16.2 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.16.0 to 4.16.2. - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.16.0...v4.16.2) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d5da375..5d75a265 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.16.0" + "tsx": "^4.16.2" }, "engines": { "node": ">=20" @@ -1285,9 +1285,9 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tsx": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.16.0.tgz", - "integrity": "sha512-MPgN+CuY+4iKxGoJNPv+1pyo5YWZAQ5XfsyobUG+zoKG7IkvCPLZDEyoIb8yLS2FcWci1nlxAqmvPlFWD5AFiQ==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.16.2.tgz", + "integrity": "sha512-C1uWweJDgdtX2x600HjaFaucXTilT7tgUZHbOE4+ypskZ1OP8CRCSDkCxG6Vya9EwaFIVagWwpaVAn5wzypaqQ==", "dev": true, "dependencies": { "esbuild": "~0.21.5", diff --git a/package.json b/package.json index 7290d3b3..534452fa 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@types/jsdom": "^21.1.7", - "tsx": "^4.16.0" + "tsx": "^4.16.2" }, "dependencies": { "@notionhq/client": "^2.2.15", From e6756e0763a95a997c8bbfc66c7303e38f5df1ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 22:24:13 +0000 Subject: [PATCH 60/62] build(deps): bump jsdom from 24.1.0 to 24.1.1 Bumps [jsdom](https://github.com/jsdom/jsdom) from 24.1.0 to 24.1.1. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/24.1.0...24.1.1) --- updated-dependencies: - dependency-name: jsdom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 40 ++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5d75a265..911d7fb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.4.1", - "jsdom": "^24.1.0", + "jsdom": "^24.1.1", "rss-parser": "^3.13.0" }, "devDependencies": { @@ -889,9 +889,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -928,9 +928,9 @@ } }, "node_modules/jsdom": { - "version": "24.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.0.tgz", - "integrity": "sha512-6gpM7pRXCwIOKxX47cgOyvyQDN/Eh0f1MeKySBV2xGdKtqJBLj8P25eY3EVCWo2mglDDzozR2r2MW4T+JiNUZA==", + "version": "24.1.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.1.tgz", + "integrity": "sha512-5O1wWV99Jhq4DV7rCLIoZ/UIhyQeDR7wHVyZAHAshbrvZsLs+Xzz7gtwnlJTJDjleiTKh54F4dXrX70vJQTyJQ==", "dependencies": { "cssstyle": "^4.0.1", "data-urls": "^5.0.0", @@ -938,11 +938,11 @@ "form-data": "^4.0.0", "html-encoding-sniffer": "^4.0.0", "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.4", + "https-proxy-agent": "^7.0.5", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.10", + "nwsapi": "^2.2.12", "parse5": "^7.1.2", - "rrweb-cssom": "^0.7.0", + "rrweb-cssom": "^0.7.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.1.4", @@ -951,7 +951,7 @@ "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.17.0", + "ws": "^8.18.0", "xml-name-validator": "^5.0.0" }, "engines": { @@ -967,9 +967,9 @@ } }, "node_modules/jsdom/node_modules/rrweb-cssom": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.0.tgz", - "integrity": "sha512-KlSv0pm9kgQSRxXEMgtivPJ4h826YHsuob8pSHcfSZsSXGtvpEAie8S0AnXuObEJ7nhikOb4ahwxDm0H2yW17g==" + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", + "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==" }, "node_modules/jsdom/node_modules/tr46": { "version": "5.0.0", @@ -1132,9 +1132,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.10", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.10.tgz", - "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==" + "version": "2.2.12", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.12.tgz", + "integrity": "sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==" }, "node_modules/p-cancelable": { "version": "4.0.1", @@ -1381,9 +1381,9 @@ } }, "node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 534452fa..be2aa22c 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.4.1", - "jsdom": "^24.1.0", + "jsdom": "^24.1.1", "rss-parser": "^3.13.0" } } From 11f2cb63d586e0d03d352d97365854cb44339ede Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 22:24:08 +0000 Subject: [PATCH 61/62] build(deps): bump dayjs from 1.11.11 to 1.11.12 Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.11 to 1.11.12. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/dev/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.11.11...v1.11.12) --- updated-dependencies: - dependency-name: dayjs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 911d7fb7..560af5a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@notionhq/client": "^2.2.15", "consola": "^3.2.3", - "dayjs": "^1.11.11", + "dayjs": "^1.11.12", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.4.1", @@ -627,9 +627,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.11", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", - "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" + "version": "1.11.12", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.12.tgz", + "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==" }, "node_modules/debug": { "version": "4.3.4", diff --git a/package.json b/package.json index be2aa22c..4855d053 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dependencies": { "@notionhq/client": "^2.2.15", "consola": "^3.2.3", - "dayjs": "^1.11.11", + "dayjs": "^1.11.12", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", "got": "^14.4.1", From 5a14b631d81822e8f251091e31499315caadde36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:13:14 +0000 Subject: [PATCH 62/62] build(deps): bump got from 14.4.1 to 14.4.2 Bumps [got](https://github.com/sindresorhus/got) from 14.4.1 to 14.4.2. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.4.1...v14.4.2) --- updated-dependencies: - dependency-name: got dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 30 +++++++++--------------------- package.json | 2 +- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 560af5a1..da980d41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "dayjs": "^1.11.12", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", - "got": "^14.4.1", + "got": "^14.4.2", "jsdom": "^24.1.1", "rss-parser": "^3.13.0" }, @@ -437,11 +437,11 @@ "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==" }, "node_modules/@sindresorhus/is": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.3.1.tgz", - "integrity": "sha512-FX4MfcifwJyFOI2lPoX7PQxCqx8BG1HCho7WdiXwpEQx1Ycij0JxkfYtGK7yqNScrZGSlt6RE6sw8QYoH7eKnQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.0.0.tgz", + "integrity": "sha512-WDTlVTyvFivSOuyvMeedzg2hdoBLZ3f1uNVuEida2Rl9BrfjrIRjWA/VZIrMRLvSwJYCAlCRA3usDt1THytxWQ==", "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sindresorhus/is?sponsor=1" @@ -800,17 +800,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-tsconfig": { "version": "4.7.5", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", @@ -824,17 +813,16 @@ } }, "node_modules/got": { - "version": "14.4.1", - "resolved": "https://registry.npmjs.org/got/-/got-14.4.1.tgz", - "integrity": "sha512-IvDJbJBUeexX74xNQuMIVgCRRuNOm5wuK+OC3Dc2pnSoh1AOmgc7JVj7WC+cJ4u0aPcO9KZ2frTXcqK4W/5qTQ==", + "version": "14.4.2", + "resolved": "https://registry.npmjs.org/got/-/got-14.4.2.tgz", + "integrity": "sha512-+Te/qEZ6hr7i+f0FNgXx/6WQteSM/QqueGvxeYQQFm0GDfoxLVJ/oiwUKYMTeioColWUTdewZ06hmrBjw6F7tw==", "dependencies": { - "@sindresorhus/is": "^6.3.1", + "@sindresorhus/is": "^7.0.0", "@szmarczak/http-timer": "^5.0.1", "cacheable-lookup": "^7.0.0", "cacheable-request": "^12.0.1", "decompress-response": "^6.0.0", "form-data-encoder": "^4.0.2", - "get-stream": "^8.0.1", "http2-wrapper": "^2.2.1", "lowercase-keys": "^3.0.0", "p-cancelable": "^4.0.1", diff --git a/package.json b/package.json index 4855d053..18d955ba 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "dayjs": "^1.11.12", "dotenv": "^16.4.5", "fast-csv": "^5.0.1", - "got": "^14.4.1", + "got": "^14.4.2", "jsdom": "^24.1.1", "rss-parser": "^3.13.0" }