@rebasepro/cli 0.12.1-canary.g4e7bcbf → 0.12.1-canary.g52d71ee
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/commands/cloud/context.d.ts +25 -0
- package/dist/commands/cloud/projects.d.ts +32 -1
- package/dist/commands/telemetry.d.ts +9 -0
- package/dist/index.es.js +605 -29
- package/dist/index.es.js.map +1 -1
- package/dist/telemetry/consent.d.ts +38 -0
- package/dist/telemetry/identity.d.ts +69 -0
- package/dist/telemetry/index.d.ts +72 -0
- package/dist/telemetry/payload.d.ts +78 -0
- package/dist/telemetry/project.d.ts +34 -0
- package/package.json +7 -7
|
@@ -24,7 +24,32 @@ export declare function requireClient(rawArgs: string[]): Promise<{
|
|
|
24
24
|
client: CloudClient;
|
|
25
25
|
url: string;
|
|
26
26
|
}>;
|
|
27
|
+
/** One place a deploy can actually land, as the control plane describes it. */
|
|
28
|
+
export interface DeployTarget {
|
|
29
|
+
clusterId?: string | null;
|
|
30
|
+
provider: string;
|
|
31
|
+
region?: string;
|
|
32
|
+
label?: string;
|
|
33
|
+
baseDomain?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface PlatformConfig {
|
|
36
|
+
tenantBaseDomain?: string;
|
|
37
|
+
deployTargets?: DeployTarget[];
|
|
38
|
+
}
|
|
39
|
+
export declare function fetchPlatformConfig(client: CloudClient, url: string): Promise<PlatformConfig | undefined>;
|
|
40
|
+
/**
|
|
41
|
+
* The base domain tenant projects are served at, derived from the same
|
|
42
|
+
* TENANT_BASE_DOMAIN the ingress and the console read (see
|
|
43
|
+
* saas/backend/src/utils/tenant-domain.ts).
|
|
44
|
+
*/
|
|
27
45
|
export declare function fetchTenantBaseDomain(client: CloudClient, url: string): Promise<string | undefined>;
|
|
46
|
+
/**
|
|
47
|
+
* The infrastructure a deploy for this control plane would ACTUALLY use, in the
|
|
48
|
+
* resolver's own preference order (saas/backend/src/k8s/resolve.ts).
|
|
49
|
+
*
|
|
50
|
+
* @returns the targets, or `undefined` when the control plane cannot say.
|
|
51
|
+
*/
|
|
52
|
+
export declare function fetchDeployTargets(client: CloudClient, url: string): Promise<DeployTarget[] | undefined>;
|
|
28
53
|
/**
|
|
29
54
|
* Public host for a project — `<subdomain>.<base>`, or the bare subdomain when
|
|
30
55
|
* the base domain is unknown.
|
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
import { type CloudClient } from "./context";
|
|
1
|
+
import { type DeployTarget, type CloudClient } from "./context";
|
|
2
2
|
export declare function listProjects(rawArgs: string[]): Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* Where this project says it runs.
|
|
5
|
+
*
|
|
6
|
+
* `provider`/`region` are a *request*: no code downstream reads them to pick a
|
|
7
|
+
* deploy target — that comes from the project's cluster record or the ambient
|
|
8
|
+
* in-cluster context (saas/backend/src/k8s/resolve.ts). So a wrong value here is
|
|
9
|
+
* never contradicted by a failure; it just sits in the record. The CLI used to
|
|
10
|
+
* default to `hetzner`/`nbg1` unconditionally, which is how projects running on
|
|
11
|
+
* our GKE cluster came to describe themselves as Hetzner in the console — and
|
|
12
|
+
* `provider` is half the Stripe compute lookup key (`compute_<provider>_<vmSize>`),
|
|
13
|
+
* so that is a mispricing, not a cosmetic slip.
|
|
14
|
+
*
|
|
15
|
+
* The control plane already publishes the infrastructure that actually exists,
|
|
16
|
+
* and the console's create wizard reads it. Ask the same question here.
|
|
17
|
+
*
|
|
18
|
+
* Exported for tests: the decision is pure, so it can be pinned without a
|
|
19
|
+
* control plane. The fetching and the exit live in `resolveRequestedTarget`.
|
|
20
|
+
*
|
|
21
|
+
* @param requested `--provider`, if the caller named one. An explicit flag wins:
|
|
22
|
+
* it is the caller stating intent, and `deploy` corrects the record anyway.
|
|
23
|
+
* @param targets What the control plane says exists, or `undefined` when it
|
|
24
|
+
* cannot say — an older deployment with no `platform-config`, or a failed
|
|
25
|
+
* request. That is different from an empty list, which is a control plane
|
|
26
|
+
* stating it has no infrastructure at all.
|
|
27
|
+
* @returns the target to record, or `null` when the control plane answered that
|
|
28
|
+
* there is none.
|
|
29
|
+
*/
|
|
30
|
+
export declare function chooseRequestedTarget(requested: string | undefined, targets: DeployTarget[] | undefined): {
|
|
31
|
+
provider: string;
|
|
32
|
+
region?: string;
|
|
33
|
+
} | null;
|
|
3
34
|
export declare function createProject(rawArgs: string[]): Promise<void>;
|
|
4
35
|
export declare function projectInfo(rawArgs: string[], projectRef: string): Promise<void>;
|
|
5
36
|
export declare function deleteProject(rawArgs: string[], projectRef: string): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `rebase telemetry` — the command that makes the rest of it inspectable.
|
|
3
|
+
*
|
|
4
|
+
* The whole subsystem asks for trust it cannot otherwise earn, and the cheapest
|
|
5
|
+
* way to earn it is to stop describing the payload and print it. `show` runs
|
|
6
|
+
* the same builder the sender uses, so what appears here is what would go, not
|
|
7
|
+
* a documentation comment that quietly fell out of date two releases ago.
|
|
8
|
+
*/
|
|
9
|
+
export declare function telemetryCommand(rawArgs: string[]): Promise<void>;
|