@vuetify/cli 1.1.5-beta.2 → 1.1.5
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/index.mjs +398 -366
- package/dist/{tar-CDUmqXZq.mjs → tar-CdTjip02.mjs} +30 -30
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -13,8 +13,8 @@ import path, { delimiter, dirname, isAbsolute, join, normalize, resolve } from "
|
|
|
13
13
|
import fs$1, { constants, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
14
14
|
import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
|
|
15
15
|
import v8 from "node:v8";
|
|
16
|
-
import * as nativeFs from "fs";
|
|
17
|
-
import
|
|
16
|
+
import * as nativeFs$1 from "fs";
|
|
17
|
+
import nativeFs from "fs";
|
|
18
18
|
import path$1, { basename as basename$1, dirname as dirname$1, normalize as normalize$1, posix as posix$1, relative, resolve as resolve$1, sep } from "path";
|
|
19
19
|
import { fileURLToPath as fileURLToPath$1 } from "url";
|
|
20
20
|
import { createRequire as createRequire$1 } from "module";
|
|
@@ -9848,7 +9848,8 @@ var en_default = {
|
|
|
9848
9848
|
"done": "Done!"
|
|
9849
9849
|
},
|
|
9850
9850
|
"upgrade": {
|
|
9851
|
-
"description": "Upgrade %{pkg} to latest version",
|
|
9851
|
+
"description": "[deprecated] Upgrade %{pkg} to latest version",
|
|
9852
|
+
"deprecated": "This command is deprecated and may be removed in a future release.",
|
|
9852
9853
|
"not_global": "%{pkg} is not installed globally.",
|
|
9853
9854
|
"start": "Upgrading %{pkg} globally using nypm...",
|
|
9854
9855
|
"success": "Successfully upgraded %{pkg} to latest.",
|
|
@@ -9884,7 +9885,13 @@ var en_default = {
|
|
|
9884
9885
|
"save": "Do you want to save these settings as a preset?",
|
|
9885
9886
|
"name": "Preset name (display name):",
|
|
9886
9887
|
"overwrite": "Preset \"%{name}\" already exists. Do you want to overwrite it?",
|
|
9887
|
-
"saved": "Preset saved to %{path}"
|
|
9888
|
+
"saved": "Preset saved to %{path}",
|
|
9889
|
+
"usage": "Next time you can use: --preset %{slug}\nTip: run the \"presets\" command to list and use saved presets.",
|
|
9890
|
+
"start_select": "Start from a preset?",
|
|
9891
|
+
"start_scratch": {
|
|
9892
|
+
"label": "Start from scratch",
|
|
9893
|
+
"hint": "Manually select options"
|
|
9894
|
+
}
|
|
9888
9895
|
},
|
|
9889
9896
|
"directory": {
|
|
9890
9897
|
"name": "Project name",
|
|
@@ -10023,7 +10030,7 @@ var en_default = {
|
|
|
10023
10030
|
"platform": { "description": "The framework to use" },
|
|
10024
10031
|
"verbose": { "description": "Output verbose logs" },
|
|
10025
10032
|
"version": { "description": "The Vuetify version to check documentation for" },
|
|
10026
|
-
"preset": { "description": "
|
|
10033
|
+
"preset": { "description": "Preset key/name or path to a preset file (see: presets)" }
|
|
10027
10034
|
},
|
|
10028
10035
|
cli: {
|
|
10029
10036
|
"main": { "description": "Unified CLI for Vuetify" },
|
|
@@ -10034,7 +10041,11 @@ var en_default = {
|
|
|
10034
10041
|
utils: { "update_check": {
|
|
10035
10042
|
"available": "Update available!",
|
|
10036
10043
|
"run_update": "Run %{command} to update",
|
|
10037
|
-
"run_with": "Run with %{command}"
|
|
10044
|
+
"run_with": "Run with %{command}",
|
|
10045
|
+
"update_to_continue": "Update now to continue?",
|
|
10046
|
+
"updating": "Updating...",
|
|
10047
|
+
"updated": "Updated.",
|
|
10048
|
+
"rerun": "Please re-run the command to continue."
|
|
10038
10049
|
} }
|
|
10039
10050
|
};
|
|
10040
10051
|
|
|
@@ -10099,7 +10110,8 @@ var ru_default = {
|
|
|
10099
10110
|
"done": "Готово!"
|
|
10100
10111
|
},
|
|
10101
10112
|
"upgrade": {
|
|
10102
|
-
"description": "Обновить %{pkg} до последней версии",
|
|
10113
|
+
"description": "[устарело] Обновить %{pkg} до последней версии",
|
|
10114
|
+
"deprecated": "Эта команда устарела и может быть удалена в будущих релизах.",
|
|
10103
10115
|
"not_global": "%{pkg} не установлен глобально.",
|
|
10104
10116
|
"start": "Обновляем %{pkg}",
|
|
10105
10117
|
"success": "Успешно обновлен %{pkg} до последней версии.",
|
|
@@ -10130,7 +10142,13 @@ var ru_default = {
|
|
|
10130
10142
|
"save": "Хотите сохранить эти настройки как пресет?",
|
|
10131
10143
|
"name": "Имя пресета (отображаемое имя):",
|
|
10132
10144
|
"overwrite": "Пресет \"%{name}\" уже существует. Перезаписать?",
|
|
10133
|
-
"saved": "Пресет сохранен в %{path}"
|
|
10145
|
+
"saved": "Пресет сохранен в %{path}",
|
|
10146
|
+
"usage": "В следующий раз можно использовать: --preset %{slug}\nПодсказка: команда \"presets\" покажет список сохранённых пресетов.",
|
|
10147
|
+
"start_select": "Начать с пресета?",
|
|
10148
|
+
"start_scratch": {
|
|
10149
|
+
"label": "Настроить вручную",
|
|
10150
|
+
"hint": "Выбрать параметры в мастере"
|
|
10151
|
+
}
|
|
10134
10152
|
},
|
|
10135
10153
|
"directory": {
|
|
10136
10154
|
"name": "Название проекта",
|
|
@@ -10272,7 +10290,7 @@ var ru_default = {
|
|
|
10272
10290
|
"type": { "description": "Версия Vuetify для использования" },
|
|
10273
10291
|
"platform": { "description": "Фреймворк для использования" },
|
|
10274
10292
|
"verbose": { "description": "Вывести подробные логи" },
|
|
10275
|
-
"preset": { "description": "
|
|
10293
|
+
"preset": { "description": "Ключ/имя пресета или путь к файлу пресета (см. presets)" },
|
|
10276
10294
|
"version": { "description": "Версия Vuetify для просмотра документации" }
|
|
10277
10295
|
},
|
|
10278
10296
|
cli: {
|
|
@@ -10284,7 +10302,11 @@ var ru_default = {
|
|
|
10284
10302
|
utils: { "update_check": {
|
|
10285
10303
|
"available": "Доступно обновление!",
|
|
10286
10304
|
"run_update": "Выполните %{command}, чтобы обновить",
|
|
10287
|
-
"run_with": "Выполните %{command}"
|
|
10305
|
+
"run_with": "Выполните %{command}",
|
|
10306
|
+
"update_to_continue": "Обновить сейчас, чтобы продолжить?",
|
|
10307
|
+
"updating": "Обновляю...",
|
|
10308
|
+
"updated": "Обновлено.",
|
|
10309
|
+
"rerun": "Перезапустите команду, чтобы продолжить."
|
|
10288
10310
|
} }
|
|
10289
10311
|
};
|
|
10290
10312
|
|
|
@@ -15539,7 +15561,7 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
|
15539
15561
|
return finalizeResolution(resolved, base, preserveSymlinks);
|
|
15540
15562
|
}
|
|
15541
15563
|
const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]);
|
|
15542
|
-
const isWindows
|
|
15564
|
+
const isWindows = process.platform === "win32";
|
|
15543
15565
|
const globalCache = globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map();
|
|
15544
15566
|
/**
|
|
15545
15567
|
* Synchronously resolves a module url based on the options provided.
|
|
@@ -15626,7 +15648,7 @@ function resolveModulePath(id, options) {
|
|
|
15626
15648
|
if (!resolved) return;
|
|
15627
15649
|
if (!resolved.startsWith("file://") && options?.try) return;
|
|
15628
15650
|
const absolutePath = fileURLToPath(resolved);
|
|
15629
|
-
return isWindows
|
|
15651
|
+
return isWindows ? _normalizeWinPath(absolutePath) : absolutePath;
|
|
15630
15652
|
}
|
|
15631
15653
|
function _tryModuleResolve(specifier, base, conditions) {
|
|
15632
15654
|
try {
|
|
@@ -16132,7 +16154,7 @@ var Walker = class {
|
|
|
16132
16154
|
symlinks: /* @__PURE__ */ new Map(),
|
|
16133
16155
|
visited: [""].slice(0, 0),
|
|
16134
16156
|
controller: new Aborter(),
|
|
16135
|
-
fs: options.fs || nativeFs
|
|
16157
|
+
fs: options.fs || nativeFs$1
|
|
16136
16158
|
};
|
|
16137
16159
|
this.joinPath = build$7(this.root, options);
|
|
16138
16160
|
this.pushDirectory = build$6(this.root, options);
|
|
@@ -18252,12 +18274,12 @@ function getCrawler(patterns, inputOptions = {}) {
|
|
|
18252
18274
|
return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
|
|
18253
18275
|
},
|
|
18254
18276
|
fs: options.fs ? {
|
|
18255
|
-
readdir: options.fs.readdir ||
|
|
18256
|
-
readdirSync: options.fs.readdirSync ||
|
|
18257
|
-
realpath: options.fs.realpath ||
|
|
18258
|
-
realpathSync: options.fs.realpathSync ||
|
|
18259
|
-
stat: options.fs.stat ||
|
|
18260
|
-
statSync: options.fs.statSync ||
|
|
18277
|
+
readdir: options.fs.readdir || nativeFs.readdir,
|
|
18278
|
+
readdirSync: options.fs.readdirSync || nativeFs.readdirSync,
|
|
18279
|
+
realpath: options.fs.realpath || nativeFs.realpath,
|
|
18280
|
+
realpathSync: options.fs.realpathSync || nativeFs.realpathSync,
|
|
18281
|
+
stat: options.fs.stat || nativeFs.stat,
|
|
18282
|
+
statSync: options.fs.statSync || nativeFs.statSync
|
|
18261
18283
|
} : void 0,
|
|
18262
18284
|
pathSeparator: "/",
|
|
18263
18285
|
relativePaths: true,
|
|
@@ -125473,7 +125495,7 @@ const black = kolorist(30, 39);
|
|
|
125473
125495
|
const red = kolorist(31, 39);
|
|
125474
125496
|
const green = kolorist(32, 39);
|
|
125475
125497
|
const yellow = kolorist(33, 39);
|
|
125476
|
-
const blue$
|
|
125498
|
+
const blue$5 = kolorist(34, 39);
|
|
125477
125499
|
const magenta = kolorist(35, 39);
|
|
125478
125500
|
const cyan = kolorist(36, 39);
|
|
125479
125501
|
const white = kolorist(97, 39);
|
|
@@ -126549,7 +126571,7 @@ const colorfulBanner = ` [38;5;8m [38;5;111m\`[38;5;111m$[38;5;111m$[38;5;1
|
|
|
126549
126571
|
[38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;25m [38;5;25m\`[38;5;25mT[38;5;33m:[38;5;33m [38;5;7m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;7m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m [38;5;8m
|
|
126550
126572
|
[0m`;
|
|
126551
126573
|
const unstyledBanner = stripColors(colorfulBanner);
|
|
126552
|
-
const coloredBanner = blue$
|
|
126574
|
+
const coloredBanner = blue$5(unstyledBanner);
|
|
126553
126575
|
function createBanner() {
|
|
126554
126576
|
if (!options.enabled) return unstyledBanner;
|
|
126555
126577
|
else if (options.supportLevel < 2) return coloredBanner;
|
|
@@ -126557,6 +126579,71 @@ function createBanner() {
|
|
|
126557
126579
|
}
|
|
126558
126580
|
const banner = createBanner();
|
|
126559
126581
|
|
|
126582
|
+
//#endregion
|
|
126583
|
+
//#region ../shared/src/utils/presets.ts
|
|
126584
|
+
function getCreatePresetsDir() {
|
|
126585
|
+
return join$1(homedir(), ".vuetify", "create", "presets");
|
|
126586
|
+
}
|
|
126587
|
+
function listUserPresets() {
|
|
126588
|
+
const presetsDir = getCreatePresetsDir();
|
|
126589
|
+
const files = existsSync(presetsDir) ? readdirSync(presetsDir).filter((f) => f.endsWith(".json")) : [];
|
|
126590
|
+
const entries = [];
|
|
126591
|
+
for (const file of files) {
|
|
126592
|
+
const path = join$1(presetsDir, file);
|
|
126593
|
+
const slug = file.replace(/\.json$/, "");
|
|
126594
|
+
try {
|
|
126595
|
+
const content = readFileSync(path, "utf8");
|
|
126596
|
+
const preset = JSON.parse(content);
|
|
126597
|
+
const displayName = preset.meta?.displayName || slug;
|
|
126598
|
+
entries.push({
|
|
126599
|
+
file,
|
|
126600
|
+
path,
|
|
126601
|
+
invalid: false,
|
|
126602
|
+
slug,
|
|
126603
|
+
displayName,
|
|
126604
|
+
preset
|
|
126605
|
+
});
|
|
126606
|
+
} catch {
|
|
126607
|
+
entries.push({
|
|
126608
|
+
file,
|
|
126609
|
+
path,
|
|
126610
|
+
invalid: true,
|
|
126611
|
+
slug,
|
|
126612
|
+
displayName: slug
|
|
126613
|
+
});
|
|
126614
|
+
}
|
|
126615
|
+
}
|
|
126616
|
+
return entries;
|
|
126617
|
+
}
|
|
126618
|
+
function resolvePresetPath(input) {
|
|
126619
|
+
const presetPath = resolve$2(input);
|
|
126620
|
+
if (existsSync(presetPath)) return presetPath;
|
|
126621
|
+
const home = homedir();
|
|
126622
|
+
const presetName = input.endsWith(".json") ? input : `${input}.json`;
|
|
126623
|
+
const createPresetsDir = join$1(home, ".vuetify", "create", "presets");
|
|
126624
|
+
const createPresetPath = join$1(createPresetsDir, presetName);
|
|
126625
|
+
if (existsSync(createPresetPath)) return createPresetPath;
|
|
126626
|
+
const slug = slugify(input);
|
|
126627
|
+
const createSlugPath = join$1(createPresetsDir, `${slug}.json`);
|
|
126628
|
+
if (existsSync(createSlugPath)) return createSlugPath;
|
|
126629
|
+
const legacyPresetsDir = join$1(home, ".vuetify", "presets");
|
|
126630
|
+
const legacyPresetPath = join$1(legacyPresetsDir, presetName);
|
|
126631
|
+
if (existsSync(legacyPresetPath)) return legacyPresetPath;
|
|
126632
|
+
const legacySlugPath = join$1(legacyPresetsDir, `${slug}.json`);
|
|
126633
|
+
if (existsSync(legacySlugPath)) return legacySlugPath;
|
|
126634
|
+
}
|
|
126635
|
+
function loadPreset(input) {
|
|
126636
|
+
if (standardPresets[input]) return standardPresets[input];
|
|
126637
|
+
const path = resolvePresetPath(input);
|
|
126638
|
+
if (!path) return;
|
|
126639
|
+
try {
|
|
126640
|
+
const content = readFileSync(path, "utf8");
|
|
126641
|
+
return JSON.parse(content);
|
|
126642
|
+
} catch {
|
|
126643
|
+
return;
|
|
126644
|
+
}
|
|
126645
|
+
}
|
|
126646
|
+
|
|
126560
126647
|
//#endregion
|
|
126561
126648
|
//#region ../../node_modules/.pnpm/giget@3.1.2/node_modules/giget/dist/_chunks/giget.mjs
|
|
126562
126649
|
async function download(url, filePath, options = {}) {
|
|
@@ -126770,7 +126857,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
126770
126857
|
await mkdir(extractPath, { recursive: true });
|
|
126771
126858
|
const s = Date.now();
|
|
126772
126859
|
const subdir = template.subdir?.replace(/^\//, "") || "";
|
|
126773
|
-
const { extract } = await import("./tar-
|
|
126860
|
+
const { extract } = await import("./tar-CdTjip02.mjs").then((n) => n.t);
|
|
126774
126861
|
await extract({
|
|
126775
126862
|
file: tarPath,
|
|
126776
126863
|
cwd: extractPath,
|
|
@@ -126797,18 +126884,6 @@ async function downloadTemplate(input, options = {}) {
|
|
|
126797
126884
|
};
|
|
126798
126885
|
}
|
|
126799
126886
|
|
|
126800
|
-
//#endregion
|
|
126801
|
-
//#region ../shared/src/features/css-none.ts
|
|
126802
|
-
const cssNone = {
|
|
126803
|
-
name: "css-none",
|
|
126804
|
-
apply: async ({ cwd, isNuxt }) => {
|
|
126805
|
-
const unocssConfigs = [join$1(cwd, "unocss.config.ts"), join$1(cwd, "uno.config.ts")];
|
|
126806
|
-
for (const configPath of unocssConfigs) if (existsSync(configPath)) rmSync(configPath);
|
|
126807
|
-
const tailwindCss = isNuxt ? join$1(cwd, "app/assets/css/tailwind.css") : join$1(cwd, "src/tailwind.css");
|
|
126808
|
-
if (existsSync(tailwindCss)) rmSync(tailwindCss);
|
|
126809
|
-
}
|
|
126810
|
-
};
|
|
126811
|
-
|
|
126812
126887
|
//#endregion
|
|
126813
126888
|
//#region ../../node_modules/.pnpm/@babel+parser@7.29.0/node_modules/@babel/parser/lib/index.js
|
|
126814
126889
|
var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
@@ -147791,6 +147866,49 @@ function insertPluginIntoConfig(plugin, config) {
|
|
|
147791
147866
|
config.plugins.splice(insertionIndex, 0, plugin.options ? builders.functionCall(plugin.constructor, plugin.options) : builders.functionCall(plugin.constructor));
|
|
147792
147867
|
}
|
|
147793
147868
|
|
|
147869
|
+
//#endregion
|
|
147870
|
+
//#region ../shared/src/features/client-hints.ts
|
|
147871
|
+
const nuxtClientHints = {
|
|
147872
|
+
name: "client-hints",
|
|
147873
|
+
apply: async ({ cwd, isNuxt }) => {
|
|
147874
|
+
if (!isNuxt) return;
|
|
147875
|
+
const configPath = join$1(cwd, "nuxt.config.ts");
|
|
147876
|
+
const mod = await loadFile(configPath);
|
|
147877
|
+
const options = getDefaultExportOptions(mod);
|
|
147878
|
+
if (options) {
|
|
147879
|
+
options.vuetify ??= {};
|
|
147880
|
+
options.vuetify.moduleOptions ??= {};
|
|
147881
|
+
options.vuetify.moduleOptions.ssrClientHints = {
|
|
147882
|
+
reloadOnFirstRequest: false,
|
|
147883
|
+
viewportSize: true,
|
|
147884
|
+
prefersColorScheme: true,
|
|
147885
|
+
prefersReducedMotion: true,
|
|
147886
|
+
prefersColorSchemeOptions: { useBrowserThemeOnly: false }
|
|
147887
|
+
};
|
|
147888
|
+
options.vuetify.vuetifyOptions ??= {};
|
|
147889
|
+
options.vuetify.vuetifyOptions.theme ??= {};
|
|
147890
|
+
options.vuetify.vuetifyOptions.theme.defaultTheme = "dark";
|
|
147891
|
+
options.vuetify.vuetifyOptions.theme.themes = {
|
|
147892
|
+
light: {},
|
|
147893
|
+
dark: {}
|
|
147894
|
+
};
|
|
147895
|
+
}
|
|
147896
|
+
await writeFile(configPath, mod.generate().code);
|
|
147897
|
+
}
|
|
147898
|
+
};
|
|
147899
|
+
|
|
147900
|
+
//#endregion
|
|
147901
|
+
//#region ../shared/src/features/css-none.ts
|
|
147902
|
+
const cssNone = {
|
|
147903
|
+
name: "css-none",
|
|
147904
|
+
apply: async ({ cwd, isNuxt }) => {
|
|
147905
|
+
const unocssConfigs = [join$1(cwd, "unocss.config.ts"), join$1(cwd, "uno.config.ts")];
|
|
147906
|
+
for (const configPath of unocssConfigs) if (existsSync(configPath)) rmSync(configPath);
|
|
147907
|
+
const tailwindCss = isNuxt ? join$1(cwd, "app/assets/css/tailwind.css") : join$1(cwd, "src/tailwind.css");
|
|
147908
|
+
if (existsSync(tailwindCss)) rmSync(tailwindCss);
|
|
147909
|
+
}
|
|
147910
|
+
};
|
|
147911
|
+
|
|
147794
147912
|
//#endregion
|
|
147795
147913
|
//#region ../shared/src/features/dependencies/package.json
|
|
147796
147914
|
var dependencies = {
|
|
@@ -148019,37 +148137,6 @@ const mcp = {
|
|
|
148019
148137
|
}
|
|
148020
148138
|
};
|
|
148021
148139
|
|
|
148022
|
-
//#endregion
|
|
148023
|
-
//#region ../shared/src/features/client-hints.ts
|
|
148024
|
-
const nuxtClientHints = {
|
|
148025
|
-
name: "client-hints",
|
|
148026
|
-
apply: async ({ cwd, isNuxt }) => {
|
|
148027
|
-
if (!isNuxt) return;
|
|
148028
|
-
const configPath = join$1(cwd, "nuxt.config.ts");
|
|
148029
|
-
const mod = await loadFile(configPath);
|
|
148030
|
-
const options = getDefaultExportOptions(mod);
|
|
148031
|
-
if (options) {
|
|
148032
|
-
options.vuetify ??= {};
|
|
148033
|
-
options.vuetify.moduleOptions ??= {};
|
|
148034
|
-
options.vuetify.moduleOptions.ssrClientHints = {
|
|
148035
|
-
reloadOnFirstRequest: false,
|
|
148036
|
-
viewportSize: true,
|
|
148037
|
-
prefersColorScheme: true,
|
|
148038
|
-
prefersReducedMotion: true,
|
|
148039
|
-
prefersColorSchemeOptions: { useBrowserThemeOnly: false }
|
|
148040
|
-
};
|
|
148041
|
-
options.vuetify.vuetifyOptions ??= {};
|
|
148042
|
-
options.vuetify.vuetifyOptions.theme ??= {};
|
|
148043
|
-
options.vuetify.vuetifyOptions.theme.defaultTheme = "dark";
|
|
148044
|
-
options.vuetify.vuetifyOptions.theme.themes = {
|
|
148045
|
-
light: {},
|
|
148046
|
-
dark: {}
|
|
148047
|
-
};
|
|
148048
|
-
}
|
|
148049
|
-
await writeFile(configPath, mod.generate().code);
|
|
148050
|
-
}
|
|
148051
|
-
};
|
|
148052
|
-
|
|
148053
148140
|
//#endregion
|
|
148054
148141
|
//#region ../shared/src/features/pinia.ts
|
|
148055
148142
|
const pinia = {
|
|
@@ -148103,7 +148190,7 @@ export const useAppStore = defineStore('app', {
|
|
|
148103
148190
|
|
|
148104
148191
|
//#endregion
|
|
148105
148192
|
//#region ../shared/package.json
|
|
148106
|
-
var version$1 = "1.1.5
|
|
148193
|
+
var version$1 = "1.1.5";
|
|
148107
148194
|
|
|
148108
148195
|
//#endregion
|
|
148109
148196
|
//#region ../shared/src/utils/getTemplateSource.ts
|
|
@@ -148159,13 +148246,7 @@ const router = {
|
|
|
148159
148246
|
await writeFile(pluginsPath, mod.generate().code);
|
|
148160
148247
|
if (isTypescript) {
|
|
148161
148248
|
const tsConfigPath = join$1(cwd, "tsconfig.app.json");
|
|
148162
|
-
if (existsSync(tsConfigPath))
|
|
148163
|
-
const tsConfig = await loadFile(tsConfigPath);
|
|
148164
|
-
tsConfig.exports.vueCompilerOptions = tsConfig.exports.vueCompilerOptions || {};
|
|
148165
|
-
tsConfig.exports.vueCompilerOptions.plugins = tsConfig.exports.vueCompilerOptions.plugins || [];
|
|
148166
|
-
tsConfig.exports.vueCompilerOptions.plugins.push("vue-router/volar/sfc-typed-router", "vue-router/volar/sfc-route-blocks");
|
|
148167
|
-
await writeFile(tsConfigPath, tsConfig.generate().code);
|
|
148168
|
-
}
|
|
148249
|
+
if (existsSync(tsConfigPath)) await updateTsconfigVueCompilerPlugins(tsConfigPath, ["vue-router/volar/sfc-typed-router", "vue-router/volar/sfc-route-blocks"]);
|
|
148169
148250
|
}
|
|
148170
148251
|
}
|
|
148171
148252
|
};
|
|
@@ -148203,13 +148284,7 @@ const fileRouter = {
|
|
|
148203
148284
|
}
|
|
148204
148285
|
if (isTypescript) {
|
|
148205
148286
|
const tsConfigPath = join$1(cwd, "tsconfig.app.json");
|
|
148206
|
-
if (existsSync(tsConfigPath))
|
|
148207
|
-
const tsConfig = await loadFile(tsConfigPath);
|
|
148208
|
-
tsConfig.exports.vueCompilerOptions = tsConfig.exports.vueCompilerOptions || {};
|
|
148209
|
-
tsConfig.exports.vueCompilerOptions.plugins = tsConfig.exports.vueCompilerOptions.plugins || [];
|
|
148210
|
-
tsConfig.exports.vueCompilerOptions.plugins.push("vue-router/volar/sfc-typed-router", "vue-router/volar/sfc-route-blocks");
|
|
148211
|
-
await writeFile(tsConfigPath, tsConfig.generate().code);
|
|
148212
|
-
}
|
|
148287
|
+
if (existsSync(tsConfigPath)) await updateTsconfigVueCompilerPlugins(tsConfigPath, ["vue-router/volar/sfc-typed-router", "vue-router/volar/sfc-route-blocks"]);
|
|
148213
148288
|
}
|
|
148214
148289
|
}
|
|
148215
148290
|
};
|
|
@@ -148256,6 +148331,22 @@ const router = createRouter({
|
|
|
148256
148331
|
export default router
|
|
148257
148332
|
`;
|
|
148258
148333
|
}
|
|
148334
|
+
async function updateTsconfigVueCompilerPlugins(tsConfigPath, pluginsToAdd) {
|
|
148335
|
+
try {
|
|
148336
|
+
const raw = await readFile(tsConfigPath, "utf8");
|
|
148337
|
+
const config = JSON.parse(raw);
|
|
148338
|
+
const vueCompilerOptions = config.vueCompilerOptions || {};
|
|
148339
|
+
const current = Array.isArray(vueCompilerOptions.plugins) ? vueCompilerOptions.plugins : [];
|
|
148340
|
+
const plugins = Array.from(new Set([...current, ...pluginsToAdd]));
|
|
148341
|
+
config.vueCompilerOptions = {
|
|
148342
|
+
...vueCompilerOptions,
|
|
148343
|
+
plugins
|
|
148344
|
+
};
|
|
148345
|
+
await writeFile(tsConfigPath, JSON.stringify(config, null, 2) + "\n");
|
|
148346
|
+
} catch {
|
|
148347
|
+
return;
|
|
148348
|
+
}
|
|
148349
|
+
}
|
|
148259
148350
|
|
|
148260
148351
|
//#endregion
|
|
148261
148352
|
//#region ../shared/src/features/tailwindcss.ts
|
|
@@ -149509,28 +149600,38 @@ async function createVuetify(options, commandOptions) {
|
|
|
149509
149600
|
console.log(createBanner());
|
|
149510
149601
|
Nt(i18n$1.t("messages.create.intro", { version }));
|
|
149511
149602
|
}
|
|
149512
|
-
if (args.
|
|
149513
|
-
const
|
|
149514
|
-
|
|
149515
|
-
|
|
149516
|
-
|
|
149517
|
-
|
|
149518
|
-
|
|
149519
|
-
|
|
149520
|
-
|
|
149521
|
-
|
|
149522
|
-
|
|
149523
|
-
|
|
149524
|
-
|
|
149525
|
-
|
|
149526
|
-
|
|
149527
|
-
|
|
149528
|
-
|
|
149603
|
+
if (args.interactive && !args.preset) {
|
|
149604
|
+
const userPresets = listUserPresets().filter((p) => !p.invalid);
|
|
149605
|
+
const options = [
|
|
149606
|
+
{
|
|
149607
|
+
label: i18n$1.t("prompts.preset.start_scratch.label"),
|
|
149608
|
+
hint: i18n$1.t("prompts.preset.start_scratch.hint"),
|
|
149609
|
+
value: "__scratch__"
|
|
149610
|
+
},
|
|
149611
|
+
...Object.entries(standardPresets).map(([key, preset]) => ({
|
|
149612
|
+
label: preset.meta.displayName,
|
|
149613
|
+
value: key,
|
|
149614
|
+
hint: `${preset.type}/${preset.platform}${preset.features.length ? ` | ${preset.features.join(",")}` : ""}`
|
|
149615
|
+
})),
|
|
149616
|
+
...userPresets.map((p) => ({
|
|
149617
|
+
label: p.displayName,
|
|
149618
|
+
value: p.slug,
|
|
149619
|
+
hint: `${p.preset?.type || "vuetify"}/${p.preset?.platform || "vue"}${p.preset?.features?.length ? ` | ${p.preset.features.join(",")}` : ""}`
|
|
149620
|
+
}))
|
|
149621
|
+
];
|
|
149622
|
+
const choice = await qt({
|
|
149623
|
+
message: i18n$1.t("prompts.preset.start_select"),
|
|
149624
|
+
initialValue: "__scratch__",
|
|
149625
|
+
options
|
|
149626
|
+
});
|
|
149627
|
+
if (typeof choice === "string" && choice !== "__scratch__") args.preset = choice;
|
|
149628
|
+
}
|
|
149629
|
+
if (args.preset) {
|
|
149630
|
+
const preset = loadPreset(args.preset);
|
|
149631
|
+
if (preset) {
|
|
149529
149632
|
Object.assign(args, preset);
|
|
149530
149633
|
debug("loaded preset=", preset);
|
|
149531
|
-
}
|
|
149532
|
-
debug("failed to parse preset", error);
|
|
149533
|
-
}
|
|
149634
|
+
} else debug("failed to load preset=", args.preset);
|
|
149534
149635
|
}
|
|
149535
149636
|
const features = typeof args.features === "string" ? args.features.split(",").filter(Boolean) : args.features;
|
|
149536
149637
|
const rawArgs = args;
|
|
@@ -149545,7 +149646,7 @@ async function createVuetify(options, commandOptions) {
|
|
|
149545
149646
|
router: rawArgs.router
|
|
149546
149647
|
}, cwd);
|
|
149547
149648
|
debug("context=", JSON.stringify(context, null, 2));
|
|
149548
|
-
if (args.interactive
|
|
149649
|
+
if (args.interactive) {
|
|
149549
149650
|
if (await Mt({
|
|
149550
149651
|
message: i18n$1.t("prompts.preset.save"),
|
|
149551
149652
|
initialValue: false
|
|
@@ -149559,7 +149660,8 @@ async function createVuetify(options, commandOptions) {
|
|
|
149559
149660
|
if (typeof displayName === "string") {
|
|
149560
149661
|
const presetsDir = join$1(homedir(), ".vuetify", "create", "presets");
|
|
149561
149662
|
if (!existsSync(presetsDir)) mkdirSync(presetsDir, { recursive: true });
|
|
149562
|
-
const
|
|
149663
|
+
const slug = slugify(displayName);
|
|
149664
|
+
const presetPath = join$1(presetsDir, `${slug}.json`);
|
|
149563
149665
|
let shouldSave = true;
|
|
149564
149666
|
if (existsSync(presetPath)) shouldSave = await Mt({
|
|
149565
149667
|
message: i18n$1.t("prompts.preset.overwrite", { name: displayName }),
|
|
@@ -149577,6 +149679,7 @@ async function createVuetify(options, commandOptions) {
|
|
|
149577
149679
|
};
|
|
149578
149680
|
writeFileSync(presetPath, JSON.stringify(presetContent, null, 2));
|
|
149579
149681
|
R$3.step(i18n$1.t("prompts.preset.saved", { path: presetPath }));
|
|
149682
|
+
R$3.info(i18n$1.t("prompts.preset.usage", { slug }));
|
|
149580
149683
|
}
|
|
149581
149684
|
}
|
|
149582
149685
|
}
|
|
@@ -149954,8 +150057,8 @@ const isInSsh = Boolean(P.env.SSH_CONNECTION || P.env.SSH_CLIENT || P.env.SSH_TT
|
|
|
149954
150057
|
//#endregion
|
|
149955
150058
|
//#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
|
|
149956
150059
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
149957
|
-
const __dirname$
|
|
149958
|
-
const localXdgOpenPath = path.join(__dirname$
|
|
150060
|
+
const __dirname$1 = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
150061
|
+
const localXdgOpenPath = path.join(__dirname$1, "xdg-open");
|
|
149959
150062
|
const { platform, arch } = P;
|
|
149960
150063
|
const tryEachApp = async (apps, opener) => {
|
|
149961
150064
|
if (apps.length === 0) return;
|
|
@@ -150063,7 +150166,7 @@ const baseOpen = async (options) => {
|
|
|
150063
150166
|
} else {
|
|
150064
150167
|
if (app) command = app;
|
|
150065
150168
|
else {
|
|
150066
|
-
const isBundled = !__dirname$
|
|
150169
|
+
const isBundled = !__dirname$1 || __dirname$1 === "/";
|
|
150067
150170
|
let exeLocalXdgOpen = false;
|
|
150068
150171
|
try {
|
|
150069
150172
|
await fs$1.access(localXdgOpenPath, constants.X_OK);
|
|
@@ -150263,8 +150366,8 @@ const LINKS = {
|
|
|
150263
150366
|
|
|
150264
150367
|
//#endregion
|
|
150265
150368
|
//#region ../shared/src/functions/eslint.ts
|
|
150266
|
-
const blue$
|
|
150267
|
-
const description$1 = i18n$1.t("commands.eslint.description", { configPkg: blue$
|
|
150369
|
+
const blue$4 = ansi256(33);
|
|
150370
|
+
const description$1 = i18n$1.t("commands.eslint.description", { configPkg: blue$4(ESLINT_CONFIG) });
|
|
150268
150371
|
async function getEslintStatus() {
|
|
150269
150372
|
const nuxtConfigPath = tryResolveFilePath("./nuxt.config", { extensions: [
|
|
150270
150373
|
".ts",
|
|
@@ -150387,8 +150490,8 @@ async function addEslint() {
|
|
|
150387
150490
|
//#endregion
|
|
150388
150491
|
//#region ../shared/src/functions/mcp.ts
|
|
150389
150492
|
const RULER_PKG = "@intellectronica/ruler";
|
|
150390
|
-
const blue$
|
|
150391
|
-
const description = i18n$1.t("commands.mcp.description", { pkg: blue$
|
|
150493
|
+
const blue$3 = ansi256(33);
|
|
150494
|
+
const description = i18n$1.t("commands.mcp.description", { pkg: blue$3(RULER_PKG) });
|
|
150392
150495
|
async function addMcp() {
|
|
150393
150496
|
Nt(description);
|
|
150394
150497
|
if (await tryResolvePackage(RULER_PKG)) R$3.info(i18n$1.t("messages.eslint.deps_already_installed"));
|
|
@@ -150530,272 +150633,187 @@ async function getNpmPackageVersion(packageName) {
|
|
|
150530
150633
|
}
|
|
150531
150634
|
|
|
150532
150635
|
//#endregion
|
|
150533
|
-
//#region
|
|
150534
|
-
|
|
150535
|
-
|
|
150536
|
-
|
|
150537
|
-
|
|
150538
|
-
|
|
150539
|
-
|
|
150540
|
-
|
|
150541
|
-
|
|
150542
|
-
|
|
150543
|
-
|
|
150544
|
-
|
|
150545
|
-
|
|
150546
|
-
|
|
150547
|
-
|
|
150548
|
-
|
|
150549
|
-
|
|
150550
|
-
|
|
150551
|
-
|
|
150552
|
-
|
|
150553
|
-
|
|
150554
|
-
|
|
150555
|
-
|
|
150556
|
-
|
|
150557
|
-
|
|
150558
|
-
|
|
150559
|
-
|
|
150560
|
-
if (opt.section && out.length) out = "[" + safe(opt.section) + "]" + (opt.newline ? eol + eol : eol) + out;
|
|
150561
|
-
for (const k of children) {
|
|
150562
|
-
const nk = splitSections(k, ".").join("\\.");
|
|
150563
|
-
const section = (opt.section ? opt.section + "." : "") + nk;
|
|
150564
|
-
const child = encode(obj[k], {
|
|
150565
|
-
...opt,
|
|
150566
|
-
section
|
|
150567
|
-
});
|
|
150568
|
-
if (out.length && child.length) out += eol;
|
|
150569
|
-
out += child;
|
|
150570
|
-
}
|
|
150571
|
-
return out;
|
|
150572
|
-
};
|
|
150573
|
-
function splitSections(str, separator) {
|
|
150574
|
-
var lastMatchIndex = 0;
|
|
150575
|
-
var lastSeparatorIndex = 0;
|
|
150576
|
-
var nextIndex = 0;
|
|
150577
|
-
var sections = [];
|
|
150578
|
-
do {
|
|
150579
|
-
nextIndex = str.indexOf(separator, lastMatchIndex);
|
|
150580
|
-
if (nextIndex !== -1) {
|
|
150581
|
-
lastMatchIndex = nextIndex + separator.length;
|
|
150582
|
-
if (nextIndex > 0 && str[nextIndex - 1] === "\\") continue;
|
|
150583
|
-
sections.push(str.slice(lastSeparatorIndex, nextIndex));
|
|
150584
|
-
lastSeparatorIndex = nextIndex + separator.length;
|
|
150585
|
-
}
|
|
150586
|
-
} while (nextIndex !== -1);
|
|
150587
|
-
sections.push(str.slice(lastSeparatorIndex));
|
|
150588
|
-
return sections;
|
|
150589
|
-
}
|
|
150590
|
-
const decode = (str, opt = {}) => {
|
|
150591
|
-
opt.bracketedArray = opt.bracketedArray !== false;
|
|
150592
|
-
const out = Object.create(null);
|
|
150593
|
-
let p = out;
|
|
150594
|
-
let section = null;
|
|
150595
|
-
const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
|
150596
|
-
const lines = str.split(/[\r\n]+/g);
|
|
150597
|
-
const duplicates = {};
|
|
150598
|
-
for (const line of lines) {
|
|
150599
|
-
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) continue;
|
|
150600
|
-
const match = line.match(re);
|
|
150601
|
-
if (!match) continue;
|
|
150602
|
-
if (match[1] !== void 0) {
|
|
150603
|
-
section = unsafe(match[1]);
|
|
150604
|
-
if (section === "__proto__") {
|
|
150605
|
-
p = Object.create(null);
|
|
150606
|
-
continue;
|
|
150607
|
-
}
|
|
150608
|
-
p = out[section] = out[section] || Object.create(null);
|
|
150609
|
-
continue;
|
|
150610
|
-
}
|
|
150611
|
-
const keyRaw = unsafe(match[2]);
|
|
150612
|
-
let isArray;
|
|
150613
|
-
if (opt.bracketedArray) isArray = keyRaw.length > 2 && keyRaw.slice(-2) === "[]";
|
|
150614
|
-
else {
|
|
150615
|
-
duplicates[keyRaw] = (duplicates?.[keyRaw] || 0) + 1;
|
|
150616
|
-
isArray = duplicates[keyRaw] > 1;
|
|
150617
|
-
}
|
|
150618
|
-
const key = isArray ? keyRaw.slice(0, -2) : keyRaw;
|
|
150619
|
-
if (key === "__proto__") continue;
|
|
150620
|
-
const valueRaw = match[3] ? unsafe(match[4]) : true;
|
|
150621
|
-
const value = valueRaw === "true" || valueRaw === "false" || valueRaw === "null" ? JSON.parse(valueRaw) : valueRaw;
|
|
150622
|
-
if (isArray) {
|
|
150623
|
-
if (!hasOwnProperty.call(p, key)) p[key] = [];
|
|
150624
|
-
else if (!Array.isArray(p[key])) p[key] = [p[key]];
|
|
150625
|
-
}
|
|
150626
|
-
if (Array.isArray(p[key])) p[key].push(value);
|
|
150627
|
-
else p[key] = value;
|
|
150628
|
-
}
|
|
150629
|
-
const remove = [];
|
|
150630
|
-
for (const k of Object.keys(out)) {
|
|
150631
|
-
if (!hasOwnProperty.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) continue;
|
|
150632
|
-
const parts = splitSections(k, ".");
|
|
150633
|
-
p = out;
|
|
150634
|
-
const l = parts.pop();
|
|
150635
|
-
const nl = l.replace(/\\\./g, ".");
|
|
150636
|
-
for (const part of parts) {
|
|
150637
|
-
if (part === "__proto__") continue;
|
|
150638
|
-
if (!hasOwnProperty.call(p, part) || typeof p[part] !== "object") p[part] = Object.create(null);
|
|
150639
|
-
p = p[part];
|
|
150640
|
-
}
|
|
150641
|
-
if (p === out && nl === l) continue;
|
|
150642
|
-
p[nl] = out[k];
|
|
150643
|
-
remove.push(k);
|
|
150644
|
-
}
|
|
150645
|
-
for (const del of remove) delete out[del];
|
|
150646
|
-
return out;
|
|
150647
|
-
};
|
|
150648
|
-
const isQuoted = (val) => {
|
|
150649
|
-
return val.startsWith("\"") && val.endsWith("\"") || val.startsWith("'") && val.endsWith("'");
|
|
150636
|
+
//#region ../shared/src/utils/strings.ts
|
|
150637
|
+
const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
150638
|
+
|
|
150639
|
+
//#endregion
|
|
150640
|
+
//#region ../shared/src/utils/updateCheck.ts
|
|
150641
|
+
var import_semver = /* @__PURE__ */ __toESM$1(require_semver());
|
|
150642
|
+
const blue$2 = ansi256(33);
|
|
150643
|
+
async function getLatestVersion(packageName) {
|
|
150644
|
+
const timeout = new Promise((resolve) => setTimeout(() => resolve(null), 800));
|
|
150645
|
+
return await Promise.race([getNpmPackageVersion(packageName), timeout]);
|
|
150646
|
+
}
|
|
150647
|
+
function getLocalInstallType(pkg, packageName) {
|
|
150648
|
+
if (!pkg) return null;
|
|
150649
|
+
if (pkg.dependencies && pkg.dependencies[packageName]) return "dependencies";
|
|
150650
|
+
if (pkg.devDependencies && pkg.devDependencies[packageName]) return "devDependencies";
|
|
150651
|
+
return null;
|
|
150652
|
+
}
|
|
150653
|
+
function resolveLocalInstallCommand(agent, packageName, installType) {
|
|
150654
|
+
const target = `${packageName}@latest`;
|
|
150655
|
+
const dev = installType === "devDependencies";
|
|
150656
|
+
if (agent === "pnpm") return {
|
|
150657
|
+
command: "pnpm",
|
|
150658
|
+
args: [
|
|
150659
|
+
"add",
|
|
150660
|
+
...dev ? ["-D"] : [],
|
|
150661
|
+
target
|
|
150662
|
+
]
|
|
150650
150663
|
};
|
|
150651
|
-
|
|
150652
|
-
|
|
150653
|
-
|
|
150664
|
+
if (agent === "yarn") return {
|
|
150665
|
+
command: "yarn",
|
|
150666
|
+
args: [
|
|
150667
|
+
"add",
|
|
150668
|
+
...dev ? ["-D"] : [],
|
|
150669
|
+
target
|
|
150670
|
+
]
|
|
150654
150671
|
};
|
|
150655
|
-
|
|
150656
|
-
|
|
150657
|
-
|
|
150658
|
-
|
|
150659
|
-
|
|
150660
|
-
|
|
150661
|
-
|
|
150662
|
-
} else {
|
|
150663
|
-
let esc = false;
|
|
150664
|
-
let unesc = "";
|
|
150665
|
-
for (let i = 0, l = val.length; i < l; i++) {
|
|
150666
|
-
const c = val.charAt(i);
|
|
150667
|
-
if (esc) {
|
|
150668
|
-
if ("\\;#".indexOf(c) !== -1) unesc += c;
|
|
150669
|
-
else unesc += "\\" + c;
|
|
150670
|
-
esc = false;
|
|
150671
|
-
} else if (";#".indexOf(c) !== -1) break;
|
|
150672
|
-
else if (c === "\\") esc = true;
|
|
150673
|
-
else unesc += c;
|
|
150674
|
-
}
|
|
150675
|
-
if (esc) unesc += "\\";
|
|
150676
|
-
return unesc.trim();
|
|
150677
|
-
}
|
|
150678
|
-
return val;
|
|
150672
|
+
if (agent === "bun") return {
|
|
150673
|
+
command: "bun",
|
|
150674
|
+
args: [
|
|
150675
|
+
"add",
|
|
150676
|
+
...dev ? ["-d"] : [],
|
|
150677
|
+
target
|
|
150678
|
+
]
|
|
150679
150679
|
};
|
|
150680
|
-
|
|
150681
|
-
|
|
150682
|
-
|
|
150683
|
-
|
|
150684
|
-
|
|
150685
|
-
|
|
150686
|
-
|
|
150680
|
+
return {
|
|
150681
|
+
command: "npm",
|
|
150682
|
+
args: [
|
|
150683
|
+
"install",
|
|
150684
|
+
...dev ? ["-D"] : [],
|
|
150685
|
+
target
|
|
150686
|
+
]
|
|
150687
150687
|
};
|
|
150688
|
-
}));
|
|
150689
|
-
|
|
150690
|
-
//#endregion
|
|
150691
|
-
//#region ../../node_modules/.pnpm/global-directory@4.0.1/node_modules/global-directory/index.js
|
|
150692
|
-
var import_ini = /* @__PURE__ */ __toESM$1(require_ini(), 1);
|
|
150693
|
-
const isWindows = P.platform === "win32";
|
|
150694
|
-
const readRc = (filePath) => {
|
|
150695
|
-
try {
|
|
150696
|
-
return import_ini.default.parse(fs.readFileSync(filePath, "utf8")).prefix;
|
|
150697
|
-
} catch {}
|
|
150698
|
-
};
|
|
150699
|
-
const getEnvNpmPrefix = () => Object.keys(P.env).reduce((prefix, name) => /^npm_config_prefix$/i.test(name) ? P.env[name] : prefix, void 0);
|
|
150700
|
-
const getGlobalNpmrc = () => {
|
|
150701
|
-
if (isWindows && P.env.APPDATA) return path.join(P.env.APPDATA, "/npm/etc/npmrc");
|
|
150702
|
-
if (P.execPath.includes("/Cellar/node")) {
|
|
150703
|
-
const homebrewPrefix = P.execPath.slice(0, P.execPath.indexOf("/Cellar/node"));
|
|
150704
|
-
return path.join(homebrewPrefix, "/lib/node_modules/npm/npmrc");
|
|
150705
|
-
}
|
|
150706
|
-
if (P.execPath.endsWith("/bin/node")) {
|
|
150707
|
-
const installDir = path.dirname(path.dirname(P.execPath));
|
|
150708
|
-
return path.join(installDir, "/etc/npmrc");
|
|
150709
|
-
}
|
|
150710
|
-
};
|
|
150711
|
-
const getDefaultNpmPrefix = () => {
|
|
150712
|
-
if (isWindows) {
|
|
150713
|
-
const { APPDATA } = P.env;
|
|
150714
|
-
return APPDATA ? path.join(APPDATA, "npm") : path.dirname(P.execPath);
|
|
150715
|
-
}
|
|
150716
|
-
return path.dirname(path.dirname(P.execPath));
|
|
150717
|
-
};
|
|
150718
|
-
const getNpmPrefix = () => {
|
|
150719
|
-
const envPrefix = getEnvNpmPrefix();
|
|
150720
|
-
if (envPrefix) return envPrefix;
|
|
150721
|
-
const homePrefix = readRc(path.join(os.homedir(), ".npmrc"));
|
|
150722
|
-
if (homePrefix) return homePrefix;
|
|
150723
|
-
if (P.env.PREFIX) return P.env.PREFIX;
|
|
150724
|
-
const globalPrefix = readRc(getGlobalNpmrc());
|
|
150725
|
-
if (globalPrefix) return globalPrefix;
|
|
150726
|
-
return getDefaultNpmPrefix();
|
|
150727
|
-
};
|
|
150728
|
-
const npmPrefix = path.resolve(getNpmPrefix());
|
|
150729
|
-
const getYarnWindowsDirectory = () => {
|
|
150730
|
-
if (isWindows && P.env.LOCALAPPDATA) {
|
|
150731
|
-
const dir = path.join(P.env.LOCALAPPDATA, "Yarn");
|
|
150732
|
-
if (fs.existsSync(dir)) return dir;
|
|
150733
|
-
}
|
|
150734
|
-
return false;
|
|
150735
|
-
};
|
|
150736
|
-
const getYarnPrefix = () => {
|
|
150737
|
-
if (P.env.PREFIX) return P.env.PREFIX;
|
|
150738
|
-
const windowsPrefix = getYarnWindowsDirectory();
|
|
150739
|
-
if (windowsPrefix) return windowsPrefix;
|
|
150740
|
-
const configPrefix = path.join(os.homedir(), ".config/yarn");
|
|
150741
|
-
if (fs.existsSync(configPrefix)) return configPrefix;
|
|
150742
|
-
const homePrefix = path.join(os.homedir(), ".yarn-config");
|
|
150743
|
-
if (fs.existsSync(homePrefix)) return homePrefix;
|
|
150744
|
-
return npmPrefix;
|
|
150745
|
-
};
|
|
150746
|
-
const globalDirectory = {};
|
|
150747
|
-
globalDirectory.npm = {};
|
|
150748
|
-
globalDirectory.npm.prefix = npmPrefix;
|
|
150749
|
-
globalDirectory.npm.packages = path.join(npmPrefix, isWindows ? "node_modules" : "lib/node_modules");
|
|
150750
|
-
globalDirectory.npm.binaries = isWindows ? npmPrefix : path.join(npmPrefix, "bin");
|
|
150751
|
-
const yarnPrefix = path.resolve(getYarnPrefix());
|
|
150752
|
-
globalDirectory.yarn = {};
|
|
150753
|
-
globalDirectory.yarn.prefix = yarnPrefix;
|
|
150754
|
-
globalDirectory.yarn.packages = path.join(yarnPrefix, getYarnWindowsDirectory() ? "Data/global/node_modules" : "global/node_modules");
|
|
150755
|
-
globalDirectory.yarn.binaries = path.join(globalDirectory.yarn.packages, ".bin");
|
|
150756
|
-
|
|
150757
|
-
//#endregion
|
|
150758
|
-
//#region ../../node_modules/.pnpm/is-path-inside@4.0.0/node_modules/is-path-inside/index.js
|
|
150759
|
-
function isPathInside(childPath, parentPath) {
|
|
150760
|
-
const relation = path.relative(parentPath, childPath);
|
|
150761
|
-
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath));
|
|
150762
150688
|
}
|
|
150763
|
-
|
|
150764
|
-
|
|
150765
|
-
|
|
150766
|
-
const
|
|
150767
|
-
const
|
|
150689
|
+
async function promptLocalUpdateToContinue(options) {
|
|
150690
|
+
const packageName = options.packageName;
|
|
150691
|
+
const currentVersion = options.currentVersion;
|
|
150692
|
+
const startCwd = process.cwd();
|
|
150693
|
+
const cwd = options.cwd || startCwd;
|
|
150694
|
+
if (!process.stdout.isTTY || !process.stdin.isTTY) return;
|
|
150768
150695
|
try {
|
|
150769
|
-
|
|
150696
|
+
process.chdir(cwd);
|
|
150770
150697
|
} catch {
|
|
150771
|
-
return
|
|
150698
|
+
return;
|
|
150772
150699
|
}
|
|
150773
|
-
|
|
150700
|
+
try {
|
|
150701
|
+
const latestVersion = await getLatestVersion(packageName);
|
|
150702
|
+
if (!latestVersion || !import_semver.default.gt(latestVersion, currentVersion)) return;
|
|
150703
|
+
const installType = getLocalInstallType(await getProjectPackageJSON().catch(() => null), packageName);
|
|
150704
|
+
if (!installType) return;
|
|
150705
|
+
Tt(`${yellow(bold(i18n$1.t("utils.update_check.available")))}\n\n${currentVersion} -> ${latestVersion}\n`, "", { withGuide: false });
|
|
150706
|
+
if (await Mt({
|
|
150707
|
+
message: i18n$1.t("utils.update_check.update_to_continue"),
|
|
150708
|
+
initialValue: true
|
|
150709
|
+
}) !== true) return;
|
|
150710
|
+
const pmResult = await getPackageManager().catch(() => null);
|
|
150711
|
+
const { command, args } = resolveLocalInstallCommand(pmResult?.agent || pmResult?.name || "npm", packageName, installType);
|
|
150712
|
+
R$3.info(i18n$1.t("utils.update_check.updating"));
|
|
150713
|
+
await K(command, args);
|
|
150714
|
+
R$3.success(i18n$1.t("utils.update_check.updated"));
|
|
150715
|
+
R$3.info(i18n$1.t("utils.update_check.rerun"));
|
|
150716
|
+
return true;
|
|
150717
|
+
} finally {
|
|
150718
|
+
process.chdir(startCwd);
|
|
150719
|
+
}
|
|
150720
|
+
}
|
|
150774
150721
|
|
|
150775
150722
|
//#endregion
|
|
150776
|
-
//#region ../shared/src/
|
|
150777
|
-
var import_semver = /* @__PURE__ */ __toESM$1(require_semver());
|
|
150723
|
+
//#region ../shared/src/commands/presets.ts
|
|
150778
150724
|
const blue$1 = ansi256(33);
|
|
150779
|
-
|
|
150780
|
-
|
|
150781
|
-
|
|
150782
|
-
|
|
150783
|
-
|
|
150784
|
-
|
|
150785
|
-
|
|
150786
|
-
|
|
150787
|
-
|
|
150788
|
-
|
|
150789
|
-
|
|
150790
|
-
|
|
150791
|
-
|
|
150792
|
-
}
|
|
150793
|
-
|
|
150794
|
-
|
|
150795
|
-
|
|
150796
|
-
|
|
150725
|
+
function createPresetsCommand(options) {
|
|
150726
|
+
return defineCommand({
|
|
150727
|
+
meta: {
|
|
150728
|
+
name: "presets",
|
|
150729
|
+
description: i18n$1.t("commands.presets.description")
|
|
150730
|
+
},
|
|
150731
|
+
args: {
|
|
150732
|
+
...projectArgs({ exclude: ["type"] }),
|
|
150733
|
+
list: {
|
|
150734
|
+
type: "boolean",
|
|
150735
|
+
description: "List available presets",
|
|
150736
|
+
alias: "l",
|
|
150737
|
+
default: false
|
|
150738
|
+
}
|
|
150739
|
+
},
|
|
150740
|
+
run: async ({ args }) => {
|
|
150741
|
+
Nt(i18n$1.t("commands.presets.intro"));
|
|
150742
|
+
const systemPresets = Object.entries(standardPresets).filter(([, preset]) => !options.filterType || preset.type === options.filterType).map(([key, preset]) => {
|
|
150743
|
+
const name = preset.meta.displayName;
|
|
150744
|
+
const type = capitalize(preset.type);
|
|
150745
|
+
const platform = capitalize(preset.platform);
|
|
150746
|
+
const features = preset.features || [];
|
|
150747
|
+
return {
|
|
150748
|
+
key,
|
|
150749
|
+
name,
|
|
150750
|
+
formattedLine: `${name} ${dim("(")}${blue$1(type)} + ${green(platform)}${features.length > 0 ? ` ${dim("|")} ${features.join(",")}` : ""}${dim(")")}`,
|
|
150751
|
+
invalid: false
|
|
150752
|
+
};
|
|
150753
|
+
});
|
|
150754
|
+
const userPresets = listUserPresets().map((p) => {
|
|
150755
|
+
if (p.invalid) return {
|
|
150756
|
+
name: p.displayName,
|
|
150757
|
+
invalid: true
|
|
150758
|
+
};
|
|
150759
|
+
const preset = p.preset || {};
|
|
150760
|
+
const rawType = preset.type || "vuetify";
|
|
150761
|
+
const type = capitalize(preset.type || "vuetify");
|
|
150762
|
+
const platform = capitalize(preset.platform || "vue");
|
|
150763
|
+
const features = preset.features || [];
|
|
150764
|
+
const formattedLine = `${p.displayName} ${dim("(")}${blue$1(type)} + ${green(platform)} ${dim("|")} ${features.join(",")}${dim(")")}`;
|
|
150765
|
+
return {
|
|
150766
|
+
name: p.displayName,
|
|
150767
|
+
invalid: false,
|
|
150768
|
+
file: p.file,
|
|
150769
|
+
slug: p.slug,
|
|
150770
|
+
type: rawType,
|
|
150771
|
+
formattedLine
|
|
150772
|
+
};
|
|
150773
|
+
}).filter((p) => {
|
|
150774
|
+
if (p.invalid) return true;
|
|
150775
|
+
return !options.filterType || p.type === options.filterType;
|
|
150776
|
+
});
|
|
150777
|
+
if (args.list) {
|
|
150778
|
+
R$3.message(dim("System Presets"));
|
|
150779
|
+
for (const p of systemPresets) R$3.success(p.formattedLine);
|
|
150780
|
+
const invalidUser = userPresets.filter((p) => p.invalid);
|
|
150781
|
+
const validUser = userPresets.filter((p) => !p.invalid);
|
|
150782
|
+
if (invalidUser.length > 0 || validUser.length > 0) {
|
|
150783
|
+
R$3.message(dim("User Presets"));
|
|
150784
|
+
for (const p of invalidUser) R$3.error(`${p.name} ${dim("(invalid)")}`);
|
|
150785
|
+
for (const p of validUser) R$3.success(p.formattedLine);
|
|
150786
|
+
}
|
|
150787
|
+
Wt(i18n$1.t("commands.presets.done"));
|
|
150788
|
+
return;
|
|
150789
|
+
}
|
|
150790
|
+
const selectionOptions = [...systemPresets.map((p) => ({
|
|
150791
|
+
label: p.formattedLine,
|
|
150792
|
+
value: p
|
|
150793
|
+
})), ...userPresets.filter((p) => !p.invalid).map((p) => ({
|
|
150794
|
+
label: p.formattedLine,
|
|
150795
|
+
value: p
|
|
150796
|
+
}))];
|
|
150797
|
+
const preset = await qt({
|
|
150798
|
+
message: i18n$1.t("commands.presets.select"),
|
|
150799
|
+
options: selectionOptions
|
|
150800
|
+
});
|
|
150801
|
+
if (!preset || typeof preset === "symbol") {
|
|
150802
|
+
R$3.warn(i18n$1.t("commands.presets.cancel"));
|
|
150803
|
+
Wt(i18n$1.t("commands.presets.done"));
|
|
150804
|
+
return;
|
|
150805
|
+
}
|
|
150806
|
+
R$3.success(i18n$1.t("commands.presets.selected", { name: preset.name }));
|
|
150807
|
+
const run = await Mt({ message: i18n$1.t("commands.presets.use") });
|
|
150808
|
+
if (run && typeof run !== "symbol") await createVuetify({
|
|
150809
|
+
...args,
|
|
150810
|
+
preset: preset.key || preset.slug,
|
|
150811
|
+
type: options.type,
|
|
150812
|
+
version: options.version
|
|
150813
|
+
}, { intro: false });
|
|
150814
|
+
else Wt(i18n$1.t("commands.presets.done"));
|
|
150797
150815
|
}
|
|
150798
|
-
}
|
|
150816
|
+
});
|
|
150799
150817
|
}
|
|
150800
150818
|
|
|
150801
150819
|
//#endregion
|
|
@@ -150923,7 +150941,10 @@ function commandUpgradeFabric(pkgName) {
|
|
|
150923
150941
|
name: "upgrade",
|
|
150924
150942
|
description: i18n$1.t("commands.upgrade.description", { pkg: pkgName })
|
|
150925
150943
|
},
|
|
150926
|
-
run: () =>
|
|
150944
|
+
run: async () => {
|
|
150945
|
+
R$3.warning(i18n$1.t("commands.upgrade.deprecated"));
|
|
150946
|
+
await upgradeSelf(pkgName);
|
|
150947
|
+
}
|
|
150927
150948
|
});
|
|
150928
150949
|
}
|
|
150929
150950
|
|
|
@@ -151026,7 +151047,7 @@ const JsonReporter = { report: async (data, options) => {
|
|
|
151026
151047
|
|
|
151027
151048
|
//#endregion
|
|
151028
151049
|
//#region package.json
|
|
151029
|
-
var version = "1.1.5
|
|
151050
|
+
var version = "1.1.5";
|
|
151030
151051
|
|
|
151031
151052
|
//#endregion
|
|
151032
151053
|
//#region src/commands/analyze.ts
|
|
@@ -151100,6 +151121,11 @@ const init = defineCommand({
|
|
|
151100
151121
|
}
|
|
151101
151122
|
},
|
|
151102
151123
|
run: async ({ args }) => {
|
|
151124
|
+
if (await promptLocalUpdateToContinue({
|
|
151125
|
+
packageName: "@vuetify/cli",
|
|
151126
|
+
currentVersion: version,
|
|
151127
|
+
cwd: typeof args.cwd === "string" ? args.cwd : void 0
|
|
151128
|
+
})) return;
|
|
151103
151129
|
await createVuetify({
|
|
151104
151130
|
...args,
|
|
151105
151131
|
version
|
|
@@ -151117,6 +151143,10 @@ const upgrade = commandUpgradeFabric("@vuetify/cli");
|
|
|
151117
151143
|
|
|
151118
151144
|
//#endregion
|
|
151119
151145
|
//#region src/index.ts
|
|
151146
|
+
const presets = createPresetsCommand({
|
|
151147
|
+
version,
|
|
151148
|
+
type: "vuetify"
|
|
151149
|
+
});
|
|
151120
151150
|
const main = defineCommand({
|
|
151121
151151
|
meta: {
|
|
151122
151152
|
name: "vuetify",
|
|
@@ -151125,6 +151155,7 @@ const main = defineCommand({
|
|
|
151125
151155
|
},
|
|
151126
151156
|
subCommands: {
|
|
151127
151157
|
init,
|
|
151158
|
+
presets,
|
|
151128
151159
|
add,
|
|
151129
151160
|
update,
|
|
151130
151161
|
docs,
|
|
@@ -151142,8 +151173,9 @@ const main = defineCommand({
|
|
|
151142
151173
|
await v$3(main).then((completion) => {
|
|
151143
151174
|
const initCommand = completion.commands.get("init");
|
|
151144
151175
|
if (initCommand) registerProjectArgsCompletion(initCommand);
|
|
151176
|
+
const presetsCommand = completion.commands.get("presets");
|
|
151177
|
+
if (presetsCommand) registerProjectArgsCompletion(presetsCommand);
|
|
151145
151178
|
});
|
|
151146
|
-
if (!(process.argv.includes("--reporter") || process.argv.includes("-r"))) await checkForUpdate(version);
|
|
151147
151179
|
runMain(main);
|
|
151148
151180
|
|
|
151149
151181
|
//#endregion
|
|
@@ -4,7 +4,7 @@ import e from "node:assert";
|
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path, { basename, join, posix, win32 } from "node:path";
|
|
6
6
|
import fs$1 from "node:fs/promises";
|
|
7
|
-
import
|
|
7
|
+
import nativeFs from "fs";
|
|
8
8
|
import path$1, { dirname as dirname$1, parse } from "path";
|
|
9
9
|
import assert from "assert";
|
|
10
10
|
import EE, { EventEmitter } from "events";
|
|
@@ -341,7 +341,7 @@ while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER$1].length);
|
|
|
341
341
|
return isStream;
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
|
-
const writev =
|
|
344
|
+
const writev = nativeFs.writev, _autoClose = Symbol(`_autoClose`), _close = Symbol(`_close`), _ended = Symbol(`_ended`), _fd = Symbol(`_fd`), _finished = Symbol(`_finished`), _flags = Symbol(`_flags`), _flush = Symbol(`_flush`), _handleChunk = Symbol(`_handleChunk`), _makeBuf = Symbol(`_makeBuf`), _mode = Symbol(`_mode`), _needDrain = Symbol(`_needDrain`), _onerror = Symbol(`_onerror`), _onopen = Symbol(`_onopen`), _onread = Symbol(`_onread`), _onwrite = Symbol(`_onwrite`), _open = Symbol(`_open`), _path = Symbol(`_path`), _pos = Symbol(`_pos`), _queue = Symbol(`_queue`), _read = Symbol(`_read`), _readSize = Symbol(`_readSize`), _reading = Symbol(`_reading`), _remain = Symbol(`_remain`), _size = Symbol(`_size`), _write = Symbol(`_write`), _writing = Symbol(`_writing`), _defaultFlag = Symbol(`_defaultFlag`), _errored = Symbol(`_errored`);
|
|
345
345
|
var ReadStream = class extends Minipass {
|
|
346
346
|
[_errored] = !1;
|
|
347
347
|
[_fd];
|
|
@@ -368,7 +368,7 @@ var ReadStream = class extends Minipass {
|
|
|
368
368
|
throw TypeError(`this is a readable stream`);
|
|
369
369
|
}
|
|
370
370
|
[_open]() {
|
|
371
|
-
|
|
371
|
+
nativeFs.open(this[_path], `r`, (e, t) => this[_onopen](e, t));
|
|
372
372
|
}
|
|
373
373
|
[_onopen](e, t) {
|
|
374
374
|
e ? this[_onerror](e) : (this[_fd] = t, this.emit(`open`, t), this[_read]());
|
|
@@ -381,7 +381,7 @@ var ReadStream = class extends Minipass {
|
|
|
381
381
|
this[_reading] = !0;
|
|
382
382
|
let e = this[_makeBuf]();
|
|
383
383
|
if (e.length === 0) return process.nextTick(() => this[_onread](null, 0, e));
|
|
384
|
-
|
|
384
|
+
nativeFs.read(this[_fd], e, 0, e.length, null, (e, t, n) => this[_onread](e, t, n));
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
[_onread](e, t, n) {
|
|
@@ -390,7 +390,7 @@ var ReadStream = class extends Minipass {
|
|
|
390
390
|
[_close]() {
|
|
391
391
|
if (this[_autoClose] && typeof this[_fd] == `number`) {
|
|
392
392
|
let e = this[_fd];
|
|
393
|
-
this[_fd] = void 0,
|
|
393
|
+
this[_fd] = void 0, nativeFs.close(e, (e) => e ? this.emit(`error`, e) : this.emit(`close`));
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
[_onerror](e) {
|
|
@@ -413,7 +413,7 @@ var ReadStream = class extends Minipass {
|
|
|
413
413
|
[_open]() {
|
|
414
414
|
let e = !0;
|
|
415
415
|
try {
|
|
416
|
-
this[_onopen](null,
|
|
416
|
+
this[_onopen](null, nativeFs.openSync(this[_path], `r`)), e = !1;
|
|
417
417
|
} finally {
|
|
418
418
|
e && this[_close]();
|
|
419
419
|
}
|
|
@@ -424,7 +424,7 @@ var ReadStream = class extends Minipass {
|
|
|
424
424
|
if (!this[_reading]) {
|
|
425
425
|
this[_reading] = !0;
|
|
426
426
|
do {
|
|
427
|
-
let e = this[_makeBuf](), t = e.length === 0 ? 0 :
|
|
427
|
+
let e = this[_makeBuf](), t = e.length === 0 ? 0 : nativeFs.readSync(this[_fd], e, 0, e.length, null);
|
|
428
428
|
if (!this[_handleChunk](t, e)) break;
|
|
429
429
|
} while (!0);
|
|
430
430
|
this[_reading] = !1;
|
|
@@ -437,7 +437,7 @@ var ReadStream = class extends Minipass {
|
|
|
437
437
|
[_close]() {
|
|
438
438
|
if (this[_autoClose] && typeof this[_fd] == `number`) {
|
|
439
439
|
let e = this[_fd];
|
|
440
|
-
this[_fd] = void 0,
|
|
440
|
+
this[_fd] = void 0, nativeFs.closeSync(e), this.emit(`close`);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
}, WriteStream = class extends EE {
|
|
@@ -478,7 +478,7 @@ var ReadStream = class extends Minipass {
|
|
|
478
478
|
this[_close](), this[_writing] = !0, this.emit(`error`, e);
|
|
479
479
|
}
|
|
480
480
|
[_open]() {
|
|
481
|
-
|
|
481
|
+
nativeFs.open(this[_path], this[_flags], this[_mode], (e, t) => this[_onopen](e, t));
|
|
482
482
|
}
|
|
483
483
|
[_onopen](e, t) {
|
|
484
484
|
this[_defaultFlag] && this[_flags] === `r+` && e && e.code === `ENOENT` ? (this[_flags] = `w`, this[_open]()) : e ? this[_onerror](e) : (this[_fd] = t, this.emit(`open`, t), this[_writing] || this[_flush]());
|
|
@@ -490,7 +490,7 @@ var ReadStream = class extends Minipass {
|
|
|
490
490
|
return typeof e == `string` && (e = Buffer.from(e, t)), this[_ended] ? (this.emit(`error`, Error(`write() after end()`)), !1) : this[_fd] === void 0 || this[_writing] || this[_queue].length ? (this[_queue].push(e), this[_needDrain] = !0, !1) : (this[_writing] = !0, this[_write](e), !0);
|
|
491
491
|
}
|
|
492
492
|
[_write](e) {
|
|
493
|
-
|
|
493
|
+
nativeFs.write(this[_fd], e, 0, e.length, this[_pos], (e, t) => this[_onwrite](e, t));
|
|
494
494
|
}
|
|
495
495
|
[_onwrite](e, t) {
|
|
496
496
|
e ? this[_onerror](e) : (this[_pos] !== void 0 && typeof t == `number` && (this[_pos] += t), this[_queue].length ? this[_flush]() : (this[_writing] = !1, this[_ended] && !this[_finished] ? (this[_finished] = !0, this[_close](), this.emit(`finish`)) : this[_needDrain] && (this[_needDrain] = !1, this.emit(`drain`))));
|
|
@@ -506,31 +506,31 @@ var ReadStream = class extends Minipass {
|
|
|
506
506
|
[_close]() {
|
|
507
507
|
if (this[_autoClose] && typeof this[_fd] == `number`) {
|
|
508
508
|
let e = this[_fd];
|
|
509
|
-
this[_fd] = void 0,
|
|
509
|
+
this[_fd] = void 0, nativeFs.close(e, (e) => e ? this.emit(`error`, e) : this.emit(`close`));
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
}, WriteStreamSync = class extends WriteStream {
|
|
513
513
|
[_open]() {
|
|
514
514
|
let e;
|
|
515
515
|
if (this[_defaultFlag] && this[_flags] === `r+`) try {
|
|
516
|
-
e =
|
|
516
|
+
e = nativeFs.openSync(this[_path], this[_flags], this[_mode]);
|
|
517
517
|
} catch (e) {
|
|
518
518
|
if (e?.code === `ENOENT`) return this[_flags] = `w`, this[_open]();
|
|
519
519
|
throw e;
|
|
520
520
|
}
|
|
521
|
-
else e =
|
|
521
|
+
else e = nativeFs.openSync(this[_path], this[_flags], this[_mode]);
|
|
522
522
|
this[_onopen](null, e);
|
|
523
523
|
}
|
|
524
524
|
[_close]() {
|
|
525
525
|
if (this[_autoClose] && typeof this[_fd] == `number`) {
|
|
526
526
|
let e = this[_fd];
|
|
527
|
-
this[_fd] = void 0,
|
|
527
|
+
this[_fd] = void 0, nativeFs.closeSync(e), this.emit(`close`);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
[_write](e) {
|
|
531
531
|
let t = !0;
|
|
532
532
|
try {
|
|
533
|
-
this[_onwrite](null,
|
|
533
|
+
this[_onwrite](null, nativeFs.writeSync(this[_fd], e, 0, e.length, this[_pos])), t = !1;
|
|
534
534
|
} finally {
|
|
535
535
|
if (t) try {
|
|
536
536
|
this[_close]();
|
|
@@ -1524,7 +1524,7 @@ var WriteEntry = class extends Minipass {
|
|
|
1524
1524
|
return e === `error` && (this.#hadError = !0), super.emit(e, ...t);
|
|
1525
1525
|
}
|
|
1526
1526
|
[LSTAT]() {
|
|
1527
|
-
|
|
1527
|
+
nativeFs.lstat(this.absolute, (e, t) => {
|
|
1528
1528
|
if (e) return this.emit(`error`, e);
|
|
1529
1529
|
this[ONLSTAT](t);
|
|
1530
1530
|
});
|
|
@@ -1583,7 +1583,7 @@ var WriteEntry = class extends Minipass {
|
|
|
1583
1583
|
this.path.slice(-1) !== `/` && (this.path += `/`), this.stat.size = 0, this[HEADER](), this.end();
|
|
1584
1584
|
}
|
|
1585
1585
|
[SYMLINK$1]() {
|
|
1586
|
-
|
|
1586
|
+
nativeFs.readlink(this.absolute, (e, t) => {
|
|
1587
1587
|
if (e) return this.emit(`error`, e);
|
|
1588
1588
|
this[ONREADLINK](t);
|
|
1589
1589
|
});
|
|
@@ -1606,7 +1606,7 @@ var WriteEntry = class extends Minipass {
|
|
|
1606
1606
|
this[OPENFILE]();
|
|
1607
1607
|
}
|
|
1608
1608
|
[OPENFILE]() {
|
|
1609
|
-
|
|
1609
|
+
nativeFs.open(this.absolute, `r`, (e, t) => {
|
|
1610
1610
|
if (e) return this.emit(`error`, e);
|
|
1611
1611
|
this[ONOPENFILE](t);
|
|
1612
1612
|
});
|
|
@@ -1621,13 +1621,13 @@ var WriteEntry = class extends Minipass {
|
|
|
1621
1621
|
[READ]() {
|
|
1622
1622
|
let { fd: e, buf: t, offset: n, length: r, pos: i } = this;
|
|
1623
1623
|
if (e === void 0 || t === void 0) throw Error(`cannot read file without first opening`);
|
|
1624
|
-
|
|
1624
|
+
nativeFs.read(e, t, n, r, i, (e, t) => {
|
|
1625
1625
|
if (e) return this[CLOSE](() => this.emit(`error`, e));
|
|
1626
1626
|
this[ONREAD](t);
|
|
1627
1627
|
});
|
|
1628
1628
|
}
|
|
1629
1629
|
[CLOSE](e = () => {}) {
|
|
1630
|
-
this.fd !== void 0 &&
|
|
1630
|
+
this.fd !== void 0 && nativeFs.close(this.fd, e);
|
|
1631
1631
|
}
|
|
1632
1632
|
[ONREAD](e) {
|
|
1633
1633
|
if (e <= 0 && this.remain > 0) {
|
|
@@ -1669,20 +1669,20 @@ var WriteEntry = class extends Minipass {
|
|
|
1669
1669
|
}, WriteEntrySync = class extends WriteEntry {
|
|
1670
1670
|
sync = !0;
|
|
1671
1671
|
[LSTAT]() {
|
|
1672
|
-
this[ONLSTAT](
|
|
1672
|
+
this[ONLSTAT](nativeFs.lstatSync(this.absolute));
|
|
1673
1673
|
}
|
|
1674
1674
|
[SYMLINK$1]() {
|
|
1675
|
-
this[ONREADLINK](
|
|
1675
|
+
this[ONREADLINK](nativeFs.readlinkSync(this.absolute));
|
|
1676
1676
|
}
|
|
1677
1677
|
[OPENFILE]() {
|
|
1678
|
-
this[ONOPENFILE](
|
|
1678
|
+
this[ONOPENFILE](nativeFs.openSync(this.absolute, `r`));
|
|
1679
1679
|
}
|
|
1680
1680
|
[READ]() {
|
|
1681
1681
|
let e = !0;
|
|
1682
1682
|
try {
|
|
1683
1683
|
let { fd: t, buf: n, offset: r, length: i, pos: a } = this;
|
|
1684
1684
|
if (t === void 0 || n === void 0) throw Error(`fd and buf must be set in READ method`);
|
|
1685
|
-
let o =
|
|
1685
|
+
let o = nativeFs.readSync(t, n, r, i, a);
|
|
1686
1686
|
this[ONREAD](o), e = !1;
|
|
1687
1687
|
} finally {
|
|
1688
1688
|
if (e) try {
|
|
@@ -1694,7 +1694,7 @@ var WriteEntry = class extends Minipass {
|
|
|
1694
1694
|
e();
|
|
1695
1695
|
}
|
|
1696
1696
|
[CLOSE](e = () => {}) {
|
|
1697
|
-
this.fd !== void 0 &&
|
|
1697
|
+
this.fd !== void 0 && nativeFs.closeSync(this.fd), e();
|
|
1698
1698
|
}
|
|
1699
1699
|
}, WriteEntryTar = class extends Minipass {
|
|
1700
1700
|
blockLen = 0;
|
|
@@ -2026,7 +2026,7 @@ var Pack = class extends Minipass {
|
|
|
2026
2026
|
this[QUEUE].push(new PackJob(e, t)), this[PROCESS]();
|
|
2027
2027
|
}
|
|
2028
2028
|
[STAT](e) {
|
|
2029
|
-
e.pending = !0, this[JOBS] += 1,
|
|
2029
|
+
e.pending = !0, this[JOBS] += 1, nativeFs[this.follow ? `stat` : `lstat`](e.absolute, (t, n) => {
|
|
2030
2030
|
e.pending = !1, --this[JOBS], t ? this.emit(`error`, t) : this[ONSTAT](e, n);
|
|
2031
2031
|
});
|
|
2032
2032
|
}
|
|
@@ -2034,7 +2034,7 @@ var Pack = class extends Minipass {
|
|
|
2034
2034
|
this.statCache.set(e.absolute, t), e.stat = t, this.filter(e.path, t) ? t.isFile() && t.nlink > 1 && e === this[CURRENT] && !this.linkCache.get(`${t.dev}:${t.ino}`) && !this.sync && this[PROCESSJOB](e) : e.ignore = !0, this[PROCESS]();
|
|
2035
2035
|
}
|
|
2036
2036
|
[READDIR](e) {
|
|
2037
|
-
e.pending = !0, this[JOBS] += 1,
|
|
2037
|
+
e.pending = !0, this[JOBS] += 1, nativeFs.readdir(e.absolute, (t, n) => {
|
|
2038
2038
|
if (e.pending = !1, --this[JOBS], t) return this.emit(`error`, t);
|
|
2039
2039
|
this[ONREADDIR](e, n);
|
|
2040
2040
|
});
|
|
@@ -2138,10 +2138,10 @@ var Pack = class extends Minipass {
|
|
|
2138
2138
|
resume() {}
|
|
2139
2139
|
[STAT](e) {
|
|
2140
2140
|
let t = this.follow ? `statSync` : `lstatSync`;
|
|
2141
|
-
this[ONSTAT](e,
|
|
2141
|
+
this[ONSTAT](e, nativeFs[t](e.absolute));
|
|
2142
2142
|
}
|
|
2143
2143
|
[READDIR](e) {
|
|
2144
|
-
this[ONREADDIR](e,
|
|
2144
|
+
this[ONREADDIR](e, nativeFs.readdirSync(e.absolute));
|
|
2145
2145
|
}
|
|
2146
2146
|
[PIPE](e) {
|
|
2147
2147
|
let t = e.entry, n = this.zip;
|
|
@@ -2197,7 +2197,7 @@ makeCommand(createFileSync, createFile, (e, t) => {
|
|
|
2197
2197
|
}, (e, t) => {
|
|
2198
2198
|
if (!t?.length) throw TypeError(`no paths specified to add to archive`);
|
|
2199
2199
|
});
|
|
2200
|
-
const isWindows$2 = (process.env.__FAKE_PLATFORM__ || process.platform) === `win32`, { O_CREAT, O_TRUNC, O_WRONLY } =
|
|
2200
|
+
const isWindows$2 = (process.env.__FAKE_PLATFORM__ || process.platform) === `win32`, { O_CREAT, O_TRUNC, O_WRONLY } = nativeFs.constants, UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || nativeFs.constants.UV_FS_O_FILEMAP || 0, fMapEnabled = isWindows$2 && !!UV_FS_O_FILEMAP, fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY, getWriteFlag = fMapEnabled ? (e) => e < 524288 ? fMapFlag : `w` : () => `w`;
|
|
2201
2201
|
var CwdError = class extends Error {
|
|
2202
2202
|
path;
|
|
2203
2203
|
code;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuetify/cli",
|
|
3
|
-
"version": "1.1.5
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Vuetify CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"open": "^11.0.0",
|
|
36
36
|
"pathe": "^2.0.3",
|
|
37
37
|
"tsdown": "^0.20.3",
|
|
38
|
-
"@vuetify/cli-shared": "1.1.5
|
|
38
|
+
"@vuetify/cli-shared": "1.1.5"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@typescript-eslint/parser": "^8.54.0"
|