@vivliostyle/cli 9.0.0-next.7 → 9.0.0
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/README.md +34 -48
- package/dist/{chunk-NWDF2NRZ.js → chunk-4Y2QIRBA.js} +1 -1
- package/dist/{chunk-NABNSSUR.js → chunk-5AUWIYEK.js} +8 -10
- package/dist/{chunk-KBYCGWN5.js → chunk-FQMQ7BWY.js} +1 -1
- package/dist/{chunk-KJ2TDIM3.js → chunk-PY4J4NG6.js} +21 -18
- package/dist/{chunk-LGWCIQSL.js → chunk-QZWMJ4L2.js} +2 -2
- package/dist/{chunk-YXEC5ZRK.js → chunk-XRR6RKA6.js} +1 -1
- package/dist/commands/build.js +7 -4
- package/dist/commands/init.js +2 -2
- package/dist/commands/preview.js +7 -4
- package/dist/config/schema.d.ts +1653 -1653
- package/dist/index.js +6 -6
- package/dist/vite-adapter.js +2 -2
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -49,8 +49,7 @@ Options:
|
|
|
49
49
|
-l, --language <language> language
|
|
50
50
|
-s, --size <size> paper size
|
|
51
51
|
-T, --theme <theme> theme
|
|
52
|
-
--log-level <level> specify a log level of console outputs (choices: "silent", "info",
|
|
53
|
-
"verbose", "debug", default: "info")
|
|
52
|
+
--log-level <level> specify a log level of console outputs (choices: "silent", "info", "verbose", "debug", default: "info")
|
|
54
53
|
-h, --help display help for command
|
|
55
54
|
```
|
|
56
55
|
|
|
@@ -64,28 +63,22 @@ Put [vivliostyle.config.js](https://github.com/vivliostyle/create-book/blob/mast
|
|
|
64
63
|
vivliostyle build
|
|
65
64
|
```
|
|
66
65
|
|
|
67
|
-

|
|
68
|
-
|
|
69
66
|
#### CLI options
|
|
70
67
|
|
|
71
68
|
```
|
|
72
69
|
Options:
|
|
73
70
|
-c, --config <config_file> path to vivliostyle.config.js [vivliostyle.config.js]
|
|
74
71
|
-o, --output <path> specify output file name or directory [<title>.pdf]
|
|
75
|
-
This option can be specified multiple, then each -o options can
|
|
76
|
-
be supplied one -f option.
|
|
72
|
+
This option can be specified multiple, then each -o options can be supplied one -f option.
|
|
77
73
|
ex: -o output1 -f webpub -o output2.pdf -f pdf
|
|
78
74
|
-f, --format <format> specify output format corresponding output target
|
|
79
|
-
If an extension is specified on -o option, this field will be
|
|
80
|
-
inferenced automatically.
|
|
75
|
+
If an extension is specified on -o option, this field will be inferenced automatically.
|
|
81
76
|
-s, --size <size> output pdf size
|
|
82
|
-
preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal,
|
|
83
|
-
ledger
|
|
77
|
+
preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal, ledger
|
|
84
78
|
custom(comma separated): 182mm,257mm or 8.5in,11in
|
|
85
79
|
-m, --crop-marks print crop marks
|
|
86
80
|
--bleed <bleed> extent of the bleed area for printing with crop marks [3mm]
|
|
87
|
-
--crop-offset <offset> distance between the edge of the trim size and the edge of the
|
|
88
|
-
media size. [auto (13mm + bleed)]
|
|
81
|
+
--crop-offset <offset> distance between the edge of the trim size and the edge of the media size. [auto (13mm + bleed)]
|
|
89
82
|
--css <CSS> custom style CSS code. (ex: ":root {--my-color: lime;}")
|
|
90
83
|
--style <stylesheet> additional stylesheet URL or path
|
|
91
84
|
--user-style <user_stylesheet> user stylesheet URL or path
|
|
@@ -93,36 +86,32 @@ Options:
|
|
|
93
86
|
-p, --press-ready make generated PDF compatible with press ready PDF/X-1a [false]
|
|
94
87
|
This option is equivalent with "--preflight press-ready"
|
|
95
88
|
-t, --timeout <seconds> timeout limit for waiting Vivliostyle process [120]
|
|
96
|
-
-T, --theme <theme
|
|
89
|
+
-T, --theme <theme...> theme path or package name
|
|
97
90
|
--title <title> title
|
|
98
91
|
--author <author> author
|
|
99
92
|
-l, --language <language> language
|
|
100
93
|
--reading-progression <direction> Direction of reading progression (choices: "ltr", "rtl")
|
|
101
|
-
--render-mode <mode> if docker is set, Vivliostyle try to render PDF on Docker
|
|
102
|
-
|
|
103
|
-
--preflight <mode> apply the process to generate PDF for printing (choices:
|
|
104
|
-
"press-ready", "press-ready-local")
|
|
94
|
+
--render-mode <mode> if docker is set, Vivliostyle try to render PDF on Docker container [local] (choices: "local", "docker")
|
|
95
|
+
--preflight <mode> apply the process to generate PDF for printing (choices: "press-ready", "press-ready-local")
|
|
105
96
|
--preflight-option <options...> options for preflight process (ex: gray-scale, enforce-outline)
|
|
106
|
-
Please refer the document of press-ready for further
|
|
107
|
-
information.
|
|
97
|
+
Please refer the document of press-ready for further information.
|
|
108
98
|
https://github.com/vibranthq/press-ready
|
|
109
99
|
--executable-browser <path> specify a path of executable browser you installed
|
|
110
100
|
--image <image> specify a docker image to render
|
|
111
|
-
--
|
|
112
|
-
It is useful that
|
|
113
|
-
--viewer <
|
|
114
|
-
one
|
|
115
|
-
It is useful that using own viewer that has staging features.
|
|
116
|
-
(ex: https://vivliostyle.vercel.app/)
|
|
117
|
-
--viewer-param <parameters> specify viewer parameters. (ex:
|
|
118
|
-
"allowScripts=false&pixelRatio=16")
|
|
101
|
+
--viewer <URL> specify a URL of displaying viewer instead of vivliostyle-cli's one
|
|
102
|
+
It is useful that using own viewer that has staging features. (ex: https://vivliostyle.vercel.app/)
|
|
103
|
+
--viewer-param <parameters> specify viewer parameters. (ex: "allowScripts=false&pixelRatio=16")
|
|
119
104
|
--proxy-server <proxyServer> HTTP/SOCK proxy server url for underlying Playwright
|
|
120
105
|
--proxy-bypass <proxyBypass> optional comma-separated domains to bypass proxy
|
|
121
106
|
--proxy-user <proxyUser> optional username for HTTP proxy authentication
|
|
122
107
|
--proxy-pass <proxyPass> optional password for HTTP proxy authentication
|
|
123
|
-
--log-level <level> specify a log level of console outputs (choices: "silent",
|
|
124
|
-
"info", "verbose", "debug", default: "info")
|
|
108
|
+
--log-level <level> specify a log level of console outputs (choices: "silent", "info", "verbose", "debug", default: "info")
|
|
125
109
|
--ignore-https-errors true to ignore HTTPS errors when Playwright browser opens a new page
|
|
110
|
+
--host <host> IP address the server should listen on
|
|
111
|
+
--port <port> port the server should listen on
|
|
112
|
+
--no-enable-static-serve disable static file serving
|
|
113
|
+
--vite-config-file <path> Vite config file path
|
|
114
|
+
--no-vite-config-file ignore Vite config file even if it exists
|
|
126
115
|
-h, --help display help for command
|
|
127
116
|
```
|
|
128
117
|
|
|
@@ -139,15 +128,13 @@ vivliostyle preview
|
|
|
139
128
|
```
|
|
140
129
|
Options:
|
|
141
130
|
-c, --config <config_file> path to vivliostyle.config.js
|
|
142
|
-
-T, --theme <theme
|
|
131
|
+
-T, --theme <theme...> theme path or package name
|
|
143
132
|
-s, --size <size> output pdf size
|
|
144
|
-
preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal,
|
|
145
|
-
ledger
|
|
133
|
+
preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal, ledger
|
|
146
134
|
custom(comma separated): 182mm,257mm or 8.5in,11in
|
|
147
135
|
-m, --crop-marks print crop marks
|
|
148
136
|
--bleed <bleed> extent of the bleed area for printing with crop marks [3mm]
|
|
149
|
-
--crop-offset <offset> distance between the edge of the trim size and the edge of the
|
|
150
|
-
media size. [auto (13mm + bleed)]
|
|
137
|
+
--crop-offset <offset> distance between the edge of the trim size and the edge of the media size. [auto (13mm + bleed)]
|
|
151
138
|
--css <CSS> custom style CSS code. (ex: ":root {--my-color: lime;}")
|
|
152
139
|
--style <stylesheet> additional stylesheet URL or path
|
|
153
140
|
--user-style <user_stylesheet> user stylesheet URL or path
|
|
@@ -158,25 +145,24 @@ Options:
|
|
|
158
145
|
-l, --language <language> language
|
|
159
146
|
--reading-progression <direction> Direction of reading progression (choices: "ltr", "rtl")
|
|
160
147
|
--executable-browser <path> specify a path of executable browser you installed
|
|
161
|
-
--
|
|
162
|
-
It is useful that
|
|
163
|
-
--viewer <
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
(ex: https://vivliostyle.vercel.app/)
|
|
167
|
-
--viewer-param <parameters> specify viewer parameters. (ex:
|
|
168
|
-
"allowScripts=false&pixelRatio=16")
|
|
169
|
-
--browser <browser> EXPERIMENTAL SUPPORT: Specify a browser type to launch
|
|
170
|
-
Vivliostyle viewer [chromium]
|
|
171
|
-
Currently, Firefox and Webkit support preview command only!
|
|
172
|
-
(choices: "chromium", "firefox", "webkit")
|
|
148
|
+
--viewer <URL> specify a URL of displaying viewer instead of vivliostyle-cli's one
|
|
149
|
+
It is useful that using own viewer that has staging features. (ex: https://vivliostyle.vercel.app/)
|
|
150
|
+
--viewer-param <parameters> specify viewer parameters. (ex: "allowScripts=false&pixelRatio=16")
|
|
151
|
+
--browser <browser> EXPERIMENTAL SUPPORT: Specify a browser type to launch Vivliostyle viewer [chromium]
|
|
152
|
+
Currently, Firefox and Webkit support preview command only! (choices: "chromium", "firefox", "webkit")
|
|
173
153
|
--proxy-server <proxyServer> HTTP/SOCK proxy server url for underlying Playwright
|
|
174
154
|
--proxy-bypass <proxyBypass> optional comma-separated domains to bypass proxy
|
|
175
155
|
--proxy-user <proxyUser> optional username for HTTP proxy authentication
|
|
176
156
|
--proxy-pass <proxyPass> optional password for HTTP proxy authentication
|
|
177
|
-
--log-level <level> specify a log level of console outputs (choices: "silent",
|
|
178
|
-
"info", "verbose", "debug", default: "info")
|
|
157
|
+
--log-level <level> specify a log level of console outputs (choices: "silent", "info", "verbose", "debug", default: "info")
|
|
179
158
|
--ignore-https-errors true to ignore HTTPS errors when Playwright browser opens a new page
|
|
159
|
+
--host <host> IP address the server should listen on
|
|
160
|
+
--port <port> port the server should listen on
|
|
161
|
+
--no-open-viewer do not open viewer
|
|
162
|
+
--no-enable-static-serve disable static file serving
|
|
163
|
+
--no-enable-viewer-start-page disable viewer start page
|
|
164
|
+
--vite-config-file <path> Vite config file path
|
|
165
|
+
--no-vite-config-file ignore Vite config file even if it exists
|
|
180
166
|
-h, --help display help for command
|
|
181
167
|
```
|
|
182
168
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveViteConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4Y2QIRBA.js";
|
|
4
4
|
import {
|
|
5
5
|
Logger,
|
|
6
6
|
buildPDFWithContainer,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
setupConfigFromFlags,
|
|
29
29
|
toContainerPath,
|
|
30
30
|
warnDeprecatedConfig
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PY4J4NG6.js";
|
|
32
32
|
import {
|
|
33
33
|
coreVersion
|
|
34
34
|
} from "./chunk-EX7EA34F.js";
|
|
@@ -524,20 +524,18 @@ async function build(inlineConfig) {
|
|
|
524
524
|
__callDispose(_stack, _error, _hasError);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
+
server = await createViteServer({
|
|
528
|
+
config,
|
|
529
|
+
viteConfig,
|
|
530
|
+
inlineConfig,
|
|
531
|
+
mode: "build"
|
|
532
|
+
});
|
|
527
533
|
if (isWebPubConfig(config)) {
|
|
528
534
|
await cleanupWorkspace(config);
|
|
529
535
|
await prepareThemeDirectory(config);
|
|
530
536
|
await compile(config);
|
|
531
537
|
await copyAssets(config);
|
|
532
538
|
}
|
|
533
|
-
if (config.outputs.some((o) => o.format === "pdf")) {
|
|
534
|
-
server = await createViteServer({
|
|
535
|
-
config,
|
|
536
|
-
viteConfig,
|
|
537
|
-
inlineConfig,
|
|
538
|
-
mode: "build"
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
539
|
}
|
|
542
540
|
for (const target of config.outputs) {
|
|
543
541
|
let output = null;
|
|
@@ -1867,7 +1867,6 @@ function resolveTaskConfig(config, options) {
|
|
|
1867
1867
|
outputs,
|
|
1868
1868
|
temporaryFilePrefix,
|
|
1869
1869
|
themeIndexes,
|
|
1870
|
-
rootUrl,
|
|
1871
1870
|
cover
|
|
1872
1871
|
});
|
|
1873
1872
|
for (const output of outputs) {
|
|
@@ -2042,7 +2041,7 @@ function resolveSingleInputConfig({
|
|
|
2042
2041
|
let webbookPath;
|
|
2043
2042
|
if (isValidUri(sourcePath)) {
|
|
2044
2043
|
const url = new URL(sourcePath);
|
|
2045
|
-
if (/^https?:/i.test(url.protocol) && !url.pathname.endsWith("/") &&
|
|
2044
|
+
if (/^https?:/i.test(url.protocol) && !url.pathname.endsWith("/") && !/\.\w+$/.test(url.pathname)) {
|
|
2046
2045
|
url.pathname = `${url.pathname}/`;
|
|
2047
2046
|
}
|
|
2048
2047
|
webbookEntryUrl = url.href;
|
|
@@ -2094,7 +2093,6 @@ function resolveComposedProjectConfig({
|
|
|
2094
2093
|
outputs,
|
|
2095
2094
|
temporaryFilePrefix,
|
|
2096
2095
|
themeIndexes,
|
|
2097
|
-
rootUrl,
|
|
2098
2096
|
cover
|
|
2099
2097
|
}) {
|
|
2100
2098
|
Logger.debug("entering composed project config mode");
|
|
@@ -2156,7 +2154,7 @@ function resolveComposedProjectConfig({
|
|
|
2156
2154
|
} else if (entryPath.startsWith("/")) {
|
|
2157
2155
|
return {
|
|
2158
2156
|
type: "uri",
|
|
2159
|
-
href:
|
|
2157
|
+
href: entryPath,
|
|
2160
2158
|
rootDir: upath5.join(workspaceDir, "localhost")
|
|
2161
2159
|
};
|
|
2162
2160
|
}
|
|
@@ -2190,7 +2188,7 @@ function resolveComposedProjectConfig({
|
|
|
2190
2188
|
case "uri": {
|
|
2191
2189
|
const url = new URL(source.href, "a://dummy");
|
|
2192
2190
|
let pathname = url.pathname;
|
|
2193
|
-
if (
|
|
2191
|
+
if (!/\.\w+$/.test(pathname)) {
|
|
2194
2192
|
pathname = `${pathname.replace(/\/$/, "")}/index.html`;
|
|
2195
2193
|
}
|
|
2196
2194
|
return upath5.join(source.rootDir, pathname);
|
|
@@ -4078,11 +4076,13 @@ async function transformManuscript(entry, {
|
|
|
4078
4076
|
entries,
|
|
4079
4077
|
language,
|
|
4080
4078
|
documentProcessorFactory,
|
|
4081
|
-
vfmOptions
|
|
4079
|
+
vfmOptions,
|
|
4080
|
+
rootUrl
|
|
4082
4081
|
}) {
|
|
4083
4082
|
const source = entry.rel === "contents" || entry.rel === "cover" ? entry.template : entry.source;
|
|
4084
4083
|
let content;
|
|
4085
4084
|
let resourceLoader;
|
|
4085
|
+
let resourceUrl;
|
|
4086
4086
|
const style = entry.themes.flatMap(
|
|
4087
4087
|
(theme) => locateThemePath(theme, upath9.dirname(entry.target))
|
|
4088
4088
|
);
|
|
@@ -4113,10 +4113,11 @@ async function transformManuscript(entry, {
|
|
|
4113
4113
|
}
|
|
4114
4114
|
}
|
|
4115
4115
|
} else if (source?.type === "uri") {
|
|
4116
|
+
resourceUrl = /^https?:/.test(source.href) ? source.href : `${rootUrl}${source.href}`;
|
|
4116
4117
|
resourceLoader = new ResourceLoader();
|
|
4117
4118
|
try {
|
|
4118
4119
|
await getJsdomFromUrlOrFile({
|
|
4119
|
-
src:
|
|
4120
|
+
src: resourceUrl,
|
|
4120
4121
|
resourceLoader,
|
|
4121
4122
|
virtualConsole: createVirtualConsole((error) => {
|
|
4122
4123
|
Logger.logError(`Failed to fetch resources: ${error.detail}`);
|
|
@@ -4124,16 +4125,16 @@ async function transformManuscript(entry, {
|
|
|
4124
4125
|
});
|
|
4125
4126
|
} catch (error) {
|
|
4126
4127
|
throw new DetailError(
|
|
4127
|
-
`Failed to fetch the content from ${
|
|
4128
|
+
`Failed to fetch the content from ${resourceUrl}`,
|
|
4128
4129
|
error.stack ?? error.message
|
|
4129
4130
|
);
|
|
4130
4131
|
}
|
|
4131
|
-
const contentFetcher = resourceLoader.fetcherMap.get(
|
|
4132
|
+
const contentFetcher = resourceLoader.fetcherMap.get(resourceUrl);
|
|
4132
4133
|
if (contentFetcher) {
|
|
4133
4134
|
const buffer = await contentFetcher;
|
|
4134
4135
|
const contentType = contentFetcher.response?.headers["content-type"];
|
|
4135
4136
|
if (!contentType || new MIMEType2(contentType).essence !== "text/html") {
|
|
4136
|
-
throw new Error(`The content is not an HTML document: ${
|
|
4137
|
+
throw new Error(`The content is not an HTML document: ${resourceUrl}`);
|
|
4137
4138
|
}
|
|
4138
4139
|
content = getJsdomFromString({ html: buffer.toString("utf8") });
|
|
4139
4140
|
content = await processManuscriptHtml(content, {
|
|
@@ -4208,18 +4209,18 @@ async function transformManuscript(entry, {
|
|
|
4208
4209
|
if (!source || source.type === "file" && !pathEquals(source.pathname, entry.target)) {
|
|
4209
4210
|
writeFileIfChanged(entry.target, htmlBuffer);
|
|
4210
4211
|
}
|
|
4211
|
-
if (source?.type === "uri" && resourceLoader) {
|
|
4212
|
-
const { response } = resourceLoader.fetcherMap.get(
|
|
4212
|
+
if (source?.type === "uri" && resourceLoader && resourceUrl) {
|
|
4213
|
+
const { response } = resourceLoader.fetcherMap.get(resourceUrl);
|
|
4213
4214
|
const contentFetcher = Promise.resolve(
|
|
4214
4215
|
htmlBuffer
|
|
4215
4216
|
);
|
|
4216
4217
|
contentFetcher.abort = () => {
|
|
4217
4218
|
};
|
|
4218
4219
|
contentFetcher.response = response;
|
|
4219
|
-
resourceLoader.fetcherMap.set(
|
|
4220
|
+
resourceLoader.fetcherMap.set(resourceUrl, contentFetcher);
|
|
4220
4221
|
await ResourceLoader.saveFetchedResources({
|
|
4221
4222
|
fetcherMap: resourceLoader.fetcherMap,
|
|
4222
|
-
rootUrl:
|
|
4223
|
+
rootUrl: resourceUrl,
|
|
4223
4224
|
outputDir: source.rootDir
|
|
4224
4225
|
});
|
|
4225
4226
|
}
|
|
@@ -4517,10 +4518,11 @@ function vsDevServerPlugin({
|
|
|
4517
4518
|
server?.watcher.add(config.viewerInput.manifestPath);
|
|
4518
4519
|
}
|
|
4519
4520
|
}
|
|
4520
|
-
async function transform(entry, config2) {
|
|
4521
|
+
async function transform(entry, config2, host) {
|
|
4522
|
+
const rootUrl = host ? `${server?.config.server.https ? "https" : "http"}://${host}` : config2.rootUrl;
|
|
4521
4523
|
const promise = (async () => {
|
|
4522
4524
|
try {
|
|
4523
|
-
const html = await transformManuscript(entry, config2);
|
|
4525
|
+
const html = await transformManuscript(entry, { ...config2, rootUrl });
|
|
4524
4526
|
if (!html) {
|
|
4525
4527
|
transformCache.delete(entry.target);
|
|
4526
4528
|
return;
|
|
@@ -4587,15 +4589,16 @@ function vsDevServerPlugin({
|
|
|
4587
4589
|
return res.end(cached.content);
|
|
4588
4590
|
}
|
|
4589
4591
|
}
|
|
4592
|
+
const { host } = req.headers;
|
|
4590
4593
|
if (entry.rel === "contents") {
|
|
4591
4594
|
const _config2 = { ...config };
|
|
4592
4595
|
await Promise.all(
|
|
4593
4596
|
_config2.entries.flatMap(
|
|
4594
|
-
(e) => isWebPubConfig(_config2) && e.rel !== "contents" && e.rel !== "cover" ? transform(e, _config2) : []
|
|
4597
|
+
(e) => isWebPubConfig(_config2) && e.rel !== "contents" && e.rel !== "cover" ? transform(e, _config2, host) : []
|
|
4595
4598
|
)
|
|
4596
4599
|
);
|
|
4597
4600
|
}
|
|
4598
|
-
const result = await transform(entry, config);
|
|
4601
|
+
const result = await transform(entry, config, host);
|
|
4599
4602
|
if (!result) {
|
|
4600
4603
|
return next();
|
|
4601
4604
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveViteConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4Y2QIRBA.js";
|
|
4
4
|
import {
|
|
5
5
|
Logger,
|
|
6
6
|
createViteServer,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveTaskConfig,
|
|
14
14
|
setupConfigFromFlags,
|
|
15
15
|
warnDeprecatedConfig
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PY4J4NG6.js";
|
|
17
17
|
import {
|
|
18
18
|
cliVersion
|
|
19
19
|
} from "./chunk-EX7EA34F.js";
|
package/dist/commands/build.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-5AUWIYEK.js";
|
|
4
|
+
import "../chunk-4Y2QIRBA.js";
|
|
5
5
|
import {
|
|
6
6
|
Logger,
|
|
7
7
|
gracefulError,
|
|
8
8
|
isInContainer,
|
|
9
9
|
parseFlagsToInlineConfig
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-PY4J4NG6.js";
|
|
11
11
|
import "../chunk-EX7EA34F.js";
|
|
12
12
|
import "../chunk-WX6JHPSL.js";
|
|
13
13
|
import "../chunk-DMARNPN5.js";
|
|
@@ -135,7 +135,10 @@ It is useful that using own viewer that has staging features. (ex: https://vivli
|
|
|
135
135
|
"--ignore-https-errors",
|
|
136
136
|
`true to ignore HTTPS errors when Playwright browser opens a new page`
|
|
137
137
|
)
|
|
138
|
-
).option("--host <host>", "IP address the server should listen on").option("--port <port>", "port the server should listen on", parseInt).option("--no-enable-static-serve", "disable static file serving").
|
|
138
|
+
).option("--host <host>", "IP address the server should listen on").option("--port <port>", "port the server should listen on", parseInt).option("--no-enable-static-serve", "disable static file serving").option("--vite-config-file <path>", "Vite config file path").option(
|
|
139
|
+
"--no-vite-config-file",
|
|
140
|
+
"ignore Vite config file even if it exists"
|
|
141
|
+
).addOption(new Option("--executable-chromium <path>").hideHelp()).addOption(new Option("--verbose").hideHelp()).addOption(new Option("--http").hideHelp()).action((_arg, option) => {
|
|
139
142
|
let invalid = targets.find((it) => !("path" in it));
|
|
140
143
|
if (invalid) {
|
|
141
144
|
throw new Error(
|
package/dist/commands/init.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-XRR6RKA6.js";
|
|
4
4
|
import {
|
|
5
5
|
gracefulError,
|
|
6
6
|
parseFlagsToInlineConfig
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-PY4J4NG6.js";
|
|
8
8
|
import "../chunk-EX7EA34F.js";
|
|
9
9
|
import "../chunk-WX6JHPSL.js";
|
|
10
10
|
import "../chunk-DMARNPN5.js";
|
package/dist/commands/preview.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
preview
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-QZWMJ4L2.js";
|
|
4
|
+
import "../chunk-4Y2QIRBA.js";
|
|
5
5
|
import {
|
|
6
6
|
gracefulError,
|
|
7
7
|
parseFlagsToInlineConfig
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-PY4J4NG6.js";
|
|
9
9
|
import "../chunk-EX7EA34F.js";
|
|
10
10
|
import "../chunk-WX6JHPSL.js";
|
|
11
11
|
import "../chunk-DMARNPN5.js";
|
|
@@ -82,7 +82,10 @@ Currently, Firefox and Webkit support preview command only!`
|
|
|
82
82
|
"--ignore-https-errors",
|
|
83
83
|
`true to ignore HTTPS errors when Playwright browser opens a new page`
|
|
84
84
|
)
|
|
85
|
-
).option("--host <host>", "IP address the server should listen on").option("--port <port>", "port the server should listen on", parseInt).option("--no-open-viewer", "do not open viewer").option("--no-enable-static-serve", "disable static file serving").option("--no-enable-viewer-start-page", "disable viewer start page").
|
|
85
|
+
).option("--host <host>", "IP address the server should listen on").option("--port <port>", "port the server should listen on", parseInt).option("--no-open-viewer", "do not open viewer").option("--no-enable-static-serve", "disable static file serving").option("--no-enable-viewer-start-page", "disable viewer start page").option("--vite-config-file <path>", "Vite config file path").option(
|
|
86
|
+
"--no-vite-config-file",
|
|
87
|
+
"ignore Vite config file even if it exists"
|
|
88
|
+
).addOption(new Option("--executable-chromium <path>").hideHelp()).addOption(new Option("--verbose").hideHelp()).addOption(new Option("--http").hideHelp());
|
|
86
89
|
return program;
|
|
87
90
|
}
|
|
88
91
|
|