raptor-aios 0.6.2 → 0.6.3
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/CHANGELOG.md +10 -0
- package/dist/_core/package.json +1 -1
- package/dist/commands/new.js +29 -13
- package/package.json +1 -1
- package/scripts/prepare-npm.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
5
|
|
|
6
|
+
## [0.6.3] - 2026-06-06
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- **`raptor new --jira=<KEY>` no longer creates an empty, mislabelled spec when the Jira card can't be read.** Previously, when a ticket was given but Jira was not connected (or the token had expired, or the issue was unreachable), `new` warned and then degraded to seeding a spec stamped with the Jira ID but **no card content** — and created the branch too. Now, when a fetch was expected (the default), an unreadable card is a **hard stop**: `new` aborts **before any side effect** (no spec, no directory, no branch) with an actionable message that states the reason and points to `raptor jira connect` (or configuring the Jira MCP server). The intentional offline path is unchanged — pass `--no-jira-fetch` to record the ticket ID only.
|
|
11
|
+
|
|
12
|
+
### Internal
|
|
13
|
+
|
|
14
|
+
- `New.fetchJiraContext` now returns a discriminated result (`{ ok, context }` | `{ ok: false, reason }`) so the caller can abort with the specific failure reason instead of silently degrading. Removed the now-unreachable `"id only (fetch unavailable)"` status tag.
|
|
15
|
+
|
|
6
16
|
## [0.6.2] - 2026-06-06
|
|
7
17
|
|
|
8
18
|
### Changed
|
package/dist/_core/package.json
CHANGED
package/dist/commands/new.js
CHANGED
|
@@ -113,7 +113,26 @@ export default class New extends BaseCommand {
|
|
|
113
113
|
const specNeedsSeeding = !existsSync(specPath);
|
|
114
114
|
let jiraContext = null;
|
|
115
115
|
if (specNeedsSeeding && flags.jira && flags["jira-fetch"]) {
|
|
116
|
-
|
|
116
|
+
const result = await this.fetchJiraContext(root, flags.jira);
|
|
117
|
+
if (result.ok) {
|
|
118
|
+
jiraContext = result.context;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.error([
|
|
122
|
+
`${result.reason}`,
|
|
123
|
+
``,
|
|
124
|
+
`Aborting: --jira=${flags.jira} was given but its Jira card could not be read,`,
|
|
125
|
+
`so there is no card content to seed the spec from. No spec or branch was`,
|
|
126
|
+
`created — a spec stamped with a Jira ID but no Jira content would be misleading.`,
|
|
127
|
+
``,
|
|
128
|
+
`To fix, do one of:`,
|
|
129
|
+
` • Connect Jira, then retry:`,
|
|
130
|
+
` raptor jira connect`,
|
|
131
|
+
` (or configure the Jira MCP server under 'jira:' in .raptor/raptor.yml)`,
|
|
132
|
+
` • Record the ticket ID only, without fetching the card:`,
|
|
133
|
+
` raptor new ${args.slug} --jira=${flags.jira} --no-jira-fetch`,
|
|
134
|
+
].join("\n"), { exit: 1 });
|
|
135
|
+
}
|
|
117
136
|
}
|
|
118
137
|
const designText = specNeedsSeeding
|
|
119
138
|
? [
|
|
@@ -271,9 +290,7 @@ export default class New extends BaseCommand {
|
|
|
271
290
|
? "seeded spec"
|
|
272
291
|
: !specNeedsSeeding
|
|
273
292
|
? "id recorded — spec already authored, not re-seeded"
|
|
274
|
-
:
|
|
275
|
-
? "id only (fetch unavailable)"
|
|
276
|
-
: "id only";
|
|
293
|
+
: "id only";
|
|
277
294
|
this.log(` Jira: ${flags.jira} (${tag})`);
|
|
278
295
|
}
|
|
279
296
|
if (designContext.hasDesign) {
|
|
@@ -416,28 +433,27 @@ export default class New extends BaseCommand {
|
|
|
416
433
|
async fetchJiraContext(root, key) {
|
|
417
434
|
const conn = jiraConn(readConfig(root));
|
|
418
435
|
if (!conn) {
|
|
419
|
-
|
|
420
|
-
return null;
|
|
436
|
+
return { ok: false, reason: `Jira is not connected.` };
|
|
421
437
|
}
|
|
422
438
|
if (!jiraReadyNonInteractive(conn)) {
|
|
423
|
-
|
|
424
|
-
return null;
|
|
439
|
+
return { ok: false, reason: `Jira credentials are missing.` };
|
|
425
440
|
}
|
|
426
441
|
let client;
|
|
427
442
|
try {
|
|
428
443
|
client = await openJiraClient(conn);
|
|
429
444
|
}
|
|
430
445
|
catch {
|
|
431
|
-
|
|
432
|
-
return null;
|
|
446
|
+
return { ok: false, reason: `Jira session expired.` };
|
|
433
447
|
}
|
|
434
448
|
try {
|
|
435
449
|
const issue = await client.getJiraIssue(conn.cloudId, key);
|
|
436
|
-
return mapIssueToSpecContext(issue);
|
|
450
|
+
return { ok: true, context: mapIssueToSpecContext(issue) };
|
|
437
451
|
}
|
|
438
452
|
catch (err) {
|
|
439
|
-
|
|
440
|
-
|
|
453
|
+
return {
|
|
454
|
+
ok: false,
|
|
455
|
+
reason: `Could not fetch ${key} from Jira (${err instanceof Error ? err.message : String(err)}).`,
|
|
456
|
+
};
|
|
441
457
|
}
|
|
442
458
|
finally {
|
|
443
459
|
await client.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raptor-aios",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Raptor — Spec-Driven Development (SDD) CLI for modern mobile apps. Constitutional gates, audit trail, real verification (a11y/perf/stores/OS matrix), and AI-agent slash commands.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/scripts/prepare-npm.mjs
CHANGED