primitive-admin 1.1.0-alpha.86 → 1.1.0-alpha.87
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/assets/skill/skills/primitive-platform/SKILL.md +29 -1
- package/dist/src/commands/analytics.js +4 -4
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/auth-sessions.d.ts +7 -0
- package/dist/src/commands/auth-sessions.js +144 -0
- package/dist/src/commands/auth-sessions.js.map +1 -0
- package/dist/src/commands/auth.js +47 -8
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/sync.d.ts +10 -0
- package/dist/src/commands/sync.js +26 -1
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +18 -0
- package/dist/src/lib/api-client.js +20 -1
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
- package/dist/src/lib/app-settings-descriptor.js +0 -1
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/env-resolver-core.js +10 -3
- package/dist/src/lib/env-resolver-core.js.map +1 -1
- package/dist/src/lib/function-document-types.d.ts +13 -2
- package/dist/src/lib/function-document-types.js +79 -30
- package/dist/src/lib/function-document-types.js.map +1 -1
- package/dist/src/lib/generated-config-surfaces.js +1 -18
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/logout-admin-session.d.ts +33 -0
- package/dist/src/lib/logout-admin-session.js +70 -0
- package/dist/src/lib/logout-admin-session.js.map +1 -0
- package/dist/src/lib/refresh-admin-credentials.d.ts +9 -1
- package/dist/src/lib/refresh-admin-credentials.js +22 -2
- package/dist/src/lib/refresh-admin-credentials.js.map +1 -1
- package/dist/src/lib/storage-pending-retry.d.ts +26 -0
- package/dist/src/lib/storage-pending-retry.js +42 -0
- package/dist/src/lib/storage-pending-retry.js.map +1 -0
- package/dist/src/lib/workflow-usage.d.ts +11 -13
- package/dist/src/lib/workflow-usage.js +12 -14
- package/dist/src/lib/workflow-usage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-sdk-types.js","sourceRoot":"","sources":["../../../src/lib/generated-sdk-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"generated-sdk-types.js","sourceRoot":"","sources":["../../../src/lib/generated-sdk-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,0u9GAA0u9G,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Revoke the stored admin session on the server — `primitive logout` (#3885).
|
|
3
|
+
*
|
|
4
|
+
* Logout used to delete the local credentials file and nothing else, so the
|
|
5
|
+
* refresh token it held stayed valid for its whole 30-day sliding life. Now the
|
|
6
|
+
* CLI posts that refresh token to `POST /admin/api/auth/logout`, which revokes
|
|
7
|
+
* its session, and clears the local file only once the server has answered.
|
|
8
|
+
*
|
|
9
|
+
* Like `refresh-admin-credentials.ts`, this module does the HTTP exchange and
|
|
10
|
+
* classifies the answer; it neither prints nor touches the credentials store.
|
|
11
|
+
* The caller decides:
|
|
12
|
+
*
|
|
13
|
+
* - `revoked`: the server ended the session (or had nothing to end) — clear.
|
|
14
|
+
* - `already-invalid`: 401, the stored token was refused outright — nothing
|
|
15
|
+
* is left to revoke, so clear.
|
|
16
|
+
* - a thrown `LogoutError`: the server could not be reached or did not
|
|
17
|
+
* answer usably — the session may still be live, so KEEP the credentials
|
|
18
|
+
* so a re-run can revoke it.
|
|
19
|
+
*/
|
|
20
|
+
import type { Credentials } from "../types/index.js";
|
|
21
|
+
export type LogoutOutcome = {
|
|
22
|
+
kind: "revoked";
|
|
23
|
+
revoked: string[];
|
|
24
|
+
} | {
|
|
25
|
+
kind: "already-invalid";
|
|
26
|
+
status: number;
|
|
27
|
+
};
|
|
28
|
+
export declare class LogoutError extends Error {
|
|
29
|
+
statusCode?: number;
|
|
30
|
+
cause?: unknown;
|
|
31
|
+
constructor(message: string, statusCode?: number, cause?: unknown);
|
|
32
|
+
}
|
|
33
|
+
export declare function logoutAdminSession(credentials: Credentials): Promise<LogoutOutcome>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Revoke the stored admin session on the server — `primitive logout` (#3885).
|
|
3
|
+
*
|
|
4
|
+
* Logout used to delete the local credentials file and nothing else, so the
|
|
5
|
+
* refresh token it held stayed valid for its whole 30-day sliding life. Now the
|
|
6
|
+
* CLI posts that refresh token to `POST /admin/api/auth/logout`, which revokes
|
|
7
|
+
* its session, and clears the local file only once the server has answered.
|
|
8
|
+
*
|
|
9
|
+
* Like `refresh-admin-credentials.ts`, this module does the HTTP exchange and
|
|
10
|
+
* classifies the answer; it neither prints nor touches the credentials store.
|
|
11
|
+
* The caller decides:
|
|
12
|
+
*
|
|
13
|
+
* - `revoked`: the server ended the session (or had nothing to end) — clear.
|
|
14
|
+
* - `already-invalid`: 401, the stored token was refused outright — nothing
|
|
15
|
+
* is left to revoke, so clear.
|
|
16
|
+
* - a thrown `LogoutError`: the server could not be reached or did not
|
|
17
|
+
* answer usably — the session may still be live, so KEEP the credentials
|
|
18
|
+
* so a re-run can revoke it.
|
|
19
|
+
*/
|
|
20
|
+
import { fetchWithTLS } from "./fetch.js";
|
|
21
|
+
export class LogoutError extends Error {
|
|
22
|
+
statusCode;
|
|
23
|
+
cause;
|
|
24
|
+
constructor(message, statusCode, cause) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.statusCode = statusCode;
|
|
27
|
+
this.cause = cause;
|
|
28
|
+
this.name = "LogoutError";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export async function logoutAdminSession(credentials) {
|
|
32
|
+
const url = `${credentials.serverUrl}/admin/api/auth/logout`;
|
|
33
|
+
const headers = {
|
|
34
|
+
"Content-Type": "application/json",
|
|
35
|
+
};
|
|
36
|
+
if (credentials.globalAdminAppId) {
|
|
37
|
+
headers["X-Global-Admin-App-Id"] = credentials.globalAdminAppId;
|
|
38
|
+
}
|
|
39
|
+
let response;
|
|
40
|
+
try {
|
|
41
|
+
response = await fetchWithTLS(url, {
|
|
42
|
+
method: "POST",
|
|
43
|
+
headers,
|
|
44
|
+
body: JSON.stringify(credentials.refreshToken ? { refreshToken: credentials.refreshToken } : {}),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
catch (cause) {
|
|
48
|
+
const reason = cause instanceof Error && cause.message ? cause.message : String(cause);
|
|
49
|
+
throw new LogoutError(`Could not reach ${credentials.serverUrl}: ${reason}.`, undefined, cause);
|
|
50
|
+
}
|
|
51
|
+
if (response.status === 401) {
|
|
52
|
+
return { kind: "already-invalid", status: 401 };
|
|
53
|
+
}
|
|
54
|
+
if (!response.ok) {
|
|
55
|
+
throw new LogoutError(`${credentials.serverUrl} answered ${response.status}.`, response.status);
|
|
56
|
+
}
|
|
57
|
+
let revoked = [];
|
|
58
|
+
try {
|
|
59
|
+
const body = (await response.json());
|
|
60
|
+
if (Array.isArray(body?.revoked)) {
|
|
61
|
+
revoked = body.revoked.filter((id) => typeof id === "string");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// A server before #3885 answers `{ success: true }` or nothing usable:
|
|
66
|
+
// it revoked nothing, and there is nothing more to do.
|
|
67
|
+
}
|
|
68
|
+
return { kind: "revoked", revoked };
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=logout-admin-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout-admin-session.js","sourceRoot":"","sources":["../../../src/lib/logout-admin-session.ts"],"names":[],"mappings":"AAAA;;;;;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,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAC5B,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,WAAW,CACnB,GAAG,WAAW,CAAC,SAAS,aAAa,QAAQ,CAAC,MAAM,GAAG,EACvD,QAAQ,CAAC,MAAM,CAChB,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,GAAa,EAAE,CAAC;IAC3B,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAQ,CAAC;QAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;YACjC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAW,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,uEAAuE;QACvE,uDAAuD;IACzD,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -45,8 +45,16 @@ export declare class RefreshError extends Error {
|
|
|
45
45
|
kind: RefreshFailureKind;
|
|
46
46
|
statusCode?: number;
|
|
47
47
|
cause?: unknown;
|
|
48
|
-
|
|
48
|
+
/** The server's machine-readable `code`, when it sent one. */
|
|
49
|
+
code?: string;
|
|
50
|
+
constructor(message: string, kind: RefreshFailureKind, statusCode?: number, cause?: unknown,
|
|
51
|
+
/** The server's machine-readable `code`, when it sent one. */
|
|
52
|
+
code?: string);
|
|
49
53
|
}
|
|
54
|
+
/** The refresh token's session was revoked (logout or `auth sessions revoke`). */
|
|
55
|
+
export declare const SESSION_REVOKED_MESSAGE = "This session was revoked. Run 'primitive login'.";
|
|
56
|
+
/** Any other refused refresh. */
|
|
57
|
+
export declare const REFRESH_EXPIRED_MESSAGE = "Refresh token expired. Run 'primitive login'.";
|
|
50
58
|
/**
|
|
51
59
|
* Exchange the stored refresh token for a fresh `accessToken`. Returns a new
|
|
52
60
|
* `Credentials` object — the caller is responsible for persistence via
|
|
@@ -37,14 +37,22 @@ export class RefreshError extends Error {
|
|
|
37
37
|
kind;
|
|
38
38
|
statusCode;
|
|
39
39
|
cause;
|
|
40
|
-
|
|
40
|
+
code;
|
|
41
|
+
constructor(message, kind, statusCode, cause,
|
|
42
|
+
/** The server's machine-readable `code`, when it sent one. */
|
|
43
|
+
code) {
|
|
41
44
|
super(message);
|
|
42
45
|
this.kind = kind;
|
|
43
46
|
this.statusCode = statusCode;
|
|
44
47
|
this.cause = cause;
|
|
48
|
+
this.code = code;
|
|
45
49
|
this.name = "RefreshError";
|
|
46
50
|
}
|
|
47
51
|
}
|
|
52
|
+
/** The refresh token's session was revoked (logout or `auth sessions revoke`). */
|
|
53
|
+
export const SESSION_REVOKED_MESSAGE = "This session was revoked. Run 'primitive login'.";
|
|
54
|
+
/** Any other refused refresh. */
|
|
55
|
+
export const REFRESH_EXPIRED_MESSAGE = "Refresh token expired. Run 'primitive login'.";
|
|
48
56
|
/**
|
|
49
57
|
* Exchange the stored refresh token for a fresh `accessToken`. Returns a new
|
|
50
58
|
* `Credentials` object — the caller is responsible for persistence via
|
|
@@ -86,7 +94,19 @@ export async function refreshAdminCredentials(credentials) {
|
|
|
86
94
|
throw new RefreshError(`Network error refreshing token: ${reason}.`, "network", undefined, cause);
|
|
87
95
|
}
|
|
88
96
|
if (!response.ok) {
|
|
89
|
-
|
|
97
|
+
// #3885: a refresh of a revoked session answers 401 with code
|
|
98
|
+
// SESSION_REVOKED; say so, rather than calling the token expired.
|
|
99
|
+
let code;
|
|
100
|
+
try {
|
|
101
|
+
const body = (await response.json());
|
|
102
|
+
code = typeof body?.code === "string" ? body.code : undefined;
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
// Not JSON: no code to report.
|
|
106
|
+
}
|
|
107
|
+
throw new RefreshError(code === "SESSION_REVOKED"
|
|
108
|
+
? SESSION_REVOKED_MESSAGE
|
|
109
|
+
: REFRESH_EXPIRED_MESSAGE, "unauthorized", response.status, undefined, code);
|
|
90
110
|
}
|
|
91
111
|
const data = (await response.json());
|
|
92
112
|
const accessToken = data?.accessToken || data?.jwt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-admin-credentials.js","sourceRoot":"","sources":["../../../src/lib/refresh-admin-credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAe1C,MAAM,OAAO,YAAa,SAAQ,KAAK;IAG5B;IACA;IACA;
|
|
1
|
+
{"version":3,"file":"refresh-admin-credentials.js","sourceRoot":"","sources":["../../../src/lib/refresh-admin-credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAe1C,MAAM,OAAO,YAAa,SAAQ,KAAK;IAG5B;IACA;IACA;IAEA;IANT,YACE,OAAe,EACR,IAAwB,EACxB,UAAmB,EACnB,KAAe;IACtB,8DAA8D;IACvD,IAAa;QAEpB,KAAK,CAAC,OAAO,CAAC,CAAC;QANR,SAAI,GAAJ,IAAI,CAAoB;QACxB,eAAU,GAAV,UAAU,CAAS;QACnB,UAAK,GAAL,KAAK,CAAU;QAEf,SAAI,GAAJ,IAAI,CAAS;QAGpB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,kFAAkF;AAClF,MAAM,CAAC,MAAM,uBAAuB,GAClC,kDAAkD,CAAC;AAErD,iCAAiC;AACjC,MAAM,CAAC,MAAM,uBAAuB,GAClC,+CAA+C,CAAC;AAElD;;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CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAChE,CAAC;QAAC,MAAM,CAAC;YACP,+BAA+B;QACjC,CAAC;QACD,MAAM,IAAI,YAAY,CACpB,IAAI,KAAK,iBAAiB;YACxB,CAAC,CAAC,uBAAuB;YACzB,CAAC,CAAC,uBAAuB,EAC3B,cAAc,EACd,QAAQ,CAAC,MAAM,EACf,SAAS,EACT,IAAI,CACL,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAQ,CAAC;IAC5C,MAAM,WAAW,GAAuB,IAAI,EAAE,WAAW,IAAI,IAAI,EAAE,GAAG,CAAC;IACvE,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,YAAY,CACpB,0EAA0E,EAC1E,cAAc,EACd,QAAQ,CAAC,MAAM,CAChB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,GAAG,WAAW;QACd,WAAW;QACX,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,WAAW,CAAC,YAAY;QAC3D,SAAS,EACP,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;KACrE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #3835 — ask again when the server could not confirm its OWN write.
|
|
3
|
+
*
|
|
4
|
+
* A create whose row dynamo-bao wrote but could not read back, and whose
|
|
5
|
+
* consistent confirm read could not vouch for it either, is answered
|
|
6
|
+
* `503 STORAGE_CONSISTENCY_PENDING` (`src/services/readback-confirm.ts`): the
|
|
7
|
+
* write may well have landed, and nothing about the request was wrong. A push
|
|
8
|
+
* that records that as "could not be applied" exits 1 over a change that is
|
|
9
|
+
* very likely on the server already.
|
|
10
|
+
*
|
|
11
|
+
* Only that typed code is retried — a client that retries on it must not also
|
|
12
|
+
* retry on everything else a 503 covers — and only a bounded number of times,
|
|
13
|
+
* after which the transient itself is what the caller reports.
|
|
14
|
+
*/
|
|
15
|
+
/** The code the server's read-back transient carries. */
|
|
16
|
+
export declare const STORAGE_CONSISTENCY_PENDING = "STORAGE_CONSISTENCY_PENDING";
|
|
17
|
+
export declare function isStorageConsistencyPending(err: unknown): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Run `fn`, and run it again while it fails with the storage-consistency
|
|
20
|
+
* transient. Any other failure — including the 409 a retried create meets when
|
|
21
|
+
* its first attempt's row holds the key — is thrown to the caller unchanged.
|
|
22
|
+
*/
|
|
23
|
+
export declare function retryOnStoragePending<T>(fn: () => Promise<T>, opts?: {
|
|
24
|
+
attempts?: number;
|
|
25
|
+
sleep?: (ms: number) => Promise<void>;
|
|
26
|
+
}): Promise<T>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #3835 — ask again when the server could not confirm its OWN write.
|
|
3
|
+
*
|
|
4
|
+
* A create whose row dynamo-bao wrote but could not read back, and whose
|
|
5
|
+
* consistent confirm read could not vouch for it either, is answered
|
|
6
|
+
* `503 STORAGE_CONSISTENCY_PENDING` (`src/services/readback-confirm.ts`): the
|
|
7
|
+
* write may well have landed, and nothing about the request was wrong. A push
|
|
8
|
+
* that records that as "could not be applied" exits 1 over a change that is
|
|
9
|
+
* very likely on the server already.
|
|
10
|
+
*
|
|
11
|
+
* Only that typed code is retried — a client that retries on it must not also
|
|
12
|
+
* retry on everything else a 503 covers — and only a bounded number of times,
|
|
13
|
+
* after which the transient itself is what the caller reports.
|
|
14
|
+
*/
|
|
15
|
+
import { ApiError } from "./api-client.js";
|
|
16
|
+
/** The code the server's read-back transient carries. */
|
|
17
|
+
export const STORAGE_CONSISTENCY_PENDING = "STORAGE_CONSISTENCY_PENDING";
|
|
18
|
+
const DEFAULT_ATTEMPTS = 3;
|
|
19
|
+
const BASE_DELAY_MS = 250;
|
|
20
|
+
export function isStorageConsistencyPending(err) {
|
|
21
|
+
return err instanceof ApiError && err.code === STORAGE_CONSISTENCY_PENDING;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Run `fn`, and run it again while it fails with the storage-consistency
|
|
25
|
+
* transient. Any other failure — including the 409 a retried create meets when
|
|
26
|
+
* its first attempt's row holds the key — is thrown to the caller unchanged.
|
|
27
|
+
*/
|
|
28
|
+
export async function retryOnStoragePending(fn, opts = {}) {
|
|
29
|
+
const attempts = Math.max(1, opts.attempts ?? DEFAULT_ATTEMPTS);
|
|
30
|
+
const sleep = opts.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
31
|
+
for (let attempt = 1;; attempt++) {
|
|
32
|
+
try {
|
|
33
|
+
return await fn();
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
if (attempt >= attempts || !isStorageConsistencyPending(err))
|
|
37
|
+
throw err;
|
|
38
|
+
await sleep(BASE_DELAY_MS * 2 ** (attempt - 1));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=storage-pending-retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-pending-retry.js","sourceRoot":"","sources":["../../../src/lib/storage-pending-retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,yDAAyD;AACzD,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,MAAM,UAAU,2BAA2B,CAAC,GAAY;IACtD,OAAO,GAAG,YAAY,QAAQ,IAAI,GAAG,CAAC,IAAI,KAAK,2BAA2B,CAAC;AAC7E,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,EAAoB,EACpB,OAAqE,EAAE;IAEvE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,IAAI,gBAAgB,CAAC,CAAC;IAChE,MAAM,KAAK,GACT,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAO,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9E,KAAK,IAAI,OAAO,GAAG,CAAC,GAAI,OAAO,EAAE,EAAE,CAAC;QAClC,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,OAAO,IAAI,QAAQ,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC;gBAAE,MAAM,GAAG,CAAC;YACxE,MAAM,KAAK,CAAC,aAAa,GAAG,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -20,10 +20,10 @@ export declare const ALL_APPS_CONFLICT_ERROR: string;
|
|
|
20
20
|
/**
|
|
21
21
|
* The role gate's refusal.
|
|
22
22
|
*
|
|
23
|
-
* `GET /admin/api/apps`
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* `GET /admin/api/apps` is super-admin only (#3882), so the server refuses
|
|
24
|
+
* anyone else the list this command walks. The client checks the same role
|
|
25
|
+
* first so the refusal is this message, before any request, rather than a
|
|
26
|
+
* server 403 mid-command (D3130-002).
|
|
27
27
|
*/
|
|
28
28
|
export declare const ALL_APPS_SUPER_ADMIN_ERROR = "--all-apps is super-admin only. Run it without --all-apps for one app's report.";
|
|
29
29
|
export interface UsageWorkflowRef {
|
|
@@ -115,16 +115,14 @@ export type WindowDaysFlag = {
|
|
|
115
115
|
*/
|
|
116
116
|
export declare function parseWindowDaysFlag(raw: string | undefined): WindowDaysFlag;
|
|
117
117
|
/**
|
|
118
|
-
* The
|
|
118
|
+
* The strict `super-admin` rule the server's `GET /admin/api/apps` gate
|
|
119
|
+
* applies (`requireSuperAdmin` in `admin-api.ts`, #3882).
|
|
119
120
|
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* server hands that account anyway — a false refusal, not a boundary. The gate
|
|
126
|
-
* exists to make the APP-ADMIN refusal deterministic (D3130-002); enforcement
|
|
127
|
-
* stays where it is.
|
|
121
|
+
* D3130-002 accepted the legacy `superadmin` spelling too, because the server
|
|
122
|
+
* then served that account everything `--all-apps` reads. Since #3882 the
|
|
123
|
+
* server refuses that account the global app list, so a lenient check here
|
|
124
|
+
* would only defer the same refusal to a server 403. The client refuses first,
|
|
125
|
+
* with `ALL_APPS_SUPER_ADMIN_ERROR`; enforcement stays server-side.
|
|
128
126
|
*/
|
|
129
127
|
export declare function isSuperAdminRole(role: string | null | undefined): boolean;
|
|
130
128
|
/**
|
|
@@ -33,10 +33,10 @@ export const ALL_APPS_CONFLICT_ERROR = "--all-apps merges every app, so it canno
|
|
|
33
33
|
/**
|
|
34
34
|
* The role gate's refusal.
|
|
35
35
|
*
|
|
36
|
-
* `GET /admin/api/apps`
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
36
|
+
* `GET /admin/api/apps` is super-admin only (#3882), so the server refuses
|
|
37
|
+
* anyone else the list this command walks. The client checks the same role
|
|
38
|
+
* first so the refusal is this message, before any request, rather than a
|
|
39
|
+
* server 403 mid-command (D3130-002).
|
|
40
40
|
*/
|
|
41
41
|
export const ALL_APPS_SUPER_ADMIN_ERROR = "--all-apps is super-admin only. Run it without --all-apps for one app's report.";
|
|
42
42
|
/**
|
|
@@ -62,19 +62,17 @@ export function parseWindowDaysFlag(raw) {
|
|
|
62
62
|
}
|
|
63
63
|
// ── The walk ─────────────────────────────────────────────────────────
|
|
64
64
|
/**
|
|
65
|
-
* The
|
|
65
|
+
* The strict `super-admin` rule the server's `GET /admin/api/apps` gate
|
|
66
|
+
* applies (`requireSuperAdmin` in `admin-api.ts`, #3882).
|
|
66
67
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* server hands that account anyway — a false refusal, not a boundary. The gate
|
|
73
|
-
* exists to make the APP-ADMIN refusal deterministic (D3130-002); enforcement
|
|
74
|
-
* stays where it is.
|
|
68
|
+
* D3130-002 accepted the legacy `superadmin` spelling too, because the server
|
|
69
|
+
* then served that account everything `--all-apps` reads. Since #3882 the
|
|
70
|
+
* server refuses that account the global app list, so a lenient check here
|
|
71
|
+
* would only defer the same refusal to a server 403. The client refuses first,
|
|
72
|
+
* with `ALL_APPS_SUPER_ADMIN_ERROR`; enforcement stays server-side.
|
|
75
73
|
*/
|
|
76
74
|
export function isSuperAdminRole(role) {
|
|
77
|
-
return role === "super-admin"
|
|
75
|
+
return role === "super-admin";
|
|
78
76
|
}
|
|
79
77
|
/**
|
|
80
78
|
* How many times `--all-apps` drains the global apps list before merging.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-usage.js","sourceRoot":"","sources":["../../../src/lib/workflow-usage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,wEAAwE;AACxE,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,0EAA0E;AAC1E,wEAAwE;AACxE,2DAA2D;AAE3D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAC5C,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAEhD,0EAA0E;AAC1E,MAAM,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AClF,MAAM,UAAU,uBAAuB,CACrC,MAAyB;IAEzB,OAAO;QACL;YACE,IAAI,EACF,QAAQ,MAAM,CAAC,IAAI,IAAI;gBACvB,aAAa,MAAM,CAAC,aAAa,IAAI;gBACrC,kBAAkB,MAAM,CAAC,YAAY,IAAI;gBACzC,UAAU,MAAM,CAAC,UAAU,OAAO;SACrC;QACD;YACE,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,KAAc,EAAE;gBACvC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE;gBAC/B,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE;gBACzD,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;gBAC/C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;aAChD,CAAC;SACH;QACD,SAAS,CAAC,yBAAyB,EAAE,MAAM,CAAC,YAAY,CAAC;QACzD,SAAS,CAAC,oCAAoC,EAAE,MAAM,CAAC,aAAa,CAAC;QACrE,SAAS,CAAC,4CAA4C,EAAE,MAAM,CAAC,SAAS,CAAC;QACzE,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC;KAC1B,CAAC;AACJ,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,aAAa,CAAC,MAA6B;IACzD,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primitive-admin",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.87",
|
|
4
4
|
"description": "CLI for administering Primitive applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"commander": "^12.1.0",
|
|
61
61
|
"esbuild": "0.25.12",
|
|
62
62
|
"inquirer": "^9.2.12",
|
|
63
|
-
"js-bao": "0.7.0-alpha.
|
|
63
|
+
"js-bao": "0.7.0-alpha.10",
|
|
64
64
|
"mime-types": "^2.1.35",
|
|
65
65
|
"open": "^10.0.3",
|
|
66
66
|
"smol-toml": "1.7.0",
|