ai-native-core 0.2.3 → 0.2.4

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,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-native-core",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "让任何项目拥有 AI Native 开发能力的运行时框架",
5
5
  "keywords": [
6
6
  "ai-native",
@@ -97,6 +97,8 @@ function doInit(stacks, isForce, answers = {}) {
97
97
  };
98
98
 
99
99
  copyFile('config/ai-native.config.toml', '.ai-native/config.toml', c => {
100
+ c = c.replace(/type = "frontend"/, `type = "${answers.type || 'frontend'}"`);
101
+ if (answers.type) c = c.replace(/name = "my-project"/, `name = "${path.basename(root)}"`);
100
102
  c = c.replace(/adapter = "react-spa"/, stacks.length > 1
101
103
  ? `adapter = [${stacks.map(s => `"${s}"`).join(', ')}]`
102
104
  : `adapter = "${stacks[0]}"`);
@@ -104,7 +106,7 @@ function doInit(stacks, isForce, answers = {}) {
104
106
  if (answers.css) c = c.replace(/css = "tailwind-v4"/, `css = "${answers.css}"`);
105
107
  if (answers.ui) c = c.replace(/ui_library = "shadcn"/, `ui_library = "${answers.ui}"`);
106
108
  if (answers.test) c = c.replace(/test_framework = "vitest"/, `test_framework = "${answers.test}"`);
107
- if (answers.ts) c = c.replace(/typescript = true/, `typescript = ${answers.ts === 'yes'}`);
109
+ if (answers.ts !== undefined) c = c.replace(/typescript = true/, `typescript = ${answers.ts === 'yes'}`);
108
110
  return c;
109
111
  });
110
112