feng3d-cli 0.0.1

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.
@@ -0,0 +1,172 @@
1
+ /**
2
+ * 更新项目规范命令
3
+ */
4
+ import fs from 'fs-extra';
5
+ import path from 'path';
6
+ import chalk from 'chalk';
7
+ import { getDevDependencies } from '../versions.js';
8
+ import { gitignoreTemplate, cursorrrulesTemplate } from '../templates.js';
9
+ /**
10
+ * 更新项目的规范配置
11
+ */
12
+ export async function updateProject(options) {
13
+ const projectDir = path.resolve(options.directory);
14
+ // 检查是否是有效的项目目录
15
+ const packageJsonPath = path.join(projectDir, 'package.json');
16
+ if (!await fs.pathExists(packageJsonPath)) {
17
+ throw new Error(`${projectDir} 不是有效的项目目录(未找到 package.json)`);
18
+ }
19
+ const updateAll = options.all || (!options.eslint && !options.gitignore && !options.cursorrules && !options.deps);
20
+ // 更新 .gitignore
21
+ if (updateAll || options.gitignore) {
22
+ await fs.writeFile(path.join(projectDir, '.gitignore'), gitignoreTemplate);
23
+ console.log(chalk.gray(' 更新: .gitignore'));
24
+ }
25
+ // 更新 .cursorrules
26
+ if (updateAll || options.cursorrules) {
27
+ await fs.writeFile(path.join(projectDir, '.cursorrules'), cursorrrulesTemplate);
28
+ console.log(chalk.gray(' 更新: .cursorrules'));
29
+ }
30
+ // 更新 eslint.config.js
31
+ if (updateAll || options.eslint) {
32
+ await createEslintConfigFile(projectDir);
33
+ console.log(chalk.gray(' 更新: eslint.config.js'));
34
+ }
35
+ // 更新依赖版本
36
+ if (updateAll || options.deps) {
37
+ await updateDependencies(projectDir);
38
+ console.log(chalk.gray(' 更新: package.json devDependencies'));
39
+ }
40
+ }
41
+ /**
42
+ * 创建 ESLint 配置文件
43
+ */
44
+ export async function createEslintConfigFile(projectDir) {
45
+ const eslintConfigContent = `// 导入 ESLint 核心模块
46
+ import eslint from '@eslint/js';
47
+ // 导入 TypeScript ESLint 配置
48
+ import tseslint from 'typescript-eslint';
49
+ // 导入全局变量定义
50
+ import globals from 'globals';
51
+
52
+ // 导出 ESLint 配置
53
+ export default [
54
+ // 忽略检查的文件和目录
55
+ {
56
+ ignores: [
57
+ '**/node_modules/**',
58
+ '**/dist/**',
59
+ '**/lib/**',
60
+ '**/public/**',
61
+ '**/coverage/**',
62
+ '**/.git/**',
63
+ ],
64
+ },
65
+ // 使用 ESLint 推荐配置
66
+ eslint.configs.recommended,
67
+ // 使用 TypeScript ESLint 推荐配置
68
+ ...tseslint.configs.recommended,
69
+ {
70
+ // 语言选项配置
71
+ languageOptions: {
72
+ globals: {
73
+ ...globals.browser,
74
+ ...globals.node,
75
+ ...globals.es2021,
76
+ global: false,
77
+ },
78
+ parserOptions: {
79
+ ecmaVersion: 2021,
80
+ sourceType: 'module',
81
+ tsconfigRootDir: import.meta.dirname,
82
+ },
83
+ },
84
+ rules: {
85
+ '@typescript-eslint/no-unused-vars': 'off',
86
+ '@typescript-eslint/no-explicit-any': 'off',
87
+ 'no-prototype-builtins': 'off',
88
+ '@typescript-eslint/ban-ts-comment': 'off',
89
+ '@typescript-eslint/no-unused-expressions': 'off',
90
+ '@typescript-eslint/no-empty-object-type': 'off',
91
+ '@typescript-eslint/no-unsafe-declaration-merging': 'off',
92
+ '@typescript-eslint/no-unsafe-function-type': 'off',
93
+ '@typescript-eslint/no-this-alias': 'off',
94
+ 'prefer-const': 'off',
95
+ 'no-fallthrough': 'off',
96
+ 'no-constant-binary-expression': 'off',
97
+
98
+ // 注释格式规则
99
+ 'spaced-comment': ['warn', 'always', {
100
+ 'line': { 'markers': ['/'], 'exceptions': ['-', '+'] },
101
+ 'block': { 'markers': ['!'], 'exceptions': ['*'], 'balanced': true },
102
+ }],
103
+
104
+ // 空格和换行规则
105
+ 'no-trailing-spaces': ['warn', { 'skipBlankLines': false, 'ignoreComments': false }],
106
+ 'no-multiple-empty-lines': ['warn', { 'max': 1, 'maxEOF': 1, 'maxBOF': 0 }],
107
+ 'lines-between-class-members': ['warn', 'always', { 'exceptAfterSingleLine': true }],
108
+ 'padding-line-between-statements': [
109
+ 'warn',
110
+ { 'blankLine': 'always', 'prev': '*', 'next': 'return' },
111
+ { 'blankLine': 'any', 'prev': ['const', 'let', 'var'], 'next': ['const', 'let', 'var'] },
112
+ ],
113
+
114
+ // 缩进规则 - 4 空格
115
+ 'indent': ['warn', 4, {
116
+ 'SwitchCase': 1,
117
+ 'VariableDeclarator': 'first',
118
+ 'outerIIFEBody': 1,
119
+ 'MemberExpression': 1,
120
+ 'FunctionDeclaration': { 'parameters': 1, 'body': 1 },
121
+ 'FunctionExpression': { 'parameters': 1, 'body': 1 },
122
+ 'CallExpression': { 'arguments': 1 },
123
+ 'ArrayExpression': 1,
124
+ 'ObjectExpression': 1,
125
+ 'ImportDeclaration': 1,
126
+ 'flatTernaryExpressions': false,
127
+ 'ignoreComments': false,
128
+ }],
129
+
130
+ // 引号规则 - 单引号
131
+ 'quotes': ['warn', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
132
+
133
+ // 其他格式规则
134
+ 'semi': ['off'],
135
+ 'comma-dangle': ['warn', 'always-multiline'],
136
+ 'object-curly-spacing': ['warn', 'always'],
137
+ 'array-bracket-spacing': ['warn', 'never'],
138
+ 'arrow-spacing': ['warn', { 'before': true, 'after': true }],
139
+ 'block-spacing': ['warn', 'always'],
140
+ 'comma-spacing': ['warn', { 'before': false, 'after': true }],
141
+ 'comma-style': ['warn', 'last'],
142
+ 'key-spacing': ['warn', { 'beforeColon': false, 'afterColon': true }],
143
+ 'keyword-spacing': ['warn', { 'before': true, 'after': true }],
144
+ 'space-before-blocks': ['warn', 'always'],
145
+ 'space-before-function-paren': ['warn', { 'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always' }],
146
+ 'space-in-parens': ['warn', 'never'],
147
+ 'space-infix-ops': ['warn'],
148
+ 'space-unary-ops': ['warn', { 'words': true, 'nonwords': false }],
149
+ },
150
+ },
151
+ ];
152
+ `;
153
+ await fs.writeFile(path.join(projectDir, 'eslint.config.js'), eslintConfigContent);
154
+ }
155
+ /**
156
+ * 更新 package.json 中的 devDependencies 版本
157
+ */
158
+ async function updateDependencies(projectDir) {
159
+ const packageJsonPath = path.join(projectDir, 'package.json');
160
+ const packageJson = await fs.readJson(packageJsonPath);
161
+ const standardDeps = getDevDependencies({ includeVitest: true, includeTypedoc: true });
162
+ // 只更新已存在的依赖的版本
163
+ if (packageJson.devDependencies) {
164
+ for (const [key, value] of Object.entries(standardDeps)) {
165
+ if (key in packageJson.devDependencies) {
166
+ packageJson.devDependencies[key] = value;
167
+ }
168
+ }
169
+ }
170
+ await fs.writeJson(packageJsonPath, packageJson, { spaces: 4 });
171
+ }
172
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAW1E;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAsB;IAEtD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEnD,eAAe;IACf,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAC9D,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EACzC,CAAC;QACG,MAAM,IAAI,KAAK,CAAC,GAAG,UAAU,8BAA8B,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2G/B,CAAC;IAEE,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE,mBAAmB,CAAC,CAAC;AACvF,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,kBAAkB,CAAC,UAAkB;IAEhD,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAEvD,MAAM,YAAY,GAAG,kBAAkB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvF,eAAe;IACf,IAAI,WAAW,CAAC,eAAe,EAC/B,CAAC;QACG,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EACvD,CAAC;YACG,IAAI,GAAG,IAAI,WAAW,CAAC,eAAe,EACtC,CAAC;gBACG,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAC7C,CAAC;QACL,CAAC;IACL,CAAC;IAED,MAAM,EAAE,CAAC,SAAS,CAAC,eAAe,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AACpE,CAAC"}
@@ -0,0 +1,236 @@
1
+ /**
2
+ * feng3d ESLint 配置
3
+ */
4
+ type ESLintConfig = any;
5
+ /**
6
+ * 创建 ESLint 配置
7
+ * @param options 配置选项
8
+ */
9
+ export declare function createEslintConfig(options?: {
10
+ /** 额外需要忽略的目录 */
11
+ ignores?: string[];
12
+ /** 额外的规则 */
13
+ rules?: Record<string, unknown>;
14
+ }): ESLintConfig[];
15
+ /**
16
+ * 默认 ESLint 规则配置
17
+ */
18
+ export declare const eslintRules: {
19
+ readonly '@typescript-eslint/no-unused-vars': "off";
20
+ readonly '@typescript-eslint/no-explicit-any': "off";
21
+ readonly 'no-prototype-builtins': "off";
22
+ readonly '@typescript-eslint/ban-ts-comment': "off";
23
+ readonly '@typescript-eslint/no-unused-expressions': "off";
24
+ readonly '@typescript-eslint/no-empty-object-type': "off";
25
+ readonly '@typescript-eslint/no-unsafe-declaration-merging': "off";
26
+ readonly '@typescript-eslint/no-unsafe-function-type': "off";
27
+ readonly '@typescript-eslint/no-this-alias': "off";
28
+ readonly 'prefer-const': "off";
29
+ readonly 'no-fallthrough': "off";
30
+ readonly 'no-constant-binary-expression': "off";
31
+ readonly 'spaced-comment': readonly ["warn", "always", {
32
+ readonly line: {
33
+ readonly markers: readonly ["/"];
34
+ readonly exceptions: readonly ["-", "+"];
35
+ };
36
+ readonly block: {
37
+ readonly markers: readonly ["!"];
38
+ readonly exceptions: readonly ["*"];
39
+ readonly balanced: true;
40
+ };
41
+ }];
42
+ readonly 'no-trailing-spaces': readonly ["warn", {
43
+ readonly skipBlankLines: false;
44
+ readonly ignoreComments: false;
45
+ }];
46
+ readonly 'no-multiple-empty-lines': readonly ["warn", {
47
+ readonly max: 1;
48
+ readonly maxEOF: 1;
49
+ readonly maxBOF: 0;
50
+ }];
51
+ readonly 'lines-between-class-members': readonly ["warn", "always", {
52
+ readonly exceptAfterSingleLine: true;
53
+ }];
54
+ readonly 'padding-line-between-statements': readonly ["warn", {
55
+ readonly blankLine: "always";
56
+ readonly prev: "*";
57
+ readonly next: "return";
58
+ }, {
59
+ readonly blankLine: "any";
60
+ readonly prev: readonly ["const", "let", "var"];
61
+ readonly next: readonly ["const", "let", "var"];
62
+ }];
63
+ readonly indent: readonly ["warn", 4, {
64
+ readonly SwitchCase: 1;
65
+ readonly VariableDeclarator: "first";
66
+ readonly outerIIFEBody: 1;
67
+ readonly MemberExpression: 1;
68
+ readonly FunctionDeclaration: {
69
+ readonly parameters: 1;
70
+ readonly body: 1;
71
+ };
72
+ readonly FunctionExpression: {
73
+ readonly parameters: 1;
74
+ readonly body: 1;
75
+ };
76
+ readonly CallExpression: {
77
+ readonly arguments: 1;
78
+ };
79
+ readonly ArrayExpression: 1;
80
+ readonly ObjectExpression: 1;
81
+ readonly ImportDeclaration: 1;
82
+ readonly flatTernaryExpressions: false;
83
+ readonly ignoreComments: false;
84
+ }];
85
+ readonly quotes: readonly ["warn", "single", {
86
+ readonly avoidEscape: true;
87
+ readonly allowTemplateLiterals: true;
88
+ }];
89
+ readonly semi: readonly ["off"];
90
+ readonly 'comma-dangle': readonly ["warn", "always-multiline"];
91
+ readonly 'object-curly-spacing': readonly ["warn", "always"];
92
+ readonly 'array-bracket-spacing': readonly ["warn", "never"];
93
+ readonly 'arrow-spacing': readonly ["warn", {
94
+ readonly before: true;
95
+ readonly after: true;
96
+ }];
97
+ readonly 'block-spacing': readonly ["warn", "always"];
98
+ readonly 'comma-spacing': readonly ["warn", {
99
+ readonly before: false;
100
+ readonly after: true;
101
+ }];
102
+ readonly 'comma-style': readonly ["warn", "last"];
103
+ readonly 'key-spacing': readonly ["warn", {
104
+ readonly beforeColon: false;
105
+ readonly afterColon: true;
106
+ }];
107
+ readonly 'keyword-spacing': readonly ["warn", {
108
+ readonly before: true;
109
+ readonly after: true;
110
+ }];
111
+ readonly 'space-before-blocks': readonly ["warn", "always"];
112
+ readonly 'space-before-function-paren': readonly ["warn", {
113
+ readonly anonymous: "always";
114
+ readonly named: "never";
115
+ readonly asyncArrow: "always";
116
+ }];
117
+ readonly 'space-in-parens': readonly ["warn", "never"];
118
+ readonly 'space-infix-ops': readonly ["warn"];
119
+ readonly 'space-unary-ops': readonly ["warn", {
120
+ readonly words: true;
121
+ readonly nonwords: false;
122
+ }];
123
+ };
124
+ /**
125
+ * 预构建的 ESLint 配置(用于直接导出使用)
126
+ */
127
+ export declare const eslintConfig: {
128
+ rules: {
129
+ readonly '@typescript-eslint/no-unused-vars': "off";
130
+ readonly '@typescript-eslint/no-explicit-any': "off";
131
+ readonly 'no-prototype-builtins': "off";
132
+ readonly '@typescript-eslint/ban-ts-comment': "off";
133
+ readonly '@typescript-eslint/no-unused-expressions': "off";
134
+ readonly '@typescript-eslint/no-empty-object-type': "off";
135
+ readonly '@typescript-eslint/no-unsafe-declaration-merging': "off";
136
+ readonly '@typescript-eslint/no-unsafe-function-type': "off";
137
+ readonly '@typescript-eslint/no-this-alias': "off";
138
+ readonly 'prefer-const': "off";
139
+ readonly 'no-fallthrough': "off";
140
+ readonly 'no-constant-binary-expression': "off";
141
+ readonly 'spaced-comment': readonly ["warn", "always", {
142
+ readonly line: {
143
+ readonly markers: readonly ["/"];
144
+ readonly exceptions: readonly ["-", "+"];
145
+ };
146
+ readonly block: {
147
+ readonly markers: readonly ["!"];
148
+ readonly exceptions: readonly ["*"];
149
+ readonly balanced: true;
150
+ };
151
+ }];
152
+ readonly 'no-trailing-spaces': readonly ["warn", {
153
+ readonly skipBlankLines: false;
154
+ readonly ignoreComments: false;
155
+ }];
156
+ readonly 'no-multiple-empty-lines': readonly ["warn", {
157
+ readonly max: 1;
158
+ readonly maxEOF: 1;
159
+ readonly maxBOF: 0;
160
+ }];
161
+ readonly 'lines-between-class-members': readonly ["warn", "always", {
162
+ readonly exceptAfterSingleLine: true;
163
+ }];
164
+ readonly 'padding-line-between-statements': readonly ["warn", {
165
+ readonly blankLine: "always";
166
+ readonly prev: "*";
167
+ readonly next: "return";
168
+ }, {
169
+ readonly blankLine: "any";
170
+ readonly prev: readonly ["const", "let", "var"];
171
+ readonly next: readonly ["const", "let", "var"];
172
+ }];
173
+ readonly indent: readonly ["warn", 4, {
174
+ readonly SwitchCase: 1;
175
+ readonly VariableDeclarator: "first";
176
+ readonly outerIIFEBody: 1;
177
+ readonly MemberExpression: 1;
178
+ readonly FunctionDeclaration: {
179
+ readonly parameters: 1;
180
+ readonly body: 1;
181
+ };
182
+ readonly FunctionExpression: {
183
+ readonly parameters: 1;
184
+ readonly body: 1;
185
+ };
186
+ readonly CallExpression: {
187
+ readonly arguments: 1;
188
+ };
189
+ readonly ArrayExpression: 1;
190
+ readonly ObjectExpression: 1;
191
+ readonly ImportDeclaration: 1;
192
+ readonly flatTernaryExpressions: false;
193
+ readonly ignoreComments: false;
194
+ }];
195
+ readonly quotes: readonly ["warn", "single", {
196
+ readonly avoidEscape: true;
197
+ readonly allowTemplateLiterals: true;
198
+ }];
199
+ readonly semi: readonly ["off"];
200
+ readonly 'comma-dangle': readonly ["warn", "always-multiline"];
201
+ readonly 'object-curly-spacing': readonly ["warn", "always"];
202
+ readonly 'array-bracket-spacing': readonly ["warn", "never"];
203
+ readonly 'arrow-spacing': readonly ["warn", {
204
+ readonly before: true;
205
+ readonly after: true;
206
+ }];
207
+ readonly 'block-spacing': readonly ["warn", "always"];
208
+ readonly 'comma-spacing': readonly ["warn", {
209
+ readonly before: false;
210
+ readonly after: true;
211
+ }];
212
+ readonly 'comma-style': readonly ["warn", "last"];
213
+ readonly 'key-spacing': readonly ["warn", {
214
+ readonly beforeColon: false;
215
+ readonly afterColon: true;
216
+ }];
217
+ readonly 'keyword-spacing': readonly ["warn", {
218
+ readonly before: true;
219
+ readonly after: true;
220
+ }];
221
+ readonly 'space-before-blocks': readonly ["warn", "always"];
222
+ readonly 'space-before-function-paren': readonly ["warn", {
223
+ readonly anonymous: "always";
224
+ readonly named: "never";
225
+ readonly asyncArrow: "always";
226
+ }];
227
+ readonly 'space-in-parens': readonly ["warn", "never"];
228
+ readonly 'space-infix-ops': readonly ["warn"];
229
+ readonly 'space-unary-ops': readonly ["warn", {
230
+ readonly words: true;
231
+ readonly nonwords: false;
232
+ }];
233
+ };
234
+ };
235
+ export {};
236
+ //# sourceMappingURL=eslint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,KAAK,YAAY,GAAG,GAAG,CAAC;AAExB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE;IACxC,gBAAgB;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B,GAAG,YAAY,EAAE,CAkBtB;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAExB,CAAC"}
package/dist/eslint.js ADDED
@@ -0,0 +1,119 @@
1
+ /**
2
+ * feng3d ESLint 配置
3
+ */
4
+ /**
5
+ * 创建 ESLint 配置
6
+ * @param options 配置选项
7
+ */
8
+ export function createEslintConfig(options = {}) {
9
+ // 这个函数在运行时需要导入 eslint 相关模块
10
+ // 返回配置数组
11
+ return [
12
+ // 忽略检查的文件和目录
13
+ {
14
+ ignores: [
15
+ '**/node_modules/**',
16
+ '**/dist/**',
17
+ '**/lib/**',
18
+ '**/public/**',
19
+ '**/coverage/**',
20
+ '**/.git/**',
21
+ ...(options.ignores || []),
22
+ ],
23
+ },
24
+ ];
25
+ }
26
+ /**
27
+ * 默认 ESLint 规则配置
28
+ */
29
+ export const eslintRules = {
30
+ '@typescript-eslint/no-unused-vars': 'off',
31
+ '@typescript-eslint/no-explicit-any': 'off',
32
+ 'no-prototype-builtins': 'off',
33
+ '@typescript-eslint/ban-ts-comment': 'off',
34
+ '@typescript-eslint/no-unused-expressions': 'off',
35
+ '@typescript-eslint/no-empty-object-type': 'off',
36
+ '@typescript-eslint/no-unsafe-declaration-merging': 'off',
37
+ '@typescript-eslint/no-unsafe-function-type': 'off',
38
+ '@typescript-eslint/no-this-alias': 'off',
39
+ 'prefer-const': 'off',
40
+ 'no-fallthrough': 'off',
41
+ 'no-constant-binary-expression': 'off',
42
+ // 注释格式规则
43
+ 'spaced-comment': ['warn', 'always', {
44
+ line: {
45
+ markers: ['/'],
46
+ exceptions: ['-', '+'],
47
+ },
48
+ block: {
49
+ markers: ['!'],
50
+ exceptions: ['*'],
51
+ balanced: true,
52
+ },
53
+ }],
54
+ // 空格和换行规则
55
+ 'no-trailing-spaces': ['warn', {
56
+ skipBlankLines: false,
57
+ ignoreComments: false,
58
+ }],
59
+ 'no-multiple-empty-lines': ['warn', {
60
+ max: 1,
61
+ maxEOF: 1,
62
+ maxBOF: 0,
63
+ }],
64
+ 'lines-between-class-members': ['warn', 'always', {
65
+ exceptAfterSingleLine: true,
66
+ }],
67
+ 'padding-line-between-statements': [
68
+ 'warn',
69
+ { blankLine: 'always', prev: '*', next: 'return' },
70
+ { blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
71
+ ],
72
+ // 缩进规则 - 使用 4 空格
73
+ indent: ['warn', 4, {
74
+ SwitchCase: 1,
75
+ VariableDeclarator: 'first',
76
+ outerIIFEBody: 1,
77
+ MemberExpression: 1,
78
+ FunctionDeclaration: { parameters: 1, body: 1 },
79
+ FunctionExpression: { parameters: 1, body: 1 },
80
+ CallExpression: { arguments: 1 },
81
+ ArrayExpression: 1,
82
+ ObjectExpression: 1,
83
+ ImportDeclaration: 1,
84
+ flatTernaryExpressions: false,
85
+ ignoreComments: false,
86
+ }],
87
+ // 引号规则 - 使用单引号
88
+ quotes: ['warn', 'single', {
89
+ avoidEscape: true,
90
+ allowTemplateLiterals: true,
91
+ }],
92
+ // 其他格式规则
93
+ semi: ['off'],
94
+ 'comma-dangle': ['warn', 'always-multiline'],
95
+ 'object-curly-spacing': ['warn', 'always'],
96
+ 'array-bracket-spacing': ['warn', 'never'],
97
+ 'arrow-spacing': ['warn', { before: true, after: true }],
98
+ 'block-spacing': ['warn', 'always'],
99
+ 'comma-spacing': ['warn', { before: false, after: true }],
100
+ 'comma-style': ['warn', 'last'],
101
+ 'key-spacing': ['warn', { beforeColon: false, afterColon: true }],
102
+ 'keyword-spacing': ['warn', { before: true, after: true }],
103
+ 'space-before-blocks': ['warn', 'always'],
104
+ 'space-before-function-paren': ['warn', {
105
+ anonymous: 'always',
106
+ named: 'never',
107
+ asyncArrow: 'always',
108
+ }],
109
+ 'space-in-parens': ['warn', 'never'],
110
+ 'space-infix-ops': ['warn'],
111
+ 'space-unary-ops': ['warn', { words: true, nonwords: false }],
112
+ };
113
+ /**
114
+ * 预构建的 ESLint 配置(用于直接导出使用)
115
+ */
116
+ export const eslintConfig = {
117
+ rules: eslintRules,
118
+ };
119
+ //# sourceMappingURL=eslint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAK/B,EAAE;IAEF,2BAA2B;IAC3B,SAAS;IACT,OAAO;QACH,aAAa;QACb;YACI,OAAO,EAAE;gBACL,oBAAoB;gBACpB,YAAY;gBACZ,WAAW;gBACX,cAAc;gBACd,gBAAgB;gBAChB,YAAY;gBACZ,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;aAC7B;SACJ;KACJ,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,mCAAmC,EAAE,KAAK;IAC1C,oCAAoC,EAAE,KAAK;IAC3C,uBAAuB,EAAE,KAAK;IAC9B,mCAAmC,EAAE,KAAK;IAC1C,0CAA0C,EAAE,KAAK;IACjD,yCAAyC,EAAE,KAAK;IAChD,kDAAkD,EAAE,KAAK;IACzD,4CAA4C,EAAE,KAAK;IACnD,kCAAkC,EAAE,KAAK;IACzC,cAAc,EAAE,KAAK;IACrB,gBAAgB,EAAE,KAAK;IACv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,CAAC;IACpC,iBAAiB,EAAE,CAAC,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;CACvD,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE,WAAW;CACrB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * feng3d-cli
3
+ * feng3d 命令行工具
4
+ */
5
+ export { eslintConfig, createEslintConfig } from './eslint.js';
6
+ export { VERSIONS, getDevDependencies } from './versions.js';
7
+ export * from './templates.js';
8
+ export { ossUploadDir } from './commands/oss.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7D,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * feng3d-cli
3
+ * feng3d 命令行工具
4
+ */
5
+ export { eslintConfig, createEslintConfig } from './eslint.js';
6
+ export { VERSIONS, getDevDependencies } from './versions.js';
7
+ export * from './templates.js';
8
+ export { ossUploadDir } from './commands/oss.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7D,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * 项目模板文件内容
3
+ */
4
+ /**
5
+ * .gitignore 模板
6
+ */
7
+ export declare const gitignoreTemplate = "node_modules\ndist\nlib\npublic\nout\n/package-lock.json\n# \u81EA\u52A8\u751F\u6210\u7684\u6D4B\u8BD5\u914D\u7F6E\u6587\u4EF6\n**/test-config.ts\n# \u6D4B\u8BD5\u6784\u5EFA\u8F93\u51FA\u76EE\u5F55\ntest_dist\n# \u6D4B\u8BD5\u8986\u76D6\u7387\ncoverage\n";
8
+ /**
9
+ * .cursorrules 模板
10
+ */
11
+ export declare const cursorrrulesTemplate = "# Cursor \u9879\u76EE\u89C4\u5219\n\n## Git \u63D0\u4EA4\u4FE1\u606F\u89C4\u8303\n\n\u5F53\u751F\u6210 Git \u63D0\u4EA4\u4FE1\u606F\u65F6\uFF1A\n\n1. **\u8BED\u8A00**\uFF1A\u59CB\u7EC8\u4F7F\u7528\u7B80\u4F53\u4E2D\u6587\n\n2. **\u683C\u5F0F**\uFF1A\u9075\u5FAA\u7EA6\u5B9A\u5F0F\u63D0\u4EA4\uFF08Conventional Commits\uFF09\u683C\u5F0F\n ```\n <\u7C7B\u578B>(<\u8303\u56F4>): <\u7B80\u77ED\u63CF\u8FF0>\n\n [\u53EF\u9009\u7684\u8BE6\u7EC6\u8BF4\u660E]\n\n [\u53EF\u9009\u7684\u811A\u6CE8]\n ```\n\n3. **\u63D0\u4EA4\u7C7B\u578B**\uFF08\u4E2D\u6587\u63CF\u8FF0\uFF09\uFF1A\n - `feat`: \u65B0\u589E\u529F\u80FD\n - `fix`: \u4FEE\u590D\u95EE\u9898\n - `refactor`: \u4EE3\u7801\u91CD\u6784\uFF08\u4E0D\u6539\u53D8\u529F\u80FD\uFF09\n - `perf`: \u6027\u80FD\u4F18\u5316\n - `style`: \u4EE3\u7801\u683C\u5F0F\u8C03\u6574\uFF08\u4E0D\u5F71\u54CD\u4EE3\u7801\u542B\u4E49\uFF09\n - `docs`: \u6587\u6863\u66F4\u65B0\n - `test`: \u6D4B\u8BD5\u76F8\u5173\n - `chore`: \u6784\u5EFA\u8FC7\u7A0B\u6216\u8F85\u52A9\u5DE5\u5177\u7684\u53D8\u52A8\n - `build`: \u6784\u5EFA\u7CFB\u7EDF\u6216\u5916\u90E8\u4F9D\u8D56\u9879\u7684\u66F4\u6539\n - `ci`: CI \u914D\u7F6E\u6587\u4EF6\u548C\u811A\u672C\u7684\u66F4\u6539\n\n4. **\u8303\u56F4**\uFF08\u53EF\u9009\uFF09\uFF1A\u53EF\u4EE5\u662F\u6A21\u5757\u3001\u7EC4\u4EF6\u6216\u529F\u80FD\u533A\u57DF\n\n5. **\u63D0\u4EA4\u4FE1\u606F\u8981\u6C42**\uFF1A\n - \u7B2C\u4E00\u884C\u7B80\u77ED\u63CF\u8FF0\uFF0C\u4E0D\u8D85\u8FC7 50 \u4E2A\u5B57\u7B26\n - \u4F7F\u7528\u7948\u4F7F\u53E5\uFF0C\u5982\"\u6DFB\u52A0\"\u3001\"\u4FEE\u590D\"\u3001\"\u4F18\u5316\"\n - \u63CF\u8FF0\u8981\u6E05\u6670\u3001\u5177\u4F53\u3001\u6709\u610F\u4E49\n\n## \u4EE3\u7801\u98CE\u683C\n\n- \u4F18\u5148\u4F7F\u7528 TypeScript\n- \u9075\u5FAA\u73B0\u6709\u4EE3\u7801\u7684\u547D\u540D\u7EA6\u5B9A\u548C\u683C\u5F0F\n- \u6DFB\u52A0\u5FC5\u8981\u7684\u4E2D\u6587\u6CE8\u91CA\u4EE5\u63D0\u9AD8\u4EE3\u7801\u53EF\u8BFB\u6027\n- \u4F7F\u7528 ESLint \u4FDD\u6301\u4EE3\u7801\u683C\u5F0F\u4E00\u81F4\n- \u63D0\u4EA4\u524D\u5FC5\u987B\u901A\u8FC7 lint \u68C0\u67E5\n- \u907F\u514D\u4F7F\u7528 `any` \u7C7B\u578B\uFF0C\u4F18\u5148\u4F7F\u7528\u660E\u786E\u7684\u7C7B\u578B\u5B9A\u4E49\n\n## \u547D\u540D\u89C4\u8303\n\n- **\u53D8\u91CF\u548C\u51FD\u6570**\uFF1A\u4F7F\u7528\u9A7C\u5CF0\u547D\u540D\uFF08camelCase\uFF09\n- **\u7C7B\u548C\u63A5\u53E3**\uFF1A\u4F7F\u7528\u5E15\u65AF\u5361\u547D\u540D\uFF08PascalCase\uFF09\n- **\u5E38\u91CF**\uFF1A\u4F7F\u7528\u5168\u5927\u5199\u4E0B\u5212\u7EBF\u5206\u9694\uFF08UPPER_SNAKE_CASE\uFF09\n- **\u6587\u4EF6\u540D**\uFF1A\u4F7F\u7528\u5C0F\u5199\u5B57\u6BCD\u548C\u8FDE\u5B57\u7B26\uFF08kebab-case\uFF09\u6216\u4E0E\u5BFC\u51FA\u7684\u4E3B\u8981\u7C7B/\u51FD\u6570\u540C\u540D\n\n## \u6CE8\u91CA\u89C4\u8303\n\n- \u516C\u5171 API \u5FC5\u987B\u6DFB\u52A0 JSDoc \u6CE8\u91CA\n- \u590D\u6742\u903B\u8F91\u5FC5\u987B\u6DFB\u52A0\u4E2D\u6587\u6CE8\u91CA\u8BF4\u660E\n- \u4E34\u65F6\u89E3\u51B3\u65B9\u6848\u6216\u5F85\u4F18\u5316\u4EE3\u7801\u5FC5\u987B\u6DFB\u52A0 TODO \u6CE8\u91CA\n- \u6CE8\u91CA\u5E94\u8BE5\u89E3\u91CA\"\u4E3A\u4EC0\u4E48\"\u800C\u4E0D\u662F\"\u662F\u4EC0\u4E48\"\n\n## \u6A21\u5757\u7ED3\u6784\n\n- \u907F\u514D\u4F7F\u7528\u9ED8\u8BA4\u5BFC\u51FA\uFF0C\u4F18\u5148\u4F7F\u7528\u547D\u540D\u5BFC\u51FA\n- \u6BCF\u4E2A\u6587\u4EF6\u5E94\u8BE5\u6709\u4E00\u4E2A\u660E\u786E\u7684\u804C\u8D23\n- \u6BCF\u4E2A\u6587\u4EF6\u5E94\u8BE5\u4E0D\u8D85\u8FC7 300 \u884C\u4EE3\u7801\n- \u76F8\u5173\u529F\u80FD\u5E94\u8BE5\u7EC4\u7EC7\u5728\u540C\u4E00\u4E2A\u76EE\u5F55\u4E0B\n\n## \u6D4B\u8BD5\u89C4\u8303\n\n- \u65B0\u529F\u80FD\u5FC5\u987B\u5305\u542B\u76F8\u5E94\u7684\u6D4B\u8BD5\n- \u4FEE\u590D bug \u65F6\u5FC5\u987B\u6DFB\u52A0\u56DE\u5F52\u6D4B\u8BD5\n- \u6D4B\u8BD5\u8986\u76D6\u7387\u5E94\u8BE5\u4FDD\u6301\u5728\u5408\u7406\u6C34\u5E73\uFF08\u5EFA\u8BAE > 80%\uFF09\n- \u6D4B\u8BD5\u5E94\u8BE5\u6E05\u6670\u3001\u72EC\u7ACB\u3001\u53EF\u91CD\u590D\n\n## Agent \u89C4\u5219\n\n- \u6CA1\u6709\u6B63\u786E\u4FEE\u590D\u95EE\u9898\u65F6\u91CD\u65B0\u4FEE\u590D\u65F6\uFF0C\u5C3D\u91CF\u8FD8\u539F\u4E0A\u6B21\u4FEE\u6539\u7684\u5185\u5BB9\u540E\u518D\u8FDB\u884C\u4FEE\u590D\n- \u6BCF\u6B21\u5B8C\u6210\u4EE3\u7801\u4FEE\u6539\u540E\uFF0C\u5FC5\u987B\u68C0\u67E5\u5E76\u5904\u7406\u7F16\u8BD1\u9519\u8BEF\n- \u786E\u4FDD\u6240\u6709\u6D4B\u8BD5\u901A\u8FC7\u540E\u518D\u544A\u77E5\u7528\u6237\u4EFB\u52A1\u5B8C\u6210\n";
12
+ /**
13
+ * tsconfig.json 模板
14
+ */
15
+ export declare const tsconfigTemplate: {
16
+ compilerOptions: {
17
+ target: string;
18
+ module: string;
19
+ noImplicitAny: boolean;
20
+ sourceMap: boolean;
21
+ declarationMap: boolean;
22
+ declaration: boolean;
23
+ experimentalDecorators: boolean;
24
+ emitDeclarationOnly: boolean;
25
+ skipLibCheck: boolean;
26
+ esModuleInterop: boolean;
27
+ downlevelIteration: boolean;
28
+ lib: string[];
29
+ outDir: string;
30
+ };
31
+ include: string[];
32
+ };
33
+ /**
34
+ * vitest.config.ts 模板
35
+ */
36
+ export declare const vitestConfigTemplate = "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n test: {\n testTimeout: 0,\n },\n});\n";
37
+ /**
38
+ * typedoc.json 模板
39
+ */
40
+ export declare function createTypedocConfig(options: {
41
+ name: string;
42
+ repoName: string;
43
+ }): object;
44
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,mQAY7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,4zIA8EhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CAiB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,wIAOhC,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAST"}