viza 1.7.48 → 1.7.49
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.
|
@@ -11,7 +11,7 @@ import { renderRuntimeLog } from "../ui/runtimeLogRenderer.js";
|
|
|
11
11
|
* - success + hide => no log
|
|
12
12
|
* - otherwise => render log (if present)
|
|
13
13
|
*/
|
|
14
|
-
function maybeRenderLog(result, policy) {
|
|
14
|
+
function maybeRenderLog(result, policy, currentUser) {
|
|
15
15
|
// Runtime execution (hub-worker)
|
|
16
16
|
if (result.kind !== "github") {
|
|
17
17
|
// Respect log policy: hide means do not render runtime logs
|
|
@@ -26,7 +26,7 @@ function maybeRenderLog(result, policy) {
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
if (result.logBuffer) {
|
|
29
|
-
renderLog(result.logBuffer, { status: result.status });
|
|
29
|
+
renderLog(result.logBuffer, { status: result.status, currentUser });
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
// Log artifact not available (likely GitHub log archive not ready yet)
|
|
@@ -129,10 +129,11 @@ export async function dispatchIntentAndWait(input, opts = {}) {
|
|
|
129
129
|
// 2. Định nghĩa một hàm async để gộp toàn bộ quá trình dispatch
|
|
130
130
|
const dispatchFlow = async () => {
|
|
131
131
|
const handle = await dispatchIntent(input, mode); // Khởi tạo
|
|
132
|
-
|
|
132
|
+
const result = await handle.wait(); // Đợi kết quả
|
|
133
|
+
return { result, currentUser: handle.currentUser };
|
|
133
134
|
};
|
|
134
135
|
// Trong block try:
|
|
135
|
-
const [result, updateInfo] = await Promise.all([
|
|
136
|
+
const [{ result, currentUser }, updateInfo] = await Promise.all([
|
|
136
137
|
dispatchFlow(),
|
|
137
138
|
Promise.race([
|
|
138
139
|
updateCheckPromise,
|
|
@@ -142,7 +143,7 @@ export async function dispatchIntentAndWait(input, opts = {}) {
|
|
|
142
143
|
// 4. Dừng spinner và in kết quả dispatch trước
|
|
143
144
|
stopSpinner(spinner, result.status === "success" ? "✅ Done" : "❌ Failed");
|
|
144
145
|
// 5. Render log và thông báo update
|
|
145
|
-
maybeRenderLog(result, policy);
|
|
146
|
+
maybeRenderLog(result, policy, currentUser);
|
|
146
147
|
if (result.status !== "success") {
|
|
147
148
|
throw new Error(`Dispatch failed: ${result.status}`);
|
|
148
149
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viza",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.49",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Viza unified command line interface",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"release:full": "rm -rf dist && npx npm-check-updates -u && npm install && git add package.json package-lock.json && git commit -m 'chore(deps): auto update dependencies before release' || echo 'No changes' && node versioning.js && npm login && npm publish --tag latest --access public && git push"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@vizamodo/viza-dispatcher": "^1.5.
|
|
20
|
+
"@vizamodo/viza-dispatcher": "^1.5.29",
|
|
21
21
|
"adm-zip": "^0.5.16",
|
|
22
22
|
"chalk": "^5.6.2",
|
|
23
23
|
"clipboardy": "^5.3.1",
|