@slidev/cli 0.27.6 → 0.27.10
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/{build-NVEGUEQH.js → build-DN7PSQNW.js} +40 -38
- package/dist/{build-NFYEZM3A.mjs → build-RLIFI6AI.mjs} +18 -16
- package/dist/{chunk-MI63EDKH.js → chunk-4UOEPPLN.js} +71 -62
- package/dist/{chunk-DFNSCAEG.mjs → chunk-62N46WVW.mjs} +6 -2
- package/dist/{chunk-37BJZLTE.js → chunk-6GSA3UIY.js} +8 -4
- package/dist/{chunk-CD4RHQZ5.mjs → chunk-BSFZXWXJ.mjs} +25 -25
- package/dist/{chunk-ZU4P7PRP.js → chunk-GIDUUUUI.js} +4 -4
- package/dist/{chunk-VQUVBFPF.mjs → chunk-MOBV7WC6.mjs} +1 -1
- package/dist/{chunk-ZASSEGOW.js → chunk-XOVMF5NQ.js} +135 -135
- package/dist/{chunk-WV5JPB3F.mjs → chunk-YFUQAECE.mjs} +19 -10
- package/dist/cli.js +19 -19
- package/dist/cli.mjs +6 -6
- package/dist/{export-PTG2WTMI.js → export-D6ZVZTRQ.js} +5 -5
- package/dist/{export-WWXR6L7F.mjs → export-PR7SUYVR.mjs} +2 -2
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/package.json +24 -22
- package/template.md +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk4UOEPPLNjs = require('./chunk-4UOEPPLN.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk6GSA3UIYjs = require('./chunk-6GSA3UIY.js');
|
|
12
12
|
|
|
13
13
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js
|
|
14
|
-
var require_build =
|
|
14
|
+
var require_build = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
15
15
|
"../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js"(exports) {
|
|
16
|
-
|
|
17
|
-
var qs =
|
|
16
|
+
_chunk6GSA3UIYjs.init_cjs_shims.call(void 0, );
|
|
17
|
+
var qs = _chunk6GSA3UIYjs.__require.call(void 0, "querystring");
|
|
18
18
|
function parse(req) {
|
|
19
19
|
let raw = req.url;
|
|
20
20
|
if (raw == null)
|
|
@@ -40,11 +40,11 @@ var require_build = _chunk37BJZLTEjs.__commonJS.call(void 0, {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
// ../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js
|
|
43
|
-
var require_sync =
|
|
43
|
+
var require_sync = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
44
44
|
"../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js"(exports, module) {
|
|
45
|
-
|
|
46
|
-
var { join: join2, resolve: resolve2 } =
|
|
47
|
-
var { readdirSync, statSync } =
|
|
45
|
+
_chunk6GSA3UIYjs.init_cjs_shims.call(void 0, );
|
|
46
|
+
var { join: join2, resolve: resolve2 } = _chunk6GSA3UIYjs.__require.call(void 0, "path");
|
|
47
|
+
var { readdirSync, statSync } = _chunk6GSA3UIYjs.__require.call(void 0, "fs");
|
|
48
48
|
module.exports = function list(dir, callback, pre = "") {
|
|
49
49
|
dir = resolve2(".", dir);
|
|
50
50
|
let arr = readdirSync(dir);
|
|
@@ -59,9 +59,9 @@ var require_sync = _chunk37BJZLTEjs.__commonJS.call(void 0, {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js
|
|
62
|
-
var require_Mime =
|
|
62
|
+
var require_Mime = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
63
63
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js"(exports, module) {
|
|
64
|
-
|
|
64
|
+
_chunk6GSA3UIYjs.init_cjs_shims.call(void 0, );
|
|
65
65
|
"use strict";
|
|
66
66
|
function Mime() {
|
|
67
67
|
this._types = Object.create(null);
|
|
@@ -112,29 +112,29 @@ var require_Mime = _chunk37BJZLTEjs.__commonJS.call(void 0, {
|
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js
|
|
115
|
-
var require_standard =
|
|
115
|
+
var require_standard = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
116
116
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js"(exports, module) {
|
|
117
|
-
|
|
117
|
+
_chunk6GSA3UIYjs.init_cjs_shims.call(void 0, );
|
|
118
118
|
module.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma", "es"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/mrb-consumer+xml": ["*xdf"], "application/mrb-publish+xml": ["*xdf"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["*xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-error+xml": ["xer"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js
|
|
123
|
-
var require_lite =
|
|
123
|
+
var require_lite = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
124
124
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js"(exports, module) {
|
|
125
|
-
|
|
125
|
+
_chunk6GSA3UIYjs.init_cjs_shims.call(void 0, );
|
|
126
126
|
"use strict";
|
|
127
127
|
var Mime = require_Mime();
|
|
128
128
|
module.exports = new Mime(require_standard());
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
// ../../node_modules/.pnpm/sirv@1.0.
|
|
133
|
-
var require_build2 =
|
|
134
|
-
"../../node_modules/.pnpm/sirv@1.0.
|
|
135
|
-
|
|
136
|
-
var fs2 =
|
|
137
|
-
var { join: join2, normalize, resolve: resolve2 } =
|
|
132
|
+
// ../../node_modules/.pnpm/sirv@1.0.18/node_modules/sirv/build.js
|
|
133
|
+
var require_build2 = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
134
|
+
"../../node_modules/.pnpm/sirv@1.0.18/node_modules/sirv/build.js"(exports, module) {
|
|
135
|
+
_chunk6GSA3UIYjs.init_cjs_shims.call(void 0, );
|
|
136
|
+
var fs2 = _chunk6GSA3UIYjs.__require.call(void 0, "fs");
|
|
137
|
+
var { join: join2, normalize, resolve: resolve2 } = _chunk6GSA3UIYjs.__require.call(void 0, "path");
|
|
138
138
|
var { parse } = require_build();
|
|
139
139
|
var list = require_sync();
|
|
140
140
|
var mime = require_lite();
|
|
@@ -187,7 +187,7 @@ var require_build2 = _chunk37BJZLTEjs.__commonJS.call(void 0, {
|
|
|
187
187
|
}
|
|
188
188
|
function send(req, res, file, stats, headers) {
|
|
189
189
|
let code = 200, tmp, opts = {};
|
|
190
|
-
headers =
|
|
190
|
+
headers = _chunk6GSA3UIYjs.__spreadValues.call(void 0, {}, headers);
|
|
191
191
|
for (let key in headers) {
|
|
192
192
|
tmp = res.getHeader(key);
|
|
193
193
|
if (tmp)
|
|
@@ -213,22 +213,24 @@ var require_build2 = _chunk37BJZLTEjs.__commonJS.call(void 0, {
|
|
|
213
213
|
res.writeHead(code, headers);
|
|
214
214
|
fs2.createReadStream(file, opts).pipe(res);
|
|
215
215
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
216
|
+
var ENCODING = {
|
|
217
|
+
".br": "br",
|
|
218
|
+
".gz": "gzip"
|
|
219
|
+
};
|
|
220
220
|
function toHeaders(name, stats, isEtag) {
|
|
221
|
+
let enc = ENCODING[name.slice(-3)];
|
|
222
|
+
let ctype = mime.getType(name.slice(0, enc && -3)) || "";
|
|
223
|
+
if (ctype === "text/html")
|
|
224
|
+
ctype += ";charset=utf-8";
|
|
221
225
|
let headers = {
|
|
222
226
|
"Content-Length": stats.size,
|
|
223
|
-
"Content-Type":
|
|
227
|
+
"Content-Type": ctype,
|
|
224
228
|
"Last-Modified": stats.mtime.toUTCString()
|
|
225
229
|
};
|
|
230
|
+
if (enc)
|
|
231
|
+
headers["Content-Encoding"] = enc;
|
|
226
232
|
if (isEtag)
|
|
227
233
|
headers["ETag"] = `W/"${stats.size}-${stats.mtime.getTime()}"`;
|
|
228
|
-
if (/\.br$/.test(name))
|
|
229
|
-
isEncoding(name, "br", headers);
|
|
230
|
-
if (/\.gz$/.test(name))
|
|
231
|
-
isEncoding(name, "gzip", headers);
|
|
232
234
|
return headers;
|
|
233
235
|
}
|
|
234
236
|
module.exports = function(dir, opts = {}) {
|
|
@@ -307,8 +309,8 @@ var require_build2 = _chunk37BJZLTEjs.__commonJS.call(void 0, {
|
|
|
307
309
|
});
|
|
308
310
|
|
|
309
311
|
// node/build.ts
|
|
310
|
-
|
|
311
|
-
var import_sirv =
|
|
312
|
+
_chunk6GSA3UIYjs.init_cjs_shims.call(void 0, );
|
|
313
|
+
var import_sirv = _chunk6GSA3UIYjs.__toModule.call(void 0, require_build2());
|
|
312
314
|
var _path = require('path');
|
|
313
315
|
var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
|
314
316
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
@@ -322,12 +324,12 @@ async function build(options, viteConfig = {}) {
|
|
|
322
324
|
let originalIndexHTML;
|
|
323
325
|
if (_fsextra2.default.existsSync(indexPath))
|
|
324
326
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
325
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
327
|
+
await _fsextra2.default.writeFile(indexPath, await _chunk4UOEPPLNjs.getIndexHtml.call(void 0, options), "utf-8");
|
|
326
328
|
let config = void 0;
|
|
327
329
|
try {
|
|
328
330
|
const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
|
|
329
331
|
plugins: [
|
|
330
|
-
await
|
|
332
|
+
await _chunk4UOEPPLNjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
331
333
|
{
|
|
332
334
|
name: "resolve-config",
|
|
333
335
|
configResolved(_config) {
|
|
@@ -371,13 +373,13 @@ async function build(options, viteConfig = {}) {
|
|
|
371
373
|
else
|
|
372
374
|
await _fsextra2.default.unlink(indexPath);
|
|
373
375
|
}
|
|
374
|
-
await _fsextra2.default.copyFile(_path.resolve.call(void 0,
|
|
375
|
-
const redirectsPath = _path.resolve.call(void 0,
|
|
376
|
+
await _fsextra2.default.copyFile(_path.resolve.call(void 0, config.build.outDir, "index.html"), _path.resolve.call(void 0, config.build.outDir, "404.html"));
|
|
377
|
+
const redirectsPath = _path.resolve.call(void 0, config.build.outDir, "_redirects");
|
|
376
378
|
if (!_fsextra2.default.existsSync(redirectsPath))
|
|
377
379
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
378
380
|
`, "utf-8");
|
|
379
381
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
380
|
-
const { exportSlides } = await Promise.resolve().then(() =>
|
|
382
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunk6GSA3UIYjs.__toModule.call(void 0, _chunk6GSA3UIYjs.__require.call(void 0, "./export-D6ZVZTRQ.js")));
|
|
381
383
|
const port = 12445;
|
|
382
384
|
const app = _connect2.default.call(void 0, );
|
|
383
385
|
const server = _http2.default.createServer(app);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YFUQAECE.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require,
|
|
8
8
|
__spreadValues,
|
|
9
9
|
__toModule
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-62N46WVW.mjs";
|
|
11
11
|
|
|
12
12
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js
|
|
13
13
|
var require_build = __commonJS({
|
|
@@ -123,9 +123,9 @@ var require_lite = __commonJS({
|
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
-
// ../../node_modules/.pnpm/sirv@1.0.
|
|
126
|
+
// ../../node_modules/.pnpm/sirv@1.0.18/node_modules/sirv/build.js
|
|
127
127
|
var require_build2 = __commonJS({
|
|
128
|
-
"../../node_modules/.pnpm/sirv@1.0.
|
|
128
|
+
"../../node_modules/.pnpm/sirv@1.0.18/node_modules/sirv/build.js"(exports, module) {
|
|
129
129
|
var fs2 = __require("fs");
|
|
130
130
|
var { join: join2, normalize, resolve: resolve2 } = __require("path");
|
|
131
131
|
var { parse } = require_build();
|
|
@@ -206,22 +206,24 @@ var require_build2 = __commonJS({
|
|
|
206
206
|
res.writeHead(code, headers);
|
|
207
207
|
fs2.createReadStream(file, opts).pipe(res);
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
209
|
+
var ENCODING = {
|
|
210
|
+
".br": "br",
|
|
211
|
+
".gz": "gzip"
|
|
212
|
+
};
|
|
213
213
|
function toHeaders(name, stats, isEtag) {
|
|
214
|
+
let enc = ENCODING[name.slice(-3)];
|
|
215
|
+
let ctype = mime.getType(name.slice(0, enc && -3)) || "";
|
|
216
|
+
if (ctype === "text/html")
|
|
217
|
+
ctype += ";charset=utf-8";
|
|
214
218
|
let headers = {
|
|
215
219
|
"Content-Length": stats.size,
|
|
216
|
-
"Content-Type":
|
|
220
|
+
"Content-Type": ctype,
|
|
217
221
|
"Last-Modified": stats.mtime.toUTCString()
|
|
218
222
|
};
|
|
223
|
+
if (enc)
|
|
224
|
+
headers["Content-Encoding"] = enc;
|
|
219
225
|
if (isEtag)
|
|
220
226
|
headers["ETag"] = `W/"${stats.size}-${stats.mtime.getTime()}"`;
|
|
221
|
-
if (/\.br$/.test(name))
|
|
222
|
-
isEncoding(name, "br", headers);
|
|
223
|
-
if (/\.gz$/.test(name))
|
|
224
|
-
isEncoding(name, "gzip", headers);
|
|
225
227
|
return headers;
|
|
226
228
|
}
|
|
227
229
|
module.exports = function(dir, opts = {}) {
|
|
@@ -363,13 +365,13 @@ async function build(options, viteConfig = {}) {
|
|
|
363
365
|
else
|
|
364
366
|
await fs.unlink(indexPath);
|
|
365
367
|
}
|
|
366
|
-
await fs.copyFile(resolve(
|
|
367
|
-
const redirectsPath = resolve(
|
|
368
|
+
await fs.copyFile(resolve(config.build.outDir, "index.html"), resolve(config.build.outDir, "404.html"));
|
|
369
|
+
const redirectsPath = resolve(config.build.outDir, "_redirects");
|
|
368
370
|
if (!fs.existsSync(redirectsPath))
|
|
369
371
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
370
372
|
`, "utf-8");
|
|
371
373
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
372
|
-
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-
|
|
374
|
+
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-PR7SUYVR.mjs")));
|
|
373
375
|
const port = 12445;
|
|
374
376
|
const app = connect();
|
|
375
377
|
const server = http.createServer(app);
|