@saga-ai/cli 0.8.0 → 2.12.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/dist/cli.cjs +7 -4
- package/package.json +5 -2
package/dist/cli.cjs
CHANGED
|
@@ -1612,12 +1612,14 @@ function createDebouncer(delayMs) {
|
|
|
1612
1612
|
async function createSagaWatcher(sagaRoot) {
|
|
1613
1613
|
const emitter = new import_events.EventEmitter();
|
|
1614
1614
|
const debouncer = createDebouncer(100);
|
|
1615
|
-
const
|
|
1616
|
-
const
|
|
1615
|
+
const epicsDir = (0, import_path4.join)(sagaRoot, ".saga", "epics");
|
|
1616
|
+
const archiveDir = (0, import_path4.join)(sagaRoot, ".saga", "archive");
|
|
1617
|
+
const watcher = import_chokidar.default.watch([epicsDir, archiveDir], {
|
|
1617
1618
|
persistent: true,
|
|
1618
1619
|
ignoreInitial: true,
|
|
1619
1620
|
// Don't emit events for existing files
|
|
1620
|
-
// Use polling for reliable cross-platform behavior
|
|
1621
|
+
// Use polling for reliable cross-platform behavior in tests
|
|
1622
|
+
// This is fine since we only watch epics/archive (~20 files), not entire .saga/ (79K+ files)
|
|
1621
1623
|
usePolling: true,
|
|
1622
1624
|
interval: 100
|
|
1623
1625
|
});
|
|
@@ -1882,9 +1884,10 @@ function createApp(sagaRoot) {
|
|
|
1882
1884
|
});
|
|
1883
1885
|
app.use("/api", createApiRouter(sagaRoot));
|
|
1884
1886
|
const clientDistPath = (0, import_path6.join)(__dirname, "client");
|
|
1887
|
+
const indexHtmlPath = (0, import_path6.join)(clientDistPath, "index.html");
|
|
1885
1888
|
app.use(import_express2.default.static(clientDistPath));
|
|
1886
1889
|
app.get("/{*splat}", (_req, res) => {
|
|
1887
|
-
res.sendFile(
|
|
1890
|
+
res.sendFile("index.html", { root: clientDistPath });
|
|
1888
1891
|
});
|
|
1889
1892
|
return app;
|
|
1890
1893
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saga-ai/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.12.1",
|
|
4
4
|
"description": "CLI for SAGA - Structured Autonomous Goal Achievement",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"autoprefixer": "^10.4.23",
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
57
|
"clsx": "^2.1.1",
|
|
58
|
+
"concurrently": "^9.2.1",
|
|
58
59
|
"esbuild": "^0.24.0",
|
|
59
60
|
"lucide-react": "^0.563.0",
|
|
60
61
|
"playwright": "^1.58.0",
|
|
@@ -85,10 +86,12 @@
|
|
|
85
86
|
"build:all": "pnpm build && pnpm build:client",
|
|
86
87
|
"dev": "npm run build && node dist/cli.cjs",
|
|
87
88
|
"dev:client": "vite --config src/client/vite.config.ts",
|
|
88
|
-
"test": "vitest run",
|
|
89
|
+
"test": "concurrently -g \"vitest run\" \"pnpm run test:integration\" \"pnpm run test:e2e\"",
|
|
89
90
|
"test:watch": "vitest",
|
|
90
91
|
"test:integration": "playwright test --config src/client/playwright.config.ts",
|
|
91
92
|
"test:integration:ui": "playwright test --config src/client/playwright.config.ts --ui",
|
|
93
|
+
"test:e2e": "playwright test --config src/client/playwright.e2e.config.ts",
|
|
94
|
+
"test:e2e:ui": "playwright test --config src/client/playwright.e2e.config.ts --ui",
|
|
92
95
|
"test-storybook": "vitest --project=storybook",
|
|
93
96
|
"test:storybook": "vitest run --project=storybook",
|
|
94
97
|
"publish:npm": "pnpm build:all && pnpm test && pnpm publish --access public",
|