create-deepagent-server 0.2.0 → 1.0.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/README.md +1 -0
- package/package.json +1 -1
- package/src/cli.js +1 -4
- package/src/scaffold.js +15 -0
- package/src/version.js +1 -1
- package/templates/deepagent/shared/README.md +1 -1
package/README.md
CHANGED
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -58,10 +58,7 @@ const printNextSteps = ({ targetDir, cwd, packageManager, installed, language })
|
|
|
58
58
|
console.log(` ${installCommandText(packageManager)}`);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
process.platform === "win32" ? "copy .env.example .env" : "cp .env.example .env";
|
|
63
|
-
|
|
64
|
-
console.log(` ${copyEnvCommand} ${dim("# 填入 MODEL_API_KEY")}`);
|
|
61
|
+
console.log(` ${dim("# 编辑 .env,填入 MODEL_API_KEY")}`);
|
|
65
62
|
console.log(` ${runScriptText(packageManager, "check")} ${dim("# 可选:环境预检")}`);
|
|
66
63
|
console.log(
|
|
67
64
|
` ${runScriptText(packageManager, "dev")} ${dim("# http://localhost:3000/health")}`,
|
package/src/scaffold.js
CHANGED
|
@@ -174,6 +174,21 @@ export const scaffold = async ({
|
|
|
174
174
|
);
|
|
175
175
|
writtenFiles.push("package.json");
|
|
176
176
|
|
|
177
|
+
// 默认生成可直接编辑的 .env;写入已有目录(--force)时不覆盖用户配置。
|
|
178
|
+
const envCreated = await fs
|
|
179
|
+
.copyFile(
|
|
180
|
+
path.join(targetDir, ".env.example"),
|
|
181
|
+
path.join(targetDir, ".env"),
|
|
182
|
+
fs.constants.COPYFILE_EXCL,
|
|
183
|
+
)
|
|
184
|
+
.then(() => true)
|
|
185
|
+
.catch((error) => {
|
|
186
|
+
if (error?.code === "EEXIST") return false;
|
|
187
|
+
throw error;
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
if (envCreated) writtenFiles.push(".env");
|
|
191
|
+
|
|
177
192
|
return {
|
|
178
193
|
targetDir,
|
|
179
194
|
files: writtenFiles.sort(),
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "1.0.0";
|