From 101b6284d6cb0ffae7b3bd7985ccd86822ac8241 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sun, 22 Sep 2024 21:27:10 -0700 Subject: [PATCH] [WIP] Refactor to NPM workspaces (#104) --- .eslintignore | 5 +- .eslintrc.cjs | 5 +- .github/workflows/release.yml | 18 +- .husky/.gitignore | 1 - .husky/pre-commit | 4 - package-lock.json | 1875 +++++++++++------ package.json | 106 +- plugin-runtime-types/package.json | 10 +- .../src/{gen => bindings}/events.ts | 8 - plugin-runtime-types/src/bindings/models.ts | 23 + plugin-runtime-types/src/gen/models.ts | 43 - plugin-runtime-types/src/helpers.ts | 1 - plugin-runtime-types/src/index.ts | 4 +- plugin-runtime-types/src/plugins/Context.ts | 2 +- .../src/plugins/HttpRequestActionPlugin.ts | 2 +- .../src/plugins/ImporterPlugin.ts | 2 +- .../src/plugins/TemplateFunctionPlugin.ts | 2 +- plugin-runtime/package.json | 2 +- src-tauri/src/grpc.rs | 6 +- src-tauri/src/http_request.rs | 4 +- src-tauri/src/lib.rs | 10 +- src-tauri/src/render.rs | 27 +- src-tauri/tauri.conf.json | 4 +- src-tauri/yaak_grpc/src/manager.rs | 16 +- src-tauri/yaak_models/.gitignore | 1 + .../yaak_models/bindings/CookieDomain.ts | 3 - .../yaak_models/bindings/GrpcEventType.ts | 3 - src-tauri/yaak_models/bindings/index.ts | 3 - src-tauri/yaak_models/bindings/models.ts | 26 +- src-tauri/yaak_models/index.ts | 1 + src-tauri/yaak_models/package.json | 10 + src-tauri/yaak_models/src/models.rs | 323 +-- src-tauri/yaak_models/tsconfig.json | 15 + src-tauri/yaak_plugin_runtime/.gitignore | 1 + .../yaak_plugin_runtime/bindings/events.js | 2 + .../yaak_plugin_runtime/bindings/events.ts | 89 + .../bindings/models.js} | 4 +- .../yaak_plugin_runtime/bindings/models.ts | 23 + src-tauri/yaak_plugin_runtime/build.rs | 3 - src-tauri/yaak_plugin_runtime/index.ts | 2 + src-tauri/yaak_plugin_runtime/package.json | 10 + src-tauri/yaak_plugin_runtime/src/events.rs | 22 +- src-tauri/yaak_plugin_runtime/tsconfig.json | 15 + .../yaak_templates/bindings/parser.ts | 7 +- src-tauri/yaak_templates/build.rs | 6 - src-tauri/yaak_templates/index.ts | 1 + .../yaak_templates/lib/bindings/parser.d.ts | 32 + .../yaak_templates/lib/bindings/parser.js | 5 +- src-tauri/yaak_templates/lib/index.d.ts | 1 + src-tauri/yaak_templates/lib/index.js | 17 + src-tauri/yaak_templates/package.json | 10 + src-tauri/yaak_templates/src/parser.rs | 12 +- src-tauri/yaak_templates/tsconfig.json | 15 + src-web/components/BasicAuth.tsx | 2 +- src-web/components/BearerAuth.tsx | 2 +- src-web/components/BinaryFileEditor.tsx | 2 +- src-web/components/CookieDialog.tsx | 2 +- src-web/components/EnvironmentEditDialog.tsx | 2 +- src-web/components/ExportDataDialog.tsx | 2 +- src-web/components/FormMultipartEditor.tsx | 2 +- src-web/components/FormUrlencodedEditor.tsx | 2 +- src-web/components/GlobalHooks.tsx | 10 +- src-web/components/GraphQLEditor.tsx | 2 +- .../components/GrpcConnectionMessagesPane.tsx | 2 +- .../components/GrpcConnectionSetupPane.tsx | 2 +- src-web/components/GrpcEditor.tsx | 2 +- src-web/components/HeadersEditor.tsx | 2 +- src-web/components/HttpRequestLayout.tsx | 2 +- src-web/components/MoveToWorkspaceDialog.tsx | 2 +- src-web/components/OpenWorkspaceDialog.tsx | 2 +- .../components/RecentConnectionsDropdown.tsx | 2 +- .../components/RecentResponsesDropdown.tsx | 2 +- src-web/components/RequestPane.tsx | 2 +- src-web/components/ResponseHeaders.tsx | 2 +- src-web/components/ResponseInfo.tsx | 2 +- src-web/components/ResponsePane.tsx | 2 +- .../components/Settings/SettingsPlugins.tsx | 2 +- src-web/components/Sidebar.tsx | 10 +- src-web/components/TemplateFunctionDialog.tsx | 9 +- src-web/components/TemplateVariableDialog.tsx | 2 +- src-web/components/ToastContext.tsx | 2 +- src-web/components/UrlBar.tsx | 2 +- src-web/components/UrlParameterEditor.tsx | 2 +- src-web/components/core/Editor/Editor.tsx | 3 +- src-web/components/core/Editor/extensions.ts | 3 +- .../components/core/Editor/twig/extension.ts | 3 +- src-web/components/core/HttpMethodTag.tsx | 6 +- src-web/components/core/StatusTag.tsx | 2 +- src-web/components/core/Toast.tsx | 2 +- .../responseViewers/AudioViewer.tsx | 2 +- .../responseViewers/BinaryViewer.tsx | 2 +- .../components/responseViewers/CsvViewer.tsx | 2 +- .../responseViewers/HTMLOrTextViewer.tsx | 2 +- .../responseViewers/ImageViewer.tsx | 2 +- .../components/responseViewers/JsonViewer.tsx | 2 +- .../components/responseViewers/PdfViewer.tsx | 2 +- .../components/responseViewers/TextViewer.tsx | 6 +- .../responseViewers/VideoViewer.tsx | 2 +- .../responseViewers/WebPageViewer.tsx | 2 +- src-web/gen/Token.ts | 4 - src-web/gen/Tokens.ts | 4 - .../hooks/useActiveEnvironmentVariables.ts | 2 +- src-web/hooks/useActiveRequest.ts | 2 +- src-web/hooks/useActiveWorkspace.ts | 2 +- src-web/hooks/useAppRoutes.tsx | 2 +- src-web/hooks/useContentTypeFromHeaders.ts | 2 +- src-web/hooks/useCookieJars.ts | 2 +- src-web/hooks/useCopyHttpResponse.ts | 2 +- src-web/hooks/useCreateCookieJar.ts | 2 +- src-web/hooks/useCreateEnvironment.ts | 2 +- src-web/hooks/useCreateFolder.ts | 2 +- src-web/hooks/useCreateGrpcRequest.ts | 2 +- src-web/hooks/useCreateHttpRequest.ts | 2 +- src-web/hooks/useCreateWorkspace.ts | 2 +- src-web/hooks/useDeleteAnyGrpcRequest.tsx | 2 +- src-web/hooks/useDeleteAnyHttpRequest.tsx | 2 +- src-web/hooks/useDeleteCookieJar.tsx | 2 +- src-web/hooks/useDeleteEnvironment.tsx | 2 +- src-web/hooks/useDeleteFolder.tsx | 2 +- src-web/hooks/useDeleteGrpcConnection.ts | 2 +- src-web/hooks/useDeleteHttpResponse.ts | 2 +- src-web/hooks/useDeleteWorkspace.tsx | 2 +- src-web/hooks/useDuplicateGrpcRequest.ts | 2 +- src-web/hooks/useDuplicateHttpRequest.ts | 2 +- src-web/hooks/useEnvironments.ts | 2 +- src-web/hooks/useFilterResponse.ts | 2 +- src-web/hooks/useFolders.ts | 2 +- src-web/hooks/useGrpc.ts | 2 +- src-web/hooks/useGrpcConnections.ts | 2 +- src-web/hooks/useGrpcEvents.ts | 2 +- src-web/hooks/useGrpcRequest.ts | 2 +- src-web/hooks/useGrpcRequests.ts | 2 +- src-web/hooks/useHttpRequest.ts | 2 +- src-web/hooks/useHttpRequestActions.ts | 4 +- src-web/hooks/useHttpRequests.ts | 2 +- src-web/hooks/useHttpResponses.ts | 2 +- src-web/hooks/useImportData.tsx | 8 +- src-web/hooks/useImportQuerystring.ts | 2 +- src-web/hooks/useIntrospectGraphQL.ts | 2 +- src-web/hooks/useLatestGrpcConnection.ts | 2 +- src-web/hooks/useLatestHttpResponse.ts | 2 +- src-web/hooks/useParseTemplate.ts | 2 +- src-web/hooks/usePinnedGrpcConnection.ts | 2 +- src-web/hooks/usePinnedHttpResponse.ts | 2 +- src-web/hooks/usePluginInfo.ts | 2 +- src-web/hooks/usePlugins.ts | 2 +- src-web/hooks/useRenameRequest.tsx | 2 +- src-web/hooks/useResponseBodyBlob.ts | 2 +- src-web/hooks/useResponseBodyText.ts | 2 +- src-web/hooks/useSaveResponse.tsx | 2 +- src-web/hooks/useSendAnyHttpRequest.ts | 2 +- src-web/hooks/useSettings.ts | 2 +- src-web/hooks/useTemplateFunctions.ts | 2 +- src-web/hooks/useTemplateTokensToString.ts | 2 +- src-web/hooks/useUninstallPlugin.ts | 2 +- src-web/hooks/useUpdateAnyFolder.ts | 2 +- src-web/hooks/useUpdateAnyGrpcRequest.ts | 2 +- src-web/hooks/useUpdateAnyHttpRequest.ts | 2 +- src-web/hooks/useUpdateCookieJar.ts | 2 +- src-web/hooks/useUpdateEnvironment.ts | 2 +- src-web/hooks/useUpdateSettings.ts | 2 +- src-web/hooks/useUpdateWorkspace.ts | 2 +- src-web/hooks/useWorkspaces.ts | 2 +- index.html => src-web/index.html | 2 +- src-web/lib/fallbackRequestName.ts | 2 +- src-web/lib/keyValueStore.ts | 2 +- src-web/lib/model_util.ts | 10 +- src-web/lib/responseBody.ts | 2 +- src-web/lib/sendEphemeralRequest.ts | 2 +- src-web/lib/store.ts | 2 +- src-web/package.json | 83 + .../postcss.config.cjs | 0 .../tailwind.config.cjs | 2 +- tsconfig.json => src-web/tsconfig.json | 12 +- .../tsconfig.node.json | 0 vite.config.ts => src-web/vite.config.ts | 5 +- 176 files changed, 1983 insertions(+), 1249 deletions(-) delete mode 100644 .husky/.gitignore delete mode 100755 .husky/pre-commit rename plugin-runtime-types/src/{gen => bindings}/events.ts (93%) create mode 100644 plugin-runtime-types/src/bindings/models.ts delete mode 100644 plugin-runtime-types/src/gen/models.ts create mode 100644 src-tauri/yaak_models/.gitignore delete mode 100644 src-tauri/yaak_models/bindings/CookieDomain.ts delete mode 100644 src-tauri/yaak_models/bindings/GrpcEventType.ts delete mode 100644 src-tauri/yaak_models/bindings/index.ts create mode 100644 src-tauri/yaak_models/index.ts create mode 100644 src-tauri/yaak_models/package.json create mode 100644 src-tauri/yaak_models/tsconfig.json create mode 100644 src-tauri/yaak_plugin_runtime/.gitignore create mode 100644 src-tauri/yaak_plugin_runtime/bindings/events.js create mode 100644 src-tauri/yaak_plugin_runtime/bindings/events.ts rename src-tauri/{yaak_models/bindings/CookieExpires.ts => yaak_plugin_runtime/bindings/models.js} (58%) create mode 100644 src-tauri/yaak_plugin_runtime/bindings/models.ts create mode 100644 src-tauri/yaak_plugin_runtime/index.ts create mode 100644 src-tauri/yaak_plugin_runtime/package.json create mode 100644 src-tauri/yaak_plugin_runtime/tsconfig.json rename src-web/gen/Val.ts => src-tauri/yaak_templates/bindings/parser.ts (59%) delete mode 100644 src-tauri/yaak_templates/build.rs create mode 100644 src-tauri/yaak_templates/index.ts create mode 100644 src-tauri/yaak_templates/lib/bindings/parser.d.ts rename src-web/gen/FnArg.ts => src-tauri/yaak_templates/lib/bindings/parser.js (55%) create mode 100644 src-tauri/yaak_templates/lib/index.d.ts create mode 100644 src-tauri/yaak_templates/lib/index.js create mode 100644 src-tauri/yaak_templates/package.json create mode 100644 src-tauri/yaak_templates/tsconfig.json delete mode 100644 src-web/gen/Token.ts delete mode 100644 src-web/gen/Tokens.ts rename index.html => src-web/index.html (92%) create mode 100644 src-web/package.json rename postcss.config.cjs => src-web/postcss.config.cjs (100%) rename tailwind.config.cjs => src-web/tailwind.config.cjs (97%) rename tsconfig.json => src-web/tsconfig.json (82%) rename tsconfig.node.json => src-web/tsconfig.node.json (100%) rename vite.config.ts => src-web/vite.config.ts (93%) diff --git a/.eslintignore b/.eslintignore index 856711d6..3c19639b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,6 @@ node_modules/ dist/ -.prettierrc.cjs .eslintrc.cjs -env.d.ts +.prettierrc.cjs +src-web/postcss.config.cjs +src-web/vite.config.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 12480a00..cb089e6f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -17,9 +17,8 @@ module.exports = { 'plugin-runtime/**/*', 'plugin-runtime-types/**/*', 'src-tauri/**/*', - 'plugins/**/*', - 'tailwind.config.cjs', - 'vite.config.ts', + 'src-web/tailwind.config.cjs', + 'src-web/vite.config.ts', ], settings: { react: { diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 170e326d..55d2c9de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,10 +16,10 @@ jobs: fail-fast: false matrix: include: - - platform: 'macos-latest' # for Arm-based macs (M1 and above). + - platform: 'macos-latest' # for Arm-based Macs (M1 and above). args: '--target aarch64-apple-darwin' yaak_arch: 'arm64' - - platform: 'macos-latest' # for Intel-based macs. + - platform: 'macos-latest' # for Intel-based Macs. args: '--target x86_64-apple-darwin' yaak_arch: 'x64' - platform: 'ubuntu-22.04' # for Tauri v1, you could replace this with ubuntu-20.04. @@ -36,7 +36,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - uses: actions/setup-go@v5 with: @@ -66,12 +66,7 @@ jobs: sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf - - name: Install Node dependencies - run: | - npm ci - - - name: Install plugin-runtime Node dependencies - working-directory: plugin-runtime + - name: Install NPM Dependencies run: | npm ci @@ -80,11 +75,6 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install yaak CLI - run: | - npm install -g @yaakapp/cli - yaakcli --version - - name: Run lint run: npm run lint diff --git a/.husky/.gitignore b/.husky/.gitignore deleted file mode 100644 index 31354ec1..00000000 --- a/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 36af2198..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx lint-staged diff --git a/package-lock.json b/package-lock.json index 836a9d19..a11068d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,93 +7,29 @@ "": { "name": "yaak-app", "version": "0.0.0", - "dependencies": { - "@codemirror/commands": "^6", - "@codemirror/lang-javascript": "^6", - "@codemirror/lang-json": "^6", - "@codemirror/lang-xml": "^6", - "@codemirror/language": "^6", - "@codemirror/search": "^6", - "@lezer/generator": "^1.7.1", - "@lezer/highlight": "^1.2.1", - "@lezer/lr": "^1.4.2", - "@react-hook/resize-observer": "^2.0.2", - "@tailwindcss/container-queries": "^0.1.1", - "@tanstack/react-query": "^5.55.4", - "@tauri-apps/api": "^2.0.0-rc.5", - "@tauri-apps/plugin-clipboard-manager": "^2.0.0-rc.2", - "@tauri-apps/plugin-dialog": "^2.0.0-rc.1", - "@tauri-apps/plugin-fs": "^2.0.0-rc.2", - "@tauri-apps/plugin-log": "^2.0.0-rc.1", - "@tauri-apps/plugin-os": "^2.0.0-rc.1", - "@tauri-apps/plugin-shell": "^2.0.0-rc.1", - "@yaakapp/api": "^0.2.3", - "buffer": "^6.0.3", - "classnames": "^2.5.1", - "cm6-graphql": "^0.0.9", - "codemirror": "^6.0.1", - "codemirror-json-schema": "^0.7.8", - "date-fns": "^3.6.0", - "eventemitter3": "^5.0.1", - "fast-fuzzy": "^1.12.0", - "focus-trap-react": "^10.2.3", - "format-graphql": "^1.5.0", - "framer-motion": "^11.5.4", - "jotai": "^2.9.3", - "lucide-react": "^0.439.0", - "mime": "^4.0.4", - "papaparse": "^5.4.1", - "parse-color": "^1.0.0", - "react": "^18.3.1", - "react-dnd": "^16.0.1", - "react-dnd-html5-backend": "^16.0.1", - "react-dom": "^18.3.1", - "react-helmet-async": "^2.0.5", - "react-pdf": "^9.1.0", - "react-router-dom": "^6.26.2", - "react-use": "^17.5.1", - "slugify": "^1.6.6", - "uuid": "^10.0.0", - "xml-formatter": "^3.6.3" - }, + "workspaces": [ + "src-tauri/yaak_plugin_runtime", + "src-tauri/yaak_models", + "src-tauri/yaak_templates", + "src-web", + "plugin-runtime", + "plugin-runtime-types" + ], "devDependencies": { - "@tailwindcss/nesting": "^0.0.0-insiders.565cd3e", - "@tanstack/react-query-devtools": "^5.55.4", "@tauri-apps/cli": "^2.0.0-rc.16", - "@types/node": "^22.5.4", - "@types/papaparse": "^5.3.14", - "@types/parse-color": "^1.0.3", - "@types/parse-json": "^4.0.2", - "@types/react": "^18.3.5", - "@types/react-dom": "^18.3.0", - "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.5.0", "@typescript-eslint/parser": "^8.5.0", - "@vitejs/plugin-react": "^4.3.1", - "autoprefixer": "^10.4.20", - "decompress": "^4.2.1", "eslint": "^8", "eslint-config-prettier": "^8", "eslint-plugin-import": "^2.30.0", "eslint-plugin-jsx-a11y": "^6.10.0", "eslint-plugin-react": "^7.35.2", "eslint-plugin-react-hooks": "^4.6.2", - "husky": "^9.1.5", - "internal-ip": "^8.0.0", - "lint-staged": "^15.2.10", "nodejs-file-downloader": "^4.13.0", "npm-run-all": "^4.1.5", - "postcss": "^8.4.45", - "postcss-nesting": "^13.0.0", "prettier": "^3.3.3", - "react-devtools": "^5.3.1", "rimraf": "^6.0.1", - "tailwindcss": "^3.4.10", - "typescript": "^5.6.0", - "vite": "^5.4.6", - "vite-plugin-static-copy": "^1.0.6", - "vite-plugin-svgr": "^4.2.0", - "vite-plugin-top-level-await": "^1.4.4" + "typescript": "^5.6.0" } }, "node_modules/@alloc/quick-lru": { @@ -456,6 +392,13 @@ "node": ">=6.9.0" } }, + "node_modules/@bufbuild/protobuf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.1.0.tgz", + "integrity": "sha512-+2Mx67Y3skJ4NCD/qNSdBJNWtu6x6Qr53jeNg+QcwiL6mt0wK+3jwHH2x1p7xaYH6Ve2JKOVn0OxU35WsmqI9A==", + "dev": true, + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, "node_modules/@changesets/changelog-github": { "version": "0.4.8", "resolved": "https://registry.npmjs.org/@changesets/changelog-github/-/changelog-github-0.4.8.tgz", @@ -620,6 +563,30 @@ "w3c-keyname": "^2.2.4" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@csstools/selector-resolve-nested": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-2.0.0.tgz", @@ -1202,6 +1169,166 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@grpc/grpc-js": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.11.3.tgz", + "integrity": "sha512-i9UraDzFHMR+Iz/MhFLljT+fCpgxZ3O6CxwGJ8YuNYHJItIHUzKJpW2LvoFZNnGPwqc9iWy9RAucxV0JoR9aUQ==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@grpc/proto-loader/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@grpc/proto-loader/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@grpc/proto-loader/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@grpc/proto-loader/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/@grpc/proto-loader/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/@grpc/proto-loader/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@grpc/proto-loader/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@grpc/proto-loader/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@grpc/proto-loader/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/@grpc/proto-loader/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@grpc/proto-loader/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -1402,6 +1529,16 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/@lezer/common": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", @@ -1488,8 +1625,8 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "devOptional": true, "license": "BSD-3-Clause", - "optional": true, "dependencies": { "detect-libc": "^2.0.0", "https-proxy-agent": "^5.0.0", @@ -1509,8 +1646,8 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1521,8 +1658,8 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1542,8 +1679,8 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "semver": "^6.0.0" }, @@ -1558,8 +1695,8 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "devOptional": true, "license": "ISC", - "optional": true, "bin": { "semver": "bin/semver.js" } @@ -1568,8 +1705,8 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1582,8 +1719,8 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "deprecated": "Rimraf versions prior to v4 are no longer supported", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "glob": "^7.1.3" }, @@ -1639,6 +1776,70 @@ "node": ">=14" } }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "license": "BSD-3-Clause" + }, "node_modules/@react-dnd/asap": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-5.0.2.tgz", @@ -2358,6 +2559,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -2375,6 +2577,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -2392,6 +2595,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -2409,6 +2613,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -2426,6 +2631,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -2443,6 +2649,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -2460,6 +2667,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -2477,6 +2685,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -2494,6 +2703,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -2511,6 +2721,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -2885,6 +3096,34 @@ "@tauri-apps/api": "^2.0.0-rc.4" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "devOptional": true, + "license": "MIT" + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -2966,6 +3205,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/intercept-stdout": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@types/intercept-stdout/-/intercept-stdout-0.1.3.tgz", + "integrity": "sha512-5qWSvqohM5rRKsF58LBWJeyu+lUlZwYKSnTcnXGfvFyMYIjvhpfniQRJNiyE/Gcru3jwVr2pHedsKTGLtzZqNA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/js-cookie": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-2.2.7.tgz", @@ -3321,26 +3567,48 @@ "integrity": "sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ==", "license": "MIT" }, + "node_modules/@yaakapp-internal/models": { + "resolved": "src-tauri/yaak_models", + "link": true + }, + "node_modules/@yaakapp-internal/plugin": { + "resolved": "src-tauri/yaak_plugin_runtime", + "link": true + }, + "node_modules/@yaakapp-internal/plugin-runtime": { + "resolved": "plugin-runtime", + "link": true + }, + "node_modules/@yaakapp-internal/template": { + "resolved": "src-tauri/yaak_templates", + "link": true + }, "node_modules/@yaakapp/api": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.3.tgz", - "integrity": "sha512-LKLk1EErWF0LyFj70yhZZzk2ZwwpC7xT3y3zPofgxUqKis9gW7lwevsTdyb1Acv18BY6IL2u8as7dzIN2p85ew==", - "dependencies": { - "@types/node": "^22.5.4" - } + "resolved": "plugin-runtime-types", + "link": true + }, + "node_modules/@yaakapp/app": { + "resolved": "src-web", + "link": true }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "license": "ISC", - "optional": true + "devOptional": true, + "license": "ISC" + }, + "node_modules/abort-controller-x": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/abort-controller-x/-/abort-controller-x-0.4.3.tgz", + "integrity": "sha512-VtUwTNU8fpMwvWGn4xE93ywbogTYsuT+AUxAXOeelbXuQVIwNmC5YLeho9sH4vZ4ITW8414TTAOG1nW6uIVHCA==", + "license": "MIT" }, "node_modules/acorn": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true, + "devOptional": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -3359,6 +3627,19 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -3372,6 +3653,23 @@ "node": ">= 6.0.0" } }, + "node_modules/aggregate-error": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", + "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", + "dev": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -3446,22 +3744,6 @@ "node": ">=4" } }, - "node_modules/ansi-escapes": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", - "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "environment": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -3507,16 +3789,16 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "license": "ISC", - "optional": true + "devOptional": true, + "license": "ISC" }, "node_modules/are-we-there-yet": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", "deprecated": "This package is no longer supported.", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "delegates": "^1.0.0", "readable-stream": "^3.6.0" @@ -3705,6 +3987,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arrify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz", + "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ast-types-flow": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", @@ -4206,6 +4501,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/case-anything": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", + "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, "node_modules/ccount": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", @@ -4291,8 +4599,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "devOptional": true, "license": "ISC", - "optional": true, "engines": { "node": ">=10" } @@ -4339,6 +4647,35 @@ "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", "license": "MIT" }, + "node_modules/clean-stack": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", + "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clean-stack/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-boxes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", @@ -4349,39 +4686,6 @@ "node": ">=0.10.0" } }, - "node_modules/cli-cursor": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", - "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", - "dev": true, - "license": "MIT", - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -4618,19 +4922,12 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "devOptional": true, "license": "ISC", - "optional": true, "bin": { "color-support": "bin.js" } }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, - "license": "MIT" - }, "node_modules/comma-separated-tokens": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", @@ -4641,16 +4938,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4680,8 +4967,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "license": "ISC", - "optional": true + "devOptional": true, + "license": "ISC" }, "node_modules/convert-hrtime": { "version": "5.0.0", @@ -4775,6 +5062,67 @@ "node": ">=8" } }, + "node_modules/cp-file": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-10.0.0.tgz", + "integrity": "sha512-vy2Vi1r2epK5WqxOLnskeKeZkdZvTKfFZQCplE3XWsP+SUJyd5XAUFC9lFgTjjXJF2GMne/UML14iEmkAaDfFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.10", + "nested-error-stacks": "^2.1.1", + "p-event": "^5.0.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cpy": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/cpy/-/cpy-10.1.0.tgz", + "integrity": "sha512-VC2Gs20JcTyeQob6UViBLnyP0bYHkBh6EiKzot9vi2DmeGlFT9Wd7VG3NBrkNx/jYvFBeyDOMMHdHQhbtKLgHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^3.0.0", + "cp-file": "^10.0.0", + "globby": "^13.1.4", + "junk": "^4.0.1", + "micromatch": "^4.0.5", + "nested-error-stacks": "^2.1.1", + "p-filter": "^3.0.0", + "p-map": "^6.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cpy-cli": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cpy-cli/-/cpy-cli-5.0.0.tgz", + "integrity": "sha512-fb+DZYbL9KHc0BC4NYqGRrDIJZPXUmjjtqdw4XRRg8iV8dIfghUX/WiL+q4/B/KFTy3sK6jsbUhBaz0/Hxg7IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cpy": "^10.1.0", + "meow": "^12.0.1" + }, + "bin": { + "cpy": "cli.js" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/create-error-class": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", @@ -4788,6 +5136,13 @@ "node": ">=0.10.0" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "devOptional": true, + "license": "MIT" + }, "node_modules/crelt": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", @@ -5221,8 +5576,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "license": "MIT", - "optional": true + "devOptional": true, + "license": "MIT" }, "node_modules/dequal": { "version": "2.0.3", @@ -5237,8 +5592,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "devOptional": true, "license": "Apache-2.0", - "optional": true, "engines": { "node": ">=8" } @@ -5270,6 +5625,39 @@ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", "license": "Apache-2.0" }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "devOptional": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dir-glob/node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/discontinuous-range": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", @@ -5339,6 +5727,29 @@ "node": ">=10" } }, + "node_modules/dprint-node": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^1.0.3" + } + }, + "node_modules/dprint-node/node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/duplexer3": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", @@ -5432,19 +5843,6 @@ "node": ">=6" } }, - "node_modules/environment": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", - "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -5702,7 +6100,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -6831,8 +7228,8 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "minipass": "^3.0.0" }, @@ -6844,8 +7241,8 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "yallist": "^4.0.0" }, @@ -6857,8 +7254,8 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC", - "optional": true + "devOptional": true, + "license": "ISC" }, "node_modules/fs.realpath": { "version": "1.0.0", @@ -6937,8 +7334,8 @@ "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", "deprecated": "This package is no longer supported.", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.2", @@ -6958,15 +7355,15 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT", - "optional": true + "devOptional": true, + "license": "MIT" }, "node_modules/gauge/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "devOptional": true, "license": "MIT", - "optional": true, "engines": { "node": ">=8" } @@ -6975,8 +7372,8 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7005,19 +7402,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-east-asian-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", - "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -7181,6 +7565,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globrex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", @@ -7277,6 +7681,20 @@ "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0-alpha.2" } }, + "node_modules/grpc-tools": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", + "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.5" + }, + "bin": { + "grpc_tools_node_protoc": "bin/protoc.js", + "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" + } + }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -7356,8 +7774,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "license": "ISC", - "optional": true + "devOptional": true, + "license": "ISC" }, "node_modules/hasown": { "version": "2.0.2", @@ -7478,22 +7896,6 @@ "node": ">=14.18.0" } }, - "node_modules/husky": { - "version": "9.1.6", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", - "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", - "dev": true, - "license": "MIT", - "bin": { - "husky": "bin.js" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, "node_modules/hyphenate-style-name": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz", @@ -7530,6 +7932,13 @@ "node": ">= 4" } }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true, + "license": "ISC" + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -7567,6 +7976,19 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -7602,6 +8024,15 @@ "css-in-js-utils": "^3.1.0" } }, + "node_modules/intercept-stdout": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/intercept-stdout/-/intercept-stdout-0.1.2.tgz", + "integrity": "sha512-Umb41Ryp5FzLurfCRAWx+jjNAk8jsw2RTk2XPIwus+86h/Y2Eb4DfOWof/mZ6FBww8SoO45rJSlg25054/Di9w==", + "license": "MIT", + "dependencies": { + "lodash.toarray": "^3.0.0" + } + }, "node_modules/internal-ip": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-8.0.0.tgz", @@ -7872,19 +8303,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-generator-function": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", @@ -8448,6 +8866,19 @@ "node": ">=4.0" } }, + "node_modules/junk": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/junk/-/junk-4.0.1.tgz", + "integrity": "sha512-Qush0uP+G8ZScpGMZvHUiRfI0YBWuB3gVBYlI0v0vvOJt5FLicco+IkP0a50LqTTQhmts/m6tP5SWE+USyIvcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -8542,138 +8973,6 @@ "uc.micro": "^2.0.0" } }, - "node_modules/lint-staged": { - "version": "15.2.10", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.10.tgz", - "integrity": "sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "~5.3.0", - "commander": "~12.1.0", - "debug": "~4.3.6", - "execa": "~8.0.1", - "lilconfig": "~3.1.2", - "listr2": "~8.2.4", - "micromatch": "~4.0.8", - "pidtree": "~0.6.0", - "string-argv": "~0.3.2", - "yaml": "~2.5.0" - }, - "bin": { - "lint-staged": "bin/lint-staged.js" - }, - "engines": { - "node": ">=18.12.0" - }, - "funding": { - "url": "https://opencollective.com/lint-staged" - } - }, - "node_modules/lint-staged/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/lint-staged/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/listr2": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz", - "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "cli-truncate": "^4.0.0", - "colorette": "^2.0.20", - "eventemitter3": "^5.0.1", - "log-update": "^6.1.0", - "rfdc": "^1.4.1", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -8716,6 +9015,53 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash._arraycopy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz", + "integrity": "sha512-RHShTDnPKP7aWxlvXKiDT6IX2jCs6YZLCtNhOru/OX2Q/tzX295vVBK5oX1ECtN+2r86S0Ogy8ykP1sgCZAN0A==", + "license": "MIT" + }, + "node_modules/lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha512-H94wl5P13uEqlCg7OcNNhMQ8KvWSIyqXzOPusRgHC9DK3o54P6P3xtbXlVbRABG4q5gSmp7EDdJ0MSuW9HX6Mg==", + "license": "MIT" + }, + "node_modules/lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha512-RrL9VxMEPyDMHOd9uFbvMe8X55X16/cGM5IgOKgRElQZutpX89iS6vwl64duTV1/16w5JY7tuFNXqoekmh1EmA==", + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", + "license": "MIT" + }, + "node_modules/lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha512-JwObCrNJuT0Nnbuecmqr5DgtuBppuCvGD9lxjFpAzwnVtdGoDQ1zig+5W8k5/6Gcn0gZ3936HDAlGd28i7sOGQ==", + "license": "MIT" + }, + "node_modules/lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha512-CuBsapFjcubOGMn3VD+24HOAPxM79tH+V6ivJL3CHYjtrawauDJHUk//Yew9Hvc6e9rbCrURGk8z6PC+8WJBfQ==", + "license": "MIT", + "dependencies": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -8723,100 +9069,22 @@ "dev": true, "license": "MIT" }, - "node_modules/log-update": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", - "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", - "dev": true, + "node_modules/lodash.toarray": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-3.0.2.tgz", + "integrity": "sha512-ptkjUqvuHjTuMJJxiktJpZhxM5l60bEkfntJx+NFzdQd1bZVxfpTF1bhFYFqBrT4F0wZ1qx9KbVmHJV3Rfc7Tw==", "license": "MIT", "dependencies": { - "ansi-escapes": "^7.0.0", - "cli-cursor": "^5.0.0", - "slice-ansi": "^7.1.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "lodash._arraycopy": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash.keys": "^3.0.0" } }, - "node_modules/log-update/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/log-update/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", - "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-east-asian-width": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", - "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "license": "Apache-2.0" }, "node_modules/loose-envify": { "version": "1.4.0", @@ -8901,6 +9169,13 @@ "node": ">=4" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "devOptional": true, + "license": "ISC" + }, "node_modules/make-event-props": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/make-event-props/-/make-event-props-1.6.2.tgz", @@ -8997,6 +9272,19 @@ "node": ">= 0.10.0" } }, + "node_modules/meow": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", + "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge-refs": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.3.0.tgz", @@ -9183,19 +9471,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mimic-function": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", - "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", @@ -9244,8 +9519,8 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -9258,8 +9533,8 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "yallist": "^4.0.0" }, @@ -9271,15 +9546,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC", - "optional": true + "devOptional": true, + "license": "ISC" }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "devOptional": true, "license": "MIT", - "optional": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -9390,6 +9665,33 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, + "node_modules/nested-error-stacks": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz", + "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==", + "dev": true, + "license": "MIT" + }, + "node_modules/nice-grpc": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/nice-grpc/-/nice-grpc-2.1.9.tgz", + "integrity": "sha512-shJlg1t4Wn3qTVE31gxofbTrgCX/p4tS1xRnk4bNskCYKvXNEUpJQZpjModsVk1aau69YZDViyC18K9nC7QHYA==", + "license": "MIT", + "dependencies": { + "@grpc/grpc-js": "^1.10.8", + "abort-controller-x": "^0.4.0", + "nice-grpc-common": "^2.0.2" + } + }, + "node_modules/nice-grpc-common": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/nice-grpc-common/-/nice-grpc-common-2.0.2.tgz", + "integrity": "sha512-7RNWbls5kAL1QVUOXvBsv1uO0wPQK3lHv+cY1gwkTzirnG1Nop4cBJZubpgziNbaVc/bl9QJcyvsf/NQxa3rjQ==", + "license": "MIT", + "dependencies": { + "ts-error": "^1.0.6" + } + }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -9448,12 +9750,65 @@ "sanitize-filename": "^1.6.3" } }, + "node_modules/nodemon": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz", + "integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/nodemon/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/nopt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "abbrev": "1" }, @@ -9689,8 +10044,8 @@ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", "deprecated": "This package is no longer supported.", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "are-we-there-yet": "^2.0.0", "console-control-strings": "^1.1.0", @@ -9930,6 +10285,38 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-3.0.0.tgz", + "integrity": "sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-map": "^5.1.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-filter/node_modules/p-map": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", + "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -9972,6 +10359,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-map": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-6.0.0.tgz", + "integrity": "sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-timeout": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", @@ -10261,19 +10661,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "dev": true, - "license": "MIT", - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -10565,6 +10952,30 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/protobufjs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", + "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -10572,6 +10983,13 @@ "dev": true, "license": "ISC" }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true, + "license": "MIT" + }, "node_modules/pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", @@ -11246,8 +11664,8 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -11423,52 +11841,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/restore-cursor": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", - "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^7.0.0", - "signal-exit": "^4.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", - "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -11488,13 +11860,6 @@ "node": ">=0.10.0" } }, - "node_modules/rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", - "dev": true, - "license": "MIT" - }, "node_modules/rimraf": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", @@ -11958,34 +12323,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" + "node": ">=10" } }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", "dev": true, "license": "MIT", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/slugify": { @@ -12154,22 +12515,12 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "safe-buffer": "~5.2.0" } }, - "node_modules/string-argv": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6.19" - } - }, "node_modules/string-natural-compare": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", @@ -12177,24 +12528,6 @@ "dev": true, "license": "MIT" }, - "node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", @@ -12225,42 +12558,6 @@ "node": ">=8" } }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/string.prototype.includes": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.0.tgz", @@ -12720,8 +13017,8 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -12797,8 +13094,8 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "devOptional": true, "license": "ISC", - "optional": true, "engines": { "node": ">=8" } @@ -12807,8 +13104,8 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC", - "optional": true + "devOptional": true, + "license": "ISC" }, "node_modules/term-size": { "version": "1.2.0", @@ -13058,6 +13355,16 @@ "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==", "license": "MIT" }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "license": "ISC", + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -13103,12 +13410,105 @@ "integrity": "sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==", "license": "Unlicense" }, + "node_modules/ts-error": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ts-error/-/ts-error-1.0.6.tgz", + "integrity": "sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==", + "license": "MIT" + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "license": "Apache-2.0" }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/ts-poet": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.9.0.tgz", + "integrity": "sha512-roe6W6MeZmCjRmppyfOURklO5tQFQ6Sg7swURKkwYJvV7dbGCrK28um5+51iW3twdPRKtwarqFAVMU6G1mvnuQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "dprint-node": "^1.0.8" + } + }, + "node_modules/ts-proto": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-2.2.0.tgz", + "integrity": "sha512-xzmnyrarUjPnY+Py4RyTh3lYmL9w5t/oTtRTo2rKF8laAAahpGZ/ELxkXFEZns5JVbgkYke3C17HN5iNvZOs4g==", + "dev": true, + "license": "ISC", + "dependencies": { + "@bufbuild/protobuf": "^2.0.0", + "case-anything": "^2.1.13", + "ts-poet": "^6.7.0", + "ts-proto-descriptors": "2.0.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-2.0.0.tgz", + "integrity": "sha512-wHcTH3xIv11jxgkX5OyCSFfw27agpInAd6yh89hKG6zqIXnjW9SYqSER2CVQxdPj4czeOhGagNvZBEbJPy7qkw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@bufbuild/protobuf": "^2.0.0" + } + }, "node_modules/tsconfck": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.3.tgz", @@ -13337,6 +13737,13 @@ "ieee754": "^1.1.13" } }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true, + "license": "MIT" + }, "node_modules/undici-types": { "version": "6.19.8", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", @@ -13556,6 +13963,13 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "devOptional": true, + "license": "MIT" + }, "node_modules/valid-url": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", @@ -13910,8 +14324,8 @@ "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "devOptional": true, "license": "ISC", - "optional": true, "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } @@ -13920,15 +14334,15 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT", - "optional": true + "devOptional": true, + "license": "MIT" }, "node_modules/wide-align/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "devOptional": true, "license": "MIT", - "optional": true, "engines": { "node": ">=8" } @@ -13937,8 +14351,8 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -14018,24 +14432,6 @@ "node": ">=0.10.0" } }, - "node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", @@ -14116,48 +14512,6 @@ "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -14401,6 +14755,16 @@ "fd-slicer": "~1.1.0" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -14423,6 +14787,137 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } + }, + "plugin-runtime": { + "name": "@yaakapp-internal/plugin-runtime", + "dependencies": { + "intercept-stdout": "^0.1.2", + "long": "^5.2.3", + "nice-grpc": "^2.1.9", + "protobufjs": "^7.4.0" + }, + "devDependencies": { + "@types/intercept-stdout": "^0.1.3", + "grpc-tools": "^1.12.4", + "nodemon": "^3.1.4", + "npm-run-all": "^4.1.5", + "ts-node": "^10.9.2", + "ts-proto": "^2.2.0", + "typescript": "^5.6.0" + } + }, + "plugin-runtime-types": { + "name": "@yaakapp/api", + "version": "0.2.7", + "dependencies": { + "@types/node": "^22.5.4" + }, + "devDependencies": { + "cpy-cli": "^5.0.0", + "npm-run-all": "^4.1.5", + "typescript": "^5.6.2" + } + }, + "src-tauri/yaak_models": { + "name": "@yaakapp-internal/models", + "version": "1.0.0" + }, + "src-tauri/yaak_plugin_runtime": { + "name": "@yaakapp-internal/plugin", + "version": "1.0.0" + }, + "src-tauri/yaak_templates": { + "name": "@yaakapp-internal/template", + "version": "1.0.0" + }, + "src-web": { + "name": "@yaakapp/app", + "version": "1.0.0", + "dependencies": { + "@codemirror/commands": "^6", + "@codemirror/lang-javascript": "^6", + "@codemirror/lang-json": "^6", + "@codemirror/lang-xml": "^6", + "@codemirror/language": "^6", + "@codemirror/search": "^6", + "@lezer/generator": "^1.7.1", + "@lezer/highlight": "^1.2.1", + "@lezer/lr": "^1.4.2", + "@react-hook/resize-observer": "^2.0.2", + "@tailwindcss/container-queries": "^0.1.1", + "@tanstack/react-query": "^5.55.4", + "@tauri-apps/api": "^2.0.0-rc.5", + "@tauri-apps/plugin-clipboard-manager": "^2.0.0-rc.2", + "@tauri-apps/plugin-dialog": "^2.0.0-rc.1", + "@tauri-apps/plugin-fs": "^2.0.0-rc.2", + "@tauri-apps/plugin-log": "^2.0.0-rc.1", + "@tauri-apps/plugin-os": "^2.0.0-rc.1", + "@tauri-apps/plugin-shell": "^2.0.0-rc.1", + "buffer": "^6.0.3", + "classnames": "^2.5.1", + "cm6-graphql": "^0.0.9", + "codemirror": "^6.0.1", + "codemirror-json-schema": "^0.7.8", + "date-fns": "^3.6.0", + "eventemitter3": "^5.0.1", + "fast-fuzzy": "^1.12.0", + "focus-trap-react": "^10.2.3", + "format-graphql": "^1.5.0", + "framer-motion": "^11.5.4", + "jotai": "^2.9.3", + "lucide-react": "^0.439.0", + "mime": "^4.0.4", + "papaparse": "^5.4.1", + "parse-color": "^1.0.0", + "react": "^18.3.1", + "react-dnd": "^16.0.1", + "react-dnd-html5-backend": "^16.0.1", + "react-dom": "^18.3.1", + "react-helmet-async": "^2.0.5", + "react-pdf": "^9.1.0", + "react-router-dom": "^6.26.2", + "react-use": "^17.5.1", + "slugify": "^1.6.6", + "uuid": "^10.0.0", + "xml-formatter": "^3.6.3" + }, + "devDependencies": { + "@tailwindcss/nesting": "^0.0.0-insiders.565cd3e", + "@tanstack/react-query-devtools": "^5.55.4", + "@tauri-apps/cli": "^2.0.0-rc.16", + "@types/node": "^22.5.4", + "@types/papaparse": "^5.3.14", + "@types/parse-color": "^1.0.3", + "@types/parse-json": "^4.0.2", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@types/uuid": "^10.0.0", + "@typescript-eslint/eslint-plugin": "^8.5.0", + "@typescript-eslint/parser": "^8.5.0", + "@vitejs/plugin-react": "^4.3.1", + "autoprefixer": "^10.4.20", + "decompress": "^4.2.1", + "eslint": "^8", + "eslint-config-prettier": "^8", + "eslint-plugin-import": "^2.30.0", + "eslint-plugin-jsx-a11y": "^6.10.0", + "eslint-plugin-react": "^7.35.2", + "eslint-plugin-react-hooks": "^4.6.2", + "internal-ip": "^8.0.0", + "nodejs-file-downloader": "^4.13.0", + "npm-run-all": "^4.1.5", + "postcss": "^8.4.45", + "postcss-nesting": "^13.0.0", + "prettier": "^3.3.3", + "react-devtools": "^5.3.1", + "rimraf": "^6.0.1", + "tailwindcss": "^3.4.10", + "typescript": "^5.6.0", + "vite": "^5.4.6", + "vite-plugin-static-copy": "^1.0.6", + "vite-plugin-svgr": "^4.2.0", + "vite-plugin-top-level-await": "^1.4.4" + } } } } diff --git a/package.json b/package.json index 813093a2..2876465f 100644 --- a/package.json +++ b/package.json @@ -2,120 +2,42 @@ "name": "yaak-app", "private": true, "version": "0.0.0", - "type": "module", "repository": { "type": "git", "url": "git+https://github.com/yaakapp/app.git" }, + "workspaces": [ + "src-tauri/yaak_plugin_runtime", + "src-tauri/yaak_models", + "src-tauri/yaak_templates", + "src-web", + "plugin-runtime", + "plugin-runtime-types" + ], "scripts": { - "start": "npm run tauri-dev:desktop", - "tauri-dev:desktop": "tauri dev --no-watch --config ./src-tauri/tauri-dev.conf.json", - "tauri-dev:ios": "tauri ios dev --force-ip-prompt --config ./src-tauri/tauri-dev.conf.json", - "tauri-build": "tauri build", - "tauri": "tauri", - "dev:js": "vite dev", - "lint": "tsc && eslint . --ext .ts,.tsx", - "build": "run-p build:*", - "build:icon:release": "tauri icon ./src-tauri/icons/icon.png --output ./src-tauri/icons/release", - "build:icon:dev": "tauri icon ./src-tauri/icons/icon-dev.png --output ./src-tauri/icons/dev", - "build:js": "vite build", - "build:plugin-runtime": "npm run --prefix plugin-runtime build", + "app-build": "tauri build", + "app-dev": "tauri dev --no-watch --config ./src-tauri/tauri-dev.conf.json", + "tauri-before-build": "npm run --workspaces --if-present build", + "tauri-before-dev": "npm run --workspaces --if-present dev", + "lint": "npm run --workspaces --if-present lint", "build:vendor-protoc": "node scripts/vendor-protoc.cjs", "build:vendor-plugins": "node scripts/vendor-plugins.cjs", "build:vendor-node": "node scripts/vendor-node.cjs", - "prepare": "husky install", "replace-version": "node scripts/replace-version.cjs" }, - "dependencies": { - "@codemirror/commands": "^6", - "@codemirror/lang-javascript": "^6", - "@codemirror/lang-json": "^6", - "@codemirror/lang-xml": "^6", - "@codemirror/language": "^6", - "@codemirror/search": "^6", - "@lezer/generator": "^1.7.1", - "@lezer/highlight": "^1.2.1", - "@lezer/lr": "^1.4.2", - "@react-hook/resize-observer": "^2.0.2", - "@tailwindcss/container-queries": "^0.1.1", - "@tanstack/react-query": "^5.55.4", - "@tauri-apps/api": "^2.0.0-rc.5", - "@tauri-apps/plugin-clipboard-manager": "^2.0.0-rc.2", - "@tauri-apps/plugin-dialog": "^2.0.0-rc.1", - "@tauri-apps/plugin-fs": "^2.0.0-rc.2", - "@tauri-apps/plugin-log": "^2.0.0-rc.1", - "@tauri-apps/plugin-os": "^2.0.0-rc.1", - "@tauri-apps/plugin-shell": "^2.0.0-rc.1", - "@yaakapp/api": "^0.2.4", - "buffer": "^6.0.3", - "classnames": "^2.5.1", - "cm6-graphql": "^0.0.9", - "codemirror": "^6.0.1", - "codemirror-json-schema": "^0.7.8", - "date-fns": "^3.6.0", - "eventemitter3": "^5.0.1", - "fast-fuzzy": "^1.12.0", - "focus-trap-react": "^10.2.3", - "format-graphql": "^1.5.0", - "framer-motion": "^11.5.4", - "jotai": "^2.9.3", - "lucide-react": "^0.439.0", - "mime": "^4.0.4", - "papaparse": "^5.4.1", - "parse-color": "^1.0.0", - "react": "^18.3.1", - "react-dnd": "^16.0.1", - "react-dnd-html5-backend": "^16.0.1", - "react-dom": "^18.3.1", - "react-helmet-async": "^2.0.5", - "react-pdf": "^9.1.0", - "react-router-dom": "^6.26.2", - "react-use": "^17.5.1", - "slugify": "^1.6.6", - "uuid": "^10.0.0", - "xml-formatter": "^3.6.3" - }, "devDependencies": { - "@tailwindcss/nesting": "^0.0.0-insiders.565cd3e", - "@tanstack/react-query-devtools": "^5.55.4", "@tauri-apps/cli": "^2.0.0-rc.16", - "@types/node": "^22.5.4", - "@types/papaparse": "^5.3.14", - "@types/parse-color": "^1.0.3", - "@types/parse-json": "^4.0.2", - "@types/react": "^18.3.5", - "@types/react-dom": "^18.3.0", - "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.5.0", "@typescript-eslint/parser": "^8.5.0", - "@vitejs/plugin-react": "^4.3.1", - "autoprefixer": "^10.4.20", - "decompress": "^4.2.1", "eslint": "^8", "eslint-config-prettier": "^8", "eslint-plugin-import": "^2.30.0", "eslint-plugin-jsx-a11y": "^6.10.0", "eslint-plugin-react": "^7.35.2", "eslint-plugin-react-hooks": "^4.6.2", - "husky": "^9.1.5", - "internal-ip": "^8.0.0", - "lint-staged": "^15.2.10", "nodejs-file-downloader": "^4.13.0", "npm-run-all": "^4.1.5", - "postcss": "^8.4.45", - "postcss-nesting": "^13.0.0", "prettier": "^3.3.3", - "react-devtools": "^5.3.1", - "rimraf": "^6.0.1", - "tailwindcss": "^3.4.10", - "typescript": "^5.6.0", - "vite": "^5.4.6", - "vite-plugin-static-copy": "^1.0.6", - "vite-plugin-svgr": "^4.2.0", - "vite-plugin-top-level-await": "^1.4.4" - }, - "lint-staged": { - "*.{ts,tsx}": "eslint --cache --fix", - "*.{js,css,md}": "prettier --write" + "typescript": "^5.6.0" } } diff --git a/plugin-runtime-types/package.json b/plugin-runtime-types/package.json index d69f14c4..079c31aa 100644 --- a/plugin-runtime-types/package.json +++ b/plugin-runtime-types/package.json @@ -1,19 +1,23 @@ { "name": "@yaakapp/api", - "version": "0.2.5", + "version": "0.2.7", "main": "lib/index.js", "typings": "./lib/index.d.ts", "files": [ - "lib" + "lib/**/*" ], "scripts": { - "build": "tsc", + "build": "run-s build:copy-types build:tsc", + "build:tsc": "tsc", + "build:copy-types": "cpy --flat ../src-tauri/yaak_plugin_runtime/bindings/*.ts ./src/bindings/", "prepublishOnly": "npm run build" }, "dependencies": { "@types/node": "^22.5.4" }, "devDependencies": { + "cpy-cli": "^5.0.0", + "npm-run-all": "^4.1.5", "typescript": "^5.6.2" } } diff --git a/plugin-runtime-types/src/gen/events.ts b/plugin-runtime-types/src/bindings/events.ts similarity index 93% rename from plugin-runtime-types/src/gen/events.ts rename to plugin-runtime-types/src/bindings/events.ts index 93095ee6..7e5a5fbc 100644 --- a/plugin-runtime-types/src/gen/events.ts +++ b/plugin-runtime-types/src/bindings/events.ts @@ -1,15 +1,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CookieJar } from "./models"; import type { Environment } from "./models"; import type { Folder } from "./models"; -import type { GrpcConnection } from "./models"; -import type { GrpcEvent } from "./models"; import type { GrpcRequest } from "./models"; import type { HttpRequest } from "./models"; import type { HttpResponse } from "./models"; -import type { KeyValue } from "./models"; -import type { Plugin } from "./models"; -import type { Settings } from "./models"; import type { Workspace } from "./models"; export type BootRequest = { dir: string, }; @@ -66,8 +60,6 @@ export type InternalEvent = { id: string, pluginRefId: string, replyId: string | export type InternalEventPayload = { "type": "boot_request" } & BootRequest | { "type": "boot_response" } & BootResponse | { "type": "reload_request" } | { "type": "reload_response" } | { "type": "terminate_request" } | { "type": "terminate_response" } | { "type": "import_request" } & ImportRequest | { "type": "import_response" } & ImportResponse | { "type": "filter_request" } & FilterRequest | { "type": "filter_response" } & FilterResponse | { "type": "export_http_request_request" } & ExportHttpRequestRequest | { "type": "export_http_request_response" } & ExportHttpRequestResponse | { "type": "send_http_request_request" } & SendHttpRequestRequest | { "type": "send_http_request_response" } & SendHttpRequestResponse | { "type": "get_http_request_actions_request" } & GetHttpRequestActionsRequest | { "type": "get_http_request_actions_response" } & GetHttpRequestActionsResponse | { "type": "call_http_request_action_request" } & CallHttpRequestActionRequest | { "type": "get_template_functions_request" } | { "type": "get_template_functions_response" } & GetTemplateFunctionsResponse | { "type": "call_template_function_request" } & CallTemplateFunctionRequest | { "type": "call_template_function_response" } & CallTemplateFunctionResponse | { "type": "copy_text_request" } & CopyTextRequest | { "type": "render_http_request_request" } & RenderHttpRequestRequest | { "type": "render_http_request_response" } & RenderHttpRequestResponse | { "type": "show_toast_request" } & ShowToastRequest | { "type": "get_http_request_by_id_request" } & GetHttpRequestByIdRequest | { "type": "get_http_request_by_id_response" } & GetHttpRequestByIdResponse | { "type": "find_http_responses_request" } & FindHttpResponsesRequest | { "type": "find_http_responses_response" } & FindHttpResponsesResponse | { "type": "empty_response" }; -export type Model = Environment | Folder | GrpcConnection | GrpcEvent | GrpcRequest | HttpRequest | HttpResponse | KeyValue | Workspace | CookieJar | Settings | Plugin; - export type RenderHttpRequestRequest = { httpRequest: HttpRequest, purpose: RenderPurpose, }; export type RenderHttpRequestResponse = { httpRequest: HttpRequest, }; diff --git a/plugin-runtime-types/src/bindings/models.ts b/plugin-runtime-types/src/bindings/models.ts new file mode 100644 index 00000000..eb182225 --- /dev/null +++ b/plugin-runtime-types/src/bindings/models.ts @@ -0,0 +1,23 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type Environment = { model: "environment", id: string, workspaceId: string, createdAt: string, updatedAt: string, name: string, variables: Array, }; + +export type EnvironmentVariable = { enabled?: boolean, name: string, value: string, }; + +export type Folder = { model: "folder", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, name: string, sortPriority: number, }; + +export type GrpcMetadataEntry = { enabled?: boolean, name: string, value: string, }; + +export type GrpcRequest = { model: "grpc_request", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, authenticationType: string | null, authentication: Record, message: string, metadata: Array, method: string | null, name: string, service: string | null, sortPriority: number, url: string, }; + +export type HttpRequest = { model: "http_request", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, authentication: Record, authenticationType: string | null, body: Record, bodyType: string | null, headers: Array, method: string, name: string, sortPriority: number, url: string, urlParameters: Array, }; + +export type HttpRequestHeader = { enabled?: boolean, name: string, value: string, }; + +export type HttpResponse = { model: "http_response", id: string, createdAt: string, updatedAt: string, workspaceId: string, requestId: string, bodyPath: string | null, contentLength: number | null, elapsed: number, elapsedHeaders: number, error: string | null, headers: Array, remoteAddr: string | null, status: number, statusReason: string | null, url: string, version: string | null, }; + +export type HttpResponseHeader = { name: string, value: string, }; + +export type HttpUrlParameter = { enabled?: boolean, name: string, value: string, }; + +export type Workspace = { model: "workspace", id: string, createdAt: string, updatedAt: string, name: string, description: string, variables: Array, settingValidateCertificates: boolean, settingFollowRedirects: boolean, settingRequestTimeout: number, }; diff --git a/plugin-runtime-types/src/gen/models.ts b/plugin-runtime-types/src/gen/models.ts deleted file mode 100644 index 7ba4c760..00000000 --- a/plugin-runtime-types/src/gen/models.ts +++ /dev/null @@ -1,43 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type Cookie = { raw_cookie: string, domain: CookieDomain, expires: CookieExpires, path: [string, boolean], }; - -export type CookieDomain = { "HostOnly": string } | { "Suffix": string } | "NotPresent" | "Empty"; - -export type CookieExpires = { "AtUtc": string } | "SessionEnd"; - -export type CookieJar = { id: string, model: "cookie_jar", createdAt: string, updatedAt: string, workspaceId: string, name: string, cookies: Array, }; - -export type Environment = { id: string, workspaceId: string, model: "environment", createdAt: string, updatedAt: string, name: string, variables: Array, }; - -export type EnvironmentVariable = { enabled?: boolean, name: string, value: string, }; - -export type Folder = { createdAt: string, updatedAt: string, id: string, workspaceId: string, folderId: string | null, model: "folder", name: string, sortPriority: number, }; - -export type GrpcConnection = { id: string, model: "grpc_connection", workspaceId: string, requestId: string, createdAt: string, updatedAt: string, service: string, method: string, elapsed: number, status: number, url: string, error: string | null, trailers: { [key in string]?: string }, }; - -export type GrpcEvent = { id: string, model: "grpc_event", workspaceId: string, requestId: string, connectionId: string, createdAt: string, updatedAt: string, content: string, eventType: GrpcEventType, metadata: { [key in string]?: string }, status: number | null, error: string | null, }; - -export type GrpcEventType = "info" | "error" | "client_message" | "server_message" | "connection_start" | "connection_end"; - -export type GrpcMetadataEntry = { enabled?: boolean, name: string, value: string, }; - -export type GrpcRequest = { id: string, model: "grpc_request", workspaceId: string, createdAt: string, updatedAt: string, folderId: string | null, name: string, sortPriority: number, url: string, service: string | null, method: string | null, message: string, authenticationType: string | null, authentication: Record, metadata: Array, }; - -export type HttpRequest = { createdAt: string, updatedAt: string, id: string, workspaceId: string, folderId: string | null, model: "http_request", sortPriority: number, name: string, url: string, urlParameters: Array, method: string, body: Record, bodyType: string | null, authentication: Record, authenticationType: string | null, headers: Array, }; - -export type HttpRequestHeader = { enabled?: boolean, name: string, value: string, }; - -export type HttpResponse = { id: string, model: "http_response", workspaceId: string, requestId: string, createdAt: string, updatedAt: string, error: string | null, url: string, contentLength: number | null, version: string | null, elapsed: number, elapsedHeaders: number, remoteAddr: string | null, status: number, statusReason: string | null, bodyPath: string | null, headers: Array, }; - -export type HttpResponseHeader = { name: string, value: string, }; - -export type HttpUrlParameter = { enabled?: boolean, name: string, value: string, }; - -export type KeyValue = { model: "key_value", createdAt: string, updatedAt: string, namespace: string, key: string, value: string, }; - -export type Plugin = { id: string, model: "plugin", createdAt: string, updatedAt: string, checkedAt: string | null, directory: string, url: string | null, enabled: boolean, }; - -export type Settings = { id: string, model: "settings", createdAt: string, updatedAt: string, theme: string, appearance: string, themeDark: string, themeLight: string, updateChannel: string, interfaceFontSize: number, interfaceScale: number, editorFontSize: number, editorSoftWrap: boolean, telemetry: boolean, openWorkspaceNewWindow: boolean | null, }; - -export type Workspace = { id: string, model: "workspace", createdAt: string, updatedAt: string, name: string, description: string, variables: Array, settingValidateCertificates: boolean, settingFollowRedirects: boolean, settingRequestTimeout: number, }; diff --git a/plugin-runtime-types/src/helpers.ts b/plugin-runtime-types/src/helpers.ts index eaf85448..b789e9d6 100644 --- a/plugin-runtime-types/src/helpers.ts +++ b/plugin-runtime-types/src/helpers.ts @@ -1,2 +1 @@ export type AtLeast = Partial & Pick; -export type OneOrMany = T[] | T; diff --git a/plugin-runtime-types/src/index.ts b/plugin-runtime-types/src/index.ts index 3407d053..41f294a0 100644 --- a/plugin-runtime-types/src/index.ts +++ b/plugin-runtime-types/src/index.ts @@ -1,5 +1,5 @@ export type * from './plugins'; export type * from './themes'; -export * from './gen/model_util'; -export * from './gen/events'; +export * from './bindings/models'; +export * from './bindings/events'; diff --git a/plugin-runtime-types/src/plugins/Context.ts b/plugin-runtime-types/src/plugins/Context.ts index d014dd7c..83870b06 100644 --- a/plugin-runtime-types/src/plugins/Context.ts +++ b/plugin-runtime-types/src/plugins/Context.ts @@ -8,7 +8,7 @@ import { SendHttpRequestRequest, SendHttpRequestResponse, ShowToastRequest, -} from '../gen/events'; +} from '..'; export type Context = { clipboard: { diff --git a/plugin-runtime-types/src/plugins/HttpRequestActionPlugin.ts b/plugin-runtime-types/src/plugins/HttpRequestActionPlugin.ts index ba9fd28b..66b87edf 100644 --- a/plugin-runtime-types/src/plugins/HttpRequestActionPlugin.ts +++ b/plugin-runtime-types/src/plugins/HttpRequestActionPlugin.ts @@ -1,4 +1,4 @@ -import { CallHttpRequestActionArgs, HttpRequestAction } from '../gen/events'; +import { CallHttpRequestActionArgs, HttpRequestAction } from '..'; import { Context } from './Context'; export type HttpRequestActionPlugin = HttpRequestAction & { diff --git a/plugin-runtime-types/src/plugins/ImporterPlugin.ts b/plugin-runtime-types/src/plugins/ImporterPlugin.ts index 75d0fd08..61d9217f 100644 --- a/plugin-runtime-types/src/plugins/ImporterPlugin.ts +++ b/plugin-runtime-types/src/plugins/ImporterPlugin.ts @@ -1,4 +1,4 @@ -import { Environment, Folder, HttpRequest, Workspace } from '../gen/model_util'; +import { Environment, Folder, HttpRequest, Workspace } from '..'; import { AtLeast } from '../helpers'; import { Context } from './Context'; diff --git a/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.ts b/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.ts index 60c13ced..a0ed36ea 100644 --- a/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.ts +++ b/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.ts @@ -1,4 +1,4 @@ -import { CallTemplateFunctionArgs, TemplateFunction } from '../gen/events'; +import { CallTemplateFunctionArgs, TemplateFunction } from '..'; import { Context } from './Context'; export type TemplateFunctionPlugin = TemplateFunction & { diff --git a/plugin-runtime/package.json b/plugin-runtime/package.json index d4a75b12..2d584d6d 100644 --- a/plugin-runtime/package.json +++ b/plugin-runtime/package.json @@ -1,5 +1,5 @@ { - "name": "@yaak/plugin-runtime", + "name": "@yaakapp-internal/plugin-runtime", "scripts": { "dev": "nodemon", "build": "run-p build:*", diff --git a/src-tauri/src/grpc.rs b/src-tauri/src/grpc.rs index 638f9c1f..f3ec14f6 100644 --- a/src-tauri/src/grpc.rs +++ b/src-tauri/src/grpc.rs @@ -1,11 +1,11 @@ -use std::collections::HashMap; +use std::collections::BTreeMap; use KeyAndValueRef::{Ascii, Binary}; use yaak_grpc::{KeyAndValueRef, MetadataMap}; -pub fn metadata_to_map(metadata: MetadataMap) -> HashMap { - let mut entries = HashMap::new(); +pub fn metadata_to_map(metadata: MetadataMap) -> BTreeMap { + let mut entries = BTreeMap::new(); for r in metadata.iter() { match r { Ascii(k, v) => entries.insert(k.to_string(), v.to_str().unwrap().to_string()), diff --git a/src-tauri/src/http_request.rs b/src-tauri/src/http_request.rs index b7fdc1da..371a6487 100644 --- a/src-tauri/src/http_request.rs +++ b/src-tauri/src/http_request.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::BTreeMap; use std::fs; use std::fs::{create_dir_all, File}; use std::io::Write; @@ -487,7 +487,7 @@ fn get_str<'a>(v: &'a Value, key: &str) -> &'a str { } } -fn get_str_h<'a>(v: &'a HashMap, key: &str) -> &'a str { +fn get_str_h<'a>(v: &'a BTreeMap, key: &str) -> &'a str { match v.get(key) { None => "", Some(v) => v.as_str().unwrap_or_default(), diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 328d8ad2..a3b2a8c2 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -2,7 +2,7 @@ extern crate core; #[cfg(target_os = "macos")] extern crate objc; -use std::collections::HashMap; +use std::collections::{BTreeMap}; use std::fs; use std::fs::{create_dir_all, read_to_string, File}; use std::path::PathBuf; @@ -210,7 +210,7 @@ async fn cmd_grpc_go( .map_err(|e| e.to_string())?; let req = render_grpc_request(window.app_handle(), &req, &workspace, environment.as_ref()).await; - let mut metadata = HashMap::new(); + let mut metadata = BTreeMap::new(); // Add the rest of metadata for h in req.clone().metadata { @@ -794,9 +794,9 @@ async fn cmd_import_data( .map_err(|e| e.to_string())?; let mut imported_resources = WorkspaceExportResources::default(); - let mut id_map: HashMap = HashMap::new(); + let mut id_map: BTreeMap = BTreeMap::new(); - fn maybe_gen_id(id: &str, model: ModelType, ids: &mut HashMap) -> String { + fn maybe_gen_id(id: &str, model: ModelType, ids: &mut BTreeMap) -> String { if !id.starts_with("GENERATE_ID::") { return id.to_string(); } @@ -814,7 +814,7 @@ async fn cmd_import_data( fn maybe_gen_id_opt( id: Option, model: ModelType, - ids: &mut HashMap, + ids: &mut BTreeMap, ) -> Option { match id { Some(id) => Some(maybe_gen_id(id.as_str(), model, ids)), diff --git a/src-tauri/src/render.rs b/src-tauri/src/render.rs index 7737e639..1df31143 100644 --- a/src-tauri/src/render.rs +++ b/src-tauri/src/render.rs @@ -1,6 +1,6 @@ use crate::template_callback::PluginTemplateCallback; use serde_json::{json, Map, Value}; -use std::collections::HashMap; +use std::collections::{BTreeMap, HashMap}; use tauri::{AppHandle, Manager, Runtime}; use yaak_models::models::{ Environment, EnvironmentVariable, GrpcMetadataEntry, GrpcRequest, HttpRequest, @@ -37,7 +37,7 @@ pub async fn render_grpc_request( }) } - let mut authentication = HashMap::new(); + let mut authentication = BTreeMap::new(); for (k, v) in r.authentication.clone() { authentication.insert(k, render_json_value(v, vars, cb).await); } @@ -78,12 +78,12 @@ pub async fn render_http_request( }) } - let mut body = HashMap::new(); + let mut body = BTreeMap::new(); for (k, v) in r.body.clone() { body.insert(k, render_json_value(v, vars, cb).await); } - let mut authentication = HashMap::new(); + let mut authentication = BTreeMap::new(); for (k, v) in r.authentication.clone() { authentication.insert(k, render_json_value(v, vars, cb).await); } @@ -250,13 +250,16 @@ mod tests { vars.insert("a".to_string(), "aaa".to_string()); let result = super::render_json_value(v, &vars, &EmptyCB {}).await; - assert_eq!(result, json!([ - 123, - {"aaa": "aaa"}, - null, - "aaa", - false, - {"x": ["aaa"]} - ])) + assert_eq!( + result, + json!([ + 123, + {"aaa": "aaa"}, + null, + "aaa", + false, + {"x": ["aaa"]} + ]) + ) } } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 383e1f3f..1c5cfc94 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -3,8 +3,8 @@ "version": "0.0.0", "identifier": "app.yaak.desktop", "build": { - "beforeBuildCommand": "npm run build", - "beforeDevCommand": "npm run dev:js", + "beforeBuildCommand": "npm run tauri-before-build", + "beforeDevCommand": "npm run tauri-before-dev", "devUrl": "http://localhost:1420", "frontendDist": "../dist" }, diff --git a/src-tauri/yaak_grpc/src/manager.rs b/src-tauri/yaak_grpc/src/manager.rs index 0a7817e9..4c54bb70 100644 --- a/src-tauri/yaak_grpc/src/manager.rs +++ b/src-tauri/yaak_grpc/src/manager.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::BTreeMap; use std::path::PathBuf; use std::str::FromStr; @@ -75,7 +75,7 @@ impl GrpcConnection { service: &str, method: &str, message: &str, - metadata: HashMap, + metadata: BTreeMap, ) -> Result, StreamError> { let method = &self.method(&service, &method)?; let input_message = method.input(); @@ -102,7 +102,7 @@ impl GrpcConnection { service: &str, method: &str, stream: ReceiverStream, - metadata: HashMap, + metadata: BTreeMap, ) -> Result>, StreamError> { let method = &self.method(&service, &method)?; let mut client = tonic::client::Grpc::with_origin(self.conn.clone(), self.uri.clone()); @@ -122,7 +122,7 @@ impl GrpcConnection { service: &str, method: &str, stream: ReceiverStream, - metadata: HashMap, + metadata: BTreeMap, ) -> Result, StreamError> { let method = &self.method(&service, &method)?; let mut client = tonic::client::Grpc::with_origin(self.conn.clone(), self.uri.clone()); @@ -146,7 +146,7 @@ impl GrpcConnection { service: &str, method: &str, message: &str, - metadata: HashMap, + metadata: BTreeMap, ) -> Result>, StreamError> { let method = &self.method(&service, &method)?; let input_message = method.input(); @@ -170,12 +170,12 @@ impl GrpcConnection { pub struct GrpcHandle { app_handle: AppHandle, - pools: HashMap, + pools: BTreeMap, } impl GrpcHandle { pub fn new(app_handle: &AppHandle) -> Self { - let pools = HashMap::new(); + let pools = BTreeMap::new(); Self { pools, app_handle: app_handle.clone(), @@ -268,7 +268,7 @@ impl GrpcHandle { } } -fn decorate_req(metadata: HashMap, req: &mut Request) -> Result<(), String> { +fn decorate_req(metadata: BTreeMap, req: &mut Request) -> Result<(), String> { for (k, v) in metadata { req.metadata_mut().insert( MetadataKey::from_str(k.as_str()).map_err(|e| e.to_string())?, diff --git a/src-tauri/yaak_models/.gitignore b/src-tauri/yaak_models/.gitignore new file mode 100644 index 00000000..a65b4177 --- /dev/null +++ b/src-tauri/yaak_models/.gitignore @@ -0,0 +1 @@ +lib diff --git a/src-tauri/yaak_models/bindings/CookieDomain.ts b/src-tauri/yaak_models/bindings/CookieDomain.ts deleted file mode 100644 index 5ee87594..00000000 --- a/src-tauri/yaak_models/bindings/CookieDomain.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CookieDomain = { "HostOnly": string } | { "Suffix": string } | "NotPresent" | "Empty"; diff --git a/src-tauri/yaak_models/bindings/GrpcEventType.ts b/src-tauri/yaak_models/bindings/GrpcEventType.ts deleted file mode 100644 index 00d8db9b..00000000 --- a/src-tauri/yaak_models/bindings/GrpcEventType.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type GrpcEventType = "info" | "error" | "client_message" | "server_message" | "connection_start" | "connection_end"; diff --git a/src-tauri/yaak_models/bindings/index.ts b/src-tauri/yaak_models/bindings/index.ts deleted file mode 100644 index fa6c147b..00000000 --- a/src-tauri/yaak_models/bindings/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type Settings = { id: string, model: "settings", createdAt: string, updatedAt: string, theme: string, appearance: string, themeDark: string, themeLight: string, updateChannel: string, interfaceFontSize: number, interfaceScale: number, editorFontSize: number, editorSoftWrap: boolean, telemetry: boolean, openWorkspaceNewWindow: boolean | null, }; diff --git a/src-tauri/yaak_models/bindings/models.ts b/src-tauri/yaak_models/bindings/models.ts index 7ba4c760..18ef5091 100644 --- a/src-tauri/yaak_models/bindings/models.ts +++ b/src-tauri/yaak_models/bindings/models.ts @@ -1,43 +1,45 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +export type AnyModel = CookieJar | Environment | Folder | GrpcConnection | GrpcEvent | GrpcRequest | HttpRequest | HttpResponse | Plugin | Settings | KeyValue | Workspace; + export type Cookie = { raw_cookie: string, domain: CookieDomain, expires: CookieExpires, path: [string, boolean], }; export type CookieDomain = { "HostOnly": string } | { "Suffix": string } | "NotPresent" | "Empty"; export type CookieExpires = { "AtUtc": string } | "SessionEnd"; -export type CookieJar = { id: string, model: "cookie_jar", createdAt: string, updatedAt: string, workspaceId: string, name: string, cookies: Array, }; +export type CookieJar = { model: "cookie_jar", id: string, createdAt: string, updatedAt: string, workspaceId: string, cookies: Array, name: string, }; -export type Environment = { id: string, workspaceId: string, model: "environment", createdAt: string, updatedAt: string, name: string, variables: Array, }; +export type Environment = { model: "environment", id: string, workspaceId: string, createdAt: string, updatedAt: string, name: string, variables: Array, }; export type EnvironmentVariable = { enabled?: boolean, name: string, value: string, }; -export type Folder = { createdAt: string, updatedAt: string, id: string, workspaceId: string, folderId: string | null, model: "folder", name: string, sortPriority: number, }; +export type Folder = { model: "folder", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, name: string, sortPriority: number, }; -export type GrpcConnection = { id: string, model: "grpc_connection", workspaceId: string, requestId: string, createdAt: string, updatedAt: string, service: string, method: string, elapsed: number, status: number, url: string, error: string | null, trailers: { [key in string]?: string }, }; +export type GrpcConnection = { model: "grpc_connection", id: string, createdAt: string, updatedAt: string, workspaceId: string, requestId: string, elapsed: number, error: string | null, method: string, service: string, status: number, trailers: { [key in string]?: string }, url: string, }; -export type GrpcEvent = { id: string, model: "grpc_event", workspaceId: string, requestId: string, connectionId: string, createdAt: string, updatedAt: string, content: string, eventType: GrpcEventType, metadata: { [key in string]?: string }, status: number | null, error: string | null, }; +export type GrpcEvent = { model: "grpc_event", id: string, createdAt: string, updatedAt: string, workspaceId: string, requestId: string, connectionId: string, content: string, error: string | null, eventType: GrpcEventType, metadata: { [key in string]?: string }, status: number | null, }; export type GrpcEventType = "info" | "error" | "client_message" | "server_message" | "connection_start" | "connection_end"; export type GrpcMetadataEntry = { enabled?: boolean, name: string, value: string, }; -export type GrpcRequest = { id: string, model: "grpc_request", workspaceId: string, createdAt: string, updatedAt: string, folderId: string | null, name: string, sortPriority: number, url: string, service: string | null, method: string | null, message: string, authenticationType: string | null, authentication: Record, metadata: Array, }; +export type GrpcRequest = { model: "grpc_request", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, authenticationType: string | null, authentication: Record, message: string, metadata: Array, method: string | null, name: string, service: string | null, sortPriority: number, url: string, }; -export type HttpRequest = { createdAt: string, updatedAt: string, id: string, workspaceId: string, folderId: string | null, model: "http_request", sortPriority: number, name: string, url: string, urlParameters: Array, method: string, body: Record, bodyType: string | null, authentication: Record, authenticationType: string | null, headers: Array, }; +export type HttpRequest = { model: "http_request", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, authentication: Record, authenticationType: string | null, body: Record, bodyType: string | null, headers: Array, method: string, name: string, sortPriority: number, url: string, urlParameters: Array, }; export type HttpRequestHeader = { enabled?: boolean, name: string, value: string, }; -export type HttpResponse = { id: string, model: "http_response", workspaceId: string, requestId: string, createdAt: string, updatedAt: string, error: string | null, url: string, contentLength: number | null, version: string | null, elapsed: number, elapsedHeaders: number, remoteAddr: string | null, status: number, statusReason: string | null, bodyPath: string | null, headers: Array, }; +export type HttpResponse = { model: "http_response", id: string, createdAt: string, updatedAt: string, workspaceId: string, requestId: string, bodyPath: string | null, contentLength: number | null, elapsed: number, elapsedHeaders: number, error: string | null, headers: Array, remoteAddr: string | null, status: number, statusReason: string | null, url: string, version: string | null, }; export type HttpResponseHeader = { name: string, value: string, }; export type HttpUrlParameter = { enabled?: boolean, name: string, value: string, }; -export type KeyValue = { model: "key_value", createdAt: string, updatedAt: string, namespace: string, key: string, value: string, }; +export type KeyValue = { model: "key_value", createdAt: string, updatedAt: string, key: string, namespace: string, value: string, }; -export type Plugin = { id: string, model: "plugin", createdAt: string, updatedAt: string, checkedAt: string | null, directory: string, url: string | null, enabled: boolean, }; +export type Plugin = { model: "plugin", id: string, createdAt: string, updatedAt: string, checkedAt: string | null, directory: string, enabled: boolean, url: string | null, }; -export type Settings = { id: string, model: "settings", createdAt: string, updatedAt: string, theme: string, appearance: string, themeDark: string, themeLight: string, updateChannel: string, interfaceFontSize: number, interfaceScale: number, editorFontSize: number, editorSoftWrap: boolean, telemetry: boolean, openWorkspaceNewWindow: boolean | null, }; +export type Settings = { model: "settings", id: string, createdAt: string, updatedAt: string, appearance: string, editorFontSize: number, editorSoftWrap: boolean, interfaceFontSize: number, interfaceScale: number, openWorkspaceNewWindow: boolean | null, telemetry: boolean, theme: string, themeDark: string, themeLight: string, updateChannel: string, }; -export type Workspace = { id: string, model: "workspace", createdAt: string, updatedAt: string, name: string, description: string, variables: Array, settingValidateCertificates: boolean, settingFollowRedirects: boolean, settingRequestTimeout: number, }; +export type Workspace = { model: "workspace", id: string, createdAt: string, updatedAt: string, name: string, description: string, variables: Array, settingValidateCertificates: boolean, settingFollowRedirects: boolean, settingRequestTimeout: number, }; diff --git a/src-tauri/yaak_models/index.ts b/src-tauri/yaak_models/index.ts new file mode 100644 index 00000000..ef47ab1f --- /dev/null +++ b/src-tauri/yaak_models/index.ts @@ -0,0 +1 @@ +export * from './bindings/models'; diff --git a/src-tauri/yaak_models/package.json b/src-tauri/yaak_models/package.json new file mode 100644 index 00000000..1b99aa98 --- /dev/null +++ b/src-tauri/yaak_models/package.json @@ -0,0 +1,10 @@ +{ + "name": "@yaakapp-internal/models", + "private": true, + "version": "1.0.0", + "main": "lib/index.js", + "typings": "./lib/index.d.ts", + "scripts": { + "build": "tsc" + } +} diff --git a/src-tauri/yaak_models/src/models.rs b/src-tauri/yaak_models/src/models.rs index 47b636a0..77d686c0 100644 --- a/src-tauri/yaak_models/src/models.rs +++ b/src-tauri/yaak_models/src/models.rs @@ -2,51 +2,53 @@ use chrono::NaiveDateTime; use rusqlite::Row; use sea_query::Iden; use serde::{Deserialize, Serialize}; -use std::collections::HashMap; use serde_json::Value; +use std::collections::BTreeMap; use ts_rs::TS; #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct Settings { - pub id: String, #[ts(type = "\"settings\"")] pub model: String, + pub id: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, - pub theme: String, + pub appearance: String, + pub editor_font_size: i32, + pub editor_soft_wrap: bool, + pub interface_font_size: i32, + pub interface_scale: f32, + pub open_workspace_new_window: Option, + pub telemetry: bool, + pub theme: String, pub theme_dark: String, pub theme_light: String, pub update_channel: String, - pub interface_font_size: i32, - pub interface_scale: f32, - pub editor_font_size: i32, - pub editor_soft_wrap: bool, - pub telemetry: bool, - pub open_workspace_new_window: Option, } #[derive(Iden)] pub enum SettingsIden { #[iden = "settings"] Table, - Id, Model, + Id, CreatedAt, UpdatedAt, - Theme, + Appearance, - UpdateChannel, - ThemeDark, - ThemeLight, - InterfaceFontSize, - InterfaceScale, EditorFontSize, EditorSoftWrap, - Telemetry, + InterfaceFontSize, + InterfaceScale, OpenWorkspaceNewWindow, + Telemetry, + Theme, + ThemeDark, + ThemeLight, + UpdateChannel, } impl<'s> TryFrom<&Row<'s>> for Settings { @@ -75,11 +77,11 @@ impl<'s> TryFrom<&Row<'s>> for Settings { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct Workspace { - pub id: String, #[ts(type = "\"workspace\"")] pub model: String, + pub id: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, pub name: String, @@ -98,16 +100,17 @@ pub struct Workspace { pub enum WorkspaceIden { #[iden = "workspaces"] Table, - Id, Model, + Id, CreatedAt, UpdatedAt, - Name, + Description, - Variables, - SettingValidateCertificates, + Name, SettingFollowRedirects, SettingRequestTimeout, + SettingValidateCertificates, + Variables, } impl<'s> TryFrom<&Row<'s>> for Workspace { @@ -143,7 +146,7 @@ impl Workspace { } #[derive(Debug, Clone, Serialize, Deserialize, TS)] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] enum CookieDomain { HostOnly(String), Suffix(String), @@ -152,14 +155,14 @@ enum CookieDomain { } #[derive(Debug, Clone, Serialize, Deserialize, TS)] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] enum CookieExpires { AtUtc(String), SessionEnd, } #[derive(Debug, Clone, Serialize, Deserialize, TS)] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct Cookie { raw_cookie: String, domain: CookieDomain, @@ -169,16 +172,17 @@ pub struct Cookie { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct CookieJar { - pub id: String, #[ts(type = "\"cookie_jar\"")] pub model: String, + pub id: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, pub workspace_id: String, - pub name: String, + pub cookies: Vec, + pub name: String, } #[derive(Iden)] @@ -190,8 +194,9 @@ pub enum CookieJarIden { WorkspaceId, CreatedAt, UpdatedAt, - Name, + Cookies, + Name, } impl<'s> TryFrom<&Row<'s>> for CookieJar { @@ -213,14 +218,15 @@ impl<'s> TryFrom<&Row<'s>> for CookieJar { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct Environment { - pub id: String, - pub workspace_id: String, #[ts(type = "\"environment\"")] pub model: String, + pub id: String, + pub workspace_id: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, + pub name: String, pub variables: Vec, } @@ -229,11 +235,12 @@ pub struct Environment { pub enum EnvironmentIden { #[iden = "environments"] Table, - Id, Model, - WorkspaceId, + Id, CreatedAt, UpdatedAt, + WorkspaceId, + Name, Variables, } @@ -257,7 +264,7 @@ impl<'s> TryFrom<&Row<'s>> for Environment { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct EnvironmentVariable { #[serde(default = "default_true")] #[ts(optional, as = "Option")] @@ -268,15 +275,16 @@ pub struct EnvironmentVariable { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct Folder { - pub created_at: NaiveDateTime, - pub updated_at: NaiveDateTime, - pub id: String, - pub workspace_id: String, - pub folder_id: Option, #[ts(type = "\"folder\"")] pub model: String, + pub id: String, + pub created_at: NaiveDateTime, + pub updated_at: NaiveDateTime, + pub workspace_id: String, + pub folder_id: Option, + pub name: String, pub sort_priority: f32, } @@ -291,6 +299,7 @@ pub enum FolderIden { FolderId, CreatedAt, UpdatedAt, + Name, SortPriority, } @@ -314,7 +323,7 @@ impl<'s> TryFrom<&Row<'s>> for Folder { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct HttpRequestHeader { #[serde(default = "default_true")] #[ts(optional, as = "Option")] @@ -325,7 +334,7 @@ pub struct HttpRequestHeader { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct HttpUrlParameter { #[serde(default = "default_true")] #[ts(optional, as = "Option")] @@ -336,28 +345,29 @@ pub struct HttpUrlParameter { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct HttpRequest { - pub created_at: NaiveDateTime, - pub updated_at: NaiveDateTime, - pub id: String, - pub workspace_id: String, - pub folder_id: Option, #[ts(type = "\"http_request\"")] pub model: String, - pub sort_priority: f32, - pub name: String, - pub url: String, - pub url_parameters: Vec, + pub id: String, + pub created_at: NaiveDateTime, + pub updated_at: NaiveDateTime, + pub workspace_id: String, + pub folder_id: Option, + + #[ts(type = "Record")] + pub authentication: BTreeMap, + pub authentication_type: Option, + #[ts(type = "Record")] + pub body: BTreeMap, + pub body_type: Option, + pub headers: Vec, #[serde(default = "default_http_request_method")] pub method: String, - #[ts(type = "Record")] - pub body: HashMap, - pub body_type: Option, - #[ts(type = "Record")] - pub authentication: HashMap, - pub authentication_type: Option, - pub headers: Vec, + pub name: String, + pub sort_priority: f32, + pub url: String, + pub url_parameters: Vec, } #[derive(Iden)] @@ -366,20 +376,21 @@ pub enum HttpRequestIden { Table, Id, Model, - WorkspaceId, - FolderId, CreatedAt, UpdatedAt, + WorkspaceId, + FolderId, + + Authentication, + AuthenticationType, + Body, + BodyType, + Headers, + Method, Name, SortPriority, Url, UrlParameters, - Method, - Body, - BodyType, - Authentication, - AuthenticationType, - Headers, } impl<'s> TryFrom<&Row<'s>> for HttpRequest { @@ -413,7 +424,7 @@ impl<'s> TryFrom<&Row<'s>> for HttpRequest { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct HttpResponseHeader { pub name: String, pub value: String, @@ -421,49 +432,51 @@ pub struct HttpResponseHeader { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct HttpResponse { - pub id: String, #[ts(type = "\"http_response\"")] pub model: String, - pub workspace_id: String, - pub request_id: String, + pub id: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, - pub error: Option, - pub url: String, + pub workspace_id: String, + pub request_id: String, + + pub body_path: Option, pub content_length: Option, - pub version: Option, pub elapsed: i32, pub elapsed_headers: i32, + pub error: Option, + pub headers: Vec, pub remote_addr: Option, pub status: i32, pub status_reason: Option, - pub body_path: Option, - pub headers: Vec, + pub url: String, + pub version: Option, } #[derive(Iden)] pub enum HttpResponseIden { #[iden = "http_responses"] Table, - Id, Model, - WorkspaceId, - RequestId, + Id, CreatedAt, UpdatedAt, - Error, - Url, + WorkspaceId, + RequestId, + + BodyPath, ContentLength, - Version, Elapsed, ElapsedHeaders, + Error, + Headers, RemoteAddr, Status, StatusReason, - BodyPath, - Headers, + Url, + Version, } impl<'s> TryFrom<&Row<'s>> for HttpResponse { @@ -504,7 +517,7 @@ impl HttpResponse { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct GrpcMetadataEntry { #[serde(default = "default_true")] #[ts(optional, as = "Option")] @@ -515,25 +528,26 @@ pub struct GrpcMetadataEntry { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct GrpcRequest { - pub id: String, #[ts(type = "\"grpc_request\"")] pub model: String, - pub workspace_id: String, + pub id: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, + pub workspace_id: String, pub folder_id: Option, - pub name: String, - pub sort_priority: f32, - pub url: String, - pub service: Option, - pub method: Option, - pub message: String, + pub authentication_type: Option, #[ts(type = "Record")] - pub authentication: HashMap, + pub authentication: BTreeMap, + pub message: String, pub metadata: Vec, + pub method: Option, + pub name: String, + pub service: Option, + pub sort_priority: f32, + pub url: String, } #[derive(Iden)] @@ -542,19 +556,20 @@ pub enum GrpcRequestIden { Table, Id, Model, - WorkspaceId, CreatedAt, UpdatedAt, + WorkspaceId, FolderId, + + Authentication, + AuthenticationType, + Message, + Metadata, + Method, Name, + Service, SortPriority, Url, - Service, - Method, - Message, - AuthenticationType, - Authentication, - Metadata, } impl<'s> TryFrom<&Row<'s>> for GrpcRequest { @@ -585,41 +600,43 @@ impl<'s> TryFrom<&Row<'s>> for GrpcRequest { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct GrpcConnection { - pub id: String, #[ts(type = "\"grpc_connection\"")] pub model: String, - pub workspace_id: String, - pub request_id: String, + pub id: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, - pub service: String, - pub method: String, + pub workspace_id: String, + pub request_id: String, + pub elapsed: i32, - pub status: i32, - pub url: String, pub error: Option, - pub trailers: HashMap, + pub method: String, + pub service: String, + pub status: i32, + pub trailers: BTreeMap, + pub url: String, } #[derive(Iden)] pub enum GrpcConnectionIden { #[iden = "grpc_connections"] Table, - Id, Model, - WorkspaceId, + Id, CreatedAt, UpdatedAt, + WorkspaceId, RequestId, - Service, - Method, + Elapsed, - Status, - Url, Error, + Method, + Service, + Status, Trailers, + Url, } impl<'s> TryFrom<&Row<'s>> for GrpcConnection { @@ -647,7 +664,7 @@ impl<'s> TryFrom<&Row<'s>> for GrpcConnection { #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq, TS)] #[serde(rename_all = "snake_case")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub enum GrpcEventType { Info, Error, @@ -665,39 +682,41 @@ impl Default for GrpcEventType { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct GrpcEvent { - pub id: String, #[ts(type = "\"grpc_event\"")] pub model: String, + pub id: String, + pub created_at: NaiveDateTime, + pub updated_at: NaiveDateTime, pub workspace_id: String, pub request_id: String, pub connection_id: String, - pub created_at: NaiveDateTime, - pub updated_at: NaiveDateTime, + pub content: String, - pub event_type: GrpcEventType, - pub metadata: HashMap, - pub status: Option, pub error: Option, + pub event_type: GrpcEventType, + pub metadata: BTreeMap, + pub status: Option, } #[derive(Iden)] pub enum GrpcEventIden { #[iden = "grpc_events"] Table, - Id, Model, + Id, + CreatedAt, + UpdatedAt, WorkspaceId, RequestId, ConnectionId, - CreatedAt, - UpdatedAt, + Content, + Error, EventType, Metadata, Status, - Error, } impl<'s> TryFrom<&Row<'s>> for GrpcEvent { @@ -725,31 +744,33 @@ impl<'s> TryFrom<&Row<'s>> for GrpcEvent { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct Plugin { - pub id: String, #[ts(type = "\"plugin\"")] pub model: String, + pub id: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, + pub checked_at: Option, pub directory: String, - pub url: Option, pub enabled: bool, + pub url: Option, } #[derive(Iden)] pub enum PluginIden { #[iden = "plugins"] Table, - Id, Model, + Id, CreatedAt, UpdatedAt, + CheckedAt, Directory, - Url, Enabled, + Url, } impl<'s> TryFrom<&Row<'s>> for Plugin { @@ -771,14 +792,15 @@ impl<'s> TryFrom<&Row<'s>> for Plugin { #[derive(Debug, Clone, Serialize, Deserialize, Default, TS)] #[serde(default, rename_all = "camelCase")] -#[ts(export, export_to="models.ts")] +#[ts(export, export_to = "models.ts")] pub struct KeyValue { #[ts(type = "\"key_value\"")] pub model: String, pub created_at: NaiveDateTime, pub updated_at: NaiveDateTime, - pub namespace: String, + pub key: String, + pub namespace: String, pub value: String, } @@ -789,8 +811,9 @@ pub enum KeyValueIden { Model, CreatedAt, UpdatedAt, - Namespace, + Key, + Namespace, Value, } @@ -847,3 +870,21 @@ impl ModelType { .to_string() } } + +#[derive(Debug, Clone, Serialize, Deserialize, TS)] +#[serde(rename_all = "camelCase", untagged)] +#[ts(export, export_to="models.ts")] +pub enum AnyModel { + CookieJar(CookieJar), + Environment(Environment), + Folder(Folder), + GrpcConnection(GrpcConnection), + GrpcEvent(GrpcEvent), + GrpcRequest(GrpcRequest), + HttpRequest(HttpRequest), + HttpResponse(HttpResponse), + Plugin(Plugin), + Settings(Settings), + KeyValue(KeyValue), + Workspace(Workspace), +} diff --git a/src-tauri/yaak_models/tsconfig.json b/src-tauri/yaak_models/tsconfig.json new file mode 100644 index 00000000..3d1f6ca9 --- /dev/null +++ b/src-tauri/yaak_models/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "node16", + "target": "es6", + "lib": ["es2021"], + "declaration": true, + "declarationDir": "./lib", + "outDir": "./lib", + "strict": true, + "types": ["node"] + }, + "files": [ + "index.ts" + ] +} diff --git a/src-tauri/yaak_plugin_runtime/.gitignore b/src-tauri/yaak_plugin_runtime/.gitignore new file mode 100644 index 00000000..a65b4177 --- /dev/null +++ b/src-tauri/yaak_plugin_runtime/.gitignore @@ -0,0 +1 @@ +lib diff --git a/src-tauri/yaak_plugin_runtime/bindings/events.js b/src-tauri/yaak_plugin_runtime/bindings/events.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src-tauri/yaak_plugin_runtime/bindings/events.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src-tauri/yaak_plugin_runtime/bindings/events.ts b/src-tauri/yaak_plugin_runtime/bindings/events.ts new file mode 100644 index 00000000..7e5a5fbc --- /dev/null +++ b/src-tauri/yaak_plugin_runtime/bindings/events.ts @@ -0,0 +1,89 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Environment } from "./models"; +import type { Folder } from "./models"; +import type { GrpcRequest } from "./models"; +import type { HttpRequest } from "./models"; +import type { HttpResponse } from "./models"; +import type { Workspace } from "./models"; + +export type BootRequest = { dir: string, }; + +export type BootResponse = { name: string, version: string, capabilities: Array, }; + +export type CallHttpRequestActionArgs = { httpRequest: HttpRequest, }; + +export type CallHttpRequestActionRequest = { key: string, pluginRefId: string, args: CallHttpRequestActionArgs, }; + +export type CallTemplateFunctionArgs = { purpose: RenderPurpose, values: { [key in string]?: string }, }; + +export type CallTemplateFunctionRequest = { name: string, args: CallTemplateFunctionArgs, }; + +export type CallTemplateFunctionResponse = { value: string | null, }; + +export type Color = "custom" | "default" | "primary" | "secondary" | "info" | "success" | "notice" | "warning" | "danger"; + +export type CopyTextRequest = { text: string, }; + +export type ExportHttpRequestRequest = { httpRequest: HttpRequest, }; + +export type ExportHttpRequestResponse = { content: string, }; + +export type FilterRequest = { content: string, filter: string, }; + +export type FilterResponse = { content: string, }; + +export type FindHttpResponsesRequest = { requestId: string, limit: number | null, }; + +export type FindHttpResponsesResponse = { httpResponses: Array, }; + +export type GetHttpRequestActionsRequest = Record; + +export type GetHttpRequestActionsResponse = { actions: Array, pluginRefId: string, }; + +export type GetHttpRequestByIdRequest = { id: string, }; + +export type GetHttpRequestByIdResponse = { httpRequest: HttpRequest | null, }; + +export type GetTemplateFunctionsResponse = { functions: Array, pluginRefId: string, }; + +export type HttpRequestAction = { key: string, label: string, icon: string | null, }; + +export type Icon = "copy" | "info" | "check_circle" | "alert_triangle"; + +export type ImportRequest = { content: string, }; + +export type ImportResources = { workspaces: Array, environments: Array, folders: Array, httpRequests: Array, grpcRequests: Array, }; + +export type ImportResponse = { resources: ImportResources, }; + +export type InternalEvent = { id: string, pluginRefId: string, replyId: string | null, payload: InternalEventPayload, }; + +export type InternalEventPayload = { "type": "boot_request" } & BootRequest | { "type": "boot_response" } & BootResponse | { "type": "reload_request" } | { "type": "reload_response" } | { "type": "terminate_request" } | { "type": "terminate_response" } | { "type": "import_request" } & ImportRequest | { "type": "import_response" } & ImportResponse | { "type": "filter_request" } & FilterRequest | { "type": "filter_response" } & FilterResponse | { "type": "export_http_request_request" } & ExportHttpRequestRequest | { "type": "export_http_request_response" } & ExportHttpRequestResponse | { "type": "send_http_request_request" } & SendHttpRequestRequest | { "type": "send_http_request_response" } & SendHttpRequestResponse | { "type": "get_http_request_actions_request" } & GetHttpRequestActionsRequest | { "type": "get_http_request_actions_response" } & GetHttpRequestActionsResponse | { "type": "call_http_request_action_request" } & CallHttpRequestActionRequest | { "type": "get_template_functions_request" } | { "type": "get_template_functions_response" } & GetTemplateFunctionsResponse | { "type": "call_template_function_request" } & CallTemplateFunctionRequest | { "type": "call_template_function_response" } & CallTemplateFunctionResponse | { "type": "copy_text_request" } & CopyTextRequest | { "type": "render_http_request_request" } & RenderHttpRequestRequest | { "type": "render_http_request_response" } & RenderHttpRequestResponse | { "type": "show_toast_request" } & ShowToastRequest | { "type": "get_http_request_by_id_request" } & GetHttpRequestByIdRequest | { "type": "get_http_request_by_id_response" } & GetHttpRequestByIdResponse | { "type": "find_http_responses_request" } & FindHttpResponsesRequest | { "type": "find_http_responses_response" } & FindHttpResponsesResponse | { "type": "empty_response" }; + +export type RenderHttpRequestRequest = { httpRequest: HttpRequest, purpose: RenderPurpose, }; + +export type RenderHttpRequestResponse = { httpRequest: HttpRequest, }; + +export type RenderPurpose = "send" | "preview"; + +export type SendHttpRequestRequest = { httpRequest: HttpRequest, }; + +export type SendHttpRequestResponse = { httpResponse: HttpResponse, }; + +export type ShowToastRequest = { message: string, color?: Color | null, icon?: Icon | null, }; + +export type TemplateFunction = { name: string, args: Array, }; + +export type TemplateFunctionArg = { "type": "text" } & TemplateFunctionTextArg | { "type": "select" } & TemplateFunctionSelectArg | { "type": "checkbox" } & TemplateFunctionCheckboxArg | { "type": "http_request" } & TemplateFunctionHttpRequestArg; + +export type TemplateFunctionBaseArg = { name: string, optional?: boolean | null, label?: string | null, defaultValue?: string | null, }; + +export type TemplateFunctionCheckboxArg = { name: string, optional?: boolean | null, label?: string | null, defaultValue?: string | null, }; + +export type TemplateFunctionHttpRequestArg = { name: string, optional?: boolean | null, label?: string | null, defaultValue?: string | null, }; + +export type TemplateFunctionSelectArg = { options: Array, name: string, optional?: boolean | null, label?: string | null, defaultValue?: string | null, }; + +export type TemplateFunctionSelectOption = { name: string, value: string, }; + +export type TemplateFunctionTextArg = { placeholder?: string | null, name: string, optional?: boolean | null, label?: string | null, defaultValue?: string | null, }; diff --git a/src-tauri/yaak_models/bindings/CookieExpires.ts b/src-tauri/yaak_plugin_runtime/bindings/models.js similarity index 58% rename from src-tauri/yaak_models/bindings/CookieExpires.ts rename to src-tauri/yaak_plugin_runtime/bindings/models.js index 1e936e38..ca914b0b 100644 --- a/src-tauri/yaak_models/bindings/CookieExpires.ts +++ b/src-tauri/yaak_plugin_runtime/bindings/models.js @@ -1,3 +1,3 @@ +"use strict"; // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type CookieExpires = { "AtUtc": string } | "SessionEnd"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src-tauri/yaak_plugin_runtime/bindings/models.ts b/src-tauri/yaak_plugin_runtime/bindings/models.ts new file mode 100644 index 00000000..eb182225 --- /dev/null +++ b/src-tauri/yaak_plugin_runtime/bindings/models.ts @@ -0,0 +1,23 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type Environment = { model: "environment", id: string, workspaceId: string, createdAt: string, updatedAt: string, name: string, variables: Array, }; + +export type EnvironmentVariable = { enabled?: boolean, name: string, value: string, }; + +export type Folder = { model: "folder", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, name: string, sortPriority: number, }; + +export type GrpcMetadataEntry = { enabled?: boolean, name: string, value: string, }; + +export type GrpcRequest = { model: "grpc_request", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, authenticationType: string | null, authentication: Record, message: string, metadata: Array, method: string | null, name: string, service: string | null, sortPriority: number, url: string, }; + +export type HttpRequest = { model: "http_request", id: string, createdAt: string, updatedAt: string, workspaceId: string, folderId: string | null, authentication: Record, authenticationType: string | null, body: Record, bodyType: string | null, headers: Array, method: string, name: string, sortPriority: number, url: string, urlParameters: Array, }; + +export type HttpRequestHeader = { enabled?: boolean, name: string, value: string, }; + +export type HttpResponse = { model: "http_response", id: string, createdAt: string, updatedAt: string, workspaceId: string, requestId: string, bodyPath: string | null, contentLength: number | null, elapsed: number, elapsedHeaders: number, error: string | null, headers: Array, remoteAddr: string | null, status: number, statusReason: string | null, url: string, version: string | null, }; + +export type HttpResponseHeader = { name: string, value: string, }; + +export type HttpUrlParameter = { enabled?: boolean, name: string, value: string, }; + +export type Workspace = { model: "workspace", id: string, createdAt: string, updatedAt: string, name: string, description: string, variables: Array, settingValidateCertificates: boolean, settingFollowRedirects: boolean, settingRequestTimeout: number, }; diff --git a/src-tauri/yaak_plugin_runtime/build.rs b/src-tauri/yaak_plugin_runtime/build.rs index 13cdc77c..7ecc4587 100644 --- a/src-tauri/yaak_plugin_runtime/build.rs +++ b/src-tauri/yaak_plugin_runtime/build.rs @@ -1,7 +1,4 @@ fn main() -> Result<(), Box> { - // Tell ts-rs where to generate types to - println!("cargo:rustc-env=TS_RS_EXPORT_DIR=../../plugin-runtime-types/src/gen"); - // Compile protobuf types tonic_build::compile_protos("../../proto/plugins/runtime.proto")?; diff --git a/src-tauri/yaak_plugin_runtime/index.ts b/src-tauri/yaak_plugin_runtime/index.ts new file mode 100644 index 00000000..21460729 --- /dev/null +++ b/src-tauri/yaak_plugin_runtime/index.ts @@ -0,0 +1,2 @@ +export * from './bindings/models'; +export * from './bindings/events'; diff --git a/src-tauri/yaak_plugin_runtime/package.json b/src-tauri/yaak_plugin_runtime/package.json new file mode 100644 index 00000000..4d53d947 --- /dev/null +++ b/src-tauri/yaak_plugin_runtime/package.json @@ -0,0 +1,10 @@ +{ + "name": "@yaakapp-internal/plugin", + "private": true, + "version": "1.0.0", + "main": "lib/index.js", + "typings": "./lib/index.d.ts", + "scripts": { + "build": "tsc" + } +} diff --git a/src-tauri/yaak_plugin_runtime/src/events.rs b/src-tauri/yaak_plugin_runtime/src/events.rs index 37a96dad..c68c7b0e 100644 --- a/src-tauri/yaak_plugin_runtime/src/events.rs +++ b/src-tauri/yaak_plugin_runtime/src/events.rs @@ -3,8 +3,8 @@ use std::collections::HashMap; use ts_rs::TS; use yaak_models::models::{ - CookieJar, Environment, Folder, GrpcConnection, GrpcEvent, GrpcRequest, HttpRequest, - HttpResponse, KeyValue, Plugin, Settings, Workspace, + Environment, Folder, GrpcRequest, HttpRequest, + HttpResponse, Workspace, }; #[derive(Debug, Clone, Serialize, Deserialize, TS)] @@ -402,21 +402,3 @@ pub struct ImportResources { pub http_requests: Vec, pub grpc_requests: Vec, } - -#[derive(Debug, Clone, Serialize, Deserialize, TS)] -#[serde(rename_all = "camelCase", untagged)] -#[ts(export, export_to="events.ts")] -pub enum Model { - Environment(Environment), - Folder(Folder), - GrpcConnection(GrpcConnection), - GrpcEvent(GrpcEvent), - GrpcRequest(GrpcRequest), - HttpRequest(HttpRequest), - HttpResponse(HttpResponse), - KeyValue(KeyValue), - Workspace(Workspace), - CookieJar(CookieJar), - Settings(Settings), - Plugin(Plugin), -} diff --git a/src-tauri/yaak_plugin_runtime/tsconfig.json b/src-tauri/yaak_plugin_runtime/tsconfig.json new file mode 100644 index 00000000..3d1f6ca9 --- /dev/null +++ b/src-tauri/yaak_plugin_runtime/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "node16", + "target": "es6", + "lib": ["es2021"], + "declaration": true, + "declarationDir": "./lib", + "outDir": "./lib", + "strict": true, + "types": ["node"] + }, + "files": [ + "index.ts" + ] +} diff --git a/src-web/gen/Val.ts b/src-tauri/yaak_templates/bindings/parser.ts similarity index 59% rename from src-web/gen/Val.ts rename to src-tauri/yaak_templates/bindings/parser.ts index d6f85516..956b93a7 100644 --- a/src-web/gen/Val.ts +++ b/src-tauri/yaak_templates/bindings/parser.ts @@ -1,4 +1,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FnArg } from "./FnArg"; + +export type FnArg = { name: string, value: Val, }; + +export type Token = { "type": "raw", text: string, } | { "type": "tag", val: Val, } | { "type": "eof" }; + +export type Tokens = { tokens: Array, }; export type Val = { "type": "str", text: string, } | { "type": "var", name: string, } | { "type": "bool", value: boolean, } | { "type": "fn", name: string, args: Array, } | { "type": "null" }; diff --git a/src-tauri/yaak_templates/build.rs b/src-tauri/yaak_templates/build.rs deleted file mode 100644 index fb916c22..00000000 --- a/src-tauri/yaak_templates/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() -> Result<(), Box> { - // Tell ts-rs where to generate types to - println!("cargo:rustc-env=TS_RS_EXPORT_DIR=../../src-web/gen"); - - Ok(()) -} diff --git a/src-tauri/yaak_templates/index.ts b/src-tauri/yaak_templates/index.ts new file mode 100644 index 00000000..1aaf1968 --- /dev/null +++ b/src-tauri/yaak_templates/index.ts @@ -0,0 +1 @@ +export * from './bindings/parser'; diff --git a/src-tauri/yaak_templates/lib/bindings/parser.d.ts b/src-tauri/yaak_templates/lib/bindings/parser.d.ts new file mode 100644 index 00000000..c140b914 --- /dev/null +++ b/src-tauri/yaak_templates/lib/bindings/parser.d.ts @@ -0,0 +1,32 @@ +export type FnArg = { + name: string; + value: Val; +}; +export type Token = { + "type": "raw"; + text: string; +} | { + "type": "tag"; + val: Val; +} | { + "type": "eof"; +}; +export type Tokens = { + tokens: Array; +}; +export type Val = { + "type": "str"; + text: string; +} | { + "type": "var"; + name: string; +} | { + "type": "bool"; + value: boolean; +} | { + "type": "fn"; + name: string; + args: Array; +} | { + "type": "null"; +}; diff --git a/src-web/gen/FnArg.ts b/src-tauri/yaak_templates/lib/bindings/parser.js similarity index 55% rename from src-web/gen/FnArg.ts rename to src-tauri/yaak_templates/lib/bindings/parser.js index 7a386bed..ca914b0b 100644 --- a/src-web/gen/FnArg.ts +++ b/src-tauri/yaak_templates/lib/bindings/parser.js @@ -1,4 +1,3 @@ +"use strict"; // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Val } from "./Val"; - -export type FnArg = { name: string, value: Val, }; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src-tauri/yaak_templates/lib/index.d.ts b/src-tauri/yaak_templates/lib/index.d.ts new file mode 100644 index 00000000..1aaf1968 --- /dev/null +++ b/src-tauri/yaak_templates/lib/index.d.ts @@ -0,0 +1 @@ +export * from './bindings/parser'; diff --git a/src-tauri/yaak_templates/lib/index.js b/src-tauri/yaak_templates/lib/index.js new file mode 100644 index 00000000..6f5026f1 --- /dev/null +++ b/src-tauri/yaak_templates/lib/index.js @@ -0,0 +1,17 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./bindings/parser"), exports); diff --git a/src-tauri/yaak_templates/package.json b/src-tauri/yaak_templates/package.json new file mode 100644 index 00000000..5d813043 --- /dev/null +++ b/src-tauri/yaak_templates/package.json @@ -0,0 +1,10 @@ +{ + "name": "@yaakapp-internal/template", + "private": true, + "version": "1.0.0", + "main": "lib/index.js", + "typings": "./lib/index.d.ts", + "scripts": { + "build": "tsc" + } +} diff --git a/src-tauri/yaak_templates/src/parser.rs b/src-tauri/yaak_templates/src/parser.rs index 1603ac31..9fdc3829 100644 --- a/src-tauri/yaak_templates/src/parser.rs +++ b/src-tauri/yaak_templates/src/parser.rs @@ -3,7 +3,7 @@ use std::fmt::Display; use ts_rs::TS; #[derive(Clone, PartialEq, Debug, Serialize, Deserialize, TS)] -#[ts(export)] +#[ts(export, export_to="parser.ts")] pub struct Tokens { pub tokens: Vec, } @@ -21,7 +21,7 @@ impl Display for Tokens { } #[derive(Clone, PartialEq, Debug, Serialize, Deserialize, TS)] -#[ts(export)] +#[ts(export, export_to="parser.ts")] pub struct FnArg { pub name: String, pub value: Val, @@ -36,7 +36,7 @@ impl Display for FnArg { #[derive(Clone, PartialEq, Debug, Serialize, Deserialize, TS)] #[serde(rename_all = "snake_case", tag = "type")] -#[ts(export)] +#[ts(export, export_to="parser.ts")] pub enum Val { Str { text: String }, Var { name: String }, @@ -71,7 +71,7 @@ impl Display for Val { #[derive(Clone, PartialEq, Debug, Serialize, Deserialize, TS)] #[serde(rename_all = "snake_case", tag = "type")] -#[ts(export)] +#[ts(export, export_to="parser.ts")] pub enum Token { Raw { text: String }, Tag { val: Val }, @@ -292,7 +292,7 @@ impl Parser { Some(text) } - + fn parse_fn_name(&mut self) -> Option { let start_pos = self.pos; @@ -512,7 +512,7 @@ mod tests { ] ); } - + #[test] fn fn_dot_name() { let mut p = Parser::new("${[ foo.bar.baz() ]}"); diff --git a/src-tauri/yaak_templates/tsconfig.json b/src-tauri/yaak_templates/tsconfig.json new file mode 100644 index 00000000..3d1f6ca9 --- /dev/null +++ b/src-tauri/yaak_templates/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "node16", + "target": "es6", + "lib": ["es2021"], + "declaration": true, + "declarationDir": "./lib", + "outDir": "./lib", + "strict": true, + "types": ["node"] + }, + "files": [ + "index.ts" + ] +} diff --git a/src-web/components/BasicAuth.tsx b/src-web/components/BasicAuth.tsx index b569cd99..f082254d 100644 --- a/src-web/components/BasicAuth.tsx +++ b/src-web/components/BasicAuth.tsx @@ -1,6 +1,6 @@ import { useUpdateAnyGrpcRequest } from '../hooks/useUpdateAnyGrpcRequest'; import { useUpdateAnyHttpRequest } from '../hooks/useUpdateAnyHttpRequest'; -import type { GrpcRequest, HttpRequest } from '@yaakapp/api'; +import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models'; import { Input } from './core/Input'; import { VStack } from './core/Stacks'; diff --git a/src-web/components/BearerAuth.tsx b/src-web/components/BearerAuth.tsx index 19b9a3a2..24a42537 100644 --- a/src-web/components/BearerAuth.tsx +++ b/src-web/components/BearerAuth.tsx @@ -1,6 +1,6 @@ import { useUpdateAnyGrpcRequest } from '../hooks/useUpdateAnyGrpcRequest'; import { useUpdateAnyHttpRequest } from '../hooks/useUpdateAnyHttpRequest'; -import type { GrpcRequest, HttpRequest } from '@yaakapp/api'; +import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models'; import { Input } from './core/Input'; import { VStack } from './core/Stacks'; diff --git a/src-web/components/BinaryFileEditor.tsx b/src-web/components/BinaryFileEditor.tsx index c63678e8..52bf616b 100644 --- a/src-web/components/BinaryFileEditor.tsx +++ b/src-web/components/BinaryFileEditor.tsx @@ -1,6 +1,6 @@ import mime from 'mime'; import { useKeyValue } from '../hooks/useKeyValue'; -import type { HttpRequest } from '@yaakapp/api'; +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/CookieDialog.tsx b/src-web/components/CookieDialog.tsx index 7a9a8f93..4eff065a 100644 --- a/src-web/components/CookieDialog.tsx +++ b/src-web/components/CookieDialog.tsx @@ -1,4 +1,4 @@ -import type { Cookie } from '@yaakapp/api'; +import type { Cookie } from '@yaakapp-internal/models'; import { useCookieJars } from '../hooks/useCookieJars'; import { useUpdateCookieJar } from '../hooks/useUpdateCookieJar'; import { cookieDomain } from '../lib/model_util'; diff --git a/src-web/components/EnvironmentEditDialog.tsx b/src-web/components/EnvironmentEditDialog.tsx index 81ba4b2a..44834730 100644 --- a/src-web/components/EnvironmentEditDialog.tsx +++ b/src-web/components/EnvironmentEditDialog.tsx @@ -9,7 +9,7 @@ import { useKeyValue } from '../hooks/useKeyValue'; import { usePrompt } from '../hooks/usePrompt'; import { useUpdateEnvironment } from '../hooks/useUpdateEnvironment'; import { useUpdateWorkspace } from '../hooks/useUpdateWorkspace'; -import type { Environment, Workspace } from '@yaakapp/api'; +import type { Environment, Workspace } from '@yaakapp-internal/models'; import { Button } from './core/Button'; import { ContextMenu } from './core/Dropdown'; import type { diff --git a/src-web/components/ExportDataDialog.tsx b/src-web/components/ExportDataDialog.tsx index fc2f078d..0f4fca26 100644 --- a/src-web/components/ExportDataDialog.tsx +++ b/src-web/components/ExportDataDialog.tsx @@ -1,7 +1,7 @@ import { save } from '@tauri-apps/plugin-dialog'; import { useCallback, useMemo, useState } from 'react'; import slugify from 'slugify'; -import type { Workspace } from '@yaakapp/api'; +import type { Workspace } from '@yaakapp-internal/models'; import { count } from '../lib/pluralize'; import { invokeCmd } from '../lib/tauri'; import { Button } from './core/Button'; diff --git a/src-web/components/FormMultipartEditor.tsx b/src-web/components/FormMultipartEditor.tsx index 9abb2cfb..9dcc2499 100644 --- a/src-web/components/FormMultipartEditor.tsx +++ b/src-web/components/FormMultipartEditor.tsx @@ -1,5 +1,5 @@ import { useCallback, useMemo } from 'react'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import type { Pair, PairEditorProps } from './core/PairEditor'; import { PairEditor } from './core/PairEditor'; diff --git a/src-web/components/FormUrlencodedEditor.tsx b/src-web/components/FormUrlencodedEditor.tsx index d3b97ac0..b7d6424f 100644 --- a/src-web/components/FormUrlencodedEditor.tsx +++ b/src-web/components/FormUrlencodedEditor.tsx @@ -1,5 +1,5 @@ import { useCallback, useMemo } from 'react'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import type { Pair, PairEditorProps } from './core/PairEditor'; import { PairOrBulkEditor } from './core/PairOrBulkEditor'; diff --git a/src-web/components/GlobalHooks.tsx b/src-web/components/GlobalHooks.tsx index 4a62916b..d7ac6e20 100644 --- a/src-web/components/GlobalHooks.tsx +++ b/src-web/components/GlobalHooks.tsx @@ -1,6 +1,6 @@ import { useQueryClient } from '@tanstack/react-query'; import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'; -import type { Model } from '@yaakapp/api'; +import type { AnyModel } from '@yaakapp-internal/models'; import { useSetAtom } from 'jotai'; import { useEffect } from 'react'; import { useEnsureActiveCookieJar, useMigrateActiveCookieJarId } from '../hooks/useActiveCookieJar'; @@ -62,7 +62,7 @@ export function GlobalHooks() { const { wasUpdatedExternally } = useRequestUpdateKey(null); interface ModelPayload { - model: Model; + model: AnyModel; windowLabel: string; } @@ -94,7 +94,7 @@ export function GlobalHooks() { wasUpdatedExternally(model.id); } - const pushToFront = (['http_response', 'grpc_connection'] as Model['model'][]).includes( + const pushToFront = (['http_response', 'grpc_connection'] as AnyModel['model'][]).includes( model.model, ); @@ -197,7 +197,7 @@ export function GlobalHooks() { return null; } -function updateModelList(model: T, pushToFront: boolean) { +function updateModelList(model: T, pushToFront: boolean) { return (current: T[]): T[] => { const index = current.findIndex((v) => modelsEq(v, model)) ?? -1; if (index >= 0) { @@ -212,7 +212,7 @@ function removeById(model: T) { return (entries: T[] | undefined) => entries?.filter((e) => e.id !== model.id) ?? []; } -const shouldIgnoreModel = (payload: Model, windowLabel: string) => { +const shouldIgnoreModel = (payload: AnyModel, windowLabel: string) => { if (windowLabel === getCurrentWebviewWindow().label) { // Never ignore same-window updates return false; diff --git a/src-web/components/GraphQLEditor.tsx b/src-web/components/GraphQLEditor.tsx index 0153d4f8..67867894 100644 --- a/src-web/components/GraphQLEditor.tsx +++ b/src-web/components/GraphQLEditor.tsx @@ -2,7 +2,7 @@ import type { EditorView } from 'codemirror'; import { useCallback, useEffect, useMemo, useRef } from 'react'; import { useIntrospectGraphQL } from '../hooks/useIntrospectGraphQL'; import { tryFormatJson } from '../lib/formatters'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { Button } from './core/Button'; import type { EditorProps } from './core/Editor'; import { Editor, formatGraphQL } from './core/Editor'; diff --git a/src-web/components/GrpcConnectionMessagesPane.tsx b/src-web/components/GrpcConnectionMessagesPane.tsx index d22f1937..f1890c62 100644 --- a/src-web/components/GrpcConnectionMessagesPane.tsx +++ b/src-web/components/GrpcConnectionMessagesPane.tsx @@ -5,7 +5,7 @@ import React, { useEffect, useMemo, useState } from 'react'; import { useGrpcEvents } from '../hooks/useGrpcEvents'; import { usePinnedGrpcConnection } from '../hooks/usePinnedGrpcConnection'; import { useStateWithDeps } from '../hooks/useStateWithDeps'; -import type { GrpcEvent, GrpcRequest } from '@yaakapp/api'; +import type { GrpcEvent, GrpcRequest } from '@yaakapp-internal/models'; import { isResponseLoading } from '../lib/model_util'; import { Banner } from './core/Banner'; import { Button } from './core/Button'; diff --git a/src-web/components/GrpcConnectionSetupPane.tsx b/src-web/components/GrpcConnectionSetupPane.tsx index 25b13903..5005e453 100644 --- a/src-web/components/GrpcConnectionSetupPane.tsx +++ b/src-web/components/GrpcConnectionSetupPane.tsx @@ -6,7 +6,7 @@ import { createGlobalState } from 'react-use'; import type { ReflectResponseService } from '../hooks/useGrpc'; import { useRequestUpdateKey } from '../hooks/useRequestUpdateKey'; import { useUpdateAnyGrpcRequest } from '../hooks/useUpdateAnyGrpcRequest'; -import type { GrpcMetadataEntry, GrpcRequest } from '@yaakapp/api'; +import type { GrpcMetadataEntry, GrpcRequest } from '@yaakapp-internal/models'; import { AUTH_TYPE_BASIC, AUTH_TYPE_BEARER, AUTH_TYPE_NONE } from '../lib/model_util'; import { BasicAuth } from './BasicAuth'; import { BearerAuth } from './BearerAuth'; diff --git a/src-web/components/GrpcEditor.tsx b/src-web/components/GrpcEditor.tsx index 1e5412a2..69f2ae90 100644 --- a/src-web/components/GrpcEditor.tsx +++ b/src-web/components/GrpcEditor.tsx @@ -15,7 +15,7 @@ import { useEffect, useMemo, useRef } from 'react'; import { useAlert } from '../hooks/useAlert'; import type { ReflectResponseService } from '../hooks/useGrpc'; import { tryFormatJson } from '../lib/formatters'; -import type { GrpcRequest } from '@yaakapp/api'; +import type { GrpcRequest } from '@yaakapp-internal/models'; import { count } from '../lib/pluralize'; import { Button } from './core/Button'; import type { EditorProps } from './core/Editor'; diff --git a/src-web/components/HeadersEditor.tsx b/src-web/components/HeadersEditor.tsx index 0c37e452..47833240 100644 --- a/src-web/components/HeadersEditor.tsx +++ b/src-web/components/HeadersEditor.tsx @@ -3,7 +3,7 @@ import { connections } from '../lib/data/connections'; import { encodings } from '../lib/data/encodings'; import { headerNames } from '../lib/data/headerNames'; import { mimeTypes } from '../lib/data/mimetypes'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import type { GenericCompletionConfig } from './core/Editor/genericCompletion'; import type { PairEditorProps } from './core/PairEditor'; import { PairOrBulkEditor } from './core/PairOrBulkEditor'; diff --git a/src-web/components/HttpRequestLayout.tsx b/src-web/components/HttpRequestLayout.tsx index f5201e37..3c398647 100644 --- a/src-web/components/HttpRequestLayout.tsx +++ b/src-web/components/HttpRequestLayout.tsx @@ -1,6 +1,6 @@ import type { CSSProperties } from 'react'; import React from 'react'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { SplitLayout } from './core/SplitLayout'; import { RequestPane } from './RequestPane'; import { ResponsePane } from './ResponsePane'; diff --git a/src-web/components/MoveToWorkspaceDialog.tsx b/src-web/components/MoveToWorkspaceDialog.tsx index 6a88daec..bf9ab5ca 100644 --- a/src-web/components/MoveToWorkspaceDialog.tsx +++ b/src-web/components/MoveToWorkspaceDialog.tsx @@ -1,4 +1,4 @@ -import type { GrpcRequest, HttpRequest } from '@yaakapp/api'; +import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models'; import React, { useState } from 'react'; import { useAppRoutes } from '../hooks/useAppRoutes'; import { useUpdateAnyGrpcRequest } from '../hooks/useUpdateAnyGrpcRequest'; diff --git a/src-web/components/OpenWorkspaceDialog.tsx b/src-web/components/OpenWorkspaceDialog.tsx index dce9710f..8304db0d 100644 --- a/src-web/components/OpenWorkspaceDialog.tsx +++ b/src-web/components/OpenWorkspaceDialog.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useOpenWorkspace } from '../hooks/useOpenWorkspace'; import { useSettings } from '../hooks/useSettings'; import { useUpdateSettings } from '../hooks/useUpdateSettings'; -import type { Workspace } from '@yaakapp/api'; +import type { Workspace } from '@yaakapp-internal/models'; import { Button } from './core/Button'; import { Checkbox } from './core/Checkbox'; import { Icon } from './core/Icon'; diff --git a/src-web/components/RecentConnectionsDropdown.tsx b/src-web/components/RecentConnectionsDropdown.tsx index 84912f3e..956d97f4 100644 --- a/src-web/components/RecentConnectionsDropdown.tsx +++ b/src-web/components/RecentConnectionsDropdown.tsx @@ -1,7 +1,7 @@ import { formatDistanceToNowStrict } from 'date-fns'; import { useDeleteGrpcConnection } from '../hooks/useDeleteGrpcConnection'; import { useDeleteGrpcConnections } from '../hooks/useDeleteGrpcConnections'; -import type { GrpcConnection } from '@yaakapp/api'; +import type { GrpcConnection } from '@yaakapp-internal/models'; import { count } from '../lib/pluralize'; import { Dropdown } from './core/Dropdown'; import { Icon } from './core/Icon'; diff --git a/src-web/components/RecentResponsesDropdown.tsx b/src-web/components/RecentResponsesDropdown.tsx index 1c3b807d..4f7cf3a8 100644 --- a/src-web/components/RecentResponsesDropdown.tsx +++ b/src-web/components/RecentResponsesDropdown.tsx @@ -1,4 +1,4 @@ -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { useCopyHttpResponse } from '../hooks/useCopyHttpResponse'; import { useDeleteHttpResponse } from '../hooks/useDeleteHttpResponse'; import { useDeleteHttpResponses } from '../hooks/useDeleteHttpResponses'; diff --git a/src-web/components/RequestPane.tsx b/src-web/components/RequestPane.tsx index 4e6b3c6d..0d9917d2 100644 --- a/src-web/components/RequestPane.tsx +++ b/src-web/components/RequestPane.tsx @@ -1,4 +1,4 @@ -import type { HttpRequest, HttpRequestHeader, HttpUrlParameter } from '@yaakapp/api'; +import type { HttpRequest, HttpRequestHeader, HttpUrlParameter } from '@yaakapp-internal/models'; import classNames from 'classnames'; import type { CSSProperties } from 'react'; import React, { memo, useCallback, useMemo, useState } from 'react'; diff --git a/src-web/components/ResponseHeaders.tsx b/src-web/components/ResponseHeaders.tsx index 5061e96c..de5f0ce3 100644 --- a/src-web/components/ResponseHeaders.tsx +++ b/src-web/components/ResponseHeaders.tsx @@ -1,4 +1,4 @@ -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { KeyValueRow, KeyValueRows } from './core/KeyValueRow'; interface Props { diff --git a/src-web/components/ResponseInfo.tsx b/src-web/components/ResponseInfo.tsx index df3fc1a8..d2571090 100644 --- a/src-web/components/ResponseInfo.tsx +++ b/src-web/components/ResponseInfo.tsx @@ -1,5 +1,5 @@ import { open } from '@tauri-apps/plugin-shell'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { IconButton } from './core/IconButton'; import { KeyValueRow, KeyValueRows } from './core/KeyValueRow'; diff --git a/src-web/components/ResponsePane.tsx b/src-web/components/ResponsePane.tsx index 0f4a09a3..1c21c13e 100644 --- a/src-web/components/ResponsePane.tsx +++ b/src-web/components/ResponsePane.tsx @@ -1,4 +1,4 @@ -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import classNames from 'classnames'; import type { CSSProperties } from 'react'; import { memo, useCallback, useMemo } from 'react'; diff --git a/src-web/components/Settings/SettingsPlugins.tsx b/src-web/components/Settings/SettingsPlugins.tsx index e472e019..7ce6d6fc 100644 --- a/src-web/components/Settings/SettingsPlugins.tsx +++ b/src-web/components/Settings/SettingsPlugins.tsx @@ -1,4 +1,4 @@ -import type { Plugin } from '@yaakapp/api'; +import type { Plugin } from '@yaakapp-internal/models'; import { open } from '@tauri-apps/plugin-shell'; import React from 'react'; import { useInstallPlugin } from '../../hooks/useInstallPlugin'; diff --git a/src-web/components/Sidebar.tsx b/src-web/components/Sidebar.tsx index 7b64fa54..423eab1f 100644 --- a/src-web/components/Sidebar.tsx +++ b/src-web/components/Sidebar.tsx @@ -1,4 +1,10 @@ -import type { Folder, GrpcRequest, HttpRequest, Model, Workspace } from '@yaakapp/api'; +import type { + AnyModel, + Folder, + GrpcRequest, + HttpRequest, + Workspace, +} from '@yaakapp-internal/models'; import classNames from 'classnames'; import type { ReactNode } from 'react'; import React, { Fragment, useCallback, useMemo, useRef, useState } from 'react'; @@ -575,7 +581,7 @@ type SidebarItemProps = { itemId: string; itemName: string; itemFallbackName: string; - itemModel: Model['model']; + itemModel: AnyModel['model']; itemPrefix: ReactNode; useProminentStyles?: boolean; selected: boolean; diff --git a/src-web/components/TemplateFunctionDialog.tsx b/src-web/components/TemplateFunctionDialog.tsx index 709c538a..81862a9e 100644 --- a/src-web/components/TemplateFunctionDialog.tsx +++ b/src-web/components/TemplateFunctionDialog.tsx @@ -5,10 +5,9 @@ import type { TemplateFunctionHttpRequestArg, TemplateFunctionSelectArg, TemplateFunctionTextArg, -} from '@yaakapp/api'; +} from '@yaakapp-internal/plugin'; +import type { FnArg, Tokens } from '@yaakapp-internal/template'; import { useCallback, useMemo, useState } from 'react'; -import type { FnArg } from '../gen/FnArg'; -import type { Tokens } from '../gen/Tokens'; import { useActiveRequest } from '../hooks/useActiveRequest'; import { useDebouncedValue } from '../hooks/useDebouncedValue'; import { useHttpRequests } from '../hooks/useHttpRequests'; @@ -62,8 +61,8 @@ export function TemplateFunctionDialog({ templateFunction, hide, initialTokens, argValues[name] === NULL_ARG ? { type: 'null' } : typeof argValues[name] === 'boolean' - ? { type: 'bool', value: argValues[name] === true } - : { type: 'str', text: String(argValues[name] ?? '') }, + ? { type: 'bool', value: argValues[name] === true } + : { type: 'str', text: String(argValues[name] ?? '') }, })); return { diff --git a/src-web/components/TemplateVariableDialog.tsx b/src-web/components/TemplateVariableDialog.tsx index bbab820f..245ac999 100644 --- a/src-web/components/TemplateVariableDialog.tsx +++ b/src-web/components/TemplateVariableDialog.tsx @@ -1,5 +1,5 @@ +import type { Tokens } from '@yaakapp-internal/template'; import { useCallback, useMemo, useState } from 'react'; -import type { Tokens } from '../gen/Tokens'; import { useActiveEnvironmentVariables } from '../hooks/useActiveEnvironmentVariables'; import { useRenderTemplate } from '../hooks/useRenderTemplate'; import { useTemplateTokensToString } from '../hooks/useTemplateTokensToString'; diff --git a/src-web/components/ToastContext.tsx b/src-web/components/ToastContext.tsx index b50b1104..c7ca794b 100644 --- a/src-web/components/ToastContext.tsx +++ b/src-web/components/ToastContext.tsx @@ -1,7 +1,7 @@ +import type { ShowToastRequest } from '@yaakapp-internal/plugin'; import { AnimatePresence } from 'framer-motion'; import type { ReactNode } from 'react'; import React, { createContext, useContext, useMemo, useRef, useState } from 'react'; -import type { ShowToastRequest } from '@yaakapp/api'; import { useListenToTauriEvent } from '../hooks/useListenToTauriEvent'; import { generateId } from '../lib/generateId'; import type { ToastProps } from './core/Toast'; diff --git a/src-web/components/UrlBar.tsx b/src-web/components/UrlBar.tsx index 1d4c662c..65023e87 100644 --- a/src-web/components/UrlBar.tsx +++ b/src-web/components/UrlBar.tsx @@ -3,7 +3,7 @@ import type { EditorView } from 'codemirror'; import type { FormEvent, ReactNode } from 'react'; import { memo, useRef, useState } from 'react'; import { useHotKey } from '../hooks/useHotKey'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import type { IconProps } from './core/Icon'; import { IconButton } from './core/IconButton'; import type { InputProps } from './core/Input'; diff --git a/src-web/components/UrlParameterEditor.tsx b/src-web/components/UrlParameterEditor.tsx index fb78635d..d22753bb 100644 --- a/src-web/components/UrlParameterEditor.tsx +++ b/src-web/components/UrlParameterEditor.tsx @@ -1,4 +1,4 @@ -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { useRequestEditor, useRequestEditorEvent } from '../hooks/useRequestEditor'; import type { PairEditorRef } from './core/PairEditor'; import { PairOrBulkEditor } from './core/PairOrBulkEditor'; diff --git a/src-web/components/core/Editor/Editor.tsx b/src-web/components/core/Editor/Editor.tsx index 42aa9a5f..995215ab 100644 --- a/src-web/components/core/Editor/Editor.tsx +++ b/src-web/components/core/Editor/Editor.tsx @@ -2,7 +2,8 @@ import { defaultKeymap } from '@codemirror/commands'; import { forceParsing } from '@codemirror/language'; import { Compartment, EditorState, type Extension } from '@codemirror/state'; import { keymap, placeholder as placeholderExt, tooltips } from '@codemirror/view'; -import type { EnvironmentVariable, TemplateFunction } from '@yaakapp/api'; +import type { EnvironmentVariable } from '@yaakapp-internal/models'; +import type { TemplateFunction } from '@yaakapp-internal/plugin'; import classNames from 'classnames'; import { EditorView } from 'codemirror'; import type { MutableRefObject, ReactNode } from 'react'; diff --git a/src-web/components/core/Editor/extensions.ts b/src-web/components/core/Editor/extensions.ts index 0546f99c..a6745640 100644 --- a/src-web/components/core/Editor/extensions.ts +++ b/src-web/components/core/Editor/extensions.ts @@ -31,7 +31,8 @@ import { rectangularSelection, } from '@codemirror/view'; import { tags as t } from '@lezer/highlight'; -import type { EnvironmentVariable, TemplateFunction } from '@yaakapp/api'; +import type { EnvironmentVariable } from '@yaakapp-internal/models'; +import type { TemplateFunction } from '@yaakapp-internal/plugin'; import { graphql } from 'cm6-graphql'; import { EditorView } from 'codemirror'; import type { EditorProps } from './index'; diff --git a/src-web/components/core/Editor/twig/extension.ts b/src-web/components/core/Editor/twig/extension.ts index 8536ef70..ef979839 100644 --- a/src-web/components/core/Editor/twig/extension.ts +++ b/src-web/components/core/Editor/twig/extension.ts @@ -1,7 +1,8 @@ import type { LanguageSupport } from '@codemirror/language'; import { LRLanguage } from '@codemirror/language'; import { parseMixed } from '@lezer/common'; -import type { EnvironmentVariable, TemplateFunction } from '@yaakapp/api'; +import type { EnvironmentVariable } from '@yaakapp-internal/models'; +import type { TemplateFunction } from '@yaakapp-internal/plugin'; import type { GenericCompletionConfig } from '../genericCompletion'; import { genericCompletion } from '../genericCompletion'; import { textLanguageName } from '../text/extension'; diff --git a/src-web/components/core/HttpMethodTag.tsx b/src-web/components/core/HttpMethodTag.tsx index dd2be67c..d885eb8c 100644 --- a/src-web/components/core/HttpMethodTag.tsx +++ b/src-web/components/core/HttpMethodTag.tsx @@ -1,5 +1,5 @@ import classNames from 'classnames'; -import type { GrpcRequest, HttpRequest } from '@yaakapp/api'; +import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models'; interface Props { request: HttpRequest | GrpcRequest; @@ -34,8 +34,8 @@ export function HttpMethodTag({ shortNames, request, className }: Props) { request.model === 'http_request' && request.bodyType === 'graphql' ? 'GQL' : request.model === 'grpc_request' - ? 'GRPC' - : request.method; + ? 'GRPC' + : request.method; const m = method.toLowerCase(); const methodMap: Record = shortNames ? shortMethodMap : longMethodMap; diff --git a/src-web/components/core/StatusTag.tsx b/src-web/components/core/StatusTag.tsx index e1c0b10a..43326ec1 100644 --- a/src-web/components/core/StatusTag.tsx +++ b/src-web/components/core/StatusTag.tsx @@ -1,5 +1,5 @@ import classNames from 'classnames'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; interface Props { response: Pick; diff --git a/src-web/components/core/Toast.tsx b/src-web/components/core/Toast.tsx index f14557f9..19353d4b 100644 --- a/src-web/components/core/Toast.tsx +++ b/src-web/components/core/Toast.tsx @@ -1,4 +1,4 @@ -import type { ShowToastRequest } from '@yaakapp/api'; +import type { ShowToastRequest } from '@yaakapp-internal/plugin'; import classNames from 'classnames'; import { motion } from 'framer-motion'; import type { ReactNode } from 'react'; diff --git a/src-web/components/responseViewers/AudioViewer.tsx b/src-web/components/responseViewers/AudioViewer.tsx index 9f3fd873..c2956759 100644 --- a/src-web/components/responseViewers/AudioViewer.tsx +++ b/src-web/components/responseViewers/AudioViewer.tsx @@ -1,6 +1,6 @@ import { convertFileSrc } from '@tauri-apps/api/core'; import React from 'react'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; interface Props { response: HttpResponse; diff --git a/src-web/components/responseViewers/BinaryViewer.tsx b/src-web/components/responseViewers/BinaryViewer.tsx index 4a561b47..38f04ae7 100644 --- a/src-web/components/responseViewers/BinaryViewer.tsx +++ b/src-web/components/responseViewers/BinaryViewer.tsx @@ -1,5 +1,5 @@ import { useSaveResponse } from '../../hooks/useSaveResponse'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { getContentTypeHeader } from '../../lib/model_util'; import { Banner } from '../core/Banner'; import { Button } from '../core/Button'; diff --git a/src-web/components/responseViewers/CsvViewer.tsx b/src-web/components/responseViewers/CsvViewer.tsx index 24cbf28e..cdbf2ba7 100644 --- a/src-web/components/responseViewers/CsvViewer.tsx +++ b/src-web/components/responseViewers/CsvViewer.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import Papa from 'papaparse'; import { useMemo } from 'react'; import { useResponseBodyText } from '../../hooks/useResponseBodyText'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; interface Props { response: HttpResponse; diff --git a/src-web/components/responseViewers/HTMLOrTextViewer.tsx b/src-web/components/responseViewers/HTMLOrTextViewer.tsx index c63b5eef..388f7ab7 100644 --- a/src-web/components/responseViewers/HTMLOrTextViewer.tsx +++ b/src-web/components/responseViewers/HTMLOrTextViewer.tsx @@ -1,4 +1,4 @@ -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { useContentTypeFromHeaders } from '../../hooks/useContentTypeFromHeaders'; import { useResponseBodyText } from '../../hooks/useResponseBodyText'; import { isJSON, languageFromContentType } from '../../lib/contentType'; diff --git a/src-web/components/responseViewers/ImageViewer.tsx b/src-web/components/responseViewers/ImageViewer.tsx index 0454267c..904e33cc 100644 --- a/src-web/components/responseViewers/ImageViewer.tsx +++ b/src-web/components/responseViewers/ImageViewer.tsx @@ -1,7 +1,7 @@ import { convertFileSrc } from '@tauri-apps/api/core'; import classNames from 'classnames'; import { useState } from 'react'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; interface Props { response: HttpResponse; diff --git a/src-web/components/responseViewers/JsonViewer.tsx b/src-web/components/responseViewers/JsonViewer.tsx index a8ab0687..72c7e030 100644 --- a/src-web/components/responseViewers/JsonViewer.tsx +++ b/src-web/components/responseViewers/JsonViewer.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import { useResponseBodyText } from '../../hooks/useResponseBodyText'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { JsonAttributeTree } from '../core/JsonAttributeTree'; interface Props { diff --git a/src-web/components/responseViewers/PdfViewer.tsx b/src-web/components/responseViewers/PdfViewer.tsx index 6ef725c3..052dba8f 100644 --- a/src-web/components/responseViewers/PdfViewer.tsx +++ b/src-web/components/responseViewers/PdfViewer.tsx @@ -6,7 +6,7 @@ import type { PDFDocumentProxy } from 'pdfjs-dist'; import React, { useRef, useState } from 'react'; import { Document, Page } from 'react-pdf'; import { useDebouncedState } from '../../hooks/useDebouncedState'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import './PdfViewer.css'; interface Props { diff --git a/src-web/components/responseViewers/TextViewer.tsx b/src-web/components/responseViewers/TextViewer.tsx index c19ffd73..9655d371 100644 --- a/src-web/components/responseViewers/TextViewer.tsx +++ b/src-web/components/responseViewers/TextViewer.tsx @@ -1,4 +1,4 @@ -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import classNames from 'classnames'; import type { ReactNode } from 'react'; import { useCallback, useMemo } from 'react'; @@ -161,8 +161,8 @@ export function TextViewer({ response, pretty, className }: Props) { pretty && language === 'json' ? tryFormatJson(rawBody.data) : pretty && (language === 'xml' || language === 'html') - ? tryFormatXml(rawBody.data) - : rawBody.data; + ? tryFormatXml(rawBody.data) + : rawBody.data; let body; if (isSearching && filterText?.length > 0) { diff --git a/src-web/components/responseViewers/VideoViewer.tsx b/src-web/components/responseViewers/VideoViewer.tsx index be05f322..766d5acc 100644 --- a/src-web/components/responseViewers/VideoViewer.tsx +++ b/src-web/components/responseViewers/VideoViewer.tsx @@ -1,6 +1,6 @@ import { convertFileSrc } from '@tauri-apps/api/core'; import React from 'react'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; interface Props { response: HttpResponse; diff --git a/src-web/components/responseViewers/WebPageViewer.tsx b/src-web/components/responseViewers/WebPageViewer.tsx index ec32e290..6547f73e 100644 --- a/src-web/components/responseViewers/WebPageViewer.tsx +++ b/src-web/components/responseViewers/WebPageViewer.tsx @@ -1,6 +1,6 @@ import { useMemo } from 'react'; import { useResponseBodyText } from '../../hooks/useResponseBodyText'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; interface Props { response: HttpResponse; diff --git a/src-web/gen/Token.ts b/src-web/gen/Token.ts deleted file mode 100644 index a3021674..00000000 --- a/src-web/gen/Token.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Val } from "./Val"; - -export type Token = { "type": "raw", text: string, } | { "type": "tag", val: Val, } | { "type": "eof" }; diff --git a/src-web/gen/Tokens.ts b/src-web/gen/Tokens.ts deleted file mode 100644 index 281f2d31..00000000 --- a/src-web/gen/Tokens.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Token } from "./Token"; - -export type Tokens = { tokens: Array, }; diff --git a/src-web/hooks/useActiveEnvironmentVariables.ts b/src-web/hooks/useActiveEnvironmentVariables.ts index 45f8d7fc..d96182f5 100644 --- a/src-web/hooks/useActiveEnvironmentVariables.ts +++ b/src-web/hooks/useActiveEnvironmentVariables.ts @@ -1,4 +1,4 @@ -import type { EnvironmentVariable } from '@yaakapp/api'; +import type { EnvironmentVariable } from '@yaakapp-internal/models'; import { useMemo } from 'react'; import { useActiveEnvironment } from './useActiveEnvironment'; import { useActiveWorkspace } from './useActiveWorkspace'; diff --git a/src-web/hooks/useActiveRequest.ts b/src-web/hooks/useActiveRequest.ts index deeadc7c..6ddf06b9 100644 --- a/src-web/hooks/useActiveRequest.ts +++ b/src-web/hooks/useActiveRequest.ts @@ -1,4 +1,4 @@ -import type { GrpcRequest, HttpRequest } from '@yaakapp/api'; +import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models'; import { useActiveRequestId } from './useActiveRequestId'; import { useRequests } from './useRequests'; diff --git a/src-web/hooks/useActiveWorkspace.ts b/src-web/hooks/useActiveWorkspace.ts index f1b71e40..66d485be 100644 --- a/src-web/hooks/useActiveWorkspace.ts +++ b/src-web/hooks/useActiveWorkspace.ts @@ -1,4 +1,4 @@ -import type { Workspace } from '@yaakapp/api'; +import type { Workspace } from '@yaakapp-internal/models'; import { useMemo } from 'react'; import { useParams } from 'react-router-dom'; import type { RouteParamsWorkspace } from './useAppRoutes'; diff --git a/src-web/hooks/useAppRoutes.tsx b/src-web/hooks/useAppRoutes.tsx index d6cc47e7..8e8abdbd 100644 --- a/src-web/hooks/useAppRoutes.tsx +++ b/src-web/hooks/useAppRoutes.tsx @@ -1,4 +1,4 @@ -import type { Environment } from '@yaakapp/api'; +import type { Environment } from '@yaakapp-internal/models'; import { useCallback } from 'react'; import { useNavigate } from 'react-router-dom'; import { QUERY_COOKIE_JAR_ID } from './useActiveCookieJar'; diff --git a/src-web/hooks/useContentTypeFromHeaders.ts b/src-web/hooks/useContentTypeFromHeaders.ts index ac64198e..1f7c500d 100644 --- a/src-web/hooks/useContentTypeFromHeaders.ts +++ b/src-web/hooks/useContentTypeFromHeaders.ts @@ -1,4 +1,4 @@ -import type { HttpResponseHeader } from '@yaakapp/api'; +import type { HttpResponseHeader } from '@yaakapp-internal/models'; import { useMemo } from 'react'; export function useContentTypeFromHeaders(headers: HttpResponseHeader[] | null): string | null { diff --git a/src-web/hooks/useCookieJars.ts b/src-web/hooks/useCookieJars.ts index e78c0a8b..a85a55d9 100644 --- a/src-web/hooks/useCookieJars.ts +++ b/src-web/hooks/useCookieJars.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { CookieJar } from '@yaakapp/api'; +import type { CookieJar } from '@yaakapp-internal/models'; import { invokeCmd } from '../lib/tauri'; import { useActiveWorkspace } from './useActiveWorkspace'; diff --git a/src-web/hooks/useCopyHttpResponse.ts b/src-web/hooks/useCopyHttpResponse.ts index d208427f..92e9057a 100644 --- a/src-web/hooks/useCopyHttpResponse.ts +++ b/src-web/hooks/useCopyHttpResponse.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { useCopy } from './useCopy'; import { getResponseBodyText } from '../lib/responseBody'; diff --git a/src-web/hooks/useCreateCookieJar.ts b/src-web/hooks/useCreateCookieJar.ts index 0964610b..906a1d5f 100644 --- a/src-web/hooks/useCreateCookieJar.ts +++ b/src-web/hooks/useCreateCookieJar.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { CookieJar } from '@yaakapp/api'; +import type { CookieJar } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; import { useActiveWorkspace } from './useActiveWorkspace'; diff --git a/src-web/hooks/useCreateEnvironment.ts b/src-web/hooks/useCreateEnvironment.ts index fe58e170..d1d7ee31 100644 --- a/src-web/hooks/useCreateEnvironment.ts +++ b/src-web/hooks/useCreateEnvironment.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Environment } from '@yaakapp/api'; +import type { Environment } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; import { useActiveEnvironment } from './useActiveEnvironment'; diff --git a/src-web/hooks/useCreateFolder.ts b/src-web/hooks/useCreateFolder.ts index 7ce60490..4b149991 100644 --- a/src-web/hooks/useCreateFolder.ts +++ b/src-web/hooks/useCreateFolder.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Folder } from '@yaakapp/api'; +import type { Folder } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; import { useActiveWorkspace } from './useActiveWorkspace'; diff --git a/src-web/hooks/useCreateGrpcRequest.ts b/src-web/hooks/useCreateGrpcRequest.ts index 174d8245..4a9f4d2d 100644 --- a/src-web/hooks/useCreateGrpcRequest.ts +++ b/src-web/hooks/useCreateGrpcRequest.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { GrpcRequest } from '@yaakapp/api'; +import type { GrpcRequest } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; import { useActiveEnvironment } from './useActiveEnvironment'; diff --git a/src-web/hooks/useCreateHttpRequest.ts b/src-web/hooks/useCreateHttpRequest.ts index b5f20660..2fabe999 100644 --- a/src-web/hooks/useCreateHttpRequest.ts +++ b/src-web/hooks/useCreateHttpRequest.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; import { useActiveEnvironment } from './useActiveEnvironment'; diff --git a/src-web/hooks/useCreateWorkspace.ts b/src-web/hooks/useCreateWorkspace.ts index 42e7cb3b..6b08e69f 100644 --- a/src-web/hooks/useCreateWorkspace.ts +++ b/src-web/hooks/useCreateWorkspace.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Workspace } from '@yaakapp/api'; +import type { Workspace } from '@yaakapp-internal/models'; import { invokeCmd } from '../lib/tauri'; import { useAppRoutes } from './useAppRoutes'; import { usePrompt } from './usePrompt'; diff --git a/src-web/hooks/useDeleteAnyGrpcRequest.tsx b/src-web/hooks/useDeleteAnyGrpcRequest.tsx index fa5416a2..68d5872e 100644 --- a/src-web/hooks/useDeleteAnyGrpcRequest.tsx +++ b/src-web/hooks/useDeleteAnyGrpcRequest.tsx @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { GrpcRequest } from '@yaakapp/api'; +import type { GrpcRequest } from '@yaakapp-internal/models'; import { InlineCode } from '../components/core/InlineCode'; import { trackEvent } from '../lib/analytics'; import { fallbackRequestName } from '../lib/fallbackRequestName'; diff --git a/src-web/hooks/useDeleteAnyHttpRequest.tsx b/src-web/hooks/useDeleteAnyHttpRequest.tsx index 920126d2..bdeb358a 100644 --- a/src-web/hooks/useDeleteAnyHttpRequest.tsx +++ b/src-web/hooks/useDeleteAnyHttpRequest.tsx @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { InlineCode } from '../components/core/InlineCode'; import { trackEvent } from '../lib/analytics'; import { fallbackRequestName } from '../lib/fallbackRequestName'; diff --git a/src-web/hooks/useDeleteCookieJar.tsx b/src-web/hooks/useDeleteCookieJar.tsx index b98d002d..31ad3a42 100644 --- a/src-web/hooks/useDeleteCookieJar.tsx +++ b/src-web/hooks/useDeleteCookieJar.tsx @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { CookieJar } from '@yaakapp/api'; +import type { CookieJar } from '@yaakapp-internal/models'; import { InlineCode } from '../components/core/InlineCode'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useDeleteEnvironment.tsx b/src-web/hooks/useDeleteEnvironment.tsx index 938e32ed..0f5213eb 100644 --- a/src-web/hooks/useDeleteEnvironment.tsx +++ b/src-web/hooks/useDeleteEnvironment.tsx @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Environment } from '@yaakapp/api'; +import type { Environment } from '@yaakapp-internal/models'; import { InlineCode } from '../components/core/InlineCode'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useDeleteFolder.tsx b/src-web/hooks/useDeleteFolder.tsx index 12c26c9c..a3b6be4f 100644 --- a/src-web/hooks/useDeleteFolder.tsx +++ b/src-web/hooks/useDeleteFolder.tsx @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Folder } from '@yaakapp/api'; +import type { Folder } from '@yaakapp-internal/models'; import { InlineCode } from '../components/core/InlineCode'; import { trackEvent } from '../lib/analytics'; import { getFolder } from '../lib/store'; diff --git a/src-web/hooks/useDeleteGrpcConnection.ts b/src-web/hooks/useDeleteGrpcConnection.ts index c48bbf17..b191357c 100644 --- a/src-web/hooks/useDeleteGrpcConnection.ts +++ b/src-web/hooks/useDeleteGrpcConnection.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { GrpcConnection } from '@yaakapp/api'; +import type { GrpcConnection } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useDeleteHttpResponse.ts b/src-web/hooks/useDeleteHttpResponse.ts index 108fc50b..4fd1617a 100644 --- a/src-web/hooks/useDeleteHttpResponse.ts +++ b/src-web/hooks/useDeleteHttpResponse.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useDeleteWorkspace.tsx b/src-web/hooks/useDeleteWorkspace.tsx index b136b45f..468d81f0 100644 --- a/src-web/hooks/useDeleteWorkspace.tsx +++ b/src-web/hooks/useDeleteWorkspace.tsx @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Workspace } from '@yaakapp/api'; +import type { Workspace } from '@yaakapp-internal/models'; import { InlineCode } from '../components/core/InlineCode'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useDuplicateGrpcRequest.ts b/src-web/hooks/useDuplicateGrpcRequest.ts index 6c161c9c..19a830f7 100644 --- a/src-web/hooks/useDuplicateGrpcRequest.ts +++ b/src-web/hooks/useDuplicateGrpcRequest.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { GrpcRequest } from '@yaakapp/api'; +import type { GrpcRequest } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; import { useActiveEnvironment } from './useActiveEnvironment'; diff --git a/src-web/hooks/useDuplicateHttpRequest.ts b/src-web/hooks/useDuplicateHttpRequest.ts index b48584f2..916035cd 100644 --- a/src-web/hooks/useDuplicateHttpRequest.ts +++ b/src-web/hooks/useDuplicateHttpRequest.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; import { useActiveEnvironment } from './useActiveEnvironment'; diff --git a/src-web/hooks/useEnvironments.ts b/src-web/hooks/useEnvironments.ts index 1e0b1c04..a1f7b396 100644 --- a/src-web/hooks/useEnvironments.ts +++ b/src-web/hooks/useEnvironments.ts @@ -1,4 +1,4 @@ -import type { Environment } from '@yaakapp/api'; +import type { Environment } from '@yaakapp-internal/models'; import { atom, useAtom } from 'jotai/index'; import { useEffect } from 'react'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useFilterResponse.ts b/src-web/hooks/useFilterResponse.ts index e921f303..090874a3 100644 --- a/src-web/hooks/useFilterResponse.ts +++ b/src-web/hooks/useFilterResponse.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { FilterResponse } from '@yaakapp/api'; +import type { FilterResponse } from '@yaakapp-internal/plugin'; import { invokeCmd } from '../lib/tauri'; export function useFilterResponse({ diff --git a/src-web/hooks/useFolders.ts b/src-web/hooks/useFolders.ts index f459f9f9..2dbfd504 100644 --- a/src-web/hooks/useFolders.ts +++ b/src-web/hooks/useFolders.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { Folder } from '@yaakapp/api'; +import type { Folder } from '@yaakapp-internal/models'; import { invokeCmd } from '../lib/tauri'; import { useActiveWorkspace } from './useActiveWorkspace'; diff --git a/src-web/hooks/useGrpc.ts b/src-web/hooks/useGrpc.ts index 2c107278..f5b8a276 100644 --- a/src-web/hooks/useGrpc.ts +++ b/src-web/hooks/useGrpc.ts @@ -1,6 +1,6 @@ import { useMutation, useQuery } from '@tanstack/react-query'; import { emit } from '@tauri-apps/api/event'; -import type { GrpcConnection, GrpcRequest } from '@yaakapp/api'; +import type { GrpcConnection, GrpcRequest } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { minPromiseMillis } from '../lib/minPromiseMillis'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useGrpcConnections.ts b/src-web/hooks/useGrpcConnections.ts index 3389f6d1..83a8e0f0 100644 --- a/src-web/hooks/useGrpcConnections.ts +++ b/src-web/hooks/useGrpcConnections.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { GrpcConnection } from '@yaakapp/api'; +import type { GrpcConnection } from '@yaakapp-internal/models'; import { invokeCmd } from '../lib/tauri'; export function grpcConnectionsQueryKey({ requestId }: { requestId: string }) { diff --git a/src-web/hooks/useGrpcEvents.ts b/src-web/hooks/useGrpcEvents.ts index 17224418..9d44db2c 100644 --- a/src-web/hooks/useGrpcEvents.ts +++ b/src-web/hooks/useGrpcEvents.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { GrpcEvent } from '@yaakapp/api'; +import type { GrpcEvent } from '@yaakapp-internal/models'; import { invokeCmd } from '../lib/tauri'; export function grpcEventsQueryKey({ connectionId }: { connectionId: string }) { diff --git a/src-web/hooks/useGrpcRequest.ts b/src-web/hooks/useGrpcRequest.ts index cc0e1655..41aacb2c 100644 --- a/src-web/hooks/useGrpcRequest.ts +++ b/src-web/hooks/useGrpcRequest.ts @@ -1,4 +1,4 @@ -import type { GrpcRequest } from '@yaakapp/api'; +import type { GrpcRequest } from '@yaakapp-internal/models'; import { useGrpcRequests } from './useGrpcRequests'; export function useGrpcRequest(id: string | null): GrpcRequest | null { diff --git a/src-web/hooks/useGrpcRequests.ts b/src-web/hooks/useGrpcRequests.ts index c2fa5701..f7efa5cc 100644 --- a/src-web/hooks/useGrpcRequests.ts +++ b/src-web/hooks/useGrpcRequests.ts @@ -1,4 +1,4 @@ -import type { GrpcRequest } from '@yaakapp/api'; +import type { GrpcRequest } from '@yaakapp-internal/models'; import { atom, useAtom } from 'jotai'; import { useEffect } from 'react'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useHttpRequest.ts b/src-web/hooks/useHttpRequest.ts index e399725e..5164b1c5 100644 --- a/src-web/hooks/useHttpRequest.ts +++ b/src-web/hooks/useHttpRequest.ts @@ -1,4 +1,4 @@ -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { useHttpRequests } from './useHttpRequests'; export function useHttpRequest(id: string | null): HttpRequest | null { diff --git a/src-web/hooks/useHttpRequestActions.ts b/src-web/hooks/useHttpRequestActions.ts index e8ee9bcc..1eaa7775 100644 --- a/src-web/hooks/useHttpRequestActions.ts +++ b/src-web/hooks/useHttpRequestActions.ts @@ -1,9 +1,9 @@ import { useQuery } from '@tanstack/react-query'; +import type { HttpRequest } from '@yaakapp-internal/models'; import type { CallHttpRequestActionRequest, GetHttpRequestActionsResponse, - HttpRequest, -} from '@yaakapp/api'; +} from '@yaakapp-internal/plugin'; import { invokeCmd } from '../lib/tauri'; import { usePluginsKey } from './usePlugins'; diff --git a/src-web/hooks/useHttpRequests.ts b/src-web/hooks/useHttpRequests.ts index e25634b0..a6445759 100644 --- a/src-web/hooks/useHttpRequests.ts +++ b/src-web/hooks/useHttpRequests.ts @@ -1,4 +1,4 @@ -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { atom, useAtom } from 'jotai'; import { useEffect } from 'react'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useHttpResponses.ts b/src-web/hooks/useHttpResponses.ts index f17f3dcd..d67726eb 100644 --- a/src-web/hooks/useHttpResponses.ts +++ b/src-web/hooks/useHttpResponses.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { invokeCmd } from '../lib/tauri'; export function httpResponsesQueryKey({ requestId }: { requestId: string }) { diff --git a/src-web/hooks/useImportData.tsx b/src-web/hooks/useImportData.tsx index b7d53b36..c1046181 100644 --- a/src-web/hooks/useImportData.tsx +++ b/src-web/hooks/useImportData.tsx @@ -1,5 +1,11 @@ import { useMutation } from '@tanstack/react-query'; -import type { Environment, Folder, GrpcRequest, HttpRequest, Workspace } from '@yaakapp/api'; +import type { + Environment, + Folder, + GrpcRequest, + HttpRequest, + Workspace, +} from '@yaakapp-internal/models'; import { Button } from '../components/core/Button'; import { FormattedError } from '../components/core/FormattedError'; import { VStack } from '../components/core/Stacks'; diff --git a/src-web/hooks/useImportQuerystring.ts b/src-web/hooks/useImportQuerystring.ts index d95a20d4..2b3938f5 100644 --- a/src-web/hooks/useImportQuerystring.ts +++ b/src-web/hooks/useImportQuerystring.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { HttpUrlParameter } from '@yaakapp/api'; +import type { HttpUrlParameter } from '@yaakapp-internal/models'; import { useToast } from '../components/ToastContext'; import { pluralize } from '../lib/pluralize'; import { getHttpRequest } from '../lib/store'; diff --git a/src-web/hooks/useIntrospectGraphQL.ts b/src-web/hooks/useIntrospectGraphQL.ts index 99f3c60e..60252fb9 100644 --- a/src-web/hooks/useIntrospectGraphQL.ts +++ b/src-web/hooks/useIntrospectGraphQL.ts @@ -1,4 +1,4 @@ -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import type { IntrospectionQuery } from 'graphql'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { buildClientSchema, getIntrospectionQuery } from '../components/core/Editor'; diff --git a/src-web/hooks/useLatestGrpcConnection.ts b/src-web/hooks/useLatestGrpcConnection.ts index a9164261..b7fe9d8f 100644 --- a/src-web/hooks/useLatestGrpcConnection.ts +++ b/src-web/hooks/useLatestGrpcConnection.ts @@ -1,4 +1,4 @@ -import type { GrpcConnection } from '@yaakapp/api'; +import type { GrpcConnection } from '@yaakapp-internal/models'; import { useGrpcConnections } from './useGrpcConnections'; export function useLatestGrpcConnection(requestId: string | null): GrpcConnection | null { diff --git a/src-web/hooks/useLatestHttpResponse.ts b/src-web/hooks/useLatestHttpResponse.ts index 8d6e3958..adfdbe6c 100644 --- a/src-web/hooks/useLatestHttpResponse.ts +++ b/src-web/hooks/useLatestHttpResponse.ts @@ -1,4 +1,4 @@ -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { useHttpResponses } from './useHttpResponses'; export function useLatestHttpResponse(requestId: string | null): HttpResponse | null { diff --git a/src-web/hooks/useParseTemplate.ts b/src-web/hooks/useParseTemplate.ts index 38c5880b..201cc5aa 100644 --- a/src-web/hooks/useParseTemplate.ts +++ b/src-web/hooks/useParseTemplate.ts @@ -1,6 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import type { Tokens } from '../gen/Tokens'; import { invokeCmd } from '../lib/tauri'; +import type { Tokens } from '@yaakapp-internal/template'; export function useParseTemplate(template: string) { return useQuery({ diff --git a/src-web/hooks/usePinnedGrpcConnection.ts b/src-web/hooks/usePinnedGrpcConnection.ts index 98b74050..a062a924 100644 --- a/src-web/hooks/usePinnedGrpcConnection.ts +++ b/src-web/hooks/usePinnedGrpcConnection.ts @@ -1,4 +1,4 @@ -import type { GrpcConnection, GrpcRequest } from '@yaakapp/api'; +import type { GrpcConnection, GrpcRequest } from '@yaakapp-internal/models'; import { useGrpcConnections } from './useGrpcConnections'; import { useKeyValue } from './useKeyValue'; import { useLatestGrpcConnection } from './useLatestGrpcConnection'; diff --git a/src-web/hooks/usePinnedHttpResponse.ts b/src-web/hooks/usePinnedHttpResponse.ts index e40299f5..00f44731 100644 --- a/src-web/hooks/usePinnedHttpResponse.ts +++ b/src-web/hooks/usePinnedHttpResponse.ts @@ -1,4 +1,4 @@ -import type { HttpRequest, HttpResponse } from '@yaakapp/api'; +import type { HttpRequest, HttpResponse } from '@yaakapp-internal/models'; import { useHttpResponses } from './useHttpResponses'; import { useKeyValue } from './useKeyValue'; import { useLatestHttpResponse } from './useLatestHttpResponse'; diff --git a/src-web/hooks/usePluginInfo.ts b/src-web/hooks/usePluginInfo.ts index 081e592b..c24dbf44 100644 --- a/src-web/hooks/usePluginInfo.ts +++ b/src-web/hooks/usePluginInfo.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { BootResponse } from '@yaakapp/api'; +import type { BootResponse } from '@yaakapp-internal/plugin'; import { invokeCmd } from '../lib/tauri'; export function usePluginInfo(id: string) { diff --git a/src-web/hooks/usePlugins.ts b/src-web/hooks/usePlugins.ts index beba38bc..68a790f1 100644 --- a/src-web/hooks/usePlugins.ts +++ b/src-web/hooks/usePlugins.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Plugin } from '@yaakapp/api'; +import type { Plugin } from '@yaakapp-internal/models'; import { atom, useAtomValue, useSetAtom } from 'jotai'; import { minPromiseMillis } from '../lib/minPromiseMillis'; import { listPlugins } from '../lib/store'; diff --git a/src-web/hooks/useRenameRequest.tsx b/src-web/hooks/useRenameRequest.tsx index d53b681d..34fc3a97 100644 --- a/src-web/hooks/useRenameRequest.tsx +++ b/src-web/hooks/useRenameRequest.tsx @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { GrpcRequest, HttpRequest } from '@yaakapp/api'; +import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models'; import { InlineCode } from '../components/core/InlineCode'; import { usePrompt } from './usePrompt'; import { useRequests } from './useRequests'; diff --git a/src-web/hooks/useResponseBodyBlob.ts b/src-web/hooks/useResponseBodyBlob.ts index 1e421df9..85e425f5 100644 --- a/src-web/hooks/useResponseBodyBlob.ts +++ b/src-web/hooks/useResponseBodyBlob.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { getResponseBodyBlob } from '../lib/responseBody'; export function useResponseBodyBlob(response: HttpResponse) { diff --git a/src-web/hooks/useResponseBodyText.ts b/src-web/hooks/useResponseBodyText.ts index 4ee80f48..e631f227 100644 --- a/src-web/hooks/useResponseBodyText.ts +++ b/src-web/hooks/useResponseBodyText.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { getResponseBodyText } from '../lib/responseBody'; export function useResponseBodyText(response: HttpResponse) { diff --git a/src-web/hooks/useSaveResponse.tsx b/src-web/hooks/useSaveResponse.tsx index 6122cdb0..3c5bcf15 100644 --- a/src-web/hooks/useSaveResponse.tsx +++ b/src-web/hooks/useSaveResponse.tsx @@ -4,7 +4,7 @@ import mime from 'mime'; import slugify from 'slugify'; import { InlineCode } from '../components/core/InlineCode'; import { useToast } from '../components/ToastContext'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { getContentTypeHeader } from '../lib/model_util'; import { getHttpRequest } from '../lib/store'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useSendAnyHttpRequest.ts b/src-web/hooks/useSendAnyHttpRequest.ts index 1029c018..f0b007fa 100644 --- a/src-web/hooks/useSendAnyHttpRequest.ts +++ b/src-web/hooks/useSendAnyHttpRequest.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; import { useActiveCookieJar } from './useActiveCookieJar'; diff --git a/src-web/hooks/useSettings.ts b/src-web/hooks/useSettings.ts index 470686ca..9d88c57c 100644 --- a/src-web/hooks/useSettings.ts +++ b/src-web/hooks/useSettings.ts @@ -1,4 +1,4 @@ -import type { Settings } from '@yaakapp/api'; +import type { Settings } from '@yaakapp-internal/models'; import { useAtomValue } from 'jotai'; import { atom } from 'jotai/index'; import { getSettings } from '../lib/store'; diff --git a/src-web/hooks/useTemplateFunctions.ts b/src-web/hooks/useTemplateFunctions.ts index 4b2d5116..7bbea0b5 100644 --- a/src-web/hooks/useTemplateFunctions.ts +++ b/src-web/hooks/useTemplateFunctions.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { GetTemplateFunctionsResponse } from '@yaakapp/api'; +import type { GetTemplateFunctionsResponse } from '@yaakapp-internal/plugin'; import { invokeCmd } from '../lib/tauri'; import { usePluginsKey } from './usePlugins'; diff --git a/src-web/hooks/useTemplateTokensToString.ts b/src-web/hooks/useTemplateTokensToString.ts index 1f2fb05d..7f073329 100644 --- a/src-web/hooks/useTemplateTokensToString.ts +++ b/src-web/hooks/useTemplateTokensToString.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import type { Tokens } from '../gen/Tokens'; +import type { Tokens } from '@yaakapp-internal/template'; import { invokeCmd } from '../lib/tauri'; export function useTemplateTokensToString(tokens: Tokens) { diff --git a/src-web/hooks/useUninstallPlugin.ts b/src-web/hooks/useUninstallPlugin.ts index bf48d958..2b6ad6e0 100644 --- a/src-web/hooks/useUninstallPlugin.ts +++ b/src-web/hooks/useUninstallPlugin.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Plugin } from '@yaakapp/api'; +import type { Plugin } from '@yaakapp-internal/models'; import { trackEvent } from '../lib/analytics'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useUpdateAnyFolder.ts b/src-web/hooks/useUpdateAnyFolder.ts index f830b7f9..50e23403 100644 --- a/src-web/hooks/useUpdateAnyFolder.ts +++ b/src-web/hooks/useUpdateAnyFolder.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Folder } from '@yaakapp/api'; +import type { Folder } from '@yaakapp-internal/models'; import { getFolder } from '../lib/store'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useUpdateAnyGrpcRequest.ts b/src-web/hooks/useUpdateAnyGrpcRequest.ts index 930f4f0b..88fce22e 100644 --- a/src-web/hooks/useUpdateAnyGrpcRequest.ts +++ b/src-web/hooks/useUpdateAnyGrpcRequest.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { GrpcRequest } from '@yaakapp/api'; +import type { GrpcRequest } from '@yaakapp-internal/models'; import { getGrpcRequest } from '../lib/store'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useUpdateAnyHttpRequest.ts b/src-web/hooks/useUpdateAnyHttpRequest.ts index 73902de0..40987b65 100644 --- a/src-web/hooks/useUpdateAnyHttpRequest.ts +++ b/src-web/hooks/useUpdateAnyHttpRequest.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { HttpRequest } from '@yaakapp/api'; +import type { HttpRequest } from '@yaakapp-internal/models'; import { getHttpRequest } from '../lib/store'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useUpdateCookieJar.ts b/src-web/hooks/useUpdateCookieJar.ts index 8a186f5f..05806ab3 100644 --- a/src-web/hooks/useUpdateCookieJar.ts +++ b/src-web/hooks/useUpdateCookieJar.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { CookieJar } from '@yaakapp/api'; +import type { CookieJar } from '@yaakapp-internal/models'; import { getCookieJar } from '../lib/store'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useUpdateEnvironment.ts b/src-web/hooks/useUpdateEnvironment.ts index f407e298..3982fcc3 100644 --- a/src-web/hooks/useUpdateEnvironment.ts +++ b/src-web/hooks/useUpdateEnvironment.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Environment } from '@yaakapp/api'; +import type { Environment } from '@yaakapp-internal/models'; import { getEnvironment } from '../lib/store'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useUpdateSettings.ts b/src-web/hooks/useUpdateSettings.ts index 9f81a937..5681267b 100644 --- a/src-web/hooks/useUpdateSettings.ts +++ b/src-web/hooks/useUpdateSettings.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Settings } from '@yaakapp/api'; +import type { Settings } from '@yaakapp-internal/models'; import { getSettings } from '../lib/store'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useUpdateWorkspace.ts b/src-web/hooks/useUpdateWorkspace.ts index 51893328..bd9fb210 100644 --- a/src-web/hooks/useUpdateWorkspace.ts +++ b/src-web/hooks/useUpdateWorkspace.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import type { Workspace } from '@yaakapp/api'; +import type { Workspace } from '@yaakapp-internal/models'; import { getWorkspace } from '../lib/store'; import { invokeCmd } from '../lib/tauri'; diff --git a/src-web/hooks/useWorkspaces.ts b/src-web/hooks/useWorkspaces.ts index 00b9144f..38a0fda9 100644 --- a/src-web/hooks/useWorkspaces.ts +++ b/src-web/hooks/useWorkspaces.ts @@ -1,4 +1,4 @@ -import type { Workspace } from '@yaakapp/api'; +import type { Workspace } from '@yaakapp-internal/models'; import { atom, useAtomValue } from 'jotai'; import { listWorkspaces } from '../lib/store'; diff --git a/index.html b/src-web/index.html similarity index 92% rename from index.html rename to src-web/index.html index 73eacd89..8cfafc4c 100644 --- a/index.html +++ b/src-web/index.html @@ -26,6 +26,6 @@
- + diff --git a/src-web/lib/fallbackRequestName.ts b/src-web/lib/fallbackRequestName.ts index 1ce53a73..e7d7e760 100644 --- a/src-web/lib/fallbackRequestName.ts +++ b/src-web/lib/fallbackRequestName.ts @@ -1,4 +1,4 @@ -import type { GrpcRequest, HttpRequest } from '@yaakapp/api'; +import type { GrpcRequest, HttpRequest } from '@yaakapp-internal/models'; export function fallbackRequestName(r: HttpRequest | GrpcRequest | null): string { if (r == null) return ''; diff --git a/src-web/lib/keyValueStore.ts b/src-web/lib/keyValueStore.ts index 48c89804..e8b6dd20 100644 --- a/src-web/lib/keyValueStore.ts +++ b/src-web/lib/keyValueStore.ts @@ -1,4 +1,4 @@ -import type { KeyValue } from '@yaakapp/api'; +import type { KeyValue } from '@yaakapp-internal/models'; import { invokeCmd } from './tauri'; export async function setKeyValue({ diff --git a/src-web/lib/model_util.ts b/src-web/lib/model_util.ts index e485e52b..40d3be47 100644 --- a/src-web/lib/model_util.ts +++ b/src-web/lib/model_util.ts @@ -1,4 +1,10 @@ -import type { Cookie, GrpcConnection, HttpResponse, HttpResponseHeader, Model } from '@yaakapp/api'; +import type { + AnyModel, + Cookie, + GrpcConnection, + HttpResponse, + HttpResponseHeader, +} from '@yaakapp-internal/models'; export const BODY_TYPE_NONE = null; export const BODY_TYPE_GRAPHQL = 'graphql'; @@ -30,7 +36,7 @@ export function isResponseLoading(response: HttpResponse | GrpcConnection): bool return response.elapsed === 0; } -export function modelsEq(a: Model, b: Model) { +export function modelsEq(a: AnyModel, b: AnyModel) { if (a.model != b.model) { return false; } diff --git a/src-web/lib/responseBody.ts b/src-web/lib/responseBody.ts index 234e2f46..a54b24f9 100644 --- a/src-web/lib/responseBody.ts +++ b/src-web/lib/responseBody.ts @@ -1,5 +1,5 @@ import { readFile } from '@tauri-apps/plugin-fs'; -import type { HttpResponse } from '@yaakapp/api'; +import type { HttpResponse } from '@yaakapp-internal/models'; import { getCharsetFromContentType } from './model_util'; export async function getResponseBodyText(response: HttpResponse): Promise { diff --git a/src-web/lib/sendEphemeralRequest.ts b/src-web/lib/sendEphemeralRequest.ts index d007ebb8..98cd73c1 100644 --- a/src-web/lib/sendEphemeralRequest.ts +++ b/src-web/lib/sendEphemeralRequest.ts @@ -1,4 +1,4 @@ -import type { HttpRequest, HttpResponse } from '@yaakapp/api'; +import type { HttpRequest, HttpResponse } from '@yaakapp-internal/models'; import { invokeCmd } from './tauri'; export async function sendEphemeralRequest( diff --git a/src-web/lib/store.ts b/src-web/lib/store.ts index c11b0ca3..e5639072 100644 --- a/src-web/lib/store.ts +++ b/src-web/lib/store.ts @@ -7,7 +7,7 @@ import type { Plugin, Settings, Workspace, -} from '@yaakapp/api'; +} from '@yaakapp-internal/models'; import { invokeCmd } from './tauri'; export async function getSettings(): Promise { diff --git a/src-web/package.json b/src-web/package.json new file mode 100644 index 00000000..b2942083 --- /dev/null +++ b/src-web/package.json @@ -0,0 +1,83 @@ +{ + "name": "@yaakapp/app", + "private": true, + "version": "1.0.0", + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "lint": "tsc && eslint . --ext .ts,.tsx" + }, + "dependencies": { + "@codemirror/commands": "^6", + "@codemirror/lang-javascript": "^6", + "@codemirror/lang-json": "^6", + "@codemirror/lang-xml": "^6", + "@codemirror/language": "^6", + "@codemirror/search": "^6", + "@lezer/generator": "^1.7.1", + "@lezer/highlight": "^1.2.1", + "@lezer/lr": "^1.4.2", + "@react-hook/resize-observer": "^2.0.2", + "@tailwindcss/container-queries": "^0.1.1", + "@tanstack/react-query": "^5.55.4", + "@tauri-apps/api": "^2.0.0-rc.5", + "@tauri-apps/plugin-clipboard-manager": "^2.0.0-rc.2", + "@tauri-apps/plugin-dialog": "^2.0.0-rc.1", + "@tauri-apps/plugin-fs": "^2.0.0-rc.2", + "@tauri-apps/plugin-log": "^2.0.0-rc.1", + "@tauri-apps/plugin-os": "^2.0.0-rc.1", + "@tauri-apps/plugin-shell": "^2.0.0-rc.1", + "buffer": "^6.0.3", + "classnames": "^2.5.1", + "cm6-graphql": "^0.0.9", + "codemirror": "^6.0.1", + "codemirror-json-schema": "^0.7.8", + "date-fns": "^3.6.0", + "eventemitter3": "^5.0.1", + "fast-fuzzy": "^1.12.0", + "focus-trap-react": "^10.2.3", + "format-graphql": "^1.5.0", + "framer-motion": "^11.5.4", + "jotai": "^2.9.3", + "lucide-react": "^0.439.0", + "mime": "^4.0.4", + "papaparse": "^5.4.1", + "parse-color": "^1.0.0", + "react": "^18.3.1", + "react-dnd": "^16.0.1", + "react-dnd-html5-backend": "^16.0.1", + "react-dom": "^18.3.1", + "react-helmet-async": "^2.0.5", + "react-pdf": "^9.1.0", + "react-router-dom": "^6.26.2", + "react-use": "^17.5.1", + "slugify": "^1.6.6", + "uuid": "^10.0.0", + "xml-formatter": "^3.6.3" + }, + "devDependencies": { + "@tailwindcss/nesting": "^0.0.0-insiders.565cd3e", + "@tanstack/react-query-devtools": "^5.55.4", + "@tauri-apps/cli": "^2.0.0-rc.16", + "@types/node": "^22.5.4", + "@types/papaparse": "^5.3.14", + "@types/parse-color": "^1.0.3", + "@types/parse-json": "^4.0.2", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@types/uuid": "^10.0.0", + "@vitejs/plugin-react": "^4.3.1", + "autoprefixer": "^10.4.20", + "decompress": "^4.2.1", + "internal-ip": "^8.0.0", + "postcss": "^8.4.45", + "postcss-nesting": "^13.0.0", + "react-devtools": "^5.3.1", + "tailwindcss": "^3.4.10", + "vite": "^5.4.6", + "vite-plugin-static-copy": "^1.0.6", + "vite-plugin-svgr": "^4.2.0", + "vite-plugin-top-level-await": "^1.4.4" + } +} diff --git a/postcss.config.cjs b/src-web/postcss.config.cjs similarity index 100% rename from postcss.config.cjs rename to src-web/postcss.config.cjs diff --git a/tailwind.config.cjs b/src-web/tailwind.config.cjs similarity index 97% rename from tailwind.config.cjs rename to src-web/tailwind.config.cjs index 27dceee9..02aba34b 100644 --- a/tailwind.config.cjs +++ b/src-web/tailwind.config.cjs @@ -10,7 +10,7 @@ const sizes = { /** @type {import("tailwindcss").Config} */ module.exports = { darkMode: ['class', '[data-resolved-appearance="dark"]'], - content: ['./index.html', './src-web/**/*.{html,js,jsx,ts,tsx}'], + content: ['./index.html', './**/*.{html,js,jsx,ts,tsx}'], theme: { extend: { opacity: { diff --git a/tsconfig.json b/src-web/tsconfig.json similarity index 82% rename from tsconfig.json rename to src-web/tsconfig.json index d4ebf399..8d6ab483 100644 --- a/tsconfig.json +++ b/src-web/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "target": "es2021", - "lib": ["DOM", "DOM.Iterable", "ESNext"], + "lib": [ + "DOM", + "DOM.Iterable", + "ESNext" + ], "useDefineForClassFields": true, "allowJs": false, "skipLibCheck": true, @@ -18,8 +22,10 @@ "jsx": "react-jsx" }, "include": [ - "src-web", - "src-web/modules.d.ts", + "." + ], + "exclude": [ + "vite.config.ts" ], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/tsconfig.node.json b/src-web/tsconfig.node.json similarity index 100% rename from tsconfig.node.json rename to src-web/tsconfig.node.json diff --git a/vite.config.ts b/src-web/vite.config.ts similarity index 93% rename from vite.config.ts rename to src-web/vite.config.ts index f8d1fa9d..9d9c02b9 100644 --- a/vite.config.ts +++ b/src-web/vite.config.ts @@ -1,7 +1,7 @@ +import path from 'node:path'; import react from '@vitejs/plugin-react'; import { internalIpV4 } from 'internal-ip'; import { createRequire } from 'node:module'; -import path from 'node:path'; import { defineConfig, normalizePath } from 'vite'; import { viteStaticCopy } from 'vite-plugin-static-copy'; import svgr from 'vite-plugin-svgr'; @@ -42,9 +42,6 @@ export default defineConfig(async () => ({ port: 1421, } : undefined, - watch: { - ignored: ['**/src-tauri/**', '**/designs/**', '**/plugins/**'], - }, }, envPrefix: ['VITE_', 'TAURI_'], }));