@xera-ai/cli 0.9.5 → 0.9.7
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 +3 -8
- package/package.json +3 -3
- package/templates/mixed-xera.config.ts.tmpl +1 -1
- 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,9 +404,6 @@ async function initCommand(opts) {
|
|
|
405
404
|
writeFileSync2(gitignorePath, `${gitignoreAdditions.trim()}
|
|
406
405
|
`);
|
|
407
406
|
}
|
|
408
|
-
if (wantsHttp) {
|
|
409
|
-
copyDir(join3(TEMPLATE_DIR, "sample/SAMPLE-HTTP-001"), join3(cwd, ".xera/SAMPLE-HTTP-001"));
|
|
410
|
-
}
|
|
411
407
|
const skillsSrc = require2.resolve("@xera-ai/skills/package.json");
|
|
412
408
|
const skillsDir = join3(skillsSrc, "..");
|
|
413
409
|
for (const target of [".claude/skills", ".claude/commands"]) {
|
|
@@ -460,16 +456,15 @@ Next:
|
|
|
460
456
|
USER_BEARER_TOKEN=...
|
|
461
457
|
2) Run pre-authentication:
|
|
462
458
|
bun run xera:auth-setup
|
|
463
|
-
3)
|
|
464
|
-
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>
|
|
465
461
|
` : shape === "mixed" ? `
|
|
466
462
|
Next:
|
|
467
463
|
1) Set credentials in .env.local (both web logins and API tokens)
|
|
468
464
|
2) Run pre-authentication:
|
|
469
465
|
bun run xera:auth-setup
|
|
470
466
|
3) Start testing:
|
|
471
|
-
/xera-run
|
|
472
|
-
/xera-run <YOUR-TICKET> # UI tickets
|
|
467
|
+
Open Claude Code in this directory and run: /xera-run <TICKET>
|
|
473
468
|
` : `
|
|
474
469
|
Next:
|
|
475
470
|
1) Set your Jira credentials in .env.local
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xera-ai/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.7",
|
|
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.7",
|
|
19
|
+
"@xera-ai/skills": "^0.9.7",
|
|
20
20
|
"@clack/prompts": "1.4.0",
|
|
21
21
|
"cac": "7.0.0",
|
|
22
22
|
"picocolors": "1.1.1"
|
|
@@ -17,7 +17,7 @@ export default defineConfig({
|
|
|
17
17
|
strategy: 'storageState',
|
|
18
18
|
setupScript: './shared/auth-setup.ts',
|
|
19
19
|
roles: {
|
|
20
|
-
{{#each roles}}{{this}}: { envEmail: '{{upper this}}_EMAIL', envPassword: '{{upper this}}
|
|
20
|
+
{{#each roles}}{{this}}: { envEmail: 'TEST_{{upper this}}_EMAIL', envPassword: 'TEST_{{upper this}}_PWD' },
|
|
21
21
|
{{/each}}
|
|
22
22
|
},
|
|
23
23
|
},{{/if}}
|
|
@@ -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"
|