@gravity-rail/cli 0.57.0 → 0.57.1
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/{account-verify-phone-Q4FKI4PX.js → account-verify-phone-T7N53V35.js} +3 -3
- package/dist/{chunk-CB4K2FBU.js → chunk-462YYQU5.js} +3 -3
- package/dist/{chunk-CB4K2FBU.js.map → chunk-462YYQU5.js.map} +1 -1
- package/dist/{chunk-TY6HKHOV.js → chunk-HNR2SIJP.js} +2 -2
- package/dist/{cli-client-context-cd5f2JKX.d.ts → cli-client-context-NJgZhyfd.d.ts} +2 -1
- package/dist/cli-utils.d.ts +5 -3
- package/dist/cli-utils.js +1 -1
- package/dist/gr.js +68 -40
- package/dist/gr.js.map +1 -1
- package/dist/lib.d.ts +4 -3
- package/dist/lib.js +31 -18
- package/dist/lib.js.map +1 -1
- package/package.json +3 -3
- /package/dist/{account-verify-phone-Q4FKI4PX.js.map → account-verify-phone-T7N53V35.js.map} +0 -0
- /package/dist/{chunk-TY6HKHOV.js.map → chunk-HNR2SIJP.js.map} +0 -0
package/dist/lib.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GravityRailClient, PhoneCall } from '@gravity-rail/sdk';
|
|
2
|
-
import {
|
|
3
|
-
export { b as ConciergeAppContextPayload,
|
|
2
|
+
import { EnvironmentConfig, CredentialsManager, CLICredentials } from './cli-utils.js';
|
|
3
|
+
export { b as ConciergeAppContextPayload, j as buildCliConciergeAppContext } from './cli-client-context-NJgZhyfd.js';
|
|
4
4
|
|
|
5
5
|
/** Metadata extracted from a paginated API response */
|
|
6
6
|
interface PaginationMeta {
|
|
@@ -749,4 +749,5 @@ declare function organizationsListCommand(ctx: AuthenticatedContext, options?: {
|
|
|
749
749
|
|
|
750
750
|
declare function whoamiCommand(ctx: AuthenticatedContext): Promise<void>;
|
|
751
751
|
|
|
752
|
-
export {
|
|
752
|
+
export { AuthRequiredError, CLIError, COL, CommandRegistry, LIST_PAGINATION_ARGS, PAGINATION_ARGS, PIPED_INPUT_FIRST_BYTE_WAIT_MS, WORKSPACE_EXPORT_ZIP, 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 };
|
|
753
|
+
export type { ArgDef, AuthenticatedContext, CommandContext, CommandDef, CommandHandlerContext, ConciergeChat, ConciergeMessage, DomainDef, GlobalOptions, GlobalOptionsResult, GlobalOptionsSpec, OutputFormat, OutputOptions, PaginationMeta, ParsedArgs, ParsedGlobalOptions, PublicGlobalOptions, TableColumn, WorkspaceExportZipInput };
|
package/dist/lib.js
CHANGED
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
startAccountPhoneVerify,
|
|
34
34
|
stderr,
|
|
35
35
|
unwrapItems
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-HNR2SIJP.js";
|
|
37
37
|
import {
|
|
38
38
|
AGUIClient,
|
|
39
39
|
formatTimestamp,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
isRecord,
|
|
43
43
|
performOAuthFlow,
|
|
44
44
|
selectFromList
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-462YYQU5.js";
|
|
46
46
|
import {
|
|
47
47
|
AuthRequiredError,
|
|
48
48
|
CLIError,
|
|
@@ -12176,6 +12176,7 @@ function bareLabel(ref) {
|
|
|
12176
12176
|
return `${ref.kind}:${shortUuid(ref.uuid)}`;
|
|
12177
12177
|
}
|
|
12178
12178
|
var MAX_REFS_PER_BATCH = 500;
|
|
12179
|
+
var MAX_WORKSPACES_PER_BATCH = 25;
|
|
12179
12180
|
function batchResolution(ref, entry) {
|
|
12180
12181
|
if (entry.status === "resolved") {
|
|
12181
12182
|
return { label: entry.label || bareLabel(ref), status: "resolved" };
|
|
@@ -12270,28 +12271,40 @@ var ActivityRefResolver = class {
|
|
|
12270
12271
|
/**
|
|
12271
12272
|
* One org call per chunk, each carrying whole workspace groups.
|
|
12272
12273
|
*
|
|
12273
|
-
* The server
|
|
12274
|
-
*
|
|
12275
|
-
*
|
|
12276
|
-
*
|
|
12274
|
+
* The server caps a grouped request at both 500 refs and 25 workspaces, and
|
|
12275
|
+
* accepts each workspace at most once per request. So a group larger than
|
|
12276
|
+
* the ref cap is split across requests, smaller groups ride together until
|
|
12277
|
+
* the next one would not fit either bound, and no request names a workspace
|
|
12278
|
+
* twice.
|
|
12277
12279
|
*/
|
|
12278
12280
|
async primeOrg(orgUuid, groups) {
|
|
12279
12281
|
const chunks = [];
|
|
12280
|
-
let current =
|
|
12281
|
-
let
|
|
12282
|
+
let current = /* @__PURE__ */ new Map();
|
|
12283
|
+
let refsInChunk = 0;
|
|
12284
|
+
const flush = () => {
|
|
12285
|
+
if (current.size === 0) return;
|
|
12286
|
+
chunks.push(
|
|
12287
|
+
[...current].map(
|
|
12288
|
+
([workspaceUuid, refs]) => [workspaceUuid, refs]
|
|
12289
|
+
)
|
|
12290
|
+
);
|
|
12291
|
+
current = /* @__PURE__ */ new Map();
|
|
12292
|
+
refsInChunk = 0;
|
|
12293
|
+
};
|
|
12282
12294
|
for (const [workspaceUuid, refs] of groups) {
|
|
12283
|
-
for (let start = 0; start < refs.length;
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
chunks.push(current);
|
|
12287
|
-
current = [];
|
|
12288
|
-
size = 0;
|
|
12295
|
+
for (let start = 0; start < refs.length; ) {
|
|
12296
|
+
if (!current.has(workspaceUuid) && current.size === MAX_WORKSPACES_PER_BATCH) {
|
|
12297
|
+
flush();
|
|
12289
12298
|
}
|
|
12290
|
-
|
|
12291
|
-
|
|
12299
|
+
const room = MAX_REFS_PER_BATCH - refsInChunk;
|
|
12300
|
+
const slice = refs.slice(start, start + room);
|
|
12301
|
+
current.set(workspaceUuid, slice);
|
|
12302
|
+
refsInChunk += slice.length;
|
|
12303
|
+
start += slice.length;
|
|
12304
|
+
if (refsInChunk === MAX_REFS_PER_BATCH) flush();
|
|
12292
12305
|
}
|
|
12293
12306
|
}
|
|
12294
|
-
|
|
12307
|
+
flush();
|
|
12295
12308
|
for (const chunk of chunks) {
|
|
12296
12309
|
const key = `org:${orgUuid}|${chunk.map(
|
|
12297
12310
|
([workspaceUuid, refs]) => `${workspaceUuid}:${refs.map((ref) => `${ref.kind}|${ref.uuid}`).sort().join(",")}`
|
|
@@ -27597,7 +27610,7 @@ var topLevelCommands = [
|
|
|
27597
27610
|
mutates: true,
|
|
27598
27611
|
args: [{ name: "phone", description: "E.164 phone number (optional; prompts if omitted)" }],
|
|
27599
27612
|
handler: async (hctx) => {
|
|
27600
|
-
const { accountVerifyPhoneCommand } = await import("./account-verify-phone-
|
|
27613
|
+
const { accountVerifyPhoneCommand } = await import("./account-verify-phone-T7N53V35.js");
|
|
27601
27614
|
await accountVerifyPhoneCommand(hctx);
|
|
27602
27615
|
}
|
|
27603
27616
|
},
|