@zvndev/darkmown 2.12.1 → 2.12.3
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/AGENTS.md +1 -1
- package/CHANGELOG.md +14 -1
- package/README.md +10 -1
- package/SECURITY.md +9 -2
- package/docs/cli.md +10 -0
- package/docs/spec-alignment.md +1 -1
- package/package.json +2 -2
- package/site/pages/docs/index.wd +1 -1
- package/site/pages/playground/index.js +52 -58
- package/src/cli.js +23 -1
- package/src/compiler/format.js +3 -2
- package/src/compiler/frontmatter.js +2 -1
- package/src/compiler/markdown.js +61 -7
- package/src/compiler/page.js +11 -14
- package/src/dev.js +63 -0
- package/src/feeds.js +24 -9
- package/src/headers.js +8 -2
- package/src/image-variant-resize.js +6 -1
- package/src/router.js +4 -1
- package/src/runtime.js +16 -6
- package/src/runtime.min.js +1 -1
- package/src/runtime.min.js.map +1 -1
- package/src/scaffold.js +13 -5
- package/src/statics.js +16 -1
- package/types/dev.d.ts +28 -0
- package/types/feeds.d.ts +19 -26
- package/types/headers.d.ts +6 -1
package/types/feeds.d.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {import("./router.js").Route} Route
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* A route paired with its source file's last-modified date (ISO yyyy-mm-dd),
|
|
6
|
-
* ready for a sitemap `<lastmod>`.
|
|
7
|
-
* @typedef {object} DatedRoute
|
|
8
|
-
* @property {string} loc Absolute URL (`site_url` + route path).
|
|
9
|
-
* @property {string} lastmod ISO date (`yyyy-mm-dd`).
|
|
10
|
-
*/
|
|
11
1
|
/**
|
|
12
2
|
* XML-escape a text value for use inside an element or attribute. Covers the
|
|
13
|
-
* five predefined XML entities — the same set RSS/sitemap consumers expect
|
|
3
|
+
* five predefined XML entities — the same set RSS/sitemap consumers expect —
|
|
4
|
+
* and drops the characters XML 1.0 cannot carry at all (C0 controls other than
|
|
5
|
+
* tab/LF/CR, U+FFFE/U+FFFF, lone surrogates): one in a single post title makes
|
|
6
|
+
* the whole feed malformed, and readers reject it outright.
|
|
14
7
|
* @param {string} value
|
|
15
8
|
* @returns {string}
|
|
16
9
|
*/
|
|
@@ -238,21 +231,6 @@ export const AI_CRAWLER_POLICIES: string[];
|
|
|
238
231
|
* ({@link rssItemLimit}).
|
|
239
232
|
*/
|
|
240
233
|
export const RSS_ITEM_LIMIT: 20;
|
|
241
|
-
export type Route = import("./router.js").Route;
|
|
242
|
-
/**
|
|
243
|
-
* A route paired with its source file's last-modified date (ISO yyyy-mm-dd),
|
|
244
|
-
* ready for a sitemap `<lastmod>`.
|
|
245
|
-
*/
|
|
246
|
-
export type DatedRoute = {
|
|
247
|
-
/**
|
|
248
|
-
* Absolute URL (`site_url` + route path).
|
|
249
|
-
*/
|
|
250
|
-
loc: string;
|
|
251
|
-
/**
|
|
252
|
-
* ISO date (`yyyy-mm-dd`).
|
|
253
|
-
*/
|
|
254
|
-
lastmod: string;
|
|
255
|
-
};
|
|
256
234
|
/**
|
|
257
235
|
* An RSS item — a dated post in feed order.
|
|
258
236
|
*/
|
|
@@ -268,3 +246,18 @@ export type RssItem = {
|
|
|
268
246
|
pubDate: string;
|
|
269
247
|
description: string;
|
|
270
248
|
};
|
|
249
|
+
export type Route = import("./router.js").Route;
|
|
250
|
+
/**
|
|
251
|
+
* A route paired with its source file's last-modified date (ISO yyyy-mm-dd),
|
|
252
|
+
* ready for a sitemap `<lastmod>`.
|
|
253
|
+
*/
|
|
254
|
+
export type DatedRoute = {
|
|
255
|
+
/**
|
|
256
|
+
* Absolute URL (`site_url` + route path).
|
|
257
|
+
*/
|
|
258
|
+
loc: string;
|
|
259
|
+
/**
|
|
260
|
+
* ISO date (`yyyy-mm-dd`).
|
|
261
|
+
*/
|
|
262
|
+
lastmod: string;
|
|
263
|
+
};
|
package/types/headers.d.ts
CHANGED
|
@@ -51,8 +51,13 @@ export const REACTIVE_CSP: string;
|
|
|
51
51
|
*/
|
|
52
52
|
export const STATIC_CSP: string;
|
|
53
53
|
/**
|
|
54
|
-
* Baseline security headers applied to every
|
|
54
|
+
* Baseline security headers applied to every response, independent of the
|
|
55
55
|
* CSP. CSP is added per-route (static vs reactive) by the helpers below.
|
|
56
|
+
*
|
|
57
|
+
* HSTS is one year WITHOUT `includeSubDomains`/`preload`: those pin every
|
|
58
|
+
* sibling subdomain to HTTPS, which only the domain owner can safely decide.
|
|
59
|
+
* Browsers ignore the header over plain HTTP, so local `serve` is unaffected.
|
|
60
|
+
* Cloudflare custom domains send no HSTS unless the zone enables it.
|
|
56
61
|
* @type {Record<string, string>}
|
|
57
62
|
*/
|
|
58
63
|
export const BASE_SECURITY_HEADERS: Record<string, string>;
|