steroids-cli 0.10.22 → 0.10.24
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/cli/entrypoint.d.ts +8 -0
- package/dist/cli/entrypoint.d.ts.map +1 -0
- package/dist/cli/entrypoint.js +19 -0
- package/dist/cli/entrypoint.js.map +1 -0
- package/dist/runners/wakeup-checks.d.ts.map +1 -1
- package/dist/runners/wakeup-checks.js +14 -2
- package/dist/runners/wakeup-checks.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../src/cli/entrypoint.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAMpD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveCliEntrypoint = resolveCliEntrypoint;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
/**
|
|
7
|
+
* Resolve steroids CLI entrypoint from compiled runtime.
|
|
8
|
+
* Expected dist layout:
|
|
9
|
+
* - dist/index.js
|
|
10
|
+
* - dist/cli/entrypoint.js
|
|
11
|
+
*/
|
|
12
|
+
function resolveCliEntrypoint() {
|
|
13
|
+
const distCliPath = (0, node_path_1.join)(__dirname, '..', 'index.js');
|
|
14
|
+
if ((0, node_fs_1.existsSync)(distCliPath)) {
|
|
15
|
+
return distCliPath;
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=entrypoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["../../src/cli/entrypoint.ts"],"names":[],"mappings":";;AASA,oDAMC;AAfD,qCAAqC;AACrC,yCAAiC;AAEjC;;;;;GAKG;AACH,SAAgB,oBAAoB;IAClC,MAAM,WAAW,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IACtD,IAAI,IAAA,oBAAU,EAAC,WAAW,CAAC,EAAE,CAAC;QAC5B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wakeup-checks.d.ts","sourceRoot":"","sources":["../../src/runners/wakeup-checks.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"wakeup-checks.d.ts","sourceRoot":"","sources":["../../src/runners/wakeup-checks.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA8BjF;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CActE;AAED,wBAAgB,kCAAkC,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAgD/E"}
|
|
@@ -21,8 +21,20 @@ async function projectHasPendingWork(projectPath) {
|
|
|
21
21
|
}
|
|
22
22
|
try {
|
|
23
23
|
return (0, connection_js_1.withDatabase)(projectPath, (db) => {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// First try actionable task selection.
|
|
25
|
+
if ((0, task_selector_js_1.selectNextTask)(db) !== null) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
// Align wakeup behavior with "outstanding work" shown in the admin UI.
|
|
29
|
+
// If there are pending/in_progress/review tasks but selection is blocked
|
|
30
|
+
// (for example transient lock/dependency timing), still consider it work.
|
|
31
|
+
const row = db
|
|
32
|
+
.prepare(`SELECT COUNT(*) as count
|
|
33
|
+
FROM tasks
|
|
34
|
+
WHERE status IN ('pending', 'in_progress', 'review')`)
|
|
35
|
+
.get();
|
|
36
|
+
return row.count > 0;
|
|
37
|
+
}, { timeoutMs: 1000 });
|
|
26
38
|
}
|
|
27
39
|
catch (error) {
|
|
28
40
|
// Treat timeouts or locked DBs as no pending work for this cycle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wakeup-checks.js","sourceRoot":"","sources":["../../src/runners/wakeup-checks.ts"],"names":[],"mappings":";;AAeA,
|
|
1
|
+
{"version":3,"file":"wakeup-checks.js","sourceRoot":"","sources":["../../src/runners/wakeup-checks.ts"],"names":[],"mappings":";;AAeA,sDA8BC;AAMD,8DAcC;AAED,gFAgDC;AAnHD,6DAAyD;AACzD,iDAAoD;AACpD;;GAEG;AAEH,qCAAqC;AACrC,yCAAiC;AAGjC,uEAAkE;AAElE;;GAEG;AACI,KAAK,UAAU,qBAAqB,CAAC,WAAmB;IAC7D,MAAM,MAAM,GAAG,IAAA,gBAAI,EAAC,WAAW,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IAC7D,IAAI,CAAC,IAAA,oBAAU,EAAC,MAAM,CAAC,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC;QACH,OAAO,IAAA,4BAAY,EAAC,WAAW,EAAE,CAAC,EAAO,EAAE,EAAE;YAC3C,uCAAuC;YACvC,IAAI,IAAA,iCAAc,EAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;gBAChC,OAAO,IAAI,CAAC;YACd,CAAC;YAED,uEAAuE;YACvE,yEAAyE;YACzE,0EAA0E;YAC1E,MAAM,GAAG,GAAG,EAAE;iBACX,OAAO,CACN;;gEAEsD,CACvD;iBACA,GAAG,EAAuB,CAAC;YAE9B,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;QACvB,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IA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