@alauda/doom 0.13.1 → 0.13.3

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.
@@ -1,10 +1,8 @@
1
1
  import EventEmitter from 'node:events';
2
2
  import type { Browser, LaunchOptions, Page } from 'playwright';
3
3
  import { type OutlineNode } from './outline.js';
4
- export type PDFOptions = Exclude<Parameters<Page['pdf']>[0], undefined> & {
5
- lang?: string;
6
- };
7
- export type { Browser, Page, LaunchOptions };
4
+ export type PDFOptions = Exclude<Parameters<Page['pdf']>[0], undefined>;
5
+ export type { Browser, LaunchOptions, Page };
8
6
  export type PageInitScriptFn = Page['addInitScript'];
9
7
  export interface PrinterOptions {
10
8
  debug?: boolean;
@@ -3,7 +3,7 @@ import path from 'node:path';
3
3
  import process from 'node:process';
4
4
  import { PDFDocument } from 'pdf-lib';
5
5
  import { chromium } from 'playwright';
6
- import { red } from 'colorette';
6
+ import { red } from 'yoctocolors';
7
7
  import { getOutlineNodes, setOutlineNodes, } from './outline.js';
8
8
  import { setMetadata } from './postprocesser.js';
9
9
  export class Printer extends EventEmitter {
@@ -22,9 +22,9 @@ export const resolveStaticConfig = async (filepath) => {
22
22
  };
23
23
  export async function generateRuntimeModule(patterns, kind, root, cwd, isProd, mapper) {
24
24
  const runtimeModules = {};
25
- const files = await glob(patterns, { absolute: true, cwd });
25
+ const files = await glob(patterns, { cwd });
26
26
  for (const file of files) {
27
- const result = await resolveStaticConfig(file);
27
+ const result = await resolveStaticConfig(path.resolve(cwd, file));
28
28
  runtimeModules[`doom-@${kind}/${file}.mjs`] =
29
29
  `export default ${JSON.stringify((await mapper?.(result)) ?? result, null, isProd ? 0 : 2)}`;
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.13.1",
3
+ "version": "0.13.3",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": {