From 4a2d28c600fc82e50053970ecfbe7dc039c0335b Mon Sep 17 00:00:00 2001 From: Alex Rock Ancelet Date: Sun, 22 Sep 2024 16:56:41 +0200 Subject: [PATCH] Try to use SvelteAdmin --- .gitignore | 2 - .prettierrc | 18 +- package.json | 3 + pnpm-lock.yaml | 543 ++++++++++++++++++ src-tauri/Cargo.lock | 296 +++++----- .../src/commands/bank_account_get_by_id.rs | 19 + src-tauri/src/entities/bank_accounts.rs | 29 + src-tauri/src/main.rs | 2 + src/app.html | 2 - .../components/PaginatedTable/Filter.svelte | 272 --------- .../PaginatedTable/ItemFieldValue.svelte | 30 - .../PaginatedTable/ItemHeadCell.svelte | 57 -- .../components/PaginatedTable/ItemLine.svelte | 45 -- .../PaginatedTable/PaginatedTable.svelte | 224 -------- src/lib/admin/components/SpinLoader.svelte | 76 --- src/lib/admin/src/FilterWithValue.ts | 2 +- src/lib/crud/Dashboard.ts | 39 ++ src/lib/crud/cruds/BankAccountsCrud.ts | 98 ++++ src/lib/crud/cruds/OperationCrud.ts | 98 ++++ src/lib/crud/cruds/TagRulesCrud.ts | 104 ++++ src/lib/crud/cruds/TagsCrud.ts | 90 +++ src/lib/crud/cruds/TriageCrud.ts | 135 +++++ src/lib/db/bank_accounts.ts | 55 +- src/lib/db/operations.ts | 31 +- src/lib/db/tag_rules.ts | 26 +- src/lib/db/tags.ts | 33 +- src/lib/entities/BankAccount.ts | 8 + src/lib/entities/Operation.ts | 32 +- src/lib/entities/Tag.ts | 8 + src/lib/entities/TagRule.ts | 19 + src/lib/utils/date.ts | 2 +- src/{routes => old_routes}/+error.svelte | 0 src/{routes => old_routes}/+layout.svelte | 1 - src/{routes => old_routes}/+layout.ts | 0 src/{routes => old_routes}/+page.svelte | 0 .../analytics/+page.svelte | 2 + .../bank-accounts/+page.svelte | 0 .../bank-accounts/edit/[id]/+layout.ts | 0 .../bank-accounts/edit/[id]/+page.svelte | 0 .../bank-accounts/new/+page.svelte | 0 .../operations/+page.svelte | 0 .../operations/edit/[id]/+layout.ts | 0 .../operations/edit/[id]/+page.svelte | 0 .../operations/edit/triage-[id]/+layout.ts | 0 .../operations/edit/triage-[id]/+page.svelte | 0 .../tag-rules/+page.svelte | 0 .../tag-rules/edit/[id]/+layout.ts | 0 .../tag-rules/edit/[id]/+page.svelte | 0 .../tag-rules/new/+page.svelte | 0 src/{routes => old_routes}/tags/+page.svelte | 0 .../tags/edit/[id]/+layout.ts | 0 .../tags/edit/[id]/+page.svelte | 0 .../tags/new/+page.svelte | 0 .../triage/+page.svelte | 0 src/routes/(main)/+layout.svelte | 7 + src/routes/(main)/+layout.ts | 3 + src/routes/(main)/+page.server.ts | 1 + src/routes/(main)/+page.svelte | 17 + src/routes/(main)/import/+page.svelte | 15 + .../{ => (main)}/import/csv/+page.svelte | 387 ++++++------- .../{ => (main)}/import/ofx/+page.svelte | 0 src/routes/(svelteadmin)/+layout.svelte | 1 + .../crud/[crud]/[operation]/+page.server.ts | 19 + .../crud/[crud]/[operation]/+page.svelte | 23 + src/routes/import/+page.svelte | 20 - src/style/_app.scss | 47 -- src/style/bootstrap.scss | 68 --- tests/webdriverio/helpers/test_helpers.ts | 8 - tests/webdriverio/specs/home.ts | 12 - tests/webdriverio/specs/operations.ts | 15 - tests/webdriverio/specs/tag_rules.ts | 26 - tests/webdriverio/tsconfig.json | 15 - tests/webdriverio/wdio.conf.ts | 70 --- vite.config.ts | 21 - 74 files changed, 1670 insertions(+), 1506 deletions(-) create mode 100644 src-tauri/src/commands/bank_account_get_by_id.rs delete mode 100644 src/lib/admin/components/PaginatedTable/Filter.svelte delete mode 100644 src/lib/admin/components/PaginatedTable/ItemFieldValue.svelte delete mode 100644 src/lib/admin/components/PaginatedTable/ItemHeadCell.svelte delete mode 100644 src/lib/admin/components/PaginatedTable/ItemLine.svelte delete mode 100644 src/lib/admin/components/PaginatedTable/PaginatedTable.svelte delete mode 100644 src/lib/admin/components/SpinLoader.svelte create mode 100644 src/lib/crud/Dashboard.ts create mode 100644 src/lib/crud/cruds/BankAccountsCrud.ts create mode 100644 src/lib/crud/cruds/OperationCrud.ts create mode 100644 src/lib/crud/cruds/TagRulesCrud.ts create mode 100644 src/lib/crud/cruds/TagsCrud.ts create mode 100644 src/lib/crud/cruds/TriageCrud.ts rename src/{routes => old_routes}/+error.svelte (100%) rename src/{routes => old_routes}/+layout.svelte (97%) rename src/{routes => old_routes}/+layout.ts (100%) rename src/{routes => old_routes}/+page.svelte (100%) rename src/{routes => old_routes}/analytics/+page.svelte (98%) rename src/{routes => old_routes}/bank-accounts/+page.svelte (100%) rename src/{routes => old_routes}/bank-accounts/edit/[id]/+layout.ts (100%) rename src/{routes => old_routes}/bank-accounts/edit/[id]/+page.svelte (100%) rename src/{routes => old_routes}/bank-accounts/new/+page.svelte (100%) rename src/{routes => old_routes}/operations/+page.svelte (100%) rename src/{routes => old_routes}/operations/edit/[id]/+layout.ts (100%) rename src/{routes => old_routes}/operations/edit/[id]/+page.svelte (100%) rename src/{routes => old_routes}/operations/edit/triage-[id]/+layout.ts (100%) rename src/{routes => old_routes}/operations/edit/triage-[id]/+page.svelte (100%) rename src/{routes => old_routes}/tag-rules/+page.svelte (100%) rename src/{routes => old_routes}/tag-rules/edit/[id]/+layout.ts (100%) rename src/{routes => old_routes}/tag-rules/edit/[id]/+page.svelte (100%) rename src/{routes => old_routes}/tag-rules/new/+page.svelte (100%) rename src/{routes => old_routes}/tags/+page.svelte (100%) rename src/{routes => old_routes}/tags/edit/[id]/+layout.ts (100%) rename src/{routes => old_routes}/tags/edit/[id]/+page.svelte (100%) rename src/{routes => old_routes}/tags/new/+page.svelte (100%) rename src/{routes => old_routes}/triage/+page.svelte (100%) create mode 100644 src/routes/(main)/+layout.svelte create mode 100644 src/routes/(main)/+layout.ts create mode 100644 src/routes/(main)/+page.server.ts create mode 100644 src/routes/(main)/+page.svelte create mode 100644 src/routes/(main)/import/+page.svelte rename src/routes/{ => (main)}/import/csv/+page.svelte (55%) rename src/routes/{ => (main)}/import/ofx/+page.svelte (100%) create mode 100644 src/routes/(svelteadmin)/+layout.svelte create mode 100644 src/routes/(svelteadmin)/crud/[crud]/[operation]/+page.server.ts create mode 100644 src/routes/(svelteadmin)/crud/[crud]/[operation]/+page.svelte delete mode 100644 src/routes/import/+page.svelte delete mode 100644 src/style/_app.scss delete mode 100644 src/style/bootstrap.scss delete mode 100644 tests/webdriverio/helpers/test_helpers.ts delete mode 100644 tests/webdriverio/specs/home.ts delete mode 100644 tests/webdriverio/specs/operations.ts delete mode 100644 tests/webdriverio/specs/tag_rules.ts delete mode 100644 tests/webdriverio/tsconfig.json delete mode 100644 tests/webdriverio/wdio.conf.ts diff --git a/.gitignore b/.gitignore index 3fa099f4..6635cf55 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,3 @@ node_modules !.env.example vite.config.js.timestamp-* vite.config.ts.timestamp-* - -static/bootstrap* diff --git a/.prettierrc b/.prettierrc index 3a2218a2..a77fddea 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,9 +1,9 @@ -{ - "useTabs": true, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100, - "plugins": ["prettier-plugin-svelte"], - "pluginSearchDirs": ["."], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] -} +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": ["prettier-plugin-svelte"], + "pluginSearchDirs": ["."], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/package.json b/package.json index 82a5ef26..3bee84a0 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "postinstall": "pnpm install --dir tests/webdriverio/" }, "devDependencies": { + "@orbitale/svelte-admin": "^0.16.0", "@popperjs/core": "^2.11.7", "@sveltejs/adapter-static": "3.0.1", "@sveltejs/kit": "^2.5.5", @@ -28,6 +29,8 @@ "@typescript-eslint/parser": "^7.5.0", "@zerodevx/svelte-toast": "^0.9.3", "bootstrap": "^5.2.3", + "carbon-components-svelte": "^0.82.8", + "carbon-icons-svelte": "^12.4.2", "chart.js": "^4.3.0", "concurrently": "^8.0.1", "date-fns": "^2.30.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef29563e..15334758 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,6 +21,9 @@ importers: specifier: ^9.4.0 version: 9.4.0 devDependencies: + '@orbitale/svelte-admin': + specifier: ^0.16.0 + version: 0.16.3(carbon-components-svelte@0.82.11)(carbon-icons-svelte@12.11.0)(typescript@5.6.2) '@popperjs/core': specifier: ^2.11.7 version: 2.11.8 @@ -51,6 +54,12 @@ importers: bootstrap: specifier: ^5.2.3 version: 5.3.3(@popperjs/core@2.11.8) + carbon-components-svelte: + specifier: ^0.82.8 + version: 0.82.11 + carbon-icons-svelte: + specifier: ^12.4.2 + version: 12.11.0 chart.js: specifier: ^4.3.0 version: 4.4.4 @@ -122,138 +131,276 @@ packages: resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} engines: {node: '>=6.9.0'} + '@esbuild/aix-ppc64@0.19.12': + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.18.20': resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.19.12': + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.18.20': resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.19.12': + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.18.20': resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.19.12': + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.18.20': resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.19.12': + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.18.20': resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.19.12': + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.18.20': resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.19.12': + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.18.20': resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.19.12': + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.18.20': resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.19.12': + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.18.20': resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.19.12': + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.18.20': resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.19.12': + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.18.20': resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.19.12': + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.18.20': resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.19.12': + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.18.20': resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.19.12': + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.18.20': resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.19.12': + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.18.20': resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.19.12': + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.18.20': resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.19.12': + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-x64@0.18.20': resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.19.12': + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-x64@0.18.20': resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.19.12': + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.18.20': resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.19.12': + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.18.20': resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.19.12': + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.18.20': resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.19.12': + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.18.20': resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.19.12': + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -272,6 +419,21 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@formatjs/ecma402-abstract@2.0.0': + resolution: {integrity: sha512-rRqXOqdFmk7RYvj4khklyqzcfQl9vEL/usogncBHRZfZBDOwMGuSRNFl02fu5KGHXdbinju+YXyuR+Nk8xlr/g==} + + '@formatjs/fast-memoize@2.2.0': + resolution: {integrity: sha512-hnk/nY8FyrL5YxwP9e4r9dqeM6cAbo8PeU9UjyXojZMNvVad2Z06FAVHyR3Ecw6fza+0GH7vdJgiKIVXTMbSBA==} + + '@formatjs/icu-messageformat-parser@2.7.8': + resolution: {integrity: sha512-nBZJYmhpcSX0WeJ5SDYUkZ42AgR3xiyhNCsQweFx3cz/ULJjym8bHAzWKvG5e2+1XO98dBYC0fWeeAECAVSwLA==} + + '@formatjs/icu-skeleton-parser@1.8.2': + resolution: {integrity: sha512-k4ERKgw7aKGWJZgTarIcNEmvyTVD9FYh0mTrrBMHZ1b8hUu6iOJ4SzsZlo3UNAvHYa+PnvntIwRPt1/vy4nA9Q==} + + '@formatjs/intl-localematcher@0.5.4': + resolution: {integrity: sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==} + '@humanwhocodes/config-array@0.13.0': resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} @@ -322,6 +484,12 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@orbitale/svelte-admin@0.16.3': + resolution: {integrity: sha512-fP1CPM+FdbLm3EuAgK1Hl0WOrVQsQiOteHDWfoQvo/QTzcQWjwanAgCZ7iDpou/ESHutB5SJ9ZnVKVPEdSpslQ==} + peerDependencies: + carbon-components-svelte: ^0.80.0 + carbon-icons-svelte: ^12.0.0 + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -526,6 +694,9 @@ packages: resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} + ansi-sequence-parser@1.1.1: + resolution: {integrity: sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==} + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -583,6 +754,12 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + carbon-components-svelte@0.82.11: + resolution: {integrity: sha512-jCCQz7W+fEqPj7FsS8P4lG+SVWhruO+5GHWjqbzq6hDMfo9A0yBUcrTPqrpsOSus7S96x5sPQvIECP195Xkrew==} + + carbon-icons-svelte@12.11.0: + resolution: {integrity: sha512-t1NT10i62/c0i5dymKHCcEQTM3TGlqVxRBHw8/LmOgq/jhIaAYNz6iXarSq3M6QuroV0om/KILEhaFo/APcKQA==} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -599,6 +776,10 @@ packages: resolution: {integrity: sha512-mxIojEAQcuEvT/lyXq+jf/3cO/KoA6z4CeNDGGevTybECPOMFCnQy3OPahluUkbqgPNGw5Bi78UC7Po6Lhy+NA==} engines: {node: '>= 14.16.0'} + cli-color@2.0.4: + resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==} + engines: {node: '>=0.10'} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -633,6 +814,10 @@ packages: resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + d@1.0.2: + resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} + engines: {node: '>=0.12'} + date-fns@2.30.0: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} @@ -685,14 +870,33 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + es5-ext@0.10.64: + resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} + engines: {node: '>=0.10'} + + es6-iterator@2.0.3: + resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} + es6-promise@3.3.1: resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} + es6-symbol@3.1.4: + resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} + engines: {node: '>=0.12'} + + es6-weak-map@2.0.3: + resolution: {integrity: sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==} + esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} hasBin: true + esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -729,6 +933,10 @@ packages: esm-env@1.0.0: resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} + esniff@2.0.1: + resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} + engines: {node: '>=0.10'} + espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -745,6 +953,9 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -752,6 +963,12 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + event-emitter@0.3.5: + resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} + + ext@1.7.0: + resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -784,6 +1001,9 @@ packages: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} + flatpickr@4.6.9: + resolution: {integrity: sha512-F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw==} + flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -872,6 +1092,9 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + intl-messageformat@10.5.14: + resolution: {integrity: sha512-IjC6sI0X7YRjjyVH9aUgdftcmZK7WXdHeil4KwbjDnRWjnVitKpAx3rr6t6di1joFp5188VqKcobOPA6mCLG/w==} + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -896,6 +1119,9 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} + is-promise@2.2.2: + resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} + is-reference@3.0.2: resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} @@ -918,6 +1144,9 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -945,6 +1174,12 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lru-queue@0.1.0: + resolution: {integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==} + + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + luxon@3.5.0: resolution: {integrity: sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==} engines: {node: '>=12'} @@ -952,9 +1187,18 @@ packages: magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + marked@4.3.0: + resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} + engines: {node: '>= 12'} + hasBin: true + mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + memoizee@0.4.17: + resolution: {integrity: sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==} + engines: {node: '>=0.12'} + merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -1004,6 +1248,9 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + next-tick@1.1.0: + resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -1165,6 +1412,9 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + shiki@0.14.7: + resolution: {integrity: sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==} + signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -1251,6 +1501,13 @@ packages: peerDependencies: svelte: ^3.19.0 || ^4.0.0 + svelte-i18n@4.0.0: + resolution: {integrity: sha512-4vivjKZADUMRIhTs38JuBNy3unbnh9AFRxWFLxq62P4NHic+/BaIZZlAsvqsCdnp7IdJf5EoSiH6TNdItcjA6g==} + engines: {node: '>= 16'} + hasBin: true + peerDependencies: + svelte: ^3 || ^4 + svelte-preprocess@5.1.4: resolution: {integrity: sha512-IvnbQ6D6Ao3Gg6ftiM5tdbR6aAETwjhHV+UKGf5bHGYR69RQvF1ho0JKPcbUON4vy4R7zom13jPjgdOWCQ5hDA==} engines: {node: '>= 16.0.0'} @@ -1295,6 +1552,10 @@ packages: text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + timers-ext@0.1.8: + resolution: {integrity: sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==} + engines: {node: '>=0.12'} + tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} @@ -1330,6 +1591,16 @@ packages: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} + type@2.7.3: + resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} + + typedoc@0.25.13: + resolution: {integrity: sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==} + engines: {node: '>= 16'} + hasBin: true + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x + typescript@5.6.2: resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} @@ -1374,6 +1645,12 @@ packages: vite: optional: true + vscode-oniguruma@1.7.0: + resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} + + vscode-textmate@8.0.0: + resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -1421,72 +1698,141 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 + '@esbuild/aix-ppc64@0.19.12': + optional: true + '@esbuild/android-arm64@0.18.20': optional: true + '@esbuild/android-arm64@0.19.12': + optional: true + '@esbuild/android-arm@0.18.20': optional: true + '@esbuild/android-arm@0.19.12': + optional: true + '@esbuild/android-x64@0.18.20': optional: true + '@esbuild/android-x64@0.19.12': + optional: true + '@esbuild/darwin-arm64@0.18.20': optional: true + '@esbuild/darwin-arm64@0.19.12': + optional: true + '@esbuild/darwin-x64@0.18.20': optional: true + '@esbuild/darwin-x64@0.19.12': + optional: true + '@esbuild/freebsd-arm64@0.18.20': optional: true + '@esbuild/freebsd-arm64@0.19.12': + optional: true + '@esbuild/freebsd-x64@0.18.20': optional: true + '@esbuild/freebsd-x64@0.19.12': + optional: true + '@esbuild/linux-arm64@0.18.20': optional: true + '@esbuild/linux-arm64@0.19.12': + optional: true + '@esbuild/linux-arm@0.18.20': optional: true + '@esbuild/linux-arm@0.19.12': + optional: true + '@esbuild/linux-ia32@0.18.20': optional: true + '@esbuild/linux-ia32@0.19.12': + optional: true + '@esbuild/linux-loong64@0.18.20': optional: true + '@esbuild/linux-loong64@0.19.12': + optional: true + '@esbuild/linux-mips64el@0.18.20': optional: true + '@esbuild/linux-mips64el@0.19.12': + optional: true + '@esbuild/linux-ppc64@0.18.20': optional: true + '@esbuild/linux-ppc64@0.19.12': + optional: true + '@esbuild/linux-riscv64@0.18.20': optional: true + '@esbuild/linux-riscv64@0.19.12': + optional: true + '@esbuild/linux-s390x@0.18.20': optional: true + '@esbuild/linux-s390x@0.19.12': + optional: true + '@esbuild/linux-x64@0.18.20': optional: true + '@esbuild/linux-x64@0.19.12': + optional: true + '@esbuild/netbsd-x64@0.18.20': optional: true + '@esbuild/netbsd-x64@0.19.12': + optional: true + '@esbuild/openbsd-x64@0.18.20': optional: true + '@esbuild/openbsd-x64@0.19.12': + optional: true + '@esbuild/sunos-x64@0.18.20': optional: true + '@esbuild/sunos-x64@0.19.12': + optional: true + '@esbuild/win32-arm64@0.18.20': optional: true + '@esbuild/win32-arm64@0.19.12': + optional: true + '@esbuild/win32-ia32@0.18.20': optional: true + '@esbuild/win32-ia32@0.19.12': + optional: true + '@esbuild/win32-x64@0.18.20': optional: true + '@esbuild/win32-x64@0.19.12': + optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1(supports-color@9.4.0))': dependencies: eslint: 8.57.1(supports-color@9.4.0) @@ -1510,6 +1856,30 @@ snapshots: '@eslint/js@8.57.1': {} + '@formatjs/ecma402-abstract@2.0.0': + dependencies: + '@formatjs/intl-localematcher': 0.5.4 + tslib: 2.7.0 + + '@formatjs/fast-memoize@2.2.0': + dependencies: + tslib: 2.7.0 + + '@formatjs/icu-messageformat-parser@2.7.8': + dependencies: + '@formatjs/ecma402-abstract': 2.0.0 + '@formatjs/icu-skeleton-parser': 1.8.2 + tslib: 2.7.0 + + '@formatjs/icu-skeleton-parser@1.8.2': + dependencies: + '@formatjs/ecma402-abstract': 2.0.0 + tslib: 2.7.0 + + '@formatjs/intl-localematcher@0.5.4': + dependencies: + tslib: 2.7.0 + '@humanwhocodes/config-array@0.13.0(supports-color@9.4.0)': dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -1562,6 +1932,18 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@orbitale/svelte-admin@0.16.3(carbon-components-svelte@0.82.11)(carbon-icons-svelte@12.11.0)(typescript@5.6.2)': + dependencies: + '@zerodevx/svelte-toast': 0.9.6(svelte@4.2.19) + carbon-components-svelte: 0.82.11 + carbon-icons-svelte: 12.11.0 + luxon: 3.5.0 + svelte: 4.2.19 + svelte-i18n: 4.0.0(svelte@4.2.19) + typedoc: 0.25.13(typescript@5.6.2) + transitivePeerDependencies: + - typescript + '@pkgjs/parseargs@0.11.0': optional: true @@ -1769,6 +2151,8 @@ snapshots: ansi-regex@6.1.0: {} + ansi-sequence-parser@1.1.1: {} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -1813,6 +2197,12 @@ snapshots: callsites@3.1.0: {} + carbon-components-svelte@0.82.11: + dependencies: + flatpickr: 4.6.9 + + carbon-icons-svelte@12.11.0: {} + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -1838,6 +2228,14 @@ snapshots: dependencies: readdirp: 4.0.1 + cli-color@2.0.4: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-iterator: 2.0.3 + memoizee: 0.4.17 + timers-ext: 0.1.8 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -1885,6 +2283,11 @@ snapshots: mdn-data: 2.0.30 source-map-js: 1.2.1 + d@1.0.2: + dependencies: + es5-ext: 0.10.64 + type: 2.7.3 + date-fns@2.30.0: dependencies: '@babel/runtime': 7.25.6 @@ -1923,8 +2326,33 @@ snapshots: emoji-regex@9.2.2: {} + es5-ext@0.10.64: + dependencies: + es6-iterator: 2.0.3 + es6-symbol: 3.1.4 + esniff: 2.0.1 + next-tick: 1.1.0 + + es6-iterator@2.0.3: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-symbol: 3.1.4 + es6-promise@3.3.1: {} + es6-symbol@3.1.4: + dependencies: + d: 1.0.2 + ext: 1.7.0 + + es6-weak-map@2.0.3: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-iterator: 2.0.3 + es6-symbol: 3.1.4 + esbuild@0.18.20: optionalDependencies: '@esbuild/android-arm': 0.18.20 @@ -1950,6 +2378,32 @@ snapshots: '@esbuild/win32-ia32': 0.18.20 '@esbuild/win32-x64': 0.18.20 + esbuild@0.19.12: + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + escalade@3.2.0: {} escape-string-regexp@4.0.0: {} @@ -2015,6 +2469,13 @@ snapshots: esm-env@1.0.0: {} + esniff@2.0.1: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + event-emitter: 0.3.5 + type: 2.7.3 + espree@9.6.1: dependencies: acorn: 8.12.1 @@ -2031,12 +2492,23 @@ snapshots: estraverse@5.3.0: {} + estree-walker@2.0.2: {} + estree-walker@3.0.3: dependencies: '@types/estree': 1.0.6 esutils@2.0.3: {} + event-emitter@0.3.5: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + + ext@1.7.0: + dependencies: + type: 2.7.3 + fast-deep-equal@3.1.3: {} fast-glob@3.3.2: @@ -2074,6 +2546,8 @@ snapshots: keyv: 4.5.4 rimraf: 3.0.2 + flatpickr@4.6.9: {} + flatted@3.3.1: {} foreground-child@3.3.0: @@ -2159,6 +2633,13 @@ snapshots: inherits@2.0.4: {} + intl-messageformat@10.5.14: + dependencies: + '@formatjs/ecma402-abstract': 2.0.0 + '@formatjs/fast-memoize': 2.2.0 + '@formatjs/icu-messageformat-parser': 2.7.8 + tslib: 2.7.0 + is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 @@ -2175,6 +2656,8 @@ snapshots: is-path-inside@3.0.3: {} + is-promise@2.2.2: {} + is-reference@3.0.2: dependencies: '@types/estree': 1.0.6 @@ -2197,6 +2680,8 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} + jsonc-parser@3.3.1: {} + keyv@4.5.4: dependencies: json-buffer: 3.0.1 @@ -2220,14 +2705,33 @@ snapshots: lru-cache@10.4.3: {} + lru-queue@0.1.0: + dependencies: + es5-ext: 0.10.64 + + lunr@2.3.9: {} + luxon@3.5.0: {} magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 + marked@4.3.0: {} + mdn-data@2.0.30: {} + memoizee@0.4.17: + dependencies: + d: 1.0.2 + es5-ext: 0.10.64 + es6-weak-map: 2.0.3 + event-emitter: 0.3.5 + is-promise: 2.2.2 + lru-queue: 0.1.0 + next-tick: 1.1.0 + timers-ext: 0.1.8 + merge2@1.4.1: {} micromatch@4.0.8: @@ -2263,6 +2767,8 @@ snapshots: natural-compare@1.4.0: {} + next-tick@1.1.0: {} + normalize-path@3.0.0: {} once@1.4.0: @@ -2401,6 +2907,13 @@ snapshots: shell-quote@1.8.1: {} + shiki@0.14.7: + dependencies: + ansi-sequence-parser: 1.1.1 + jsonc-parser: 3.3.1 + vscode-oniguruma: 1.7.0 + vscode-textmate: 8.0.0 + signal-exit@4.1.0: {} sirv@2.0.4: @@ -2497,6 +3010,17 @@ snapshots: dependencies: svelte: 4.2.19 + svelte-i18n@4.0.0(svelte@4.2.19): + dependencies: + cli-color: 2.0.4 + deepmerge: 4.3.1 + esbuild: 0.19.12 + estree-walker: 2.0.2 + intl-messageformat: 10.5.14 + sade: 1.8.1 + svelte: 4.2.19 + tiny-glob: 0.2.9 + svelte-preprocess@5.1.4(postcss@8.4.47)(sass@1.79.3)(svelte@4.2.19)(typescript@5.6.2): dependencies: '@types/pug': 2.0.10 @@ -2529,6 +3053,11 @@ snapshots: text-table@0.2.0: {} + timers-ext@0.1.8: + dependencies: + es5-ext: 0.10.64 + next-tick: 1.1.0 + tiny-glob@0.2.9: dependencies: globalyzer: 0.1.0 @@ -2556,6 +3085,16 @@ snapshots: type-fest@0.20.2: {} + type@2.7.3: {} + + typedoc@0.25.13(typescript@5.6.2): + dependencies: + lunr: 2.3.9 + marked: 4.3.0 + minimatch: 9.0.5 + shiki: 0.14.7 + typescript: 5.6.2 + typescript@5.6.2: {} uri-js@4.4.1: @@ -2575,6 +3114,10 @@ snapshots: optionalDependencies: vite: 4.5.5(sass@1.79.3) + vscode-oniguruma@1.7.0: {} + + vscode-textmate@8.0.0: {} + which@2.0.2: dependencies: isexe: 2.0.0 diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 477bedd4..5f4fc30a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] @@ -82,15 +82,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arboard" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" +checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" dependencies = [ "clipboard-win", "core-graphics 0.23.2", @@ -131,9 +131,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ "async-task", "concurrent-queue", @@ -185,9 +185,9 @@ dependencies = [ [[package]] name = "async-process" -version = "2.2.4" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a07789659a4d385b79b18b9127fc27e1a59e1e89117c78c5ea3b806f016374" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ "async-channel", "async-io", @@ -200,7 +200,6 @@ dependencies = [ "futures-lite", "rustix", "tracing", - "windows-sys 0.59.0", ] [[package]] @@ -211,7 +210,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -240,13 +239,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -287,17 +286,17 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide 0.8.0", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -406,9 +405,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd4c6dcc3b0aea2f5c0b4b82c2b15fe39ddbc76041a310848f4706edf76bb31" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" [[package]] name = "byteorder" @@ -424,9 +423,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] @@ -467,9 +466,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.14" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ "shlex", ] @@ -688,9 +687,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -772,7 +771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -803,7 +802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -827,7 +826,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -838,7 +837,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -859,7 +858,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -872,7 +871,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1022,7 +1021,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1043,9 +1042,9 @@ dependencies = [ [[package]] name = "error-code" -version = "3.2.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" +checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f" [[package]] name = "event-listener" @@ -1107,9 +1106,9 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", @@ -1125,9 +1124,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", "miniz_oxide 0.8.0", @@ -1175,7 +1174,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1262,7 +1261,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1446,9 +1445,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "gio" @@ -1533,9 +1532,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", @@ -1622,7 +1621,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.4.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -1795,9 +1794,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1844,9 +1843,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", @@ -1896,9 +1895,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -1925,9 +1924,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "itoa" @@ -2124,9 +2123,9 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "mac-notification-sys" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51fca4d74ff9dbaac16a01b924bc3693fa2bba0862c2c633abc73f9a8ea21f64" +checksum = "dce8f34f3717aa37177e723df6c1fc5fb02b2a1087374ea3fe0ea42316dc8f91" dependencies = [ "cc", "dirs-next", @@ -2346,9 +2345,9 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.11.1" +version = "4.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a1d03b6305ecefdd9c6c60150179bb8d9f0cd4e64bbcad1e41419e7bf5e414" +checksum = "5134a72dc570b178bff81b01e81ab14a6fcc015391ed4b3b14853090658cd3a3" dependencies = [ "log", "mac-notification-sys", @@ -2543,9 +2542,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -2589,7 +2588,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -2680,9 +2679,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -2726,7 +2725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.4.0", + "indexmap 2.5.0", ] [[package]] @@ -2833,7 +2832,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -2899,7 +2898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ "base64 0.22.1", - "indexmap 2.4.0", + "indexmap 2.5.0", "quick-xml 0.32.0", "serde", "time", @@ -2966,11 +2965,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.21", ] [[package]] @@ -3032,9 +3031,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.34.0" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "memchr", ] @@ -3137,9 +3136,9 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags 2.6.0", ] @@ -3303,18 +3302,18 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -3355,11 +3354,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3389,9 +3388,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -3428,31 +3427,31 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "itoa 1.0.11", "memchr", "ryu", @@ -3467,7 +3466,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3511,7 +3510,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_derive", "serde_json", @@ -3528,7 +3527,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3550,7 +3549,7 @@ checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3759,9 +3758,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.76" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -3832,9 +3831,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.16.9" +version = "0.16.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575c856fc21e551074869dcfaad8f706412bd5b803dfa0fbf6881c4ff4bfafab" +checksum = "48d298c441a1da46e28e8ad8ec205aab7fd8cd71b9d10e05454224eef422e1ae" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -3885,7 +3884,7 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3907,9 +3906,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e33e3ba00a3b05eb6c57ef135781717d33728b48acf914bb05629e74d897d29" +checksum = "570a20223602ad990a30a048f2fdb957ae3e38de3ca9582e04cc09d01e8ccfad" dependencies = [ "anyhow", "bytes", @@ -3928,6 +3927,7 @@ dependencies = [ "http", "ignore", "indexmap 1.9.3", + "log", "nix 0.26.4", "notify-rust", "objc", @@ -3936,6 +3936,7 @@ dependencies = [ "os_info", "os_pipe", "percent-encoding", + "plist", "rand 0.8.5", "raw-window-handle", "regex", @@ -3966,9 +3967,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fb5a90a64241ddb7217d3210d844149070a911e87e8a107a707a1d4973f164" +checksum = "586f3e677f940c8bb4f70c52eda05dc59b79e61543f1182de83516810bb8e35d" dependencies = [ "anyhow", "cargo_toml", @@ -4163,7 +4164,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4235,9 +4236,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -4260,9 +4261,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -4301,7 +4302,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.22.21", ] [[package]] @@ -4319,7 +4320,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -4328,22 +4329,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" dependencies = [ - "indexmap 2.4.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" -dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -4375,7 +4365,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4462,24 +4452,24 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unidecode" @@ -4617,7 +4607,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "wasm-bindgen-shared", ] @@ -4651,7 +4641,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4677,9 +4667,9 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", @@ -4691,9 +4681,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.5" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ "bitflags 2.6.0", "rustix", @@ -4728,20 +4718,20 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.4" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", - "quick-xml 0.34.0", + "quick-xml 0.36.2", "quote", ] [[package]] name = "wayland-sys" -version = "0.31.4" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", "log", @@ -4975,7 +4965,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4986,7 +4976,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -5344,9 +5334,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.24.10" +version = "0.24.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00711278ed357350d44c749c286786ecac644e044e4da410d466212152383b45" +checksum = "c55c80b12287eb1ff7c365fc2f7a5037cb6181bd44c9fce81c8d1cf7605ffad6" dependencies = [ "base64 0.13.1", "block", @@ -5483,10 +5473,10 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "zvariant_utils", ] @@ -5519,7 +5509,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -5541,10 +5531,10 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "zvariant_utils", ] @@ -5556,5 +5546,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] diff --git a/src-tauri/src/commands/bank_account_get_by_id.rs b/src-tauri/src/commands/bank_account_get_by_id.rs new file mode 100644 index 00000000..6188ffea --- /dev/null +++ b/src-tauri/src/commands/bank_account_get_by_id.rs @@ -0,0 +1,19 @@ +use crate::entities::bank_accounts; +use rusqlite::Connection; +use std::ops::Deref; +use std::sync::Mutex; +use tauri::State; + +#[tauri::command] +pub(crate) fn bank_account_get_by_id(conn_state: State<'_, Mutex>, id: String) -> String { + let conn = conn_state + .inner() + .lock() + .expect("Could not retrieve database connection"); + let conn = conn.deref(); + + let id_as_u32: u32 = id.parse().unwrap(); + + serde_json::to_string(&bank_accounts::get_by_id(conn, id_as_u32)) + .expect("Could not serialize BankAccount properly") +} diff --git a/src-tauri/src/entities/bank_accounts.rs b/src-tauri/src/entities/bank_accounts.rs index cb7bb1c2..868fdf12 100644 --- a/src-tauri/src/entities/bank_accounts.rs +++ b/src-tauri/src/entities/bank_accounts.rs @@ -50,6 +50,35 @@ pub(crate) fn find_all(conn: &Connection) -> Vec { bank_accounts } +pub(crate) fn get_by_id(conn: &Connection, id: u32) -> BankAccount { + let mut stmt = conn + .prepare( + " + SELECT + id, + name, + slug, + currency + FROM bank_accounts + WHERE id = :id + ", + ) + .expect("Could not fetch bank account"); + + let mut rows = stmt + .query(named_params! { + ":id": &id, + }) + .expect("Could not execute query to fetch an bank account by id."); + + let row = rows + .next() + .expect("Could not retrieve query rows.") + .expect("No bank account found with this ID."); + + serde_rusqlite::from_row::(row).unwrap() +} + pub(crate) fn create(conn: &Connection, bank_account: BankAccount) -> i64 { if bank_account.id != 0 { panic!("Cannot create a bank account that already has an ID"); diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 57a97e8e..58c9e40d 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -11,6 +11,7 @@ mod migrations; mod commands { pub(crate) mod bank_account_create; pub(crate) mod bank_account_find_all; + pub(crate) mod bank_account_get_by_id; pub(crate) mod bank_account_update; pub(crate) mod import_operations; pub(crate) mod operation_delete; @@ -69,6 +70,7 @@ fn main() { crate::commands::operations_get_triage::operations_get_triage, crate::commands::operations_get_triage_count::operations_get_triage_count, crate::commands::bank_account_find_all::bank_account_find_all, + crate::commands::bank_account_get_by_id::bank_account_get_by_id, crate::commands::bank_account_create::bank_account_create, crate::commands::bank_account_update::bank_account_update, crate::commands::tags_get::tags_get, diff --git a/src/app.html b/src/app.html index 1542a86c..0e410748 100644 --- a/src/app.html +++ b/src/app.html @@ -7,8 +7,6 @@ %sveltekit.head% - -
%sveltekit.body%
diff --git a/src/lib/admin/components/PaginatedTable/Filter.svelte b/src/lib/admin/components/PaginatedTable/Filter.svelte deleted file mode 100644 index 328fd918..00000000 --- a/src/lib/admin/components/PaginatedTable/Filter.svelte +++ /dev/null @@ -1,272 +0,0 @@ - - -
- -
- {#if filter.type === FilterType.text} - - {:else if filter.type === FilterType.date} -
-
- -
-
- -
-
- {:else if filter.type === FilterType.number} -
-
- -
-
- -
-
- {:else if filter.type === FilterType.boolean} -
- -
- {:else if filter.type === FilterType.entity} - - {:else} -
- Unknown input type "{filter.type}" -
- {/if} -
-
- - diff --git a/src/lib/admin/components/PaginatedTable/ItemFieldValue.svelte b/src/lib/admin/components/PaginatedTable/ItemFieldValue.svelte deleted file mode 100644 index 7cedaf39..00000000 --- a/src/lib/admin/components/PaginatedTable/ItemFieldValue.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - -{#if field_value === null} - Empty -{:else if field_value === ''} - Empty string -{:else if field_value === undefined} - Undefined -{:else if field_value === true || field_value === false} - {#if field_value === true} - - {:else} - × - {/if} -{:else if field_value instanceof Array} - {#each field_value as array_value} - {array_value} - {/each} -{:else if typeof field_value === 'object'} -
{JSON.stringify(field_value)}
-{:else} - {field_value} -{/if} diff --git a/src/lib/admin/components/PaginatedTable/ItemHeadCell.svelte b/src/lib/admin/components/PaginatedTable/ItemHeadCell.svelte deleted file mode 100644 index 4bee15a7..00000000 --- a/src/lib/admin/components/PaginatedTable/ItemHeadCell.svelte +++ /dev/null @@ -1,57 +0,0 @@ - - - sortField(field)} -> - {field.text} - - - diff --git a/src/lib/admin/components/PaginatedTable/ItemLine.svelte b/src/lib/admin/components/PaginatedTable/ItemLine.svelte deleted file mode 100644 index b0a832f0..00000000 --- a/src/lib/admin/components/PaginatedTable/ItemLine.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - - - {#each fields as field} - - - - {/each} - {#if actions.length} - - {#each actions as action} - {#if action instanceof UrlAction} - - {action.name} - - {:else if action instanceof CallbackAction} - - {:else} - Unsupported action - {/if} - {/each} - - {/if} - - - diff --git a/src/lib/admin/components/PaginatedTable/PaginatedTable.svelte b/src/lib/admin/components/PaginatedTable/PaginatedTable.svelte deleted file mode 100644 index aabef26f..00000000 --- a/src/lib/admin/components/PaginatedTable/PaginatedTable.svelte +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - - {#if filters.length} - - - - {/if} - - - {#each fields as field} - - {/each} - {#if actions.length} - - {/if} - - - - - {#if $items_store === undefined || $items_store === null} - - - - {/if} - {#key $items_store} - {#each $items_store || [] as item, i} - - {:else} - - - - {/each} - {/key} - -
- - -
- Page: {page} / {number_of_pages} -
-
- -
Actions
- -
-
No elements found.
-
- - diff --git a/src/lib/admin/components/SpinLoader.svelte b/src/lib/admin/components/SpinLoader.svelte deleted file mode 100644 index 9aa36c2e..00000000 --- a/src/lib/admin/components/SpinLoader.svelte +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - diff --git a/src/lib/admin/src/FilterWithValue.ts b/src/lib/admin/src/FilterWithValue.ts index 836a9c96..159309e1 100644 --- a/src/lib/admin/src/FilterWithValue.ts +++ b/src/lib/admin/src/FilterWithValue.ts @@ -16,7 +16,7 @@ export default class FilterWithValue { return new FilterWithValue(filter.name, filter.type, value); } - public static fromSerialized(filter: object): FilterWithValue { + public static fromSerialized(filter: Partial): FilterWithValue { if (!filter.name || !filter.type || !filter.value) { console.error('Serialized filter is incomplete', filter); diff --git a/src/lib/crud/Dashboard.ts b/src/lib/crud/Dashboard.ts new file mode 100644 index 00000000..3af67f57 --- /dev/null +++ b/src/lib/crud/Dashboard.ts @@ -0,0 +1,39 @@ +import { DashboardDefinition, UrlAction } from '@orbitale/svelte-admin'; +import Home from 'carbon-icons-svelte/lib/Home.svelte'; +import PiggyBank from 'carbon-icons-svelte/lib/PiggyBank.svelte'; +import ChartLogisticRegression from 'carbon-icons-svelte/lib/ChartLogisticRegression.svelte'; +import ListBoxes from 'carbon-icons-svelte/lib/ListBoxes.svelte'; +import Tag from 'carbon-icons-svelte/lib/Tag.svelte'; +import TagGroup from 'carbon-icons-svelte/lib/TagGroup.svelte'; +import FetchUpload from 'carbon-icons-svelte/lib/FetchUpload.svelte'; +import ListCheckedMirror from 'carbon-icons-svelte/lib/ListCheckedMirror.svelte'; + +import OperationCrud from '$lib/crud/cruds/OperationCrud'; +import BankAccountsCrud from '$lib/crud/cruds/BankAccountsCrud'; +import TagRulesCrud from '$lib/crud/cruds/TagRulesCrud'; +import TagsCrud from '$lib/crud/cruds/TagsCrud'; +import TriageCrud from '$lib/crud/cruds/TriageCrud'; + +export const dashboard = new DashboardDefinition({ + adminConfig: { + defaultLocale: 'en', + rootUrl: '/crud/', + head: { + brandName: 'Compotes', + appName: '' + } + }, + + sideMenu: [ + new UrlAction('Homepage', '/', Home), + // new UrlAction('Analytics', '/analytics', ChartLogisticRegression), + new UrlAction('Operations', '/crud/operations/list', ListBoxes), + new UrlAction('Tags', '/crud/tags/list', Tag), + new UrlAction('Tag rules', '/crud/tag-rules/list', TagGroup), + new UrlAction('Triage', '/crud/triage/list', ListCheckedMirror), + new UrlAction('Bank accounts', '/crud/bank-accounts/list', PiggyBank), + new UrlAction('Import', '/import', FetchUpload) + ], + + cruds: [OperationCrud, BankAccountsCrud, TagRulesCrud, TagsCrud, TriageCrud] +}); diff --git a/src/lib/crud/cruds/BankAccountsCrud.ts b/src/lib/crud/cruds/BankAccountsCrud.ts new file mode 100644 index 00000000..0d055be1 --- /dev/null +++ b/src/lib/crud/cruds/BankAccountsCrud.ts @@ -0,0 +1,98 @@ +import { + CallbackStateProcessor, + CallbackStateProvider, + CrudDefinition, + Edit, + List, + New, + TextField, + UrlAction, + type RequestParameters, + type CrudOperation, + type StateProcessorInput +} from '@orbitale/svelte-admin'; + +import { + createBankAccount, + getBankAccountById, + getBankAccounts, + updateBankAccount +} from '$lib/db/bank_accounts'; +import BankAccount from '$lib/entities/BankAccount'; +import { goto } from '$app/navigation'; +import { success } from '$lib/utils/message'; + +const baseFields = [ + new TextField('name', 'Name'), + new TextField('slug', 'Identifier', { disabled: true }), + new TextField('currency', 'Currency') +]; + +export default new CrudDefinition({ + name: 'bank-accounts', + defaultOperationName: 'list', + label: { plural: 'BankAccounts', singular: 'BankAccount' }, + // minStateLoadingTimeMs: 0, + + operations: [ + new List([...baseFields], [new UrlAction('Edit', '/crud/bank-accounts/edit')], { + globalActions: [new UrlAction('New', '/crud/bank-accounts/new')] + }), + new Edit(baseFields), + new New(baseFields), + ], + + stateProvider: new CallbackStateProvider( + async (operation: CrudOperation, requestParameters: RequestParameters) => { + if (typeof window === 'undefined') { + // SSR, can't call Tauri API then. + return Promise.resolve([]); + } + + if (operation.name === 'list') { + return getBankAccounts(); + } + + if (operation.name === 'view' || operation.name === 'edit') { + return getBankAccountById(Number(requestParameters.id)); + } + + return Promise.resolve(null); + } + ), + + stateProcessor: new CallbackStateProcessor( + async ( + data: StateProcessorInput, + operation: CrudOperation, + requestParameters: RequestParameters + ) => { + if (operation.name === 'new') { + if (!data) { + throw new Error('Cannot create new object: empty data.'); + } + + await createBankAccount(BankAccount.fromObject(data)); + success('Success!'); + await goto('/crud/bank-accounts/list'); + } + + if (operation.name === 'edit') { + if (!data) { + throw new Error('Cannot create new object: empty data.'); + } + if (Array.isArray(data)) { + throw new Error('Cannot update data as array for this action.'); + } + + data.id = Number(requestParameters.id); + + await updateBankAccount(data); + success('Success!'); + await goto('/crud/bank-accounts/list'); + + return; + } + } + ) +}); diff --git a/src/lib/crud/cruds/OperationCrud.ts b/src/lib/crud/cruds/OperationCrud.ts new file mode 100644 index 00000000..7c681f2e --- /dev/null +++ b/src/lib/crud/cruds/OperationCrud.ts @@ -0,0 +1,98 @@ +import { + ArrayField, + CallbackStateProcessor, + CallbackStateProvider, + CheckboxField, + CrudDefinition, + DateField, + KeyValueObjectField, + List, + NumberField, + PaginatedResults, + TextField, + UrlAction, + View, + type CrudOperation, + type ListOperationOptions, + type RequestParameters, +} from '@orbitale/svelte-admin'; + +import {getOperationById, getOperations, getOperationsCount} from '$lib/db/operations'; +import type Operation from '$lib/entities/Operation'; +import SortableField from "$lib/admin/src/SortableField"; +import type {OrderBy} from "$lib/admin/src/OrderBy"; + +export default new CrudDefinition({ + name: 'operations', + defaultOperationName: 'list', + label: { plural: 'Operations', singular: 'Operation' }, + // minStateLoadingTimeMs: 0, + + operations: [ + new List( + [ + new DateField('operation_date', 'Date', {sortable: true}), + new TextField('op_type', 'Type 1'), + new TextField('type_display', 'Type 2'), + new TextField('details', 'Details'), + new ArrayField('tags', 'Tags', new KeyValueObjectField('', '', 'name')), + new NumberField('amount_display', 'Montant') + ], + [new UrlAction('View', '/crud/operations/view')], + { + pagination: { + enabled: true, + itemsPerPage: 20 + } + } + ), + new View([ + new TextField('id', 'ID'), + new DateField('operation_date', 'Date'), + new TextField('op_type', 'Type 1'), + new TextField('type_display', 'Type 2'), + new TextField('details', 'Details'), + new NumberField('amount_in_cents', 'Montant (in cents)'), + new NumberField('amount', 'Montant'), + new NumberField('hash', 'Hash'), + new TextField('state', 'State'), + new KeyValueObjectField('bank_account', 'Bank account', 'name'), + new ArrayField('tags', 'Tags', new KeyValueObjectField('', '', 'name')), + new CheckboxField('ignored_from_charts', 'Is ignored from charts') + ]) + ], + + stateProvider: new CallbackStateProvider( + async (operation: CrudOperation, requestParameters: RequestParameters) => { + if (typeof window === 'undefined') { + // SSR, can't call Tauri API then. + return Promise.resolve([]); + } + + if (operation.name === 'list') { + const options: ListOperationOptions = operation.options; + const page = Number(requestParameters.page || 1); + let sort: SortableField|null = null; + if (requestParameters.sort) { + const firstKey = Object.keys(requestParameters.sort)[0]; + sort = new SortableField(firstKey, requestParameters.sort[firstKey] as OrderBy, firstKey); + } + const results = await getOperations(page, sort); + const numberOfItems = await getOperationsCount(null); + return new PaginatedResults( + page, + numberOfItems / Number(options.pagination?.itemsPerPage || 10), + numberOfItems, + results + ); + } + + if (operation.name === 'view' || operation.name === 'edit') { + return getOperationById(Number(requestParameters.id)); + } + + return Promise.resolve(null); + } + ), + stateProcessor: new CallbackStateProcessor(() => {}) +}); diff --git a/src/lib/crud/cruds/TagRulesCrud.ts b/src/lib/crud/cruds/TagRulesCrud.ts new file mode 100644 index 00000000..1d8490a5 --- /dev/null +++ b/src/lib/crud/cruds/TagRulesCrud.ts @@ -0,0 +1,104 @@ +import { + CallbackStateProcessor, + CallbackStateProvider, + CrudDefinition, + Edit, + List, + New, + TextField, + ToggleField, + UrlAction, + type RequestParameters, + type CrudOperation, + type StateProcessorInput +} from '@orbitale/svelte-admin'; + +import { createTagRule, getTagRuleById, getTagRules, updateTagRule } from '$lib/db/tag_rules'; +import TagRule from '$lib/entities/TagRule'; +import { goto } from '$app/navigation'; +import { success } from '$lib/utils/message'; +import type Tag from '$lib/entities/Tag'; + +const baseFields = [ + new TextField('tags', 'Tags'), + new TextField('matching_pattern', 'Matching pattern'), + new ToggleField('is_regex', 'Regex') +]; + +export default new CrudDefinition({ + name: 'tag-rules', + defaultOperationName: 'list', + label: { plural: 'TagRules', singular: 'TagRule' }, + // minStateLoadingTimeMs: 0, + + operations: [ + new List( + [new TextField('id', 'ID'), ...baseFields], + [new UrlAction('Edit', '/crud/tag-rules/edit')], + { + globalActions: [new UrlAction('New', '/crud/tag-rules/new')] + } + ), + new New(baseFields), + new Edit(baseFields) + ], + + stateProvider: new CallbackStateProvider( + async (operation: CrudOperation, requestParameters: RequestParameters) => { + if (typeof window === 'undefined') { + // SSR, can't call Tauri API then. + return Promise.resolve([]); + } + + if (operation.name === 'list') { + return getTagRules(); + } + + if (operation.name === 'view' || operation.name === 'edit') { + return getTagRuleById(String(requestParameters.id)); + } + + return Promise.resolve(null); + } + ), + + stateProcessor: new CallbackStateProcessor( + async ( + data: StateProcessorInput, + operation: CrudOperation, + requestParameters: RequestParameters + ) => { + if (operation.name === 'new' || operation.name === 'edit') { + if (!data) { + throw new Error('Cannot create new object: empty data.'); + } + if (Array.isArray(data)) { + throw new Error('Cannot update data as array for this action.'); + } + + data.id = Number(requestParameters.id || 0); + // TODO FIXME : remove this and use proper entity injection! + data.is_regex = Boolean(data.is_regex); + if (!Array.isArray(data.tags)) { + // @ts-ignore + data.tags = String(data.tags) + .replace(/[^0-9,]/, '') + .split(',') + .map((i: string) => Number(i)); + } + const tag_rule = TagRule.fromJson(data); + + if (operation.name === 'new') { + await createTagRule(tag_rule); + } + if (operation.name === 'edit') { + await updateTagRule(tag_rule); + } + + success('Success!'); + await goto('/crud/tag-rules/list'); + return; + } + } + ) +}); diff --git a/src/lib/crud/cruds/TagsCrud.ts b/src/lib/crud/cruds/TagsCrud.ts new file mode 100644 index 00000000..3c371dc3 --- /dev/null +++ b/src/lib/crud/cruds/TagsCrud.ts @@ -0,0 +1,90 @@ +import { + CallbackStateProcessor, + CallbackStateProvider, + CrudDefinition, + Edit, + List, + New, + TextField, + UrlAction, + type RequestParameters, + type CrudOperation, + type StateProcessorInput +} from '@orbitale/svelte-admin'; + +import { createTag, getTagById, getTags, updateTag } from '$lib/db/tags'; +import Tag from '$lib/entities/Tag'; +import { goto } from '$app/navigation'; +import { success } from '$lib/utils/message'; + +const baseFields = [new TextField('name', 'Name')]; + +export default new CrudDefinition({ + name: 'tags', + defaultOperationName: 'list', + label: { plural: 'Tags', singular: 'Tag' }, + // minStateLoadingTimeMs: 0, + + operations: [ + new List( + [new TextField('id', 'ID'), ...baseFields], + [new UrlAction('Edit', '/crud/tags/edit')], + { + globalActions: [new UrlAction('New', '/crud/tags/new')] + } + ), + new New(baseFields), + new Edit(baseFields) + ], + + stateProvider: new CallbackStateProvider( + async (operation: CrudOperation, requestParameters: RequestParameters) => { + if (typeof window === 'undefined') { + // SSR, can't call Tauri API then. + return Promise.resolve([]); + } + + if (operation.name === 'list') { + return getTags(); + } + + if (operation.name === 'view' || operation.name === 'edit') { + return getTagById(Number(requestParameters.id)); + } + + return Promise.resolve(null); + } + ), + + stateProcessor: new CallbackStateProcessor( + async ( + data: StateProcessorInput, + operation: CrudOperation, + requestParameters: RequestParameters + ) => { + if (operation.name === 'new' || operation.name === 'edit') { + if (!data) { + throw new Error('Cannot create new object: empty data.'); + } + if (Array.isArray(data)) { + throw new Error('Cannot update data as array for this action.'); + } + + data.id = Number(requestParameters.id || 0); + // TODO FIXME : remove this and use proper entity injection! + const tag_rule = Tag.fromJson(data); + + if (operation.name === 'new') { + await createTag(tag_rule); + } + if (operation.name === 'edit') { + await updateTag(tag_rule); + } + + success('Success!'); + await goto('/crud/tags/list'); + return; + } + } + ) +}); diff --git a/src/lib/crud/cruds/TriageCrud.ts b/src/lib/crud/cruds/TriageCrud.ts new file mode 100644 index 00000000..0186e96f --- /dev/null +++ b/src/lib/crud/cruds/TriageCrud.ts @@ -0,0 +1,135 @@ +import { + CallbackStateProcessor, + CallbackStateProvider, + CrudDefinition, + DateField, + Delete, + Edit, + List, + NumberField, + PaginatedResults, + TextField, + UrlAction, + View, + type CrudOperation, + type RequestParameters, + type StateProcessorInput, + type ListOperationOptions +} from '@orbitale/svelte-admin'; + +import { + deleteOperation, + getOperationById, + getTriageOperations, + getTriageOperationsCount, + updateOperationDetails +} from '$lib/db/operations'; +import type Operation from '$lib/entities/Operation'; +import { success } from '$lib/utils/message'; +import { goto } from '$app/navigation'; + +export default new CrudDefinition({ + name: 'triage', + defaultOperationName: 'list', + label: { plural: 'Triaged operations', singular: 'Triaged operation' }, + // minStateLoadingTimeMs: 0, + + operations: [ + new List( + [ + new DateField('operation_date', 'Date'), + new TextField('op_type', 'Type 1'), + new TextField('type_display', 'Type 2'), + new TextField('details', 'Details'), + new NumberField('amount_display', 'Montant') + ], + [ + new UrlAction('View', '/crud/triage/view'), + new UrlAction('Edit', '/crud/triage/edit'), + new UrlAction('Delete', '/crud/triage/delete') + ], + { + pagination: { + enabled: true, + itemsPerPage: 20 + } + } + ), + new Delete([], new UrlAction('', '/crud/triage/list')), + new Edit([new TextField('details', 'Details')]), + new View([ + new TextField('id', 'ID'), + new DateField('operation_date', 'Date'), + new TextField('op_type', 'Type 1'), + new TextField('type_display', 'Type 2'), + new TextField('details', 'Details'), + new NumberField('amount_in_cents', 'Montant (in cents)'), + new NumberField('amount', 'Montant'), + new NumberField('hash', 'Hash'), + new TextField('bank_account', 'Bank account') + ]) + ], + + stateProvider: new CallbackStateProvider( + async (operation: CrudOperation, requestParameters: RequestParameters) => { + if (typeof window === 'undefined') { + // SSR, can't call Tauri API then. + return Promise.resolve([]); + } + + if (operation.name === 'list') { + const options: ListOperationOptions = operation.options; + const results = await getTriageOperations(Number(requestParameters.page || 1)); + const numberOfItems = await getTriageOperationsCount(); + return Promise.resolve( + new PaginatedResults( + Number(requestParameters.page), + numberOfItems / Number(options.pagination?.itemsPerPage || 10), + numberOfItems, + results + ) + ); + } + + if (operation.name === 'view' || operation.name === 'edit') { + return getOperationById(Number(requestParameters.id)); + } + + return Promise.resolve(null); + } + ), + stateProcessor: new CallbackStateProcessor( + async ( + data: StateProcessorInput, + operation: CrudOperation, + requestParameters: RequestParameters + ) => { + if (operation.name === 'edit' || operation.name === 'delete') { + if (!data) { + throw new Error('Cannot create new object: empty data.'); + } + if (Array.isArray(data)) { + throw new Error('Cannot update data as array for this action.'); + } + + const operationObject = await getOperationById(Number(requestParameters.id)); + if (!operationObject) { + throw new Error(`Could not find operation with id "${requestParameters.id}".`); + } + + if (operation.name === 'edit') { + operationObject.details = data?.details || ''; + await updateOperationDetails(operationObject); + } + + if (operation.name === 'delete') { + await deleteOperation(operationObject); + } + + success('Success!'); + await goto('/crud/triage/list'); + return; + } + } + ) +}); diff --git a/src/lib/db/bank_accounts.ts b/src/lib/db/bank_accounts.ts index ba034819..b5a32d54 100644 --- a/src/lib/db/bank_accounts.ts +++ b/src/lib/db/bank_accounts.ts @@ -1,34 +1,15 @@ -// @ts-ignore import BankAccount from '$lib/entities/BankAccount'; import api_call from '$lib/utils/api_call'; -import { writable } from 'svelte/store'; -import type { Writable } from 'svelte/store'; -export const bankAccountsStore: Writable = writable(); - -let bank_accounts_promise: Promise | null = null; - -async function getBankAccountPromise(): Promise> { - if (!bank_accounts_promise) { - bank_accounts_promise = getBankAccounts(); - } - - return bank_accounts_promise; -} +const cache: Record = {}; export async function getBankAccounts(): Promise> { - if (bank_accounts_promise) { - return await bank_accounts_promise; - } - - let res: string = await api_call('bank_account_find_all'); + const res: string = await api_call('bank_account_find_all'); - const bank_accounts = JSON.parse(res).map((data: object) => { - // @ts-ignore + const bank_accounts: Array = JSON.parse(res).map((data: BankAccount) => { return new BankAccount(data.id, data.name, data.slug, data.currency); }); - - bankAccountsStore.set(bank_accounts); + bank_accounts.forEach(a => cache[a.id] = a); return bank_accounts; } @@ -39,21 +20,31 @@ export async function getBankAccountsAsChoices(): Promise { return { name: bankAccount.name, - value: bankAccount.id + value: bankAccount.id.toString() }; }); } export async function getBankAccountById(id: number): Promise { - const bank_accounts = await getBankAccountPromise(); + if (cache[id]) { + return Promise.resolve(cache[id]); + } - for (const bank_account of bank_accounts) { - if (bank_account.id === id) { - return bank_account; - } + const res: string = await api_call('bank_account_get_by_id', { id: id.toString() }); + + if (!res) { + throw 'No results from the API'; } - return null; + const bank_account: BankAccount = JSON.parse(res); + + if (!bank_account) { + throw new Error('Could not deserialize bank account.'); + } + + cache[id] = bank_account; + + return bank_account; } export async function createBankAccount(bank_account: BankAccount): Promise { @@ -63,7 +54,7 @@ export async function createBankAccount(bank_account: BankAccount): Promise = writable(); -export const triageStore: Writable = writable(); - -const lastTriageCall = { - page: 1 -}; - export default class DeserializedOperation { public readonly id!: number; public readonly operation_date!: string; @@ -36,7 +27,7 @@ export async function getOperations( sortableField: SortableField | null = null, filters: Array | null = null ): Promise> { - const params = { page }; + const params: { [key: string]: number | string | Array } = { page }; if (sortableField) { params['orderField'] = sortableField.property_name; @@ -53,11 +44,7 @@ export async function getOperations( throw 'No results from the API'; } - const new_items = await deserializeAndNormalizeDatabaseResult(res); - - operationsStore.set(new_items); - - return new_items; + return await deserializeAndNormalizeDatabaseResult(res); } export async function getOperationsForAnalytics( @@ -89,13 +76,7 @@ export async function getTriageOperations(page: number = 1): Promise { @@ -129,8 +110,6 @@ export async function deleteOperation(operation: Operation) { const id = operation.id.toString(10); await api_call('operation_delete', { id: id }); - - await getTriageOperations(lastTriageCall.page); } export async function getOperationById(id: number): Promise { @@ -162,7 +141,9 @@ async function normalizeOperationFromDeserialized( const bank_account = await getBankAccountById(deserialized_operation.bank_account_id); if (!bank_account) { - throw new Error(`No bank account with id "${deserialized_operation.bank_account_id}".`); + throw new Error( + `Backend could not find bank account with id "${deserialized_operation.bank_account_id}".` + ); } const tags = await getTagsByIds(deserialized_operation.tags_ids); diff --git a/src/lib/db/tag_rules.ts b/src/lib/db/tag_rules.ts index 74dc524c..80283419 100644 --- a/src/lib/db/tag_rules.ts +++ b/src/lib/db/tag_rules.ts @@ -2,22 +2,8 @@ import TagRule from '$lib/entities/TagRule'; import { getTagById } from './tags'; import api_call from '$lib/utils/api_call'; -import { writable } from 'svelte/store'; -import type { Writable } from 'svelte/store'; import type Tag from '$lib/entities/Tag'; -export const tagRulesStore: Writable = writable(); - -let tag_rules_promise: Promise | null = null; - -async function getTagRulesPromise(): Promise { - if (!tag_rules_promise) { - tag_rules_promise = getTagRules(); - } - - return tag_rules_promise; -} - export default class DeserializedTagRule { public readonly id!: number; public readonly tags_ids!: Array; @@ -26,10 +12,6 @@ export default class DeserializedTagRule { } export async function getTagRules(): Promise> { - if (tag_rules_promise) { - return await tag_rules_promise; - } - let res: string = await api_call('tag_rules_get'); const deserialized_tag_rules: Array = JSON.parse(res); @@ -62,13 +44,11 @@ export async function getTagRules(): Promise> { ); } - tagRulesStore.set(tag_rules); - return tag_rules; } export async function getTagRuleById(id: string): Promise { - const tag_rules = await getTagRulesPromise(); + const tag_rules = await getTagRules(); for (const tag_rule of tag_rules) { if (tag_rule.id.toString() === id.toString()) { @@ -81,8 +61,6 @@ export async function getTagRuleById(id: string): Promise { export async function updateTagRule(tag_rule: TagRule): Promise { await api_call('tag_rule_update', { tagRule: tag_rule.serialize() }); - - tag_rules_promise = null; } export async function createTagRule(tag_rule: TagRule): Promise { @@ -93,6 +71,4 @@ export async function createTagRule(tag_rule: TagRule): Promise { } tag_rule.setId(+id); - - tag_rules_promise = null; } diff --git a/src/lib/db/tags.ts b/src/lib/db/tags.ts index ee014fff..9833e88f 100644 --- a/src/lib/db/tags.ts +++ b/src/lib/db/tags.ts @@ -1,40 +1,17 @@ -// @ts-ignore import Tag from '$lib/entities/Tag'; import api_call from '$lib/utils/api_call'; -import { writable } from 'svelte/store'; -import type { Writable } from 'svelte/store'; - -export const tagsStore: Writable = writable(); - -let tags_promise: Promise | null = null; - -async function getTagsPromise(): Promise> { - if (!tags_promise) { - tags_promise = getTags(); - } - - return tags_promise; -} export async function getTags(): Promise> { - if (tags_promise) { - return await tags_promise; - } - let res: string = await api_call('tags_get'); - const tags = JSON.parse(res).map((data: object) => { + return JSON.parse(res).map((data: object) => { // @ts-ignore return new Tag(data.id, data.name); }); - - tagsStore.set(tags); - - return tags; } export async function getTagById(id: number): Promise { - const tags = await getTagsPromise(); + const tags = await getTags(); for (const tag of tags) { if (tag.id === id) { @@ -46,7 +23,7 @@ export async function getTagById(id: number): Promise { } export async function getTagsByIds(ids: Array): Promise> { - const tags = await getTagsPromise(); + const tags = await getTags(); let tags_found: Array = []; @@ -76,8 +53,6 @@ export async function updateTag(tag: Tag): Promise { if (!tag_entity) throw new Error('Data corruption detected in tags.'); tag_entity.mergeWith(tag); - - tags_promise = null; } export async function createTag(tag: Tag): Promise { @@ -88,6 +63,4 @@ export async function createTag(tag: Tag): Promise { } tag.setId(+id); - - tags_promise = null; } diff --git a/src/lib/entities/BankAccount.ts b/src/lib/entities/BankAccount.ts index f62108bd..1fcd9574 100644 --- a/src/lib/entities/BankAccount.ts +++ b/src/lib/entities/BankAccount.ts @@ -22,6 +22,14 @@ export default class BankAccount implements Entity { }); } + static fromObject(object: {[key: string]: any}): BankAccount { + if ((object.id && isNaN(object.id)) || !object.name || !object.slug || !object.currency) { + throw new Error('Invalid object: cannot create a BankAccount.'); + } + + return new BankAccount(Number(object.id)||0, object.name, object.slug, object.currency); + } + public setId(id: number) { if (!id) { throw new Error('Cannot set an empty ID on an object.'); diff --git a/src/lib/entities/Operation.ts b/src/lib/entities/Operation.ts index f2493bd2..91f3c823 100644 --- a/src/lib/entities/Operation.ts +++ b/src/lib/entities/Operation.ts @@ -3,25 +3,22 @@ import sha512 from '$lib/utils/sha512'; import { DateFormat, dateFormatToRegex, DateTime, NormalizedDate } from '$lib/utils/date'; import type Tag from './Tag'; import type Entity from '$lib/struct/Entity'; -import ConfigFilter from '../admin/src/ConfigFilter'; -import FilterType from '../admin/src/FilterType'; -import { getBankAccountsAsChoices } from '../db/bank_accounts'; export enum OperationState { ok = 'ok', pending_triage = 'pending_triage' } -export var operations_filters = [ - new ConfigFilter('details', 'Details', FilterType.text), - new ConfigFilter('operation_date', 'Date', FilterType.date), - new ConfigFilter('amount_in_cents', 'Amount', FilterType.number), - new ConfigFilter('bank_account_id', 'Bank account', FilterType.entity, { - entities: getBankAccountsAsChoices - }), - new ConfigFilter('tags_names', 'Tags', FilterType.text), - new ConfigFilter('without_tags', 'Without tags', FilterType.boolean) -]; +// export const operations_filters = [ +// new ConfigFilter('details', 'Details', FilterType.text), +// new ConfigFilter('operation_date', 'Date', FilterType.date), +// new ConfigFilter('amount_in_cents', 'Amount', FilterType.number), +// new ConfigFilter('bank_account_id', 'Bank account', FilterType.entity, { +// entities: getBankAccountsAsChoices +// }), +// new ConfigFilter('tags_names', 'Tags', FilterType.text), +// new ConfigFilter('without_tags', 'Without tags', FilterType.boolean) +// ]; export default class Operation implements Entity { public readonly id!: number; @@ -69,7 +66,7 @@ export default class Operation implements Entity { } get date() { - let date = new Date(this.operation_date.toString()); + const date = new Date(this.operation_date.toString()); return date.toLocaleDateString(); } @@ -103,7 +100,12 @@ export default class Operation implements Entity { } const parsedDate = Date.parse( - matches.groups.year + '-' + matches.groups.month + '-' + matches.groups.day + 'T00:00:00.000Z' + matches.groups?.year + + '-' + + matches.groups?.month + + '-' + + matches.groups?.day + + 'T00:00:00.000Z' ); if (isNaN(parsedDate)) { throw new Error( diff --git a/src/lib/entities/Tag.ts b/src/lib/entities/Tag.ts index 9263d197..b0496bbb 100644 --- a/src/lib/entities/Tag.ts +++ b/src/lib/entities/Tag.ts @@ -34,4 +34,12 @@ export default class Tag implements Entity { } this.name = tag.name; } + + public static fromJson(json: { name?: string }): Tag { + if (json.name === undefined) { + throw new Error('Invaild JSON to create a Tag object: ' + JSON.stringify(json)); + } + + return new Tag(0, json.name); + } } diff --git a/src/lib/entities/TagRule.ts b/src/lib/entities/TagRule.ts index 72608aca..439ba386 100644 --- a/src/lib/entities/TagRule.ts +++ b/src/lib/entities/TagRule.ts @@ -1,6 +1,12 @@ import type Tag from './Tag'; import type Entity from '$lib/struct/Entity'; +export type PartialTagRule = { + tags?: Array; + matching_pattern?: string; + is_regex?: string | boolean; +}; + export default class TagRule implements Entity { public id!: number; public tags!: Tag[]; @@ -32,6 +38,19 @@ export default class TagRule implements Entity { this.id = id; } + public static fromJson(json: PartialTagRule): TagRule { + if ( + !Array.isArray(json.tags) || + json.matching_pattern === '' || + json.matching_pattern === undefined || + json.is_regex === '' || + json.is_regex === undefined + ) { + throw new Error('Invaild JSON to create a TagRule object: ' + JSON.stringify(json)); + } + return new TagRule(0, json.tags, json.matching_pattern, !!json.is_regex); + } + public serialize(): string { return JSON.stringify( { diff --git a/src/lib/utils/date.ts b/src/lib/utils/date.ts index 7c39573b..946dfa30 100644 --- a/src/lib/utils/date.ts +++ b/src/lib/utils/date.ts @@ -3,9 +3,9 @@ import { DateTime } from 'luxon'; export { DateTime }; export enum DateFormat { + DMY_SLASH = 'D/M/Y', YMD_SLASH = 'Y/M/D', YDM_SLASH = 'Y/D/M', - DMY_SLASH = 'D/M/Y', MDY_SLASH = 'M/D/Y', YMD_DASH = 'Y-M-D', YDM_DASH = 'Y-D-M', diff --git a/src/routes/+error.svelte b/src/old_routes/+error.svelte similarity index 100% rename from src/routes/+error.svelte rename to src/old_routes/+error.svelte diff --git a/src/routes/+layout.svelte b/src/old_routes/+layout.svelte similarity index 97% rename from src/routes/+layout.svelte rename to src/old_routes/+layout.svelte index 2cbef200..2debe55e 100644 --- a/src/routes/+layout.svelte +++ b/src/old_routes/+layout.svelte @@ -1,5 +1,4 @@ + + + + diff --git a/src/routes/(main)/+layout.ts b/src/routes/(main)/+layout.ts new file mode 100644 index 00000000..c9ef340d --- /dev/null +++ b/src/routes/(main)/+layout.ts @@ -0,0 +1,3 @@ +export const trailingSlash = 'always'; + +export const prerender = true; diff --git a/src/routes/(main)/+page.server.ts b/src/routes/(main)/+page.server.ts new file mode 100644 index 00000000..189f71e2 --- /dev/null +++ b/src/routes/(main)/+page.server.ts @@ -0,0 +1 @@ +export const prerender = true; diff --git a/src/routes/(main)/+page.svelte b/src/routes/(main)/+page.svelte new file mode 100644 index 00000000..ece85e0e --- /dev/null +++ b/src/routes/(main)/+page.svelte @@ -0,0 +1,17 @@ + + + +

{dashboard.adminConfig.head.brandName}

+ + +
diff --git a/src/routes/(main)/import/+page.svelte b/src/routes/(main)/import/+page.svelte new file mode 100644 index 00000000..5bf16174 --- /dev/null +++ b/src/routes/(main)/import/+page.svelte @@ -0,0 +1,15 @@ + + +

Import

+ +

Choose a format:

+ + + + diff --git a/src/routes/import/csv/+page.svelte b/src/routes/(main)/import/csv/+page.svelte similarity index 55% rename from src/routes/import/csv/+page.svelte rename to src/routes/(main)/import/csv/+page.svelte index 79350101..94ae3615 100644 --- a/src/routes/import/csv/+page.svelte +++ b/src/routes/(main)/import/csv/+page.svelte @@ -1,19 +1,38 @@ - -← Back to import -
+ onMount(async () => { + bankAccounts = await getBankAccounts(); + }); + -
-
- -
-
-
-
-
- -
- (Remember to refresh on any change) -
- -
- -
-
- -{#if loading} -
Loading…
-{/if} +
-

CSV parameters

- -
-
- -
- + + + + + +
+ (Remember to refresh on any change) +
+ + + +
+ {#if loading} + + + Loading… + + + {/if} +

CSV parameters

+ + + + -
-
- -
- -
- + + + + -
-
- -
- -
- + + + + -
-
-
-
-
- -
- -
-
- -
- - -
- -
- -
- + + + + + +
+ +
+
+ + + + + + + -
-
-
-
-
- -
- -

- ℹ Remember to sort these fields - manually in order to make sure CSV fields are parsed properly by the application. -

-
-
-
+ {#each bankAccounts as account} + + {/each} + + + + +
+
+ + + +

+ ℹ Remember to sort these fields + manually in order to make sure CSV fields are parsed properly by the application. +

+ +

{#if previewOperations.length}

Preview:

- - - - - {#each csvFields as field} - - {/each} - - - - {#each previewOperations as line, key} - - - {#each line as value} - + +
#{field}
{key}{value}
+ + + # + {#each csvFields as field} + {field} {/each} - - {/each} - -
+ + + + {#each previewOperations as line, key} + + + {key} + {#if key < numberOfLinesToRemove} + () + {/if} + + {#each line as value} + + {value} + {#if key < numberOfLinesToRemove} + () + {/if} + + {/each} + + {/each} + + + {/if} - diff --git a/src/routes/import/ofx/+page.svelte b/src/routes/(main)/import/ofx/+page.svelte similarity index 100% rename from src/routes/import/ofx/+page.svelte rename to src/routes/(main)/import/ofx/+page.svelte diff --git a/src/routes/(svelteadmin)/+layout.svelte b/src/routes/(svelteadmin)/+layout.svelte new file mode 100644 index 00000000..4fa864ce --- /dev/null +++ b/src/routes/(svelteadmin)/+layout.svelte @@ -0,0 +1 @@ + diff --git a/src/routes/(svelteadmin)/crud/[crud]/[operation]/+page.server.ts b/src/routes/(svelteadmin)/crud/[crud]/[operation]/+page.server.ts new file mode 100644 index 00000000..01edfaff --- /dev/null +++ b/src/routes/(svelteadmin)/crud/[crud]/[operation]/+page.server.ts @@ -0,0 +1,19 @@ +import { dashboard } from '$lib/crud/Dashboard'; + +export const prerender = true; + +/** @type {import('../../../../../../.svelte-kit/types/src/routes').EntryGenerator} */ +export function entries() { + const routes = []; + + for (const crud of dashboard.cruds) { + for (const operation of crud.options.operations) { + routes.push({ + crud: crud.name, + operation: operation.name + }); + } + } + + return routes; +} diff --git a/src/routes/(svelteadmin)/crud/[crud]/[operation]/+page.svelte b/src/routes/(svelteadmin)/crud/[crud]/[operation]/+page.svelte new file mode 100644 index 00000000..f9f7a223 --- /dev/null +++ b/src/routes/(svelteadmin)/crud/[crud]/[operation]/+page.svelte @@ -0,0 +1,23 @@ + + +
URL: {$page.url}
+ +{#key $page} + +{/key} diff --git a/src/routes/import/+page.svelte b/src/routes/import/+page.svelte deleted file mode 100644 index cdcd0dd8..00000000 --- a/src/routes/import/+page.svelte +++ /dev/null @@ -1,20 +0,0 @@ -

Import

- -

Choose a format:

- -CSV -OFX - -

(OFX not implemented yet)

- - diff --git a/src/style/_app.scss b/src/style/_app.scss deleted file mode 100644 index c4d7ec71..00000000 --- a/src/style/_app.scss +++ /dev/null @@ -1,47 +0,0 @@ -@import './bootstrap.scss'; - -html, -body { - width: 100%; - min-height: 100%; -} - -.toast { - //opacity: 0; - //transition-property: opacity; - //transition-duration: 1s; - //transition-timing-function: cubic-bezier(0, 0, 0, 1); - z-index: 1000; -} - -button.nav-link { - border: none transparent; - background: none transparent; -} - -.operation-amount { - text-align: right; -} - -#toast_container { - --toastContainerTop: auto; - --toastContainerRight: 1rem; - --toastContainerBottom: 0.5rem; - --toastContainerLeft: auto; -} - -.pre { - word-break: break-all; - white-space: pre-wrap; - font-family: monospace; - margin-top: 0; - margin-bottom: 1rem; - overflow: auto; - font-size: 0.875em; -} - -.date-time-field { - input { - @extend .form-control; - } -} diff --git a/src/style/bootstrap.scss b/src/style/bootstrap.scss deleted file mode 100644 index 666c6dd8..00000000 --- a/src/style/bootstrap.scss +++ /dev/null @@ -1,68 +0,0 @@ -// -// Start bootstrap -// - -@import 'bootstrap/scss/mixins/banner'; -@include bsBanner(''); - -// scss-docs-start import-stack -// Configuration -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'bootstrap/scss/variables-dark'; -@import 'bootstrap/scss/maps'; -@import 'bootstrap/scss/mixins'; -@import 'bootstrap/scss/utilities'; - -// -// start customization - -$navbar-light-color: rgba($black, 0.3); -$navbar-light-active-color: rgba($black, 1); - -// end customization -// - -// Layout & components -@import 'bootstrap/scss/root'; -@import 'bootstrap/scss/reboot'; -@import 'bootstrap/scss/type'; -@import 'bootstrap/scss/images'; -@import 'bootstrap/scss/containers'; -@import 'bootstrap/scss/grid'; -@import 'bootstrap/scss/tables'; -@import 'bootstrap/scss/forms'; -@import 'bootstrap/scss/buttons'; -@import 'bootstrap/scss/transitions'; -@import 'bootstrap/scss/dropdown'; -@import 'bootstrap/scss/button-group'; -@import 'bootstrap/scss/nav'; -@import 'bootstrap/scss/navbar'; -@import 'bootstrap/scss/card'; -@import 'bootstrap/scss/accordion'; -//@import 'bootstrap/scss/breadcrumb'; -//@import 'bootstrap/scss/pagination'; -@import 'bootstrap/scss/badge'; -@import 'bootstrap/scss/alert'; -//@import 'bootstrap/scss/progress'; -@import 'bootstrap/scss/list-group'; -@import 'bootstrap/scss/close'; -@import 'bootstrap/scss/toasts'; -@import 'bootstrap/scss/modal'; -//@import 'bootstrap/scss/tooltip'; -//@import 'bootstrap/scss/popover'; -//@import 'bootstrap/scss/carousel'; -//@import 'bootstrap/scss/spinners'; -@import 'bootstrap/scss/offcanvas'; -@import 'bootstrap/scss/placeholders'; - -// Helpers -@import 'bootstrap/scss/helpers'; - -// Utilities -@import 'bootstrap/scss/utilities/api'; -// scss-docs-end import-stack - -// -// End bootstrap -// diff --git a/tests/webdriverio/helpers/test_helpers.ts b/tests/webdriverio/helpers/test_helpers.ts deleted file mode 100644 index 7461c5d0..00000000 --- a/tests/webdriverio/helpers/test_helpers.ts +++ /dev/null @@ -1,8 +0,0 @@ -const base_url = process.platform === 'win32' ? 'https://tauri.localhost' : 'tauri://localhost'; - -export default async function moveTo(page: string) { - let link = await browser.$(`a[href="${page}"]`); - await expect(link).not.toBe(null); - await link.click(); - await expect(browser).toHaveUrl(base_url+page); -} diff --git a/tests/webdriverio/specs/home.ts b/tests/webdriverio/specs/home.ts deleted file mode 100644 index cf1ce4b0..00000000 --- a/tests/webdriverio/specs/home.ts +++ /dev/null @@ -1,12 +0,0 @@ - -describe('Home page', () => { - it('should display proper title', async function () { - let element = await $('main.container'); - - await expect(element).not.toBe(null); - - let text = await element.getText(); - - await expect(text).toMatch(/Compotes app, new version!/gi); - }); -}); diff --git a/tests/webdriverio/specs/operations.ts b/tests/webdriverio/specs/operations.ts deleted file mode 100644 index 8077aae5..00000000 --- a/tests/webdriverio/specs/operations.ts +++ /dev/null @@ -1,15 +0,0 @@ -import moveTo from "../helpers/test_helpers"; - -describe('Operations page', () => { - it('can display operations list', async function () { - await moveTo("/operations"); - - let h1 = await $('h1'); - await expect(h1).not.toBe(null); - let h1Text = await h1.getText(); - await expect(h1Text).toMatch(/Operations/gi); - - let table = await $('table.table'); - await expect(table).not.toBe(null); - }); -}); diff --git a/tests/webdriverio/specs/tag_rules.ts b/tests/webdriverio/specs/tag_rules.ts deleted file mode 100644 index 32bd334a..00000000 --- a/tests/webdriverio/specs/tag_rules.ts +++ /dev/null @@ -1,26 +0,0 @@ -import moveTo from "../helpers/test_helpers"; - -describe('Tag rules page', () => { - it('can display tag rules list', async function () { - await moveTo("/tag-rules"); - - let h1 = await $('h1'); - await expect(h1).not.toBe(null); - let h1Text = await h1.getText(); - await expect(h1Text).toMatch(/Tag rules/gi); - - let table = await $('table.table'); - await expect(table).not.toBe(null); - }); - - it('can add tag rule', async function () { - await moveTo("/tag-rules"); - await moveTo("/tag-rules/new"); - - let input = await $("input#matching_pattern"); - await input.setValue("test"); - - let select = await $("select#tags"); - // TODO - }); -}); diff --git a/tests/webdriverio/tsconfig.json b/tests/webdriverio/tsconfig.json deleted file mode 100644 index 3f3749c1..00000000 --- a/tests/webdriverio/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "types": [ - "node", - "webdriverio/async", - "@wdio/mocha-framework", - "@types/mocha", - "expect-webdriverio", - ], - "module": "commonjs" - }, - "include": [ - "./specs/**/*.ts" - ] -} \ No newline at end of file diff --git a/tests/webdriverio/wdio.conf.ts b/tests/webdriverio/wdio.conf.ts deleted file mode 100644 index fd4dfa93..00000000 --- a/tests/webdriverio/wdio.conf.ts +++ /dev/null @@ -1,70 +0,0 @@ -import {spawn} from 'child_process'; -import * as path from 'path'; - -let tauriDriver; - -const binSuffix = process.platform === 'win32' ? '.exe' : ''; - -exports.config = { - - autoCompileOpts: { - autoCompile: true, - tsNodeOpts: { - transpileOnly: true, - project: './tsconfig.json' - } - }, - - specs: [ - './specs/**/*.ts' - ], - maxInstances: 1, - maxInstancesPerCapability: 1, - - capabilities: [ - { - "tauri:options": { - application: "../../src-tauri/target/release/compotes"+binSuffix, - }, - "ms:edgeOptions": { - args: ["headless"] - }, - maxInstances: 1, - acceptInsecureCerts: true - } - ], - - // Level of logging verbosity: trace | debug | info | warn | error | silent - logLevel: 'warn', - - waitforTimeout: 10000, - connectionRetryTimeout: 120000, - connectionRetryCount: 3, - - // see also: https://webdriver.io/docs/frameworks - framework: 'mocha', - - reporters: [ - 'spec', - ], - - // See the full list at http://mochajs.org/ - mochaOpts: { - ui: 'bdd', - timeout: 60000 - }, - onPrepare: function () { - if (tauriDriver) { - return; - } - tauriDriver = spawn( - path.resolve(process.cwd(), '../../bin/tauri-driver'+binSuffix), - [], - { stdio: [null, process.stdout, process.stderr] } - ); - }, - onComplete​: function () { - tauriDriver && tauriDriver.kill(); - tauriDriver = null; - } -} diff --git a/vite.config.ts b/vite.config.ts index 46cfb557..86601f90 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,31 +1,10 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; -import path from 'path'; -import fs from 'fs'; - -const copyFile = function (options) { - return function () { - const targetDir = path.dirname(options.target); - if (!fs.existsSync(targetDir)){ - fs.mkdirSync(targetDir); - } - fs.writeFileSync(options.target, fs.readFileSync(options.source)); - console.info(` > Copied ${options.source} to ${options.target}.`); - }; -} /** @type {import('vite').UserConfig} */ export default defineConfig({ hmr: false, plugins: [ - copyFile({ - source: './node_modules/bootstrap/dist/js/bootstrap.bundle.min.js', - target: './static/bootstrap.bundle.min.js', - }), - copyFile({ - source: './node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map', - target: './static/bootstrap.bundle.min.js.map', - }), sveltekit(), ], });