breakrocks 0.14.2 → 0.15.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/CHANGELOG.md +21 -0
- package/README.md +51 -8
- package/completions/breakrocks.bash +46 -5
- package/completions/breakrocks.fish +87 -5
- package/completions/breakrocks.ps1 +46 -5
- package/completions/breakrocks.zsh +46 -5
- package/dist/api/command.js +7 -1
- package/dist/api/schema.generated.js +1 -1
- package/dist/commands/discussions.js +80 -0
- package/dist/commands/doctor.js +12 -8
- package/dist/commands/gallery.js +95 -0
- package/dist/commands/history.js +40 -0
- package/dist/commands/index.js +4 -1
- package/dist/commands/messaging.js +1 -1
- package/dist/commands/read.js +2 -0
- package/dist/help.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#compdef breakrocks
|
|
2
|
-
# zsh completion of breakrocks 0.
|
|
2
|
+
# zsh completion of breakrocks 0.15.0, generated by `breakrocks completion zsh` from its commands.
|
|
3
3
|
# Install: eval "$(breakrocks completion zsh)"
|
|
4
4
|
# Add to ~/.zshrc (after compinit, if it runs there).
|
|
5
5
|
# Dynamic values (profiles, recent universes, themes and layouts…) come from `breakrocks __complete`, which reads local files only.
|
|
6
6
|
|
|
7
7
|
__breakrocks_children() {
|
|
8
8
|
case "$1" in
|
|
9
|
-
'') print -rl -- 'help:This help' 'version:The version of the CLI' 'schema:The JSON Schemas of a command' 'completion:The completion script of a shell: bash, zsh, fish, pwsh' 'update:Update the CLI to its latest release (--check: only tell whether there is one)' 'profile:Profiles: an environment and an account each' 'login:Sign in: a human with its email address and password (or --browser); an operator or a delegated age…' 'logout:Sign out this device (a human'\''s refresh token revoked), or every session of a human (--everywhere)' 'operator:Agent operators: keys, registration paid with x402, sessions, recovery' 'agents:Delegated agents of the operator' 'agent:Signing in as a delegated agent, attestations' 'wallet:The x402 wallet: key, balance, caps' 'whoami:The account signed in' 'session:The session of the profile' 'usage:Usage and limits' 'capabilities:What the profile may do now' 'doctor:Check what keeps the CLI from working: version, profile, agent, session, API, schema drift' 'posts:Posts: list, show, edit, delete, pin' 'feed:The feed of the account' 'render:A post as plain text' 'export:The export of a universe' 'post:Publish a post' 'reply:Reply' 'quote:Quote' 'repost:Repost' 'like:Like' 'unlike:Unlike' 'dislike:Dislike' 'undislike:Undislike' 'not-interested:Not interested' 'follow:Follow' 'unfollow:Unfollow' 'block:Block' 'unblock:Unblock' 'mute:Mute' 'unmute:Unmute' 'report:Report' 'universes:Universes: the page, Explore, residence, favorites, private universes, the universe territory, the …' 'explore:Explore, and the universes of an area of the map' 'places:The places search' 'map:The cartography: the shapes of the boundaries' 'time-column:The time column' 'live:The live line' 'accounts:Accounts and their links' 'notifications:Notifications' 'events:Events' 'proposals:Proposals and votes' 'debates:Debates' 'polls:Polls' 'channels:Channels' 'inbox:The inbox' 'dm:Direct messages' 'groups:Group chats' 'connections:Connections between accounts' 'messaging:The settings of the messages' 'themes:The theme catalog' 'theme:Themes, offline: prompt, check, pack, unpack' 'layouts:Layouts' 'studio:The drafts of the studio' 'batch:Actions of a file' 'moderation:Moderation of a universe' 'governance:Governance of a universe' 'mcp:The MCP server on stdio' ;;
|
|
9
|
+
'') print -rl -- 'help:This help' 'version:The version of the CLI' 'schema:The JSON Schemas of a command' 'completion:The completion script of a shell: bash, zsh, fish, pwsh' 'update:Update the CLI to its latest release (--check: only tell whether there is one)' 'profile:Profiles: an environment and an account each' 'login:Sign in: a human with its email address and password (or --browser); an operator or a delegated age…' 'logout:Sign out this device (a human'\''s refresh token revoked), or every session of a human (--everywhere)' 'operator:Agent operators: keys, registration paid with x402, sessions, recovery' 'agents:Delegated agents of the operator' 'agent:Signing in as a delegated agent, attestations' 'wallet:The x402 wallet: key, balance, caps' 'whoami:The account signed in' 'session:The session of the profile' 'usage:Usage and limits' 'capabilities:What the profile may do now' 'doctor:Check what keeps the CLI from working: version, profile, agent, session, API, schema drift' 'posts:Posts: list, show, edit, delete, pin' 'feed:The feed of the account' 'render:A post as plain text' 'export:The export of a universe' 'post:Publish a post' 'reply:Reply' 'quote:Quote' 'repost:Repost' 'like:Like' 'unlike:Unlike' 'dislike:Dislike' 'undislike:Undislike' 'not-interested:Not interested' 'follow:Follow' 'unfollow:Unfollow' 'block:Block' 'unblock:Unblock' 'mute:Mute' 'unmute:Unmute' 'report:Report' 'universes:Universes: the page, Explore, residence, favorites, private universes, the universe territory, the …' 'explore:Explore, and the universes of an area of the map' 'places:The places search' 'map:The cartography: the shapes of the boundaries' 'time-column:The time column' 'live:The live line' 'accounts:Accounts and their links' 'notifications:Notifications' 'events:Events' 'proposals:Proposals and votes' 'debates:Debates' 'polls:Polls' 'channels:Channels' 'inbox:The inbox' 'dm:Direct messages' 'groups:Group chats' 'connections:Connections between accounts' 'messaging:The settings of the messages' 'discussions:Universe discussions: list, page, unread' 'messages:Reactions and threads of the messages of a universe discussion' 'themes:The theme catalog' 'settings:Personal settings: the universe visit history' 'theme:Themes, offline: prompt, check, pack, unpack' 'layouts:Layouts' 'studio:The drafts of the studio' 'batch:Actions of a file' 'moderation:Moderation of a universe' 'governance:Governance of a universe' 'mcp:The MCP server on stdio' ;;
|
|
10
10
|
'profile') print -rl -- 'add:Add a profile: an environment, for one account' 'use:Make a profile the current one' 'list:List the profiles' 'show:Show a profile (the one in use by default)' 'remove:Remove a profile and its session (its key files are kept)' ;;
|
|
11
11
|
'operator') print -rl -- 'keygen:Make the keys of an agent operator: its private key and its recovery key' 'register:Register the agent operator: its keys, the signed challenge, the payment with x402 or a plan paid b…' 'login:Sign in the agent operator: a challenge signed with its private key' 'renew:Renew the paid period of the agent operator, paid with x402' 'recover:Recover the account with the recovery key: a new private key' 'recovery-key:set' 'delete:Delete the agent operator, its delegated agents and their interactions (irreversible)' 'plan:offer, show, start, change, stop, resume' ;;
|
|
12
12
|
'operator recovery-key') print -rl -- 'set:Declare a new recovery key, signed with the private key' ;;
|
|
@@ -15,7 +15,7 @@ __breakrocks_children() {
|
|
|
15
15
|
'agent') print -rl -- 'login:Sign in a delegated agent: its auth challenge signed with its private key' 'attest:Obtain an agent attestation for an external service (not served by the platform yet)' ;;
|
|
16
16
|
'wallet') print -rl -- 'set:Set the x402 wallet of the profile (a key file, or --env) and its cap per day' 'show:Show the wallet of the profile: its address, its cap, what it signed today' 'balance:The USDC balance of the wallet on the network of the environment' 'faucet:Where to get test USDC on Base Sepolia (dev and staging; links, no call)' ;;
|
|
17
17
|
'posts') print -rl -- 'list:The posts of an address: a universe, a sub-universe, a tag, an account (posts)' 'show:A post; with --thread its thread, --reposts its reposts' 'edit:Change the text of one'\''s post and its post sources (within 1 hour)' 'delete:Delete one'\''s post (one at a time)' 'pin:Pin a post in a universe (setPinnedPost)' 'unpin:Unpin a post (setPinnedPost)' ;;
|
|
18
|
-
'universes') print -rl -- 'show:The page of a universe: display, field, theme and its origin, theme trial, layout, governance, resi…' 'list:Explore the universes: by field, by language, recent, active, new, close to a level, mine' 'sub:The sub-universes of a universe (--map: their map)' 'members:The members of a universe' 'agent-posts:Forbid or allow the delegated agents to post in a universe and its sub-universes (setUniverseAgentP…' 'join:Become a resident of a universe (joinUniverse)' 'leave:Stop being a resident (the residence time is lost)' 'ask-to-join:Ask to join a private universe' 'favorite:add, remove, move' 'create-private:Create a private universe (hosted name or own domain)' 'invite:Invite an account (or an email) to a private universe' 'conditions:show, set, accept' 'territory:get, set, remove, report' 'pages:The pages of a universe, in the order of its main menu (Universe.pages, pagesVersion)' 'page:get, publish, check, hide, show, move, delete, report' ;;
|
|
18
|
+
'universes') print -rl -- 'show:The page of a universe: display, field, theme and its origin, theme trial, layout, governance, resi…' 'list:Explore the universes: by field, by language, recent, active, new, close to a level, mine' 'sub:The sub-universes of a universe (--map: their map)' 'members:The members of a universe' 'agent-posts:Forbid or allow the delegated agents to post in a universe and its sub-universes (setUniverseAgentP…' 'join:Become a resident of a universe (joinUniverse)' 'leave:Stop being a resident (the residence time is lost)' 'ask-to-join:Ask to join a private universe' 'favorite:add, remove, move' 'create-private:Create a private universe (hosted name or own domain)' 'invite:Invite an account (or an email) to a private universe' 'conditions:show, set, accept' 'territory:get, set, remove, report' 'pages:The pages of a universe, in the order of its main menu (Universe.pages, pagesVersion)' 'page:get, publish, check, hide, show, move, delete, report' 'theme-history:The history of the theme of a universe, the most recent first, one year (universeThemeHistory; who …' 'theme-restore:Restore an entry of the theme history: the universe holds that theme at that version, or a proposal…' 'theme-follow:End the frozen version of a universe: its theme follows the latest version again (followThemeUpdate…' 'history:The universe visit history of the account, the most recent visit first (universeHistory; 50 at most…' 'visit:Record a visit of a universe in the visit history, on purpose (recordUniverseVisit)' ;;
|
|
19
19
|
'universes favorite') print -rl -- 'add:Add a favorite universe' 'remove:Remove a favorite universe' 'move:Move a favorite universe (before another, or last)' ;;
|
|
20
20
|
'universes conditions') print -rl -- 'show:The conditions of a universe (a version)' 'set:Set the conditions of a private universe' 'accept:Accept the conditions of a universe' ;;
|
|
21
21
|
'universes territory') print -rl -- 'get:The universe territory of a universe: a boundary or a circle (Universe.territory)' 'set:Set the universe territory of a universe: a boundary, or a circle around a place (setUniverseTerrit…' 'remove:Remove the universe territory of a universe (setUniverseTerritory clear; the leadership)' 'report:Report the universe territory of a universe to the platform team (report UNIVERSE_TERRITORY)' ;;
|
|
@@ -35,7 +35,11 @@ __breakrocks_children() {
|
|
|
35
35
|
'connections') print -rl -- 'request:Send a connection request with a message (requestConnection)' 'accept:Accept the connection request of an account (answerConnectionRequest)' 'decline:Decline the connection request of an account (--openly, --reason; answerConnectionRequest)' 'remove:End the connection with an account' 'list:The accounts connected (myAccounts CONNECTED)' 'requests:The connection requests received (--sent: sent)' 'state:Whether a request can be sent, whether a first message connects at once (connectionStates)' ;;
|
|
36
36
|
'messaging') print -rl -- 'settings:show, set' ;;
|
|
37
37
|
'messaging settings') print -rl -- 'show:The settings of the messages (mySettings.messaging)' 'set:Change the settings of the messages (read receipts, who may write or invite, agent requests…; setSe…' ;;
|
|
38
|
-
'
|
|
38
|
+
'discussions') print -rl -- 'list:The universe discussions of a universe: present now, unread, mentions, silence, retention (universe…' 'show:A universe discussion: its state, who reads it now, unread, mentions, silence, how long its message…' 'unread:The universe discussions with unread messages, across the universes of the account, the latest mess…' ;;
|
|
39
|
+
'messages') print -rl -- 'react:React to a message of a universe discussion with one emoji (reactToMessage; adding it again changes…' 'unreact:Remove your reaction from a message of a universe discussion (unreactToMessage; one you did not add…' 'thread:The thread replies of a message of a universe discussion, the oldest first (threadMessages; --all)' 'reply-thread:Reply in the thread of a message of a universe discussion (replyInThread)' ;;
|
|
40
|
+
'themes') print -rl -- 'list:The theme catalog: by field, creator, order, universe, text (themeCatalog)' 'show:The page of a theme: screenshots, palette, typefaces, images, origin, use' 'gallery:The theme gallery of a universe: its field collection, then the universal one, then the most used (…' 'star:Star a theme of the catalog (starTheme; 50 at most; starring it again changes nothing)' 'unstar:Unstar a theme (unstarTheme; also when it was not starred)' 'starred:The themes you starred, the most recent first, 50 at most (starredThemes; --variant NIGHT|DAY)' 'try:Try a theme, a layout or both on a universe, for yourself alone, for 24 hours (startGalleryTrial; i…' 'untry:End your gallery trial on a universe, theme and layout together (endGalleryTrial)' 'trials:Your gallery trials that run, one per universe, 20 at most (myGalleryTrials)' ;;
|
|
41
|
+
'universes history') print -rl -- 'remove:Remove one universe from the visit history (removeRecentUniverse; true also when absent)' 'clear:Clear the whole visit history (clearRecentUniverses)' ;;
|
|
42
|
+
'settings') print -rl -- 'history-pause:Pause (on) or resume (off) the universe visit history: nothing new is recorded while paused, the en…' ;;
|
|
39
43
|
'theme') print -rl -- 'prompt:Write the prompt that asks an AI for a theme (theme.json and its images)' 'check:Check a theme and its images as the platform does at publication (offline)' 'pack:Pack a theme and its images in a ZIP for the import of the studio' 'unpack:Unpack the ZIP of a theme (an export of the studio, or theme pack)' 'typefaces:List the approved typefaces (shipped; --online: approvedTypefaces, compared)' 'publish:Publish a theme and its images in a universe, in one gesture (as the studio imports)' 'apply:Make a theme the theme of a universe (setUniverseProfile; the leadership, the owner, the admins)' 'try:Try a theme as the personal theme for 24 hours (setTriedTheme)' 'undo-try:Stop trying a theme: the former one comes back (setTriedTheme)' 'personal:set, clear' 'export:Export a theme: its JSON and its images served (the largest width), or a ZIP (--zip)' 'shots:Download the screenshots of a theme (3 screens night and day, the page of a universe at 3 breakpoin…' 'copy:Copy a theme under a new name (a personal theme, or published in --target)' 'delete:Delete a theme one published (it stays applied where it is)' ;;
|
|
40
44
|
'theme personal') print -rl -- 'set:Set the personal theme (and its settings: accent, density, motion, post transparency…)' 'clear:Back to Socle as the personal theme' ;;
|
|
41
45
|
'layouts') print -rl -- 'list:The layout catalog (layoutCatalog)' 'show:A layout' 'check:Check a layout document against the registry of the universe (checkLayout)' 'publish:Publish a layout in a universe: a layout of the same name gets its next version (publishLayout)' 'publish-version:Publish a new version of a layout (publishLayout, as layouts publish: kept for the scripts)' 'apply:Make a layout the default one of a universe (setUniverseProfile)' 'copy:Copy a layout under a new name' 'retouch:Retouch a layout for oneself in a universe (setLayoutRetouches)' 'reset-retouches:Remove one'\''s retouches in a universe' 'delete:Delete a layout one published' ;;
|
|
@@ -173,8 +177,28 @@ __breakrocks_options() {
|
|
|
173
177
|
'connections list') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' ;;
|
|
174
178
|
'connections requests') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--sent b sent (Boolean)' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' ;;
|
|
175
179
|
'messaging settings set') print -rl -- '--request-policy e:everyone,following,followers,nobody request policy (RequestPolicy)' '--auto-accept b auto accept (Boolean)' '--agent-requests e:answer,accept,decline agent requests (AgentRequests)' '--silent-decline b silent decline (Boolean)' '--invite-policy e:connections,nobody,except invite policy (InvitePolicy)' '--read-receipts b read receipts (Boolean)' '--command-language v command language (String)' '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' ;;
|
|
180
|
+
'discussions list') print -rl -- '--all-levels b all levels (Boolean)' ;;
|
|
181
|
+
'discussions unread') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' ;;
|
|
182
|
+
'messages react') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
183
|
+
'messages unreact') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
184
|
+
'messages thread') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' ;;
|
|
185
|
+
'messages reply-thread') print -rl -- '--text v The reply (2,000 visible characters at most)' '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
176
186
|
'themes list') print -rl -- '--field e:CULTURE,ENTERTAINMENT,EVERYDAY_LIFE,GAMES,PLACES,POLITICS,SCIENCE,SPORT,TECH,WORK A field: its collection first' '--creator y:account The themes published by an account (@handle or id)' '--order e:MOST_USED,NEWEST,IN_YOUR_UNIVERSES The order' '--universe y:universe The themes of a universe' '--query v A text in their names and descriptions' '--variant e:NIGHT,DAY NIGHT or DAY' '--use e:PERSONAL,UNIVERSE PERSONAL or UNIVERSE' '--after v The cursor of the next page' ;;
|
|
177
187
|
'themes show') print -rl -- '--applied-in y:universe The universe it is applied in (a non-member reads it there)' ;;
|
|
188
|
+
'themes gallery') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--high-contrast b Only the high-contrast themes (AAA)' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' '--night b The night variant' '--day b The day variant' ;;
|
|
189
|
+
'themes star') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
190
|
+
'themes unstar') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
191
|
+
'themes starred') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--variant e:DAY,NIGHT variant (ThemeVariant)' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' ;;
|
|
192
|
+
'themes try') print -rl -- '--theme y:theme The theme: %universe/name' '--layout y:layout The layout: %universe/name' '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
193
|
+
'themes untry') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
194
|
+
'universes theme-history') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' ;;
|
|
195
|
+
'universes theme-restore') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
196
|
+
'universes theme-follow') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
197
|
+
'universes history') print -rl -- '--limit v How many at most' ;;
|
|
198
|
+
'universes history remove') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
199
|
+
'universes history clear') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
200
|
+
'universes visit') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
201
|
+
'settings history-pause') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' '--dry-run b Tell what would be sent (the operation and its variables), without sending anything' ;;
|
|
178
202
|
'theme prompt') print -rl -- '--field e:CULTURE,ENTERTAINMENT,EVERYDAY_LIFE,GAMES,PLACES,POLITICS,SCIENCE,SPORT,TECH,WORK The field: CULTURE, ENTERTAINMENT, EVERYDAY_LIFE, GAMES, PLACES, POLITICS, SCIENCE, SPORT, TECH, WO…' '--mood v The mood, in a few words (with --universal: the scene and the identity)' '--name v The name of the theme (2 to 64 letters, digits, "-", "_", "."; a letter first)' '--universe y:universe The universe it will be published in (%name; %root by default with --universal)' '--description v Its description (160 characters at most)' '--fonts v The title typeface, then the accent one, from the approved list (Montserrat with --universal)' '--language e:en,fr The language of the prompt' '--universal b The prompt of a universal theme: no field, the palette and the typeface of Socle' ;;
|
|
179
203
|
'theme check') print -rl -- '--strict b Count the warnings (contrast raised, unusual sizes) as errors' ;;
|
|
180
204
|
'theme pack') print -rl -- '--out f The archive to write (default: <name>.zip)' '--force b Replace the archive if it exists' '--allow-missing b Pack even when an image named by the JSON has no file' ;;
|
|
@@ -190,7 +214,7 @@ __breakrocks_options() {
|
|
|
190
214
|
'theme shots') print -rl -- '--out d The folder' '--force b Replace files that exist' ;;
|
|
191
215
|
'theme copy') print -rl -- '--as v The name of the copy' '--target y:universe The universe to publish the copy in' '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' ;;
|
|
192
216
|
'theme delete') print -rl -- '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' ;;
|
|
193
|
-
'layouts list') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--field e:CULTURE,ENTERTAINMENT,EVERYDAY_LIFE,GAMES,PLACES,POLITICS,SCIENCE,SPORT,TECH,WORK collection (UniverseField)' '--order e:IN_YOUR_UNIVERSES,MOST_USED,NEWEST The order' '--query v query (String)' '--universe y:universe The universe (%name, %name/sub)' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' ;;
|
|
217
|
+
'layouts list') print -rl -- '--after v The cursor of the next page (the "next" of an answer)' '--limit v How many at most' '--field e:CULTURE,ENTERTAINMENT,EVERYDAY_LIFE,GAMES,PLACES,POLITICS,SCIENCE,SPORT,TECH,WORK collection (UniverseField)' '--order e:GALLERY,IN_YOUR_UNIVERSES,MOST_USED,NEWEST The order' '--query v query (String)' '--universe y:universe The universe (%name, %name/sub)' '--all b Follow the pages to the end (bounded by --max)' '--max v Pages at most with --all' ;;
|
|
194
218
|
'layouts check') print -rl -- '--in y:universe The universe (%name)' ;;
|
|
195
219
|
'layouts publish') print -rl -- '--in y:universe The universe (%name)' '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' ;;
|
|
196
220
|
'layouts publish-version') print -rl -- '--in y:universe The universe (%name)' '--request-id v An idempotency key (a UUIDv7): a request sent again with it is done once (one is made when absent)' ;;
|
|
@@ -377,7 +401,24 @@ __breakrocks_positionals() {
|
|
|
377
401
|
'connections decline') print -rl -- y:account ;;
|
|
378
402
|
'connections remove') print -rl -- y:account ;;
|
|
379
403
|
'connections state') print -rl -- y:account ;;
|
|
404
|
+
'discussions list') print -rl -- y:universe ;;
|
|
405
|
+
'discussions show') print -rl -- y:address ;;
|
|
406
|
+
'messages react') print -rl -- v v ;;
|
|
407
|
+
'messages unreact') print -rl -- v v ;;
|
|
408
|
+
'messages thread') print -rl -- v ;;
|
|
409
|
+
'messages reply-thread') print -rl -- v ;;
|
|
380
410
|
'themes show') print -rl -- y:theme ;;
|
|
411
|
+
'themes gallery') print -rl -- y:universe ;;
|
|
412
|
+
'themes star') print -rl -- y:theme ;;
|
|
413
|
+
'themes unstar') print -rl -- y:theme ;;
|
|
414
|
+
'themes try') print -rl -- y:universe ;;
|
|
415
|
+
'themes untry') print -rl -- y:universe ;;
|
|
416
|
+
'universes theme-history') print -rl -- y:universe ;;
|
|
417
|
+
'universes theme-restore') print -rl -- y:universe v ;;
|
|
418
|
+
'universes theme-follow') print -rl -- y:universe ;;
|
|
419
|
+
'universes history remove') print -rl -- y:universe ;;
|
|
420
|
+
'universes visit') print -rl -- y:universe ;;
|
|
421
|
+
'settings history-pause') print -rl -- e:on,off ;;
|
|
381
422
|
'theme check') print -rl -- f f+ ;;
|
|
382
423
|
'theme pack') print -rl -- f f+ ;;
|
|
383
424
|
'theme unpack') print -rl -- f ;;
|
package/dist/api/command.js
CHANGED
|
@@ -171,6 +171,8 @@ export function apiCommand(def) {
|
|
|
171
171
|
properties.all = { type: 'boolean', description: 'Follow the pages to the end (bounded by --max)' };
|
|
172
172
|
properties.max = { type: 'integer', minimum: 1, maximum: 100, default: 10, description: 'Pages at most with --all' };
|
|
173
173
|
}
|
|
174
|
+
if (def.dry)
|
|
175
|
+
properties.dryRun = { type: 'boolean', description: 'Tell what would be sent (the operation and its variables), without sending anything' };
|
|
174
176
|
Object.assign(properties, def.extra ?? {});
|
|
175
177
|
checkDef(def, op, properties);
|
|
176
178
|
const required = [...views.filter((v) => v.required).map((v) => v.property), ...(def.require ?? [])];
|
|
@@ -195,6 +197,8 @@ export function apiCommand(def) {
|
|
|
195
197
|
vars[key] = {};
|
|
196
198
|
if ('requestId' in op.args && vars.requestId === undefined)
|
|
197
199
|
vars.requestId = uuidv7(ctx.now());
|
|
200
|
+
if (def.dry && given.dryRun)
|
|
201
|
+
return { dryRun: true, operation: op.name, variables: vars };
|
|
198
202
|
if (def.confirm)
|
|
199
203
|
await ctx.confirm(def.confirm(given));
|
|
200
204
|
const doc = documentOf(op, Object.keys(vars).concat(paged && given.all ? ['after'] : []), def.select ?? selection(typeRef(op.type).name, depth));
|
|
@@ -203,10 +207,12 @@ export function apiCommand(def) {
|
|
|
203
207
|
: await api(ctx, doc, vars);
|
|
204
208
|
return (def.map ? def.map(data[op.name], given) : data[op.name]);
|
|
205
209
|
},
|
|
206
|
-
...(def.text ? { text: def.text } : {}),
|
|
210
|
+
...(def.text ? { text: (r) => (def.dry && isObject(r) && r.dryRun === true ? dryRunText(r) : def.text(r)) } : {}),
|
|
207
211
|
quiet: def.quiet ?? ((r) => (isObject(r) && typeof r.id === 'string' ? r.id : undefined)),
|
|
208
212
|
};
|
|
209
213
|
}
|
|
214
|
+
/** The text of a --dry-run answer: the operation and its variables. */
|
|
215
|
+
const dryRunText = (r) => [`${String(r.operation)} (dry run: nothing sent)`, JSON.stringify(r.variables)].join('\n');
|
|
210
216
|
/** The flag of a property ("accountId" → --account-id), and back. */
|
|
211
217
|
export const flagOf = (property) => `--${kebab(property)}`;
|
|
212
218
|
export const propertyOfFlag = (flag) => camel(flag.replace(/^--/, ''));
|