@lupinum/ginko-content 1.0.0-beta.5 → 1.0.0-beta.6
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 +4 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +32 -2
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
> [!WARNING]
|
|
18
|
-
> Version `1.0.0-beta.
|
|
18
|
+
> Version `1.0.0-beta.6` is a prerelease. Install it from npm's `next`
|
|
19
19
|
> channel. The stable `0.3` line remains on `latest`.
|
|
20
20
|
|
|
21
21
|
## Why use this package?
|
|
@@ -32,7 +32,7 @@ output.
|
|
|
32
32
|
|
|
33
33
|
- Node.js 22.18–22.x, 24.11–24.x, or 26+
|
|
34
34
|
- Nuxt 4.5.1 through Nuxt 4.x
|
|
35
|
-
- Vue 3.5.
|
|
35
|
+
- Vue 3.5.40 through Vue 3.x
|
|
36
36
|
- ESM; CommonJS `require()` is not supported
|
|
37
37
|
|
|
38
38
|
## Installation
|
|
@@ -40,13 +40,13 @@ output.
|
|
|
40
40
|
Use the Nuxt CLI:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npx nuxi module add @lupinum/ginko-content@1.0.0-beta.
|
|
43
|
+
npx nuxi module add @lupinum/ginko-content@1.0.0-beta.6
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Or install and register the module by hand:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
pnpm add @lupinum/ginko-content@1.0.0-beta.
|
|
49
|
+
pnpm add @lupinum/ginko-content@1.0.0-beta.6
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
```ts
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -34,7 +34,7 @@ import { assertCanonicalHighlightOptionNames } from '../dist/parsers/markdown-pl
|
|
|
34
34
|
import { BUILTIN_MARKDOWN_RENDER_CONTRACTS } from '../dist/core/markdown/builtin-render-contracts.js';
|
|
35
35
|
|
|
36
36
|
const name = "@lupinum/ginko-content";
|
|
37
|
-
const version = "1.0.0-beta.
|
|
37
|
+
const version = "1.0.0-beta.6";
|
|
38
38
|
const peerDependencies = {
|
|
39
39
|
nuxt: ">=4.5.1 <5"};
|
|
40
40
|
|
|
@@ -1109,6 +1109,7 @@ const collectRawMarkdownRoutesFromGeneratedFrontmatter = (markdown) => {
|
|
|
1109
1109
|
};
|
|
1110
1110
|
const publicOutputPath = (publicDir, route) => join(publicDir, normalizeStaticRoutePath(route).replace(/^\//, ""));
|
|
1111
1111
|
|
|
1112
|
+
const runtimeModuleImportURL = (modulePath, toFileURL = pathToFileURL) => toFileURL(modulePath).href;
|
|
1112
1113
|
const assertPrerenderedContentSnapshot = (buildDir) => {
|
|
1113
1114
|
const snapshotPath = resolve$1(buildDir, "content-cache/snapshot.json");
|
|
1114
1115
|
let raw;
|
|
@@ -1166,7 +1167,7 @@ ${details}` : "")
|
|
|
1166
1167
|
writeFileSync(indexPath, json, "utf8");
|
|
1167
1168
|
if (searchRuntime.engine === "pagefind") {
|
|
1168
1169
|
const records = JSON.parse(json);
|
|
1169
|
-
const { writePagefindIndex } = await import(resolveRuntimeModule("./server/pagefind.js"));
|
|
1170
|
+
const { writePagefindIndex } = await import(runtimeModuleImportURL(resolveRuntimeModule("./server/pagefind.js")));
|
|
1170
1171
|
await writePagefindIndex(records, resolve$1(publicDir, "pagefind"), resolvedI18n.defaultLocale);
|
|
1171
1172
|
}
|
|
1172
1173
|
}
|
|
@@ -1364,6 +1365,29 @@ const registerContentNitroIntegrationHooks = (nitroConfig, options, contentConte
|
|
|
1364
1365
|
});
|
|
1365
1366
|
};
|
|
1366
1367
|
|
|
1368
|
+
const NUXT_NITRO_CACHE_DRIVER_SUFFIX = "/node_modules/@nuxt/nitro-server/dist/runtime/utils/cache-driver.mjs";
|
|
1369
|
+
const createNuxtWindowsCacheDriverResolver = (platform = process.platform, fromFileURL = fileURLToPath) => {
|
|
1370
|
+
if (platform !== "win32") {
|
|
1371
|
+
return void 0;
|
|
1372
|
+
}
|
|
1373
|
+
return {
|
|
1374
|
+
name: "ginko-content:nuxt-windows-cache-driver",
|
|
1375
|
+
resolveId(id) {
|
|
1376
|
+
if (!id.startsWith("file:")) {
|
|
1377
|
+
return null;
|
|
1378
|
+
}
|
|
1379
|
+
try {
|
|
1380
|
+
const url = new URL(id);
|
|
1381
|
+
if (url.protocol !== "file:" || url.hostname !== "" || url.search !== "" || url.hash !== "" || !url.pathname.toLowerCase().endsWith(NUXT_NITRO_CACHE_DRIVER_SUFFIX)) {
|
|
1382
|
+
return null;
|
|
1383
|
+
}
|
|
1384
|
+
return fromFileURL(url);
|
|
1385
|
+
} catch {
|
|
1386
|
+
return null;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
};
|
|
1390
|
+
};
|
|
1367
1391
|
const hookNuxtBoundary$1 = (nuxt, name, callback) => {
|
|
1368
1392
|
const hook = nuxt.hook;
|
|
1369
1393
|
hook(name, callback);
|
|
@@ -1414,6 +1438,12 @@ const registerContentNitroConfig = ({
|
|
|
1414
1438
|
}
|
|
1415
1439
|
nitroConfig.bundledStorage = nitroConfig.bundledStorage || [];
|
|
1416
1440
|
nitroConfig.bundledStorage.push("cache:content");
|
|
1441
|
+
const windowsCacheDriverResolver = createNuxtWindowsCacheDriverResolver();
|
|
1442
|
+
if (windowsCacheDriverResolver) {
|
|
1443
|
+
nitroConfig.rollupConfig ||= {};
|
|
1444
|
+
nitroConfig.rollupConfig.plugins ||= [];
|
|
1445
|
+
nitroConfig.rollupConfig.plugins.push(windowsCacheDriverResolver);
|
|
1446
|
+
}
|
|
1417
1447
|
nitroConfig.externals = defu(typeof nitroConfig.externals === "object" ? nitroConfig.externals : {}, {
|
|
1418
1448
|
inline: [
|
|
1419
1449
|
resolveModuleFile("."),
|
package/dist/web-types.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lupinum/ginko-content",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
4
|
"description": "Collection-first content engine for Nuxt",
|
|
5
5
|
"homepage": "https://ginko-content.lupinum.com",
|
|
6
6
|
"bugs": {
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"nuxt": ">=4.5.1 <5",
|
|
173
173
|
"pagefind": "^1.5.2",
|
|
174
174
|
"vitest": ">=4.1.6 <5",
|
|
175
|
-
"vue": "^3.5.
|
|
175
|
+
"vue": "^3.5.40"
|
|
176
176
|
},
|
|
177
177
|
"peerDependenciesMeta": {
|
|
178
178
|
"beautiful-mermaid": {
|