From ec3e2e16a90463835a32db22a09ebe2547f7e0e2 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sun, 23 Nov 2025 08:38:13 -0800 Subject: [PATCH] Switch to BiomeJS (#306) --- .github/workflows/ci-js.yml | 18 - .github/workflows/ci-rust.yml | 36 - .github/workflows/ci.yml | 27 + .github/workflows/release.yml | 43 +- .gitignore | 2 + .prettierignore | 4 - .prettierrc.js | 8 - .vscode/extensions.json | 3 + .vscode/launch.json | 26 + .vscode/settings.json | 6 + DEVELOPMENT.md | 26 + biome.json | 51 + eslint.config.cjs | 89 - package-lock.json | 1951 +++-------------- package.json | 28 +- packages/common-lib/debounce.ts | 8 +- packages/common-lib/formatSize.ts | 32 +- .../src/bindings/gen_api.ts | 2 +- .../src/bindings/gen_events.ts | 4 +- plugins/action-copy-curl/package.json | 1 - plugins/action-copy-curl/src/index.ts | 2 +- plugins/action-copy-curl/tests/index.test.ts | 60 +- plugins/action-copy-grpcurl/package.json | 1 - plugins/action-copy-grpcurl/src/index.ts | 2 +- .../action-copy-grpcurl/tests/index.test.ts | 34 +- plugins/auth-apikey/package.json | 3 +- plugins/auth-apikey/src/index.ts | 19 +- plugins/auth-aws/package.json | 3 +- plugins/auth-aws/src/index.ts | 8 +- plugins/auth-basic/package.json | 3 +- plugins/auth-basic/src/index.ts | 29 +- plugins/auth-bearer/package.json | 1 - plugins/auth-bearer/src/index.ts | 2 +- plugins/auth-bearer/tests/index.test.ts | 10 +- plugins/auth-jwt/package.json | 3 +- plugins/auth-jwt/src/index.ts | 18 +- plugins/auth-ntlm/package.json | 3 +- plugins/auth-oauth1/package.json | 3 +- plugins/auth-oauth1/src/index.ts | 6 +- plugins/auth-oauth2/package.json | 1 - plugins/auth-oauth2/src/fetchAccessToken.ts | 23 +- .../src/getOrRefreshAccessToken.ts | 19 +- .../src/grants/authorizationCode.ts | 6 +- plugins/auth-oauth2/src/grants/implicit.ts | 6 +- plugins/auth-oauth2/src/index.ts | 6 +- plugins/auth-oauth2/src/store.ts | 2 +- plugins/auth-oauth2/src/util.ts | 2 +- plugins/auth-oauth2/tests/util.test.ts | 2 +- plugins/filter-jsonpath/package.json | 3 +- plugins/filter-xpath/package.json | 3 +- plugins/filter-xpath/src/index.ts | 7 +- plugins/importer-curl/package.json | 1 - plugins/importer-curl/src/index.ts | 56 +- plugins/importer-curl/tests/index.test.ts | 2 +- plugins/importer-insomnia/package.json | 1 - plugins/importer-insomnia/src/common.ts | 16 +- plugins/importer-insomnia/src/v4.ts | 22 +- plugins/importer-insomnia/src/v5.ts | 22 +- plugins/importer-insomnia/tests/index.test.ts | 7 +- plugins/importer-openapi/package.json | 1 - plugins/importer-openapi/src/index.ts | 5 +- plugins/importer-openapi/tests/index.test.ts | 2 +- .../importer-postman-environment/package.json | 1 - .../importer-postman-environment/src/index.ts | 22 +- .../tests/index.test.ts | 2 +- plugins/importer-postman/package.json | 1 - plugins/importer-postman/src/index.ts | 36 +- .../tests/fixtures/auth.input.json | 1610 +++++++------- .../tests/fixtures/nested.input.json | 72 +- .../tests/fixtures/params.input.json | 18 +- plugins/importer-postman/tests/index.test.ts | 2 +- plugins/importer-yaak/package.json | 1 - plugins/importer-yaak/src/index.ts | 15 +- .../template-function-1password/package.json | 3 +- .../template-function-1password/src/index.ts | 9 +- plugins/template-function-cookie/package.json | 3 +- plugins/template-function-ctx/package.json | 3 +- plugins/template-function-encode/package.json | 3 +- plugins/template-function-fs/package.json | 3 +- plugins/template-function-fs/src/index.ts | 2 +- plugins/template-function-hash/package.json | 3 +- plugins/template-function-hash/src/index.ts | 22 +- plugins/template-function-json/package.json | 3 +- plugins/template-function-json/src/index.ts | 7 +- plugins/template-function-prompt/package.json | 3 +- plugins/template-function-prompt/src/index.ts | 7 +- plugins/template-function-random/package.json | 3 +- plugins/template-function-random/src/index.ts | 8 +- plugins/template-function-regex/package.json | 1 - plugins/template-function-regex/src/index.ts | 2 +- .../tests/regex.test.ts | 66 +- .../template-function-request/package.json | 3 +- .../template-function-request/src/index.ts | 4 +- .../template-function-response/package.json | 3 +- .../template-function-response/src/index.ts | 32 +- .../template-function-timestamp/package.json | 1 - .../template-function-timestamp/src/index.ts | 2 +- .../tests/formatDatetime.test.ts | 2 +- plugins/template-function-uuid/package.json | 3 +- plugins/template-function-xml/package.json | 3 +- plugins/template-function-xml/src/index.ts | 17 +- plugins/themes-yaak/package.json | 3 +- src-tauri/tauri.conf.json | 41 - src-tauri/tauri.development.conf.json | 10 + src-tauri/tauri.linux.conf.json | 12 +- src-tauri/tauri.release.conf.json | 48 +- src-tauri/yaak-models/bindings/gen_util.ts | 2 +- src-tauri/yaak-plugins/Cargo.toml | 2 +- src-tauri/yaak-plugins/bindings/gen_api.ts | 2 +- src-tauri/yaak-plugins/bindings/gen_events.ts | 4 +- src-tauri/yaak-sync/bindings/gen_sync.ts | 2 +- src-tauri/yaak-templates/package.json | 7 +- src-tauri/yaak-templates/pkg/package.json | 17 + .../yaak-templates/pkg/yaak_templates.d.ts | 5 + .../yaak-templates/pkg/yaak_templates.js | 4 + .../yaak-templates/pkg/yaak_templates_bg.js | 296 +++ .../yaak-templates/pkg/yaak_templates_bg.wasm | Bin 0 -> 54673 bytes .../pkg/yaak_templates_bg.wasm.d.ts | 9 + src-tauri/yaak-templates/src/parser.rs | 4 +- src-web/commands/commands.tsx | 1 + src-web/commands/createEnvironment.tsx | 2 +- .../commands/deleteWebsocketConnections.ts | 4 +- src-web/commands/moveToWorkspace.tsx | 2 +- src-web/commands/openSettings.tsx | 2 +- src-web/commands/openWorkspaceSettings.tsx | 7 +- src-web/components/BinaryFileEditor.tsx | 2 +- src-web/components/CargoFeature.tsx | 3 +- src-web/components/ColorIndicator.tsx | 4 +- src-web/components/CommandPaletteDialog.tsx | 79 +- .../components/ConfirmLargeRequestBody.tsx | 4 +- src-web/components/CookieDialog.tsx | 6 +- src-web/components/Dialogs.tsx | 2 +- src-web/components/DropMarker.tsx | 4 +- src-web/components/DynamicForm.tsx | 13 +- src-web/components/EmptyStateText.tsx | 1 - src-web/components/EnvironmentEditDialog.tsx | 12 +- src-web/components/EnvironmentEditor.tsx | 2 +- .../components/EnvironmentSharableTooltip.tsx | 1 - src-web/components/ExportDataDialog.tsx | 1 + src-web/components/FolderLayout.tsx | 15 +- src-web/components/FolderSettingsDialog.tsx | 8 +- src-web/components/FormMultipartEditor.tsx | 2 +- src-web/components/GrpcConnectionLayout.tsx | 2 +- .../components/GrpcProtoSelectionDialog.tsx | 13 +- src-web/components/GrpcRequestPane.tsx | 4 +- src-web/components/GrpcResponsePane.tsx | 7 +- src-web/components/HeaderSize.tsx | 40 +- src-web/components/HeadersEditor.tsx | 5 +- .../components/HttpAuthenticationEditor.tsx | 6 +- src-web/components/HttpRequestLayout.tsx | 4 +- src-web/components/HttpRequestPane.tsx | 14 +- src-web/components/HttpResponsePane.tsx | 6 +- src-web/components/ImportCurlButton.tsx | 3 +- src-web/components/ImportDataDialog.tsx | 2 +- src-web/components/LicenseBadge.tsx | 7 +- src-web/components/LocalImage.tsx | 1 - src-web/components/Markdown.tsx | 2 +- src-web/components/MoveToWorkspaceDialog.tsx | 12 +- src-web/components/Overlay.tsx | 2 +- src-web/components/Prose.css | 23 +- .../RecentGrpcConnectionsDropdown.tsx | 2 +- src-web/components/RecentRequestsDropdown.tsx | 2 +- .../RecentWebsocketConnectionsDropdown.tsx | 2 +- .../components/RedirectToLatestWorkspace.tsx | 4 +- src-web/components/ResizeHandle.tsx | 6 +- src-web/components/ResponseHeaders.tsx | 1 + src-web/components/RouteError.tsx | 8 +- src-web/components/SelectFile.tsx | 2 +- src-web/components/Settings/Settings.tsx | 4 +- .../components/Settings/SettingsGeneral.tsx | 8 +- .../components/Settings/SettingsInterface.tsx | 6 +- .../components/Settings/SettingsLicense.tsx | 5 +- .../components/Settings/SettingsPlugins.tsx | 4 +- src-web/components/Settings/SettingsProxy.tsx | 2 +- src-web/components/Settings/SettingsTheme.tsx | 6 +- src-web/components/Sidebar.tsx | 58 +- src-web/components/SidebarActions.tsx | 2 +- src-web/components/TemplateFunctionDialog.tsx | 61 +- src-web/components/Toasts.tsx | 6 +- src-web/components/UrlBar.tsx | 2 +- src-web/components/UrlParameterEditor.tsx | 2 +- src-web/components/WebsocketRequestLayout.tsx | 2 +- src-web/components/WebsocketRequestPane.tsx | 10 +- src-web/components/WebsocketResponsePane.tsx | 5 +- src-web/components/WindowControls.tsx | 6 +- src-web/components/Workspace.tsx | 11 +- .../components/WorkspaceActionsDropdown.tsx | 3 +- .../components/WorkspaceEncryptionSetting.tsx | 7 +- src-web/components/WorkspaceHeader.tsx | 6 +- src-web/components/core/AutoScroller.tsx | 37 +- src-web/components/core/Checkbox.tsx | 6 +- src-web/components/core/Confirm.tsx | 26 +- src-web/components/core/DetailsBanner.tsx | 4 +- src-web/components/core/Dialog.tsx | 1 - src-web/components/core/DismissibleBanner.tsx | 9 +- src-web/components/core/Dropdown.tsx | 83 +- .../core/Editor/BetterMatchDecorator.ts | 3 +- src-web/components/core/Editor/Editor.css | 47 +- src-web/components/core/Editor/Editor.tsx | 32 +- .../core/Editor/filter/extension.ts | 6 +- .../components/core/Editor/filter/filter.ts | 32 +- .../components/core/Editor/filter/query.ts | 6 +- .../core/Editor/hyperlink/extension.ts | 9 +- src-web/components/core/Editor/json-lint.ts | 2 +- .../core/Editor/pairs/pairs.terms.ts | 5 +- src-web/components/core/Editor/pairs/pairs.ts | 28 +- .../components/core/Editor/text/text.terms.ts | 5 +- src-web/components/core/Editor/text/text.ts | 16 +- .../components/core/Editor/twig/completion.ts | 7 +- .../core/Editor/twig/pathParameters.ts | 4 +- .../core/Editor/twig/templateTags.ts | 2 +- .../components/core/Editor/twig/twig.terms.ts | 5 +- src-web/components/core/Editor/twig/twig.ts | 24 +- .../components/core/Editor/url/url.terms.ts | 5 +- src-web/components/core/Editor/url/url.ts | 23 +- src-web/components/core/HotKey.tsx | 1 + src-web/components/core/HotKeyList.tsx | 3 +- .../core/HttpResponseDurationTag.tsx | 14 +- src-web/components/core/HttpStatusTag.tsx | 2 +- src-web/components/core/IconButton.tsx | 2 + src-web/components/core/IconTooltip.tsx | 1 - src-web/components/core/Input.tsx | 9 +- src-web/components/core/JsonAttributeTree.tsx | 47 +- src-web/components/core/KeyValueRow.tsx | 1 + src-web/components/core/Label.tsx | 1 + src-web/components/core/PairEditor.tsx | 6 +- src-web/components/core/PairEditor.util.tsx | 3 +- src-web/components/core/PlainInput.tsx | 3 +- src-web/components/core/Prompt.tsx | 2 +- src-web/components/core/RadioDropdown.tsx | 15 +- src-web/components/core/SegmentedControl.tsx | 8 +- src-web/components/core/Select.tsx | 2 +- src-web/components/core/Separator.tsx | 10 +- src-web/components/core/SplitLayout.tsx | 8 +- src-web/components/core/Stacks.tsx | 6 +- src-web/components/core/Table.tsx | 8 +- src-web/components/core/Tabs/Tabs.tsx | 14 +- src-web/components/core/Toast.tsx | 2 +- src-web/components/core/Tooltip.tsx | 4 +- .../components/core/WebsocketStatusTag.tsx | 2 +- src-web/components/core/tree/Tree.tsx | 38 +- .../components/core/tree/TreeDragOverlay.tsx | 2 +- .../components/core/tree/TreeIndentGuide.tsx | 1 + src-web/components/core/tree/TreeItem.tsx | 12 +- src-web/components/core/tree/TreeItemList.tsx | 2 +- src-web/components/core/tree/atoms.ts | 2 +- src-web/components/core/tree/common.ts | 7 +- .../core/tree/useSelectableItems.ts | 2 +- src-web/components/git/GitCommitDialog.tsx | 14 +- src-web/components/git/GitDropdown.tsx | 2 +- src-web/components/git/GitRemotesDialog.tsx | 6 +- src-web/components/git/HistoryDialog.tsx | 12 +- .../graphql/GraphQLDocsExplorer.tsx | 93 +- src-web/components/graphql/GraphQLEditor.tsx | 7 +- .../responseViewers/AudioViewer.tsx | 5 +- .../components/responseViewers/CsvViewer.tsx | 4 +- .../responseViewers/EventStreamViewer.tsx | 3 +- .../responseViewers/HTMLOrTextViewer.tsx | 26 +- .../responseViewers/ImageViewer.tsx | 1 - .../components/responseViewers/JsonViewer.tsx | 5 +- .../components/responseViewers/PdfViewer.tsx | 2 +- .../components/responseViewers/SvgViewer.tsx | 2 +- .../components/responseViewers/TextViewer.tsx | 8 +- .../responseViewers/VideoViewer.tsx | 5 +- .../responseViewers/WebPageViewer.tsx | 2 +- src-web/font-size.ts | 4 +- src-web/hooks/useActiveCookieJar.ts | 13 +- src-web/hooks/useActiveEnvironment.ts | 2 +- src-web/hooks/useAllRequests.ts | 8 +- src-web/hooks/useAuthTab.tsx | 2 +- src-web/hooks/useCancelHttpResponse.ts | 2 +- src-web/hooks/useContainerQuery.ts | 8 +- src-web/hooks/useEnvironmentsBreakdown.ts | 3 +- src-web/hooks/useFastMutation.ts | 2 +- src-web/hooks/useFormatText.ts | 13 +- src-web/hooks/useGrpc.ts | 4 +- src-web/hooks/useGrpcRequestActions.ts | 2 +- src-web/hooks/useHeadersTab.tsx | 2 +- src-web/hooks/useHotKey.ts | 7 +- src-web/hooks/useHttpAuthentication.ts | 4 +- src-web/hooks/useHttpRequestActions.ts | 2 +- src-web/hooks/useImportCurl.ts | 2 +- src-web/hooks/useInheritedAuthentication.ts | 10 +- src-web/hooks/useInheritedHeaders.ts | 6 +- src-web/hooks/useInstallPlugin.ts | 2 +- src-web/hooks/useIntrospectGraphQL.ts | 11 +- src-web/hooks/useKeyValue.ts | 6 +- src-web/hooks/useKeyboardEvent.ts | 4 +- src-web/hooks/useLatestGrpcConnection.ts | 2 +- src-web/hooks/useLatestHttpResponse.ts | 2 +- src-web/hooks/useParentFolders.ts | 4 +- src-web/hooks/usePinnedGrpcConnection.ts | 4 +- src-web/hooks/usePinnedHttpResponse.ts | 2 +- src-web/hooks/usePinnedWebsocketConnection.ts | 2 +- src-web/hooks/usePlugins.ts | 2 +- src-web/hooks/useRecentCookieJars.ts | 2 +- src-web/hooks/useRecentEnvironments.ts | 2 +- src-web/hooks/useRecentRequests.ts | 6 +- src-web/hooks/useRequestEditor.tsx | 4 +- src-web/hooks/useStateWithDeps.ts | 2 +- ...eFunctions.ts => useTemplateFunctions.tsx} | 2 +- src-web/init/sync.ts | 8 +- src-web/lib/constants.ts | 1 - src-web/lib/contentType.ts | 24 +- src-web/lib/copy.ts | 2 +- src-web/lib/deleteModelWithConfirm.tsx | 9 +- src-web/lib/dnd.ts | 5 +- src-web/lib/encryption.ts | 8 +- src-web/lib/getNodeText.ts | 2 +- src-web/lib/initGlobalListeners.tsx | 2 +- src-web/lib/minPromiseMillis.ts | 6 +- src-web/lib/model_util.ts | 8 +- src-web/lib/prompt.ts | 2 +- src-web/lib/queryClient.ts | 28 +- src-web/lib/renameModelWithPrompt.tsx | 2 +- src-web/lib/resolvedModelName.ts | 6 +- src-web/lib/router.ts | 10 +- src-web/lib/scopes.ts | 1 - src-web/lib/setWorkspaceSearchParams.ts | 28 +- src-web/lib/theme/window.ts | 11 +- src-web/lib/theme/yaakColor.ts | 17 +- src-web/lib/truncate.ts | 2 +- src-web/main.css | 4 +- src-web/package.json | 5 +- src-web/routes/__root.tsx | 2 +- src-web/routes/index.tsx | 8 +- .../routes/workspaces/$workspaceId/index.tsx | 10 +- .../$workspaceId/requests/$requestId.tsx | 12 +- src-web/routes/workspaces/index.tsx | 8 +- src-web/tsconfig.json | 14 +- src-web/vite.config.ts | 2 - tsconfig.json | 6 +- 332 files changed, 3007 insertions(+), 4097 deletions(-) delete mode 100644 .github/workflows/ci-js.yml delete mode 100644 .github/workflows/ci-rust.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .prettierignore delete mode 100644 .prettierrc.js create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 biome.json delete mode 100644 eslint.config.cjs create mode 100644 src-tauri/yaak-templates/pkg/package.json create mode 100644 src-tauri/yaak-templates/pkg/yaak_templates.d.ts create mode 100644 src-tauri/yaak-templates/pkg/yaak_templates.js create mode 100644 src-tauri/yaak-templates/pkg/yaak_templates_bg.js create mode 100644 src-tauri/yaak-templates/pkg/yaak_templates_bg.wasm create mode 100644 src-tauri/yaak-templates/pkg/yaak_templates_bg.wasm.d.ts rename src-web/hooks/{useTemplateFunctions.ts => useTemplateFunctions.tsx} (96%) diff --git a/.github/workflows/ci-js.yml b/.github/workflows/ci-js.yml deleted file mode 100644 index 89229f83..00000000 --- a/.github/workflows/ci-js.yml +++ /dev/null @@ -1,18 +0,0 @@ -on: - pull_request: - branches: [develop] - -name: CI (JS) - -jobs: - test: - name: Lint/Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci - - run: npm run lint - - run: npm test diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml deleted file mode 100644 index 9ea45b63..00000000 --- a/.github/workflows/ci-rust.yml +++ /dev/null @@ -1,36 +0,0 @@ -on: - pull_request: - branches: [develop] - paths: - - src-tauri/** - - .github/workflows/** - -name: CI (Rust) - -defaults: - run: - working-directory: src-tauri - -jobs: - test: - name: Check/Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: | - sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.1-dev - - uses: dtolnay/rust-toolchain@stable - - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- - - run: cargo check --all - - run: cargo test --all diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..40adf205 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +on: pull_request + +name: CI (JS) +permissions: + contents: read + +jobs: + test: + name: Lint/Test + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + workspaces: 'src-tauri' + shared-key: ci + cache-on-failure: true + + - run: npm ci + - run: npm run lint + - name: Run JS Tests + run: npm test + - name: Run Rust Tests + run: cargo test --all + working-directory: src-tauri diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8e2a0c2..f7ea2c19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,8 +33,6 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 - with: - node-version: 22 - name: install Rust stable uses: dtolnay/rust-toolchain@stable @@ -42,17 +40,11 @@ jobs: # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - - uses: actions/cache@v3 - continue-on-error: false + - uses: Swatinem/rust-cache@v2 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - src-tauri/target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- + workspaces: 'src-tauri' + shared-key: ci + cache-on-failure: true - name: install dependencies (Linux only) if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. @@ -60,6 +52,11 @@ jobs: sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + - name: Install Protoc for plugin-runtime + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install trusted-signing-cli (Windows only) if: matrix.platform == 'windows-latest' shell: pwsh @@ -73,23 +70,13 @@ jobs: echo $dir >> $env:GITHUB_PATH & $exe --version - - name: Install NPM Dependencies - run: npm ci - - - name: Install Protoc for plugin-runtime - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - # Some things (eg. WASM package) requires building before lint will work - - name: Run bootstrap - run: npm run bootstrap - - - name: Run lint - run: npm run lint - - - name: Run tests + - run: npm ci + - run: npm run lint + - name: Run JS Tests run: npm test + - name: Run Rust Tests + run: cargo test --all + working-directory: src-tauri - name: Set version run: npm run replace-version diff --git a/.gitignore b/.gitignore index 8f487654..a4c93179 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,8 @@ dist-ssr # Editor directories and files .vscode/* !.vscode/extensions.json +!.vscode/settings.json +!.vscode/launch.json .idea .DS_Store *.suo diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 16c96ad4..00000000 --- a/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules/ -dist/ -out/ -.prettierrc.cjs diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index 86a16de2..00000000 --- a/.prettierrc.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - "trailingComma": "all", - "tabWidth": 2, - "semi": true, - "singleQuote": true, - "printWidth": 100, - "bracketSpacing": true -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..df9e35ce --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["biomejs.biome", "rust-lang.rust-analyzer", "bradlc.vscode-tailwindcss"] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..daca8f7d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Dev App", + "runtimeExecutable": "npm", + "runtimeArgs": ["run", "start"] + }, + { + "type": "node", + "request": "launch", + "name": "Build App", + "runtimeExecutable": "npm", + "runtimeArgs": ["run", "start"] + }, + { + "type": "node", + "request": "launch", + "name": "Bootstrap", + "runtimeExecutable": "npm", + "runtimeArgs": ["run", "bootstrap"] + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..ce1fe758 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "editor.defaultFormatter": "biomejs.biome", + "editor.formatOnSave": true, + "biome.enabled": true, + "biome.lint.format.enable": true +} diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 0153ba05..77ba2cf9 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -60,3 +60,29 @@ _Note: For safety, development builds use a separate database location from prod # Example lezer-generator components/core/Editor//.grammar > components/core/Editor//.ts ``` + +## Linting & Formatting + +This repo uses Biome for linting and formatting (replacing ESLint + Prettier). + +- Lint the entire repo: + +```sh +npm run lint +``` + +- Auto-fix lint issues where possible: + +```sh +npm run lint:fix +``` + +- Format code: + +```sh +npm run format +``` + +Notes: +- Many workspace packages also expose the same scripts (`lint`, `lint:fix`, and `format`). +- TypeScript type-checking still runs separately via `tsc --noEmit` in relevant packages. diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..05318042 --- /dev/null +++ b/biome.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.3.7/schema.json", + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "a11y": { + "useKeyWithClickEvents": "off" + } + } + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 100, + "bracketSpacing": true + }, + "css": { + "parser": { + "tailwindDirectives": true + }, + "linter": { + "enabled": false + } + }, + "javascript": { + "formatter": { + "quoteStyle": "single", + "jsxQuoteStyle": "double", + "trailingCommas": "all", + "semicolons": "always" + } + }, + "files": { + "includes": [ + "**", + "!**/node_modules", + "!**/dist", + "!**/build", + "!scripts", + "!packages/plugin-runtime", + "!packages/plugin-runtime-types", + "!src-tauri", + "!src-web/tailwind.config.cjs", + "!src-web/postcss.config.cjs", + "!src-web/vite.config.ts", + "!src-web/routeTree.gen.ts" + ] + } +} diff --git a/eslint.config.cjs b/eslint.config.cjs deleted file mode 100644 index e3cec310..00000000 --- a/eslint.config.cjs +++ /dev/null @@ -1,89 +0,0 @@ -const { defineConfig, globalIgnores } = require('eslint/config'); - -const { fixupConfigRules } = require('@eslint/compat'); - -const reactRefresh = require('eslint-plugin-react-refresh'); -const tsParser = require('@typescript-eslint/parser'); -const js = require('@eslint/js'); - -const { FlatCompat } = require('@eslint/eslintrc'); - -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all, -}); - -module.exports = defineConfig([ - { - extends: fixupConfigRules( - compat.extends( - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react-hooks/recommended', - 'plugin:import/recommended', - 'plugin:jsx-a11y/recommended', - 'plugin:@typescript-eslint/recommended', - 'eslint-config-prettier', - ), - ), - - plugins: { - 'react-refresh': reactRefresh, - }, - - languageOptions: { - parser: tsParser, - - parserOptions: { - project: ['./tsconfig.json'], - }, - }, - - settings: { - react: { - version: 'detect', - }, - - 'import/resolver': { - node: { - paths: ['src-web'], - extensions: ['.ts', '.tsx'], - }, - }, - }, - - rules: { - 'react-refresh/only-export-components': 'error', - 'jsx-a11y/no-autofocus': 'off', - 'react/react-in-jsx-scope': 'off', - 'import/no-unresolved': 'off', - - '@typescript-eslint/consistent-type-imports': [ - 'error', - { - prefer: 'type-imports', - disallowTypeAnnotations: true, - fixStyle: 'separate-type-imports', - }, - ], - }, - }, - globalIgnores([ - 'scripts/**/*', - 'packages/plugin-runtime/**/*', - 'packages/plugin-runtime-types/**/*', - 'src-tauri/**/*', - 'src-web/tailwind.config.cjs', - 'src-web/vite.config.ts', - ]), - globalIgnores([ - '**/node_modules/', - '**/dist/', - '**/build/', - '**/.eslintrc.cjs', - '**/.prettierrc.cjs', - 'src-web/postcss.config.cjs', - 'src-web/vite.config.ts', - ]), -]); diff --git a/package-lock.json b/package-lock.json index 5134073d..b0ae99a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,26 +59,12 @@ "src-tauri/yaak-ws", "src-web" ], - "dependencies": { - "jotai": "^2.12.2" - }, "devDependencies": { - "@eslint/compat": "^1.3.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "^9.29.0", + "@biomejs/biome": "^2.3.7", "@tauri-apps/cli": "^2.9.1", - "@typescript-eslint/eslint-plugin": "^8.27.0", - "@typescript-eslint/parser": "^8.27.0", "@yaakapp/cli": "^0.2.7", - "eslint": "^9.29.0", - "eslint-config-prettier": "^10.1.5", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", "nodejs-file-downloader": "^4.13.0", "npm-run-all": "^4.1.5", - "prettier": "^3.4.2", "typescript": "^5.8.3", "vitest": "^3.2.4", "workspaces-run": "^1.0.2" @@ -641,6 +627,169 @@ "node": ">=6.9.0" } }, + "node_modules/@biomejs/biome": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.7.tgz", + "integrity": "sha512-CTbAS/jNAiUc6rcq94BrTB8z83O9+BsgWj2sBCQg9rD6Wkh2gjfR87usjx0Ncx0zGXP1NKgT7JNglay5Zfs9jw==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.3.7", + "@biomejs/cli-darwin-x64": "2.3.7", + "@biomejs/cli-linux-arm64": "2.3.7", + "@biomejs/cli-linux-arm64-musl": "2.3.7", + "@biomejs/cli-linux-x64": "2.3.7", + "@biomejs/cli-linux-x64-musl": "2.3.7", + "@biomejs/cli-win32-arm64": "2.3.7", + "@biomejs/cli-win32-x64": "2.3.7" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.7.tgz", + "integrity": "sha512-LirkamEwzIUULhXcf2D5b+NatXKeqhOwilM+5eRkbrnr6daKz9rsBL0kNZ16Hcy4b8RFq22SG4tcLwM+yx/wFA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.7.tgz", + "integrity": "sha512-Q4TO633kvrMQkKIV7wmf8HXwF0dhdTD9S458LGE24TYgBjSRbuhvio4D5eOQzirEYg6eqxfs53ga/rbdd8nBKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.7.tgz", + "integrity": "sha512-inHOTdlstUBzgjDcx0ge71U4SVTbwAljmkfi3MC5WzsYCRhancqfeL+sa4Ke6v2ND53WIwCFD5hGsYExoI3EZQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.7.tgz", + "integrity": "sha512-/afy8lto4CB8scWfMdt+NoCZtatBUF62Tk3ilWH2w8ENd5spLhM77zKlFZEvsKJv9AFNHknMl03zO67CiklL2Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.7.tgz", + "integrity": "sha512-fJMc3ZEuo/NaMYo5rvoWjdSS5/uVSW+HPRQujucpZqm2ZCq71b8MKJ9U4th9yrv2L5+5NjPF0nqqILCl8HY/fg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.7.tgz", + "integrity": "sha512-CQUtgH1tIN6e5wiYSJqzSwJumHYolNtaj1dwZGCnZXm2PZU1jOJof9TsyiP3bXNDb+VOR7oo7ZvY01If0W3iFQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.7.tgz", + "integrity": "sha512-aJAE8eCNyRpcfx2JJAtsPtISnELJ0H4xVVSwnxm13bzI8RwbXMyVtxy2r5DV1xT3WiSP+7LxORcApWw0LM8HiA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.7.tgz", + "integrity": "sha512-pulzUshqv9Ed//MiE8MOUeeEkbkSHVDVY5Cz5wVAnH1DUqliCQG3j6s1POaITTFqFfo7AVIx2sWdKpx/GS+Nqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, "node_modules/@changesets/changelog-github": { "version": "0.4.8", "resolved": "https://registry.npmjs.org/@changesets/changelog-github/-/changelog-github-0.4.8.tgz", @@ -1320,152 +1469,6 @@ "node": ">=18" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", - "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/compat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.3.1.tgz", - "integrity": "sha512-k8MHony59I5EPic6EQTCNOuPoVBnoYXkP+20xvwFjN7t0qI3ImyvyBgg+hIVPwC8JaxVjjUZld+cLfBLFDLucg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "peerDependencies": { - "eslint": "^8.40 || 9" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/@eslint/config-array": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", - "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.6", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz", - "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", - "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.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": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "9.31.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.31.0.tgz", - "integrity": "sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.3.tgz", - "integrity": "sha512-1+WqvgNMhmlAambTvT3KPtCl/Ibr68VldY2XY40SL1CE0ZXiakFR/cbTspaF5HsnpDMvcYYoJHfl4980NBjGag==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.15.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@exodus/schemasafe": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", @@ -1485,70 +1488,27 @@ "integrity": "sha512-I7xWjLs2YSVMc5gGx1Z3ZG1lgFpITPndpi8Ku55GeEIKpACCPQNS/OTqQbxgTCfq0Ncvcc+CrFov96itVh6Qvw==", "license": "MIT" }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "engines": { - "node": ">=18.18.0" + "node": "20 || >=22" } }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" + "@isaacs/balanced-match": "^4.0.1" }, "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "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/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "node": "20 || >=22" } }, "node_modules/@isaacs/cliui": { @@ -2510,13 +2470,6 @@ "win32" ] }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, "node_modules/@sagold/json-pointer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@sagold/json-pointer/-/json-pointer-5.1.2.tgz", @@ -3680,13 +3633,6 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "license": "MIT" }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/jsonpath": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/@types/jsonpath/-/jsonpath-0.2.4.tgz", @@ -3858,276 +3804,6 @@ "@types/node": "*" } }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.36.0.tgz", - "integrity": "sha512-lZNihHUVB6ZZiPBNgOQGSxUASI7UJWhT8nHyUGCnaQ28XFCw98IfrMCG3rUl1uwUWoAvodJQby2KTs79UTcrAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.36.0", - "@typescript-eslint/type-utils": "8.36.0", - "@typescript-eslint/utils": "8.36.0", - "@typescript-eslint/visitor-keys": "8.36.0", - "graphemer": "^1.4.0", - "ignore": "^7.0.0", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.1.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.36.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.36.0.tgz", - "integrity": "sha512-FuYgkHwZLuPbZjQHzJXrtXreJdFMKl16BFYyRrLxDhWr6Qr7Kbcu2s1Yhu8tsiMXw1S0W1pjfFfYEt+R604s+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.36.0", - "@typescript-eslint/types": "8.36.0", - "@typescript-eslint/typescript-estree": "8.36.0", - "@typescript-eslint/visitor-keys": "8.36.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.9.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.36.0.tgz", - "integrity": "sha512-JAhQFIABkWccQYeLMrHadu/fhpzmSQ1F1KXkpzqiVxA/iYI6UnRt2trqXHt1sYEcw1mxLnB9rKMsOxXPxowN/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.36.0", - "@typescript-eslint/types": "^8.36.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": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.36.0.tgz", - "integrity": "sha512-wCnapIKnDkN62fYtTGv2+RY8FlnBYA3tNm0fm91kc2BjPhV2vIjwwozJ7LToaLAyb1ca8BxrS7vT+Pvvf7RvqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.36.0", - "@typescript-eslint/visitor-keys": "8.36.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/tsconfig-utils": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.36.0.tgz", - "integrity": "sha512-Nhh3TIEgN18mNbdXpd5Q8mSCBnrZQeY9V7Ca3dqYvNDStNIGRmJA6dmrIPMJ0kow3C7gcQbpsG2rPzy1Ks/AnA==", - "dev": true, - "license": "MIT", - "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.9.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.36.0.tgz", - "integrity": "sha512-5aaGYG8cVDd6cxfk/ynpYzxBRZJk7w/ymto6uiyUFtdCozQIsQWh7M28/6r57Fwkbweng8qAzoMCPwSJfWlmsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.36.0", - "@typescript-eslint/utils": "8.36.0", - "debug": "^4.3.4", - "ts-api-utils": "^2.1.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.9.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.36.0.tgz", - "integrity": "sha512-xGms6l5cTJKQPZOKM75Dl9yBfNdGeLRsIyufewnxT4vZTrjC0ImQT4fj8QmtJK84F58uSh5HVBSANwcfiXxABQ==", - "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.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.36.0.tgz", - "integrity": "sha512-JaS8bDVrfVJX4av0jLpe4ye0BpAaUW7+tnS4Y4ETa3q7NoZgzYbN9zDQTJ8kPb5fQ4n0hliAt9tA4Pfs2zA2Hg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.36.0", - "@typescript-eslint/tsconfig-utils": "8.36.0", - "@typescript-eslint/types": "8.36.0", - "@typescript-eslint/visitor-keys": "8.36.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.1.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.9.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "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.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.36.0.tgz", - "integrity": "sha512-VOqmHu42aEMT+P2qYjylw6zP/3E/HvptRwdn/PZxyV27KhZg2IOszXod4NcXisWzPAGSS4trE/g4moNj6XmH2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.36.0", - "@typescript-eslint/types": "8.36.0", - "@typescript-eslint/typescript-estree": "8.36.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.9.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.36.0.tgz", - "integrity": "sha512-vZrhV2lRPWDuGoxcmrzRZyxAggPL+qp3WzUrlZD+slFueDiYHxeBa34dUXPuC0RmGKzl4lS5kFJYvKCq9cnNDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.36.0", - "eslint-visitor-keys": "^4.2.1" - }, - "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.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "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.3.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", @@ -4571,16 +4247,6 @@ "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/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -4608,23 +4274,6 @@ "node": ">=8" } }, - "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/ajv-formats": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", @@ -4736,16 +4385,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "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", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -4848,104 +4487,6 @@ "node": ">=0.10.0" } }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", - "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", - "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", @@ -5011,13 +4552,6 @@ "node": ">=4" } }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true, - "license": "MIT" - }, "node_modules/async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", @@ -5119,16 +4653,6 @@ "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", "license": "MIT" }, - "node_modules/axe-core": { - "version": "4.10.3", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz", - "integrity": "sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==", - "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } - }, "node_modules/axios": { "version": "0.26.1", "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", @@ -5139,16 +4663,6 @@ "follow-redirects": "^1.14.8" } }, - "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/babel-dead-code-elimination": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/babel-dead-code-elimination/-/babel-dead-code-elimination-1.0.10.tgz", @@ -5605,23 +5119,6 @@ "node": ">=18" } }, - "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/character-entities": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", @@ -7003,13 +6500,6 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "license": "MIT" }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true, - "license": "BSD-2-Clause" - }, "node_modules/data-view-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", @@ -7327,13 +6817,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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", @@ -7491,19 +6974,6 @@ "dev": true, "license": "MIT" }, - "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/dot-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", @@ -7778,34 +7248,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-iterator-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", - "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.6", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.4", - "safe-array-concat": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-module-lexer": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", @@ -7841,19 +7283,6 @@ "node": ">= 0.4" } }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-to-primitive": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", @@ -7929,388 +7358,6 @@ "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": "9.31.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.31.0.tgz", - "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.0", - "@eslint/config-helpers": "^0.3.0", - "@eslint/core": "^0.15.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.31.0", - "@eslint/plugin-kit": "^0.3.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.4.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-config-prettier": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.5.tgz", - "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "funding": { - "url": "https://opencollective.com/eslint-config-prettier" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", - "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.32.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", - "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.9", - "array.prototype.findlastindex": "^1.2.6", - "array.prototype.flat": "^1.3.3", - "array.prototype.flatmap": "^1.3.3", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.1", - "hasown": "^2.0.2", - "is-core-module": "^2.16.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.1", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.9", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", - "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "aria-query": "^5.3.2", - "array-includes": "^3.1.8", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "^4.10.0", - "axobject-query": "^4.1.0", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "hasown": "^2.0.2", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.1" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.37.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", - "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.9", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", - "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.20", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.20.tgz", - "integrity": "sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "eslint": ">=8.40" - } - }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.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/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "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/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "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/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -8325,42 +7372,6 @@ "node": ">=4" } }, - "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-util-is-identifier-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", @@ -8381,16 +7392,6 @@ "@types/estree": "^1.0.0" } }, - "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/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -8737,20 +7738,6 @@ "node": ">= 6" } }, - "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/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", @@ -8816,19 +7803,6 @@ "pend": "~1.2.0" } }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/file-type": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", @@ -8876,44 +7850,6 @@ "dev": true, "license": "MIT" }, - "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": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC" - }, "node_modules/focus-trap": { "version": "7.6.5", "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.6.5.tgz", @@ -9546,19 +8482,6 @@ "node": ">= 0.10" } }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", @@ -9848,13 +8771,6 @@ "dev": true, "license": "ISC" }, - "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/graphlib": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", @@ -10392,16 +9308,6 @@ "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/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -11180,24 +10086,6 @@ "node": ">=0.10.0" } }, - "node_modules/iterator.prototype": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", - "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "get-proto": "^1.0.0", - "has-symbols": "^1.1.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/jackspeak": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", @@ -11305,13 +10193,6 @@ "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-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -11378,33 +10259,6 @@ "node": ">=12.0.0" } }, - "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/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -11458,22 +10312,6 @@ "npm": ">=6" } }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, "node_modules/junk": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/junk/-/junk-4.0.1.tgz", @@ -11508,16 +10346,6 @@ "safe-buffer": "^5.0.1" } }, - "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/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -11528,40 +10356,6 @@ "node": ">=0.10.0" } }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", - "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, - "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/lezer-json5": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lezer-json5/-/lezer-json5-2.0.2.tgz", @@ -11867,22 +10661,6 @@ "node": ">=4" } }, - "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": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -11925,13 +10703,6 @@ "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", "license": "MIT" }, - "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/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", @@ -13431,13 +12202,6 @@ "node": ">=0.10.0" } }, - "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/nearley": { "version": "2.20.1", "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", @@ -14302,56 +13066,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -14389,25 +13103,6 @@ "node": ">=0.10.0" } }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -14510,24 +13205,6 @@ "node": ">= 6" } }, - "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/own-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", @@ -14653,38 +13330,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "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/p-map": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", @@ -15384,16 +14029,6 @@ "node": ">=10" } }, - "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/preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -15436,18 +14071,6 @@ "dev": true, "license": "MIT" }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, "node_modules/property-information": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", @@ -15578,13 +14201,6 @@ "react": "^18.3.1" } }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, - "license": "MIT" - }, "node_modules/react-markdown": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz", @@ -17493,49 +16109,6 @@ "node": ">=8" } }, - "node_modules/string.prototype.includes": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", - "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", - "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "regexp.prototype.flags": "^1.5.3", - "set-function-name": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/string.prototype.padend": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", @@ -17555,17 +16128,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/string.prototype.repeat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", - "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, "node_modules/string.prototype.trim": { "version": "1.2.10", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", @@ -17725,19 +16287,6 @@ "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/strip-literal": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", @@ -18438,19 +16987,6 @@ "utf8-byte-length": "^1.0.1" } }, - "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, "node_modules/ts-easing": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/ts-easing/-/ts-easing-0.2.0.tgz", @@ -18464,19 +17000,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -18503,19 +17026,6 @@ "fsevents": "~2.3.3" } }, - "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.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", @@ -19543,16 +18053,6 @@ "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/workspaces-run": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/workspaces-run/-/workspaces-run-1.0.2.tgz", @@ -19936,19 +18436,6 @@ "fd-slicer": "~1.1.0" } }, - "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" - } - }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", @@ -20230,6 +18717,87 @@ "name": "@yaakapp-internal/tauri", "version": "1.0.0" }, + "src-tauri/node_modules/glob": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", + "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "path-scurry": "^2.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "src-tauri/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "src-tauri/node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "src-tauri/node_modules/path-scurry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "src-tauri/node_modules/rimraf": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", + "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^13.0.0", + "package-json-from-dist": "^1.0.1" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "src-tauri/yaak-crypto": { "name": "@yaakapp-internal/crypto", "version": "1.0.0" @@ -20270,6 +18838,7 @@ "name": "@yaakapp-internal/templates", "version": "1.0.0", "devDependencies": { + "rimraf": "^6.1.2", "wasm-pack": "^0.13.1" } }, @@ -20319,6 +18888,7 @@ "fuzzbunny": "^1.0.1", "hexy": "^0.3.5", "history": "^5.3.0", + "jotai": "^2.12.2", "js-md5": "^0.8.3", "lucide-react": "^0.525.0", "mime": "^4.0.4", @@ -20358,7 +18928,6 @@ "@vitejs/plugin-react": "^4.6.0", "autoprefixer": "^10.4.21", "decompress": "^4.2.1", - "eslint-plugin-react-refresh": "^0.4.20", "internal-ip": "^8.0.0", "postcss": "^8.5.6", "postcss-nesting": "^13.0.2", diff --git a/package.json b/package.json index 85d68672..a0c65a1d 100644 --- a/package.json +++ b/package.json @@ -71,35 +71,25 @@ "icons:release": "tauri icon src-tauri/icons/icon.png --output src-tauri/icons/release", "bootstrap": "run-s bootstrap:*", "bootstrap:build": "npm run build", - "bootstrap:vendor-node": "node scripts/vendor-node.cjs", - "bootstrap:vendor-plugins": "node scripts/vendor-plugins.cjs", - "bootstrap:vendor-protoc": "node scripts/vendor-protoc.cjs", - "lint": "npm run --workspaces --if-present lint", + "bootstrap:vendor": "npm run vendor", + "vendor": "run-p vendor:*", + "vendor:vendor-plugins": "node scripts/vendor-plugins.cjs", + "vendor:vendor-protoc": "node scripts/vendor-protoc.cjs", + "lint": "run-p lint:*", + "lint:biome": "biome lint", + "lint:extra": "npm run --workspaces --if-present lint", + "format": "biome format --write .", "replace-version": "node scripts/replace-version.cjs", "tauri": "tauri", "tauri-before-build": "npm run bootstrap && npm run --workspaces --if-present build", "tauri-before-dev": "workspaces-run --parallel -- npm run --workspaces --if-present dev" }, - "dependencies": { - "jotai": "^2.12.2" - }, "devDependencies": { - "@eslint/compat": "^1.3.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "^9.29.0", + "@biomejs/biome": "^2.3.7", "@tauri-apps/cli": "^2.9.1", - "@typescript-eslint/eslint-plugin": "^8.27.0", - "@typescript-eslint/parser": "^8.27.0", "@yaakapp/cli": "^0.2.7", - "eslint": "^9.29.0", - "eslint-config-prettier": "^10.1.5", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", "nodejs-file-downloader": "^4.13.0", "npm-run-all": "^4.1.5", - "prettier": "^3.4.2", "typescript": "^5.8.3", "vitest": "^3.2.4", "workspaces-run": "^1.0.2" diff --git a/packages/common-lib/debounce.ts b/packages/common-lib/debounce.ts index 59c00615..4118f25b 100644 --- a/packages/common-lib/debounce.ts +++ b/packages/common-lib/debounce.ts @@ -1,12 +1,12 @@ -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// biome-ignore lint/suspicious/noExplicitAny: none export function debounce(fn: (...args: any[]) => void, delay = 500) { let timer: ReturnType; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const result = function (...args: any[]) { + // biome-ignore lint/suspicious/noExplicitAny: none + const result = (...args: any[]) => { clearTimeout(timer); timer = setTimeout(() => fn(...args), delay); }; - result.cancel = function () { + result.cancel = () => { clearTimeout(timer); }; return result; diff --git a/packages/common-lib/formatSize.ts b/packages/common-lib/formatSize.ts index 2826cc4e..c5f4e8e8 100644 --- a/packages/common-lib/formatSize.ts +++ b/packages/common-lib/formatSize.ts @@ -1,20 +1,20 @@ export function formatSize(bytes: number): string { - let num; - let unit; + let num: number; + let unit: string; - if (bytes > 1000 * 1000 * 1000) { - num = bytes / 1000 / 1000 / 1000; - unit = 'GB'; - } else if (bytes > 1000 * 1000) { - num = bytes / 1000 / 1000; - unit = 'MB'; - } else if (bytes > 1000) { - num = bytes / 1000; - unit = 'KB'; - } else { - num = bytes; - unit = 'B'; - } + if (bytes > 1000 * 1000 * 1000) { + num = bytes / 1000 / 1000 / 1000; + unit = 'GB'; + } else if (bytes > 1000 * 1000) { + num = bytes / 1000 / 1000; + unit = 'MB'; + } else if (bytes > 1000) { + num = bytes / 1000; + unit = 'KB'; + } else { + num = bytes; + unit = 'B'; + } - return `${Math.round(num * 10) / 10} ${unit}`; + return `${Math.round(num * 10) / 10} ${unit}`; } diff --git a/packages/plugin-runtime-types/src/bindings/gen_api.ts b/packages/plugin-runtime-types/src/bindings/gen_api.ts index d8c88183..9dcbb820 100644 --- a/packages/plugin-runtime-types/src/bindings/gen_api.ts +++ b/packages/plugin-runtime-types/src/bindings/gen_api.ts @@ -1,5 +1,5 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PluginVersion } from "./gen_search.js"; +import type { PluginVersion } from "./gen_search"; export type PluginNameVersion = { name: string, version: string, }; diff --git a/packages/plugin-runtime-types/src/bindings/gen_events.ts b/packages/plugin-runtime-types/src/bindings/gen_events.ts index 1f91180d..9aeb7b68 100644 --- a/packages/plugin-runtime-types/src/bindings/gen_events.ts +++ b/packages/plugin-runtime-types/src/bindings/gen_events.ts @@ -1,6 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Environment, Folder, GrpcRequest, HttpRequest, HttpResponse, WebsocketRequest, Workspace } from "./gen_models.js"; -import type { JsonValue } from "./serde_json/JsonValue.js"; +import type { Environment, Folder, GrpcRequest, HttpRequest, HttpResponse, WebsocketRequest, Workspace } from "./gen_models"; +import type { JsonValue } from "./serde_json/JsonValue"; export type BootRequest = { dir: string, watch: boolean, }; diff --git a/plugins/action-copy-curl/package.json b/plugins/action-copy-curl/package.json index 0fe3a23e..3194af4e 100644 --- a/plugins/action-copy-curl/package.json +++ b/plugins/action-copy-curl/package.json @@ -12,7 +12,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" } } diff --git a/plugins/action-copy-curl/src/index.ts b/plugins/action-copy-curl/src/index.ts index faaae4b5..af6eeb9a 100644 --- a/plugins/action-copy-curl/src/index.ts +++ b/plugins/action-copy-curl/src/index.ts @@ -36,7 +36,7 @@ export async function convertToCurl(request: Partial) { if (urlParams.length > 0) { // Build url const [base, hash] = finalUrl.split('#'); - const separator = base!.includes('?') ? '&' : '?'; + const separator = base?.includes('?') ? '&' : '?'; const queryString = urlParams .map((p) => `${encodeURIComponent(p.name)}=${encodeURIComponent(p.value)}`) .join('&'); diff --git a/plugins/action-copy-curl/tests/index.test.ts b/plugins/action-copy-curl/tests/index.test.ts index 816d0688..45fdcd7c 100644 --- a/plugins/action-copy-curl/tests/index.test.ts +++ b/plugins/action-copy-curl/tests/index.test.ts @@ -12,7 +12,7 @@ describe('exporter-curl', () => { { name: 'c', value: 'ccc', enabled: false }, ], }), - ).toEqual([`curl 'https://yaak.app?a=aaa&b=bbb'`].join(` \\n `)); + ).toEqual([`curl 'https://yaak.app?a=aaa&b=bbb'`].join(' \\n ')); }); test('Exports GET with params and hash', async () => { @@ -25,7 +25,7 @@ describe('exporter-curl', () => { { name: 'c', value: 'ccc', enabled: false }, ], }), - ).toEqual([`curl 'https://yaak.app/path?a=aaa&b=bbb#section'`].join(` \\n `)); + ).toEqual([`curl 'https://yaak.app/path?a=aaa&b=bbb#section'`].join(' \\n ')); }); test('Exports POST with url form data', async () => { @@ -43,7 +43,7 @@ describe('exporter-curl', () => { }, }), ).toEqual( - [`curl -X POST 'https://yaak.app'`, `--data 'a=aaa'`, `--data 'b=bbb'`].join(` \\\n `), + [`curl -X POST 'https://yaak.app'`, `--data 'a=aaa'`, `--data 'b=bbb'`].join(' \\\n '), ); }); @@ -62,7 +62,7 @@ describe('exporter-curl', () => { [ `curl -X POST 'https://yaak.app'`, `--data '{"query":"{foo,bar}","variables":{"a":"aaa","b":"bbb"}}'`, - ].join(` \\\n `), + ].join(' \\\n '), ); }); @@ -77,7 +77,7 @@ describe('exporter-curl', () => { }, }), ).toEqual( - [`curl -X POST 'https://yaak.app'`, `--data '{"query":"{foo,bar}"}'`].join(` \\\n `), + [`curl -X POST 'https://yaak.app'`, `--data '{"query":"{foo,bar}"}'`].join(' \\\n '), ); }); @@ -101,8 +101,8 @@ describe('exporter-curl', () => { `curl -X PUT 'https://yaak.app'`, `--form 'a=aaa'`, `--form 'b=bbb'`, - `--form f=@/foo/bar.png;type=image/png`, - ].join(` \\\n `), + '--form f=@/foo/bar.png;type=image/png', + ].join(' \\\n '), ); }); @@ -122,7 +122,7 @@ describe('exporter-curl', () => { `curl -X POST 'https://yaak.app'`, `--header 'Content-Type: application/json'`, `--data '{"foo":"bar\\'s"}'`, - ].join(` \\\n `), + ].join(' \\\n '), ); }); @@ -142,7 +142,7 @@ describe('exporter-curl', () => { `curl -X POST 'https://yaak.app'`, `--header 'Content-Type: application/json'`, `--data '{"foo":"bar",\n"baz":"qux"}'`, - ].join(` \\\n `), + ].join(' \\\n '), ); }); @@ -155,7 +155,7 @@ describe('exporter-curl', () => { { name: 'c', value: 'ccc', enabled: false }, ], }), - ).toEqual([`curl ''`, `--header 'a: aaa'`, `--header 'b: bbb'`].join(` \\\n `)); + ).toEqual([`curl ''`, `--header 'a: aaa'`, `--header 'b: bbb'`].join(' \\\n ')); }); test('Basic auth', async () => { @@ -168,7 +168,7 @@ describe('exporter-curl', () => { password: 'pass', }, }), - ).toEqual([`curl 'https://yaak.app'`, `--user 'user:pass'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`, `--user 'user:pass'`].join(' \\\n ')); }); test('Basic auth disabled', async () => { @@ -182,7 +182,7 @@ describe('exporter-curl', () => { password: 'pass', }, }), - ).toEqual([`curl 'https://yaak.app'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`].join(' \\\n ')); }); test('Broken basic auth', async () => { @@ -192,7 +192,7 @@ describe('exporter-curl', () => { authenticationType: 'basic', authentication: {}, }), - ).toEqual([`curl 'https://yaak.app'`, `--user ':'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`, `--user ':'`].join(' \\\n ')); }); test('Digest auth', async () => { @@ -205,7 +205,7 @@ describe('exporter-curl', () => { password: 'pass', }, }), - ).toEqual([`curl 'https://yaak.app'`, `--digest --user 'user:pass'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`, `--digest --user 'user:pass'`].join(' \\\n ')); }); test('Bearer auth', async () => { @@ -217,7 +217,7 @@ describe('exporter-curl', () => { token: 'tok', }, }), - ).toEqual([`curl 'https://yaak.app'`, `--header 'Authorization: Bearer tok'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`, `--header 'Authorization: Bearer tok'`].join(' \\\n ')); }); test('Bearer auth with custom prefix', async () => { @@ -231,7 +231,7 @@ describe('exporter-curl', () => { }, }), ).toEqual( - [`curl 'https://yaak.app'`, `--header 'Authorization: Token abc123'`].join(` \\\n `), + [`curl 'https://yaak.app'`, `--header 'Authorization: Token abc123'`].join(' \\\n '), ); }); @@ -245,7 +245,7 @@ describe('exporter-curl', () => { prefix: '', }, }), - ).toEqual([`curl 'https://yaak.app'`, `--header 'Authorization: xyz789'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`, `--header 'Authorization: xyz789'`].join(' \\\n ')); }); test('Broken bearer auth', async () => { @@ -258,7 +258,7 @@ describe('exporter-curl', () => { password: 'pass', }, }), - ).toEqual([`curl 'https://yaak.app'`, `--header 'Authorization: Bearer'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`, `--header 'Authorization: Bearer'`].join(' \\\n ')); }); test('AWS v4 auth', async () => { @@ -275,8 +275,8 @@ describe('exporter-curl', () => { }, }), ).toEqual( - [`curl 'https://yaak.app'`, `--aws-sigv4 aws:amz:us-east-1:s3`, `--user 'ak:sk'`].join( - ` \\\n `, + [`curl 'https://yaak.app'`, '--aws-sigv4 aws:amz:us-east-1:s3', `--user 'ak:sk'`].join( + ' \\\n ', ), ); }); @@ -297,10 +297,10 @@ describe('exporter-curl', () => { ).toEqual( [ `curl 'https://yaak.app'`, - `--aws-sigv4 aws:amz:us-east-1:s3`, + '--aws-sigv4 aws:amz:us-east-1:s3', `--user 'ak:sk'`, `--header 'X-Amz-Security-Token: st'`, - ].join(` \\\n `), + ].join(' \\\n '), ); }); @@ -315,7 +315,7 @@ describe('exporter-curl', () => { value: 'my-token', }, }), - ).toEqual([`curl 'https://yaak.app'`, `--header 'X-Header: my-token'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`, `--header 'X-Header: my-token'`].join(' \\\n ')); }); test('API key auth header query', async () => { @@ -330,7 +330,7 @@ describe('exporter-curl', () => { value: 'bar', }, }), - ).toEqual([`curl 'https://yaak.app?hi=there¶m=hi&foo=bar'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app?hi=there¶m=hi&foo=bar'`].join(' \\\n ')); }); test('API key auth header query with params', async () => { @@ -345,7 +345,7 @@ describe('exporter-curl', () => { value: 'bar', }, }), - ).toEqual([`curl 'https://yaak.app?param=hi&foo=bar'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app?param=hi&foo=bar'`].join(' \\\n ')); }); test('API key auth header default', async () => { @@ -357,7 +357,7 @@ describe('exporter-curl', () => { location: 'header', }, }), - ).toEqual([`curl 'https://yaak.app'`, `--header 'X-Api-Key: '`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`, `--header 'X-Api-Key: '`].join(' \\\n ')); }); test('API key auth query', async () => { @@ -371,7 +371,7 @@ describe('exporter-curl', () => { value: 'bar-baz', }, }), - ).toEqual([`curl 'https://yaak.app?foo=bar-baz'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app?foo=bar-baz'`].join(' \\\n ')); }); test('API key auth query with existing', async () => { @@ -385,7 +385,7 @@ describe('exporter-curl', () => { value: 'there', }, }), - ).toEqual([`curl 'https://yaak.app?foo=bar&baz=qux&hi=there'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app?foo=bar&baz=qux&hi=there'`].join(' \\\n ')); }); test('API key auth query default', async () => { @@ -397,7 +397,7 @@ describe('exporter-curl', () => { location: 'query', }, }), - ).toEqual([`curl 'https://yaak.app?foo=bar&baz=qux&token='`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app?foo=bar&baz=qux&token='`].join(' \\\n ')); }); test('Stale body data', async () => { @@ -409,6 +409,6 @@ describe('exporter-curl', () => { text: 'ignore me', }, }), - ).toEqual([`curl 'https://yaak.app'`].join(` \\\n `)); + ).toEqual([`curl 'https://yaak.app'`].join(' \\\n ')); }); }); diff --git a/plugins/action-copy-grpcurl/package.json b/plugins/action-copy-grpcurl/package.json index fbb92351..4f17599c 100644 --- a/plugins/action-copy-grpcurl/package.json +++ b/plugins/action-copy-grpcurl/package.json @@ -12,7 +12,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" } } diff --git a/plugins/action-copy-grpcurl/src/index.ts b/plugins/action-copy-grpcurl/src/index.ts index f83255ad..bec5dde0 100644 --- a/plugins/action-copy-grpcurl/src/index.ts +++ b/plugins/action-copy-grpcurl/src/index.ts @@ -1,5 +1,5 @@ -import type { GrpcRequest, PluginDefinition } from '@yaakapp/api'; import path from 'node:path'; +import type { GrpcRequest, PluginDefinition } from '@yaakapp/api'; const NEWLINE = '\\\n '; diff --git a/plugins/action-copy-grpcurl/tests/index.test.ts b/plugins/action-copy-grpcurl/tests/index.test.ts index c420ff8e..31910c98 100644 --- a/plugins/action-copy-grpcurl/tests/index.test.ts +++ b/plugins/action-copy-grpcurl/tests/index.test.ts @@ -10,7 +10,7 @@ describe('exporter-curl', () => { }, [], ), - ).toEqual([`grpcurl yaak.app`].join(` \\\n `)); + ).toEqual(['grpcurl yaak.app'].join(' \\\n ')); }); test('Basic metadata', async () => { expect( @@ -25,7 +25,7 @@ describe('exporter-curl', () => { }, [], ), - ).toEqual([`grpcurl -H 'aaa: AAA'`, `-H 'bbb: BBB'`, `yaak.app`].join(` \\\n `)); + ).toEqual([`grpcurl -H 'aaa: AAA'`, `-H 'bbb: BBB'`, 'yaak.app'].join(' \\\n ')); }); test('Basic auth', async () => { expect( @@ -40,7 +40,7 @@ describe('exporter-curl', () => { }, [], ), - ).toEqual([`grpcurl -H 'Authorization: Basic dXNlcjpwYXNz'`, `yaak.app`].join(` \\\n `)); + ).toEqual([`grpcurl -H 'Authorization: Basic dXNlcjpwYXNz'`, 'yaak.app'].join(' \\\n ')); }); test('API key auth', async () => { @@ -56,7 +56,7 @@ describe('exporter-curl', () => { }, [], ), - ).toEqual([`grpcurl -H 'X-Token: tok'`, `yaak.app`].join(` \\\n `)); + ).toEqual([`grpcurl -H 'X-Token: tok'`, 'yaak.app'].join(' \\\n ')); }); test('API key auth', async () => { @@ -73,7 +73,7 @@ describe('exporter-curl', () => { }, [], ), - ).toEqual([`grpcurl`, `yaak.app?token=tok%201`].join(` \\\n `)); + ).toEqual(['grpcurl', 'yaak.app?token=tok%201'].join(' \\\n ')); }); test('Single proto file', async () => { @@ -82,8 +82,8 @@ describe('exporter-curl', () => { `grpcurl -import-path '/foo/bar'`, `-import-path '/foo'`, `-proto '/foo/bar/baz.proto'`, - `yaak.app`, - ].join(` \\\n `), + 'yaak.app', + ].join(' \\\n '), ); }); test('Multiple proto files, same dir', async () => { @@ -95,8 +95,8 @@ describe('exporter-curl', () => { `-import-path '/foo'`, `-proto '/foo/bar/aaa.proto'`, `-proto '/foo/bar/bbb.proto'`, - `yaak.app`, - ].join(` \\\n `), + 'yaak.app', + ].join(' \\\n '), ); }); test('Multiple proto files, different dir', async () => { @@ -110,18 +110,18 @@ describe('exporter-curl', () => { `-import-path '/xxx'`, `-proto '/aaa/bbb/ccc.proto'`, `-proto '/xxx/yyy/zzz.proto'`, - `yaak.app`, - ].join(` \\\n `), + 'yaak.app', + ].join(' \\\n '), ); }); test('Single include dir', async () => { expect(await convert({ url: 'https://yaak.app' }, ['/aaa/bbb'])).toEqual( - [`grpcurl -import-path '/aaa/bbb'`, `yaak.app`].join(` \\\n `), + [`grpcurl -import-path '/aaa/bbb'`, 'yaak.app'].join(' \\\n '), ); }); test('Multiple include dir', async () => { expect(await convert({ url: 'https://yaak.app' }, ['/aaa/bbb', '/xxx/yyy'])).toEqual( - [`grpcurl -import-path '/aaa/bbb'`, `-import-path '/xxx/yyy'`, `yaak.app`].join(` \\\n `), + [`grpcurl -import-path '/aaa/bbb'`, `-import-path '/xxx/yyy'`, 'yaak.app'].join(' \\\n '), ); }); test('Mixed proto and dirs', async () => { @@ -134,8 +134,8 @@ describe('exporter-curl', () => { `-import-path '/foo'`, `-import-path '/'`, `-proto '/foo/bar.proto'`, - `yaak.app`, - ].join(` \\\n `), + 'yaak.app', + ].join(' \\\n '), ); }); test('Sends data', async () => { @@ -152,8 +152,8 @@ describe('exporter-curl', () => { `grpcurl -import-path '/'`, `-proto '/foo.proto'`, `-d '{"foo":"bar","baz":1}'`, - `yaak.app`, - ].join(` \\\n `), + 'yaak.app', + ].join(' \\\n '), ); }); }); diff --git a/plugins/auth-apikey/package.json b/plugins/auth-apikey/package.json index 0b6047d0..36f20770 100644 --- a/plugins/auth-apikey/package.json +++ b/plugins/auth-apikey/package.json @@ -11,7 +11,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/auth-apikey/src/index.ts b/plugins/auth-apikey/src/index.ts index fef90bda..1e8122c7 100644 --- a/plugins/auth-apikey/src/index.ts +++ b/plugins/auth-apikey/src/index.ts @@ -21,13 +21,15 @@ export const plugin: PluginDefinition = { name: 'key', label: 'Key', dynamic: (_ctx, { values }) => { - return values.location === 'query' ? { - label: 'Parameter Name', - description: 'The name of the query parameter to add to the request', - } : { - label: 'Header Name', - description: 'The name of the header to add to the request', - }; + return values.location === 'query' + ? { + label: 'Parameter Name', + description: 'The name of the query parameter to add to the request', + } + : { + label: 'Header Name', + description: 'The name of the header to add to the request', + }; }, }, { @@ -45,9 +47,8 @@ export const plugin: PluginDefinition = { if (location === 'query') { return { setQueryParameters: [{ name: key, value }] }; - } else { - return { setHeaders: [{ name: key, value }] }; } + return { setHeaders: [{ name: key, value }] }; }, }, }; diff --git a/plugins/auth-aws/package.json b/plugins/auth-aws/package.json index 4af53627..a26c039a 100644 --- a/plugins/auth-aws/package.json +++ b/plugins/auth-aws/package.json @@ -11,8 +11,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "aws4": "^1.13.2" diff --git a/plugins/auth-aws/src/index.ts b/plugins/auth-aws/src/index.ts index e6f1faec..045cca64 100644 --- a/plugins/auth-aws/src/index.ts +++ b/plugins/auth-aws/src/index.ts @@ -1,8 +1,8 @@ -import type { CallHttpAuthenticationResponse } from '@yaakapp-internal/plugins'; -import type { PluginDefinition } from '@yaakapp/api'; -import aws4 from 'aws4'; -import type { Request } from 'aws4'; import { URL } from 'node:url'; +import type { PluginDefinition } from '@yaakapp/api'; +import type { CallHttpAuthenticationResponse } from '@yaakapp-internal/plugins'; +import type { Request } from 'aws4'; +import aws4 from 'aws4'; export const plugin: PluginDefinition = { authentication: { diff --git a/plugins/auth-basic/package.json b/plugins/auth-basic/package.json index 155bdb10..6debc8e7 100644 --- a/plugins/auth-basic/package.json +++ b/plugins/auth-basic/package.json @@ -11,7 +11,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/auth-basic/src/index.ts b/plugins/auth-basic/src/index.ts index 26712c07..df5ace6d 100644 --- a/plugins/auth-basic/src/index.ts +++ b/plugins/auth-basic/src/index.ts @@ -5,21 +5,24 @@ export const plugin: PluginDefinition = { name: 'basic', label: 'Basic Auth', shortLabel: 'Basic', - args: [{ - type: 'text', - name: 'username', - label: 'Username', - optional: true, - }, { - type: 'text', - name: 'password', - label: 'Password', - optional: true, - password: true, - }], + args: [ + { + type: 'text', + name: 'username', + label: 'Username', + optional: true, + }, + { + type: 'text', + name: 'password', + label: 'Password', + optional: true, + password: true, + }, + ], async onApply(_ctx, { values }) { const { username, password } = values; - const value = 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64'); + const value = `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`; return { setHeaders: [{ name: 'Authorization', value }] }; }, }, diff --git a/plugins/auth-bearer/package.json b/plugins/auth-bearer/package.json index b23ded8d..f0a254d0 100644 --- a/plugins/auth-bearer/package.json +++ b/plugins/auth-bearer/package.json @@ -12,7 +12,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" } } diff --git a/plugins/auth-bearer/src/index.ts b/plugins/auth-bearer/src/index.ts index 1d785148..399ed865 100644 --- a/plugins/auth-bearer/src/index.ts +++ b/plugins/auth-bearer/src/index.ts @@ -1,5 +1,5 @@ -import type { CallHttpAuthenticationRequest } from '@yaakapp-internal/plugins'; import type { PluginDefinition } from '@yaakapp/api'; +import type { CallHttpAuthenticationRequest } from '@yaakapp-internal/plugins'; export const plugin: PluginDefinition = { authentication: { diff --git a/plugins/auth-bearer/tests/index.test.ts b/plugins/auth-bearer/tests/index.test.ts index 72858ef9..216d80e8 100644 --- a/plugins/auth-bearer/tests/index.test.ts +++ b/plugins/auth-bearer/tests/index.test.ts @@ -7,7 +7,7 @@ const ctx = {} as Context; describe('auth-bearer', () => { test('No values', async () => { expect( - await plugin.authentication!.onApply(ctx, { + await plugin.authentication?.onApply(ctx, { values: {}, headers: [], url: 'https://yaak.app', @@ -19,7 +19,7 @@ describe('auth-bearer', () => { test('Only token', async () => { expect( - await plugin.authentication!.onApply(ctx, { + await plugin.authentication?.onApply(ctx, { values: { token: 'my-token' }, headers: [], url: 'https://yaak.app', @@ -31,7 +31,7 @@ describe('auth-bearer', () => { test('Only prefix', async () => { expect( - await plugin.authentication!.onApply(ctx, { + await plugin.authentication?.onApply(ctx, { values: { prefix: 'Hello' }, headers: [], url: 'https://yaak.app', @@ -43,7 +43,7 @@ describe('auth-bearer', () => { test('Prefix and token', async () => { expect( - await plugin.authentication!.onApply(ctx, { + await plugin.authentication?.onApply(ctx, { values: { prefix: 'Hello', token: 'my-token' }, headers: [], url: 'https://yaak.app', @@ -55,7 +55,7 @@ describe('auth-bearer', () => { test('Extra spaces', async () => { expect( - await plugin.authentication!.onApply(ctx, { + await plugin.authentication?.onApply(ctx, { values: { prefix: '\t Hello ', token: ' \nmy-token ' }, headers: [], url: 'https://yaak.app', diff --git a/plugins/auth-jwt/package.json b/plugins/auth-jwt/package.json index 703132b8..687031f8 100644 --- a/plugins/auth-jwt/package.json +++ b/plugins/auth-jwt/package.json @@ -11,8 +11,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "jsonwebtoken": "^9.0.2" diff --git a/plugins/auth-jwt/src/index.ts b/plugins/auth-jwt/src/index.ts index 6ae02768..e6e2d9ef 100644 --- a/plugins/auth-jwt/src/index.ts +++ b/plugins/auth-jwt/src/index.ts @@ -68,12 +68,11 @@ export const plugin: PluginDefinition = { label: 'Parameter Name', description: 'The name of the query parameter to add to the request', }; - } else { - return { - label: 'Header Name', - description: 'The name of the header to add to the request', - }; } + return { + label: 'Header Name', + description: 'The name of the header to add to the request', + }; }, }, { @@ -110,12 +109,11 @@ export const plugin: PluginDefinition = { const paramName = String(values.name || 'token'); const paramValue = String(values.value || ''); return { setQueryParameters: [{ name: paramName, value: paramValue }] }; - } else { - const headerPrefix = values.headerPrefix != null ? values.headerPrefix : 'Bearer'; - const headerName = String(values.name || 'Authorization'); - const headerValue = `${headerPrefix} ${token}`.trim(); - return { setHeaders: [{ name: headerName, value: headerValue }] }; } + const headerPrefix = values.headerPrefix != null ? values.headerPrefix : 'Bearer'; + const headerName = String(values.name || 'Authorization'); + const headerValue = `${headerPrefix} ${token}`.trim(); + return { setHeaders: [{ name: headerName, value: headerValue }] }; }, }, }; diff --git a/plugins/auth-ntlm/package.json b/plugins/auth-ntlm/package.json index e50c8521..337fb8c4 100644 --- a/plugins/auth-ntlm/package.json +++ b/plugins/auth-ntlm/package.json @@ -11,8 +11,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "httpntlm": "^1.8.13" diff --git a/plugins/auth-oauth1/package.json b/plugins/auth-oauth1/package.json index e9889b64..355346a2 100644 --- a/plugins/auth-oauth1/package.json +++ b/plugins/auth-oauth1/package.json @@ -11,8 +11,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "oauth-1.0a": "^2.2.6" diff --git a/plugins/auth-oauth1/src/index.ts b/plugins/auth-oauth1/src/index.ts index d7be083a..f335b6e5 100644 --- a/plugins/auth-oauth1/src/index.ts +++ b/plugins/auth-oauth1/src/index.ts @@ -1,5 +1,5 @@ -import type { Context, GetHttpAuthenticationConfigRequest, PluginDefinition } from '@yaakapp/api'; import crypto from 'node:crypto'; +import type { Context, GetHttpAuthenticationConfigRequest, PluginDefinition } from '@yaakapp/api'; import OAuth from 'oauth-1.0a'; const signatures = { @@ -139,7 +139,9 @@ export const plugin: PluginDefinition = { for (const key of requestUrl.searchParams.keys()) { if (key.startsWith('oauth_')) continue; const all = requestUrl.searchParams.getAll(key); - requestData.data[key] = all.length > 1 ? all : all[0]!; + const first = all[0]; + if (first == null) continue; + requestData.data[key] = all.length > 1 ? all : first; } // (2) Manual oauth_* overrides diff --git a/plugins/auth-oauth2/package.json b/plugins/auth-oauth2/package.json index c9d07a0f..faffe67e 100644 --- a/plugins/auth-oauth2/package.json +++ b/plugins/auth-oauth2/package.json @@ -12,7 +12,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" } } diff --git a/plugins/auth-oauth2/src/fetchAccessToken.ts b/plugins/auth-oauth2/src/fetchAccessToken.ts index 8e337a4e..3c5f4761 100644 --- a/plugins/auth-oauth2/src/fetchAccessToken.ts +++ b/plugins/auth-oauth2/src/fetchAccessToken.ts @@ -1,5 +1,5 @@ -import type { Context, HttpRequest, HttpUrlParameter } from '@yaakapp/api'; import { readFileSync } from 'node:fs'; +import type { Context, HttpRequest, HttpUrlParameter } from '@yaakapp/api'; import type { AccessTokenRawResponse } from './store'; export async function fetchAccessToken( @@ -39,15 +39,15 @@ export async function fetchAccessToken( ], }; - if (scope) httpRequest.body!.form.push({ name: 'scope', value: scope }); - if (audience) httpRequest.body!.form.push({ name: 'audience', value: audience }); + if (scope) httpRequest.body?.form.push({ name: 'scope', value: scope }); + if (audience) httpRequest.body?.form.push({ name: 'audience', value: audience }); if (credentialsInBody) { - httpRequest.body!.form.push({ name: 'client_id', value: clientId }); - httpRequest.body!.form.push({ name: 'client_secret', value: clientSecret }); + httpRequest.body?.form.push({ name: 'client_id', value: clientId }); + httpRequest.body?.form.push({ name: 'client_secret', value: clientSecret }); } else { - const value = 'Basic ' + Buffer.from(`${clientId}:${clientSecret}`).toString('base64'); - httpRequest.headers!.push({ name: 'Authorization', value }); + const value = `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString('base64')}`; + httpRequest.headers?.push({ name: 'Authorization', value }); } httpRequest.authenticationType = 'none'; // Don't inherit workspace auth @@ -58,12 +58,11 @@ export async function fetchAccessToken( const body = resp.bodyPath ? readFileSync(resp.bodyPath, 'utf8') : ''; if (resp.status < 200 || resp.status >= 300) { - throw new Error( - 'Failed to fetch access token with status=' + resp.status + ' and body=' + body, - ); + throw new Error(`Failed to fetch access token with status=${resp.status} and body=${body}`); } - let response; + // biome-ignore lint/suspicious/noExplicitAny: none + let response: any; try { response = JSON.parse(body); } catch { @@ -71,7 +70,7 @@ export async function fetchAccessToken( } if (response.error) { - throw new Error('Failed to fetch access token with ' + response.error); + throw new Error(`Failed to fetch access token with ${response.error}`); } return response; diff --git a/plugins/auth-oauth2/src/getOrRefreshAccessToken.ts b/plugins/auth-oauth2/src/getOrRefreshAccessToken.ts index a21b20c0..e3c7503e 100644 --- a/plugins/auth-oauth2/src/getOrRefreshAccessToken.ts +++ b/plugins/auth-oauth2/src/getOrRefreshAccessToken.ts @@ -1,5 +1,5 @@ -import type { Context, HttpRequest } from '@yaakapp/api'; import { readFileSync } from 'node:fs'; +import type { Context, HttpRequest } from '@yaakapp/api'; import type { AccessToken, AccessTokenRawResponse, TokenStoreArgs } from './store'; import { deleteToken, getToken, storeToken } from './store'; import { isTokenExpired } from './util'; @@ -58,14 +58,14 @@ export async function getOrRefreshAccessToken( ], }; - if (scope) httpRequest.body!.form.push({ name: 'scope', value: scope }); + if (scope) httpRequest.body?.form.push({ name: 'scope', value: scope }); if (credentialsInBody) { - httpRequest.body!.form.push({ name: 'client_id', value: clientId }); - httpRequest.body!.form.push({ name: 'client_secret', value: clientSecret }); + httpRequest.body?.form.push({ name: 'client_id', value: clientId }); + httpRequest.body?.form.push({ name: 'client_secret', value: clientSecret }); } else { - const value = 'Basic ' + Buffer.from(`${clientId}:${clientSecret}`).toString('base64'); - httpRequest.headers!.push({ name: 'Authorization', value }); + const value = `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString('base64')}`; + httpRequest.headers?.push({ name: 'Authorization', value }); } httpRequest.authenticationType = 'none'; // Don't inherit workspace auth @@ -84,12 +84,11 @@ export async function getOrRefreshAccessToken( console.log('[oauth2] Got refresh token response', resp.status); if (resp.status < 200 || resp.status >= 300) { - throw new Error( - 'Failed to refresh access token with status=' + resp.status + ' and body=' + body, - ); + throw new Error(`Failed to refresh access token with status=${resp.status} and body=${body}`); } - let response; + // biome-ignore lint/suspicious/noExplicitAny: none + let response: any; try { response = JSON.parse(body); } catch { diff --git a/plugins/auth-oauth2/src/grants/authorizationCode.ts b/plugins/auth-oauth2/src/grants/authorizationCode.ts index 60373337..a1efdc5a 100644 --- a/plugins/auth-oauth2/src/grants/authorizationCode.ts +++ b/plugins/auth-oauth2/src/grants/authorizationCode.ts @@ -1,5 +1,5 @@ -import type { Context } from '@yaakapp/api'; import { createHash, randomBytes } from 'node:crypto'; +import type { Context } from '@yaakapp/api'; import { fetchAccessToken } from '../fetchAccessToken'; import { getOrRefreshAccessToken } from '../getOrRefreshAccessToken'; import type { AccessToken, TokenStoreArgs } from '../store'; @@ -84,7 +84,7 @@ export async function getAuthorizationCode( const authorizationUrlStr = authorizationUrl.toString(); console.log('[oauth2] Authorizing', authorizationUrlStr); - // eslint-disable-next-line no-async-promise-executor + // biome-ignore lint/suspicious/noAsyncPromiseExecutor: none const code = await new Promise(async (resolve, reject) => { let foundCode = false; const { close } = await ctx.window.openUrl({ @@ -97,7 +97,7 @@ export async function getAuthorizationCode( } }, async onNavigate({ url: urlStr }) { - let code; + let code: string | null; try { code = extractCode(urlStr, redirectUri); } catch (err) { diff --git a/plugins/auth-oauth2/src/grants/implicit.ts b/plugins/auth-oauth2/src/grants/implicit.ts index 2ef6836f..33306f5b 100644 --- a/plugins/auth-oauth2/src/grants/implicit.ts +++ b/plugins/auth-oauth2/src/grants/implicit.ts @@ -1,6 +1,6 @@ import type { Context } from '@yaakapp/api'; -import type { AccessToken, AccessTokenRawResponse} from '../store'; -import { getDataDirKey , getToken, storeToken } from '../store'; +import type { AccessToken, AccessTokenRawResponse } from '../store'; +import { getDataDirKey, getToken, storeToken } from '../store'; import { isTokenExpired } from '../util'; export async function getImplicit( @@ -56,7 +56,7 @@ export async function getImplicit( ); } - // eslint-disable-next-line no-async-promise-executor + // biome-ignore lint/suspicious/noAsyncPromiseExecutor: none const newToken = await new Promise(async (resolve, reject) => { let foundAccessToken = false; const authorizationUrlStr = authorizationUrl.toString(); diff --git a/plugins/auth-oauth2/src/index.ts b/plugins/auth-oauth2/src/index.ts index 66169ae0..10c1d1f2 100644 --- a/plugins/auth-oauth2/src/index.ts +++ b/plugins/auth-oauth2/src/index.ts @@ -27,7 +27,7 @@ const grantTypes: FormInputSelectOption[] = [ { label: 'Client Credentials', value: 'client_credentials' }, ]; -const defaultGrantType = grantTypes[0]!.value; +const defaultGrantType = grantTypes[0]?.value; function hiddenIfNot( grantTypes: GrantType[], @@ -391,7 +391,7 @@ export const plugin: PluginDefinition = { credentialsInBody, }); } else { - throw new Error('Invalid grant type ' + grantType); + throw new Error(`Invalid grant type ${grantType}`); } const headerName = stringArg(values, 'headerName') || 'Authorization'; @@ -406,7 +406,7 @@ function stringArgOrNull( name: string, ): string | null { const arg = values[name]; - if (arg == null || arg == '') return null; + if (arg == null || arg === '') return null; return `${arg}`; } diff --git a/plugins/auth-oauth2/src/store.ts b/plugins/auth-oauth2/src/store.ts index 2edff231..bde50dc2 100644 --- a/plugins/auth-oauth2/src/store.ts +++ b/plugins/auth-oauth2/src/store.ts @@ -1,5 +1,5 @@ -import type { Context } from '@yaakapp/api'; import { createHash } from 'node:crypto'; +import type { Context } from '@yaakapp/api'; export async function storeToken( ctx: Context, diff --git a/plugins/auth-oauth2/src/util.ts b/plugins/auth-oauth2/src/util.ts index 1269854f..986cab0f 100644 --- a/plugins/auth-oauth2/src/util.ts +++ b/plugins/auth-oauth2/src/util.ts @@ -50,7 +50,7 @@ export function extractCode(urlStr: string, redirectUri: string | null): string export function urlMatchesRedirect(url: URL, redirectUrl: string | null): boolean { if (!redirectUrl) return true; - let redirect; + let redirect: URL; try { redirect = new URL(redirectUrl); } catch { diff --git a/plugins/auth-oauth2/tests/util.test.ts b/plugins/auth-oauth2/tests/util.test.ts index c2141a89..edbe4d71 100644 --- a/plugins/auth-oauth2/tests/util.test.ts +++ b/plugins/auth-oauth2/tests/util.test.ts @@ -1,4 +1,4 @@ -import { describe, test, expect } from 'vitest'; +import { describe, expect, test } from 'vitest'; import { extractCode } from '../src/util'; describe('extractCode', () => { diff --git a/plugins/filter-jsonpath/package.json b/plugins/filter-jsonpath/package.json index ad8b5217..8b044d6f 100644 --- a/plugins/filter-jsonpath/package.json +++ b/plugins/filter-jsonpath/package.json @@ -11,8 +11,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "jsonpath-plus": "^10.3.0" diff --git a/plugins/filter-xpath/package.json b/plugins/filter-xpath/package.json index f559eec2..f74035cc 100644 --- a/plugins/filter-xpath/package.json +++ b/plugins/filter-xpath/package.json @@ -6,8 +6,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "@xmldom/xmldom": "^0.9.8", diff --git a/plugins/filter-xpath/src/index.ts b/plugins/filter-xpath/src/index.ts index 9a5dd4f7..538a6529 100644 --- a/plugins/filter-xpath/src/index.ts +++ b/plugins/filter-xpath/src/index.ts @@ -7,16 +7,15 @@ export const plugin: PluginDefinition = { name: 'XPath', description: 'Filter XPath', onFilter(_ctx, args) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: none const doc: any = new DOMParser().parseFromString(args.payload, 'text/xml'); try { const result = xpath.select(args.filter, doc, false); if (Array.isArray(result)) { return { content: result.map((r) => String(r)).join('\n') }; - } else { - // Not sure what cases this happens in (?) - return { content: String(result) }; } + // Not sure what cases this happens in (?) + return { content: String(result) }; } catch (err) { return { content: '', error: `Invalid filter: ${err}` }; } diff --git a/plugins/importer-curl/package.json b/plugins/importer-curl/package.json index b37db3ff..abb89b97 100644 --- a/plugins/importer-curl/package.json +++ b/plugins/importer-curl/package.json @@ -7,7 +7,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" }, "dependencies": { diff --git a/plugins/importer-curl/src/index.ts b/plugins/importer-curl/src/index.ts index 6eed3723..825208f7 100644 --- a/plugins/importer-curl/src/index.ts +++ b/plugins/importer-curl/src/index.ts @@ -1,4 +1,12 @@ -import type { Context, Environment, Folder, HttpRequest, HttpUrlParameter, PluginDefinition, Workspace } from '@yaakapp/api'; +import type { + Context, + Environment, + Folder, + HttpRequest, + HttpUrlParameter, + PluginDefinition, + Workspace, +} from '@yaakapp/api'; import type { ControlOperator, ParseEntry } from 'shell-quote'; import { parse } from 'shell-quote'; @@ -28,7 +36,7 @@ const SUPPORTED_FLAGS = [ ['url-query'], ['user', 'u'], // Authentication DATA_FLAGS, -].flatMap((v) => v); +].flat(); const BOOLEAN_FLAGS = ['G', 'get', 'digest']; @@ -41,7 +49,7 @@ export const plugin: PluginDefinition = { name: 'cURL', description: 'Import cURL commands', onImport(_ctx: Context, args: { text: string }) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: none return convertCurl(args.text) as any; }, }, @@ -100,7 +108,7 @@ export function convertCurl(rawData: string) { if (op?.startsWith('$')) { // Handle the case where literal like -H $'Header: \'Some Quoted Thing\'' - const str = op.slice(2, op.length - 1).replace(/\\'/g, '\''); + const str = op.slice(2, op.length - 1).replace(/\\'/g, "'"); currentCommand.push(str); continue; @@ -153,7 +161,7 @@ function importCommand(parseEntries: ParseEntry[], workspaceId: string) { continue; } - let value; + let value: string | boolean; const nextEntry = parseEntries[i + 1]; const hasValue = !BOOLEAN_FLAGS.includes(name); if (isSingleDash && name.length > 1) { @@ -169,7 +177,7 @@ function importCommand(parseEntries: ParseEntry[], workspaceId: string) { } flagsByName[name] = flagsByName[name] || []; - flagsByName[name]!.push(value); + flagsByName[name]?.push(value); } else if (parseEntry) { singletons.push(parseEntry); } @@ -184,7 +192,11 @@ function importCommand(parseEntries: ParseEntry[], workspaceId: string) { const urlParameters: HttpUrlParameter[] = search?.split('&').map((p) => { const v = splitOnce(p, '='); - return { name: decodeURIComponent(v[0] ?? ''), value: decodeURIComponent(v[1] ?? ''), enabled: true }; + return { + name: decodeURIComponent(v[0] ?? ''), + value: decodeURIComponent(v[1] ?? ''), + enabled: true, + }; }) ?? []; const url = baseUrl ?? urlArg; @@ -209,15 +221,15 @@ function importCommand(parseEntries: ParseEntry[], workspaceId: string) { const authenticationType = username ? (isDigest ? 'digest' : 'basic') : null; const authentication = username ? { - username: username.trim(), - password: (password ?? '').trim(), - } + username: username.trim(), + password: (password ?? '').trim(), + } : {}; // Headers const headers = [ - ...((flagsByName['header'] as string[] | undefined) || []), - ...((flagsByName['H'] as string[] | undefined) || []), + ...((flagsByName.header as string[] | undefined) || []), + ...((flagsByName.H as string[] | undefined) || []), ].map((header) => { const [name, value] = header.split(/:(.*)$/); // remove final colon from header name if present @@ -237,8 +249,8 @@ function importCommand(parseEntries: ParseEntry[], workspaceId: string) { // Cookies const cookieHeaderValue = [ - ...((flagsByName['cookie'] as string[] | undefined) || []), - ...((flagsByName['b'] as string[] | undefined) || []), + ...((flagsByName.cookie as string[] | undefined) || []), + ...((flagsByName.b as string[] | undefined) || []), ] .map((str) => { const name = str.split('=', 1)[0]; @@ -269,8 +281,8 @@ function importCommand(parseEntries: ParseEntry[], workspaceId: string) { // Body (Multipart Form Data) const formDataParams = [ - ...((flagsByName['form'] as string[] | undefined) || []), - ...((flagsByName['F'] as string[] | undefined) || []), + ...((flagsByName.form as string[] | undefined) || []), + ...((flagsByName.F as string[] | undefined) || []), ].map((str) => { const parts = str.split('='); const name = parts[0] ?? ''; @@ -281,9 +293,9 @@ function importCommand(parseEntries: ParseEntry[], workspaceId: string) { }; if (value.indexOf('@') === 0) { - item['file'] = value.slice(1); + item.file = value.slice(1); } else { - item['value'] = value; + item.value = value; } return item; @@ -384,7 +396,7 @@ function pairsToDataParameters(keyedPairs: FlagsByName): DataParameter[] { for (const p of pairs) { if (typeof p !== 'string') continue; - const params = p.split("&"); + const params = p.split('&'); for (const param of params) { const [name, value] = splitOnce(param, '='); if (param.startsWith('@')) { @@ -398,7 +410,7 @@ function pairsToDataParameters(keyedPairs: FlagsByName): DataParameter[] { } else { dataParameters.push({ name: name ?? '', - value: flagName === 'data-urlencode' ? encodeURIComponent(value ?? '') : value ?? '', + value: flagName === 'data-urlencode' ? encodeURIComponent(value ?? '') : (value ?? ''), enabled: true, }); } @@ -415,8 +427,8 @@ const getPairValue = ( names: string[], ) => { for (const name of names) { - if (pairsByName[name] && pairsByName[name]!.length) { - return pairsByName[name]![0] as T; + if (pairsByName[name]?.length) { + return pairsByName[name]?.[0] as T; } } diff --git a/plugins/importer-curl/tests/index.test.ts b/plugins/importer-curl/tests/index.test.ts index 3acfedd7..fb398095 100644 --- a/plugins/importer-curl/tests/index.test.ts +++ b/plugins/importer-curl/tests/index.test.ts @@ -374,7 +374,7 @@ describe('importer-curl', () => { httpRequests: [ baseRequest({ url: 'https://yaak.app', - method: "POST", + method: 'POST', bodyType: 'application/x-www-form-urlencoded', body: { form: [{ name: 'foo', value: 'bar=baz', enabled: true }], diff --git a/plugins/importer-insomnia/package.json b/plugins/importer-insomnia/package.json index de0fc0b0..6bbb3286 100644 --- a/plugins/importer-insomnia/package.json +++ b/plugins/importer-insomnia/package.json @@ -7,7 +7,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" }, "dependencies": { diff --git a/plugins/importer-insomnia/src/common.ts b/plugins/importer-insomnia/src/common.ts index c82198dc..209df933 100644 --- a/plugins/importer-insomnia/src/common.ts +++ b/plugins/importer-insomnia/src/common.ts @@ -16,28 +16,30 @@ export function convertId(id: string): string { export function deleteUndefinedAttrs(obj: T): T { if (Array.isArray(obj) && obj != null) { return obj.map(deleteUndefinedAttrs) as T; - } else if (typeof obj === 'object' && obj != null) { + } + if (typeof obj === 'object' && obj != null) { return Object.fromEntries( Object.entries(obj) .filter(([, v]) => v !== undefined) .map(([k, v]) => [k, deleteUndefinedAttrs(v)]), ) as T; - } else { - return obj; } + return obj; } /** Recursively render all nested object properties */ export function convertTemplateSyntax(obj: T): T { if (typeof obj === 'string') { + // biome-ignore lint/suspicious/noTemplateCurlyInString: Yaak template syntax return obj.replaceAll(/{{\s*(_\.)?([^}]+)\s*}}/g, '${[$2]}') as T; - } else if (Array.isArray(obj) && obj != null) { + } + if (Array.isArray(obj) && obj != null) { return obj.map(convertTemplateSyntax) as T; - } else if (typeof obj === 'object' && obj != null) { + } + if (typeof obj === 'object' && obj != null) { return Object.fromEntries( Object.entries(obj).map(([k, v]) => [k, convertTemplateSyntax(v)]), ) as T; - } else { - return obj; } + return obj; } diff --git a/plugins/importer-insomnia/src/v4.ts b/plugins/importer-insomnia/src/v4.ts index b3189b44..0631b32b 100644 --- a/plugins/importer-insomnia/src/v4.ts +++ b/plugins/importer-insomnia/src/v4.ts @@ -1,7 +1,7 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import type { PartialImportResources } from '@yaakapp/api'; import { convertId, convertTemplateSyntax, isJSObject } from './common'; +// biome-ignore lint/suspicious/noExplicitAny: none export function convertInsomniaV4(parsed: any) { if (!Array.isArray(parsed.resources)) return null; @@ -16,6 +16,7 @@ export function convertInsomniaV4(parsed: any) { // Import workspaces const workspacesToImport = parsed.resources.filter( + // biome-ignore lint/suspicious/noExplicitAny: none (r: any) => isJSObject(r) && r._type === 'workspace', ); for (const w of workspacesToImport) { @@ -28,13 +29,16 @@ export function convertInsomniaV4(parsed: any) { description: w.description || undefined, }); const environmentsToImport = parsed.resources.filter( + // biome-ignore lint/suspicious/noExplicitAny: none (r: any) => isJSObject(r) && r._type === 'environment', ); resources.environments.push( + // biome-ignore lint/suspicious/noExplicitAny: none ...environmentsToImport.map((r: any) => importEnvironment(r, w._id)), ); const nextFolder = (parentId: string) => { + // biome-ignore lint/suspicious/noExplicitAny: none const children = parsed.resources.filter((r: any) => r.parentId === parentId); for (const child of children) { if (!isJSObject(child)) continue; @@ -63,6 +67,7 @@ export function convertInsomniaV4(parsed: any) { return { resources: convertTemplateSyntax(resources) }; } +// biome-ignore lint/suspicious/noExplicitAny: none function importHttpRequest(r: any, workspaceId: string): PartialImportResources['httpRequests'][0] { let bodyType: string | null = null; let body = {}; @@ -72,6 +77,7 @@ function importHttpRequest(r: any, workspaceId: string): PartialImportResources[ } else if (r.body?.mimeType === 'application/x-www-form-urlencoded') { bodyType = 'application/x-www-form-urlencoded'; body = { + // biome-ignore lint/suspicious/noExplicitAny: none form: (r.body.params ?? []).map((p: any) => ({ enabled: !p.disabled, name: p.name ?? '', @@ -81,6 +87,7 @@ function importHttpRequest(r: any, workspaceId: string): PartialImportResources[ } else if (r.body?.mimeType === 'multipart/form-data') { bodyType = 'multipart/form-data'; body = { + // biome-ignore lint/suspicious/noExplicitAny: none form: (r.body.params ?? []).map((p: any) => ({ enabled: !p.disabled, name: p.name ?? '', @@ -122,6 +129,7 @@ function importHttpRequest(r: any, workspaceId: string): PartialImportResources[ name: r.name, description: r.description || undefined, url: r.url, + // biome-ignore lint/suspicious/noExplicitAny: none urlParameters: (r.parameters ?? []).map((p: any) => ({ enabled: !p.disabled, name: p.name ?? '', @@ -133,16 +141,20 @@ function importHttpRequest(r: any, workspaceId: string): PartialImportResources[ authenticationType, method: r.method, headers: (r.headers ?? []) + // biome-ignore lint/suspicious/noExplicitAny: none .map((h: any) => ({ enabled: !h.disabled, name: h.name ?? '', value: h.value ?? '', })) + // biome-ignore lint/suspicious/noExplicitAny: none .filter(({ name, value }: any) => name !== '' || value !== ''), }; } +// biome-ignore lint/suspicious/noExplicitAny: none function importGrpcRequest(r: any, workspaceId: string): PartialImportResources['grpcRequests'][0] { + // biome-ignore lint/suspicious/noExplicitAny: none const parts = r.protoMethodName.split('/').filter((p: any) => p !== ''); const service = parts[0] ?? null; const method = parts[1] ?? null; @@ -162,15 +174,18 @@ function importGrpcRequest(r: any, workspaceId: string): PartialImportResources[ method, message: r.body?.text ?? '', metadata: (r.metadata ?? []) + // biome-ignore lint/suspicious/noExplicitAny: none .map((h: any) => ({ enabled: !h.disabled, name: h.name ?? '', value: h.value ?? '', })) + // biome-ignore lint/suspicious/noExplicitAny: none .filter(({ name, value }: any) => name !== '' || value !== ''), }; } +// biome-ignore lint/suspicious/noExplicitAny: none function importFolder(f: any, workspaceId: string): PartialImportResources['folders'][0] { return { id: convertId(f._id), @@ -185,11 +200,12 @@ function importFolder(f: any, workspaceId: string): PartialImportResources['fold } function importEnvironment( + // biome-ignore lint/suspicious/noExplicitAny: none e: any, workspaceId: string, - isParent?: boolean, + isParentOg?: boolean, ): PartialImportResources['environments'][0] { - isParent ??= e.parentId === workspaceId; + const isParent = isParentOg ?? e.parentId === workspaceId; return { id: convertId(e._id), createdAt: e.created ? new Date(e.created).toISOString().replace('Z', '') : undefined, diff --git a/plugins/importer-insomnia/src/v5.ts b/plugins/importer-insomnia/src/v5.ts index 6ac31621..83cde76d 100644 --- a/plugins/importer-insomnia/src/v5.ts +++ b/plugins/importer-insomnia/src/v5.ts @@ -1,7 +1,7 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import type { PartialImportResources } from '@yaakapp/api'; import { convertId, convertTemplateSyntax, isJSObject } from './common'; +// biome-ignore lint/suspicious/noExplicitAny: none export function convertInsomniaV5(parsed: any) { // Assert parsed is object if (parsed == null || typeof parsed !== 'object') { @@ -22,6 +22,7 @@ export function convertInsomniaV5(parsed: any) { }; // Import workspaces + // biome-ignore lint/suspicious/noExplicitAny: none const meta = ('meta' in parsed ? parsed.meta : {}) as Record; resources.workspaces.push({ id: convertId(meta.id ?? 'collection'), @@ -37,10 +38,12 @@ export function convertInsomniaV5(parsed: any) { // Import environments resources.environments.push( importEnvironment(parsed.environments, meta.id, true), + // biome-ignore lint/suspicious/noExplicitAny: none ...(parsed.environments.subEnvironments ?? []).map((r: any) => importEnvironment(r, meta.id)), ); // Import folders + // biome-ignore lint/suspicious/noExplicitAny: none const nextFolder = (children: any[], parentId: string) => { for (const child of children ?? []) { if (!isJSObject(child)) continue; @@ -73,6 +76,7 @@ export function convertInsomniaV5(parsed: any) { } function importHttpRequest( + // biome-ignore lint/suspicious/noExplicitAny: none r: any, workspaceId: string, parentId: string, @@ -90,6 +94,7 @@ function importHttpRequest( } else if (r.body?.mimeType === 'application/x-www-form-urlencoded') { bodyType = 'application/x-www-form-urlencoded'; body = { + // biome-ignore lint/suspicious/noExplicitAny: none form: (r.body.params ?? []).map((p: any) => ({ enabled: !p.disabled, name: p.name ?? '', @@ -99,6 +104,7 @@ function importHttpRequest( } else if (r.body?.mimeType === 'multipart/form-data') { bodyType = 'multipart/form-data'; body = { + // biome-ignore lint/suspicious/noExplicitAny: none form: (r.body.params ?? []).map((p: any) => ({ enabled: !p.disabled, name: p.name ?? '', @@ -125,6 +131,7 @@ function importHttpRequest( name: r.name, description: r.meta?.description || undefined, url: r.url, + // biome-ignore lint/suspicious/noExplicitAny: none urlParameters: (r.parameters ?? []).map((p: any) => ({ enabled: !p.disabled, name: p.name ?? '', @@ -139,6 +146,7 @@ function importHttpRequest( } function importGrpcRequest( + // biome-ignore lint/suspicious/noExplicitAny: none r: any, workspaceId: string, parentId: string, @@ -148,6 +156,7 @@ function importGrpcRequest( const updated = r.meta?.modified ?? r.updated; const sortKey = r.meta?.sortKey ?? r.sortKey; + // biome-ignore lint/suspicious/noExplicitAny: none const parts = r.protoMethodName.split('/').filter((p: any) => p !== ''); const service = parts[0] ?? null; const method = parts[1] ?? null; @@ -167,16 +176,19 @@ function importGrpcRequest( method, message: r.body?.text ?? '', metadata: (r.metadata ?? []) + // biome-ignore lint/suspicious/noExplicitAny: none .map((h: any) => ({ enabled: !h.disabled, name: h.name ?? '', value: h.value ?? '', })) + // biome-ignore lint/suspicious/noExplicitAny: none .filter(({ name, value }: any) => name !== '' || value !== ''), }; } function importWebsocketRequest( + // biome-ignore lint/suspicious/noExplicitAny: none r: any, workspaceId: string, parentId: string, @@ -203,17 +215,21 @@ function importWebsocketRequest( }; } +// biome-ignore lint/suspicious/noExplicitAny: none function importHeaders(obj: any) { const headers = (obj.headers ?? []) + // biome-ignore lint/suspicious/noExplicitAny: none .map((h: any) => ({ enabled: !h.disabled, name: h.name ?? '', value: h.value ?? '', })) + // biome-ignore lint/suspicious/noExplicitAny: none .filter(({ name, value }: any) => name !== '' || value !== ''); return { headers } as const; } +// biome-ignore lint/suspicious/noExplicitAny: none function importAuthentication(obj: any) { let authenticationType: string | null = null; let authentication = {}; @@ -234,6 +250,7 @@ function importAuthentication(obj: any) { } function importFolder( + // biome-ignore lint/suspicious/noExplicitAny: none f: any, workspaceId: string, parentId: string, @@ -249,7 +266,7 @@ function importFolder( let environment: PartialImportResources['environments'][0] | null = null; if (Object.keys(f.environment ?? {}).length > 0) { environment = { - id: convertId(id + 'folder'), + id: convertId(`${id}folder`), createdAt: created ? new Date(created).toISOString().replace('Z', '') : undefined, updatedAt: updated ? new Date(updated).toISOString().replace('Z', '') : undefined, workspaceId: convertId(workspaceId), @@ -285,6 +302,7 @@ function importFolder( } function importEnvironment( + // biome-ignore lint/suspicious/noExplicitAny: none e: any, workspaceId: string, isParent?: boolean, diff --git a/plugins/importer-insomnia/tests/index.test.ts b/plugins/importer-insomnia/tests/index.test.ts index da561926..a9fb2b1b 100644 --- a/plugins/importer-insomnia/tests/index.test.ts +++ b/plugins/importer-insomnia/tests/index.test.ts @@ -13,9 +13,12 @@ describe('importer-yaak', () => { continue; } - test('Imports ' + fixture, () => { + test(`Imports ${fixture}`, () => { const contents = fs.readFileSync(path.join(p, fixture), 'utf-8'); - const expected = fs.readFileSync(path.join(p, fixture.replace(/.input\..*/, '.output.json')), 'utf-8'); + const expected = fs.readFileSync( + path.join(p, fixture.replace(/.input\..*/, '.output.json')), + 'utf-8', + ); const result = convertInsomnia(contents); // console.log(JSON.stringify(result, null, 2)) expect(result).toEqual(parseJsonOrYaml(expected)); diff --git a/plugins/importer-openapi/package.json b/plugins/importer-openapi/package.json index 7dc4d690..db9c9619 100644 --- a/plugins/importer-openapi/package.json +++ b/plugins/importer-openapi/package.json @@ -7,7 +7,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" }, "dependencies": { diff --git a/plugins/importer-openapi/src/index.ts b/plugins/importer-openapi/src/index.ts index 9b765779..33844be0 100644 --- a/plugins/importer-openapi/src/index.ts +++ b/plugins/importer-openapi/src/index.ts @@ -14,10 +14,11 @@ export const plugin: PluginDefinition = { }; export async function convertOpenApi(contents: string): Promise { - let postmanCollection; + // biome-ignore lint/suspicious/noExplicitAny: none + let postmanCollection: any; try { postmanCollection = await new Promise((resolve, reject) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: none convert({ type: 'string', data: contents }, {}, (err, result: any) => { if (err != null) reject(err); diff --git a/plugins/importer-openapi/tests/index.test.ts b/plugins/importer-openapi/tests/index.test.ts index 1e79c355..a409ae52 100644 --- a/plugins/importer-openapi/tests/index.test.ts +++ b/plugins/importer-openapi/tests/index.test.ts @@ -13,7 +13,7 @@ describe('importer-openapi', () => { }); for (const fixture of fixtures) { - test('Imports ' + fixture, async () => { + test(`Imports ${fixture}`, async () => { const contents = fs.readFileSync(path.join(p, fixture), 'utf-8'); const imported = await convertOpenApi(contents); expect(imported?.resources.workspaces).toEqual([ diff --git a/plugins/importer-postman-environment/package.json b/plugins/importer-postman-environment/package.json index f83c7f6c..888a34f2 100644 --- a/plugins/importer-postman-environment/package.json +++ b/plugins/importer-postman-environment/package.json @@ -8,7 +8,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" } } diff --git a/plugins/importer-postman-environment/src/index.ts b/plugins/importer-postman-environment/src/index.ts index f114ad43..ba12c173 100644 --- a/plugins/importer-postman-environment/src/index.ts +++ b/plugins/importer-postman-environment/src/index.ts @@ -93,39 +93,37 @@ function toRecord(value: Record | unknown): Record { function toArray(value: unknown): T[] { if (Object.prototype.toString.call(value) === '[object Array]') return value as T[]; - else return [] as T[]; + return [] as T[]; } /** Recursively render all nested object properties */ function convertTemplateSyntax(obj: T): T { if (typeof obj === 'string') { - return obj.replace( - /{{\s*(_\.)?([^}]*)\s*}}/g, - (_m, _dot, expr) => '${[' + expr.trim() + ']}', - ) as T; - } else if (Array.isArray(obj) && obj != null) { + return obj.replace(/{{\s*(_\.)?([^}]*)\s*}}/g, (_m, _dot, expr) => `\${[${expr.trim()}]}`) as T; + } + if (Array.isArray(obj) && obj != null) { return obj.map(convertTemplateSyntax) as T; - } else if (typeof obj === 'object' && obj != null) { + } + if (typeof obj === 'object' && obj != null) { return Object.fromEntries( Object.entries(obj as Record).map(([k, v]) => [k, convertTemplateSyntax(v)]), ) as T; - } else { - return obj; } + return obj; } function deleteUndefinedAttrs(obj: T): T { if (Array.isArray(obj) && obj != null) { return obj.map(deleteUndefinedAttrs) as T; - } else if (typeof obj === 'object' && obj != null) { + } + if (typeof obj === 'object' && obj != null) { return Object.fromEntries( Object.entries(obj as Record) .filter(([, v]) => v !== undefined) .map(([k, v]) => [k, deleteUndefinedAttrs(v)]), ) as T; - } else { - return obj; } + return obj; } const idCount: Partial> = {}; diff --git a/plugins/importer-postman-environment/tests/index.test.ts b/plugins/importer-postman-environment/tests/index.test.ts index 3ecf9488..f944b865 100644 --- a/plugins/importer-postman-environment/tests/index.test.ts +++ b/plugins/importer-postman-environment/tests/index.test.ts @@ -12,7 +12,7 @@ describe('importer-postman-environment', () => { continue; } - test('Imports ' + fixture, () => { + test(`Imports ${fixture}`, () => { const contents = fs.readFileSync(path.join(p, fixture), 'utf-8'); const expected = fs.readFileSync(path.join(p, fixture.replace('.input', '.output')), 'utf-8'); const result = convertPostmanEnvironment(contents); diff --git a/plugins/importer-postman/package.json b/plugins/importer-postman/package.json index 10cbef25..7008d352 100644 --- a/plugins/importer-postman/package.json +++ b/plugins/importer-postman/package.json @@ -8,7 +8,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" } } diff --git a/plugins/importer-postman/src/index.ts b/plugins/importer-postman/src/index.ts index bbe85c99..7567815b 100644 --- a/plugins/importer-postman/src/index.ts +++ b/plugins/importer-postman/src/index.ts @@ -205,7 +205,7 @@ function convertUrl(rawUrl: string | unknown): Pick 0) { for (const v of url.variable) { params.push({ - name: ':' + (v.key ?? ''), + name: `:${v.key ?? ''}`, value: v.value ?? '', enabled: !v.disabled, }); @@ -414,7 +414,8 @@ function importBody(rawBody: unknown): Pick(jsonStr: string): Record | null { @@ -503,7 +506,7 @@ function toRecord(value: Record | unknown): Record { function toArray(value: unknown): T[] { if (Object.prototype.toString.call(value) === '[object Array]') return value as T[]; - else return []; + return []; } /** Recursively render all nested object properties */ @@ -511,31 +514,32 @@ function convertTemplateSyntax(obj: T): T { if (typeof obj === 'string') { return obj.replace( /{{\s*(_\.)?([^}]*)\s*}}/g, - (_m, _dot, expr) => '${[' + expr.trim().replace(/^vault:/, '') + ']}', + (_m, _dot, expr) => `\${[${expr.trim().replace(/^vault:/, '')}]}`, ) as T; - } else if (Array.isArray(obj) && obj != null) { + } + if (Array.isArray(obj) && obj != null) { return obj.map(convertTemplateSyntax) as T; - } else if (typeof obj === 'object' && obj != null) { + } + if (typeof obj === 'object' && obj != null) { return Object.fromEntries( Object.entries(obj).map(([k, v]) => [k, convertTemplateSyntax(v)]), ) as T; - } else { - return obj; } + return obj; } function deleteUndefinedAttrs(obj: T): T { if (Array.isArray(obj) && obj != null) { return obj.map(deleteUndefinedAttrs) as T; - } else if (typeof obj === 'object' && obj != null) { + } + if (typeof obj === 'object' && obj != null) { return Object.fromEntries( Object.entries(obj) .filter(([, v]) => v !== undefined) .map(([k, v]) => [k, deleteUndefinedAttrs(v)]), ) as T; - } else { - return obj; } + return obj; } const idCount: Partial> = {}; diff --git a/plugins/importer-postman/tests/fixtures/auth.input.json b/plugins/importer-postman/tests/fixtures/auth.input.json index 5561fd14..5fe9dd96 100644 --- a/plugins/importer-postman/tests/fixtures/auth.input.json +++ b/plugins/importer-postman/tests/fixtures/auth.input.json @@ -1,828 +1,784 @@ { - "info": { - "_postman_id": "9e6dfada-256c-49ea-a38f-7d1b05b7ca2d", - "name": "Authentication", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "18798" - }, - "item": [ - { - "name": "No Auth", - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [], - "url": { - "raw": "https://yaak.app/x/echo", - "protocol": "https", - "host": [ - "yaak", - "app" - ], - "path": [ - "x", - "echo" - ] - } - }, - "response": [] - }, - { - "name": "Inherit", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "https://yaak.app/x/echo", - "protocol": "https", - "host": [ - "yaak", - "app" - ], - "path": [ - "x", - "echo" - ] - } - }, - "response": [] - }, - { - "name": "OAuth 2 Auth Code", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "oauth2", - "oauth2": [ - { - "key": "grant_type", - "value": "authorization_code", - "type": "string" - }, - { - "key": "headerPrefix", - "value": "Bearer", - "type": "string" - }, - { - "key": "client_authentication", - "value": "header", - "type": "string" - }, - { - "key": "challengeAlgorithm", - "value": "S256", - "type": "string" - }, - { - "key": "refreshTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "state", - "value": "state", - "type": "string" - }, - { - "key": "scope", - "value": "scope", - "type": "string" - }, - { - "key": "code_verifier", - "value": "verifier", - "type": "string" - }, - { - "key": "clientSecret", - "value": "clientsecet", - "type": "string" - }, - { - "key": "clientId", - "value": "cliend id", - "type": "string" - }, - { - "key": "authUrl", - "value": "https://github.com/login/oauth/authorize", - "type": "string" - }, - { - "key": "accessTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "useBrowser", - "value": true, - "type": "boolean" - }, - { - "key": "redirect_uri", - "value": "https://callback", - "type": "string" - }, - { - "key": "tokenName", - "value": "name", - "type": "string" - }, - { - "key": "addTokenTo", - "value": "header", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"hello\": \"world\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{vault:hello}}", - "host": [ - "{{vault:hello}}" - ] - } - }, - "response": [] - }, - { - "name": "OAuth 2 Auth Code (PKCE)", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "oauth2", - "oauth2": [ - { - "key": "headerPrefix", - "value": "Bearer", - "type": "string" - }, - { - "key": "client_authentication", - "value": "header", - "type": "string" - }, - { - "key": "challengeAlgorithm", - "value": "S256", - "type": "string" - }, - { - "key": "refreshTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "state", - "value": "state", - "type": "string" - }, - { - "key": "scope", - "value": "scope", - "type": "string" - }, - { - "key": "code_verifier", - "value": "verifier", - "type": "string" - }, - { - "key": "grant_type", - "value": "authorization_code_with_pkce", - "type": "string" - }, - { - "key": "clientSecret", - "value": "clientsecet", - "type": "string" - }, - { - "key": "clientId", - "value": "cliend id", - "type": "string" - }, - { - "key": "authUrl", - "value": "https://github.com/login/oauth/authorize", - "type": "string" - }, - { - "key": "accessTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "useBrowser", - "value": true, - "type": "boolean" - }, - { - "key": "redirect_uri", - "value": "https://callback", - "type": "string" - }, - { - "key": "tokenName", - "value": "name", - "type": "string" - }, - { - "key": "addTokenTo", - "value": "header", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"hello\": \"world\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{vault:hello}}", - "host": [ - "{{vault:hello}}" - ] - } - }, - "response": [] - }, - { - "name": "OAuth 2 Implicit", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "oauth2", - "oauth2": [ - { - "key": "client_authentication", - "value": "header", - "type": "string" - }, - { - "key": "redirect_uri", - "value": "https://yaak.app/x/echo", - "type": "string" - }, - { - "key": "useBrowser", - "value": false, - "type": "boolean" - }, - { - "key": "grant_type", - "value": "implicit", - "type": "string" - }, - { - "key": "headerPrefix", - "value": "Bearer", - "type": "string" - }, - { - "key": "challengeAlgorithm", - "value": "S256", - "type": "string" - }, - { - "key": "refreshTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "state", - "value": "state", - "type": "string" - }, - { - "key": "scope", - "value": "scope", - "type": "string" - }, - { - "key": "code_verifier", - "value": "verifier", - "type": "string" - }, - { - "key": "clientSecret", - "value": "clientsecet", - "type": "string" - }, - { - "key": "clientId", - "value": "cliend id", - "type": "string" - }, - { - "key": "authUrl", - "value": "https://github.com/login/oauth/authorize", - "type": "string" - }, - { - "key": "accessTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "tokenName", - "value": "name", - "type": "string" - }, - { - "key": "addTokenTo", - "value": "header", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"hello\": \"world\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{vault:hello}}", - "host": [ - "{{vault:hello}}" - ] - } - }, - "response": [] - }, - { - "name": "OAuth 2 Password", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "oauth2", - "oauth2": [ - { - "key": "password", - "value": "password", - "type": "string" - }, - { - "key": "username", - "value": "username", - "type": "string" - }, - { - "key": "clientSecret", - "value": "clientsecret", - "type": "string" - }, - { - "key": "clientId", - "value": "clientid", - "type": "string" - }, - { - "key": "grant_type", - "value": "password_credentials", - "type": "string" - }, - { - "key": "client_authentication", - "value": "header", - "type": "string" - }, - { - "key": "redirect_uri", - "value": "https://yaak.app/x/echo", - "type": "string" - }, - { - "key": "useBrowser", - "value": false, - "type": "boolean" - }, - { - "key": "headerPrefix", - "value": "Bearer", - "type": "string" - }, - { - "key": "challengeAlgorithm", - "value": "S256", - "type": "string" - }, - { - "key": "refreshTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "state", - "value": "state", - "type": "string" - }, - { - "key": "scope", - "value": "scope", - "type": "string" - }, - { - "key": "code_verifier", - "value": "verifier", - "type": "string" - }, - { - "key": "authUrl", - "value": "https://github.com/login/oauth/authorize", - "type": "string" - }, - { - "key": "accessTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "tokenName", - "value": "name", - "type": "string" - }, - { - "key": "addTokenTo", - "value": "header", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"hello\": \"world\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{vault:hello}}", - "host": [ - "{{vault:hello}}" - ] - } - }, - "response": [] - }, - { - "name": "OAuth 2 Client Credentials", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "auth": { - "type": "oauth2", - "oauth2": [ - { - "key": "grant_type", - "value": "client_credentials", - "type": "string" - }, - { - "key": "password", - "value": "password", - "type": "string" - }, - { - "key": "username", - "value": "username", - "type": "string" - }, - { - "key": "clientSecret", - "value": "clientsecret", - "type": "string" - }, - { - "key": "clientId", - "value": "clientid", - "type": "string" - }, - { - "key": "client_authentication", - "value": "header", - "type": "string" - }, - { - "key": "redirect_uri", - "value": "https://yaak.app/x/echo", - "type": "string" - }, - { - "key": "useBrowser", - "value": false, - "type": "boolean" - }, - { - "key": "headerPrefix", - "value": "Bearer", - "type": "string" - }, - { - "key": "challengeAlgorithm", - "value": "S256", - "type": "string" - }, - { - "key": "refreshTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "state", - "value": "state", - "type": "string" - }, - { - "key": "scope", - "value": "scope", - "type": "string" - }, - { - "key": "code_verifier", - "value": "verifier", - "type": "string" - }, - { - "key": "authUrl", - "value": "https://github.com/login/oauth/authorize", - "type": "string" - }, - { - "key": "accessTokenUrl", - "value": "https://github.com/login/oauth/access_token", - "type": "string" - }, - { - "key": "tokenName", - "value": "name", - "type": "string" - }, - { - "key": "addTokenTo", - "value": "header", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"hello\": \"world\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{vault:hello}}", - "host": [ - "{{vault:hello}}" - ] - } - }, - "response": [] - }, - { - "name": "AWS V4", - "request": { - "auth": { - "type": "awsv4", - "awsv4": [ - { - "key": "sessionToken", - "value": "session", - "type": "string" - }, - { - "key": "service", - "value": "s3", - "type": "string" - }, - { - "key": "region", - "value": "us-west-1", - "type": "string" - }, - { - "key": "secretKey", - "value": "secret", - "type": "string" - }, - { - "key": "accessKey", - "value": "access", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "https://yaak.app/x/echo", - "protocol": "https", - "host": [ - "yaak", - "app" - ], - "path": [ - "x", - "echo" - ] - } - }, - "response": [] - }, - { - "name": "API Key", - "request": { - "auth": { - "type": "apikey", - "apikey": [ - { - "key": "in", - "value": "query", - "type": "string" - }, - { - "key": "value", - "value": "value", - "type": "string" - }, - { - "key": "key", - "value": "key", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "https://yaak.app/x/echo", - "protocol": "https", - "host": [ - "yaak", - "app" - ], - "path": [ - "x", - "echo" - ] - } - }, - "response": [] - }, - { - "name": "JWT", - "request": { - "auth": { - "type": "jwt", - "jwt": [ - { - "key": "header", - "value": "{\n \"header\": \"foo\"\n}", - "type": "string" - }, - { - "key": "headerPrefix", - "value": "Bearer", - "type": "string" - }, - { - "key": "payload", - "value": "{\n \"my\": \"payload\"\n}", - "type": "string" - }, - { - "key": "isSecretBase64Encoded", - "value": false, - "type": "boolean" - }, - { - "key": "secret", - "value": "mysecret", - "type": "string" - }, - { - "key": "algorithm", - "value": "HS384", - "type": "string" - }, - { - "key": "addTokenTo", - "value": "header", - "type": "string" - }, - { - "key": "queryParamKey", - "value": "token", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "https://yaak.app/x/echo", - "protocol": "https", - "host": [ - "yaak", - "app" - ], - "path": [ - "x", - "echo" - ] - } - }, - "response": [] - } - ], - "auth": { - "type": "basic", - "basic": [ - { - "key": "password", - "value": "workspace_secret", - "type": "string" - }, - { - "key": "username", - "value": "workspace", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "requests": {}, - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "COLLECTION VARIABLE", - "value": "collection variable" - } - ] -} \ No newline at end of file + "info": { + "_postman_id": "9e6dfada-256c-49ea-a38f-7d1b05b7ca2d", + "name": "Authentication", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "18798" + }, + "item": [ + { + "name": "No Auth", + "request": { + "auth": { + "type": "noauth" + }, + "method": "GET", + "header": [], + "url": { + "raw": "https://yaak.app/x/echo", + "protocol": "https", + "host": ["yaak", "app"], + "path": ["x", "echo"] + } + }, + "response": [] + }, + { + "name": "Inherit", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://yaak.app/x/echo", + "protocol": "https", + "host": ["yaak", "app"], + "path": ["x", "echo"] + } + }, + "response": [] + }, + { + "name": "OAuth 2 Auth Code", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "oauth2", + "oauth2": [ + { + "key": "grant_type", + "value": "authorization_code", + "type": "string" + }, + { + "key": "headerPrefix", + "value": "Bearer", + "type": "string" + }, + { + "key": "client_authentication", + "value": "header", + "type": "string" + }, + { + "key": "challengeAlgorithm", + "value": "S256", + "type": "string" + }, + { + "key": "refreshTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "state", + "value": "state", + "type": "string" + }, + { + "key": "scope", + "value": "scope", + "type": "string" + }, + { + "key": "code_verifier", + "value": "verifier", + "type": "string" + }, + { + "key": "clientSecret", + "value": "clientsecet", + "type": "string" + }, + { + "key": "clientId", + "value": "cliend id", + "type": "string" + }, + { + "key": "authUrl", + "value": "https://github.com/login/oauth/authorize", + "type": "string" + }, + { + "key": "accessTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "useBrowser", + "value": true, + "type": "boolean" + }, + { + "key": "redirect_uri", + "value": "https://callback", + "type": "string" + }, + { + "key": "tokenName", + "value": "name", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hello\": \"world\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{vault:hello}}", + "host": ["{{vault:hello}}"] + } + }, + "response": [] + }, + { + "name": "OAuth 2 Auth Code (PKCE)", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "oauth2", + "oauth2": [ + { + "key": "headerPrefix", + "value": "Bearer", + "type": "string" + }, + { + "key": "client_authentication", + "value": "header", + "type": "string" + }, + { + "key": "challengeAlgorithm", + "value": "S256", + "type": "string" + }, + { + "key": "refreshTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "state", + "value": "state", + "type": "string" + }, + { + "key": "scope", + "value": "scope", + "type": "string" + }, + { + "key": "code_verifier", + "value": "verifier", + "type": "string" + }, + { + "key": "grant_type", + "value": "authorization_code_with_pkce", + "type": "string" + }, + { + "key": "clientSecret", + "value": "clientsecet", + "type": "string" + }, + { + "key": "clientId", + "value": "cliend id", + "type": "string" + }, + { + "key": "authUrl", + "value": "https://github.com/login/oauth/authorize", + "type": "string" + }, + { + "key": "accessTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "useBrowser", + "value": true, + "type": "boolean" + }, + { + "key": "redirect_uri", + "value": "https://callback", + "type": "string" + }, + { + "key": "tokenName", + "value": "name", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hello\": \"world\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{vault:hello}}", + "host": ["{{vault:hello}}"] + } + }, + "response": [] + }, + { + "name": "OAuth 2 Implicit", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "oauth2", + "oauth2": [ + { + "key": "client_authentication", + "value": "header", + "type": "string" + }, + { + "key": "redirect_uri", + "value": "https://yaak.app/x/echo", + "type": "string" + }, + { + "key": "useBrowser", + "value": false, + "type": "boolean" + }, + { + "key": "grant_type", + "value": "implicit", + "type": "string" + }, + { + "key": "headerPrefix", + "value": "Bearer", + "type": "string" + }, + { + "key": "challengeAlgorithm", + "value": "S256", + "type": "string" + }, + { + "key": "refreshTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "state", + "value": "state", + "type": "string" + }, + { + "key": "scope", + "value": "scope", + "type": "string" + }, + { + "key": "code_verifier", + "value": "verifier", + "type": "string" + }, + { + "key": "clientSecret", + "value": "clientsecet", + "type": "string" + }, + { + "key": "clientId", + "value": "cliend id", + "type": "string" + }, + { + "key": "authUrl", + "value": "https://github.com/login/oauth/authorize", + "type": "string" + }, + { + "key": "accessTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "tokenName", + "value": "name", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hello\": \"world\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{vault:hello}}", + "host": ["{{vault:hello}}"] + } + }, + "response": [] + }, + { + "name": "OAuth 2 Password", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "oauth2", + "oauth2": [ + { + "key": "password", + "value": "password", + "type": "string" + }, + { + "key": "username", + "value": "username", + "type": "string" + }, + { + "key": "clientSecret", + "value": "clientsecret", + "type": "string" + }, + { + "key": "clientId", + "value": "clientid", + "type": "string" + }, + { + "key": "grant_type", + "value": "password_credentials", + "type": "string" + }, + { + "key": "client_authentication", + "value": "header", + "type": "string" + }, + { + "key": "redirect_uri", + "value": "https://yaak.app/x/echo", + "type": "string" + }, + { + "key": "useBrowser", + "value": false, + "type": "boolean" + }, + { + "key": "headerPrefix", + "value": "Bearer", + "type": "string" + }, + { + "key": "challengeAlgorithm", + "value": "S256", + "type": "string" + }, + { + "key": "refreshTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "state", + "value": "state", + "type": "string" + }, + { + "key": "scope", + "value": "scope", + "type": "string" + }, + { + "key": "code_verifier", + "value": "verifier", + "type": "string" + }, + { + "key": "authUrl", + "value": "https://github.com/login/oauth/authorize", + "type": "string" + }, + { + "key": "accessTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "tokenName", + "value": "name", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hello\": \"world\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{vault:hello}}", + "host": ["{{vault:hello}}"] + } + }, + "response": [] + }, + { + "name": "OAuth 2 Client Credentials", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "oauth2", + "oauth2": [ + { + "key": "grant_type", + "value": "client_credentials", + "type": "string" + }, + { + "key": "password", + "value": "password", + "type": "string" + }, + { + "key": "username", + "value": "username", + "type": "string" + }, + { + "key": "clientSecret", + "value": "clientsecret", + "type": "string" + }, + { + "key": "clientId", + "value": "clientid", + "type": "string" + }, + { + "key": "client_authentication", + "value": "header", + "type": "string" + }, + { + "key": "redirect_uri", + "value": "https://yaak.app/x/echo", + "type": "string" + }, + { + "key": "useBrowser", + "value": false, + "type": "boolean" + }, + { + "key": "headerPrefix", + "value": "Bearer", + "type": "string" + }, + { + "key": "challengeAlgorithm", + "value": "S256", + "type": "string" + }, + { + "key": "refreshTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "state", + "value": "state", + "type": "string" + }, + { + "key": "scope", + "value": "scope", + "type": "string" + }, + { + "key": "code_verifier", + "value": "verifier", + "type": "string" + }, + { + "key": "authUrl", + "value": "https://github.com/login/oauth/authorize", + "type": "string" + }, + { + "key": "accessTokenUrl", + "value": "https://github.com/login/oauth/access_token", + "type": "string" + }, + { + "key": "tokenName", + "value": "name", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hello\": \"world\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{vault:hello}}", + "host": ["{{vault:hello}}"] + } + }, + "response": [] + }, + { + "name": "AWS V4", + "request": { + "auth": { + "type": "awsv4", + "awsv4": [ + { + "key": "sessionToken", + "value": "session", + "type": "string" + }, + { + "key": "service", + "value": "s3", + "type": "string" + }, + { + "key": "region", + "value": "us-west-1", + "type": "string" + }, + { + "key": "secretKey", + "value": "secret", + "type": "string" + }, + { + "key": "accessKey", + "value": "access", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "https://yaak.app/x/echo", + "protocol": "https", + "host": ["yaak", "app"], + "path": ["x", "echo"] + } + }, + "response": [] + }, + { + "name": "API Key", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "in", + "value": "query", + "type": "string" + }, + { + "key": "value", + "value": "value", + "type": "string" + }, + { + "key": "key", + "value": "key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "https://yaak.app/x/echo", + "protocol": "https", + "host": ["yaak", "app"], + "path": ["x", "echo"] + } + }, + "response": [] + }, + { + "name": "JWT", + "request": { + "auth": { + "type": "jwt", + "jwt": [ + { + "key": "header", + "value": "{\n \"header\": \"foo\"\n}", + "type": "string" + }, + { + "key": "headerPrefix", + "value": "Bearer", + "type": "string" + }, + { + "key": "payload", + "value": "{\n \"my\": \"payload\"\n}", + "type": "string" + }, + { + "key": "isSecretBase64Encoded", + "value": false, + "type": "boolean" + }, + { + "key": "secret", + "value": "mysecret", + "type": "string" + }, + { + "key": "algorithm", + "value": "HS384", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + }, + { + "key": "queryParamKey", + "value": "token", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "https://yaak.app/x/echo", + "protocol": "https", + "host": ["yaak", "app"], + "path": ["x", "echo"] + } + }, + "response": [] + } + ], + "auth": { + "type": "basic", + "basic": [ + { + "key": "password", + "value": "workspace_secret", + "type": "string" + }, + { + "key": "username", + "value": "workspace", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [""] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "requests": {}, + "exec": [""] + } + } + ], + "variable": [ + { + "key": "COLLECTION VARIABLE", + "value": "collection variable" + } + ] +} diff --git a/plugins/importer-postman/tests/fixtures/nested.input.json b/plugins/importer-postman/tests/fixtures/nested.input.json index 0061656e..221683e3 100644 --- a/plugins/importer-postman/tests/fixtures/nested.input.json +++ b/plugins/importer-postman/tests/fixtures/nested.input.json @@ -1,38 +1,38 @@ { - "info": { - "_postman_id": "9e6dfada-256c-49ea-a38f-7d1b05b7ca2d", - "name": "New Collection", - "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json", - "_exporter_id": "18798" - }, - "item": [ - { - "name": "Top Folder", - "item": [ - { - "name": "Nested Folder", - "item": [ - { - "name": "Request 1", - "request": { - "method": "GET" - } - } - ] - }, - { - "name": "Request 2", - "request": { - "method": "GET" - } - } - ] - }, - { - "name": "Request 3", - "request": { - "method": "GET" - } - } - ] + "info": { + "_postman_id": "9e6dfada-256c-49ea-a38f-7d1b05b7ca2d", + "name": "New Collection", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json", + "_exporter_id": "18798" + }, + "item": [ + { + "name": "Top Folder", + "item": [ + { + "name": "Nested Folder", + "item": [ + { + "name": "Request 1", + "request": { + "method": "GET" + } + } + ] + }, + { + "name": "Request 2", + "request": { + "method": "GET" + } + } + ] + }, + { + "name": "Request 3", + "request": { + "method": "GET" + } + } + ] } diff --git a/plugins/importer-postman/tests/fixtures/params.input.json b/plugins/importer-postman/tests/fixtures/params.input.json index b647a992..86920712 100644 --- a/plugins/importer-postman/tests/fixtures/params.input.json +++ b/plugins/importer-postman/tests/fixtures/params.input.json @@ -47,14 +47,8 @@ }, "url": { "raw": "example.com/:foo/:bar?q=qqq&", - "host": [ - "example", - "com" - ], - "path": [ - ":foo", - ":bar" - ], + "host": ["example", "com"], + "path": [":foo", ":bar"], "query": [ { "key": "disabled", @@ -110,9 +104,7 @@ "script": { "type": "text/javascript", "packages": {}, - "exec": [ - "" - ] + "exec": [""] } }, { @@ -120,9 +112,7 @@ "script": { "type": "text/javascript", "packages": {}, - "exec": [ - "" - ] + "exec": [""] } } ], diff --git a/plugins/importer-postman/tests/index.test.ts b/plugins/importer-postman/tests/index.test.ts index 0d88c875..f40cfdad 100644 --- a/plugins/importer-postman/tests/index.test.ts +++ b/plugins/importer-postman/tests/index.test.ts @@ -12,7 +12,7 @@ describe('importer-postman', () => { continue; } - test('Imports ' + fixture, () => { + test(`Imports ${fixture}`, () => { const contents = fs.readFileSync(path.join(p, fixture), 'utf-8'); const expected = fs.readFileSync(path.join(p, fixture.replace('.input', '.output')), 'utf-8'); const result = convertPostman(contents); diff --git a/plugins/importer-yaak/package.json b/plugins/importer-yaak/package.json index 9bdd07de..41f24375 100644 --- a/plugins/importer-yaak/package.json +++ b/plugins/importer-yaak/package.json @@ -7,7 +7,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" } } diff --git a/plugins/importer-yaak/src/index.ts b/plugins/importer-yaak/src/index.ts index 4dc72724..bc215ea7 100644 --- a/plugins/importer-yaak/src/index.ts +++ b/plugins/importer-yaak/src/index.ts @@ -11,7 +11,8 @@ export const plugin: PluginDefinition = { }; export function migrateImport(contents: string) { - let parsed; + // biome-ignore lint/suspicious/noExplicitAny: none + let parsed: any; try { parsed = JSON.parse(contents); } catch { @@ -30,7 +31,7 @@ export function migrateImport(contents: string) { // Migrate v1 to v2 -- changes requests to httpRequests if ('requests' in parsed.resources) { parsed.resources.httpRequests = parsed.resources.requests; - delete parsed.resources['requests']; + parsed.resources.requests = undefined; } // Migrate v2 to v3 @@ -38,7 +39,7 @@ export function migrateImport(contents: string) { if ('variables' in workspace) { // Create the base environment const baseEnvironment: Partial = { - id: `GENERATE_ID::base_env_${workspace['id']}`, + id: `GENERATE_ID::base_env_${workspace.id}`, name: 'Global Variables', variables: workspace.variables, workspaceId: workspace.id, @@ -47,7 +48,7 @@ export function migrateImport(contents: string) { parsed.resources.environments.push(baseEnvironment); // Delete variables key from the workspace - delete workspace.variables; + workspace.variables = undefined; // Add environmentId to relevant environments for (const environment of parsed.resources.environments) { @@ -62,7 +63,7 @@ export function migrateImport(contents: string) { for (const environment of parsed.resources.environments ?? []) { if ('environmentId' in environment) { environment.base = environment.environmentId == null; - delete environment.environmentId; + environment.environmentId = undefined; } } @@ -71,11 +72,11 @@ export function migrateImport(contents: string) { if ('base' in environment && environment.base && environment.parentModel == null) { environment.parentModel = 'workspace'; environment.parentId = null; - delete environment.base; + environment.base = undefined; } else if ('base' in environment && !environment.base && environment.parentModel == null) { environment.parentModel = 'environment'; environment.parentId = null; - delete environment.base; + environment.base = undefined; } } diff --git a/plugins/template-function-1password/package.json b/plugins/template-function-1password/package.json index 446b2ef9..cde328a3 100644 --- a/plugins/template-function-1password/package.json +++ b/plugins/template-function-1password/package.json @@ -8,8 +8,7 @@ "build": "run-p build:*", "build:1-build": "yaakcli build", "build:2-cpywasm": "cpx '../../node_modules/@1password/sdk-core/nodejs/core_bg.*' build/", - "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "@1password/sdk": "^0.4.0-beta.2" diff --git a/plugins/template-function-1password/src/index.ts b/plugins/template-function-1password/src/index.ts index 5e9d6e4b..dd495d8f 100644 --- a/plugins/template-function-1password/src/index.ts +++ b/plugins/template-function-1password/src/index.ts @@ -1,8 +1,8 @@ +import crypto from 'node:crypto'; import type { Client } from '@1password/sdk'; import { createClient } from '@1password/sdk'; -import type { CallTemplateFunctionArgs } from '@yaakapp-internal/plugins'; import type { PluginDefinition } from '@yaakapp/api'; -import crypto from 'crypto'; +import type { CallTemplateFunctionArgs } from '@yaakapp-internal/plugins'; const _clients: Record = {}; @@ -34,6 +34,7 @@ export const plugin: PluginDefinition = { type: 'text', label: '1Password Service Account Token', description: '', + // biome-ignore lint/suspicious/noTemplateCurlyInString: Yaak template syntax defaultValue: '${[ONEPASSWORD_TOKEN]}', password: true, }, @@ -69,7 +70,7 @@ export const plugin: PluginDefinition = { const items = await client.items.list(vaultId); return { options: items.map((item) => ({ - label: item.title + ' ' + item.category, + label: `${item.title} ${item.category}`, value: item.id, })), }; @@ -114,7 +115,7 @@ export const plugin: PluginDefinition = { const item = await client.items.get(vaultId, itemId); const field = item.fields.find((f) => f.id === fieldId); if (field == null) { - throw new Error('Field not found: ' + fieldId); + throw new Error(`Field not found: ${fieldId}`); } return field.value ?? ''; }, diff --git a/plugins/template-function-cookie/package.json b/plugins/template-function-cookie/package.json index 3b176368..55ff8303 100644 --- a/plugins/template-function-cookie/package.json +++ b/plugins/template-function-cookie/package.json @@ -6,7 +6,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/template-function-ctx/package.json b/plugins/template-function-ctx/package.json index f275ef97..424d99f3 100644 --- a/plugins/template-function-ctx/package.json +++ b/plugins/template-function-ctx/package.json @@ -6,7 +6,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/template-function-encode/package.json b/plugins/template-function-encode/package.json index f60e1d9c..33bd3c2c 100644 --- a/plugins/template-function-encode/package.json +++ b/plugins/template-function-encode/package.json @@ -6,7 +6,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/template-function-fs/package.json b/plugins/template-function-fs/package.json index 82a89ab8..00108f5e 100644 --- a/plugins/template-function-fs/package.json +++ b/plugins/template-function-fs/package.json @@ -6,7 +6,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/template-function-fs/src/index.ts b/plugins/template-function-fs/src/index.ts index 31e58900..c3ee7efb 100644 --- a/plugins/template-function-fs/src/index.ts +++ b/plugins/template-function-fs/src/index.ts @@ -1,5 +1,5 @@ -import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api'; import fs from 'node:fs'; +import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api'; const UTF8 = 'utf8'; const options = [ diff --git a/plugins/template-function-hash/package.json b/plugins/template-function-hash/package.json index 6a93f0c7..bfa96718 100755 --- a/plugins/template-function-hash/package.json +++ b/plugins/template-function-hash/package.json @@ -6,7 +6,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/template-function-hash/src/index.ts b/plugins/template-function-hash/src/index.ts index 120d8230..2cb19002 100755 --- a/plugins/template-function-hash/src/index.ts +++ b/plugins/template-function-hash/src/index.ts @@ -1,12 +1,12 @@ -import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api'; import { createHash, createHmac } from 'node:crypto'; +import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api'; const algorithms = ['md5', 'sha1', 'sha256', 'sha512'] as const; const encodings = ['base64', 'hex'] as const; type TemplateFunctionPlugin = NonNullable[number]; -const hashFunctions: TemplateFunctionPlugin[] = algorithms.map(algorithm => ({ +const hashFunctions: TemplateFunctionPlugin[] = algorithms.map((algorithm) => ({ name: `hash.${algorithm}`, description: 'Hash a value to its hexadecimal representation', args: [ @@ -22,7 +22,7 @@ const hashFunctions: TemplateFunctionPlugin[] = algorithms.map(algorithm => ({ name: 'encoding', label: 'Encoding', defaultValue: 'base64', - options: encodings.map(encoding => ({ + options: encodings.map((encoding) => ({ label: capitalize(encoding), value: encoding, })), @@ -30,15 +30,13 @@ const hashFunctions: TemplateFunctionPlugin[] = algorithms.map(algorithm => ({ ], async onRender(_ctx: Context, args: CallTemplateFunctionArgs): Promise { const input = String(args.values.input); - const encoding = String(args.values.encoding) as typeof encodings[number]; + const encoding = String(args.values.encoding) as (typeof encodings)[number]; - return createHash(algorithm) - .update(input, 'utf-8') - .digest(encoding); + return createHash(algorithm).update(input, 'utf-8').digest(encoding); }, })); -const hmacFunctions: TemplateFunctionPlugin[] = algorithms.map(algorithm => ({ +const hmacFunctions: TemplateFunctionPlugin[] = algorithms.map((algorithm) => ({ name: `hmac.${algorithm}`, description: 'Compute the HMAC of a value', args: [ @@ -60,7 +58,7 @@ const hmacFunctions: TemplateFunctionPlugin[] = algorithms.map(algorithm => ({ name: 'encoding', label: 'Encoding', defaultValue: 'base64', - options: encodings.map(encoding => ({ + options: encodings.map((encoding) => ({ value: encoding, label: capitalize(encoding), })), @@ -69,11 +67,9 @@ const hmacFunctions: TemplateFunctionPlugin[] = algorithms.map(algorithm => ({ async onRender(_ctx: Context, args: CallTemplateFunctionArgs): Promise { const input = String(args.values.input); const key = String(args.values.key); - const encoding = String(args.values.encoding) as typeof encodings[number]; + const encoding = String(args.values.encoding) as (typeof encodings)[number]; - return createHmac(algorithm, key, {}) - .update(input) - .digest(encoding); + return createHmac(algorithm, key, {}).update(input).digest(encoding); }, })); diff --git a/plugins/template-function-json/package.json b/plugins/template-function-json/package.json index 8f61a4cd..3cbecbfa 100755 --- a/plugins/template-function-json/package.json +++ b/plugins/template-function-json/package.json @@ -8,8 +8,7 @@ "types": "src/index.ts", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "jsonpath-plus": "^10.3.0" diff --git a/plugins/template-function-json/src/index.ts b/plugins/template-function-json/src/index.ts index 617ed90d..dc7c36a3 100755 --- a/plugins/template-function-json/src/index.ts +++ b/plugins/template-function-json/src/index.ts @@ -118,7 +118,7 @@ export function filterJSONPath( path: string, result: JSONPathResult, join: string | null, - formatted: boolean = false, + formatted = false, ): string { const parsed = JSON.parse(body); let items = JSONPath({ path, json: parsed }); @@ -138,13 +138,12 @@ export function filterJSONPath( return objToStr(items, formatted); } -function objToStr(o: unknown, formatted: boolean = false): string { +function objToStr(o: unknown, formatted = false): string { if ( Object.prototype.toString.call(o) === '[object Array]' || Object.prototype.toString.call(o) === '[object Object]' ) { return formatted ? JSON.stringify(o, null, 2) : JSON.stringify(o); - } else { - return String(o); } + return String(o); } diff --git a/plugins/template-function-prompt/package.json b/plugins/template-function-prompt/package.json index 5329ac50..a3b8d1f2 100644 --- a/plugins/template-function-prompt/package.json +++ b/plugins/template-function-prompt/package.json @@ -6,8 +6,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "slugify": "^1.6.6" diff --git a/plugins/template-function-prompt/src/index.ts b/plugins/template-function-prompt/src/index.ts index 2656aa54..1fcac361 100644 --- a/plugins/template-function-prompt/src/index.ts +++ b/plugins/template-function-prompt/src/index.ts @@ -39,6 +39,7 @@ export const plugin: PluginDefinition = { type: 'text', name: 'namespace', label: 'Namespace', + // biome-ignore lint/suspicious/noTemplateCurlyInString: Yaak template syntax defaultValue: '${[ctx.workspace()]}', optional: true, }, @@ -77,7 +78,7 @@ export const plugin: PluginDefinition = { async dynamic(_ctx, args) { const key = buildKey(args); return { - content: ['Value will be saved under: `' + key + '`'].join('\n\n'), + content: [`Value will be saved under: \`${key}\``].join('\n\n'), }; }, }, @@ -104,7 +105,7 @@ export const plugin: PluginDefinition = { if (args.purpose !== 'send') return null; if (args.values.store !== STORE_NONE && !args.values.namespace) { - throw new Error('Namespace is required when storing values') + throw new Error('Namespace is required when storing values'); } const existing = await maybeGetValue(ctx, args); @@ -155,7 +156,7 @@ async function maybeGetValue(ctx: Context, args: CallTemplateFunctionArgs) { return existing.value; } - const ttlSeconds = parseInt(String(args.values.ttl)) || 0; + const ttlSeconds = Number.parseInt(String(args.values.ttl), 10) || 0; const ageSeconds = (Date.now() - existing.createdAt) / 1000; if (ageSeconds > ttlSeconds) { ctx.store.delete(buildKey(args)).catch(console.error); diff --git a/plugins/template-function-random/package.json b/plugins/template-function-random/package.json index dcb5cd3a..7bb77092 100644 --- a/plugins/template-function-random/package.json +++ b/plugins/template-function-random/package.json @@ -6,7 +6,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/template-function-random/src/index.ts b/plugins/template-function-random/src/index.ts index 19043b50..a4591f7e 100644 --- a/plugins/template-function-random/src/index.ts +++ b/plugins/template-function-random/src/index.ts @@ -26,15 +26,15 @@ export const plugin: PluginDefinition = { }, ], async onRender(_ctx: Context, args: CallTemplateFunctionArgs): Promise { - const min = args.values.min ? parseInt(String(args.values.min ?? '0')) : 0; - const max = args.values.max ? parseInt(String(args.values.max ?? '1')) : 1; + const min = args.values.min ? Number.parseInt(String(args.values.min ?? '0'), 10) : 0; + const max = args.values.max ? Number.parseInt(String(args.values.max ?? '1'), 10) : 1; const decimals = args.values.decimals - ? parseInt(String(args.values.decimals ?? '0')) + ? Number.parseInt(String(args.values.decimals ?? '0'), 10) : null; let value = Math.random() * (max - min) + min; if (decimals !== null) { - value = Math.round(value * Math.pow(10, decimals)) / Math.pow(10, decimals); + value = Math.round(value * 10 ** decimals) / 10 ** decimals; } return String(value); }, diff --git a/plugins/template-function-regex/package.json b/plugins/template-function-regex/package.json index 64bb767d..99c95dd7 100644 --- a/plugins/template-function-regex/package.json +++ b/plugins/template-function-regex/package.json @@ -7,7 +7,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" } } diff --git a/plugins/template-function-regex/src/index.ts b/plugins/template-function-regex/src/index.ts index 905b5703..1b42d9c2 100644 --- a/plugins/template-function-regex/src/index.ts +++ b/plugins/template-function-regex/src/index.ts @@ -1,5 +1,5 @@ -import type { TemplateFunctionArg } from '@yaakapp-internal/plugins'; import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api'; +import type { TemplateFunctionArg } from '@yaakapp-internal/plugins'; const inputArg: TemplateFunctionArg = { type: 'text', diff --git a/plugins/template-function-regex/tests/regex.test.ts b/plugins/template-function-regex/tests/regex.test.ts index 34709e88..6368e53f 100644 --- a/plugins/template-function-regex/tests/regex.test.ts +++ b/plugins/template-function-regex/tests/regex.test.ts @@ -1,16 +1,16 @@ -import { describe, expect, it } from 'vitest'; import type { Context } from '@yaakapp/api'; +import { describe, expect, it } from 'vitest'; import { plugin } from '../src'; describe('regex.match', () => { - const matchFunction = plugin.templateFunctions!.find(f => f.name === 'regex.match'); + const matchFunction = plugin.templateFunctions?.find((f) => f.name === 'regex.match'); it('should exist', () => { expect(matchFunction).toBeDefined(); }); it('should extract first capture group', async () => { - const result = await matchFunction!.onRender({} as Context, { + const result = await matchFunction?.onRender({} as Context, { values: { regex: 'Hello (\\w+)', input: 'Hello World', @@ -21,7 +21,7 @@ describe('regex.match', () => { }); it('should extract named capture group', async () => { - const result = await matchFunction!.onRender({} as Context, { + const result = await matchFunction?.onRender({} as Context, { values: { regex: 'Hello (?\\w+)', input: 'Hello World', @@ -32,10 +32,10 @@ describe('regex.match', () => { }); it('should return full match when no capture groups', async () => { - const result = await matchFunction!.onRender({} as Context, { + const result = await matchFunction?.onRender({} as Context, { values: { regex: 'Hello \\w+', - input: 'Hello World' + input: 'Hello World', }, purpose: 'send', }); @@ -43,10 +43,10 @@ describe('regex.match', () => { }); it('should return empty string when no match', async () => { - const result = await matchFunction!.onRender({} as Context, { + const result = await matchFunction?.onRender({} as Context, { values: { regex: 'Goodbye', - input: 'Hello World' + input: 'Hello World', }, purpose: 'send', }); @@ -54,10 +54,10 @@ describe('regex.match', () => { }); it('should return empty string when regex is empty', async () => { - const result = await matchFunction!.onRender({} as Context, { + const result = await matchFunction?.onRender({} as Context, { values: { regex: '', - input: 'Hello World' + input: 'Hello World', }, purpose: 'send', }); @@ -65,10 +65,10 @@ describe('regex.match', () => { }); it('should return empty string when input is empty', async () => { - const result = await matchFunction!.onRender({} as Context, { + const result = await matchFunction?.onRender({} as Context, { values: { regex: 'Hello', - input: '' + input: '', }, purpose: 'send', }); @@ -77,18 +77,18 @@ describe('regex.match', () => { }); describe('regex.replace', () => { - const replaceFunction = plugin.templateFunctions!.find(f => f.name === 'regex.replace'); + const replaceFunction = plugin.templateFunctions?.find((f) => f.name === 'regex.replace'); it('should exist', () => { expect(replaceFunction).toBeDefined(); }); it('should replace one occurrence by default', async () => { - const result = await replaceFunction!.onRender({} as Context, { + const result = await replaceFunction?.onRender({} as Context, { values: { regex: 'o', input: 'Hello World', - replacement: 'a' + replacement: 'a', }, purpose: 'send', }); @@ -96,11 +96,11 @@ describe('regex.replace', () => { }); it('should replace with capture groups', async () => { - const result = await replaceFunction!.onRender({} as Context, { + const result = await replaceFunction?.onRender({} as Context, { values: { regex: '(\\w+) (\\w+)', input: 'Hello World', - replacement: '$2 $1' + replacement: '$2 $1', }, purpose: 'send', }); @@ -108,11 +108,11 @@ describe('regex.replace', () => { }); it('should replace with full match reference', async () => { - const result = await replaceFunction!.onRender({} as Context, { + const result = await replaceFunction?.onRender({} as Context, { values: { regex: 'World', input: 'Hello World', - replacement: '[$&]' + replacement: '[$&]', }, purpose: 'send', }); @@ -120,12 +120,12 @@ describe('regex.replace', () => { }); it('should respect flags parameter', async () => { - const result = await replaceFunction!.onRender({} as Context, { + const result = await replaceFunction?.onRender({} as Context, { values: { regex: 'hello', input: 'Hello World', replacement: 'Hi', - flags: 'i' + flags: 'i', }, purpose: 'send', }); @@ -133,11 +133,11 @@ describe('regex.replace', () => { }); it('should handle empty replacement', async () => { - const result = await replaceFunction!.onRender({} as Context, { + const result = await replaceFunction?.onRender({} as Context, { values: { regex: 'World', input: 'Hello World', - replacement: '' + replacement: '', }, purpose: 'send', }); @@ -145,11 +145,11 @@ describe('regex.replace', () => { }); it('should return original input when no match', async () => { - const result = await replaceFunction!.onRender({} as Context, { + const result = await replaceFunction?.onRender({} as Context, { values: { regex: 'Goodbye', input: 'Hello World', - replacement: 'Hi' + replacement: 'Hi', }, purpose: 'send', }); @@ -157,11 +157,11 @@ describe('regex.replace', () => { }); it('should return empty string when regex is empty', async () => { - const result = await replaceFunction!.onRender({} as Context, { + const result = await replaceFunction?.onRender({} as Context, { values: { regex: '', input: 'Hello World', - replacement: 'Hi' + replacement: 'Hi', }, purpose: 'send', }); @@ -169,11 +169,11 @@ describe('regex.replace', () => { }); it('should return empty string when input is empty', async () => { - const result = await replaceFunction!.onRender({} as Context, { + const result = await replaceFunction?.onRender({} as Context, { values: { regex: 'Hello', input: '', - replacement: 'Hi' + replacement: 'Hi', }, purpose: 'send', }); @@ -181,14 +181,16 @@ describe('regex.replace', () => { }); it('should throw on invalid regex', async () => { - const fn = replaceFunction!.onRender({} as Context, { + const fn = replaceFunction?.onRender({} as Context, { values: { regex: '[', input: 'Hello World', - replacement: 'Hi' + replacement: 'Hi', }, purpose: 'send', }); - await expect(fn).rejects.toThrow('Invalid regular expression: /[/: Unterminated character class'); + await expect(fn).rejects.toThrow( + 'Invalid regular expression: /[/: Unterminated character class', + ); }); }); diff --git a/plugins/template-function-request/package.json b/plugins/template-function-request/package.json index e11e9c13..c205bc69 100755 --- a/plugins/template-function-request/package.json +++ b/plugins/template-function-request/package.json @@ -6,7 +6,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/plugins/template-function-request/src/index.ts b/plugins/template-function-request/src/index.ts index 24a16913..94b1b998 100755 --- a/plugins/template-function-request/src/index.ts +++ b/plugins/template-function-request/src/index.ts @@ -1,6 +1,6 @@ +import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api'; import type { AnyModel, HttpUrlParameter } from '@yaakapp-internal/models'; import type { GenericCompletionOption } from '@yaakapp-internal/plugins'; -import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api'; export const plugin: PluginDefinition = { templateFunctions: [ @@ -43,7 +43,7 @@ export const plugin: PluginDefinition = { const request = await ctx.httpRequest.getById({ id: args.values.requestId }); if (request == null) return null; - const validHeaders = request.headers.filter(h => h.enabled !== false && h.name); + const validHeaders = request.headers.filter((h) => h.enabled !== false && h.name); return { placeholder: validHeaders[0]?.name, completionOptions: validHeaders.map((h) => ({ diff --git a/plugins/template-function-response/package.json b/plugins/template-function-response/package.json index 0b92c0b0..b29948a7 100644 --- a/plugins/template-function-response/package.json +++ b/plugins/template-function-response/package.json @@ -6,8 +6,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "@yaak/template-function-xml": "*" diff --git a/plugins/template-function-response/src/index.ts b/plugins/template-function-response/src/index.ts index 054c93b6..4b19f600 100644 --- a/plugins/template-function-response/src/index.ts +++ b/plugins/template-function-response/src/index.ts @@ -1,8 +1,4 @@ -import type { GenericCompletionOption } from '@yaakapp-internal/plugins'; -import type { JSONPathResult } from '../../template-function-json'; -import { filterJSONPath } from '../../template-function-json'; -import type { XPathResult } from '../../template-function-xml'; -import { filterXPath } from '../../template-function-xml'; +import { readFileSync } from 'node:fs'; import type { CallTemplateFunctionArgs, Context, @@ -12,7 +8,11 @@ import type { PluginDefinition, RenderPurpose, } from '@yaakapp/api'; -import { readFileSync } from 'node:fs'; +import type { GenericCompletionOption } from '@yaakapp-internal/plugins'; +import type { JSONPathResult } from '../../template-function-json'; +import { filterJSONPath } from '../../template-function-json'; +import type { XPathResult } from '../../template-function-xml'; +import { filterXPath } from '../../template-function-xml'; const BEHAVIOR_TTL = 'ttl'; const BEHAVIOR_ALWAYS = 'always'; @@ -162,13 +162,13 @@ export const plugin: PluginDefinition = { placeholder: '/books[0]/id', description: 'Enter an XPath expression used to filter the results', }; - } else { - return { - label: 'JSONPath', - placeholder: '$.books[0].id', - description: 'Enter a JSONPath expression used to filter the results', - }; } + + return { + label: 'JSONPath', + placeholder: '$.books[0].id', + description: 'Enter a JSONPath expression used to filter the results', + }; }, }, ], @@ -187,7 +187,7 @@ export const plugin: PluginDefinition = { return null; } - let body; + let body: string; try { body = readFileSync(response.bodyPath, 'utf-8'); } catch { @@ -251,7 +251,7 @@ export const plugin: PluginDefinition = { return null; } - let body; + let body: string; try { body = readFileSync(response.bodyPath, 'utf-8'); } catch { @@ -313,9 +313,9 @@ async function getResponse( function shouldSendExpired(response: HttpResponse | null, ttl: string | null): boolean { if (response == null) return true; - const ttlSeconds = parseInt(ttl || '0') || 0; + const ttlSeconds = Number.parseInt(ttl || '0', 10) || 0; if (ttlSeconds === 0) return false; const nowMillis = Date.now(); - const respMillis = new Date(response.createdAt + 'Z').getTime(); + const respMillis = new Date(`${response.createdAt}Z`).getTime(); return respMillis + ttlSeconds * 1000 < nowMillis; } diff --git a/plugins/template-function-timestamp/package.json b/plugins/template-function-timestamp/package.json index fb3e4f2f..bafcd111 100755 --- a/plugins/template-function-timestamp/package.json +++ b/plugins/template-function-timestamp/package.json @@ -5,7 +5,6 @@ "scripts": { "build": "yaakcli build", "dev": "yaakcli dev", - "lint": "tsc --noEmit && eslint . --ext .ts,.tsx", "test": "vitest --run tests" }, "dependencies": { diff --git a/plugins/template-function-timestamp/src/index.ts b/plugins/template-function-timestamp/src/index.ts index b5f30b4b..3f6cffb6 100755 --- a/plugins/template-function-timestamp/src/index.ts +++ b/plugins/template-function-timestamp/src/index.ts @@ -1,5 +1,5 @@ -import type { TemplateFunctionArg } from '@yaakapp-internal/plugins'; import type { PluginDefinition } from '@yaakapp/api'; +import type { TemplateFunctionArg } from '@yaakapp-internal/plugins'; import type { ContextFn } from 'date-fns'; import { diff --git a/plugins/template-function-timestamp/tests/formatDatetime.test.ts b/plugins/template-function-timestamp/tests/formatDatetime.test.ts index b53b560c..55cc124c 100644 --- a/plugins/template-function-timestamp/tests/formatDatetime.test.ts +++ b/plugins/template-function-timestamp/tests/formatDatetime.test.ts @@ -1,6 +1,6 @@ +import { tz } from '@date-fns/tz'; import { describe, expect, it } from 'vitest'; import { calculateDatetime, formatDatetime } from '../src'; -import { tz } from "@date-fns/tz"; describe('formatDatetime', () => { it('returns formatted current date', () => { diff --git a/plugins/template-function-uuid/package.json b/plugins/template-function-uuid/package.json index 5a490255..1a1656d5 100644 --- a/plugins/template-function-uuid/package.json +++ b/plugins/template-function-uuid/package.json @@ -6,8 +6,7 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "uuid": "^11.1.0" diff --git a/plugins/template-function-xml/package.json b/plugins/template-function-xml/package.json index 8c22512c..b819a793 100755 --- a/plugins/template-function-xml/package.json +++ b/plugins/template-function-xml/package.json @@ -8,8 +8,7 @@ "types": "src/index.ts", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" }, "dependencies": { "@xmldom/xmldom": "^0.9.8", diff --git a/plugins/template-function-xml/src/index.ts b/plugins/template-function-xml/src/index.ts index 00288995..9c62ce53 100755 --- a/plugins/template-function-xml/src/index.ts +++ b/plugins/template-function-xml/src/index.ts @@ -67,18 +67,19 @@ export function filterXPath( result: XPathResult, join: string | null, ): string { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: none const doc: any = new DOMParser().parseFromString(body, 'text/xml'); const items = xpath.select(path, doc, false); if (!Array.isArray(items)) { return String(items); - } else if (!Array.isArray(items) || result === 'first') { - return items[0] != null ? String(items[0].firstChild ?? '') : ''; - } else if (result === 'join') { - return items.map((item) => String(item.firstChild ?? '')).join(join ?? ''); - } else { - // Not sure what cases this happens in (?) - return String(items); } + if (!Array.isArray(items) || result === 'first') { + return items[0] != null ? String(items[0].firstChild ?? '') : ''; + } + if (result === 'join') { + return items.map((item) => String(item.firstChild ?? '')).join(join ?? ''); + } + // Not sure what cases this happens in (?) + return String(items); } diff --git a/plugins/themes-yaak/package.json b/plugins/themes-yaak/package.json index 9eece24d..c1ef7fbc 100644 --- a/plugins/themes-yaak/package.json +++ b/plugins/themes-yaak/package.json @@ -6,7 +6,6 @@ "version": "0.1.0", "scripts": { "build": "yaakcli build", - "dev": "yaakcli dev", - "lint":"tsc --noEmit && eslint . --ext .ts,.tsx" + "dev": "yaakcli dev" } } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 87b9f253..ba9412d0 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -30,46 +30,5 @@ ] } } - }, - "bundle": { - "publisher": "Yaak", - "license": "MIT", - "copyright": "Yaak", - "homepage": "https://yaak.app", - "active": true, - "category": "DeveloperTool", - "externalBin": [ - "vendored/node/yaaknode", - "vendored/protoc/yaakprotoc" - ], - "icon": [ - "icons/release/32x32.png", - "icons/release/128x128.png", - "icons/release/128x128@2x.png", - "icons/release/icon.icns", - "icons/release/icon.ico" - ], - "longDescription": "A cross-platform desktop app for interacting with REST, GraphQL, and gRPC", - "resources": [ - "static", - "vendored/protoc/include", - "vendored/plugins", - "vendored/plugin-runtime" - ], - "shortDescription": "Play with APIs, intuitively", - "targets": [ - "app", - "appimage", - "deb", - "dmg", - "nsis", - "rpm" - ], - "macOS": { - "minimumSystemVersion": "13.0", - "exceptionDomain": "", - "entitlements": "macos/entitlements.plist", - "frameworks": [] - } } } diff --git a/src-tauri/tauri.development.conf.json b/src-tauri/tauri.development.conf.json index 2ad1fa5e..0c2b993d 100644 --- a/src-tauri/tauri.development.conf.json +++ b/src-tauri/tauri.development.conf.json @@ -2,6 +2,16 @@ "productName": "Daak", "identifier": "app.yaak.desktop.dev", "bundle": { + "externalBin": [ + "vendored/node/yaaknode", + "vendored/protoc/yaakprotoc" + ], + "resources": [ + "static", + "vendored/protoc/include", + "vendored/plugins", + "vendored/plugin-runtime" + ], "icon": [ "icons/dev/32x32.png", "icons/dev/128x128.png", diff --git a/src-tauri/tauri.linux.conf.json b/src-tauri/tauri.linux.conf.json index 36fb002c..24268fdc 100644 --- a/src-tauri/tauri.linux.conf.json +++ b/src-tauri/tauri.linux.conf.json @@ -1,13 +1,3 @@ { - "productName": "yaak", - "bundle": { - "linux": { - "deb": { - "desktopTemplate": "./template.desktop" - }, - "rpm": { - "desktopTemplate": "./template.desktop" - } - } - } + "productName": "yaak" } diff --git a/src-tauri/tauri.release.conf.json b/src-tauri/tauri.release.conf.json index a56a9cb1..b328af2c 100644 --- a/src-tauri/tauri.release.conf.json +++ b/src-tauri/tauri.release.conf.json @@ -30,9 +30,55 @@ } }, "bundle": { - "createUpdaterArtifacts": true, + "publisher": "Yaak", + "license": "MIT", + "copyright": "Yaak", + "homepage": "https://yaak.app", + "active": true, + "category": "DeveloperTool", + "externalBin": [ + "vendored/node/yaaknode", + "vendored/protoc/yaakprotoc" + ], + "icon": [ + "icons/release/32x32.png", + "icons/release/128x128.png", + "icons/release/128x128@2x.png", + "icons/release/icon.icns", + "icons/release/icon.ico" + ], + "longDescription": "A cross-platform desktop app for interacting with REST, GraphQL, and gRPC", + "resources": [ + "static", + "vendored/protoc/include", + "vendored/plugins", + "vendored/plugin-runtime" + ], + "shortDescription": "Play with APIs, intuitively", + "targets": [ + "app", + "appimage", + "deb", + "dmg", + "nsis", + "rpm" + ], + "macOS": { + "minimumSystemVersion": "13.0", + "exceptionDomain": "", + "entitlements": "macos/entitlements.plist", + "frameworks": [] + }, "windows": { "signCommand": "trusted-signing-cli -e https://eus.codesigning.azure.net/ -a Yaak -c yaakapp %1" + }, + "linux": { + "deb": { + "desktopTemplate": "./template.desktop" + }, + "rpm": { + "desktopTemplate": "./template.desktop" + } } } } diff --git a/src-tauri/yaak-models/bindings/gen_util.ts b/src-tauri/yaak-models/bindings/gen_util.ts index f87c220c..f1bf4fa2 100644 --- a/src-tauri/yaak-models/bindings/gen_util.ts +++ b/src-tauri/yaak-models/bindings/gen_util.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Environment, Folder, GrpcRequest, HttpRequest, WebsocketRequest, Workspace } from "./gen_models.js"; +import type { Environment, Folder, GrpcRequest, HttpRequest, WebsocketRequest, Workspace } from "./gen_models"; export type BatchUpsertResult = { workspaces: Array, environments: Array, folders: Array, httpRequests: Array, grpcRequests: Array, websocketRequests: Array, }; diff --git a/src-tauri/yaak-plugins/Cargo.toml b/src-tauri/yaak-plugins/Cargo.toml index fa2d259a..b46a0e32 100644 --- a/src-tauri/yaak-plugins/Cargo.toml +++ b/src-tauri/yaak-plugins/Cargo.toml @@ -26,7 +26,7 @@ tauri-plugin-shell = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "process"] } tokio-tungstenite = "0.26.1" -ts-rs = { workspace = true, features = ["import-esm"] } +ts-rs = { workspace = true } yaak-common = { workspace = true } yaak-crypto = { workspace = true } yaak-models = { workspace = true } diff --git a/src-tauri/yaak-plugins/bindings/gen_api.ts b/src-tauri/yaak-plugins/bindings/gen_api.ts index d8c88183..9dcbb820 100644 --- a/src-tauri/yaak-plugins/bindings/gen_api.ts +++ b/src-tauri/yaak-plugins/bindings/gen_api.ts @@ -1,5 +1,5 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { PluginVersion } from "./gen_search.js"; +import type { PluginVersion } from "./gen_search"; export type PluginNameVersion = { name: string, version: string, }; diff --git a/src-tauri/yaak-plugins/bindings/gen_events.ts b/src-tauri/yaak-plugins/bindings/gen_events.ts index 1f91180d..9aeb7b68 100644 --- a/src-tauri/yaak-plugins/bindings/gen_events.ts +++ b/src-tauri/yaak-plugins/bindings/gen_events.ts @@ -1,6 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Environment, Folder, GrpcRequest, HttpRequest, HttpResponse, WebsocketRequest, Workspace } from "./gen_models.js"; -import type { JsonValue } from "./serde_json/JsonValue.js"; +import type { Environment, Folder, GrpcRequest, HttpRequest, HttpResponse, WebsocketRequest, Workspace } from "./gen_models"; +import type { JsonValue } from "./serde_json/JsonValue"; export type BootRequest = { dir: string, watch: boolean, }; diff --git a/src-tauri/yaak-sync/bindings/gen_sync.ts b/src-tauri/yaak-sync/bindings/gen_sync.ts index 1142ab51..49b168b5 100644 --- a/src-tauri/yaak-sync/bindings/gen_sync.ts +++ b/src-tauri/yaak-sync/bindings/gen_sync.ts @@ -1,5 +1,5 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { SyncModel, SyncState } from "./gen_models.js"; +import type { SyncModel, SyncState } from "./gen_models"; export type FsCandidate = { "type": "FsCandidate", model: SyncModel, relPath: string, checksum: string, }; diff --git a/src-tauri/yaak-templates/package.json b/src-tauri/yaak-templates/package.json index ff45aa3a..72f4b99a 100644 --- a/src-tauri/yaak-templates/package.json +++ b/src-tauri/yaak-templates/package.json @@ -5,9 +5,12 @@ "main": "index.ts", "scripts": { "bootstrap": "npm run build", - "build": "wasm-pack build --target bundler" + "build": "run-s build:*", + "build:pack": "wasm-pack build --target bundler", + "build:clean": "rimraf ./pkg/.gitignore" }, "devDependencies": { - "wasm-pack": "^0.13.1" + "wasm-pack": "^0.13.1", + "rimraf": "^6.1.2" } } diff --git a/src-tauri/yaak-templates/pkg/package.json b/src-tauri/yaak-templates/pkg/package.json new file mode 100644 index 00000000..0d1cde8b --- /dev/null +++ b/src-tauri/yaak-templates/pkg/package.json @@ -0,0 +1,17 @@ +{ + "name": "yaak-templates", + "type": "module", + "version": "0.1.0", + "files": [ + "yaak_templates_bg.wasm", + "yaak_templates.js", + "yaak_templates_bg.js", + "yaak_templates.d.ts" + ], + "main": "yaak_templates.js", + "types": "yaak_templates.d.ts", + "sideEffects": [ + "./yaak_templates.js", + "./snippets/*" + ] +} \ No newline at end of file diff --git a/src-tauri/yaak-templates/pkg/yaak_templates.d.ts b/src-tauri/yaak-templates/pkg/yaak_templates.d.ts new file mode 100644 index 00000000..aed6c395 --- /dev/null +++ b/src-tauri/yaak-templates/pkg/yaak_templates.d.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export function unescape_template(template: string): any; +export function parse_template(template: string): any; +export function escape_template(template: string): any; diff --git a/src-tauri/yaak-templates/pkg/yaak_templates.js b/src-tauri/yaak-templates/pkg/yaak_templates.js new file mode 100644 index 00000000..7ca3c562 --- /dev/null +++ b/src-tauri/yaak-templates/pkg/yaak_templates.js @@ -0,0 +1,4 @@ +import * as wasm from "./yaak_templates_bg.wasm"; +export * from "./yaak_templates_bg.js"; +import { __wbg_set_wasm } from "./yaak_templates_bg.js"; +__wbg_set_wasm(wasm); \ No newline at end of file diff --git a/src-tauri/yaak-templates/pkg/yaak_templates_bg.js b/src-tauri/yaak-templates/pkg/yaak_templates_bg.js new file mode 100644 index 00000000..98b3c8f5 --- /dev/null +++ b/src-tauri/yaak-templates/pkg/yaak_templates_bg.js @@ -0,0 +1,296 @@ +let wasm; +export function __wbg_set_wasm(val) { + wasm = val; +} + + +const heap = new Array(128).fill(undefined); + +heap.push(undefined, null, true, false); + +let heap_next = heap.length; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +function getObject(idx) { return heap[idx]; } + +function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +function debugString(val) { + // primitive types + const type = typeof val; + if (type == 'number' || type == 'boolean' || val == null) { + return `${val}`; + } + if (type == 'string') { + return `"${val}"`; + } + if (type == 'symbol') { + const description = val.description; + if (description == null) { + return 'Symbol'; + } else { + return `Symbol(${description})`; + } + } + if (type == 'function') { + const name = val.name; + if (typeof name == 'string' && name.length > 0) { + return `Function(${name})`; + } else { + return 'Function'; + } + } + // objects + if (Array.isArray(val)) { + const length = val.length; + let debug = '['; + if (length > 0) { + debug += debugString(val[0]); + } + for(let i = 1; i < length; i++) { + debug += ', ' + debugString(val[i]); + } + debug += ']'; + return debug; + } + // Test for built-in + const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); + let className; + if (builtInMatches && builtInMatches.length > 1) { + className = builtInMatches[1]; + } else { + // Failed to match the standard '[object ClassName]' + return toString.call(val); + } + if (className == 'Object') { + // we're a user defined class or Object + // JSON.stringify avoids problems with cycles, and is generally much + // easier than looping through ownProperties of `val`. + try { + return 'Object(' + JSON.stringify(val) + ')'; + } catch (_) { + return 'Object'; + } + } + // errors + if (val instanceof Error) { + return `${val.name}: ${val.message}\n${val.stack}`; + } + // TODO we could test for more things here, like `Set`s and `Map`s. + return className; +} + +let WASM_VECTOR_LEN = 0; + +let cachedUint8ArrayMemory0 = null; + +function getUint8ArrayMemory0() { + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; +} + +const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder; + +let cachedTextEncoder = new lTextEncoder('utf-8'); + +const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' + ? function (arg, view) { + return cachedTextEncoder.encodeInto(arg, view); +} + : function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length + }; +}); + +function passStringToWasm0(arg, malloc, realloc) { + + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + + const mem = getUint8ArrayMemory0(); + + let offset = 0; + + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 0x7F) break; + mem[ptr + offset] = code; + } + + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; + const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + + offset += ret.written; + ptr = realloc(ptr, len, offset, 1) >>> 0; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +let cachedDataViewMemory0 = null; + +function getDataViewMemory0() { + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); + } + return cachedDataViewMemory0; +} + +const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; + +let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); + +cachedTextDecoder.decode(); + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); +} +/** + * @param {string} template + * @returns {any} + */ +export function unescape_template(template) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(template, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.unescape_template(retptr, ptr0, len0); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return takeObject(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +/** + * @param {string} template + * @returns {any} + */ +export function parse_template(template) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(template, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.parse_template(retptr, ptr0, len0); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return takeObject(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +/** + * @param {string} template + * @returns {any} + */ +export function escape_template(template) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(template, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len0 = WASM_VECTOR_LEN; + wasm.escape_template(retptr, ptr0, len0); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return takeObject(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +export function __wbg_new_405e22f390576ce2() { + const ret = new Object(); + return addHeapObject(ret); +}; + +export function __wbg_new_78feb108b6472713() { + const ret = new Array(); + return addHeapObject(ret); +}; + +export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) { + getObject(arg0)[arg1 >>> 0] = takeObject(arg2); +}; + +export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) { + getObject(arg0)[takeObject(arg1)] = takeObject(arg2); +}; + +export function __wbindgen_debug_string(arg0, arg1) { + const ret = debugString(getObject(arg1)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); +}; + +export function __wbindgen_object_clone_ref(arg0) { + const ret = getObject(arg0); + return addHeapObject(ret); +}; + +export function __wbindgen_object_drop_ref(arg0) { + takeObject(arg0); +}; + +export function __wbindgen_string_new(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); +}; + +export function __wbindgen_throw(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); +}; + diff --git a/src-tauri/yaak-templates/pkg/yaak_templates_bg.wasm b/src-tauri/yaak-templates/pkg/yaak_templates_bg.wasm new file mode 100644 index 0000000000000000000000000000000000000000..dceb16999aeedecf064a42a94887d72b1c76f1b0 GIT binary patch literal 54673 zcmd_T3z(gEUGMwe)_u*)nq-np?(bS1+N8~8l1yeMp}@R>rVVYOB2;vv=_FZcGn33c zX$pm;Hq>lItXSO@s-|p&3RDWBR;U==-P&i%arZfba`xfbrrLe%+45*P4?gxlw>h8h z@BhAQ*5p!JEN-`Fl9~0s|NH-U|NZ`#<&DlB@jcJ;ANH5t=6Sby{)yZC6CS@j1Sfdn z50BvqJ?k$o5g)wS2d_E3^6oxK$Xfy_=>thcm!x9l>@ltLzV!3G>F3@0j80f`biz`j z6G{x83`dK zGm}$$XPO7S;4*bqUR-DY;mL`nRSGXtX-Qk9*}0iR6Swc3Xx{1NE>qmbb^G4g=G@+G z2e%yP-?w9Upm|{H(AMSwFaOeYXm;<=@WJN3E&ap$1_y?=4sF@y`QN?HK>zmU)~yG( z?dab=G`PRH^}E%vu?-Dx8|vS>?clZpLj(QI;meM#);9gQJ7y;D^rFj*Xjxmy1I>L$ z0fK?ci^5O)pY)@!vmABhbNPHJA9V!9d?8mT zE(-ENL@z-Q6bqCp(T!ToN1-Yyi)K_i@N=H;dr{7x@^|jcg}&FFFToed$&+WjO5uLL zkU!EqGC6Zs;B_@;_m56BTU6=o>YN&#nQcqBuKVc3g@xX@xD7_l<5QC}b9?)}@k^v` z@g~={l^s2BVDH={03F>wzIST!(8OGG#(T&wy~Fnszp~?g|0n(1f62f5XZ`oRbK~28 z+5aj3j+6eKZs3N-}ejtzxVIDe%r{W{Gaeo z`ycb)@9*7w>m&Zp`2Wsdb=xQW@<04v!6*HnxiYAo2;X;wmptZ=H-bJd_SXe{^)T`3 zQ5+=RU~s=52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6~q&_A$+*xa^(fr0G<%h1-LZ9@Y?+lK~+hK7cRb`19q zZyDY?ylr@3c>D0+@X+w^@Qxh}aR=SA7D7WiD70h8hVr^~<@K^v^^@5@Lp;l$*un44 z_`UIajfMUv{$U*d#Gj0rFa3#Ov*0Jv&%z!vhQsy2slbJrkq5*wQyfnoor`f^Tn?6P zY^yX%I?SpP9`{o#YThE6`!9Sp_;e+S2c#`jSJupj$nsr%*ShtDb2Eo?L_bur7jFY~ z6jR#8r|kD^e2*`$nKb$XM9iK=C;cN!&u&|~_T=zy^?BEM8_wOF>yO{!4V-)1*_+S3 zYD{>~fk`SA6-{f~H~$w$09MnAG+?BS1$9Qpl^yzmnb|I(j*;P-#!`Oo-guK4We znHN8oJnTJj&quwlJp9p*|JgJD-usJt9=ZQ7M?dxSv!lO$?ysNub?pN3AcGbD^|JZO_rOm5nafU47fw!>gx`JhS@b#4~H2|8jlp+5dfX?VtSl!)r&L8I7O+ z%ZKCVpM56&qvz`N>2Ew-_r6(gJpY~1E57}m&t2g#my*T4Nj#R>o#wkh4+^LlCgsbx zf~0ufH&!`+q`KPC%G;U;-$>jU2U*KVxaX4uukIuW!H<`G`3o$nD&%p=AIrEp(h948 zh5wMhcJJOh(^bX2qX!P`otxYXS?wR+i@UFIjdw$7YG(4l(fzEe`c)p~Pd5*2+;>-y kzmowRoz1ftxoy+7YJ0?eak@YmuiJ_gZ0_H>Z(#lZ2V3S{egFUf literal 0 HcmV?d00001 diff --git a/src-tauri/yaak-templates/pkg/yaak_templates_bg.wasm.d.ts b/src-tauri/yaak-templates/pkg/yaak_templates_bg.wasm.d.ts new file mode 100644 index 00000000..55be67ff --- /dev/null +++ b/src-tauri/yaak-templates/pkg/yaak_templates_bg.wasm.d.ts @@ -0,0 +1,9 @@ +/* tslint:disable */ +/* eslint-disable */ +export const memory: WebAssembly.Memory; +export const escape_template: (a: number, b: number, c: number) => void; +export const parse_template: (a: number, b: number, c: number) => void; +export const unescape_template: (a: number, b: number, c: number) => void; +export const __wbindgen_export_0: (a: number, b: number) => number; +export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number; +export const __wbindgen_add_to_stack_pointer: (a: number) => number; diff --git a/src-tauri/yaak-templates/src/parser.rs b/src-tauri/yaak-templates/src/parser.rs index f1d3e6e2..745c149a 100644 --- a/src-tauri/yaak-templates/src/parser.rs +++ b/src-tauri/yaak-templates/src/parser.rs @@ -578,13 +578,13 @@ mod tests { #[test] fn var_prefixes() -> Result<()> { - let mut p = Parser::new("${[ -a ]}${[ 0a ]}"); + let mut p = Parser::new("${[ -a ]}${[ $a ]}"); assert_eq!( p.parse()?.tokens, vec![ Token::Raw { // Shouldn't be parsed, because they're invalid - text: "${[ -a ]}${[ 0a ]}".into() + text: "${[ -a ]}${[ $a ]}".into() }, Token::Eof ] diff --git a/src-web/commands/commands.tsx b/src-web/commands/commands.tsx index f39b48a3..c75d383a 100644 --- a/src-web/commands/commands.tsx +++ b/src-web/commands/commands.tsx @@ -120,6 +120,7 @@ export const syncWorkspace = createFastMutation< } return ( + // biome-ignore lint/suspicious/noArrayIndexKey: none {name} diff --git a/src-web/commands/createEnvironment.tsx b/src-web/commands/createEnvironment.tsx index 9b2a78aa..1dcc5675 100644 --- a/src-web/commands/createEnvironment.tsx +++ b/src-web/commands/createEnvironment.tsx @@ -1,4 +1,4 @@ -import { type Environment } from '@yaakapp-internal/models'; +import type { Environment } from '@yaakapp-internal/models'; import { CreateEnvironmentDialog } from '../components/CreateEnvironmentDialog'; import { activeWorkspaceIdAtom } from '../hooks/useActiveWorkspace'; import { createFastMutation } from '../hooks/useFastMutation'; diff --git a/src-web/commands/deleteWebsocketConnections.ts b/src-web/commands/deleteWebsocketConnections.ts index ce9c150e..9d54bbaa 100644 --- a/src-web/commands/deleteWebsocketConnections.ts +++ b/src-web/commands/deleteWebsocketConnections.ts @@ -4,7 +4,5 @@ import { createFastMutation } from '../hooks/useFastMutation'; export const deleteWebsocketConnections = createFastMutation({ mutationKey: ['delete_websocket_connections'], - mutationFn: async function (request: WebsocketRequest) { - return cmdDeleteWebsocketConnections(request.id); - }, + mutationFn: async (request: WebsocketRequest) => cmdDeleteWebsocketConnections(request.id), }); diff --git a/src-web/commands/moveToWorkspace.tsx b/src-web/commands/moveToWorkspace.tsx index 61f597ab..a3839b93 100644 --- a/src-web/commands/moveToWorkspace.tsx +++ b/src-web/commands/moveToWorkspace.tsx @@ -1,5 +1,5 @@ import type { GrpcRequest, HttpRequest, WebsocketRequest } from '@yaakapp-internal/models'; -import React from 'react'; + import { MoveToWorkspaceDialog } from '../components/MoveToWorkspaceDialog'; import { activeWorkspaceIdAtom } from '../hooks/useActiveWorkspace'; import { createFastMutation } from '../hooks/useFastMutation'; diff --git a/src-web/commands/openSettings.tsx b/src-web/commands/openSettings.tsx index 39bfc16e..2ab8ccd8 100644 --- a/src-web/commands/openSettings.tsx +++ b/src-web/commands/openSettings.tsx @@ -7,7 +7,7 @@ import { invokeCmd } from '../lib/tauri'; export const openSettings = createFastMutation({ mutationKey: ['open_settings'], - mutationFn: async function (tab) { + mutationFn: async (tab) => { const workspaceId = jotaiStore.get(activeWorkspaceIdAtom); if (workspaceId == null) return; diff --git a/src-web/commands/openWorkspaceSettings.tsx b/src-web/commands/openWorkspaceSettings.tsx index 1c9c4f7e..2ad53fbe 100644 --- a/src-web/commands/openWorkspaceSettings.tsx +++ b/src-web/commands/openWorkspaceSettings.tsx @@ -1,8 +1,5 @@ -import type { - WorkspaceSettingsTab} from '../components/WorkspaceSettingsDialog'; -import { - WorkspaceSettingsDialog -} from '../components/WorkspaceSettingsDialog'; +import type { WorkspaceSettingsTab } from '../components/WorkspaceSettingsDialog'; +import { WorkspaceSettingsDialog } from '../components/WorkspaceSettingsDialog'; import { activeWorkspaceIdAtom } from '../hooks/useActiveWorkspace'; import { showDialog } from '../lib/dialog'; import { jotaiStore } from '../lib/jotai'; diff --git a/src-web/components/BinaryFileEditor.tsx b/src-web/components/BinaryFileEditor.tsx index 52bf616b..87676dda 100644 --- a/src-web/components/BinaryFileEditor.tsx +++ b/src-web/components/BinaryFileEditor.tsx @@ -1,6 +1,6 @@ +import type { HttpRequest } from '@yaakapp-internal/models'; import mime from 'mime'; import { useKeyValue } from '../hooks/useKeyValue'; -import type { HttpRequest } from '@yaakapp-internal/models'; import { Banner } from './core/Banner'; import { Button } from './core/Button'; import { InlineCode } from './core/InlineCode'; diff --git a/src-web/components/CargoFeature.tsx b/src-web/components/CargoFeature.tsx index f53a8737..0186c35b 100644 --- a/src-web/components/CargoFeature.tsx +++ b/src-web/components/CargoFeature.tsx @@ -14,7 +14,6 @@ const featureMap: Record = { export function CargoFeature({ children, feature }: Props) { if (featureMap[feature]) { return <>{children}; - } else { - return null; } + return null; } diff --git a/src-web/components/ColorIndicator.tsx b/src-web/components/ColorIndicator.tsx index 75bb4600..931fabcf 100644 --- a/src-web/components/ColorIndicator.tsx +++ b/src-web/components/ColorIndicator.tsx @@ -17,12 +17,12 @@ export function ColorIndicator({ color, onClick, className }: Props) { if (onClick) { return ( + @@ -57,7 +64,7 @@ export function FolderLayout({ folder, style }: Props) { } function ChildCard({ child }: { child: Folder | HttpRequest | GrpcRequest | WebsocketRequest }) { - let card; + let card: ReactNode; if (child.model === 'folder') { card = ; } else if (child.model === 'http_request') { @@ -67,7 +74,7 @@ function ChildCard({ child }: { child: Folder | HttpRequest | GrpcRequest | Webs } else if (child.model === 'websocket_request') { card = ; } else { - card =
Unknown model {child['model']}
; + card =
Unknown model
; } const navigate = useCallback(async () => { diff --git a/src-web/components/FolderSettingsDialog.tsx b/src-web/components/FolderSettingsDialog.tsx index 12f99b30..e96d1ec1 100644 --- a/src-web/components/FolderSettingsDialog.tsx +++ b/src-web/components/FolderSettingsDialog.tsx @@ -1,6 +1,6 @@ import { createWorkspaceModel, foldersAtom, patchModel } from '@yaakapp-internal/models'; import { useAtomValue } from 'jotai'; -import React, { useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import { useAuthTab } from '../hooks/useAuthTab'; import { useEnvironmentsBreakdown } from '../hooks/useEnvironmentsBreakdown'; import { useHeadersTab } from '../hooks/useHeadersTab'; @@ -28,7 +28,11 @@ const TAB_HEADERS = 'headers'; const TAB_VARIABLES = 'variables'; const TAB_GENERAL = 'general'; -export type FolderSettingsTab = typeof TAB_AUTH | typeof TAB_HEADERS | typeof TAB_GENERAL | typeof TAB_VARIABLES; +export type FolderSettingsTab = + | typeof TAB_AUTH + | typeof TAB_HEADERS + | typeof TAB_GENERAL + | typeof TAB_VARIABLES; export function FolderSettingsDialog({ folderId, tab }: Props) { const folders = useAtomValue(foldersAtom); diff --git a/src-web/components/FormMultipartEditor.tsx b/src-web/components/FormMultipartEditor.tsx index bc6aa97b..9bed56f1 100644 --- a/src-web/components/FormMultipartEditor.tsx +++ b/src-web/components/FormMultipartEditor.tsx @@ -49,7 +49,7 @@ export function FormMultipartEditor({ request, forceUpdateKey, onChange }: Props pairs={pairs} onChange={handleChange} forceUpdateKey={forceUpdateKey} - stateKey={'multipart.' + request.id} + stateKey={`multipart.${request.id}`} /> ); } diff --git a/src-web/components/GrpcConnectionLayout.tsx b/src-web/components/GrpcConnectionLayout.tsx index 223d6911..fe3d5890 100644 --- a/src-web/components/GrpcConnectionLayout.tsx +++ b/src-web/components/GrpcConnectionLayout.tsx @@ -2,7 +2,7 @@ import { patchModel } from '@yaakapp-internal/models'; import classNames from 'classnames'; import { useAtomValue } from 'jotai'; import type { CSSProperties } from 'react'; -import React, { useEffect, useMemo } from 'react'; +import { useEffect, useMemo } from 'react'; import { useActiveRequest } from '../hooks/useActiveRequest'; import { useGrpc } from '../hooks/useGrpc'; import { useGrpcProtoFiles } from '../hooks/useGrpcProtoFiles'; diff --git a/src-web/components/GrpcProtoSelectionDialog.tsx b/src-web/components/GrpcProtoSelectionDialog.tsx index 83546fec..2ce297ff 100644 --- a/src-web/components/GrpcProtoSelectionDialog.tsx +++ b/src-web/components/GrpcProtoSelectionDialog.tsx @@ -6,11 +6,11 @@ import { useGrpcProtoFiles } from '../hooks/useGrpcProtoFiles'; import { pluralizeCount } from '../lib/pluralize'; import { Banner } from './core/Banner'; import { Button } from './core/Button'; +import { Icon } from './core/Icon'; import { IconButton } from './core/IconButton'; import { InlineCode } from './core/InlineCode'; import { Link } from './core/Link'; import { HStack, VStack } from './core/Stacks'; -import { Icon } from './core/Icon'; interface Props { onDone: () => void; @@ -20,7 +20,7 @@ export function GrpcProtoSelectionDialog(props: Props) { const request = useActiveRequest(); if (request?.model !== 'grpc_request') return null; - return GrpcProtoSelectionDialogWithRequest({ ...props, request }); + return ; } function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: GrpcRequest }) { @@ -103,7 +103,7 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp Found services{' '} {services?.slice(0, 5).map((s, i) => { return ( - + {s.name} {i === services.length - 1 ? '' : i === services.length - 2 ? ' and ' : ', '} @@ -119,7 +119,7 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp Server reflection found services {services?.map((s, i) => { return ( - + {s.name} {i === services.length - 1 ? '' : i === services.length - 2 ? ' and ' : ', '} @@ -135,13 +135,16 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp - + {protoFiles.map((f, i) => { const parts = f.split('/'); return ( + // biome-ignore lint/suspicious/noArrayIndexKey: none {children.map((child, i) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: none {child} ))} diff --git a/src-web/components/core/Label.tsx b/src-web/components/core/Label.tsx index 4010ade3..e93a8742 100644 --- a/src-web/components/core/Label.tsx +++ b/src-web/components/core/Label.tsx @@ -37,6 +37,7 @@ export function Label({ {required === true && *} {tags.map((tag, i) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: none ({tag}) diff --git a/src-web/components/core/PairEditor.tsx b/src-web/components/core/PairEditor.tsx index 7946157a..3862a680 100644 --- a/src-web/components/core/PairEditor.tsx +++ b/src-web/components/core/PairEditor.tsx @@ -143,6 +143,7 @@ export function PairEditor({ [handle, pairs, setRef], ); + // biome-ignore lint/correctness/useExhaustiveDependencies: Only care about forceUpdateKey useEffect(() => { // Remove empty headers on initial render and ensure they all have valid ids (pairs didn't use to have IDs) const newPairs: PairWithId[] = []; @@ -161,8 +162,6 @@ export function PairEditor({ setPairs(newPairs); regenerateLocalForceUpdateKey(); - - // eslint-disable-next-line react-hooks/exhaustive-deps }, [forceUpdateKey]); const setPairsAndSave = useCallback( @@ -534,9 +533,8 @@ export function PairEditorRow({ const valueAutocompleteVariablesFiltered = useMemo(() => { if (valueAutocompleteVariables === 'environment') { return (v: WrappedEnvironmentVariable): boolean => v.variable.name !== pair.name; - } else { - return valueAutocompleteVariables; } + return valueAutocompleteVariables; }, [pair.name, valueAutocompleteVariables]); const handleSetRef = useCallback( diff --git a/src-web/components/core/PairEditor.util.tsx b/src-web/components/core/PairEditor.util.tsx index 6bb7100b..612f353c 100644 --- a/src-web/components/core/PairEditor.util.tsx +++ b/src-web/components/core/PairEditor.util.tsx @@ -4,7 +4,6 @@ import type { Pair, PairWithId } from './PairEditor'; export function ensurePairId(p: Pair): PairWithId { if (typeof p.id === 'string') { return p as PairWithId; - } else { - return { ...p, id: p.id ?? generateId() }; } + return { ...p, id: p.id ?? generateId() }; } diff --git a/src-web/components/core/PlainInput.tsx b/src-web/components/core/PlainInput.tsx index e8442d16..232662d0 100644 --- a/src-web/components/core/PlainInput.tsx +++ b/src-web/components/core/PlainInput.tsx @@ -194,6 +194,8 @@ export const PlainInput = forwardRef<{ focus: () => void }, PlainInputProps>(fun key={forceUpdateKey} type={type === 'password' && !obscured ? 'text' : type} name={name} + // biome-ignore lint/a11y/noAutofocus: Who cares + autoFocus={autoFocus} defaultValue={defaultValue ?? undefined} autoComplete="off" autoCapitalize="off" @@ -204,7 +206,6 @@ export const PlainInput = forwardRef<{ focus: () => void }, PlainInputProps>(fun onFocus={handleFocus} onBlur={handleBlur} required={required} - autoFocus={autoFocus} placeholder={placeholder} onKeyDownCapture={onKeyDownCapture} /> diff --git a/src-web/components/core/Prompt.tsx b/src-web/components/core/Prompt.tsx index e687d951..43f49dac 100644 --- a/src-web/components/core/Prompt.tsx +++ b/src-web/components/core/Prompt.tsx @@ -30,7 +30,7 @@ export function Prompt({ [onResult, value], ); - const id = 'prompt.form.' + useRef(generateId()).current; + const id = `prompt.form.${useRef(generateId()).current}`; return (
({ ...items.map((item) => { if (item.type === 'separator') { return item; - } else { - return { - key: item.value, - label: item.label, - rightSlot: item.rightSlot, - onSelect: () => onChange(item.value), - leftSlot: , - } as DropdownItem; } + return { + key: item.value, + label: item.label, + rightSlot: item.rightSlot, + onSelect: () => onChange(item.value), + leftSlot: , + } as DropdownItem; }), ...((itemsAfter ? [{ type: 'separator', hidden: itemsAfter[0]?.type === 'separator' }, ...itemsAfter] diff --git a/src-web/components/core/SegmentedControl.tsx b/src-web/components/core/SegmentedControl.tsx index dccf4342..a9030553 100644 --- a/src-web/components/core/SegmentedControl.tsx +++ b/src-web/components/core/SegmentedControl.tsx @@ -37,18 +37,18 @@ export function SegmentedControl({ const selectedIndex = options.findIndex((o) => o.value === selectedValue); if (e.key === 'ArrowRight') { const newIndex = Math.abs((selectedIndex + 1) % options.length); - setSelectedValue(options[newIndex]!.value); + options[newIndex] && setSelectedValue(options[newIndex].value); const child = containerRef.current?.children[newIndex] as HTMLButtonElement; child.focus(); } else if (e.key === 'ArrowLeft') { const newIndex = Math.abs((selectedIndex - 1) % options.length); - setSelectedValue(options[newIndex]!.value); + options[newIndex] && setSelectedValue(options[newIndex].value); const child = containerRef.current?.children[newIndex] as HTMLButtonElement; child.focus(); } }} > - {options.map((o, i) => { + {options.map((o) => { const isSelected = selectedValue === o.value; const isActive = value === o.value; return ( @@ -63,7 +63,7 @@ export function SegmentedControl({ '!px-1.5 !w-auto', 'focus:ring-border-focus', )} - key={i} + key={o.label} title={o.label} icon={o.icon} onClick={() => onChange(o.value)} diff --git a/src-web/components/core/Select.tsx b/src-web/components/core/Select.tsx index 6bdc0f43..319c1eea 100644 --- a/src-web/components/core/Select.tsx +++ b/src-web/components/core/Select.tsx @@ -1,3 +1,4 @@ +import { type } from '@tauri-apps/plugin-os'; import classNames from 'classnames'; import type { CSSProperties, ReactNode } from 'react'; import { useState } from 'react'; @@ -7,7 +8,6 @@ import { Label } from './Label'; import type { RadioDropdownItem } from './RadioDropdown'; import { RadioDropdown } from './RadioDropdown'; import { HStack } from './Stacks'; -import { type } from '@tauri-apps/plugin-os'; export interface SelectProps { name: string; diff --git a/src-web/components/core/Separator.tsx b/src-web/components/core/Separator.tsx index 89f90f86..763c7369 100644 --- a/src-web/components/core/Separator.tsx +++ b/src-web/components/core/Separator.tsx @@ -10,9 +10,15 @@ interface Props { color?: Color; } -export function Separator({ color, className, dashed, orientation = 'horizontal', children }: Props) { +export function Separator({ + color, + className, + dashed, + orientation = 'horizontal', + children, +}: Props) { return ( -
+
{children && (
{children}
)} diff --git a/src-web/components/core/SplitLayout.tsx b/src-web/components/core/SplitLayout.tsx index 6e015fd5..fabd06c5 100644 --- a/src-web/components/core/SplitLayout.tsx +++ b/src-web/components/core/SplitLayout.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import { useAtomValue } from 'jotai'; import type { CSSProperties, ReactNode } from 'react'; -import React, { useCallback, useMemo, useRef } from 'react'; +import { useCallback, useMemo, useRef } from 'react'; import { useLocalStorage } from 'react-use'; import { activeWorkspaceAtom } from '../../hooks/useActiveWorkspace'; import { useContainerSize } from '../../hooks/useContainerQuery'; @@ -99,8 +99,10 @@ export function SplitLayout({ containerRef.current, ); const $c = containerRef.current; - const containerWidth = $c.clientWidth - parseFloat(paddingLeft) - parseFloat(paddingRight); - const containerHeight = $c.clientHeight - parseFloat(paddingTop) - parseFloat(paddingBottom); + const containerWidth = + $c.clientWidth - Number.parseFloat(paddingLeft) - Number.parseFloat(paddingRight); + const containerHeight = + $c.clientHeight - Number.parseFloat(paddingTop) - Number.parseFloat(paddingBottom); const mouseStartX = e.xStart; const mouseStartY = e.yStart; diff --git a/src-web/components/core/Stacks.tsx b/src-web/components/core/Stacks.tsx index ce741626..074f99ba 100644 --- a/src-web/components/core/Stacks.tsx +++ b/src-web/components/core/Stacks.tsx @@ -20,7 +20,7 @@ interface HStackProps extends BaseStackProps { export const HStack = forwardRef(function HStack( { className, space, children, alignItems = 'center', ...props }: HStackProps, - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: none ref: ForwardedRef, ) { return ( @@ -41,7 +41,7 @@ export type VStackProps = BaseStackProps & { export const VStack = forwardRef(function VStack( { className, space, children, ...props }: VStackProps, - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: none ref: ForwardedRef, ) { return ( @@ -65,7 +65,7 @@ type BaseStackProps = HTMLAttributes & { const BaseStack = forwardRef(function BaseStack( { className, alignItems, justifyContent, wrap, children, as, ...props }: BaseStackProps, - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: none ref: ForwardedRef, ) { const Component = as ?? 'div'; diff --git a/src-web/components/core/Table.tsx b/src-web/components/core/Table.tsx index eba48232..d72e54d8 100644 --- a/src-web/components/core/Table.tsx +++ b/src-web/components/core/Table.tsx @@ -1,6 +1,5 @@ import classNames from 'classnames'; import type { ReactNode } from 'react'; -import React from 'react'; export function Table({ children }: { children: ReactNode }) { return ( @@ -57,7 +56,12 @@ export function TableHeaderCell({ className?: string; }) { return ( -
); diff --git a/src-web/components/core/Tabs/Tabs.tsx b/src-web/components/core/Tabs/Tabs.tsx index 10b792d0..2ed9cfdb 100644 --- a/src-web/components/core/Tabs/Tabs.tsx +++ b/src-web/components/core/Tabs/Tabs.tsx @@ -50,7 +50,7 @@ export function Tabs({ // Update tabs when value changes useEffect(() => { - const tabs = ref.current?.querySelectorAll(`[data-tab]`); + const tabs = ref.current?.querySelectorAll('[data-tab]'); for (const tab of tabs ?? []) { const v = tab.getAttribute('data-tab'); const parent = tab.closest('.tabs-container'); @@ -80,6 +80,7 @@ export function Tabs({ )} >
); - } else { - return ( - - ); } + return ( + + ); })}
diff --git a/src-web/components/core/Toast.tsx b/src-web/components/core/Toast.tsx index 9d46c3fe..9076e853 100644 --- a/src-web/components/core/Toast.tsx +++ b/src-web/components/core/Toast.tsx @@ -2,7 +2,7 @@ import type { ShowToastRequest } from '@yaakapp-internal/plugins'; import classNames from 'classnames'; import * as m from 'motion/react-m'; import type { ReactNode } from 'react'; -import React from 'react'; + import { useKey } from 'react-use'; import type { IconProps } from './Icon'; import { Icon } from './Icon'; diff --git a/src-web/components/core/Tooltip.tsx b/src-web/components/core/Tooltip.tsx index 828f15f9..0ec86063 100644 --- a/src-web/components/core/Tooltip.tsx +++ b/src-web/components/core/Tooltip.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import type { CSSProperties, KeyboardEvent, ReactNode } from 'react'; -import React, { useRef, useState } from 'react'; +import { useRef, useState } from 'react'; import { generateId } from '../../lib/generateId'; import { Portal } from '../Portal'; @@ -91,6 +91,7 @@ export function Tooltip({ children, className, content, tabIndex, size = 'md' }: + {/** biome-ignore lint/a11y/useSemanticElements: Needs to be usable in other buttons */} + Triangle ( }, []); // Select the first item on first render + // biome-ignore lint/correctness/useExhaustiveDependencies: Only used for initial render useEffect(() => { const ids = jotaiStore.get(selectedIdsFamily(treeId)); const fallback = selectableItems[0]; @@ -112,7 +122,6 @@ function TreeInner( lastId: fallback.node.item.id, }); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [treeId]); const handleCloseContextMenu = useCallback(() => { @@ -129,11 +138,10 @@ function TreeInner( ); if ($el == null) { return false; - } else { - $el.focus(); - $el.scrollIntoView({ block: 'nearest' }); - return true; } + $el.focus(); + $el.scrollIntoView({ block: 'nearest' }); + return true; }, []); const ensureTabbableItem = useCallback(() => { @@ -166,7 +174,7 @@ function TreeInner( useEffect(() => { const unsub = jotaiStore.sub(collapsedFamily(treeId), ensureTabbableItem); return unsub; - }, [ensureTabbableItem, isTreeFocused, selectableItems, treeId, tryFocus]); + }, [ensureTabbableItem, treeId]); // Ensure there's always a tabbable item after render useEffect(() => { @@ -224,13 +232,12 @@ function TreeInner( if (isSelected) { // If right-clicked an item that was in the multiple-selection, use the entire selection return getContextMenu(items); - } else { - // If right-clicked an item that was NOT in the multiple-selection, just use that one - // Also update the selection with it - setSelected([item.id], false); - jotaiStore.set(focusIdsFamily(treeId), (prev) => ({ ...prev, lastId: item.id })); - return getContextMenu([item]); } + // If right-clicked an item that was NOT in the multiple-selection, just use that one + // Also update the selection with it + setSelected([item.id], false); + jotaiStore.set(focusIdsFamily(treeId), (prev) => ({ ...prev, lastId: item.id })); + return getContextMenu([item]); }; }, [getContextMenu, selectableItems, setSelected, treeId]); @@ -728,6 +735,7 @@ function DropRegionAfterList({ onContextMenu?: (e: MouseEvent) => void; }) { const { setNodeRef } = useDroppable({ id }); + // biome-ignore lint/a11y/noStaticElementInteractions: Meh return
; } @@ -758,7 +766,7 @@ function TreeHotKey({ enable: () => { if (enable == null) return true; if (typeof enable === 'function') return enable(); - else return enable; + return enable; }, }, ); diff --git a/src-web/components/core/tree/TreeDragOverlay.tsx b/src-web/components/core/tree/TreeDragOverlay.tsx index 5b370e58..df6634b6 100644 --- a/src-web/components/core/tree/TreeDragOverlay.tsx +++ b/src-web/components/core/tree/TreeDragOverlay.tsx @@ -19,7 +19,7 @@ export function TreeDragOverlay({ return ( draggingItems.includes(i.node.item.id))} getItemKey={getItemKey} ItemInner={ItemInner} diff --git a/src-web/components/core/tree/TreeIndentGuide.tsx b/src-web/components/core/tree/TreeIndentGuide.tsx index 346f0894..55671b0d 100644 --- a/src-web/components/core/tree/TreeIndentGuide.tsx +++ b/src-web/components/core/tree/TreeIndentGuide.tsx @@ -19,6 +19,7 @@ export const TreeIndentGuide = memo(function TreeIndentGuide({
{Array.from({ length: depth }).map((_, i) => (
({ }, scrollIntoView: () => { listItemRef.current?.scrollIntoView({ block: 'nearest' }); - } + }, }), [editing, getEditOptions], ); @@ -272,10 +273,6 @@ function TreeItem_({ return (
  • ({ )} {node.children != null ? (
  • - {node.children.map((childNode, i) => { + {node.children.map((childNode) => { return ( - {remotes.data?.map((r, i) => ( - + {remotes.data?.map((r) => ( + {r.name} {r.url} @@ -57,7 +57,7 @@ export function GitRemotesDialog({ dir }: Props) { ); } -GitRemotesDialog.show = function (dir: string) { +GitRemotesDialog.show = (dir: string) => { showDialog({ id: 'git-remotes', title: 'Manage Remotes', diff --git a/src-web/components/git/HistoryDialog.tsx b/src-web/components/git/HistoryDialog.tsx index 4a259d38..db9f6c4b 100644 --- a/src-web/components/git/HistoryDialog.tsx +++ b/src-web/components/git/HistoryDialog.tsx @@ -25,10 +25,14 @@ export function HistoryDialog({ log }: Props) { - {log.map((l, i) => ( - - {l.message || No message} - {l.author.name || 'Unknown'} + {log.map((l) => ( + + + {l.message || No message} + + + {l.author.name || 'Unknown'} + {formatDistanceToNowStrict(l.when)} ago diff --git a/src-web/components/graphql/GraphQLDocsExplorer.tsx b/src-web/components/graphql/GraphQLDocsExplorer.tsx index f85d174e..6c0e95df 100644 --- a/src-web/components/graphql/GraphQLDocsExplorer.tsx +++ b/src-web/components/graphql/GraphQLDocsExplorer.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import type { Color } from '@yaakapp-internal/plugins'; import classNames from 'classnames'; import { fuzzyMatch } from 'fuzzbunny'; @@ -46,6 +45,7 @@ interface Props { type ExplorerItem = | { kind: 'type'; type: GraphQLType; from: ExplorerItem } + // biome-ignore lint/suspicious/noExplicitAny: none | { kind: 'field'; type: GraphQLField; from: ExplorerItem } | { kind: 'input_field'; type: GraphQLInputField; from: ExplorerItem } | null; @@ -79,12 +79,12 @@ export const GraphQLDocsExplorer = memo(function GraphQLDocsExplorer({ ) { setActiveItem(toExplorerItem(t, toExplorerItem(from, null))); return false; - } else if (showField.type === t.name && from?.name === showField.parentType) { + } + if (showField.type === t.name && from?.name === showField.parentType) { setActiveItem(toExplorerItem(t, toExplorerItem(from, null))); return false; - } else { - return true; } + return true; }); } }, [schema, showField]); @@ -132,8 +132,7 @@ export const GraphQLDocsExplorer = memo(function GraphQLDocsExplorer({ All Schema Types {schema.description ?? null}
    - {Object.keys(allTypes).map((typeName) => { - const t = allTypes[typeName]!; + {Object.values(allTypes).map((t) => { return ( {crumbs.map((crumb, i) => { return ( + // biome-ignore lint/suspicious/noArrayIndexKey: none {i > 0 && } {crumb === item || item == null ? ( ) : crumb === item ? null : ( ); - } else if (isInterfaceType(item.type)) { + } + if (isInterfaceType(item.type)) { const fields = item.type.getFields(); const possibleTypes = schema.getPossibleTypes(item.type) ?? []; @@ -264,8 +267,7 @@ function GqlTypeInfo({ {heading} Fields - {Object.keys(fields).map((fieldName) => { - const field = fields[fieldName]!; + {Object.entries(fields).map(([fieldName, field]) => { const fieldItem: ExplorerItem = toExplorerItem(field, item); return (
    @@ -281,14 +283,15 @@ function GqlTypeInfo({ {possibleTypes.length > 0 && ( <> Implemented By - {possibleTypes.map((t: any) => ( + {possibleTypes.map((t) => ( ))} )}
    ); - } else if (isUnionType(item.type)) { + } + if (isUnionType(item.type)) { const types = item.type.getTypes(); return ( @@ -301,7 +304,8 @@ function GqlTypeInfo({ ))}
    ); - } else if (isEnumType(item.type)) { + } + if (isEnumType(item.type)) { const values = item.type.getValues(); return ( @@ -316,7 +320,8 @@ function GqlTypeInfo({ ))}
    ); - } else if (item.kind === 'input_field') { + } + if (item.kind === 'input_field') { return (
    {heading} @@ -338,7 +343,8 @@ function GqlTypeInfo({
    ); - } else if (item.kind === 'field') { + } + if (item.kind === 'field') { return (
    {heading} @@ -357,7 +363,7 @@ function GqlTypeInfo({ Arguments {item.type.args.map((a) => { return ( -
    +
    ); - } else if (isInputObjectType(item.type)) { + } + if (isInputObjectType(item.type)) { const fields = item.type.getFields(); return (
    @@ -397,7 +404,8 @@ function GqlTypeInfo({ })}
    ); - } else if (isObjectType(item.type)) { + } + if (isObjectType(item.type)) { const fields = item.type.getFields(); const interfaces = item.type.getInterfaces(); @@ -505,7 +513,7 @@ function GqlTypeRow({ {item.type.args.map((arg) => (
    {item.type.args.length > 1 && <>  } {arg.name}:  @@ -579,7 +587,8 @@ function GqlTypeLink({ ] ); - } else if (item?.kind === 'type' && isNonNullType(item.type)) { + } + if (item?.kind === 'type' && isNonNullType(item.type)) { return ( | GraphQLInputField; score: number; from: GraphQLNamedType | null; @@ -712,34 +723,35 @@ function GqlSchemaSearch({ return true; }); results.sort((a, b) => { - if (value == '') { + if (value === '') { if (a.name.startsWith('_') && !b.name.startsWith('_')) { // Always sort __ types to the end when there is no query return 1; - } else if (a.depth.length !== b.depth.length) { - return a.depth.length - b.depth.length; - } else { - return a.name.localeCompare(b.name); } - } else { if (a.depth.length !== b.depth.length) { return a.depth.length - b.depth.length; - } else if (a.score === 0 && b.score === 0) { - return a.name.localeCompare(b.name); - } else if (a.score === b.score && a.name.length === b.name.length) { - return a.name.localeCompare(b.name); - } else if (a.score === b.score) { - return a.name.length - b.type.name.length; - } else { - return b.score - a.score; } + return a.name.localeCompare(b.name); } + if (a.depth.length !== b.depth.length) { + return a.depth.length - b.depth.length; + } + if (a.score === 0 && b.score === 0) { + return a.name.localeCompare(b.name); + } + if (a.score === b.score && a.name.length === b.name.length) { + return a.name.localeCompare(b.name); + } + if (a.score === b.score) { + return a.name.length - b.type.name.length; + } + return b.score - a.score; }); return results.slice(0, 100); }, [currentItem, schema, debouncedValue, value]); const activeIndex = useMemo(() => { - const index = results.findIndex((r) => r === activeResult) ?? 0; + const index = (activeResult ? results.indexOf(activeResult) : 0) ?? 0; return index === -1 ? 0 : index; }, [activeResult, results]); @@ -786,7 +798,7 @@ function GqlSchemaSearch({ label="search" hideLabel defaultValue={value} - placeholder={focused ? 'Search ' + (currentItem?.type.toString() ?? 'Schema') : 'Search'} + placeholder={focused ? `Search ${currentItem?.type.toString() ?? 'Schema'}` : 'Search'} leftSlot={
    @@ -814,7 +826,7 @@ function GqlSchemaSearch({ )} {results.map((r, i) => { const item = toExplorerItem(r.type, currentItem); - if (item == currentItem) return null; + if (item === currentItem) return null; return ( | GraphQLInputField | null, cb: ( + // biome-ignore lint/suspicious/noExplicitAny: none type: GraphQLNamedType | GraphQLField | GraphQLInputField, from: GraphQLNamedType | null, path: string[], @@ -894,6 +908,7 @@ function walkTypeGraph( ) { const visited = new Set(); const queue: Array<{ + // biome-ignore lint/suspicious/noExplicitAny: none current: GraphQLType | GraphQLField | GraphQLInputField; from: GraphQLNamedType | null; path: string[]; @@ -913,6 +928,7 @@ function walkTypeGraph( } while (queue.length > 0) { + // biome-ignore lint/style/noNonNullAssertion: none const { current, from, path } = queue.shift()!; if (!isNamedType(current)) continue; @@ -965,6 +981,7 @@ function walkTypeGraph( } } +// biome-ignore lint/suspicious/noExplicitAny: none function toExplorerItem(t: any, from: ExplorerItem | null): ExplorerItem | null { if (t == null) return null; diff --git a/src-web/components/graphql/GraphQLEditor.tsx b/src-web/components/graphql/GraphQLEditor.tsx index 3b317e2c..11b3c879 100644 --- a/src-web/components/graphql/GraphQLEditor.tsx +++ b/src-web/components/graphql/GraphQLEditor.tsx @@ -215,7 +215,7 @@ function GraphQLEditorInner({ request, onChange, baseRequest, ...extraEditorProp onChange={handleChangeQuery} placeholder="..." actions={actions} - stateKey={'graphql_body.' + request.id} + stateKey={`graphql_body.${request.id}`} {...extraEditorProps} />
    @@ -228,7 +228,7 @@ function GraphQLEditorInner({ request, onChange, baseRequest, ...extraEditorProp defaultValue={currentBody.variables} onChange={handleChangeVariables} placeholder="{}" - stateKey={'graphql_vars.' + request.id} + stateKey={`graphql_vars.${request.id}`} autocompleteFunctions autocompleteVariables {...extraEditorProps} @@ -241,8 +241,7 @@ function GraphQLEditorInner({ request, onChange, baseRequest, ...extraEditorProp function tryParseJson(text: string, fallback: unknown) { try { return JSON.parse(text); - // eslint-disable-next-line @typescript-eslint/no-unused-vars - } catch (err) { + } catch { return fallback; } } diff --git a/src-web/components/responseViewers/AudioViewer.tsx b/src-web/components/responseViewers/AudioViewer.tsx index 66b01e32..8eb616b8 100644 --- a/src-web/components/responseViewers/AudioViewer.tsx +++ b/src-web/components/responseViewers/AudioViewer.tsx @@ -1,5 +1,4 @@ import { convertFileSrc } from '@tauri-apps/api/core'; -import React from 'react'; interface Props { bodyPath: string; @@ -8,6 +7,6 @@ interface Props { export function AudioViewer({ bodyPath }: Props) { const src = convertFileSrc(bodyPath); - // eslint-disable-next-line jsx-a11y/media-has-caption - return ; + // biome-ignore lint/a11y/useMediaCaption: none + return
    Added File Paths + Added File Paths +
    diff --git a/src-web/components/GrpcRequestPane.tsx b/src-web/components/GrpcRequestPane.tsx index 2b6eb466..cce2e51b 100644 --- a/src-web/components/GrpcRequestPane.tsx +++ b/src-web/components/GrpcRequestPane.tsx @@ -1,7 +1,7 @@ import { type GrpcRequest, type HttpRequestHeader, patchModel } from '@yaakapp-internal/models'; import classNames from 'classnames'; import type { CSSProperties } from 'react'; -import React, { useCallback, useMemo, useRef } from 'react'; +import { useCallback, useMemo, useRef } from 'react'; import { useAuthTab } from '../hooks/useAuthTab'; import { useContainerSize } from '../hooks/useContainerQuery'; import type { ReflectResponseService } from '../hooks/useGrpc'; @@ -183,7 +183,7 @@ export function GrpcRequestPane({ onUrlChange={handleChangeUrl} onCancel={onCancel} isLoading={isStreaming} - stateKey={'grpc_url.' + activeRequest.id} + stateKey={`grpc_url.${activeRequest.id}`} /> { if (events.length === 0 || activeEvent != null || methodType !== 'unary') { return; } setActiveEventId(events.find((m) => m.eventType === 'server_message')?.id ?? null); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [events.length]); return ( @@ -226,6 +226,7 @@ function EventRow({ return (
    - {format(createdAt + 'Z', 'HH:mm:ss.SSS')} + {format(`${createdAt}Z`, 'HH:mm:ss.SSS')}
    diff --git a/src-web/components/HeaderSize.tsx b/src-web/components/HeaderSize.tsx index 3b5c5232..6487636a 100644 --- a/src-web/components/HeaderSize.tsx +++ b/src-web/components/HeaderSize.tsx @@ -1,20 +1,16 @@ -import { type } from "@tauri-apps/plugin-os"; -import { settingsAtom } from "@yaakapp-internal/models"; -import classNames from "classnames"; -import { useAtomValue } from "jotai"; -import type { CSSProperties, HTMLAttributes, ReactNode } from "react"; -import React, { useMemo } from "react"; -import { useIsFullscreen } from "../hooks/useIsFullscreen"; -import { - HEADER_SIZE_LG, - HEADER_SIZE_MD, - WINDOW_CONTROLS_WIDTH, -} from "../lib/constants"; -import { WindowControls } from "./WindowControls"; +import { type } from '@tauri-apps/plugin-os'; +import { settingsAtom } from '@yaakapp-internal/models'; +import classNames from 'classnames'; +import { useAtomValue } from 'jotai'; +import type { CSSProperties, HTMLAttributes, ReactNode } from 'react'; +import { useMemo } from 'react'; +import { useIsFullscreen } from '../hooks/useIsFullscreen'; +import { HEADER_SIZE_LG, HEADER_SIZE_MD, WINDOW_CONTROLS_WIDTH } from '../lib/constants'; +import { WindowControls } from './WindowControls'; interface HeaderSizeProps extends HTMLAttributes { children?: ReactNode; - size: "md" | "lg"; + size: 'md' | 'lg'; ignoreControlsSpacing?: boolean; onlyXWindowControl?: boolean; hideControls?: boolean; @@ -35,10 +31,10 @@ export function HeaderSize({ const s = { ...style }; // Set the height (use min-height because scaling font size may make it larger - if (size === "md") s.minHeight = HEADER_SIZE_MD; - if (size === "lg") s.minHeight = HEADER_SIZE_LG; + if (size === 'md') s.minHeight = HEADER_SIZE_MD; + if (size === 'lg') s.minHeight = HEADER_SIZE_LG; - if (type() === "macos") { + if (type() === 'macos') { if (!isFullscreen) { // Add large padding for window controls s.paddingLeft = 72 / settings.interfaceScale; @@ -63,16 +59,16 @@ export function HeaderSize({ style={finalStyle} className={classNames( className, - "pt-[1px]", // Make up for bottom border - "select-none relative", - "w-full border-b border-border-subtle min-w-0", + 'pt-[1px]', // Make up for bottom border + 'select-none relative', + 'w-full border-b border-border-subtle min-w-0', )} > {/* NOTE: This needs display:grid or else the element shrinks (even though scrollable) */}
    {children} diff --git a/src-web/components/HeadersEditor.tsx b/src-web/components/HeadersEditor.tsx index bb8d0fc7..7e6d76a6 100644 --- a/src-web/components/HeadersEditor.tsx +++ b/src-web/components/HeadersEditor.tsx @@ -48,7 +48,7 @@ export function HeadersEditor({
    {validInheritedHeaders?.map((pair, i) => ( { name === 'set-cookie' ) { return 'password'; - } else { - return 'text'; } + return 'text'; }; const valueAutocomplete = (headerName: string): GenericCompletionConfig | undefined => { diff --git a/src-web/components/HttpAuthenticationEditor.tsx b/src-web/components/HttpAuthenticationEditor.tsx index e9939f78..e7e58af7 100644 --- a/src-web/components/HttpAuthenticationEditor.tsx +++ b/src-web/components/HttpAuthenticationEditor.tsx @@ -6,7 +6,7 @@ import type { Workspace, } from '@yaakapp-internal/models'; import { patchModel } from '@yaakapp-internal/models'; -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { openFolderSettings } from '../commands/openFolderSettings'; import { openWorkspaceSettings } from '../commands/openWorkspaceSettings'; import { useHttpAuthenticationConfig } from '../hooks/useHttpAuthenticationConfig'; @@ -66,9 +66,8 @@ export function HttpAuthenticationEditor({ model }: Props) { ); - } else { - return No authentication; } + return No authentication; } if (inheritedAuth.authenticationType === 'none') { @@ -84,6 +83,7 @@ export function HttpAuthenticationEditor({ model }: Props) {

    Inherited from{' '}

    - {format(createdAt + 'Z', 'HH:mm:ss.SSS')} + {format(`${createdAt}Z`, 'HH:mm:ss.SSS')}
    diff --git a/src-web/components/WindowControls.tsx b/src-web/components/WindowControls.tsx index 84cf8a41..b0aff597 100644 --- a/src-web/components/WindowControls.tsx +++ b/src-web/components/WindowControls.tsx @@ -3,7 +3,7 @@ import { type } from '@tauri-apps/plugin-os'; import { settingsAtom } from '@yaakapp-internal/models'; import classNames from 'classnames'; import { useAtomValue } from 'jotai'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { WINDOW_CONTROLS_WIDTH } from '../lib/constants'; import { Button } from './core/Button'; import { HStack } from './core/Stacks'; @@ -37,6 +37,7 @@ export function WindowControls({ className, onlyX }: Props) { onClick={() => getCurrentWebviewWindow().minimize()} > + Minimize @@ -57,6 +58,7 @@ export function WindowControls({ className, onlyX }: Props) { > {maximized ? ( + Unmaximize @@ -64,6 +66,7 @@ export function WindowControls({ className, onlyX }: Props) { ) : ( + Maximize )} @@ -76,6 +79,7 @@ export function WindowControls({ className, onlyX }: Props) { onClick={() => getCurrentWebviewWindow().close()} > + Close ; - } else if (activeRequest?.model === 'websocket_request') { + } + if (activeRequest?.model === 'websocket_request') { return ; - } else if (activeRequest?.model === 'http_request') { + } + if (activeRequest?.model === 'http_request') { return ; - } else if (activeFolder != null) { + } + if (activeFolder != null) { return ; } diff --git a/src-web/components/WorkspaceActionsDropdown.tsx b/src-web/components/WorkspaceActionsDropdown.tsx index 1dab6a0b..707a5531 100644 --- a/src-web/components/WorkspaceActionsDropdown.tsx +++ b/src-web/components/WorkspaceActionsDropdown.tsx @@ -104,7 +104,8 @@ export const WorkspaceActionsDropdown = memo(function WorkspaceActionsDropdown({ // Always open a new window if the selected one is already active switchWorkspace.mutate({ workspaceId, inNewWindow: true }); return; - } else if (typeof settings.openWorkspaceNewWindow === 'boolean') { + } + if (typeof settings.openWorkspaceNewWindow === 'boolean') { switchWorkspace.mutate({ workspaceId, inNewWindow: settings.openWorkspaceNewWindow }); return; } diff --git a/src-web/components/WorkspaceEncryptionSetting.tsx b/src-web/components/WorkspaceEncryptionSetting.tsx index 9ff02dd7..bba4991f 100644 --- a/src-web/components/WorkspaceEncryptionSetting.tsx +++ b/src-web/components/WorkspaceEncryptionSetting.tsx @@ -50,7 +50,7 @@ export function WorkspaceEncryptionSetting({ size, expanded, onDone, onEnabledEn setKey({ key: null, error: `${err}` }); }, ); - }, [setKey, workspaceMeta, workspaceMeta?.encryptionKey]); + }, [workspaceMeta, workspaceMeta?.encryptionKey]); if (key == null || workspace == null || workspaceMeta == null) { return null; @@ -117,7 +117,7 @@ export function WorkspaceEncryptionSetting({ size, expanded, onDone, onEnabledEn await enableEncryption(workspaceMeta.workspaceId); setJustEnabledEncryption(true); } catch (err) { - setError('Failed to enable encryption: ' + err); + setError(`Failed to enable encryption: ${err}`); } }} > @@ -242,10 +242,11 @@ function HighlightedKey({ keyText, show }: { keyText: string; show: boolean }) { keyText.split('').map((c, i) => { return ( {c} diff --git a/src-web/components/WorkspaceHeader.tsx b/src-web/components/WorkspaceHeader.tsx index afd14782..a9ae67ae 100644 --- a/src-web/components/WorkspaceHeader.tsx +++ b/src-web/components/WorkspaceHeader.tsx @@ -1,14 +1,14 @@ import classNames from 'classnames'; import { useAtom, useAtomValue } from 'jotai'; -import React, { memo } from 'react'; +import { memo } from 'react'; import { activeWorkspaceAtom, activeWorkspaceMetaAtom } from '../hooks/useActiveWorkspace'; import { useToggleCommandPalette } from '../hooks/useToggleCommandPalette'; import { workspaceLayoutAtom } from '../lib/atoms'; import { setupOrConfigureEncryption } from '../lib/setupOrConfigureEncryption'; import { CookieDropdown } from './CookieDropdown'; -import { PillButton } from './core/PillButton'; import { Icon } from './core/Icon'; import { IconButton } from './core/IconButton'; +import { PillButton } from './core/PillButton'; import { HStack } from './core/Stacks'; import { EnvironmentActionsDropdown } from './EnvironmentActionsDropdown'; import { ImportCurlButton } from './ImportCurlButton'; @@ -37,7 +37,7 @@ export const WorkspaceHeader = memo(function WorkspaceHeader({ className }: Prop 'grid grid-cols-[auto_minmax(0,1fr)_auto] items-center w-full h-full', )} > - + diff --git a/src-web/components/core/AutoScroller.tsx b/src-web/components/core/AutoScroller.tsx index d3e0c031..2787c2f4 100644 --- a/src-web/components/core/AutoScroller.tsx +++ b/src-web/components/core/AutoScroller.tsx @@ -39,6 +39,8 @@ export function AutoScroller({ data, render, header }: Props) { useLayoutEffect(() => { if (!autoScroll) return; + data.length; // Make linter happy. We want to refresh when length changes + const el = containerRef.current; if (el == null) return; @@ -69,21 +71,26 @@ export function AutoScroller({ data, render, header }: Props) { position: 'relative', }} > - {rowVirtualizer.getVirtualItems().map((virtualItem) => ( -
    - {render(data[virtualItem.index]!, virtualItem.index)} -
    - ))} + {rowVirtualizer.getVirtualItems().map((virtualItem) => { + const item = data[virtualItem.index]; + return ( + item != null && ( +
    + {render(item, virtualItem.index)} +
    + ) + ); + })} diff --git a/src-web/components/core/Checkbox.tsx b/src-web/components/core/Checkbox.tsx index b9d24576..e15c0ba9 100644 --- a/src-web/components/core/Checkbox.tsx +++ b/src-web/components/core/Checkbox.tsx @@ -1,5 +1,5 @@ import classNames from 'classnames'; -import { type ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { Icon } from './Icon'; import { IconTooltip } from './IconTooltip'; import { HStack } from './Stacks'; @@ -58,7 +58,9 @@ export function Checkbox({ {!hideLabel && ( -
    +
    {title}
    )} diff --git a/src-web/components/core/Confirm.tsx b/src-web/components/core/Confirm.tsx index c81a55f3..938c9442 100644 --- a/src-web/components/core/Confirm.tsx +++ b/src-web/components/core/Confirm.tsx @@ -1,10 +1,10 @@ -import type { Color } from "@yaakapp-internal/plugins"; -import type { FormEvent } from "react"; -import { useState } from "react"; -import { CopyIconButton } from "../CopyIconButton"; -import { Button } from "./Button"; -import { PlainInput } from "./PlainInput"; -import { HStack } from "./Stacks"; +import type { Color } from '@yaakapp-internal/plugins'; +import type { FormEvent } from 'react'; +import { useState } from 'react'; +import { CopyIconButton } from '../CopyIconButton'; +import { Button } from './Button'; +import { PlainInput } from './PlainInput'; +import { HStack } from './Stacks'; export interface ConfirmProps { onHide: () => void; @@ -19,9 +19,9 @@ export function Confirm({ onResult, confirmText, requireTyping, - color = "primary", + color = 'primary', }: ConfirmProps) { - const [confirm, setConfirm] = useState(""); + const [confirm, setConfirm] = useState(''); const handleHide = () => { onResult(false); onHide(); @@ -61,13 +61,9 @@ export function Confirm({ } /> )} - +
    + {children}
    {parsed.data.map((row, i) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: none 0 && 'border-b')}> {row.map((col, j) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: none diff --git a/src-web/components/responseViewers/EventStreamViewer.tsx b/src-web/components/responseViewers/EventStreamViewer.tsx index f1535b30..976f0a6b 100644 --- a/src-web/components/responseViewers/EventStreamViewer.tsx +++ b/src-web/components/responseViewers/EventStreamViewer.tsx @@ -1,7 +1,7 @@ import type { HttpResponse } from '@yaakapp-internal/models'; import type { ServerSentEvent } from '@yaakapp-internal/sse'; import classNames from 'classnames'; -import React, { Fragment, useMemo, useState } from 'react'; +import { Fragment, useMemo, useState } from 'react'; import { useFormatText } from '../../hooks/useFormatText'; import { useResponseBodyEventSource } from '../../hooks/useResponseBodyEventSource'; import { isJSON } from '../../lib/contentType'; @@ -144,6 +144,7 @@ function EventRow({ }) { return (
    {col}