kirbyup 3.2.0 → 3.2.1
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/node/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cac } from 'cac';
|
|
2
|
-
import { n as name, b as build, s as serve, v as version, h as handleError } from '../shared/kirbyup.
|
|
2
|
+
import { n as name, b as build, s as serve, v as version, h as handleError } from '../shared/kirbyup.Dy3k0wjA.mjs';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:fs/promises';
|
|
5
5
|
import '@vitejs/plugin-vue2';
|
|
@@ -18,6 +18,11 @@ import 'postcss-load-config';
|
|
|
18
18
|
import 'postcss-logical';
|
|
19
19
|
import 'magic-string';
|
|
20
20
|
import 'node:module';
|
|
21
|
+
import 'child_process';
|
|
22
|
+
import 'path';
|
|
23
|
+
import 'process';
|
|
24
|
+
import 'stream';
|
|
25
|
+
import 'readline';
|
|
21
26
|
import 'node:buffer';
|
|
22
27
|
import 'node:util';
|
|
23
28
|
import 'node:zlib';
|
package/dist/node/index.mjs
CHANGED
|
@@ -10,13 +10,18 @@ import 'rollup-plugin-external-globals';
|
|
|
10
10
|
import 'vite';
|
|
11
11
|
import 'vite-plugin-full-reload';
|
|
12
12
|
import 'vue/compiler-sfc';
|
|
13
|
-
export { b as build, s as serve } from '../shared/kirbyup.
|
|
13
|
+
export { b as build, s as serve } from '../shared/kirbyup.Dy3k0wjA.mjs';
|
|
14
14
|
import 'c12';
|
|
15
15
|
import 'postcss-dir-pseudo-class';
|
|
16
16
|
import 'postcss-load-config';
|
|
17
17
|
import 'postcss-logical';
|
|
18
18
|
import 'magic-string';
|
|
19
19
|
import 'node:module';
|
|
20
|
+
import 'child_process';
|
|
21
|
+
import 'path';
|
|
22
|
+
import 'process';
|
|
23
|
+
import 'stream';
|
|
24
|
+
import 'readline';
|
|
20
25
|
import 'node:buffer';
|
|
21
26
|
import 'node:util';
|
|
22
27
|
import 'node:zlib';
|
|
@@ -9,7 +9,7 @@ import { colors } from 'consola/utils';
|
|
|
9
9
|
import { resolve, join, normalize, relative, dirname, basename } from 'pathe';
|
|
10
10
|
import { debounce } from 'perfect-debounce';
|
|
11
11
|
import externalGlobals from 'rollup-plugin-external-globals';
|
|
12
|
-
import { createLogger, createServer,
|
|
12
|
+
import { createLogger, createServer, build as build$1, mergeConfig } from 'vite';
|
|
13
13
|
import fullReloadPlugin from 'vite-plugin-full-reload';
|
|
14
14
|
import * as vueCompilerSfc from 'vue/compiler-sfc';
|
|
15
15
|
import { loadConfig as loadConfig$1 } from 'c12';
|
|
@@ -17,13 +17,18 @@ import postcssDirPseudoClass from 'postcss-dir-pseudo-class';
|
|
|
17
17
|
import postcssrc from 'postcss-load-config';
|
|
18
18
|
import postcssLogical from 'postcss-logical';
|
|
19
19
|
import MagicString from 'magic-string';
|
|
20
|
-
import 'node:module';
|
|
21
|
-
import
|
|
20
|
+
import { createRequire } from 'node:module';
|
|
21
|
+
import 'child_process';
|
|
22
|
+
import 'path';
|
|
23
|
+
import 'process';
|
|
24
|
+
import 'stream';
|
|
25
|
+
import 'readline';
|
|
26
|
+
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
22
27
|
import { promisify } from 'node:util';
|
|
23
28
|
import { gzip } from 'node:zlib';
|
|
24
29
|
|
|
25
30
|
const name = "kirbyup";
|
|
26
|
-
const version = "3.2.
|
|
31
|
+
const version = "3.2.1";
|
|
27
32
|
|
|
28
33
|
function loadConfig(cwd = process.cwd()) {
|
|
29
34
|
return loadConfig$1({
|
|
@@ -176,6 +181,357 @@ function kirbyupGlobImportPlugin() {
|
|
|
176
181
|
};
|
|
177
182
|
}
|
|
178
183
|
|
|
184
|
+
const require = createRequire(import.meta.url);
|
|
185
|
+
var St = Object.create;
|
|
186
|
+
var $ = Object.defineProperty;
|
|
187
|
+
var kt = Object.getOwnPropertyDescriptor;
|
|
188
|
+
var Tt = Object.getOwnPropertyNames;
|
|
189
|
+
var At = Object.getPrototypeOf, Rt = Object.prototype.hasOwnProperty;
|
|
190
|
+
var h = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, {
|
|
191
|
+
get: (e, n) => (typeof require < "u" ? require : e)[n]
|
|
192
|
+
}) : t)(function(t) {
|
|
193
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
194
|
+
throw Error('Dynamic require of "' + t + '" is not supported');
|
|
195
|
+
});
|
|
196
|
+
var l = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
|
|
197
|
+
var $t = (t, e, n, r) => {
|
|
198
|
+
if (e && typeof e == "object" || typeof e == "function")
|
|
199
|
+
for (let s of Tt(e))
|
|
200
|
+
!Rt.call(t, s) && s !== n && $(t, s, { get: () => e[s], enumerable: !(r = kt(e, s)) || r.enumerable });
|
|
201
|
+
return t;
|
|
202
|
+
};
|
|
203
|
+
var Nt = (t, e, n) => (n = t != null ? St(At(t)) : {}, $t(
|
|
204
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
205
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
206
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
207
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
208
|
+
$(n, "default", { value: t, enumerable: true }) ,
|
|
209
|
+
t
|
|
210
|
+
));
|
|
211
|
+
|
|
212
|
+
// node_modules/isexe/windows.js
|
|
213
|
+
var W = l((Se, H) => {
|
|
214
|
+
H.exports = z;
|
|
215
|
+
z.sync = Wt;
|
|
216
|
+
var j = h("fs");
|
|
217
|
+
function Ht(t, e) {
|
|
218
|
+
var n = e.pathExt !== void 0 ? e.pathExt : process.env.PATHEXT;
|
|
219
|
+
if (!n || (n = n.split(";"), n.indexOf("") !== -1))
|
|
220
|
+
return true;
|
|
221
|
+
for (var r = 0; r < n.length; r++) {
|
|
222
|
+
var s = n[r].toLowerCase();
|
|
223
|
+
if (s && t.substr(-s.length).toLowerCase() === s)
|
|
224
|
+
return true;
|
|
225
|
+
}
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
function F(t, e, n) {
|
|
229
|
+
return !t.isSymbolicLink() && !t.isFile() ? false : Ht(e, n);
|
|
230
|
+
}
|
|
231
|
+
function z(t, e, n) {
|
|
232
|
+
j.stat(t, function(r, s) {
|
|
233
|
+
n(r, r ? false : F(s, t, e));
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function Wt(t, e) {
|
|
237
|
+
return F(j.statSync(t), t, e);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
// node_modules/isexe/mode.js
|
|
242
|
+
var X = l((ke, B) => {
|
|
243
|
+
B.exports = K;
|
|
244
|
+
K.sync = Dt;
|
|
245
|
+
var D = h("fs");
|
|
246
|
+
function K(t, e, n) {
|
|
247
|
+
D.stat(t, function(r, s) {
|
|
248
|
+
n(r, r ? false : M(s, e));
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
function Dt(t, e) {
|
|
252
|
+
return M(D.statSync(t), e);
|
|
253
|
+
}
|
|
254
|
+
function M(t, e) {
|
|
255
|
+
return t.isFile() && Kt(t, e);
|
|
256
|
+
}
|
|
257
|
+
function Kt(t, e) {
|
|
258
|
+
var n = t.mode, r = t.uid, s = t.gid, o = e.uid !== void 0 ? e.uid : process.getuid && process.getuid(), i = e.gid !== void 0 ? e.gid : process.getgid && process.getgid(), a = parseInt("100", 8), c = parseInt("010", 8), u = parseInt("001", 8), f = a | c, p = n & u || n & c && s === i || n & a && r === o || n & f && o === 0;
|
|
259
|
+
return p;
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
// node_modules/isexe/index.js
|
|
264
|
+
var U = l((Ae, G) => {
|
|
265
|
+
h("fs"); var v;
|
|
266
|
+
process.platform === "win32" || global.TESTING_WINDOWS ? v = W() : v = X();
|
|
267
|
+
G.exports = y;
|
|
268
|
+
y.sync = Mt;
|
|
269
|
+
function y(t, e, n) {
|
|
270
|
+
if (typeof e == "function" && (n = e, e = {}), !n) {
|
|
271
|
+
if (typeof Promise != "function")
|
|
272
|
+
throw new TypeError("callback not provided");
|
|
273
|
+
return new Promise(function(r, s) {
|
|
274
|
+
y(t, e || {}, function(o, i) {
|
|
275
|
+
o ? s(o) : r(i);
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
v(t, e || {}, function(r, s) {
|
|
280
|
+
r && (r.code === "EACCES" || e && e.ignoreErrors) && (r = null, s = false), n(r, s);
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
function Mt(t, e) {
|
|
284
|
+
try {
|
|
285
|
+
return v.sync(t, e || {});
|
|
286
|
+
} catch (n) {
|
|
287
|
+
if (e && e.ignoreErrors || n.code === "EACCES")
|
|
288
|
+
return false;
|
|
289
|
+
throw n;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
// node_modules/which/which.js
|
|
295
|
+
var et = l((Re, tt) => {
|
|
296
|
+
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Y = h("path"), Bt = g ? ";" : ":", V = U(), J = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), Q = (t, e) => {
|
|
297
|
+
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
298
|
+
// windows always checks the cwd first
|
|
299
|
+
...g ? [process.cwd()] : [],
|
|
300
|
+
...(e.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
301
|
+
"").split(n)
|
|
302
|
+
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
303
|
+
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
304
|
+
pathEnv: r,
|
|
305
|
+
pathExt: o,
|
|
306
|
+
pathExtExe: s
|
|
307
|
+
};
|
|
308
|
+
}, Z = (t, e, n) => {
|
|
309
|
+
typeof e == "function" && (n = e, e = {}), e || (e = {});
|
|
310
|
+
let { pathEnv: r, pathExt: s, pathExtExe: o } = Q(t, e), i = [], a = (u) => new Promise((f, p) => {
|
|
311
|
+
if (u === r.length)
|
|
312
|
+
return e.all && i.length ? f(i) : p(J(t));
|
|
313
|
+
let d = r[u], w = /^".*"$/.test(d) ? d.slice(1, -1) : d, m = Y.join(w, t), b = !w && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + m : m;
|
|
314
|
+
f(c(b, u, 0));
|
|
315
|
+
}), c = (u, f, p) => new Promise((d, w) => {
|
|
316
|
+
if (p === s.length)
|
|
317
|
+
return d(a(f + 1));
|
|
318
|
+
let m = s[p];
|
|
319
|
+
V(u + m, { pathExt: o }, (b, Ot) => {
|
|
320
|
+
if (!b && Ot)
|
|
321
|
+
if (e.all)
|
|
322
|
+
i.push(u + m);
|
|
323
|
+
else
|
|
324
|
+
return d(u + m);
|
|
325
|
+
return d(c(u, f, p + 1));
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
return n ? a(0).then((u) => n(null, u), n) : a(0);
|
|
329
|
+
}, Xt = (t, e) => {
|
|
330
|
+
e = e || {};
|
|
331
|
+
let { pathEnv: n, pathExt: r, pathExtExe: s } = Q(t, e), o = [];
|
|
332
|
+
for (let i = 0; i < n.length; i++) {
|
|
333
|
+
let a = n[i], c = /^".*"$/.test(a) ? a.slice(1, -1) : a, u = Y.join(c, t), f = !c && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + u : u;
|
|
334
|
+
for (let p = 0; p < r.length; p++) {
|
|
335
|
+
let d = f + r[p];
|
|
336
|
+
try {
|
|
337
|
+
if (V.sync(d, { pathExt: s }))
|
|
338
|
+
if (e.all)
|
|
339
|
+
o.push(d);
|
|
340
|
+
else
|
|
341
|
+
return d;
|
|
342
|
+
} catch {
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
if (e.all && o.length)
|
|
347
|
+
return o;
|
|
348
|
+
if (e.nothrow)
|
|
349
|
+
return null;
|
|
350
|
+
throw J(t);
|
|
351
|
+
};
|
|
352
|
+
tt.exports = Z;
|
|
353
|
+
Z.sync = Xt;
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
// node_modules/path-key/index.js
|
|
357
|
+
var rt = l(($e, _) => {
|
|
358
|
+
var nt = (t = {}) => {
|
|
359
|
+
let e = t.env || process.env;
|
|
360
|
+
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(e).reverse().find((r) => r.toUpperCase() === "PATH") || "Path";
|
|
361
|
+
};
|
|
362
|
+
_.exports = nt;
|
|
363
|
+
_.exports.default = nt;
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
// node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
367
|
+
var ct = l((Ne, it) => {
|
|
368
|
+
var st = h("path"), Gt = et(), Ut = rt();
|
|
369
|
+
function ot(t, e) {
|
|
370
|
+
let n = t.options.env || process.env, r = process.cwd(), s = t.options.cwd != null, o = s && process.chdir !== void 0 && !process.chdir.disabled;
|
|
371
|
+
if (o)
|
|
372
|
+
try {
|
|
373
|
+
process.chdir(t.options.cwd);
|
|
374
|
+
} catch {
|
|
375
|
+
}
|
|
376
|
+
let i;
|
|
377
|
+
try {
|
|
378
|
+
i = Gt.sync(t.command, {
|
|
379
|
+
path: n[Ut({ env: n })],
|
|
380
|
+
pathExt: e ? st.delimiter : void 0
|
|
381
|
+
});
|
|
382
|
+
} catch {
|
|
383
|
+
} finally {
|
|
384
|
+
o && process.chdir(r);
|
|
385
|
+
}
|
|
386
|
+
return i && (i = st.resolve(s ? t.options.cwd : "", i)), i;
|
|
387
|
+
}
|
|
388
|
+
function Yt(t) {
|
|
389
|
+
return ot(t) || ot(t, true);
|
|
390
|
+
}
|
|
391
|
+
it.exports = Yt;
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
// node_modules/cross-spawn/lib/util/escape.js
|
|
395
|
+
var ut = l((qe, P) => {
|
|
396
|
+
var C = /([()\][%!^"`<>&|;, *?])/g;
|
|
397
|
+
function Vt(t) {
|
|
398
|
+
return t = t.replace(C, "^$1"), t;
|
|
399
|
+
}
|
|
400
|
+
function Jt(t, e) {
|
|
401
|
+
return t = `${t}`, t = t.replace(/(\\*)"/g, '$1$1\\"'), t = t.replace(/(\\*)$/, "$1$1"), t = `"${t}"`, t = t.replace(C, "^$1"), e && (t = t.replace(C, "^$1")), t;
|
|
402
|
+
}
|
|
403
|
+
P.exports.command = Vt;
|
|
404
|
+
P.exports.argument = Jt;
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
// node_modules/shebang-regex/index.js
|
|
408
|
+
var lt = l((Ie, at) => {
|
|
409
|
+
at.exports = /^#!(.*)/;
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
// node_modules/shebang-command/index.js
|
|
413
|
+
var dt = l((Le, pt) => {
|
|
414
|
+
var Qt = lt();
|
|
415
|
+
pt.exports = (t = "") => {
|
|
416
|
+
let e = t.match(Qt);
|
|
417
|
+
if (!e)
|
|
418
|
+
return null;
|
|
419
|
+
let [n, r] = e[0].replace(/#! ?/, "").split(" "), s = n.split("/").pop();
|
|
420
|
+
return s === "env" ? r : r ? `${s} ${r}` : s;
|
|
421
|
+
};
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
// node_modules/cross-spawn/lib/util/readShebang.js
|
|
425
|
+
var ht = l((je, ft) => {
|
|
426
|
+
var O = h("fs"), Zt = dt();
|
|
427
|
+
function te(t) {
|
|
428
|
+
let n = Buffer.alloc(150), r;
|
|
429
|
+
try {
|
|
430
|
+
r = O.openSync(t, "r"), O.readSync(r, n, 0, 150, 0), O.closeSync(r);
|
|
431
|
+
} catch {
|
|
432
|
+
}
|
|
433
|
+
return Zt(n.toString());
|
|
434
|
+
}
|
|
435
|
+
ft.exports = te;
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
// node_modules/cross-spawn/lib/parse.js
|
|
439
|
+
var wt = l((Fe, Et) => {
|
|
440
|
+
var ee = h("path"), mt = ct(), gt = ut(), ne = ht(), re = process.platform === "win32", se = /\.(?:com|exe)$/i, oe = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
441
|
+
function ie(t) {
|
|
442
|
+
t.file = mt(t);
|
|
443
|
+
let e = t.file && ne(t.file);
|
|
444
|
+
return e ? (t.args.unshift(t.file), t.command = e, mt(t)) : t.file;
|
|
445
|
+
}
|
|
446
|
+
function ce(t) {
|
|
447
|
+
if (!re)
|
|
448
|
+
return t;
|
|
449
|
+
let e = ie(t), n = !se.test(e);
|
|
450
|
+
if (t.options.forceShell || n) {
|
|
451
|
+
let r = oe.test(e);
|
|
452
|
+
t.command = ee.normalize(t.command), t.command = gt.command(t.command), t.args = t.args.map((o) => gt.argument(o, r));
|
|
453
|
+
let s = [t.command].concat(t.args).join(" ");
|
|
454
|
+
t.args = ["/d", "/s", "/c", `"${s}"`], t.command = process.env.comspec || "cmd.exe", t.options.windowsVerbatimArguments = true;
|
|
455
|
+
}
|
|
456
|
+
return t;
|
|
457
|
+
}
|
|
458
|
+
function ue(t, e, n) {
|
|
459
|
+
e && !Array.isArray(e) && (n = e, e = null), e = e ? e.slice(0) : [], n = Object.assign({}, n);
|
|
460
|
+
let r = {
|
|
461
|
+
command: t,
|
|
462
|
+
args: e,
|
|
463
|
+
options: n,
|
|
464
|
+
file: void 0,
|
|
465
|
+
original: {
|
|
466
|
+
command: t,
|
|
467
|
+
args: e
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
return n.shell ? r : ce(r);
|
|
471
|
+
}
|
|
472
|
+
Et.exports = ue;
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
// node_modules/cross-spawn/lib/enoent.js
|
|
476
|
+
var bt = l((ze, vt) => {
|
|
477
|
+
var S = process.platform === "win32";
|
|
478
|
+
function k(t, e) {
|
|
479
|
+
return Object.assign(new Error(`${e} ${t.command} ENOENT`), {
|
|
480
|
+
code: "ENOENT",
|
|
481
|
+
errno: "ENOENT",
|
|
482
|
+
syscall: `${e} ${t.command}`,
|
|
483
|
+
path: t.command,
|
|
484
|
+
spawnargs: t.args
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
function ae(t, e) {
|
|
488
|
+
if (!S)
|
|
489
|
+
return;
|
|
490
|
+
let n = t.emit;
|
|
491
|
+
t.emit = function(r, s) {
|
|
492
|
+
if (r === "exit") {
|
|
493
|
+
let o = xt(s, e);
|
|
494
|
+
if (o)
|
|
495
|
+
return n.call(t, "error", o);
|
|
496
|
+
}
|
|
497
|
+
return n.apply(t, arguments);
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
function xt(t, e) {
|
|
501
|
+
return S && t === 1 && !e.file ? k(e.original, "spawn") : null;
|
|
502
|
+
}
|
|
503
|
+
function le(t, e) {
|
|
504
|
+
return S && t === 1 && !e.file ? k(e.original, "spawnSync") : null;
|
|
505
|
+
}
|
|
506
|
+
vt.exports = {
|
|
507
|
+
hookChildProcess: ae,
|
|
508
|
+
verifyENOENT: xt,
|
|
509
|
+
verifyENOENTSync: le,
|
|
510
|
+
notFoundError: k
|
|
511
|
+
};
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
// node_modules/cross-spawn/index.js
|
|
515
|
+
var Ct = l((He, E) => {
|
|
516
|
+
var yt = h("child_process"), T = wt(), A = bt();
|
|
517
|
+
function _t(t, e, n) {
|
|
518
|
+
let r = T(t, e, n), s = yt.spawn(r.command, r.args, r.options);
|
|
519
|
+
return A.hookChildProcess(s, r), s;
|
|
520
|
+
}
|
|
521
|
+
function pe(t, e, n) {
|
|
522
|
+
let r = T(t, e, n), s = yt.spawnSync(r.command, r.args, r.options);
|
|
523
|
+
return s.error = s.error || A.verifyENOENTSync(s.status, r), s;
|
|
524
|
+
}
|
|
525
|
+
E.exports = _t;
|
|
526
|
+
E.exports.spawn = _t;
|
|
527
|
+
E.exports.sync = pe;
|
|
528
|
+
E.exports._parse = T;
|
|
529
|
+
E.exports._enoent = A;
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
// src/main.ts
|
|
533
|
+
Nt(Ct());
|
|
534
|
+
|
|
179
535
|
async function findup(cwd, match, options = {}) {
|
|
180
536
|
const segments = normalize(cwd).split("/");
|
|
181
537
|
while (segments.length > 0) {
|
|
@@ -187,6 +543,23 @@ async function findup(cwd, match, options = {}) {
|
|
|
187
543
|
segments.pop();
|
|
188
544
|
}
|
|
189
545
|
}
|
|
546
|
+
function parsePackageManagerField(packageManager) {
|
|
547
|
+
const [name, _version] = (packageManager || "").split("@");
|
|
548
|
+
const [version, buildMeta] = _version?.split("+") || [];
|
|
549
|
+
if (name && name !== "-" && /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(name)) {
|
|
550
|
+
return { name, version, buildMeta };
|
|
551
|
+
}
|
|
552
|
+
const sanitized = name.replace(/\W+/g, "");
|
|
553
|
+
const warnings = [
|
|
554
|
+
`Abnormal characters found in \`packageManager\` field, sanitizing from \`${name}\` to \`${sanitized}\``
|
|
555
|
+
];
|
|
556
|
+
return {
|
|
557
|
+
name: sanitized,
|
|
558
|
+
version,
|
|
559
|
+
buildMeta,
|
|
560
|
+
warnings
|
|
561
|
+
};
|
|
562
|
+
}
|
|
190
563
|
|
|
191
564
|
const packageManagers = [
|
|
192
565
|
{
|
|
@@ -208,15 +581,14 @@ const packageManagers = [
|
|
|
208
581
|
{
|
|
209
582
|
name: "yarn",
|
|
210
583
|
command: "yarn",
|
|
211
|
-
majorVersion: "1",
|
|
212
|
-
lockFile: "yarn.lock"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
name: "yarn",
|
|
216
|
-
command: "yarn",
|
|
217
|
-
majorVersion: "3",
|
|
218
584
|
lockFile: "yarn.lock",
|
|
219
585
|
files: [".yarnrc.yml"]
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
name: "deno",
|
|
589
|
+
command: "deno",
|
|
590
|
+
lockFile: "deno.lock",
|
|
591
|
+
files: ["deno.json"]
|
|
220
592
|
}
|
|
221
593
|
];
|
|
222
594
|
async function detectPackageManager(cwd, options = {}) {
|
|
@@ -230,20 +602,34 @@ async function detectPackageManager(cwd, options = {}) {
|
|
|
230
602
|
await readFile(packageJSONPath, "utf8")
|
|
231
603
|
);
|
|
232
604
|
if (packageJSON?.packageManager) {
|
|
233
|
-
const
|
|
234
|
-
const majorVersion = version.split(".")[0];
|
|
235
|
-
const packageManager = packageManagers.find(
|
|
236
|
-
(pm) => pm.name === name && pm.majorVersion === majorVersion
|
|
237
|
-
) || packageManagers.find((pm) => pm.name === name);
|
|
238
|
-
return {
|
|
239
|
-
...packageManager,
|
|
605
|
+
const {
|
|
240
606
|
name,
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
};
|
|
607
|
+
version = "0.0.0",
|
|
608
|
+
buildMeta,
|
|
609
|
+
warnings
|
|
610
|
+
} = parsePackageManagerField(packageJSON.packageManager);
|
|
611
|
+
if (name) {
|
|
612
|
+
const majorVersion = version.split(".")[0];
|
|
613
|
+
const packageManager = packageManagers.find(
|
|
614
|
+
(pm) => pm.name === name && pm.majorVersion === majorVersion
|
|
615
|
+
) || packageManagers.find((pm) => pm.name === name);
|
|
616
|
+
return {
|
|
617
|
+
name,
|
|
618
|
+
command: name,
|
|
619
|
+
version,
|
|
620
|
+
majorVersion,
|
|
621
|
+
buildMeta,
|
|
622
|
+
warnings,
|
|
623
|
+
files: packageManager?.files,
|
|
624
|
+
lockFile: packageManager?.lockFile
|
|
625
|
+
};
|
|
626
|
+
}
|
|
245
627
|
}
|
|
246
628
|
}
|
|
629
|
+
const denoJSONPath = join(path, "deno.json");
|
|
630
|
+
if (existsSync(denoJSONPath)) {
|
|
631
|
+
return packageManagers.find((pm) => pm.name === "deno");
|
|
632
|
+
}
|
|
247
633
|
}
|
|
248
634
|
if (!options.ignoreLockFile) {
|
|
249
635
|
for (const packageManager of packageManagers) {
|
|
@@ -337,7 +723,7 @@ function toArray(array) {
|
|
|
337
723
|
}
|
|
338
724
|
const compress = promisify(gzip);
|
|
339
725
|
async function getCompressedSize(code) {
|
|
340
|
-
const size = (await compress(typeof code === "string" ? code : Buffer.from(code))).length / 1024;
|
|
726
|
+
const size = (await compress(typeof code === "string" ? code : Buffer$1.from(code))).length / 1024;
|
|
341
727
|
return ` / gzip: ${size.toFixed(2)} KiB`;
|
|
342
728
|
}
|
|
343
729
|
async function printFileInfo(root, outDir, filePath, content, type, maxLength) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kirbyup",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.2.
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "3.2.1",
|
|
5
|
+
"packageManager": "pnpm@10.5.2",
|
|
6
6
|
"description": "Zero-config bundler for Kirby Panel plugins",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Johann Schopplich",
|
|
@@ -74,33 +74,39 @@
|
|
|
74
74
|
"@vitejs/plugin-vue2": "2.2.0",
|
|
75
75
|
"@vitejs/plugin-vue2-jsx": "1.1.0",
|
|
76
76
|
"@vue/compiler-sfc": "^2.7.16",
|
|
77
|
-
"c12": "^
|
|
77
|
+
"c12": "^3.0.2",
|
|
78
78
|
"cac": "^6.7.14",
|
|
79
79
|
"chokidar": "~3.6.0",
|
|
80
|
-
"consola": "^3.
|
|
81
|
-
"magic-string": "^0.30.
|
|
82
|
-
"pathe": "^
|
|
80
|
+
"consola": "^3.4.0",
|
|
81
|
+
"magic-string": "^0.30.17",
|
|
82
|
+
"pathe": "^2.0.3",
|
|
83
83
|
"perfect-debounce": "^1.0.0",
|
|
84
|
-
"postcss": "^8.
|
|
84
|
+
"postcss": "^8.5.3",
|
|
85
85
|
"postcss-dir-pseudo-class": "^9.0.1",
|
|
86
86
|
"postcss-load-config": "^6.0.1",
|
|
87
|
-
"postcss-logical": "^8.
|
|
88
|
-
"rollup-plugin-external-globals": "^0.
|
|
89
|
-
"sass": "^1.
|
|
90
|
-
"vite": "~5.4.
|
|
87
|
+
"postcss-logical": "^8.1.0",
|
|
88
|
+
"rollup-plugin-external-globals": "^0.13.0",
|
|
89
|
+
"sass": "^1.85.1",
|
|
90
|
+
"vite": "~5.4.14",
|
|
91
91
|
"vite-plugin-full-reload": "^1.2.0",
|
|
92
92
|
"vue": "^2.7.16"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@antfu/eslint-config": "^3.
|
|
96
|
-
"@types/node": "^
|
|
95
|
+
"@antfu/eslint-config": "^4.3.0",
|
|
96
|
+
"@types/node": "^22.13.5",
|
|
97
97
|
"@types/prompts": "^2.4.9",
|
|
98
|
-
"bumpp": "^
|
|
99
|
-
"eslint": "^9.
|
|
100
|
-
"fast-glob": "^3.3.
|
|
101
|
-
"nypm": "^0.
|
|
102
|
-
"typescript": "^5.
|
|
103
|
-
"unbuild": "^3.
|
|
104
|
-
"vitest": "^
|
|
98
|
+
"bumpp": "^10.0.3",
|
|
99
|
+
"eslint": "^9.21.0",
|
|
100
|
+
"fast-glob": "^3.3.3",
|
|
101
|
+
"nypm": "^0.6.0",
|
|
102
|
+
"typescript": "^5.7.3",
|
|
103
|
+
"unbuild": "^3.5.0",
|
|
104
|
+
"vitest": "^3.0.7"
|
|
105
|
+
},
|
|
106
|
+
"pnpm": {
|
|
107
|
+
"onlyBuiltDependencies": [
|
|
108
|
+
"@parcel/watcher",
|
|
109
|
+
"esbuild"
|
|
110
|
+
]
|
|
105
111
|
}
|
|
106
112
|
}
|