md-pipe 0.8.1 → 0.8.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.
@@ -3,7 +3,7 @@
3
3
  A rendering engine that transforms Markdown manuscripts into HTML/PDF through HTML-comment directives and DOM transformations, without polluting the Markdown source.
4
4
 
5
5
 
6
- **Version:** 0.8.1
6
+ **Version:** 0.8.3
7
7
 
8
8
  ## Table of Contents
9
9
 
@@ -42,7 +42,7 @@ Converts HTML-comment directives into class/id/attribute-bearing HTML nodes, emb
42
42
 
43
43
  Render a Markdown file through the pipeline.
44
44
 
45
- Execute the rendering pipeline on an input file or stdin. Stages: preprocess → render → transform → html → pdf. Use --pipeline to specify the execution range in [start.]end format; omitting start begins from the .md source. When --pipeline is omitted, the output format is inferred from the -o extension (.html → html, .pdf → pdf), then from frontmatter/config, defaulting to html. Output is written to a file with -o, or to stdout when omitted.
45
+ Execute the rendering pipeline on an input file or stdin. Stages: preprocess → render → transform → html → pdf. Use --pipeline to specify the execution range in [start.]end format; omitting start begins from the .md source. When --pipeline is omitted, the output format is inferred from the -o extension (.html → html, .pdf → pdf), then from frontmatter/config, defaulting to html. Output is written to the file -o names, otherwise to the frontmatter or project config output, and to stdout when none of them is set. The document, the project config and the files they name are trusted input, read and run with the invoking user's authority: frontmatter chooses the output path and the styles, scripts and template read from any path the user can read; project config transforms run as code; the config is looked up from the current directory to the root; the pdf stage loads the page in Chromium with its scripts and remote resources. Convert only documents and directories you trust.
46
46
 
47
47
 
48
48
  **Usage:**
@@ -84,13 +84,14 @@ cat report.md | md-pipe --pipeline .transform | md-pipe --pipeline transform.pdf
84
84
  |
85
85
  | `--scripts` | | No | | Additional JavaScript file paths. Multiple values allowed. Appended after theme assets in load order.
86
86
  |
87
- | `--paper-size` | | No | `"A4"` | Paper size for the pdf stage. Overrides frontmatter paper.size. |
87
+ | `--paper-size` | | No | | Paper size for the pdf stage. Overrides frontmatter paper.size and the project config pdf.paper.size. A4 when none of them names one.
88
+ |
88
89
  | `--landscape` | | No | `false` | Landscape orientation for the pdf stage. |
89
90
  | `--header` | | No | | Page header text for the pdf stage. |
90
91
  | `--viewport` | | No | | Viewport size for the pdf stage in WIDTHxHEIGHT format (e.g. 1024x768). Controls Puppeteer's page.setViewport() and the viewport meta tag in the default HTML template. When omitted, the default HTML template uses width=device-width, initial-scale=1 and Puppeteer uses its default (800x600).
91
92
  |
92
93
  | `--margin` | | No | | Page margin for the pdf stage. Example: 16mm, 18mm. |
93
- | `--prefer-css-page-size` | | No | `false` | Use CSS @page size instead of the --paper-size value. When enabled, Puppeteer defers to the CSS @page { size: ... } rule for page dimensions, which avoids the 96/72 DPI scaling mismatch between CSS pixels and PDF points.
94
+ | `--prefer-css-page-size` | | No | | Use CSS @page size instead of the --paper-size value. When enabled, Puppeteer defers to the CSS @page { size: ... } rule for page dimensions, which avoids the 96/72 DPI scaling mismatch between CSS pixels and PDF points. When omitted, frontmatter pdf.preferCSSPageSize and then the project config pdf.preferCSSPageSize apply; disabled when neither sets it.
94
95
  |
95
96
 
96
97
  #### Streams
@@ -207,9 +208,10 @@ x-agent:
207
208
  recommended_before_use:
208
209
  - Check that md-pipe.config.yml exists when using themes or custom directives
209
210
  - Verify the optional puppeteer peer dependency is installed and Chromium is available when targeting pdf output
211
+ - Convert only documents and directories you trust; frontmatter chooses the output path and reads files with your authority, and project config transforms run as code
210
212
  rollback:
211
213
  supported: false
212
- notes: Output files can be deleted manually; no side effects beyond file writes.
214
+ notes: Output files can be deleted manually; the side effects are the file writes and the pdf stage's network requests stated in effects.
213
215
  retryable_exit_codes:
214
216
  - 1
215
217
  expected_duration_ms: 5000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md-pipe",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "A rendering engine that transforms Markdown to HTML/PDF via directive-driven pipelines",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,7 +14,8 @@
14
14
  "browser:install": "puppeteer browsers install chrome",
15
15
  "test": "vitest run",
16
16
  "test:unit": "vitest run test/unit",
17
- "test:ci": "vitest run"
17
+ "test:ci": "vitest run",
18
+ "audit:signatures": "npx --yes npm@11.19.1 audit signatures"
18
19
  },
19
20
  "keywords": [
20
21
  "markdown",
@@ -36,10 +37,10 @@
36
37
  "node": ">=22.12.0"
37
38
  },
38
39
  "dependencies": {
39
- "tsx": "^4.21.0"
40
+ "tsx": "^4.23.15"
40
41
  },
41
42
  "peerDependencies": {
42
- "puppeteer": ">=25.0.2"
43
+ "puppeteer": ">=25.13.0"
43
44
  },
44
45
  "peerDependenciesMeta": {
45
46
  "puppeteer": {
@@ -48,17 +49,18 @@
48
49
  },
49
50
  "devDependencies": {
50
51
  "@types/js-yaml": "^4.0.9",
51
- "@types/node": "^22.15.21",
52
+ "@types/node": "^22.20.5",
52
53
  "cheerio": "^1.2.0",
53
- "cli-contracts": "^0.34.6",
54
+ "cli-contracts": "^0.35.1",
54
55
  "commander": "^14.0.3",
55
- "esbuild": "^0.28.0",
56
- "handlebars": "^4.7.9",
56
+ "domhandler": "^5.0.3",
57
+ "esbuild": "^0.28.2",
58
+ "handlebars": "^4.7.10",
57
59
  "js-yaml": "^4.1.1",
58
- "marked": "^18.0.3",
59
- "puppeteer": "^25.0.2",
60
- "puppeteer-floor": "npm:puppeteer@25.0.2",
61
- "typescript": "^6.0.3",
62
- "vitest": "^4.1.7"
60
+ "marked": "^18.2.0",
61
+ "puppeteer": "^25.17.0",
62
+ "puppeteer-floor": "npm:puppeteer@25.13.0",
63
+ "typescript": "^7.0.2",
64
+ "vitest": "^4.1.12"
63
65
  }
64
66
  }