@askrjs/cli 0.0.18 → 0.0.20
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/ssg.js
CHANGED
|
@@ -373,6 +373,7 @@ const REPORT_PATH = ".askr/ssg-output.json";
|
|
|
373
373
|
const INTERNAL_OUTPUTS = /* @__PURE__ */ new Set([
|
|
374
374
|
"metadata.json",
|
|
375
375
|
".askr/sitemap-manifest.json",
|
|
376
|
+
".askr/ssg-manifest.json",
|
|
376
377
|
REPORT_PATH
|
|
377
378
|
]);
|
|
378
379
|
function outputType(filePath) {
|
|
@@ -407,7 +408,8 @@ function localReference(reference, documentPath) {
|
|
|
407
408
|
let resolved;
|
|
408
409
|
try {
|
|
409
410
|
const portableDocumentPath = documentPath.replaceAll("\\", "/");
|
|
410
|
-
const
|
|
411
|
+
const directory = path.posix.dirname(`/${portableDocumentPath}`);
|
|
412
|
+
const base = new URL(directory.endsWith("/") ? directory : `${directory}/`, "https://askr.invalid");
|
|
411
413
|
resolved = new URL(reference, base);
|
|
412
414
|
} catch {
|
|
413
415
|
return;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import type { DocumentRenderArgs } from '@askrjs/askr/ssg';
|
|
4
|
+
import { withThemeStyles } from '@askrjs/themes/ssr';
|
|
4
5
|
import { pageRegistry } from './src/routes';
|
|
5
6
|
|
|
6
7
|
export const outputDir = './dist';
|
|
@@ -31,7 +32,8 @@ export const staticConfig = {
|
|
|
31
32
|
'/preview': false,
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
|
-
document: renderDocument,
|
|
35
|
+
document: withThemeStyles(renderDocument),
|
|
36
|
+
styleRegistrationValidation: 'error' as const,
|
|
35
37
|
assets: [
|
|
36
38
|
{
|
|
37
39
|
from: resolve(process.cwd(), '.askr/client/assets'),
|
|
@@ -9,5 +9,6 @@ describe('SSG config', () => {
|
|
|
9
9
|
expect(staticConfig.registry.routes).toHaveLength(4);
|
|
10
10
|
expect(staticConfig.siteUrl).toBe('https://example.com');
|
|
11
11
|
expect(staticConfig.sitemap.routes['/preview']).toBe(false);
|
|
12
|
+
expect(staticConfig.styleRegistrationValidation).toBe('error');
|
|
12
13
|
});
|
|
13
14
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askrjs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "Unified CLI for the Askr platform",
|
|
5
5
|
"homepage": "https://github.com/askrjs/askr-cli#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"prepublishOnly": "npm run check && npm run test:templates && npm run test:peer-floor"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@npmcli/config": "^
|
|
57
|
+
"@npmcli/config": "^11.0.1",
|
|
58
58
|
"js-yaml": "^5.2.2",
|
|
59
59
|
"minimatch": "^10.2.6",
|
|
60
|
-
"npm-registry-fetch": "^
|
|
60
|
+
"npm-registry-fetch": "^20.0.1",
|
|
61
61
|
"parse5": "^8.0.1",
|
|
62
62
|
"semver": "^7.8.5",
|
|
63
63
|
"tsx": "^4.23.1",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/semver": "^7.7.1",
|
|
77
77
|
"@vitest/coverage-v8": "^4.1.10",
|
|
78
78
|
"publint": "^0.3.21",
|
|
79
|
-
"vite-plus": "0.2.
|
|
79
|
+
"vite-plus": "0.2.6",
|
|
80
80
|
"vitest": "^4.1.10"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|