@makefully/adaptfully 4.2.0 → 4.2.1
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 +7 -0
- package/lib/node/deploy.js +25 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 4.2.1 — 2026-09-09
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Yap status poll logs only when the status message changes (same as Dutifully), instead of repeating every poll interval.
|
|
10
|
+
- Clearer errors when a chore download/decrypt/unpack fails (helps diagnose truncated Showfully responses).
|
|
11
|
+
|
|
5
12
|
## 4.2.0 — 2026-09-08
|
|
6
13
|
|
|
7
14
|
### Changed
|
package/lib/node/deploy.js
CHANGED
|
@@ -109,6 +109,8 @@ export async function submitWrapfullyChore ({
|
|
|
109
109
|
|
|
110
110
|
log(`adaptfully: chore ${choreId} submitted; waiting…`);
|
|
111
111
|
|
|
112
|
+
let lastStatus = '';
|
|
113
|
+
|
|
112
114
|
for (;;) {
|
|
113
115
|
const statusUrl = `${base}yap/wrapfully/${encodeURIComponent(choreId)}/status`;
|
|
114
116
|
const {data: status} = await axios.get(statusUrl, {
|
|
@@ -123,7 +125,12 @@ export async function submitWrapfullyChore ({
|
|
|
123
125
|
throw new Error(status.errors?.[0] || `Chore ${choreId} failed`);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
const message = String(status?.status || status?.state || 'waiting');
|
|
129
|
+
|
|
130
|
+
if (message !== lastStatus) {
|
|
131
|
+
log(`adaptfully: ${message}…`);
|
|
132
|
+
lastStatus = message;
|
|
133
|
+
}
|
|
127
134
|
await sleep(POLL_MS);
|
|
128
135
|
}
|
|
129
136
|
|
|
@@ -293,14 +300,29 @@ export async function send (
|
|
|
293
300
|
});
|
|
294
301
|
|
|
295
302
|
if (resultPriv) {
|
|
296
|
-
|
|
303
|
+
try {
|
|
304
|
+
resultBuffer = await decryptResultEnvelope(resultBuffer, resultPriv);
|
|
305
|
+
} catch (err) {
|
|
306
|
+
throw new Error(`Failed to decrypt Wrapfully result envelope: ${err.message || err}`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (!Buffer.isBuffer(resultBuffer) || resultBuffer.length < 4
|
|
311
|
+
|| resultBuffer[0] !== 0x50 || resultBuffer[1] !== 0x4b) {
|
|
312
|
+
throw new Error('Chore download is not a valid zip (truncated or corrupt response)');
|
|
297
313
|
}
|
|
298
314
|
|
|
299
315
|
const destination = mode === 'extract'
|
|
300
316
|
? unzipper.Extract({path: `${outputRoot}/`, concurrency: 1})
|
|
301
317
|
: fs.createWriteStream(`${outputRoot}/${pkg.name}-${pkg.version}-${stage}-${family}.zip`);
|
|
302
318
|
|
|
303
|
-
|
|
319
|
+
try {
|
|
320
|
+
await pipeline(Readable.from(resultBuffer), destination);
|
|
321
|
+
} catch (err) {
|
|
322
|
+
throw new Error(
|
|
323
|
+
`Failed to unpack chore result (${resultBuffer.length} bytes): ${err.message || err}`
|
|
324
|
+
);
|
|
325
|
+
}
|
|
304
326
|
|
|
305
327
|
if (mode === 'extract') {
|
|
306
328
|
printBuildReport(`${stage}-${family}`, pkg);
|