13 Commits

Author SHA1 Message Date
Linus Flood
7c4a0ec466 Merged in fix/webview-auth-fix-3 (pull request #2848)
Fix/webview auth fix 3

* feat(webview auth): set maxAge on cookie

* Changed samesite to lax


Approved-by: Anton Gunnarsson
2025-09-23 07:21:24 +00:00
Linus Flood
9770281863 Merged in fix/webview-auth-fix-2 (pull request #2834)
feat/webview: delete cookie instead of setting header in webview auth middleware

* feat/webview: delete cookie instead of setting header in webview auth middleware
2025-09-19 13:05:20 +00:00
Linus Flood
9c7904c9e0 Merged in fix/webview-auth-fix (pull request #2833)
Fix/webview auth fix

* Test

* Merge branch 'master' of bitbucket.org:scandic-swap/web into fix/webview-auth-fix

* Setting cookie instead of headers


Approved-by: Anton Gunnarsson
2025-09-19 12:55:53 +00:00
Linus Flood
6b01dd9a8f Merged in feat/webview-user-issue (pull request #2793)
Feat/webview user issue

* Added logging

* Test

* Cleanup


Approved-by: Joakim Jäderberg
2025-09-11 09:22:13 +00:00
Joakim Jäderberg
daf765f3d5 Merged in feature/wrap-logging (pull request #2511)
Feature/wrap logging

* feat: change all logging to go through our own logger function so that we can control log levels

* move packages/trpc to using our own logger

* merge


Approved-by: Linus Flood
2025-07-03 12:37:04 +00:00
Linus Flood
7e32ed294d Merged in fix/webview-fix (pull request #2512)
Let webview pass if we have it stored but they are not sending any auth token

* Let webview pass if we have it stored but they are not sending any auth token
2025-07-03 11:01:24 +00:00
Linus Flood
167b5e7e8a Merged in fix/webview-auth (pull request #2469)
feat(SW-3124): webview auth stuck in a refresh loop

* feat(SW-3124): webview auth stuck in a refresh loop


Approved-by: Anton Gunnarsson
2025-06-30 08:29:19 +00:00
Anton Gunnarsson
002d093af4 Merged in feat/sw-2863-move-contentstack-router-to-trpc-package (pull request #2389)
feat(SW-2863): Move contentstack router to trpc package

* Add exports to packages and lint rule to prevent relative imports

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* WIP first step

* update internal imports in trpc

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package


Approved-by: Linus Flood
2025-06-26 07:53:01 +00:00
Anton Gunnarsson
846fd904a6 Merged in feat/sw-2859-set-up-shared-trpc-package (pull request #2319)
feat(SW-2859): Create trpc package

* Add isEdge, safeTry and dataCache to new common package

* Add eslint and move prettier config

* Clean up tests

* Create trpc package and move initialization

* Move errors and a few procedures

* Move telemetry to common package

* Move tokenManager to common package

* Add Sentry to procedures

* Clean up procedures

* Fix self-referencing imports

* Add exports to packages and lint rule to prevent relative imports

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* Fix lang imports


Approved-by: Linus Flood
2025-06-18 12:14:20 +00:00
Joakim Jäderberg
a95ef65d02 Merged in feat/use-hash-for-graphql-cache (pull request #2251)
Feature: Use hash of query+variables for graphql cache instead of gitsha

* feature: use a hash of query+variables as part of the cache key instead of gitsha

* .

* Merge branch 'master' of bitbucket.org:scandic-swap/web into feat/use-hash-for-graphql-cache

* use correct json stringify

* merge

* remove edgeRequest in favor of request

* add more indicative logging


Approved-by: Linus Flood
2025-06-03 06:39:04 +00:00
Linus Flood
11237b211b Merged in fix/my-stay-webview (pull request #2169)
fix: webviews - my stay

* Test
2025-05-21 06:08:16 +00:00
Linus Flood
cfa8c166a3 Merged in feat/sw-2403-mystay-webview (pull request #1828)
Feat/sw-2403 - Adding webview for MyStay

* feat/webview - added for my stay

* wip

* Passing headers so we can get the lang

* Cleanup

* Refactored and some performance improvements


Approved-by: Christian Andolf
2025-04-17 08:48:52 +00:00
Anton Gunnarsson
80100e7631 Merged in monorepo-step-1 (pull request #1080)
Migrate to a monorepo setup - step 1

* Move web to subfolder /apps/scandic-web

* Yarn + transitive deps

- Move to yarn
- design-system package removed for now since yarn doesn't
support the parameter for token (ie project currently broken)
- Add missing transitive dependencies as Yarn otherwise
prevents these imports
- VS Code doesn't pick up TS path aliases unless you open
/apps/scandic-web instead of root (will be fixed with monorepo)

* Pin framer-motion to temporarily fix typing issue

https://github.com/adobe/react-spectrum/issues/7494

* Pin zod to avoid typ error

There seems to have been a breaking change in the types
returned by zod where error is now returned as undefined
instead of missing in the type. We should just handle this
but to avoid merge conflicts just pin the dependency for
now.

* Pin react-intl version

Pin version of react-intl to avoid tiny type issue where formatMessage
does not accept a generic any more. This will be fixed in a future
commit, but to avoid merge conflicts just pin for now.

* Pin typescript version

Temporarily pin version as newer versions as stricter and results in
a type error. Will be fixed in future commit after merge.

* Setup workspaces

* Add design-system as a monorepo package

* Remove unused env var DESIGN_SYSTEM_ACCESS_TOKEN

* Fix husky for monorepo setup

* Update netlify.toml

* Add lint script to root package.json

* Add stub readme

* Fix react-intl formatMessage types

* Test netlify.toml in root

* Remove root toml

* Update netlify.toml publish path

* Remove package-lock.json

* Update build for branch/preview builds


Approved-by: Linus Flood
2025-02-26 10:36:17 +00:00