@xera-ai/cli 0.9.4 → 0.9.6
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/index.js +6 -14
- package/package.json +3 -3
- package/templates/sample/SAMPLE-001/meta.json +0 -9
- package/templates/sample/SAMPLE-001/spec.ts +0 -9
- package/templates/sample/SAMPLE-001/story.md +0 -11
- package/templates/sample/SAMPLE-001/test.feature +0 -6
- package/templates/sample/SAMPLE-HTTP-001/meta.json +0 -9
- package/templates/sample/SAMPLE-HTTP-001/spec.ts +0 -29
- package/templates/sample/SAMPLE-HTTP-001/story.md +0 -11
- package/templates/sample/SAMPLE-HTTP-001/test.feature +0 -11
package/dist/index.js
CHANGED
|
@@ -262,7 +262,6 @@ function copyDir(src, dest) {
|
|
|
262
262
|
writeFileSync(d, readFileSync2(s));
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
var TEMPLATE_DIR = TEMPLATE_ROOT;
|
|
266
265
|
|
|
267
266
|
// src/commands/init.ts
|
|
268
267
|
var require2 = createRequire(import.meta.url);
|
|
@@ -405,12 +404,6 @@ async function initCommand(opts) {
|
|
|
405
404
|
writeFileSync2(gitignorePath, `${gitignoreAdditions.trim()}
|
|
406
405
|
`);
|
|
407
406
|
}
|
|
408
|
-
if (wantsWeb) {
|
|
409
|
-
copyDir(join3(TEMPLATE_DIR, "sample/SAMPLE-001"), join3(cwd, ".xera/SAMPLE-001"));
|
|
410
|
-
}
|
|
411
|
-
if (wantsHttp) {
|
|
412
|
-
copyDir(join3(TEMPLATE_DIR, "sample/SAMPLE-HTTP-001"), join3(cwd, ".xera/SAMPLE-HTTP-001"));
|
|
413
|
-
}
|
|
414
407
|
const skillsSrc = require2.resolve("@xera-ai/skills/package.json");
|
|
415
408
|
const skillsDir = join3(skillsSrc, "..");
|
|
416
409
|
for (const target of [".claude/skills", ".claude/commands"]) {
|
|
@@ -463,23 +456,22 @@ Next:
|
|
|
463
456
|
USER_BEARER_TOKEN=...
|
|
464
457
|
2) Run pre-authentication:
|
|
465
458
|
bun run xera:auth-setup
|
|
466
|
-
3)
|
|
467
|
-
Open Claude Code in this directory and run: /xera-run
|
|
459
|
+
3) Start testing:
|
|
460
|
+
Open Claude Code in this directory and run: /xera-run <TICKET>
|
|
468
461
|
` : shape === "mixed" ? `
|
|
469
462
|
Next:
|
|
470
463
|
1) Set credentials in .env.local (both web logins and API tokens)
|
|
471
464
|
2) Run pre-authentication:
|
|
472
465
|
bun run xera:auth-setup
|
|
473
|
-
3)
|
|
474
|
-
/xera-run
|
|
475
|
-
/xera-run SAMPLE-HTTP-001 # API
|
|
466
|
+
3) Start testing:
|
|
467
|
+
Open Claude Code in this directory and run: /xera-run <TICKET>
|
|
476
468
|
` : `
|
|
477
469
|
Next:
|
|
478
470
|
1) Set your Jira credentials in .env.local
|
|
479
471
|
2) Run pre-authentication:
|
|
480
472
|
bun run xera:auth-setup
|
|
481
|
-
3)
|
|
482
|
-
Open Claude Code in this directory and run: /xera-run
|
|
473
|
+
3) Start testing:
|
|
474
|
+
Open Claude Code in this directory and run: /xera-run <TICKET>
|
|
483
475
|
`;
|
|
484
476
|
p.note(nextSteps.trim(), "Next steps");
|
|
485
477
|
p.outro(pc2.green("xera initialized!"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xera-ai/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xera": "./bin/xera"
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"typecheck": "tsc --noEmit"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@xera-ai/core": "^0.9.
|
|
19
|
-
"@xera-ai/skills": "^0.9.
|
|
18
|
+
"@xera-ai/core": "^0.9.6",
|
|
19
|
+
"@xera-ai/skills": "^0.9.6",
|
|
20
20
|
"@clack/prompts": "1.4.0",
|
|
21
21
|
"cac": "7.0.0",
|
|
22
22
|
"picocolors": "1.1.1"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { expect, test } from '@playwright/test';
|
|
2
|
-
|
|
3
|
-
test.describe('SAMPLE-001: Playwright docs site smoke test', () => {
|
|
4
|
-
test('Home page loads with expected title', async ({ page }) => {
|
|
5
|
-
await page.goto('https://playwright.dev');
|
|
6
|
-
await expect(page).toHaveTitle(/Playwright/);
|
|
7
|
-
await expect(page.getByRole('heading', { level: 1 })).toBeVisible();
|
|
8
|
-
});
|
|
9
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# SAMPLE-001: Playwright documentation site loads
|
|
2
|
-
|
|
3
|
-
## Story
|
|
4
|
-
As a QA engineer setting up xera,
|
|
5
|
-
I want to verify the framework can run an end-to-end test against a public website,
|
|
6
|
-
so that I know my environment is set up correctly.
|
|
7
|
-
|
|
8
|
-
## Acceptance Criteria
|
|
9
|
-
- Navigate to https://playwright.dev
|
|
10
|
-
- Page title contains "Playwright"
|
|
11
|
-
- Main heading is visible
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type APIRequestContext, expect, test } from '@playwright/test';
|
|
2
|
-
import { newAuthedContext } from '@xera-ai/http/runtime';
|
|
3
|
-
|
|
4
|
-
test.describe('POST /users validation', () => {
|
|
5
|
-
let api: APIRequestContext;
|
|
6
|
-
test.beforeAll(async ({ playwright }) => {
|
|
7
|
-
api = await newAuthedContext(playwright, 'user');
|
|
8
|
-
});
|
|
9
|
-
test.afterAll(async () => {
|
|
10
|
-
await api.dispose();
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
test('Reject malformed email', async () => {
|
|
14
|
-
const res = await api.post('/users', { data: { email: 'not-an-email' } });
|
|
15
|
-
expect(res.status()).toBe(422);
|
|
16
|
-
const body = await res.json();
|
|
17
|
-
expect(body.errors).toBeInstanceOf(Array);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
test('Accept valid email', async () => {
|
|
21
|
-
const res = await api.post('/users', {
|
|
22
|
-
data: { email: `alice-${process.env.XERA_RUN_ID}@example.com` },
|
|
23
|
-
});
|
|
24
|
-
expect(res.status()).toBe(201);
|
|
25
|
-
const body = await res.json();
|
|
26
|
-
expect(body).toHaveProperty('id');
|
|
27
|
-
expect(body).toHaveProperty('email');
|
|
28
|
-
});
|
|
29
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# SAMPLE-HTTP-001 — POST /users validation
|
|
2
|
-
|
|
3
|
-
As a developer integrating the registration API,
|
|
4
|
-
I want POST /users to reject invalid emails with 422,
|
|
5
|
-
so that clients receive structured validation feedback.
|
|
6
|
-
|
|
7
|
-
## Acceptance Criteria
|
|
8
|
-
|
|
9
|
-
- POST /users with empty email returns 422 with `errors` containing "email is required" or similar.
|
|
10
|
-
- POST /users with malformed email (no @) returns 422 with a message containing "email must be valid".
|
|
11
|
-
- POST /users with a valid email returns 201 with `{ id, email }`.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Feature: POST /users validation
|
|
2
|
-
|
|
3
|
-
Scenario: Reject malformed email
|
|
4
|
-
When the user POSTs /users with body { "email": "not-an-email" }
|
|
5
|
-
Then the response status is 422
|
|
6
|
-
And the response body contains an "errors" array
|
|
7
|
-
|
|
8
|
-
Scenario: Accept valid email
|
|
9
|
-
When the user POSTs /users with body { "email": "alice@example.com" }
|
|
10
|
-
Then the response status is 201
|
|
11
|
-
And the response body has fields "id" and "email"
|