@makefully/adaptfully 4.2.1 → 4.2.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/CHANGELOG.md +6 -0
- package/lib/node/deploy.js +23 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 4.2.2 — 2026-09-10
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- While a Wrapfully Yap chore is pending, poll `GET /yap/wrapfully/:choreId/logs` and print new live worker log lines.
|
|
10
|
+
|
|
5
11
|
## 4.2.1 — 2026-09-09
|
|
6
12
|
|
|
7
13
|
### Fixed
|
package/lib/node/deploy.js
CHANGED
|
@@ -110,6 +110,7 @@ export async function submitWrapfullyChore ({
|
|
|
110
110
|
log(`adaptfully: chore ${choreId} submitted; waiting…`);
|
|
111
111
|
|
|
112
112
|
let lastStatus = '';
|
|
113
|
+
let logAfter = 0;
|
|
113
114
|
|
|
114
115
|
for (;;) {
|
|
115
116
|
const statusUrl = `${base}yap/wrapfully/${encodeURIComponent(choreId)}/status`;
|
|
@@ -125,6 +126,28 @@ export async function submitWrapfullyChore ({
|
|
|
125
126
|
throw new Error(status.errors?.[0] || `Chore ${choreId} failed`);
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
if (status?.state === 'pending') {
|
|
130
|
+
try {
|
|
131
|
+
const logsUrl = `${base}yap/wrapfully/${encodeURIComponent(choreId)}/logs?after=${logAfter}`;
|
|
132
|
+
const {data: logs} = await axios.get(logsUrl, {
|
|
133
|
+
headers: {Authorization: `Bearer ${accessToken}`},
|
|
134
|
+
validateStatus: () => true,
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
if (Array.isArray(logs?.lines) && logs.lines.length) {
|
|
138
|
+
for (const line of logs.lines) {
|
|
139
|
+
const text = line?.message || JSON.stringify(line);
|
|
140
|
+
|
|
141
|
+
log(`adaptfully: ${text}`);
|
|
142
|
+
}
|
|
143
|
+
logAfter = logs.after ?? logAfter;
|
|
144
|
+
lastStatus = '';
|
|
145
|
+
}
|
|
146
|
+
} catch (e) {
|
|
147
|
+
// live logs are best-effort
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
128
151
|
const message = String(status?.status || status?.state || 'waiting');
|
|
129
152
|
|
|
130
153
|
if (message !== lastStatus) {
|