@prism-d1/cli 1.4.3 → 1.6.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/assets/github-workflows/prism-eval-gate-kiro.yml +22 -2
- package/dist/assets/gitlab-workflows/prism-eval-gate.yml +22 -1
- package/dist/src/aws/check.js +1 -1
- package/dist/src/aws/team.d.ts +39 -0
- package/dist/src/aws/team.d.ts.map +1 -0
- package/dist/src/aws/team.js +172 -0
- package/dist/src/aws/team.js.map +1 -0
- package/dist/src/commands/enable/codeburn.d.ts +27 -3
- package/dist/src/commands/enable/codeburn.d.ts.map +1 -1
- package/dist/src/commands/enable/codeburn.js +317 -40
- package/dist/src/commands/enable/codeburn.js.map +1 -1
- package/dist/src/commands/team/add-developer.d.ts +17 -0
- package/dist/src/commands/team/add-developer.d.ts.map +1 -0
- package/dist/src/commands/team/add-developer.js +22 -0
- package/dist/src/commands/team/add-developer.js.map +1 -0
- package/dist/src/commands/team/info.d.ts +16 -0
- package/dist/src/commands/team/info.d.ts.map +1 -0
- package/dist/src/commands/team/info.js +30 -0
- package/dist/src/commands/team/info.js.map +1 -0
- package/dist/src/dashboard/codewatch.d.ts +3 -1
- package/dist/src/dashboard/codewatch.d.ts.map +1 -1
- package/dist/src/dashboard/codewatch.js +1 -0
- package/dist/src/dashboard/codewatch.js.map +1 -1
- package/dist/src/dashboard/page.d.ts.map +1 -1
- package/dist/src/dashboard/page.js +203 -55
- package/dist/src/dashboard/page.js.map +1 -1
- package/dist/src/dashboard/payload.d.ts +31 -4
- package/dist/src/dashboard/payload.d.ts.map +1 -1
- package/dist/src/dashboard/payload.js +43 -24
- package/dist/src/dashboard/payload.js.map +1 -1
- package/dist/src/dashboard/repos.d.ts +6 -0
- package/dist/src/dashboard/repos.d.ts.map +1 -1
- package/dist/src/dashboard/repos.js +24 -0
- package/dist/src/dashboard/repos.js.map +1 -1
- package/dist/src/dashboard/setup.d.ts +21 -5
- package/dist/src/dashboard/setup.d.ts.map +1 -1
- package/dist/src/dashboard/setup.js +47 -17
- package/dist/src/dashboard/setup.js.map +1 -1
- package/dist/src/dashboard/summary.d.ts +45 -0
- package/dist/src/dashboard/summary.d.ts.map +1 -0
- package/dist/src/dashboard/summary.js +20 -0
- package/dist/src/dashboard/summary.js.map +1 -0
- package/dist/src/dashboard/usage.d.ts +16 -0
- package/dist/src/dashboard/usage.d.ts.map +1 -1
- package/dist/src/dashboard/usage.js +31 -3
- package/dist/src/dashboard/usage.js.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/utils/otel-sync-schedule.d.ts +18 -1
- package/dist/src/utils/otel-sync-schedule.d.ts.map +1 -1
- package/dist/src/utils/otel-sync-schedule.js +44 -3
- package/dist/src/utils/otel-sync-schedule.js.map +1 -1
- package/dist/src/utils/sync-mode.d.ts +43 -0
- package/dist/src/utils/sync-mode.d.ts.map +1 -0
- package/dist/src/utils/sync-mode.js +84 -0
- package/dist/src/utils/sync-mode.js.map +1 -0
- package/package.json +1 -1
|
@@ -287,9 +287,29 @@ jobs:
|
|
|
287
287
|
--model auto \
|
|
288
288
|
"Review /tmp/pr-diff.patch for code quality. Read it, then output ONLY JSON: {\"findings\":[{\"file\":\"path\",\"line\":1,\"severity\":\"high|medium|low\",\"category\":\"str\",\"message\":\"str\"}],\"score\":0.0,\"summary\":\"str\"}") || true
|
|
289
289
|
|
|
290
|
-
# Strip ANSI escapes,
|
|
290
|
+
# Strip ANSI escapes, then extract the LAST JSON object that parses and
|
|
291
|
+
# has a numeric score and a findings array. kiro-cli writes reasoning
|
|
292
|
+
# notes first, and they quote code with braces, so a greedy
|
|
293
|
+
# first-brace-to-last-brace match is not the verdict.
|
|
291
294
|
CLEANED=$(echo "${REVIEW_OUTPUT}" | sed 's/\x1b\[[0-9;?]*[a-zA-Z]//g' | tr -d '\r')
|
|
292
|
-
REVIEW_JSON=$(
|
|
295
|
+
REVIEW_JSON=$(printf '%s' "${CLEANED}" | python3 -c 'if True:
|
|
296
|
+
import json, math, sys
|
|
297
|
+
text = sys.stdin.read()
|
|
298
|
+
dec = json.JSONDecoder(strict=False)
|
|
299
|
+
pos = text.rfind("{")
|
|
300
|
+
while pos != -1:
|
|
301
|
+
try:
|
|
302
|
+
obj = dec.raw_decode(text, pos)[0]
|
|
303
|
+
except ValueError:
|
|
304
|
+
obj = None
|
|
305
|
+
score = obj.get("score") if isinstance(obj, dict) else None
|
|
306
|
+
if (isinstance(score, (int, float)) and not isinstance(score, bool)
|
|
307
|
+
and math.isfinite(score) and isinstance(obj.get("findings"), list)):
|
|
308
|
+
print(json.dumps(obj))
|
|
309
|
+
sys.exit(0)
|
|
310
|
+
pos = text.rfind("{", 0, pos)
|
|
311
|
+
sys.exit(1)
|
|
312
|
+
' || true)
|
|
293
313
|
|
|
294
314
|
if [ -z "${REVIEW_JSON}" ] || ! echo "${REVIEW_JSON}" | jq -e '.score' > /dev/null 2>&1; then
|
|
295
315
|
# FAIL CLOSED: a gate that can't evaluate must not pass
|
|
@@ -222,8 +222,29 @@ prism-eval-gate:
|
|
|
222
222
|
"Review /tmp/mr-diff.patch for code quality. Read it, then output ONLY JSON: {\"findings\":[{\"file\":\"path\",\"line\":1,\"severity\":\"high|medium|low\",\"category\":\"str\",\"message\":\"str\"}],\"score\":0.0,\"summary\":\"str\"}")
|
|
223
223
|
set -e
|
|
224
224
|
|
|
225
|
+
# Extract the LAST JSON object that parses and has a numeric score
|
|
226
|
+
# and a findings array. kiro-cli writes reasoning notes first, and
|
|
227
|
+
# they quote code with braces, so a greedy first-brace-to-last-brace
|
|
228
|
+
# match is not the verdict.
|
|
225
229
|
CLEANED=$(printf '%s' "${REVIEW_OUTPUT}" | sed 's/\x1b\[[0-9;?]*[a-zA-Z]//g' | tr -d '\r')
|
|
226
|
-
REVIEW_JSON=$(printf '%s' "${CLEANED}" |
|
|
230
|
+
REVIEW_JSON=$(printf '%s' "${CLEANED}" | python3 -c 'if True:
|
|
231
|
+
import json, math, sys
|
|
232
|
+
text = sys.stdin.read()
|
|
233
|
+
dec = json.JSONDecoder(strict=False)
|
|
234
|
+
pos = text.rfind("{")
|
|
235
|
+
while pos != -1:
|
|
236
|
+
try:
|
|
237
|
+
obj = dec.raw_decode(text, pos)[0]
|
|
238
|
+
except ValueError:
|
|
239
|
+
obj = None
|
|
240
|
+
score = obj.get("score") if isinstance(obj, dict) else None
|
|
241
|
+
if (isinstance(score, (int, float)) and not isinstance(score, bool)
|
|
242
|
+
and math.isfinite(score) and isinstance(obj.get("findings"), list)):
|
|
243
|
+
print(json.dumps(obj))
|
|
244
|
+
sys.exit(0)
|
|
245
|
+
pos = text.rfind("{", 0, pos)
|
|
246
|
+
sys.exit(1)
|
|
247
|
+
' || true)
|
|
227
248
|
|
|
228
249
|
if [ -z "${REVIEW_JSON}" ] || ! printf '%s' "${REVIEW_JSON}" | jq -e '.score' >/dev/null 2>&1; then
|
|
229
250
|
echo "❌ Could not parse kiro-cli review output — failing closed."
|
package/dist/src/aws/check.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { aws } from '../utils/aws.js';
|
|
10
10
|
import { severityRank } from '../utils/audit.js';
|
|
11
11
|
import { auditAccount, ACCOUNT_AUDIT_IDS } from '../utils/audit-account.js';
|
|
12
|
-
import { configuredSyncUrl } from '../
|
|
12
|
+
import { configuredSyncUrl } from '../utils/otel-sync-schedule.js';
|
|
13
13
|
import { collectSecurityStatus, PIPELINE_STACK, } from '../security/setup.js';
|
|
14
14
|
/** `<section>.<id>`: one id space across sections (a check appears in one section only). */
|
|
15
15
|
export const checkId = (section, id) => `${section}.${id}`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type SecurityOptions } from '../security/setup.js';
|
|
2
|
+
export declare const TEAM_INFO_NOTICE = "Read-only (team info): one describe-stacks call and an identity check; nothing in AWS is changed.";
|
|
3
|
+
export declare const ADD_DEVELOPER_NOTICE = "AWS write (team add-developer): creates one Cognito user after you confirm; nothing else in AWS is changed.";
|
|
4
|
+
export declare const INFO_PERMISSIONS = "cloudformation:DescribeStacks";
|
|
5
|
+
export declare const ADD_PERMISSIONS = "cloudformation:DescribeStacks (unless --user-pool-id) and cognito-idp:AdminCreateUser";
|
|
6
|
+
/**
|
|
7
|
+
* shortcut: a practical shape check, not RFC 5322; Cognito does its own validation on create.
|
|
8
|
+
* ',' and '=' are rejected too: they are separators in AWS CLI shorthand (attributes are also passed as JSON).
|
|
9
|
+
* A leading '-' is rejected so the value can never be read as an AWS CLI option.
|
|
10
|
+
*/
|
|
11
|
+
export declare const EMAIL_RE: RegExp;
|
|
12
|
+
export interface TeamOptions extends Pick<SecurityOptions, 'profile' | 'region' | 'profileSource' | 'connection'> {
|
|
13
|
+
json?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface AddDeveloperOptions extends TeamOptions {
|
|
16
|
+
email?: string;
|
|
17
|
+
userPoolId?: string;
|
|
18
|
+
yes?: boolean;
|
|
19
|
+
dryRun?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface TeamDeps {
|
|
22
|
+
env: NodeJS.ProcessEnv;
|
|
23
|
+
configRegion(profile?: string): string | null;
|
|
24
|
+
isTTY: boolean;
|
|
25
|
+
ask(q: string): Promise<string>;
|
|
26
|
+
log(line?: string): void;
|
|
27
|
+
err(line?: string): void;
|
|
28
|
+
}
|
|
29
|
+
export interface StackInfo {
|
|
30
|
+
account: string;
|
|
31
|
+
region: string;
|
|
32
|
+
stack: string;
|
|
33
|
+
otelCollectorUrl: string | null;
|
|
34
|
+
otelUserPoolId: string | null;
|
|
35
|
+
}
|
|
36
|
+
export declare const developerCommand: (url: string) => string;
|
|
37
|
+
export declare function teamInfo(o: TeamOptions, d: TeamDeps): number;
|
|
38
|
+
export declare function addDeveloper(o: AddDeveloperOptions, d: TeamDeps): Promise<number>;
|
|
39
|
+
//# sourceMappingURL=team.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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,CAAA;CAAE;AAuC7I,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,MAAkD,CAAC;AAElG,wBAAgB,QAAQ,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CA2B5D;AAID,wBAAsB,YAAY,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CA6CvF"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `prism-cli team`: platform-team helpers for the PRISM metrics stack.
|
|
3
|
+
*
|
|
4
|
+
* team info READ-ONLY. describe-stacks on the metrics stack; prints
|
|
5
|
+
* OtelCollectorUrl and OtelUserPoolId.
|
|
6
|
+
* team add-developer AWS WRITE. One Cognito AdminCreateUser (username = the
|
|
7
|
+
* developer's email, as in README step 2), after the plan
|
|
8
|
+
* is shown and confirmed. Cognito emails the invite; the
|
|
9
|
+
* temporary password is never requested, printed, logged
|
|
10
|
+
* or stored here.
|
|
11
|
+
*
|
|
12
|
+
* Same AWS resolution as the other AWS commands (aws connect precedence,
|
|
13
|
+
* --profile / --region), through the AWS CLI with an argv array (no shell).
|
|
14
|
+
*/
|
|
15
|
+
import { aws } from '../utils/aws.js';
|
|
16
|
+
import { NO_REGION_MESSAGE, credentialSource, resolveRegion, PIPELINE_STACK } from '../security/setup.js';
|
|
17
|
+
import { accountChangeWarning } from './connection.js';
|
|
18
|
+
import { SETUP_DOCS } from '../utils/sync-mode.js';
|
|
19
|
+
export const TEAM_INFO_NOTICE = 'Read-only (team info): one describe-stacks call and an identity check; nothing in AWS is changed.';
|
|
20
|
+
export const ADD_DEVELOPER_NOTICE = 'AWS write (team add-developer): creates one Cognito user after you confirm; nothing else in AWS is changed.';
|
|
21
|
+
export const INFO_PERMISSIONS = 'cloudformation:DescribeStacks';
|
|
22
|
+
export const ADD_PERMISSIONS = 'cloudformation:DescribeStacks (unless --user-pool-id) and cognito-idp:AdminCreateUser';
|
|
23
|
+
/**
|
|
24
|
+
* shortcut: a practical shape check, not RFC 5322; Cognito does its own validation on create.
|
|
25
|
+
* ',' and '=' are rejected too: they are separators in AWS CLI shorthand (attributes are also passed as JSON).
|
|
26
|
+
* A leading '-' is rejected so the value can never be read as an AWS CLI option.
|
|
27
|
+
*/
|
|
28
|
+
export const EMAIL_RE = /^(?!-)[^\s@<>"'`;|&$\\,=]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)+$/;
|
|
29
|
+
const POOL_RE = /^[\w-]+_[0-9a-zA-Z]+$/;
|
|
30
|
+
const ACCESS_DENIED = /AccessDenied|UnauthorizedOperation|NotAuthorized/;
|
|
31
|
+
const lastLine = (r) => r.errorCode || r.raw.split('\n').map((l) => l.trim()).filter(Boolean).pop() || 'unknown error';
|
|
32
|
+
/** Region, identity and the header lines. Returns null after printing the error. */
|
|
33
|
+
function resolveTarget(o, d, say) {
|
|
34
|
+
const r = resolveRegion(o, d);
|
|
35
|
+
if (!r) {
|
|
36
|
+
say(`Error: ${NO_REGION_MESSAGE} Or save one with prism-cli aws connect.`);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const target = { profile: o.profile, env: { AWS_PAGER: '', AWS_REGION: r.region, AWS_DEFAULT_REGION: r.region } };
|
|
40
|
+
const who = aws(['sts', 'get-caller-identity'], target);
|
|
41
|
+
const account = who.ok ? String(who.json?.Account || '') : '';
|
|
42
|
+
if (!account) {
|
|
43
|
+
say(`Error: cannot resolve the AWS identity: ${lastLine(who)}. Sign in (e.g. aws sso login), pass --profile, or run prism-cli aws connect.`);
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
say(`Account: ${account}`);
|
|
47
|
+
say(`Region: ${r.region} (${r.source})`);
|
|
48
|
+
say(`Credentials: ${credentialSource(o, d.env)}`);
|
|
49
|
+
const w = accountChangeWarning(o.connection, account);
|
|
50
|
+
if (w)
|
|
51
|
+
say(w);
|
|
52
|
+
say('');
|
|
53
|
+
return { target, account, region: r.region };
|
|
54
|
+
}
|
|
55
|
+
/** The metrics stack's OTEL outputs, or an error line. */
|
|
56
|
+
function readStack(t) {
|
|
57
|
+
const r = aws(['cloudformation', 'describe-stacks', '--stack-name', PIPELINE_STACK, '--region', t.region], t.target);
|
|
58
|
+
if (!r.ok) {
|
|
59
|
+
if (/does not exist/.test(r.raw))
|
|
60
|
+
return { error: `${PIPELINE_STACK} is not deployed in account ${t.account}, ${t.region}. Deploy it first (infra/: npx cdk deploy --all); see ${SETUP_DOCS.platformTeamGuide}` };
|
|
61
|
+
if (ACCESS_DENIED.test(r.errorCode || r.raw))
|
|
62
|
+
return { error: `access denied reading ${PIPELINE_STACK} (${lastLine(r)}). team info needs ${INFO_PERMISSIONS}.` };
|
|
63
|
+
return { error: `cannot read ${PIPELINE_STACK}: ${lastLine(r)}. team info needs ${INFO_PERMISSIONS}.` };
|
|
64
|
+
}
|
|
65
|
+
const outputs = r.json?.Stacks?.[0]?.Outputs || [];
|
|
66
|
+
const out = (k) => { const v = outputs.find((o) => o?.OutputKey === k)?.OutputValue; return typeof v === 'string' && v ? v : null; };
|
|
67
|
+
return { account: t.account, region: t.region, stack: PIPELINE_STACK, otelCollectorUrl: out('OtelCollectorUrl'), otelUserPoolId: out('OtelUserPoolId') };
|
|
68
|
+
}
|
|
69
|
+
export const developerCommand = (url) => `prism-cli enable codeburn --url ${url}`;
|
|
70
|
+
export function teamInfo(o, d) {
|
|
71
|
+
const say = o.json ? d.err : d.log;
|
|
72
|
+
say(TEAM_INFO_NOTICE);
|
|
73
|
+
say('');
|
|
74
|
+
const t = resolveTarget(o, d, say);
|
|
75
|
+
if (!t)
|
|
76
|
+
return 1;
|
|
77
|
+
const s = readStack(t);
|
|
78
|
+
if ('error' in s) {
|
|
79
|
+
say(`Error: ${s.error}`);
|
|
80
|
+
return 1;
|
|
81
|
+
}
|
|
82
|
+
if (!s.otelCollectorUrl && !s.otelUserPoolId) {
|
|
83
|
+
say(`Error: ${PIPELINE_STACK} has no OtelCollectorUrl or OtelUserPoolId output, so the OTEL collector is not deployed. Redeploy without -c skipOtelCollector=true.`);
|
|
84
|
+
return 1;
|
|
85
|
+
}
|
|
86
|
+
const cmd = s.otelCollectorUrl ? developerCommand(s.otelCollectorUrl) : null;
|
|
87
|
+
if (o.json) {
|
|
88
|
+
d.log(JSON.stringify({ ...s, developer_command: cmd }, null, 2));
|
|
89
|
+
return 0;
|
|
90
|
+
}
|
|
91
|
+
d.log(`Stack: ${s.stack}`);
|
|
92
|
+
d.log(`OtelCollectorUrl: ${s.otelCollectorUrl ?? '(no output)'}`);
|
|
93
|
+
d.log(`OtelUserPoolId: ${s.otelUserPoolId ?? '(no output; developer accounts cannot be created in this stack)'}`);
|
|
94
|
+
d.log('');
|
|
95
|
+
if (cmd) {
|
|
96
|
+
d.log('Send each developer this line:');
|
|
97
|
+
d.log(` ${cmd}`);
|
|
98
|
+
}
|
|
99
|
+
if (s.otelUserPoolId)
|
|
100
|
+
d.log('Add a developer: prism-cli team add-developer <email>');
|
|
101
|
+
return 0;
|
|
102
|
+
}
|
|
103
|
+
const yes = (a) => ['y', 'yes'].includes(a.trim().toLowerCase());
|
|
104
|
+
export async function addDeveloper(o, d) {
|
|
105
|
+
const email = (o.email || '').trim();
|
|
106
|
+
if (!email || email.length > 254 || !EMAIL_RE.test(email)) {
|
|
107
|
+
d.err(`Error: "${email}" is not a valid email address. The username is the developer's email (README step 2).`);
|
|
108
|
+
return 1;
|
|
109
|
+
}
|
|
110
|
+
if (o.userPoolId !== undefined && !POOL_RE.test(o.userPoolId)) {
|
|
111
|
+
d.err(`Error: "${o.userPoolId}" is not a Cognito user pool id (like us-west-2_AbC123).`);
|
|
112
|
+
return 1;
|
|
113
|
+
}
|
|
114
|
+
d.log(ADD_DEVELOPER_NOTICE);
|
|
115
|
+
d.log(`Needs: ${ADD_PERMISSIONS}.`);
|
|
116
|
+
d.log('');
|
|
117
|
+
const t = resolveTarget(o, d, d.log);
|
|
118
|
+
if (!t)
|
|
119
|
+
return 1;
|
|
120
|
+
let pool = o.userPoolId;
|
|
121
|
+
if (!pool) {
|
|
122
|
+
const s = readStack(t);
|
|
123
|
+
if ('error' in s) {
|
|
124
|
+
d.err(`Error: ${s.error}`);
|
|
125
|
+
return 1;
|
|
126
|
+
}
|
|
127
|
+
if (!s.otelUserPoolId) {
|
|
128
|
+
d.err(`Error: ${PIPELINE_STACK} has no OtelUserPoolId output. Pass --user-pool-id, or redeploy with the OTEL collector.`);
|
|
129
|
+
return 1;
|
|
130
|
+
}
|
|
131
|
+
pool = s.otelUserPoolId;
|
|
132
|
+
}
|
|
133
|
+
d.log('Plan: create one Cognito user');
|
|
134
|
+
d.log(` Account: ${t.account}`);
|
|
135
|
+
d.log(` Region: ${t.region}`);
|
|
136
|
+
d.log(` User pool: ${pool}`);
|
|
137
|
+
d.log(` Username: ${email} (email attribute too; Cognito emails the invite)`);
|
|
138
|
+
d.log('');
|
|
139
|
+
if (o.dryRun) {
|
|
140
|
+
d.log('Dry run: nothing was changed.');
|
|
141
|
+
return 0;
|
|
142
|
+
}
|
|
143
|
+
if (!o.yes) {
|
|
144
|
+
if (!d.isTTY) {
|
|
145
|
+
d.err('Error: no terminal to confirm. Re-run with --yes to create the user, or --dry-run to see the plan.');
|
|
146
|
+
return 1;
|
|
147
|
+
}
|
|
148
|
+
if (!yes(await d.ask('Create this user? [y/N] '))) {
|
|
149
|
+
d.err('Not created. Nothing was changed.');
|
|
150
|
+
return 1;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// No --temporary-password: Cognito generates one and emails it; it never passes through here.
|
|
154
|
+
const r = aws(['cognito-idp', 'admin-create-user', '--user-pool-id', pool, '--username', email,
|
|
155
|
+
'--user-attributes', JSON.stringify([{ Name: 'email', Value: email }]), '--desired-delivery-mediums', 'EMAIL', '--region', t.region], t.target);
|
|
156
|
+
if (r.ok) {
|
|
157
|
+
d.log(`✓ Created ${email} in ${pool}. Cognito emailed the invite with a temporary password.`);
|
|
158
|
+
return 0;
|
|
159
|
+
}
|
|
160
|
+
// Only the error code is shown: AWS error text can echo request values.
|
|
161
|
+
if (r.errorCode === 'UsernameExistsException') {
|
|
162
|
+
d.log(`✓ ${email} already exists in ${pool}; nothing changed.`);
|
|
163
|
+
return 0;
|
|
164
|
+
}
|
|
165
|
+
if (ACCESS_DENIED.test(r.errorCode || '')) {
|
|
166
|
+
d.err(`Error: access denied (${r.errorCode}). team add-developer needs ${ADD_PERMISSIONS}.`);
|
|
167
|
+
return 1;
|
|
168
|
+
}
|
|
169
|
+
d.err(`Error: AdminCreateUser failed (${r.errorCode || 'unknown error'}). Nothing was created.`);
|
|
170
|
+
return 1;
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=team.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.js","sourceRoot":"","sources":["../../../src/aws/team.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,GAAG,EAAkC,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAwB,MAAM,sBAAsB,CAAC;AAChI,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,MAAM,gBAAgB,GAAG,mGAAmG,CAAC;AACpI,MAAM,CAAC,MAAM,oBAAoB,GAAG,6GAA6G,CAAC;AAClJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG,uFAAuF,CAAC;AAEvH;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,6DAA6D,CAAC;AACtF,MAAM,OAAO,GAAG,uBAAuB,CAAC;AACxC,MAAM,aAAa,GAAG,kDAAkD,CAAC;AAuBzE,MAAM,QAAQ,GAAG,CAAC,C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AAE,CAAC,CAAC,EAAE,4BAA4B,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IAClJ,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC;QACT,CAAC,CAAC,GAAG,CAAC,aAAa,KAAK,OAAO,IAAI,yDAAyD,CAAC,CAAC;QAC9F,OAAO,CAAC,CAAC;IACX,CAAC;IACD,wEAAwE;IACxE,IAAI,CAAC,CAAC,SAAS,KAAK,yBAAyB,EAAE,CAAC;QAAC,CAAC,CAAC,GAAG,CAAC,KAAK,KAAK,sBAAsB,IAAI,oBAAoB,CAAC,CAAC;QAAC,OAAO,CAAC,CAAC;IAAC,CAAC;IAC7H,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,CAAC;QAAC,CAAC,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,SAAS,+BAA+B,eAAe,GAAG,CAAC,CAAC;QAAC,OAAO,CAAC,CAAC;IAAC,CAAC;IACtJ,CAAC,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC,SAAS,IAAI,eAAe,yBAAyB,CAAC,CAAC;IACjG,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { type RunResult } from '../../utils/exec.js';
|
|
1
|
+
import { run, type RunResult } from '../../utils/exec.js';
|
|
2
|
+
import { configuredSyncUrl } from '../../utils/otel-sync-schedule.js';
|
|
2
3
|
/** Exact install command, printed before it runs and in every hint. */
|
|
3
4
|
export declare const INSTALL_CMD: string;
|
|
4
5
|
export declare function getCodeburnPath(): string | null;
|
|
6
|
+
/** The service and timer unit files. The timer fires at the same hours as the cron entry (`0 *\/N * * *`). */
|
|
7
|
+
export declare function systemdUnits(codeburnPath: string, intervalHours: number, logFile: string): {
|
|
8
|
+
service: string;
|
|
9
|
+
timer: string;
|
|
10
|
+
};
|
|
11
|
+
/** Writes both units, then reloads and enables the timer. The crontab is never read or written here. */
|
|
12
|
+
export declare function systemdInstallSchedule(codeburnPath: string, intervalHours: number, home?: string, runFn?: typeof run): void;
|
|
13
|
+
export declare function systemdRemoveSchedule(home?: string, runFn?: typeof run): void;
|
|
5
14
|
export interface CodeburnDeps {
|
|
6
15
|
run: (file: string, args: string[]) => RunResult;
|
|
7
16
|
runInteractive: (file: string, args: string[]) => boolean;
|
|
@@ -15,10 +24,19 @@ export interface CodeburnDeps {
|
|
|
15
24
|
schedulerName: () => string;
|
|
16
25
|
installSchedule: (codeburnPath: string, intervalHours: number) => boolean;
|
|
17
26
|
removeSchedule: () => void;
|
|
27
|
+
/** Linux: the systemd user timer can be offered when the crontab cannot be read. */
|
|
28
|
+
linux: boolean;
|
|
29
|
+
systemd: {
|
|
30
|
+
available: () => boolean;
|
|
31
|
+
exists: () => boolean;
|
|
32
|
+
install: (codeburnPath: string, intervalHours: number) => void;
|
|
33
|
+
remove: () => void;
|
|
34
|
+
};
|
|
18
35
|
}
|
|
19
36
|
export declare function defaultDeps(): CodeburnDeps;
|
|
20
|
-
|
|
21
|
-
export declare
|
|
37
|
+
export declare const SCHEDULE_KINDS: readonly ["systemd", "cron"];
|
|
38
|
+
export declare const SYSTEMD_CMD = "prism-cli enable codeburn --schedule systemd";
|
|
39
|
+
export { configuredSyncUrl };
|
|
22
40
|
/** True when `version` (e.g. "0.9.24") is at least MIN_CODEBURN. */
|
|
23
41
|
export declare function codeburnVersionOk(version: string): boolean;
|
|
24
42
|
export interface CodeburnOptions {
|
|
@@ -28,6 +46,12 @@ export interface CodeburnOptions {
|
|
|
28
46
|
remove?: boolean;
|
|
29
47
|
yes?: boolean;
|
|
30
48
|
dryRun?: boolean;
|
|
49
|
+
/** Linux: systemd or cron. */
|
|
50
|
+
schedule?: string;
|
|
51
|
+
/** Sync mode local: usage stays on this machine. */
|
|
52
|
+
local?: boolean;
|
|
53
|
+
/** Sync mode admin: print the platform-team steps; no AWS calls. */
|
|
54
|
+
admin?: boolean;
|
|
31
55
|
}
|
|
32
56
|
/**
|
|
33
57
|
* The setup flow. Returns the exit code; every change is skipped on --dry-run,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeburn.d.ts","sourceRoot":"","sources":["../../../../src/commands/enable/codeburn.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"codeburn.d.ts","sourceRoot":"","sources":["../../../../src/commands/enable/codeburn.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,GAAG,EAAkB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAKmD,iBAAiB,EAC1E,MAAM,mCAAmC,CAAC;AAW3C,uEAAuE;AACvE,eAAO,MAAM,WAAW,QAA2C,CAAC;AAUpE,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAK/C;AAuDD,8GAA8G;AAC9G,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CA6B7H;AAED,wGAAwG;AACxG,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,SAAY,EAAE,KAAK,GAAE,OAAO,GAAS,GAAG,IAAI,CASnI;AAED,wBAAgB,qBAAqB,CAAC,IAAI,SAAY,EAAE,KAAK,GAAE,OAAO,GAAS,GAAG,IAAI,CAKrF;AA8ID,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,SAAS,CAAC;IACjD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC;IAC1D,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,CAA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