@chatu-ai/builder-sdk-mock 0.7.2 → 0.7.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/dist/index.js +6 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -86,6 +86,12 @@ export function createMockBuilderClient(script) {
|
|
|
86
86
|
},
|
|
87
87
|
deploy: async (_id, input) => ({ ok: true, projectName: input.projectName, env: input.env ?? 'production', url: `https://${input.projectName}.edgeone.app`, output: 'mock deploy ok', envVarsApplied: 3 }),
|
|
88
88
|
pushGit: async (_id, input) => ({ ok: true, remoteUrl: input.remoteUrl, branch: input.branch ?? 'main', sha: 'deadbeefcafe', output: 'mock push ok', webUrl: input.remoteUrl.replace(/\.git$/, '') }),
|
|
89
|
+
pushGitStream: async function* (_id, input) {
|
|
90
|
+
yield { type: 'log', line: '▶ 检查工作区未提交改动 …' };
|
|
91
|
+
yield { type: 'log', line: `▶ 推送到 ${input.remoteUrl}(分支 ${input.branch ?? 'main'})…` };
|
|
92
|
+
yield { type: 'log', line: 'Writing objects: 100% (12/12), done.' };
|
|
93
|
+
yield { type: 'result', result: { ok: true, remoteUrl: input.remoteUrl, branch: input.branch ?? 'main', sha: 'deadbeefcafe', output: 'mock push ok', webUrl: input.remoteUrl.replace(/\.git$/, '') } };
|
|
94
|
+
},
|
|
89
95
|
},
|
|
90
96
|
data: {
|
|
91
97
|
kv: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatu-ai/builder-sdk-mock",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Mock BuilderClient for @chatu-ai/builder-sdk: scripted event replay with latency & disconnect injection",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=18"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@chatu-ai/builder-sdk": "0.7.
|
|
44
|
+
"@chatu-ai/builder-sdk": "0.7.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"typescript": "^5.7.0",
|