katanakit-js 2.2.1 → 2.12.9
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 +72 -437
- package/dist/adapters/astro/astro.service.d.ts +103 -15
- package/dist/adapters/astro/astro.service.d.ts.map +1 -1
- package/dist/adapters/astro/astro.service.js +145 -75
- package/dist/adapters/astro/astro.service.js.map +1 -1
- package/dist/adapters/astro/index.d.ts +1 -1
- package/dist/adapters/astro/index.d.ts.map +1 -1
- package/dist/adapters/astro/index.js +1 -1
- package/dist/adapters/astro/index.js.map +1 -1
- package/dist/adapters/astro/rss.service.d.ts +85 -105
- package/dist/adapters/astro/rss.service.d.ts.map +1 -1
- package/dist/adapters/astro/rss.service.js +172 -168
- package/dist/adapters/astro/rss.service.js.map +1 -1
- package/dist/adapters/astro/seo.service.d.ts +10 -0
- package/dist/adapters/astro/seo.service.d.ts.map +1 -0
- package/dist/adapters/astro/seo.service.js +3 -0
- package/dist/adapters/astro/seo.service.js.map +1 -0
- package/dist/adapters/express/app.d.ts +30 -1
- package/dist/adapters/express/app.d.ts.map +1 -1
- package/dist/adapters/express/app.js +31 -3
- package/dist/adapters/express/app.js.map +1 -1
- package/dist/adapters/express/index.d.ts +2 -2
- package/dist/adapters/express/index.d.ts.map +1 -1
- package/dist/adapters/express/index.js +2 -2
- package/dist/adapters/express/index.js.map +1 -1
- package/dist/adapters/express/main.js +2 -2
- package/dist/adapters/express/main.js.map +1 -1
- package/dist/adapters/express/products.controller.d.ts +67 -8
- package/dist/adapters/express/products.controller.d.ts.map +1 -1
- package/dist/adapters/express/products.controller.js +105 -49
- package/dist/adapters/express/products.controller.js.map +1 -1
- package/dist/adapters/express/server.d.ts +37 -13
- package/dist/adapters/express/server.d.ts.map +1 -1
- package/dist/adapters/express/server.js +118 -53
- package/dist/adapters/express/server.js.map +1 -1
- package/dist/adapters/nuxt/nuxt.service.d.ts +8 -6
- package/dist/adapters/nuxt/nuxt.service.d.ts.map +1 -1
- package/dist/adapters/nuxt/nuxt.service.js +34 -10
- package/dist/adapters/nuxt/nuxt.service.js.map +1 -1
- package/dist/adapters/vue/vue.service.d.ts +5 -2
- package/dist/adapters/vue/vue.service.d.ts.map +1 -1
- package/dist/adapters/vue/vue.service.js +41 -7
- package/dist/adapters/vue/vue.service.js.map +1 -1
- package/dist/config/index.d.ts +2 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/seo-meta.types.d.ts +177 -0
- package/dist/config/seo-meta.types.d.ts.map +1 -0
- package/dist/config/seo-meta.types.js +11 -0
- package/dist/config/seo-meta.types.js.map +1 -0
- package/dist/config/seo.service.d.ts +41 -58
- package/dist/config/seo.service.d.ts.map +1 -1
- package/dist/config/seo.service.js +468 -136
- package/dist/config/seo.service.js.map +1 -1
- package/dist/config/site.config.d.ts +10 -50
- package/dist/config/site.config.d.ts.map +1 -1
- package/dist/config/site.config.js +8 -36
- package/dist/config/site.config.js.map +1 -1
- package/dist/core/index.d.ts +1 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/services/dates.service.d.ts +149 -22
- package/dist/core/services/dates.service.d.ts.map +1 -1
- package/dist/core/services/dates.service.js +201 -54
- package/dist/core/services/dates.service.js.map +1 -1
- package/dist/core/services/error.service.d.ts +32 -20
- package/dist/core/services/error.service.d.ts.map +1 -1
- package/dist/core/services/error.service.js +44 -32
- package/dist/core/services/error.service.js.map +1 -1
- package/dist/core/services/formatter.service.d.ts +245 -35
- package/dist/core/services/formatter.service.d.ts.map +1 -1
- package/dist/core/services/formatter.service.js +281 -57
- package/dist/core/services/formatter.service.js.map +1 -1
- package/dist/core/services/generator.service.d.ts +115 -26
- package/dist/core/services/generator.service.d.ts.map +1 -1
- package/dist/core/services/generator.service.js +191 -56
- package/dist/core/services/generator.service.js.map +1 -1
- package/dist/core/services/geometry.service.d.ts +369 -39
- package/dist/core/services/geometry.service.d.ts.map +1 -1
- package/dist/core/services/geometry.service.js +424 -66
- package/dist/core/services/geometry.service.js.map +1 -1
- package/dist/core/services/http.service.d.ts +244 -21
- package/dist/core/services/http.service.d.ts.map +1 -1
- package/dist/core/services/http.service.js +419 -98
- package/dist/core/services/http.service.js.map +1 -1
- package/dist/core/services/logger.service.d.ts +95 -29
- package/dist/core/services/logger.service.d.ts.map +1 -1
- package/dist/core/services/logger.service.js +167 -41
- package/dist/core/services/logger.service.js.map +1 -1
- package/dist/core/services/reactive.service.d.ts +146 -19
- package/dist/core/services/reactive.service.d.ts.map +1 -1
- package/dist/core/services/reactive.service.js +278 -137
- package/dist/core/services/reactive.service.js.map +1 -1
- package/dist/core/services/timing.service.d.ts +142 -20
- package/dist/core/services/timing.service.d.ts.map +1 -1
- package/dist/core/services/timing.service.js +324 -185
- package/dist/core/services/timing.service.js.map +1 -1
- package/dist/core/services/utils.service.d.ts +228 -43
- package/dist/core/services/utils.service.d.ts.map +1 -1
- package/dist/core/services/utils.service.js +305 -125
- package/dist/core/services/utils.service.js.map +1 -1
- package/dist/infrastructure/dom/dom.service.d.ts +307 -44
- package/dist/infrastructure/dom/dom.service.d.ts.map +1 -1
- package/dist/infrastructure/dom/dom.service.js +408 -129
- package/dist/infrastructure/dom/dom.service.js.map +1 -1
- package/dist/infrastructure/index.d.ts +0 -3
- package/dist/infrastructure/index.d.ts.map +1 -1
- package/dist/infrastructure/index.js +0 -3
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/infrastructure/observer/observer.service.d.ts +124 -31
- package/dist/infrastructure/observer/observer.service.d.ts.map +1 -1
- package/dist/infrastructure/observer/observer.service.js +227 -131
- package/dist/infrastructure/observer/observer.service.js.map +1 -1
- package/dist/infrastructure/sensors/sensors.service.d.ts +154 -22
- package/dist/infrastructure/sensors/sensors.service.d.ts.map +1 -1
- package/dist/infrastructure/sensors/sensors.service.js +264 -112
- package/dist/infrastructure/sensors/sensors.service.js.map +1 -1
- package/dist/infrastructure/storage/storage.service.d.ts +123 -45
- package/dist/infrastructure/storage/storage.service.d.ts.map +1 -1
- package/dist/infrastructure/storage/storage.service.js +236 -66
- package/dist/infrastructure/storage/storage.service.js.map +1 -1
- package/dist/infrastructure/theme/theme.service.d.ts +93 -29
- package/dist/infrastructure/theme/theme.service.d.ts.map +1 -1
- package/dist/infrastructure/theme/theme.service.js +198 -96
- package/dist/infrastructure/theme/theme.service.js.map +1 -1
- package/dist/infrastructure/viewport/viewport.service.d.ts +233 -35
- package/dist/infrastructure/viewport/viewport.service.d.ts.map +1 -1
- package/dist/infrastructure/viewport/viewport.service.js +358 -139
- package/dist/infrastructure/viewport/viewport.service.js.map +1 -1
- package/dist/infrastructure/worker/worker.service.d.ts +84 -38
- package/dist/infrastructure/worker/worker.service.d.ts.map +1 -1
- package/dist/infrastructure/worker/worker.service.js +234 -133
- package/dist/infrastructure/worker/worker.service.js.map +1 -1
- package/dist/prisma/index.d.ts +2 -0
- package/dist/prisma/index.d.ts.map +1 -0
- package/dist/prisma/index.js +2 -0
- package/dist/prisma/index.js.map +1 -0
- package/dist/prisma/schema.json +11 -33
- package/dist/prisma/use-prisma.d.ts +68 -0
- package/dist/prisma/use-prisma.d.ts.map +1 -0
- package/dist/prisma/use-prisma.js +82 -0
- package/dist/prisma/use-prisma.js.map +1 -0
- package/dist/types/index.d.ts +20 -12
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +124 -125
- package/CHANGELOG.md +0 -101
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Escape special XML characters in a string.
|
|
3
|
+
*
|
|
4
|
+
* @param text - Raw text to escape
|
|
5
|
+
* @returns XML-safe string
|
|
3
6
|
*/
|
|
4
7
|
function escapeXml(text) {
|
|
5
8
|
return text
|
|
@@ -10,15 +13,38 @@ function escapeXml(text) {
|
|
|
10
13
|
.replace(/'/g, "'");
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
|
-
*
|
|
16
|
+
* Prevent CDATA section breakout (`]]>` ends a CDATA block early).
|
|
17
|
+
*
|
|
18
|
+
* @param content - Raw content string
|
|
19
|
+
* @returns Sanitized content safe for CDATA
|
|
20
|
+
*/
|
|
21
|
+
function sanitizeCdata(content) {
|
|
22
|
+
return content.replace(/]]>/g, "]]]]><![CDATA[>");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Sanitize raw XML fragments injected via `customData`.
|
|
26
|
+
*
|
|
27
|
+
* @param fragment - Raw XML fragment
|
|
28
|
+
* @returns Sanitized XML string
|
|
29
|
+
*/
|
|
30
|
+
function sanitizeCustomXml(fragment) {
|
|
31
|
+
return fragment.replace(/]]>/g, "]]>");
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Format a date as RFC-822 (required by RSS 2.0).
|
|
35
|
+
*
|
|
36
|
+
* @param date - Date object or ISO string
|
|
37
|
+
* @returns RFC-822 formatted date string
|
|
14
38
|
*/
|
|
15
39
|
function toRfc822(date) {
|
|
16
40
|
const d = typeof date === "string" ? new Date(date) : date;
|
|
17
41
|
return d.toUTCString();
|
|
18
42
|
}
|
|
19
43
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
44
|
+
* Build the RSS 2.0 XML string from a config object.
|
|
45
|
+
*
|
|
46
|
+
* @param config - RSS configuration with title, items, site URL, etc.
|
|
47
|
+
* @returns Complete RSS 2.0 XML string
|
|
22
48
|
*/
|
|
23
49
|
function buildRssXml(config) {
|
|
24
50
|
const { title, description, site, items, language = "en", customData, xslUrl, lastBuildDate = true, } = config;
|
|
@@ -36,7 +62,7 @@ function buildRssXml(config) {
|
|
|
36
62
|
<title>${escapeXml(item.title)}</title>
|
|
37
63
|
<link>${escapeXml(link)}</link>
|
|
38
64
|
<guid isPermaLink="true">${escapeXml(link)}</guid>
|
|
39
|
-
<pubDate>${toRfc822(item.pubDate)}</pubDate>${item.description ? `\n <description>${escapeXml(item.description)}</description>` : ""}${item.content ? `\n <content:encoded><![CDATA[${item.content}]]></content:encoded>` : ""}${item.author ? `\n <author>${escapeXml(item.author)}</author>` : ""}${categories ? `\n${categories}` : ""}${item.customData ? `\n ${item.customData}` : ""}
|
|
65
|
+
<pubDate>${toRfc822(item.pubDate)}</pubDate>${item.description ? `\n <description>${escapeXml(item.description)}</description>` : ""}${item.content ? `\n <content:encoded><![CDATA[${sanitizeCdata(item.content)}]]></content:encoded>` : ""}${item.author ? `\n <author>${escapeXml(item.author)}</author>` : ""}${categories ? `\n${categories}` : ""}${item.customData ? `\n ${sanitizeCustomXml(item.customData)}` : ""}
|
|
40
66
|
</item>`;
|
|
41
67
|
})
|
|
42
68
|
.join("\n");
|
|
@@ -49,183 +75,161 @@ ${xslProcessing}<rss version="2.0"
|
|
|
49
75
|
<link>${escapeXml(siteUrl)}</link>
|
|
50
76
|
<description>${escapeXml(description)}</description>
|
|
51
77
|
<language>${escapeXml(language)}</language>
|
|
52
|
-
<atom:link href="${escapeXml(siteUrl)}${config.xmlPath ?? "/rss.xml"}" rel="self" type="application/rss+xml" />${lastBuildDate ? `\n <lastBuildDate>${toRfc822(new Date())}</lastBuildDate>` : ""}${customData ? `\n ${customData}` : ""}
|
|
78
|
+
<atom:link href="${escapeXml(siteUrl)}${config.xmlPath ?? "/rss.xml"}" rel="self" type="application/rss+xml" />${lastBuildDate ? `\n <lastBuildDate>${toRfc822(new Date())}</lastBuildDate>` : ""}${customData ? `\n ${sanitizeCustomXml(customData)}` : ""}
|
|
53
79
|
${itemsXml}
|
|
54
80
|
</channel>
|
|
55
81
|
</rss>`;
|
|
56
82
|
}
|
|
57
83
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
84
|
+
* Generate RSS 2.0 XML string from a config.
|
|
85
|
+
* Returns a Safe Result (no throwing).
|
|
86
|
+
*
|
|
87
|
+
* @param config - RSS configuration
|
|
88
|
+
* @returns Safe result with XML string or error
|
|
60
89
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const result = useAstroGenerateRss({
|
|
93
|
+
* title: "My Blog",
|
|
94
|
+
* description: "Posts about TypeScript",
|
|
95
|
+
* site: "https://example.com",
|
|
96
|
+
* items: [{ title: "Hello", pubDate: new Date(), link: "/blog/hello/" }],
|
|
97
|
+
* });
|
|
98
|
+
* if (result.ok) console.log(result.data); // XML string
|
|
99
|
+
* ```
|
|
64
100
|
*/
|
|
65
|
-
export
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
static getInstance() {
|
|
69
|
-
if (!RssService.instance) {
|
|
70
|
-
RssService.instance = new RssService();
|
|
71
|
-
}
|
|
72
|
-
return RssService.instance;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Generates the RSS XML string from a config.
|
|
76
|
-
* Returns a Safe Result (no throwing).
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```ts
|
|
80
|
-
* const { useGenerateRss } = RssService.getInstance();
|
|
81
|
-
* const result = useGenerateRss({
|
|
82
|
-
* title: "My Blog",
|
|
83
|
-
* description: "Posts about TypeScript",
|
|
84
|
-
* site: "https://example.com",
|
|
85
|
-
* items: [{ title: "Hello", pubDate: new Date(), link: "/blog/hello/" }],
|
|
86
|
-
* });
|
|
87
|
-
* if (result.ok) console.log(result.data); // XML string
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
useGenerateRss = (config) => {
|
|
91
|
-
try {
|
|
92
|
-
if (!config.title || !config.site) {
|
|
93
|
-
return {
|
|
94
|
-
data: null,
|
|
95
|
-
error: { message: "RSS config requires 'title' and 'site'." },
|
|
96
|
-
ok: false,
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
const xml = buildRssXml(config);
|
|
100
|
-
return { data: xml, error: null, ok: true };
|
|
101
|
-
}
|
|
102
|
-
catch (err) {
|
|
101
|
+
export const useAstroGenerateRss = (config) => {
|
|
102
|
+
try {
|
|
103
|
+
if (!config.title || !config.site) {
|
|
103
104
|
return {
|
|
104
105
|
data: null,
|
|
105
|
-
error: {
|
|
106
|
-
message: "Failed to generate RSS feed.",
|
|
107
|
-
details: err instanceof Error ? err.message : String(err),
|
|
108
|
-
},
|
|
106
|
+
error: { message: "RSS config requires 'title' and 'site'." },
|
|
109
107
|
ok: false,
|
|
110
108
|
};
|
|
111
109
|
}
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return new Response(result.data, {
|
|
180
|
-
status: 200,
|
|
181
|
-
headers: {
|
|
182
|
-
"Content-Type": "application/xml; charset=utf-8",
|
|
183
|
-
"Cache-Control": "public, max-age=3600",
|
|
184
|
-
},
|
|
110
|
+
const xml = buildRssXml(config);
|
|
111
|
+
return { data: xml, error: null, ok: true };
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
return {
|
|
115
|
+
data: null,
|
|
116
|
+
error: {
|
|
117
|
+
message: "Failed to generate RSS feed.",
|
|
118
|
+
details: err instanceof Error ? err.message : String(err),
|
|
119
|
+
},
|
|
120
|
+
ok: false,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Generate an HTML `<link>` tag for the RSS feed.
|
|
126
|
+
*
|
|
127
|
+
* @param config - Config with title and optional xmlPath
|
|
128
|
+
* @returns HTML link tag string
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* const tag = useAstroRssLinkTag({ title: "My Blog" });
|
|
133
|
+
* // <link rel="alternate" type="application/rss+xml" title="My Blog" href="/rss.xml" />
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
export const useAstroRssLinkTag = (config) => {
|
|
137
|
+
const xmlPath = config.xmlPath ?? "/rss.xml";
|
|
138
|
+
return `<link rel="alternate" type="application/rss+xml" title="${escapeXml(config.title)}" href="${escapeXml(xmlPath)}" />`;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Create an Astro-compatible GET endpoint handler for the RSS feed.
|
|
142
|
+
*
|
|
143
|
+
* @param config - RSS config with items (static array or async factory)
|
|
144
|
+
* @returns Astro GET handler function
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* // src/pages/rss.xml.ts
|
|
149
|
+
* import { useAstroCreateRssEndpoint } from "katanakit-js/adapters/astro";
|
|
150
|
+
* import { getCollection } from "astro:content";
|
|
151
|
+
*
|
|
152
|
+
* export const GET = useAstroCreateRssEndpoint({
|
|
153
|
+
* title: "My Blog",
|
|
154
|
+
* description: "Posts about TypeScript",
|
|
155
|
+
* site: "https://example.com",
|
|
156
|
+
* items: async () => {
|
|
157
|
+
* const posts = await getCollection("blog");
|
|
158
|
+
* return posts.map(post => ({
|
|
159
|
+
* title: post.data.title,
|
|
160
|
+
* pubDate: post.data.date,
|
|
161
|
+
* link: `/blog/${post.slug}/`,
|
|
162
|
+
* }));
|
|
163
|
+
* },
|
|
164
|
+
* });
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
export const useAstroCreateRssEndpoint = (config) => {
|
|
168
|
+
return async (context) => {
|
|
169
|
+
try {
|
|
170
|
+
const resolvedItems = typeof config.items === "function" ? await config.items() : config.items;
|
|
171
|
+
const site = config.site || (context.site ? String(context.site) : "");
|
|
172
|
+
if (!site) {
|
|
173
|
+
return new Response(JSON.stringify({ error: "RSS feed requires a 'site' URL." }), {
|
|
174
|
+
status: 500,
|
|
175
|
+
headers: { "Content-Type": "application/json" },
|
|
185
176
|
});
|
|
186
177
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
178
|
+
const result = useAstroGenerateRss({ ...config, site, items: resolvedItems });
|
|
179
|
+
if (!result.ok) {
|
|
180
|
+
return new Response(JSON.stringify({ error: result.error.message }), {
|
|
181
|
+
status: 500,
|
|
182
|
+
headers: { "Content-Type": "application/json" },
|
|
183
|
+
});
|
|
191
184
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
* const { useCreateRssEndpointFromConfig } = RssService.getInstance();
|
|
206
|
-
*
|
|
207
|
-
* export const GET = useCreateRssEndpointFromConfig(siteConfig, async () => {
|
|
208
|
-
* const posts = await getCollection("blog");
|
|
209
|
-
* return posts.map(post => ({
|
|
210
|
-
* title: post.data.title,
|
|
211
|
-
* pubDate: post.data.date,
|
|
212
|
-
* link: `/blog/${post.slug}/`,
|
|
213
|
-
* description: post.data.description,
|
|
214
|
-
* }));
|
|
215
|
-
* });
|
|
216
|
-
* ```
|
|
217
|
-
*/
|
|
218
|
-
useCreateRssEndpointFromConfig = (siteConfig, items) => {
|
|
219
|
-
return this.useCreateRssEndpoint({
|
|
220
|
-
title: siteConfig.rss.title ?? siteConfig.title,
|
|
221
|
-
description: siteConfig.rss.description ?? siteConfig.description,
|
|
222
|
-
site: siteConfig.site,
|
|
223
|
-
items,
|
|
224
|
-
xmlPath: siteConfig.rss.path,
|
|
225
|
-
language: siteConfig.lang,
|
|
226
|
-
});
|
|
185
|
+
return new Response(result.data, {
|
|
186
|
+
status: 200,
|
|
187
|
+
headers: {
|
|
188
|
+
"Content-Type": "application/xml; charset=utf-8",
|
|
189
|
+
"Cache-Control": "public, max-age=3600",
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
catch (err) {
|
|
194
|
+
return new Response(JSON.stringify({
|
|
195
|
+
error: err instanceof Error ? err.message : "Unknown error generating RSS.",
|
|
196
|
+
}), { status: 500, headers: { "Content-Type": "application/json" } });
|
|
197
|
+
}
|
|
227
198
|
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Create an RSS endpoint from a SiteConfig.
|
|
202
|
+
* Reads title, description, site, and rss settings from the config.
|
|
203
|
+
*
|
|
204
|
+
* @param siteConfig - Site configuration object
|
|
205
|
+
* @param items - RSS items or async factory
|
|
206
|
+
* @returns Astro GET handler function
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```ts
|
|
210
|
+
* // src/pages/rss.xml.ts
|
|
211
|
+
* import { useAstroCreateRssEndpointFromConfig } from "katanakit-js/adapters/astro";
|
|
212
|
+
* import { siteConfig } from "@/config/site.config";
|
|
213
|
+
* import { getCollection } from "astro:content";
|
|
214
|
+
*
|
|
215
|
+
* export const GET = useAstroCreateRssEndpointFromConfig(siteConfig, async () => {
|
|
216
|
+
* const posts = await getCollection("blog");
|
|
217
|
+
* return posts.map(post => ({
|
|
218
|
+
* title: post.data.title,
|
|
219
|
+
* pubDate: post.data.date,
|
|
220
|
+
* link: `/blog/${post.slug}/`,
|
|
221
|
+
* }));
|
|
222
|
+
* });
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
export const useAstroCreateRssEndpointFromConfig = (siteConfig, items) => {
|
|
226
|
+
return useAstroCreateRssEndpoint({
|
|
227
|
+
title: siteConfig.rss.title ?? siteConfig.title,
|
|
228
|
+
description: siteConfig.rss.description ?? siteConfig.description,
|
|
229
|
+
site: siteConfig.site,
|
|
230
|
+
items,
|
|
231
|
+
xmlPath: siteConfig.rss.path,
|
|
232
|
+
language: siteConfig.lang,
|
|
233
|
+
});
|
|
234
|
+
};
|
|
231
235
|
//# sourceMappingURL=rss.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rss.service.js","sourceRoot":"","sources":["../../../src/adapters/astro/rss.service.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"rss.service.js","sourceRoot":"","sources":["../../../src/adapters/astro/rss.service.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,SAAS,SAAS,CAAC,IAAY;IAC9B,OAAO,IAAI;SACT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,OAAe;IACrC,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AACnD,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IAC1C,OAAO,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC3C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CAAC,EACF,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,CAChE,CAAC;QACH,CAAC;IACF,CAAC,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAClD,UAAsB,EACtB,KAAyD,EACG,EAAE;IAC9D,OAAO,yBAAyB,CAAC;QAChC,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK;QAC/C,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU,CAAC,WAAW;QACjE,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,KAAK;QACL,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,IAAI;QAC5B,QAAQ,EAAE,UAAU,CAAC,IAAI;KACzB,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Astro convenience re-exports of the framework-agnostic SEO helpers.
|
|
3
|
+
* Prefer importing from `katanakit-js` directly.
|
|
4
|
+
*
|
|
5
|
+
* Inside Nuxt apps use Nuxt's own `useSeoMeta` / `useHead` instead.
|
|
6
|
+
*/
|
|
7
|
+
export type { SeoMeta, SeoMetaFlat, SeoMetaInput, SeoTagNode, SeoTagResult, SeoTagsResult, UseSeoMetaBase, UseSeoMetaOptions, } from "../../config/seo.service.js";
|
|
8
|
+
export { useApplySeoTag, useGenerateMetaTags, useHeadTags, useRssHeadLink, useSeoMeta, useSeoTag, useSeoTags, useTitle, } from "../../config/seo.service.js";
|
|
9
|
+
export { type SiteConfig, siteConfig } from "../../config/site.config.js";
|
|
10
|
+
//# sourceMappingURL=seo.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seo.service.d.ts","sourceRoot":"","sources":["../../../src/adapters/astro/seo.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EACX,OAAO,EACP,WAAW,EACX,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,iBAAiB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,UAAU,EACV,SAAS,EACT,UAAU,EACV,QAAQ,GACR,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,UAAU,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seo.service.js","sourceRoot":"","sources":["../../../src/adapters/astro/seo.service.ts"],"names":[],"mappings":"AAgBA,OAAO,EACN,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,UAAU,EACV,SAAS,EACT,UAAU,EACV,QAAQ,GACR,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAmB,UAAU,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import type { Application } from "express";
|
|
2
|
-
|
|
2
|
+
import { useExpressGetApp, useExpressStart } from "./server.js";
|
|
3
|
+
/**
|
|
4
|
+
* Re-exported Express application instance.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { app } from "katanakit-js/adapters/express";
|
|
9
|
+
* app.get("/custom", (req, res) => res.json({ ok: true }));
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
3
12
|
export declare const app: Application;
|
|
13
|
+
/**
|
|
14
|
+
* Get the Express application instance.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { useGetApp } from "katanakit-js/adapters/express";
|
|
19
|
+
* const expressApp = useGetApp();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const useGetApp: typeof useExpressGetApp;
|
|
23
|
+
/**
|
|
24
|
+
* Start the Express HTTP server.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* import { useStart } from "katanakit-js/adapters/express";
|
|
29
|
+
* useStart(3000, "localhost");
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare const useStart: typeof useExpressStart;
|
|
4
33
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAoB,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAElF;;;;;;;;GAQG;AACH,eAAO,MAAM,GAAG,EAAE,WAAgC,CAAC;AAEnD;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,yBAAmB,CAAC;AAE1C;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,wBAAkB,CAAC"}
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useExpressCreate, useExpressGetApp, useExpressStart } from "./server.js";
|
|
2
|
+
/**
|
|
3
|
+
* Re-exported Express application instance.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { app } from "katanakit-js/adapters/express";
|
|
8
|
+
* app.get("/custom", (req, res) => res.json({ ok: true }));
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export const app = useExpressCreate();
|
|
12
|
+
/**
|
|
13
|
+
* Get the Express application instance.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { useGetApp } from "katanakit-js/adapters/express";
|
|
18
|
+
* const expressApp = useGetApp();
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export const useGetApp = useExpressGetApp;
|
|
22
|
+
/**
|
|
23
|
+
* Start the Express HTTP server.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { useStart } from "katanakit-js/adapters/express";
|
|
28
|
+
* useStart(3000, "localhost");
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export const useStart = useExpressStart;
|
|
4
32
|
//# sourceMappingURL=app.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/adapters/express/app.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/adapters/express/app.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAElF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,GAAG,GAAgB,gBAAgB,EAAE,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { app, useGetApp, useStart } from "./app.js";
|
|
2
|
-
export {
|
|
2
|
+
export { useExpressCreateProduct, useExpressDeleteProduct, useExpressGetAllProducts, useExpressGetProductById, useExpressUpdateProduct, } from "./products.controller.js";
|
|
3
3
|
export { default as router } from "./router.js";
|
|
4
|
-
export {
|
|
4
|
+
export { useExpressCreate, useExpressGetApp, useExpressStart } from "./server.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EACN,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { app, useGetApp, useStart } from "./app.js";
|
|
2
|
-
export {
|
|
2
|
+
export { useExpressCreateProduct, useExpressDeleteProduct, useExpressGetAllProducts, useExpressGetProductById, useExpressUpdateProduct, } from "./products.controller.js";
|
|
3
3
|
export { default as router } from "./router.js";
|
|
4
|
-
export {
|
|
4
|
+
export { useExpressCreate, useExpressGetApp, useExpressStart } from "./server.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EACN,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { useExpressStart } from "./server.js";
|
|
2
|
+
useExpressStart();
|
|
3
3
|
//# sourceMappingURL=main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/adapters/express/main.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/adapters/express/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,eAAe,EAAE,CAAC"}
|