code.fuzzyworld.net

auto-print / CI

CI passed: a32361d544d8

Branch main · commit · started 2026-10-27 14:27:22 UTC · 13s · runner truenas

✓ test · test · passed · 9s
fw-runner truenas: test (test) in node:22
$ curl -fsSL -o /tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/3.6.1/pandoc-3.6.1-1-amd64.deb
$ dpkg -i /tmp/pandoc.deb
Selecting previously unselected package pandoc.
(Reading database ... 23261 files and directories currently installed.)
Preparing to unpack /tmp/pandoc.deb ...
Unpacking pandoc (3.6.1-1) ...
Setting up pandoc (3.6.1-1) ...
$ pandoc --version | head -1
pandoc 3.6.1
$ npm ci

> auto-print@0.1.0 prepare
> npm run build


> auto-print@0.1.0 build
> tsc -p tsconfig.build.json


added 4 packages, and audited 5 packages in 2s

found 0 vulnerabilities
$ npm run typecheck

> auto-print@0.1.0 typecheck
> tsc

$ npm test

> auto-print@0.1.0 test
> node --test "test/**/*.test.ts"

TAP version 13
# Subtest: loadConfig
    # Subtest: resolves paths against the config file's folder and fills in the defaults
    ok 1 - resolves paths against the config file's folder and fills in the defaults
      ---
      duration_ms: 2.890799
      type: 'test'
      ...
    # Subtest: puts the output next to the config file by default, and lets a book override the defaults
    ok 2 - puts the output next to the config file by default, and lets a book override the defaults
      ---
      duration_ms: 0.61082
      type: 'test'
      ...
    # Subtest: explains what is wrong
    ok 3 - explains what is wrong
      ---
      duration_ms: 2.824599
      type: 'test'
      ...
    1..3
ok 1 - loadConfig
  ---
  duration_ms: 7.73564
  type: 'suite'
  ...
# Subtest: findHeadings
    # Subtest: finds headings and skips fenced code blocks
    ok 1 - finds headings and skips fenced code blocks
      ---
      duration_ms: 1.75458
      type: 'test'
      ...
    1..1
ok 2 - findHeadings
  ---
  duration_ms: 2.844706
  type: 'suite'
  ...
# Subtest: findSection
    # Subtest: picks the shallowest heading when a name is used at several levels
    ok 1 - picks the shallowest heading when a name is used at several levels
      ---
      duration_ms: 0.503977
      type: 'test'
      ...
    # Subtest: returns null for a missing heading
    ok 2 - returns null for a missing heading
      ---
      duration_ms: 0.220421
      type: 'test'
      ...
    # Subtest: fails when a name is used twice at the same level
    ok 3 - fails when a name is used twice at the same level
      ---
      duration_ms: 0.531152
      type: 'test'
      ...
    1..3
ok 3 - findSection
  ---
  duration_ms: 2.620042
  type: 'suite'
  ...
# Subtest: shiftHeadings
    # Subtest: moves headings down and up
    ok 1 - moves headings down and up
      ---
      duration_ms: 0.409018
      type: 'test'
      ...
    1..1
ok 4 - shiftHeadings
  ---
  duration_ms: 0.561246
  type: 'suite'
  ...
# Subtest: extractStory
    # Subtest: takes the Writing section, removes comments and promotes the headings
    ok 1 - takes the Writing section, removes comments and promotes the headings
      ---
      duration_ms: 0.580352
      type: 'test'
      ...
    # Subtest: takes the whole file without its title when the section is null
    ok 2 - takes the whole file without its title when the section is null
      ---
      duration_ms: 0.242811
      type: 'test'
      ...
    # Subtest: names the headings it found when the section is missing
    ok 3 - names the headings it found when the section is missing
      ---
      duration_ms: 0.257105
      type: 'test'
      ...
    # Subtest: fails on an empty story
    ok 4 - fails on an empty story
      ---
      duration_ms: 0.305859
      type: 'test'
      ...
    1..4
ok 5 - extractStory
  ---
  duration_ms: 2.004772
  type: 'suite'
  ...
# Subtest: moveOpeningBelowTitle
    # Subtest: moves a content warning below the story title
    ok 1 - moves a content warning below the story title
      ---
      duration_ms: 0.359795
      type: 'test'
      ...
    # Subtest: leaves a story that starts with its title alone
    ok 2 - leaves a story that starts with its title alone
      ---
      duration_ms: 0.127778
      type: 'test'
      ...
    1..2
ok 6 - moveOpeningBelowTitle
  ---
  duration_ms: 0.628462
  type: 'suite'
  ...
# Subtest: readStory
    # Subtest: follows the links in the Writing section, in order, and skips commented-out links
    ok 1 - follows the links in the Writing section, in order, and skips commented-out links
      ---
      duration_ms: 1.361966
      type: 'test'
      ...
    # Subtest: returns a story without links as it is
    ok 2 - returns a story without links as it is
      ---
      duration_ms: 0.337871
      type: 'test'
      ...
    1..2
ok 7 - readStory
  ---
  duration_ms: 1.835237
  type: 'suite'
  ...
# Subtest: readExtraPages
    # Subtest: reads front pages with their roles
    ok 1 - reads front pages with their roles
      ---
      duration_ms: 0.526275
      type: 'test'
      ...
    # Subtest: reads back pages as appendices, with the public section and not the notes
    ok 2 - reads back pages as appendices, with the public section and not the notes
      ---
      duration_ms: 0.30001
      type: 'test'
      ...
    # Subtest: fails on a name that is not in the file
    ok 3 - fails on a name that is not in the file
      ---
      duration_ms: 0.252662
      type: 'test'
      ...
    1..3
ok 8 - readExtraPages
  ---
  duration_ms: 1.244152
  type: 'suite'
  ...
# Subtest: assemble
    # Subtest: returns the story unchanged when there are no extra pages
    ok 1 - returns the story unchanged when there are no extra pages
      ---
      duration_ms: 0.383451
      type: 'test'
      ...
    # Subtest: puts a flowing epub under one heading with the book title
    ok 2 - puts a flowing epub under one heading with the book title
      ---
      duration_ms: 0.149419
      type: 'test'
      ...
    # Subtest: gives each extra page its own level 1 heading in the epub
    ok 3 - gives each extra page its own level 1 heading in the epub
      ---
      duration_ms: 0.265726
      type: 'test'
      ...
    # Subtest: puts page breaks before the extra pages and the story in the docx, and leaves out a hidden heading
    ok 4 - puts page breaks before the extra pages and the story in the docx, and leaves out a hidden heading
      ---
      duration_ms: 0.19603
      type: 'test'
      ...
    # Subtest: uses a div as the page break in html
    ok 5 - uses a div as the page break in html
      ---
      duration_ms: 0.134892
      type: 'test'
      ...
    1..5
ok 9 - assemble
  ---
  duration_ms: 1.365166
  type: 'suite'
  ...
# Subtest: pandoc
    # Subtest: joins sentences on separate lines into one paragraph, like a paragraph on one line
    ok 1 - joins sentences on separate lines into one paragraph, like a paragraph on one line
      ---
      duration_ms: 28.239014
      type: 'test'
      ...
    # Subtest: reads braces in prose as text
    ok 2 - reads braces in prose as text
      ---
      duration_ms: 12.742301
      type: 'test'
      ...
    # Subtest: marks the extra pages of the epub as level 1 headings with their roles
    ok 3 - marks the extra pages of the epub as level 1 headings with their roles
      ---
      duration_ms: 26.309497
      type: 'test'
      ...
    # Subtest: keeps the stories as level 2 headings in a flowing epub, and level 1 with chapter breaks
    ok 4 - keeps the stories as level 2 headings in a flowing epub, and level 1 with chapter breaks
      ---
      duration_ms: 46.7243
      type: 'test'
      ...
    # Subtest: wraps the dedication in a div with the Dedication style
    ok 5 - wraps the dedication in a div with the Dedication style
      ---
      duration_ms: 23.421
      type: 'test'
      ...
    # Subtest: puts a page break before each extra page and before the story in the docx
    ok 6 - puts a page break before each extra page and before the story in the docx
      ---
      duration_ms: 24.090233
      type: 'test'
      ...
    1..6
ok 10 - pandoc
  ---
  duration_ms: 163.442133
  type: 'suite'
  ...
1..10
# tests 30
# suites 10
# pass 30
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 370.603091
$ npm run build

> auto-print@0.1.0 build
> tsc -p tsconfig.build.json