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