@wavyx/pdcli 0.5.0 → 0.7.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 +44 -1
- package/README.md +1 -0
- package/bin/dev.js +19 -0
- package/oclif.manifest.json +136 -136
- package/package.json +1 -1
- package/src/base-command.js +17 -2
- package/src/lib/errors.js +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,49 @@ All notable changes to `pdcli` are documented here. Format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/); versions follow
|
|
5
5
|
[SemVer](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.7.0] - 2026-06-05
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `default_output` profile config key is now honored: set
|
|
12
|
+
`pdcli config set default_output json` and every command (including
|
|
13
|
+
error output) defaults to that format when no `--output` flag is given.
|
|
14
|
+
An explicit flag still wins; invalid stored values fall back to the
|
|
15
|
+
table-in-TTY / JSON-when-piped default.
|
|
16
|
+
- Docs website redesigned with the "Clarity" design system: new landing
|
|
17
|
+
page (animated terminal, quickstart, feature grid, live CLI stats),
|
|
18
|
+
light-first theme with dark mode, custom header/footer, social cards,
|
|
19
|
+
and brand fonts (Plus Jakarta Sans + JetBrains Mono) across all pages.
|
|
20
|
+
- Homepage stats (version, command/topic/format counts) are generated
|
|
21
|
+
from the CLI manifest at docs-build time so they can never drift.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Command-reference, config, and exit-code tables on the docs site
|
|
26
|
+
rendered as raw pipe characters; all GFM tables now render properly.
|
|
27
|
+
- Documentation corrected against the implementation: autocomplete
|
|
28
|
+
shells, exit-code 64 semantics, JSON error-output trigger, rate-limit
|
|
29
|
+
header behavior, `--company`/`--api-token` flag scoping, and the
|
|
30
|
+
audit `--verbose` example.
|
|
31
|
+
- Accessibility on the docs site: theme-toggle labeling, decorative
|
|
32
|
+
terminal/SVG content hidden from screen readers, heading hierarchy,
|
|
33
|
+
and WCAG AA contrast for footer and small-text elements.
|
|
34
|
+
|
|
35
|
+
## [0.6.0] - 2026-06-04
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- Documentation site (Astro + Starlight) at wavyx.github.io/pdcli:
|
|
40
|
+
quickstarts (including a dedicated AI-agent quickstart), guides for every
|
|
41
|
+
feature area, automation recipes, concepts, and a command reference
|
|
42
|
+
generated from the CLI manifest.
|
|
43
|
+
- Machine-readable docs for AI agents: `llms.txt`, `llms-full.txt`, and
|
|
44
|
+
`llms-small.txt`.
|
|
45
|
+
- Native tarballs (linux x64/arm64, macOS x64/arm64, Windows x64) attached
|
|
46
|
+
to every GitHub Release for non-npm installs.
|
|
47
|
+
- Shell completion docs (`pdcli autocomplete bash|zsh|powershell`).
|
|
48
|
+
- `bin/dev.js` development runner (no manifest cache).
|
|
49
|
+
|
|
7
50
|
## [0.5.0] - 2026-06-04
|
|
8
51
|
|
|
9
52
|
### Added
|
|
@@ -85,7 +128,7 @@ All notable changes to `pdcli` are documented here. Format follows
|
|
|
85
128
|
pagination and `--limit`.
|
|
86
129
|
- Custom-field discovery and resolution: `field list/get` plus automatic
|
|
87
130
|
name/label resolution in table output.
|
|
88
|
-
- Global `search` (itemSearch).
|
|
131
|
+
- Global `search` (itemSearch) and `user me` (v1 users endpoint).
|
|
89
132
|
- Host-locked raw escape hatch: `pdcli api <METHOD> <path>` (v1 + v2).
|
|
90
133
|
- `doctor` diagnostics and `version`.
|
|
91
134
|
- Dual-API client: token-budget-aware 429 backoff, 429→403 hard stop,
|
package/README.md
CHANGED
|
@@ -98,6 +98,7 @@ pdcli doctor # diagnose auth/keychain/connectivity
|
|
|
98
98
|
|
|
99
99
|
- `--output table|json|yaml|csv` everywhere; table in a TTY, JSON when piped.
|
|
100
100
|
- Deterministic [sysexits](https://man.freebsd.org/cgi/man.cgi?query=sysexits) exit codes for scripting.
|
|
101
|
+
- **Docs: [wavyx.github.io/pdcli](https://wavyx.github.io/pdcli)** — guides, cookbook, AI-agent quickstart, [`llms.txt`](https://wavyx.github.io/pdcli/llms.txt).
|
|
101
102
|
- Full reference: [docs/commands.md](docs/commands.md) (generated from the CLI manifest).
|
|
102
103
|
|
|
103
104
|
## License
|
package/bin/dev.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs'
|
|
3
|
+
import { resolve } from 'node:path'
|
|
4
|
+
import { execute } from '@oclif/core'
|
|
5
|
+
|
|
6
|
+
const envFile = resolve(process.cwd(), '.env')
|
|
7
|
+
if (existsSync(envFile)) {
|
|
8
|
+
for (const line of readFileSync(envFile, 'utf8').split('\n')) {
|
|
9
|
+
const trimmed = line.trim()
|
|
10
|
+
if (!trimmed || trimmed.startsWith('#')) continue
|
|
11
|
+
const eq = trimmed.indexOf('=')
|
|
12
|
+
if (eq === -1) continue
|
|
13
|
+
const key = trimmed.slice(0, eq).trim()
|
|
14
|
+
const value = trimmed.slice(eq + 1).trim()
|
|
15
|
+
if (!process.env[key]) process.env[key] = value
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
await execute({ dir: import.meta.url })
|
package/oclif.manifest.json
CHANGED
|
@@ -5727,14 +5727,14 @@
|
|
|
5727
5727
|
"update.js"
|
|
5728
5728
|
]
|
|
5729
5729
|
},
|
|
5730
|
-
"
|
|
5730
|
+
"person:create": {
|
|
5731
5731
|
"aliases": [],
|
|
5732
5732
|
"args": {},
|
|
5733
|
-
"description": "Create
|
|
5733
|
+
"description": "Create a person",
|
|
5734
5734
|
"examples": [
|
|
5735
|
-
"<%= config.bin %>
|
|
5736
|
-
"<%= config.bin %>
|
|
5737
|
-
"<%= config.bin %>
|
|
5735
|
+
"<%= config.bin %> person create --name \"Jane Doe\" --email jane@acme.com",
|
|
5736
|
+
"<%= config.bin %> person create --name \"Jane\" --field \"Segment=Enterprise\"",
|
|
5737
|
+
"<%= config.bin %> person create --name \"Raw\" --body '{\"visible_to\":\"3\"}'"
|
|
5738
5738
|
],
|
|
5739
5739
|
"flags": {
|
|
5740
5740
|
"output": {
|
|
@@ -5815,13 +5815,34 @@
|
|
|
5815
5815
|
"type": "option"
|
|
5816
5816
|
},
|
|
5817
5817
|
"name": {
|
|
5818
|
-
"description": "
|
|
5818
|
+
"description": "Person name",
|
|
5819
5819
|
"name": "name",
|
|
5820
5820
|
"required": true,
|
|
5821
5821
|
"hasDynamicHelp": false,
|
|
5822
5822
|
"multiple": false,
|
|
5823
5823
|
"type": "option"
|
|
5824
5824
|
},
|
|
5825
|
+
"email": {
|
|
5826
|
+
"description": "Email address (repeatable; first is primary)",
|
|
5827
|
+
"name": "email",
|
|
5828
|
+
"hasDynamicHelp": false,
|
|
5829
|
+
"multiple": true,
|
|
5830
|
+
"type": "option"
|
|
5831
|
+
},
|
|
5832
|
+
"phone": {
|
|
5833
|
+
"description": "Phone number (repeatable; first is primary)",
|
|
5834
|
+
"name": "phone",
|
|
5835
|
+
"hasDynamicHelp": false,
|
|
5836
|
+
"multiple": true,
|
|
5837
|
+
"type": "option"
|
|
5838
|
+
},
|
|
5839
|
+
"org": {
|
|
5840
|
+
"description": "Linked organization ID",
|
|
5841
|
+
"name": "org",
|
|
5842
|
+
"hasDynamicHelp": false,
|
|
5843
|
+
"multiple": false,
|
|
5844
|
+
"type": "option"
|
|
5845
|
+
},
|
|
5825
5846
|
"owner": {
|
|
5826
5847
|
"description": "Owner (user) ID",
|
|
5827
5848
|
"name": "owner",
|
|
@@ -5846,7 +5867,7 @@
|
|
|
5846
5867
|
},
|
|
5847
5868
|
"hasDynamicHelp": false,
|
|
5848
5869
|
"hiddenAliases": [],
|
|
5849
|
-
"id": "
|
|
5870
|
+
"id": "person:create",
|
|
5850
5871
|
"pluginAlias": "@wavyx/pdcli",
|
|
5851
5872
|
"pluginName": "@wavyx/pdcli",
|
|
5852
5873
|
"pluginType": "core",
|
|
@@ -5856,23 +5877,23 @@
|
|
|
5856
5877
|
"relativePath": [
|
|
5857
5878
|
"src",
|
|
5858
5879
|
"commands",
|
|
5859
|
-
"
|
|
5880
|
+
"person",
|
|
5860
5881
|
"create.js"
|
|
5861
5882
|
]
|
|
5862
5883
|
},
|
|
5863
|
-
"
|
|
5884
|
+
"person:delete": {
|
|
5864
5885
|
"aliases": [],
|
|
5865
5886
|
"args": {
|
|
5866
5887
|
"id": {
|
|
5867
|
-
"description": "
|
|
5888
|
+
"description": "Person ID",
|
|
5868
5889
|
"name": "id",
|
|
5869
5890
|
"required": true
|
|
5870
5891
|
}
|
|
5871
5892
|
},
|
|
5872
|
-
"description": "Delete
|
|
5893
|
+
"description": "Delete a person",
|
|
5873
5894
|
"examples": [
|
|
5874
|
-
"<%= config.bin %>
|
|
5875
|
-
"<%= config.bin %>
|
|
5895
|
+
"<%= config.bin %> person delete 42",
|
|
5896
|
+
"<%= config.bin %> person delete 42 --yes"
|
|
5876
5897
|
],
|
|
5877
5898
|
"flags": {
|
|
5878
5899
|
"output": {
|
|
@@ -5962,7 +5983,7 @@
|
|
|
5962
5983
|
},
|
|
5963
5984
|
"hasDynamicHelp": false,
|
|
5964
5985
|
"hiddenAliases": [],
|
|
5965
|
-
"id": "
|
|
5986
|
+
"id": "person:delete",
|
|
5966
5987
|
"pluginAlias": "@wavyx/pdcli",
|
|
5967
5988
|
"pluginName": "@wavyx/pdcli",
|
|
5968
5989
|
"pluginType": "core",
|
|
@@ -5972,23 +5993,23 @@
|
|
|
5972
5993
|
"relativePath": [
|
|
5973
5994
|
"src",
|
|
5974
5995
|
"commands",
|
|
5975
|
-
"
|
|
5996
|
+
"person",
|
|
5976
5997
|
"delete.js"
|
|
5977
5998
|
]
|
|
5978
5999
|
},
|
|
5979
|
-
"
|
|
6000
|
+
"person:get": {
|
|
5980
6001
|
"aliases": [],
|
|
5981
6002
|
"args": {
|
|
5982
6003
|
"id": {
|
|
5983
|
-
"description": "
|
|
6004
|
+
"description": "Person ID",
|
|
5984
6005
|
"name": "id",
|
|
5985
6006
|
"required": true
|
|
5986
6007
|
}
|
|
5987
6008
|
},
|
|
5988
|
-
"description": "Get
|
|
6009
|
+
"description": "Get a person by ID",
|
|
5989
6010
|
"examples": [
|
|
5990
|
-
"<%= config.bin %>
|
|
5991
|
-
"<%= config.bin %>
|
|
6011
|
+
"<%= config.bin %> person get 5",
|
|
6012
|
+
"<%= config.bin %> person get 5 --output json"
|
|
5992
6013
|
],
|
|
5993
6014
|
"flags": {
|
|
5994
6015
|
"output": {
|
|
@@ -6071,7 +6092,7 @@
|
|
|
6071
6092
|
},
|
|
6072
6093
|
"hasDynamicHelp": false,
|
|
6073
6094
|
"hiddenAliases": [],
|
|
6074
|
-
"id": "
|
|
6095
|
+
"id": "person:get",
|
|
6075
6096
|
"pluginAlias": "@wavyx/pdcli",
|
|
6076
6097
|
"pluginName": "@wavyx/pdcli",
|
|
6077
6098
|
"pluginType": "core",
|
|
@@ -6081,11 +6102,11 @@
|
|
|
6081
6102
|
"relativePath": [
|
|
6082
6103
|
"src",
|
|
6083
6104
|
"commands",
|
|
6084
|
-
"
|
|
6105
|
+
"person",
|
|
6085
6106
|
"get.js"
|
|
6086
6107
|
]
|
|
6087
6108
|
},
|
|
6088
|
-
"
|
|
6109
|
+
"person:import": {
|
|
6089
6110
|
"aliases": [],
|
|
6090
6111
|
"args": {
|
|
6091
6112
|
"file": {
|
|
@@ -6094,10 +6115,10 @@
|
|
|
6094
6115
|
"required": true
|
|
6095
6116
|
}
|
|
6096
6117
|
},
|
|
6097
|
-
"description": "Bulk-create
|
|
6118
|
+
"description": "Bulk-create persons from a CSV (headers map to fields, custom fields by name)",
|
|
6098
6119
|
"examples": [
|
|
6099
|
-
"<%= config.bin %>
|
|
6100
|
-
"<%= config.bin %>
|
|
6120
|
+
"<%= config.bin %> person import people.csv",
|
|
6121
|
+
"<%= config.bin %> person import people.csv --dry-run"
|
|
6101
6122
|
],
|
|
6102
6123
|
"flags": {
|
|
6103
6124
|
"output": {
|
|
@@ -6193,7 +6214,7 @@
|
|
|
6193
6214
|
},
|
|
6194
6215
|
"hasDynamicHelp": false,
|
|
6195
6216
|
"hiddenAliases": [],
|
|
6196
|
-
"id": "
|
|
6217
|
+
"id": "person:import",
|
|
6197
6218
|
"pluginAlias": "@wavyx/pdcli",
|
|
6198
6219
|
"pluginName": "@wavyx/pdcli",
|
|
6199
6220
|
"pluginType": "core",
|
|
@@ -6203,17 +6224,17 @@
|
|
|
6203
6224
|
"relativePath": [
|
|
6204
6225
|
"src",
|
|
6205
6226
|
"commands",
|
|
6206
|
-
"
|
|
6227
|
+
"person",
|
|
6207
6228
|
"import.js"
|
|
6208
6229
|
]
|
|
6209
6230
|
},
|
|
6210
|
-
"
|
|
6231
|
+
"person:list": {
|
|
6211
6232
|
"aliases": [],
|
|
6212
6233
|
"args": {},
|
|
6213
|
-
"description": "List
|
|
6234
|
+
"description": "List persons (contacts)",
|
|
6214
6235
|
"examples": [
|
|
6215
|
-
"<%= config.bin %>
|
|
6216
|
-
"<%= config.bin %>
|
|
6236
|
+
"<%= config.bin %> person list",
|
|
6237
|
+
"<%= config.bin %> person list --org 7 --output json"
|
|
6217
6238
|
],
|
|
6218
6239
|
"flags": {
|
|
6219
6240
|
"output": {
|
|
@@ -6299,11 +6320,18 @@
|
|
|
6299
6320
|
"hasDynamicHelp": false,
|
|
6300
6321
|
"multiple": false,
|
|
6301
6322
|
"type": "option"
|
|
6323
|
+
},
|
|
6324
|
+
"org": {
|
|
6325
|
+
"description": "Filter by organization ID",
|
|
6326
|
+
"name": "org",
|
|
6327
|
+
"hasDynamicHelp": false,
|
|
6328
|
+
"multiple": false,
|
|
6329
|
+
"type": "option"
|
|
6302
6330
|
}
|
|
6303
6331
|
},
|
|
6304
6332
|
"hasDynamicHelp": false,
|
|
6305
6333
|
"hiddenAliases": [],
|
|
6306
|
-
"id": "
|
|
6334
|
+
"id": "person:list",
|
|
6307
6335
|
"pluginAlias": "@wavyx/pdcli",
|
|
6308
6336
|
"pluginName": "@wavyx/pdcli",
|
|
6309
6337
|
"pluginType": "core",
|
|
@@ -6313,24 +6341,24 @@
|
|
|
6313
6341
|
"relativePath": [
|
|
6314
6342
|
"src",
|
|
6315
6343
|
"commands",
|
|
6316
|
-
"
|
|
6344
|
+
"person",
|
|
6317
6345
|
"list.js"
|
|
6318
6346
|
]
|
|
6319
6347
|
},
|
|
6320
|
-
"
|
|
6348
|
+
"person:update": {
|
|
6321
6349
|
"aliases": [],
|
|
6322
6350
|
"args": {
|
|
6323
6351
|
"id": {
|
|
6324
|
-
"description": "
|
|
6352
|
+
"description": "Person ID",
|
|
6325
6353
|
"name": "id",
|
|
6326
6354
|
"required": true
|
|
6327
6355
|
}
|
|
6328
6356
|
},
|
|
6329
|
-
"description": "Update
|
|
6357
|
+
"description": "Update a person (v2 PATCH — only provided fields change)",
|
|
6330
6358
|
"examples": [
|
|
6331
|
-
"<%= config.bin %>
|
|
6332
|
-
"<%= config.bin %>
|
|
6333
|
-
"<%= config.bin %>
|
|
6359
|
+
"<%= config.bin %> person update 42 --name \"New name\"",
|
|
6360
|
+
"<%= config.bin %> person update 42 --email new@acme.com",
|
|
6361
|
+
"<%= config.bin %> person update 42 --field \"Segment=Enterprise\""
|
|
6334
6362
|
],
|
|
6335
6363
|
"flags": {
|
|
6336
6364
|
"output": {
|
|
@@ -6411,12 +6439,33 @@
|
|
|
6411
6439
|
"type": "option"
|
|
6412
6440
|
},
|
|
6413
6441
|
"name": {
|
|
6414
|
-
"description": "
|
|
6442
|
+
"description": "Person name",
|
|
6415
6443
|
"name": "name",
|
|
6416
6444
|
"hasDynamicHelp": false,
|
|
6417
6445
|
"multiple": false,
|
|
6418
6446
|
"type": "option"
|
|
6419
6447
|
},
|
|
6448
|
+
"email": {
|
|
6449
|
+
"description": "Email address (repeatable; first is primary)",
|
|
6450
|
+
"name": "email",
|
|
6451
|
+
"hasDynamicHelp": false,
|
|
6452
|
+
"multiple": true,
|
|
6453
|
+
"type": "option"
|
|
6454
|
+
},
|
|
6455
|
+
"phone": {
|
|
6456
|
+
"description": "Phone number (repeatable; first is primary)",
|
|
6457
|
+
"name": "phone",
|
|
6458
|
+
"hasDynamicHelp": false,
|
|
6459
|
+
"multiple": true,
|
|
6460
|
+
"type": "option"
|
|
6461
|
+
},
|
|
6462
|
+
"org": {
|
|
6463
|
+
"description": "Linked organization ID",
|
|
6464
|
+
"name": "org",
|
|
6465
|
+
"hasDynamicHelp": false,
|
|
6466
|
+
"multiple": false,
|
|
6467
|
+
"type": "option"
|
|
6468
|
+
},
|
|
6420
6469
|
"owner": {
|
|
6421
6470
|
"description": "Owner (user) ID",
|
|
6422
6471
|
"name": "owner",
|
|
@@ -6441,7 +6490,7 @@
|
|
|
6441
6490
|
},
|
|
6442
6491
|
"hasDynamicHelp": false,
|
|
6443
6492
|
"hiddenAliases": [],
|
|
6444
|
-
"id": "
|
|
6493
|
+
"id": "person:update",
|
|
6445
6494
|
"pluginAlias": "@wavyx/pdcli",
|
|
6446
6495
|
"pluginName": "@wavyx/pdcli",
|
|
6447
6496
|
"pluginType": "core",
|
|
@@ -6451,18 +6500,18 @@
|
|
|
6451
6500
|
"relativePath": [
|
|
6452
6501
|
"src",
|
|
6453
6502
|
"commands",
|
|
6454
|
-
"
|
|
6503
|
+
"person",
|
|
6455
6504
|
"update.js"
|
|
6456
6505
|
]
|
|
6457
6506
|
},
|
|
6458
|
-
"
|
|
6507
|
+
"org:create": {
|
|
6459
6508
|
"aliases": [],
|
|
6460
6509
|
"args": {},
|
|
6461
|
-
"description": "Create
|
|
6510
|
+
"description": "Create an organization",
|
|
6462
6511
|
"examples": [
|
|
6463
|
-
"<%= config.bin %>
|
|
6464
|
-
"<%= config.bin %>
|
|
6465
|
-
"<%= config.bin %>
|
|
6512
|
+
"<%= config.bin %> org create --name \"Acme Corp\"",
|
|
6513
|
+
"<%= config.bin %> org create --name \"Tiered\" --field \"Tier=Gold\"",
|
|
6514
|
+
"<%= config.bin %> org create --name \"Raw\" --body '{\"visible_to\":3}'"
|
|
6466
6515
|
],
|
|
6467
6516
|
"flags": {
|
|
6468
6517
|
"output": {
|
|
@@ -6543,34 +6592,13 @@
|
|
|
6543
6592
|
"type": "option"
|
|
6544
6593
|
},
|
|
6545
6594
|
"name": {
|
|
6546
|
-
"description": "
|
|
6595
|
+
"description": "Organization name",
|
|
6547
6596
|
"name": "name",
|
|
6548
6597
|
"required": true,
|
|
6549
6598
|
"hasDynamicHelp": false,
|
|
6550
6599
|
"multiple": false,
|
|
6551
6600
|
"type": "option"
|
|
6552
6601
|
},
|
|
6553
|
-
"email": {
|
|
6554
|
-
"description": "Email address (repeatable; first is primary)",
|
|
6555
|
-
"name": "email",
|
|
6556
|
-
"hasDynamicHelp": false,
|
|
6557
|
-
"multiple": true,
|
|
6558
|
-
"type": "option"
|
|
6559
|
-
},
|
|
6560
|
-
"phone": {
|
|
6561
|
-
"description": "Phone number (repeatable; first is primary)",
|
|
6562
|
-
"name": "phone",
|
|
6563
|
-
"hasDynamicHelp": false,
|
|
6564
|
-
"multiple": true,
|
|
6565
|
-
"type": "option"
|
|
6566
|
-
},
|
|
6567
|
-
"org": {
|
|
6568
|
-
"description": "Linked organization ID",
|
|
6569
|
-
"name": "org",
|
|
6570
|
-
"hasDynamicHelp": false,
|
|
6571
|
-
"multiple": false,
|
|
6572
|
-
"type": "option"
|
|
6573
|
-
},
|
|
6574
6602
|
"owner": {
|
|
6575
6603
|
"description": "Owner (user) ID",
|
|
6576
6604
|
"name": "owner",
|
|
@@ -6595,7 +6623,7 @@
|
|
|
6595
6623
|
},
|
|
6596
6624
|
"hasDynamicHelp": false,
|
|
6597
6625
|
"hiddenAliases": [],
|
|
6598
|
-
"id": "
|
|
6626
|
+
"id": "org:create",
|
|
6599
6627
|
"pluginAlias": "@wavyx/pdcli",
|
|
6600
6628
|
"pluginName": "@wavyx/pdcli",
|
|
6601
6629
|
"pluginType": "core",
|
|
@@ -6605,23 +6633,23 @@
|
|
|
6605
6633
|
"relativePath": [
|
|
6606
6634
|
"src",
|
|
6607
6635
|
"commands",
|
|
6608
|
-
"
|
|
6636
|
+
"org",
|
|
6609
6637
|
"create.js"
|
|
6610
6638
|
]
|
|
6611
6639
|
},
|
|
6612
|
-
"
|
|
6640
|
+
"org:delete": {
|
|
6613
6641
|
"aliases": [],
|
|
6614
6642
|
"args": {
|
|
6615
6643
|
"id": {
|
|
6616
|
-
"description": "
|
|
6644
|
+
"description": "Organization ID",
|
|
6617
6645
|
"name": "id",
|
|
6618
6646
|
"required": true
|
|
6619
6647
|
}
|
|
6620
6648
|
},
|
|
6621
|
-
"description": "Delete
|
|
6649
|
+
"description": "Delete an organization",
|
|
6622
6650
|
"examples": [
|
|
6623
|
-
"<%= config.bin %>
|
|
6624
|
-
"<%= config.bin %>
|
|
6651
|
+
"<%= config.bin %> org delete 7",
|
|
6652
|
+
"<%= config.bin %> org delete 7 --yes"
|
|
6625
6653
|
],
|
|
6626
6654
|
"flags": {
|
|
6627
6655
|
"output": {
|
|
@@ -6711,7 +6739,7 @@
|
|
|
6711
6739
|
},
|
|
6712
6740
|
"hasDynamicHelp": false,
|
|
6713
6741
|
"hiddenAliases": [],
|
|
6714
|
-
"id": "
|
|
6742
|
+
"id": "org:delete",
|
|
6715
6743
|
"pluginAlias": "@wavyx/pdcli",
|
|
6716
6744
|
"pluginName": "@wavyx/pdcli",
|
|
6717
6745
|
"pluginType": "core",
|
|
@@ -6721,23 +6749,23 @@
|
|
|
6721
6749
|
"relativePath": [
|
|
6722
6750
|
"src",
|
|
6723
6751
|
"commands",
|
|
6724
|
-
"
|
|
6752
|
+
"org",
|
|
6725
6753
|
"delete.js"
|
|
6726
6754
|
]
|
|
6727
6755
|
},
|
|
6728
|
-
"
|
|
6756
|
+
"org:get": {
|
|
6729
6757
|
"aliases": [],
|
|
6730
6758
|
"args": {
|
|
6731
6759
|
"id": {
|
|
6732
|
-
"description": "
|
|
6760
|
+
"description": "Organization ID",
|
|
6733
6761
|
"name": "id",
|
|
6734
6762
|
"required": true
|
|
6735
6763
|
}
|
|
6736
6764
|
},
|
|
6737
|
-
"description": "Get
|
|
6765
|
+
"description": "Get an organization by ID",
|
|
6738
6766
|
"examples": [
|
|
6739
|
-
"<%= config.bin %>
|
|
6740
|
-
"<%= config.bin %>
|
|
6767
|
+
"<%= config.bin %> org get 7",
|
|
6768
|
+
"<%= config.bin %> org get 7 --output json"
|
|
6741
6769
|
],
|
|
6742
6770
|
"flags": {
|
|
6743
6771
|
"output": {
|
|
@@ -6820,7 +6848,7 @@
|
|
|
6820
6848
|
},
|
|
6821
6849
|
"hasDynamicHelp": false,
|
|
6822
6850
|
"hiddenAliases": [],
|
|
6823
|
-
"id": "
|
|
6851
|
+
"id": "org:get",
|
|
6824
6852
|
"pluginAlias": "@wavyx/pdcli",
|
|
6825
6853
|
"pluginName": "@wavyx/pdcli",
|
|
6826
6854
|
"pluginType": "core",
|
|
@@ -6830,11 +6858,11 @@
|
|
|
6830
6858
|
"relativePath": [
|
|
6831
6859
|
"src",
|
|
6832
6860
|
"commands",
|
|
6833
|
-
"
|
|
6861
|
+
"org",
|
|
6834
6862
|
"get.js"
|
|
6835
6863
|
]
|
|
6836
6864
|
},
|
|
6837
|
-
"
|
|
6865
|
+
"org:import": {
|
|
6838
6866
|
"aliases": [],
|
|
6839
6867
|
"args": {
|
|
6840
6868
|
"file": {
|
|
@@ -6843,10 +6871,10 @@
|
|
|
6843
6871
|
"required": true
|
|
6844
6872
|
}
|
|
6845
6873
|
},
|
|
6846
|
-
"description": "Bulk-create
|
|
6874
|
+
"description": "Bulk-create organizations from a CSV (headers map to fields, custom fields by name)",
|
|
6847
6875
|
"examples": [
|
|
6848
|
-
"<%= config.bin %>
|
|
6849
|
-
"<%= config.bin %>
|
|
6876
|
+
"<%= config.bin %> org import orgs.csv",
|
|
6877
|
+
"<%= config.bin %> org import orgs.csv --dry-run"
|
|
6850
6878
|
],
|
|
6851
6879
|
"flags": {
|
|
6852
6880
|
"output": {
|
|
@@ -6942,7 +6970,7 @@
|
|
|
6942
6970
|
},
|
|
6943
6971
|
"hasDynamicHelp": false,
|
|
6944
6972
|
"hiddenAliases": [],
|
|
6945
|
-
"id": "
|
|
6973
|
+
"id": "org:import",
|
|
6946
6974
|
"pluginAlias": "@wavyx/pdcli",
|
|
6947
6975
|
"pluginName": "@wavyx/pdcli",
|
|
6948
6976
|
"pluginType": "core",
|
|
@@ -6952,17 +6980,17 @@
|
|
|
6952
6980
|
"relativePath": [
|
|
6953
6981
|
"src",
|
|
6954
6982
|
"commands",
|
|
6955
|
-
"
|
|
6983
|
+
"org",
|
|
6956
6984
|
"import.js"
|
|
6957
6985
|
]
|
|
6958
6986
|
},
|
|
6959
|
-
"
|
|
6987
|
+
"org:list": {
|
|
6960
6988
|
"aliases": [],
|
|
6961
6989
|
"args": {},
|
|
6962
|
-
"description": "List
|
|
6990
|
+
"description": "List organizations",
|
|
6963
6991
|
"examples": [
|
|
6964
|
-
"<%= config.bin %>
|
|
6965
|
-
"<%= config.bin %>
|
|
6992
|
+
"<%= config.bin %> org list",
|
|
6993
|
+
"<%= config.bin %> org list --owner 3 --output json"
|
|
6966
6994
|
],
|
|
6967
6995
|
"flags": {
|
|
6968
6996
|
"output": {
|
|
@@ -7048,18 +7076,11 @@
|
|
|
7048
7076
|
"hasDynamicHelp": false,
|
|
7049
7077
|
"multiple": false,
|
|
7050
7078
|
"type": "option"
|
|
7051
|
-
},
|
|
7052
|
-
"org": {
|
|
7053
|
-
"description": "Filter by organization ID",
|
|
7054
|
-
"name": "org",
|
|
7055
|
-
"hasDynamicHelp": false,
|
|
7056
|
-
"multiple": false,
|
|
7057
|
-
"type": "option"
|
|
7058
7079
|
}
|
|
7059
7080
|
},
|
|
7060
7081
|
"hasDynamicHelp": false,
|
|
7061
7082
|
"hiddenAliases": [],
|
|
7062
|
-
"id": "
|
|
7083
|
+
"id": "org:list",
|
|
7063
7084
|
"pluginAlias": "@wavyx/pdcli",
|
|
7064
7085
|
"pluginName": "@wavyx/pdcli",
|
|
7065
7086
|
"pluginType": "core",
|
|
@@ -7069,24 +7090,24 @@
|
|
|
7069
7090
|
"relativePath": [
|
|
7070
7091
|
"src",
|
|
7071
7092
|
"commands",
|
|
7072
|
-
"
|
|
7093
|
+
"org",
|
|
7073
7094
|
"list.js"
|
|
7074
7095
|
]
|
|
7075
7096
|
},
|
|
7076
|
-
"
|
|
7097
|
+
"org:update": {
|
|
7077
7098
|
"aliases": [],
|
|
7078
7099
|
"args": {
|
|
7079
7100
|
"id": {
|
|
7080
|
-
"description": "
|
|
7101
|
+
"description": "Organization ID",
|
|
7081
7102
|
"name": "id",
|
|
7082
7103
|
"required": true
|
|
7083
7104
|
}
|
|
7084
7105
|
},
|
|
7085
|
-
"description": "Update
|
|
7106
|
+
"description": "Update an organization (v2 PATCH — only provided fields change)",
|
|
7086
7107
|
"examples": [
|
|
7087
|
-
"<%= config.bin %>
|
|
7088
|
-
"<%= config.bin %>
|
|
7089
|
-
"<%= config.bin %>
|
|
7108
|
+
"<%= config.bin %> org update 7 --name \"Acme Inc\"",
|
|
7109
|
+
"<%= config.bin %> org update 7 --owner 9",
|
|
7110
|
+
"<%= config.bin %> org update 7 --field \"Tier=Gold\""
|
|
7090
7111
|
],
|
|
7091
7112
|
"flags": {
|
|
7092
7113
|
"output": {
|
|
@@ -7167,33 +7188,12 @@
|
|
|
7167
7188
|
"type": "option"
|
|
7168
7189
|
},
|
|
7169
7190
|
"name": {
|
|
7170
|
-
"description": "
|
|
7191
|
+
"description": "Organization name",
|
|
7171
7192
|
"name": "name",
|
|
7172
7193
|
"hasDynamicHelp": false,
|
|
7173
7194
|
"multiple": false,
|
|
7174
7195
|
"type": "option"
|
|
7175
7196
|
},
|
|
7176
|
-
"email": {
|
|
7177
|
-
"description": "Email address (repeatable; first is primary)",
|
|
7178
|
-
"name": "email",
|
|
7179
|
-
"hasDynamicHelp": false,
|
|
7180
|
-
"multiple": true,
|
|
7181
|
-
"type": "option"
|
|
7182
|
-
},
|
|
7183
|
-
"phone": {
|
|
7184
|
-
"description": "Phone number (repeatable; first is primary)",
|
|
7185
|
-
"name": "phone",
|
|
7186
|
-
"hasDynamicHelp": false,
|
|
7187
|
-
"multiple": true,
|
|
7188
|
-
"type": "option"
|
|
7189
|
-
},
|
|
7190
|
-
"org": {
|
|
7191
|
-
"description": "Linked organization ID",
|
|
7192
|
-
"name": "org",
|
|
7193
|
-
"hasDynamicHelp": false,
|
|
7194
|
-
"multiple": false,
|
|
7195
|
-
"type": "option"
|
|
7196
|
-
},
|
|
7197
7197
|
"owner": {
|
|
7198
7198
|
"description": "Owner (user) ID",
|
|
7199
7199
|
"name": "owner",
|
|
@@ -7218,7 +7218,7 @@
|
|
|
7218
7218
|
},
|
|
7219
7219
|
"hasDynamicHelp": false,
|
|
7220
7220
|
"hiddenAliases": [],
|
|
7221
|
-
"id": "
|
|
7221
|
+
"id": "org:update",
|
|
7222
7222
|
"pluginAlias": "@wavyx/pdcli",
|
|
7223
7223
|
"pluginName": "@wavyx/pdcli",
|
|
7224
7224
|
"pluginType": "core",
|
|
@@ -7228,7 +7228,7 @@
|
|
|
7228
7228
|
"relativePath": [
|
|
7229
7229
|
"src",
|
|
7230
7230
|
"commands",
|
|
7231
|
-
"
|
|
7231
|
+
"org",
|
|
7232
7232
|
"update.js"
|
|
7233
7233
|
]
|
|
7234
7234
|
},
|
|
@@ -9948,5 +9948,5 @@
|
|
|
9948
9948
|
]
|
|
9949
9949
|
}
|
|
9950
9950
|
},
|
|
9951
|
-
"version": "0.
|
|
9951
|
+
"version": "0.7.0"
|
|
9952
9952
|
}
|
package/package.json
CHANGED
package/src/base-command.js
CHANGED
|
@@ -118,9 +118,24 @@ export default class BaseCommand extends Command {
|
|
|
118
118
|
})
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
/**
|
|
121
|
+
/** The profile's `default_output` config value, when valid. */
|
|
122
|
+
storedDefaultOutput() {
|
|
123
|
+
const stored = loadConfig(this.flags.profile).default_output
|
|
124
|
+
return ['table', 'json', 'yaml', 'csv'].includes(stored)
|
|
125
|
+
? stored
|
|
126
|
+
: undefined
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Effective output format: explicit flag, else the profile's
|
|
131
|
+
* `default_output`, else table in a TTY and json when piped.
|
|
132
|
+
*/
|
|
122
133
|
resolveFormat() {
|
|
123
|
-
return
|
|
134
|
+
return (
|
|
135
|
+
this.flags.output ??
|
|
136
|
+
this.storedDefaultOutput() ??
|
|
137
|
+
(process.stdout.isTTY ? 'table' : 'json')
|
|
138
|
+
)
|
|
124
139
|
}
|
|
125
140
|
|
|
126
141
|
/**
|
package/src/lib/errors.js
CHANGED
|
@@ -87,7 +87,16 @@ export function handleError(err, cmd) {
|
|
|
87
87
|
const exitCode = err.exitCode ?? 70
|
|
88
88
|
const flags = cmd.flags ?? {}
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
// JSON errors when the user asked for JSON — via the flag or the
|
|
91
|
+
// profile's default_output. (The piped-TTY fallback intentionally does
|
|
92
|
+
// NOT apply here; errors stay human unless JSON was requested.)
|
|
93
|
+
const format =
|
|
94
|
+
flags.output ??
|
|
95
|
+
(typeof cmd.storedDefaultOutput === 'function'
|
|
96
|
+
? cmd.storedDefaultOutput()
|
|
97
|
+
: undefined)
|
|
98
|
+
|
|
99
|
+
if (format === 'json') {
|
|
91
100
|
const payload = {
|
|
92
101
|
error: err.constructor.name,
|
|
93
102
|
message: err.message,
|