@canopy-iiif/app 1.10.10 → 1.11.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/lib/AGENTS.md +1 -0
- package/lib/build/iiif.js +22 -0
- package/package.json +1 -1
package/lib/AGENTS.md
CHANGED
|
@@ -60,6 +60,7 @@ Logbook Template
|
|
|
60
60
|
|
|
61
61
|
Logbook
|
|
62
62
|
-------
|
|
63
|
+
- 2026-04-26 / mat: Added local file path support to the manifest fetch worker in `build/iiif.js`. Previously, the worker branched on `https?://` and `file://` and SKIPped everything else; relative paths (e.g., `assets/iiif/example.json`) were silently dropped. Added a third branch that catches any value with no URI scheme (regex: no `[scheme]:` prefix) and routes it through `readJsonFromUri()`, which already resolves relative paths against `process.cwd()`. Collection-root URIs were already handled correctly via `readJsonFromUri()`; only the manifest worker needed the fix.
|
|
63
64
|
- 2025-09-26 / chatgpt: Hardened runtime bundlers to throw when esbuild or source compilation fails and required `content/works/_layout.mdx`; build now aborts instead of silently writing placeholder assets.
|
|
64
65
|
- 2025-09-26 / chatgpt: Replaced the legacy command runtime stub with an esbuild-bundled runtime (`search/search-form-runtime.js`); `prepareSearchFormRuntime()` now builds `site/scripts/canopy-search-form.js` and fails if esbuild is missing.
|
|
65
66
|
- 2025-09-27 / chatgpt: Documented Tailwind token flow in `app/styles/tailwind.config.mts`, compiled UI Sass variables during config load, and exposed `stylesheetHref`/`Stylesheet` helpers via `@canopy-iiif/app/head` so `_app.mdx` can reference the generated CSS directly.
|
package/lib/build/iiif.js
CHANGED
|
@@ -2088,6 +2088,28 @@ async function buildIiifCollectionPages(CONFIG) {
|
|
|
2088
2088
|
lns.push([`⊘ ${String(id)} → ERR`, "red"]);
|
|
2089
2089
|
continue;
|
|
2090
2090
|
}
|
|
2091
|
+
} else if (!/^[a-zA-Z][a-zA-Z0-9+\-.]*:/.test(String(id || ""))) {
|
|
2092
|
+
// Relative or bare file path (no scheme) — resolve against cwd
|
|
2093
|
+
try {
|
|
2094
|
+
const local = await readJsonFromUri(String(id), {log: false});
|
|
2095
|
+
if (!local) {
|
|
2096
|
+
lns.push([`⊘ ${String(id)} → ERR`, "red"]);
|
|
2097
|
+
continue;
|
|
2098
|
+
}
|
|
2099
|
+
manifest = await upgradeIiifResource(local);
|
|
2100
|
+
const saved = await saveCachedManifest(
|
|
2101
|
+
manifest,
|
|
2102
|
+
String(id),
|
|
2103
|
+
String(it.parent || ""),
|
|
2104
|
+
);
|
|
2105
|
+
manifest = saved || manifest;
|
|
2106
|
+
const cached = await loadCachedManifestById(String(id));
|
|
2107
|
+
if (cached) manifest = cached;
|
|
2108
|
+
lns.push([`↓ ${String(id)} → Cached`, "yellow"]);
|
|
2109
|
+
} catch (_) {
|
|
2110
|
+
lns.push([`⊘ ${String(id)} → ERR`, "red"]);
|
|
2111
|
+
continue;
|
|
2112
|
+
}
|
|
2091
2113
|
} else {
|
|
2092
2114
|
lns.push([`⊘ ${String(id)} → SKIP`, "red"]);
|
|
2093
2115
|
continue;
|