airgen-cli 0.11.0 → 0.12.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/dist/client.d.ts +1 -0
- package/dist/client.js +6 -0
- package/dist/commands/projects.js +8 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +6 -5
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
package/dist/client.js
CHANGED
|
@@ -189,6 +189,12 @@ export class AirgenClient {
|
|
|
189
189
|
}
|
|
190
190
|
// ── Auth ──────────────────────────────────────────────────────
|
|
191
191
|
async ensureAuth() {
|
|
192
|
+
// API key mode — no login needed
|
|
193
|
+
if (this.config.apiKey) {
|
|
194
|
+
this.auth.accessToken = this.config.apiKey;
|
|
195
|
+
this.auth.tokenExpiresAt = Infinity;
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
192
198
|
// Already have a valid token (with 2min buffer)
|
|
193
199
|
if (this.auth.accessToken && Date.now() < this.auth.tokenExpiresAt - 120_000) {
|
|
194
200
|
return;
|
|
@@ -66,17 +66,25 @@ export function registerProjectCommands(program, client) {
|
|
|
66
66
|
{ name: "System Requirements", code: "SYS", sections: [
|
|
67
67
|
{ name: "System Requirements", code: "SYS" },
|
|
68
68
|
] },
|
|
69
|
+
{ name: "Interface Requirements", code: "IFC", sections: [
|
|
70
|
+
{ name: "Interface Requirements", code: "IFC" },
|
|
71
|
+
] },
|
|
69
72
|
{ name: "Subsystem Requirements", code: "SUB", sections: [
|
|
70
73
|
{ name: "Subsystem Requirements", code: "SUB" },
|
|
71
74
|
] },
|
|
75
|
+
{ name: "Architecture Decisions", code: "ARC", sections: [
|
|
76
|
+
{ name: "Architecture Decisions", code: "ARC" },
|
|
77
|
+
] },
|
|
72
78
|
{ name: "Verification Requirements", code: "VER", sections: [
|
|
73
79
|
{ name: "Verification Requirements", code: "VER" },
|
|
74
80
|
] },
|
|
75
81
|
];
|
|
76
82
|
const seLinksets = [
|
|
77
83
|
{ source: "stakeholder-requirements", target: "system-requirements" },
|
|
84
|
+
{ source: "system-requirements", target: "interface-requirements" },
|
|
78
85
|
{ source: "system-requirements", target: "subsystem-requirements" },
|
|
79
86
|
{ source: "system-requirements", target: "verification-requirements" },
|
|
87
|
+
{ source: "interface-requirements", target: "verification-requirements" },
|
|
80
88
|
{ source: "subsystem-requirements", target: "verification-requirements" },
|
|
81
89
|
];
|
|
82
90
|
const safetyExtras = [
|
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -16,15 +16,16 @@ function loadRcFile() {
|
|
|
16
16
|
export function loadConfig() {
|
|
17
17
|
const rc = loadRcFile();
|
|
18
18
|
const apiUrl = process.env.AIRGEN_API_URL ?? rc.apiUrl;
|
|
19
|
-
const
|
|
20
|
-
const
|
|
19
|
+
const apiKey = process.env.AIRGEN_API_KEY ?? rc.apiKey;
|
|
20
|
+
const email = process.env.AIRGEN_EMAIL ?? rc.email ?? "";
|
|
21
|
+
const password = process.env.AIRGEN_PASSWORD ?? rc.password ?? "";
|
|
21
22
|
if (!apiUrl) {
|
|
22
23
|
console.error("Missing AIRGEN_API_URL. Set it via environment variable or ~/.airgenrc");
|
|
23
24
|
process.exit(1);
|
|
24
25
|
}
|
|
25
|
-
if (!email || !password) {
|
|
26
|
-
console.error("Missing AIRGEN_EMAIL
|
|
26
|
+
if (!apiKey && (!email || !password)) {
|
|
27
|
+
console.error("Missing credentials. Set AIRGEN_API_KEY or AIRGEN_EMAIL + AIRGEN_PASSWORD via environment or ~/.airgenrc");
|
|
27
28
|
process.exit(1);
|
|
28
29
|
}
|
|
29
|
-
return { apiUrl, email, password };
|
|
30
|
+
return { apiUrl, email, password, apiKey };
|
|
30
31
|
}
|