@tdacorp/hyle-sdk 0.2.0 → 0.2.1
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 +2 -0
- package/dist/next.js +3 -3
- package/dist/use-cache.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -127,6 +127,8 @@ export default async function sitemap() {
|
|
|
127
127
|
|
|
128
128
|
## Host requirements
|
|
129
129
|
|
|
130
|
+
Bundler only: `@tdacorp/hyle-sdk/next` and `/next/use-cache` import `next/navigation` and `next/cache` the way a Next app does, so plain Node ESM cannot import them. Real `next build` runs of the packed package passed with Next 16.2.7, 16.3.4 and 16.4.2 (Turbopack, the default).
|
|
131
|
+
|
|
130
132
|
No layout or page above the mount may export `dynamicParams = false`. hyle content (an article published after your last build) is by definition not known at build time, and Next inherits a parent's `false` for every child route: the route is compiled with `"fallback": false`, so each path not generated at build time is a hard 404 that falls through to any `[locale]/[...rest]` catch-all (observed: `x-matched-path: /[locale]/[...rest]`, content looks missing). Setting `dynamicParams = true` on the page does not override a parent's `false`.
|
|
131
133
|
|
|
132
134
|
Verify after `next build`: `.next/prerender-manifest.json` must not show `"fallback": false` for the route that mounts `hylePage`, and a request for a published article that did not exist at build time must return 200.
|
package/dist/next.js
CHANGED
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
} from "./chunk-HFUJRNFP.js";
|
|
15
15
|
|
|
16
16
|
// src/next/page.tsx
|
|
17
|
-
import { notFound, permanentRedirect, redirect } from "next/navigation
|
|
17
|
+
import { notFound, permanentRedirect, redirect } from "next/navigation";
|
|
18
18
|
|
|
19
19
|
// src/next/options.ts
|
|
20
|
-
import { unstable_rethrow } from "next/navigation
|
|
20
|
+
import { unstable_rethrow } from "next/navigation";
|
|
21
21
|
|
|
22
22
|
// src/next/paths.ts
|
|
23
23
|
function normalizeBasePath(basePath) {
|
|
@@ -185,7 +185,7 @@ function hyleMetadata(options) {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
// src/next/revalidate.ts
|
|
188
|
-
import { revalidateTag } from "next/cache
|
|
188
|
+
import { revalidateTag } from "next/cache";
|
|
189
189
|
var isSwitchedOff = (value) => ["0", "false"].includes(value?.trim().toLowerCase() ?? "");
|
|
190
190
|
function createRevalidateRoute(options) {
|
|
191
191
|
let cached;
|
package/dist/use-cache.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-HFUJRNFP.js";
|
|
8
8
|
|
|
9
9
|
// src/next/use-cache.ts
|
|
10
|
-
import { cacheLife, cacheTag } from "next/cache
|
|
10
|
+
import { cacheLife, cacheTag } from "next/cache";
|
|
11
11
|
var MAX_TAGS = 128;
|
|
12
12
|
var DISABLED_REVALIDATE = 30;
|
|
13
13
|
var tokens = /* @__PURE__ */ new Map();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tdacorp/hyle-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "hyle SDK: a typed client for hyle's resolve endpoint, a hast renderer for React, and a Next.js catch-all page with tag-based revalidation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|