@vivliostyle/cli 9.0.0-next.5 → 9.0.0-next.7

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/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import * as vite from 'vite';
2
- import { ResolvedConfig, UserConfig } from 'vite';
3
- import { StructuredDocument, StructuredDocumentSection, InputFormat, BrowserType, ParsedVivliostyleInlineConfig, VivliostyleInlineConfig } from './config/schema.js';
4
- export { VivliostyleConfigSchema } from './config/schema.js';
2
+ import { VivliostyleInlineConfig } from './config/schema.js';
3
+ export { StructuredDocument, StructuredDocumentSection, VivliostyleConfigSchema } from './config/schema.js';
5
4
  export { createVitePlugin } from './vite-adapter.js';
6
- import { StringifyMarkdownOptions, Metadata } from '@vivliostyle/vfm';
7
- import { Processor } from 'unified';
5
+ import '@vivliostyle/vfm';
6
+ import 'unified';
8
7
  import 'valibot';
9
8
 
10
9
  /**
@@ -111,216 +110,8 @@ interface PublicationLinks {
111
110
  [k: string]: unknown;
112
111
  }
113
112
 
114
- type ParsedTheme = UriTheme | FileTheme | PackageTheme;
115
- interface UriTheme {
116
- type: 'uri';
117
- name: string;
118
- location: string;
119
- }
120
- interface FileTheme {
121
- type: 'file';
122
- name: string;
123
- source: string;
124
- location: string;
125
- }
126
- interface PackageTheme {
127
- type: 'package';
128
- name: string;
129
- specifier: string;
130
- location: string;
131
- importPath?: string | string[];
132
- }
133
- type EntrySource = FileEntrySource | UriEntrySource;
134
- interface FileEntrySource {
135
- type: 'file';
136
- pathname: string;
137
- contentType: ManuscriptMediaType;
138
- }
139
- interface UriEntrySource {
140
- type: 'uri';
141
- href: string;
142
- rootDir: string;
143
- }
144
- declare const manuscriptMediaTypes: readonly ["text/markdown", "text/html", "application/xhtml+xml"];
145
- type ManuscriptMediaType = (typeof manuscriptMediaTypes)[number];
146
- interface ManuscriptEntry {
147
- contentType: ManuscriptMediaType;
148
- title?: string;
149
- themes: ParsedTheme[];
150
- source: EntrySource;
151
- template?: undefined;
152
- target: string;
153
- rel?: string | string[];
154
- }
155
- interface ContentsEntry {
156
- rel: 'contents';
157
- title?: string;
158
- themes: ParsedTheme[];
159
- source?: undefined;
160
- template?: EntrySource;
161
- target: string;
162
- tocTitle: string;
163
- sectionDepth: number;
164
- transform: {
165
- transformDocumentList: ((nodeList: StructuredDocument[]) => (propsList: {
166
- children: any;
167
- }[]) => any) | undefined;
168
- transformSectionList: ((nodeList: StructuredDocumentSection[]) => (propsList: {
169
- children: any;
170
- }[]) => any) | undefined;
171
- };
172
- pageBreakBefore?: 'left' | 'right' | 'recto' | 'verso';
173
- pageCounterReset?: number;
174
- }
175
- interface CoverEntry {
176
- rel: 'cover';
177
- title?: string;
178
- themes: ParsedTheme[];
179
- source?: undefined;
180
- template?: EntrySource;
181
- target: string;
182
- coverImageSrc: string;
183
- coverImageAlt: string;
184
- pageBreakBefore?: 'left' | 'right' | 'recto' | 'verso';
185
- }
186
- type ParsedEntry = ManuscriptEntry | ContentsEntry | CoverEntry;
187
- interface WebPublicationManifestConfig {
188
- type: 'webpub';
189
- manifestPath: string;
190
- needToGenerateManifest: boolean;
191
- }
192
- interface EpubEntryConfig {
193
- type: 'epub';
194
- epubPath: string;
195
- epubTmpOutputDir: string;
196
- }
197
- interface EpubOpfEntryConfig {
198
- type: 'epub-opf';
199
- epubOpfPath: string;
200
- }
201
- interface WebBookEntryConfig {
202
- type: 'webbook';
203
- webbookEntryUrl: string;
204
- webbookPath: string | undefined;
205
- }
206
- type ViewerInputConfig = WebPublicationManifestConfig | EpubEntryConfig | EpubOpfEntryConfig | WebBookEntryConfig;
207
- interface PdfOutput {
208
- format: 'pdf';
209
- path: string;
210
- renderMode: 'local' | 'docker';
211
- preflight: 'press-ready' | 'press-ready-local' | undefined;
212
- preflightOption: string[];
213
- }
214
- interface WebPublicationOutput {
215
- format: 'webpub';
216
- path: string;
217
- }
218
- interface EpubOutput {
219
- format: 'epub';
220
- path: string;
221
- version: '3.0';
222
- }
223
- type OutputConfig = PdfOutput | WebPublicationOutput | EpubOutput;
224
- type PageSize = {
225
- format: string;
226
- } | {
227
- width: string;
228
- height: string;
229
- };
230
- type DocumentProcessorFactory = (options: StringifyMarkdownOptions, metadata: Metadata) => Processor;
231
- type ResolvedTaskConfig = {
232
- context: string;
233
- entryContextDir: string;
234
- workspaceDir: string;
235
- themesDir: string;
236
- entries: ParsedEntry[];
237
- input: {
238
- format: InputFormat;
239
- entry: string;
240
- };
241
- viewerInput: ViewerInputConfig;
242
- outputs: OutputConfig[];
243
- themeIndexes: Set<ParsedTheme>;
244
- copyAsset: {
245
- includes: string[];
246
- excludes: string[];
247
- fileExtensions: string[];
248
- };
249
- exportAliases: {
250
- source: string;
251
- target: string;
252
- }[];
253
- temporaryFilePrefix: string;
254
- size: PageSize | undefined;
255
- cropMarks: boolean;
256
- bleed: string | undefined;
257
- cropOffset: string | undefined;
258
- css: string | undefined;
259
- customStyle: string | undefined;
260
- customUserStyle: string | undefined;
261
- singleDoc: boolean;
262
- quick: boolean;
263
- title: string | undefined;
264
- author: string | undefined;
265
- language: string | undefined;
266
- readingProgression: 'ltr' | 'rtl' | undefined;
267
- documentProcessorFactory: DocumentProcessorFactory;
268
- vfmOptions: {
269
- hardLineBreaks: boolean;
270
- disableFormatHtml: boolean;
271
- };
272
- cover: {
273
- src: string;
274
- name: string;
275
- } | undefined;
276
- timeout: number;
277
- sandbox: boolean;
278
- browser: {
279
- type: BrowserType;
280
- executablePath: string | undefined;
281
- };
282
- proxy: {
283
- server: string;
284
- bypass: string | undefined;
285
- username: string | undefined;
286
- password: string | undefined;
287
- } | undefined;
288
- image: string;
289
- viewer: string | undefined;
290
- viewerParam: string | undefined;
291
- logLevel: 'silent' | 'info' | 'verbose' | 'debug';
292
- ignoreHttpsErrors: boolean;
293
- base: string;
294
- server: Required<Pick<ResolvedConfig['server'], 'host' | 'port' | 'proxy'>>;
295
- static: Record<string, string[]>;
296
- rootUrl: string;
297
- viteConfig: UserConfig | undefined;
298
- viteConfigFile: string | boolean;
299
- };
300
-
301
- declare function vsBrowserPlugin({ config: _config, inlineConfig, }: {
302
- config: ResolvedTaskConfig;
303
- inlineConfig: ParsedVivliostyleInlineConfig;
304
- }): vite.Plugin;
305
-
306
- declare function vsDevServerPlugin({ config: _config, inlineConfig, }: {
307
- config: ResolvedTaskConfig;
308
- inlineConfig: ParsedVivliostyleInlineConfig;
309
- }): vite.Plugin;
310
-
311
- declare function vsStaticServePlugin({ config: _config, inlineConfig, }: {
312
- config: ResolvedTaskConfig;
313
- inlineConfig: ParsedVivliostyleInlineConfig;
314
- }): vite.Plugin;
315
-
316
- declare function vsViewerPlugin(_?: {
317
- config: ResolvedTaskConfig;
318
- inlineConfig: ParsedVivliostyleInlineConfig;
319
- }): vite.Plugin;
320
-
321
113
  /** @hidden */
322
114
  type PublicationManifest = PublicationManifest$1;
323
-
324
115
  /**
325
116
  * Build publication file(s) from the given configuration.
326
117
  *
@@ -351,4 +142,4 @@ declare function init(options: VivliostyleInlineConfig): Promise<void>;
351
142
  */
352
143
  declare function preview(options: VivliostyleInlineConfig): Promise<vite.ViteDevServer>;
353
144
 
354
- export { type PublicationManifest, StructuredDocument, StructuredDocumentSection, build, init, preview, vsBrowserPlugin, vsDevServerPlugin, vsStaticServePlugin, vsViewerPlugin };
145
+ export { type PublicationManifest, build, init, preview };
package/dist/index.js CHANGED
@@ -1,22 +1,17 @@
1
1
  import {
2
2
  createVitePlugin
3
- } from "./chunk-BPSQMFSC.js";
3
+ } from "./chunk-KBYCGWN5.js";
4
4
  import {
5
5
  build
6
- } from "./chunk-UQHNZL7X.js";
6
+ } from "./chunk-NABNSSUR.js";
7
7
  import {
8
8
  init
9
- } from "./chunk-6ETFX7W2.js";
9
+ } from "./chunk-YXEC5ZRK.js";
10
10
  import {
11
11
  preview
12
- } from "./chunk-BT47BDZK.js";
13
- import "./chunk-4ZNBH6IA.js";
14
- import {
15
- vsBrowserPlugin,
16
- vsDevServerPlugin,
17
- vsStaticServePlugin,
18
- vsViewerPlugin
19
- } from "./chunk-SPYTZBBG.js";
12
+ } from "./chunk-LGWCIQSL.js";
13
+ import "./chunk-NWDF2NRZ.js";
14
+ import "./chunk-KJ2TDIM3.js";
20
15
  import "./chunk-EX7EA34F.js";
21
16
  import "./chunk-WX6JHPSL.js";
22
17
  import {
@@ -42,9 +37,5 @@ export {
42
37
  build2 as build,
43
38
  createVitePlugin,
44
39
  init2 as init,
45
- preview2 as preview,
46
- vsBrowserPlugin,
47
- vsDevServerPlugin,
48
- vsStaticServePlugin,
49
- vsViewerPlugin
40
+ preview2 as preview
50
41
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createVitePlugin
3
- } from "./chunk-BPSQMFSC.js";
4
- import "./chunk-SPYTZBBG.js";
3
+ } from "./chunk-KBYCGWN5.js";
4
+ import "./chunk-KJ2TDIM3.js";
5
5
  import "./chunk-EX7EA34F.js";
6
6
  import "./chunk-WX6JHPSL.js";
7
7
  import "./chunk-DMARNPN5.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vivliostyle/cli",
3
3
  "description": "Save the pdf file via headless browser and Vivliostyle.",
4
- "version": "9.0.0-next.5",
4
+ "version": "9.0.0-next.7",
5
5
  "author": "spring_raining <harusamex.com@gmail.com>",
6
6
  "type": "module",
7
7
  "scripts": {
@@ -22,90 +22,90 @@
22
22
  "vite": ">=6"
23
23
  },
24
24
  "dependencies": {
25
- "@babel/code-frame": "^7.24.7",
26
- "@humanwhocodes/momoa": "^3.2.1",
27
- "@napi-rs/canvas": "0.1.41",
28
- "@npmcli/arborist": "^7.5.4",
25
+ "@babel/code-frame": "7.26.2",
26
+ "@humanwhocodes/momoa": "3.3.8",
27
+ "@napi-rs/canvas": "0.1.69",
28
+ "@npmcli/arborist": "8.0.0",
29
29
  "@vivliostyle/jsdom": "25.0.1-vivliostyle-cli.1",
30
30
  "@vivliostyle/vfm": "2.2.1",
31
- "@vivliostyle/viewer": "2.30.7",
32
- "ajv": "^8.11.2",
33
- "ajv-formats": "^2.1.1",
34
- "archiver": "^5.3.1",
35
- "bcp-47-match": "^2.0.3",
31
+ "@vivliostyle/viewer": "2.31.2",
32
+ "ajv": "8.17.1",
33
+ "ajv-formats": "3.0.1",
34
+ "archiver": "7.0.1",
35
+ "bcp-47-match": "2.0.3",
36
36
  "command-exists": "1.2.9",
37
- "commander": "^12.1.0",
38
- "debug": "^4.3.2",
39
- "decamelize": "5.0.0",
40
- "dompurify": "^3.1.2",
41
- "escape-string-regexp": "^5.0.0",
42
- "execa": "^9.5.2",
43
- "fast-xml-parser": "^4.2.4",
44
- "fs-extra": "^11.1.1",
45
- "github-slugger": "^2.0.0",
46
- "hast-util-to-html": "^9.0.1",
47
- "hastscript": "^9.0.0",
48
- "mime-types": "^2.1.32",
49
- "node-stream-zip": "^1.14.0",
50
- "npm-package-arg": "^11.0.2",
51
- "pdf-lib": "^1.16.0",
52
- "picomatch": "^4.0.2",
53
- "playwright-core": "1.49.0",
54
- "press-ready": "^4.0.3",
55
- "prettier": "^3.3.3",
56
- "resolve-pkg": "^2.0.0",
57
- "sirv": "^3.0.0",
58
- "terminal-link": "^2.1.1",
59
- "tinyglobby": "^0.2.10",
60
- "tmp": "^0.2.1",
61
- "upath": "^2.0.1",
62
- "uuid": "^8.3.2",
63
- "valibot": "^0.42.1",
64
- "vfile": "^4.2.1",
65
- "w3c-xmlserializer": "^4.0.0",
66
- "whatwg-mimetype": "^3.0.0",
67
- "yocto-spinner": "^0.1.2",
68
- "yoctocolors": "^2.1.1"
37
+ "commander": "13.1.0",
38
+ "debug": "4.4.0",
39
+ "decamelize": "6.0.0",
40
+ "dompurify": "3.2.5",
41
+ "escape-string-regexp": "5.0.0",
42
+ "execa": "9.5.2",
43
+ "fast-xml-parser": "5.2.1",
44
+ "fs-extra": "11.2.0",
45
+ "github-slugger": "2.0.0",
46
+ "hast-util-to-html": "9.0.5",
47
+ "hastscript": "9.0.1",
48
+ "mime-types": "3.0.1",
49
+ "node-stream-zip": "1.15.0",
50
+ "npm-package-arg": "12.0.2",
51
+ "pdf-lib": "1.17.1",
52
+ "picomatch": "4.0.2",
53
+ "playwright-core": "1.51.1",
54
+ "press-ready": "4.0.3",
55
+ "prettier": "3.5.3",
56
+ "resolve-pkg": "2.0.0",
57
+ "sirv": "3.0.1",
58
+ "terminal-link": "4.0.0",
59
+ "tinyglobby": "0.2.13",
60
+ "tmp": "0.2.3",
61
+ "upath": "2.0.1",
62
+ "uuid": "11.1.0",
63
+ "valibot": "1.0.0",
64
+ "vfile": "4.2.1",
65
+ "w3c-xmlserializer": "5.0.0",
66
+ "whatwg-mimetype": "4.0.0",
67
+ "yocto-spinner": "0.2.2",
68
+ "yoctocolors": "2.1.1"
69
69
  },
70
70
  "devDependencies": {
71
- "@release-it/conventional-changelog": "^5.1.1",
72
- "@types/adm-zip": "^0.5.5",
73
- "@types/archiver": "^5.3.2",
74
- "@types/babel__code-frame": "^7.0.6",
75
- "@types/command-exists": "1.2.0",
76
- "@types/connect": "^3.4.38",
77
- "@types/debug": "^4.1.7",
78
- "@types/dompurify": "^3.0.5",
79
- "@types/fs-extra": "^11.0.1",
80
- "@types/jsdom": "^21.1.1",
81
- "@types/mime-types": "^2.1.1",
82
- "@types/node": "^22.5.4",
83
- "@types/npm-package-arg": "^6.1.4",
84
- "@types/npmcli__arborist": "^6.3.0",
85
- "@types/picomatch": "^3.0.1",
86
- "@types/supertest": "^6.0.2",
87
- "@types/tmp": "^0.2.1",
88
- "@types/uuid": "^8.3.1",
89
- "@types/w3c-xmlserializer": "^2.0.2",
90
- "@types/whatwg-mimetype": "^3.0.0",
91
- "@vitest/coverage-v8": "^2.1.8",
92
- "adm-zip": "^0.5.10",
93
- "file-type": "^16.5.3",
94
- "husky": "^9.1.6",
95
- "json-schema-to-typescript": "^15.0.2",
96
- "memfs": "^4.2.0",
97
- "npm-run-all": "^4.1.5",
98
- "pretty-quick": "^4.0.0",
99
- "release-it": "^15.6.0",
100
- "shx": "^0.3.3",
101
- "supertest": "^7.0.0",
102
- "tsup": "^8.3.6",
103
- "tsx": "^4.19.2",
104
- "typedoc": "^0.26.7",
105
- "typedoc-plugin-markdown": "^4.2.9",
106
- "typescript": "^5.5.4",
107
- "vite": "6.0.3",
108
- "vitest": "^2.1.8"
71
+ "@release-it/conventional-changelog": "9.0.4",
72
+ "@types/adm-zip": "0.5.7",
73
+ "@types/archiver": "6.0.3",
74
+ "@types/babel__code-frame": "7.0.6",
75
+ "@types/command-exists": "1.2.3",
76
+ "@types/connect": "3.4.38",
77
+ "@types/debug": "4.1.12",
78
+ "@types/dompurify": "3.2.0",
79
+ "@types/fs-extra": "11.0.4",
80
+ "@types/jsdom": "21.1.7",
81
+ "@types/mime-types": "2.1.4",
82
+ "@types/node": "22.15.2",
83
+ "@types/npm-package-arg": "6.1.4",
84
+ "@types/npmcli__arborist": "6.3.0",
85
+ "@types/picomatch": "4.0.0",
86
+ "@types/supertest": "6.0.3",
87
+ "@types/tmp": "0.2.6",
88
+ "@types/uuid": "10.0.0",
89
+ "@types/w3c-xmlserializer": "2.0.4",
90
+ "@types/whatwg-mimetype": "3.0.2",
91
+ "@vitest/coverage-v8": "3.1.2",
92
+ "adm-zip": "0.5.16",
93
+ "file-type": "20.5.0",
94
+ "husky": "9.1.7",
95
+ "json-schema-to-typescript": "15.0.4",
96
+ "memfs": "4.17.0",
97
+ "npm-run-all": "4.1.5",
98
+ "pretty-quick": "4.1.1",
99
+ "release-it": "17.11.0",
100
+ "shx": "0.4.0",
101
+ "supertest": "7.1.0",
102
+ "tsup": "8.4.0",
103
+ "tsx": "4.19.3",
104
+ "typedoc": "^0.28.3",
105
+ "typedoc-plugin-markdown": "4.6.3",
106
+ "typescript": "5.8.3",
107
+ "vite": "6.3.3",
108
+ "vitest": "3.1.2"
109
109
  },
110
110
  "main": "dist/index.js",
111
111
  "module": "dist/index.js",