@lytjs/cli 6.7.0 → 6.8.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()) {
@@ -2020,10 +2020,10 @@ async function runCli(rawArgs = process.argv.slice(2)) {
2020
2020
  }
2021
2021
  case "generate":
2022
2022
  case "g": {
2023
- const genTypes = ["component", "page", "service", "hook", "store"];
2023
+ const genTypes = ["component", "page", "service", "hook", "store", "layout", "middleware"];
2024
2024
  if (!args[0] || !genTypes.includes(args[0])) {
2025
2025
  logger.error("Usage: lyt generate <type> <name>");
2026
- logger.info("Types: component, page, service, hook, store");
2026
+ logger.info("Types: component, page, service, hook, store, layout, middleware");
2027
2027
  logger.info("Example: lyt generate component Button");
2028
2028
  process.exit(1);
2029
2029
  }