diff --git a/.github/workflows/SST - Development.yml b/.github/workflows/SST - Development.yml index a036947..ae7f678 100644 --- a/.github/workflows/SST - Development.yml +++ b/.github/workflows/SST - Development.yml @@ -33,6 +33,7 @@ jobs: with: role-to-assume: ${{ vars.ROLE_TO_ASSUME }} aws-region: ap-southeast-1 -# - name: Deploy app -# run: | -# pnpm install && pnpm sst deploy --stage dev + - name: Deploy app + run: | + curl -fsSL https://ion.sst.dev/install | bash + pnpm install && pnpm sst deploy --stage development diff --git a/.github/workflows/SST - Production.yml b/.github/workflows/SST - Production.yml index 682e3d7..837de81 100644 --- a/.github/workflows/SST - Production.yml +++ b/.github/workflows/SST - Production.yml @@ -34,5 +34,6 @@ jobs: role-to-assume: ${{ vars.ROLE_TO_ASSUME }} aws-region: ap-southeast-1 - name: Deploy app - run: | - pnpm install && pnpm sst deploy --stage prod + run: | + curl -fsSL https://ion.sst.dev/install | bash + pnpm install && pnpm sst deploy --stage production diff --git a/package.json b/package.json index 234d3f6..4e326ae 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,10 @@ "sst": "^3.0.13" }, "devDependencies": { - "@cloudflare/workers-types": "^4.20240423.0", "@types/adm-zip": "^0.5.3", "@types/d3": "^7.4.2", "@types/node": "^20.12.7", "prettier": "^3.0.3", - "typescript": "^5.4.5", - "wrangler": "^3.53.0" + "typescript": "^5.4.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b9bd72d..8068b0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,9 +30,6 @@ importers: specifier: ^3.0.13 version: 3.0.13 devDependencies: - '@cloudflare/workers-types': - specifier: ^4.20240423.0 - version: 4.20240423.0 '@types/adm-zip': specifier: ^0.5.3 version: 0.5.5 @@ -48,9 +45,6 @@ importers: typescript: specifier: ^5.4.5 version: 5.4.5 - wrangler: - specifier: ^3.53.0 - version: 3.53.0(@cloudflare/workers-types@4.20240423.0) packages: @@ -171,203 +165,6 @@ packages: resolution: {integrity: sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==} engines: {node: '>=6.9.0'} - '@cloudflare/kv-asset-handler@0.3.2': - resolution: {integrity: sha512-EeEjMobfuJrwoctj7FA1y1KEbM0+Q1xSjobIEyie9k4haVEBB7vkDvsasw1pM3rO39mL2akxIAzLMUAtrMHZhA==} - engines: {node: '>=16.13'} - - '@cloudflare/workerd-darwin-64@1.20240419.0': - resolution: {integrity: sha512-PGVe9sYWULHfvGhN0IZh8MsskNG/ufnBSqPbgFCxJHCTrVXLPuC35EoVaforyqjKRwj3U35XMyGo9KHcGnTeHQ==} - engines: {node: '>=16'} - cpu: [x64] - os: [darwin] - - '@cloudflare/workerd-darwin-arm64@1.20240419.0': - resolution: {integrity: sha512-z4etQSPiD5Gcjs962LiC7ZdmXnN6SGof5KrYoFiSI9X9kUvpuGH/lnjVVPd+NnVNeDU2kzmcAIgyZjkjTaqVXQ==} - engines: {node: '>=16'} - cpu: [arm64] - os: [darwin] - - '@cloudflare/workerd-linux-64@1.20240419.0': - resolution: {integrity: sha512-lBwhg0j3sYTFMsEb4bOClbVje8nqrYOu0H3feQlX+Eks94JIhWPkf8ywK4at/BUc1comPMhCgzDHwc2OMPUGgg==} - engines: {node: '>=16'} - cpu: [x64] - os: [linux] - - '@cloudflare/workerd-linux-arm64@1.20240419.0': - resolution: {integrity: sha512-ZMY6wwWkxL+WPq8ydOp/irSYjAnMhBz1OC1+4z+OANtDs2beaZODmq7LEB3hb5WUAaTPY7DIjZh3DfDfty0nYg==} - engines: {node: '>=16'} - cpu: [arm64] - os: [linux] - - '@cloudflare/workerd-windows-64@1.20240419.0': - resolution: {integrity: sha512-YJjgaJN2yGTkV7Cr4K3i8N4dUwVQTclT3Pr3NpRZCcLjTszwlE53++XXDnHMKGXBbSguIizaVbmcU2EtmIXyeQ==} - engines: {node: '>=16'} - cpu: [x64] - os: [win32] - - '@cloudflare/workers-types@4.20240423.0': - resolution: {integrity: sha512-ssuccb3j+URp6mP2p0PcQE9vmS3YeKBQnALHF9P3yQfUAFozuhTsDTbqmL+zPrJvUcG7SL2xVQkNDF9QJeKDZw==} - - '@cspotcode/source-map-support@0.8.1': - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - - '@esbuild-plugins/node-globals-polyfill@0.2.3': - resolution: {integrity: sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==} - peerDependencies: - esbuild: '*' - - '@esbuild-plugins/node-modules-polyfill@0.2.2': - resolution: {integrity: sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==} - peerDependencies: - esbuild: '*' - - '@esbuild/android-arm64@0.17.19': - resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm@0.17.19': - resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - - '@esbuild/android-x64@0.17.19': - resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - - '@esbuild/darwin-arm64@0.17.19': - resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-x64@0.17.19': - resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - - '@esbuild/freebsd-arm64@0.17.19': - resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.17.19': - resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - - '@esbuild/linux-arm64@0.17.19': - resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm@0.17.19': - resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-ia32@0.17.19': - resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.17.19': - resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-mips64el@0.17.19': - resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-ppc64@0.17.19': - resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-riscv64@0.17.19': - resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-s390x@0.17.19': - resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-x64@0.17.19': - resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-x64@0.17.19': - resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-x64@0.17.19': - resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - - '@esbuild/sunos-x64@0.17.19': - resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - - '@esbuild/win32-arm64@0.17.19': - resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-ia32@0.17.19': - resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-x64@0.17.19': - resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - - '@fastify/busboy@2.1.1': - resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} - engines: {node: '>=14'} - - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - - '@jridgewell/trace-mapping@0.3.9': - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@mongodb-js/saslprep@1.1.5': resolution: {integrity: sha512-XLNOMH66KhJzUJNwT/qlMnS4WsNDWD5ASdyaSH3EtK+F4r/CFGa3jT4GNi4mfOitGvWXtdLgQJkQjxSVrio+jA==} @@ -645,9 +442,6 @@ packages: '@types/geojson@7946.0.14': resolution: {integrity: sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==} - '@types/node-forge@1.3.11': - resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} - '@types/node@20.12.7': resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} @@ -657,57 +451,23 @@ packages: '@types/whatwg-url@11.0.4': resolution: {integrity: sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==} - acorn-walk@8.3.2: - resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} - engines: {node: '>=0.4.0'} - - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} - engines: {node: '>=0.4.0'} - hasBin: true - adm-zip@0.5.12: resolution: {integrity: sha512-6TVU49mK6KZb4qG6xWaaM4C7sA/sgUMLy/JYMOzkcp3BvVLpW0fXDFQiIzAuxFCt/2+xD7fNIiPFAoLZPhVNLQ==} engines: {node: '>=6.0'} - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - - as-table@1.0.55: - resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} - asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} axios@1.6.8: resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - - blake3-wasm@2.1.5: - resolution: {integrity: sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==} - bowser@2.11.0: resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} - braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - bson@6.6.0: resolution: {integrity: sha512-BVINv2SgcMjL4oYbBuCQTpE3/VKOSxrOA8Cj/wQP7izSzlBGVomdm+TcUd0Pzy0ytLSSDweCKQ6X3f5veM5LQA==} engines: {node: '>=16.20.1'} - capnp-ts@0.7.0: - resolution: {integrity: sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==} - - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -716,10 +476,6 @@ packages: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} - cookie@0.5.0: - resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} - engines: {node: '>= 0.6'} - d3-array@3.2.4: resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} engines: {node: '>=12'} @@ -847,22 +603,10 @@ packages: resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==} engines: {node: '>=12'} - data-uri-to-buffer@2.0.2: - resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==} - date-fns@2.30.0: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - delaunator@5.0.1: resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==} @@ -870,30 +614,10 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - esbuild@0.17.19: - resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} - engines: {node: '>=12'} - hasBin: true - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - estree-walker@0.6.1: - resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==} - - exit-hook@2.2.1: - resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==} - engines: {node: '>=6'} - fast-xml-parser@4.2.5: resolution: {integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==} hasBin: true - fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - follow-redirects@1.15.6: resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} engines: {node: '>=4.0'} @@ -907,28 +631,6 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} - fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - - function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - - get-source@2.0.12: - resolution: {integrity: sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==} - - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - - glob-to-regexp@0.4.1: - resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} - hono@4.0.1: resolution: {integrity: sha512-S9cREGPJIAK437RhroOf1PGlJPIlt5itl69OmQ6onPLo5pdCbSHGL8v4uAKxrdHjcTyuoyvKPqWm5jv0dGkdFA==} engines: {node: '>=16.0.0'} @@ -945,25 +647,6 @@ packages: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - - is-core-module@2.13.1: - resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} - - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - jose@4.15.5: resolution: {integrity: sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==} @@ -974,9 +657,6 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - magic-string@0.25.9: - resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} - memory-pager@1.5.0: resolution: {integrity: sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==} @@ -988,16 +668,6 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} - mime@3.0.0: - resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} - engines: {node: '>=10.0.0'} - hasBin: true - - miniflare@3.20240419.0: - resolution: {integrity: sha512-fIev1PP4H+fQp5FtvzHqRY2v5s+jxh/a0xAhvM5fBNXvxWX7Zod1OatXfXwYbse3hqO3KeVMhb0osVtrW0NwJg==} - engines: {node: '>=16.13'} - hasBin: true - mongodb-connection-string-url@3.0.0: resolution: {integrity: sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==} @@ -1028,26 +698,6 @@ packages: socks: optional: true - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - - mustache@4.2.0: - resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} - hasBin: true - - nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - - node-forge@1.3.1: - resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} - engines: {node: '>= 6.13.0'} - - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - object-hash@2.2.0: resolution: {integrity: sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==} engines: {node: '>= 6'} @@ -1059,24 +709,11 @@ packages: openid-client@5.6.4: resolution: {integrity: sha512-T1h3B10BRPKfcObdBklX639tVz+xh34O7GjofqrqiAQdm7eHsQ00ih18x6wuJ/E6FxdtS2u3FmUGPDeEcMwzNA==} - path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - - path-to-regexp@6.2.2: - resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==} - - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - prettier@3.2.5: resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} engines: {node: '>=14'} hasBin: true - printable-characters@1.0.42: - resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==} - proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} @@ -1084,76 +721,27 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - resolve.exports@2.0.2: - resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} - engines: {node: '>=10'} - - resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} - hasBin: true - robust-predicates@3.0.2: resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} - rollup-plugin-inject@3.0.2: - resolution: {integrity: sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==} - deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject. - - rollup-plugin-node-polyfills@0.2.1: - resolution: {integrity: sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==} - - rollup-pluginutils@2.8.2: - resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} - rw@1.3.3: resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - selfsigned@2.4.1: - resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==} - engines: {node: '>=10'} - - source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - - sourcemap-codec@1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - deprecated: Please use @jridgewell/sourcemap-codec instead - sparse-bitfield@3.0.3: resolution: {integrity: sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==} sst@3.0.13: resolution: {integrity: sha512-IJO3ZHJ3/4gEEGyhvs9dwryC5il044NxYh0meD2pOKwBgdMREIONnrx+F8Tkblf88RB0zP7u7gllxlzxvYQuWA==} - stacktracey@2.1.8: - resolution: {integrity: sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==} - - stoppable@1.1.0: - resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==} - engines: {node: '>=4', npm: '>=6'} - strnum@1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} - supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - tr46@4.1.1: resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} engines: {node: '>=14'} @@ -1172,10 +760,6 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - undici@5.28.4: - resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} - engines: {node: '>=14.0'} - uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true @@ -1188,45 +772,9 @@ packages: resolution: {integrity: sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==} engines: {node: '>=16'} - workerd@1.20240419.0: - resolution: {integrity: sha512-9yV98KpkQgG+bdEsKEW8i1AYZgxns6NVSfdOVEB2Ue1pTMtIEYfUyqUE+O2amisRrfaC3Pw4EvjtTmVaoetfeg==} - engines: {node: '>=16'} - hasBin: true - - wrangler@3.53.0: - resolution: {integrity: sha512-JxkvCQekL9j8Mu4CEKM/HEVyDnymWzKQuMUuJH0yum1AilutD5HAP9kVVYmvu7BvwlRyRUAj8TI5OUxXnLCEpQ==} - engines: {node: '>=16.17.0'} - hasBin: true - peerDependencies: - '@cloudflare/workers-types': ^4.20240419.0 - peerDependenciesMeta: - '@cloudflare/workers-types': - optional: true - - ws@8.17.0: - resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - - xxhash-wasm@1.0.2: - resolution: {integrity: sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==} - yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - youch@3.3.3: - resolution: {integrity: sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==} - - zod@3.23.5: - resolution: {integrity: sha512-fkwiq0VIQTksNNA131rDOsVJcns0pfVUjHzLrNBiF/O/Xxb5lQyEXkhZWcJ7npWsYlvs+h0jFWXXy4X46Em1JA==} - snapshots: '@aws-crypto/crc32@3.0.0': @@ -1602,118 +1150,6 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@cloudflare/kv-asset-handler@0.3.2': - dependencies: - mime: 3.0.0 - - '@cloudflare/workerd-darwin-64@1.20240419.0': - optional: true - - '@cloudflare/workerd-darwin-arm64@1.20240419.0': - optional: true - - '@cloudflare/workerd-linux-64@1.20240419.0': - optional: true - - '@cloudflare/workerd-linux-arm64@1.20240419.0': - optional: true - - '@cloudflare/workerd-windows-64@1.20240419.0': - optional: true - - '@cloudflare/workers-types@4.20240423.0': {} - - '@cspotcode/source-map-support@0.8.1': - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - - '@esbuild-plugins/node-globals-polyfill@0.2.3(esbuild@0.17.19)': - dependencies: - esbuild: 0.17.19 - - '@esbuild-plugins/node-modules-polyfill@0.2.2(esbuild@0.17.19)': - dependencies: - esbuild: 0.17.19 - escape-string-regexp: 4.0.0 - rollup-plugin-node-polyfills: 0.2.1 - - '@esbuild/android-arm64@0.17.19': - optional: true - - '@esbuild/android-arm@0.17.19': - optional: true - - '@esbuild/android-x64@0.17.19': - optional: true - - '@esbuild/darwin-arm64@0.17.19': - optional: true - - '@esbuild/darwin-x64@0.17.19': - optional: true - - '@esbuild/freebsd-arm64@0.17.19': - optional: true - - '@esbuild/freebsd-x64@0.17.19': - optional: true - - '@esbuild/linux-arm64@0.17.19': - optional: true - - '@esbuild/linux-arm@0.17.19': - optional: true - - '@esbuild/linux-ia32@0.17.19': - optional: true - - '@esbuild/linux-loong64@0.17.19': - optional: true - - '@esbuild/linux-mips64el@0.17.19': - optional: true - - '@esbuild/linux-ppc64@0.17.19': - optional: true - - '@esbuild/linux-riscv64@0.17.19': - optional: true - - '@esbuild/linux-s390x@0.17.19': - optional: true - - '@esbuild/linux-x64@0.17.19': - optional: true - - '@esbuild/netbsd-x64@0.17.19': - optional: true - - '@esbuild/openbsd-x64@0.17.19': - optional: true - - '@esbuild/sunos-x64@0.17.19': - optional: true - - '@esbuild/win32-arm64@0.17.19': - optional: true - - '@esbuild/win32-ia32@0.17.19': - optional: true - - '@esbuild/win32-x64@0.17.19': - optional: true - - '@fastify/busboy@2.1.1': {} - - '@jridgewell/resolve-uri@3.1.2': {} - - '@jridgewell/sourcemap-codec@1.4.15': {} - - '@jridgewell/trace-mapping@0.3.9': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - '@mongodb-js/saslprep@1.1.5': dependencies: sparse-bitfield: 3.0.3 @@ -2127,10 +1563,6 @@ snapshots: '@types/geojson@7946.0.14': {} - '@types/node-forge@1.3.11': - dependencies: - '@types/node': 20.12.7 - '@types/node@20.12.7': dependencies: undici-types: 5.26.5 @@ -2141,21 +1573,8 @@ snapshots: dependencies: '@types/webidl-conversions': 7.0.3 - acorn-walk@8.3.2: {} - - acorn@8.11.3: {} - adm-zip@0.5.12: {} - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - - as-table@1.0.55: - dependencies: - printable-characters: 1.0.42 - asynckit@0.4.0: {} axios@1.6.8: @@ -2166,45 +1585,16 @@ snapshots: transitivePeerDependencies: - debug - binary-extensions@2.3.0: {} - - blake3-wasm@2.1.5: {} - bowser@2.11.0: {} - braces@3.0.2: - dependencies: - fill-range: 7.0.1 - bson@6.6.0: {} - capnp-ts@0.7.0: - dependencies: - debug: 4.3.4 - tslib: 2.6.2 - transitivePeerDependencies: - - supports-color - - chokidar@3.6.0: - dependencies: - anymatch: 3.1.3 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 commander@7.2.0: {} - cookie@0.5.0: {} - d3-array@3.2.4: dependencies: internmap: 2.0.3 @@ -2357,61 +1747,20 @@ snapshots: d3-transition: 3.0.1(d3-selection@3.0.0) d3-zoom: 3.0.0 - data-uri-to-buffer@2.0.2: {} - date-fns@2.30.0: dependencies: '@babel/runtime': 7.24.5 - debug@4.3.4: - dependencies: - ms: 2.1.2 - delaunator@5.0.1: dependencies: robust-predicates: 3.0.2 delayed-stream@1.0.0: {} - esbuild@0.17.19: - optionalDependencies: - '@esbuild/android-arm': 0.17.19 - '@esbuild/android-arm64': 0.17.19 - '@esbuild/android-x64': 0.17.19 - '@esbuild/darwin-arm64': 0.17.19 - '@esbuild/darwin-x64': 0.17.19 - '@esbuild/freebsd-arm64': 0.17.19 - '@esbuild/freebsd-x64': 0.17.19 - '@esbuild/linux-arm': 0.17.19 - '@esbuild/linux-arm64': 0.17.19 - '@esbuild/linux-ia32': 0.17.19 - '@esbuild/linux-loong64': 0.17.19 - '@esbuild/linux-mips64el': 0.17.19 - '@esbuild/linux-ppc64': 0.17.19 - '@esbuild/linux-riscv64': 0.17.19 - '@esbuild/linux-s390x': 0.17.19 - '@esbuild/linux-x64': 0.17.19 - '@esbuild/netbsd-x64': 0.17.19 - '@esbuild/openbsd-x64': 0.17.19 - '@esbuild/sunos-x64': 0.17.19 - '@esbuild/win32-arm64': 0.17.19 - '@esbuild/win32-ia32': 0.17.19 - '@esbuild/win32-x64': 0.17.19 - - escape-string-regexp@4.0.0: {} - - estree-walker@0.6.1: {} - - exit-hook@2.2.1: {} - fast-xml-parser@4.2.5: dependencies: strnum: 1.0.5 - fill-range@7.0.1: - dependencies: - to-regex-range: 5.0.1 - follow-redirects@1.15.6: {} form-data@4.0.0: @@ -2420,26 +1769,6 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 - fsevents@2.3.3: - optional: true - - function-bind@1.1.2: {} - - get-source@2.0.12: - dependencies: - data-uri-to-buffer: 2.0.2 - source-map: 0.6.1 - - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - - glob-to-regexp@0.4.1: {} - - hasown@2.0.2: - dependencies: - function-bind: 1.1.2 - hono@4.0.1: {} hono@4.2.9: {} @@ -2450,22 +1779,6 @@ snapshots: internmap@2.0.3: {} - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.3.0 - - is-core-module@2.13.1: - dependencies: - hasown: 2.0.2 - - is-extglob@2.1.1: {} - - is-glob@4.0.3: - dependencies: - is-extglob: 2.1.1 - - is-number@7.0.0: {} - jose@4.15.5: {} jose@5.2.3: {} @@ -2474,10 +1787,6 @@ snapshots: dependencies: yallist: 4.0.0 - magic-string@0.25.9: - dependencies: - sourcemap-codec: 1.4.8 - memory-pager@1.5.0: {} mime-db@1.52.0: {} @@ -2486,27 +1795,6 @@ snapshots: dependencies: mime-db: 1.52.0 - mime@3.0.0: {} - - miniflare@3.20240419.0: - dependencies: - '@cspotcode/source-map-support': 0.8.1 - acorn: 8.11.3 - acorn-walk: 8.3.2 - capnp-ts: 0.7.0 - exit-hook: 2.2.1 - glob-to-regexp: 0.4.1 - stoppable: 1.1.0 - undici: 5.28.4 - workerd: 1.20240419.0 - ws: 8.17.0 - youch: 3.3.3 - zod: 3.23.5 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - mongodb-connection-string-url@3.0.0: dependencies: '@types/whatwg-url': 11.0.4 @@ -2518,16 +1806,6 @@ snapshots: bson: 6.6.0 mongodb-connection-string-url: 3.0.0 - ms@2.1.2: {} - - mustache@4.2.0: {} - - nanoid@3.3.7: {} - - node-forge@1.3.1: {} - - normalize-path@3.0.0: {} - object-hash@2.2.0: {} oidc-token-hash@5.0.3: {} @@ -2539,63 +1817,20 @@ snapshots: object-hash: 2.2.0 oidc-token-hash: 5.0.3 - path-parse@1.0.7: {} - - path-to-regexp@6.2.2: {} - - picomatch@2.3.1: {} - prettier@3.2.5: {} - printable-characters@1.0.42: {} - proxy-from-env@1.1.0: {} punycode@2.3.1: {} - readdirp@3.6.0: - dependencies: - picomatch: 2.3.1 - regenerator-runtime@0.14.1: {} - resolve.exports@2.0.2: {} - - resolve@1.22.8: - dependencies: - is-core-module: 2.13.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - robust-predicates@3.0.2: {} - rollup-plugin-inject@3.0.2: - dependencies: - estree-walker: 0.6.1 - magic-string: 0.25.9 - rollup-pluginutils: 2.8.2 - - rollup-plugin-node-polyfills@0.2.1: - dependencies: - rollup-plugin-inject: 3.0.2 - - rollup-pluginutils@2.8.2: - dependencies: - estree-walker: 0.6.1 - rw@1.3.3: {} safer-buffer@2.1.2: {} - selfsigned@2.4.1: - dependencies: - '@types/node-forge': 1.3.11 - node-forge: 1.3.1 - - source-map@0.6.1: {} - - sourcemap-codec@1.4.8: {} - sparse-bitfield@3.0.3: dependencies: memory-pager: 1.5.0 @@ -2609,21 +1844,8 @@ snapshots: transitivePeerDependencies: - aws-crt - stacktracey@2.1.8: - dependencies: - as-table: 1.0.55 - get-source: 2.0.12 - - stoppable@1.1.0: {} - strnum@1.0.5: {} - supports-preserve-symlinks-flag@1.0.0: {} - - to-regex-range@5.0.1: - dependencies: - is-number: 7.0.0 - tr46@4.1.1: dependencies: punycode: 2.3.1 @@ -2636,10 +1858,6 @@ snapshots: undici-types@5.26.5: {} - undici@5.28.4: - dependencies: - '@fastify/busboy': 2.1.1 - uuid@9.0.1: {} webidl-conversions@7.0.0: {} @@ -2649,48 +1867,4 @@ snapshots: tr46: 4.1.1 webidl-conversions: 7.0.0 - workerd@1.20240419.0: - optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20240419.0 - '@cloudflare/workerd-darwin-arm64': 1.20240419.0 - '@cloudflare/workerd-linux-64': 1.20240419.0 - '@cloudflare/workerd-linux-arm64': 1.20240419.0 - '@cloudflare/workerd-windows-64': 1.20240419.0 - - wrangler@3.53.0(@cloudflare/workers-types@4.20240423.0): - dependencies: - '@cloudflare/kv-asset-handler': 0.3.2 - '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) - '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) - blake3-wasm: 2.1.5 - chokidar: 3.6.0 - esbuild: 0.17.19 - miniflare: 3.20240419.0 - nanoid: 3.3.7 - path-to-regexp: 6.2.2 - resolve: 1.22.8 - resolve.exports: 2.0.2 - selfsigned: 2.4.1 - source-map: 0.6.1 - xxhash-wasm: 1.0.2 - optionalDependencies: - '@cloudflare/workers-types': 4.20240423.0 - fsevents: 2.3.3 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - ws@8.17.0: {} - - xxhash-wasm@1.0.2: {} - yallist@4.0.0: {} - - youch@3.3.3: - dependencies: - cookie: 0.5.0 - mustache: 4.2.0 - stacktracey: 2.1.8 - - zod@3.23.5: {} diff --git a/src/config/db.ts b/src/config/db.ts index 1fda6b1..23cd1b8 100644 --- a/src/config/db.ts +++ b/src/config/db.ts @@ -1,20 +1,20 @@ -// import * as mongodb from "mongodb"; -// -// const MongoClient = mongodb.MongoClient; -// -// let cachedDb: mongodb.Db | null = null; -// -// const connectToDatabase = async (): Promise => { -// if (cachedDb) { -// return cachedDb; -// } -// -// const client = await MongoClient.connect(process.env.MONGODB_URI); -// cachedDb = await client.db("main"); -// -// return cachedDb; -// }; -// -// const db = await connectToDatabase(); -// -// export default db; +import * as mongodb from "mongodb"; + +const MongoClient = mongodb.MongoClient; + +let cachedDb: mongodb.Db | null = null; + +const connectToDatabase = async (): Promise => { + if (cachedDb) { + return cachedDb; + } + + const client = await MongoClient.connect(process.env.MONGODB_URI); + cachedDb = client.db("main"); + + return cachedDb; +}; + +const db = await connectToDatabase(); + +export default db; diff --git a/src/index.ts b/src/index.ts index 682ffc1..47238c0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,10 @@ import { Hono } from "hono"; +import { handle } from "hono/aws-lambda"; import { Document, WithId } from "mongodb"; import { format, subMonths } from "date-fns"; import * as d3 from "d3"; -// import fs from "fs/promises"; -// import db from "./config/db"; +import fs from "fs/promises"; +import db from "./config/db"; import { downloadFile } from "./utils/downloadFile"; import { extractZipFile } from "./utils/extractZipFile"; import { Car, COEResult, FUEL_TYPE, UpdateParams } from "./types"; @@ -21,40 +22,10 @@ const getCarsByFuelType = async ( month: month ?? { $gte: trailingTwelveMonths }, }; - // const cars: WithId[] = await db - // .collection("cars") - // .find(filter) - // .toArray(); - - const cars = [ - { - _id: { $oid: "65f3fb10fa9ed39b7d6e73d5" }, - month: "2024-02", - make: "AUDI", - importer_type: "AMD", - fuel_type: "Electric", - vehicle_type: "Hatchback", - number: "1", - }, - { - _id: { $oid: "65f3fb10fa9ed39b7d6e73d9" }, - month: "2024-02", - make: "B.M.W.", - importer_type: "AMD", - fuel_type: "Electric", - vehicle_type: "Hatchback", - number: "", - }, - { - _id: { $oid: "65f3fb10fa9ed39b7d6e73dc" }, - month: "2024-02", - make: "BYD", - importer_type: "AMD", - fuel_type: "Electric", - vehicle_type: "Hatchback", - number: "6", - }, - ]; + const cars: WithId[] = await db + .collection("cars") + .find(filter) + .toArray(); return cars.reduce( (result: WithId[], { _id, month, make, fuel_type, number }) => { @@ -80,75 +51,75 @@ const getCarsByFuelType = async ( ); }; -// const getLatestMonth = async (): Promise => { -// const months = await db.collection("coe").distinct("month"); -// return months[months.length - 1]; -// }; - -// export const getCOEResultByMonth = async ( -// month?: string, -// ): Promise[]> => { -// const selectedMonth = month || (await getLatestMonth()); -// return db -// .collection("coe") -// .find({ month: selectedMonth }) -// .sort({ bidding_no: 1, vehicle_class: 1 }) -// .toArray(); -// }; - -// const EXTRACT_PATH: string = "/tmp"; - -// export const update = async ({ -// collectionName, -// zipFileName, -// zipUrl, -// keyFields, -// }: UpdateParams): Promise<{ message: string }> => { -// const collection = db.collection(collectionName); -// -// try { -// const zipFilePath = `${EXTRACT_PATH}/${zipFileName}`; -// await downloadFile({ url: zipUrl, destination: zipFilePath }); -// -// const extractedFileName = await extractZipFile(zipFilePath, EXTRACT_PATH); -// const destinationPath = `${EXTRACT_PATH}/${extractedFileName}`; -// console.log(`Destination path:`, destinationPath); -// -// const csvData = await fs.readFile(destinationPath, "utf-8"); -// const parsedData = d3.csvParse(csvData); -// -// const existingData: WithId[] = await collection.find().toArray(); -// -// const createUniqueKey = ( -// item: T, -// keyFields: Array, -// ): string => -// keyFields -// .filter((field) => item[field]) -// .map((field) => item[field]) -// .join("-"); -// -// const existingDataMap: Map> = new Map( -// existingData.map((item) => [createUniqueKey(item, keyFields), item]), -// ); -// const newDataToInsert = parsedData.filter( -// (newItem) => !existingDataMap.has(createUniqueKey(newItem, keyFields)), -// ); -// -// let message: string; -// if (newDataToInsert.length > 0) { -// const result = await collection.insertMany(newDataToInsert); -// message = `${result.insertedCount} document(s) inserted`; -// } else { -// message = `No new data to insert. The provided data matches the existing records.`; -// } -// -// return { message }; -// } catch (error) { -// console.error(`An error has occurred:`, error); -// throw error; -// } -// }; +const getLatestMonth = async (): Promise => { + const months = await db.collection("coe").distinct("month"); + return months[months.length - 1]; +}; + +export const getCOEResultByMonth = async ( + month?: string, +): Promise[]> => { + const selectedMonth = month || (await getLatestMonth()); + return db + .collection("coe") + .find({ month: selectedMonth }) + .sort({ bidding_no: 1, vehicle_class: 1 }) + .toArray(); +}; + +const EXTRACT_PATH: string = "/tmp"; + +export const update = async ({ + collectionName, + zipFileName, + zipUrl, + keyFields, +}: UpdateParams): Promise<{ message: string }> => { + const collection = db.collection(collectionName); + + try { + const zipFilePath = `${EXTRACT_PATH}/${zipFileName}`; + await downloadFile({ url: zipUrl, destination: zipFilePath }); + + const extractedFileName = await extractZipFile(zipFilePath, EXTRACT_PATH); + const destinationPath = `${EXTRACT_PATH}/${extractedFileName}`; + console.log(`Destination path:`, destinationPath); + + const csvData = await fs.readFile(destinationPath, "utf-8"); + const parsedData = d3.csvParse(csvData); + + const existingData: WithId[] = await collection.find().toArray(); + + const createUniqueKey = ( + item: T, + keyFields: Array, + ): string => + keyFields + .filter((field) => item[field]) + .map((field) => item[field]) + .join("-"); + + const existingDataMap: Map> = new Map( + existingData.map((item) => [createUniqueKey(item, keyFields), item]), + ); + const newDataToInsert = parsedData.filter( + (newItem) => !existingDataMap.has(createUniqueKey(newItem, keyFields)), + ); + + let message: string; + if (newDataToInsert.length > 0) { + const result = await collection.insertMany(newDataToInsert); + message = `${result.insertedCount} document(s) inserted`; + } else { + message = `No new data to insert. The provided data matches the existing records.`; + } + + return { message }; + } catch (error) { + console.error(`An error has occurred:`, error); + throw error; + } +}; app.get("/", async (c) => { const month = c.req.query("month"); @@ -180,62 +151,62 @@ app.get("/petrol", async (c) => { return c.json(cars); }); -// app.get("/coe", (c) => { -// return c.json(db.collection("coe").find().toArray()); -// }); -// -// app.get("/coe/latest", async (c) => { -// const month = c.req.query("month"); -// const result: WithId[] = await getCOEResultByMonth(month); -// return c.json(result); -// }); - -// app.get("/updater/cars", async (c) => { -// const COLLECTION_NAME: string = "cars"; -// const ZIP_FILE_NAME: string = "Monthly New Registration of Cars by Make.zip"; -// const ZIP_URL: string = `https://datamall.lta.gov.sg/content/dam/datamall/datasets/Facts_Figures/Vehicle Registration/${ZIP_FILE_NAME}`; -// -// const { message } = await update({ -// collectionName: COLLECTION_NAME, -// zipFileName: ZIP_FILE_NAME, -// zipUrl: ZIP_URL, -// keyFields: ["month"], -// }); -// -// console.log(`Message:`, message); -// -// return c.json({ -// status: 200, -// collection: COLLECTION_NAME, -// message, -// timestamp: new Date().toISOString(), -// }); -// }); -// -// app.get("/updater/coe", async (c) => { -// const COLLECTION_NAME: string = "coe"; -// const ZIP_FILE_NAME: string = "COE Bidding Results.zip"; -// const ZIP_URL: string = `https://datamall.lta.gov.sg/content/dam/datamall/datasets/Facts_Figures/Vehicle Registration/${ZIP_FILE_NAME}`; -// -// const { message } = await update({ -// collectionName: COLLECTION_NAME, -// zipFileName: ZIP_FILE_NAME, -// zipUrl: ZIP_URL, -// keyFields: ["month", "bidding_no"], -// }); -// -// console.log(`Message:`, message); -// -// return c.json({ -// status: 200, -// collection: COLLECTION_NAME, -// message, -// timestamp: new Date().toISOString(), -// }); -// }); - -// app.get("/vehicle-make", (c) => { -// return c.json(db.collection("cars").distinct("make")); -// }); - -export default app; +app.get("/coe", async (c) => { + return c.json(await db.collection("coe").find().toArray()); +}); + +app.get("/coe/latest", async (c) => { + const month = c.req.query("month"); + const result: WithId[] = await getCOEResultByMonth(month); + return c.json(result); +}); + +app.get("/updater/cars", async (c) => { + const COLLECTION_NAME: string = "cars"; + const ZIP_FILE_NAME: string = "Monthly New Registration of Cars by Make.zip"; + const ZIP_URL: string = `https://datamall.lta.gov.sg/content/dam/datamall/datasets/Facts_Figures/Vehicle Registration/${ZIP_FILE_NAME}`; + + const { message } = await update({ + collectionName: COLLECTION_NAME, + zipFileName: ZIP_FILE_NAME, + zipUrl: ZIP_URL, + keyFields: ["month"], + }); + + console.log(`Message:`, message); + + return c.json({ + status: 200, + collection: COLLECTION_NAME, + message, + timestamp: new Date().toISOString(), + }); +}); + +app.get("/updater/coe", async (c) => { + const COLLECTION_NAME: string = "coe"; + const ZIP_FILE_NAME: string = "COE Bidding Results.zip"; + const ZIP_URL: string = `https://datamall.lta.gov.sg/content/dam/datamall/datasets/Facts_Figures/Vehicle Registration/${ZIP_FILE_NAME}`; + + const { message } = await update({ + collectionName: COLLECTION_NAME, + zipFileName: ZIP_FILE_NAME, + zipUrl: ZIP_URL, + keyFields: ["month", "bidding_no"], + }); + + console.log(`Message:`, message); + + return c.json({ + status: 200, + collection: COLLECTION_NAME, + message, + timestamp: new Date().toISOString(), + }); +}); + +app.get("/vehicle-make", (c) => { + return c.json(db.collection("cars").distinct("make")); +}); + +export const handler = handle(app); diff --git a/sst-env.d.ts b/sst-env.d.ts deleted file mode 100644 index 8f3af7b..0000000 --- a/sst-env.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* tslint:disable *//* eslint-disable */import "sst" -declare module "sst" { - export interface Resource { - Database: import("@cloudflare/workers-types").D1Database - } -} -export {} \ No newline at end of file diff --git a/sst.config.ts b/sst.config.ts index 6956837..645a245 100644 --- a/sst.config.ts +++ b/sst.config.ts @@ -5,15 +5,27 @@ export default $config({ return { name: "lta-cars-dataset", removal: input?.stage === "production" ? "retain" : "remove", - home: "cloudflare", + home: "aws", + providers: { + aws: { + region: "ap-southeast-1", + }, + }, }; }, async run() { - const database = new sst.cloudflare.D1("Database"); - const hono = new sst.cloudflare.Worker("Api", { - handler: "src/index.ts", - link: [database], - url: true, + const hono = new sst.aws.Function("Hono", { + architecture: "arm64", + description: "Hono API for LTA Datasets", + environment: { + MONGODB_URI: process.env.MONGODB_URI, + }, + handler: "src/index.handler", + url: { + cors: { + maxAge: "1 day", + }, + }, }); return { diff --git a/tsconfig.json b/tsconfig.json index 4d3c77f..9957dd7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,8 @@ { "compilerOptions": { - "lib": ["esnext"], - "types": ["@cloudflare/workers-types"] + "lib": ["ESNext"], + "module": "ESNext", + "moduleResolution": "Node", + "target": "ESNext" } } diff --git a/wrangler.toml b/wrangler.toml deleted file mode 100644 index e9c2fcd..0000000 --- a/wrangler.toml +++ /dev/null @@ -1,22 +0,0 @@ -name = "lta-cars-dataset" -compatibility_date = "2023-12-01" -compatibility_flags = [ "nodejs_compat" ] - -# [vars] -# MY_VAR = "my-variable" - -# [[kv_namespaces]] -# binding = "MY_KV_NAMESPACE" -# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - -# [[r2_buckets]] -# binding = "MY_BUCKET" -# bucket_name = "my-bucket" - -# [[d1_databases]] -# binding = "DB" -# database_name = "my-database" -# database_id = "" - -# [ai] -# binding = "AI"