@finema/finework-layer 0.2.123 → 0.2.125

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ setups.@nuxt/test-utils="3.23.0"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.125](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.124...0.2.125) (2026-02-04)
4
+
5
+ ### Features
6
+
7
+ * add convertDomainToCookieDomain function for cookie domain handling ([7f321f4](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/7f321f451b45a2d51453918858b13e5b7a77ceae))
8
+
9
+ ## [0.2.124](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.123...0.2.124) (2026-02-03)
10
+
3
11
  ## [0.2.123](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.122...0.2.123) (2026-02-02)
4
12
 
5
13
  ### Bug Fixes
@@ -123,6 +123,29 @@ export interface IUserAccessLevel {
123
123
  purchase: Permission
124
124
  }
125
125
 
126
+ export const convertDomainToCookieDomain = (domain: string) => {
127
+ let hostname = ''
128
+
129
+ try {
130
+ const url = domain.startsWith('http://') || domain.startsWith('https://')
131
+ ? new URL(domain)
132
+ : new URL(`https://${domain}`)
133
+
134
+ hostname = url.hostname
135
+ } catch {
136
+ return ''
137
+ }
138
+
139
+ if (hostname === 'localhost' || /^\d{1,3}(?:\.\d{1,3}){3}$/.test(hostname)) {
140
+ return hostname
141
+ }
142
+
143
+ const parts = hostname.split('.')
144
+ const baseDomain = parts.length > 2 ? parts.slice(-2).join('.') : hostname
145
+
146
+ return baseDomain.startsWith('.') ? baseDomain : `.${baseDomain}`
147
+ }
148
+
126
149
  export const useAuth = () => {
127
150
  const {
128
151
  auth,
@@ -131,6 +154,7 @@ export const useAuth = () => {
131
154
  const token = useCookie('token', {
132
155
  path: '/',
133
156
  maxAge: 60 * 60 * 24 * 365,
157
+ domain: convertDomainToCookieDomain(useRuntimeConfig().public.baseAPI as string),
134
158
  })
135
159
 
136
160
  const isAuthenticated = computed(() => !!token.value)
package/bun.lock CHANGED
@@ -4,7 +4,7 @@
4
4
  "": {
5
5
  "name": "@finema/finework-layer",
6
6
  "dependencies": {
7
- "@finema/core": "^3.7.1",
7
+ "@finema/core": "^3.8.0",
8
8
  },
9
9
  "devDependencies": {
10
10
  "@finema/eslint-config": "^2.0.3",
@@ -183,7 +183,7 @@
183
183
 
184
184
  "@eslint/plugin-kit": ["@eslint/plugin-kit@0.4.1", "", { "dependencies": { "@eslint/core": "^0.17.0", "levn": "^0.4.1" } }, "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA=="],
185
185
 
186
- "@finema/core": ["@finema/core@3.7.1", "", { "dependencies": { "@iconify-json/heroicons": "^1.2.2", "@iconify-json/ph": "^1.2.2", "@iconify-json/svg-spinners": "^1.2.2", "@nuxt/kit": "^4.1.3", "@nuxt/ui": "^4.4.0", "@pinia/nuxt": "^0.11.0", "@tailwindcss/typography": "^0.5.0-alpha.3", "@tiptap/extension-image": "^3.0.7", "@tiptap/extension-link": "^3.0.7", "@tiptap/extension-text-align": "^3.0.7", "@tiptap/extension-text-style": "^3.0.7", "@tiptap/extension-underline": "^3.0.7", "@tiptap/extension-youtube": "^3.0.7", "@tiptap/pm": "^3.0.7", "@tiptap/starter-kit": "^3.0.7", "@tiptap/vue-3": "^3.0.7", "@vee-validate/nuxt": "^4.15.1", "@vee-validate/valibot": "^4.15.1", "@vuepic/vue-datepicker": "^11.0.2", "@vueuse/components": "^13.9.0", "@vueuse/core": "^13.9.0", "@wdns/vue-code-block": "^2.3.5", "axios": "^1.10.0", "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", "defu": "^6.1.4", "lodash-es": "^4.17.21", "maska": "^3.1.1", "url-join": "^5.0.0" } }, "sha512-wS2tM0b2egu1pkysEG4+q5oUUyPbhn9NZcc07VK2yhVUTn/M1CcB8XIanGWqIAfay0uZeKSfCk2qdy6hjTywWA=="],
186
+ "@finema/core": ["@finema/core@3.8.0", "", { "dependencies": { "@iconify-json/heroicons": "^1.2.2", "@iconify-json/ph": "^1.2.2", "@iconify-json/svg-spinners": "^1.2.2", "@nuxt/kit": "^4.1.3", "@nuxt/ui": "^4.4.0", "@pinia/nuxt": "^0.11.0", "@tailwindcss/typography": "^0.5.0-alpha.3", "@tiptap/extension-text-align": "^3.18.0", "@vee-validate/nuxt": "^4.15.1", "@vee-validate/valibot": "^4.15.1", "@vuepic/vue-datepicker": "^11.0.2", "@vueuse/components": "^13.9.0", "@vueuse/core": "^13.9.0", "@wdns/vue-code-block": "^2.3.5", "axios": "^1.10.0", "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", "defu": "^6.1.4", "lodash-es": "^4.17.21", "maska": "^3.1.1", "url-join": "^5.0.0" } }, "sha512-1VjYujNf/PG0xeFps5PdOYHKbPqb0bfY4VbVvrccoX0FG+ZIOxqhmcti0EaIhNtDjC13YCNfNhTnVexQ8n9xdw=="],
187
187
 
188
188
  "@finema/eslint-config": ["@finema/eslint-config@2.0.4", "", { "dependencies": { "eslint-plugin-better-tailwindcss": "^3.7.10", "eslint-plugin-tailwindcss": "^3.18.2", "eslint-plugin-unused-imports": "^4.2.0" }, "peerDependencies": { "eslint": "^9.37.0" } }, "sha512-kKznMgbsOfPPg+td53dK36I3YFo6Ji4GAwKbVS2pimuQfcJT4mbgnEXCuW1Q/uNvUaFItr1NCSSD1LtEQTNNug=="],
189
189
 
@@ -713,12 +713,8 @@
713
713
 
714
714
  "@tiptap/extension-text-align": ["@tiptap/extension-text-align@3.18.0", "", { "peerDependencies": { "@tiptap/core": "^3.18.0" } }, "sha512-NEd2IUgOymKPmGOnxum4hLRbdQyBlK1Cmkt8QGIrmatovPrw2PtWmHVZ6foNChsi/r932dKVfqZ/uMUh8QUppQ=="],
715
715
 
716
- "@tiptap/extension-text-style": ["@tiptap/extension-text-style@3.18.0", "", { "peerDependencies": { "@tiptap/core": "^3.18.0" } }, "sha512-4HNTzkRGP+9YL8ccCRHFwH469GN6/NKefFAzYZjh2l8JOrPgiYqIlu7Tc+q9w1L5m8f6sC5DBQfGOsgWxuM3GQ=="],
717
-
718
716
  "@tiptap/extension-underline": ["@tiptap/extension-underline@3.18.0", "", { "peerDependencies": { "@tiptap/core": "^3.18.0" } }, "sha512-009IeXURNJ/sm1pBqbj+2YQgjQaBtNlJR3dbl6xu49C+qExqCmI7klhKQuwsVVGLR7ahsYlp7d9RlftnhCXIcQ=="],
719
717
 
720
- "@tiptap/extension-youtube": ["@tiptap/extension-youtube@3.18.0", "", { "peerDependencies": { "@tiptap/core": "^3.18.0" } }, "sha512-OszNjhZkPGwKJtxBBNhoEfxp8NWJ5kQqXd4GmNGjjH8zXs8RK2MPBefyH2V9sskvp5r0Kq/eJSdfeQpANS3hRw=="],
721
-
722
718
  "@tiptap/extensions": ["@tiptap/extensions@3.18.0", "", { "peerDependencies": { "@tiptap/core": "^3.18.0", "@tiptap/pm": "^3.18.0" } }, "sha512-uSRIE9HGshBN6NRFR3LX2lZqBLvX92SgU5A9AvUbJD4MqU63E+HdruJnRjsVlX3kPrmbIDowxrzXlUcg3K0USQ=="],
723
719
 
724
720
  "@tiptap/markdown": ["@tiptap/markdown@3.18.0", "", { "dependencies": { "marked": "^17.0.1" }, "peerDependencies": { "@tiptap/core": "^3.18.0", "@tiptap/pm": "^3.18.0" } }, "sha512-F4gAr8QXc61dwOi/fwumx/mTqX0CjHiYvN/A4btPf0TpwXRcEVvlN1iz8A/8heXppbyyM6EliSMFFWN2sgVT+w=="],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@finema/finework-layer",
3
3
  "type": "module",
4
- "version": "0.2.123",
4
+ "version": "0.2.125",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground -o",
@@ -30,7 +30,7 @@
30
30
  "vue": "latest"
31
31
  },
32
32
  "dependencies": {
33
- "@finema/core": "^3.7.1"
33
+ "@finema/core": "^3.8.0"
34
34
  },
35
35
  "lint-staged": {
36
36
  "*": "eslint"