@riebeckite/honox 0.1.0 → 0.2.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.
package/dist/index.js CHANGED
@@ -509,7 +509,7 @@ function isRendererModule(filePath, rendererPath) {
509
509
  import { createHash as createHash2 } from "node:crypto";
510
510
  import { readdir, readFile } from "node:fs/promises";
511
511
  import { dirname, join, relative as relative2 } from "node:path";
512
- import { performance } from "node:perf_hooks";
512
+ import { performance as performance2 } from "node:perf_hooks";
513
513
 
514
514
  // src/ssg/file_system.ts
515
515
  import { relative, resolve } from "node:path";
@@ -640,11 +640,11 @@ async function fingerprintOutputDirectory(directory, relativeDirectory = "", met
640
640
  inventory[relativePath] = knownChecksum;
641
641
  continue;
642
642
  }
643
- const hashedAt = performance.now();
643
+ const hashedAt = performance2.now();
644
644
  const content = await readFile(file);
645
645
  inventory[relativePath] = fingerprintOutputContent(content);
646
646
  if (metrics) {
647
- metrics.outputHashValidationDurationMs += performance.now() - hashedAt;
647
+ metrics.outputHashValidationDurationMs += performance2.now() - hashedAt;
648
648
  metrics.outputFilesHashed += 1;
649
649
  metrics.outputBytesHashed += content.length;
650
650
  }
@@ -1066,7 +1066,7 @@ import { resolve as resolve3 } from "node:path";
1066
1066
 
1067
1067
  // src/ssg/output_cache_decision.ts
1068
1068
  import { join as join4 } from "node:path";
1069
- import { performance as performance3 } from "node:perf_hooks";
1069
+ import { performance as performance4 } from "node:perf_hooks";
1070
1070
 
1071
1071
  // src/ssg/output_cache_fastpath.ts
1072
1072
  import { randomUUID as randomUUID3 } from "node:crypto";
@@ -1159,23 +1159,23 @@ import { join as join3 } from "node:path";
1159
1159
 
1160
1160
  // src/ssg/runtime_metrics.ts
1161
1161
  import { writeFile } from "node:fs/promises";
1162
- import { performance as performance2 } from "node:perf_hooks";
1162
+ import { performance as performance3 } from "node:perf_hooks";
1163
1163
  async function measure(timingsMs, name, fn) {
1164
1164
  if (!timingsMs) return await fn();
1165
- const start = performance2.now();
1165
+ const start = performance3.now();
1166
1166
  try {
1167
1167
  return await fn();
1168
1168
  } finally {
1169
- timingsMs[name] = (timingsMs[name] ?? 0) + performance2.now() - start;
1169
+ timingsMs[name] = (timingsMs[name] ?? 0) + performance3.now() - start;
1170
1170
  }
1171
1171
  }
1172
1172
  function measureSync(timingsMs, name, fn) {
1173
1173
  if (!timingsMs) return fn();
1174
- const start = performance2.now();
1174
+ const start = performance3.now();
1175
1175
  try {
1176
1176
  return fn();
1177
1177
  } finally {
1178
- timingsMs[name] = (timingsMs[name] ?? 0) + performance2.now() - start;
1178
+ timingsMs[name] = (timingsMs[name] ?? 0) + performance3.now() - start;
1179
1179
  }
1180
1180
  }
1181
1181
  async function writeSsgOutputMetrics(metrics) {
@@ -1463,7 +1463,7 @@ async function verifyNoChangeFastPath(input) {
1463
1463
  cache.finalOutputInventory,
1464
1464
  cache.finalOutputStats
1465
1465
  );
1466
- const inventoryStartedAt = performance3.now();
1466
+ const inventoryStartedAt = performance4.now();
1467
1467
  const currentInventory = await fingerprintOutputDirectory(
1468
1468
  input.outputDirectory,
1469
1469
  "",
@@ -1471,7 +1471,7 @@ async function verifyNoChangeFastPath(input) {
1471
1471
  knownChecksums
1472
1472
  );
1473
1473
  if (input.metrics)
1474
- input.metrics.outputInventoryValidationDurationMs += performance3.now() - inventoryStartedAt;
1474
+ input.metrics.outputInventoryValidationDurationMs += performance4.now() - inventoryStartedAt;
1475
1475
  if (!inventoriesEqual(cache.finalOutputInventory, currentInventory)) {
1476
1476
  return { used: false, blockReason: "output-inventory-mismatch" };
1477
1477
  }
@@ -3077,13 +3077,16 @@ function createRiebeckiteSsg(options = {}) {
3077
3077
 
3078
3078
  // src/vite_plugin.ts
3079
3079
  import path13 from "node:path";
3080
+ import { createMutationPathPolicy, resolveAiIntegration } from "@riebeckite/ai";
3080
3081
  import {
3081
3082
  invalidateDevelopmentInspector,
3082
3083
  invalidateRiebeckiteBridge,
3083
3084
  riebeckiteBridge,
3084
3085
  riebeckiteDevelopmentInspector
3085
3086
  } from "@riebeckite/dev-inspector";
3086
- import { mergeConfig } from "vite";
3087
+ import {
3088
+ mergeConfig
3089
+ } from "vite";
3087
3090
 
3088
3091
  // src/asset_entries.ts
3089
3092
  import fs6 from "node:fs";
@@ -3159,7 +3162,28 @@ function isNotFoundError3(error) {
3159
3162
  return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
3160
3163
  }
3161
3164
 
3162
- // src/client_module_part2.ts
3165
+ // src/client_module.ts
3166
+ var clientModuleId = "virtual:riebeckite/client";
3167
+ var resolvedClientModuleId = `\0${clientModuleId}`;
3168
+ function riebeckiteClientModule(getConfig, ensure = async () => {
3169
+ }) {
3170
+ let development = false;
3171
+ return {
3172
+ name: "riebeckite-client-module",
3173
+ config(_config, environment) {
3174
+ development = environment.command === "serve";
3175
+ },
3176
+ resolveId(id) {
3177
+ if (id === clientModuleId) return resolvedClientModuleId;
3178
+ return null;
3179
+ },
3180
+ async load(id) {
3181
+ await ensure();
3182
+ if (id !== resolvedClientModuleId) return null;
3183
+ return await createClientModule(getConfig(), development);
3184
+ }
3185
+ };
3186
+ }
3163
3187
  async function createClientModule(config, development) {
3164
3188
  const { serializePublicClientConfig } = await import("@riebeckite/core");
3165
3189
  const imports = [];
@@ -3396,29 +3420,6 @@ export async function disposeRiebeckiteClient() {
3396
3420
  `;
3397
3421
  }
3398
3422
 
3399
- // src/client_module_part1.ts
3400
- var clientModuleId = "virtual:riebeckite/client";
3401
- var resolvedClientModuleId = `\0${clientModuleId}`;
3402
- function riebeckiteClientModule(getConfig, ensure = async () => {
3403
- }) {
3404
- let development = false;
3405
- return {
3406
- name: "riebeckite-client-module",
3407
- config(_config, environment) {
3408
- development = environment.command === "serve";
3409
- },
3410
- resolveId(id) {
3411
- if (id === clientModuleId) return resolvedClientModuleId;
3412
- return null;
3413
- },
3414
- async load(id) {
3415
- await ensure();
3416
- if (id !== resolvedClientModuleId) return null;
3417
- return await createClientModule(getConfig(), development);
3418
- }
3419
- };
3420
- }
3421
-
3422
3423
  // src/content_watch.ts
3423
3424
  import path9 from "node:path";
3424
3425
 
@@ -4088,7 +4089,7 @@ function riebeckite(options = {}, onApplicationResolved) {
4088
4089
  () => requireApplication(application),
4089
4090
  ensureApplication
4090
4091
  ),
4091
- riebeckiteContentWarmup(options.warmContent ?? false, ensureApplication),
4092
+ riebeckiteContentWarmup(options.warmContent ?? true, ensureApplication),
4092
4093
  riebeckiteContentAssets({
4093
4094
  appRoot: async () => (await ensureApplication()).appRoot,
4094
4095
  contentRoot: async () => (await ensureApplication()).contentRoot
@@ -4123,6 +4124,14 @@ function riebeckite(options = {}, onApplicationResolved) {
4123
4124
  return contentFormatRegistryFactory(getConfig().plugins);
4124
4125
  },
4125
4126
  publicOrigin: () => getConfig().site.baseUrl || void 0,
4127
+ isMutationPathAllowed: () => createMutationPathPolicy(
4128
+ resolveAiIntegration(getConfig().integrations?.ai).mutationPolicy
4129
+ ),
4130
+ project: () => ({
4131
+ contentDirectory: getConfig().content.directory,
4132
+ locale: getConfig().site.locale,
4133
+ mutationPolicy: resolveAiIntegration(getConfig().integrations?.ai).mutationPolicy
4134
+ }),
4126
4135
  async getSnapshot(server) {
4127
4136
  const { appRoot } = requireApplication(application);
4128
4137
  if (!isContentModuleLoaded(server, appRoot)) return void 0;
@@ -4140,20 +4149,74 @@ function riebeckiteContentWarmup(enabled, getApplication) {
4140
4149
  configureServer(server) {
4141
4150
  if (!enabled || !server.httpServer) return;
4142
4151
  server.httpServer.once("listening", () => {
4143
- void (async () => {
4144
- const { appRoot } = await getApplication();
4145
- await loadContentModule(server, appRoot).then(
4146
- async (module) => await module.content?.getManifest?.()
4147
- );
4148
- })().catch((error) => {
4149
- server.config.logger.error("Riebeckite content warmup failed.", {
4150
- error: error instanceof Error ? error : new Error(String(error))
4151
- });
4152
- });
4152
+ const origin = server.resolvedUrls?.local?.[0];
4153
+ if (origin) warmFirstPage(server, origin);
4154
+ else warmContentManifest(server, getApplication);
4153
4155
  });
4154
4156
  }
4155
4157
  };
4156
4158
  }
4159
+ function warmContentManifest(server, getApplication) {
4160
+ void (async () => {
4161
+ const { appRoot } = await getApplication();
4162
+ const module = await loadContentModule(server, appRoot);
4163
+ await module.content?.getManifest?.();
4164
+ })().catch((error) => {
4165
+ server.config.logger.error("Riebeckite content warmup failed.", {
4166
+ error: error instanceof Error ? error : new Error(String(error))
4167
+ });
4168
+ });
4169
+ }
4170
+ function warmFirstPage(server, origin) {
4171
+ const logger = server.config.logger;
4172
+ const originalInfo = logger.info.bind(logger);
4173
+ let banner;
4174
+ logger.info = (message, options) => {
4175
+ const plain = message.split(`${String.fromCharCode(27)}[`).map((part) => part.replace(/^[0-9;]*m/, "")).join("");
4176
+ if (plain.includes("VITE v") && plain.includes("ready in")) {
4177
+ banner = () => originalInfo(message, options);
4178
+ return;
4179
+ }
4180
+ originalInfo(message, options);
4181
+ };
4182
+ const printUrls = server.printUrls.bind(server);
4183
+ server.printUrls = () => {
4184
+ };
4185
+ const quiet = process.env.RIEBECKITE_DEV_INDICATOR === "1" || process.env.RIEBECKITE_MANAGED_DEV_CONTROL_FD !== void 0;
4186
+ const startedAt = performance.now();
4187
+ const elapsed = () => `${((performance.now() - startedAt) / 1e3).toFixed(1)}s`;
4188
+ const progress = (message) => logger.info(message, { clear: true });
4189
+ if (!quiet) progress(`riebeckite: preparing the first page (${elapsed()})`);
4190
+ const ticker = quiet ? void 0 : setInterval(() => {
4191
+ progress(`riebeckite: preparing the first page (${elapsed()})`);
4192
+ }, 5e3);
4193
+ ticker?.unref();
4194
+ void waitForDevWarmup(origin).then((status) => {
4195
+ if (ticker) clearInterval(ticker);
4196
+ banner?.();
4197
+ printUrls();
4198
+ if (status === void 0) {
4199
+ logger.error(`riebeckite: dev server did not respond (${elapsed()})`);
4200
+ return;
4201
+ }
4202
+ const suffix = status >= 400 ? ` (HTTP ${status})` : "";
4203
+ if (!quiet)
4204
+ progress(`riebeckite: ready at ${origin}${suffix} (${elapsed()})`);
4205
+ });
4206
+ }
4207
+ async function waitForDevWarmup(origin, timeoutMs = 3e5) {
4208
+ const deadline = performance.now() + timeoutMs;
4209
+ while (performance.now() < deadline) {
4210
+ try {
4211
+ return (await fetch(origin, { redirect: "manual" })).status;
4212
+ } catch {
4213
+ }
4214
+ await new Promise((resolve7) => {
4215
+ setTimeout(resolve7, 100).unref();
4216
+ });
4217
+ }
4218
+ return void 0;
4219
+ }
4157
4220
  function contentBareImportResolver(getApplication, ensure) {
4158
4221
  return {
4159
4222
  name: "riebeckite-content-bare-imports",
package/dist/server.js CHANGED
@@ -1,45 +1,8 @@
1
- // src/content_route_part1.ts
1
+ // src/content_route.ts
2
2
  import {
3
- getEntryLanguage
3
+ getEntryLanguage,
4
+ htmlOutputPath
4
5
  } from "@riebeckite/core";
5
-
6
- // src/content_route_part2.ts
7
- import { htmlOutputPath } from "@riebeckite/core";
8
- function ssgEnumerableHandler(handler) {
9
- const enumerable = (...args) => Reflect.apply(handler, void 0, args);
10
- return enumerable;
11
- }
12
- function isDynamicRoute(path) {
13
- return path.split("/").some((segment) => segment.startsWith(":") || segment.includes("*"));
14
- }
15
- function normalizeRequestPath(pathname) {
16
- const trailingSlash = pathname.length > 1 && pathname.endsWith("/");
17
- const segments = pathname.split("/").filter(Boolean).map(encodeSegment);
18
- const path = `/${segments.join("/")}`;
19
- return trailingSlash ? `${path}/` : path;
20
- }
21
- function redirectSsgPaths(manifest) {
22
- const paths = [];
23
- for (const [path, redirect] of manifest.publicRedirects) {
24
- const permalink = manifest.bySlug.get(redirect.slug)?.permalink;
25
- if (permalink && htmlOutputPath(permalink) === routeOutputPath(path))
26
- continue;
27
- paths.push(path);
28
- }
29
- return paths;
30
- }
31
- function routeOutputPath(pathname) {
32
- return htmlOutputPath(pathname);
33
- }
34
- function encodeSegment(segment) {
35
- try {
36
- return encodeURIComponent(decodeURIComponent(segment));
37
- } catch {
38
- return encodeURIComponent(segment);
39
- }
40
- }
41
-
42
- // src/content_route_part1.ts
43
6
  async function resolveRiebeckiteRoute(content, pathname) {
44
7
  const page = await content.resolvePage(pathname);
45
8
  if (page) return { kind: "page", page };
@@ -145,6 +108,39 @@ function contentRouteSsgParams(routePath, params) {
145
108
  return c.notFound();
146
109
  };
147
110
  }
111
+ function ssgEnumerableHandler(handler) {
112
+ const enumerable = (...args) => Reflect.apply(handler, void 0, args);
113
+ return enumerable;
114
+ }
115
+ function isDynamicRoute(path) {
116
+ return path.split("/").some((segment) => segment.startsWith(":") || segment.includes("*"));
117
+ }
118
+ function normalizeRequestPath(pathname) {
119
+ const trailingSlash = pathname.length > 1 && pathname.endsWith("/");
120
+ const segments = pathname.split("/").filter(Boolean).map(encodeSegment);
121
+ const path = `/${segments.join("/")}`;
122
+ return trailingSlash ? `${path}/` : path;
123
+ }
124
+ function redirectSsgPaths(manifest) {
125
+ const paths = [];
126
+ for (const [path, redirect] of manifest.publicRedirects) {
127
+ const permalink = manifest.bySlug.get(redirect.slug)?.permalink;
128
+ if (permalink && htmlOutputPath(permalink) === routeOutputPath(path))
129
+ continue;
130
+ paths.push(path);
131
+ }
132
+ return paths;
133
+ }
134
+ function routeOutputPath(pathname) {
135
+ return htmlOutputPath(pathname);
136
+ }
137
+ function encodeSegment(segment) {
138
+ try {
139
+ return encodeURIComponent(decodeURIComponent(segment));
140
+ } catch {
141
+ return encodeURIComponent(segment);
142
+ }
143
+ }
148
144
 
149
145
  // src/endpoints.ts
150
146
  function mountRiebeckiteEndpoints(app, options) {
@@ -1 +1,3 @@
1
- export { riebeckiteClientModule } from "./client_module_part1.js";
1
+ import type { ResolvedRiebeckiteConfig } from "@riebeckite/core";
2
+ import type { Plugin } from "vite";
3
+ export declare function riebeckiteClientModule(getConfig: () => Pick<ResolvedRiebeckiteConfig, "plugins" | "spa">, ensure?: () => Promise<unknown>): Plugin;
@@ -1,3 +1,37 @@
1
- export type { ResolvedContentRequest, ResolvedContentRoute, ResolvedRiebeckiteRoute, } from "./content_route_part1.js";
2
- export { applyRiebeckiteRouteContext, contentRouteSsgParams, pluginPageSsgParams, resolveContentRoute, resolveRiebeckiteContentRequest, resolveRiebeckiteHomeRequest, resolveRiebeckiteRoute, riebeckiteSsgParams, } from "./content_route_part1.js";
3
- export { ssgEnumerableHandler } from "./content_route_part2.js";
1
+ import { type ContentManager, type ContentManifest, type ContentManifestEntry, type PostContent, type ResolvedPluginPage } from "@riebeckite/core";
2
+ import type { Context, Handler, MiddlewareHandler } from "hono";
3
+ export type ResolvedContentRoute = {
4
+ kind: "content";
5
+ entry: ContentManifestEntry;
6
+ } | {
7
+ kind: "redirect";
8
+ location: string;
9
+ status: 301 | 302 | 307 | 308;
10
+ } | null;
11
+ export type ResolvedRiebeckiteRoute = Exclude<ResolvedContentRoute, null> | {
12
+ kind: "page";
13
+ page: ResolvedPluginPage;
14
+ } | null;
15
+ export declare function resolveRiebeckiteRoute(content: Pick<ContentManager, "resolvePage" | "getRequestManifest">, pathname: string): Promise<ResolvedRiebeckiteRoute>;
16
+ export type ResolvedContentRequest = {
17
+ kind: "content";
18
+ entry: ContentManifestEntry;
19
+ post: PostContent;
20
+ } | {
21
+ kind: "page";
22
+ page: ResolvedPluginPage;
23
+ } | {
24
+ kind: "response";
25
+ response: Response | Promise<Response>;
26
+ };
27
+ export declare function applyRiebeckiteRouteContext(c: Context, route: Exclude<ResolvedRiebeckiteRoute, null>): void;
28
+ type RouteContent = Pick<ContentManager, "resolvePage" | "getRequestManifest" | "getProcessedContent">;
29
+ export declare function resolveRiebeckiteContentRequest(c: Context, content: RouteContent, parameter?: string): Promise<ResolvedContentRequest>;
30
+ export declare function resolveRiebeckiteHomeRequest(c: Context, content: RouteContent): Promise<ResolvedContentRequest>;
31
+ export declare function pluginPageSsgParams(content: Pick<ContentManager, "getPagePaths">, parameter?: string): Promise<Record<string, string>[]>;
32
+ export declare function riebeckiteSsgParams(content: Pick<ContentManager, "getManifest" | "getOutputChangeSet" | "getPagePaths">, parameter?: string): Promise<Record<string, string>[]>;
33
+ export declare function resolveContentRoute(manifest: ContentManifest, pathname: string): ResolvedContentRoute;
34
+ type SsgParams = Record<string, string>[];
35
+ export declare function contentRouteSsgParams(routePath: string, params: SsgParams | ((c: Context) => SsgParams | Promise<SsgParams>)): MiddlewareHandler;
36
+ export declare function ssgEnumerableHandler<H extends Handler<any, any, any>>(handler: H): H;
37
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/honox",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -44,16 +44,17 @@
44
44
  "hono": "^4.13.18",
45
45
  "honox": "0.1.62",
46
46
  "vite": "^8.3.7",
47
- "@riebeckite/dev-inspector": "0.1.0",
48
- "@riebeckite/node": "0.1.0",
49
- "@riebeckite/runtime": "0.1.0",
50
- "@riebeckite/og-image": "0.1.0",
51
- "@riebeckite/plugin-color-mode": "0.1.0",
52
- "@riebeckite/spa": "0.1.0",
53
- "@riebeckite/ui": "0.1.0"
47
+ "@riebeckite/dev-inspector": "0.2.0",
48
+ "@riebeckite/ai": "0.2.0",
49
+ "@riebeckite/node": "0.2.0",
50
+ "@riebeckite/og-image": "0.2.0",
51
+ "@riebeckite/plugin-color-mode": "0.2.0",
52
+ "@riebeckite/runtime": "0.2.0",
53
+ "@riebeckite/spa": "0.2.0",
54
+ "@riebeckite/ui": "0.2.0"
54
55
  },
55
56
  "peerDependencies": {
56
- "@riebeckite/core": "^0.1.0"
57
+ "@riebeckite/core": "^0.2.0"
57
58
  },
58
59
  "devDependencies": {
59
60
  "@d2lang/d2": "^0.1.34",
@@ -61,9 +62,9 @@
61
62
  "@hono/vite-build": "^1.11.1",
62
63
  "@marp-team/marp-core": "^4.4.0",
63
64
  "tsx": "^4.22.4",
64
- "@riebeckite/test": "0.1.0",
65
- "@riebeckite/plugin-bases": "0.1.0",
66
- "@riebeckite/core": "0.1.0"
65
+ "@riebeckite/core": "0.2.0",
66
+ "@riebeckite/plugin-bases": "0.2.0",
67
+ "@riebeckite/test": "0.2.0"
67
68
  },
68
69
  "publishConfig": {
69
70
  "access": "public"
@@ -1,5 +0,0 @@
1
- import type { ResolvedRiebeckiteConfig } from "@riebeckite/core";
2
- import type { Plugin } from "vite";
3
- export declare const clientModuleId = "virtual:riebeckite/client";
4
- export declare const resolvedClientModuleId = "\0virtual:riebeckite/client";
5
- export declare function riebeckiteClientModule(getConfig: () => Pick<ResolvedRiebeckiteConfig, "plugins" | "spa">, ensure?: () => Promise<unknown>): Plugin;
@@ -1,2 +0,0 @@
1
- import type { ResolvedRiebeckiteConfig } from "@riebeckite/core";
2
- export declare function createClientModule(config: Pick<ResolvedRiebeckiteConfig, "plugins" | "spa">, development: boolean): Promise<string>;
@@ -1,37 +0,0 @@
1
- import { type ContentManager, type ContentManifest, type ContentManifestEntry, type PostContent, type ResolvedPluginPage } from "@riebeckite/core";
2
- import type { Context, MiddlewareHandler } from "hono";
3
- export type ResolvedContentRoute = {
4
- kind: "content";
5
- entry: ContentManifestEntry;
6
- } | {
7
- kind: "redirect";
8
- location: string;
9
- status: 301 | 302 | 307 | 308;
10
- } | null;
11
- export type ResolvedRiebeckiteRoute = Exclude<ResolvedContentRoute, null> | {
12
- kind: "page";
13
- page: ResolvedPluginPage;
14
- } | null;
15
- export declare function resolveRiebeckiteRoute(content: Pick<ContentManager, "resolvePage" | "getRequestManifest">, pathname: string): Promise<ResolvedRiebeckiteRoute>;
16
- export type ResolvedContentRequest = {
17
- kind: "content";
18
- entry: ContentManifestEntry;
19
- post: PostContent;
20
- } | {
21
- kind: "page";
22
- page: ResolvedPluginPage;
23
- } | {
24
- kind: "response";
25
- response: Response | Promise<Response>;
26
- };
27
- export declare function applyRiebeckiteRouteContext(c: Context, route: Exclude<ResolvedRiebeckiteRoute, null>): void;
28
- export declare const contentExtensionPattern: RegExp;
29
- export type RouteContent = Pick<ContentManager, "resolvePage" | "getRequestManifest" | "getProcessedContent">;
30
- export declare function resolveRouteRequest(c: Context, content: RouteContent): Promise<ResolvedContentRequest>;
31
- export declare function resolveRiebeckiteContentRequest(c: Context, content: RouteContent, parameter?: string): Promise<ResolvedContentRequest>;
32
- export declare function resolveRiebeckiteHomeRequest(c: Context, content: RouteContent): Promise<ResolvedContentRequest>;
33
- export declare function pluginPageSsgParams(content: Pick<ContentManager, "getPagePaths">, parameter?: string): Promise<Record<string, string>[]>;
34
- export declare function riebeckiteSsgParams(content: Pick<ContentManager, "getManifest" | "getOutputChangeSet" | "getPagePaths">, parameter?: string): Promise<Record<string, string>[]>;
35
- export declare function resolveContentRoute(manifest: ContentManifest, pathname: string): ResolvedContentRoute;
36
- export type SsgParams = Record<string, string>[];
37
- export declare function contentRouteSsgParams(routePath: string, params: SsgParams | ((c: Context) => SsgParams | Promise<SsgParams>)): MiddlewareHandler;
@@ -1,8 +0,0 @@
1
- import { type ContentManifest } from "@riebeckite/core";
2
- import type { Handler } from "hono";
3
- export declare function ssgEnumerableHandler<H extends Handler<any, any, any>>(handler: H): H;
4
- export declare function isDynamicRoute(path: string): boolean;
5
- export declare function normalizeRequestPath(pathname: string): string;
6
- export declare function redirectSsgPaths(manifest: ContentManifest): string[];
7
- export declare function routeOutputPath(pathname: string): string;
8
- export declare function encodeSegment(segment: string): string;