@rebasepro/cli 0.13.0 → 0.13.1-canary.g394d868
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/init.d.ts +22 -0
- package/dist/index.es.js +344 -72
- 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/template/config/package.json +1 -0
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const TELEMETRY_SCHEMA_VERSION = 1;
|
|
33
33
|
/** The events the CLI reports. Closed set — a name not listed cannot be sent. */
|
|
34
|
-
export type TelemetryEventName = "cli.init" | "cli.dev" | "cli.deploy" | "cli.
|
|
34
|
+
export type TelemetryEventName = "cli.init" | "cli.dev" | "cli.deploy" | "cli.schema" | "cli.db" | "cli.error";
|
|
35
35
|
/** A single non-free-text value. */
|
|
36
36
|
export type TelemetryValue = string | number | boolean;
|
|
37
37
|
export type TelemetryEvent = {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Would `loadCollectionsFromDirectory` load this file?
|
|
3
|
+
*
|
|
4
|
+
* Mirrors that loader's own `isCollectionFile` plus its flat (non-recursive)
|
|
5
|
+
* scan. `relativePath` is relative to the collections directory, as `fs.watch`
|
|
6
|
+
* reports it.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isLoadedCollectionFile(relativePath: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Does this collection source declare anything a SQL toolchain would own?
|
|
11
|
+
*
|
|
12
|
+
* The fallback order matches `resolveDataSource`: an explicit `engine` wins,
|
|
13
|
+
* and a collection that only names a `dataSource` is resolved as if the key
|
|
14
|
+
* were the engine — which is what that function does when no registry is
|
|
15
|
+
* available, and the CLI has none. An engine nobody recognises counts as
|
|
16
|
+
* relational, for the reason `isRelationalCollection` gives.
|
|
17
|
+
*
|
|
18
|
+
* A file declaring several collections is SQL-affecting if *any* of them is.
|
|
19
|
+
*/
|
|
20
|
+
export declare function declaresRelationalCollection(rawSource: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Can this edit have changed the generated SQL schema?
|
|
23
|
+
*
|
|
24
|
+
* Answers `true` when it cannot tell — an unreadable file is a reason to warn,
|
|
25
|
+
* not a reason to go quiet.
|
|
26
|
+
*/
|
|
27
|
+
export declare function affectsSqlSchema(collectionsDir: string, relativePath: string): boolean;
|
package/dist/utils/project.d.ts
CHANGED
|
@@ -34,6 +34,26 @@ export declare function findFrontendDir(projectRoot: string): string | null;
|
|
|
34
34
|
* Find the .env file. Checks the project root first, then backend.
|
|
35
35
|
*/
|
|
36
36
|
export declare function findEnvFile(projectRoot: string): string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Read the project's `.env` into a plain object.
|
|
39
|
+
*
|
|
40
|
+
* One reader, because there were four: `dotenv` in `start`, a hand-rolled
|
|
41
|
+
* `indexOf("=")` loop in `api-keys`, a single-key regex in `auth`, and its own
|
|
42
|
+
* splitting in `cloud env`. `dotenv` is a declared dependency of this package,
|
|
43
|
+
* so the other three existed for no reason and disagreed with the correct one
|
|
44
|
+
* on the two things people actually write in a `.env`:
|
|
45
|
+
*
|
|
46
|
+
* - `export KEY=value`, which the hand-rolled parser keyed as
|
|
47
|
+
* `export KEY` — so the command reported the key as unset while it was
|
|
48
|
+
* right there in the file;
|
|
49
|
+
* - `KEY=value # comment`, whose comment travelled into the value and then
|
|
50
|
+
* into an `Authorization` header, coming back as a 401 with nothing
|
|
51
|
+
* pointing at the cause.
|
|
52
|
+
*
|
|
53
|
+
* Returns `{}` when the project has no `.env`, so callers can treat "absent"
|
|
54
|
+
* and "empty" alike.
|
|
55
|
+
*/
|
|
56
|
+
export declare function readEnvFile(projectRoot: string): Record<string, string>;
|
|
37
57
|
/**
|
|
38
58
|
* Resolve a binary from the project's node_modules/.bin.
|
|
39
59
|
* Checks backend, root, parent monorepo root, then falls back to PATH.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1-canary.g394d868",
|
|
4
4
|
"description": "Developer tools for Rebase projects",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"execa": "^9.6.1",
|
|
32
32
|
"inquirer": "14.0.2",
|
|
33
33
|
"jiti": "^2.7.0",
|
|
34
|
-
"@rebasepro/agent-skills": "0.13.
|
|
35
|
-
"@rebasepro/
|
|
36
|
-
"@rebasepro/
|
|
37
|
-
"@rebasepro/
|
|
38
|
-
"@rebasepro/server": "0.13.
|
|
39
|
-
"@rebasepro/
|
|
34
|
+
"@rebasepro/agent-skills": "0.13.1-canary.g394d868",
|
|
35
|
+
"@rebasepro/codegen": "0.13.1-canary.g394d868",
|
|
36
|
+
"@rebasepro/client": "0.13.1-canary.g394d868",
|
|
37
|
+
"@rebasepro/server": "0.13.1-canary.g394d868",
|
|
38
|
+
"@rebasepro/server-postgres": "0.13.1-canary.g394d868",
|
|
39
|
+
"@rebasepro/types": "0.13.1-canary.g394d868"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^26.1.2",
|