create-book 11.0.3 → 11.0.4
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/cli.js +71 -7
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -79200,7 +79200,7 @@ import_remove.default.removeSync;
|
|
|
79200
79200
|
...import_remove.default
|
|
79201
79201
|
});
|
|
79202
79202
|
//#endregion
|
|
79203
|
-
//#region ../../dist/asset-
|
|
79203
|
+
//#region ../../dist/asset-Cv7iIlt0.js
|
|
79204
79204
|
function createParserProgram({ setupProgram, parseArgs }) {
|
|
79205
79205
|
return (argv) => {
|
|
79206
79206
|
const program = setupProgram();
|
|
@@ -79227,6 +79227,60 @@ function locateVivliostyleConfig({ config, cwd: cwd$1$2 = cwd$1 }) {
|
|
|
79227
79227
|
".json"
|
|
79228
79228
|
].map((ext) => import_upath.default.join(cwd$1$2, `vivliostyle.config${ext}`)).find((p) => fs.existsSync(p));
|
|
79229
79229
|
}
|
|
79230
|
+
function _usingCtx() {
|
|
79231
|
+
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
79232
|
+
var n = Error();
|
|
79233
|
+
return n.name = "SuppressedError", n.error = r, n.suppressed = e, n;
|
|
79234
|
+
}, e = {}, n = [];
|
|
79235
|
+
function using(r, e) {
|
|
79236
|
+
if (null != e) {
|
|
79237
|
+
if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
|
|
79238
|
+
if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
|
|
79239
|
+
if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o;
|
|
79240
|
+
if ("function" != typeof o) throw new TypeError("Object is not disposable.");
|
|
79241
|
+
t && (o = function o() {
|
|
79242
|
+
try {
|
|
79243
|
+
t.call(e);
|
|
79244
|
+
} catch (r) {
|
|
79245
|
+
return Promise.reject(r);
|
|
79246
|
+
}
|
|
79247
|
+
}), n.push({
|
|
79248
|
+
v: e,
|
|
79249
|
+
d: o,
|
|
79250
|
+
a: r
|
|
79251
|
+
});
|
|
79252
|
+
} else r && n.push({
|
|
79253
|
+
d: e,
|
|
79254
|
+
a: r
|
|
79255
|
+
});
|
|
79256
|
+
return e;
|
|
79257
|
+
}
|
|
79258
|
+
return {
|
|
79259
|
+
e,
|
|
79260
|
+
u: using.bind(null, !1),
|
|
79261
|
+
a: using.bind(null, !0),
|
|
79262
|
+
d: function d() {
|
|
79263
|
+
var o, t = this.e, s = 0;
|
|
79264
|
+
function next() {
|
|
79265
|
+
for (; o = n.pop();) try {
|
|
79266
|
+
if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);
|
|
79267
|
+
if (o.d) {
|
|
79268
|
+
var r = o.d.call(o.v);
|
|
79269
|
+
if (o.a) return s |= 2, Promise.resolve(r).then(next, err);
|
|
79270
|
+
} else s |= 1;
|
|
79271
|
+
} catch (r) {
|
|
79272
|
+
return err(r);
|
|
79273
|
+
}
|
|
79274
|
+
if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();
|
|
79275
|
+
if (t !== e) throw t;
|
|
79276
|
+
}
|
|
79277
|
+
function err(n) {
|
|
79278
|
+
return t = t !== e ? new r(n, t) : n, next();
|
|
79279
|
+
}
|
|
79280
|
+
return next();
|
|
79281
|
+
}
|
|
79282
|
+
};
|
|
79283
|
+
}
|
|
79230
79284
|
var GlobMatcher = class {
|
|
79231
79285
|
#matchers;
|
|
79232
79286
|
constructor(matcherConfig) {
|
|
@@ -88636,7 +88690,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
88636
88690
|
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
88637
88691
|
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */
|
|
88638
88692
|
//#endregion
|
|
88639
|
-
//#region ../../dist/create-
|
|
88693
|
+
//#region ../../dist/create-DSCYbAc9.js
|
|
88640
88694
|
var import_proxy = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
88641
88695
|
var Ye = Object.defineProperty;
|
|
88642
88696
|
var Re = (A) => {
|
|
@@ -100816,9 +100870,10 @@ async function create(inlineConfig) {
|
|
|
100816
100870
|
...explicitTemplateVariables
|
|
100817
100871
|
}
|
|
100818
100872
|
});
|
|
100819
|
-
else {
|
|
100873
|
+
else try {
|
|
100874
|
+
var _usingCtx$1 = _usingCtx();
|
|
100820
100875
|
if (interactiveLogger.messageHistory.length > 0) interactiveLogger.logOutro("All configurations are set! Creating your project...");
|
|
100821
|
-
|
|
100876
|
+
_usingCtx$1.u(Logger.startLogging(useLocalTemplate ? "Copying a local template" : "Downloading a template"));
|
|
100822
100877
|
/* v8 ignore next 3 */
|
|
100823
100878
|
if (!template) throw new Error("No template is set to create a project.");
|
|
100824
100879
|
await setupTemplate({
|
|
@@ -100832,16 +100887,25 @@ async function create(inlineConfig) {
|
|
|
100832
100887
|
},
|
|
100833
100888
|
useLocalTemplate
|
|
100834
100889
|
});
|
|
100835
|
-
if (installDependencies) {
|
|
100890
|
+
if (installDependencies) try {
|
|
100891
|
+
var _usingCtx3 = _usingCtx();
|
|
100836
100892
|
const pm = whichPm();
|
|
100837
|
-
|
|
100893
|
+
_usingCtx3.u(Logger.suspendLogging(`Installing dependencies with ${pm}`));
|
|
100838
100894
|
await performInstallDependencies({
|
|
100839
100895
|
projectPath,
|
|
100840
100896
|
cwd: cwd$1$1,
|
|
100841
100897
|
pm,
|
|
100842
100898
|
signal: inlineConfig.signal
|
|
100843
100899
|
});
|
|
100900
|
+
} catch (_) {
|
|
100901
|
+
_usingCtx3.e = _;
|
|
100902
|
+
} finally {
|
|
100903
|
+
_usingCtx3.d();
|
|
100844
100904
|
}
|
|
100905
|
+
} catch (_) {
|
|
100906
|
+
_usingCtx$1.e = _;
|
|
100907
|
+
} finally {
|
|
100908
|
+
_usingCtx$1.d();
|
|
100845
100909
|
}
|
|
100846
100910
|
const output = createConfigFileOnly ? import_upath.default.join(dist, DEFAULT_CONFIG_FILENAME) : dist;
|
|
100847
100911
|
const relativeOutput = import_upath.default.relative(cwd$1$1, output) || ".";
|
|
@@ -104058,7 +104122,7 @@ const { program, createCommand, createArgument, createOption, CommanderError, In
|
|
|
104058
104122
|
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
104059
104123
|
})))(), 1)).default;
|
|
104060
104124
|
//#endregion
|
|
104061
|
-
//#region ../../dist/create.runner-
|
|
104125
|
+
//#region ../../dist/create.runner-Dg-K7HGv.js
|
|
104062
104126
|
function setupCreateParserProgram() {
|
|
104063
104127
|
const program = new Command();
|
|
104064
104128
|
program.name("vivliostyle create").description("scaffold a new Vivliostyle project").arguments("[projectPath]").option("--title <title>", "title").option("--author <author>", "author").option("-l, --language <language>", "language").option("-s, --size <size>", "paper size").option("-T, --theme <theme>", "theme").option("--no-theme", "Do not include a theme.").option("--template <template>", `Template source in the format of \`[provider]:repo[/subpath][#ref]\` or as a local directory to copy from.`).option("--install-dependencies", "Install dependencies after creating a project.").option("--no-install-dependencies", "Do not install dependencies after creating a project.").option("--create-config-file-only", `Create a Vivliostyle config file without generating project template files.`).addOption(new Option("--proxy-server <proxyServer>", `HTTP/SOCK proxy server url`)).addOption(new Option("--proxy-bypass <proxyBypass>", `optional comma-separated domains to bypass proxy`)).addOption(new Option("--proxy-user <proxyUser>", `optional username for HTTP proxy authentication`)).addOption(new Option("--proxy-pass <proxyPass>", `optional password for HTTP proxy authentication`)).addOption(new Option("--log-level <level>", "specify a log level of console outputs").choices([
|