@rebasepro/cli 0.13.0 → 0.13.1-canary.g18cfeb7
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/auth.d.ts +31 -0
- package/dist/commands/cloud/databases.d.ts +1 -0
- package/dist/commands/cloud/debug.d.ts +1 -0
- package/dist/commands/cloud/domains.d.ts +1 -0
- package/dist/commands/cloud/env.d.ts +1 -0
- package/dist/commands/cloud/extensions.d.ts +1 -0
- package/dist/commands/cloud/orgs.d.ts +1 -0
- package/dist/commands/cloud/resources.d.ts +1 -0
- package/dist/commands/cloud/settings.d.ts +1 -0
- package/dist/commands/dev.d.ts +0 -7
- package/dist/commands/init.d.ts +22 -0
- package/dist/index.es.js +367 -76
- package/dist/index.es.js.map +1 -1
- package/dist/telemetry/payload.d.ts +1 -1
- package/dist/utils/collection-drift.d.ts +27 -0
- package/dist/utils/project.d.ts +20 -0
- package/package.json +7 -7
- package/templates/eject/docker-compose.custom.yml +4 -4
- package/templates/template/.env.example +2 -2
- package/templates/template/config/package.json +1 -0
- package/templates/template/docker-compose.yml +4 -4
package/dist/commands/auth.d.ts
CHANGED
|
@@ -1 +1,32 @@
|
|
|
1
|
+
/** A user as the admin API returns it, reduced to what this command needs. */
|
|
2
|
+
export interface ResolvedUser {
|
|
3
|
+
id: string;
|
|
4
|
+
email: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Pick the user with exactly this email out of a search response.
|
|
8
|
+
*
|
|
9
|
+
* `/api/admin/users?search=` is an `ILIKE '%…%'` over email **or display
|
|
10
|
+
* name**, ordered by role count descending. This used to take row `[0]` and
|
|
11
|
+
* reset it, then print the email it had been *given* as confirmation — so two
|
|
12
|
+
* ordinary situations ended in a successful-looking reset of somebody else's
|
|
13
|
+
* account:
|
|
14
|
+
*
|
|
15
|
+
* - a substring collision: `bob@example.com` also matches
|
|
16
|
+
* `robert.bob@example.com`;
|
|
17
|
+
* - a display name, which is user-controlled and accepted up to 255
|
|
18
|
+
* characters with no constraint on its content, containing an address
|
|
19
|
+
* belonging to someone else.
|
|
20
|
+
*
|
|
21
|
+
* The ordering makes it worse rather than better — `array_length(roles) DESC
|
|
22
|
+
* NULLS LAST` puts the most privileged match first, so the account most likely
|
|
23
|
+
* to be reset by mistake is an admin's.
|
|
24
|
+
*
|
|
25
|
+
* Returns `undefined` when nothing matched exactly, which the caller reports
|
|
26
|
+
* rather than falling through to a guess. The direct-database fallback below
|
|
27
|
+
* has always matched with `eq(usersTable.email, email)`; this is the same
|
|
28
|
+
* definition, so the command no longer resets different accounts depending on
|
|
29
|
+
* whether the backend happened to be running.
|
|
30
|
+
*/
|
|
31
|
+
export declare function selectUserForEmail(payload: unknown, email: string): ResolvedUser | undefined;
|
|
1
32
|
export declare function authCommand(subcommand: string | undefined, rawArgs: string[]): Promise<void>;
|
|
@@ -115,3 +115,4 @@ export declare function formatDuration(seconds: number): string;
|
|
|
115
115
|
*/
|
|
116
116
|
export declare function parseSince(input: string | undefined): number | null;
|
|
117
117
|
export declare function debugCommand(action: string | undefined, rawArgs: string[]): Promise<void>;
|
|
118
|
+
export declare function printDebugHelp(): void;
|
|
@@ -6,3 +6,4 @@ export declare function parseEnvAssignment(operands: string[]): {
|
|
|
6
6
|
} | null;
|
|
7
7
|
/** The prefix that makes `key` a build-time variable, or undefined. */
|
|
8
8
|
export declare function buildTimeEnvPrefix(key: string): string | undefined;
|
|
9
|
+
export declare function printEnvHelp(): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/** The identifier CREATE EXTENSION takes. `pgvector` is a common alias. */
|
|
2
2
|
export declare function resolveExtensionAlias(name: string): string;
|
|
3
3
|
export declare function extensionsCommand(action: string | undefined, rawArgs: string[]): Promise<void>;
|
|
4
|
+
export declare function printExtensionsHelp(): void;
|
|
@@ -59,6 +59,7 @@ export declare function statusCommand(rawArgs: string[]): Promise<void>;
|
|
|
59
59
|
export declare function metricsCommand(rawArgs: string[]): Promise<void>;
|
|
60
60
|
export declare function webhooksCommand(subcommand: string | undefined, rawArgs: string[]): Promise<void>;
|
|
61
61
|
export declare function storageCommand(action: string | undefined, rawArgs: string[]): Promise<void>;
|
|
62
|
+
export declare function printStorageHelp(): void;
|
|
62
63
|
export declare function clustersCommand(rawArgs: string[]): Promise<void>;
|
|
63
64
|
export declare function billingCommand(rawArgs: string[]): Promise<void>;
|
|
64
65
|
export {};
|
package/dist/commands/dev.d.ts
CHANGED
|
@@ -6,12 +6,5 @@ export declare const DEV_PORT_FILENAME = ".rebase-dev-port";
|
|
|
6
6
|
* Two different project directories will almost always get different ports.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getProjectPort(projectRoot: string): number;
|
|
9
|
-
/**
|
|
10
|
-
* Resolve the best starting port for this project:
|
|
11
|
-
* 1. Explicit --port flag (highest priority)
|
|
12
|
-
* 2. PORT env var
|
|
13
|
-
* 3. Previously used port from .rebase-dev-port (port affinity across restarts)
|
|
14
|
-
* 4. Deterministic hash from project path (unique per project)
|
|
15
|
-
*/
|
|
16
9
|
export declare function resolveStartPort(projectRoot: string, explicitPort?: number): number;
|
|
17
10
|
export declare function devCommand(rawArgs: string[]): Promise<void>;
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -68,4 +68,26 @@ export declare function formatCdTarget(cwd: string, targetDirectory: string): st
|
|
|
68
68
|
* triggering the non-TTY error. */
|
|
69
69
|
export declare function printInitHelp(): void;
|
|
70
70
|
export declare function createRebaseApp(rawArgs: string[]): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* The runtime image tag to pin, given the version of the CLI doing the scaffolding.
|
|
73
|
+
*
|
|
74
|
+
* Only a stable release publishes `rebasepro/server` — a multi-arch build on
|
|
75
|
+
* every push to main would cost minutes per commit for an image nobody pulls.
|
|
76
|
+
* So pinning a prerelease CLI's own version writes a tag that cannot exist, and
|
|
77
|
+
* `docker compose up` fails on `manifest unknown`, which is the same dead end
|
|
78
|
+
* as the missing-repository bug this pinning was added to prevent.
|
|
79
|
+
*
|
|
80
|
+
* A prerelease therefore falls back to `latest`, which is correct rather than
|
|
81
|
+
* merely available: a bundle's manifest declares the runtime range it needs
|
|
82
|
+
* (`^1`), the image supplies only `@rebasepro/server`, and the framework a
|
|
83
|
+
* bundle runs is installed from its own `deps.declared` at boot. The current
|
|
84
|
+
* stable runtime boots a canary bundle by design.
|
|
85
|
+
*
|
|
86
|
+
* A floating tag is a real cost — it is what pinning exists to avoid — so say
|
|
87
|
+
* so in the file rather than leaving a reader to discover it.
|
|
88
|
+
*/
|
|
89
|
+
export declare function resolveRuntimeImageTag(cliVersion: string): {
|
|
90
|
+
tag: string;
|
|
91
|
+
note?: string;
|
|
92
|
+
};
|
|
71
93
|
export declare function configureEnvFile(targetDirectory: string, databaseUrl?: string): Promise<void>;
|