@krate/core 0.4.0-rc.3 → 0.4.0-rc.5
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/bin/krate +2 -2
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +70 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +10 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/install.js +1 -1
- package/package.json +9 -9
package/bin/krate
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bin/krate
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 35430665 bytes
|
|
4
|
+
sha256: 8cd36c27a3ed69f8739e983adf4961963f1acfc93e5cf2756266ffd1ef88c101
|
package/dist/cli.js
CHANGED
|
@@ -47,7 +47,7 @@ async function main() {
|
|
|
47
47
|
const cmd = args[0];
|
|
48
48
|
// Commands handled by the JS wrapper itself (cross-platform scaffolding) or
|
|
49
49
|
// that need no Go binary. Everything else is forwarded to the native binary so
|
|
50
|
-
// the two command lists cannot drift
|
|
50
|
+
// the two command lists cannot drift - a missing entry here was previously
|
|
51
51
|
// swallowing `krate types` and `krate check`.
|
|
52
52
|
switch (cmd) {
|
|
53
53
|
case 'init':
|
package/dist/config.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Typed configuration helpers for Krate.
|
|
3
3
|
*
|
|
4
4
|
* Use `defineConfig` in `krate.config.ts` to get full type-checking of every
|
|
5
|
-
* supported config key
|
|
5
|
+
* supported config key - unknown or misspelled keys will fail to compile.
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { defineConfig, sitemap, docs } from '@krate/core';
|
|
@@ -22,6 +22,12 @@ export interface DevServerConfig {
|
|
|
22
22
|
port?: number;
|
|
23
23
|
/** Open the browser on start (default: false). */
|
|
24
24
|
open?: boolean;
|
|
25
|
+
/** Show the dev error overlay (default: true). */
|
|
26
|
+
overlay?: boolean;
|
|
27
|
+
/** Show the dev toolbar (default: true). */
|
|
28
|
+
toolbar?: boolean;
|
|
29
|
+
/** Editor command for the overlay's "open in editor" action (default: "code"). */
|
|
30
|
+
editor?: string;
|
|
25
31
|
}
|
|
26
32
|
export interface ServerConfig {
|
|
27
33
|
/** Bind address for `krate serve` (default: all interfaces). */
|
|
@@ -102,6 +108,8 @@ export interface MarkdownConfig {
|
|
|
102
108
|
/** chroma theme for syntax highlighting (default "github-dark"). */
|
|
103
109
|
codeTheme?: string;
|
|
104
110
|
math?: boolean;
|
|
111
|
+
/** Render ```` ```mermaid ```` code blocks as diagrams (loads Mermaid from a CDN). */
|
|
112
|
+
mermaid?: boolean;
|
|
105
113
|
}
|
|
106
114
|
export type RuntimeName = "quickjs" | "node" | "bun" | "deno";
|
|
107
115
|
export interface SSRConfig {
|
|
@@ -147,9 +155,9 @@ export interface DocsPluginOptions {
|
|
|
147
155
|
*/
|
|
148
156
|
layout?: string;
|
|
149
157
|
/**
|
|
150
|
-
* Docs theme
|
|
158
|
+
* Docs theme - the component every generated docs page is rendered through.
|
|
151
159
|
* Like {@link layout}: a root-relative file path (`./` or `/`) or an npm
|
|
152
|
-
* package name (a docs theme installed from a registry)
|
|
160
|
+
* package name (a docs theme installed from a registry) - or a theme
|
|
153
161
|
* descriptor returned by a theme factory (bare object). `theme` and
|
|
154
162
|
* `layout` are aliases: set only one unless both resolve to the same
|
|
155
163
|
* component.
|
|
@@ -197,6 +205,39 @@ export interface KrateConfig {
|
|
|
197
205
|
* root. Used for emitted asset URLs and the SPA router.
|
|
198
206
|
*/
|
|
199
207
|
basePath?: string;
|
|
208
|
+
/**
|
|
209
|
+
* View Transitions API integration. `true`/`"auto"` (default) enables
|
|
210
|
+
* same-document SPA morphs and the cross-document `@view-transition` rule;
|
|
211
|
+
* `false`/`"off"` disables it.
|
|
212
|
+
*/
|
|
213
|
+
viewTransitions?: boolean | "auto" | "off";
|
|
214
|
+
/**
|
|
215
|
+
* Partial prerendering: cache dynamic regions on non-ISR pages with
|
|
216
|
+
* stale-while-revalidate. `true` uses the default window; an object sets it.
|
|
217
|
+
* Only enable for regions that do NOT depend on per-request cookies/sessions.
|
|
218
|
+
*/
|
|
219
|
+
ppr?: boolean | {
|
|
220
|
+
revalidate?: number;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Multi-language docs. Locales live in subdirectories of the docs content dir
|
|
224
|
+
* (`src/content/docs/<locale>/...`); the default locale is unprefixed
|
|
225
|
+
* (`/docs/...`) and others are path-prefixed (`/fr/docs/...`).
|
|
226
|
+
*/
|
|
227
|
+
i18n?: {
|
|
228
|
+
defaultLocale?: string;
|
|
229
|
+
locales?: string[];
|
|
230
|
+
routing?: "prefix";
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Versioned docs. Versions live in subdirectories
|
|
234
|
+
* (`src/content/docs/<version>/...`); the current version is unprefixed.
|
|
235
|
+
*/
|
|
236
|
+
versions?: {
|
|
237
|
+
current?: string;
|
|
238
|
+
versions?: string[];
|
|
239
|
+
banner?: boolean;
|
|
240
|
+
};
|
|
200
241
|
devServer?: DevServerConfig;
|
|
201
242
|
server?: ServerConfig;
|
|
202
243
|
cors?: CORSConfig;
|
|
@@ -252,10 +293,34 @@ export interface KrateConfig {
|
|
|
252
293
|
* config keys become compile errors.
|
|
253
294
|
*/
|
|
254
295
|
export declare function defineConfig(config: KrateConfig): KrateConfig;
|
|
296
|
+
export interface FeedPluginOptions {
|
|
297
|
+
/** e.g. "https://example.com" (falls back to `seo.baseUrl`). */
|
|
298
|
+
baseUrl?: string;
|
|
299
|
+
/** Docs content directory (defaults to the docs plugin's `contentDir`). */
|
|
300
|
+
contentDir?: string;
|
|
301
|
+
/** Feed title (defaults to the docs title or `seo.siteName`). */
|
|
302
|
+
title?: string;
|
|
303
|
+
/** Feed description (defaults to `seo.description`). */
|
|
304
|
+
description?: string;
|
|
305
|
+
/** Feed language (default "en"). */
|
|
306
|
+
language?: string;
|
|
307
|
+
/** Which feeds to emit: "rss" | "atom" | "json" | "all" (default "all"). */
|
|
308
|
+
type?: "rss" | "atom" | "json" | "all";
|
|
309
|
+
/** Maximum number of items (default 20). */
|
|
310
|
+
count?: number;
|
|
311
|
+
/** URL prefix docs are mounted under (default "/docs"). */
|
|
312
|
+
pathPrefix?: string;
|
|
313
|
+
}
|
|
255
314
|
/**
|
|
256
315
|
* Built-in sitemap plugin. Generates `sitemap.xml` after the build.
|
|
257
316
|
*/
|
|
258
317
|
export declare function sitemap(options: SitemapPluginOptions): PluginConfig;
|
|
318
|
+
/**
|
|
319
|
+
* Built-in feed plugin. Generates `feed.xml` (RSS), `atom.xml`, and
|
|
320
|
+
* `feed.json` from the docs content, and adds `<link rel="alternate">` feed
|
|
321
|
+
* discovery plus JSON-LD structured data to docs pages.
|
|
322
|
+
*/
|
|
323
|
+
export declare function feed(options?: FeedPluginOptions): PluginConfig;
|
|
259
324
|
/**
|
|
260
325
|
* Built-in docs plugin. Generates documentation pages from a markdown/mdx
|
|
261
326
|
* content directory.
|
|
@@ -282,7 +347,7 @@ export interface ContentCollection {
|
|
|
282
347
|
/** The shape passed to {@link defineContent}. */
|
|
283
348
|
export type ContentConfig = Record<string, ContentCollection>;
|
|
284
349
|
/**
|
|
285
|
-
* Define typed content collections. Optional identity helper
|
|
350
|
+
* Define typed content collections. Optional identity helper - you can also
|
|
286
351
|
* pass a plain object to `defineConfig({ content: {...} })`; it exists purely
|
|
287
352
|
* for type-checking and editor assistance.
|
|
288
353
|
*
|
|
@@ -310,7 +375,7 @@ export declare function defineContent(config: ContentConfig): ContentConfig;
|
|
|
310
375
|
/** Severity for a check rule or category. `false` disables it. */
|
|
311
376
|
export type CheckSeverity = "error" | "warning" | "off" | boolean;
|
|
312
377
|
/** Built-in check rule IDs. */
|
|
313
|
-
export type CheckRuleId = "a11y/img-alt" | "a11y/heading-order" | "a11y/accessible-name" | "seo/title" | "seo/description" | "seo/canonical" | "seo/og" | "seo/lang" | "perf/js-budget" | "perf/image-dims";
|
|
378
|
+
export type CheckRuleId = "a11y/img-alt" | "a11y/heading-order" | "a11y/accessible-name" | "a11y/duplicate-id" | "a11y/landmark" | "a11y/form-label" | "a11y/tabindex" | "a11y/aria-role" | "a11y/color-contrast" | "a11y/broken-anchor" | "seo/title" | "seo/description" | "seo/canonical" | "seo/og" | "seo/og-image" | "seo/lang" | "seo/broken-link" | "seo/duplicate-meta" | "perf/js-budget" | "perf/image-dims";
|
|
314
379
|
export interface ChecksConfig {
|
|
315
380
|
/** Master switch (default: true when `checks` is present). */
|
|
316
381
|
enabled?: boolean;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAEV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAEV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IACl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E9D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAElE;AAID,kEAAkE;AAClE,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;AAElE,+BAA+B;AAC/B,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,qBAAqB,GACrB,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,QAAQ,GACR,cAAc,GACd,UAAU,GACV,iBAAiB,GACjB,oBAAoB,GACpB,gBAAgB,GAChB,iBAAiB,CAAC;AAEtB,MAAM,WAAW,YAAY;IAC3B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,iBAAiB;IACjB,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,gCAAgC;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;IACpD,qCAAqC;IACrC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,oEAAoE;IACpE,MAAM,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
package/dist/config.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Typed configuration helpers for Krate.
|
|
3
3
|
*
|
|
4
4
|
* Use `defineConfig` in `krate.config.ts` to get full type-checking of every
|
|
5
|
-
* supported config key
|
|
5
|
+
* supported config key - unknown or misspelled keys will fail to compile.
|
|
6
6
|
*
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { defineConfig, sitemap, docs } from '@krate/core';
|
|
@@ -29,6 +29,14 @@ export function defineConfig(config) {
|
|
|
29
29
|
export function sitemap(options) {
|
|
30
30
|
return { name: "sitemap", options };
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Built-in feed plugin. Generates `feed.xml` (RSS), `atom.xml`, and
|
|
34
|
+
* `feed.json` from the docs content, and adds `<link rel="alternate">` feed
|
|
35
|
+
* discovery plus JSON-LD structured data to docs pages.
|
|
36
|
+
*/
|
|
37
|
+
export function feed(options = {}) {
|
|
38
|
+
return { name: "feed", options };
|
|
39
|
+
}
|
|
32
40
|
/**
|
|
33
41
|
* Built-in docs plugin. Generates documentation pages from a markdown/mdx
|
|
34
42
|
* content directory.
|
|
@@ -37,7 +45,7 @@ export function docs(options = {}) {
|
|
|
37
45
|
return { name: "docs", order: 10, options };
|
|
38
46
|
}
|
|
39
47
|
/**
|
|
40
|
-
* Define typed content collections. Optional identity helper
|
|
48
|
+
* Define typed content collections. Optional identity helper - you can also
|
|
41
49
|
* pass a plain object to `defineConfig({ content: {...} })`; it exists purely
|
|
42
50
|
* for type-checking and editor assistance.
|
|
43
51
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { defineConfig, docs, sitemap, defineContent } from "./config.js";
|
|
2
|
-
export type { KrateConfig, PluginConfig, DevServerConfig, TailwindConfig, CSPConfig, MarkdownConfig, SSRConfig, RedirectConfig, RewriteConfig, SEOConfig, RobotsConfig, DocsPluginOptions, DocsSidebarItem, DocsSearchOptions, DocsThemeDescriptor, DocsThemeOptions, SitemapPluginOptions, RuntimeName, ContentConfig, ContentCollection, ContentField, ContentFieldSpec, ContentFieldType, ChecksConfig, CheckSeverity, CheckRuleId, } from "./config.js";
|
|
1
|
+
export { defineConfig, docs, sitemap, feed, defineContent } from "./config.js";
|
|
2
|
+
export type { KrateConfig, PluginConfig, DevServerConfig, TailwindConfig, CSPConfig, MarkdownConfig, SSRConfig, RedirectConfig, RewriteConfig, SEOConfig, RobotsConfig, DocsPluginOptions, DocsSidebarItem, DocsSearchOptions, DocsThemeDescriptor, DocsThemeOptions, SitemapPluginOptions, FeedPluginOptions, RuntimeName, ContentConfig, ContentCollection, ContentField, ContentFieldSpec, ContentFieldType, ChecksConfig, CheckSeverity, CheckRuleId, } from "./config.js";
|
|
3
3
|
export type { DocsLayoutProps } from "./config.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/E,YAAY,EACV,WAAW,EACX,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,EACd,aAAa,EACb,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { defineConfig, docs, sitemap, defineContent } from "./config.js";
|
|
1
|
+
export { defineConfig, docs, sitemap, feed, defineContent } from "./config.js";
|
package/install.js
CHANGED
|
@@ -19,7 +19,7 @@ function resolveBinary() {
|
|
|
19
19
|
const binary = join(pkgPath, 'bin', binaryName);
|
|
20
20
|
if (existsSync(binary)) return binary;
|
|
21
21
|
} catch {
|
|
22
|
-
// Platform package not installed
|
|
22
|
+
// Platform package not installed - fall through to local binary.
|
|
23
23
|
}
|
|
24
24
|
const local = join(binDir, binaryName);
|
|
25
25
|
if (existsSync(local)) return local;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krate/core",
|
|
3
|
-
"version": "0.4.0-rc.
|
|
3
|
+
"version": "0.4.0-rc.5",
|
|
4
4
|
"description": "The Krate CLI — a Go-native static site generator with signal-based reactivity.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
"install.js"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@krate/plugin": "0.4.0-rc.
|
|
40
|
+
"@krate/plugin": "0.4.0-rc.5"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.19.43",
|
|
44
44
|
"typescript": "^5.5.0"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"@krate/core-darwin-arm64": "0.4.0-rc.
|
|
48
|
-
"@krate/core-darwin-x64": "0.4.0-rc.
|
|
49
|
-
"@krate/core-linux-arm64": "0.4.0-rc.
|
|
50
|
-
"@krate/core-linux-x64": "0.4.0-rc.
|
|
51
|
-
"@krate/core-linux-x64-musl": "0.4.0-rc.
|
|
52
|
-
"@krate/core-win32-arm64": "0.4.0-rc.
|
|
53
|
-
"@krate/core-win32-x64": "0.4.0-rc.
|
|
47
|
+
"@krate/core-darwin-arm64": "0.4.0-rc.5",
|
|
48
|
+
"@krate/core-darwin-x64": "0.4.0-rc.5",
|
|
49
|
+
"@krate/core-linux-arm64": "0.4.0-rc.5",
|
|
50
|
+
"@krate/core-linux-x64": "0.4.0-rc.5",
|
|
51
|
+
"@krate/core-linux-x64-musl": "0.4.0-rc.5",
|
|
52
|
+
"@krate/core-win32-arm64": "0.4.0-rc.5",
|
|
53
|
+
"@krate/core-win32-x64": "0.4.0-rc.5"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsc",
|