@gravity-rail/cli 0.56.0 → 0.57.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/README.md +5 -1
- package/dist/{account-verify-phone-IK6O7IQJ.js → account-verify-phone-Q4FKI4PX.js} +3 -3
- package/dist/{chunk-5UCDTTIU.js → chunk-CB4K2FBU.js} +47 -3
- package/dist/chunk-CB4K2FBU.js.map +1 -0
- package/dist/{chunk-SSJ7CRGL.js → chunk-TY6HKHOV.js} +2 -2
- package/dist/cli-utils.js +1 -1
- package/dist/gr.js +1272 -420
- package/dist/gr.js.map +1 -1
- package/dist/lib.d.ts +32 -3
- package/dist/lib.js +752 -345
- package/dist/lib.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-5UCDTTIU.js.map +0 -1
- /package/dist/{account-verify-phone-IK6O7IQJ.js.map → account-verify-phone-Q4FKI4PX.js.map} +0 -0
- /package/dist/{chunk-SSJ7CRGL.js.map → chunk-TY6HKHOV.js.map} +0 -0
package/dist/lib.d.ts
CHANGED
|
@@ -293,6 +293,13 @@ interface CommandDef<T = unknown> {
|
|
|
293
293
|
* does not mutate. false: the command reads a dedicated binary/CSV file argument.
|
|
294
294
|
*/
|
|
295
295
|
acceptsJsonInput?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* The JSON body is usually another command's output (`gr x list -o json | gr x import`):
|
|
298
|
+
* wait for piped stdin (see `commandAwaitsPipedInput`) instead of treating a pipe whose
|
|
299
|
+
* producer has not written yet as no input. A function decides per invocation, for a
|
|
300
|
+
* command whose body is optional with some flags. Implies `acceptsJsonInput`.
|
|
301
|
+
*/
|
|
302
|
+
pipesJsonInput?: boolean | ((args: ParsedArgs) => boolean);
|
|
296
303
|
columns?: TableColumn<T>[];
|
|
297
304
|
handler: (hctx: CommandHandlerContext) => Promise<void>;
|
|
298
305
|
}
|
|
@@ -393,8 +400,30 @@ declare function isWorkspaceExportZip(data: unknown): data is WorkspaceExportZip
|
|
|
393
400
|
* skips the body.
|
|
394
401
|
*/
|
|
395
402
|
declare function commandNeedsJsonBody(cmd: CommandDef, parsedArgs: ParsedArgs): boolean;
|
|
396
|
-
/**
|
|
397
|
-
|
|
403
|
+
/**
|
|
404
|
+
* How long a command whose input is another command's output waits for the
|
|
405
|
+
* first byte on piped stdin. The producer (`gr hubspot search -o json | …`)
|
|
406
|
+
* may spend seconds on a vendor API before it writes anything.
|
|
407
|
+
*/
|
|
408
|
+
declare const PIPED_INPUT_FIRST_BYTE_WAIT_MS = 60000;
|
|
409
|
+
/**
|
|
410
|
+
* Whether this invocation should wait for piped stdin rather than treat a
|
|
411
|
+
* silent pipe as "no input": the command declares `pipesJsonInput` and no
|
|
412
|
+
* --data / --file was given.
|
|
413
|
+
*/
|
|
414
|
+
declare function commandAwaitsPipedInput(cmd: CommandDef, parsedArgs: ParsedArgs): boolean;
|
|
415
|
+
/** The JSON body a dispatcher hands this command's handler, or undefined. */
|
|
416
|
+
declare function readCommandJsonInput(cmd: CommandDef, parsedArgs: ParsedArgs): Promise<unknown | undefined>;
|
|
417
|
+
/**
|
|
418
|
+
* Read JSON input from --data string, --file path, or stdin (if piped).
|
|
419
|
+
*
|
|
420
|
+
* `pipedInputWaitMs` > 0 waits up to that long for the first byte on a
|
|
421
|
+
* non-TTY stdin, then reads to EOF. 0 (the default) returns undefined at once
|
|
422
|
+
* when nothing is buffered, so an inherited idle stdin never hangs a command.
|
|
423
|
+
*/
|
|
424
|
+
declare function readJsonInput(args: ParsedArgs, options?: {
|
|
425
|
+
pipedInputWaitMs?: number;
|
|
426
|
+
}): Promise<unknown | undefined>;
|
|
398
427
|
|
|
399
428
|
/** True when the number is a provisioned test placeholder, not a real handset. */
|
|
400
429
|
declare function isLikelySeedPhoneNumber(phone: string): boolean;
|
|
@@ -720,4 +749,4 @@ declare function organizationsListCommand(ctx: AuthenticatedContext, options?: {
|
|
|
720
749
|
|
|
721
750
|
declare function whoamiCommand(ctx: AuthenticatedContext): Promise<void>;
|
|
722
751
|
|
|
723
|
-
export { type ArgDef, AuthRequiredError, type AuthenticatedContext, CLIError, COL, type CommandContext, type CommandDef, type CommandHandlerContext, CommandRegistry, type ConciergeChat, type ConciergeMessage, type DomainDef, type GlobalOptions, type GlobalOptionsResult, type GlobalOptionsSpec, LIST_PAGINATION_ARGS, type OutputFormat, type OutputOptions, PAGINATION_ARGS, type PaginationMeta, type ParsedArgs, type ParsedGlobalOptions, type PublicGlobalOptions, type TableColumn, WORKSPACE_EXPORT_ZIP, type WorkspaceExportZipInput, authBrowserCommand, authImportDevCommand, authListCommand, authSwitchCommand, chatCommand, commandNeedsJsonBody, conciergeCommand, conciergeOutboundCommand, confirmAccountPhoneVerify, createAuthenticatedContext, createConciergeChat, createContext, createPublicAuthenticatedContext, createPublicContext, crudCommands, detectOutputFormat, devImportLocalCommand, extractPaginationMeta, fetchAllCursorPages, fetchAllPages, flushStdout, formatPaginationWarning, getConciergeChat, getConciergeChatMessages, getStartedCommand, handleError, hint, importDevProfiles, isCursorPaginatedResponse, isDirectoryTrusted, isLikelySeedPhoneNumber, isListResult, isPagePaginatedResponse, isPaginatedResponse, isWorkspaceExportZip, listConciergeChats, listResult, loginCommand, logoutCommand, manageCommand, organizationsListCommand, originateConciergeCall, originateConciergeSms, outputData, outputSingle, parseArgs, parseGlobalOptions, parsePaginationArgs, profilesFromDevRealms, readJsonInput, registerPublicDomains, requireAuth, requireDirectoryTrust, requireNumber, requireString, resolveVoicePhoneNumberId, simpleCrudCommands, startAccountPhoneVerify, stderr, topLevelCommands, unwrapItems, waitForOutboundPhoneCallOutcome, whoamiCommand };
|
|
752
|
+
export { type ArgDef, AuthRequiredError, type AuthenticatedContext, CLIError, COL, type CommandContext, type CommandDef, type CommandHandlerContext, CommandRegistry, type ConciergeChat, type ConciergeMessage, type DomainDef, type GlobalOptions, type GlobalOptionsResult, type GlobalOptionsSpec, LIST_PAGINATION_ARGS, type OutputFormat, type OutputOptions, PAGINATION_ARGS, PIPED_INPUT_FIRST_BYTE_WAIT_MS, type PaginationMeta, type ParsedArgs, type ParsedGlobalOptions, type PublicGlobalOptions, type TableColumn, WORKSPACE_EXPORT_ZIP, type WorkspaceExportZipInput, authBrowserCommand, authImportDevCommand, authListCommand, authSwitchCommand, chatCommand, commandAwaitsPipedInput, commandNeedsJsonBody, conciergeCommand, conciergeOutboundCommand, confirmAccountPhoneVerify, createAuthenticatedContext, createConciergeChat, createContext, createPublicAuthenticatedContext, createPublicContext, crudCommands, detectOutputFormat, devImportLocalCommand, extractPaginationMeta, fetchAllCursorPages, fetchAllPages, flushStdout, formatPaginationWarning, getConciergeChat, getConciergeChatMessages, getStartedCommand, handleError, hint, importDevProfiles, isCursorPaginatedResponse, isDirectoryTrusted, isLikelySeedPhoneNumber, isListResult, isPagePaginatedResponse, isPaginatedResponse, isWorkspaceExportZip, listConciergeChats, listResult, loginCommand, logoutCommand, manageCommand, organizationsListCommand, originateConciergeCall, originateConciergeSms, outputData, outputSingle, parseArgs, parseGlobalOptions, parsePaginationArgs, profilesFromDevRealms, readCommandJsonInput, readJsonInput, registerPublicDomains, requireAuth, requireDirectoryTrust, requireNumber, requireString, resolveVoicePhoneNumberId, simpleCrudCommands, startAccountPhoneVerify, stderr, topLevelCommands, unwrapItems, waitForOutboundPhoneCallOutcome, whoamiCommand };
|