@atolis-hq/wake 0.2.14 → 0.2.15
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.
|
@@ -96,6 +96,22 @@ async function handleRequest(req, res, options, now) {
|
|
|
96
96
|
sendJson(res, 202, request);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
+
if (req.method === 'POST' &&
|
|
100
|
+
resource === 'runners' &&
|
|
101
|
+
segments.length === 3 &&
|
|
102
|
+
segments[2] === 'unpause') {
|
|
103
|
+
const runnerName = segments[1];
|
|
104
|
+
const ledger = await stateStore.readLedger();
|
|
105
|
+
const existingRunners = ledger?.runners ?? {};
|
|
106
|
+
if (existingRunners[runnerName] !== undefined) {
|
|
107
|
+
await stateStore.writeLedger({
|
|
108
|
+
schemaVersion: 1,
|
|
109
|
+
runners: { ...existingRunners, [runnerName]: { failureCount: 0 } },
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
sendJson(res, 200, { runnerName, unpaused: true });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
99
115
|
if (req.method !== 'GET') {
|
|
100
116
|
sendJson(res, 405, { error: `method not allowed for ${url.pathname}` });
|
|
101
117
|
return;
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const wakeVersion = "0.2.
|
|
1
|
+
export const wakeVersion = "0.2.15+g36c8953";
|