@aexhq/cli 0.13.10 → 0.15.0
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/package.json +2 -2
- package/test/cli.test.ts +4 -0
- package/test/host.test.ts +4 -4
- package/test/outputs-sync.test.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aexhq/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/aexhq/aex.git"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"fflate": "^0.8.2",
|
|
30
|
-
"@aexhq/contracts": "0.
|
|
30
|
+
"@aexhq/contracts": "0.15.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"esbuild": "^0.28.0"
|
package/test/cli.test.ts
CHANGED
|
@@ -233,6 +233,10 @@ describe("aex proxy — successful call", () => {
|
|
|
233
233
|
expect(headers.get("x-aex-path")).toBe("/v1/refunds");
|
|
234
234
|
const body = JSON.parse(cap.stdout.trim());
|
|
235
235
|
expect(body.upstreamStatus).toBe(200);
|
|
236
|
+
expect(body.effectiveResponseMode).toBe("headers_only");
|
|
237
|
+
expect(body.remainingCalls).toBe(59);
|
|
238
|
+
expect(body.remainingResponseBytes).toBe(1000000);
|
|
239
|
+
expect(body.upstreamHeaders).toEqual({ "content-type": "application/json" });
|
|
236
240
|
});
|
|
237
241
|
|
|
238
242
|
it("reconstructs the envelope from a v2 streamed response (headers + raw body)", async () => {
|
package/test/host.test.ts
CHANGED
|
@@ -166,7 +166,7 @@ describe("aex status", () => {
|
|
|
166
166
|
expect(cap.exitCode).toBe(0);
|
|
167
167
|
expect(cap.calls[0]!.url).toContain("/api/runs/run-42");
|
|
168
168
|
expect(cap.calls[0]!.url).not.toContain("workspaceId=");
|
|
169
|
-
expect(JSON.parse(cap.stdout)).
|
|
169
|
+
expect(JSON.parse(cap.stdout)).toEqual({ id: "run-42", status: "succeeded" });
|
|
170
170
|
});
|
|
171
171
|
|
|
172
172
|
it("does not accept a --workspace flag (workspace is derived from the token)", async () => {
|
|
@@ -198,8 +198,8 @@ describe("aex events", () => {
|
|
|
198
198
|
expect(cap.exitCode).toBe(0);
|
|
199
199
|
const lines = cap.stdout.trim().split("\n");
|
|
200
200
|
expect(lines).toHaveLength(2);
|
|
201
|
-
expect(JSON.parse(lines[0]!)).
|
|
202
|
-
expect(JSON.parse(lines[1]!)).
|
|
201
|
+
expect(JSON.parse(lines[0]!)).toEqual({ id: "e1", type: "agent.message" });
|
|
202
|
+
expect(JSON.parse(lines[1]!)).toEqual({ id: "e2", type: "session.status_running" });
|
|
203
203
|
});
|
|
204
204
|
|
|
205
205
|
it("--follow polls /events and emits NDJSON until terminal (never opens an SSE stream)", async () => {
|
|
@@ -288,7 +288,7 @@ describe("aex wait", () => {
|
|
|
288
288
|
});
|
|
289
289
|
await runCli(cap.io);
|
|
290
290
|
expect(cap.exitCode).toBe(0);
|
|
291
|
-
expect(polls).
|
|
291
|
+
expect(polls).toBe(3);
|
|
292
292
|
const printed = JSON.parse(cap.stdout.trim()) as { id: string; status: string };
|
|
293
293
|
expect(printed).toMatchObject({ id: "run-w", status: "succeeded" });
|
|
294
294
|
});
|
|
@@ -101,5 +101,7 @@ describe("aex outputs sync (internal)", () => {
|
|
|
101
101
|
const exit = await runOutputsSyncCmd(cap.io, ["workspace/outputs"]);
|
|
102
102
|
expect(exit.code).toBe(0);
|
|
103
103
|
expect(cap.stderr).toContain(`"non_absolute_path"`);
|
|
104
|
+
const summary = cap.stdout.trim().split("\n").pop()!;
|
|
105
|
+
expect(JSON.parse(summary)).toMatchObject({ summary: { dirs: 1, files: 0, missing: 1 } });
|
|
104
106
|
});
|
|
105
107
|
});
|