singularity-core 0.14.1 → 0.15.2
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/dist/security/index.d.ts +14 -3
- package/dist/security/index.js +47 -5
- package/dist/seo/index.d.ts +53 -6
- package/dist/seo/index.js +55 -7
- package/package.json +154 -154
package/dist/security/index.d.ts
CHANGED
|
@@ -29,8 +29,15 @@ export type ContentSecurityPolicyOptions = {
|
|
|
29
29
|
*/
|
|
30
30
|
export declare function buildContentSecurityPolicy({ nonce, dev, extraSources, }: ContentSecurityPolicyOptions): string;
|
|
31
31
|
/**
|
|
32
|
-
* Response headers every page should send: HSTS, framing, sniffing,
|
|
33
|
-
* and
|
|
32
|
+
* Response headers every page should send: HSTS, framing, sniffing,
|
|
33
|
+
* referrer, permissions and cross-origin isolation, plus the CSP when one
|
|
34
|
+
* is given.
|
|
35
|
+
*
|
|
36
|
+
* COOP `same-origin` keeps cross-origin windows out of the page's browsing
|
|
37
|
+
* context group. COEP is `credentialless`, not `require-corp`: the maps'
|
|
38
|
+
* OpenStreetMap tiles and the QR code images send no
|
|
39
|
+
* Cross-Origin-Resource-Policy, so `require-corp` would block them, while
|
|
40
|
+
* `credentialless` loads them without cookies and still isolates the page.
|
|
34
41
|
*/
|
|
35
42
|
export declare function securityHeaders(contentSecurityPolicy?: string): Record<string, string>;
|
|
36
43
|
/** A fresh nonce for one request's CSP: 16 random bytes, base64. */
|
|
@@ -44,7 +51,11 @@ export declare function generateCspNonce(): string;
|
|
|
44
51
|
export declare function getCspNonce(): string | undefined;
|
|
45
52
|
/**
|
|
46
53
|
* `securityHeaders` for the current request, with a nonce CSP when the
|
|
47
|
-
* request has a nonce. For a root route's `headers`.
|
|
54
|
+
* request has a nonce. For a root route's `headers`. Also `Cache-Control:
|
|
55
|
+
* private, no-cache`: the page carries this request's nonce (and often the
|
|
56
|
+
* visitor's session or settings), so no shared cache may keep it and the
|
|
57
|
+
* browser asks again each time. An app that wants `no-store` spreads this
|
|
58
|
+
* and sets its own.
|
|
48
59
|
*/
|
|
49
60
|
export declare function requestSecurityHeaders(options: Omit<ContentSecurityPolicyOptions, "nonce">): Record<string, string>;
|
|
50
61
|
export {};
|
package/dist/security/index.js
CHANGED
|
@@ -51,8 +51,41 @@ export function buildContentSecurityPolicy({ nonce, dev, extraSources = {}, }) {
|
|
|
51
51
|
].join("; ");
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
54
|
+
* Browser features no Filion page uses, each switched off for the page and
|
|
55
|
+
* every frame in it, so injected script or a compromised frame cannot ask
|
|
56
|
+
* for them. Left on: clipboard (the tools' copy buttons), fullscreen (the
|
|
57
|
+
* games), autoplay (game sound, admin speech) and passkeys. Only names
|
|
58
|
+
* Chrome knows, since it reports unknown ones as console errors.
|
|
59
|
+
* `browsing-topics` opts the pages out of Chrome's Topics ad API.
|
|
60
|
+
*/
|
|
61
|
+
const DISABLED_FEATURES = [
|
|
62
|
+
"accelerometer",
|
|
63
|
+
"browsing-topics",
|
|
64
|
+
"camera",
|
|
65
|
+
"display-capture",
|
|
66
|
+
"geolocation",
|
|
67
|
+
"gyroscope",
|
|
68
|
+
"hid",
|
|
69
|
+
"idle-detection",
|
|
70
|
+
"magnetometer",
|
|
71
|
+
"microphone",
|
|
72
|
+
"midi",
|
|
73
|
+
"payment",
|
|
74
|
+
"screen-wake-lock",
|
|
75
|
+
"serial",
|
|
76
|
+
"usb",
|
|
77
|
+
"xr-spatial-tracking",
|
|
78
|
+
];
|
|
79
|
+
/**
|
|
80
|
+
* Response headers every page should send: HSTS, framing, sniffing,
|
|
81
|
+
* referrer, permissions and cross-origin isolation, plus the CSP when one
|
|
82
|
+
* is given.
|
|
83
|
+
*
|
|
84
|
+
* COOP `same-origin` keeps cross-origin windows out of the page's browsing
|
|
85
|
+
* context group. COEP is `credentialless`, not `require-corp`: the maps'
|
|
86
|
+
* OpenStreetMap tiles and the QR code images send no
|
|
87
|
+
* Cross-Origin-Resource-Policy, so `require-corp` would block them, while
|
|
88
|
+
* `credentialless` loads them without cookies and still isolates the page.
|
|
56
89
|
*/
|
|
57
90
|
export function securityHeaders(contentSecurityPolicy) {
|
|
58
91
|
return {
|
|
@@ -60,7 +93,9 @@ export function securityHeaders(contentSecurityPolicy) {
|
|
|
60
93
|
"X-Frame-Options": "SAMEORIGIN",
|
|
61
94
|
"X-Content-Type-Options": "nosniff",
|
|
62
95
|
"Referrer-Policy": "strict-origin-when-cross-origin",
|
|
63
|
-
"Permissions-Policy":
|
|
96
|
+
"Permissions-Policy": DISABLED_FEATURES.map((feature) => `${feature}=()`).join(", "),
|
|
97
|
+
"Cross-Origin-Opener-Policy": "same-origin",
|
|
98
|
+
"Cross-Origin-Embedder-Policy": "credentialless",
|
|
64
99
|
...(contentSecurityPolicy
|
|
65
100
|
? { "Content-Security-Policy": contentSecurityPolicy }
|
|
66
101
|
: {}),
|
|
@@ -93,9 +128,16 @@ export function getCspNonce() {
|
|
|
93
128
|
}
|
|
94
129
|
/**
|
|
95
130
|
* `securityHeaders` for the current request, with a nonce CSP when the
|
|
96
|
-
* request has a nonce. For a root route's `headers`.
|
|
131
|
+
* request has a nonce. For a root route's `headers`. Also `Cache-Control:
|
|
132
|
+
* private, no-cache`: the page carries this request's nonce (and often the
|
|
133
|
+
* visitor's session or settings), so no shared cache may keep it and the
|
|
134
|
+
* browser asks again each time. An app that wants `no-store` spreads this
|
|
135
|
+
* and sets its own.
|
|
97
136
|
*/
|
|
98
137
|
export function requestSecurityHeaders(options) {
|
|
99
138
|
const nonce = getCspNonce();
|
|
100
|
-
return
|
|
139
|
+
return {
|
|
140
|
+
...securityHeaders(nonce ? buildContentSecurityPolicy({ nonce, ...options }) : undefined),
|
|
141
|
+
"Cache-Control": "private, no-cache",
|
|
142
|
+
};
|
|
101
143
|
}
|
package/dist/seo/index.d.ts
CHANGED
|
@@ -11,6 +11,15 @@ export type SeoOptions = {
|
|
|
11
11
|
twitterHandle?: string;
|
|
12
12
|
/** `robots` meta, e.g. "noindex, nofollow" for an app behind a login. */
|
|
13
13
|
robots?: string;
|
|
14
|
+
/** `author` meta: who wrote the page, or who publishes the site. */
|
|
15
|
+
author?: string;
|
|
16
|
+
/** `og:site_name`, the site's name as social cards show it. */
|
|
17
|
+
siteName?: string;
|
|
18
|
+
/** Alt text for `image`, as `og:image:alt` and `twitter:image:alt`. */
|
|
19
|
+
imageAlt?: string;
|
|
20
|
+
/** Pixel size of `image`, so a card can be laid out before it loads. */
|
|
21
|
+
imageWidth?: number;
|
|
22
|
+
imageHeight?: number;
|
|
14
23
|
};
|
|
15
24
|
export type SeoTag = {
|
|
16
25
|
title: string;
|
|
@@ -24,9 +33,37 @@ export type SeoTag = {
|
|
|
24
33
|
/**
|
|
25
34
|
* Title, description and social card tags for a page's `head.meta`.
|
|
26
35
|
* Open Graph tags use `property`, as the protocol expects; Twitter uses `name`.
|
|
27
|
-
* Tags without content are left out
|
|
36
|
+
* Tags without content are left out, and the image's alt text and size only
|
|
37
|
+
* come with an image.
|
|
28
38
|
*/
|
|
29
|
-
export declare function seo({ title, description, keywords, image, type, url, twitterHandle, robots, }: SeoOptions): SeoTag[];
|
|
39
|
+
export declare function seo({ title, description, keywords, image, type, url, twitterHandle, robots, author, siteName, imageAlt, imageWidth, imageHeight, }: SeoOptions): SeoTag[];
|
|
40
|
+
/**
|
|
41
|
+
* A JSON-LD block for a route's `head.scripts`. The router writes `children`
|
|
42
|
+
* into the page as is, so `<` is escaped and no value can close the tag.
|
|
43
|
+
*/
|
|
44
|
+
export declare function jsonLdScript(data: Record<string, unknown>): {
|
|
45
|
+
type: "application/ld+json";
|
|
46
|
+
children: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* A page's canonical URL: `base` (the origin, plus the app's base path if it
|
|
50
|
+
* has one) and the path without query or trailing slash, so `/x/` points at
|
|
51
|
+
* `/x`. The app's own root keeps its slash: `https://filion.se/blog/`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function canonicalUrl(base: string, pathname: string): string;
|
|
54
|
+
/** The parts of a router match that decide a page's canonical URL. */
|
|
55
|
+
export type CanonicalMatch = {
|
|
56
|
+
routeId: string;
|
|
57
|
+
pathname: string;
|
|
58
|
+
status: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The canonical URL for a root route's `head`, from its `matches`: the
|
|
62
|
+
* deepest match's path under `base` (see `canonicalUrl`), or undefined for a
|
|
63
|
+
* 404 (only the root matched, or a route threw `notFound`). The root's
|
|
64
|
+
* `head` runs again on every navigation, so the link follows the page.
|
|
65
|
+
*/
|
|
66
|
+
export declare function pageCanonicalUrl(base: string, matches: readonly CanonicalMatch[]): string | undefined;
|
|
30
67
|
export type RobotsTxtOptions = {
|
|
31
68
|
userAgent?: string;
|
|
32
69
|
allow?: string[];
|
|
@@ -36,9 +73,19 @@ export type RobotsTxtOptions = {
|
|
|
36
73
|
};
|
|
37
74
|
/** robots.txt for one user agent. Serve with `plainTextResponse`. */
|
|
38
75
|
export declare function buildRobotsTxt({ userAgent, allow, disallow, sitemap, }: RobotsTxtOptions): string;
|
|
76
|
+
/** One sitemap entry: an absolute URL, and when the page last changed. */
|
|
77
|
+
export type SitemapEntry = {
|
|
78
|
+
url: string;
|
|
79
|
+
/**
|
|
80
|
+
* The page's real last change, as an ISO 8601 date or date-time. Leave it
|
|
81
|
+
* out when there is none to give: a date that is not the page's real last
|
|
82
|
+
* change is worse than none.
|
|
83
|
+
*/
|
|
84
|
+
lastmod?: string;
|
|
85
|
+
};
|
|
39
86
|
/**
|
|
40
|
-
* sitemap.xml listing each
|
|
41
|
-
*
|
|
42
|
-
*
|
|
87
|
+
* sitemap.xml listing each URL once, in the order given (the first entry for
|
|
88
|
+
* a URL wins). An entry is an absolute URL, or one with its `lastmod`. Serve
|
|
89
|
+
* with `xmlResponse`.
|
|
43
90
|
*/
|
|
44
|
-
export declare function buildSitemapXml(
|
|
91
|
+
export declare function buildSitemapXml(entries: Array<string | SitemapEntry>): string;
|
package/dist/seo/index.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Title, description and social card tags for a page's `head.meta`.
|
|
3
3
|
* Open Graph tags use `property`, as the protocol expects; Twitter uses `name`.
|
|
4
|
-
* Tags without content are left out
|
|
4
|
+
* Tags without content are left out, and the image's alt text and size only
|
|
5
|
+
* come with an image.
|
|
5
6
|
*/
|
|
6
|
-
export function seo({ title, description, keywords, image, type = "website", url, twitterHandle, robots, }) {
|
|
7
|
+
export function seo({ title, description, keywords, image, type = "website", url, twitterHandle, robots, author, siteName, imageAlt, imageWidth, imageHeight, }) {
|
|
7
8
|
const tags = [
|
|
8
9
|
{ title },
|
|
9
10
|
{ name: "description", content: description },
|
|
10
11
|
{ name: "keywords", content: keywords },
|
|
11
12
|
{ name: "robots", content: robots },
|
|
13
|
+
{ name: "author", content: author },
|
|
12
14
|
{ name: "twitter:title", content: title },
|
|
13
15
|
{ name: "twitter:description", content: description },
|
|
14
16
|
{ name: "twitter:creator", content: twitterHandle },
|
|
@@ -17,16 +19,55 @@ export function seo({ title, description, keywords, image, type = "website", url
|
|
|
17
19
|
{ property: "og:title", content: title },
|
|
18
20
|
{ property: "og:description", content: description },
|
|
19
21
|
{ property: "og:url", content: url },
|
|
22
|
+
{ property: "og:site_name", content: siteName },
|
|
20
23
|
...(image
|
|
21
24
|
? [
|
|
22
25
|
{ name: "twitter:image", content: image },
|
|
26
|
+
{ name: "twitter:image:alt", content: imageAlt },
|
|
23
27
|
{ name: "twitter:card", content: "summary_large_image" },
|
|
24
28
|
{ property: "og:image", content: image },
|
|
29
|
+
{ property: "og:image:alt", content: imageAlt },
|
|
30
|
+
{ property: "og:image:width", content: imageWidth?.toString() },
|
|
31
|
+
{ property: "og:image:height", content: imageHeight?.toString() },
|
|
25
32
|
]
|
|
26
33
|
: []),
|
|
27
34
|
];
|
|
28
35
|
return tags.filter((tag) => !("content" in tag) || tag.content);
|
|
29
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* A JSON-LD block for a route's `head.scripts`. The router writes `children`
|
|
39
|
+
* into the page as is, so `<` is escaped and no value can close the tag.
|
|
40
|
+
*/
|
|
41
|
+
export function jsonLdScript(data) {
|
|
42
|
+
return {
|
|
43
|
+
type: "application/ld+json",
|
|
44
|
+
children: JSON.stringify(data).replace(/</g, "\\u003c"),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A page's canonical URL: `base` (the origin, plus the app's base path if it
|
|
49
|
+
* has one) and the path without query or trailing slash, so `/x/` points at
|
|
50
|
+
* `/x`. The app's own root keeps its slash: `https://filion.se/blog/`.
|
|
51
|
+
*/
|
|
52
|
+
export function canonicalUrl(base, pathname) {
|
|
53
|
+
const root = base.replace(/\/+$/, "");
|
|
54
|
+
const path = pathname.replace(/\/+$/, "");
|
|
55
|
+
return path ? `${root}${path}` : `${root}/`;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The canonical URL for a root route's `head`, from its `matches`: the
|
|
59
|
+
* deepest match's path under `base` (see `canonicalUrl`), or undefined for a
|
|
60
|
+
* 404 (only the root matched, or a route threw `notFound`). The root's
|
|
61
|
+
* `head` runs again on every navigation, so the link follows the page.
|
|
62
|
+
*/
|
|
63
|
+
export function pageCanonicalUrl(base, matches) {
|
|
64
|
+
const page = matches.at(-1);
|
|
65
|
+
if (!page || page.routeId === "__root__")
|
|
66
|
+
return undefined;
|
|
67
|
+
if (matches.some((match) => match.status === "notFound"))
|
|
68
|
+
return undefined;
|
|
69
|
+
return canonicalUrl(base, page.pathname);
|
|
70
|
+
}
|
|
30
71
|
/** robots.txt for one user agent. Serve with `plainTextResponse`. */
|
|
31
72
|
export function buildRobotsTxt({ userAgent = "*", allow = [], disallow = [], sitemap, }) {
|
|
32
73
|
return [
|
|
@@ -44,16 +85,23 @@ const xmlEntities = {
|
|
|
44
85
|
'"': """,
|
|
45
86
|
"'": "'",
|
|
46
87
|
};
|
|
88
|
+
const escapeXml = (value) => value.replace(/[&<>"']/g, (char) => xmlEntities[char] ?? char);
|
|
47
89
|
/**
|
|
48
|
-
* sitemap.xml listing each
|
|
49
|
-
*
|
|
50
|
-
*
|
|
90
|
+
* sitemap.xml listing each URL once, in the order given (the first entry for
|
|
91
|
+
* a URL wins). An entry is an absolute URL, or one with its `lastmod`. Serve
|
|
92
|
+
* with `xmlResponse`.
|
|
51
93
|
*/
|
|
52
|
-
export function buildSitemapXml(
|
|
94
|
+
export function buildSitemapXml(entries) {
|
|
95
|
+
const byUrl = new Map();
|
|
96
|
+
for (const entry of entries) {
|
|
97
|
+
const item = typeof entry === "string" ? { url: entry } : entry;
|
|
98
|
+
if (!byUrl.has(item.url))
|
|
99
|
+
byUrl.set(item.url, item);
|
|
100
|
+
}
|
|
53
101
|
return [
|
|
54
102
|
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
55
103
|
'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',
|
|
56
|
-
...[...
|
|
104
|
+
...[...byUrl.values()].map(({ url, lastmod }) => `\t<url><loc>${escapeXml(url)}</loc>${lastmod ? `<lastmod>${escapeXml(lastmod)}</lastmod>` : ""}</url>`),
|
|
57
105
|
"</urlset>",
|
|
58
106
|
"",
|
|
59
107
|
].join("\n");
|
package/package.json
CHANGED
|
@@ -1,156 +1,156 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
2
|
+
"name": "singularity-core",
|
|
3
|
+
"version": "0.15.2",
|
|
4
|
+
"description": "Shared non-UI code for Singularity TanStack Start apps: auth sessions, API client middleware, API schemas, paging, route data, images, formatting, HTTP helpers, theme, cookie notice, SEO, security headers and telemetry.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "Filip",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"config"
|
|
11
|
+
],
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"./dist/security/zod-jitless.js"
|
|
14
|
+
],
|
|
15
|
+
"packageManager": "pnpm@12.3.4",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=26.0.0 <27.0.0",
|
|
18
|
+
"pnpm": ">=12.0.0 <13.0.0"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
"./auth": {
|
|
22
|
+
"types": "./dist/auth/index.d.ts",
|
|
23
|
+
"import": "./dist/auth/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./auth/server": {
|
|
26
|
+
"types": "./dist/auth/server.d.ts",
|
|
27
|
+
"import": "./dist/auth/server.js"
|
|
28
|
+
},
|
|
29
|
+
"./api": {
|
|
30
|
+
"types": "./dist/api/index.d.ts",
|
|
31
|
+
"import": "./dist/api/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./api/server": {
|
|
34
|
+
"types": "./dist/api/server.d.ts",
|
|
35
|
+
"import": "./dist/api/server.js"
|
|
36
|
+
},
|
|
37
|
+
"./paging": {
|
|
38
|
+
"types": "./dist/paging/index.d.ts",
|
|
39
|
+
"import": "./dist/paging/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./paging/react": {
|
|
42
|
+
"types": "./dist/paging/react.d.ts",
|
|
43
|
+
"import": "./dist/paging/react.js"
|
|
44
|
+
},
|
|
45
|
+
"./router/react": {
|
|
46
|
+
"types": "./dist/router/react.d.ts",
|
|
47
|
+
"import": "./dist/router/react.js"
|
|
48
|
+
},
|
|
49
|
+
"./cookie-notice/server": {
|
|
50
|
+
"types": "./dist/cookie-notice/server.d.ts",
|
|
51
|
+
"import": "./dist/cookie-notice/server.js"
|
|
52
|
+
},
|
|
53
|
+
"./theme": {
|
|
54
|
+
"types": "./dist/theme/index.d.ts",
|
|
55
|
+
"import": "./dist/theme/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./theme/server": {
|
|
58
|
+
"types": "./dist/theme/server.d.ts",
|
|
59
|
+
"import": "./dist/theme/server.js"
|
|
60
|
+
},
|
|
61
|
+
"./theme/react": {
|
|
62
|
+
"types": "./dist/theme/react.d.ts",
|
|
63
|
+
"import": "./dist/theme/react.js"
|
|
64
|
+
},
|
|
65
|
+
"./schema": {
|
|
66
|
+
"types": "./dist/schema/index.d.ts",
|
|
67
|
+
"import": "./dist/schema/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./seo": {
|
|
70
|
+
"types": "./dist/seo/index.d.ts",
|
|
71
|
+
"import": "./dist/seo/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./security": {
|
|
74
|
+
"types": "./dist/security/index.d.ts",
|
|
75
|
+
"import": "./dist/security/index.js"
|
|
76
|
+
},
|
|
77
|
+
"./security/zod-jitless": {
|
|
78
|
+
"types": "./dist/security/zod-jitless.d.ts",
|
|
79
|
+
"import": "./dist/security/zod-jitless.js"
|
|
80
|
+
},
|
|
81
|
+
"./telemetry": {
|
|
82
|
+
"types": "./dist/telemetry/index.d.ts",
|
|
83
|
+
"import": "./dist/telemetry/index.js"
|
|
84
|
+
},
|
|
85
|
+
"./images": {
|
|
86
|
+
"types": "./dist/images/index.d.ts",
|
|
87
|
+
"import": "./dist/images/index.js"
|
|
88
|
+
},
|
|
89
|
+
"./format": {
|
|
90
|
+
"types": "./dist/format/index.d.ts",
|
|
91
|
+
"import": "./dist/format/index.js"
|
|
92
|
+
},
|
|
93
|
+
"./http": {
|
|
94
|
+
"types": "./dist/http/index.d.ts",
|
|
95
|
+
"import": "./dist/http/index.js"
|
|
96
|
+
},
|
|
97
|
+
"./biome": "./config/biome-app.json",
|
|
98
|
+
"./package.json": "./package.json"
|
|
99
|
+
},
|
|
100
|
+
"scripts": {
|
|
101
|
+
"build": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json",
|
|
102
|
+
"typecheck": "tsc --noEmit",
|
|
103
|
+
"test": "vitest run",
|
|
104
|
+
"test:watch": "vitest",
|
|
105
|
+
"openapi-dev-types": "openapi-typescript http://localhost:5268/swagger/v1/swagger.json -o ./src/api/v1.ts --alphabetize --default-non-nullable --enum-values",
|
|
106
|
+
"openapi-types": "openapi-typescript https://api.filion.se/swagger/v1/swagger.json -o ./src/api/v1.ts --alphabetize --default-non-nullable --enum-values",
|
|
107
|
+
"prepack": "pnpm build",
|
|
108
|
+
"check": "biome check",
|
|
109
|
+
"verify": "pnpm run typecheck && pnpm run check && pnpm run test",
|
|
110
|
+
"biome:check": "biome check --write",
|
|
111
|
+
"biome:lint": "biome lint --fix",
|
|
112
|
+
"biome:format": "biome format --write"
|
|
113
|
+
},
|
|
114
|
+
"peerDependencies": {
|
|
115
|
+
"@tanstack/react-router": "^1.170.0",
|
|
116
|
+
"@tanstack/react-start": "^1.168.0",
|
|
117
|
+
"jose": "^6.0.0",
|
|
118
|
+
"openapi-fetch": "^0.17.0",
|
|
119
|
+
"react": "^19.0.0",
|
|
120
|
+
"zod": "^4.0.0"
|
|
121
|
+
},
|
|
122
|
+
"peerDependenciesMeta": {
|
|
123
|
+
"@tanstack/react-router": {
|
|
124
|
+
"optional": true
|
|
125
|
+
},
|
|
126
|
+
"@tanstack/react-start": {
|
|
127
|
+
"optional": true
|
|
128
|
+
},
|
|
129
|
+
"jose": {
|
|
130
|
+
"optional": true
|
|
131
|
+
},
|
|
132
|
+
"openapi-fetch": {
|
|
133
|
+
"optional": true
|
|
134
|
+
},
|
|
135
|
+
"react": {
|
|
136
|
+
"optional": true
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"devDependencies": {
|
|
140
|
+
"@biomejs/biome": "2.5.15",
|
|
141
|
+
"@tanstack/react-router": "1.170.46",
|
|
142
|
+
"@tanstack/react-start": "1.169.4",
|
|
143
|
+
"@types/node": "26.6.6",
|
|
144
|
+
"@types/react": "19.3.0",
|
|
145
|
+
"@types/react-dom": "19.3.0",
|
|
146
|
+
"happy-dom": "20.14.6",
|
|
147
|
+
"jose": "6.2.13",
|
|
148
|
+
"openapi-fetch": "0.17.0",
|
|
149
|
+
"openapi-typescript": "7.13.0",
|
|
150
|
+
"react": "19.3.1",
|
|
151
|
+
"react-dom": "19.3.1",
|
|
152
|
+
"typescript": "6.0.3",
|
|
153
|
+
"vitest": "5.0.5",
|
|
154
|
+
"zod": "4.6.7"
|
|
155
|
+
}
|
|
156
156
|
}
|