@vuetify/cli 0.0.10-beta.4 → 0.0.10-beta.6

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 +44 -20
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -316,12 +316,12 @@ var require_isFunction = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
316
316
  * _.isFunction(/abc/);
317
317
  * // => false
318
318
  */
319
- function isFunction$3(value) {
319
+ function isFunction$4(value) {
320
320
  if (!isObject$12(value)) return false;
321
321
  var tag = baseGetTag$4(value);
322
322
  return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
323
323
  }
324
- module.exports = isFunction$3;
324
+ module.exports = isFunction$4;
325
325
  }) });
326
326
 
327
327
  //#endregion
@@ -383,7 +383,7 @@ var require__toSource = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
383
383
  //#endregion
384
384
  //#region ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js
385
385
  var require__baseIsNative = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js": ((exports, module) => {
386
- var isFunction$2 = require_isFunction(), isMasked = require__isMasked(), isObject$11 = require_isObject(), toSource$1 = require__toSource();
386
+ var isFunction$3 = require_isFunction(), isMasked = require__isMasked(), isObject$11 = require_isObject(), toSource$1 = require__toSource();
387
387
  /**
388
388
  * Used to match `RegExp`
389
389
  * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
@@ -409,7 +409,7 @@ var require__baseIsNative = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.
409
409
  */
410
410
  function baseIsNative$1(value) {
411
411
  if (!isObject$11(value) || isMasked(value)) return false;
412
- return (isFunction$2(value) ? reIsNative : reIsHostCtor).test(toSource$1(value));
412
+ return (isFunction$3(value) ? reIsNative : reIsHostCtor).test(toSource$1(value));
413
413
  }
414
414
  module.exports = baseIsNative$1;
415
415
  }) });
@@ -1873,7 +1873,7 @@ var require__initCloneObject = /* @__PURE__ */ __commonJS$1({ "../../node_module
1873
1873
  //#endregion
1874
1874
  //#region ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js
1875
1875
  var require_isArrayLike = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js": ((exports, module) => {
1876
- var isFunction$1 = require_isFunction(), isLength$1 = require_isLength();
1876
+ var isFunction$2 = require_isFunction(), isLength$1 = require_isLength();
1877
1877
  /**
1878
1878
  * Checks if `value` is array-like. A value is considered array-like if it's
1879
1879
  * not a function and has a `value.length` that's an integer greater than or
@@ -1900,7 +1900,7 @@ var require_isArrayLike = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pn
1900
1900
  * // => false
1901
1901
  */
1902
1902
  function isArrayLike$6(value) {
1903
- return value != null && isLength$1(value.length) && !isFunction$1(value);
1903
+ return value != null && isLength$1(value.length) && !isFunction$2(value);
1904
1904
  }
1905
1905
  module.exports = isArrayLike$6;
1906
1906
  }) });
@@ -2360,7 +2360,7 @@ var require_toPlainObject = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.
2360
2360
  //#endregion
2361
2361
  //#region ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMergeDeep.js
2362
2362
  var require__baseMergeDeep = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMergeDeep.js": ((exports, module) => {
2363
- var assignMergeValue$1 = require__assignMergeValue(), cloneBuffer = require__cloneBuffer(), cloneTypedArray = require__cloneTypedArray(), copyArray = require__copyArray(), initCloneObject = require__initCloneObject(), isArguments$1 = require_isArguments(), isArray$9 = require_isArray(), isArrayLikeObject = require_isArrayLikeObject(), isBuffer$1 = require_isBuffer(), isFunction = require_isFunction(), isObject$8 = require_isObject(), isPlainObject$3 = require_isPlainObject(), isTypedArray$1 = require_isTypedArray(), safeGet$1 = require__safeGet(), toPlainObject = require_toPlainObject();
2363
+ var assignMergeValue$1 = require__assignMergeValue(), cloneBuffer = require__cloneBuffer(), cloneTypedArray = require__cloneTypedArray(), copyArray = require__copyArray(), initCloneObject = require__initCloneObject(), isArguments$1 = require_isArguments(), isArray$9 = require_isArray(), isArrayLikeObject = require_isArrayLikeObject(), isBuffer$1 = require_isBuffer(), isFunction$1 = require_isFunction(), isObject$8 = require_isObject(), isPlainObject$3 = require_isPlainObject(), isTypedArray$1 = require_isTypedArray(), safeGet$1 = require__safeGet(), toPlainObject = require_toPlainObject();
2364
2364
  /**
2365
2365
  * A specialized version of `baseMerge` for arrays and objects which performs
2366
2366
  * deep merges and tracks traversed objects enabling objects with circular
@@ -2399,7 +2399,7 @@ var require__baseMergeDeep = /* @__PURE__ */ __commonJS$1({ "../../node_modules/
2399
2399
  else if (isPlainObject$3(srcValue) || isArguments$1(srcValue)) {
2400
2400
  newValue = objValue;
2401
2401
  if (isArguments$1(objValue)) newValue = toPlainObject(objValue);
2402
- else if (!isObject$8(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
2402
+ else if (!isObject$8(objValue) || isFunction$1(objValue)) newValue = initCloneObject(srcValue);
2403
2403
  } else isCommon = false;
2404
2404
  }
2405
2405
  if (isCommon) {
@@ -44513,7 +44513,7 @@ function typesPlugin(_fork) {
44513
44513
  return type;
44514
44514
  }
44515
44515
  const isString$2 = defBuiltInType("string", "truthy");
44516
- const isFunction$4 = defBuiltInType("function", function() {});
44516
+ const isFunction$5 = defBuiltInType("function", function() {});
44517
44517
  const isArray$4$1 = defBuiltInType("array", []);
44518
44518
  const isObject$4$1 = defBuiltInType("object", {});
44519
44519
  const isRegExp = defBuiltInType("RegExp", /./);
@@ -44524,7 +44524,7 @@ function typesPlugin(_fork) {
44524
44524
  const isUndefined = defBuiltInType("undefined", void 0);
44525
44525
  const builtInTypes$1 = {
44526
44526
  string: isString$2,
44527
- function: isFunction$4,
44527
+ function: isFunction$5,
44528
44528
  array: isArray$4$1,
44529
44529
  object: isObject$4$1,
44530
44530
  RegExp: isRegExp,
@@ -44683,7 +44683,7 @@ function typesPlugin(_fork) {
44683
44683
  var old = nodePrototype[name];
44684
44684
  if (isUndefined.check(func)) delete nodePrototype[name];
44685
44685
  else {
44686
- isFunction$4.assert(func);
44686
+ isFunction$5.assert(func);
44687
44687
  Object.defineProperty(nodePrototype, name, {
44688
44688
  enumerable: true,
44689
44689
  configurable: true,
@@ -45468,7 +45468,7 @@ function pathVisitorPlugin(fork) {
45468
45468
  var NodePath$1 = fork.use(nodePathPlugin);
45469
45469
  var isArray$4$1 = types$1.builtInTypes.array;
45470
45470
  var isObject$4$1 = types$1.builtInTypes.object;
45471
- var isFunction$4 = types$1.builtInTypes.function;
45471
+ var isFunction$5 = types$1.builtInTypes.function;
45472
45472
  var undefined$1;
45473
45473
  const PathVisitor$1 = function PathVisitor$2() {
45474
45474
  if (!(this instanceof PathVisitor$2)) throw new Error("PathVisitor constructor cannot be invoked without 'new'");
@@ -45489,7 +45489,7 @@ function pathVisitorPlugin(fork) {
45489
45489
  for (var i$9 = 0; i$9 < typeNameCount; ++i$9) {
45490
45490
  var typeName = typeNameKeys[i$9];
45491
45491
  methodName = "visit" + supertypeTable[typeName];
45492
- if (isFunction$4.check(visitor[methodName])) methodNameTable[typeName] = methodName;
45492
+ if (isFunction$5.check(visitor[methodName])) methodNameTable[typeName] = methodName;
45493
45493
  }
45494
45494
  return methodNameTable;
45495
45495
  }
@@ -45504,8 +45504,8 @@ function pathVisitorPlugin(fork) {
45504
45504
  Vp.constructor = Visitor;
45505
45505
  extend(Vp, methods);
45506
45506
  extend(Visitor, PathVisitor$1);
45507
- isFunction$4.assert(Visitor.fromMethodsObject);
45508
- isFunction$4.assert(Visitor.visit);
45507
+ isFunction$5.assert(Visitor.fromMethodsObject);
45508
+ isFunction$5.assert(Visitor.visit);
45509
45509
  return new Visitor();
45510
45510
  };
45511
45511
  function extend(target, source) {
@@ -52685,6 +52685,30 @@ export default withNuxt(
52685
52685
  `;
52686
52686
  }
52687
52687
 
52688
+ //#endregion
52689
+ //#region ../shared/src/utils/magicast.ts
52690
+ /**
52691
+ * Adds a statement to a function body using AST manipulation.
52692
+ * magicast's $body.push() doesn't work for function-expression types,
52693
+ * so we need to manipulate the AST directly.
52694
+ */
52695
+ function addStatementToFunctionBody(fn$1, statement) {
52696
+ if (!fn$1 || !fn$1.$ast?.body?.body) return false;
52697
+ const newStatement = {
52698
+ type: "ExpressionStatement",
52699
+ expression: parseExpression(statement).$ast,
52700
+ loc: null
52701
+ };
52702
+ fn$1.$ast.body.body.push(newStatement);
52703
+ return true;
52704
+ }
52705
+ /**
52706
+ * Checks if the export is a function (either 'function' or 'function-expression')
52707
+ */
52708
+ function isFunction(fn$1) {
52709
+ return fn$1 && (fn$1.$type === "function" || fn$1.$type === "function-expression");
52710
+ }
52711
+
52688
52712
  //#endregion
52689
52713
  //#region ../shared/src/features/i18n.ts
52690
52714
  const i18n$1 = {
@@ -52718,7 +52742,7 @@ const i18n$1 = {
52718
52742
  local: "i18n"
52719
52743
  });
52720
52744
  const registerPlugins = mod.exports.registerPlugins;
52721
- if (registerPlugins && registerPlugins.$type === "function") registerPlugins.$body.push("app.use(i18n)");
52745
+ if (isFunction(registerPlugins)) addStatementToFunctionBody(registerPlugins, "app.use(i18n)");
52722
52746
  await writeFile(pluginsPath, mod.generate().code);
52723
52747
  }
52724
52748
  }
@@ -52839,7 +52863,7 @@ const pinia = {
52839
52863
  imported: "createPinia"
52840
52864
  });
52841
52865
  const registerPlugins = mod.exports.registerPlugins;
52842
- if (registerPlugins && registerPlugins.$type === "function") registerPlugins.$body.push("app.use(createPinia())");
52866
+ if (isFunction(registerPlugins)) addStatementToFunctionBody(registerPlugins, "app.use(createPinia())");
52843
52867
  await writeFile(pluginsPath, mod.generate().code);
52844
52868
  }
52845
52869
  }
@@ -52897,7 +52921,7 @@ const router = {
52897
52921
  local: "router"
52898
52922
  });
52899
52923
  const registerPlugins = mod.exports.registerPlugins;
52900
- if (registerPlugins && registerPlugins.$type === "function") registerPlugins.$body.push("app.use(router)");
52924
+ if (isFunction(registerPlugins)) addStatementToFunctionBody(registerPlugins, "app.use(router)");
52901
52925
  await writeFile(pluginsPath, mod.generate().code);
52902
52926
  }
52903
52927
  };
@@ -52921,7 +52945,7 @@ const fileRouter = {
52921
52945
  local: "router"
52922
52946
  });
52923
52947
  const registerPlugins = mod.exports.registerPlugins;
52924
- if (registerPlugins && registerPlugins.$type === "function") registerPlugins.$body.push("app.use(router)");
52948
+ if (isFunction(registerPlugins)) addStatementToFunctionBody(registerPlugins, "app.use(router)");
52925
52949
  await writeFile(pluginsPath, mod.generate().code);
52926
52950
  const viteConfigPath = join(cwd$2, `vite.config.m${ext}`);
52927
52951
  if (existsSync(viteConfigPath)) {
@@ -56032,7 +56056,7 @@ function commandUpgradeFabric(pkgName) {
56032
56056
 
56033
56057
  //#endregion
56034
56058
  //#region package.json
56035
- var version = "0.0.10-beta.4";
56059
+ var version = "0.0.10-beta.6";
56036
56060
 
56037
56061
  //#endregion
56038
56062
  //#region src/commands/docs.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuetify/cli",
3
- "version": "0.0.10-beta.4",
3
+ "version": "0.0.10-beta.6",
4
4
  "description": "Vuetify CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,7 @@
18
18
  "open": "^11.0.0",
19
19
  "pathe": "^2.0.3",
20
20
  "tsdown": "^0.16.6",
21
- "@vuetify/cli-shared": "0.0.10-beta.4"
21
+ "@vuetify/cli-shared": "0.0.10-beta.6"
22
22
  },
23
23
  "main": "./dist/index.mjs",
24
24
  "module": "./dist/index.mjs",