@frontic/nuxt 1.1.1 → 1.3.0

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.
Files changed (40) hide show
  1. package/README.md +37 -1
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/composables/analytics.d.ts +7 -1
  4. package/dist/runtime/composables/blocks.js +3 -3
  5. package/dist/runtime/composables/listings.d.ts +22 -0
  6. package/dist/runtime/composables/listings.js +30 -15
  7. package/dist/runtime/composables/pages.js +3 -3
  8. package/dist/runtime/composables/trees.js +3 -3
  9. package/dist/runtime/composables/useFronticBlock.js +4 -2
  10. package/dist/runtime/composables/useFronticClient.d.ts +30 -0
  11. package/dist/runtime/composables/useFronticClient.js +45 -22
  12. package/dist/runtime/composables/useFronticContext.d.ts +4 -1
  13. package/dist/runtime/composables/useFronticContext.js +15 -20
  14. package/dist/runtime/composables/useFronticListing.d.ts +10 -4
  15. package/dist/runtime/composables/useFronticListing.js +6 -2
  16. package/dist/runtime/composables/useFronticPage.js +4 -2
  17. package/dist/runtime/composables/useFronticSearch.js +49 -13
  18. package/dist/runtime/composables/useFronticTree.js +4 -2
  19. package/dist/runtime/composables/useSearchUrlSync.d.ts +39 -0
  20. package/dist/runtime/composables/useSearchUrlSync.js +53 -0
  21. package/dist/runtime/server/client.d.ts +55 -0
  22. package/dist/runtime/server/client.js +53 -0
  23. package/dist/runtime/types/index.d.ts +1 -1
  24. package/dist/runtime/types/listing.d.ts +38 -2
  25. package/dist/runtime/types/options.d.ts +18 -4
  26. package/dist/runtime/types/registry.d.ts +21 -2
  27. package/dist/runtime/types/search.d.ts +63 -2
  28. package/dist/runtime/utils/describe-error.d.ts +19 -0
  29. package/dist/runtime/utils/describe-error.js +16 -0
  30. package/dist/runtime/utils/query-keys.d.ts +10 -5
  31. package/dist/runtime/utils/query-keys.js +5 -0
  32. package/dist/runtime/utils/request-defaults.d.ts +11 -0
  33. package/dist/runtime/utils/request-defaults.js +8 -0
  34. package/dist/runtime/utils/resolve-context-key.d.ts +30 -0
  35. package/dist/runtime/utils/resolve-context-key.js +37 -0
  36. package/dist/runtime/utils/search-url.d.ts +90 -0
  37. package/dist/runtime/utils/search-url.js +184 -0
  38. package/dist/runtime/utils/state-helpers.d.ts +13 -0
  39. package/dist/runtime/utils/state-helpers.js +6 -0
  40. package/package.json +5 -1
@@ -1,3 +1,4 @@
1
+ import { toValue } from "vue";
1
2
  export const DEFAULT_STALE_TIME = 1e3 * 60 * 5;
2
3
  export function requestContextSlot(contextKey, contextDomain) {
3
4
  return { context: contextKey ?? null, domain: contextDomain ?? null };
@@ -16,3 +17,7 @@ function stripUndefined(value) {
16
17
  }
17
18
  return value;
18
19
  }
20
+ export function contextKeyOf(config) {
21
+ const value = toValue(config.contextKey);
22
+ return value === false ? void 0 : value;
23
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Merge per-request options over a client's resolved defaults.
3
+ *
4
+ * Shared by both clients — the app composable and the Nitro one — because the
5
+ * merge rule is the contract, not an implementation detail: the query factories
6
+ * pass their whole option object, so absent values arrive as an explicit
7
+ * `undefined`. A plain spread would let those erase the defaults the client just
8
+ * resolved, which is how an auto-resolved contextDomain stopped reaching the
9
+ * wire (FSC-4523). Only keys with a value override.
10
+ */
11
+ export declare function withDefaults<TDefaults extends object, TOptions extends object>(defaults: TDefaults, reqOptions?: TOptions): TDefaults & TOptions;
@@ -0,0 +1,8 @@
1
+ export function withDefaults(defaults, reqOptions) {
2
+ if (!reqOptions) return defaults;
3
+ const provided = Object.fromEntries(Object.entries(reqOptions).filter(([, value]) => value !== void 0));
4
+ const merged = { ...defaults, ...provided };
5
+ if (merged.requestUrl === false) delete merged.requestUrl;
6
+ if (merged.contextKey === false) delete merged.contextKey;
7
+ return merged;
8
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Which cookie the context lives in, and whether the module manages it at all.
3
+ *
4
+ * Module config is only the default: `useFronticContext({ cookieName, disableContext })`
5
+ * overrides both per instance, and an app that does so writes its token under a
6
+ * different cell than this resolver would guess. So the composable records what
7
+ * it actually used, and every read goes through that.
8
+ */
9
+ export interface FronticContextScope {
10
+ cookieName: string;
11
+ disableContext: boolean;
12
+ }
13
+ /**
14
+ * A getter for the current context token.
15
+ *
16
+ * Calls `useCookie`/`useState`, so it belongs in setup — the same rule
17
+ * `resolveContextDomain` follows. The scope is read per call rather than
18
+ * captured: a `useFronticContext` that registers a custom cookie after this
19
+ * composable's setup still has to be observed, or its token never reaches a
20
+ * request.
21
+ */
22
+ export declare function resolveContextKey(): () => string | undefined;
23
+ /**
24
+ * Apply a per-call override to the resolved token.
25
+ *
26
+ * `false` opts the call out — the request then resolves through `fs-domain`
27
+ * alone. Kept here rather than inlined per composable so the query key and the
28
+ * request cannot drift: every composable reads the token through this one rule.
29
+ */
30
+ export declare function resolveCallContextKey(override: string | false | undefined, auto: () => string | undefined): string | undefined;
@@ -0,0 +1,37 @@
1
+ import { useCookie, useNuxtApp, useRuntimeConfig, useState } from "nuxt/app";
2
+ function registeredScope(nuxtApp) {
3
+ return nuxtApp._fronticContext?.scope;
4
+ }
5
+ export function resolveContextKey() {
6
+ const config = useRuntimeConfig().public.frontic;
7
+ const nuxtApp = useNuxtApp();
8
+ const configured = {
9
+ cookieName: config?.contextCookieName ?? "fs-context",
10
+ disableContext: config?.disableContext ?? false
11
+ };
12
+ const cells = /* @__PURE__ */ new Map();
13
+ function makeCells(cookieName) {
14
+ const cookie = useCookie(cookieName);
15
+ const token = useState(`frontic:context:${cookieName}:token`, () => cookie.value ?? null);
16
+ return { cookie, token };
17
+ }
18
+ function cellsFor(cookieName, inSetup) {
19
+ let cell = cells.get(cookieName);
20
+ if (!cell) {
21
+ cell = inSetup ? makeCells(cookieName) : nuxtApp.runWithContext(() => makeCells(cookieName));
22
+ cells.set(cookieName, cell);
23
+ }
24
+ return cell;
25
+ }
26
+ if (!configured.disableContext) cellsFor(configured.cookieName, true);
27
+ return () => {
28
+ const scope = registeredScope(nuxtApp) ?? configured;
29
+ if (scope.disableContext) return void 0;
30
+ const { cookie, token } = cellsFor(scope.cookieName, false);
31
+ return token.value ?? cookie.value ?? void 0;
32
+ };
33
+ }
34
+ export function resolveCallContextKey(override, auto) {
35
+ if (override === false) return void 0;
36
+ return override ?? auto();
37
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Search URL Codec
3
+ *
4
+ * Pure, framework-agnostic serialization between useFronticSearch state and a URL query object.
5
+ * All URL-sync decisions live here; the composable/router glue (useSearchUrlSync) only wires it up.
6
+ *
7
+ * URL format:
8
+ * search → ?q=shoes (renameable; omitted when empty)
9
+ * sort → ?sort=name:asc (renameable; validated; omitted when default)
10
+ * equals → ?color=Red&color=Blue (repeated params; renameable)
11
+ * range → ?price_min=20&price_max=100 (two params; open-ended omits a bound)
12
+ * page → ?page=3 (renameable; omitted for page 1)
13
+ */
14
+ import type { EqualsFilter, RangeFilter } from './filter-helpers.js';
15
+ import type { ListingFieldConfig, SearchUrlQuerySyncOptions } from '../types/search.js';
16
+ /** A single query param value as produced by a router's `route.query`. */
17
+ export type UrlQueryValue = string | null | Array<string | null> | undefined;
18
+ /** A framework-agnostic view of `route.query` (Vue Router's LocationQuery is assignable to this). */
19
+ export type UrlQuery = Record<string, UrlQueryValue>;
20
+ /** The subset of useFronticSearch state that can round-trip through the URL. */
21
+ export interface SearchUrlState {
22
+ search?: string;
23
+ sort?: {
24
+ field: string;
25
+ order: 'asc' | 'desc';
26
+ } | undefined;
27
+ or: EqualsFilter[];
28
+ and: EqualsFilter[];
29
+ range: RangeFilter[];
30
+ page?: number | undefined;
31
+ }
32
+ /** Per-filter-field URL binding, resolved once at setup. */
33
+ export interface FilterParamSpec {
34
+ field: string;
35
+ kind: 'equals' | 'range';
36
+ logic: 'or' | 'and';
37
+ /** Equals: the single param name. */
38
+ param?: string;
39
+ /** Range: lower/upper bound param names. */
40
+ minParam?: string;
41
+ maxParam?: string;
42
+ }
43
+ /** Fully-resolved, serializable codec configuration (no Vue/Nuxt references). */
44
+ export interface SearchUrlCodecConfig {
45
+ history: 'replace' | 'push';
46
+ searchParam?: string;
47
+ sortParam?: string;
48
+ pageParam?: string;
49
+ filters: FilterParamSpec[];
50
+ sortAllowList: string[];
51
+ /** Carried verbatim so decode can apply `mode: 'exclude'`, which `sortAllowList` cannot express. */
52
+ sortConfig: ListingFieldConfig;
53
+ ownedKeys: string[];
54
+ /** Dev-only advisories surfaced by the glue (kept as data so this module stays pure). */
55
+ warnings: string[];
56
+ }
57
+ /** Context the resolver needs from the composable's options. */
58
+ export interface SearchUrlResolveContext {
59
+ filterConfig: ListingFieldConfig;
60
+ sortConfig: ListingFieldConfig;
61
+ orFilter: string[];
62
+ disableSearch: boolean;
63
+ disableFilter: boolean;
64
+ disableSorting: boolean;
65
+ }
66
+ /**
67
+ * Resolves the public `urlQuerySync` option into a flat, serializable codec config.
68
+ * Returns `undefined` when the option is falsy.
69
+ */
70
+ export declare function normalizeUrlQuerySyncConfig(option: boolean | SearchUrlQuerySyncOptions | undefined, ctx: SearchUrlResolveContext): SearchUrlCodecConfig | undefined;
71
+ /** Builds the encode/decode/compare closure for a resolved config. */
72
+ export declare function createSearchUrlCodec(config: SearchUrlCodecConfig): {
73
+ encode: (state: SearchUrlState) => Record<string, string | string[]>;
74
+ decode: (query: UrlQuery, current: SearchUrlState) => SearchUrlState;
75
+ canonical: (state: SearchUrlState) => string;
76
+ merge: (current: UrlQuery, owned: Record<string, string | string[]>) => {
77
+ query: UrlQuery;
78
+ changed: boolean;
79
+ };
80
+ ownedSignature: (query: UrlQuery) => string;
81
+ ownedKeys: string[];
82
+ };
83
+ /** First value of a param as a string; `undefined` when absent, `''` when present but valueless/empty. */
84
+ export declare function firstString(value: UrlQueryValue): string | undefined;
85
+ /** All non-empty string values of a param, as an array. */
86
+ export declare function toStringArray(value: UrlQueryValue): string[];
87
+ /** Strict number parse (integer or decimal, optional sign). Rejects '', whitespace, hex, 'Infinity', etc. */
88
+ export declare function parseNumStrict(value: string | undefined): number | undefined;
89
+ /** Strict positive-integer parse for page numbers (>= 1). */
90
+ export declare function parsePageStrict(value: string | undefined): number | undefined;
@@ -0,0 +1,184 @@
1
+ import { isValidSortString, isSortAllowed, parseSortString } from "./state-helpers.js";
2
+ const RESERVED_SLICES = ["search", "sort", "page"];
3
+ const DEFAULT_SLICES = ["search", "sort", "filter", "page"];
4
+ export function normalizeUrlQuerySyncConfig(option, ctx) {
5
+ if (!option) return void 0;
6
+ const opt = option === true ? {} : option;
7
+ const prefix = opt.prefix ?? "";
8
+ const include = opt.include ?? DEFAULT_SLICES;
9
+ const params = opt.params ?? {};
10
+ const history = opt.history ?? "replace";
11
+ const warnings = [];
12
+ const searchOn = include.includes("search") && !ctx.disableSearch;
13
+ const sortOn = include.includes("sort") && !ctx.disableSorting;
14
+ const filterOn = include.includes("filter") && !ctx.disableFilter;
15
+ const pageOn = include.includes("page");
16
+ const searchParam = searchOn ? prefix + (params.search ?? "q") : void 0;
17
+ const sortParam = sortOn ? prefix + (params.sort ?? "sort") : void 0;
18
+ const pageParam = pageOn ? prefix + (params.page ?? "page") : void 0;
19
+ const filters = [];
20
+ if (filterOn) {
21
+ for (const field of collectFilterFields(ctx, params)) {
22
+ if (RESERVED_SLICES.includes(field)) {
23
+ warnings.push(`filter field "${field}" collides with a reserved slice name and cannot be synced to the URL \u2014 rename it via a listing alias.`);
24
+ continue;
25
+ }
26
+ const base = prefix + (params[field] ?? field);
27
+ const kind = ctx.filterConfig.type?.[field] === "range" ? "range" : "equals";
28
+ const logic = ctx.orFilter.includes(field) ? "or" : "and";
29
+ filters.push(kind === "range" ? { field, kind, logic, minParam: `${base}_min`, maxParam: `${base}_max` } : { field, kind, logic, param: base });
30
+ }
31
+ if (filters.length === 0) {
32
+ warnings.push('urlQuerySync includes the "filter" slice but no filter fields could be derived \u2014 configure filter.select/label/type, orFilter, or urlQuerySync.params.');
33
+ }
34
+ }
35
+ const ownedKeys = [];
36
+ for (const p of [searchParam, sortParam, pageParam]) if (p) ownedKeys.push(p);
37
+ for (const f of filters) {
38
+ if (f.kind === "range") ownedKeys.push(f.minParam, f.maxParam);
39
+ else ownedKeys.push(f.param);
40
+ }
41
+ reportDuplicateParams(ownedKeys, warnings);
42
+ const sortAllowList = sortOn ? Array.from(/* @__PURE__ */ new Set([...Object.keys(ctx.sortConfig.label ?? {}), ...ctx.sortConfig.mode !== "exclude" ? ctx.sortConfig.select ?? [] : []])) : [];
43
+ return { history, searchParam, sortParam, pageParam, filters, sortAllowList, sortConfig: ctx.sortConfig, ownedKeys, warnings };
44
+ }
45
+ function collectFilterFields(ctx, params) {
46
+ const fields = /* @__PURE__ */ new Set();
47
+ const { filterConfig } = ctx;
48
+ for (const key of Object.keys(params)) if (!RESERVED_SLICES.includes(key)) fields.add(key);
49
+ if (filterConfig.select && filterConfig.mode !== "exclude") for (const f of filterConfig.select) fields.add(f);
50
+ for (const f of Object.keys(filterConfig.label ?? {})) fields.add(f);
51
+ for (const f of Object.keys(filterConfig.type ?? {})) fields.add(f);
52
+ for (const f of ctx.orFilter) fields.add(f);
53
+ return [...fields];
54
+ }
55
+ function reportDuplicateParams(ownedKeys, warnings) {
56
+ const seen = /* @__PURE__ */ new Set();
57
+ const dupes = /* @__PURE__ */ new Set();
58
+ for (const k of ownedKeys) {
59
+ if (seen.has(k)) dupes.add(k);
60
+ seen.add(k);
61
+ }
62
+ for (const k of dupes) warnings.push(`URL param "${k}" is claimed by more than one field/slice \u2014 the last one wins. Give them distinct names via urlQuerySync.params.`);
63
+ }
64
+ export function createSearchUrlCodec(config) {
65
+ const { searchParam, sortParam, pageParam, filters, sortAllowList, ownedKeys } = config;
66
+ function encode(state) {
67
+ const out = {};
68
+ if (searchParam && state.search && state.search.trim() !== "") out[searchParam] = state.search;
69
+ if (sortParam && state.sort) out[sortParam] = `${state.sort.field}:${state.sort.order}`;
70
+ if (pageParam && state.page && state.page > 1) out[pageParam] = String(state.page);
71
+ for (const spec of filters) {
72
+ if (spec.kind === "equals") {
73
+ const list = spec.logic === "or" ? state.or : state.and;
74
+ const found = list.find((f) => f.field === spec.field);
75
+ if (!found) continue;
76
+ const values = (Array.isArray(found.value) ? found.value : [found.value]).map((v) => String(v)).filter((v) => v !== "");
77
+ if (values.length === 1) out[spec.param] = values[0];
78
+ else if (values.length > 1) out[spec.param] = values;
79
+ } else {
80
+ const found = state.range.find((r) => r.field === spec.field);
81
+ if (!found) continue;
82
+ if (found.from !== void 0) out[spec.minParam] = String(found.from);
83
+ if (found.to !== void 0) out[spec.maxParam] = String(found.to);
84
+ }
85
+ }
86
+ return out;
87
+ }
88
+ function decode(query, current) {
89
+ const next = { search: current.search, sort: current.sort, or: current.or, and: current.and, range: current.range, page: current.page };
90
+ if (searchParam) next.search = firstString(query[searchParam]) ?? "";
91
+ if (sortParam) {
92
+ const raw = firstString(query[sortParam]);
93
+ next.sort = raw && isValidSortString(raw, sortAllowList) && isSortAllowed(raw, config.sortConfig) ? parseSortString(raw) : void 0;
94
+ }
95
+ if (pageParam) {
96
+ const n = parsePageStrict(firstString(query[pageParam]));
97
+ next.page = n && n > 1 ? n : void 0;
98
+ }
99
+ if (filters.length) {
100
+ const owned = new Set(filters.map((f) => f.field));
101
+ const or = current.or.filter((f) => !owned.has(f.field));
102
+ const and = current.and.filter((f) => !owned.has(f.field));
103
+ const range = current.range.filter((f) => !owned.has(f.field));
104
+ for (const spec of filters) {
105
+ if (spec.kind === "equals") {
106
+ const values = toStringArray(query[spec.param]);
107
+ if (values.length) (spec.logic === "or" ? or : and).push({ type: "equals", field: spec.field, value: values });
108
+ } else {
109
+ const from = parseNumStrict(firstString(query[spec.minParam]));
110
+ const to = parseNumStrict(firstString(query[spec.maxParam]));
111
+ if (from !== void 0 || to !== void 0) range.push({ type: "range", field: spec.field, ...from !== void 0 && { from }, ...to !== void 0 && { to } });
112
+ }
113
+ }
114
+ next.or = or;
115
+ next.and = and;
116
+ next.range = range;
117
+ }
118
+ return next;
119
+ }
120
+ function canonical(state) {
121
+ return JSON.stringify({
122
+ s: state.search && state.search.trim() !== "" ? state.search : "",
123
+ o: state.sort ? `${state.sort.field}:${state.sort.order}` : "",
124
+ or: normEquals(state.or),
125
+ and: normEquals(state.and),
126
+ range: normRange(state.range),
127
+ p: state.page && state.page > 1 ? state.page : 1
128
+ });
129
+ }
130
+ function merge(current, owned) {
131
+ const query = { ...current };
132
+ for (const k of ownedKeys) delete query[k];
133
+ Object.assign(query, owned);
134
+ return { query, changed: !queryEqual(current, query) };
135
+ }
136
+ function ownedSignature(query) {
137
+ return JSON.stringify(ownedKeys.map((k) => [k, toStringArray(query[k])]));
138
+ }
139
+ return { encode, decode, canonical, merge, ownedSignature, ownedKeys };
140
+ }
141
+ export function firstString(value) {
142
+ if (value === void 0) return void 0;
143
+ if (Array.isArray(value)) {
144
+ const first = value[0];
145
+ return first == null ? "" : first;
146
+ }
147
+ return value == null ? "" : value;
148
+ }
149
+ export function toStringArray(value) {
150
+ if (value === void 0 || value === null) return [];
151
+ const arr = Array.isArray(value) ? value : [value];
152
+ return arr.filter((v) => v != null && v !== "");
153
+ }
154
+ export function parseNumStrict(value) {
155
+ if (value === void 0 || !/^-?\d+(\.\d+)?$/.test(value)) return void 0;
156
+ return Number(value);
157
+ }
158
+ export function parsePageStrict(value) {
159
+ if (value === void 0 || !/^\d+$/.test(value)) return void 0;
160
+ const n = Number(value);
161
+ return n >= 1 ? n : void 0;
162
+ }
163
+ function byField(a, b) {
164
+ return a.field < b.field ? -1 : a.field > b.field ? 1 : 0;
165
+ }
166
+ function normEquals(list) {
167
+ return [...list].sort(byField).map((f) => [f.field, (Array.isArray(f.value) ? f.value : [f.value]).map((v) => String(v)).sort()]);
168
+ }
169
+ function normRange(list) {
170
+ return [...list].sort(byField).map((r) => [r.field, r.from ?? null, r.to ?? null]);
171
+ }
172
+ function queryEqual(a, b) {
173
+ const keys = /* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b)]);
174
+ for (const k of keys) {
175
+ const av = JSON.stringify(normalizeForCompare(a[k]));
176
+ const bv = JSON.stringify(normalizeForCompare(b[k]));
177
+ if (av !== bv) return false;
178
+ }
179
+ return true;
180
+ }
181
+ function normalizeForCompare(value) {
182
+ if (value === void 0) return [];
183
+ return Array.isArray(value) ? value : [value];
184
+ }
@@ -128,4 +128,17 @@ export declare function parseSortString(sortString: string): {
128
128
  * @returns True if the sort is allowed
129
129
  */
130
130
  export declare function isSortAllowed(sortString: string, config?: ListingFieldConfig): boolean;
131
+ /**
132
+ * Validates a sort string sourced from untrusted input (e.g. a URL query param).
133
+ *
134
+ * Unlike {@link parseSortString} (which does no validation) and {@link isSortAllowed} (which is
135
+ * permissive when `select` is empty), this rejects anything that is not a well-formed
136
+ * `field:asc|desc` — and, when an allow-list is provided, anything not in it. `'default'` (the
137
+ * backend default order) is always considered valid.
138
+ *
139
+ * @param sortString - Candidate sort string
140
+ * @param allowList - Permitted sort strings (e.g. keys of `sorting.label`). Empty ⇒ structural check only.
141
+ * @returns True if the sort string is safe to apply
142
+ */
143
+ export declare function isValidSortString(sortString: string, allowList?: string[]): boolean;
131
144
  export {};
@@ -110,3 +110,9 @@ export function isSortAllowed(sortString, config = {}) {
110
110
  const isInSelect = select.includes(sortString);
111
111
  return mode === "include" ? isInSelect : !isInSelect;
112
112
  }
113
+ export function isValidSortString(sortString, allowList = []) {
114
+ if (sortString === "default") return true;
115
+ if (!/^[\w.]+:(asc|desc)$/.test(sortString)) return false;
116
+ if (allowList.length === 0) return true;
117
+ return allowList.includes(sortString);
118
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontic/nuxt",
3
- "version": "1.1.1",
3
+ "version": "1.3.0",
4
4
  "description": "Nuxt module for Frontic - data fetching composables with smart caching, page routing, and context management",
5
5
  "license": "MIT",
6
6
  "author": "Frontic",
@@ -35,6 +35,10 @@
35
35
  },
36
36
  "./types": {
37
37
  "types": "./dist/runtime/types/index.d.ts"
38
+ },
39
+ "./server": {
40
+ "types": "./dist/runtime/server/client.d.ts",
41
+ "import": "./dist/runtime/server/client.js"
38
42
  }
39
43
  },
40
44
  "main": "./dist/module.mjs",