@askrjs/cli 0.0.18 → 0.0.19

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 base = new URL(path.posix.dirname(`/${portableDocumentPath}`) + "/", "https://askr.invalid");
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.18",
3
+ "version": "0.0.19",
4
4
  "description": "Unified CLI for the Askr platform",
5
5
  "homepage": "https://github.com/askrjs/askr-cli#readme",
6
6
  "bugs": {