create-vuetify 3.2.0-beta.1 → 3.2.0-beta.2

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.
@@ -1,670 +0,0 @@
1
- #!/usr/bin/env node
2
- import { t as __exportAll } from "./rolldown-runtime-CGkscm_g.mjs";
3
- import { cwd } from "node:process";
4
- import c from "node:readline";
5
- import { existsSync } from "node:fs";
6
- import { delimiter, dirname, normalize, resolve } from "node:path";
7
- import { readFile } from "node:fs/promises";
8
- import { PassThrough } from "node:stream";
9
- import { spawn } from "node:child_process";
10
- import { createRequire as createRequire$1 } from "module";
11
- //#region ../../node_modules/.pnpm/giget@3.1.2/node_modules/giget/dist/_chunks/libs/nypm.mjs
12
- const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
13
- function normalizeWindowsPath(e = ``) {
14
- return e && e.replace(/\\/g, `/`).replace(_DRIVE_LETTER_START_RE, (e) => e.toUpperCase());
15
- }
16
- const _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, normalize$1 = function(e) {
17
- if (e.length === 0) return `.`;
18
- e = normalizeWindowsPath(e);
19
- let t = e.match(_UNC_REGEX), n = isAbsolute$1(e), r = e[e.length - 1] === `/`;
20
- return e = normalizeString(e, !n), e.length === 0 ? n ? `/` : r ? `./` : `.` : (r && (e += `/`), _DRIVE_LETTER_RE.test(e) && (e += `/`), t ? n ? `//${e}` : `//./${e}` : n && !isAbsolute$1(e) ? `/${e}` : e);
21
- }, join$1 = function(...e) {
22
- let t = ``;
23
- for (let n of e) if (n) if (t.length > 0) {
24
- let e = t[t.length - 1] === `/`, r = n[0] === `/`;
25
- e && r ? t += n.slice(1) : t += e || r ? n : `/${n}`;
26
- } else t += n;
27
- return normalize$1(t);
28
- };
29
- function cwd$1() {
30
- return typeof process < `u` && typeof process.cwd == `function` ? process.cwd().replace(/\\/g, `/`) : `/`;
31
- }
32
- const resolve$1 = function(...e) {
33
- e = e.map((e) => normalizeWindowsPath(e));
34
- let t = ``, n = !1;
35
- for (let r = e.length - 1; r >= -1 && !n; r--) {
36
- let i = r >= 0 ? e[r] : cwd$1();
37
- !i || i.length === 0 || (t = `${i}/${t}`, n = isAbsolute$1(i));
38
- }
39
- return t = normalizeString(t, !n), n && !isAbsolute$1(t) ? `/${t}` : t.length > 0 ? t : `.`;
40
- };
41
- function normalizeString(e, t) {
42
- let n = ``, r = 0, i = -1, a = 0, o = null;
43
- for (let s = 0; s <= e.length; ++s) {
44
- if (s < e.length) o = e[s];
45
- else if (o === `/`) break;
46
- else o = `/`;
47
- if (o === `/`) {
48
- if (!(i === s - 1 || a === 1)) if (a === 2) {
49
- if (n.length < 2 || r !== 2 || n[n.length - 1] !== `.` || n[n.length - 2] !== `.`) {
50
- if (n.length > 2) {
51
- let e = n.lastIndexOf(`/`);
52
- e === -1 ? (n = ``, r = 0) : (n = n.slice(0, e), r = n.length - 1 - n.lastIndexOf(`/`)), i = s, a = 0;
53
- continue;
54
- } else if (n.length > 0) {
55
- n = ``, r = 0, i = s, a = 0;
56
- continue;
57
- }
58
- }
59
- t && (n += n.length > 0 ? `/..` : `..`, r = 2);
60
- } else n.length > 0 ? n += `/${e.slice(i + 1, s)}` : n = e.slice(i + 1, s), r = s - i - 1;
61
- i = s, a = 0;
62
- } else o === `.` && a !== -1 ? ++a : a = -1;
63
- }
64
- return n;
65
- }
66
- const isAbsolute$1 = function(e) {
67
- return _IS_ABSOLUTE_RE.test(e);
68
- }, dirname$1 = function(e) {
69
- let t = normalizeWindowsPath(e).replace(/\/$/, ``).split(`/`).slice(0, -1);
70
- return t.length === 1 && _DRIVE_LETTER_RE.test(t[0]) && (t[0] += `/`), t.join(`/`) || (isAbsolute$1(e) ? `/` : `.`);
71
- }, basename$1 = function(e, t) {
72
- let n = normalizeWindowsPath(e).split(`/`), r = ``;
73
- for (let e = n.length - 1; e >= 0; e--) {
74
- let t = n[e];
75
- if (t) {
76
- r = t;
77
- break;
78
- }
79
- }
80
- return t && r.endsWith(t) ? r.slice(0, -t.length) : r;
81
- };
82
- var l = Object.create, u = Object.defineProperty, d = Object.getOwnPropertyDescriptor, f = Object.getOwnPropertyNames, p = Object.getPrototypeOf, m = Object.prototype.hasOwnProperty, h = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), g = (e, t, n, r) => {
83
- if (t && typeof t == `object` || typeof t == `function`) for (var i = f(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !m.call(e, s) && s !== n && u(e, s, {
84
- get: ((e) => t[e]).bind(null, s),
85
- enumerable: !(r = d(t, s)) || r.enumerable
86
- });
87
- return e;
88
- }, _ = (e, t, n) => (n = e == null ? {} : l(p(e)), g(t || !e || !e.__esModule ? u(n, `default`, {
89
- value: e,
90
- enumerable: !0
91
- }) : n, e)), v = createRequire$1(import.meta.url);
92
- const y = /^path$/i, b = {
93
- key: `PATH`,
94
- value: ``
95
- };
96
- function x(e) {
97
- for (let t in e) {
98
- if (!Object.prototype.hasOwnProperty.call(e, t) || !y.test(t)) continue;
99
- let n = e[t];
100
- return n ? {
101
- key: t,
102
- value: n
103
- } : b;
104
- }
105
- return b;
106
- }
107
- function S(e, t) {
108
- let n = t.value.split(delimiter), r = e, i;
109
- do
110
- n.push(resolve(r, `node_modules`, `.bin`)), i = r, r = dirname(r);
111
- while (r !== i);
112
- return {
113
- key: t.key,
114
- value: n.join(delimiter)
115
- };
116
- }
117
- function C(e, t) {
118
- let n = {
119
- ...process.env,
120
- ...t
121
- }, r = S(e, x(n));
122
- return n[r.key] = r.value, n;
123
- }
124
- const w = (e) => {
125
- let t = e.length, n = new PassThrough(), i = () => {
126
- --t === 0 && n.emit(`end`);
127
- };
128
- for (let t of e) t.pipe(n, { end: !1 }), t.on(`end`, i);
129
- return n;
130
- };
131
- var T = h((e, t) => {
132
- t.exports = a, a.sync = o;
133
- var n = v(`fs`);
134
- function r(e, t) {
135
- var n = t.pathExt === void 0 ? process.env.PATHEXT : t.pathExt;
136
- if (!n || (n = n.split(`;`), n.indexOf(``) !== -1)) return !0;
137
- for (var r = 0; r < n.length; r++) {
138
- var i = n[r].toLowerCase();
139
- if (i && e.substr(-i.length).toLowerCase() === i) return !0;
140
- }
141
- return !1;
142
- }
143
- function i(e, t, n) {
144
- return !e.isSymbolicLink() && !e.isFile() ? !1 : r(t, n);
145
- }
146
- function a(e, t, r) {
147
- n.stat(e, function(n, a) {
148
- r(n, n ? !1 : i(a, e, t));
149
- });
150
- }
151
- function o(e, t) {
152
- return i(n.statSync(e), e, t);
153
- }
154
- }), E = h((e, t) => {
155
- t.exports = r, r.sync = i;
156
- var n = v(`fs`);
157
- function r(e, t, r) {
158
- n.stat(e, function(e, n) {
159
- r(e, e ? !1 : a(n, t));
160
- });
161
- }
162
- function i(e, t) {
163
- return a(n.statSync(e), t);
164
- }
165
- function a(e, t) {
166
- return e.isFile() && o(e, t);
167
- }
168
- function o(e, t) {
169
- var n = e.mode, r = e.uid, i = e.gid, a = t.uid === void 0 ? process.getuid && process.getuid() : t.uid, o = t.gid === void 0 ? process.getgid && process.getgid() : t.gid, s = 64, L = 8, J = 1, Y = s | L;
170
- return n & J || n & L && i === o || n & s && r === a || n & Y && a === 0;
171
- }
172
- }), D = h((e, t) => {
173
- v(`fs`);
174
- var n = process.platform === `win32` || global.TESTING_WINDOWS ? T() : E();
175
- t.exports = r, r.sync = i;
176
- function r(e, t, i) {
177
- if (typeof t == `function` && (i = t, t = {}), !i) {
178
- if (typeof Promise != `function`) throw TypeError(`callback not provided`);
179
- return new Promise(function(n, i) {
180
- r(e, t || {}, function(e, t) {
181
- e ? i(e) : n(t);
182
- });
183
- });
184
- }
185
- n(e, t || {}, function(e, n) {
186
- e && (e.code === `EACCES` || t && t.ignoreErrors) && (e = null, n = !1), i(e, n);
187
- });
188
- }
189
- function i(e, t) {
190
- try {
191
- return n.sync(e, t || {});
192
- } catch (e) {
193
- if (t && t.ignoreErrors || e.code === `EACCES`) return !1;
194
- throw e;
195
- }
196
- }
197
- }), O = h((e, t) => {
198
- let n = process.platform === `win32` || process.env.OSTYPE === `cygwin` || process.env.OSTYPE === `msys`, r = v(`path`), i = n ? `;` : `:`, a = D(), o = (e) => Object.assign(Error(`not found: ${e}`), { code: `ENOENT` }), s = (e, t) => {
199
- let r = t.colon || i, a = e.match(/\//) || n && e.match(/\\/) ? [``] : [...n ? [process.cwd()] : [], ...(t.path || process.env.PATH || ``).split(r)], o = n ? t.pathExt || process.env.PATHEXT || `.EXE;.CMD;.BAT;.COM` : ``, s = n ? o.split(r) : [``];
200
- return n && e.indexOf(`.`) !== -1 && s[0] !== `` && s.unshift(``), {
201
- pathEnv: a,
202
- pathExt: s,
203
- pathExtExe: o
204
- };
205
- }, L = (e, t, n) => {
206
- typeof t == `function` && (n = t, t = {}), t ||= {};
207
- let { pathEnv: i, pathExt: L, pathExtExe: J } = s(e, t), Y = [], X = (n) => new Promise((a, s) => {
208
- if (n === i.length) return t.all && Y.length ? a(Y) : s(o(e));
209
- let L = i[n], J = /^".*"$/.test(L) ? L.slice(1, -1) : L, X = r.join(J, e);
210
- a(Z(!J && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + X : X, n, 0));
211
- }), Z = (e, n, r) => new Promise((i, o) => {
212
- if (r === L.length) return i(X(n + 1));
213
- let s = L[r];
214
- a(e + s, { pathExt: J }, (a, o) => {
215
- if (!a && o) if (t.all) Y.push(e + s);
216
- else return i(e + s);
217
- return i(Z(e, n, r + 1));
218
- });
219
- });
220
- return n ? X(0).then((e) => n(null, e), n) : X(0);
221
- };
222
- t.exports = L, L.sync = (e, t) => {
223
- t ||= {};
224
- let { pathEnv: n, pathExt: i, pathExtExe: L } = s(e, t), J = [];
225
- for (let o = 0; o < n.length; o++) {
226
- let s = n[o], Y = /^".*"$/.test(s) ? s.slice(1, -1) : s, X = r.join(Y, e), Z = !Y && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + X : X;
227
- for (let e = 0; e < i.length; e++) {
228
- let n = Z + i[e];
229
- try {
230
- if (a.sync(n, { pathExt: L })) if (t.all) J.push(n);
231
- else return n;
232
- } catch {}
233
- }
234
- }
235
- if (t.all && J.length) return J;
236
- if (t.nothrow) return null;
237
- throw o(e);
238
- };
239
- }), k = h((e, t) => {
240
- let n = (e = {}) => {
241
- let t = e.env || process.env;
242
- return (e.platform || process.platform) === `win32` ? Object.keys(t).reverse().find((e) => e.toUpperCase() === `PATH`) || `Path` : `PATH`;
243
- };
244
- t.exports = n, t.exports.default = n;
245
- }), A = h((e, t) => {
246
- let n = v(`path`), r = O(), i = k();
247
- function a(e, t) {
248
- let a = e.options.env || process.env, o = process.cwd(), s = e.options.cwd != null, L = s && process.chdir !== void 0 && !process.chdir.disabled;
249
- if (L) try {
250
- process.chdir(e.options.cwd);
251
- } catch {}
252
- let J;
253
- try {
254
- J = r.sync(e.command, {
255
- path: a[i({ env: a })],
256
- pathExt: t ? n.delimiter : void 0
257
- });
258
- } catch {} finally {
259
- L && process.chdir(o);
260
- }
261
- return J &&= n.resolve(s ? e.options.cwd : ``, J), J;
262
- }
263
- function o(e) {
264
- return a(e) || a(e, !0);
265
- }
266
- t.exports = o;
267
- }), j = h((e, t) => {
268
- let n = /([()\][%!^"`<>&|;, *?])/g;
269
- function r(e) {
270
- return e = e.replace(n, `^$1`), e;
271
- }
272
- function i(e, t) {
273
- return e = `${e}`, e = e.replace(/(\\*)"/g, `$1$1\\"`), e = e.replace(/(\\*)$/, `$1$1`), e = `"${e}"`, e = e.replace(n, `^$1`), t && (e = e.replace(n, `^$1`)), e;
274
- }
275
- t.exports.command = r, t.exports.argument = i;
276
- }), M = h((e, t) => {
277
- t.exports = /^#!(.*)/;
278
- }), N$1 = h((e, t) => {
279
- let n = M();
280
- t.exports = (e = ``) => {
281
- let t = e.match(n);
282
- if (!t) return null;
283
- let [r, i] = t[0].replace(/#! ?/, ``).split(` `), a = r.split(`/`).pop();
284
- return a === `env` ? i : i ? `${a} ${i}` : a;
285
- };
286
- }), P = h((e, t) => {
287
- let n = v(`fs`), r = N$1();
288
- function i(e) {
289
- let t = Buffer.alloc(150), i;
290
- try {
291
- i = n.openSync(e, `r`), n.readSync(i, t, 0, 150, 0), n.closeSync(i);
292
- } catch {}
293
- return r(t.toString());
294
- }
295
- t.exports = i;
296
- }), F = h((e, t) => {
297
- let n = v(`path`), r = A(), i = j(), a = P(), o = process.platform === `win32`, s = /\.(?:com|exe)$/i, L = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
298
- function J(e) {
299
- e.file = r(e);
300
- let t = e.file && a(e.file);
301
- return t ? (e.args.unshift(e.file), e.command = t, r(e)) : e.file;
302
- }
303
- function Y(e) {
304
- if (!o) return e;
305
- let t = J(e), r = !s.test(t);
306
- if (e.options.forceShell || r) {
307
- let r = L.test(t);
308
- e.command = n.normalize(e.command), e.command = i.command(e.command), e.args = e.args.map((e) => i.argument(e, r)), e.args = [
309
- `/d`,
310
- `/s`,
311
- `/c`,
312
- `"${[e.command].concat(e.args).join(` `)}"`
313
- ], e.command = process.env.comspec || `cmd.exe`, e.options.windowsVerbatimArguments = !0;
314
- }
315
- return e;
316
- }
317
- function X(e, t, n) {
318
- t && !Array.isArray(t) && (n = t, t = null), t = t ? t.slice(0) : [], n = Object.assign({}, n);
319
- let r = {
320
- command: e,
321
- args: t,
322
- options: n,
323
- file: void 0,
324
- original: {
325
- command: e,
326
- args: t
327
- }
328
- };
329
- return n.shell ? r : Y(r);
330
- }
331
- t.exports = X;
332
- }), I = h((e, t) => {
333
- let n = process.platform === `win32`;
334
- function r(e, t) {
335
- return Object.assign(Error(`${t} ${e.command} ENOENT`), {
336
- code: `ENOENT`,
337
- errno: `ENOENT`,
338
- syscall: `${t} ${e.command}`,
339
- path: e.command,
340
- spawnargs: e.args
341
- });
342
- }
343
- function i(e, t) {
344
- if (!n) return;
345
- let r = e.emit;
346
- e.emit = function(n, i) {
347
- if (n === `exit`) {
348
- let n = a(i, t, `spawn`);
349
- if (n) return r.call(e, `error`, n);
350
- }
351
- return r.apply(e, arguments);
352
- };
353
- }
354
- function a(e, t) {
355
- return n && e === 1 && !t.file ? r(t.original, `spawn`) : null;
356
- }
357
- function o(e, t) {
358
- return n && e === 1 && !t.file ? r(t.original, `spawnSync`) : null;
359
- }
360
- t.exports = {
361
- hookChildProcess: i,
362
- verifyENOENT: a,
363
- verifyENOENTSync: o,
364
- notFoundError: r
365
- };
366
- }), R = _(h((e, t) => {
367
- let n = v(`child_process`), r = F(), i = I();
368
- function a(e, t, a) {
369
- let o = r(e, t, a), s = n.spawn(o.command, o.args, o.options);
370
- return i.hookChildProcess(s, o), s;
371
- }
372
- function o(e, t, a) {
373
- let o = r(e, t, a), s = n.spawnSync(o.command, o.args, o.options);
374
- return s.error = s.error || i.verifyENOENTSync(s.status, o), s;
375
- }
376
- t.exports = a, t.exports.spawn = a, t.exports.sync = o, t.exports._parse = r, t.exports._enoent = i;
377
- })(), 1), z = class extends Error {
378
- result;
379
- output;
380
- get exitCode() {
381
- if (this.result.exitCode !== null) return this.result.exitCode;
382
- }
383
- constructor(e, t) {
384
- super(`Process exited with non-zero status (${e.exitCode})`), this.result = e, this.output = t;
385
- }
386
- };
387
- const B = {
388
- timeout: void 0,
389
- persist: !1
390
- }, V = { windowsHide: !0 };
391
- function H(e, t) {
392
- return {
393
- command: normalize(e),
394
- args: t ?? []
395
- };
396
- }
397
- function U(e) {
398
- let t = new AbortController();
399
- for (let n of e) {
400
- if (n.aborted) return t.abort(), n;
401
- n.addEventListener(`abort`, () => {
402
- t.abort(n.reason);
403
- }, { signal: t.signal });
404
- }
405
- return t.signal;
406
- }
407
- async function W(e) {
408
- let t = ``;
409
- for await (let n of e) t += n.toString();
410
- return t;
411
- }
412
- var G = class {
413
- _process;
414
- _aborted = !1;
415
- _options;
416
- _command;
417
- _args;
418
- _resolveClose;
419
- _processClosed;
420
- _thrownError;
421
- get process() {
422
- return this._process;
423
- }
424
- get pid() {
425
- return this._process?.pid;
426
- }
427
- get exitCode() {
428
- if (this._process && this._process.exitCode !== null) return this._process.exitCode;
429
- }
430
- constructor(e, t, n) {
431
- this._options = {
432
- ...B,
433
- ...n
434
- }, this._command = e, this._args = t ?? [], this._processClosed = new Promise((e) => {
435
- this._resolveClose = e;
436
- });
437
- }
438
- kill(e) {
439
- return this._process?.kill(e) === !0;
440
- }
441
- get aborted() {
442
- return this._aborted;
443
- }
444
- get killed() {
445
- return this._process?.killed === !0;
446
- }
447
- pipe(e, t, n) {
448
- return q(e, t, {
449
- ...n,
450
- stdin: this
451
- });
452
- }
453
- async *[Symbol.asyncIterator]() {
454
- let e = this._process;
455
- if (!e) return;
456
- let t = [];
457
- this._streamErr && t.push(this._streamErr), this._streamOut && t.push(this._streamOut);
458
- let n = w(t), r = c.createInterface({ input: n });
459
- for await (let e of r) yield e.toString();
460
- if (await this._processClosed, e.removeAllListeners(), this._thrownError) throw this._thrownError;
461
- if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z(this);
462
- }
463
- async _waitForOutput() {
464
- let e = this._process;
465
- if (!e) throw Error(`No process was started`);
466
- let [t, n] = await Promise.all([this._streamOut ? W(this._streamOut) : ``, this._streamErr ? W(this._streamErr) : ``]);
467
- if (await this._processClosed, this._options?.stdin && await this._options.stdin, e.removeAllListeners(), this._thrownError) throw this._thrownError;
468
- let r = {
469
- stderr: n,
470
- stdout: t,
471
- exitCode: this.exitCode
472
- };
473
- if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z(this, r);
474
- return r;
475
- }
476
- then(e, t) {
477
- return this._waitForOutput().then(e, t);
478
- }
479
- _streamOut;
480
- _streamErr;
481
- spawn() {
482
- let e = cwd(), t = this._options, n = {
483
- ...V,
484
- ...t.nodeOptions
485
- }, r = [];
486
- this._resetState(), t.timeout !== void 0 && r.push(AbortSignal.timeout(t.timeout)), t.signal !== void 0 && r.push(t.signal), t.persist === !0 && (n.detached = !0), r.length > 0 && (n.signal = U(r)), n.env = C(e, n.env);
487
- let { command: a, args: o } = H(this._command, this._args), s = (0, R._parse)(a, o, n), L = spawn(s.command, s.args, s.options);
488
- if (L.stderr && (this._streamErr = L.stderr), L.stdout && (this._streamOut = L.stdout), this._process = L, L.once(`error`, this._onError), L.once(`close`, this._onClose), t.stdin !== void 0 && L.stdin && t.stdin.process) {
489
- let { stdout: e } = t.stdin.process;
490
- e && e.pipe(L.stdin);
491
- }
492
- }
493
- _resetState() {
494
- this._aborted = !1, this._processClosed = new Promise((e) => {
495
- this._resolveClose = e;
496
- }), this._thrownError = void 0;
497
- }
498
- _onError = (e) => {
499
- if (e.name === `AbortError` && (!(e.cause instanceof Error) || e.cause.name !== `TimeoutError`)) {
500
- this._aborted = !0;
501
- return;
502
- }
503
- this._thrownError = e;
504
- };
505
- _onClose = () => {
506
- this._resolveClose && this._resolveClose();
507
- };
508
- };
509
- const K = (e, t, n) => {
510
- let r = new G(e, t, n);
511
- return r.spawn(), r;
512
- }, q = K;
513
- var dist_exports = __exportAll({
514
- detectPackageManager: () => detectPackageManager,
515
- installDependencies: () => installDependencies,
516
- packageManagers: () => packageManagers
517
- });
518
- async function findup(e, t, n = {}) {
519
- let r = normalize$1(e).split(`/`);
520
- for (; r.length > 0;) {
521
- let e = await t(r.join(`/`) || `/`);
522
- if (e || !n.includeParentDirs) return e;
523
- r.pop();
524
- }
525
- }
526
- function cached(e) {
527
- let t;
528
- return () => (t === void 0 && (t = e().then((e) => (t = e, t))), t);
529
- }
530
- const hasCorepack = cached(async () => {
531
- if (globalThis.process?.versions?.webcontainer) return !1;
532
- try {
533
- let { exitCode: e } = await K(`corepack`, [`--version`]);
534
- return e === 0;
535
- } catch {
536
- return !1;
537
- }
538
- });
539
- async function executeCommand(e, t, n = {}) {
540
- let r = e !== `npm` && e !== `bun` && e !== `deno` && n.corepack !== !1 && await hasCorepack() ? [`corepack`, [e, ...t]] : [e, t], { exitCode: i, stdout: a, stderr: o } = await K(r[0], r[1], { nodeOptions: {
541
- cwd: resolve$1(n.cwd || process.cwd()),
542
- env: n.env,
543
- stdio: n.silent ? `pipe` : `inherit`
544
- } });
545
- if (i !== 0) throw Error(`\`${r.flat().join(` `)}\` failed.${n.silent ? [
546
- ``,
547
- a,
548
- o
549
- ].join(`
550
- `) : ``}`);
551
- }
552
- async function resolveOperationOptions(e = {}) {
553
- let t = e.cwd || process.cwd(), n = {
554
- ...process.env,
555
- ...e.env
556
- }, r = (typeof e.packageManager == `string` ? packageManagers.find((t) => t.name === e.packageManager) : e.packageManager) || await detectPackageManager(e.cwd || process.cwd());
557
- if (!r) throw Error(`No package manager auto-detected.`);
558
- return {
559
- cwd: t,
560
- env: n,
561
- silent: e.silent ?? !1,
562
- packageManager: r,
563
- dev: e.dev ?? !1,
564
- workspace: e.workspace,
565
- global: e.global ?? !1,
566
- dry: e.dry ?? !1,
567
- corepack: e.corepack ?? !0
568
- };
569
- }
570
- function parsePackageManagerField(e) {
571
- let [t, n] = (e || ``).split(`@`), [r, i] = n?.split(`+`) || [];
572
- if (t && t !== `-` && /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(t)) return {
573
- name: t,
574
- version: r,
575
- buildMeta: i
576
- };
577
- let a = (t || ``).replace(/\W+/g, ``);
578
- return {
579
- name: a,
580
- version: r,
581
- buildMeta: i,
582
- warnings: [`Abnormal characters found in \`packageManager\` field, sanitizing from \`${t}\` to \`${a}\``]
583
- };
584
- }
585
- const packageManagers = [
586
- {
587
- name: `npm`,
588
- command: `npm`,
589
- lockFile: `package-lock.json`
590
- },
591
- {
592
- name: `pnpm`,
593
- command: `pnpm`,
594
- lockFile: `pnpm-lock.yaml`,
595
- files: [`pnpm-workspace.yaml`]
596
- },
597
- {
598
- name: `bun`,
599
- command: `bun`,
600
- lockFile: [`bun.lockb`, `bun.lock`]
601
- },
602
- {
603
- name: `yarn`,
604
- command: `yarn`,
605
- lockFile: `yarn.lock`,
606
- files: [`.yarnrc.yml`]
607
- },
608
- {
609
- name: `deno`,
610
- command: `deno`,
611
- lockFile: `deno.lock`,
612
- files: [`deno.json`]
613
- }
614
- ];
615
- async function detectPackageManager(e, r = {}) {
616
- let i = await findup(resolve$1(e || `.`), async (e) => {
617
- if (!r.ignorePackageJSON) {
618
- let r = join$1(e, `package.json`);
619
- if (existsSync(r)) {
620
- let e = JSON.parse(await readFile(r, `utf8`));
621
- if (e?.packageManager) {
622
- let { name: t, version: n = `0.0.0`, buildMeta: r, warnings: i } = parsePackageManagerField(e.packageManager);
623
- if (t) {
624
- let e = n.split(`.`)[0], a = packageManagers.find((n) => n.name === t && n.majorVersion === e) || packageManagers.find((e) => e.name === t);
625
- return {
626
- name: t,
627
- command: t,
628
- version: n,
629
- majorVersion: e,
630
- buildMeta: r,
631
- warnings: i,
632
- files: a?.files,
633
- lockFile: a?.lockFile
634
- };
635
- }
636
- }
637
- }
638
- if (existsSync(join$1(e, `deno.json`))) return packageManagers.find((e) => e.name === `deno`);
639
- }
640
- if (!r.ignoreLockFile) {
641
- for (let t of packageManagers) if ([t.lockFile, t.files].flat().filter(Boolean).some((t) => existsSync(resolve$1(e, t)))) return { ...t };
642
- }
643
- }, { includeParentDirs: r.includeParentDirs ?? !0 });
644
- if (!i && !r.ignoreArgv) {
645
- let e = process.argv[1];
646
- if (e) {
647
- for (let t of packageManagers) if (RegExp(`[/\\\\]\\.?${t.command}`).test(e)) return t;
648
- }
649
- }
650
- return i;
651
- }
652
- async function installDependencies(e = {}) {
653
- let t = await resolveOperationOptions(e), n = e.frozenLockFile ? {
654
- npm: [`ci`],
655
- yarn: [`install`, `--immutable`],
656
- bun: [`install`, `--frozen-lockfile`],
657
- pnpm: [`install`, `--frozen-lockfile`],
658
- deno: [`install`, `--frozen`]
659
- }[t.packageManager.name] : [`install`];
660
- return e.ignoreWorkspace && t.packageManager.name === `pnpm` && n.push(`--ignore-workspace`), t.dry || await executeCommand(t.packageManager.command, n, {
661
- cwd: t.cwd,
662
- silent: t.silent,
663
- corepack: t.corepack
664
- }), { exec: {
665
- command: t.packageManager.command,
666
- args: n
667
- } };
668
- }
669
- //#endregion
670
- export { resolve$1 as i, dirname$1 as n, dist_exports as r, basename$1 as t };
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { r as dist_exports } from "./nypm-CKxLPI3I.mjs";
3
- export { dist_exports as t };
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env node
2
- //#region ../../node_modules/.pnpm/giget@3.1.2/node_modules/giget/dist/_chunks/rolldown-runtime.mjs
3
- var __defProp = Object.defineProperty;
4
- var __exportAll = (all, symbols) => {
5
- let target = {};
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
11
- return target;
12
- };
13
- //#endregion
14
- export { __exportAll as t };