@rebasepro/cli 0.28.1 → 0.28.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.
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type CloudClient } from "./context.js";
|
|
2
|
+
/** The control-plane function that holds linked instances. */
|
|
3
|
+
export declare const LINKED_INSTANCES_FUNCTION = "linked-instances";
|
|
4
|
+
/** Where the hosted connector lives, for the line that says what to do next. */
|
|
5
|
+
export declare const CONNECTOR_URL = "https://app.rebase.pro/mcp";
|
|
6
|
+
/** The two variables the instance reads to accept the connector's tokens. */
|
|
7
|
+
export declare const PLATFORM_TOKEN_KEY_ENV = "REBASE_PLATFORM_TOKEN_KEY";
|
|
8
|
+
export declare const PLATFORM_TOKEN_AUDIENCE_ENV = "REBASE_PLATFORM_TOKEN_AUDIENCE";
|
|
9
|
+
/** How often, and for how long, the command asks whether the instance accepts the connector. */
|
|
10
|
+
export declare const CHECK_INTERVAL_MS = 5000;
|
|
11
|
+
export declare const CHECK_TIMEOUT_MS: number;
|
|
12
|
+
/** The flags `cloud connect` parses — the help page lists exactly these. */
|
|
13
|
+
export declare const CONNECT_FLAGS: {
|
|
14
|
+
"--name": StringConstructor;
|
|
15
|
+
"--org": StringConstructor;
|
|
16
|
+
"--list": BooleanConstructor;
|
|
17
|
+
"--remove": StringConstructor;
|
|
18
|
+
"--no-wait": BooleanConstructor;
|
|
19
|
+
};
|
|
20
|
+
/** One linked instance, as the control plane answers it. */
|
|
21
|
+
export interface LinkedInstance {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
url: string;
|
|
25
|
+
/** An organization id, or the organization itself. */
|
|
26
|
+
organization?: unknown;
|
|
27
|
+
/** When the instance first accepted the connector, or null while it has not. */
|
|
28
|
+
verifiedAt: string | null;
|
|
29
|
+
createdAt?: string;
|
|
30
|
+
}
|
|
31
|
+
/** What `POST /linked-instances` answers. */
|
|
32
|
+
export interface LinkInstanceResponse {
|
|
33
|
+
instance: LinkedInstance;
|
|
34
|
+
env: Record<string, string>;
|
|
35
|
+
created: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Why the instance does not accept the connector yet. */
|
|
38
|
+
export type CheckFailureReason = "unreachable" | "not_configured" | "rejected";
|
|
39
|
+
/** What `POST /linked-instances/:id/check` answers. */
|
|
40
|
+
export type CheckResult = {
|
|
41
|
+
ok: true;
|
|
42
|
+
instance: LinkedInstance;
|
|
43
|
+
} | {
|
|
44
|
+
ok: false;
|
|
45
|
+
reason: CheckFailureReason | string;
|
|
46
|
+
message?: string;
|
|
47
|
+
};
|
|
48
|
+
/** The organizations an `organization_required` refusal lists. */
|
|
49
|
+
export declare function organizationsIn(details: unknown): Array<{
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* The origin of what the person typed: `your-app.com` → `https://your-app.com`,
|
|
55
|
+
* `https://your-app.com/admin?x=1` → `https://your-app.com`. Null when it is
|
|
56
|
+
* not an http(s) address at all.
|
|
57
|
+
*/
|
|
58
|
+
export declare function normalizeInstanceUrl(input: string): string | null;
|
|
59
|
+
/** Ask the control plane whether the instance accepts the connector now. */
|
|
60
|
+
export declare function checkInstance(client: CloudClient, id: string): Promise<CheckResult>;
|
|
61
|
+
/** What a failed check means, for the waiting line. */
|
|
62
|
+
export declare function describeCheckFailure(result: {
|
|
63
|
+
reason: string;
|
|
64
|
+
message?: string;
|
|
65
|
+
}): string;
|
|
66
|
+
/**
|
|
67
|
+
* Check every `intervalMs` until the instance accepts the connector or
|
|
68
|
+
* `timeoutMs` passes. `onWaiting` hears each refusal, so the caller can keep
|
|
69
|
+
* one status line current.
|
|
70
|
+
*/
|
|
71
|
+
export declare function waitForInstance(client: CloudClient, id: string, opts?: {
|
|
72
|
+
intervalMs?: number;
|
|
73
|
+
timeoutMs?: number;
|
|
74
|
+
sleep?: (ms: number) => Promise<void>;
|
|
75
|
+
now?: () => number;
|
|
76
|
+
onWaiting?: (result: {
|
|
77
|
+
reason: string;
|
|
78
|
+
message?: string;
|
|
79
|
+
}) => void;
|
|
80
|
+
}): Promise<CheckResult>;
|
|
81
|
+
export declare function connectCommand(rawArgs: string[]): Promise<void>;
|
|
@@ -69,6 +69,7 @@ export declare const CLOUD_VALUE_FLAGS: {
|
|
|
69
69
|
readonly "--pull-key-file": StringConstructor;
|
|
70
70
|
readonly "--push-service-account": StringConstructor;
|
|
71
71
|
readonly "--region": StringConstructor;
|
|
72
|
+
readonly "--remove": StringConstructor;
|
|
72
73
|
readonly "--replicas": StringConstructor;
|
|
73
74
|
readonly "--repo": StringConstructor;
|
|
74
75
|
readonly "--repository": StringConstructor;
|
package/dist/index.es.js
CHANGED
|
@@ -126,7 +126,7 @@ async function commandVocabulary(command) {
|
|
|
126
126
|
aliases: {}
|
|
127
127
|
};
|
|
128
128
|
case "cloud": {
|
|
129
|
-
const cloud = await import("./cloud-
|
|
129
|
+
const cloud = await import("./cloud-CXyZobBh.js");
|
|
130
130
|
return {
|
|
131
131
|
subcommands: cloud.CLOUD_GROUP_NAMES,
|
|
132
132
|
aliases: cloud.GROUP_ALIASES
|
|
@@ -386,7 +386,7 @@ async function dispatch(command, effectiveSubcommand, args, parsedArgs, namespac
|
|
|
386
386
|
break;
|
|
387
387
|
}
|
|
388
388
|
case "cloud": {
|
|
389
|
-
const { cloudCommand } = await import("./cloud-
|
|
389
|
+
const { cloudCommand } = await import("./cloud-CXyZobBh.js");
|
|
390
390
|
await cloudCommand(effectiveSubcommand, args);
|
|
391
391
|
break;
|
|
392
392
|
}
|
|
@@ -395,7 +395,7 @@ async function dispatch(command, effectiveSubcommand, args, parsedArgs, namespac
|
|
|
395
395
|
await telemetryCommand(args);
|
|
396
396
|
break;
|
|
397
397
|
}
|
|
398
|
-
default: unknownCommand(command, namespacedCommands, "", { cloud: (await import("./cloud-
|
|
398
|
+
default: unknownCommand(command, namespacedCommands, "", { cloud: (await import("./cloud-CXyZobBh.js")).CLOUD_GROUP_NAMES });
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
/** The global help. Exported so its Options block can be held against {@link ROOT_FLAGS}. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/cli",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "Developer tools for Rebase projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"inquirer": "14.0.2",
|
|
45
45
|
"jiti": "^2.7.0",
|
|
46
46
|
"pg": "^8.22.0",
|
|
47
|
-
"@rebasepro/agent-skills": "0.28.
|
|
48
|
-
"@rebasepro/client": "0.28.
|
|
49
|
-
"@rebasepro/rls-check": "0.28.
|
|
50
|
-
"@rebasepro/codegen": "0.28.
|
|
51
|
-
"@rebasepro/server": "0.28.
|
|
52
|
-
"@rebasepro/
|
|
53
|
-
"@rebasepro/
|
|
47
|
+
"@rebasepro/agent-skills": "0.28.2",
|
|
48
|
+
"@rebasepro/client": "0.28.2",
|
|
49
|
+
"@rebasepro/rls-check": "0.28.2",
|
|
50
|
+
"@rebasepro/codegen": "0.28.2",
|
|
51
|
+
"@rebasepro/server": "0.28.2",
|
|
52
|
+
"@rebasepro/types": "0.28.2",
|
|
53
|
+
"@rebasepro/server-postgres": "0.28.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "^26.1.2",
|