@prudai/cli 0.1.1 → 0.1.2
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/README.md +31 -8
- package/dist/approvals.d.ts +2 -0
- package/dist/bin.js +2174 -1807
- package/dist/config.d.ts +2 -0
- package/dist/context.d.ts +5 -0
- package/dist/core.d.ts +3 -1
- package/dist/discovery.d.ts +3 -1
- package/dist/execute.d.ts +2 -0
- package/dist/index.js +543 -174
- package/dist/openapi.d.ts +2 -0
- package/dist/organization.d.ts +17 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export interface Profile extends Identity {
|
|
|
30
30
|
productApiUrls?: Record<string, string>;
|
|
31
31
|
registryUrl?: string;
|
|
32
32
|
specs?: Record<string, string>;
|
|
33
|
+
/** Product environment selection, independent of the Keycloak login organisation. */
|
|
34
|
+
orgs?: Record<string, string>;
|
|
33
35
|
/** Read-only leftovers of the removed personal-token login; ignored, reported by `auth status`, dropped at the next login. */
|
|
34
36
|
token?: string;
|
|
35
37
|
tokenApiUrl?: string;
|
package/dist/context.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { CatalogContext } from "./catalog";
|
|
|
3
3
|
import type { Environment, FileConfig, ResolvedConfig } from "./config";
|
|
4
4
|
import type { Emit } from "./output";
|
|
5
5
|
import type { Session } from "./session";
|
|
6
|
+
import type { OrganizationSelection } from "./organization";
|
|
6
7
|
export interface ProductPlugin {
|
|
7
8
|
product: string;
|
|
8
9
|
spec: unknown;
|
|
@@ -52,4 +53,8 @@ export interface RunContext {
|
|
|
52
53
|
reveal: () => void;
|
|
53
54
|
/** Keycloak login and the product tokens derived from it. */
|
|
54
55
|
session: Session;
|
|
56
|
+
/** Shared across derived command contexts so every result identifies its selected environment. */
|
|
57
|
+
selection: {
|
|
58
|
+
organization?: OrganizationSelection;
|
|
59
|
+
};
|
|
55
60
|
}
|
package/dist/core.d.ts
CHANGED
|
@@ -82,7 +82,9 @@ export interface Envelope {
|
|
|
82
82
|
}
|
|
83
83
|
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
84
84
|
export declare function parseEnvelope(body: unknown): Envelope;
|
|
85
|
-
export declare function renderEnvelope(body: Envelope
|
|
85
|
+
export declare function renderEnvelope(body: Envelope, options?: {
|
|
86
|
+
list?: boolean;
|
|
87
|
+
}): string;
|
|
86
88
|
export declare function approvalResult(body: unknown, env?: Environment): {
|
|
87
89
|
status: "approval_required";
|
|
88
90
|
approvalRequest: unknown;
|
package/dist/discovery.d.ts
CHANGED
|
@@ -46,6 +46,8 @@ export declare function opsCommand(words: string[], ctx: RunContext): Promise<Ex
|
|
|
46
46
|
export declare function compactSchema(schema: unknown, depth?: number): unknown;
|
|
47
47
|
/** A minimal valid-looking body: required fields only, from example/default/enum/const or a typed placeholder. */
|
|
48
48
|
export declare function exampleFrom(schema: unknown, name?: string, depth?: number): unknown;
|
|
49
|
+
/** Field-oriented human rendering; the JSON result retains the complete resolved schema. */
|
|
50
|
+
export declare function bodySchemaLines(schema: unknown, prefix?: string, depth?: number): string[];
|
|
49
51
|
export declare function describeCommand(command: GeneratedCommand, catalog: ProductCatalog): {
|
|
50
52
|
responses: {
|
|
51
53
|
status: string;
|
|
@@ -64,7 +66,7 @@ export declare function describeCommand(command: GeneratedCommand, catalog: Prod
|
|
|
64
66
|
} | undefined;
|
|
65
67
|
body?: {
|
|
66
68
|
required: boolean;
|
|
67
|
-
schema:
|
|
69
|
+
schema: {} | null;
|
|
68
70
|
example: unknown;
|
|
69
71
|
} | undefined;
|
|
70
72
|
dryRun: string;
|
package/dist/execute.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export declare function credentialFor(product: string, ctx: Pick<RunContext, "se
|
|
|
18
18
|
export declare function missingCredential(_product?: string): CliError;
|
|
19
19
|
export declare function readData(flags: Flags): Promise<unknown>;
|
|
20
20
|
export interface ExecuteExtras {
|
|
21
|
+
/** Platform account commands already bind the organisation into the path. */
|
|
22
|
+
organizationInPath?: boolean;
|
|
21
23
|
/** Body built by a convenience command (merged under --data). */
|
|
22
24
|
body?: Record<string, unknown>;
|
|
23
25
|
/** Extra flags the calling command consumed itself. */
|