polkadot-cli 1.6.0 → 1.6.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/README.md CHANGED
@@ -258,6 +258,29 @@ Chain names are case-insensitive — `Polkadot.System.Account`, `POLKADOT.System
258
258
 
259
259
  The `--chain` flag and default chain still work as before. If both a chain prefix and `--chain` flag are provided, the CLI errors.
260
260
 
261
+ ### Space-separated syntax
262
+
263
+ Pallet and item segments can also be provided as separate arguments instead of dot notation. These forms are equivalent:
264
+
265
+ ```bash
266
+ # Dot notation vs space-separated — these are identical:
267
+ dot query.System # dot notation
268
+ dot query System # space-separated
269
+
270
+ dot events.Balances.Transfer # dot notation
271
+ dot events Balances Transfer # space-separated
272
+
273
+ dot apis.Core # dot notation
274
+ dot apis Core # space-separated
275
+
276
+ # Especially useful with --chain flag:
277
+ dot --chain kusama query System
278
+ dot --chain kusama events Balances Transfer
279
+ dot --chain kusama apis Core
280
+ ```
281
+
282
+ This works for all categories (`query`, `tx`, `const`, `events`, `errors`, `apis`). Remaining arguments after the pallet and item are passed as method parameters as usual.
283
+
261
284
  ### Query storage
262
285
 
263
286
  ```bash
package/dist/cli.mjs CHANGED
@@ -2134,7 +2134,7 @@ var init_complete = __esm(() => {
2134
2134
  // src/cli.ts
2135
2135
  import cac from "cac";
2136
2136
  // package.json
2137
- var version = "1.6.0";
2137
+ var version = "1.6.1";
2138
2138
 
2139
2139
  // src/commands/account.ts
2140
2140
  init_accounts_store();
@@ -5042,6 +5042,12 @@ if (process.argv[2] === "__complete") {
5042
5042
  } catch {
5043
5043
  throw new CliError2(`Unknown command "${dotpath}". Run "dot --help" for available commands.`);
5044
5044
  }
5045
+ if (!parsed.pallet && args.length > 0) {
5046
+ parsed.pallet = args.shift();
5047
+ if (!parsed.item && args.length > 0) {
5048
+ parsed.item = args.shift();
5049
+ }
5050
+ }
5045
5051
  if (parsed.chain && opts.chain) {
5046
5052
  throw new CliError2(`Chain specified both as prefix ("${parsed.chain}") and as --chain flag ("${opts.chain}"). Use one or the other.`);
5047
5053
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polkadot-cli",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "CLI tool for querying Polkadot-ecosystem on-chain state",
5
5
  "type": "module",
6
6
  "bin": {