flu-cli-core 1.1.0 → 1.1.2

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/index.cjs CHANGED
@@ -11843,6 +11843,7 @@ var STARTER_SCAFFOLD_FILES = [
11843
11843
  ".env.staging.template",
11844
11844
  ".env.prod.example.template",
11845
11845
  ".vscode/launch.json.template",
11846
+ ".vscode/settings.json.template",
11846
11847
  "analysis_options.yaml.template",
11847
11848
  "lib/main.dart.template",
11848
11849
  "lib/app.dart.template"
@@ -15062,6 +15063,7 @@ function _prepareInitAiBase(opts) {
15062
15063
  }
15063
15064
  };
15064
15065
  }
15066
+ if (!(0, import_fs17.existsSync)(projectDir)) (0, import_fs17.mkdirSync)(projectDir, { recursive: true });
15065
15067
  const packageName = normalizeProjectIdToPackageName(opts.projectId);
15066
15068
  const skillSlug = slugForAgentSkill(packageName);
15067
15069
  const configPath = (0, import_path29.join)(projectDir, ".flu-cli.json");
package/dist/index.js CHANGED
@@ -11050,6 +11050,7 @@ var STARTER_SCAFFOLD_FILES = [
11050
11050
  ".env.staging.template",
11051
11051
  ".env.prod.example.template",
11052
11052
  ".vscode/launch.json.template",
11053
+ ".vscode/settings.json.template",
11053
11054
  "analysis_options.yaml.template",
11054
11055
  "lib/main.dart.template",
11055
11056
  "lib/app.dart.template"
@@ -14190,7 +14191,7 @@ features:
14190
14191
  }
14191
14192
 
14192
14193
  // src/commands/init_ai_base.ts
14193
- import { existsSync as existsSync16, readFileSync as readFileSync10, writeFileSync as writeFileSync11 } from "fs";
14194
+ import { existsSync as existsSync16, mkdirSync as mkdirSync10, readFileSync as readFileSync10, writeFileSync as writeFileSync11 } from "fs";
14194
14195
  import { join as join27, resolve as resolve5 } from "path";
14195
14196
  var PROJECT_ID_RE = /^[a-z][a-z0-9-]{2,32}$/;
14196
14197
  function validateProjectId(projectId) {
@@ -14256,6 +14257,7 @@ function _prepareInitAiBase(opts) {
14256
14257
  }
14257
14258
  };
14258
14259
  }
14260
+ if (!existsSync16(projectDir)) mkdirSync10(projectDir, { recursive: true });
14259
14261
  const packageName = normalizeProjectIdToPackageName(opts.projectId);
14260
14262
  const skillSlug = slugForAgentSkill(packageName);
14261
14263
  const configPath = join27(projectDir, ".flu-cli.json");
@@ -15372,7 +15374,7 @@ import { createRequire } from "module";
15372
15374
  import { createHash } from "crypto";
15373
15375
 
15374
15376
  // src/utils/config_manager.ts
15375
- import { existsSync as existsSync19, readFileSync as readFileSync11, writeFileSync as writeFileSync12, mkdirSync as mkdirSync10 } from "fs";
15377
+ import { existsSync as existsSync19, readFileSync as readFileSync11, writeFileSync as writeFileSync12, mkdirSync as mkdirSync11 } from "fs";
15376
15378
  import { join as join30 } from "path";
15377
15379
  import { homedir as homedir2 } from "os";
15378
15380
  var ConfigManager = class _ConfigManager {
@@ -15382,7 +15384,7 @@ var ConfigManager = class _ConfigManager {
15382
15384
  constructor() {
15383
15385
  const configDir = join30(homedir2(), ".flu-cli");
15384
15386
  if (!existsSync19(configDir)) {
15385
- mkdirSync10(configDir, { recursive: true });
15387
+ mkdirSync11(configDir, { recursive: true });
15386
15388
  }
15387
15389
  this.configPath = join30(configDir, "config.json");
15388
15390
  this.config = this.loadConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flu-cli-core",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Core logic for flu-cli",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.cjs",
@@ -0,0 +1,14 @@
1
+ {
2
+ "files.exclude": {
3
+ "**/.dart_tool": true,
4
+ "**/.fvm/flutter_sdk": true,
5
+ "**/.fvm/versions": true,
6
+ "**/.flutter-plugins": true,
7
+ "**/.flutter-plugins-dependencies": true,
8
+ "**/.idea": true,
9
+ "**/.metadata": true,
10
+ "**/*.iml": true,
11
+ "**/build": true,
12
+ "**/pubspec.lock": true
13
+ }
14
+ }
@@ -54,6 +54,7 @@
54
54
  | `.env.prod.example` | 生产配置模板 |
55
55
  | `analysis_options.yaml` | Dart/Flutter 代码规范 |
56
56
  | `.vscode/launch.json` | IDE 调试入口 |
57
+ | `.vscode/settings.json` | VSCode 工作区显示与 Flutter 相关设置 |
57
58
 
58
59
  生产环境通常这样创建:
59
60
 
@@ -75,6 +76,24 @@ cp .env.prod.example .env.prod
75
76
  | `AGREEMENT_VERSION` | 协议版本门禁,正文变化后应递增 |
76
77
  | `USER_AGREEMENT_URL` / `PRIVACY_POLICY_URL` | 在线协议链接 |
77
78
 
79
+ ### VSCode 工作区显示
80
+
81
+ 项目默认会在 `.vscode/settings.json` 中隐藏一批生成噪音:
82
+
83
+ - `.dart_tool`
84
+ - `.fvm/flutter_sdk`
85
+ - `.fvm/versions`
86
+ - `build`
87
+ - `.metadata`
88
+ - `.flutter-plugins*`
89
+ - `.idea`
90
+ - `*.iml`
91
+ - `pubspec.lock`
92
+
93
+ 目标是让 Explorer 默认更聚焦业务代码,而不是把生成缓存长期堆在主视野里。
94
+
95
+ 如需调整,直接修改 `.vscode/settings.json` 中的 `files.exclude` 即可。当前模板默认把 `pubspec.lock` 也视为“工作区降噪项”,以换取更清爽的 Explorer;但 `android`、`ios`、`lib`、`test` 这类高频目录仍不做模板级强隐藏,避免排查平台问题或原生配置时来回切设置。
96
+
78
97
  ## 5. 代码规范
79
98
 
80
99
  当前 Lint 配置来自 `analysis_options.yaml`,默认跟随创建配置中的 `stack.lint`。
@@ -44,6 +44,7 @@ cp .env.prod.example .env.prod
44
44
  - `lib/core/`:路由、主题、配置、工具、协议弹框和通用能力
45
45
  - `.env.*`:环境变量与协议信息
46
46
  - `.vscode/launch.json`:IDE 调试入口
47
+ - `.vscode/settings.json`:VSCode 工作区显示与 Flutter 相关设置
47
48
 
48
49
  ## 首页样板
49
50
 
@@ -71,6 +72,23 @@ VSCode 调试面板中可直接选择:
71
72
  - `{{projectName}} (staging)`
72
73
  - `{{projectName}} (release)`
73
74
 
75
+ 项目默认带一份 `.vscode/settings.json`,会隐藏 `.dart_tool`、`build`、`.metadata`、FVM SDK 缓存和 `pubspec.lock` 等生成噪音,让工作区更聚焦业务代码。
76
+
77
+ 如果你希望调整显示范围,可以直接修改:
78
+
79
+ ```json
80
+ {
81
+ "files.exclude": {
82
+ "**/.dart_tool": true,
83
+ "**/build": true
84
+ }
85
+ }
86
+ ```
87
+
88
+ 建议默认只隐藏生成目录和明显缓存项,不要直接把 `android`、`ios`、`lib`、`test` 这类高频目录一起隐藏成团队默认规则;这些文件或目录在排查平台问题、依赖锁定或原生配置时仍然经常需要查看。
89
+
90
+ 如果你的团队希望像业务实战项目那样进一步精简 Explorer,也可以继续在 `.vscode/settings.json` 里追加自己的规则;但更推荐先从“隐藏生成噪音”开始,而不是默认把常用源码目录一起藏掉。
91
+
74
92
  ## SDK 说明
75
93
 
76
94
  {{#if_fvm}}