@lytjs/cli 6.7.0 → 6.9.0

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/lyt.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { BuildOptions, CliOptions, CreateOptions, DevOptions, GenerateOptions, PackageJson, PluginBuildOptions, PluginCreateOptions, PluginPublishOptions, PluginValidateOptions, TestOptions, add, build, buildPlugin, create, createPlugin, detectPackageManager, dev, ensureDir, exists, generate, getAddCommand, getInstallCommand, getRunCommand, listPluginTemplates, listTemplates, logger, readFile, runCli, test, validatePlugin, writeFile } from './index.mjs';
package/dist/lyt.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { BuildOptions, CliOptions, CreateOptions, DevOptions, GenerateOptions, PackageJson, PluginBuildOptions, PluginCreateOptions, PluginPublishOptions, PluginValidateOptions, TestOptions, add, build, buildPlugin, create, createPlugin, detectPackageManager, dev, ensureDir, exists, generate, getAddCommand, getInstallCommand, getRunCommand, listPluginTemplates, listTemplates, logger, readFile, runCli, test, validatePlugin, writeFile } from './index.js';
package/dist/lyt.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync as readdirSync$1 } from 'fs';
2
+ import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'fs';
3
3
  import * as path from 'path';
4
4
  import { join, resolve, dirname } from 'path';
5
5
  import { execSync, spawn } from 'child_process';
@@ -66,7 +66,7 @@ function exists(path2) {
66
66
  }
67
67
  function isEmptyDir(dir) {
68
68
  if (!existsSync(dir)) return true;
69
- const files = readdirSync$1(dir);
69
+ const files = readdirSync(dir);
70
70
  return files.length === 0;
71
71
  }
72
72
  function detectPackageManager(cwd = process.cwd()) {
@@ -1997,16 +1997,7 @@ async function runCli(rawArgs = process.argv.slice(2)) {
1997
1997
  });
1998
1998
  break;
1999
1999
  case "add": {
2000
- const addTypes = [
2001
- "component",
2002
- "page",
2003
- "store",
2004
- "directive",
2005
- "composable",
2006
- "util",
2007
- "middleware",
2008
- "hook"
2009
- ];
2000
+ const addTypes = ["component", "page", "store", "directive", "composable", "util", "middleware", "hook"];
2010
2001
  if (!args[0] || !addTypes.includes(args[0])) {
2011
2002
  logger.error("Usage: lyt add <type> <name>");
2012
2003
  logger.info("Types: component, page, store, directive, composable, util, middleware, hook");
@@ -2020,10 +2011,10 @@ async function runCli(rawArgs = process.argv.slice(2)) {
2020
2011
  }
2021
2012
  case "generate":
2022
2013
  case "g": {
2023
- const genTypes = ["component", "page", "service", "hook", "store"];
2014
+ const genTypes = ["component", "page", "service", "hook", "store", "layout", "middleware"];
2024
2015
  if (!args[0] || !genTypes.includes(args[0])) {
2025
2016
  logger.error("Usage: lyt generate <type> <name>");
2026
- logger.info("Types: component, page, service, hook, store");
2017
+ logger.info("Types: component, page, service, hook, store, layout, middleware");
2027
2018
  logger.info("Example: lyt generate component Button");
2028
2019
  process.exit(1);
2029
2020
  }