@rebasepro/cli 0.31.0 → 0.32.0
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/{agent-setup-DqAcoDcn.js → agent-setup-Cg_zBWoW.js} +3 -3
- package/dist/{agent-setup-DqAcoDcn.js.map → agent-setup-Cg_zBWoW.js.map} +1 -1
- package/dist/api-TbmW33D7.js +275 -0
- package/dist/api-TbmW33D7.js.map +1 -0
- package/dist/{api-keys-eIUjMqWn.js → api-keys-fPQ55DCm.js} +151 -158
- package/dist/api-keys-fPQ55DCm.js.map +1 -0
- package/dist/{apps-DExO4PEl.js → apps-DBTRoOeP.js} +18 -13
- package/dist/apps-DBTRoOeP.js.map +1 -0
- package/dist/{args-CaCcrYE1.js → args-DHyrshtI.js} +3 -132
- package/dist/args-DHyrshtI.js.map +1 -0
- package/dist/{atlas-dev-database-DOCKk6ht.js → atlas-dev-database-D6h65f2x.js} +3 -3
- package/dist/{atlas-dev-database-DOCKk6ht.js.map → atlas-dev-database-D6h65f2x.js.map} +1 -1
- package/dist/{auth-ofQETpM5.js → auth-BpyYLEFY.js} +93 -12
- package/dist/auth-BpyYLEFY.js.map +1 -0
- package/dist/auth-session-B6aT0Dyj.js +371 -0
- package/dist/auth-session-B6aT0Dyj.js.map +1 -0
- package/dist/{backend-guard-C0mVkXBw.js → backend-guard-Cf8eMK_f.js} +2 -2
- package/dist/{backend-guard-C0mVkXBw.js.map → backend-guard-Cf8eMK_f.js.map} +1 -1
- package/dist/{branch-pointer-DMPyvZoK.js → branch-pointer-BJOF2Ubv.js} +1 -1
- package/dist/{build-CA5R07tw.js → build-BfdT-AUR.js} +12 -10
- package/dist/{build-CA5R07tw.js.map → build-BfdT-AUR.js.map} +1 -1
- package/dist/{bundle-DgILeA5b.js → bundle-CIiKGrte.js} +78 -12
- package/dist/bundle-CIiKGrte.js.map +1 -0
- package/dist/bundle.d.ts +31 -1
- package/dist/{cloud-CYMk92iG.js → cloud-MqnyPnmX.js} +1540 -1531
- package/dist/cloud-MqnyPnmX.js.map +1 -0
- package/dist/{cms-directories-BK3vcswg.js → cms-directories-BaV-Is9a.js} +2 -2
- package/dist/{cms-directories-BK3vcswg.js.map → cms-directories-BaV-Is9a.js.map} +1 -1
- package/dist/codemod/collections-to-tables/backend.d.ts +0 -2
- package/dist/codemod/collections-to-tables/customization.d.ts +2 -1
- package/dist/codemod/collections-to-tables/modules.d.ts +32 -0
- package/dist/codemod/collections-to-tables/plan-context.d.ts +7 -1
- package/dist/{command-D5lhW_-B.js → command-D9g46gg9.js} +68 -42
- package/dist/command-D9g46gg9.js.map +1 -0
- package/dist/commands/api-keys.d.ts +89 -52
- package/dist/commands/api.d.ts +114 -0
- package/dist/commands/auth-session.d.ts +94 -0
- package/dist/commands/auth.d.ts +1 -1
- package/dist/commands/cloud/alerts.d.ts +29 -0
- package/dist/commands/cloud/context.d.ts +8 -0
- package/dist/commands/cloud/debug.d.ts +16 -1
- package/dist/commands/cloud/deploy-hooks.d.ts +19 -0
- package/dist/commands/cloud/deploy.d.ts +25 -0
- package/dist/commands/cloud/env.d.ts +1 -0
- package/dist/commands/cloud/index.d.ts +5 -0
- package/dist/commands/cloud/maintenance.d.ts +26 -1
- package/dist/commands/cloud/not-served.d.ts +27 -0
- package/dist/commands/cloud/orgs.d.ts +5 -0
- package/dist/commands/cloud/resources.d.ts +82 -2
- package/dist/commands/cloud/runtime-logs.d.ts +57 -0
- package/dist/commands/cloud/settings.d.ts +3 -0
- package/dist/commands/cron.d.ts +68 -0
- package/dist/commands/data.d.ts +197 -0
- package/dist/commands/functions.d.ts +38 -0
- package/dist/commands/logs.d.ts +22 -0
- package/dist/commands/rls.d.ts +31 -0
- package/dist/commands/schema-reconcile.d.ts +2 -1
- package/dist/commands/schema-show.d.ts +38 -0
- package/dist/commands/storage-objects.d.ts +88 -0
- package/dist/commands/storage.d.ts +18 -2
- package/dist/commands/users.d.ts +147 -0
- package/dist/{consent-BXLIrMl8.js → consent-UV6ObCME.js} +2 -2
- package/dist/{consent-BXLIrMl8.js.map → consent-UV6ObCME.js.map} +1 -1
- package/dist/{console-DjThnr3f.js → console-BVoYOLAO.js} +6 -6
- package/dist/{console-DjThnr3f.js.map → console-BVoYOLAO.js.map} +1 -1
- package/dist/{context--JwaHaZp.js → context-BOMEoKxn.js} +80 -9
- package/dist/{context--JwaHaZp.js.map → context-BOMEoKxn.js.map} +1 -1
- package/dist/cron-CpUsQ739.js +298 -0
- package/dist/cron-CpUsQ739.js.map +1 -0
- package/dist/cron-ZRXsla0v.js +259 -0
- package/dist/cron-ZRXsla0v.js.map +1 -0
- package/dist/{daemon-w30PsdwV.js → daemon-D5gdG7gx.js} +3 -3
- package/dist/{daemon-w30PsdwV.js.map → daemon-D5gdG7gx.js.map} +1 -1
- package/dist/{daemon-entry-zOC1revO.js → daemon-entry--ummUJnk.js} +2 -2
- package/dist/{daemon-entry-zOC1revO.js.map → daemon-entry--ummUJnk.js.map} +1 -1
- package/dist/data-BJ9AZFUC.js +947 -0
- package/dist/data-BJ9AZFUC.js.map +1 -0
- package/dist/{db-Bz2RFGJj.js → db-D_iF4E-v.js} +38 -34
- package/dist/{db-Bz2RFGJj.js.map → db-D_iF4E-v.js.map} +1 -1
- package/dist/debug-nNbbxAeo.js +1114 -0
- package/dist/debug-nNbbxAeo.js.map +1 -0
- package/dist/{derive-C3ezmY-p.js → derive-Mky_u59_.js} +3 -3
- package/dist/{derive-C3ezmY-p.js.map → derive-Mky_u59_.js.map} +1 -1
- package/dist/{dev-D8TxrE_I.js → dev-bj6dEeSQ.js} +13 -13
- package/dist/{dev-D8TxrE_I.js.map → dev-bj6dEeSQ.js.map} +1 -1
- package/dist/dev-db/pull.d.ts +13 -3
- package/dist/{dev-preflight-DjvcV6SK.js → dev-preflight-BMOf2N6r.js} +2 -2
- package/dist/{dev-preflight-DjvcV6SK.js.map → dev-preflight-BMOf2N6r.js.map} +1 -1
- package/dist/{dev-server-BLxCbQEP.js → dev-server-2XHSHM_q.js} +2 -2
- package/dist/{dev-server-BLxCbQEP.js.map → dev-server-2XHSHM_q.js.map} +1 -1
- package/dist/{doctor-Du-mSxoE.js → doctor-2Jlau0Rm.js} +9 -8
- package/dist/{doctor-Du-mSxoE.js.map → doctor-2Jlau0Rm.js.map} +1 -1
- package/dist/{eject-Bhzd6hgb.js → eject-DK_M9kor.js} +4 -4
- package/dist/{eject-Bhzd6hgb.js.map → eject-DK_M9kor.js.map} +1 -1
- package/dist/{fold-static-CKewnAPX.js → fold-static-2t3UUX4z.js} +10 -6
- package/dist/fold-static-2t3UUX4z.js.map +1 -0
- package/dist/fold-static.d.ts +7 -0
- package/dist/functions-B4JR6EZL.js +120 -0
- package/dist/functions-B4JR6EZL.js.map +1 -0
- package/dist/{generate-view-CTOluXvH.js → generate-view-BMaLQm8H.js} +5 -5
- package/dist/{generate-view-CTOluXvH.js.map → generate-view-BMaLQm8H.js.map} +1 -1
- package/dist/{generate_sdk-De-aLC1L.js → generate_sdk-ByD-gTsK.js} +7 -7
- package/dist/{generate_sdk-De-aLC1L.js.map → generate_sdk-ByD-gTsK.js.map} +1 -1
- package/dist/index.es.js +123 -47
- package/dist/index.es.js.map +1 -1
- package/dist/{init-Dtl-IcXf.js → init-DHCe5mJ5.js} +59 -11
- package/dist/init-DHCe5mJ5.js.map +1 -0
- package/dist/{invoked-command-CG_rIa_o.js → invoked-command-FBeIBS8o.js} +2 -2
- package/dist/{invoked-command-CG_rIa_o.js.map → invoked-command-FBeIBS8o.js.map} +1 -1
- package/dist/last-dev-database-CBVkEUEl.js +2 -0
- package/dist/logs-CIgfLBsu.js +192 -0
- package/dist/logs-CIgfLBsu.js.map +1 -0
- package/dist/{manifest-C3uLDrrJ.js → manifest-RjqxfCpb.js} +114 -5
- package/dist/manifest-RjqxfCpb.js.map +1 -0
- package/dist/{migrate-VrKoi3nB.js → migrate-Cx8-Y4TG.js} +5 -4
- package/dist/{migrate-VrKoi3nB.js.map → migrate-Cx8-Y4TG.js.map} +1 -1
- package/dist/{normalize-imports-DwxqEMYq.js → normalize-imports-P86NVfpo.js} +3 -3
- package/dist/{normalize-imports-DwxqEMYq.js.map → normalize-imports-P86NVfpo.js.map} +1 -1
- package/dist/{path-flags-7O5uPBcQ.js → path-flags-ekLdkbra.js} +3 -3
- package/dist/{path-flags-7O5uPBcQ.js.map → path-flags-ekLdkbra.js.map} +1 -1
- package/dist/{prepare-Ccxspoj-.js → prepare-BaJe0Zik.js} +4 -4
- package/dist/{prepare-Ccxspoj-.js.map → prepare-BaJe0Zik.js.map} +1 -1
- package/dist/{project-CLcF5i8c.js → project-DALmhb5R.js} +2 -2
- package/dist/{project-CLcF5i8c.js.map → project-DALmhb5R.js.map} +1 -1
- package/dist/project-command-Cl9EZzjr.js +662 -0
- package/dist/project-command-Cl9EZzjr.js.map +1 -0
- package/dist/{project-schema-CsSOG2gE.js → project-schema-Dm6Jk0Y_.js} +4 -2
- package/dist/{project-schema-CsSOG2gE.js.map → project-schema-Dm6Jk0Y_.js.map} +1 -1
- package/dist/{pull-BMuiUyjb.js → pull-CTIsST6T.js} +66 -5
- package/dist/pull-CTIsST6T.js.map +1 -0
- package/dist/resolve-C36px9tR.js +2 -0
- package/dist/{resources-Dpfs2y8P.js → resources-Db3USuPO.js} +5 -5
- package/dist/{resources-Dpfs2y8P.js.map → resources-Db3USuPO.js.map} +1 -1
- package/dist/rls-BxrQ0P50.js +133 -0
- package/dist/rls-BxrQ0P50.js.map +1 -0
- package/dist/{schema-Dv6nHkb0.js → schema-_FzZEoB8.js} +54 -40
- package/dist/schema-_FzZEoB8.js.map +1 -0
- package/dist/{schema-dir-Cd1kvYbf.js → schema-dir-ChcYfWjP.js} +2 -2
- package/dist/{schema-dir-Cd1kvYbf.js.map → schema-dir-ChcYfWjP.js.map} +1 -1
- package/dist/schema-reconcile-DV14XY4o.js +2 -0
- package/dist/schema-show-h72UJ9zH.js +127 -0
- package/dist/schema-show-h72UJ9zH.js.map +1 -0
- package/dist/{skills-CXjA9TWw.js → skills-DQ2bZGkj.js} +6 -5
- package/dist/{skills-CXjA9TWw.js.map → skills-DQ2bZGkj.js.map} +1 -1
- package/dist/star-nudge.d.ts +28 -0
- package/dist/{start-Bwbtt2W5.js → start-Cjx4W0bJ.js} +7 -7
- package/dist/{start-Bwbtt2W5.js.map → start-Cjx4W0bJ.js.map} +1 -1
- package/dist/{status-BTgTWzlQ.js → status-CDBk25VO.js} +9 -9
- package/dist/{status-BTgTWzlQ.js.map → status-CDBk25VO.js.map} +1 -1
- package/dist/{storage-iTqj5-Av.js → storage-Clc8dLG8.js} +79 -36
- package/dist/storage-Clc8dLG8.js.map +1 -0
- package/dist/storage-objects-CfRKlTDe.js +279 -0
- package/dist/storage-objects-CfRKlTDe.js.map +1 -0
- package/dist/{telemetry-BP_1Cl9r.js → telemetry-DZU2-NCm.js} +5 -4
- package/dist/{telemetry-BP_1Cl9r.js.map → telemetry-DZU2-NCm.js.map} +1 -1
- package/dist/{telemetry-M3HjlyhZ.js → telemetry-EVtASbKb.js} +2 -2
- package/dist/{telemetry-M3HjlyhZ.js.map → telemetry-EVtASbKb.js.map} +1 -1
- package/dist/unknown-command-DnZ2uhGs.js +139 -0
- package/dist/unknown-command-DnZ2uhGs.js.map +1 -0
- package/dist/{upgrade-oZzJ13jM.js → upgrade-DhpUFb6p.js} +5 -5
- package/dist/{upgrade-oZzJ13jM.js.map → upgrade-DhpUFb6p.js.map} +1 -1
- package/dist/users-5PkqBY6R.js +561 -0
- package/dist/users-5PkqBY6R.js.map +1 -0
- package/dist/utils/project-command.d.ts +38 -0
- package/dist/utils/project-target.d.ts +193 -0
- package/dist/{verify-BkUVGLqo.js → verify-BdeqNb-V.js} +138 -12
- package/dist/verify-BdeqNb-V.js.map +1 -0
- package/dist/{version-Buyyo1ut.js → version-ONIeo7jl.js} +7 -2
- package/dist/{version-Buyyo1ut.js.map → version-ONIeo7jl.js.map} +1 -1
- package/package.json +10 -10
- package/dist/api-keys-eIUjMqWn.js.map +0 -1
- package/dist/apps-DExO4PEl.js.map +0 -1
- package/dist/args-CaCcrYE1.js.map +0 -1
- package/dist/auth-ofQETpM5.js.map +0 -1
- package/dist/bundle-DgILeA5b.js.map +0 -1
- package/dist/cloud-CYMk92iG.js.map +0 -1
- package/dist/command-D5lhW_-B.js.map +0 -1
- package/dist/fold-static-CKewnAPX.js.map +0 -1
- package/dist/init-Dtl-IcXf.js.map +0 -1
- package/dist/last-dev-database-Dc8cP01o.js +0 -2
- package/dist/manifest-C3uLDrrJ.js.map +0 -1
- package/dist/pull-BMuiUyjb.js.map +0 -1
- package/dist/resolve-BY7bSFRT.js +0 -2
- package/dist/schema-Dv6nHkb0.js.map +0 -1
- package/dist/schema-reconcile-CjxLaRHB.js +0 -2
- package/dist/storage-iTqj5-Av.js.map +0 -1
- package/dist/verify-BkUVGLqo.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** The refusal code for a route the control plane does not serve. */
|
|
2
|
+
export declare const NOT_SERVED = "not_served";
|
|
3
|
+
/**
|
|
4
|
+
* Whether an error is the control plane saying it has no such route, rather
|
|
5
|
+
* than a route refusing this request.
|
|
6
|
+
*
|
|
7
|
+
* A Rebase backend answers a function it does not mount, or a route its
|
|
8
|
+
* function does not have, with a 404 coded `FUNCTION_NOT_FOUND`; one from
|
|
9
|
+
* before that envelope answers a bare `Not Found` or `No route for …`. A
|
|
10
|
+
* function that is served and refuses an unknown project answers its own code
|
|
11
|
+
* (`not_found`), so that 404 is not this one.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isRouteNotServed(error: unknown): boolean;
|
|
14
|
+
/** What a command says when its route is not served: the thing, and what to do meanwhile. */
|
|
15
|
+
export interface Unserved {
|
|
16
|
+
/** Completes "This control plane does not serve … yet": `app keys`. */
|
|
17
|
+
what: string;
|
|
18
|
+
/** What the reader can do instead, and whether anything changed. */
|
|
19
|
+
hint: string;
|
|
20
|
+
}
|
|
21
|
+
/** Refuse with `not_served` when `error` is a missing route; return otherwise. */
|
|
22
|
+
export declare function refuseIfNotServed(error: unknown, unserved: Unserved): void;
|
|
23
|
+
/**
|
|
24
|
+
* Report a failed control-plane call: `not_served` for a missing route, the
|
|
25
|
+
* family's usual report otherwise. Never returns.
|
|
26
|
+
*/
|
|
27
|
+
export declare function reportCallError(error: unknown, context: string, unserved: Unserved): never;
|
|
@@ -5,6 +5,11 @@ export declare const CREATE_ORG_FLAGS: {
|
|
|
5
5
|
readonly "--slug": StringConstructor;
|
|
6
6
|
readonly "-n": "--name";
|
|
7
7
|
};
|
|
8
|
+
/** What `rebase cloud orgs rename` parses. Its page is the group's own. */
|
|
9
|
+
export declare const RENAME_ORG_FLAGS: {
|
|
10
|
+
readonly "--slug": StringConstructor;
|
|
11
|
+
readonly "--org": StringConstructor;
|
|
12
|
+
};
|
|
8
13
|
/** An open invitation, as the control plane lists it. Never the link. */
|
|
9
14
|
export interface CliInvite {
|
|
10
15
|
id: string;
|
|
@@ -114,6 +114,66 @@ interface TenantRealtime {
|
|
|
114
114
|
* flat, and both count from when that instance started.
|
|
115
115
|
*/
|
|
116
116
|
export declare function realtimeTable(instances: NonNullable<TenantRealtime["instances"]>): string[];
|
|
117
|
+
/** What `rebase cloud metrics` parses. Its page pairs against this. */
|
|
118
|
+
export declare const METRICS_FLAGS: {
|
|
119
|
+
readonly "--runtime": BooleanConstructor;
|
|
120
|
+
readonly "--history": BooleanConstructor;
|
|
121
|
+
readonly "--series": StringConstructor;
|
|
122
|
+
readonly "--minutes": StringConstructor;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* The series a runtime records, and so the ones `--history` may name.
|
|
126
|
+
*
|
|
127
|
+
* The runtime's own list (`METRIC_SERIES` in
|
|
128
|
+
* `packages/server/src/metrics/history-store.ts`), which is not exported;
|
|
129
|
+
* `cloud-api-commands.test.ts` holds the two together.
|
|
130
|
+
*/
|
|
131
|
+
export declare const HISTORY_SERIES: readonly ["cpu_millicores", "memory_bytes", "event_loop_delay_ms"];
|
|
132
|
+
/** The longest window the runtime keeps: fourteen days, in minutes. */
|
|
133
|
+
export declare const HISTORY_MAX_MINUTES = 20160;
|
|
134
|
+
/** What `/api/functions/metrics/:projectId/runtime` returns. Mirrors saas metrics.ts. */
|
|
135
|
+
export interface RuntimeRollup {
|
|
136
|
+
projectId?: string;
|
|
137
|
+
at?: string;
|
|
138
|
+
/** `null` when the app could not be scraped: not deployed, starting, or metrics off. */
|
|
139
|
+
rollup?: {
|
|
140
|
+
uptimeSeconds?: number;
|
|
141
|
+
heapBytes?: number;
|
|
142
|
+
rssBytes?: number;
|
|
143
|
+
totalRequests?: number;
|
|
144
|
+
totalErrors?: number;
|
|
145
|
+
meanLatencyMs?: number;
|
|
146
|
+
surfaces?: {
|
|
147
|
+
surface?: string;
|
|
148
|
+
requests?: number;
|
|
149
|
+
errors?: number;
|
|
150
|
+
meanLatencyMs?: number;
|
|
151
|
+
}[];
|
|
152
|
+
} | null;
|
|
153
|
+
}
|
|
154
|
+
/** What `/api/functions/metrics/:projectId/history` returns. Mirrors saas metrics.ts. */
|
|
155
|
+
export interface MetricHistory {
|
|
156
|
+
series?: string;
|
|
157
|
+
minutes?: number;
|
|
158
|
+
/** `null` when the history could not be read; `reason` says why. */
|
|
159
|
+
points?: {
|
|
160
|
+
at: string;
|
|
161
|
+
value: number;
|
|
162
|
+
instances?: number;
|
|
163
|
+
}[] | null;
|
|
164
|
+
reason?: string;
|
|
165
|
+
retryable?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/** The share of requests that failed, as a percentage with one decimal; undefined with no requests. */
|
|
168
|
+
export declare function errorRate(requests: number | undefined, errors: number | undefined): string | undefined;
|
|
169
|
+
/** `--series` and `--minutes`, checked: the series one the runtime records, the window 1 to 14 days in minutes. */
|
|
170
|
+
export declare function resolveHistoryArgs(flags: {
|
|
171
|
+
"--series"?: string;
|
|
172
|
+
"--minutes"?: string;
|
|
173
|
+
}): {
|
|
174
|
+
series: string;
|
|
175
|
+
minutes: number;
|
|
176
|
+
};
|
|
117
177
|
export declare function metricsCommand(rawArgs: string[]): Promise<void>;
|
|
118
178
|
/**
|
|
119
179
|
* `rebase cloud webhooks` is retired, and says where to go instead.
|
|
@@ -140,7 +200,7 @@ export declare const STORAGE_ACTIONS: readonly ["list", "create", "attach"];
|
|
|
140
200
|
export declare function storageCommand(action: string | undefined, rawArgs: string[]): Promise<void>;
|
|
141
201
|
export declare function printStorageHelp(): void;
|
|
142
202
|
/** The action words `rebase cloud clusters` dispatches. No word means `list`. */
|
|
143
|
-
export declare const CLUSTERS_ACTIONS: readonly ["list", "add", "verify", "registry"];
|
|
203
|
+
export declare const CLUSTERS_ACTIONS: readonly ["list", "add", "verify", "registry", "baseline"];
|
|
144
204
|
/**
|
|
145
205
|
* `rebase cloud clusters` — list, register and verify the clusters tenants run on.
|
|
146
206
|
*
|
|
@@ -181,6 +241,26 @@ export declare function resolveClusterVerifyArgs(rawArgs: string[]): {
|
|
|
181
241
|
id?: string;
|
|
182
242
|
baseline: boolean;
|
|
183
243
|
};
|
|
244
|
+
/** What `clusters baseline` parses. */
|
|
245
|
+
export declare const CLUSTER_BASELINE_FLAGS: {
|
|
246
|
+
readonly "--install": BooleanConstructor;
|
|
247
|
+
};
|
|
248
|
+
/** What `GET /api/functions/cluster-baseline/:clusterId` answers. Mirrors saas k8s/baseline.ts. */
|
|
249
|
+
export interface ClusterBaselineReport {
|
|
250
|
+
ready?: boolean;
|
|
251
|
+
components?: {
|
|
252
|
+
name?: string;
|
|
253
|
+
installed?: boolean;
|
|
254
|
+
ready?: boolean;
|
|
255
|
+
detail?: string;
|
|
256
|
+
}[];
|
|
257
|
+
}
|
|
258
|
+
/** Which cluster `clusters baseline` was asked about, and whether to install. */
|
|
259
|
+
export declare function resolveClusterBaselineArgs(rawArgs: string[]): {
|
|
260
|
+
id?: string;
|
|
261
|
+
install: boolean;
|
|
262
|
+
yes: boolean;
|
|
263
|
+
};
|
|
184
264
|
/**
|
|
185
265
|
* Register a cluster from a kubeconfig file.
|
|
186
266
|
*
|
|
@@ -268,7 +348,7 @@ export declare function readPullKey(text: string, pushServiceAccount: string): {
|
|
|
268
348
|
* the account — a help page describing a command that does not exist, and a typo
|
|
269
349
|
* exiting 0.
|
|
270
350
|
*/
|
|
271
|
-
export declare const BILLING_ACTIONS: readonly ["setup", "checkout", "invoices", "upcoming"];
|
|
351
|
+
export declare const BILLING_ACTIONS: readonly ["setup", "checkout", "invoices", "upcoming", "email"];
|
|
272
352
|
export declare function billingCommand(rawArgs: string[]): Promise<void>;
|
|
273
353
|
/**
|
|
274
354
|
* The action words `rebase cloud compute` dispatches. No word, or `show`,
|
|
@@ -88,6 +88,57 @@ export declare function recordFilter(opts: {
|
|
|
88
88
|
grep?: string;
|
|
89
89
|
level?: Exclude<LogLevel, "unknown">;
|
|
90
90
|
}): (rec: LogRecord) => boolean;
|
|
91
|
+
/**
|
|
92
|
+
* How many lines per pod the control plane returns when no `tailLines` is
|
|
93
|
+
* sent (`DEFAULT_TAIL_LINES` in `saas/backend/functions/runtime-logs.ts`). A
|
|
94
|
+
* filtered read with no `--tail` keeps this many matches per pod, so it shows
|
|
95
|
+
* as much as an unfiltered one would.
|
|
96
|
+
*/
|
|
97
|
+
export declare const SERVER_DEFAULT_TAIL_LINES = 500;
|
|
98
|
+
/**
|
|
99
|
+
* The newest `tail` records of each pod, in their original order. Lines with
|
|
100
|
+
* no pod prefix count as one pod of their own.
|
|
101
|
+
*/
|
|
102
|
+
export declare function tailPerPod(records: LogRecord[], tail: number): LogRecord[];
|
|
103
|
+
/** One pod of a filtered read: `lines` is what this answer holds from it. */
|
|
104
|
+
export interface FilteredPod extends RuntimeLogsPodState {
|
|
105
|
+
/** Lines read from the control plane and searched. */
|
|
106
|
+
scannedLines: number;
|
|
107
|
+
/** Of those, the lines `--grep` and `--level` kept. */
|
|
108
|
+
matchedLines: number;
|
|
109
|
+
/** The search did not reach back to the start of the window (or of the log). */
|
|
110
|
+
scanCapped: boolean;
|
|
111
|
+
}
|
|
112
|
+
/** What a filtered read searched, found and kept. */
|
|
113
|
+
export interface FilteredRead {
|
|
114
|
+
/** The newest `tail` matches per pod. */
|
|
115
|
+
records: LogRecord[];
|
|
116
|
+
pods: FilteredPod[];
|
|
117
|
+
scannedLines: number;
|
|
118
|
+
matchedLines: number;
|
|
119
|
+
returnedLines: number;
|
|
120
|
+
/** Some line in the window was not searched: a pod filled the line ceiling, or a byte budget cut it. */
|
|
121
|
+
scanCapped: boolean;
|
|
122
|
+
/** Says what was not searched, when `scanCapped`. */
|
|
123
|
+
note: string | null;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Apply `--grep`/`--level` to everything a page holds, then keep the newest
|
|
127
|
+
* `tail` matches per pod.
|
|
128
|
+
*
|
|
129
|
+
* The control plane cannot filter: it tails each pod's log and answers with
|
|
130
|
+
* that. So a filtered read asks it for as many lines as it gives
|
|
131
|
+
* ({@link SERVER_MAX_TAIL_LINES}) and does both steps here. Tailing first and
|
|
132
|
+
* filtering after — what this used to do — searched only the newest `tail`
|
|
133
|
+
* lines, so `--since 6h --tail 40 --grep X` found nothing where `--tail 2000`
|
|
134
|
+
* found X two hours back.
|
|
135
|
+
*
|
|
136
|
+
* Whatever the server did not return could not be searched, and that is said
|
|
137
|
+
* rather than passed off as "no match": a pod that returned the full
|
|
138
|
+
* `scanLimit` lines has older lines in the window, and a pod (or the page)
|
|
139
|
+
* the server marked truncated was cut by a byte budget.
|
|
140
|
+
*/
|
|
141
|
+
export declare function filterThenTail(page: RuntimeLogsPage, filter: (rec: LogRecord) => boolean, tail: number, scanLimit?: number): FilteredRead;
|
|
91
142
|
/**
|
|
92
143
|
* The newest line printed so far, and which lines share its millisecond.
|
|
93
144
|
*
|
|
@@ -160,6 +211,12 @@ export interface FollowOptions {
|
|
|
160
211
|
/** The first poll, as the flags asked for it. */
|
|
161
212
|
initial: RuntimeLogsQuery;
|
|
162
213
|
filter: (rec: LogRecord) => boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Filtered: how many matches per pod the first poll prints. The first poll
|
|
216
|
+
* then asks for as many lines as the control plane returns, so the filter
|
|
217
|
+
* searches the whole window rather than its newest `--tail` lines.
|
|
218
|
+
*/
|
|
219
|
+
initialTail?: number;
|
|
163
220
|
}
|
|
164
221
|
/** The delay before retry `attempt` (1-based): 2s, 4s, 8s, 16s, then 30s. */
|
|
165
222
|
export declare function backoffMs(attempt: number, base?: number): number;
|
|
@@ -9,6 +9,8 @@ export declare function buildSettingsPatch(args: {
|
|
|
9
9
|
branch?: string;
|
|
10
10
|
/** Already parsed with {@link parseOnOff}. */
|
|
11
11
|
platformRebuilds?: boolean;
|
|
12
|
+
/** Already parsed with {@link parseOnOff}. */
|
|
13
|
+
studio?: boolean;
|
|
12
14
|
}): Record<string, string | boolean>;
|
|
13
15
|
/** What `rebase cloud settings set` parses. Its page is the group's own. */
|
|
14
16
|
export declare const SET_SETTINGS_FLAGS: {
|
|
@@ -17,5 +19,6 @@ export declare const SET_SETTINGS_FLAGS: {
|
|
|
17
19
|
readonly "--repo": StringConstructor;
|
|
18
20
|
readonly "--branch": StringConstructor;
|
|
19
21
|
readonly "--platform-rebuilds": StringConstructor;
|
|
22
|
+
readonly "--studio": StringConstructor;
|
|
20
23
|
};
|
|
21
24
|
export declare function printSettingsHelp(): void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type HelpAction } from "../utils/project-command.js";
|
|
2
|
+
/** Everything the switch below dispatches, for the did-you-mean. */
|
|
3
|
+
export declare const CRON_SUBCOMMANDS: readonly ["list", "get", "logs", "run", "enable", "disable", "reset"];
|
|
4
|
+
export declare function cronCommand(subcommand: string | undefined, rawArgs: string[]): Promise<void>;
|
|
5
|
+
export declare const CRON_LIST_FLAGS: {
|
|
6
|
+
"--project": StringConstructor;
|
|
7
|
+
"-p": "--project";
|
|
8
|
+
"--cloud": BooleanConstructor;
|
|
9
|
+
"--url": StringConstructor;
|
|
10
|
+
"--token": StringConstructor;
|
|
11
|
+
"--session": BooleanConstructor;
|
|
12
|
+
"--anon": BooleanConstructor;
|
|
13
|
+
"--json": BooleanConstructor;
|
|
14
|
+
"--yes": BooleanConstructor;
|
|
15
|
+
"-y": "--yes";
|
|
16
|
+
};
|
|
17
|
+
export declare const CRON_GET_FLAGS: {
|
|
18
|
+
"--project": StringConstructor;
|
|
19
|
+
"-p": "--project";
|
|
20
|
+
"--cloud": BooleanConstructor;
|
|
21
|
+
"--url": StringConstructor;
|
|
22
|
+
"--token": StringConstructor;
|
|
23
|
+
"--session": BooleanConstructor;
|
|
24
|
+
"--anon": BooleanConstructor;
|
|
25
|
+
"--json": BooleanConstructor;
|
|
26
|
+
"--yes": BooleanConstructor;
|
|
27
|
+
"-y": "--yes";
|
|
28
|
+
};
|
|
29
|
+
export declare const CRON_LOGS_FLAGS: {
|
|
30
|
+
"--limit": NumberConstructor;
|
|
31
|
+
"-n": string;
|
|
32
|
+
"--project": StringConstructor;
|
|
33
|
+
"-p": "--project";
|
|
34
|
+
"--cloud": BooleanConstructor;
|
|
35
|
+
"--url": StringConstructor;
|
|
36
|
+
"--token": StringConstructor;
|
|
37
|
+
"--session": BooleanConstructor;
|
|
38
|
+
"--anon": BooleanConstructor;
|
|
39
|
+
"--json": BooleanConstructor;
|
|
40
|
+
"--yes": BooleanConstructor;
|
|
41
|
+
"-y": "--yes";
|
|
42
|
+
};
|
|
43
|
+
export declare const CRON_RUN_FLAGS: {
|
|
44
|
+
"--async": BooleanConstructor;
|
|
45
|
+
"--project": StringConstructor;
|
|
46
|
+
"-p": "--project";
|
|
47
|
+
"--cloud": BooleanConstructor;
|
|
48
|
+
"--url": StringConstructor;
|
|
49
|
+
"--token": StringConstructor;
|
|
50
|
+
"--session": BooleanConstructor;
|
|
51
|
+
"--anon": BooleanConstructor;
|
|
52
|
+
"--json": BooleanConstructor;
|
|
53
|
+
"--yes": BooleanConstructor;
|
|
54
|
+
"-y": "--yes";
|
|
55
|
+
};
|
|
56
|
+
export declare const CRON_SWITCH_FLAGS: {
|
|
57
|
+
"--project": StringConstructor;
|
|
58
|
+
"-p": "--project";
|
|
59
|
+
"--cloud": BooleanConstructor;
|
|
60
|
+
"--url": StringConstructor;
|
|
61
|
+
"--token": StringConstructor;
|
|
62
|
+
"--session": BooleanConstructor;
|
|
63
|
+
"--anon": BooleanConstructor;
|
|
64
|
+
"--json": BooleanConstructor;
|
|
65
|
+
"--yes": BooleanConstructor;
|
|
66
|
+
"-y": "--yes";
|
|
67
|
+
};
|
|
68
|
+
export declare const CRON_ACTIONS: HelpAction[];
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/** Everything the switch below dispatches, for the did-you-mean. */
|
|
2
|
+
export declare const DATA_SUBCOMMANDS: readonly ["query", "get", "count", "aggregate", "insert", "update", "delete", "import", "history", "revert", "watch"];
|
|
3
|
+
export declare function dataCommand(subcommand: string | undefined, rawArgs: string[]): Promise<void>;
|
|
4
|
+
/**
|
|
5
|
+
* `--where` conditions as the API's query parameters. `col=op.value` is sent
|
|
6
|
+
* as written; `col=value` is equality, which the API reads the same way.
|
|
7
|
+
* Exported for its tests.
|
|
8
|
+
*/
|
|
9
|
+
export declare function whereParams(conditions: readonly string[] | undefined): Record<string, string[]>;
|
|
10
|
+
/** `--order-by name` / `--order-by name:desc`, one or several, as the API's `orderBy`. Exported for tests. */
|
|
11
|
+
export declare function orderByParam(values: readonly string[] | undefined): string | undefined;
|
|
12
|
+
export declare const QUERY_FLAGS: {
|
|
13
|
+
"--where": [StringConstructor];
|
|
14
|
+
"-w": string;
|
|
15
|
+
"--or": StringConstructor;
|
|
16
|
+
"--order-by": [StringConstructor];
|
|
17
|
+
"--limit": NumberConstructor;
|
|
18
|
+
"-n": string;
|
|
19
|
+
"--offset": NumberConstructor;
|
|
20
|
+
"--fields": StringConstructor;
|
|
21
|
+
"--include": StringConstructor;
|
|
22
|
+
"--search": StringConstructor;
|
|
23
|
+
"--deleted": StringConstructor;
|
|
24
|
+
"--all": BooleanConstructor;
|
|
25
|
+
"--format": StringConstructor;
|
|
26
|
+
"--project": StringConstructor;
|
|
27
|
+
"-p": "--project";
|
|
28
|
+
"--cloud": BooleanConstructor;
|
|
29
|
+
"--url": StringConstructor;
|
|
30
|
+
"--token": StringConstructor;
|
|
31
|
+
"--session": BooleanConstructor;
|
|
32
|
+
"--anon": BooleanConstructor;
|
|
33
|
+
"--json": BooleanConstructor;
|
|
34
|
+
"--yes": BooleanConstructor;
|
|
35
|
+
"-y": "--yes";
|
|
36
|
+
};
|
|
37
|
+
export declare const GET_ROW_FLAGS: {
|
|
38
|
+
"--fields": StringConstructor;
|
|
39
|
+
"--include": StringConstructor;
|
|
40
|
+
"--project": StringConstructor;
|
|
41
|
+
"-p": "--project";
|
|
42
|
+
"--cloud": BooleanConstructor;
|
|
43
|
+
"--url": StringConstructor;
|
|
44
|
+
"--token": StringConstructor;
|
|
45
|
+
"--session": BooleanConstructor;
|
|
46
|
+
"--anon": BooleanConstructor;
|
|
47
|
+
"--json": BooleanConstructor;
|
|
48
|
+
"--yes": BooleanConstructor;
|
|
49
|
+
"-y": "--yes";
|
|
50
|
+
};
|
|
51
|
+
export declare const COUNT_FLAGS: {
|
|
52
|
+
"--where": [StringConstructor];
|
|
53
|
+
"-w": string;
|
|
54
|
+
"--or": StringConstructor;
|
|
55
|
+
"--search": StringConstructor;
|
|
56
|
+
"--project": StringConstructor;
|
|
57
|
+
"-p": "--project";
|
|
58
|
+
"--cloud": BooleanConstructor;
|
|
59
|
+
"--url": StringConstructor;
|
|
60
|
+
"--token": StringConstructor;
|
|
61
|
+
"--session": BooleanConstructor;
|
|
62
|
+
"--anon": BooleanConstructor;
|
|
63
|
+
"--json": BooleanConstructor;
|
|
64
|
+
"--yes": BooleanConstructor;
|
|
65
|
+
"-y": "--yes";
|
|
66
|
+
};
|
|
67
|
+
export declare const AGGREGATE_FLAGS: {
|
|
68
|
+
"--select": StringConstructor;
|
|
69
|
+
"--group-by": StringConstructor;
|
|
70
|
+
"--where": [StringConstructor];
|
|
71
|
+
"-w": string;
|
|
72
|
+
"--or": StringConstructor;
|
|
73
|
+
"--format": StringConstructor;
|
|
74
|
+
"--project": StringConstructor;
|
|
75
|
+
"-p": "--project";
|
|
76
|
+
"--cloud": BooleanConstructor;
|
|
77
|
+
"--url": StringConstructor;
|
|
78
|
+
"--token": StringConstructor;
|
|
79
|
+
"--session": BooleanConstructor;
|
|
80
|
+
"--anon": BooleanConstructor;
|
|
81
|
+
"--json": BooleanConstructor;
|
|
82
|
+
"--yes": BooleanConstructor;
|
|
83
|
+
"-y": "--yes";
|
|
84
|
+
};
|
|
85
|
+
export declare const INSERT_FLAGS: {
|
|
86
|
+
"--data": StringConstructor;
|
|
87
|
+
"-d": string;
|
|
88
|
+
"--file": StringConstructor;
|
|
89
|
+
"--upsert": StringConstructor;
|
|
90
|
+
"--project": StringConstructor;
|
|
91
|
+
"-p": "--project";
|
|
92
|
+
"--cloud": BooleanConstructor;
|
|
93
|
+
"--url": StringConstructor;
|
|
94
|
+
"--token": StringConstructor;
|
|
95
|
+
"--session": BooleanConstructor;
|
|
96
|
+
"--anon": BooleanConstructor;
|
|
97
|
+
"--json": BooleanConstructor;
|
|
98
|
+
"--yes": BooleanConstructor;
|
|
99
|
+
"-y": "--yes";
|
|
100
|
+
};
|
|
101
|
+
export declare const UPDATE_FLAGS: {
|
|
102
|
+
"--data": StringConstructor;
|
|
103
|
+
"-d": string;
|
|
104
|
+
"--file": StringConstructor;
|
|
105
|
+
"--where": [StringConstructor];
|
|
106
|
+
"-w": string;
|
|
107
|
+
"--if-match": StringConstructor;
|
|
108
|
+
"--project": StringConstructor;
|
|
109
|
+
"-p": "--project";
|
|
110
|
+
"--cloud": BooleanConstructor;
|
|
111
|
+
"--url": StringConstructor;
|
|
112
|
+
"--token": StringConstructor;
|
|
113
|
+
"--session": BooleanConstructor;
|
|
114
|
+
"--anon": BooleanConstructor;
|
|
115
|
+
"--json": BooleanConstructor;
|
|
116
|
+
"--yes": BooleanConstructor;
|
|
117
|
+
"-y": "--yes";
|
|
118
|
+
};
|
|
119
|
+
export declare const DELETE_FLAGS: {
|
|
120
|
+
"--where": [StringConstructor];
|
|
121
|
+
"-w": string;
|
|
122
|
+
"--hard": BooleanConstructor;
|
|
123
|
+
"--project": StringConstructor;
|
|
124
|
+
"-p": "--project";
|
|
125
|
+
"--cloud": BooleanConstructor;
|
|
126
|
+
"--url": StringConstructor;
|
|
127
|
+
"--token": StringConstructor;
|
|
128
|
+
"--session": BooleanConstructor;
|
|
129
|
+
"--anon": BooleanConstructor;
|
|
130
|
+
"--json": BooleanConstructor;
|
|
131
|
+
"--yes": BooleanConstructor;
|
|
132
|
+
"-y": "--yes";
|
|
133
|
+
};
|
|
134
|
+
export declare const IMPORT_FLAGS: {
|
|
135
|
+
"--file": StringConstructor;
|
|
136
|
+
"--format": StringConstructor;
|
|
137
|
+
"--upsert": StringConstructor;
|
|
138
|
+
"--ignore-duplicates": BooleanConstructor;
|
|
139
|
+
"--batch": NumberConstructor;
|
|
140
|
+
"--project": StringConstructor;
|
|
141
|
+
"-p": "--project";
|
|
142
|
+
"--cloud": BooleanConstructor;
|
|
143
|
+
"--url": StringConstructor;
|
|
144
|
+
"--token": StringConstructor;
|
|
145
|
+
"--session": BooleanConstructor;
|
|
146
|
+
"--anon": BooleanConstructor;
|
|
147
|
+
"--json": BooleanConstructor;
|
|
148
|
+
"--yes": BooleanConstructor;
|
|
149
|
+
"-y": "--yes";
|
|
150
|
+
};
|
|
151
|
+
/** Parse one CSV document into rows of strings. Quotes, doubled quotes and newlines in quotes. Exported for tests. */
|
|
152
|
+
export declare function parseCsv(text: string): Record<string, string>[];
|
|
153
|
+
/** Rows out of a file, by its `--format` or its extension. Exported for tests. */
|
|
154
|
+
export declare function readImportRows(text: string, format: string): Record<string, unknown>[];
|
|
155
|
+
export declare const HISTORY_FLAGS: {
|
|
156
|
+
"--limit": NumberConstructor;
|
|
157
|
+
"-n": string;
|
|
158
|
+
"--offset": NumberConstructor;
|
|
159
|
+
"--project": StringConstructor;
|
|
160
|
+
"-p": "--project";
|
|
161
|
+
"--cloud": BooleanConstructor;
|
|
162
|
+
"--url": StringConstructor;
|
|
163
|
+
"--token": StringConstructor;
|
|
164
|
+
"--session": BooleanConstructor;
|
|
165
|
+
"--anon": BooleanConstructor;
|
|
166
|
+
"--json": BooleanConstructor;
|
|
167
|
+
"--yes": BooleanConstructor;
|
|
168
|
+
"-y": "--yes";
|
|
169
|
+
};
|
|
170
|
+
export declare const REVERT_FLAGS: {
|
|
171
|
+
"--project": StringConstructor;
|
|
172
|
+
"-p": "--project";
|
|
173
|
+
"--cloud": BooleanConstructor;
|
|
174
|
+
"--url": StringConstructor;
|
|
175
|
+
"--token": StringConstructor;
|
|
176
|
+
"--session": BooleanConstructor;
|
|
177
|
+
"--anon": BooleanConstructor;
|
|
178
|
+
"--json": BooleanConstructor;
|
|
179
|
+
"--yes": BooleanConstructor;
|
|
180
|
+
"-y": "--yes";
|
|
181
|
+
};
|
|
182
|
+
export declare const WATCH_FLAGS: {
|
|
183
|
+
"--where": [StringConstructor];
|
|
184
|
+
"-w": string;
|
|
185
|
+
"--limit": NumberConstructor;
|
|
186
|
+
"-n": string;
|
|
187
|
+
"--project": StringConstructor;
|
|
188
|
+
"-p": "--project";
|
|
189
|
+
"--cloud": BooleanConstructor;
|
|
190
|
+
"--url": StringConstructor;
|
|
191
|
+
"--token": StringConstructor;
|
|
192
|
+
"--session": BooleanConstructor;
|
|
193
|
+
"--anon": BooleanConstructor;
|
|
194
|
+
"--json": BooleanConstructor;
|
|
195
|
+
"--yes": BooleanConstructor;
|
|
196
|
+
"-y": "--yes";
|
|
197
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Everything the switch below dispatches, for the did-you-mean. */
|
|
2
|
+
export declare const FUNCTIONS_SUBCOMMANDS: readonly ["list", "invoke"];
|
|
3
|
+
export declare function functionsCommand(subcommand: string | undefined, rawArgs: string[]): Promise<void>;
|
|
4
|
+
export declare const FUNCTIONS_LIST_FLAGS: {
|
|
5
|
+
"--project": StringConstructor;
|
|
6
|
+
"-p": "--project";
|
|
7
|
+
"--cloud": BooleanConstructor;
|
|
8
|
+
"--url": StringConstructor;
|
|
9
|
+
"--token": StringConstructor;
|
|
10
|
+
"--session": BooleanConstructor;
|
|
11
|
+
"--anon": BooleanConstructor;
|
|
12
|
+
"--json": BooleanConstructor;
|
|
13
|
+
"--yes": BooleanConstructor;
|
|
14
|
+
"-y": "--yes";
|
|
15
|
+
};
|
|
16
|
+
export declare const FUNCTIONS_INVOKE_FLAGS: {
|
|
17
|
+
"--method": StringConstructor;
|
|
18
|
+
"-X": string;
|
|
19
|
+
"--field": [StringConstructor];
|
|
20
|
+
"-f": string;
|
|
21
|
+
"--raw-field": [StringConstructor];
|
|
22
|
+
"-F": string;
|
|
23
|
+
"--input": StringConstructor;
|
|
24
|
+
"--header": [StringConstructor];
|
|
25
|
+
"-H": string;
|
|
26
|
+
"--include": BooleanConstructor;
|
|
27
|
+
"-i": string;
|
|
28
|
+
"--project": StringConstructor;
|
|
29
|
+
"-p": "--project";
|
|
30
|
+
"--cloud": BooleanConstructor;
|
|
31
|
+
"--url": StringConstructor;
|
|
32
|
+
"--token": StringConstructor;
|
|
33
|
+
"--session": BooleanConstructor;
|
|
34
|
+
"--anon": BooleanConstructor;
|
|
35
|
+
"--json": BooleanConstructor;
|
|
36
|
+
"--yes": BooleanConstructor;
|
|
37
|
+
"-y": "--yes";
|
|
38
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const LOGS_FLAGS: {
|
|
2
|
+
"--follow": BooleanConstructor;
|
|
3
|
+
"-f": string;
|
|
4
|
+
"--level": StringConstructor;
|
|
5
|
+
"--source": StringConstructor;
|
|
6
|
+
"--search": StringConstructor;
|
|
7
|
+
"--grep": string;
|
|
8
|
+
"--since": StringConstructor;
|
|
9
|
+
"--limit": NumberConstructor;
|
|
10
|
+
"-n": string;
|
|
11
|
+
"--project": StringConstructor;
|
|
12
|
+
"-p": "--project";
|
|
13
|
+
"--cloud": BooleanConstructor;
|
|
14
|
+
"--url": StringConstructor;
|
|
15
|
+
"--token": StringConstructor;
|
|
16
|
+
"--session": BooleanConstructor;
|
|
17
|
+
"--anon": BooleanConstructor;
|
|
18
|
+
"--json": BooleanConstructor;
|
|
19
|
+
"--yes": BooleanConstructor;
|
|
20
|
+
"-y": "--yes";
|
|
21
|
+
};
|
|
22
|
+
export declare function logsCommand(rawArgs: string[]): Promise<void>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Everything the switch below dispatches, for the did-you-mean. */
|
|
2
|
+
export declare const RLS_SUBCOMMANDS: readonly ["simulate", "options"];
|
|
3
|
+
export declare function rlsCommand(subcommand: string | undefined, rawArgs: string[]): Promise<void>;
|
|
4
|
+
export declare const RLS_OPTIONS_FLAGS: {
|
|
5
|
+
"--project": StringConstructor;
|
|
6
|
+
"-p": "--project";
|
|
7
|
+
"--cloud": BooleanConstructor;
|
|
8
|
+
"--url": StringConstructor;
|
|
9
|
+
"--token": StringConstructor;
|
|
10
|
+
"--session": BooleanConstructor;
|
|
11
|
+
"--anon": BooleanConstructor;
|
|
12
|
+
"--json": BooleanConstructor;
|
|
13
|
+
"--yes": BooleanConstructor;
|
|
14
|
+
"-y": "--yes";
|
|
15
|
+
};
|
|
16
|
+
export declare const RLS_SIMULATE_FLAGS: {
|
|
17
|
+
"--role": StringConstructor;
|
|
18
|
+
"--user": StringConstructor;
|
|
19
|
+
"--key": StringConstructor;
|
|
20
|
+
"--table": StringConstructor;
|
|
21
|
+
"--project": StringConstructor;
|
|
22
|
+
"-p": "--project";
|
|
23
|
+
"--cloud": BooleanConstructor;
|
|
24
|
+
"--url": StringConstructor;
|
|
25
|
+
"--token": StringConstructor;
|
|
26
|
+
"--session": BooleanConstructor;
|
|
27
|
+
"--anon": BooleanConstructor;
|
|
28
|
+
"--json": BooleanConstructor;
|
|
29
|
+
"--yes": BooleanConstructor;
|
|
30
|
+
"-y": "--yes";
|
|
31
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { SchemaReconcilePlan } from "@rebasepro/types";
|
|
2
|
-
export declare const RECONCILE_USAGE = "rebase schema reconcile [--drop <table>.<column>]... [--yes]";
|
|
2
|
+
export declare const RECONCILE_USAGE = "rebase schema reconcile [--drop <table>.<column>]... [--yes] [--url <server> | --project <slug>]";
|
|
3
3
|
export declare function parseReconcileArgs(rawArgs: string[]): {
|
|
4
4
|
drop: string[];
|
|
5
5
|
yes: boolean;
|
|
6
|
+
target: Record<string, unknown>;
|
|
6
7
|
};
|
|
7
8
|
/** The plan, as a person reviews it. Returned as lines so it can be tested. */
|
|
8
9
|
export declare function describeReconcilePlan(plan: SchemaReconcilePlan): string[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const SCHEMA_SHOW_FLAGS: {
|
|
2
|
+
"--remote": BooleanConstructor;
|
|
3
|
+
"--schema-dir": StringConstructor;
|
|
4
|
+
"--project": StringConstructor;
|
|
5
|
+
"-p": "--project";
|
|
6
|
+
"--cloud": BooleanConstructor;
|
|
7
|
+
"--url": StringConstructor;
|
|
8
|
+
"--token": StringConstructor;
|
|
9
|
+
"--session": BooleanConstructor;
|
|
10
|
+
"--anon": BooleanConstructor;
|
|
11
|
+
"--json": BooleanConstructor;
|
|
12
|
+
"--yes": BooleanConstructor;
|
|
13
|
+
"-y": "--yes";
|
|
14
|
+
};
|
|
15
|
+
/** One table, as much of it as `show` prints — the same reading for a local descriptor and a served one. */
|
|
16
|
+
interface TableView {
|
|
17
|
+
slug: string;
|
|
18
|
+
name: string;
|
|
19
|
+
kind: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
primaryKey: string[];
|
|
22
|
+
columns: Array<{
|
|
23
|
+
key: string;
|
|
24
|
+
type: string;
|
|
25
|
+
nullable: boolean;
|
|
26
|
+
extra: string[];
|
|
27
|
+
}>;
|
|
28
|
+
relations: Array<{
|
|
29
|
+
key: string;
|
|
30
|
+
kind: string;
|
|
31
|
+
target: string;
|
|
32
|
+
}>;
|
|
33
|
+
rls: string;
|
|
34
|
+
}
|
|
35
|
+
/** Read a descriptor (`TableDescriptor`, local or served) into what `show` prints. */
|
|
36
|
+
export declare function tableView(raw: Record<string, unknown>): TableView;
|
|
37
|
+
export declare function schemaShowCommand(rawArgs: string[]): Promise<void>;
|
|
38
|
+
export {};
|