create-vuetify0 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
@@ -10369,7 +10369,7 @@ function projectArgs(options) {
10369
10369
  css: {
10370
10370
  type: "string",
10371
10371
  description: i18n$1.t("args.css.description"),
10372
- valueHint: "unocss | tailwindcss | none"
10372
+ valueHint: "unocss | unocss-wind4 | unocss-vuetify | tailwindcss | none"
10373
10373
  },
10374
10374
  packageManager: {
10375
10375
  type: "string",
@@ -27236,11 +27236,11 @@ async function prompt(args, cwd = process.cwd()) {
27236
27236
  css: ({ results }) => {
27237
27237
  const type = results.type || args.type;
27238
27238
  const platform = results.platform || args.platform;
27239
- if (args.css) if (type === "vuetify" && args.css.startsWith("unocss")) R.warn(i18n$1.t("prompts.css_framework.status.not_supported", {
27240
- css: "UnoCSS",
27241
- vuetify: "Vuetify"
27242
- }));
27243
- else return Promise.resolve(args.css);
27239
+ if (args.css) {
27240
+ if (type === "vuetify" && args.css === "unocss") return Promise.resolve("unocss-vuetify");
27241
+ if (type === "vuetify0" && args.css.startsWith("unocss-")) R.warn("v0 supports only --css with \"unocss | tailwindcss | none\", fallback to \"unocss\"");
27242
+ return Promise.resolve(args.css);
27243
+ }
27244
27244
  if (!args.interactive) return Promise.resolve("none");
27245
27245
  if (type === "vuetify" && platform === "nuxt") return qt({
27246
27246
  message: i18n$1.t("prompts.css_framework.select"),
@@ -28049,7 +28049,7 @@ export const useAppStore = defineStore('app', {
28049
28049
 
28050
28050
  //#endregion
28051
28051
  //#region ../shared/package.json
28052
- var version$1 = "1.1.0";
28052
+ var version$1 = "1.1.2";
28053
28053
 
28054
28054
  //#endregion
28055
28055
  //#region ../shared/src/utils/getTemplateSource.ts
@@ -28251,8 +28251,11 @@ async function applyUnocssBase({ cwd, pkg, isTypescript, isNuxt }, options = {})
28251
28251
  for (const file of ["src/main.ts", "src/main.js"]) {
28252
28252
  const filePath = join$1(cwd, file);
28253
28253
  if (existsSync(filePath)) {
28254
- await writeFile(filePath, (await readFile(filePath, "utf8")).replace(/\/\/ Styles/g, "// Styles\nimport 'virtual:uno.css'"));
28255
- break;
28254
+ const content = await readFile(filePath, "utf8");
28255
+ if (!content.includes("virtual:uno.css")) {
28256
+ await writeFile(filePath, content.replace(/\/\/ Styles/g, "// Styles\nimport 'virtual:uno.css'"));
28257
+ break;
28258
+ }
28256
28259
  }
28257
28260
  }
28258
28261
  }
@@ -28720,10 +28723,27 @@ async function scaffold(options, callbacks = {}) {
28720
28723
  const debug = (...msg) => debugFlag && console.log("DEBUG:", ...msg);
28721
28724
  const projectRoot = join$1(cwd, name);
28722
28725
  debug("projectRoot=", projectRoot);
28723
- if (force && existsSync(projectRoot)) rmSync(projectRoot, {
28724
- recursive: true,
28725
- force: true
28726
- });
28726
+ if (force && existsSync(projectRoot)) {
28727
+ let retries = 5;
28728
+ while (retries > 0) try {
28729
+ rmSync(projectRoot, {
28730
+ recursive: true,
28731
+ force: true
28732
+ });
28733
+ break;
28734
+ } catch (error) {
28735
+ if ([
28736
+ "ENOTEMPTY",
28737
+ "EPERM",
28738
+ "EBUSY"
28739
+ ].includes(error.code)) {
28740
+ retries--;
28741
+ if (retries === 0) throw error;
28742
+ const start = Date.now();
28743
+ while (Date.now() - start < 50);
28744
+ } else throw error;
28745
+ }
28746
+ }
28727
28747
  const templateName = resolveTemplateName({
28728
28748
  vue: {
28729
28749
  vuetify0: "vuetify0/base",
@@ -30985,7 +31005,7 @@ const blue = ansi256(33);
30985
31005
 
30986
31006
  //#endregion
30987
31007
  //#region package.json
30988
- var version = "1.1.0";
31008
+ var version = "1.1.2";
30989
31009
 
30990
31010
  //#endregion
30991
31011
  //#region src/commands/upgrade.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vuetify0",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Create a new Vuetify project",
5
5
  "type": "module",
6
6
  "files": [
@@ -36,7 +36,7 @@
36
36
  "nypm": "^0.6.5",
37
37
  "pathe": "^2.0.3",
38
38
  "tsdown": "^0.20.3",
39
- "@vuetify/cli-shared": "1.1.0"
39
+ "@vuetify/cli-shared": "1.1.2"
40
40
  },
41
41
  "exports": {
42
42
  ".": "./dist/index.mjs",