@lytjs/cli 6.4.0 → 6.6.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/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "@lytjs/cli",
3
- "version": "6.4.0",
4
- "description": "LytJS project scaffolding and development CLI tool",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.mjs",
7
- "types": "./dist/index.d.ts",
8
- "bin": {
9
- "lyt": "./lyt-cli.js"
10
- },
11
- "exports": {
12
- ".": {
13
- "types": "./dist/index.d.ts",
14
- "import": "./dist/index.mjs",
15
- "require": "./dist/index.cjs"
16
- },
17
- "./package.json": "./package.json"
18
- },
19
- "files": [
20
- "dist",
21
- "lyt-cli.js"
22
- ],
23
- "sideEffects": false,
24
- "scripts": {
25
- "build": "tsup",
26
- "dev": "tsup --watch",
27
- "test": "vitest run",
28
- "test:watch": "vitest",
29
- "test:coverage": "vitest run --coverage",
30
- "type-check": "tsc --noEmit",
31
- "lint": "eslint \"src/**/*.ts\"",
32
- "clean": "rm -rf dist"
33
- },
34
- "dependencies": {
35
- "@lytjs/common-is": "^6.0.0",
36
- "@lytjs/common-env": "^6.0.0"
37
- },
38
- "devDependencies": {
39
- "tsup": "^8.0.0",
40
- "typescript": "^5.4.0",
41
- "vitest": "^3.0.0"
42
- },
43
- "license": "MIT",
44
- "repository": {
45
- "type": "git",
46
- "url": "https://gitee.com/lytjs/lytjs.git",
47
- "directory": "packages/tools/packages/cli"
48
- },
49
- "keywords": [
50
- "lyt",
51
- "cli",
52
- "scaffold",
53
- "create-lyt"
54
- ]
55
- }
1
+ {
2
+ "name": "@lytjs/cli",
3
+ "version": "6.6.0",
4
+ "description": "LytJS project scaffolding and development CLI tool",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "lyt": "./lyt-cli.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.cjs"
16
+ },
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "lyt-cli.js"
22
+ ],
23
+ "sideEffects": false,
24
+ "scripts": {
25
+ "build": "tsup",
26
+ "dev": "tsup --watch",
27
+ "test": "vitest run",
28
+ "test:watch": "vitest",
29
+ "test:coverage": "vitest run --coverage",
30
+ "type-check": "tsc --noEmit",
31
+ "lint": "eslint \"src/**/*.ts\"",
32
+ "clean": "rm -rf dist"
33
+ },
34
+ "dependencies": {
35
+ "@lytjs/common-is": "workspace:*",
36
+ "@lytjs/common-env": "workspace:*"
37
+ },
38
+ "devDependencies": {
39
+ "tsup": "^8.0.0",
40
+ "typescript": "^5.4.0",
41
+ "vitest": "^3.0.0"
42
+ },
43
+ "license": "MIT",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://gitee.com/lytjs/lytjs.git",
47
+ "directory": "packages/tools/packages/cli"
48
+ },
49
+ "keywords": [
50
+ "lyt",
51
+ "cli",
52
+ "scaffold",
53
+ "create-lyt"
54
+ ]
55
+ }
package/dist/create.d.mts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/create.d.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/index.d.mts DELETED
@@ -1,188 +0,0 @@
1
- /**
2
- * @lytjs/cli - CLI runner
3
- *
4
- * Main entry point for the CLI. Parses arguments and routes to commands.
5
- */
6
- declare function runCli(rawArgs?: string[]): Promise<void>;
7
-
8
- /**
9
- * @lytjs/cli - Type definitions
10
- */
11
- interface CliOptions {
12
- command: string;
13
- args: string[];
14
- options: Record<string, unknown>;
15
- }
16
- interface CreateOptions {
17
- template?: string;
18
- force?: boolean;
19
- }
20
- interface DevOptions {
21
- port?: number;
22
- host?: string;
23
- open?: boolean;
24
- }
25
- interface BuildOptions {
26
- outDir?: string;
27
- ssr?: boolean;
28
- minify?: boolean;
29
- }
30
- interface TestOptions {
31
- watch?: boolean;
32
- coverage?: boolean;
33
- grep?: string;
34
- }
35
- interface AddOptions {
36
- force?: boolean;
37
- }
38
- interface PackageJson {
39
- name: string;
40
- version: string;
41
- dependencies?: Record<string, string>;
42
- devDependencies?: Record<string, string>;
43
- scripts?: Record<string, string>;
44
- }
45
-
46
- /**
47
- * @lytjs/cli - create command
48
- *
49
- * Creates a new LytJS project from a template.
50
- */
51
-
52
- /**
53
- * Create a new LytJS project
54
- */
55
- declare function create(projectName?: string, options?: Partial<CreateOptions>): Promise<void>;
56
- /**
57
- * List available templates
58
- */
59
- declare function listTemplates(): void;
60
-
61
- /**
62
- * @lytjs/cli - dev command
63
- *
64
- * Starts the development server.
65
- */
66
-
67
- /**
68
- * Start the development server
69
- */
70
- declare function dev(options?: DevOptions): Promise<void>;
71
-
72
- /**
73
- * @lytjs/cli - build command
74
- *
75
- * Builds the project for production.
76
- */
77
-
78
- /**
79
- * Build the project for production
80
- */
81
- declare function build(options?: BuildOptions): Promise<void>;
82
-
83
- /**
84
- * @lytjs/cli - test command
85
- *
86
- * Runs the test suite.
87
- */
88
-
89
- /**
90
- * Run tests
91
- */
92
- declare function test(options?: TestOptions): Promise<void>;
93
-
94
- /**
95
- * @lytjs/cli - add command
96
- *
97
- * Generate components, pages, and stores.
98
- */
99
-
100
- type AddType = 'component' | 'page' | 'store';
101
- /**
102
- * Add a component, page, or store
103
- */
104
- declare function add(type: AddType, name: string, options?: AddOptions): Promise<void>;
105
-
106
- /**
107
- * @lytjs/cli - plugin command
108
- *
109
- * Plugin development CLI commands: create, build, validate, publish.
110
- */
111
- interface PluginCreateOptions {
112
- template?: string;
113
- force?: boolean;
114
- skipInstall?: boolean;
115
- }
116
- interface PluginBuildOptions {
117
- outDir?: string;
118
- minify?: boolean;
119
- sourcemap?: boolean;
120
- }
121
- interface PluginValidateOptions {
122
- strict?: boolean;
123
- warningsAsErrors?: boolean;
124
- }
125
- interface PluginPublishOptions {
126
- registry?: string;
127
- access?: 'public' | 'restricted';
128
- otp?: string;
129
- }
130
- declare function createPlugin(name: string, options?: PluginCreateOptions): Promise<void>;
131
- declare function buildPlugin(options?: PluginBuildOptions): Promise<void>;
132
- declare function validatePlugin(options?: PluginValidateOptions): Promise<void>;
133
- declare function listPluginTemplates(): void;
134
-
135
- /**
136
- * @lytjs/cli - Logger utilities
137
- */
138
- declare const logger: {
139
- info(message: string): void;
140
- success(message: string): void;
141
- warning(message: string): void;
142
- error(message: string): void;
143
- dim(message: string): void;
144
- bold(message: string): string;
145
- };
146
-
147
- /**
148
- * @lytjs/cli - File system utilities
149
- */
150
- /**
151
- * Ensure directory exists (create if not)
152
- */
153
- declare function ensureDir(dir: string): void;
154
- /**
155
- * Write a file with content, creating parent directories if needed
156
- */
157
- declare function writeFile(filePath: string, content: string): void;
158
- /**
159
- * Read a file as string
160
- */
161
- declare function readFile(filePath: string): string;
162
- /**
163
- * Check if path exists
164
- */
165
- declare function exists(path: string): boolean;
166
-
167
- /**
168
- * @lytjs/cli - Package manager utilities
169
- */
170
- type PackageManager = 'npm' | 'yarn' | 'pnpm';
171
- /**
172
- * Detect which package manager to use
173
- */
174
- declare function detectPackageManager(cwd?: string): PackageManager;
175
- /**
176
- * Get install command for package manager
177
- */
178
- declare function getInstallCommand(pm: PackageManager): string;
179
- /**
180
- * Get run command for package manager
181
- */
182
- declare function getRunCommand(pm: PackageManager, script: string): string;
183
- /**
184
- * Get add dependency command
185
- */
186
- declare function getAddCommand(pm: PackageManager, dep: string, dev?: boolean): string;
187
-
188
- export { type BuildOptions, type CliOptions, type CreateOptions, type DevOptions, type PackageJson, type PluginBuildOptions, type PluginCreateOptions, type PluginPublishOptions, type PluginValidateOptions, type TestOptions, add, build, buildPlugin, create, createPlugin, detectPackageManager, dev, ensureDir, exists, getAddCommand, getInstallCommand, getRunCommand, listPluginTemplates, listTemplates, logger, readFile, runCli, test, validatePlugin, writeFile };
package/dist/index.d.ts DELETED
@@ -1,188 +0,0 @@
1
- /**
2
- * @lytjs/cli - CLI runner
3
- *
4
- * Main entry point for the CLI. Parses arguments and routes to commands.
5
- */
6
- declare function runCli(rawArgs?: string[]): Promise<void>;
7
-
8
- /**
9
- * @lytjs/cli - Type definitions
10
- */
11
- interface CliOptions {
12
- command: string;
13
- args: string[];
14
- options: Record<string, unknown>;
15
- }
16
- interface CreateOptions {
17
- template?: string;
18
- force?: boolean;
19
- }
20
- interface DevOptions {
21
- port?: number;
22
- host?: string;
23
- open?: boolean;
24
- }
25
- interface BuildOptions {
26
- outDir?: string;
27
- ssr?: boolean;
28
- minify?: boolean;
29
- }
30
- interface TestOptions {
31
- watch?: boolean;
32
- coverage?: boolean;
33
- grep?: string;
34
- }
35
- interface AddOptions {
36
- force?: boolean;
37
- }
38
- interface PackageJson {
39
- name: string;
40
- version: string;
41
- dependencies?: Record<string, string>;
42
- devDependencies?: Record<string, string>;
43
- scripts?: Record<string, string>;
44
- }
45
-
46
- /**
47
- * @lytjs/cli - create command
48
- *
49
- * Creates a new LytJS project from a template.
50
- */
51
-
52
- /**
53
- * Create a new LytJS project
54
- */
55
- declare function create(projectName?: string, options?: Partial<CreateOptions>): Promise<void>;
56
- /**
57
- * List available templates
58
- */
59
- declare function listTemplates(): void;
60
-
61
- /**
62
- * @lytjs/cli - dev command
63
- *
64
- * Starts the development server.
65
- */
66
-
67
- /**
68
- * Start the development server
69
- */
70
- declare function dev(options?: DevOptions): Promise<void>;
71
-
72
- /**
73
- * @lytjs/cli - build command
74
- *
75
- * Builds the project for production.
76
- */
77
-
78
- /**
79
- * Build the project for production
80
- */
81
- declare function build(options?: BuildOptions): Promise<void>;
82
-
83
- /**
84
- * @lytjs/cli - test command
85
- *
86
- * Runs the test suite.
87
- */
88
-
89
- /**
90
- * Run tests
91
- */
92
- declare function test(options?: TestOptions): Promise<void>;
93
-
94
- /**
95
- * @lytjs/cli - add command
96
- *
97
- * Generate components, pages, and stores.
98
- */
99
-
100
- type AddType = 'component' | 'page' | 'store';
101
- /**
102
- * Add a component, page, or store
103
- */
104
- declare function add(type: AddType, name: string, options?: AddOptions): Promise<void>;
105
-
106
- /**
107
- * @lytjs/cli - plugin command
108
- *
109
- * Plugin development CLI commands: create, build, validate, publish.
110
- */
111
- interface PluginCreateOptions {
112
- template?: string;
113
- force?: boolean;
114
- skipInstall?: boolean;
115
- }
116
- interface PluginBuildOptions {
117
- outDir?: string;
118
- minify?: boolean;
119
- sourcemap?: boolean;
120
- }
121
- interface PluginValidateOptions {
122
- strict?: boolean;
123
- warningsAsErrors?: boolean;
124
- }
125
- interface PluginPublishOptions {
126
- registry?: string;
127
- access?: 'public' | 'restricted';
128
- otp?: string;
129
- }
130
- declare function createPlugin(name: string, options?: PluginCreateOptions): Promise<void>;
131
- declare function buildPlugin(options?: PluginBuildOptions): Promise<void>;
132
- declare function validatePlugin(options?: PluginValidateOptions): Promise<void>;
133
- declare function listPluginTemplates(): void;
134
-
135
- /**
136
- * @lytjs/cli - Logger utilities
137
- */
138
- declare const logger: {
139
- info(message: string): void;
140
- success(message: string): void;
141
- warning(message: string): void;
142
- error(message: string): void;
143
- dim(message: string): void;
144
- bold(message: string): string;
145
- };
146
-
147
- /**
148
- * @lytjs/cli - File system utilities
149
- */
150
- /**
151
- * Ensure directory exists (create if not)
152
- */
153
- declare function ensureDir(dir: string): void;
154
- /**
155
- * Write a file with content, creating parent directories if needed
156
- */
157
- declare function writeFile(filePath: string, content: string): void;
158
- /**
159
- * Read a file as string
160
- */
161
- declare function readFile(filePath: string): string;
162
- /**
163
- * Check if path exists
164
- */
165
- declare function exists(path: string): boolean;
166
-
167
- /**
168
- * @lytjs/cli - Package manager utilities
169
- */
170
- type PackageManager = 'npm' | 'yarn' | 'pnpm';
171
- /**
172
- * Detect which package manager to use
173
- */
174
- declare function detectPackageManager(cwd?: string): PackageManager;
175
- /**
176
- * Get install command for package manager
177
- */
178
- declare function getInstallCommand(pm: PackageManager): string;
179
- /**
180
- * Get run command for package manager
181
- */
182
- declare function getRunCommand(pm: PackageManager, script: string): string;
183
- /**
184
- * Get add dependency command
185
- */
186
- declare function getAddCommand(pm: PackageManager, dep: string, dev?: boolean): string;
187
-
188
- export { type BuildOptions, type CliOptions, type CreateOptions, type DevOptions, type PackageJson, type PluginBuildOptions, type PluginCreateOptions, type PluginPublishOptions, type PluginValidateOptions, type TestOptions, add, build, buildPlugin, create, createPlugin, detectPackageManager, dev, ensureDir, exists, getAddCommand, getInstallCommand, getRunCommand, listPluginTemplates, listTemplates, logger, readFile, runCli, test, validatePlugin, writeFile };
package/dist/lyt.d.mts DELETED
@@ -1 +0,0 @@
1
- export { BuildOptions, CliOptions, CreateOptions, DevOptions, PackageJson, PluginBuildOptions, PluginCreateOptions, PluginPublishOptions, PluginValidateOptions, TestOptions, add, build, buildPlugin, create, createPlugin, detectPackageManager, dev, ensureDir, exists, getAddCommand, getInstallCommand, getRunCommand, listPluginTemplates, listTemplates, logger, readFile, runCli, test, validatePlugin, writeFile } from './index.mjs';
package/dist/lyt.d.ts DELETED
@@ -1 +0,0 @@
1
- export { BuildOptions, CliOptions, CreateOptions, DevOptions, PackageJson, PluginBuildOptions, PluginCreateOptions, PluginPublishOptions, PluginValidateOptions, TestOptions, add, build, buildPlugin, create, createPlugin, detectPackageManager, dev, ensureDir, exists, getAddCommand, getInstallCommand, getRunCommand, listPluginTemplates, listTemplates, logger, readFile, runCli, test, validatePlugin, writeFile } from './index.js';