@vuetify/cli 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/dist/index.mjs +34 -14
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -10339,7 +10339,7 @@ function projectArgs(options) {
10339
10339
  css: {
10340
10340
  type: "string",
10341
10341
  description: i18n$1.t("args.css.description"),
10342
- valueHint: "unocss | tailwindcss | none"
10342
+ valueHint: "unocss | unocss-wind4 | unocss-vuetify | tailwindcss | none"
10343
10343
  },
10344
10344
  packageManager: {
10345
10345
  type: "string",
@@ -126309,11 +126309,11 @@ async function prompt(args, cwd = process.cwd()) {
126309
126309
  css: ({ results }) => {
126310
126310
  const type = results.type || args.type;
126311
126311
  const platform = results.platform || args.platform;
126312
- if (args.css) if (type === "vuetify" && args.css.startsWith("unocss")) R$3.warn(i18n$1.t("prompts.css_framework.status.not_supported", {
126313
- css: "UnoCSS",
126314
- vuetify: "Vuetify"
126315
- }));
126316
- else return Promise.resolve(args.css);
126312
+ if (args.css) {
126313
+ if (type === "vuetify" && args.css === "unocss") return Promise.resolve("unocss-vuetify");
126314
+ if (type === "vuetify0" && args.css.startsWith("unocss-")) R$3.warn("v0 supports only --css with \"unocss | tailwindcss | none\", fallback to \"unocss\"");
126315
+ return Promise.resolve(args.css);
126316
+ }
126317
126317
  if (!args.interactive) return Promise.resolve("none");
126318
126318
  if (type === "vuetify" && platform === "nuxt") return qt({
126319
126319
  message: i18n$1.t("prompts.css_framework.select"),
@@ -148104,7 +148104,7 @@ export const useAppStore = defineStore('app', {
148104
148104
 
148105
148105
  //#endregion
148106
148106
  //#region ../shared/package.json
148107
- var version$1 = "1.1.0";
148107
+ var version$1 = "1.1.2";
148108
148108
 
148109
148109
  //#endregion
148110
148110
  //#region ../shared/src/utils/getTemplateSource.ts
@@ -148306,8 +148306,11 @@ async function applyUnocssBase({ cwd, pkg, isTypescript, isNuxt }, options = {})
148306
148306
  for (const file of ["src/main.ts", "src/main.js"]) {
148307
148307
  const filePath = join$1(cwd, file);
148308
148308
  if (existsSync(filePath)) {
148309
- await writeFile(filePath, (await readFile(filePath, "utf8")).replace(/\/\/ Styles/g, "// Styles\nimport 'virtual:uno.css'"));
148310
- break;
148309
+ const content = await readFile(filePath, "utf8");
148310
+ if (!content.includes("virtual:uno.css")) {
148311
+ await writeFile(filePath, content.replace(/\/\/ Styles/g, "// Styles\nimport 'virtual:uno.css'"));
148312
+ break;
148313
+ }
148311
148314
  }
148312
148315
  }
148313
148316
  }
@@ -149394,10 +149397,27 @@ async function scaffold(options, callbacks = {}) {
149394
149397
  const debug = (...msg) => debugFlag && console.log("DEBUG:", ...msg);
149395
149398
  const projectRoot = join$1(cwd, name);
149396
149399
  debug("projectRoot=", projectRoot);
149397
- if (force && existsSync(projectRoot)) rmSync(projectRoot, {
149398
- recursive: true,
149399
- force: true
149400
- });
149400
+ if (force && existsSync(projectRoot)) {
149401
+ let retries = 5;
149402
+ while (retries > 0) try {
149403
+ rmSync(projectRoot, {
149404
+ recursive: true,
149405
+ force: true
149406
+ });
149407
+ break;
149408
+ } catch (error) {
149409
+ if ([
149410
+ "ENOTEMPTY",
149411
+ "EPERM",
149412
+ "EBUSY"
149413
+ ].includes(error.code)) {
149414
+ retries--;
149415
+ if (retries === 0) throw error;
149416
+ const start = Date.now();
149417
+ while (Date.now() - start < 50);
149418
+ } else throw error;
149419
+ }
149420
+ }
149401
149421
  const templateName = resolveTemplateName({
149402
149422
  vue: {
149403
149423
  vuetify0: "vuetify0/base",
@@ -150989,7 +151009,7 @@ const JsonReporter = { report: async (data, options) => {
150989
151009
 
150990
151010
  //#endregion
150991
151011
  //#region package.json
150992
- var version = "1.1.0";
151012
+ var version = "1.1.2";
150993
151013
 
150994
151014
  //#endregion
150995
151015
  //#region src/commands/analyze.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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.0"
38
+ "@vuetify/cli-shared": "1.1.2"
39
39
  },
40
40
  "dependencies": {
41
41
  "@typescript-eslint/parser": "^8.54.0"