@tigrisdata/cli 3.11.0 → 3.12.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/auth/client.js +1 -1
- package/dist/auth/iam.js +1 -1
- package/dist/auth/provider.js +1 -1
- package/dist/browser/index.d.ts +307 -0
- package/dist/browser/index.js +2843 -0
- package/dist/{chunk-PUHRE62R.js → chunk-DBDETUU5.js} +1 -1
- package/dist/{chunk-TVH7NCXE.js → chunk-DM3Z47H2.js} +1 -1
- package/dist/chunk-HBEO4D3T.js +1 -0
- package/dist/{chunk-7Q44GQ2Y.js → chunk-JSAFHUUW.js} +1 -1
- package/dist/{chunk-5QNWWNPL.js → chunk-M7RSEBSZ.js} +1 -1
- package/dist/{chunk-Z5DYQHN2.js → chunk-NPKVQONE.js} +1 -1
- package/dist/{chunk-VPELL4UB.js → chunk-P2VGCQRK.js} +1 -1
- package/dist/{chunk-6TTEDYLD.js → chunk-RGFXGPV7.js} +1 -1
- package/dist/chunk-T7LA7K35.js +1 -0
- package/dist/{chunk-KJXUEGXY.js → chunk-UR3ROJIV.js} +1 -1
- package/dist/{chunk-7BUC7A7V.js → chunk-WLOUPDQT.js} +1 -1
- package/dist/{chunk-IEFUKJDE.js → chunk-XCTJOMF2.js} +1 -1
- package/dist/{chunk-GMZ3URGL.js → chunk-YL7RFWZJ.js} +1 -1
- package/dist/{chunk-GZMEHP36.js → chunk-YR7ZJNOL.js} +1 -1
- package/dist/chunk-Z6R2SWNJ.js +5 -0
- package/dist/cli-core.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/access-keys/assign.js +1 -1
- package/dist/lib/access-keys/attach-policy.js +1 -1
- package/dist/lib/access-keys/create.js +1 -1
- package/dist/lib/access-keys/delete.js +1 -1
- package/dist/lib/access-keys/detach-policy.js +1 -1
- package/dist/lib/access-keys/get.js +1 -1
- package/dist/lib/access-keys/list-policies.js +1 -1
- package/dist/lib/access-keys/list.js +1 -1
- package/dist/lib/access-keys/rotate.js +1 -1
- package/dist/lib/buckets/create.js +1 -1
- package/dist/lib/buckets/delete.js +1 -1
- package/dist/lib/buckets/disable-snapshots.js +1 -1
- package/dist/lib/buckets/enable-snapshots.js +1 -1
- package/dist/lib/buckets/get.js +1 -1
- package/dist/lib/buckets/lifecycle/create.js +1 -1
- package/dist/lib/buckets/lifecycle/edit.js +1 -1
- package/dist/lib/buckets/lifecycle/list.js +1 -1
- package/dist/lib/buckets/lifecycle/shared.js +1 -1
- package/dist/lib/buckets/list.js +1 -1
- package/dist/lib/buckets/merge.js +1 -1
- package/dist/lib/buckets/migrate.js +1 -1
- package/dist/lib/buckets/rebase.js +1 -1
- package/dist/lib/buckets/restore.js +1 -1
- package/dist/lib/buckets/set-cors.js +1 -1
- package/dist/lib/buckets/set-locations.js +1 -1
- package/dist/lib/buckets/set-migration.js +1 -1
- package/dist/lib/buckets/set-notifications.js +1 -1
- package/dist/lib/buckets/set.js +1 -1
- package/dist/lib/buckets/share.js +1 -1
- package/dist/lib/bundle.js +1 -1
- package/dist/lib/configure/index.js +1 -1
- package/dist/lib/cp.js +1 -1
- package/dist/lib/credentials/test.js +1 -1
- package/dist/lib/iam/policies/create.js +1 -1
- package/dist/lib/iam/policies/delete.js +1 -1
- package/dist/lib/iam/policies/edit.js +1 -1
- package/dist/lib/iam/policies/get.js +1 -1
- package/dist/lib/iam/policies/link-key.js +1 -1
- package/dist/lib/iam/policies/list-keys.js +1 -1
- package/dist/lib/iam/policies/list.js +1 -1
- package/dist/lib/iam/policies/select-policy.js +1 -1
- package/dist/lib/iam/policies/unlink-key.js +1 -1
- package/dist/lib/iam/teams/create.js +1 -1
- package/dist/lib/iam/teams/edit.js +1 -1
- package/dist/lib/iam/teams/list.js +1 -1
- package/dist/lib/iam/teams/shared.js +1 -1
- package/dist/lib/iam/users/invite.js +1 -1
- package/dist/lib/iam/users/list.js +1 -1
- package/dist/lib/iam/users/remove.js +1 -1
- package/dist/lib/iam/users/revoke-invitation.js +1 -1
- package/dist/lib/iam/users/update-role.js +1 -1
- package/dist/lib/login/credentials.js +1 -1
- package/dist/lib/login/oauth.js +1 -1
- package/dist/lib/login/select.js +1 -1
- package/dist/lib/logout.js +1 -1
- package/dist/lib/ls.js +1 -1
- package/dist/lib/mk.js +1 -1
- package/dist/lib/mv.js +1 -1
- package/dist/lib/objects/delete.js +1 -1
- package/dist/lib/objects/get.js +1 -1
- package/dist/lib/objects/info.js +1 -1
- package/dist/lib/objects/list-versions.js +1 -1
- package/dist/lib/objects/list.js +1 -1
- package/dist/lib/objects/purge.js +1 -1
- package/dist/lib/objects/put.js +1 -1
- package/dist/lib/objects/restore-deleted.js +1 -1
- package/dist/lib/objects/restore-info.js +1 -1
- package/dist/lib/objects/restore.js +1 -1
- package/dist/lib/objects/set-access.js +1 -1
- package/dist/lib/objects/set.js +1 -1
- package/dist/lib/organizations/create.js +1 -1
- package/dist/lib/organizations/list.js +1 -1
- package/dist/lib/organizations/select.js +1 -1
- package/dist/lib/presign.js +1 -1
- package/dist/lib/rm.js +1 -1
- package/dist/lib/snapshots/delete.js +1 -1
- package/dist/lib/snapshots/list.js +1 -1
- package/dist/lib/snapshots/take.js +1 -1
- package/dist/lib/stat.js +1 -1
- package/dist/lib/telemetry/disable.js +1 -1
- package/dist/lib/telemetry/enable.js +1 -1
- package/dist/lib/telemetry/status.js +1 -1
- package/dist/lib/touch.js +1 -1
- package/dist/lib/update.js +1 -1
- package/dist/lib/whoami.js +1 -1
- package/dist/utils/analytics.js +1 -1
- package/dist/utils/exit.js +1 -1
- package/dist/utils/telemetry.js +1 -1
- package/dist/utils/update-check.js +1 -1
- package/package.json +21 -5
- package/dist/chunk-5AGM4LUA.js +0 -5
- package/dist/chunk-J3MAV7JB.js +0 -1
- package/dist/chunk-Z54TMLIH.js +0 -1
package/dist/auth/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-HBEO4D3T.js";import"../chunk-F4AGJWCK.js";export{c as TigrisAuthClient,a as getAuth0Config,d as getAuthClient,b as setExternalTokenRefresher};
|
package/dist/auth/iam.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,b as c}from"../chunk-
|
|
1
|
+
import{a as b,b as c}from"../chunk-YR7ZJNOL.js";import"../chunk-Z6R2SWNJ.js";import"../chunk-RGFXGPV7.js";import"../chunk-D7WXNA2O.js";import"../chunk-NI4EYBQH.js";import"../chunk-JSAFHUUW.js";import"../chunk-DV3LCXRH.js";import"../chunk-T7LA7K35.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-QPUL2AAI.js";import"../chunk-HBEO4D3T.js";import{a}from"../chunk-KJBSIIND.js";import"../chunk-F4AGJWCK.js";export{c as getIAMConfig,b as getOAuthIAMConfig,a as isFlyOrganization};
|
package/dist/auth/provider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"../chunk-Z6R2SWNJ.js";import"../chunk-QPUL2AAI.js";import"../chunk-HBEO4D3T.js";import"../chunk-F4AGJWCK.js";export{c as getEnvCredentials,b as getEnvForcePathStyle,f as getStorageConfig,g as getStorageConfigWithOrg,a as getTigrisConfig,h as requireOAuthLogin,d as resetAutoLogin,e as resolveAuthMethod};
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { Organization } from '@tigrisdata/iam';
|
|
2
|
+
import * as memfs from 'memfs';
|
|
3
|
+
import { Volume } from 'memfs';
|
|
4
|
+
|
|
5
|
+
interface Argument {
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
alias?: string;
|
|
9
|
+
options?: string[] | Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}>;
|
|
14
|
+
default?: string;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
'required-when'?: string;
|
|
17
|
+
type?: 'positional' | 'flag' | string;
|
|
18
|
+
multiple?: boolean;
|
|
19
|
+
examples?: string[];
|
|
20
|
+
/** Hard-removed: providing the flag exits with a redirect message. */
|
|
21
|
+
removed?: boolean;
|
|
22
|
+
/** Soft-deprecated: still works, but flagged in help and superseded by `replaced_by`. */
|
|
23
|
+
deprecated?: boolean;
|
|
24
|
+
/** Replacement to suggest when a removed or deprecated argument or command is used. */
|
|
25
|
+
replaced_by?: string;
|
|
26
|
+
}
|
|
27
|
+
interface NextAction {
|
|
28
|
+
command: string;
|
|
29
|
+
description: string;
|
|
30
|
+
}
|
|
31
|
+
interface Messages {
|
|
32
|
+
onStart?: string;
|
|
33
|
+
onSuccess?: string;
|
|
34
|
+
onFailure?: string;
|
|
35
|
+
onEmpty?: string;
|
|
36
|
+
onAlreadyDone?: string;
|
|
37
|
+
onDeprecated?: string;
|
|
38
|
+
hint?: string;
|
|
39
|
+
nextActions?: NextAction[];
|
|
40
|
+
}
|
|
41
|
+
interface CommandSpec {
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
alias?: string | string[];
|
|
45
|
+
arguments?: Argument[];
|
|
46
|
+
examples?: string[];
|
|
47
|
+
commands?: CommandSpec[];
|
|
48
|
+
default?: string;
|
|
49
|
+
deprecated?: boolean;
|
|
50
|
+
/** Hard-removed: invoking the command exits with a redirect message. */
|
|
51
|
+
removed?: boolean;
|
|
52
|
+
/** Replacement to suggest when a removed argument or command is used. */
|
|
53
|
+
replaced_by?: string;
|
|
54
|
+
message?: string;
|
|
55
|
+
messages?: Messages;
|
|
56
|
+
}
|
|
57
|
+
interface Specs {
|
|
58
|
+
name: string;
|
|
59
|
+
description: string;
|
|
60
|
+
version: string;
|
|
61
|
+
definitions?: {
|
|
62
|
+
global_arguments?: Argument[];
|
|
63
|
+
[key: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
commands: CommandSpec[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The host environment a browser-embedded CLI runs against.
|
|
70
|
+
*
|
|
71
|
+
* Shims read the *current* host through `getHost()` rather than taking it as a
|
|
72
|
+
* parameter: the CLI's handlers are reached through commander and have no way
|
|
73
|
+
* to thread a context object down. `runCli()` installs the host for the
|
|
74
|
+
* duration of one invocation.
|
|
75
|
+
*
|
|
76
|
+
* The filesystem is deliberately not part of this interface — it is the
|
|
77
|
+
* process-wide memfs volume in `./volume.js`, which the surrounding shell also
|
|
78
|
+
* mounts, so both see the same bytes.
|
|
79
|
+
*/
|
|
80
|
+
interface SelectChoice {
|
|
81
|
+
/** Value handed back to the caller. */
|
|
82
|
+
value: string;
|
|
83
|
+
/** Text shown in the terminal. */
|
|
84
|
+
label: string;
|
|
85
|
+
hint?: string;
|
|
86
|
+
}
|
|
87
|
+
interface BrowserHost {
|
|
88
|
+
/** Terminal width, used by the table formatter. Defaults to 120. */
|
|
89
|
+
columns?: number;
|
|
90
|
+
/** Environment variables visible to the CLI. */
|
|
91
|
+
env?: Record<string, string>;
|
|
92
|
+
/**
|
|
93
|
+
* Ask a yes/no question. Backs enquirer's `confirm`; `initial` is what an
|
|
94
|
+
* empty answer means, as in enquirer.
|
|
95
|
+
*/
|
|
96
|
+
confirm(message: string, options?: {
|
|
97
|
+
initial?: boolean;
|
|
98
|
+
}): Promise<boolean>;
|
|
99
|
+
/** Ask for a line of text. Backs enquirer's `input`/`password` prompts. */
|
|
100
|
+
input(message: string, options?: {
|
|
101
|
+
password?: boolean;
|
|
102
|
+
initial?: string;
|
|
103
|
+
}): Promise<string>;
|
|
104
|
+
/**
|
|
105
|
+
* Ask the user to pick from a list. Backs enquirer's `select`; `initial` is
|
|
106
|
+
* the choice an empty answer means — an index, or a choice's value — as in
|
|
107
|
+
* enquirer.
|
|
108
|
+
*/
|
|
109
|
+
select(message: string, choices: SelectChoice[], options?: {
|
|
110
|
+
initial?: number | string;
|
|
111
|
+
}): Promise<string>;
|
|
112
|
+
/**
|
|
113
|
+
* Start an interactive login. Replaces the CLI's device-flow login, which
|
|
114
|
+
* cannot run in a page: `auth.storage.tigrisdata.io/oauth/device/code`
|
|
115
|
+
* returns no `Access-Control-Allow-Origin`. Implementations use Auth0's
|
|
116
|
+
* official SPA SDK and write the result through `auth/storage.ts`.
|
|
117
|
+
*/
|
|
118
|
+
login?(): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Discard any browser-side session the host holds, on `tigris logout`.
|
|
121
|
+
*
|
|
122
|
+
* The CLI's own logout clears its credential store, but it knows nothing
|
|
123
|
+
* about an Auth0 SPA session in `localStorage` — without this, logging out
|
|
124
|
+
* and reloading signs you straight back in.
|
|
125
|
+
*/
|
|
126
|
+
logout?(): Promise<void>;
|
|
127
|
+
/** Open a URL — the browser equivalent of the `open` package. */
|
|
128
|
+
openUrl?(url: string): void;
|
|
129
|
+
/**
|
|
130
|
+
* Renew the OAuth session, on demand from the CLI. Its own refresh path
|
|
131
|
+
* posts a refresh token, which it does not hold in a browser — Auth0's SPA
|
|
132
|
+
* SDK keeps that in its own cache. Implementations refresh through the SDK
|
|
133
|
+
* and install the result with `setOAuthSession`. Called when the access
|
|
134
|
+
* token is within five minutes of expiry, including mid-command during a
|
|
135
|
+
* long upload.
|
|
136
|
+
*/
|
|
137
|
+
refreshSession?(): Promise<void>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Thrown by the browser `process.exit` shim in place of terminating the process.
|
|
142
|
+
*
|
|
143
|
+
* The Node CLI reaches `process.exit()` from ~330 call sites (302 via
|
|
144
|
+
* `exitWithError`/`failWithError`, plus direct calls). Those functions are typed
|
|
145
|
+
* `: never`, and throwing preserves that contract exactly — so no handler needs
|
|
146
|
+
* to change for the browser build. `runCli()` catches this and turns it back
|
|
147
|
+
* into an exit code.
|
|
148
|
+
*/
|
|
149
|
+
declare class ExitSignal extends Error {
|
|
150
|
+
readonly exitCode: number;
|
|
151
|
+
constructor(exitCode: number);
|
|
152
|
+
}
|
|
153
|
+
declare function isExitSignal(error: unknown): error is ExitSignal;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Auth provider
|
|
157
|
+
* Resolves auth method and provides storage config + service endpoints
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
type TigrisStorageConfig = {
|
|
161
|
+
bucket?: string;
|
|
162
|
+
accessKeyId?: string;
|
|
163
|
+
secretAccessKey?: string;
|
|
164
|
+
endpoint?: string;
|
|
165
|
+
forcePathStyle?: boolean;
|
|
166
|
+
sessionToken?: string;
|
|
167
|
+
organizationId?: string;
|
|
168
|
+
iamEndpoint?: string;
|
|
169
|
+
authDomain?: string;
|
|
170
|
+
credentialProvider?: () => Promise<{
|
|
171
|
+
accessKeyId: string;
|
|
172
|
+
secretAccessKey: string;
|
|
173
|
+
sessionToken?: string;
|
|
174
|
+
expiration?: Date;
|
|
175
|
+
}>;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Installing credentials into the CLI's own credential store.
|
|
180
|
+
*
|
|
181
|
+
* The browser build cannot run the CLI's device-flow login — Auth0's
|
|
182
|
+
* `/oauth/device/code` sends no CORS headers — so the host performs login (via
|
|
183
|
+
* Auth0's SPA SDK) and hands the result here. Everything downstream then works
|
|
184
|
+
* unmodified: `getStorageConfig()` resolves it, `whoami` reports it, `logout`
|
|
185
|
+
* clears it, and token refresh goes through the CLI's existing client.
|
|
186
|
+
*
|
|
187
|
+
* The store writes to `~/.tigris/config.json` on the in-memory volume, so
|
|
188
|
+
* nothing survives a page reload.
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
interface OAuthSession {
|
|
192
|
+
accessToken: string;
|
|
193
|
+
refreshToken?: string;
|
|
194
|
+
idToken?: string;
|
|
195
|
+
/** Unix ms. Defaults to one hour out when the provider does not say. */
|
|
196
|
+
expiresAt?: number;
|
|
197
|
+
organizations?: Organization[];
|
|
198
|
+
/** Organization id to make active. Defaults to the first one. */
|
|
199
|
+
selectedOrganization?: string;
|
|
200
|
+
}
|
|
201
|
+
interface AccessKeySession {
|
|
202
|
+
accessKeyId: string;
|
|
203
|
+
secretAccessKey: string;
|
|
204
|
+
endpoint?: string;
|
|
205
|
+
organizationId?: string;
|
|
206
|
+
}
|
|
207
|
+
/** Install an OAuth session obtained by the host. */
|
|
208
|
+
declare function setOAuthSession(session: OAuthSession): Promise<void>;
|
|
209
|
+
interface RenewedTokens {
|
|
210
|
+
accessToken: string;
|
|
211
|
+
/** Kept from the current session when the refresh response carries none. */
|
|
212
|
+
idToken?: string;
|
|
213
|
+
/** Unix ms. Defaults to one hour out when the provider does not say. */
|
|
214
|
+
expiresAt?: number;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Replace the access token of the current OAuth session, keeping everything
|
|
218
|
+
* else. A refresh response does not always carry an ID token, and `whoami`
|
|
219
|
+
* reads the user's identity out of the stored one — installing the refreshed
|
|
220
|
+
* set with `setOAuthSession` would wipe it.
|
|
221
|
+
*
|
|
222
|
+
* @throws if there is no OAuth session to renew.
|
|
223
|
+
*/
|
|
224
|
+
declare function renewOAuthSession(tokens: RenewedTokens): Promise<void>;
|
|
225
|
+
/**
|
|
226
|
+
* Install access-key credentials. Stored as *temporary* credentials — the same
|
|
227
|
+
* slot `tigris login credentials` uses, which `logout` clears.
|
|
228
|
+
*/
|
|
229
|
+
declare function setAccessKeySession(session: AccessKeySession): Promise<void>;
|
|
230
|
+
/** Forget everything. Equivalent to `tigris logout`. */
|
|
231
|
+
declare function clearSession(): Promise<void>;
|
|
232
|
+
/**
|
|
233
|
+
* The resolved storage config for the active session — the same object every
|
|
234
|
+
* CLI handler passes to the SDK. Exposed so a host can mount buckets or make
|
|
235
|
+
* SDK calls of its own without re-deriving credentials.
|
|
236
|
+
*
|
|
237
|
+
* @throws if nothing is authenticated.
|
|
238
|
+
*/
|
|
239
|
+
declare function getSessionConfig(): Promise<TigrisStorageConfig>;
|
|
240
|
+
interface SessionState {
|
|
241
|
+
method: 'oauth' | 'credentials' | null;
|
|
242
|
+
organizationId: string | null;
|
|
243
|
+
}
|
|
244
|
+
declare function getSessionState(): SessionState;
|
|
245
|
+
|
|
246
|
+
declare const HOME_DIR = "/home/tigris";
|
|
247
|
+
declare const volume: Volume;
|
|
248
|
+
/** Node-compatible `fs` bound to {@link volume}. */
|
|
249
|
+
declare const fs: memfs.IFs;
|
|
250
|
+
/** Drop every file and start clean — used between tests and on logout. */
|
|
251
|
+
declare function resetVolume(): void;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Browser entry point for Tigris CLI.
|
|
255
|
+
*
|
|
256
|
+
* Runs the *same* commander program and the *same* `src/lib` handlers as the
|
|
257
|
+
* Node CLI, driven by the same `specs.yaml`. The differences are confined to
|
|
258
|
+
* the build: node builtins are aliased to the shims in `./shims`, and the free
|
|
259
|
+
* `process` and `console` identifiers are replaced at bundle time so
|
|
260
|
+
* `process.exit()` becomes a catchable throw and output is captured instead of
|
|
261
|
+
* being written to a terminal.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```ts
|
|
265
|
+
* import { createBrowserCli, volume } from '@tigrisdata/cli/browser';
|
|
266
|
+
*
|
|
267
|
+
* const cli = createBrowserCli({
|
|
268
|
+
* confirm: (message) => terminal.confirm(message),
|
|
269
|
+
* input: (message, options) => terminal.input(message, options),
|
|
270
|
+
* select: (message, choices) => terminal.select(message, choices),
|
|
271
|
+
* login: () => auth0Login(),
|
|
272
|
+
* });
|
|
273
|
+
*
|
|
274
|
+
* const { stdout, exitCode } = await cli.run(['objects', 'list', 'my-bucket']);
|
|
275
|
+
* ```
|
|
276
|
+
*/
|
|
277
|
+
|
|
278
|
+
interface CliResult {
|
|
279
|
+
stdout: string;
|
|
280
|
+
stderr: string;
|
|
281
|
+
exitCode: number;
|
|
282
|
+
/**
|
|
283
|
+
* `'bytes'` when the command streamed binary to stdout — `stdout` is then a
|
|
284
|
+
* latin1 string (one char per byte) to be forwarded verbatim. Otherwise
|
|
285
|
+
* `'text'`.
|
|
286
|
+
*/
|
|
287
|
+
stdoutKind: 'text' | 'bytes';
|
|
288
|
+
}
|
|
289
|
+
interface RunOptions {
|
|
290
|
+
/**
|
|
291
|
+
* Bytes piped into this invocation. Providing it makes `process.stdin.isTTY`
|
|
292
|
+
* false, which is how the CLI detects piped input (`objects put`, `bundle`).
|
|
293
|
+
*/
|
|
294
|
+
stdin?: Uint8Array;
|
|
295
|
+
/** Directory to run in, so relative paths resolve as the user expects. */
|
|
296
|
+
cwd?: string;
|
|
297
|
+
}
|
|
298
|
+
interface BrowserCli {
|
|
299
|
+
run(argv: string[], options?: RunOptions): Promise<CliResult>;
|
|
300
|
+
/** Command paths available in this build, e.g. `['objects/list', ...]`. */
|
|
301
|
+
commands(): string[];
|
|
302
|
+
/** The parsed command tree, for help text and tab completion. */
|
|
303
|
+
specs(): Specs;
|
|
304
|
+
}
|
|
305
|
+
declare function createBrowserCli(host: BrowserHost): BrowserCli;
|
|
306
|
+
|
|
307
|
+
export { type AccessKeySession, type BrowserCli, type BrowserHost, type CliResult, ExitSignal, HOME_DIR, type OAuthSession, type RenewedTokens, type RunOptions, type SelectChoice, type SessionState, type TigrisStorageConfig, clearSession, createBrowserCli, fs, getSessionConfig, getSessionState, isExitSignal, renewOAuthSession, resetVolume, setAccessKeySession, setOAuthSession, volume };
|