@phnx-labs/artifacts-cli 0.2.1 → 0.3.1
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/CHANGELOG.md +73 -1
- package/README.md +43 -25
- package/dist/cli.js +80 -107
- package/dist/cli.js.map +1 -1
- package/dist/lib/embedded-html.d.ts +1 -1
- package/dist/lib/embedded-html.js +22 -0
- package/dist/lib/embedded-html.js.map +1 -1
- package/dist/lib/render.js +145 -7
- package/dist/lib/render.js.map +1 -1
- package/dist/lib/templates.d.ts +3 -0
- package/dist/lib/templates.js +31 -1
- package/dist/lib/templates.js.map +1 -1
- package/dist/lib/validate.js +46 -12
- package/dist/lib/validate.js.map +1 -1
- package/package.json +2 -2
- package/dist/commands/setup.d.ts +0 -5
- package/dist/commands/setup.js +0 -40
- package/dist/commands/setup.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,78 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.3.1 — 2026-08-10
|
|
4
|
+
|
|
5
|
+
- The **`artifact-behavior` figure class** is now supported. A plan containing an
|
|
6
|
+
`<div class="artifact-behavior">` block with `artifact-behavior-panel` children
|
|
7
|
+
(carrying `data-state` and `data-evidence` attributes) passes `artifacts check`
|
|
8
|
+
and survives `artifacts render` with those attributes intact. Previously a
|
|
9
|
+
negative-lookahead in the validator incorrectly rejected `artifact-behavior-panel`
|
|
10
|
+
whenever `artifact-behavior` appeared on the same element, so any plan with the
|
|
11
|
+
current/proposed panel structure would fail validation.
|
|
12
|
+
- The **code-diff** block is now **collapsible with a filename**: a fenced
|
|
13
|
+
` ```diff title=path/to/file ` renders inside a `<details>` with the path as the
|
|
14
|
+
summary, so a plan carrying many file diffs stays scannable; add `collapsed` to
|
|
15
|
+
start it closed. Bare ` ```diff ` is unchanged. The **checklist** gains a third
|
|
16
|
+
state — `- [~]` renders as **in-progress** (counted toward the total but not
|
|
17
|
+
"done") alongside the existing `[ ]`/`[x]` and the `N / M done` count. The plan
|
|
18
|
+
scaffold now seeds both, and the artifacts authoring reference documents them.
|
|
19
|
+
- The **session** in a plan/report's provenance line is now a deep link back into
|
|
20
|
+
that session. It renders as `<a href="agents://session/<id>">`; clicking it hands
|
|
21
|
+
off to the OS, which routes it to agents-cli's `agents open` handler to reopen the
|
|
22
|
+
session's terminal in the input bar (resolving the owning host). The full,
|
|
23
|
+
untruncated session id is carried in the href (`sessionId` in the artifact
|
|
24
|
+
context) while the visible text stays the short id. Custom-scheme provenance links
|
|
25
|
+
open in the same tab (no `target="_blank"`) so the hand-off leaves no blank tab.
|
|
26
|
+
|
|
27
|
+
## 0.3.0 — 2026-08-09
|
|
28
|
+
|
|
29
|
+
Breaking: `artifacts --help` drops from twelve commands to four — `new`, `check`,
|
|
30
|
+
`render`, `share`.
|
|
31
|
+
|
|
32
|
+
### Command surface
|
|
33
|
+
|
|
34
|
+
- `new` absorbs two commands. `artifacts new <kind> --blank` replaces `artifacts
|
|
35
|
+
template <kind>`, and `artifacts new design` replaces `artifacts init design`.
|
|
36
|
+
`--out` is now optional, defaulting to `<kind>.md` (or `<kind>.template.md`
|
|
37
|
+
with `--blank`). Because that filename is a guess rather than the caller's
|
|
38
|
+
choice, `new` refuses to overwrite it if it already exists; pass `--out` to
|
|
39
|
+
write elsewhere or `--force` to overwrite. An explicit `--out` still
|
|
40
|
+
overwrites, as it always did. `new design` refuses to clobber an existing
|
|
41
|
+
`DESIGN.md` on the same rule.
|
|
42
|
+
- `artifacts render --open` replaces `artifacts preview`.
|
|
43
|
+
- `render` is HTML-only. `--format html` still works and warns; `--format pdf`
|
|
44
|
+
and `--layout` error with a pointer to `artifacts _pdf` rather than dying on an
|
|
45
|
+
unknown option, so callers get the migration message instead of a parse error.
|
|
46
|
+
**Both flags are removed entirely in 0.4.0.**
|
|
47
|
+
- `setup` and `doctor` are removed. `doctor` was a verbatim copy of `setup`.
|
|
48
|
+
Share settings already had their own writers, `share setup` and `share join`.
|
|
49
|
+
Font directories outside the project now go straight into `fonts.dirs` in
|
|
50
|
+
`~/.artifacts/config.json`; fonts inside the project never needed config.
|
|
51
|
+
- `estimate`, `decompile`, and `pdf` are hidden from `--help` but still run, and
|
|
52
|
+
each also answers to an underscore spelling (`_estimate`, `_decompile`,
|
|
53
|
+
`_pdf`). They are maintenance tools and may change without a major version.
|
|
54
|
+
- The `compile` alias for `render` is removed.
|
|
55
|
+
- Fixed: `pdf` wrote its intermediate HTML into `.artifacts/` while `render`
|
|
56
|
+
wrote next to the source. Both now write next to the source.
|
|
57
|
+
|
|
58
|
+
### Rendering
|
|
59
|
+
|
|
60
|
+
- **`code-diff` rendering for plans.** A fenced ` ```diff ` block now renders as a
|
|
61
|
+
GitHub-style diff — added lines green, removed lines red, with a sign gutter —
|
|
62
|
+
instead of a monochrome `<pre>`. Implemented as a Marked `code` renderer override
|
|
63
|
+
(`renderDiffLines` in `render.ts`); themed with the design tokens so it reads in
|
|
64
|
+
light and dark. This is how plans show the implementation as real code the reviewer
|
|
65
|
+
can scan, not a file/line table. The `cd-*` classes are added to the sanitizer's
|
|
66
|
+
allowed-class list.
|
|
67
|
+
- **`checklist` rendering for plans.** A GFM task list (`- [ ]` / `- [x]`) now renders
|
|
68
|
+
as a checklist with a `done / total` progress count and struck-through completed
|
|
69
|
+
items, instead of plain bullets (the `<input>` checkboxes Marked emits were being
|
|
70
|
+
stripped by the sanitizer). Implemented as a pre-sanitize transform
|
|
71
|
+
(`transformChecklists` in `render.ts`); the `checklist`/`cl-*` classes are added to
|
|
72
|
+
the allowed-class list. This lets a plan carry the agent's to-do list, mirrored from
|
|
73
|
+
`TaskCreate`, so the reviewer sees the steps and their status.
|
|
74
|
+
- **Table of contents renders one item per line** (`.toc` is now `display:grid`),
|
|
75
|
+
instead of wrapping inline — legible for plans with many sections.
|
|
4
76
|
|
|
5
77
|
## 0.2.1 — 2026-08-05
|
|
6
78
|
|
package/README.md
CHANGED
|
@@ -25,23 +25,17 @@ The repository exposes the skill at `skills/artifacts/SKILL.md`; agents-cli copi
|
|
|
25
25
|
Write the Markdown, run one command:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
$EDITOR plan.md # frontmatter needs only kind + title; provenance auto-fills
|
|
33
|
-
artifacts render plan.md # writes plan.html next to the source
|
|
34
|
-
artifacts render plan.md --format html,pdf --layout poster
|
|
28
|
+
artifacts new plan --out plan.md # scaffold; provenance auto-fills
|
|
29
|
+
$EDITOR plan.md # frontmatter needs only kind + title
|
|
30
|
+
artifacts render plan.md --open # writes plan.html next to the source, opens it
|
|
31
|
+
artifacts share plan.md # publish a shareable link
|
|
35
32
|
```
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
That is the whole surface. Two more when you want them:
|
|
38
35
|
|
|
39
36
|
```bash
|
|
40
|
-
artifacts new
|
|
41
|
-
artifacts init design # project-wide branding (DESIGN.md)
|
|
37
|
+
artifacts new design # project-wide branding (DESIGN.md)
|
|
42
38
|
artifacts check plan.md # validate without rendering
|
|
43
|
-
artifacts estimate plan.md # Markdown-vs-HTML authoring token cost
|
|
44
|
-
artifacts share plan.md # publish a shareable link
|
|
45
39
|
```
|
|
46
40
|
|
|
47
41
|
Provenance (project, repository, branch, harness, agent, human, host, session, date) fills automatically from the current Git checkout and agent environment at render time; any value you declare in frontmatter wins. Additional frontmatter carries into the artifact header:
|
|
@@ -81,19 +75,26 @@ offline brand mark; other hosts try a remote favicon and drop it if load fails.
|
|
|
81
75
|
|
|
82
76
|
## Commands
|
|
83
77
|
|
|
78
|
+
Four commands. Everything else is a flag on one of them.
|
|
79
|
+
|
|
84
80
|
| Command | Purpose |
|
|
85
81
|
| --- | --- |
|
|
86
|
-
| `artifacts
|
|
87
|
-
| `artifacts setup` | Creates `~/.artifacts/config.json`, records font directories/share endpoint options, and reports missing fonts. |
|
|
88
|
-
| `artifacts init design` | Creates starter `DESIGN.md`. |
|
|
89
|
-
| `artifacts template <plan|report|visual>` | Writes a fillable Markdown template. |
|
|
90
|
-
| `artifacts new <plan|report|visual> --out file.md` | Creates a working artifact Markdown file and pre-fills detectable provenance metadata. |
|
|
82
|
+
| `artifacts new <plan\|report\|visual\|design> [--out file] [--blank]` | Scaffolds an artifact and pre-fills detectable provenance. `--blank` leaves every field empty; `design` writes a starter `DESIGN.md`. |
|
|
91
83
|
| `artifacts check file.md` | Validates frontmatter metadata, required sections, asset paths, and embedded HTML/SVG safety. |
|
|
84
|
+
| `artifacts render file.md [--out file] [--open]` | Renders Markdown to self-contained HTML next to the source. `--open` shows it in your default browser. Embeds the Markdown source for recovery. |
|
|
85
|
+
| `artifacts share file.md` | Renders Markdown when needed and publishes through the configured R2/Worker endpoint. |
|
|
86
|
+
|
|
87
|
+
### Internal commands
|
|
88
|
+
|
|
89
|
+
These work but are deliberately absent from `--help` — they are maintenance tools,
|
|
90
|
+
not part of the authoring flow, and may change without a major version. Each also
|
|
91
|
+
answers to an underscore spelling (`_estimate`, `_decompile`, `_pdf`).
|
|
92
|
+
|
|
93
|
+
| Command | Purpose |
|
|
94
|
+
| --- | --- |
|
|
92
95
|
| `artifacts estimate file.md` | Counts Markdown and equivalent rendered HTML with `o200k_base`, then reports the authoring-token reduction without writing output. |
|
|
93
|
-
| `artifacts preview file.md` | Renders and opens the HTML. |
|
|
94
|
-
| `artifacts pdf file.md --out file.pdf [--layout document\|poster]` | Exports a paginated Letter document or one content-sized poster through headless Chromium without opening the user's browser. |
|
|
95
96
|
| `artifacts decompile file.html --out file.md` | Recovers Markdown from HTML generated by `artifacts render`. |
|
|
96
|
-
| `artifacts
|
|
97
|
+
| `artifacts pdf file.md --out file.pdf [--layout document\|poster]` | Exports a paginated Letter document or one content-sized poster through headless Chromium. Requires `playwright`, which is an optional dependency and is not installed by default. |
|
|
97
98
|
|
|
98
99
|
## Design And Fonts
|
|
99
100
|
|
|
@@ -157,7 +158,18 @@ fonts:
|
|
|
157
158
|
Inter: ./fonts/Inter.woff2
|
|
158
159
|
```
|
|
159
160
|
|
|
160
|
-
|
|
161
|
+
Font paths resolve relative to the artifact, so a project that keeps its fonts in
|
|
162
|
+
the checkout needs no configuration at all. If a font file is missing, `artifacts
|
|
163
|
+
render` warns and emits a fallback stack.
|
|
164
|
+
|
|
165
|
+
For fonts stored **outside** the project — a shared company font cache, say — add
|
|
166
|
+
the directory to `~/.artifacts/config.json` once. Every later `render` picks it up:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"fonts": { "dirs": ["/Library/Fonts/Corporate"] }
|
|
171
|
+
}
|
|
172
|
+
```
|
|
161
173
|
|
|
162
174
|
## Token Estimate
|
|
163
175
|
|
|
@@ -167,10 +179,10 @@ The committed [representative plan](examples/plan.md) measures:
|
|
|
167
179
|
|
|
168
180
|
| Source | Tokens | Difference from HTML |
|
|
169
181
|
| --- | ---: | ---: |
|
|
170
|
-
| Markdown authored by the agent | 1,
|
|
171
|
-
| Equivalent rendered HTML |
|
|
182
|
+
| Markdown authored by the agent | 1,309 | 5,985 fewer |
|
|
183
|
+
| Equivalent rendered HTML | 7,294 | baseline |
|
|
172
184
|
|
|
173
|
-
That example is
|
|
185
|
+
That example is an **82.1% authoring-token reduction** when the alternative is having the agent emit the same self-contained HTML. It includes complete metadata, ordinary Markdown, a table, embedded layout HTML, inline SVG, theme CSS, responsive rules, print rules, and the theme toggle. Run `artifacts estimate examples/plan.md` to reproduce it — the command is absent from `--help` but still runs.
|
|
174
186
|
|
|
175
187
|
## Embedded HTML And SVG
|
|
176
188
|
|
|
@@ -213,7 +225,13 @@ Inline SVG supports gradients, markers, filters, clip paths, masks, symbols, tex
|
|
|
213
225
|
|
|
214
226
|
Custom `<style>` blocks, inline `style` attributes, scripts, event handlers, executable embeds, and unlisted classes are errors. Run `artifacts check file.md` to get the source line and replace custom CSS with the supported classes.
|
|
215
227
|
|
|
216
|
-
|
|
228
|
+
HTML is the output. PDF lives on the internal `artifacts pdf` command, where
|
|
229
|
+
`--layout document` is the default for plans and reports and produces tagged,
|
|
230
|
+
paginated Letter output, and `--layout poster` produces one 1200-pixel-wide page
|
|
231
|
+
sized to the rendered content, appropriate for `visual` artifacts and
|
|
232
|
+
infographics. Both modes use the `artifact.printTheme` palette and run in
|
|
233
|
+
isolated headless Chromium. To print an HTML artifact yourself, `artifacts render
|
|
234
|
+
file.md --open` and use the browser's own print dialog.
|
|
217
235
|
|
|
218
236
|
## Sharing
|
|
219
237
|
|
package/dist/cli.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { dirname, join, resolve } from 'node:path';
|
|
4
4
|
import { spawn } from 'node:child_process';
|
|
5
|
-
import { Command } from 'commander';
|
|
5
|
+
import { Command, Option } from 'commander';
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
import { exportPdf, parsePdfLayout } from './lib/pdf.js';
|
|
8
8
|
import { compileArtifact, decompileHtml } from './lib/render.js';
|
|
9
9
|
import { estimateArtifactTokens } from './lib/tokens.js';
|
|
10
10
|
import { detectArtifactContext, STARTER_DESIGN, templateFor } from './lib/templates.js';
|
|
11
11
|
import { validateMarkdown } from './lib/validate.js';
|
|
12
|
-
import { runSetup } from './commands/setup.js';
|
|
13
12
|
import { shareAnalytics, shareDelete, shareJoin, sharePublish, shareSetup, shareStatus } from './commands/share.js';
|
|
14
13
|
const program = new Command();
|
|
15
14
|
function printDiagnostics(diagnostics) {
|
|
@@ -19,9 +18,6 @@ function printDiagnostics(diagnostics) {
|
|
|
19
18
|
console.error(`${label}${where} ${diagnostic.message}`);
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
|
-
function defaultHtmlOut(input) {
|
|
23
|
-
return join(process.cwd(), '.artifacts', input.replace(/.*\//, '').replace(/\.[^.]+$/, '') + '.html');
|
|
24
|
-
}
|
|
25
21
|
function defaultOutFor(input, ext) {
|
|
26
22
|
// Markdown sources render next to the source; HTML inputs keep the .artifacts
|
|
27
23
|
// default so normalization never clobbers the input file.
|
|
@@ -37,55 +33,55 @@ function openPath(path) {
|
|
|
37
33
|
}
|
|
38
34
|
program
|
|
39
35
|
.name('artifacts')
|
|
40
|
-
.description('Render Markdown artifacts into polished HTML
|
|
41
|
-
.version('0.
|
|
36
|
+
.description('Render Markdown artifacts into polished HTML and shareable static links.')
|
|
37
|
+
.version('0.3.0')
|
|
42
38
|
.addHelpText('after', `
|
|
43
39
|
Happy path:
|
|
44
|
-
1.
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
1. artifacts new plan --out <file>.md # frontmatter needs only kind + title;
|
|
41
|
+
# provenance auto-fills
|
|
42
|
+
2. artifacts render <file>.md --open # writes <file>.html next to the source
|
|
43
|
+
3. artifacts share <file>.md --expire 30d
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
estimate, share. Run artifacts <command> --help for details.
|
|
45
|
+
Run artifacts <command> --help for details.
|
|
50
46
|
`);
|
|
51
|
-
program
|
|
52
|
-
.command('setup')
|
|
53
|
-
.description('Create ~/.artifacts/config.json and check local rendering prerequisites.')
|
|
54
|
-
.option('--fonts-dir <dir>', 'directory containing local font files')
|
|
55
|
-
.option('--share-base-url <url>', 'existing share endpoint base URL')
|
|
56
|
-
.option('--share-token <token>', 'existing share write token')
|
|
57
|
-
.action(runSetup);
|
|
58
|
-
const init = program.command('init').description('Create starter project files.');
|
|
59
|
-
init
|
|
60
|
-
.command('design')
|
|
61
|
-
.description('Create starter DESIGN.md.')
|
|
62
|
-
.option('--out <file>', 'output file', 'DESIGN.md')
|
|
63
|
-
.action((opts) => {
|
|
64
|
-
writeFileSync(opts.out, STARTER_DESIGN);
|
|
65
|
-
console.log(`${chalk.bold('wrote')} ${opts.out}`);
|
|
66
|
-
});
|
|
67
|
-
program
|
|
68
|
-
.command('template')
|
|
69
|
-
.description('Write a fillable artifact template.')
|
|
70
|
-
.argument('<kind>', 'plan, report, or visual')
|
|
71
|
-
.option('--out <file>', 'output file')
|
|
72
|
-
.action((kind, opts) => {
|
|
73
|
-
if (!['plan', 'report', 'visual'].includes(kind))
|
|
74
|
-
throw new Error(`Unknown template kind: ${kind}`);
|
|
75
|
-
const out = opts.out || `${kind}.template.md`;
|
|
76
|
-
writeFileSync(out, templateFor(kind));
|
|
77
|
-
console.log(`${chalk.bold('wrote')} ${out}`);
|
|
78
|
-
});
|
|
79
47
|
program
|
|
80
48
|
.command('new')
|
|
81
|
-
.description('
|
|
82
|
-
.argument('<kind>', 'plan, report, or
|
|
83
|
-
.
|
|
49
|
+
.description('Scaffold a Markdown artifact: plan, report, visual, or design.')
|
|
50
|
+
.argument('<kind>', 'plan, report, visual, or design')
|
|
51
|
+
.option('--out <file>', 'output file')
|
|
52
|
+
.option('--blank', 'write an unfilled template instead of a context-filled artifact')
|
|
53
|
+
.option('--force', 'overwrite the default output file if it already exists')
|
|
54
|
+
.addHelpText('after', `
|
|
55
|
+
Examples:
|
|
56
|
+
$ artifacts new plan --out plan.md # provenance filled from git and the agent env
|
|
57
|
+
$ artifacts new plan --blank # plan.template.md, every field left empty
|
|
58
|
+
$ artifacts new design # DESIGN.md, project-wide branding
|
|
59
|
+
`)
|
|
84
60
|
.action((kind, opts) => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
61
|
+
// A defaulted filename is a guess, so it must never clobber authored work.
|
|
62
|
+
// An explicit --out is the caller naming the target, which stays as-is.
|
|
63
|
+
const writeArtifact = (out, content, defaulted) => {
|
|
64
|
+
if (defaulted && !opts.force && existsSync(out)) {
|
|
65
|
+
throw new Error(`${out} already exists; pass --out <file> to write elsewhere, or --force to overwrite.`);
|
|
66
|
+
}
|
|
67
|
+
writeFileSync(out, content);
|
|
68
|
+
console.log(`${chalk.bold('wrote')} ${out}`);
|
|
69
|
+
};
|
|
70
|
+
// design is a different file shape entirely — its own frontmatter, no
|
|
71
|
+
// required sections — so it never goes through templateFor().
|
|
72
|
+
if (kind === 'design') {
|
|
73
|
+
if (opts.blank)
|
|
74
|
+
throw new Error('--blank does not apply to design; DESIGN.md has no context-filled variant.');
|
|
75
|
+
writeArtifact(opts.out || 'DESIGN.md', STARTER_DESIGN, !opts.out);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (!['plan', 'report', 'visual'].includes(kind)) {
|
|
79
|
+
throw new Error(`Unknown artifact kind: ${kind}; use plan, report, visual, or design.`);
|
|
80
|
+
}
|
|
81
|
+
const artifactKind = kind;
|
|
82
|
+
const out = opts.out || (opts.blank ? `${artifactKind}.template.md` : `${artifactKind}.md`);
|
|
83
|
+
const content = opts.blank ? templateFor(artifactKind) : templateFor(artifactKind, detectArtifactContext());
|
|
84
|
+
writeArtifact(out, content, !opts.out);
|
|
89
85
|
});
|
|
90
86
|
program
|
|
91
87
|
.command('check')
|
|
@@ -100,8 +96,11 @@ program
|
|
|
100
96
|
else
|
|
101
97
|
console.log(chalk.green('ok'));
|
|
102
98
|
});
|
|
99
|
+
// Internal tools: still invocable, kept out of the command list so the help
|
|
100
|
+
// surface stays at the four commands an author actually needs.
|
|
103
101
|
program
|
|
104
|
-
.command('estimate')
|
|
102
|
+
.command('estimate', { hidden: true })
|
|
103
|
+
.alias('_estimate')
|
|
105
104
|
.description('Compare Markdown authoring tokens with equivalent rendered HTML tokens.')
|
|
106
105
|
.argument('<file.md>')
|
|
107
106
|
.action(async (file) => {
|
|
@@ -118,17 +117,21 @@ program
|
|
|
118
117
|
});
|
|
119
118
|
program
|
|
120
119
|
.command('render')
|
|
121
|
-
.
|
|
122
|
-
.description('Render Markdown to HTML next to the source (default), normalize HTML, or export PDF.')
|
|
120
|
+
.description('Render Markdown to HTML next to the source, or normalize existing HTML.')
|
|
123
121
|
.argument('<file.md|file.html>')
|
|
124
|
-
.option('--out <file>', 'output file
|
|
125
|
-
.option('--
|
|
126
|
-
.
|
|
122
|
+
.option('--out <file>', 'output file')
|
|
123
|
+
.option('--open', 'open the rendered HTML in your default browser')
|
|
124
|
+
// Deprecated in 0.3.0, removed in 0.4.0. A deployed ExitPlanMode hook copy may
|
|
125
|
+
// still print `artifacts render <file> --format html`, and Commander errors on
|
|
126
|
+
// unknown options — so these exist to hand a lagging caller a migration
|
|
127
|
+
// message instead of a parse error. Hidden for the same reason the deprecated
|
|
128
|
+
// commands are: they are not for humans to discover.
|
|
129
|
+
.addOption(new Option('--format <formats>', 'deprecated; html only').hideHelp())
|
|
130
|
+
.addOption(new Option('--layout <layout>', 'deprecated; PDF moved to artifacts _pdf').hideHelp())
|
|
127
131
|
.addHelpText('after', `
|
|
128
132
|
Examples:
|
|
129
133
|
$ artifacts render plan.md # plan.html next to plan.md
|
|
130
|
-
$ artifacts render plan.md --
|
|
131
|
-
$ artifacts render plan.md --format pdf --layout poster
|
|
134
|
+
$ artifacts render plan.md --open # render, then open in your browser
|
|
132
135
|
$ artifacts render plan.md --out dist/plan.html
|
|
133
136
|
$ artifacts render page.html # normalize into .artifacts/
|
|
134
137
|
|
|
@@ -138,49 +141,18 @@ Notes:
|
|
|
138
141
|
checkout and agent environment. Declared values always win.
|
|
139
142
|
`)
|
|
140
143
|
.action(async (file, opts) => {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const compileOnce = async (out) => {
|
|
151
|
-
const result = await compileArtifact(file, out);
|
|
152
|
-
printDiagnostics(result.diagnostics);
|
|
153
|
-
if (result.diagnostics.some((diagnostic) => diagnostic.level === 'error')) {
|
|
154
|
-
process.exitCode = 1;
|
|
155
|
-
return false;
|
|
156
|
-
}
|
|
157
|
-
htmlSource = out;
|
|
158
|
-
compiled = true;
|
|
159
|
-
console.log(`${chalk.bold('wrote')} ${out}`);
|
|
160
|
-
return true;
|
|
161
|
-
};
|
|
162
|
-
for (const format of formats) {
|
|
163
|
-
if (format === 'html') {
|
|
164
|
-
if (!(await compileOnce(opts.out || defaultOutFor(file, '.html'))))
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
// PDF renders from the compiled HTML; compile once, naming the
|
|
169
|
-
// intermediate so it is never a silent side effect.
|
|
170
|
-
if (!compiled && !isHtmlInput && !(await compileOnce(defaultOutFor(file, '.html'))))
|
|
171
|
-
return;
|
|
172
|
-
const out = opts.out || defaultOutFor(file, '.pdf');
|
|
173
|
-
await exportPdf(htmlSource, out, { layout: opts.layout });
|
|
174
|
-
console.log(`${chalk.bold('wrote')} ${out}`);
|
|
144
|
+
if (opts.layout !== undefined) {
|
|
145
|
+
throw new Error('render is HTML-only; --layout applies to PDF, which moved to `artifacts _pdf`.');
|
|
146
|
+
}
|
|
147
|
+
if (opts.format !== undefined) {
|
|
148
|
+
const formats = [...new Set(opts.format.split(',').map((format) => format.trim().toLowerCase()))].filter(Boolean);
|
|
149
|
+
if (!formats.length)
|
|
150
|
+
throw new Error('--format needs a value; render is HTML-only, so `--format html` or nothing.');
|
|
151
|
+
if (formats.some((format) => format !== 'html')) {
|
|
152
|
+
throw new Error('render is HTML-only; PDF moved to `artifacts _pdf`.');
|
|
175
153
|
}
|
|
154
|
+
console.error(`${chalk.yellow('warning')} --format is deprecated and ignored; render is HTML-only. It is removed in 0.4.0.`);
|
|
176
155
|
}
|
|
177
|
-
});
|
|
178
|
-
program
|
|
179
|
-
.command('preview')
|
|
180
|
-
.description('Render if needed and open the HTML.')
|
|
181
|
-
.argument('<file.md|file.html>')
|
|
182
|
-
.option('--out <file>', 'output HTML file')
|
|
183
|
-
.action(async (file, opts) => {
|
|
184
156
|
const out = opts.out || defaultOutFor(file, '.html');
|
|
185
157
|
const result = await compileArtifact(file, out);
|
|
186
158
|
printDiagnostics(result.diagnostics);
|
|
@@ -188,11 +160,15 @@ program
|
|
|
188
160
|
process.exitCode = 1;
|
|
189
161
|
return;
|
|
190
162
|
}
|
|
191
|
-
|
|
192
|
-
|
|
163
|
+
console.log(`${chalk.bold('wrote')} ${out}`);
|
|
164
|
+
if (opts.open) {
|
|
165
|
+
openPath(resolve(out));
|
|
166
|
+
console.log(`${chalk.bold('opened')} ${out}`);
|
|
167
|
+
}
|
|
193
168
|
});
|
|
194
169
|
program
|
|
195
|
-
.command('decompile')
|
|
170
|
+
.command('decompile', { hidden: true })
|
|
171
|
+
.alias('_decompile')
|
|
196
172
|
.description('Recover Markdown from HTML generated by artifacts render.')
|
|
197
173
|
.argument('<file.html>')
|
|
198
174
|
.requiredOption('--out <file>', 'output Markdown file')
|
|
@@ -203,13 +179,14 @@ program
|
|
|
203
179
|
console.log(`${chalk.bold('wrote')} ${opts.out}`);
|
|
204
180
|
});
|
|
205
181
|
program
|
|
206
|
-
.command('pdf')
|
|
207
|
-
.
|
|
182
|
+
.command('pdf', { hidden: true })
|
|
183
|
+
.alias('_pdf')
|
|
184
|
+
.description('Export through headless Chromium without opening the user browser.')
|
|
208
185
|
.argument('<file.md|file.html>')
|
|
209
186
|
.requiredOption('--out <file>', 'output PDF file')
|
|
210
187
|
.option('--layout <layout>', 'PDF layout: document or poster', parsePdfLayout, 'document')
|
|
211
188
|
.action(async (file, opts) => {
|
|
212
|
-
const outHtml = /\.md$/i.test(file) ?
|
|
189
|
+
const outHtml = /\.md$/i.test(file) ? defaultOutFor(file, '.html') : file;
|
|
213
190
|
if (/\.md$/i.test(file)) {
|
|
214
191
|
const result = await compileArtifact(file, outHtml);
|
|
215
192
|
printDiagnostics(result.diagnostics);
|
|
@@ -250,10 +227,6 @@ share.command('join').description('Use an existing share endpoint.')
|
|
|
250
227
|
share.command('status').description('Show configured share endpoint.').action(shareStatus);
|
|
251
228
|
share.command('analytics').description('Show Cloudflare Web Analytics dashboard link.').action(shareAnalytics);
|
|
252
229
|
share.command('delete').description('Delete a published artifact by URL or key.').argument('<url|key>').action(shareDelete);
|
|
253
|
-
program
|
|
254
|
-
.command('doctor')
|
|
255
|
-
.description('Check local artifact prerequisites.')
|
|
256
|
-
.action(() => runSetup({}));
|
|
257
230
|
program.parseAsync().catch((error) => {
|
|
258
231
|
console.error(`${chalk.red('error')} ${error instanceof Error ? error.message : String(error)}`);
|
|
259
232
|
process.exitCode = 1;
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAkB,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,WAAW,EAAqB,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEpH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,SAAS,gBAAgB,CAAC,WAAkF;IAC1G,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAA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C,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC5C,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EMBEDDED_ARTIFACT_CLASSES: readonly ["artifact-callout", "artifact-callout-danger", "artifact-callout-warn", "artifact-diagram", "artifact-figure", "artifact-figure-diagram", "artifact-figure-tall", "artifact-figure-wide", "artifact-grid", "artifact-grid-2", "artifact-grid-3", "artifact-image", "artifact-legend", "artifact-panel", "artifact-stat", "artifact-stat-label", "artifact-stat-value", "artifact-tag", "artifact-tag-accent"];
|
|
1
|
+
export declare const EMBEDDED_ARTIFACT_CLASSES: readonly ["artifact-behavior", "artifact-behavior-panel", "artifact-callout", "artifact-callout-danger", "artifact-callout-warn", "artifact-diagram", "artifact-figure", "artifact-figure-diagram", "artifact-figure-tall", "artifact-figure-wide", "artifact-grid", "artifact-grid-2", "artifact-grid-3", "artifact-image", "artifact-legend", "artifact-panel", "artifact-stat", "artifact-stat-label", "artifact-stat-value", "artifact-tag", "artifact-tag-accent", "code-diff", "code-diff-file", "code-diff-pre", "cd-line", "cd-sign", "cd-code", "cd-add", "cd-del", "cd-ctx", "cd-hunk", "cd-meta", "checklist", "checklist-head", "checklist-items", "cl-item", "cl-done", "cl-doing", "cl-todo", "cl-box", "cl-text"];
|
|
2
2
|
export interface EmbeddedHtmlIssue {
|
|
3
3
|
index: number;
|
|
4
4
|
message: string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Parser } from 'htmlparser2';
|
|
2
2
|
export const EMBEDDED_ARTIFACT_CLASSES = [
|
|
3
|
+
'artifact-behavior',
|
|
4
|
+
'artifact-behavior-panel',
|
|
3
5
|
'artifact-callout',
|
|
4
6
|
'artifact-callout-danger',
|
|
5
7
|
'artifact-callout-warn',
|
|
@@ -19,6 +21,26 @@ export const EMBEDDED_ARTIFACT_CLASSES = [
|
|
|
19
21
|
'artifact-stat-value',
|
|
20
22
|
'artifact-tag',
|
|
21
23
|
'artifact-tag-accent',
|
|
24
|
+
'code-diff',
|
|
25
|
+
'code-diff-file',
|
|
26
|
+
'code-diff-pre',
|
|
27
|
+
'cd-line',
|
|
28
|
+
'cd-sign',
|
|
29
|
+
'cd-code',
|
|
30
|
+
'cd-add',
|
|
31
|
+
'cd-del',
|
|
32
|
+
'cd-ctx',
|
|
33
|
+
'cd-hunk',
|
|
34
|
+
'cd-meta',
|
|
35
|
+
'checklist',
|
|
36
|
+
'checklist-head',
|
|
37
|
+
'checklist-items',
|
|
38
|
+
'cl-item',
|
|
39
|
+
'cl-done',
|
|
40
|
+
'cl-doing',
|
|
41
|
+
'cl-todo',
|
|
42
|
+
'cl-box',
|
|
43
|
+
'cl-text',
|
|
22
44
|
];
|
|
23
45
|
export const EMBEDDED_BLOCK_TAGS = ['svg', 'figure', 'section', 'article', 'aside', 'div', 'details'];
|
|
24
46
|
export const EMBEDDED_BLOCK_PATTERN = new RegExp(`<(?:${EMBEDDED_BLOCK_TAGS.join('|')})\\b`, 'i');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedded-html.js","sourceRoot":"","sources":["../../src/lib/embedded-html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,kBAAkB;IAClB,yBAAyB;IACzB,uBAAuB;IACvB,kBAAkB;IAClB,iBAAiB;IACjB,yBAAyB;IACzB,sBAAsB;IACtB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,qBAAqB;IACrB,qBAAqB;IACrB,cAAc;IACd,qBAAqB;
|
|
1
|
+
{"version":3,"file":"embedded-html.js","sourceRoot":"","sources":["../../src/lib/embedded-html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,mBAAmB;IACnB,yBAAyB;IACzB,kBAAkB;IAClB,yBAAyB;IACzB,uBAAuB;IACvB,kBAAkB;IAClB,iBAAiB;IACjB,yBAAyB;IACzB,sBAAsB;IACtB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,qBAAqB;IACrB,qBAAqB;IACrB,cAAc;IACd,qBAAqB;IACrB,WAAW;IACX,gBAAgB;IAChB,eAAe;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,iBAAiB;IACjB,SAAS;IACT,SAAS;IACT,UAAU;IACV,SAAS;IACT,QAAQ;IACR,SAAS;CACD,CAAC;AAOX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAU,CAAC;AAC/G,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,MAAM,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAElG,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAS,yBAAyB,CAAC,CAAC;AACpE,MAAM,+BAA+B,GAAG,IAAI,GAAG,CAAC;IAC9C,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAA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