mirror of
https://github.com/meienberger/runtipi.git
synced 2024-09-11 20:17:23 +03:00
* refactor(app-store): improve apps payload to include only necessary fields * chore: downgrade to pnpm v9 * chore(deps): bump the minor-patch group across 1 directory with 7 updates Bumps the minor-patch group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [next](https://github.com/vercel/next.js) | `14.2.2` | `14.2.3` | | [react](https://github.com/facebook/react/tree/HEAD/packages/react) | `18.2.0` | `18.3.1` | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.79` | `18.3.1` | | [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) | `18.2.0` | `18.3.1` | | [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `18.2.25` | `18.3.0` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.7` | `20.12.8` | | [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `14.2.2` | `14.2.3` | Updates `next` from 14.2.2 to 14.2.3 - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v14.2.2...v14.2.3) Updates `react` from 18.2.0 to 18.3.1 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react) Updates `@types/react` from 18.2.79 to 18.3.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) Updates `react-dom` from 18.2.0 to 18.3.1 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom) Updates `@types/react-dom` from 18.2.25 to 18.3.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) Updates `@types/node` from 20.12.7 to 20.12.8 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@types/react` from 18.2.79 to 18.3.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) Updates `@types/react-dom` from 18.2.25 to 18.3.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) Updates `eslint-config-next` from 14.2.2 to 14.2.3 - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/commits/v14.2.3/packages/eslint-config-next) --- updated-dependencies: - dependency-name: next dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: react dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: react-dom dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: "@types/react-dom" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: "@types/react-dom" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: eslint-config-next dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-patch ... Signed-off-by: dependabot[bot] <support@github.com> * feat: add tipi minimum version requirement when installing and updating * feat(dashboard): add warning if internal ip is public fix(dashboard): fix eslint error * New Crowdin updates (#1387) * New translations en.json (French) * New translations en.json (Turkish) * New translations en.json (Romanian) * New translations en.json (Spanish) * New translations en.json (Afrikaans) * New translations en.json (Arabic) * New translations en.json (Catalan) * New translations en.json (Czech) * New translations en.json (Danish) * New translations en.json (German) * New translations en.json (Greek) * New translations en.json (Finnish) * New translations en.json (Hebrew) * New translations en.json (Hungarian) * New translations en.json (Italian) * New translations en.json (Japanese) * New translations en.json (Korean) * New translations en.json (Dutch) * New translations en.json (Norwegian) * New translations en.json (Polish) * New translations en.json (Portuguese) * New translations en.json (Russian) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Swedish) * New translations en.json (Ukrainian) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Traditional) * New translations en.json (English) * New translations en.json (Vietnamese) * New translations en.json (Portuguese, Brazilian) * New translations en.json (Russian) * New translations en.json (Vietnamese) * New translations en.json (Portuguese, Brazilian) * New translations en.json (Portuguese, Brazilian) * New translations en.json (French) * New translations en.json (Turkish) * New translations en.json (Romanian) * New translations en.json (Spanish) * New translations en.json (Afrikaans) * New translations en.json (Arabic) * New translations en.json (Catalan) * New translations en.json (Czech) * New translations en.json (Danish) * New translations en.json (German) * New translations en.json (Greek) * New translations en.json (Finnish) * New translations en.json (Hebrew) * New translations en.json (Hungarian) * New translations en.json (Italian) * New translations en.json (Japanese) * New translations en.json (Korean) * New translations en.json (Dutch) * New translations en.json (Norwegian) * New translations en.json (Polish) * New translations en.json (Portuguese) * New translations en.json (Russian) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Swedish) * New translations en.json (Ukrainian) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Traditional) * New translations en.json (English) * New translations en.json (Vietnamese) * New translations en.json (Portuguese, Brazilian) * New translations en.json (Russian) * New translations en.json (Portuguese, Brazilian) * New translations en.json (Portuguese, Brazilian) * New translations en.json (French) * New translations en.json (Turkish) * New translations en.json (Romanian) * New translations en.json (Spanish) * New translations en.json (Afrikaans) * New translations en.json (Arabic) * New translations en.json (Catalan) * New translations en.json (Czech) * New translations en.json (Danish) * New translations en.json (German) * New translations en.json (Greek) * New translations en.json (Finnish) * New translations en.json (Hebrew) * New translations en.json (Hungarian) * New translations en.json (Italian) * New translations en.json (Japanese) * New translations en.json (Korean) * New translations en.json (Dutch) * New translations en.json (Norwegian) * New translations en.json (Polish) * New translations en.json (Portuguese) * New translations en.json (Russian) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Swedish) * New translations en.json (Ukrainian) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Traditional) * New translations en.json (English) * New translations en.json (Vietnamese) * New translations en.json (Portuguese, Brazilian) * chore(deps-dev): bump @testing-library/react from 14.3.1 to 15.0.6 Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 14.3.1 to 15.0.6. - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v14.3.1...v15.0.6) --- updated-dependencies: - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump @testing-library/dom from 9.3.4 to 10.1.0 Bumps [@testing-library/dom](https://github.com/testing-library/dom-testing-library) from 9.3.4 to 10.1.0. - [Release notes](https://github.com/testing-library/dom-testing-library/releases) - [Changelog](https://github.com/testing-library/dom-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/dom-testing-library/compare/v9.3.4...v10.1.0) --- updated-dependencies: - dependency-name: "@testing-library/dom" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * New Crowdin updates (#1396) * New translations en.json (French) * New translations en.json (Turkish) * New translations en.json (Romanian) * New translations en.json (Spanish) * New translations en.json (Afrikaans) * New translations en.json (Arabic) * New translations en.json (Catalan) * New translations en.json (Czech) * New translations en.json (Danish) * New translations en.json (German) * New translations en.json (Greek) * New translations en.json (Finnish) * New translations en.json (Hebrew) * New translations en.json (Hungarian) * New translations en.json (Italian) * New translations en.json (Japanese) * New translations en.json (Korean) * New translations en.json (Dutch) * New translations en.json (Norwegian) * New translations en.json (Polish) * New translations en.json (Portuguese) * New translations en.json (Russian) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Swedish) * New translations en.json (Ukrainian) * New translations en.json (Chinese Simplified) * New translations en.json (Chinese Traditional) * New translations en.json (English) * New translations en.json (Vietnamese) * New translations en.json (Portuguese, Brazilian) * New translations en.json (Russian) * chore(deps): bump the minor-patch group across 1 directory with 24 updates (#1403) Bumps the minor-patch group with 24 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@sentry/integrations](https://github.com/getsentry/sentry-javascript) | `7.113.0` | `7.114.0` | | [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) | `7.113.0` | `7.114.0` | | [next-intl](https://github.com/amannn/next-intl) | `3.12.1` | `3.13.0` | | [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.51.3` | `7.51.4` | | [sass](https://github.com/sass/dart-sass) | `1.76.0` | `1.77.0` | | [semver](https://github.com/npm/node-semver) | `7.6.0` | `7.6.2` | | [validator](https://github.com/validatorjs/validator.js) | `13.11.0` | `13.12.0` | | [zod](https://github.com/colinhacks/zod) | `3.23.6` | `3.23.8` | | [@playwright/test](https://github.com/microsoft/playwright) | `1.43.1` | `1.44.0` | | [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | `6.4.3` | `6.4.5` | | [@testing-library/react](https://github.com/testing-library/react-testing-library) | `15.0.6` | `15.0.7` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.8` | `20.12.11` | | [@types/pg](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/pg) | `8.11.5` | `8.11.6` | | [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) | `1.5.3` | `1.6.0` | | [dotenv-cli](https://github.com/entropitor/dotenv-cli) | `7.4.1` | `7.4.2` | | [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `28.4.0` | `28.5.0` | | [knip](https://github.com/webpro/knip/tree/HEAD/packages/knip) | `5.12.0` | `5.13.0` | | [msw](https://github.com/mswjs/msw) | `2.2.14` | `2.3.0` | | [tsx](https://github.com/privatenumber/tsx) | `4.8.2` | `4.9.3` | | [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `1.5.3` | `1.6.0` | | [@sentry/types](https://github.com/getsentry/sentry-javascript) | `7.113.0` | `7.114.0` | | [@sentry/node](https://github.com/getsentry/sentry-javascript) | `7.113.0` | `7.114.0` | | [hono](https://github.com/honojs/hono) | `4.2.9` | `4.3.4` | | [systeminformation](https://github.com/sebhildebrandt/systeminformation) | `5.22.7` | `5.22.8` | Updates `@sentry/integrations` from 7.113.0 to 7.114.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/7.114.0/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.113.0...7.114.0) Updates `@sentry/nextjs` from 7.113.0 to 7.114.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/7.114.0/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.113.0...7.114.0) Updates `next-intl` from 3.12.1 to 3.13.0 - [Changelog](https://github.com/amannn/next-intl/blob/main/CHANGELOG.md) - [Commits](https://github.com/amannn/next-intl/compare/v3.12.1...v3.13.0) Updates `react-hook-form` from 7.51.3 to 7.51.4 - [Release notes](https://github.com/react-hook-form/react-hook-form/releases) - [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.51.3...v7.51.4) Updates `sass` from 1.76.0 to 1.77.0 - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.76.0...1.77.0) Updates `semver` from 7.6.0 to 7.6.2 - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v7.6.0...v7.6.2) Updates `validator` from 13.11.0 to 13.12.0 - [Release notes](https://github.com/validatorjs/validator.js/releases) - [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/validatorjs/validator.js/compare/13.11.0...13.12.0) Updates `zod` from 3.23.6 to 3.23.8 - [Release notes](https://github.com/colinhacks/zod/releases) - [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md) - [Commits](https://github.com/colinhacks/zod/compare/v3.23.6...v3.23.8) Updates `@playwright/test` from 1.43.1 to 1.44.0 - [Release notes](https://github.com/microsoft/playwright/releases) - [Commits](https://github.com/microsoft/playwright/compare/v1.43.1...v1.44.0) Updates `@testing-library/jest-dom` from 6.4.3 to 6.4.5 - [Release notes](https://github.com/testing-library/jest-dom/releases) - [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/jest-dom/compare/v6.4.3...v6.4.5) Updates `@testing-library/react` from 15.0.6 to 15.0.7 - [Release notes](https://github.com/testing-library/react-testing-library/releases) - [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md) - [Commits](https://github.com/testing-library/react-testing-library/compare/v15.0.6...v15.0.7) Updates `@types/node` from 20.12.8 to 20.12.11 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@types/pg` from 8.11.5 to 8.11.6 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/pg) Updates `@vitest/coverage-v8` from 1.5.3 to 1.6.0 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v1.6.0/packages/coverage-v8) Updates `dotenv-cli` from 7.4.1 to 7.4.2 - [Release notes](https://github.com/entropitor/dotenv-cli/releases) - [Commits](https://github.com/entropitor/dotenv-cli/compare/v7.4.1...v7.4.2) Updates `eslint-plugin-jest` from 28.4.0 to 28.5.0 - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.4.0...v28.5.0) Updates `knip` from 5.12.0 to 5.13.0 - [Release notes](https://github.com/webpro/knip/releases) - [Changelog](https://github.com/webpro/knip/blob/main/packages/knip/.release-it.json) - [Commits](https://github.com/webpro/knip/commits/5.13.0/packages/knip) Updates `msw` from 2.2.14 to 2.3.0 - [Release notes](https://github.com/mswjs/msw/releases) - [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md) - [Commits](https://github.com/mswjs/msw/compare/v2.2.14...v2.3.0) Updates `tsx` from 4.8.2 to 4.9.3 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.8.2...v4.9.3) Updates `vitest` from 1.5.3 to 1.6.0 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v1.6.0/packages/vitest) Updates `@sentry/types` from 7.113.0 to 7.114.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/7.114.0/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.113.0...7.114.0) Updates `@sentry/node` from 7.113.0 to 7.114.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/7.114.0/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/7.113.0...7.114.0) Updates `hono` from 4.2.9 to 4.3.4 - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.2.9...v4.3.4) Updates `systeminformation` from 5.22.7 to 5.22.8 - [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md) - [Commits](https://github.com/sebhildebrandt/systeminformation/compare/v5.22.7...v5.22.8) --- updated-dependencies: - dependency-name: "@sentry/integrations" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: "@sentry/nextjs" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: next-intl dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: react-hook-form dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: sass dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: semver dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: validator dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: zod dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: "@playwright/test" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: "@testing-library/jest-dom" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: "@testing-library/react" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: "@types/pg" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: "@vitest/coverage-v8" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: dotenv-cli dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: knip dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: msw dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: vitest dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: "@sentry/types" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: "@sentry/node" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch - dependency-name: systeminformation dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add password reset request expiry check and automatic session invalidation * chore(deps): bump the minor-patch group across 1 directory with 7 updates (#1405) * Update auth.service.ts Move request expiry time to a constant so it can be changed easier * chore: bump sentry dependencies * chore(deps): bump the minor-patch group across 1 directory with 7 updates (#1405) * chore: bump sentry dependencies * chore(auth.service): small async improvements * fix: missing sentry/next in worker * New Crowdin updates (#1400) * New translations en.json (Spanish) * New translations en.json (Spanish) * New translations en.json (French) * chore(deps): bump pnpm/action-setup from 3.0.0 to 4.0.0 Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 3.0.0 to 4.0.0. - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/v3.0.0...v4.0.0) --- updated-dependencies: - dependency-name: pnpm/action-setup dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix(app-actions): missing open buttons with legacy app setup * test: enable app folder in tests * test: migrate to vitest * feat/section-app-install-form (#1414) * done * fix: wrong conditions --------- Co-authored-by: Nicolas Meienberger <github@thisprops.com> * refactor(docker-compose.json): fallback to classic docker compose in case of failing to parse file * chore(app.executors): add more logging * chore(watcher): pull repo only in non-dev mode * chore: bump version to 3.3.0 * test(e2e): add cookie for insecure banner * fix(insecure-instance): include loopback ip in secure ones --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stavros <steveiliop56@gmail.com> Co-authored-by: hex-developer <77530549+hex-developer@users.noreply.github.com>
285 lines
7.3 KiB
JavaScript
285 lines
7.3 KiB
JavaScript
/* eslint-disable */
|
|
/* tslint:disable */
|
|
|
|
/**
|
|
* Mock Service Worker.
|
|
* @see https://github.com/mswjs/msw
|
|
* - Please do NOT modify this file.
|
|
* - Please do NOT serve this file on production.
|
|
*/
|
|
|
|
const PACKAGE_VERSION = '2.3.0'
|
|
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
|
|
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
const activeClientIds = new Set()
|
|
|
|
self.addEventListener('install', function () {
|
|
self.skipWaiting()
|
|
})
|
|
|
|
self.addEventListener('activate', function (event) {
|
|
event.waitUntil(self.clients.claim())
|
|
})
|
|
|
|
self.addEventListener('message', async function (event) {
|
|
const clientId = event.source.id
|
|
|
|
if (!clientId || !self.clients) {
|
|
return
|
|
}
|
|
|
|
const client = await self.clients.get(clientId)
|
|
|
|
if (!client) {
|
|
return
|
|
}
|
|
|
|
const allClients = await self.clients.matchAll({
|
|
type: 'window',
|
|
})
|
|
|
|
switch (event.data) {
|
|
case 'KEEPALIVE_REQUEST': {
|
|
sendToClient(client, {
|
|
type: 'KEEPALIVE_RESPONSE',
|
|
})
|
|
break
|
|
}
|
|
|
|
case 'INTEGRITY_CHECK_REQUEST': {
|
|
sendToClient(client, {
|
|
type: 'INTEGRITY_CHECK_RESPONSE',
|
|
payload: {
|
|
packageVersion: PACKAGE_VERSION,
|
|
checksum: INTEGRITY_CHECKSUM,
|
|
},
|
|
})
|
|
break
|
|
}
|
|
|
|
case 'MOCK_ACTIVATE': {
|
|
activeClientIds.add(clientId)
|
|
|
|
sendToClient(client, {
|
|
type: 'MOCKING_ENABLED',
|
|
payload: true,
|
|
})
|
|
break
|
|
}
|
|
|
|
case 'MOCK_DEACTIVATE': {
|
|
activeClientIds.delete(clientId)
|
|
break
|
|
}
|
|
|
|
case 'CLIENT_CLOSED': {
|
|
activeClientIds.delete(clientId)
|
|
|
|
const remainingClients = allClients.filter((client) => {
|
|
return client.id !== clientId
|
|
})
|
|
|
|
// Unregister itself when there are no more clients
|
|
if (remainingClients.length === 0) {
|
|
self.registration.unregister()
|
|
}
|
|
|
|
break
|
|
}
|
|
}
|
|
})
|
|
|
|
self.addEventListener('fetch', function (event) {
|
|
const { request } = event
|
|
|
|
// Bypass navigation requests.
|
|
if (request.mode === 'navigate') {
|
|
return
|
|
}
|
|
|
|
// Opening the DevTools triggers the "only-if-cached" request
|
|
// that cannot be handled by the worker. Bypass such requests.
|
|
if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {
|
|
return
|
|
}
|
|
|
|
// Bypass all requests when there are no active clients.
|
|
// Prevents the self-unregistered worked from handling requests
|
|
// after it's been deleted (still remains active until the next reload).
|
|
if (activeClientIds.size === 0) {
|
|
return
|
|
}
|
|
|
|
// Generate unique request ID.
|
|
const requestId = crypto.randomUUID()
|
|
event.respondWith(handleRequest(event, requestId))
|
|
})
|
|
|
|
async function handleRequest(event, requestId) {
|
|
const client = await resolveMainClient(event)
|
|
const response = await getResponse(event, client, requestId)
|
|
|
|
// Send back the response clone for the "response:*" life-cycle events.
|
|
// Ensure MSW is active and ready to handle the message, otherwise
|
|
// this message will pend indefinitely.
|
|
if (client && activeClientIds.has(client.id)) {
|
|
;(async function () {
|
|
const responseClone = response.clone()
|
|
|
|
sendToClient(
|
|
client,
|
|
{
|
|
type: 'RESPONSE',
|
|
payload: {
|
|
requestId,
|
|
isMockedResponse: IS_MOCKED_RESPONSE in response,
|
|
type: responseClone.type,
|
|
status: responseClone.status,
|
|
statusText: responseClone.statusText,
|
|
body: responseClone.body,
|
|
headers: Object.fromEntries(responseClone.headers.entries()),
|
|
},
|
|
},
|
|
[responseClone.body],
|
|
)
|
|
})()
|
|
}
|
|
|
|
return response
|
|
}
|
|
|
|
// Resolve the main client for the given event.
|
|
// Client that issues a request doesn't necessarily equal the client
|
|
// that registered the worker. It's with the latter the worker should
|
|
// communicate with during the response resolving phase.
|
|
async function resolveMainClient(event) {
|
|
const client = await self.clients.get(event.clientId)
|
|
|
|
if (client?.frameType === 'top-level') {
|
|
return client
|
|
}
|
|
|
|
const allClients = await self.clients.matchAll({
|
|
type: 'window',
|
|
})
|
|
|
|
return allClients
|
|
.filter((client) => {
|
|
// Get only those clients that are currently visible.
|
|
return client.visibilityState === 'visible'
|
|
})
|
|
.find((client) => {
|
|
// Find the client ID that's recorded in the
|
|
// set of clients that have registered the worker.
|
|
return activeClientIds.has(client.id)
|
|
})
|
|
}
|
|
|
|
async function getResponse(event, client, requestId) {
|
|
const { request } = event
|
|
|
|
// Clone the request because it might've been already used
|
|
// (i.e. its body has been read and sent to the client).
|
|
const requestClone = request.clone()
|
|
|
|
function passthrough() {
|
|
const headers = Object.fromEntries(requestClone.headers.entries())
|
|
|
|
// Remove internal MSW request header so the passthrough request
|
|
// complies with any potential CORS preflight checks on the server.
|
|
// Some servers forbid unknown request headers.
|
|
delete headers['x-msw-intention']
|
|
|
|
return fetch(requestClone, { headers })
|
|
}
|
|
|
|
// Bypass mocking when the client is not active.
|
|
if (!client) {
|
|
return passthrough()
|
|
}
|
|
|
|
// Bypass initial page load requests (i.e. static assets).
|
|
// The absence of the immediate/parent client in the map of the active clients
|
|
// means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
|
|
// and is not ready to handle requests.
|
|
if (!activeClientIds.has(client.id)) {
|
|
return passthrough()
|
|
}
|
|
|
|
// Notify the client that a request has been intercepted.
|
|
const requestBuffer = await request.arrayBuffer()
|
|
const clientMessage = await sendToClient(
|
|
client,
|
|
{
|
|
type: 'REQUEST',
|
|
payload: {
|
|
id: requestId,
|
|
url: request.url,
|
|
mode: request.mode,
|
|
method: request.method,
|
|
headers: Object.fromEntries(request.headers.entries()),
|
|
cache: request.cache,
|
|
credentials: request.credentials,
|
|
destination: request.destination,
|
|
integrity: request.integrity,
|
|
redirect: request.redirect,
|
|
referrer: request.referrer,
|
|
referrerPolicy: request.referrerPolicy,
|
|
body: requestBuffer,
|
|
keepalive: request.keepalive,
|
|
},
|
|
},
|
|
[requestBuffer],
|
|
)
|
|
|
|
switch (clientMessage.type) {
|
|
case 'MOCK_RESPONSE': {
|
|
return respondWithMock(clientMessage.data)
|
|
}
|
|
|
|
case 'PASSTHROUGH': {
|
|
return passthrough()
|
|
}
|
|
}
|
|
|
|
return passthrough()
|
|
}
|
|
|
|
function sendToClient(client, message, transferrables = []) {
|
|
return new Promise((resolve, reject) => {
|
|
const channel = new MessageChannel()
|
|
|
|
channel.port1.onmessage = (event) => {
|
|
if (event.data && event.data.error) {
|
|
return reject(event.data.error)
|
|
}
|
|
|
|
resolve(event.data)
|
|
}
|
|
|
|
client.postMessage(
|
|
message,
|
|
[channel.port2].concat(transferrables.filter(Boolean)),
|
|
)
|
|
})
|
|
}
|
|
|
|
async function respondWithMock(response) {
|
|
// Setting response status code to 0 is a no-op.
|
|
// However, when responding with a "Response.error()", the produced Response
|
|
// instance will have status code set to 0. Since it's not possible to create
|
|
// a Response instance with status code 0, handle that use-case separately.
|
|
if (response.status === 0) {
|
|
return Response.error()
|
|
}
|
|
|
|
const mockedResponse = new Response(response.body, response)
|
|
|
|
Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
|
|
value: true,
|
|
enumerable: true,
|
|
})
|
|
|
|
return mockedResponse
|
|
}
|