From 7d07047036386eec53df1baa165f54fccb6e42b7 Mon Sep 17 00:00:00 2001 From: Mamerto Fabian Jr Date: Wed, 15 Jan 2025 19:55:06 +0800 Subject: [PATCH 01/75] set `default_expires_at` to none by default, refactor github settings --- src/lib/components/GitHubSettings.svelte | 101 +---------------- src/lib/components/github/NewUserGuide.svelte | 105 ++++++++++++++++++ src/popup/App.svelte | 2 - src/services/GitHubService.ts | 4 + 4 files changed, 112 insertions(+), 100 deletions(-) create mode 100644 src/lib/components/github/NewUserGuide.svelte diff --git a/src/lib/components/GitHubSettings.svelte b/src/lib/components/GitHubSettings.svelte index 5ad3028..607d578 100644 --- a/src/lib/components/GitHubSettings.svelte +++ b/src/lib/components/GitHubSettings.svelte @@ -2,14 +2,7 @@ import { Button } from "$lib/components/ui/button"; import { Input } from "$lib/components/ui/input"; import { Label } from "$lib/components/ui/label"; - import { TUTORIAL_LINK } from "$lib/constants"; import { - AlertCircle, - Youtube, - Github, - ExternalLink, - ChevronUp, - ChevronDown, Check, X, Search, @@ -17,6 +10,7 @@ } from "lucide-svelte"; import { onMount } from 'svelte'; import { GitHubService } from "../../services/GitHubService"; + import NewUserGuide from "./github/NewUserGuide.svelte"; export let isOnboarding: boolean = false; export let githubToken: string; @@ -24,18 +18,12 @@ export let repoName: string = ''; export let branch: string = 'main'; export let status: string; - export let isSettingsValid: boolean; export let onSave: () => void; export let onInput: () => void; export let projectId: string | null = null; export let projectSettings: Record = {}; export let buttonDisabled: boolean = false; - - const GITHUB_SIGNUP_URL = "https://github.com/signup"; - const CREATE_TOKEN_URL = - "https://github.com/settings/tokens/new?scopes=repo&description=Bolt%20to%20GitHub"; - - let showNewUserGuide = true; + let isValidatingToken = false; let isTokenValid: boolean | null = null; let tokenValidationTimeout: number; @@ -134,21 +122,12 @@ } onMount(async () => { - chrome.storage.local.get(['showNewUserGuide'], (result) => { - showNewUserGuide = result.showNewUserGuide ?? true; - }); - // If we have initial valid settings, validate and load repos if (githubToken && repoOwner) { await validateSettings(); } }); - function toggleNewUserGuide() { - showNewUserGuide = !showNewUserGuide; - chrome.storage.local.set({ showNewUserGuide }); - } - async function validateSettings() { if (!githubToken) { isTokenValid = null; @@ -208,81 +187,7 @@
-
- - {#if showNewUserGuide} - - {/if} -
+
diff --git a/src/lib/components/github/NewUserGuide.svelte b/src/lib/components/github/NewUserGuide.svelte new file mode 100644 index 0000000..36ac875 --- /dev/null +++ b/src/lib/components/github/NewUserGuide.svelte @@ -0,0 +1,105 @@ + + +
+ + {#if showNewUserGuide} + + {/if} +
diff --git a/src/popup/App.svelte b/src/popup/App.svelte index 24aaf34..b54f7bc 100644 --- a/src/popup/App.svelte +++ b/src/popup/App.svelte @@ -235,7 +235,6 @@ bind:branch projectId={parsedProjectId} {status} - {isSettingsValid} buttonDisabled={hasStatus} onSave={saveSettings} onInput={checkSettingsValidity} @@ -265,7 +264,6 @@ bind:githubToken bind:repoOwner {status} - {isSettingsValid} buttonDisabled={hasStatus} onSave={saveSettings} onInput={checkSettingsValidity} diff --git a/src/services/GitHubService.ts b/src/services/GitHubService.ts index 8dfe090..33b2db3 100644 --- a/src/services/GitHubService.ts +++ b/src/services/GitHubService.ts @@ -1,3 +1,7 @@ +export const GITHUB_SIGNUP_URL = "https://github.com/signup"; +export const CREATE_TOKEN_URL = + "https://github.com/settings/tokens/new?scopes=repo&description=Bolt%20to%20GitHub&default_expires_at=none"; + interface GitHubFileResponse { sha?: string; content?: string; From 709eb7aa20d86b52c608db9534369d0b85ff47b0 Mon Sep 17 00:00:00 2001 From: Mamerto Fabian Jr Date: Wed, 15 Jan 2025 20:50:04 +0800 Subject: [PATCH 02/75] fix: update import path for GitHubService in NewUserGuide component --- src/lib/components/github/NewUserGuide.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/github/NewUserGuide.svelte b/src/lib/components/github/NewUserGuide.svelte index 36ac875..a5f39f3 100644 --- a/src/lib/components/github/NewUserGuide.svelte +++ b/src/lib/components/github/NewUserGuide.svelte @@ -11,7 +11,7 @@ import { GITHUB_SIGNUP_URL, CREATE_TOKEN_URL, - } from "src/services/GitHubService"; + } from "../../../services/GitHubService"; import { onMount } from "svelte"; let showNewUserGuide = true; From 3daea052f906a6d82167ff33741923b6999dad6b Mon Sep 17 00:00:00 2001 From: Mamerto Fabian Jr Date: Thu, 16 Jan 2025 07:14:53 +0800 Subject: [PATCH 03/75] add help tab --- src/lib/components/Header.svelte | 8 +++++-- src/lib/components/Help.svelte | 40 ++++++++++++++++++++++++++++++++ src/popup/App.svelte | 7 +++++- 3 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 src/lib/components/Help.svelte diff --git a/src/lib/components/Header.svelte b/src/lib/components/Header.svelte index 48c89a5..45a0379 100644 --- a/src/lib/components/Header.svelte +++ b/src/lib/components/Header.svelte @@ -1,9 +1,9 @@ - + Home @@ -16,4 +16,8 @@ Settings + + + Help + diff --git a/src/lib/components/Help.svelte b/src/lib/components/Help.svelte new file mode 100644 index 0000000..2656a4c --- /dev/null +++ b/src/lib/components/Help.svelte @@ -0,0 +1,40 @@ + + + + + Help & Documentation + + Learn how to use Bolt to GitHub effectively + + + +
+

Getting Started

+

+ 1. Create a new project on bolt.new or open an existing one +

+

+ 2. Configure your GitHub settings with your personal access token +

+

+ 3. Set your repository details and branch name +

+
+ +
+

Important Note

+

+ ⚠️ This extension cannot function if Bolt encounters an error. Please ensure your Bolt project is working correctly before attempting to use this extension. +

+
+ +
+

Need More Help?

+

+ Visit our GitHub repository for detailed documentation, issues, and updates. +

+
+
+
diff --git a/src/popup/App.svelte b/src/popup/App.svelte index b54f7bc..d433cc0 100644 --- a/src/popup/App.svelte +++ b/src/popup/App.svelte @@ -17,7 +17,8 @@ import type { GitHubSettingsInterface } from "$lib/types"; import ProjectsList from "$lib/components/ProjectsList.svelte"; import { GitHubService } from "../services/GitHubService"; - import { Button } from "$lib/components/ui/button"; + import { Button } from "$lib/components/ui/button"; + import Help from "$lib/components/Help.svelte"; let githubToken: string = ""; let repoOwner = ""; @@ -242,6 +243,10 @@ + + + + {:else if hasInitialSettings && repoOwner && githubToken} From 43b6965acf726e9c8018cbd4223d44da3df15ad6 Mon Sep 17 00:00:00 2001 From: Mamerto Fabian Jr Date: Thu, 16 Jan 2025 08:59:13 +0800 Subject: [PATCH 04/75] setup linting and formatting, run format fix --- .eslintrc.cjs | 36 + .github/ISSUE_TEMPLATE/bug_report.md | 13 +- .github/workflows/release.yml | 12 +- .prettierrc | 9 + CHANGELOG.md | 5 +- README.md | 22 +- components.json | 26 +- manifest.json | 11 +- package-lock.json | 1342 ++++++++++++++++- package.json | 13 +- postcss.config.js | 10 +- src/background/BackgroundService.ts | 100 +- src/background/StateManager.ts | 38 +- src/content/ContentManager.ts | 302 ++-- src/content/MessageHandler.ts | 2 +- src/content/Notification.svelte | 22 +- src/content/UIManager.ts | 123 +- src/content/UploadStatus.svelte | 48 +- src/lib/common.ts | 14 +- src/lib/components/Footer.svelte | 13 +- src/lib/components/GitHubSettings.svelte | 79 +- src/lib/components/Header.svelte | 44 +- src/lib/components/Help.svelte | 15 +- src/lib/components/ProjectsList.svelte | 71 +- src/lib/components/SocialLinks.svelte | 4 +- src/lib/components/StatusAlert.svelte | 21 +- src/lib/components/github/NewUserGuide.svelte | 177 +-- .../ui/alert/alert-description.svelte | 14 +- .../components/ui/alert/alert-title.svelte | 26 +- src/lib/components/ui/alert/alert.svelte | 20 +- src/lib/components/ui/alert/index.ts | 48 +- src/lib/components/ui/button/button.svelte | 34 +- src/lib/components/ui/button/index.ts | 73 +- .../components/ui/card/card-content.svelte | 14 +- .../ui/card/card-description.svelte | 14 +- src/lib/components/ui/card/card-footer.svelte | 14 +- src/lib/components/ui/card/card-header.svelte | 14 +- src/lib/components/ui/card/card-title.svelte | 26 +- src/lib/components/ui/card/card.svelte | 16 +- src/lib/components/ui/card/index.ts | 40 +- src/lib/components/ui/input/index.ts | 42 +- src/lib/components/ui/input/input.svelte | 68 +- src/lib/components/ui/label/index.ts | 8 +- src/lib/components/ui/label/label.svelte | 26 +- src/lib/components/ui/tabs/index.ts | 26 +- .../components/ui/tabs/tabs-content.svelte | 26 +- src/lib/components/ui/tabs/tabs-list.svelte | 22 +- .../components/ui/tabs/tabs-trigger.svelte | 30 +- src/lib/constants.ts | 16 +- src/lib/types.ts | 28 +- src/lib/utils.ts | 100 +- src/lib/zip.ts | 8 +- src/popup/App.svelte | 123 +- src/popup/index.html | 4 +- src/popup/main.ts | 2 +- src/services/GitHubService.ts | 142 +- src/services/settings.ts | 109 +- src/services/zipHandler.ts | 485 +++--- src/styles/gb.css | 46 +- tailwind.config.js | 116 +- tsconfig.json | 7 +- tsconfig.node.json | 16 +- vite.config.ts | 32 +- 63 files changed, 2972 insertions(+), 1435 deletions(-) create mode 100644 .eslintrc.cjs create mode 100644 .prettierrc diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..6cad929 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,36 @@ +module.exports = { + root: true, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:svelte/recommended', + 'prettier', + ], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020, + extraFileExtensions: ['.svelte'], + }, + env: { + browser: true, + es2017: true, + node: true, + }, + overrides: [ + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser', + }, + }, + ], + rules: { + // Add basic rules to start with + '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], + '@typescript-eslint/no-explicit-any': 'warn', + 'no-console': ['warn', { allow: ['warn', 'error'] }], + }, +}; diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index cf12de9..6ebc322 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,43 +1,52 @@ --- name: Bug report about: Create a report to help improve the Bolt to GitHub extension -title: "[BUG] " +title: '[BUG] ' labels: bug assignees: mamertofabian - --- ## 🐛 Bug Description + ## 📝 Steps to Reproduce + 1. Go to '...' 2. Click on '....' 3. See error '...' ## ✅ Expected Behavior + ## ❌ Actual Behavior + ## 📸 Screenshots + ## 🔍 Environment Details + - Chrome Version: - Extension Version: - Operating System: - Bolt.new Project Type: ## 💾 Additional Context + + - Did this work before? - Are you using any specific GitHub organization/repository settings? - Any error messages in the Chrome DevTools console? (Press F12 to open) ## ✔️ Checklist + + - [ ] I am on bolt.new website when trying to use the extension - [ ] I have provided my GitHub token with correct permissions - [ ] I have the latest version of the extension installed diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef8fec4..146dcbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,28 +13,28 @@ permissions: jobs: build: runs-on: ubuntu-latest - + steps: - name: Checkout code uses: actions/checkout@v4 - + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - + - name: Install dependencies run: npm ci - + - name: Build project run: npm run build - + - name: Zip build artifacts run: | cd dist zip -r ../chrome-extension.zip . - + - name: Create Release uses: softprops/action-gh-release@v1 with: diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..2026edb --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "useTabs": false, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "es5", + "printWidth": 100, + "plugins": ["prettier-plugin-svelte"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 42d9d8d..e30fa67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,16 @@ ## 2024-12-02 ### Added + - New classes for improved code organization: `BackgroundService`, `StateManager`, `ContentManager`, and `UIManager`. - UI components for notifications and upload status management. - Projects tab for managing Bolt projects and GitHub repositories. ### Changed + - Refactored background and content scripts for better modularity and maintainability. - Enhanced GitHub integration with structured settings and improved error handling. ### Fixed -- Ensured upload status container is appended only after the document body is available, improving UI reliability. \ No newline at end of file + +- Ensured upload status container is appended only after the document body is available, improving UI reliability. diff --git a/README.md b/README.md index 7e6e466..b2b9bbb 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ A Chrome extension that automatically captures ZIP file downloads from bolt.new, ## 📦 Installation Options ### Stable Version (Chrome Web Store) + Install from Chrome Web Store @@ -50,12 +51,16 @@ A Chrome extension that automatically captures ZIP file downloads from bolt.new, - Import existing GitHub repos into Bolt #### Best Practices + 1. Always verify your repository settings before syncing a new project 2. Double-check the repository name and branch when switching between projects ### Latest Version (GitHub) + To try the latest development version: + 1. Clone and install: + ```bash git clone https://github.com/mamertofabian/bolt-to-github.git cd bolt-to-github @@ -63,6 +68,7 @@ To try the latest development version: ``` 2. Build the extension: + ```bash npm run build ``` @@ -89,11 +95,13 @@ To try the latest development version: Get started in just 3 simple steps: 1. **Install from Chrome Web Store** + - Visit our [Chrome Web Store page](https://chrome.google.com/webstore/detail/pikdepbilbnnpgdkdaaoeekgflljmame) - Click "Add to Chrome" - Click "Add extension" when prompted 2. **Configure the Extension** + - Make sure you have a Bolt.new project loaded - Click the extension icon in your Chrome toolbar - Enter your GitHub token (needs repo permissions) @@ -117,15 +125,18 @@ Follow these steps to get started: Need help? Watch our [Quick Start Video Tutorial](https://youtu.be/7C03DNw9ZHI) ### 🛠️ For Developers (Contributing) + If you want to modify the extension or contribute to its development: 1. Set up your development environment: + ```bash # Make sure you have Node.js v16 or later installed node --version ``` 2. Clone and install: + ```bash git clone https://github.com/mamertofabian/bolt-to-github.git cd bolt-to-github @@ -133,6 +144,7 @@ If you want to modify the extension or contribute to its development: ``` 3. Build for development: + ```bash npm run watch # For development with hot reload # OR @@ -207,20 +219,24 @@ See our [Contributing Guide](#contributing) for more details. ## Support & Resources ### Documentation & Tutorials + - 📺 [Watch our video tutorials](https://youtube.com/@aidrivencoder) - 📖 [Read the documentation](https://github.com/mamertofabian/bolt-to-github) - 💡 [Get development tips](https://aidrivencoder.com) - 💬 [Discord Community](https://discord.gg/JtjYHBBnGU) ### Professional Support + - 📊 [Book a consultation](https://calendly.com/mamerto/30min) - 📧 [Email support](mailto:mamerto@codefrost.com) - 💻 [Custom development inquiries](https://codefrost.com) ### Report Issues + For bugs or feature requests, please [open an issue](https://github.com/mamertofabian/bolt-to-github/issues) on the GitHub repository. ### Support the Project + If you find this extension helpful, you can support its development: [![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/aidrivencoder) @@ -279,11 +295,13 @@ A: Currently, the extension processes all files in the ZIP. File filtering may b ### Common Issues 1. **Extension not intercepting downloads** + - Ensure you're on bolt.new - Check if the file is a ZIP - Verify permissions are enabled 2. **GitHub push fails** + - Verify your token has repo permissions - Check repository name and owner - Ensure branch exists @@ -294,7 +312,7 @@ A: Currently, the extension processes all files in the ZIP. File filtering may b ## Future Enhancements - - Let me know if you have any ideas for additional features or improvements by opening an issue on GitHub. +- Let me know if you have any ideas for additional features or improvements by opening an issue on GitHub. ## Acknowledgments @@ -321,7 +339,9 @@ A: Currently, the extension processes all files in the ZIP. File filtering may b ## Project Features ### Projects Management + The extension includes a dedicated Projects tab that helps you: + - Keep track of all your Bolt projects pushed to GitHub - Quick-access buttons to: - Open projects directly in Bolt diff --git a/components.json b/components.json index c3048cf..fe84768 100644 --- a/components.json +++ b/components.json @@ -1,14 +1,14 @@ { - "$schema": "https://shadcn-svelte.com/schema.json", - "style": "default", - "tailwind": { - "config": "tailwind.config.js", - "css": "src/styles/gb.css", - "baseColor": "slate" - }, - "aliases": { - "components": "$lib/components", - "utils": "$lib/utils" - }, - "typescript": true -} \ No newline at end of file + "$schema": "https://shadcn-svelte.com/schema.json", + "style": "default", + "tailwind": { + "config": "tailwind.config.js", + "css": "src/styles/gb.css", + "baseColor": "slate" + }, + "aliases": { + "components": "$lib/components", + "utils": "$lib/utils" + }, + "typescript": true +} diff --git a/manifest.json b/manifest.json index 2079d1d..bd36699 100644 --- a/manifest.json +++ b/manifest.json @@ -8,15 +8,8 @@ "48": "assets/icons/icon48.png", "128": "assets/icons/icon128.png" }, - "permissions": [ - "storage", - "activeTab", - "tabs" - ], - "host_permissions": [ - "https://bolt.new/*", - "https://api.github.com/*" - ], + "permissions": ["storage", "activeTab", "tabs"], + "host_permissions": ["https://bolt.new/*", "https://api.github.com/*"], "background": { "service_worker": "src/background/index.ts", "type": "module" diff --git a/package-lock.json b/package-lock.json index bf6ba0f..a150fdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,10 +18,17 @@ "@tsconfig/svelte": "^5.0.4", "@types/chrome": "^0.0.236", "@types/node": "^22.9.1", + "@typescript-eslint/eslint-plugin": "^8.20.0", + "@typescript-eslint/parser": "^8.20.0", "autoprefixer": "^10.4.20", "bits-ui": "^0.21.16", "clsx": "^2.1.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "^10.0.1", + "eslint-plugin-svelte": "^2.46.1", "postcss": "^8.4.49", + "prettier": "^3.4.2", + "prettier-plugin-svelte": "^3.3.3", "svelte": "^4.2.19", "svelte-check": "^3.8.6", "svelte-preprocess": "^5.1.4", @@ -431,6 +438,79 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@floating-ui/core": { "version": "1.6.8", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", @@ -456,6 +536,44 @@ "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==", "dev": true }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/@internationalized/date": { "version": "3.5.6", "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.5.6.tgz", @@ -723,6 +841,242 @@ "integrity": "sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==", "dev": true }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.20.0.tgz", + "integrity": "sha512-naduuphVw5StFfqp4Gq4WhIBE2gN1GEmMUExpJYknZJdRnc+2gDzB8Z3+5+/Kv33hPQRDGzQO/0opHE72lZZ6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.20.0", + "@typescript-eslint/type-utils": "8.20.0", + "@typescript-eslint/utils": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.20.0.tgz", + "integrity": "sha512-gKXG7A5HMyjDIedBi6bUrDcun8GIjnI8qOwVLiY3rx6T/sHP/19XLJOnIq/FgQvWLHja5JN/LSE7eklNBr612g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.20.0", + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/typescript-estree": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.20.0.tgz", + "integrity": "sha512-J7+VkpeGzhOt3FeG1+SzhiMj9NzGD/M6KoGn9f4dbz3YzK9hvbhVTmLj/HiTp9DazIzJ8B4XcM80LrR9Dm1rJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.20.0.tgz", + "integrity": "sha512-bPC+j71GGvA7rVNAHAtOjbVXbLN5PkwqMvy1cwGeaxUoRQXVuKCebRoLzm+IPW/NtFFpstn1ummSIasD5t60GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.20.0", + "@typescript-eslint/utils": "8.20.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.20.0.tgz", + "integrity": "sha512-cqaMiY72CkP+2xZRrFt3ExRBu0WmVitN/rYPZErA80mHjHx/Svgp8yfbzkJmDoQ/whcytOPO9/IZXnOc+wigRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.20.0.tgz", + "integrity": "sha512-Y7ncuy78bJqHI35NwzWol8E0X7XkRVS4K4P4TCyzWkOJih5NDvtoRDW4Ba9YJJoB2igm9yXDdYI/+fkiiAxPzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.20.0.tgz", + "integrity": "sha512-dq70RUw6UK9ei7vxc4KQtBRk7qkHZv447OUZ6RPQMQl71I3NZxQJX/f32Smr+iqWrB02pHKn2yAdHBb0KNrRMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.20.0", + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/typescript-estree": "8.20.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.20.0.tgz", + "integrity": "sha512-v/BpkeeYAsPkKCkR8BDwcno0llhzWVqPOamQrAEMdpZav2Y9OVjd9dwJyBLJWwf335B5DmlifECIkZRJCaGaHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.20.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", + "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", + "dev": true, + "license": "ISC" + }, "node_modules/@webcomponents/custom-elements": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@webcomponents/custom-elements/-/custom-elements-1.6.0.tgz", @@ -740,6 +1094,16 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/acorn-walk": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", @@ -752,6 +1116,23 @@ "node": ">=0.4.0" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-regex": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", @@ -801,6 +1182,13 @@ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", "dev": true }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/aria-query": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", @@ -976,6 +1364,16 @@ "node": ">=8.0.0" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase-css": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", @@ -1005,6 +1403,39 @@ } ] }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/cheerio": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", @@ -1222,6 +1653,13 @@ } } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -1261,6 +1699,19 @@ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", "dev": true }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", @@ -1417,12 +1868,333 @@ "node": ">=6" } }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-compat-utils": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, + "node_modules/eslint-config-prettier": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz", + "integrity": "sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "build/bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-svelte": { + "version": "2.46.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.46.1.tgz", + "integrity": "sha512-7xYr2o4NID/f9OEYMqxsEQsCsj4KaMy4q5sANaKkAb6/QeCjYFxRmDm2S3YC3A3pl1kyPZ/syOx/i7LcWYSbIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@jridgewell/sourcemap-codec": "^1.4.15", + "eslint-compat-utils": "^0.5.1", + "esutils": "^2.0.3", + "known-css-properties": "^0.35.0", + "postcss": "^8.4.38", + "postcss-load-config": "^3.1.4", + "postcss-safe-parser": "^6.0.0", + "postcss-selector-parser": "^6.1.0", + "semver": "^7.6.2", + "svelte-eslint-parser": "^0.43.0" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0-0 || ^9.0.0-0", + "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "svelte": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-svelte/node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-svelte/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", @@ -1439,6 +2211,20 @@ "node": ">=8.6.0" } }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -1453,6 +2239,19 @@ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==" }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -1465,6 +2264,62 @@ "node": ">=8" } }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flatted": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "dev": true, + "license": "ISC" + }, "node_modules/focus-trap": { "version": "7.6.2", "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.6.2.tgz", @@ -1576,7 +2431,23 @@ "is-glob": "^4.0.1" }, "engines": { - "node": ">= 6" + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/graceful-fs": { @@ -1585,6 +2456,23 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -1636,6 +2524,33 @@ "node": ">= 4" } }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -1719,6 +2634,16 @@ "node": ">=0.12.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-reference": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", @@ -1757,6 +2682,19 @@ "jiti": "bin/jiti.js" } }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", @@ -1769,6 +2707,27 @@ "node": ">=6" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -1781,6 +2740,16 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -1790,6 +2759,27 @@ "node": ">=6" } }, + "node_modules/known-css-properties": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.35.0.tgz", + "integrity": "sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==", + "dev": true, + "license": "MIT" + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -1810,6 +2800,29 @@ "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==" }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", @@ -1954,6 +2967,13 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, "node_modules/node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", @@ -2017,12 +3037,75 @@ "wrappy": "1" } }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parse5": { "version": "7.2.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", @@ -2060,6 +3143,16 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -2290,6 +3383,50 @@ "postcss": "^8.2.14" } }, + "node_modules/postcss-safe-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", + "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + } + }, + "node_modules/postcss-scss": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-scss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.4.29" + } + }, "node_modules/postcss-selector-parser": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", @@ -2309,6 +3446,53 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-svelte": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.3.3.tgz", + "integrity": "sha512-yViK9zqQ+H2qZD1w/bH7W8i+bVfKrD8GIFjkFe4Thl6kCT9SlAsXVNmt3jCvQOCsnOhcvYgsoVlRV/Eu6x5nNw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "prettier": "^3.0.0", + "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2376,6 +3560,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -2476,6 +3670,19 @@ "rimraf": "^2.5.2" } }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2640,6 +3847,19 @@ "node": ">=8" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/sucrase": { "version": "3.35.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", @@ -2706,6 +3926,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -2762,6 +3995,34 @@ "svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0" } }, + "node_modules/svelte-eslint-parser": { + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.43.0.tgz", + "integrity": "sha512-GpU52uPKKcVnh8tKN5P4UZpJ/fUDndmq7wfsvoVXsyP+aY0anol7Yqo01fyrlaWGMFfm4av5DyrjlaXdLRJvGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "postcss": "^8.4.39", + "postcss-scss": "^4.0.9" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + }, + "peerDependencies": { + "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "svelte": { + "optional": true + } + } + }, "node_modules/svelte-hmr": { "version": "0.15.3", "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz", @@ -2925,6 +4186,13 @@ "node": ">=10.13.0" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -2958,6 +4226,19 @@ "node": ">=8.0" } }, + "node_modules/ts-api-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", + "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -2970,6 +4251,32 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typescript": { "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", @@ -3037,6 +4344,16 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -3164,6 +4481,16 @@ "node": ">= 8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", @@ -3272,6 +4599,19 @@ "engines": { "node": ">= 14" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index bfb19ca..8a1ca8e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,11 @@ "dev": "vite", "build": "vite build", "check": "svelte-check --tsconfig ./tsconfig.json", - "watch": "vite build --watch" + "watch": "vite build --watch", + "lint": "eslint \"src/**/*.{js,ts,svelte}\"", + "lint:fix": "eslint \"src/**/*.{js,ts,svelte}\" --fix", + "format": "prettier --check .", + "format:fix": "prettier --write ." }, "dependencies": { "fflate": "^0.8.2", @@ -19,10 +23,17 @@ "@tsconfig/svelte": "^5.0.4", "@types/chrome": "^0.0.236", "@types/node": "^22.9.1", + "@typescript-eslint/eslint-plugin": "^8.20.0", + "@typescript-eslint/parser": "^8.20.0", "autoprefixer": "^10.4.20", "bits-ui": "^0.21.16", "clsx": "^2.1.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "^10.0.1", + "eslint-plugin-svelte": "^2.46.1", "postcss": "^8.4.49", + "prettier": "^3.4.2", + "prettier-plugin-svelte": "^3.3.3", "svelte": "^4.2.19", "svelte-check": "^3.8.6", "svelte-preprocess": "^5.1.4", diff --git a/postcss.config.js b/postcss.config.js index 70d778e..2aa7205 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, - } \ No newline at end of file + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/src/background/BackgroundService.ts b/src/background/BackgroundService.ts index 4c17671..56dcf29 100644 --- a/src/background/BackgroundService.ts +++ b/src/background/BackgroundService.ts @@ -9,7 +9,9 @@ export class BackgroundService { private ports: Map; private githubService: GitHubService | null; private pendingCommitMessage: string; - private storageListener: ((changes: { [key: string]: chrome.storage.StorageChange }, namespace: string) => void) | null = null; + private storageListener: + | ((changes: { [key: string]: chrome.storage.StorageChange }, namespace: string) => void) + | null = null; constructor() { console.log('🚀 Background service initializing...'); @@ -21,8 +23,8 @@ export class BackgroundService { this.initialize(); } - // this.initializeListeners(); - // this.initializeStorageListener(); + // this.initializeListeners(); + // this.initializeStorageListener(); private async initialize(): Promise { const githubService = await this.initializeGitHubService(); @@ -35,10 +37,13 @@ export class BackgroundService { private async initializeGitHubService(): Promise { try { const settings = await this.stateManager.getGitHubSettings(); - - if (settings && settings.gitHubSettings - && settings.gitHubSettings.githubToken - && settings.gitHubSettings.repoOwner) { + + if ( + settings && + settings.gitHubSettings && + settings.gitHubSettings.githubToken && + settings.gitHubSettings.repoOwner + ) { console.log('✅ Valid settings found, initializing GitHub service', settings); this.githubService = new GitHubService(settings.gitHubSettings.githubToken); } else { @@ -53,16 +58,14 @@ export class BackgroundService { } private setupZipHandler(githubService: GitHubService) { - this.zipHandler = new ZipHandler( - githubService, (status) => this.broadcastStatus(status) - ); + this.zipHandler = new ZipHandler(githubService, (status) => this.broadcastStatus(status)); } private broadcastStatus(status: UploadStatusState) { for (const [tabId, port] of this.ports) { this.sendResponse(port, { type: 'UPLOAD_STATUS', - status + status, }); } } @@ -70,7 +73,7 @@ export class BackgroundService { private setupConnectionHandlers(): void { chrome.runtime.onConnect.addListener((port: Port) => { const tabId = port.sender?.tab?.id; - + if (!tabId || port.name !== 'bolt-content') { return; } @@ -113,8 +116,9 @@ export class BackgroundService { // Create new listener and store reference this.storageListener = async (changes, namespace) => { if (namespace === 'sync') { - const settingsChanged = ['githubToken', 'repoOwner', 'repoName', 'branch'] - .some(key => key in changes); + const settingsChanged = ['githubToken', 'repoOwner', 'repoName', 'branch'].some( + (key) => key in changes + ); if (settingsChanged) { console.log('🔄 GitHub settings changed, reinitializing GitHub service...'); @@ -166,12 +170,12 @@ export class BackgroundService { } } catch (error) { console.error(`Error handling message ${message.type}:`, error); - this.sendResponse(port, { - type: 'UPLOAD_STATUS', - status: { - status: 'error', - message: error instanceof Error ? error.message : 'Unknown error occurred' - } + this.sendResponse(port, { + type: 'UPLOAD_STATUS', + status: { + status: 'error', + message: error instanceof Error ? error.message : 'Unknown error occurred', + }, }); } } @@ -206,57 +210,63 @@ export class BackgroundService { // Process the ZIP file await this.withTimeout( - this.zipHandler.processZipFile(blob, projectId, this.pendingCommitMessage), - 2 * 60 * 1000, // 2 minutes timeout - 'Processing ZIP file timed out' + this.zipHandler.processZipFile(blob, projectId, this.pendingCommitMessage), + 2 * 60 * 1000, // 2 minutes timeout + 'Processing ZIP file timed out' ); // Reset commit message after successful upload this.pendingCommitMessage = 'Commit from Bolt to GitHub'; - - this.sendResponse(port, { - type: 'UPLOAD_STATUS', - status: { status: 'success', message: 'Upload completed successfully', progress: 100 } + + this.sendResponse(port, { + type: 'UPLOAD_STATUS', + status: { status: 'success', message: 'Upload completed successfully', progress: 100 }, }); } catch (decodeError) { - const errorMessage = decodeError instanceof Error ? decodeError.message : String(decodeError); + const errorMessage = + decodeError instanceof Error ? decodeError.message : String(decodeError); const isGitHubError = errorMessage.includes('GitHub API Error'); - + if (isGitHubError) { // Extract the original GitHub error message if available - const originalMessage = (decodeError as any).originalMessage || - 'GitHub authentication or API error occurred'; - - throw new Error( - `GitHub Error: ${originalMessage}` - ); + const originalMessage = + (decodeError as any).originalMessage || 'GitHub authentication or API error occurred'; + + throw new Error(`GitHub Error: ${originalMessage}`); } else { throw new Error( `Failed to process ZIP data. Please try reloading the page. ` + - `If the issue persists, please open a GitHub issue.` + `If the issue persists, please open a GitHub issue.` ); } } } catch (error) { console.error('Error processing ZIP:', error); - this.sendResponse(port, { - type: 'UPLOAD_STATUS', - status: { - status: 'error', - message: error instanceof Error ? error.message : 'Unknown error occurred' - } + this.sendResponse(port, { + type: 'UPLOAD_STATUS', + status: { + status: 'error', + message: error instanceof Error ? error.message : 'Unknown error occurred', + }, }); } } - private async withTimeout(promise: Promise, ms: number, timeoutMessage: string): Promise { + private async withTimeout( + promise: Promise, + ms: number, + timeoutMessage: string + ): Promise { const timeout = new Promise((_, reject) => - setTimeout(() => reject(new Error(timeoutMessage)), ms) + setTimeout(() => reject(new Error(timeoutMessage)), ms) ); return Promise.race([promise, timeout]); } - private sendResponse(port: Port, message: { type: MessageType; status?: UploadStatusState }): void { + private sendResponse( + port: Port, + message: { type: MessageType; status?: UploadStatusState } + ): void { try { port.postMessage(message); } catch (error) { diff --git a/src/background/StateManager.ts b/src/background/StateManager.ts index 41b5974..23d71d7 100644 --- a/src/background/StateManager.ts +++ b/src/background/StateManager.ts @@ -1,27 +1,27 @@ -import { SettingsService } from "../services/settings"; -import type { GitHubSettingsInterface } from "../lib/types"; +import { SettingsService } from '../services/settings'; +import type { GitHubSettingsInterface } from '../lib/types'; export class StateManager { - private static instance: StateManager; + private static instance: StateManager; - private constructor() { } + private constructor() {} - static getInstance(): StateManager { - if (!this.instance) { - this.instance = new StateManager(); - } - return this.instance; + static getInstance(): StateManager { + if (!this.instance) { + this.instance = new StateManager(); } + return this.instance; + } - async getGitHubSettings() { - return SettingsService.getGitHubSettings(); - } + async getGitHubSettings() { + return SettingsService.getGitHubSettings(); + } - async getProjectId() { - return SettingsService.getProjectId(); - } + async getProjectId() { + return SettingsService.getProjectId(); + } - async setProjectId(projectId: string) { - return SettingsService.setProjectId(projectId); - } -} \ No newline at end of file + async setProjectId(projectId: string) { + return SettingsService.setProjectId(projectId); + } +} diff --git a/src/content/ContentManager.ts b/src/content/ContentManager.ts index 1fc434d..40bfd22 100644 --- a/src/content/ContentManager.ts +++ b/src/content/ContentManager.ts @@ -1,194 +1,200 @@ -import type { Message } from "$lib/types"; -import { MessageHandler } from "./MessageHandler"; -import { UIManager } from "./UIManager"; +import type { Message } from '$lib/types'; +import { MessageHandler } from './MessageHandler'; +import { UIManager } from './UIManager'; export class ContentManager { - private uiManager: UIManager | undefined; - private messageHandler: MessageHandler | undefined; - private port: chrome.runtime.Port | null = null; - private isReconnecting = false; - private reconnectAttempts = 0; - private readonly MAX_RECONNECT_ATTEMPTS = 5; - private readonly RECONNECT_DELAY = 1000; - - constructor() { - if (!this.shouldInitialize()) { - console.log('Not initializing ContentManager - URL does not match bolt.new pattern'); - return; - } - - try { - this.initializeConnection(); - this.messageHandler = new MessageHandler(this.port!); - this.uiManager = UIManager.getInstance(this.messageHandler); - this.setupEventListeners(); - } catch (error) { - console.error('Error initializing ContentManager:', error); - this.handleInitializationError(error); - } + private uiManager: UIManager | undefined; + private messageHandler: MessageHandler | undefined; + private port: chrome.runtime.Port | null = null; + private isReconnecting = false; + private reconnectAttempts = 0; + private readonly MAX_RECONNECT_ATTEMPTS = 5; + private readonly RECONNECT_DELAY = 1000; + + constructor() { + if (!this.shouldInitialize()) { + console.log('Not initializing ContentManager - URL does not match bolt.new pattern'); + return; } - private shouldInitialize(): boolean { - const currentUrl = window.location.href; - const match = currentUrl.match(/bolt\.new\/~\/([^\/]+)/); - return !!match; + try { + this.initializeConnection(); + this.messageHandler = new MessageHandler(this.port!); + this.uiManager = UIManager.getInstance(this.messageHandler); + this.setupEventListeners(); + } catch (error) { + console.error('Error initializing ContentManager:', error); + this.handleInitializationError(error); } - - private initializeConnection() { - try { - this.port = chrome.runtime.connect({ name: 'bolt-content' }); - console.log('🔊 Connected to background service with port:', this.port); + } - if (!this.port) { - throw new Error('Failed to establish connection with background service'); - } + private shouldInitialize(): boolean { + const currentUrl = window.location.href; + const match = currentUrl.match(/bolt\.new\/~\/([^\/]+)/); + return !!match; + } - this.setupPortListeners(); - this.isReconnecting = false; - this.reconnectAttempts = 0; - } catch (error) { - if (this.isExtensionContextInvalidated(error)) { - console.warn('Extension context invalidated, attempting reconnection...'); - this.handleExtensionContextInvalidated(); - } else { - console.error('Error initializing connection:', error); - throw error; - } + private initializeConnection() { + try { + this.port = chrome.runtime.connect({ name: 'bolt-content' }); + console.log('🔊 Connected to background service with port:', this.port); + + if (!this.port) { + throw new Error('Failed to establish connection with background service'); + } + + this.setupPortListeners(); + this.isReconnecting = false; + this.reconnectAttempts = 0; + } catch (error) { + if (this.isExtensionContextInvalidated(error)) { + console.warn('Extension context invalidated, attempting reconnection...'); + this.handleExtensionContextInvalidated(); + } else { + console.error('Error initializing connection:', error); + throw error; } } + } - private setupPortListeners(): void { - if (!this.port) { - console.error('Port is not initialized'); - this.handleDisconnection(); - return; - }; - - this.port.onMessage.addListener((message: Message) => { - try { - this.handleBackgroundMessage(message); - } catch (error) { - console.error('Error handling message:', error); - } - }); - - this.port.onDisconnect.addListener(() => { - const error = chrome.runtime.lastError; - console.log('Port disconnected:', error?.message || 'No error message'); - - if (this.isExtensionContextInvalidated(error)) { - this.handleExtensionContextInvalidated(); - } else { - this.handleDisconnection(); - } - }); + private setupPortListeners(): void { + if (!this.port) { + console.error('Port is not initialized'); + this.handleDisconnection(); + return; } - private isExtensionContextInvalidated(error: any): boolean { - return error?.message?.includes('Extension context invalidated') || - error?.message?.includes('Extension context was invalidated'); + + this.port.onMessage.addListener((message: Message) => { + try { + this.handleBackgroundMessage(message); + } catch (error) { + console.error('Error handling message:', error); + } + }); + + this.port.onDisconnect.addListener(() => { + const error = chrome.runtime.lastError; + console.log('Port disconnected:', error?.message || 'No error message'); + + if (this.isExtensionContextInvalidated(error)) { + this.handleExtensionContextInvalidated(); + } else { + this.handleDisconnection(); + } + }); + } + private isExtensionContextInvalidated(error: any): boolean { + return ( + error?.message?.includes('Extension context invalidated') || + error?.message?.includes('Extension context was invalidated') + ); } private handleExtensionContextInvalidated(): void { - console.log('Extension context invalidated, cleaning up...'); - this.cleanup(); - this.notifyUserOfExtensionReload(); + console.log('Extension context invalidated, cleaning up...'); + this.cleanup(); + this.notifyUserOfExtensionReload(); } private handleDisconnection(): void { - if (this.isReconnecting || this.reconnectAttempts >= this.MAX_RECONNECT_ATTEMPTS) { - return; - } + if (this.isReconnecting || this.reconnectAttempts >= this.MAX_RECONNECT_ATTEMPTS) { + return; + } - this.isReconnecting = true; - this.reconnectAttempts++; + this.isReconnecting = true; + this.reconnectAttempts++; - console.log(`Attempting reconnection (${this.reconnectAttempts}/${this.MAX_RECONNECT_ATTEMPTS})...`); - setTimeout(() => this.reconnect(), this.RECONNECT_DELAY); + console.log( + `Attempting reconnection (${this.reconnectAttempts}/${this.MAX_RECONNECT_ATTEMPTS})...` + ); + setTimeout(() => this.reconnect(), this.RECONNECT_DELAY); } private reconnect(): void { - try { - this.initializeConnection(); - if (this.port) { - this.messageHandler?.updatePort(this.port); - this.setupEventListeners(); - console.log('Successfully reconnected'); - } - } catch (error) { - console.error('Reconnection failed:', error); - this.handleDisconnection(); + try { + this.initializeConnection(); + if (this.port) { + this.messageHandler?.updatePort(this.port); + this.setupEventListeners(); + console.log('Successfully reconnected'); } + } catch (error) { + console.error('Reconnection failed:', error); + this.handleDisconnection(); + } } private handleInitializationError(error: any): void { - console.error('Initialization error:', error); - this.notifyUserOfError(); + console.error('Initialization error:', error); + this.notifyUserOfError(); } private notifyUserOfExtensionReload(): void { - this.uiManager?.showNotification({ - type: 'info', - message: 'Bolt to GitHub extension has been updated or reloaded. Please refresh the page to continue.', - duration: 10000 - }); + this.uiManager?.showNotification({ + type: 'info', + message: + 'Bolt to GitHub extension has been updated or reloaded. Please refresh the page to continue.', + duration: 10000, + }); } private notifyUserOfError(): void { - this.uiManager?.showNotification({ - type: 'error', - message: 'There was an error connecting to the Bolt to GitHub extension. Please refresh the page or reinstall the extension.', - duration: 10000 - }); + this.uiManager?.showNotification({ + type: 'error', + message: + 'There was an error connecting to the Bolt to GitHub extension. Please refresh the page or reinstall the extension.', + duration: 10000, + }); } private cleanup(): void { - this.port = null; - this.isReconnecting = false; - this.reconnectAttempts = 0; - this.uiManager?.cleanup(); + this.port = null; + this.isReconnecting = false; + this.reconnectAttempts = 0; + this.uiManager?.cleanup(); } private setupEventListeners(): void { - window.addEventListener('unload', () => { - this.cleanup(); - }); - - window.addEventListener('focus', () => { - if (!this.port && !this.isReconnecting) { - this.reconnect(); - } - }); - - // Handle extension updates - chrome.runtime.onConnect.addListener(() => { - this.reinitialize(); - }); + window.addEventListener('unload', () => { + this.cleanup(); + }); + + window.addEventListener('focus', () => { + if (!this.port && !this.isReconnecting) { + this.reconnect(); + } + }); + + // Handle extension updates + chrome.runtime.onConnect.addListener(() => { + this.reinitialize(); + }); } private handleBackgroundMessage(message: Message): void { - switch (message.type) { - case 'UPLOAD_STATUS': - this.uiManager?.updateUploadStatus(message.status!); - break; - case 'GITHUB_SETTINGS_CHANGED': - console.log('🔊 Received GitHub settings changed:', message.data.isValid); - this.uiManager?.updateButtonState(message.data.isValid); - break; - default: - console.warn('Unhandled message type:', message.type); - } + switch (message.type) { + case 'UPLOAD_STATUS': + this.uiManager?.updateUploadStatus(message.status!); + break; + case 'GITHUB_SETTINGS_CHANGED': + console.log('🔊 Received GitHub settings changed:', message.data.isValid); + this.uiManager?.updateButtonState(message.data.isValid); + break; + default: + console.warn('Unhandled message type:', message.type); + } } public reinitialize(): void { - console.log('🔊 Reinitializing content script'); - try { - this.cleanup(); - this.initializeConnection(); - this.uiManager?.reinitialize(); - this.messageHandler?.sendMessage('CONTENT_SCRIPT_READY'); - } catch (error) { - console.error('Error reinitializing content script:', error); - this.handleInitializationError(error); - } + console.log('🔊 Reinitializing content script'); + try { + this.cleanup(); + this.initializeConnection(); + this.uiManager?.reinitialize(); + this.messageHandler?.sendMessage('CONTENT_SCRIPT_READY'); + } catch (error) { + console.error('Error reinitializing content script:', error); + this.handleInitializationError(error); + } } } diff --git a/src/content/MessageHandler.ts b/src/content/MessageHandler.ts index 4b74562..ef60e04 100644 --- a/src/content/MessageHandler.ts +++ b/src/content/MessageHandler.ts @@ -1,4 +1,4 @@ -import type { MessageType } from "$lib/types"; +import type { MessageType } from '$lib/types'; export class MessageHandler { private port: chrome.runtime.Port; diff --git a/src/content/Notification.svelte b/src/content/Notification.svelte index a1cd991..2ad023c 100644 --- a/src/content/Notification.svelte +++ b/src/content/Notification.svelte @@ -1,21 +1,21 @@ {#if visible} - {/if} @@ -103,11 +113,21 @@