@marlinjai/clearify 1.5.0 → 1.5.2
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/node/{chunk-GFD54GNO.js → chunk-MWUXPDQK.js} +2 -2
- package/dist/node/{chunk-CQ4MNGBE.js → chunk-NY3VVUQ3.js} +1 -1
- package/dist/node/{chunk-NXQNNLGC.js → chunk-UOVBAJMR.js} +17 -0
- package/dist/node/cli/index.js +1 -1
- package/dist/node/node/build.js +2 -2
- package/dist/node/node/index.js +3 -3
- package/dist/node/node/init.js +1 -1
- package/dist/node/vite-plugin/index.js +1 -1
- package/package.json +1 -1
|
@@ -175,7 +175,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
175
175
|
if (options.noInternal) {
|
|
176
176
|
writeFileSync(
|
|
177
177
|
configPath,
|
|
178
|
-
`import { defineConfig } from 'clearify';
|
|
178
|
+
`import { defineConfig } from '@marlinjai/clearify';
|
|
179
179
|
|
|
180
180
|
export default defineConfig({
|
|
181
181
|
name: 'My Documentation',
|
|
@@ -190,7 +190,7 @@ export default defineConfig({
|
|
|
190
190
|
} else {
|
|
191
191
|
writeFileSync(
|
|
192
192
|
configPath,
|
|
193
|
-
`import { defineConfig } from 'clearify';
|
|
193
|
+
`import { defineConfig } from '@marlinjai/clearify';
|
|
194
194
|
|
|
195
195
|
export default defineConfig({
|
|
196
196
|
name: 'My Documentation',
|
|
@@ -368,6 +368,23 @@ ${routeEntries.join(",\n")}
|
|
|
368
368
|
server.ws.send({ type: "full-reload" });
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
|
+
return () => {
|
|
372
|
+
server.middlewares.use((req, _res, next) => {
|
|
373
|
+
if (req.method !== "GET" || !req.headers.accept?.includes("text/html")) {
|
|
374
|
+
return next();
|
|
375
|
+
}
|
|
376
|
+
const url = req.url?.split("?")[0] ?? "";
|
|
377
|
+
const sectionMatch = visibleSections.some(
|
|
378
|
+
(s) => s.basePath !== "/" && url.startsWith(s.basePath)
|
|
379
|
+
);
|
|
380
|
+
const apiBasePath = config.openapi?.basePath ?? "/api";
|
|
381
|
+
const apiMatch = config.openapi?.spec && url.startsWith(apiBasePath);
|
|
382
|
+
if (sectionMatch || apiMatch) {
|
|
383
|
+
req.url = "/index.html";
|
|
384
|
+
}
|
|
385
|
+
next();
|
|
386
|
+
});
|
|
387
|
+
};
|
|
371
388
|
}
|
|
372
389
|
};
|
|
373
390
|
const headInjectionPlugin = {
|
package/dist/node/cli/index.js
CHANGED
package/dist/node/node/build.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSite
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NY3VVUQ3.js";
|
|
4
4
|
import "../chunk-PRTER35L.js";
|
|
5
5
|
import "../chunk-SCZZB7OE.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-UOVBAJMR.js";
|
|
7
7
|
import "../chunk-B2Q23JW3.js";
|
|
8
8
|
import "../chunk-IBK35HZR.js";
|
|
9
9
|
import "../chunk-V7LLYIRO.js";
|
package/dist/node/node/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSite
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NY3VVUQ3.js";
|
|
4
4
|
import {
|
|
5
5
|
remarkMermaidToComponent
|
|
6
6
|
} from "../chunk-PRTER35L.js";
|
|
7
7
|
import "../chunk-SCZZB7OE.js";
|
|
8
8
|
import {
|
|
9
9
|
clearifyPlugin
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-UOVBAJMR.js";
|
|
11
11
|
import "../chunk-B2Q23JW3.js";
|
|
12
12
|
import {
|
|
13
13
|
init
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-MWUXPDQK.js";
|
|
15
15
|
import {
|
|
16
16
|
checkLinks
|
|
17
17
|
} from "../chunk-WT5W333R.js";
|
package/dist/node/node/init.js
CHANGED