diff --git a/package-lock.json b/package-lock.json index 57b92618c..88c61328d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -598,9 +598,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", - "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", "cpu": [ "ppc64" ], @@ -614,9 +614,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz", - "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", "cpu": [ "arm" ], @@ -630,9 +630,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz", - "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", "cpu": [ "arm64" ], @@ -646,9 +646,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz", - "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", "cpu": [ "x64" ], @@ -662,9 +662,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz", - "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", "cpu": [ "arm64" ], @@ -678,9 +678,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz", - "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", "cpu": [ "x64" ], @@ -694,9 +694,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz", - "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", "cpu": [ "arm64" ], @@ -710,9 +710,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz", - "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", "cpu": [ "x64" ], @@ -726,9 +726,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz", - "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", "cpu": [ "arm" ], @@ -742,9 +742,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz", - "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", "cpu": [ "arm64" ], @@ -758,9 +758,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz", - "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", "cpu": [ "ia32" ], @@ -774,9 +774,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz", - "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", "cpu": [ "loong64" ], @@ -790,9 +790,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz", - "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", "cpu": [ "mips64el" ], @@ -806,9 +806,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz", - "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", "cpu": [ "ppc64" ], @@ -822,9 +822,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz", - "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", "cpu": [ "riscv64" ], @@ -838,9 +838,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz", - "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", "cpu": [ "s390x" ], @@ -854,9 +854,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz", - "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", "cpu": [ "x64" ], @@ -870,9 +870,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz", - "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", "cpu": [ "arm64" ], @@ -886,9 +886,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz", - "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", "cpu": [ "x64" ], @@ -902,9 +902,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz", - "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", "cpu": [ "arm64" ], @@ -918,9 +918,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz", - "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", "cpu": [ "x64" ], @@ -934,9 +934,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz", - "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", "cpu": [ "arm64" ], @@ -950,9 +950,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz", - "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", "cpu": [ "x64" ], @@ -966,9 +966,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz", - "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", "cpu": [ "arm64" ], @@ -982,9 +982,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz", - "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", "cpu": [ "ia32" ], @@ -998,9 +998,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz", - "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", "cpu": [ "x64" ], @@ -3602,9 +3602,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz", - "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", "hasInstallScript": true, "license": "MIT", "bin": { @@ -3614,32 +3614,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.11", - "@esbuild/android-arm": "0.25.11", - "@esbuild/android-arm64": "0.25.11", - "@esbuild/android-x64": "0.25.11", - "@esbuild/darwin-arm64": "0.25.11", - "@esbuild/darwin-x64": "0.25.11", - "@esbuild/freebsd-arm64": "0.25.11", - "@esbuild/freebsd-x64": "0.25.11", - "@esbuild/linux-arm": "0.25.11", - "@esbuild/linux-arm64": "0.25.11", - "@esbuild/linux-ia32": "0.25.11", - "@esbuild/linux-loong64": "0.25.11", - "@esbuild/linux-mips64el": "0.25.11", - "@esbuild/linux-ppc64": "0.25.11", - "@esbuild/linux-riscv64": "0.25.11", - "@esbuild/linux-s390x": "0.25.11", - "@esbuild/linux-x64": "0.25.11", - "@esbuild/netbsd-arm64": "0.25.11", - "@esbuild/netbsd-x64": "0.25.11", - "@esbuild/openbsd-arm64": "0.25.11", - "@esbuild/openbsd-x64": "0.25.11", - "@esbuild/openharmony-arm64": "0.25.11", - "@esbuild/sunos-x64": "0.25.11", - "@esbuild/win32-arm64": "0.25.11", - "@esbuild/win32-ia32": "0.25.11", - "@esbuild/win32-x64": "0.25.11" + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" } }, "node_modules/escape-string-regexp": { @@ -3844,9 +3844,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.12.0.tgz", - "integrity": "sha512-LScr2aNr2FbjAjZh2C6X6BxRx1/x+aTDExct/xyq2XKbYOiG5c0aK7pMsSuyc0brz3ibr/lbQiHD9jzt4lccJw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.0.tgz", + "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==", "license": "MIT", "dependencies": { "resolve-pkg-maps": "^1.0.0" diff --git a/package.json b/package.json index 9e8474e11..30e689c86 100644 --- a/package.json +++ b/package.json @@ -58,11 +58,16 @@ "expect": "^30.2.0", "lefthook": "^2.0.4" }, + "imports": { + "#log": "./src/utils/logger.ts", + "#db": "./src/storage/db/db.ts", + "#*": "./src/*" + }, "trustedDependencies": [ "@biomejs/biome", "lefthook" ], "engines": { - "node": ">=24.10.0" + "node": ">=25.1.0" } } diff --git a/src/app.ts b/src/app.ts index 6223089ce..7638cc53f 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,37 +1,37 @@ import { GatewayIntentBits, Partials, Client } from "discord.js"; import * as sentry from "@sentry/node"; -import { readConfig, databasePath, args } from "@/service/config.js"; -import log from "@log"; +import { readConfig, databasePath, args } from "#service/config.ts"; +import log from "#log"; import { Temporal } from "@js-temporal/polyfill"; -import "@/polyfills.js"; +import "#polyfills.ts"; -import * as kysely from "@/storage/db/db.js"; +import * as kysely from "#storage/db/db.ts"; -import type { ReactionHandler } from "@/handler/ReactionHandler.js"; -import messageDeleteHandler from "@/handler/messageDeleteHandler.js"; -import { woisVoteReactionHandler } from "@/commands/woisvote.js"; -import * as voiceStateService from "@/service/voiceState.js"; +import type { ReactionHandler } from "#handler/ReactionHandler.ts"; +import messageDeleteHandler from "#handler/messageDeleteHandler.ts"; +import { woisVoteReactionHandler } from "#commands/woisvote.ts"; +import * as voiceStateService from "#service/voiceState.ts"; -import roleAssignerHandler from "@/handler/reaction/roleAssignerHandler.js"; -import pollReactionHandler from "@/handler/reaction/pollReactionHandler.js"; -import logEmotesReactionHandler from "@/handler/reaction/logEmotesReactionHandler.js"; -import quoteReactionHandler from "@/handler/reaction/quoteHandler.js"; +import roleAssignerHandler from "#handler/reaction/roleAssignerHandler.ts"; +import pollReactionHandler from "#handler/reaction/pollReactionHandler.ts"; +import logEmotesReactionHandler from "#handler/reaction/logEmotesReactionHandler.ts"; +import quoteReactionHandler from "#handler/reaction/quoteHandler.ts"; import { handleInteractionEvent, loadCommands, messageCommandHandler, registerAllApplicationCommandsAsGuildCommands, -} from "@/handler/commandHandler.js"; -import * as guildMemberHandler from "@/handler/guildMemberHandler.js"; -import deleteThreadMessagesHandler from "@/handler/messageCreate/deleteThreadMessagesHandler.js"; -import { createBotContext, type BotContext } from "@/context.js"; -import { ehreReactionHandler } from "@/commands/ehre.js"; -import * as terminal from "@/utils/terminal.js"; -import * as cronService from "@/service/cron.js"; -import { handlePresenceUpdate } from "./handler/presenceHandler.js"; +} from "#handler/commandHandler.ts"; +import * as guildMemberHandler from "#handler/guildMemberHandler.ts"; +import deleteThreadMessagesHandler from "#handler/messageCreate/deleteThreadMessagesHandler.ts"; +import { createBotContext, type BotContext } from "#context.ts"; +import { ehreReactionHandler } from "#commands/ehre.ts"; +import * as terminal from "#utils/terminal.ts"; +import * as cronService from "#service/cron.ts"; +import { handlePresenceUpdate } from "./handler/presenceHandler.ts"; const env = process.env; @@ -130,8 +130,8 @@ process.once("SIGTERM", signal => { process.exit(1); }); process.once("exit", code => { - client.destroy(); - kysely.disconnectFromDb(); + const _ = client.destroy(); + const __ = kysely.disconnectFromDb(); log.warn(`Process exited with code: ${code}`); }); diff --git a/src/commands/aoc.ts b/src/commands/aoc.ts index 3f6a74a8c..0d2a9097b 100644 --- a/src/commands/aoc.ts +++ b/src/commands/aoc.ts @@ -7,10 +7,10 @@ import { } from "discord.js"; import type * as discord from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand } from "@/commands/command.js"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand } from "#commands/command.ts"; -import log from "@log"; +import log from "#log"; type CompletionInfo = Record<1 | 2, { get_start_ts: number }>; diff --git a/src/commands/autoEhre.ts b/src/commands/autoEhre.ts index f13d66040..0d346cbb4 100644 --- a/src/commands/autoEhre.ts +++ b/src/commands/autoEhre.ts @@ -1,7 +1,7 @@ -import type { ProcessableMessage } from "@/service/command.js"; -import type { SpecialCommand } from "@/commands/command.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { SpecialCommand } from "#commands/command.ts"; -import * as ehreService from "@/service/ehre.js"; +import * as ehreService from "#service/ehre.ts"; export default class AutoEhreCommand implements SpecialCommand { name = "AutoEhre"; diff --git a/src/commands/banlist.ts b/src/commands/banlist.ts index 6ab75b7ce..847c6ab5a 100644 --- a/src/commands/banlist.ts +++ b/src/commands/banlist.ts @@ -6,12 +6,12 @@ import { time, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { Ban } from "@/storage/db/model.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { Ban } from "#storage/db/model.ts"; -import * as banService from "@/service/ban.js"; -import log from "@log"; +import * as banService from "#service/ban.ts"; +import log from "#log"; export default class BanListCommand implements ApplicationCommand { name = "banlist"; diff --git a/src/commands/bonk.ts b/src/commands/bonk.ts index 137c4e7ea..635fa5a30 100644 --- a/src/commands/bonk.ts +++ b/src/commands/bonk.ts @@ -3,9 +3,9 @@ import * as fs from "node:fs/promises"; import { createCanvas, loadImage } from "@napi-rs/canvas"; import type { GuildMember } from "discord.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import log from "@log"; +import type { MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import log from "#log"; const createBonkMeme = async (author: GuildMember): Promise => { const bonk = await fs.readFile("assets/bonk.png"); diff --git a/src/commands/boobs.ts b/src/commands/boobs.ts index 0308bfdd4..2eac003f8 100644 --- a/src/commands/boobs.ts +++ b/src/commands/boobs.ts @@ -1,11 +1,11 @@ import { time, TimestampStyles, type User } from "discord.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { Boob } from "@/storage/db/model.js"; -import * as boob from "@/storage/boob.js"; -import log from "@log"; -import { randomEntry } from "@/service/random.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#commands/command.ts"; +import type { Boob } from "#storage/db/model.ts"; +import * as boob from "#storage/boob.ts"; +import log from "#log"; +import { randomEntry } from "#service/random.ts"; interface Booba { description: string; diff --git a/src/commands/clap.ts b/src/commands/clap.ts index 6649411c5..4c82b02bf 100644 --- a/src/commands/clap.ts +++ b/src/commands/clap.ts @@ -8,9 +8,9 @@ import { SlashCommandStringOption, } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; const clapify = (str: string): string => `${str.split(/\s+/).join(" :clap: ")} :clap:`; diff --git a/src/commands/command.ts b/src/commands/command.ts index 0c169e3d0..0f94f4c06 100644 --- a/src/commands/command.ts +++ b/src/commands/command.ts @@ -6,8 +6,8 @@ import type { SlashCommandBuilder, } from "discord.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { BotContext } from "@/context.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { BotContext } from "#context.ts"; export type Command = ApplicationCommand | AutocompleteCommand | MessageCommand | SpecialCommand; diff --git a/src/commands/dadJoke.ts b/src/commands/dadJoke.ts index 71ab1b3c1..85307f56e 100644 --- a/src/commands/dadJoke.ts +++ b/src/commands/dadJoke.ts @@ -1,10 +1,10 @@ import { cleanContent } from "discord.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { SpecialCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import { substringAfter } from "@/utils/stringUtils.js"; -import { randomEntry } from "@/service/random.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { SpecialCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import { substringAfter } from "#utils/stringUtils.ts"; +import { randomEntry } from "#service/random.ts"; type Lang = "german" | "austrian"; diff --git a/src/commands/deoida.ts b/src/commands/deoida.ts index 253d108e3..2cd047325 100644 --- a/src/commands/deoida.ts +++ b/src/commands/deoida.ts @@ -1,7 +1,7 @@ -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { MessageCommand } from "@/commands/command.js"; -import * as austrianTranslation from "@/storage/austrianTranslation.js"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#commands/command.ts"; +import * as austrianTranslation from "#storage/austrianTranslation.ts"; async function deOidaLine(line: string): Promise { // We cannot just split all words using \s*. That could tear apart words or translations like "fescher bub" diff --git a/src/commands/doener.ts b/src/commands/doener.ts index 1edd660d7..b5730660c 100644 --- a/src/commands/doener.ts +++ b/src/commands/doener.ts @@ -1,6 +1,6 @@ -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { MessageCommand } from "@/commands/command.js"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#commands/command.ts"; const prices = { kebab: 5.5, diff --git a/src/commands/download-video.ts b/src/commands/download-video.ts index b5381056d..d7d573c45 100644 --- a/src/commands/download-video.ts +++ b/src/commands/download-video.ts @@ -6,11 +6,11 @@ import { MessageFlags, } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import * as ytDlService from "@/service/ytDl.js"; -import assertNever from "@/utils/assertNever.js"; -import TempDir from "@/utils/TempDir.js"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand } from "#commands/command.ts"; +import * as ytDlService from "#service/ytDl.ts"; +import assertNever from "#utils/assertNever.ts"; +import TempDir from "#utils/TempDir.ts"; export default class DownloadVideoCommand implements ApplicationCommand { name = "Download Video"; // Must be upper case, because this name will be matched against the application command name diff --git a/src/commands/ehre.ts b/src/commands/ehre.ts index 4785e1009..6ef6f8a9c 100644 --- a/src/commands/ehre.ts +++ b/src/commands/ehre.ts @@ -12,12 +12,12 @@ import { userMention, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { EhrePoints } from "@/storage/db/model.js"; -import type { ReactionHandler } from "@/handler/ReactionHandler.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { EhrePoints } from "#storage/db/model.ts"; +import type { ReactionHandler } from "#handler/ReactionHandler.ts"; -import * as ehreService from "@/service/ehre.js"; +import * as ehreService from "#service/ehre.ts"; function createUserPointString(e: EhrePoints) { return `${userMention(e.userId)}: ${ehreService.formatPoints(e.points)}`; diff --git a/src/commands/emote.ts b/src/commands/emote.ts index 071194afa..8af6321fb 100644 --- a/src/commands/emote.ts +++ b/src/commands/emote.ts @@ -9,11 +9,11 @@ import { type AutocompleteInteraction, } from "discord.js"; -import type { ApplicationCommand, AutocompleteCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { Emote } from "@/storage/db/model.js"; -import * as emoteLoggingService from "@/service/emoteLogging.js"; -import { formatDateTime } from "@/utils/dateUtils.js"; +import type { ApplicationCommand, AutocompleteCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { Emote } from "#storage/db/model.ts"; +import * as emoteLoggingService from "#service/emoteLogging.ts"; +import { formatDateTime } from "#utils/dateUtils.ts"; function buildSingleEmoteResponse( emote: Emote, diff --git a/src/commands/emoteLogger.ts b/src/commands/emoteLogger.ts index ddd50fbe9..8e3360600 100644 --- a/src/commands/emoteLogger.ts +++ b/src/commands/emoteLogger.ts @@ -1,9 +1,9 @@ -import type { ProcessableMessage } from "@/service/command.js"; -import type { SpecialCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { SpecialCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; -import * as emoteService from "@/service/emote.js"; -import * as emoteLoggingService from "@/service/emoteLogging.js"; +import * as emoteService from "#service/emote.ts"; +import * as emoteLoggingService from "#service/emoteLogging.ts"; export default class EmoteLoggerCommand implements SpecialCommand { name = "EmoteLogger"; diff --git a/src/commands/emoteSender.ts b/src/commands/emoteSender.ts index fe45c796c..783d4face 100644 --- a/src/commands/emoteSender.ts +++ b/src/commands/emoteSender.ts @@ -1,8 +1,8 @@ import type { Message } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { SpecialCommand } from "@/commands/command.js"; -import log from "@log"; +import type { BotContext } from "#context.ts"; +import type { SpecialCommand } from "#commands/command.ts"; +import log from "#log"; export default class EmoteSenderCommand implements SpecialCommand { name = "EmoteSender"; diff --git a/src/commands/erinnerung.ts b/src/commands/erinnerung.ts index c50f33cce..89fd16187 100644 --- a/src/commands/erinnerung.ts +++ b/src/commands/erinnerung.ts @@ -12,15 +12,15 @@ import { import * as chrono from "chrono-node"; import * as sentry from "@sentry/node"; -import type { MessageCommand, ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { Reminder } from "@/storage/db/model.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import log from "@log"; -import * as reminderService from "@/storage/reminders.js"; -import * as dateUtils from "@/utils/dateUtils.js"; - -import { ensureChatInputCommand } from "@/utils/interactionUtils.js"; +import type { MessageCommand, ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { Reminder } from "#storage/db/model.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import log from "#log"; +import * as reminderService from "#storage/reminders.ts"; +import * as dateUtils from "#utils/dateUtils.ts"; + +import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; const validateDate = (date: Date): true | string => { if (!dateUtils.isValidDate(date)) { diff --git a/src/commands/erleuchtung.ts b/src/commands/erleuchtung.ts index 62c159b05..b87a85f21 100644 --- a/src/commands/erleuchtung.ts +++ b/src/commands/erleuchtung.ts @@ -1,10 +1,10 @@ import { SlashCommandBuilder } from "discord.js"; import type { CommandInteraction, CacheType } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; -import * as erleuchtungService from "@/service/erleuchtung.js"; +import * as erleuchtungService from "#service/erleuchtung.ts"; export default class ErleuchtungCommand implements MessageCommand, ApplicationCommand { name = "erleuchtung"; diff --git a/src/commands/error.ts b/src/commands/error.ts index 12096d219..a4ae8654d 100644 --- a/src/commands/error.ts +++ b/src/commands/error.ts @@ -1,6 +1,6 @@ -import type { MessageCommand } from "./command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { BotContext } from "@/context.js"; +import type { MessageCommand } from "./command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { BotContext } from "#context.ts"; export default class ErrorCommand implements MessageCommand { name = "feler"; diff --git a/src/commands/extend.ts b/src/commands/extend.ts index 752c258f4..f6b9c835c 100644 --- a/src/commands/extend.ts +++ b/src/commands/extend.ts @@ -1,15 +1,15 @@ import { ActionRowBuilder, ComponentType, type Message, StringSelectMenuBuilder } from "discord.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { Poll } from "@/storage/db/model.js"; - -import * as pollEmbedService from "@/service/pollEmbed.js"; -import { parseLegacyMessageParts } from "@/service/command.js"; -import * as pollService from "@/service/poll.js"; -import { defer } from "@/utils/interactionUtils.js"; -import { truncateToLength } from "@/utils/stringUtils.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { Poll } from "#storage/db/model.ts"; + +import * as pollEmbedService from "#service/pollEmbed.ts"; +import { parseLegacyMessageParts } from "#service/command.ts"; +import * as pollService from "#service/poll.ts"; +import { defer } from "#utils/interactionUtils.ts"; +import { truncateToLength } from "#utils/stringUtils.ts"; export default class ExtendCommand implements MessageCommand { name = "extend"; diff --git a/src/commands/faulenzerping.ts b/src/commands/faulenzerping.ts index bc8e54ce1..fd7b41c42 100644 --- a/src/commands/faulenzerping.ts +++ b/src/commands/faulenzerping.ts @@ -15,10 +15,10 @@ import { userMention, } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import { chunkArray } from "@/utils/arrayUtils.js"; -import * as time from "@/utils/time.js"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand } from "#commands/command.ts"; +import { chunkArray } from "#utils/arrayUtils.ts"; +import * as time from "#utils/time.ts"; export default class FaulenzerPingCommand implements ApplicationCommand { name = "Faulenzerping"; // Must be upper case, because this name will be matched against the application command name diff --git a/src/commands/ficktabelle.ts b/src/commands/ficktabelle.ts index 9c6b0297f..57d10c8cb 100644 --- a/src/commands/ficktabelle.ts +++ b/src/commands/ficktabelle.ts @@ -1,6 +1,6 @@ -import type { MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import { randomEntry } from "@/service/random.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import { randomEntry } from "#service/random.ts"; const FICKTABELLE_URL = "https://cdn.discordapp.com/attachments/620721921767505942/636149543154614272/20160901-164533-Kovrtep-id1487186.png"; diff --git a/src/commands/geburtstag.ts b/src/commands/geburtstag.ts index 36be70519..bd0a3f8b8 100644 --- a/src/commands/geburtstag.ts +++ b/src/commands/geburtstag.ts @@ -1,9 +1,9 @@ import { type CommandInteraction, type CacheType, SlashCommandBuilder } from "discord.js"; import * as sentry from "@sentry/node"; -import type { ApplicationCommand } from "@/commands/command.js"; -import log from "@log"; -import * as birthday from "@/storage/birthday.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import log from "#log"; +import * as birthday from "#storage/birthday.ts"; export default class GeburtstagCommand implements ApplicationCommand { name = "geburtstag"; diff --git a/src/commands/gegenstand.ts b/src/commands/gegenstand.ts index 0a7dab31f..20d41fe55 100644 --- a/src/commands/gegenstand.ts +++ b/src/commands/gegenstand.ts @@ -12,20 +12,20 @@ import { } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { LootUseCommandInteraction } from "@/storage/loot.js"; -import * as lootService from "@/service/loot.js"; -import * as petService from "@/service/pet.js"; -import * as lootRoleService from "@/service/lootRoles.js"; -import { randomEntry } from "@/service/random.js"; -import { ensureChatInputCommand } from "@/utils/interactionUtils.js"; -import * as imageService from "@/service/image.js"; - -import * as lootDataService from "@/service/lootData.js"; -import { LootAttributeKindId, LootKindId } from "@/service/lootData.js"; - -import log from "@log"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { LootUseCommandInteraction } from "#storage/loot.ts"; +import * as lootService from "#service/loot.ts"; +import * as petService from "#service/pet.ts"; +import * as lootRoleService from "#service/lootRoles.ts"; +import { randomEntry } from "#service/random.ts"; +import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; +import * as imageService from "#service/image.ts"; + +import * as lootDataService from "#service/lootData.ts"; +import { LootAttributeKindId, LootKindId } from "#service/lootData.ts"; + +import log from "#log"; export default class GegenstandCommand implements ApplicationCommand { name = "gegenstand"; diff --git a/src/commands/geringverdiener.ts b/src/commands/geringverdiener.ts index ba99f56f7..8d07e2c89 100644 --- a/src/commands/geringverdiener.ts +++ b/src/commands/geringverdiener.ts @@ -9,9 +9,9 @@ import { type GuildEmojiManager, } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; /** * Geringverdieners text diff --git a/src/commands/gibmirids.ts b/src/commands/gibmirids.ts index e498ea64c..f8dbd00ac 100644 --- a/src/commands/gibmirids.ts +++ b/src/commands/gibmirids.ts @@ -1,9 +1,9 @@ import { ChannelType } from "discord.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import * as chunkingService from "@/service/chunking.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import * as chunkingService from "#service/chunking.ts"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; /** * Info command. Displays some useless information about the bot. diff --git a/src/commands/google.ts b/src/commands/google.ts index a2802e824..24ee60ec4 100644 --- a/src/commands/google.ts +++ b/src/commands/google.ts @@ -6,8 +6,8 @@ import { SlashCommandUserOption, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import { randomEntry } from "@/service/random.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import { randomEntry } from "#service/random.ts"; const replies = [ "Da bitte, dein Suchergebnis, du Opfer: {0}", diff --git a/src/commands/hilfe.ts b/src/commands/hilfe.ts index 45ea61191..a3ee6ea78 100644 --- a/src/commands/hilfe.ts +++ b/src/commands/hilfe.ts @@ -1,8 +1,8 @@ import { channelMention } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { MessageCommand } from "@/commands/command.js"; -import * as commandService from "@/service/command.js"; -import * as chunking from "@/service/chunking.js"; +import type { BotContext } from "#context.ts"; +import type { MessageCommand } from "#commands/command.ts"; +import * as commandService from "#service/command.ts"; +import * as chunking from "#service/chunking.ts"; export default class HilfeCommand implements MessageCommand { name = "hilfe"; diff --git a/src/commands/info.ts b/src/commands/info.ts index 9b9d4412b..db952ba0b 100644 --- a/src/commands/info.ts +++ b/src/commands/info.ts @@ -9,10 +9,10 @@ import { MessageFlags, } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { BotContext } from "@/context.js"; -import assertNever from "@/utils/assertNever.js"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { BotContext } from "#context.ts"; +import assertNever from "#utils/assertNever.ts"; interface GitHubContributor { login: string; diff --git a/src/commands/instagram.test.ts b/src/commands/instagram.test.ts index bab8817fe..87e372dc1 100644 --- a/src/commands/instagram.test.ts +++ b/src/commands/instagram.test.ts @@ -2,7 +2,7 @@ import { describe, test } from "node:test"; import { expect } from "expect"; -import InstagramLink from "./instagram.js"; +import InstagramLink from "./instagram.ts"; describe("instagram pattern matching", () => { test("base cases", () => { diff --git a/src/commands/instagram.ts b/src/commands/instagram.ts index 7c07b8f20..ced6c94c2 100644 --- a/src/commands/instagram.ts +++ b/src/commands/instagram.ts @@ -1,8 +1,8 @@ import type { Message } from "discord.js"; -import type { SpecialCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import * as instagramService from "@/service/instagram.js"; +import type { SpecialCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import * as instagramService from "#service/instagram.ts"; const instagramOptions = { uriPattern: /https?:\/\/(?:www\.)?instagram\.com\/(?:reel|tv|p|share)\/([0-9a-zA-Z_-]+)\/?/gi, diff --git a/src/commands/inventar.ts b/src/commands/inventar.ts index c8588d6c1..e017fef58 100644 --- a/src/commands/inventar.ts +++ b/src/commands/inventar.ts @@ -7,14 +7,14 @@ import { type User, } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import * as lootService from "@/service/loot.js"; -import { ensureChatInputCommand } from "@/utils/interactionUtils.js"; -import * as lootDataService from "@/service/lootData.js"; -import { LootAttributeKindId } from "@/service/lootData.js"; - -import log from "@log"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand } from "#commands/command.ts"; +import * as lootService from "#service/loot.ts"; +import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; +import * as lootDataService from "#service/lootData.ts"; +import { LootAttributeKindId } from "#service/lootData.ts"; + +import log from "#log"; export default class InventarCommand implements ApplicationCommand { name = "inventar"; diff --git a/src/commands/invite.ts b/src/commands/invite.ts index 5f5d368d9..ca1b04008 100644 --- a/src/commands/invite.ts +++ b/src/commands/invite.ts @@ -1,5 +1,5 @@ -import type { ProcessableMessage } from "@/service/command.js"; -import type { MessageCommand } from "@/commands/command.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { MessageCommand } from "#commands/command.ts"; export const description = ""; diff --git a/src/commands/karte.ts b/src/commands/karte.ts index 5de49bf84..64ab22b9e 100644 --- a/src/commands/karte.ts +++ b/src/commands/karte.ts @@ -20,14 +20,14 @@ import { type User, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import * as locationService from "@/service/location.js"; -import type { BotContext } from "@/context.js"; -import { Vec2 } from "@/utils/math.js"; -import * as fontService from "@/service/font.js"; -import { extendContext, type ExtendedCanvasContext } from "@/utils/ExtendedCanvasContext.js"; -import assertNever from "@/utils/assertNever.js"; -import * as petService from "@/service/pet.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import * as locationService from "#service/location.ts"; +import type { BotContext } from "#context.ts"; +import { Vec2 } from "#utils/math.ts"; +import * as fontService from "#service/font.ts"; +import { extendContext, type ExtendedCanvasContext } from "#utils/ExtendedCanvasContext.ts"; +import assertNever from "#utils/assertNever.ts"; +import * as petService from "#service/pet.ts"; const allDirections = [ ["NW", "N", "NE"], diff --git a/src/commands/lauscher.ts b/src/commands/lauscher.ts index e92558d81..68a20a7fc 100644 --- a/src/commands/lauscher.ts +++ b/src/commands/lauscher.ts @@ -12,16 +12,16 @@ import { } from "discord.js"; import { type Canvas, createCanvas, loadImage, type Image } from "@napi-rs/canvas"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import assertNever from "@/utils/assertNever.js"; -import { getPlaybackStats, setUserRegistration, type TrackStat } from "@/service/lauscher.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import assertNever from "#utils/assertNever.ts"; +import { getPlaybackStats, setUserRegistration, type TrackStat } from "#service/lauscher.ts"; import { Temporal } from "@js-temporal/polyfill"; -import { truncateToLength } from "@/utils/stringUtils.js"; -import { chunkArray } from "@/utils/arrayUtils.js"; -import { Vec2 } from "@/utils/math.js"; -import * as fontService from "@/service/font.js"; -import { extendContext } from "@/utils/ExtendedCanvasContext.js"; +import { truncateToLength } from "#utils/stringUtils.ts"; +import { chunkArray } from "#utils/arrayUtils.ts"; +import { Vec2 } from "#utils/math.ts"; +import * as fontService from "#service/font.ts"; +import { extendContext } from "#utils/ExtendedCanvasContext.ts"; type SubCommand = "aktivierung" | "stats"; diff --git a/src/commands/metafrage.ts b/src/commands/metafrage.ts index 812a63f9f..08a287ab4 100644 --- a/src/commands/metafrage.ts +++ b/src/commands/metafrage.ts @@ -1,13 +1,13 @@ import { parseArgs, type ParseArgsConfig } from "node:util"; -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; -import { parseLegacyMessageParts } from "@/service/command.js"; -import { defer } from "@/utils/interactionUtils.js"; +import { parseLegacyMessageParts } from "#service/command.ts"; +import { defer } from "#utils/interactionUtils.ts"; -import { randomEntry } from "@/service/random.js"; +import { randomEntry } from "#service/random.ts"; const argsConfig = { options: { diff --git a/src/commands/min.ts b/src/commands/min.ts index e34006f03..6eb05d759 100644 --- a/src/commands/min.ts +++ b/src/commands/min.ts @@ -1,8 +1,8 @@ -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; -import { parseLegacyMessageParts } from "@/service/command.js"; +import { parseLegacyMessageParts } from "#service/command.ts"; export default class MinCommand implements MessageCommand { name = "min"; diff --git a/src/commands/mock.ts b/src/commands/mock.ts index 53e2d9c78..5f85a2696 100644 --- a/src/commands/mock.ts +++ b/src/commands/mock.ts @@ -8,10 +8,10 @@ import { SlashCommandStringOption, } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import { ensureChatInputCommand } from "@/utils/interactionUtils.js"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; /** * Randomly capitalize letters diff --git a/src/commands/modcommands/assigner.ts b/src/commands/modcommands/assigner.ts index 7bd2847d8..75d61aef7 100644 --- a/src/commands/modcommands/assigner.ts +++ b/src/commands/modcommands/assigner.ts @@ -1,7 +1,7 @@ -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import { parseLegacyMessageParts, type ProcessableMessage } from "@/service/command.js"; -import log from "@log"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import { parseLegacyMessageParts, type ProcessableMessage } from "#service/command.ts"; +import log from "#log"; export default class AssignerCommand implements MessageCommand { modCommand = true; diff --git a/src/commands/modcommands/ban.ts b/src/commands/modcommands/ban.ts index 744671346..2cce6018e 100644 --- a/src/commands/modcommands/ban.ts +++ b/src/commands/modcommands/ban.ts @@ -8,12 +8,12 @@ import { SlashCommandUserOption, } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { BotContext } from "@/context.js"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { BotContext } from "#context.ts"; -import * as banService from "@/service/ban.js"; -import { formatDuration } from "@/utils/dateUtils.js"; +import * as banService from "#service/ban.ts"; +import { formatDuration } from "#utils/dateUtils.ts"; export default class BanCommand implements ApplicationCommand, MessageCommand { name = "ban"; diff --git a/src/commands/modcommands/ghostwriter.ts b/src/commands/modcommands/ghostwriter.ts index 2d96cadf0..9acc75235 100644 --- a/src/commands/modcommands/ghostwriter.ts +++ b/src/commands/modcommands/ghostwriter.ts @@ -6,8 +6,8 @@ import { SlashCommandStringOption, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; export default class GhostwriterCommand implements ApplicationCommand { name = "gw"; diff --git a/src/commands/modcommands/hilfe.ts b/src/commands/modcommands/hilfe.ts index b43947b42..d2aa1640b 100644 --- a/src/commands/modcommands/hilfe.ts +++ b/src/commands/modcommands/hilfe.ts @@ -1,10 +1,10 @@ -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import * as chunkingService from "@/service/chunking.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import * as chunkingService from "#service/chunking.ts"; -import { replacePrefixPlaceholders } from "@/commands/hilfe.js"; -import * as commandService from "@/service/command.js"; +import { replacePrefixPlaceholders } from "#commands/hilfe.ts"; +import * as commandService from "#service/command.ts"; export default class ModHilfeCommand implements MessageCommand { modCommand = true; diff --git a/src/commands/modcommands/listroles.ts b/src/commands/modcommands/listroles.ts index 1fd07075c..a7757d320 100644 --- a/src/commands/modcommands/listroles.ts +++ b/src/commands/modcommands/listroles.ts @@ -1,6 +1,6 @@ -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; export default class ToggleCommand implements MessageCommand { modCommand = true; diff --git a/src/commands/modcommands/unban.ts b/src/commands/modcommands/unban.ts index 3822f8458..06f192230 100644 --- a/src/commands/modcommands/unban.ts +++ b/src/commands/modcommands/unban.ts @@ -6,10 +6,10 @@ import { } from "discord.js"; import type { Message, CommandInteraction, PermissionsString } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; -import * as banService from "@/service/ban.js"; +import * as banService from "#service/ban.ts"; export default class UnbanCommand implements ApplicationCommand, MessageCommand { name = "unban"; diff --git a/src/commands/never.ts b/src/commands/never.ts index 307c6d2fe..b8b18054b 100644 --- a/src/commands/never.ts +++ b/src/commands/never.ts @@ -7,9 +7,9 @@ import { SlashCommandStringOption, } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { BotContext } from "@/context.js"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { BotContext } from "#context.ts"; type Prompt = string; diff --git a/src/commands/nickname.ts b/src/commands/nickname.ts index 2221562de..218ead953 100644 --- a/src/commands/nickname.ts +++ b/src/commands/nickname.ts @@ -15,12 +15,12 @@ import { } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand, AutocompleteCommand } from "@/commands/command.js"; -import log from "@log"; -import { ensureChatInputCommand } from "@/utils/interactionUtils.js"; -import * as nickName from "@/storage/nickName.js"; -import * as time from "@/utils/time.js"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand, AutocompleteCommand } from "#commands/command.ts"; +import log from "#log"; +import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; +import * as nickName from "#storage/nickName.ts"; +import * as time from "#utils/time.ts"; type Vote = "YES" | "NO"; diff --git a/src/commands/nischdaaa.ts b/src/commands/nischdaaa.ts index 12b570d2e..6cb418716 100644 --- a/src/commands/nischdaaa.ts +++ b/src/commands/nischdaaa.ts @@ -1,5 +1,5 @@ -import type { ProcessableMessage } from "@/service/command.js"; -import type { SpecialCommand } from "@/commands/command.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { SpecialCommand } from "#commands/command.ts"; export default class NischdaaaCommand implements SpecialCommand { name = "Nischdaaa"; diff --git a/src/commands/oida.ts b/src/commands/oida.ts index 5aac1d58c..0db9fae13 100644 --- a/src/commands/oida.ts +++ b/src/commands/oida.ts @@ -1,9 +1,9 @@ import { type CommandInteraction, SlashCommandBuilder, SlashCommandStringOption } from "discord.js"; -import * as austrianTranslation from "@/storage/austrianTranslation.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import { ensureChatInputCommand } from "@/utils/interactionUtils.js"; +import * as austrianTranslation from "#storage/austrianTranslation.ts"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; export default class OidaCommand implements ApplicationCommand { name = "oida"; diff --git a/src/commands/penis.ts b/src/commands/penis.ts index 135e9d186..aa9625bd4 100644 --- a/src/commands/penis.ts +++ b/src/commands/penis.ts @@ -1,13 +1,13 @@ import { ContainerBuilder, MessageFlags, time, TimestampStyles, type User } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { Penis } from "@/storage/db/model.js"; -import { NormalDistribution, RandomNumberGenerator, SecureRandomSource } from "@/service/random.js"; -import * as penis from "@/storage/penis.js"; - -import log from "@log"; +import type { BotContext } from "#context.ts"; +import type { MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { Penis } from "#storage/db/model.ts"; +import { NormalDistribution, RandomNumberGenerator, SecureRandomSource } from "#service/random.ts"; +import * as penis from "#storage/penis.ts"; + +import log from "#log"; const randomSource = new SecureRandomSource(); diff --git a/src/commands/poll.ts b/src/commands/poll.ts index 5e5638f9f..05f5683ad 100644 --- a/src/commands/poll.ts +++ b/src/commands/poll.ts @@ -1,13 +1,13 @@ import { parseArgs, type ParseArgsConfig } from "node:util"; -import type { BotContext } from "@/context.js"; -import type { MessageCommand } from "@/commands/command.js"; -import { parseLegacyMessageParts, type ProcessableMessage } from "@/service/command.js"; -import * as timeUtils from "@/utils/time.js"; -import * as pollService from "@/service/poll.js"; -import * as legacyDelayedPoll from "@/service/delayedPollLegacy.js"; -import * as pollEmbedService from "@/service/pollEmbed.js"; -import { defer } from "@/utils/interactionUtils.js"; +import type { BotContext } from "#context.ts"; +import type { MessageCommand } from "#commands/command.ts"; +import { parseLegacyMessageParts, type ProcessableMessage } from "#service/command.ts"; +import * as timeUtils from "#utils/time.ts"; +import * as pollService from "#service/poll.ts"; +import * as legacyDelayedPoll from "#service/delayedPollLegacy.ts"; +import * as pollEmbedService from "#service/pollEmbed.ts"; +import { defer } from "#utils/interactionUtils.ts"; const argsConfig = { options: { diff --git a/src/commands/poll2.ts b/src/commands/poll2.ts index 1d448199b..5f832ff5e 100644 --- a/src/commands/poll2.ts +++ b/src/commands/poll2.ts @@ -11,10 +11,10 @@ import { TextInputBuilder, TextInputStyle, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; -import log from "@log"; +import log from "#log"; export default class Poll2Command implements ApplicationCommand { name = "poll2"; diff --git a/src/commands/roll.ts b/src/commands/roll.ts index 1f0853788..5337bcf17 100644 --- a/src/commands/roll.ts +++ b/src/commands/roll.ts @@ -1,11 +1,11 @@ import { ChannelType } from "discord.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; -import { parseLegacyMessageParts, type ProcessableMessage } from "@/service/command.js"; -import { defer } from "@/utils/interactionUtils.js"; -import * as rollService from "@/service/roll.js"; +import { parseLegacyMessageParts, type ProcessableMessage } from "#service/command.ts"; +import { defer } from "#utils/interactionUtils.ts"; +import * as rollService from "#service/roll.ts"; export default class RollCommand implements MessageCommand { name = "roll"; diff --git a/src/commands/saufen.ts b/src/commands/saufen.ts index 08915f6d1..c3d8ce630 100644 --- a/src/commands/saufen.ts +++ b/src/commands/saufen.ts @@ -11,10 +11,10 @@ import { type AutocompleteInteraction, } from "discord.js"; -import type { ApplicationCommand, AutocompleteCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import { connectAndPlaySaufen } from "@/handler/voiceHandler.js"; -import assertNever from "@/utils/assertNever.js"; +import type { ApplicationCommand, AutocompleteCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import { connectAndPlaySaufen } from "#handler/voiceHandler.ts"; +import assertNever from "#utils/assertNever.ts"; type SubCommand = "los" | "add" | "list" | "select"; diff --git a/src/commands/sdm.ts b/src/commands/sdm.ts index d5639ddb7..50121a0ea 100644 --- a/src/commands/sdm.ts +++ b/src/commands/sdm.ts @@ -9,9 +9,9 @@ import { EmbedBuilder, } from "discord.js"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import { substringAfter } from "@/utils/stringUtils.js"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import { substringAfter } from "#utils/stringUtils.ts"; const createSecureDecisionMessage = ( question: string, diff --git a/src/commands/selfban.ts b/src/commands/selfban.ts index 9253eb0db..26526f00e 100644 --- a/src/commands/selfban.ts +++ b/src/commands/selfban.ts @@ -1,11 +1,11 @@ import { time, TimestampStyles } from "discord.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; -import * as banService from "@/service/ban.js"; -import { parseLegacyMessageParts } from "@/service/command.js"; +import * as banService from "#service/ban.ts"; +import { parseLegacyMessageParts } from "#service/command.ts"; export default class MinCommand implements MessageCommand { name = "selfban"; diff --git a/src/commands/special/keywordReact.ts b/src/commands/special/keywordReact.ts index 01d38cd2e..6ad59a1bb 100644 --- a/src/commands/special/keywordReact.ts +++ b/src/commands/special/keywordReact.ts @@ -1,5 +1,5 @@ -import type { ProcessableMessage } from "@/service/command.js"; -import type { SpecialCommand } from "@/commands/command.js"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { SpecialCommand } from "#commands/command.ts"; // this is the former nixos.ts diff --git a/src/commands/splid.ts b/src/commands/splid.ts index d6d761b90..2f90b1c1b 100644 --- a/src/commands/splid.ts +++ b/src/commands/splid.ts @@ -13,14 +13,14 @@ import { } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; -import type { ApplicationCommand, AutocompleteCommand } from "@/commands/command.js"; -import type { SplidMember } from "@/service/splid.js"; - -import { ensureChatInputCommand } from "@/utils/interactionUtils.js"; -import * as splidLink from "@/storage/splidLink.js"; -import * as splidService from "@/service/splid.js"; -import log from "@log"; +import type { BotContext } from "#context.ts"; +import type { ApplicationCommand, AutocompleteCommand } from "#commands/command.ts"; +import type { SplidMember } from "#service/splid.ts"; + +import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; +import * as splidLink from "#storage/splidLink.ts"; +import * as splidService from "#service/splid.ts"; +import log from "#log"; const createNumberFormatter = (currency: string) => new Intl.NumberFormat("de-DE", { diff --git a/src/commands/springerWarning.ts b/src/commands/springerWarning.ts index b536b1448..a9ceaf5f7 100644 --- a/src/commands/springerWarning.ts +++ b/src/commands/springerWarning.ts @@ -1,7 +1,7 @@ import type { Message } from "discord.js"; -import type { SpecialCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; +import type { SpecialCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; const hosts = { // Taken from: diff --git a/src/commands/stempelgraph.ts b/src/commands/stempelgraph.ts index 9e756ab78..2400fb75b 100644 --- a/src/commands/stempelgraph.ts +++ b/src/commands/stempelgraph.ts @@ -10,10 +10,10 @@ import { import { Resvg } from "@resvg/resvg-js"; import * as sentry from "@sentry/node"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import * as stempelService from "@/service/stempel.js"; -import log from "@log"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import * as stempelService from "#service/stempel.ts"; +import log from "#log"; const supportedLayoutEngines = [ "circo", diff --git a/src/commands/stempelkarte.ts b/src/commands/stempelkarte.ts index 312d15e63..a2c249389 100644 --- a/src/commands/stempelkarte.ts +++ b/src/commands/stempelkarte.ts @@ -12,11 +12,11 @@ import { } from "discord.js"; import * as sentry from "@sentry/node"; -import type { ApplicationCommand } from "@/commands/command.js"; +import type { ApplicationCommand } from "#commands/command.ts"; -import * as stempelService from "@/service/stempel.js"; -import { chunkArray } from "@/utils/arrayUtils.js"; -import log from "@log"; +import * as stempelService from "#service/stempel.ts"; +import { chunkArray } from "#utils/arrayUtils.ts"; +import log from "#log"; const stempelLocations = [ // 1-3 diff --git a/src/commands/stempeln.ts b/src/commands/stempeln.ts index 02375d865..049b15fbc 100644 --- a/src/commands/stempeln.ts +++ b/src/commands/stempeln.ts @@ -5,9 +5,9 @@ import { ChatInputCommandInteraction, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import * as stempelService from "@/service/stempel.js"; -import { randomEntry } from "@/service/random.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import * as stempelService from "#service/stempel.ts"; +import { randomEntry } from "#service/random.ts"; const replies = [ "Der Bruder {0} hat den neuen Bruder {1} eingeladen und du hast dies so eben bestätigt!", diff --git a/src/commands/tiktok.ts b/src/commands/tiktok.ts index b42a0772e..26c7b0d6f 100644 --- a/src/commands/tiktok.ts +++ b/src/commands/tiktok.ts @@ -1,6 +1,6 @@ import type { Message } from "discord.js"; -import type { SpecialCommand } from "@/commands/command.js"; +import type { SpecialCommand } from "#commands/command.ts"; const proxitokInstance = "https://proxitok.pussthecat.org"; // const downloadUrlRegex = /href=["'](\/download[^"']*)["']/; diff --git a/src/commands/toggle.ts b/src/commands/toggle.ts index 8793a7030..14d3dfcf8 100644 --- a/src/commands/toggle.ts +++ b/src/commands/toggle.ts @@ -1,10 +1,10 @@ import { type APIEmbedField, EmbedBuilder, type Message } from "discord.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; -import * as pollEmbedService from "@/service/pollEmbed.js"; +import * as pollEmbedService from "#service/pollEmbed.ts"; export default class ToggleCommand implements MessageCommand { name = "toggle"; diff --git a/src/commands/vote.ts b/src/commands/vote.ts index d50467017..fcb5e8c70 100644 --- a/src/commands/vote.ts +++ b/src/commands/vote.ts @@ -2,11 +2,11 @@ import { parseArgs, type ParseArgsConfig } from "node:util"; import { cleanContent } from "discord.js"; -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; -import { parseLegacyMessageParts } from "@/service/command.js"; +import { parseLegacyMessageParts } from "#service/command.ts"; const argsConfig = { options: { diff --git a/src/commands/vote2.ts b/src/commands/vote2.ts index 20ca08f44..3a9bb71de 100644 --- a/src/commands/vote2.ts +++ b/src/commands/vote2.ts @@ -16,7 +16,7 @@ import { time, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; +import type { ApplicationCommand } from "#commands/command.ts"; export default class Vote2Command implements ApplicationCommand { name = "vote2"; diff --git a/src/commands/wat.ts b/src/commands/wat.ts index 4527e044a..57dfdda27 100644 --- a/src/commands/wat.ts +++ b/src/commands/wat.ts @@ -1,6 +1,6 @@ import type { Message } from "discord.js"; -import type { SpecialCommand } from "@/commands/command.js"; +import type { SpecialCommand } from "#commands/command.ts"; export default class WatCommand implements SpecialCommand { name = "wat"; diff --git a/src/commands/where.ts b/src/commands/where.ts index 11198b3d6..6ac7055c0 100644 --- a/src/commands/where.ts +++ b/src/commands/where.ts @@ -1,9 +1,9 @@ import { type Message, cleanContent } from "discord.js"; import { createCanvas, loadImage } from "@napi-rs/canvas"; -import type { SpecialCommand } from "@/commands/command.js"; -import * as fonts from "@/service/font.js"; -import { countWords, substringAfter } from "@/utils/stringUtils.js"; +import type { SpecialCommand } from "#commands/command.ts"; +import * as fonts from "#service/font.ts"; +import { countWords, substringAfter } from "#utils/stringUtils.ts"; export default class WhereCommand implements SpecialCommand { name = "Where"; diff --git a/src/commands/woislog.ts b/src/commands/woislog.ts index eecf6b142..a3a5eab02 100644 --- a/src/commands/woislog.ts +++ b/src/commands/woislog.ts @@ -1,7 +1,7 @@ import { type CommandInteraction, MessageFlags, SlashCommandBuilder } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import * as voiceStateService from "@/service/voiceState.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import * as voiceStateService from "#service/voiceState.ts"; export default class WoisLog implements ApplicationCommand { name = "woislog"; diff --git a/src/commands/woisvote.ts b/src/commands/woisvote.ts index c7c8f3be4..5d49094e0 100644 --- a/src/commands/woisvote.ts +++ b/src/commands/woisvote.ts @@ -16,12 +16,12 @@ import { MessageFlags, } from "discord.js"; -import type { ReactionHandler } from "@/handler/ReactionHandler.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import * as woisAction from "@/storage/woisAction.js"; -import type { BotContext } from "@/context.js"; -import { chunkArray } from "@/utils/arrayUtils.js"; -import log from "@log"; +import type { ReactionHandler } from "#handler/ReactionHandler.ts"; +import type { ApplicationCommand } from "#commands/command.ts"; +import * as woisAction from "#storage/woisAction.ts"; +import type { BotContext } from "#context.ts"; +import { chunkArray } from "#utils/arrayUtils.ts"; +import log from "#log"; const defaultWoisTime = "20:00"; // Constant can be used to check whether a message is a woisvote without querying the database diff --git a/src/commands/yoink.ts b/src/commands/yoink.ts index 41c245c6b..116e2e3d8 100644 --- a/src/commands/yoink.ts +++ b/src/commands/yoink.ts @@ -8,13 +8,13 @@ import { type PartialEmoji, } from "discord.js"; -import log from "@log"; +import log from "#log"; -import type { ApplicationCommand, MessageCommand } from "@/commands/command.js"; -import type { ProcessableMessage } from "@/service/command.js"; -import type { BotContext } from "@/context.js"; -import { ensureChatInputCommand } from "@/utils/interactionUtils.js"; -import * as emoteService from "@/service/emote.js"; +import type { ApplicationCommand, MessageCommand } from "#commands/command.ts"; +import type { ProcessableMessage } from "#service/command.ts"; +import type { BotContext } from "#context.ts"; +import { ensureChatInputCommand } from "#utils/interactionUtils.ts"; +import * as emoteService from "#service/emote.ts"; /** * Sends instructions on how to ask better questions diff --git a/src/commands/yt-dl.ts b/src/commands/yt-dl.ts index 538a974e5..15ea54b29 100644 --- a/src/commands/yt-dl.ts +++ b/src/commands/yt-dl.ts @@ -4,12 +4,12 @@ import { SlashCommandBuilder, SlashCommandStringOption, } from "discord.js"; -import type { ApplicationCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; +import type { ApplicationCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; -import * as ytDlService from "@/service/ytDl.js"; -import assertNever from "@/utils/assertNever.js"; -import TempDir from "@/utils/TempDir.js"; +import * as ytDlService from "#service/ytDl.ts"; +import assertNever from "#utils/assertNever.ts"; +import TempDir from "#utils/TempDir.ts"; export default class PollYoutubeDownloadCommand implements ApplicationCommand { name = "yt-dl"; diff --git a/src/commands/zusammenfassung.ts b/src/commands/zusammenfassung.ts index 671a22645..1da3b9d0f 100644 --- a/src/commands/zusammenfassung.ts +++ b/src/commands/zusammenfassung.ts @@ -1,6 +1,6 @@ -import type { MessageCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { MessageCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; export default class ZusammenfassungCommand implements MessageCommand { name = "zusammenfassung"; diff --git a/src/context.ts b/src/context.ts index 8238f33d8..65cf7d7e7 100644 --- a/src/context.ts +++ b/src/context.ts @@ -14,8 +14,8 @@ import type { import { ChannelType } from "discord.js"; import { Temporal } from "@js-temporal/polyfill"; -import type { UserMapEntry } from "@/commands/aoc.js"; -import { readConfig } from "@/service/config.js"; +import type { UserMapEntry } from "#commands/aoc.ts"; +import { readConfig } from "#service/config.ts"; import { SpotifyApi } from "@spotify/web-api-ts-sdk"; /** diff --git a/src/handler/ReactionHandler.ts b/src/handler/ReactionHandler.ts index 50a16b80b..f94903827 100644 --- a/src/handler/ReactionHandler.ts +++ b/src/handler/ReactionHandler.ts @@ -1,5 +1,5 @@ import type { MessageReaction, User } from "discord.js"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; export interface ReactionHandler { displayName: string; diff --git a/src/handler/commandHandler.ts b/src/handler/commandHandler.ts index 613201b35..b202a47a8 100644 --- a/src/handler/commandHandler.ts +++ b/src/handler/commandHandler.ts @@ -17,18 +17,18 @@ import * as sentry from "@sentry/node"; * Completely new bullish command handler it unifies slash commands and * message commands and relies on the "new commands" */ -import type { ApplicationCommand, Command, SpecialCommand } from "@/commands/command.js"; -import type { BotContext } from "@/context.js"; -import * as banService from "@/service/ban.js"; -import log from "@log"; +import type { ApplicationCommand, Command, SpecialCommand } from "#commands/command.ts"; +import type { BotContext } from "#context.ts"; +import * as banService from "#service/ban.ts"; +import log from "#log"; -import * as commandService from "@/service/command.js"; +import * as commandService from "#service/command.ts"; -import TriggerReactOnKeyword from "@/commands/special/keywordReact.js"; +import TriggerReactOnKeyword from "#commands/special/keywordReact.ts"; -import SplidCommand from "@/commands/splid.js"; +import SplidCommand from "#commands/splid.ts"; -import { isProcessableMessage, type ProcessableMessage } from "@/service/command.js"; +import { isProcessableMessage, type ProcessableMessage } from "#service/command.ts"; /** Commands that need special init parameters and cannot be instantiated automatically */ const staticCommands: readonly Command[] = [ diff --git a/src/handler/guildMemberHandler.ts b/src/handler/guildMemberHandler.ts index e49169f6b..5df90f587 100644 --- a/src/handler/guildMemberHandler.ts +++ b/src/handler/guildMemberHandler.ts @@ -1,9 +1,9 @@ import type { GuildMember, PartialGuildMember } from "discord.js"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; -import * as guildRageQuit from "@/storage/guildRageQuit.js"; +import * as guildRageQuit from "#storage/guildRageQuit.ts"; -import log from "@log"; +import log from "#log"; export async function added(context: BotContext, member: GuildMember) { const numRageQuits = await guildRageQuit.getNumRageQuits(member.guild, member); diff --git a/src/handler/messageCreate/deleteThreadMessagesHandler.ts b/src/handler/messageCreate/deleteThreadMessagesHandler.ts index c6f73e035..43b2b2f37 100644 --- a/src/handler/messageCreate/deleteThreadMessagesHandler.ts +++ b/src/handler/messageCreate/deleteThreadMessagesHandler.ts @@ -1,6 +1,6 @@ import { type Message, MessageType } from "discord.js"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; export default async function (message: Message, context: BotContext) { if (message.type !== MessageType.ThreadCreated) { diff --git a/src/handler/messageDeleteHandler.ts b/src/handler/messageDeleteHandler.ts index fc3d74079..669c82bfc 100644 --- a/src/handler/messageDeleteHandler.ts +++ b/src/handler/messageDeleteHandler.ts @@ -1,10 +1,10 @@ import type { ClientUser, Message } from "discord.js"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; -import * as pollService from "@/service/poll.js"; +import * as pollService from "#service/poll.ts"; -import log from "@log"; +import log from "#log"; const deleteInlineRepliesFromBot = (messageRef: Message, botUser: ClientUser) => Promise.allSettled( diff --git a/src/handler/presenceHandler.ts b/src/handler/presenceHandler.ts index e57cfed2a..c2d2d1fcc 100644 --- a/src/handler/presenceHandler.ts +++ b/src/handler/presenceHandler.ts @@ -1,7 +1,7 @@ import type { Activity, Presence } from "discord.js"; -import type { BotContext } from "@/context.js"; -import { handleSpotifyActivityUpdate, type SpotifyActivity } from "@/service/lauscher.js"; +import type { BotContext } from "#context.ts"; +import { handleSpotifyActivityUpdate, type SpotifyActivity } from "#service/lauscher.ts"; export async function handlePresenceUpdate( context: BotContext, diff --git a/src/handler/reaction/logEmotesReactionHandler.ts b/src/handler/reaction/logEmotesReactionHandler.ts index 724e7365a..6264fb98c 100644 --- a/src/handler/reaction/logEmotesReactionHandler.ts +++ b/src/handler/reaction/logEmotesReactionHandler.ts @@ -1,6 +1,6 @@ -import type { ReactionHandler } from "../ReactionHandler.js"; +import type { ReactionHandler } from "../ReactionHandler.ts"; -import * as emoteLoggingService from "@/service/emoteLogging.js"; +import * as emoteLoggingService from "#service/emoteLogging.ts"; export default { displayName: "Log Emotes Reaction Handler", diff --git a/src/handler/reaction/pollReactionHandler.ts b/src/handler/reaction/pollReactionHandler.ts index 16cccaa6b..549f912ca 100644 --- a/src/handler/reaction/pollReactionHandler.ts +++ b/src/handler/reaction/pollReactionHandler.ts @@ -1,10 +1,10 @@ import type { MessageReaction, User } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ReactionHandler } from "../ReactionHandler.js"; +import type { BotContext } from "#context.ts"; +import type { ReactionHandler } from "../ReactionHandler.ts"; -import * as pollService from "@/service/poll.js"; -import { POLL_EMOJIS, VOTE_EMOJIS } from "@/service/poll.js"; +import * as pollService from "#service/poll.ts"; +import { POLL_EMOJIS, VOTE_EMOJIS } from "#service/poll.ts"; export default { displayName: "Poll Reaction Handler", diff --git a/src/handler/reaction/quoteHandler.ts b/src/handler/reaction/quoteHandler.ts index d3cf7c718..9f3415d25 100644 --- a/src/handler/reaction/quoteHandler.ts +++ b/src/handler/reaction/quoteHandler.ts @@ -13,9 +13,9 @@ import { type ApplicationEmoji, } from "discord.js"; -import type { BotContext, QuoteConfig } from "@/context.js"; -import type { ReactionHandler } from "../ReactionHandler.js"; -import log from "@log"; +import type { BotContext, QuoteConfig } from "#context.ts"; +import type { ReactionHandler } from "../ReactionHandler.ts"; +import log from "#log"; const quoteMessage = "Ihr quoted echt jeden Scheiß, oder?"; diff --git a/src/handler/reaction/roleAssignerHandler.ts b/src/handler/reaction/roleAssignerHandler.ts index 078fe3f0d..32dd300ec 100644 --- a/src/handler/reaction/roleAssignerHandler.ts +++ b/src/handler/reaction/roleAssignerHandler.ts @@ -1,9 +1,9 @@ import type { MessageReaction, User } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ReactionHandler } from "../ReactionHandler.js"; +import type { BotContext } from "#context.ts"; +import type { ReactionHandler } from "../ReactionHandler.ts"; -import log from "@log"; +import log from "#log"; export default { displayName: "Role-Assigner Handler", diff --git a/src/handler/voiceHandler.ts b/src/handler/voiceHandler.ts index 1501b908b..3c468a1d3 100644 --- a/src/handler/voiceHandler.ts +++ b/src/handler/voiceHandler.ts @@ -18,10 +18,10 @@ import type { VoiceChannel } from "discord.js"; import * as gad from "get-audio-duration"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; -import { randomEntry } from "@/service/random.js"; -import log from "@log"; +import { randomEntry } from "#service/random.ts"; +import log from "#log"; const player = createAudioPlayer(); diff --git a/src/service/aprilFools.ts b/src/service/aprilFools.ts index 192b6135b..964d1ea77 100644 --- a/src/service/aprilFools.ts +++ b/src/service/aprilFools.ts @@ -1,11 +1,11 @@ import type { Collection, GuildMember, Role, Snowflake } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; -import * as penis from "@/storage/penis.js"; -import * as boob from "@/storage/boob.js"; -import { shuffleArray } from "@/utils/arrayUtils.js"; -import log from "@log"; +import type { BotContext } from "#context.ts"; +import * as penis from "#storage/penis.ts"; +import * as boob from "#storage/boob.ts"; +import { shuffleArray } from "#utils/arrayUtils.ts"; +import log from "#log"; // Store old usernames. Hope the bot doesn't crash lol const tmpNicknameStore: Record = {}; diff --git a/src/service/bahncard.ts b/src/service/bahncard.ts index c5bec6caf..a606a265c 100644 --- a/src/service/bahncard.ts +++ b/src/service/bahncard.ts @@ -3,12 +3,12 @@ import * as fs from "node:fs/promises"; import type { User } from "discord.js"; import { createCanvas, loadImage } from "@napi-rs/canvas"; -import type { BotContext } from "@/context.js"; -import type { Loot } from "@/storage/db/model.js"; -import type { LootTemplate } from "@/storage/loot.js"; -import * as fontService from "@/service/font.js"; -import { Vec2 } from "@/utils/math.js"; -import { extendContext } from "@/utils/ExtendedCanvasContext.js"; +import type { BotContext } from "#context.ts"; +import type { Loot } from "#storage/db/model.ts"; +import type { LootTemplate } from "#storage/loot.ts"; +import * as fontService from "#service/font.ts"; +import { Vec2 } from "#utils/math.ts"; +import { extendContext } from "#utils/ExtendedCanvasContext.ts"; const namePos = new Vec2(38, 567); const avatarPos = new Vec2(790, 230); diff --git a/src/service/ban.ts b/src/service/ban.ts index 64f191d8e..1c6347137 100644 --- a/src/service/ban.ts +++ b/src/service/ban.ts @@ -1,11 +1,11 @@ import { time, type GuildMember, type User, TimestampStyles } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; -import * as ban from "@/storage/ban.js"; -import { formatDuration } from "@/utils/dateUtils.js"; +import type { BotContext } from "#context.ts"; +import * as ban from "#storage/ban.ts"; +import { formatDuration } from "#utils/dateUtils.ts"; -import log from "@log"; +import log from "#log"; export async function processBans(context: BotContext) { const now = new Date(); diff --git a/src/service/banner.ts b/src/service/banner.ts index 0ec2e7b5b..983c0847c 100644 --- a/src/service/banner.ts +++ b/src/service/banner.ts @@ -1,9 +1,9 @@ import * as path from "node:path"; import * as fs from "node:fs/promises"; -import type { BotContext } from "@/context.js"; -import { randomEntry } from "@/service/random.js"; -import log from "@log"; +import type { BotContext } from "#context.ts"; +import { randomEntry } from "#service/random.ts"; +import log from "#log"; export const rotate = async (context: BotContext) => { log.debug("Rotating banners"); diff --git a/src/service/birthday.ts b/src/service/birthday.ts index 3101a484f..6d78c78be 100644 --- a/src/service/birthday.ts +++ b/src/service/birthday.ts @@ -1,12 +1,12 @@ import type { GuildMember, Role } from "discord.js"; import * as sentry from "@sentry/node"; -import log from "@log"; -import * as birthday from "@/storage/birthday.js"; -import * as lootService from "@/service/loot.js"; -import * as lootDataService from "@/service/lootData.js"; +import log from "#log"; +import * as birthday from "#storage/birthday.ts"; +import * as lootService from "#service/loot.ts"; +import * as lootDataService from "#service/lootData.ts"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; /** * Iterates over the list of birthdays and assigns a role to people having their cake day. diff --git a/src/service/command.ts b/src/service/command.ts index 7025f9dd6..3a4ab1395 100644 --- a/src/service/command.ts +++ b/src/service/command.ts @@ -4,10 +4,10 @@ import * as path from "node:path"; import type { Guild, GuildMember, Message } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; -import type { Command } from "@/commands/command.js"; +import type { BotContext } from "#context.ts"; +import type { Command } from "#commands/command.ts"; -import log from "@log"; +import log from "#log"; const commandExtensions = [".ts", ".js"]; const ignoredExtensions = [".spec.ts", ".test.ts", ".d.ts", ".test.js", ".spec.js"]; diff --git a/src/service/config.ts b/src/service/config.ts index 832829d86..e8c9b08b4 100644 --- a/src/service/config.ts +++ b/src/service/config.ts @@ -6,7 +6,7 @@ import * as JSONC from "comment-json"; import type { Snowflake, ActivityType } from "discord.js"; -import log from "@log"; +import log from "#log"; const configPath = path.resolve("config.json"); diff --git a/src/service/cron.ts b/src/service/cron.ts index 4b3d6e163..a5f619122 100644 --- a/src/service/cron.ts +++ b/src/service/cron.ts @@ -1,26 +1,26 @@ import { Cron, type CronOptions } from "croner"; -import type { BotContext } from "@/context.js"; -import { rerollNicknames } from "@/service/nickNameRoll.js"; -import { connectAndPlaySaufen } from "@/handler/voiceHandler.js"; -import { reminderHandler } from "@/commands/erinnerung.js"; -import { endAprilFools, startAprilFools } from "@/service/aprilFools.js"; -import { woisVoteScheduler } from "@/commands/woisvote.js"; -import { publishAocLeaderBoard } from "@/commands/aoc.js"; -import { rotate } from "@/service/banner.js"; -import { leetTask } from "@/service/purge.js"; -import { processBans } from "@/service/ban.js"; -import { runDropAttempt } from "@/service/lootDrop.js"; -import { clearWoisLogTask } from "@/service/voiceState.js"; -import { checkBirthdays } from "@/service/birthday.js"; -import { handleFadingMessages } from "@/service/fadingMessage.js"; -import { checkExpiredShifts } from "@/service/lootRoles.js"; -import { sendTrichterUnser } from "@/service/trichterUnser.js"; -import { degradeItems, exposeWithRadiation, runHalfLife } from "@/service/lootDegradation.js"; -import { hatchEggs } from "@/service/hatching.js"; +import type { BotContext } from "#context.ts"; +import { rerollNicknames } from "#service/nickNameRoll.ts"; +import { connectAndPlaySaufen } from "#handler/voiceHandler.ts"; +import { reminderHandler } from "#commands/erinnerung.ts"; +import { endAprilFools, startAprilFools } from "#service/aprilFools.ts"; +import { woisVoteScheduler } from "#commands/woisvote.ts"; +import { publishAocLeaderBoard } from "#commands/aoc.ts"; +import { rotate } from "#service/banner.ts"; +import { leetTask } from "#service/purge.ts"; +import { processBans } from "#service/ban.ts"; +import { runDropAttempt } from "#service/lootDrop.ts"; +import { clearWoisLogTask } from "#service/voiceState.ts"; +import { checkBirthdays } from "#service/birthday.ts"; +import { handleFadingMessages } from "#service/fadingMessage.ts"; +import { checkExpiredShifts } from "#service/lootRoles.ts"; +import { sendTrichterUnser } from "#service/trichterUnser.ts"; +import { degradeItems, exposeWithRadiation, runHalfLife } from "#service/lootDegradation.ts"; +import { hatchEggs } from "#service/hatching.ts"; -import * as pollLegacy from "@/service/delayedPollLegacy.js"; -import * as ehre from "@/storage/ehre.js"; +import * as pollLegacy from "#service/delayedPollLegacy.ts"; +import * as ehre from "#storage/ehre.ts"; const options = { timezone: "Europe/Berlin", diff --git a/src/service/delayedPollLegacy.ts b/src/service/delayedPollLegacy.ts index e0693517e..13bd7f80e 100644 --- a/src/service/delayedPollLegacy.ts +++ b/src/service/delayedPollLegacy.ts @@ -1,10 +1,10 @@ import type { Message, Snowflake, User } from "discord.js"; -import type { BotContext } from "@/context.js"; -import log from "@log"; -import * as additionalMessageData from "@/storage/additionalMessageData.js"; -import * as pollEmbedService from "@/service/pollEmbed.js"; -import { truncateToLength } from "@/utils/stringUtils.js"; +import type { BotContext } from "#context.ts"; +import log from "#log"; +import * as additionalMessageData from "#storage/additionalMessageData.ts"; +import * as pollEmbedService from "#service/pollEmbed.ts"; +import { truncateToLength } from "#utils/stringUtils.ts"; interface DelayedPoll { pollId: string; diff --git a/src/service/ehre.ts b/src/service/ehre.ts index 561745f49..e81ac2838 100644 --- a/src/service/ehre.ts +++ b/src/service/ehre.ts @@ -1,6 +1,6 @@ import type { User } from "discord.js"; -import * as ehre from "@/storage/ehre.js"; +import * as ehre from "#storage/ehre.ts"; export async function addEhre(thankingUser: User, ehrenbruder: User): Promise { if (thankingUser.id === ehrenbruder.id) { diff --git a/src/service/emoteLogging.ts b/src/service/emoteLogging.ts index 5fbd9d84a..9fe23de02 100644 --- a/src/service/emoteLogging.ts +++ b/src/service/emoteLogging.ts @@ -1,12 +1,12 @@ import type { MessageReaction } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { ProcessableMessage } from "@/service/command.js"; +import type { BotContext } from "#context.ts"; +import type { ProcessableMessage } from "#service/command.ts"; -import * as dbEmote from "@/storage/emote.js"; -import * as emoteService from "./emote.js"; +import * as dbEmote from "#storage/emote.ts"; +import * as emoteService from "./emote.ts"; -import log from "@log"; +import log from "#log"; export async function processReactionAdd(reactionEvent: MessageReaction, _context: BotContext) { const message = reactionEvent.message; diff --git a/src/service/fadingMessage.ts b/src/service/fadingMessage.ts index 2c3cc1fcd..a01551ddc 100644 --- a/src/service/fadingMessage.ts +++ b/src/service/fadingMessage.ts @@ -1,10 +1,10 @@ import type { TextChannel } from "discord.js"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; -import log from "@log"; -import * as fadingMessage from "@/storage/fadingMessage.js"; +import log from "#log"; +import * as fadingMessage from "#storage/fadingMessage.ts"; export async function handleFadingMessages(context: BotContext) { const now = new Date(); diff --git a/src/service/hatching.ts b/src/service/hatching.ts index 5181f9624..d106f750b 100644 --- a/src/service/hatching.ts +++ b/src/service/hatching.ts @@ -2,13 +2,13 @@ import * as fs from "node:fs/promises"; import { userMention } from "discord.js"; -import type { BotContext } from "@/context.js"; -import type { Loot } from "@/storage/db/model.js"; -import log from "@log"; -import * as time from "@/utils/time.js"; -import * as lootService from "@/service/loot.js"; -import { LootKindId, resolveLootTemplate } from "./lootData.js"; -import * as randomService from "./random.js"; +import type { BotContext } from "#context.ts"; +import type { Loot } from "#storage/db/model.ts"; +import log from "#log"; +import * as time from "#utils/time.ts"; +import * as lootService from "#service/loot.ts"; +import { LootKindId, resolveLootTemplate } from "./lootData.ts"; +import * as randomService from "./random.ts"; export async function hatchEggs(context: BotContext) { log.info("Checking egg hatching"); diff --git a/src/service/instagram.ts b/src/service/instagram.ts index 203f36b95..74b7f3e0b 100644 --- a/src/service/instagram.ts +++ b/src/service/instagram.ts @@ -4,7 +4,7 @@ import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; interface LinkEntry { quality: string; diff --git a/src/service/lauscher.ts b/src/service/lauscher.ts index b927d19e7..3602e9a29 100644 --- a/src/service/lauscher.ts +++ b/src/service/lauscher.ts @@ -1,4 +1,4 @@ -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; import { getRecentPlaybacks, insertRegistration, @@ -7,10 +7,10 @@ import { isActivatedForScrobbling, getTrackMetadata, mostRecentPlayback, -} from "@/storage/lauscher.js"; +} from "#storage/lauscher.ts"; import type { Temporal } from "@js-temporal/polyfill"; import type { Activity, User } from "discord.js"; -import log from "@log"; +import log from "#log"; export type SpotifyActivity = { name: "Spotify"; diff --git a/src/service/location.ts b/src/service/location.ts index 8837a1376..3252c5aed 100644 --- a/src/service/location.ts +++ b/src/service/location.ts @@ -1,9 +1,9 @@ import type { User } from "discord.js"; -import assertNever from "@/utils/assertNever.js"; +import assertNever from "#utils/assertNever.ts"; -import * as locationHistory from "@/storage/locationHistory.js"; -import type { MapLocation } from "@/storage/db/model.js"; +import * as locationHistory from "#storage/locationHistory.ts"; +import type { MapLocation } from "#storage/db/model.ts"; import fs from "node:fs/promises"; import path from "node:path"; diff --git a/src/service/loot.ts b/src/service/loot.ts index a09f072ea..d875416d6 100644 --- a/src/service/loot.ts +++ b/src/service/loot.ts @@ -1,9 +1,9 @@ import type { User, Snowflake, Message } from "discord.js"; -import type { LootId, LootInsertable, LootOrigin } from "@/storage/db/model.js"; -import type { LootAttributeKindId, LootKindId } from "./lootData.js"; -import * as loot from "@/storage/loot.js"; -import * as lootDataService from "@/service/lootData.js"; +import type { LootId, LootInsertable, LootOrigin } from "#storage/db/model.ts"; +import type { LootAttributeKindId, LootKindId } from "./lootData.ts"; +import * as loot from "#storage/loot.ts"; +import * as lootDataService from "#service/lootData.ts"; export async function getInventoryContents(user: User): Promise { const contents = await loot.findOfUserWithAttributes(user); diff --git a/src/service/lootData.test.ts b/src/service/lootData.test.ts index 424c88102..327aadd70 100644 --- a/src/service/lootData.test.ts +++ b/src/service/lootData.test.ts @@ -3,7 +3,7 @@ import * as fs from "node:fs/promises"; import { expect } from "expect"; -import { lootTemplates } from "./lootData.js"; +import { lootTemplates } from "./lootData.ts"; describe("loot template assets", () => { const assets = lootTemplates.filter(l => l.asset).map(l => l.asset as string); diff --git a/src/service/lootData.ts b/src/service/lootData.ts index d9135cdc9..78a794f52 100644 --- a/src/service/lootData.ts +++ b/src/service/lootData.ts @@ -1,11 +1,11 @@ -import type { LootAttributeTemplate, LootTemplate } from "@/storage/loot.js"; +import type { LootAttributeTemplate, LootTemplate } from "#storage/loot.ts"; -import * as lootDropService from "@/service/lootDrop.js"; -import * as lootService from "@/service/loot.js"; -import * as emoteService from "@/service/emote.js"; -import * as bahnCardService from "@/service/bahncard.js"; +import * as lootDropService from "#service/lootDrop.ts"; +import * as lootService from "#service/loot.ts"; +import * as emoteService from "#service/emote.ts"; +import * as bahnCardService from "#service/bahncard.ts"; import { GuildMember, type Guild } from "discord.js"; -import type { Loot, LootAttribute } from "@/storage/db/model.js"; +import type { Loot, LootAttribute } from "#storage/db/model.ts"; const ACHTUNG_NICHT_DROPBAR_WEIGHT_KG = 0; @@ -382,7 +382,7 @@ export const lootTemplateMap: Record = { asset: "assets/loot/23-ehre.jpg", excludeFromInventory: true, onDrop: async (_context, winner, _channel, _loot) => { - const ehre = await import("@/storage/ehre.js"); + const ehre = await import("#/storage/ehre.js"); await ehre.addPoints(winner.id, 1); }, }, diff --git a/src/service/lootDegradation.ts b/src/service/lootDegradation.ts index af96bc886..97a4a97b9 100644 --- a/src/service/lootDegradation.ts +++ b/src/service/lootDegradation.ts @@ -1,11 +1,11 @@ import { type BaseMessageOptions, type Snowflake, userMention } from "discord.js"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; -import * as time from "@/utils/time.js"; -import * as lootService from "@/service/loot.js"; -import { LootAttributeKindId, LootKindId, resolveLootTemplate } from "@/service/lootData.js"; -import log from "@log"; -import { randomEntry } from "@/service/random.js"; +import * as time from "#utils/time.ts"; +import * as lootService from "#service/loot.ts"; +import { LootAttributeKindId, LootKindId, resolveLootTemplate } from "#service/lootData.ts"; +import log from "#log"; +import { randomEntry } from "#service/random.ts"; export async function degradeItems(_context: BotContext) { log.info("Degrading loot items"); diff --git a/src/service/lootDrop.ts b/src/service/lootDrop.ts index a30131710..09e8a7ebc 100644 --- a/src/service/lootDrop.ts +++ b/src/service/lootDrop.ts @@ -20,20 +20,20 @@ import { import { Temporal } from "@js-temporal/polyfill"; import * as sentry from "@sentry/node"; -import type { BotContext } from "@/context.js"; -import type { Loot, LootId } from "@/storage/db/model.js"; -import type { LootTemplate } from "@/storage/loot.js"; -import { randomBoolean, randomEntry, randomEntryWeighted } from "@/service/random.js"; +import type { BotContext } from "#context.ts"; +import type { Loot, LootId } from "#storage/db/model.ts"; +import type { LootTemplate } from "#storage/loot.ts"; +import { randomBoolean, randomEntry, randomEntryWeighted } from "#service/random.ts"; -import * as lootService from "@/service/loot.js"; +import * as lootService from "#service/loot.ts"; import { LootAttributeClassId, lootAttributeTemplates, LootKindId, lootTemplates, -} from "@/service/lootData.js"; +} from "#service/lootData.ts"; -import log from "@log"; +import log from "#log"; const lootTimeoutMs = 60 * 1000; diff --git a/src/service/lootRoles.ts b/src/service/lootRoles.ts index ead0fc88c..b0cdf60fb 100644 --- a/src/service/lootRoles.ts +++ b/src/service/lootRoles.ts @@ -1,11 +1,11 @@ import type { GuildChannel, GuildMember, TextChannel } from "discord.js"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; -import { LootKindId } from "@/service/lootData.js"; -import * as lootService from "@/service/loot.js"; +import { LootKindId } from "#service/lootData.ts"; +import * as lootService from "#service/loot.ts"; -import log from "@log"; +import log from "#log"; export async function startAsseGuardShift( context: BotContext, diff --git a/src/service/nickNameRoll.ts b/src/service/nickNameRoll.ts index 9be06dc04..a95b7648f 100644 --- a/src/service/nickNameRoll.ts +++ b/src/service/nickNameRoll.ts @@ -1,9 +1,9 @@ import * as sentry from "@sentry/node"; -import * as nickName from "@/storage/nickName.js"; -import { randomEntry } from "@/service/random.js"; -import log from "@log"; -import type { BotContext } from "@/context.js"; +import * as nickName from "#storage/nickName.ts"; +import { randomEntry } from "#service/random.ts"; +import log from "#log"; +import type { BotContext } from "#context.ts"; export async function rerollNicknames(context: BotContext) { log.debug("Entered `rerollNicknames`"); diff --git a/src/service/pet.ts b/src/service/pet.ts index de55d2b57..66b34292d 100644 --- a/src/service/pet.ts +++ b/src/service/pet.ts @@ -1,9 +1,9 @@ import type { User } from "discord.js"; -import * as lootService from "@/service/loot.js"; -import { LootKindId } from "./lootData.js"; -import * as pet from "@/storage/pet.js"; -import * as lootData from "@/service/lootData.js"; +import * as lootService from "#service/loot.ts"; +import { LootKindId } from "./lootData.ts"; +import * as pet from "#storage/pet.ts"; +import * as lootData from "#service/lootData.ts"; const petCandidates = new Set([ LootKindId.KADSE, diff --git a/src/service/poll.ts b/src/service/poll.ts index 8fab166ff..8a847861a 100644 --- a/src/service/poll.ts +++ b/src/service/poll.ts @@ -1,15 +1,15 @@ import type { GuildMember, Message, MessageReaction, TextBasedChannel, User } from "discord.js"; import type { Temporal } from "@js-temporal/polyfill"; -import * as legacyDelayedPoll from "@/service/delayedPollLegacy.js"; -import type { Poll, PollId } from "@/storage/db/model.js"; -import type { BotContext } from "@/context.js"; -import * as polls from "@/storage/poll.js"; -import * as fadingMessage from "@/storage/fadingMessage.js"; -import * as additionalMessageData from "@/storage/additionalMessageData.js"; -import { EMOJI } from "@/service/pollEmbed.js"; - -import log from "@log"; +import * as legacyDelayedPoll from "#service/delayedPollLegacy.ts"; +import type { Poll, PollId } from "#storage/db/model.ts"; +import type { BotContext } from "#context.ts"; +import * as polls from "#storage/poll.ts"; +import * as fadingMessage from "#storage/fadingMessage.ts"; +import * as additionalMessageData from "#storage/additionalMessageData.ts"; +import { EMOJI } from "#service/pollEmbed.ts"; + +import log from "#log"; export const POLL_EMOJIS = EMOJI; export const VOTE_EMOJIS = ["👍", "👎"]; diff --git a/src/service/purge.ts b/src/service/purge.ts index 70d158517..b2596d247 100644 --- a/src/service/purge.ts +++ b/src/service/purge.ts @@ -1,6 +1,6 @@ -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; -import log from "@log"; +import log from "#log"; export async function leetTask(context: BotContext) { const { hauptchat } = context.textChannels; diff --git a/src/service/splid.ts b/src/service/splid.ts index fec25cee2..e6105db32 100644 --- a/src/service/splid.ts +++ b/src/service/splid.ts @@ -1,11 +1,11 @@ import type { Guild, User } from "discord.js"; import { SplidClient } from "splid-js"; -import type { SplidGroup } from "@/storage/db/model.js"; +import type { SplidGroup } from "#storage/db/model.ts"; -import * as splidGroup from "@/storage/splidGroup.js"; -import * as time from "@/utils/time.js"; -import log from "@log"; +import * as splidGroup from "#storage/splidGroup.ts"; +import * as time from "#utils/time.ts"; +import log from "#log"; type ExternalInfo = { name: string; objectId: string }; diff --git a/src/service/stempel.ts b/src/service/stempel.ts index 58ede7c46..eab2a9b0f 100644 --- a/src/service/stempel.ts +++ b/src/service/stempel.ts @@ -1,6 +1,6 @@ import type { GuildMember } from "discord.js"; -import * as stempel from "@/storage/stempel.js"; +import * as stempel from "#storage/stempel.ts"; export function getStempelByInviter(inviter: GuildMember) { return stempel.getStempelByInviter(inviter); diff --git a/src/service/trichterUnser.ts b/src/service/trichterUnser.ts index 67cc6ab09..6bb93c867 100644 --- a/src/service/trichterUnser.ts +++ b/src/service/trichterUnser.ts @@ -1,5 +1,5 @@ import { ContainerBuilder, MessageFlags } from "discord.js"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; export async function sendTrichterUnser(ctx: BotContext) { const trichterEmote = ctx.guild.emojis.cache.find(value => value.name === "trichter"); diff --git a/src/service/voiceState.ts b/src/service/voiceState.ts index 4971bbcb3..81faad44c 100644 --- a/src/service/voiceState.ts +++ b/src/service/voiceState.ts @@ -1,6 +1,6 @@ import type { VoiceState } from "discord.js"; -import type { BotContext } from "@/context.js"; -import log from "@log"; +import type { BotContext } from "#context.ts"; +import log from "#log"; export interface VoiceUpdateEvent { oldState: VoiceState; diff --git a/src/service/ytDl.ts b/src/service/ytDl.ts index 3a1e10759..30fdaa897 100644 --- a/src/service/ytDl.ts +++ b/src/service/ytDl.ts @@ -3,7 +3,7 @@ import * as fs from "node:fs/promises"; import { create as createYoutubeDl, type Flags, type Payload } from "youtube-dl-exec"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; const ytdl = createYoutubeDl("yt-dlp"); diff --git a/src/storage/additionalMessageData.ts b/src/storage/additionalMessageData.ts index 4b36a1143..59265682b 100644 --- a/src/storage/additionalMessageData.ts +++ b/src/storage/additionalMessageData.ts @@ -1,7 +1,7 @@ import type { Message } from "discord.js"; -import type { AdditionalMessageData, DataUsage } from "./db/model.js"; -import db from "@db"; +import type { AdditionalMessageData, DataUsage } from "./db/model.ts"; +import db from "#db"; export async function getForMessage(message: Message, usage: DataUsage, ctx = db()) { if (!message.guild) { diff --git a/src/storage/austrianTranslation.ts b/src/storage/austrianTranslation.ts index 597272e1b..91d17880f 100644 --- a/src/storage/austrianTranslation.ts +++ b/src/storage/austrianTranslation.ts @@ -1,8 +1,8 @@ import type { GuildMember } from "discord.js"; -import type { AustrianTranslation } from "./db/model.js"; -import db from "@db"; -import log from "@log"; +import type { AustrianTranslation } from "./db/model.ts"; +import db from "#db"; +import log from "#log"; export function persistOrUpdate( addedBy: GuildMember, diff --git a/src/storage/ban.ts b/src/storage/ban.ts index 901f8574a..0a97631e9 100644 --- a/src/storage/ban.ts +++ b/src/storage/ban.ts @@ -1,8 +1,8 @@ import type { GuildMember, Snowflake, User } from "discord.js"; -import type { Ban } from "./db/model.js"; -import db from "@db"; -import log from "@log"; +import type { Ban } from "./db/model.ts"; +import db from "#db"; +import log from "#log"; export async function persistOrUpdate( user: GuildMember, diff --git a/src/storage/birthday.ts b/src/storage/birthday.ts index 95ced88d0..7006869b9 100644 --- a/src/storage/birthday.ts +++ b/src/storage/birthday.ts @@ -1,7 +1,7 @@ import type { Snowflake } from "discord.js"; -import type { Birthday, OneBasedMonth } from "./db/model.js"; -import db from "@db"; +import type { Birthday, OneBasedMonth } from "./db/model.ts"; +import db from "#db"; export function getBirthday(userId: Snowflake, ctx = db()): Promise { return ctx.selectFrom("birthdays").where("userId", "=", userId).selectAll().executeTakeFirst(); diff --git a/src/storage/boob.ts b/src/storage/boob.ts index 9d8f05dc2..dc7224658 100644 --- a/src/storage/boob.ts +++ b/src/storage/boob.ts @@ -1,9 +1,9 @@ import type { Snowflake, User } from "discord.js"; -import type { Boob } from "./db/model.js"; +import type { Boob } from "./db/model.ts"; -import db from "@db"; -import log from "@log"; +import db from "#db"; +import log from "#log"; export function insertMeasurement( user: User, diff --git a/src/storage/db/database-test-init.ts b/src/storage/db/database-test-init.ts index bbd77defb..cf7752d31 100644 --- a/src/storage/db/database-test-init.ts +++ b/src/storage/db/database-test-init.ts @@ -1,4 +1,4 @@ -import { connectToDb, disconnectFromDb } from "./db.js"; +import { connectToDb, disconnectFromDb } from "./db.ts"; export async function createDatabase() { await connectToDb(":memory:"); diff --git a/src/storage/db/date-plugin.ts b/src/storage/db/date-plugin.ts index 02c7d587a..53ab9df0c 100644 --- a/src/storage/db/date-plugin.ts +++ b/src/storage/db/date-plugin.ts @@ -7,7 +7,7 @@ import type { UnknownRow, } from "kysely"; -import log from "@log"; +import log from "#log"; export default { transformQuery(args: PluginTransformQueryArgs): RootOperationNode { diff --git a/src/storage/db/db.ts b/src/storage/db/db.ts index 17c9018b5..891da6763 100644 --- a/src/storage/db/db.ts +++ b/src/storage/db/db.ts @@ -6,11 +6,11 @@ import { FileMigrationProvider, SqliteDialect, Kysely, Migrator } from "kysely"; import SQLite from "better-sqlite3"; import { captureException, startInactiveSpan } from "@sentry/node"; -import type { Database } from "./model.js"; -import datePlugin from "./date-plugin.js"; -import { SqliteBooleanPlugin } from "./boolean-plugin.js"; -import assertNever from "@/utils/assertNever.js"; -import log from "@log"; +import type { Database } from "./model.ts"; +import datePlugin from "./date-plugin.ts"; +import { SqliteBooleanPlugin } from "./boolean-plugin.ts"; +import assertNever from "#utils/assertNever.ts"; +import log from "#log"; let kysely: Kysely; diff --git a/src/storage/ehre.ts b/src/storage/ehre.ts index 192f4d4ec..0029e7fbe 100644 --- a/src/storage/ehre.ts +++ b/src/storage/ehre.ts @@ -1,9 +1,9 @@ import { sql } from "kysely"; import type { Snowflake, User } from "discord.js"; -import type { EhrePoints } from "./db/model.js"; -import db from "@db"; -import log from "@log"; +import type { EhrePoints } from "./db/model.ts"; +import db from "#db"; +import log from "#log"; export async function hasVoted(userId: Snowflake, ctx = db()): Promise { const { votes } = await ctx diff --git a/src/storage/emote.ts b/src/storage/emote.ts index 41d2f1340..a1b89b17f 100644 --- a/src/storage/emote.ts +++ b/src/storage/emote.ts @@ -1,9 +1,9 @@ import { sql } from "kysely"; import type { Message, Snowflake } from "discord.js"; -import type { Emote } from "./db/model.js"; +import type { Emote } from "./db/model.ts"; -import db from "@db"; +import db from "#db"; export async function logMessageUse( emoteId: Snowflake, diff --git a/src/storage/fadingMessage.ts b/src/storage/fadingMessage.ts index 7b33c4eca..91c1652f1 100644 --- a/src/storage/fadingMessage.ts +++ b/src/storage/fadingMessage.ts @@ -1,7 +1,7 @@ import type { Message } from "discord.js"; -import type { FadingMessage } from "./db/model.js"; -import db from "@db"; +import type { FadingMessage } from "./db/model.ts"; +import db from "#db"; export function startFadingMessage( message: Message, diff --git a/src/storage/guildRageQuit.ts b/src/storage/guildRageQuit.ts index 8a92b7864..a48cd8da1 100644 --- a/src/storage/guildRageQuit.ts +++ b/src/storage/guildRageQuit.ts @@ -1,7 +1,7 @@ import type { Guild, GuildMember, PartialGuildMember } from "discord.js"; import { sql } from "kysely"; -import db from "@db"; +import db from "#db"; export async function getNumRageQuits( guild: Guild, diff --git a/src/storage/lauscher.ts b/src/storage/lauscher.ts index 15ef33b7a..17b7ab338 100644 --- a/src/storage/lauscher.ts +++ b/src/storage/lauscher.ts @@ -1,10 +1,10 @@ import { Temporal } from "@js-temporal/polyfill"; // TODO: Remove once Node.js ships temporal import type { User } from "discord.js"; -import type { LauscherRegistration, LauscherSpotifyLogEntry } from "@/storage/db/model.js"; +import type { LauscherRegistration, LauscherSpotifyLogEntry } from "#storage/db/model.ts"; -import db from "@db"; -import log from "@log"; +import db from "#db"; +import log from "#log"; import type { Artist, Track } from "@spotify/web-api-ts-sdk"; export function insertRegistration( diff --git a/src/storage/locationHistory.ts b/src/storage/locationHistory.ts index 9f0a7a295..65bf5c54e 100644 --- a/src/storage/locationHistory.ts +++ b/src/storage/locationHistory.ts @@ -1,7 +1,7 @@ import type { Snowflake } from "discord.js"; -import db from "@db"; -import type { MapLocation } from "@/storage/db/model.js"; +import db from "#db"; +import type { MapLocation } from "#storage/db/model.ts"; export async function getPositionForUser( userId: Snowflake, diff --git a/src/storage/loot.ts b/src/storage/loot.ts index 6d92b48d8..58292bd50 100644 --- a/src/storage/loot.ts +++ b/src/storage/loot.ts @@ -9,7 +9,7 @@ import type { } from "discord.js"; import { type ExpressionBuilder, sql } from "kysely"; -import type { BotContext } from "@/context.js"; +import type { BotContext } from "#context.ts"; import type { Database, Loot, @@ -17,10 +17,10 @@ import type { LootInsertable, LootOrigin, LootAttribute, -} from "./db/model.js"; +} from "./db/model.ts"; -import db from "@db"; -import { resolveLootAttributeTemplate, type LootAttributeKindId } from "@/service/lootData.js"; +import db from "#db"; +import { resolveLootAttributeTemplate, type LootAttributeKindId } from "#service/lootData.ts"; export type LootUseCommandInteraction = ChatInputCommandInteraction & { channel: GuildTextBasedChannel; diff --git a/src/storage/nickName.ts b/src/storage/nickName.ts index b6798ea65..6ba1feff2 100644 --- a/src/storage/nickName.ts +++ b/src/storage/nickName.ts @@ -1,9 +1,9 @@ import type { Snowflake, User } from "discord.js"; -import type { NickName } from "./db/model.js"; +import type { NickName } from "./db/model.ts"; -import db from "@db"; -import log from "@log"; +import db from "#db"; +import log from "#log"; export async function insertNickname( userId: Snowflake, diff --git a/src/storage/penis.ts b/src/storage/penis.ts index 1f0249005..9c664f499 100644 --- a/src/storage/penis.ts +++ b/src/storage/penis.ts @@ -1,9 +1,9 @@ import type { Snowflake, User } from "discord.js"; -import type { Penis } from "@/storage/db/model.js"; +import type { Penis } from "#storage/db/model.ts"; -import db from "@db"; -import log from "@log"; +import db from "#db"; +import log from "#log"; export function insertMeasurement( user: User, diff --git a/src/storage/pet.ts b/src/storage/pet.ts index b079d705f..a61427c95 100644 --- a/src/storage/pet.ts +++ b/src/storage/pet.ts @@ -1,9 +1,9 @@ import type { Snowflake } from "discord.js"; -import db from "@db"; -import type { Pet } from "./db/model.js"; +import db from "#db"; +import type { Pet } from "./db/model.ts"; -import * as loot from "./loot.js"; +import * as loot from "./loot.ts"; export async function setPet(ownerId: Snowflake, lootId: number, petName: string): Promise { if (petName.trim().length === 0) { diff --git a/src/storage/poll.ts b/src/storage/poll.ts index 5d0ef566a..b5d86c39b 100644 --- a/src/storage/poll.ts +++ b/src/storage/poll.ts @@ -1,8 +1,8 @@ import type { Snowflake } from "discord.js"; import type { Temporal } from "@js-temporal/polyfill"; -import db from "@db"; -import type { Poll, PollAnswer, PollId, PollOption, PollOptionId } from "./db/model.js"; +import db from "#db"; +import type { Poll, PollAnswer, PollId, PollOption, PollOptionId } from "./db/model.ts"; export interface MessageLocation { guildId: Snowflake; diff --git a/src/storage/reminders.ts b/src/storage/reminders.ts index 347b184a0..19b7e62e2 100644 --- a/src/storage/reminders.ts +++ b/src/storage/reminders.ts @@ -1,9 +1,9 @@ import type { Snowflake, User } from "discord.js"; -import type { Reminder } from "./db/model.js"; +import type { Reminder } from "./db/model.ts"; -import db from "@db"; -import log from "@log"; +import db from "#db"; +import log from "#log"; export async function removeReminder(reminderId: Reminder["id"], ctx = db()) { await ctx.deleteFrom("reminders").where("id", "=", reminderId).execute(); diff --git a/src/storage/splidGroup.ts b/src/storage/splidGroup.ts index 505720458..7a5035336 100644 --- a/src/storage/splidGroup.ts +++ b/src/storage/splidGroup.ts @@ -1,9 +1,9 @@ import type { Guild, User } from "discord.js"; -import type { SplidGroup } from "./db/model.js"; +import type { SplidGroup } from "./db/model.ts"; -import db from "@db"; -import log from "@log"; +import db from "#db"; +import log from "#log"; export function createSplidGroup( creator: User, diff --git a/src/storage/splidLink.ts b/src/storage/splidLink.ts index cb83ee84b..22380d288 100644 --- a/src/storage/splidLink.ts +++ b/src/storage/splidLink.ts @@ -1,9 +1,9 @@ import type { Guild, Snowflake, User } from "discord.js"; -import type { SplidLink } from "./db/model.js"; +import type { SplidLink } from "./db/model.ts"; -import db from "@db"; -import log from "@log"; +import db from "#db"; +import log from "#log"; export function createLink( guild: Guild, diff --git a/src/storage/stempel.ts b/src/storage/stempel.ts index 8297be20a..d58e7f298 100644 --- a/src/storage/stempel.ts +++ b/src/storage/stempel.ts @@ -1,7 +1,7 @@ import type { GuildMember } from "discord.js"; -import type { Stempel } from "./db/model.js"; -import db from "@db"; +import type { Stempel } from "./db/model.ts"; +import db from "#db"; /** * @returns true/false depending if the invitedMember is already in the database diff --git a/src/storage/woisAction.ts b/src/storage/woisAction.ts index 223d6c90e..c51592337 100644 --- a/src/storage/woisAction.ts +++ b/src/storage/woisAction.ts @@ -1,7 +1,7 @@ import type { Message, PartialMessage, Snowflake, User } from "discord.js"; -import type { WoisAction } from "./db/model.js"; -import db from "@db"; +import type { WoisAction } from "./db/model.ts"; +import db from "#db"; export async function insertWoisAction( message: Message, diff --git a/src/utils/ExtendedCanvasContext.ts b/src/utils/ExtendedCanvasContext.ts index 8d8c9dee1..8257dc23b 100644 --- a/src/utils/ExtendedCanvasContext.ts +++ b/src/utils/ExtendedCanvasContext.ts @@ -1,7 +1,7 @@ import type { SKRSContext2D, Image } from "@napi-rs/canvas"; -import * as fontService from "@/service/font.js"; -import type { Vec2 } from "./math.js"; +import * as fontService from "#service/font.ts"; +import type { Vec2 } from "./math.ts"; export interface ExtendedCanvasContext extends SKRSContext2D { circlePath( diff --git a/src/utils/TempDir.ts b/src/utils/TempDir.ts index cd2d24644..4ce6c3128 100644 --- a/src/utils/TempDir.ts +++ b/src/utils/TempDir.ts @@ -1,7 +1,7 @@ import * as fs from "node:fs/promises"; import * as sentry from "@sentry/node"; -import log from "@log"; +import log from "#log"; export default class TempDir { readonly path: string; diff --git a/src/utils/smoke.test.ts b/src/utils/smoke.test.ts index 405b03f2b..3efbcedd3 100644 --- a/src/utils/smoke.test.ts +++ b/src/utils/smoke.test.ts @@ -2,10 +2,10 @@ import { describe, test } from "node:test"; import { expect } from "expect"; -import { createDatabase, closeDatabase } from "@/storage/db/database-test-init.js"; -import { defer } from "@/utils/interactionUtils.js"; +import { createDatabase, closeDatabase } from "#storage/db/database-test-init.ts"; +import { defer } from "#utils/interactionUtils.ts"; -import db from "@db"; +import db from "#db"; describe("smoke", () => { test("does math still hold?", () => { diff --git a/tsconfig.json b/tsconfig.json index 572e620fe..a8a8639c7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,9 +21,9 @@ "paths": { "*": ["./*"], - "@/*": ["./src/*"], - "@log": ["./src/utils/logger.ts"], - "@db": ["./src/storage/db/db.ts"] + "#log": ["./src/utils/logger.ts"], + "#db": ["./src/storage/db/db.ts"], + "#*": ["./src/*"] } }, "include": ["src"]