@choosemycompany/lib 0.7.0 → 0.8.1
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.
- package/README.md +4 -2
- package/dist/analytics/useGtagConversion.d.ts +1 -1
- package/dist/auth/types.d.ts +14 -0
- package/dist/auth/useAuthSession.d.ts +74 -0
- package/dist/env.d.ts +16 -0
- package/dist/http/buildUrl.d.ts +12 -0
- package/dist/http/useHttp.d.ts +7 -5
- package/dist/i18n/types.d.ts +5 -5
- package/dist/index.d.ts +6 -1
- package/dist/index.js +321 -223
- package/dist/store/types.d.ts +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -40,9 +40,11 @@ The sandbox uses a Vite alias `@choosemycompany/lib` → `../src/index.ts`, so e
|
|
|
40
40
|
|
|
41
41
|
### The `/auth` page
|
|
42
42
|
|
|
43
|
-
It
|
|
43
|
+
It exercises `useAuthSession` against a mocked auth backend: `POST /auth/api/v2/login`, `POST /auth/api/v2/login/token/refresh` and `POST /auth/api/v2/logout` served at the **origin** like the real auth-api, a protected resource under `/api/session/protected`, and `POST /api/session/simulate` to age the session without waiting 4 h.
|
|
44
44
|
|
|
45
|
-
The scenario: sign in, call the protected API, expire the token, call again. The
|
|
45
|
+
The scenario: sign in, call the protected API, expire the token, call again. The app writes a single `http.get` and the trace shows three calls — the `401`, the renewal, the replay.
|
|
46
|
+
|
|
47
|
+
Known limitation: production runs a cross-site guard, `RejectCrossSiteCookieAuthenticatedRequest`, which answers `403` to an unsafe request that is authenticated by cookie, carries no `Authorization` header, and comes from another site. The sandbox has no equivalent, so the lib's `403` path cannot be exercised here.
|
|
46
48
|
|
|
47
49
|
## Build & publish
|
|
48
50
|
|
|
@@ -16,7 +16,7 @@ declare global {
|
|
|
16
16
|
* The function is a **safe no-op** in three situations:
|
|
17
17
|
* - running on the server (no `window`)
|
|
18
18
|
* - the gtag snippet is not loaded (`window.gtag` undefined)
|
|
19
|
-
* - `gtagId` is empty in `runtimeConfig` (
|
|
19
|
+
* - `gtagId` is empty in `runtimeConfig` (no tag configured for this deployment)
|
|
20
20
|
*
|
|
21
21
|
* That way consumer code can call `reportConversion()` unconditionally without
|
|
22
22
|
* branching for the environment.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Why a session ended. Lets the consuming app tailor its exit message. */
|
|
2
|
+
export type SessionExpiryReason =
|
|
3
|
+
/** The refresh endpoint refused the refresh token of an open session. */
|
|
4
|
+
'refresh-rejected'
|
|
5
|
+
/**
|
|
6
|
+
* The renewal found no session to renew: the visitor is anonymous. Reached
|
|
7
|
+
* only on a session that was never open, so it is the "never signed in" case,
|
|
8
|
+
* not the "signed out" one — an app showing an expiry message must skip it.
|
|
9
|
+
*/
|
|
10
|
+
| 'no-session'
|
|
11
|
+
/** The refresh call itself could not complete (network, CORS, 5xx). */
|
|
12
|
+
| 'refresh-unreachable'
|
|
13
|
+
/** The app cleared the session on purpose (logout). */
|
|
14
|
+
| 'logout';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { SessionExpiryReason } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Refresh endpoint of the CMC API, resolved against the **origin** of the
|
|
4
|
+
* declared base URL, never appended to it: that base URL may carry a path
|
|
5
|
+
* prefix, while the auth API always sits at this path on the origin. Internal.
|
|
6
|
+
*/
|
|
7
|
+
export declare const REFRESH_URI = "/auth/api/v2/login/token/refresh";
|
|
8
|
+
/**
|
|
9
|
+
* Path prefix of the auth API. A call to it is never renewed and replayed: it
|
|
10
|
+
* speaks *about* the session rather than relying on it, so a `401` from `login`
|
|
11
|
+
* is a wrong password, one from `refresh` is a dead refresh token, and one from
|
|
12
|
+
* `logout` is nothing worth replaying. Internal.
|
|
13
|
+
*/
|
|
14
|
+
export declare const AUTH_API_PREFIX = "/auth/api/v2/";
|
|
15
|
+
/**
|
|
16
|
+
* Name of the Web Locks entry that serialises the refresh across tabs. Namespaced
|
|
17
|
+
* so it cannot collide with a lock the application takes. Internal.
|
|
18
|
+
*/
|
|
19
|
+
export declare const REFRESH_LOCK = "cmc-auth-session-refresh";
|
|
20
|
+
/**
|
|
21
|
+
* Shared session store: whether a session is open, and how to renew it when a
|
|
22
|
+
* call comes back `401`.
|
|
23
|
+
*
|
|
24
|
+
* The store holds **no token**. The access token lives in a cookie that the
|
|
25
|
+
* browser attaches to every same-site request on its own, so the store has
|
|
26
|
+
* nothing to read, carry, or put on a header. What it tracks is the one thing
|
|
27
|
+
* the app cannot get from the cookie jar: whether the session is still usable,
|
|
28
|
+
* and why it stopped being so.
|
|
29
|
+
*
|
|
30
|
+
* That the store reads no token is what lets the cookies become `httpOnly`
|
|
31
|
+
* without touching this code. The refresh cookie already is; the access cookie
|
|
32
|
+
* follows when the backend flips it.
|
|
33
|
+
*
|
|
34
|
+
* Paired with {@link useHttp}'s `401` interceptor: a refused call triggers one
|
|
35
|
+
* renewal and one replay. The app watches {@link isExpired} and decides where
|
|
36
|
+
* to send the user.
|
|
37
|
+
*
|
|
38
|
+
* Renewal is **reactive only** — no timer renews ahead of expiry. A timer would
|
|
39
|
+
* buy one faster request every four hours and would not even cover the case it
|
|
40
|
+
* looks like it covers: `setTimeout` does not fire while the laptop sleeps.
|
|
41
|
+
*
|
|
42
|
+
* See `docs/useAuthSession.md` for the wiring and the guarantees.
|
|
43
|
+
*/
|
|
44
|
+
export declare const useAuthSession: import('pinia').StoreDefinition<"cmc-auth-session", Pick<{
|
|
45
|
+
isOpen: import('vue').Ref<boolean, boolean>;
|
|
46
|
+
isExpired: import('vue').Ref<boolean, boolean>;
|
|
47
|
+
expiryReason: import('vue').Ref<SessionExpiryReason | undefined, SessionExpiryReason | undefined>;
|
|
48
|
+
isAuthenticated: import('vue').ComputedRef<boolean>;
|
|
49
|
+
open: () => void;
|
|
50
|
+
expire: (reason: SessionExpiryReason) => void;
|
|
51
|
+
clear: () => void;
|
|
52
|
+
logout: () => void;
|
|
53
|
+
refresh: () => Promise<void>;
|
|
54
|
+
}, "isOpen" | "isExpired" | "expiryReason">, Pick<{
|
|
55
|
+
isOpen: import('vue').Ref<boolean, boolean>;
|
|
56
|
+
isExpired: import('vue').Ref<boolean, boolean>;
|
|
57
|
+
expiryReason: import('vue').Ref<SessionExpiryReason | undefined, SessionExpiryReason | undefined>;
|
|
58
|
+
isAuthenticated: import('vue').ComputedRef<boolean>;
|
|
59
|
+
open: () => void;
|
|
60
|
+
expire: (reason: SessionExpiryReason) => void;
|
|
61
|
+
clear: () => void;
|
|
62
|
+
logout: () => void;
|
|
63
|
+
refresh: () => Promise<void>;
|
|
64
|
+
}, "isAuthenticated">, Pick<{
|
|
65
|
+
isOpen: import('vue').Ref<boolean, boolean>;
|
|
66
|
+
isExpired: import('vue').Ref<boolean, boolean>;
|
|
67
|
+
expiryReason: import('vue').Ref<SessionExpiryReason | undefined, SessionExpiryReason | undefined>;
|
|
68
|
+
isAuthenticated: import('vue').ComputedRef<boolean>;
|
|
69
|
+
open: () => void;
|
|
70
|
+
expire: (reason: SessionExpiryReason) => void;
|
|
71
|
+
clear: () => void;
|
|
72
|
+
logout: () => void;
|
|
73
|
+
refresh: () => Promise<void>;
|
|
74
|
+
}, "logout" | "open" | "expire" | "clear" | "refresh">>;
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime environment flags, shared by the domains that need to behave
|
|
3
|
+
* differently under SSR. Internal — not exported from `src/index.ts`.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* True when there is no browser behind the current code path.
|
|
7
|
+
*
|
|
8
|
+
* Two things depend on this. Cookies: Node holds no jar, so a request that
|
|
9
|
+
* relies on one comes back refused and says nothing about the real state.
|
|
10
|
+
* Timers: one armed on the Nitro server outlives the response it belongs to
|
|
11
|
+
* and fires against a request nobody is waiting for.
|
|
12
|
+
*
|
|
13
|
+
* `import.meta.server` is the Nuxt-side answer; the `document` check keeps the
|
|
14
|
+
* guard honest anywhere the flag is not injected, and makes it testable.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isServerSide(): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves the `{name}` placeholders of a URI template.
|
|
3
|
+
*
|
|
4
|
+
* Every placeholder is replaced, each value is passed through
|
|
5
|
+
* `encodeURIComponent`, and a placeholder the params do not provide throws
|
|
6
|
+
* instead of sending a request to a wrong path.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* buildUrl('/v3/forms/{id}/periods/{period}', { id: 42, period: '2026' })
|
|
10
|
+
* // → '/v3/forms/42/periods/2026'
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildUrl(template: string, params: Record<string, string | number>): string;
|
package/dist/http/useHttp.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { MandeInstance } from 'mande';
|
|
|
8
8
|
* (`get`, `post`, `put`, `patch`, `delete`) and is meant to be the only way the
|
|
9
9
|
* lib (and downstream apps) talk to an HTTP backend.
|
|
10
10
|
*
|
|
11
|
+
* Every instance renews the session on its own — see {@link createAuthFetch}.
|
|
12
|
+
*
|
|
11
13
|
* @param target - Name of a declared target. Omit it for the default base URL,
|
|
12
14
|
* which is what almost every caller wants. Name one to reach
|
|
13
15
|
* another origin the app declared — the call site then holds no
|
|
@@ -15,16 +17,16 @@ import { MandeInstance } from 'mande';
|
|
|
15
17
|
*
|
|
16
18
|
* @example
|
|
17
19
|
* ```ts
|
|
18
|
-
* const { http
|
|
20
|
+
* const { http } = useHttp()
|
|
19
21
|
*
|
|
20
|
-
* setToken(accessToken)
|
|
21
22
|
* const { item } = await http.get<RetrieveResponse<User>>('/me')
|
|
22
|
-
* clearToken() // on logout
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
|
-
* @example Another declared origin
|
|
25
|
+
* @example Another declared origin, authenticated by hand
|
|
26
26
|
* ```ts
|
|
27
|
-
* const { http } = useHttp('happy')
|
|
27
|
+
* const { http, setToken } = useHttp('happy')
|
|
28
|
+
*
|
|
29
|
+
* setToken(tokenForThatOrigin)
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
32
|
export declare function useHttp(target?: string): {
|
package/dist/i18n/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public i18n types shared by every composable in this folder. Reflect the
|
|
3
|
-
* languages
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Public i18n types shared by every composable in this folder. Reflect the set
|
|
3
|
+
* of languages the library supports; add a new locale here and downstream code
|
|
4
|
+
* (translations maps, country dictionaries, etc.) will get a compile-time error
|
|
5
|
+
* to keep them in sync.
|
|
6
6
|
*/
|
|
7
|
-
/** Languages
|
|
7
|
+
/** Languages the library ships translations for (ISO 639-1 codes). */
|
|
8
8
|
export type Language = 'en' | 'fr' | 'de' | 'es' | 'it' | 'da' | 'pt';
|
|
9
9
|
/**
|
|
10
10
|
* A translation bundle: a partial map from `Language` to its translated string.
|
package/dist/index.d.ts
CHANGED
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Grouped by concern:
|
|
8
8
|
* - **HTTP** — {@link configureHttp}: the app declares its base URLs;
|
|
9
|
-
* {@link useHttp}: thin `mande` wrapper bound to one of them
|
|
9
|
+
* {@link useHttp}: thin `mande` wrapper bound to one of them;
|
|
10
|
+
* {@link buildUrl}: resolves the `{name}` placeholders of a URI template.
|
|
10
11
|
* - **Store** — {@link useStore}, {@link getViewKey}: typed cache for `retrieve` /
|
|
11
12
|
* `list` workflows with single-flight, per-key errors, and CRUD mutations.
|
|
12
13
|
* - **i18n** — locale-aware translators for plain strings, country names,
|
|
13
14
|
* region resolution, and rich tagged messages.
|
|
14
15
|
* - **UI** — small DOM / window-aware helpers: outside-click detection, responsive
|
|
15
16
|
* sizing, image-cache watcher.
|
|
17
|
+
* - **Auth** — {@link useAuthSession}: shared session store (open/expired state, single-flight refresh).
|
|
16
18
|
* - **Errors** — {@link showAndThrowError}: Nuxt error trigger shorthand.
|
|
17
19
|
* - **Analytics** — gtag conversion + Hubspot contact URL helpers.
|
|
18
20
|
*
|
|
@@ -20,6 +22,8 @@
|
|
|
20
22
|
*/
|
|
21
23
|
export { useHttp } from './http/useHttp';
|
|
22
24
|
export { configureHttp, type HttpConfig } from './http/config';
|
|
25
|
+
export { buildUrl } from './http/buildUrl';
|
|
26
|
+
export { useAuthSession } from './auth/useAuthSession';
|
|
23
27
|
export { useStore, getViewKey, CREATE_PENDING_KEY, type Store } from './store/useStore';
|
|
24
28
|
export { useClickOutside } from './ui/useClickOutside';
|
|
25
29
|
export { useCountriesTranslation, type CountryCodes } from './i18n/useCountriesTranslation';
|
|
@@ -33,4 +37,5 @@ export { useResponsiveSize } from './ui/useResponsiveSize';
|
|
|
33
37
|
export { useTranslate } from './i18n/useTranslate';
|
|
34
38
|
export type { StoreOptions, RetrieveOptions, ListOptions, ViewKeyParams, View, ViewOptions, } from './store/types';
|
|
35
39
|
export type { PaginatedQuery, Pagination, ListResponse, RetrieveResponse, HttpResponse, RequestOptions, ErrorItem, MandeError, MandeErrorBody, } from './http/types';
|
|
40
|
+
export type { SessionExpiryReason } from './auth/types';
|
|
36
41
|
export type { Language, Translation, InternationalizedRoute, } from './i18n/types';
|
package/dist/index.js
CHANGED
|
@@ -1,193 +1,289 @@
|
|
|
1
|
-
import { mande as
|
|
2
|
-
import { ref as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { mande as N } from "mande";
|
|
2
|
+
import { ref as w, computed as R, onMounted as z, onBeforeUnmount as H, onUnmounted as K } from "vue";
|
|
3
|
+
import { defineStore as F } from "pinia";
|
|
4
|
+
import { useI18n as E } from "vue-i18n";
|
|
5
|
+
import { createError as O } from "h3";
|
|
6
|
+
import { showError as x, useRuntimeConfig as q, useState as Z } from "nuxt/app";
|
|
7
|
+
let I;
|
|
8
|
+
function ce(e) {
|
|
9
|
+
if (!e.baseUrl)
|
|
9
10
|
throw new Error("@choosemycompany/lib: configureHttp() needs a non-empty baseUrl");
|
|
10
|
-
|
|
11
|
+
I = e;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
if (!
|
|
13
|
+
function D(e) {
|
|
14
|
+
if (!I)
|
|
14
15
|
throw new Error(
|
|
15
16
|
"@choosemycompany/lib: useHttp() was called before configureHttp(). Declare the base URLs from an app plugin."
|
|
16
17
|
);
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
if (typeof
|
|
20
|
-
const
|
|
18
|
+
if (e === void 0) return I.baseUrl;
|
|
19
|
+
const a = I.targets ?? {}, i = Object.hasOwn(a, e) ? a[e] : void 0;
|
|
20
|
+
if (typeof i != "string" || !i) {
|
|
21
|
+
const t = Object.keys(a), n = t.length > 0 ? t.join(", ") : "none";
|
|
21
22
|
throw new Error(
|
|
22
|
-
`@choosemycompany/lib: no HTTP target named "${
|
|
23
|
+
`@choosemycompany/lib: no HTTP target named "${e}". Declared targets: ${n}.`
|
|
23
24
|
);
|
|
24
25
|
}
|
|
25
|
-
return
|
|
26
|
+
return i;
|
|
27
|
+
}
|
|
28
|
+
const V = "/auth/api/v2/login/token/refresh", J = "/auth/api/v2/", j = "cmc-auth-session-refresh", _ = F("cmc-auth-session", () => {
|
|
29
|
+
const e = w(!1), a = w(!1), i = w(void 0);
|
|
30
|
+
let t, n = 0;
|
|
31
|
+
const s = R(() => e.value && !a.value);
|
|
32
|
+
function d() {
|
|
33
|
+
e.value = !0, a.value = !1, i.value = void 0;
|
|
34
|
+
}
|
|
35
|
+
function l() {
|
|
36
|
+
n += 1, e.value = !1, a.value = !1, i.value = void 0;
|
|
37
|
+
}
|
|
38
|
+
function p() {
|
|
39
|
+
n += 1, e.value = !1, a.value = !0, i.value = "logout";
|
|
40
|
+
}
|
|
41
|
+
function c(h) {
|
|
42
|
+
n += 1, e.value = !1, a.value = !0, i.value = h;
|
|
43
|
+
}
|
|
44
|
+
async function m() {
|
|
45
|
+
if (a.value)
|
|
46
|
+
throw new Error("Session is expired: no refresh will be attempted");
|
|
47
|
+
return t ??= v(g).finally(() => {
|
|
48
|
+
t = void 0;
|
|
49
|
+
}), t;
|
|
50
|
+
}
|
|
51
|
+
async function v(h) {
|
|
52
|
+
const b = globalThis.navigator?.locks;
|
|
53
|
+
if (!b) return h();
|
|
54
|
+
await b.request(j, h);
|
|
55
|
+
}
|
|
56
|
+
async function g() {
|
|
57
|
+
const h = n, b = () => h !== n, r = new URL(V, D()).href;
|
|
58
|
+
let u;
|
|
59
|
+
try {
|
|
60
|
+
u = await fetch(r, {
|
|
61
|
+
method: "POST",
|
|
62
|
+
credentials: "include"
|
|
63
|
+
});
|
|
64
|
+
} catch (o) {
|
|
65
|
+
throw b() || C(), o;
|
|
66
|
+
}
|
|
67
|
+
if (!u.ok)
|
|
68
|
+
throw b() || (u.status === 401 ? c(e.value ? "refresh-rejected" : "no-session") : C()), new Error(`Token refresh failed with status ${u.status}`);
|
|
69
|
+
if (b())
|
|
70
|
+
throw new Error("Session was dropped while the refresh was in flight");
|
|
71
|
+
d();
|
|
72
|
+
}
|
|
73
|
+
function C() {
|
|
74
|
+
i.value = "refresh-unreachable";
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
isOpen: e,
|
|
78
|
+
isExpired: a,
|
|
79
|
+
expiryReason: i,
|
|
80
|
+
isAuthenticated: s,
|
|
81
|
+
open: d,
|
|
82
|
+
expire: c,
|
|
83
|
+
clear: l,
|
|
84
|
+
logout: p,
|
|
85
|
+
refresh: m
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
function $() {
|
|
89
|
+
return import.meta.server || typeof document > "u";
|
|
90
|
+
}
|
|
91
|
+
function W(e) {
|
|
92
|
+
return (typeof e == "string" ? e : e instanceof URL ? e.href : e.url).includes(J);
|
|
93
|
+
}
|
|
94
|
+
function Q() {
|
|
95
|
+
return async (e, a) => {
|
|
96
|
+
if ($()) return fetch(e, a);
|
|
97
|
+
const i = await fetch(e, a);
|
|
98
|
+
if (i.status !== 401 || W(e) || new Headers(a?.headers).has("Authorization")) return i;
|
|
99
|
+
let t;
|
|
100
|
+
try {
|
|
101
|
+
t = _();
|
|
102
|
+
} catch {
|
|
103
|
+
return i;
|
|
104
|
+
}
|
|
105
|
+
if (t.isExpired) return i;
|
|
106
|
+
try {
|
|
107
|
+
await t.refresh();
|
|
108
|
+
} catch (n) {
|
|
109
|
+
return t.isExpired || console.warn("[cmc-lib] token refresh failed, returning the original 401", n), i;
|
|
110
|
+
}
|
|
111
|
+
return fetch(e, a);
|
|
112
|
+
};
|
|
26
113
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
114
|
+
function fe(e) {
|
|
115
|
+
const a = N(D(e), {
|
|
29
116
|
headers: {}
|
|
30
|
-
});
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
...
|
|
34
|
-
Authorization: `Bearer ${
|
|
117
|
+
}, Q());
|
|
118
|
+
function i(n) {
|
|
119
|
+
a.options.headers = {
|
|
120
|
+
...a.options.headers ?? {},
|
|
121
|
+
Authorization: `Bearer ${n}`
|
|
35
122
|
};
|
|
36
123
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
124
|
+
function t() {
|
|
125
|
+
a.options.headers && delete a.options.headers.Authorization;
|
|
39
126
|
}
|
|
40
|
-
return { http:
|
|
127
|
+
return { http: a, setToken: i, clearToken: t };
|
|
128
|
+
}
|
|
129
|
+
function pe(e, a) {
|
|
130
|
+
return e.replace(Y, (i, t) => {
|
|
131
|
+
const n = Object.hasOwn(a, t) ? a[t] : void 0;
|
|
132
|
+
if (typeof n != "string" && typeof n != "number")
|
|
133
|
+
throw new Error(`Missing URL parameter "${t}" for template "${e}"`);
|
|
134
|
+
return encodeURIComponent(String(n));
|
|
135
|
+
});
|
|
41
136
|
}
|
|
42
|
-
|
|
43
|
-
|
|
137
|
+
const Y = /\{(\w+)\}/g;
|
|
138
|
+
function T(e) {
|
|
139
|
+
return Object.entries(e).sort(([a], [i]) => a.localeCompare(i)).map(([a, i]) => `${a}=${i}`).join("|");
|
|
44
140
|
}
|
|
45
|
-
const
|
|
46
|
-
function
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
141
|
+
const X = "create";
|
|
142
|
+
function ge(e) {
|
|
143
|
+
const a = w({}), i = w({}), t = w({}), n = w({}), s = e.getItemId ?? ((r) => {
|
|
144
|
+
const u = r.id;
|
|
145
|
+
if (u === void 0)
|
|
50
146
|
throw new Error(
|
|
51
147
|
"useStore: no `getItemId` option provided and item has no `id` property. Either pass `getItemId` in the store options, or expose an `id` field on your items."
|
|
52
148
|
);
|
|
53
|
-
return
|
|
149
|
+
return u;
|
|
54
150
|
});
|
|
55
|
-
function
|
|
56
|
-
return !!
|
|
151
|
+
function d(r) {
|
|
152
|
+
return !!n.value[r];
|
|
57
153
|
}
|
|
58
|
-
async function l(r,
|
|
59
|
-
|
|
154
|
+
async function l(r, u) {
|
|
155
|
+
n.value[r] = u;
|
|
60
156
|
try {
|
|
61
|
-
const o = await
|
|
62
|
-
return delete
|
|
157
|
+
const o = await u;
|
|
158
|
+
return delete t.value[r], o;
|
|
63
159
|
} catch (o) {
|
|
64
|
-
throw
|
|
160
|
+
throw t.value[r] = o, o;
|
|
65
161
|
} finally {
|
|
66
|
-
|
|
162
|
+
n.value[r] === u && delete n.value[r];
|
|
67
163
|
}
|
|
68
164
|
}
|
|
69
|
-
async function
|
|
70
|
-
if (!
|
|
165
|
+
async function p(r, u = {}) {
|
|
166
|
+
if (!e.fetchOne)
|
|
71
167
|
throw new Error("useStore.retrieve called but fetchOne is not defined in store options");
|
|
72
|
-
const { force: o = !1 } =
|
|
73
|
-
if (
|
|
74
|
-
return
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
const
|
|
168
|
+
const { force: o = !1 } = u;
|
|
169
|
+
if (a.value[r] && !o)
|
|
170
|
+
return a.value[r];
|
|
171
|
+
const f = n.value[r];
|
|
172
|
+
if (f)
|
|
173
|
+
return f;
|
|
174
|
+
const B = e.fetchOne, S = (async () => {
|
|
79
175
|
try {
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
} catch (
|
|
83
|
-
|
|
176
|
+
const M = await B(r), A = e.enrichItem ? e.enrichItem(M) : M;
|
|
177
|
+
return a.value[r] = A, delete t.value[r], a.value[r];
|
|
178
|
+
} catch (M) {
|
|
179
|
+
t.value[r] = M;
|
|
84
180
|
return;
|
|
85
181
|
} finally {
|
|
86
|
-
delete
|
|
182
|
+
delete n.value[r];
|
|
87
183
|
}
|
|
88
184
|
})();
|
|
89
|
-
return
|
|
185
|
+
return n.value[r] = S, S;
|
|
90
186
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
187
|
+
function c(r) {
|
|
188
|
+
const u = T(r), o = i.value[u];
|
|
93
189
|
if (o)
|
|
94
190
|
return {
|
|
95
|
-
items: o.itemIds.map((
|
|
191
|
+
items: o.itemIds.map((f) => a.value[f]).filter((f) => f !== void 0),
|
|
96
192
|
total: o.total,
|
|
97
193
|
hasMore: o.hasMore,
|
|
98
194
|
page: o.page,
|
|
99
195
|
limit: o.limit
|
|
100
196
|
};
|
|
101
197
|
}
|
|
102
|
-
async function
|
|
103
|
-
if (!
|
|
198
|
+
async function m(r, u = {}) {
|
|
199
|
+
if (!e.fetchPage)
|
|
104
200
|
throw new Error("useStore.list called but fetchPage is not defined in store options");
|
|
105
|
-
const o = T(r), { force:
|
|
106
|
-
if (
|
|
107
|
-
return
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
110
|
-
return await
|
|
111
|
-
const
|
|
201
|
+
const o = T(r), { force: f = !1 } = u;
|
|
202
|
+
if (i.value[o] && !f)
|
|
203
|
+
return c(r);
|
|
204
|
+
const B = n.value[o];
|
|
205
|
+
if (B)
|
|
206
|
+
return await B, c(r);
|
|
207
|
+
const S = e.fetchPage, M = (async () => {
|
|
112
208
|
try {
|
|
113
|
-
const
|
|
114
|
-
for (const
|
|
115
|
-
const
|
|
116
|
-
|
|
209
|
+
const A = await S(r), k = [];
|
|
210
|
+
for (const y of A.items) {
|
|
211
|
+
const P = e.enrichItem ? e.enrichItem(y) : y, U = s(P);
|
|
212
|
+
a.value[U] = P, k.push(U);
|
|
117
213
|
}
|
|
118
|
-
|
|
119
|
-
itemIds:
|
|
120
|
-
total:
|
|
121
|
-
hasMore:
|
|
122
|
-
page:
|
|
123
|
-
limit:
|
|
124
|
-
}, delete
|
|
125
|
-
} catch (
|
|
126
|
-
|
|
214
|
+
i.value[o] = {
|
|
215
|
+
itemIds: k,
|
|
216
|
+
total: A.total,
|
|
217
|
+
hasMore: A.hasMore,
|
|
218
|
+
page: A.page,
|
|
219
|
+
limit: A.limit
|
|
220
|
+
}, delete t.value[o];
|
|
221
|
+
} catch (A) {
|
|
222
|
+
t.value[o] = A;
|
|
127
223
|
} finally {
|
|
128
|
-
delete
|
|
224
|
+
delete n.value[o];
|
|
129
225
|
}
|
|
130
226
|
})();
|
|
131
|
-
return
|
|
227
|
+
return n.value[o] = M, await M, c(r);
|
|
132
228
|
}
|
|
133
|
-
async function
|
|
134
|
-
if (!
|
|
229
|
+
async function v(r, u = X) {
|
|
230
|
+
if (!e.createMutation)
|
|
135
231
|
throw new Error("useStore.create called but createMutation is not defined in store options");
|
|
136
|
-
const o =
|
|
137
|
-
return
|
|
232
|
+
const o = e.createMutation, f = await l(u, (async () => o(r))()), B = e.enrichItem ? e.enrichItem(f) : f, S = s(B);
|
|
233
|
+
return a.value[S] = B, i.value = {}, B;
|
|
138
234
|
}
|
|
139
|
-
async function
|
|
140
|
-
if (!
|
|
235
|
+
async function g(r, u) {
|
|
236
|
+
if (!e.updateMutation)
|
|
141
237
|
throw new Error("useStore.update called but updateMutation is not defined in store options");
|
|
142
|
-
const o =
|
|
143
|
-
return
|
|
238
|
+
const o = e.updateMutation, f = await l(r, (async () => o(r, u))()), B = e.enrichItem ? e.enrichItem(f) : f;
|
|
239
|
+
return a.value[r] = B, B;
|
|
144
240
|
}
|
|
145
|
-
async function
|
|
146
|
-
if (!
|
|
241
|
+
async function C(r) {
|
|
242
|
+
if (!e.removeMutation)
|
|
147
243
|
throw new Error("useStore.remove called but removeMutation is not defined in store options");
|
|
148
|
-
const
|
|
149
|
-
await l(r, (async () =>
|
|
150
|
-
for (const o of Object.values(
|
|
151
|
-
const
|
|
152
|
-
|
|
244
|
+
const u = e.removeMutation;
|
|
245
|
+
await l(r, (async () => u(r))()), delete a.value[r];
|
|
246
|
+
for (const o of Object.values(i.value)) {
|
|
247
|
+
const f = o.itemIds.indexOf(r);
|
|
248
|
+
f !== -1 && (o.itemIds.splice(f, 1), o.total = Math.max(0, o.total - 1));
|
|
153
249
|
}
|
|
154
250
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
251
|
+
function h() {
|
|
252
|
+
t.value = {};
|
|
157
253
|
}
|
|
158
|
-
function
|
|
159
|
-
|
|
254
|
+
function b() {
|
|
255
|
+
a.value = {}, i.value = {}, t.value = {}, n.value = {};
|
|
160
256
|
}
|
|
161
|
-
return { items:
|
|
257
|
+
return { items: a, views: i, errors: t, isPending: d, list: m, reset: b, retrieve: p, getView: c, withPending: l, create: v, update: g, remove: C, clearErrors: h };
|
|
162
258
|
}
|
|
163
|
-
function
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
!
|
|
259
|
+
function me(e, a) {
|
|
260
|
+
const i = (t) => {
|
|
261
|
+
const n = e.value, s = t.target;
|
|
262
|
+
!n || !s || n.contains(s) || a();
|
|
167
263
|
};
|
|
168
|
-
|
|
169
|
-
document.addEventListener("click",
|
|
170
|
-
}),
|
|
171
|
-
document.removeEventListener("click",
|
|
264
|
+
z(() => {
|
|
265
|
+
document.addEventListener("click", i);
|
|
266
|
+
}), H(() => {
|
|
267
|
+
document.removeEventListener("click", i);
|
|
172
268
|
});
|
|
173
269
|
}
|
|
174
|
-
function
|
|
175
|
-
const { locale:
|
|
176
|
-
function i
|
|
177
|
-
const
|
|
178
|
-
if (!
|
|
179
|
-
throw new Error(`Unknown country code: ${
|
|
180
|
-
if (
|
|
181
|
-
return
|
|
182
|
-
if (e
|
|
183
|
-
return e
|
|
184
|
-
if (
|
|
185
|
-
return
|
|
186
|
-
throw new Error(`Unknown country code: ${
|
|
270
|
+
function he() {
|
|
271
|
+
const { locale: e } = E();
|
|
272
|
+
function a(i, t = null) {
|
|
273
|
+
const n = ee[i.trim().toUpperCase()];
|
|
274
|
+
if (!n)
|
|
275
|
+
throw new Error(`Unknown country code: ${i}`);
|
|
276
|
+
if (t && n[t])
|
|
277
|
+
return n[t];
|
|
278
|
+
if (n[e.value])
|
|
279
|
+
return n[e.value];
|
|
280
|
+
if (e.value !== "en" && n.en)
|
|
281
|
+
return n.en;
|
|
282
|
+
throw new Error(`Unknown country code: ${i}`);
|
|
187
283
|
}
|
|
188
|
-
return
|
|
284
|
+
return a;
|
|
189
285
|
}
|
|
190
|
-
const
|
|
286
|
+
const ee = {
|
|
191
287
|
AD: { en: "Andorra", fr: "Andorre", es: "Andorra", de: "Andorra", it: "Andorra", pt: "Andorra", da: "Andorra" },
|
|
192
288
|
AE: { en: "United Arab Emirates", fr: "Émirats arabes unis", es: "Emiratos Árabes Unidos", de: "Vereinigte Arabische Emirate", it: "Emirati Arabi Uniti", pt: "Emirados Árabes Unidos", da: "De Forenede Arabiske Emirater" },
|
|
193
289
|
AF: { en: "Afghanistan", fr: "Afghanistan", es: "Afganistán", de: "Afghanistan", it: "Afghanistan", pt: "Afeganistão", da: "Afghanistan" },
|
|
@@ -325,151 +421,153 @@ const V = {
|
|
|
325
421
|
ZA: { en: "South Africa", fr: "Afrique Du Sud", es: "Sudáfrica", de: "Südafrika", it: "Sudafrica", pt: "África Do Sul", da: "Sydafrika" },
|
|
326
422
|
ZM: { en: "Zambia", fr: "Zambie", es: "Zambia", de: "Sambia", it: "Zambia", pt: "Zâmbia", da: "Zambia" },
|
|
327
423
|
ZW: { en: "Zimbabwe", fr: "Zimbabwe", es: "Zimbabue", de: "Simbabwe", it: "Zimbabwe", pt: "Zimbábue", da: "Zimbabwe" }
|
|
328
|
-
},
|
|
329
|
-
const
|
|
330
|
-
statusCode:
|
|
331
|
-
statusMessage:
|
|
332
|
-
message:
|
|
333
|
-
data:
|
|
424
|
+
}, be = ({ code: e, message: a, data: i }) => {
|
|
425
|
+
const t = a || "An unexpected error occurred", n = O({
|
|
426
|
+
statusCode: e,
|
|
427
|
+
statusMessage: t,
|
|
428
|
+
message: t,
|
|
429
|
+
data: i
|
|
334
430
|
});
|
|
335
|
-
throw
|
|
336
|
-
},
|
|
337
|
-
function
|
|
338
|
-
const { gtagId:
|
|
431
|
+
throw x(n), n;
|
|
432
|
+
}, ae = "ilcJCL_lmpwcEJfSkKND";
|
|
433
|
+
function Be() {
|
|
434
|
+
const { gtagId: e } = q().public;
|
|
339
435
|
return { reportConversion: () => {
|
|
340
|
-
if (typeof window > "u" || typeof window.gtag > "u" || !
|
|
436
|
+
if (typeof window > "u" || typeof window.gtag > "u" || !e)
|
|
341
437
|
return;
|
|
342
|
-
const
|
|
438
|
+
const i = `${e}/${ae}`;
|
|
343
439
|
window.gtag("event", "conversion", {
|
|
344
|
-
send_to:
|
|
440
|
+
send_to: i
|
|
345
441
|
});
|
|
346
442
|
} };
|
|
347
443
|
}
|
|
348
|
-
const
|
|
349
|
-
function
|
|
350
|
-
const { locale:
|
|
351
|
-
return { contactUrl:
|
|
444
|
+
const L = "https://5509641.hs-sites-eu1.com";
|
|
445
|
+
function ve() {
|
|
446
|
+
const { locale: e } = E();
|
|
447
|
+
return { contactUrl: R(() => e.value === "fr" ? `${L}/contact` : `${L}/${e.value}/contact`) };
|
|
352
448
|
}
|
|
353
|
-
function
|
|
354
|
-
async function
|
|
449
|
+
function Ae() {
|
|
450
|
+
async function e(t) {
|
|
355
451
|
await Promise.all(
|
|
356
|
-
|
|
357
|
-
(
|
|
358
|
-
if (!
|
|
359
|
-
const
|
|
360
|
-
|
|
452
|
+
t.map(
|
|
453
|
+
(n) => new Promise((s) => {
|
|
454
|
+
if (!n) return s(null);
|
|
455
|
+
const d = new Image();
|
|
456
|
+
d.onload = () => s(null), d.onerror = () => s(null), d.src = n;
|
|
361
457
|
})
|
|
362
458
|
)
|
|
363
459
|
);
|
|
364
460
|
}
|
|
365
|
-
function
|
|
366
|
-
return
|
|
461
|
+
function a(t, n) {
|
|
462
|
+
return n.split(".").reduce((s, d) => s && typeof s == "object" && d in s ? s[d] : "", t) ?? "";
|
|
367
463
|
}
|
|
368
|
-
function t
|
|
464
|
+
function i(t, n, s) {
|
|
369
465
|
if (import.meta.server)
|
|
370
466
|
return async (l) => {
|
|
371
|
-
|
|
467
|
+
t.value = !0;
|
|
372
468
|
};
|
|
373
|
-
const
|
|
374
|
-
`${
|
|
469
|
+
const d = Z(
|
|
470
|
+
`${n}LoadedImageCache`,
|
|
375
471
|
() => ({})
|
|
376
472
|
);
|
|
377
473
|
return async (l) => {
|
|
378
474
|
if (!l) {
|
|
379
|
-
|
|
475
|
+
t.value = !1;
|
|
380
476
|
return;
|
|
381
477
|
}
|
|
382
|
-
const
|
|
383
|
-
if (
|
|
384
|
-
|
|
478
|
+
const p = s.map((v) => a(l, v)), c = `${n}|${p.join("|")}`;
|
|
479
|
+
if (d.value[c]) {
|
|
480
|
+
t.value = !0;
|
|
385
481
|
return;
|
|
386
482
|
}
|
|
387
|
-
|
|
388
|
-
const
|
|
389
|
-
await
|
|
483
|
+
t.value = !1;
|
|
484
|
+
const m = p.filter(Boolean).map(String);
|
|
485
|
+
await e(m), d.value[c] = !0, t.value = !0;
|
|
390
486
|
};
|
|
391
487
|
}
|
|
392
|
-
return
|
|
488
|
+
return i;
|
|
393
489
|
}
|
|
394
|
-
const
|
|
490
|
+
const ne = {
|
|
395
491
|
en: ["US", "UK"]
|
|
396
|
-
},
|
|
397
|
-
function
|
|
398
|
-
const
|
|
492
|
+
}, ie = "FR";
|
|
493
|
+
function te(e) {
|
|
494
|
+
const a = e.trim().replace("_", "-"), [i, t] = a.split("-");
|
|
399
495
|
return {
|
|
400
|
-
language:
|
|
401
|
-
region:
|
|
496
|
+
language: i?.toLowerCase() ?? "",
|
|
497
|
+
region: t?.toUpperCase() ?? ""
|
|
402
498
|
};
|
|
403
499
|
}
|
|
404
|
-
function G(
|
|
405
|
-
return
|
|
500
|
+
function G(e) {
|
|
501
|
+
return e.toString().trim().toUpperCase();
|
|
406
502
|
}
|
|
407
|
-
function
|
|
408
|
-
function a
|
|
409
|
-
if (!
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
for (const
|
|
415
|
-
if (
|
|
416
|
-
return
|
|
417
|
-
return
|
|
503
|
+
function Ce() {
|
|
504
|
+
function e(a, i) {
|
|
505
|
+
if (!i.length) return;
|
|
506
|
+
const t = i.map(G), n = new Set(t), { language: s, region: d } = te(a), l = [];
|
|
507
|
+
d && l.push(d);
|
|
508
|
+
const p = ne[s];
|
|
509
|
+
p?.length && l.push(...p.map(G)), s && l.push(s.toUpperCase()), l.push(ie);
|
|
510
|
+
for (const c of l)
|
|
511
|
+
if (n.has(c))
|
|
512
|
+
return c;
|
|
513
|
+
return t[0];
|
|
418
514
|
}
|
|
419
|
-
return { getRegionFromLocale:
|
|
515
|
+
return { getRegionFromLocale: e };
|
|
420
516
|
}
|
|
421
|
-
function
|
|
422
|
-
const { t:
|
|
423
|
-
function i
|
|
424
|
-
const
|
|
425
|
-
let
|
|
426
|
-
for (;
|
|
427
|
-
const { index:
|
|
428
|
-
|
|
517
|
+
function we() {
|
|
518
|
+
const { t: e } = E();
|
|
519
|
+
function a(i, t) {
|
|
520
|
+
const n = e(i), s = [], l = t.map((g) => g.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), p = new RegExp(`\\[(${l})\\]([\\s\\S]*?)\\[\\/\\1\\]`, "g"), c = t.reduce((g, C) => (g[C] = !1, g), {});
|
|
521
|
+
let m = 0, v = p.exec(n);
|
|
522
|
+
for (; v; ) {
|
|
523
|
+
const { index: g, 0: C, 1: h, 2: b } = v;
|
|
524
|
+
g > m && s.push({ text: n.slice(m, g), ...c }), b && h && s.push({ text: b, ...c, [h]: !0 }), m = g + C.length, v = p.exec(n);
|
|
429
525
|
}
|
|
430
|
-
return
|
|
526
|
+
return m < n.length && s.push({ text: n.slice(m), ...c }), s;
|
|
431
527
|
}
|
|
432
|
-
return { parse:
|
|
528
|
+
return { parse: a };
|
|
433
529
|
}
|
|
434
|
-
function
|
|
435
|
-
const
|
|
436
|
-
() =>
|
|
530
|
+
function Me(e, a, i = 768) {
|
|
531
|
+
const t = w(i - 1), n = R(
|
|
532
|
+
() => t.value >= i ? a : e
|
|
437
533
|
);
|
|
438
534
|
if (import.meta.client) {
|
|
439
535
|
const s = () => {
|
|
440
|
-
|
|
536
|
+
t.value = window.innerWidth;
|
|
441
537
|
};
|
|
442
|
-
|
|
538
|
+
z(() => {
|
|
443
539
|
s(), window.addEventListener("resize", s);
|
|
444
540
|
}), K(() => {
|
|
445
541
|
window.removeEventListener("resize", s);
|
|
446
542
|
});
|
|
447
543
|
}
|
|
448
|
-
return { size:
|
|
544
|
+
return { size: n, windowWidth: t };
|
|
449
545
|
}
|
|
450
|
-
function
|
|
451
|
-
const { locale:
|
|
452
|
-
function i
|
|
453
|
-
if (!
|
|
454
|
-
const
|
|
455
|
-
return
|
|
546
|
+
function Se() {
|
|
547
|
+
const { locale: e } = E();
|
|
548
|
+
function a(i, t = "fr") {
|
|
549
|
+
if (!i) return "";
|
|
550
|
+
const n = e.value;
|
|
551
|
+
return i[n] ?? i[t] ?? "";
|
|
456
552
|
}
|
|
457
|
-
return
|
|
553
|
+
return a;
|
|
458
554
|
}
|
|
459
555
|
export {
|
|
460
|
-
|
|
461
|
-
|
|
556
|
+
X as CREATE_PENDING_KEY,
|
|
557
|
+
pe as buildUrl,
|
|
558
|
+
ce as configureHttp,
|
|
462
559
|
T as getViewKey,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
560
|
+
be as showAndThrowError,
|
|
561
|
+
_ as useAuthSession,
|
|
562
|
+
me as useClickOutside,
|
|
563
|
+
he as useCountriesTranslation,
|
|
564
|
+
Be as useGtagConversion,
|
|
565
|
+
fe as useHttp,
|
|
566
|
+
ve as useHubspotContactUrl,
|
|
567
|
+
Ae as useImageCacheWatcherCallback,
|
|
568
|
+
Ce as useLocaleHelpers,
|
|
569
|
+
we as useParseTranslation,
|
|
570
|
+
Me as useResponsiveSize,
|
|
571
|
+
ge as useStore,
|
|
572
|
+
Se as useTranslate
|
|
475
573
|
};
|
package/dist/store/types.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export type View<Item> = ViewKeyParams & {
|
|
|
26
26
|
hasMore: boolean;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
* Reserved for
|
|
30
|
-
*
|
|
29
|
+
* Reserved for "infinite scroll vs. paginated" switching. Not read by the
|
|
30
|
+
* implementation — declared here to lock the public surface.
|
|
31
31
|
*/
|
|
32
32
|
export type ViewOptions = {
|
|
33
33
|
infinite?: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@choosemycompany/lib",
|
|
3
3
|
"description": "Shared composables, stores and types for ChooseMyCompany front apps",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"packageManager": "pnpm@10.17.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@nuxtjs/i18n": "^10.0.0",
|
|
33
33
|
"h3": "^1.0.0",
|
|
34
|
-
"mande": "^2.0.
|
|
34
|
+
"mande": "^2.0.10",
|
|
35
35
|
"nuxt": "^4.0.0",
|
|
36
36
|
"pinia": "^3.0.0",
|
|
37
37
|
"ufo": "^1.0.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"h3": "^1.13.0",
|
|
50
50
|
"happy-dom": "^18.0.1",
|
|
51
51
|
"jiti": "^2.6.0",
|
|
52
|
-
"mande": "^2.0.
|
|
52
|
+
"mande": "^2.0.10",
|
|
53
53
|
"pinia": "^3.0.3",
|
|
54
54
|
"typescript": "^5.9.2",
|
|
55
55
|
"typescript-eslint": "^8.44.1",
|