@tigrisdata/cli 2.13.1-main.1 → 2.14.0-beta.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.
Files changed (78) hide show
  1. package/dist/auth/s3-client.js +1 -1
  2. package/dist/chunk-2F6KRYMD.js +4 -0
  3. package/dist/{chunk-ZCWF7T5J.js → chunk-2HWTMFLS.js} +1 -1
  4. package/dist/chunk-CQDWZKYG.js +2 -0
  5. package/dist/chunk-PUTZ24A6.js +1 -0
  6. package/dist/chunk-S77OAN6Y.js +1 -0
  7. package/dist/chunk-S7W2ICW6.js +9 -0
  8. package/dist/chunk-TD2HGNDY.js +1 -0
  9. package/dist/chunk-UKNEQJZX.js +1 -0
  10. package/dist/cli-core.js +1 -1
  11. package/dist/cli.js +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/lib/access-keys/assign.js +2 -2
  14. package/dist/lib/access-keys/create.js +2 -2
  15. package/dist/lib/access-keys/delete.js +2 -2
  16. package/dist/lib/access-keys/get.js +2 -2
  17. package/dist/lib/access-keys/list.js +2 -2
  18. package/dist/lib/buckets/create.js +1 -1
  19. package/dist/lib/buckets/delete.js +1 -1
  20. package/dist/lib/buckets/get.js +1 -1
  21. package/dist/lib/buckets/list.js +1 -1
  22. package/dist/lib/buckets/set-cors.js +1 -1
  23. package/dist/lib/buckets/set-locations.js +1 -0
  24. package/dist/lib/buckets/set-migration.js +1 -1
  25. package/dist/lib/buckets/set-notifications.js +1 -1
  26. package/dist/lib/buckets/set-transition.js +1 -1
  27. package/dist/lib/buckets/set-ttl.js +1 -1
  28. package/dist/lib/buckets/set.js +1 -1
  29. package/dist/lib/configure/index.js +1 -1
  30. package/dist/lib/cp.js +1 -1
  31. package/dist/lib/credentials/test.js +1 -1
  32. package/dist/lib/forks/create.js +1 -1
  33. package/dist/lib/forks/list.js +1 -1
  34. package/dist/lib/iam/policies/create.js +2 -2
  35. package/dist/lib/iam/policies/delete.js +2 -2
  36. package/dist/lib/iam/policies/edit.js +2 -2
  37. package/dist/lib/iam/policies/get.js +2 -2
  38. package/dist/lib/iam/policies/list.js +2 -2
  39. package/dist/lib/iam/users/invite.js +3 -3
  40. package/dist/lib/iam/users/list.js +5 -5
  41. package/dist/lib/iam/users/remove.js +3 -3
  42. package/dist/lib/iam/users/revoke-invitation.js +3 -3
  43. package/dist/lib/iam/users/update-role.js +3 -3
  44. package/dist/lib/login/credentials.js +1 -1
  45. package/dist/lib/login/oauth.js +1 -1
  46. package/dist/lib/login/select.js +1 -1
  47. package/dist/lib/logout.js +1 -1
  48. package/dist/lib/ls.js +1 -1
  49. package/dist/lib/mk.js +1 -1
  50. package/dist/lib/mv.js +1 -1
  51. package/dist/lib/objects/delete.js +1 -1
  52. package/dist/lib/objects/get.js +1 -1
  53. package/dist/lib/objects/list.js +1 -1
  54. package/dist/lib/objects/put.js +1 -1
  55. package/dist/lib/objects/set.js +1 -1
  56. package/dist/lib/organizations/create.js +3 -3
  57. package/dist/lib/organizations/list.js +2 -2
  58. package/dist/lib/organizations/select.js +2 -2
  59. package/dist/lib/presign.js +1 -1
  60. package/dist/lib/rm.js +1 -1
  61. package/dist/lib/snapshots/list.js +1 -1
  62. package/dist/lib/snapshots/take.js +1 -1
  63. package/dist/lib/stat.js +1 -1
  64. package/dist/lib/touch.js +1 -1
  65. package/dist/lib/whoami.js +2 -2
  66. package/dist/specs.yaml +283 -15
  67. package/dist/utils/interactive.js +1 -0
  68. package/dist/utils/locations.js +1 -1
  69. package/dist/utils/messages.js +1 -1
  70. package/dist/utils/update-check.js +1 -1
  71. package/package.json +5 -4
  72. package/dist/chunk-4V35SYMM.js +0 -9
  73. package/dist/chunk-F2VBJEK7.js +0 -1
  74. package/dist/chunk-GVEK3IR5.js +0 -1
  75. package/dist/chunk-Q4KOY3VK.js +0 -1
  76. package/dist/chunk-SYGTCM6P.js +0 -2
  77. package/dist/chunk-TNOMT3EP.js +0 -4
  78. /package/dist/{chunk-VOQSWXBS.js → chunk-BQX7MWWL.js} +0 -0
package/dist/specs.yaml CHANGED
@@ -189,6 +189,15 @@ commands:
189
189
  onSuccess: ''
190
190
  onFailure: 'Failed to get user information'
191
191
  onAlreadyDone: "Not authenticated\nRun \"tigris login\" to authenticate"
192
+ arguments:
193
+ - name: format
194
+ description: Output format
195
+ alias: f
196
+ options: [json, table]
197
+ default: table
198
+ - name: json
199
+ description: Output as JSON
200
+ type: flag
192
201
 
193
202
  # logout
194
203
  - name: logout
@@ -223,6 +232,14 @@ commands:
223
232
  description: Bucket name to test access against (optional)
224
233
  alias: b
225
234
  required: false
235
+ - name: format
236
+ description: Output format
237
+ alias: f
238
+ options: [json, table]
239
+ default: table
240
+ - name: json
241
+ description: Output as JSON
242
+ type: flag
226
243
 
227
244
 
228
245
  #########################
@@ -249,6 +266,17 @@ commands:
249
266
  - my-bucket/my-path
250
267
  - t3://my-bucket
251
268
  - t3://my-bucket/my-path
269
+ - name: snapshot-version
270
+ description: Read from a specific bucket snapshot. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464)
271
+ alias: snapshot
272
+ - name: format
273
+ description: Output format
274
+ alias: f
275
+ options: [json, table, xml]
276
+ default: table
277
+ - name: json
278
+ description: Output as JSON
279
+ type: flag
252
280
 
253
281
  # mk
254
282
  - name: mk
@@ -259,6 +287,8 @@ commands:
259
287
  - "tigris mk my-bucket --access public --region iad"
260
288
  - "tigris mk my-bucket/images/"
261
289
  - "tigris mk t3://my-bucket"
290
+ - "tigris mk my-fork --fork-of my-bucket"
291
+ - "tigris mk my-fork --fork-of my-bucket --source-snapshot 1765889000501544464"
262
292
  messages:
263
293
  onFailure: 'Failed to create. Check the name is valid and your credentials have write access'
264
294
  arguments:
@@ -304,6 +334,20 @@ commands:
304
334
  alias: l
305
335
  options: *location_options
306
336
  default: 'global'
337
+ - name: fork-of
338
+ description: Create this bucket as a fork (copy-on-write clone) of the named source bucket
339
+ alias: fork
340
+ - name: source-snapshot
341
+ description: Fork from a specific snapshot of the source bucket. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464). Requires --fork-of
342
+ alias: source-snap
343
+ - name: format
344
+ description: Output format
345
+ alias: f
346
+ options: [json, table]
347
+ default: table
348
+ - name: json
349
+ description: Output as JSON
350
+ type: flag
307
351
 
308
352
  # touch
309
353
  - name: touch
@@ -321,6 +365,14 @@ commands:
321
365
  examples:
322
366
  - my-bucket/my-file.txt
323
367
  - t3://my-bucket/my-file.txt
368
+ - name: format
369
+ description: Output format
370
+ alias: f
371
+ options: [json, table]
372
+ default: table
373
+ - name: json
374
+ description: Output as JSON
375
+ type: flag
324
376
 
325
377
  # stat
326
378
  - name: stat
@@ -347,6 +399,12 @@ commands:
347
399
  alias: f
348
400
  options: [json, table, xml]
349
401
  default: table
402
+ - name: json
403
+ description: Output as JSON
404
+ type: flag
405
+ - name: snapshot-version
406
+ description: Read from a specific bucket snapshot. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464)
407
+ alias: snapshot
350
408
 
351
409
  # presign
352
410
  - name: presign
@@ -384,6 +442,9 @@ commands:
384
442
  alias: f
385
443
  options: [url, json]
386
444
  default: url
445
+ - name: json
446
+ description: Output as JSON
447
+ type: flag
387
448
 
388
449
  # cp
389
450
  - name: cp
@@ -420,6 +481,14 @@ commands:
420
481
  type: flag
421
482
  alias: r
422
483
  description: Copy directories recursively
484
+ - name: format
485
+ description: Output format
486
+ alias: f
487
+ options: [json, table]
488
+ default: table
489
+ - name: json
490
+ description: Output as JSON
491
+ type: flag
423
492
 
424
493
  # mv
425
494
  - name: mv
@@ -455,6 +524,13 @@ commands:
455
524
  type: flag
456
525
  alias: f
457
526
  description: Skip confirmation prompt
527
+ - name: format
528
+ description: Output format
529
+ options: [json, table]
530
+ default: table
531
+ - name: json
532
+ description: Output as JSON
533
+ type: flag
458
534
 
459
535
  # rm
460
536
  - name: rm
@@ -485,6 +561,13 @@ commands:
485
561
  type: flag
486
562
  alias: f
487
563
  description: Skip confirmation prompt
564
+ - name: format
565
+ description: Output format
566
+ options: [json, table]
567
+ default: table
568
+ - name: json
569
+ description: Output as JSON
570
+ type: flag
488
571
 
489
572
  #########################
490
573
  # Manage organizations
@@ -515,6 +598,9 @@ commands:
515
598
  alias: f
516
599
  options: [json, table, xml, select]
517
600
  default: select
601
+ - name: json
602
+ description: Output as JSON
603
+ type: flag
518
604
  - name: select
519
605
  description: Interactive selection mode
520
606
  alias: i
@@ -572,6 +658,7 @@ commands:
572
658
  examples:
573
659
  - "tigris buckets list"
574
660
  - "tigris buckets list --format json"
661
+ - "tigris buckets list --forks-of my-bucket"
575
662
  messages:
576
663
  onStart: 'Listing buckets...'
577
664
  onSuccess: 'Found {{count}} bucket(s)'
@@ -583,6 +670,11 @@ commands:
583
670
  alias: f
584
671
  options: [json, table, xml]
585
672
  default: table
673
+ - name: json
674
+ description: Output as JSON
675
+ type: flag
676
+ - name: forks-of
677
+ description: Only list buckets that are forks of the named source bucket
586
678
  # create
587
679
  - name: create
588
680
  description: Create a new bucket with optional access, tier, and location settings
@@ -591,6 +683,8 @@ commands:
591
683
  - "tigris buckets create my-bucket"
592
684
  - "tigris buckets create my-bucket --access public --locations iad"
593
685
  - "tigris buckets create my-bucket --enable-snapshots --default-tier STANDARD_IA"
686
+ - "tigris buckets create my-fork --fork-of my-bucket"
687
+ - "tigris buckets create my-fork --fork-of my-bucket --source-snapshot 1765889000501544464"
594
688
  messages:
595
689
  onStart: 'Creating bucket...'
596
690
  onSuccess: "Bucket '{{name}}' created successfully"
@@ -635,6 +729,20 @@ commands:
635
729
  alias: l
636
730
  options: *location_options
637
731
  default: 'global'
732
+ - name: fork-of
733
+ description: Create this bucket as a fork (copy-on-write clone) of the named source bucket
734
+ alias: fork
735
+ - name: source-snapshot
736
+ description: Fork from a specific snapshot of the source bucket. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464). Requires --fork-of
737
+ alias: source-snap
738
+ - name: format
739
+ description: Output format
740
+ alias: f
741
+ options: [json, table]
742
+ default: table
743
+ - name: json
744
+ description: Output as JSON
745
+ type: flag
638
746
  # get
639
747
  - name: get
640
748
  description: Show details for a bucket including access level, region, tier, and custom domain
@@ -652,13 +760,21 @@ commands:
652
760
  required: true
653
761
  examples:
654
762
  - my-bucket
763
+ - name: format
764
+ description: Output format
765
+ alias: f
766
+ options: [json, table, xml]
767
+ default: table
768
+ - name: json
769
+ description: Output as JSON
770
+ type: flag
655
771
  # delete
656
772
  - name: delete
657
773
  description: Delete one or more buckets by name. The bucket must be empty or delete-protection must be off
658
774
  alias: d
659
775
  examples:
660
- - "tigris buckets delete my-bucket"
661
- - "tigris buckets delete bucket-a,bucket-b"
776
+ - "tigris buckets delete my-bucket --force"
777
+ - "tigris buckets delete bucket-a,bucket-b --force"
662
778
  messages:
663
779
  onStart: 'Deleting bucket...'
664
780
  onSuccess: "Bucket '{{name}}' deleted successfully"
@@ -671,6 +787,17 @@ commands:
671
787
  multiple: true
672
788
  examples:
673
789
  - my-bucket
790
+ - name: force
791
+ type: flag
792
+ description: Skip confirmation prompt
793
+ - name: format
794
+ description: Output format
795
+ alias: f
796
+ options: [json, table]
797
+ default: table
798
+ - name: json
799
+ description: Output as JSON
800
+ type: flag
674
801
  # set
675
802
  - name: set
676
803
  description: Update settings on an existing bucket such as access level, location, caching, or custom domain
@@ -718,6 +845,13 @@ commands:
718
845
  - name: enable-additional-headers
719
846
  description: Enable additional HTTP headers (X-Content-Type-Options nosniff)
720
847
  type: boolean
848
+ - name: format
849
+ description: Output format
850
+ options: [json, table]
851
+ default: table
852
+ - name: json
853
+ description: Output as JSON
854
+ type: flag
721
855
  # set-ttl
722
856
  - name: set-ttl
723
857
  description: Configure object expiration (TTL) on a bucket. Objects expire after a number of days or on a specific date
@@ -747,6 +881,29 @@ commands:
747
881
  - name: disable
748
882
  description: Disable TTL on the bucket
749
883
  type: flag
884
+ # set-locations
885
+ - name: set-locations
886
+ description: Set the data locations for a bucket
887
+ examples:
888
+ - "tigris buckets set-locations my-bucket --locations iad"
889
+ - "tigris buckets set-locations my-bucket --locations iad,fra"
890
+ - "tigris buckets set-locations my-bucket --locations global"
891
+ messages:
892
+ onStart: 'Updating bucket locations...'
893
+ onSuccess: 'Locations updated for bucket {{name}}'
894
+ onFailure: 'Failed to update bucket locations'
895
+ arguments:
896
+ - name: name
897
+ description: Name of the bucket
898
+ type: positional
899
+ required: true
900
+ examples:
901
+ - my-bucket
902
+ - name: locations
903
+ description: Bucket location
904
+ alias: l
905
+ options: *location_options
906
+ multiple: true
750
907
  # set-migration
751
908
  - name: set-migration
752
909
  description: Configure data migration from an external S3-compatible source bucket. Tigris will pull objects on demand from the source
@@ -906,7 +1063,7 @@ commands:
906
1063
  # Manage forks
907
1064
  #########################
908
1065
  - name: forks
909
- description: List and create forks. A fork is a writable copy-on-write clone of a bucket, useful for testing or branching data
1066
+ description: (Deprecated, use "buckets create --fork-of" and "buckets list --forks-of") List and create forks
910
1067
  alias: f
911
1068
  examples:
912
1069
  - "tigris forks list my-bucket"
@@ -914,7 +1071,8 @@ commands:
914
1071
  commands:
915
1072
  # list
916
1073
  - name: list
917
- description: List all forks created from the given source bucket
1074
+ description: (Deprecated, use "buckets list --forks-of") List all forks created from the given source bucket
1075
+ deprecated: true
918
1076
  alias: l
919
1077
  examples:
920
1078
  - "tigris forks list my-bucket"
@@ -924,6 +1082,7 @@ commands:
924
1082
  onSuccess: 'Found {{count}} fork(s)'
925
1083
  onFailure: 'Failed to list forks'
926
1084
  onEmpty: 'No forks found for this bucket'
1085
+ onDeprecated: 'Use "tigris buckets list --forks-of <bucket>" instead'
927
1086
  arguments:
928
1087
  - name: name
929
1088
  description: Name of the source bucket
@@ -936,17 +1095,22 @@ commands:
936
1095
  alias: f
937
1096
  options: [json, table, xml]
938
1097
  default: table
1098
+ - name: json
1099
+ description: Output as JSON
1100
+ type: flag
939
1101
  # create
940
1102
  - name: create
941
- description: Create a new fork (copy-on-write clone) of the source bucket. Optionally fork from a specific snapshot
1103
+ description: (Deprecated, use "buckets create --fork-of") Create a new fork (copy-on-write clone) of the source bucket
1104
+ deprecated: true
942
1105
  alias: c
943
1106
  examples:
944
1107
  - "tigris forks create my-bucket my-fork"
945
- - "tigris forks create my-bucket my-fork --snapshot snap-2025-01-01"
1108
+ - "tigris forks create my-bucket my-fork --snapshot 1765889000501544464"
946
1109
  messages:
947
1110
  onStart: 'Creating fork...'
948
1111
  onSuccess: "Fork '{{forkName}}' created from '{{name}}'"
949
1112
  onFailure: 'Failed to create fork'
1113
+ onDeprecated: 'Use "tigris buckets create <name> --fork-of <bucket>" instead'
950
1114
  arguments:
951
1115
  - name: name
952
1116
  description: Name of the source bucket
@@ -961,7 +1125,7 @@ commands:
961
1125
  examples:
962
1126
  - my-fork
963
1127
  - name: snapshot
964
- description: Create fork from a specific snapshot
1128
+ description: Create fork from a specific snapshot. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464)
965
1129
  alias: s
966
1130
 
967
1131
  #########################
@@ -998,6 +1162,9 @@ commands:
998
1162
  alias: f
999
1163
  options: [json, table, xml]
1000
1164
  default: table
1165
+ - name: json
1166
+ description: Output as JSON
1167
+ type: flag
1001
1168
  # take
1002
1169
  - name: take
1003
1170
  description: Take a new snapshot of the bucket's current state. Optionally provide a name for the snapshot
@@ -1063,6 +1230,12 @@ commands:
1063
1230
  alias: f
1064
1231
  options: [json, table, xml]
1065
1232
  default: table
1233
+ - name: json
1234
+ description: Output as JSON
1235
+ type: flag
1236
+ - name: snapshot-version
1237
+ description: Read from a specific bucket snapshot. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464)
1238
+ alias: snapshot
1066
1239
  # get
1067
1240
  - name: get
1068
1241
  description: Download an object by key. Prints to stdout by default, or saves to a file with --output
@@ -1094,6 +1267,17 @@ commands:
1094
1267
  description: 'Response mode: "string" loads into memory, "stream" writes in chunks (auto-detected from extension if not specified)'
1095
1268
  alias: m
1096
1269
  options: [string, stream]
1270
+ - name: snapshot-version
1271
+ description: Read from a specific bucket snapshot. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464)
1272
+ alias: snapshot
1273
+ - name: format
1274
+ description: Output format
1275
+ alias: f
1276
+ options: [json, table]
1277
+ default: table
1278
+ - name: json
1279
+ description: Output as JSON
1280
+ type: flag
1097
1281
  # put
1098
1282
  - name: put
1099
1283
  description: Upload a local file as an object. Content-type is auto-detected from extension unless overridden
@@ -1136,13 +1320,16 @@ commands:
1136
1320
  alias: f
1137
1321
  options: [json, table, xml]
1138
1322
  default: table
1323
+ - name: json
1324
+ description: Output as JSON
1325
+ type: flag
1139
1326
  # delete
1140
1327
  - name: delete
1141
1328
  description: Delete one or more objects by key from the given bucket
1142
1329
  alias: d
1143
1330
  examples:
1144
- - "tigris objects delete my-bucket old-file.txt"
1145
- - "tigris objects delete my-bucket file-a.txt,file-b.txt"
1331
+ - "tigris objects delete my-bucket old-file.txt --force"
1332
+ - "tigris objects delete my-bucket file-a.txt,file-b.txt --force"
1146
1333
  messages:
1147
1334
  onStart: 'Deleting object...'
1148
1335
  onSuccess: "Object '{{key}}' deleted successfully"
@@ -1161,6 +1348,17 @@ commands:
1161
1348
  multiple: true
1162
1349
  examples:
1163
1350
  - my-file.txt
1351
+ - name: force
1352
+ type: flag
1353
+ description: Skip confirmation prompt
1354
+ - name: format
1355
+ description: Output format
1356
+ alias: f
1357
+ options: [json, table]
1358
+ default: table
1359
+ - name: json
1360
+ description: Output as JSON
1361
+ type: flag
1164
1362
  # set
1165
1363
  - name: set
1166
1364
  description: Update settings on an existing object such as access level
@@ -1189,6 +1387,14 @@ commands:
1189
1387
  - name: new-key
1190
1388
  description: Rename the object to a new key
1191
1389
  alias: n
1390
+ - name: format
1391
+ description: Output format
1392
+ alias: f
1393
+ options: [json, table]
1394
+ default: table
1395
+ - name: json
1396
+ description: Output as JSON
1397
+ type: flag
1192
1398
 
1193
1399
  #########################
1194
1400
  # Manage access keys
@@ -1211,6 +1417,15 @@ commands:
1211
1417
  onSuccess: ''
1212
1418
  onFailure: 'Failed to list access keys'
1213
1419
  onEmpty: 'No access keys found'
1420
+ arguments:
1421
+ - name: format
1422
+ description: Output format
1423
+ alias: f
1424
+ options: [json, table, xml]
1425
+ default: table
1426
+ - name: json
1427
+ description: Output as JSON
1428
+ type: flag
1214
1429
  - name: create
1215
1430
  description: Create a new access key with the given name. Returns the key ID and secret (shown only once)
1216
1431
  alias: c
@@ -1227,11 +1442,19 @@ commands:
1227
1442
  required: true
1228
1443
  examples:
1229
1444
  - my-key
1445
+ - name: format
1446
+ description: Output format
1447
+ alias: f
1448
+ options: [json, table]
1449
+ default: table
1450
+ - name: json
1451
+ description: Output as JSON
1452
+ type: flag
1230
1453
  - name: delete
1231
1454
  description: Permanently delete an access key by its ID. This revokes all access immediately
1232
1455
  alias: d
1233
1456
  examples:
1234
- - "tigris access-keys delete tid_AaBbCcDdEeFf"
1457
+ - "tigris access-keys delete tid_AaBbCcDdEeFf --force"
1235
1458
  messages:
1236
1459
  onStart: 'Deleting access key...'
1237
1460
  onSuccess: 'Access key deleted'
@@ -1243,6 +1466,17 @@ commands:
1243
1466
  required: true
1244
1467
  examples:
1245
1468
  - tid_AaBbCcDdEeFf
1469
+ - name: force
1470
+ type: flag
1471
+ description: Skip confirmation prompt
1472
+ - name: format
1473
+ description: Output format
1474
+ alias: f
1475
+ options: [json, table]
1476
+ default: table
1477
+ - name: json
1478
+ description: Output as JSON
1479
+ type: flag
1246
1480
  - name: get
1247
1481
  description: Show details for an access key including its name, creation date, and assigned bucket roles
1248
1482
  alias: g
@@ -1259,6 +1493,14 @@ commands:
1259
1493
  required: true
1260
1494
  examples:
1261
1495
  - tid_AaBbCcDdEeFf
1496
+ - name: format
1497
+ description: Output format
1498
+ alias: f
1499
+ options: [json, table]
1500
+ default: table
1501
+ - name: json
1502
+ description: Output as JSON
1503
+ type: flag
1262
1504
  - name: assign
1263
1505
  description: Assign per-bucket roles to an access key. Pair each --bucket with a --role (Editor or ReadOnly), or use --admin for org-wide access
1264
1506
  alias: a
@@ -1295,6 +1537,14 @@ commands:
1295
1537
  - name: revoke-roles
1296
1538
  description: Revoke all bucket roles from the access key
1297
1539
  type: flag
1540
+ - name: format
1541
+ description: Output format
1542
+ alias: f
1543
+ options: [json, table]
1544
+ default: table
1545
+ - name: json
1546
+ description: Output as JSON
1547
+ type: flag
1298
1548
 
1299
1549
  #########################
1300
1550
  # IAM - Identity and Access Management
@@ -1330,6 +1580,9 @@ commands:
1330
1580
  alias: f
1331
1581
  options: [json, table, xml]
1332
1582
  default: table
1583
+ - name: json
1584
+ description: Output as JSON
1585
+ type: flag
1333
1586
  - name: get
1334
1587
  description: Show details for a policy including its document and attached users. If no ARN provided, shows interactive selection
1335
1588
  alias: g
@@ -1353,6 +1606,9 @@ commands:
1353
1606
  alias: f
1354
1607
  options: [json, table, xml]
1355
1608
  default: table
1609
+ - name: json
1610
+ description: Output as JSON
1611
+ type: flag
1356
1612
  - name: create
1357
1613
  description: Create a new policy with the given name and policy document. Document can be provided via file, inline JSON, or stdin
1358
1614
  alias: c
@@ -1408,7 +1664,7 @@ commands:
1408
1664
  alias: d
1409
1665
  examples:
1410
1666
  - "tigris iam policies delete"
1411
- - "tigris iam policies delete arn:aws:iam::org_id:policy/my-policy"
1667
+ - "tigris iam policies delete arn:aws:iam::org_id:policy/my-policy --force"
1412
1668
  messages:
1413
1669
  onStart: 'Deleting policy...'
1414
1670
  onSuccess: "Policy '{{resource}}' deleted"
@@ -1421,6 +1677,9 @@ commands:
1421
1677
  required: false
1422
1678
  examples:
1423
1679
  - arn:aws:iam::org_id:policy/my-policy
1680
+ - name: force
1681
+ type: flag
1682
+ description: Skip confirmation prompt
1424
1683
 
1425
1684
  - name: users
1426
1685
  description: Manage organization users and invitations
@@ -1447,6 +1706,9 @@ commands:
1447
1706
  alias: f
1448
1707
  options: [json, table, xml]
1449
1708
  default: table
1709
+ - name: json
1710
+ description: Output as JSON
1711
+ type: flag
1450
1712
  - name: invite
1451
1713
  description: Invite users to the organization by email
1452
1714
  alias: i
@@ -1477,8 +1739,8 @@ commands:
1477
1739
  alias: ri
1478
1740
  examples:
1479
1741
  - "tigris iam users revoke-invitation"
1480
- - "tigris iam users revoke-invitation invitation_id"
1481
- - "tigris iam users revoke-invitation id1,id2,id3"
1742
+ - "tigris iam users revoke-invitation invitation_id --force"
1743
+ - "tigris iam users revoke-invitation id1,id2,id3 --force"
1482
1744
  messages:
1483
1745
  onStart: 'Revoking invitation...'
1484
1746
  onSuccess: "Invitation(s) revoked"
@@ -1490,6 +1752,9 @@ commands:
1490
1752
  type: positional
1491
1753
  required: false
1492
1754
  multiple: true
1755
+ - name: force
1756
+ type: flag
1757
+ description: Skip confirmation prompt
1493
1758
  - name: update-role
1494
1759
  description: Update user roles in the organization. If no user ID provided, shows interactive selection
1495
1760
  alias: ur
@@ -1520,8 +1785,8 @@ commands:
1520
1785
  alias: rm
1521
1786
  examples:
1522
1787
  - "tigris iam users remove"
1523
- - "tigris iam users remove user@example.com"
1524
- - "tigris iam users remove user@example.com,user@example.net"
1788
+ - "tigris iam users remove user@example.com --force"
1789
+ - "tigris iam users remove user@example.com,user@example.net --force"
1525
1790
  messages:
1526
1791
  onStart: 'Removing user...'
1527
1792
  onSuccess: "User(s) removed"
@@ -1533,3 +1798,6 @@ commands:
1533
1798
  type: positional
1534
1799
  required: false
1535
1800
  multiple: true
1801
+ - name: force
1802
+ type: flag
1803
+ description: Skip confirmation prompt
@@ -0,0 +1 @@
1
+ import{a,b}from"../chunk-S77OAN6Y.js";export{b as confirm,a as requireInteractive};
@@ -1 +1 @@
1
- import{a,b,c}from"../chunk-Q4KOY3VK.js";export{a as multiRegionChoices,c as parseLocations,b as singleRegionChoices};
1
+ import{a,b}from"../chunk-TD2HGNDY.js";import"../chunk-S77OAN6Y.js";export{b as parseLocations,a as promptLocations};
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g}from"../chunk-SYGTCM6P.js";import"../chunk-BETAO4PB.js";export{g as msg,e as printAlreadyDone,d as printEmpty,c as printFailure,f as printHint,a as printStart,b as printSuccess};
1
+ import{a,b,c,d,e,f,g,h}from"../chunk-CQDWZKYG.js";import"../chunk-BETAO4PB.js";export{h as msg,e as printAlreadyDone,g as printDeprecated,d as printEmpty,c as printFailure,f as printHint,a as printStart,b as printSuccess};
@@ -1 +1 @@
1
- import{b as a,c as b}from"../chunk-ZCWF7T5J.js";import"../chunk-2XAO2OYD.js";export{b as checkForUpdates,a as isNewerVersion};
1
+ import{b as a,c as b}from"../chunk-2HWTMFLS.js";import"../chunk-2XAO2OYD.js";export{b as checkForUpdates,a as isNewerVersion};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tigrisdata/cli",
3
- "version": "2.13.1-main.1",
3
+ "version": "2.14.0-beta.1",
4
4
  "description": "Command line interface for Tigris object storage",
5
5
  "type": "module",
6
6
  "exports": {
@@ -29,9 +29,9 @@
29
29
  "lint:fix": "eslint src --fix",
30
30
  "format": "prettier --write \"src/**/*.ts\"",
31
31
  "format:check": "prettier --check \"src/**/*.ts\"",
32
- "test": "vitest run",
32
+ "test": "vitest run test/utils test/cli-core.test.ts test/specs-completeness.test.ts",
33
33
  "test:watch": "vitest",
34
- "test:unit": "vitest run test/utils",
34
+ "test:all": "vitest run",
35
35
  "test:integration": "vitest run test/cli.test.ts",
36
36
  "publint": "publint",
37
37
  "updatedocs": "tsx scripts/update-docs.ts",
@@ -68,7 +68,8 @@
68
68
  "release",
69
69
  {
70
70
  "name": "main",
71
- "prerelease": true
71
+ "prerelease": "beta",
72
+ "channel": "beta"
72
73
  }
73
74
  ],
74
75
  "plugins": [
@@ -1,9 +0,0 @@
1
- import{Command as k}from"commander";function I(){process.on("unhandledRejection",e=>{(e===""||e===void 0)&&(console.error(`
2
- Operation cancelled`),process.exit(1)),console.error(`
3
- Error:`,e instanceof Error?e.message:e),process.exit(1)}),process.on("uncaughtException",e=>{console.error(`
4
- Error:`,e.message),process.exit(1)})}function v(e){return/^[a-zA-Z0-9_-]+$/.test(e)}function b(e){let t;e.type==="positional"?t=` ${e.name}`:(t=` --${e.name}`,e.alias&&typeof e.alias=="string"&&e.alias.length===1&&(t+=`, -${e.alias}`));let o=26,a=t.length>=o?t+" ":t.padEnd(o),n=e.description;return e.options&&(Array.isArray(e.options)&&typeof e.options[0]=="string"?n+=` (options: ${e.options.join(", ")})`:n+=` (options: ${e.options.map(r=>r.value).join(", ")})`),e.default&&(n+=` [default: ${e.default}]`),e.required&&(n+=" [required]"),e["required-when"]&&(n+=` [required when: ${e["required-when"]}]`),e.multiple&&(n+=" [multiple values: comma-separated]"),e.type==="positional"&&(n+=" [positional argument]"),e.examples&&e.examples.length>0&&(n+=` (examples: ${e.examples.join(", ")})`),`${a}${n}`}function f(e,t,o){return o(t)?!0:e.commands?e.commands.some(a=>f(a,[...t,a.name],o)):!1}function y(e,t,o,a){let n=o.join(" ");if(console.log(`
5
- ${e.name} ${n} - ${t.description}
6
- `),t.commands&&t.commands.length>0){let r=t.commands.filter(s=>f(s,[...o,s.name],a));r.length>0&&(console.log("Commands:"),r.forEach(s=>{let i=` ${s.name}`;if(s.alias){let l=Array.isArray(s.alias)?s.alias:[s.alias];i+=` (${l.join(", ")})`}let c=i.padEnd(24);console.log(`${c}${s.description}`)}),console.log())}t.arguments&&t.arguments.length>0&&(console.log("Arguments:"),t.arguments.forEach(r=>{console.log(b(r))}),console.log()),t.examples&&t.examples.length>0&&(console.log("Examples:"),t.examples.forEach(r=>{console.log(` ${r}`)}),console.log()),t.commands&&t.commands.length>0&&console.log(`Use "${e.name} ${n} <command> help" for more information about a command.`)}function x(e,t,o){console.log(`Tigris CLI Version: ${t}
7
- `),console.log(`Usage: tigris [command] [options]
8
- `),console.log("Commands:"),e.commands.filter(n=>f(n,[n.name],o)).forEach(n=>{let r=` ${n.name}`;if(n.alias){let i=Array.isArray(n.alias)?n.alias:[n.alias];r+=` (${i.join(", ")})`}let s=r.padEnd(24);console.log(`${s}${n.description}`)}),console.log(`
9
- Use "${e.name} <command> help" for more information about a command.`)}function g(e,t=[]){t.forEach(o=>{if(o.type==="positional"){let a=o.required?`<${o.name}>`:`[${o.name}]`;e.argument(a,o.description)}else{let n=o.alias&&typeof o.alias=="string"&&o.alias.length===1?`-${o.alias}, --${o.name}`:`--${o.name}`;o.type==="flag"||(o.type==="boolean"?n+=" [value]":o.options?n+=" <value>":n+=o.required||o["required-when"]?" <value>":" [value]"),e.option(n,o.description,o.default)}})}function q(e){return e.replace(/-([a-z])/g,(t,o)=>o.toUpperCase())}function C(e,t,o){if(o){let n=o.find(r=>r.name===t);if(n&&n.alias&&typeof n.alias=="string"){let r=n.alias.charAt(0).toUpperCase()+n.alias.slice(1);if(e[r]!==void 0)return e[r]}}let a=[t,t.replace(/-/g,""),t.replace(/-/g,"").toLowerCase(),t.charAt(0).toUpperCase(),q(t)];for(let n of a)if(e[n]!==void 0)return e[n]}function w(e,t){for(let o of e){if(o["required-when"]){let[a,n]=o["required-when"].split("="),r=C(t,a,e),s=C(t,o.name,e);if(r===n&&!s)return console.error(`--${o.name} is required when --${a} is ${n}`),!1}if(o.required&&!C(t,o.name,e))return console.error(`--${o.name} is required`),!1}return!0}function d(e,t,o){let a;"optsWithGlobals"in o&&typeof o.optsWithGlobals=="function"?a=o.optsWithGlobals():"opts"in o&&typeof o.opts=="function"?a=o.opts():a=o;let n={...a};return e.filter(s=>s.type==="positional").forEach((s,i)=>{t[i]!==void 0&&(s.multiple?n[s.name]=t[i].split(",").map(c=>c.trim()):n[s.name]=t[i])}),e.forEach(s=>{s.multiple&&s.type!=="positional"&&n[s.name]&&typeof n[s.name]=="string"&&(n[s.name]=n[s.name].split(",").map(i=>i.trim()))}),n}async function A(e,t,o=[],a={}){let{module:n,error:r}=await e(t);(r||!n)&&(console.error(r),process.exit(1));let s=t[t.length-1],i=n.default||n[s];typeof i!="function"&&(console.error(`Command not implemented: ${t.join(" ")}`),process.exit(1)),await i({...a,_positional:o})}function E(e,t,o,a=[]){let{specs:n,loadModule:r,hasImplementation:s}=e;for(let i of o){v(i.name)||(console.error(`Invalid command name "${i.name}": only alphanumeric, hyphens, and underscores allowed`),process.exit(1));let c=[...a,i.name];if(!f(i,c,s))continue;let l=t.command(i.name).description(i.description);if(i.alias&&(Array.isArray(i.alias)?i.alias:[i.alias]).forEach(m=>l.alias(m)),i.commands&&i.commands.length>0)if(E(e,l,i.commands,c),i.default){let p=i.commands.find(m=>m.name===i.default);if(p){g(l,i.arguments),g(l,p.arguments);let m=[...i.arguments||[],...p.arguments||[]];l.action(async(...u)=>{let $=u.pop(),h=u;m.length>0&&!w(m,d(m,h,$))||await A(r,[...c,p.name],h,d(m,h,$))})}}else l.action(()=>{y(n,i,c,s)});else g(l,i.arguments),l.action(async(...p)=>{let m=p.pop(),u=p;i.arguments&&!w(i.arguments,d(i.arguments,u,m))||await A(r,c,u,d(i.arguments||[],u,m))});l.command("help").description("Show help for this command").action(()=>{y(n,i,c,s)})}}function R(e){let{specs:t,version:o,hasImplementation:a}=e,n=new k;return n.name(t.name).description(t.description).version(o),E(e,n,t.commands),n.command("help").description("Show general help").action(()=>{x(t,o,a)}),n.action(()=>{x(t,o,a)}),n}export{I as a,v as b,b as c,f as d,y as e,x as f,g,w as h,d as i,E as j,R as k};
@@ -1 +0,0 @@
1
- import{a as u,b as o,c as m,g}from"./chunk-SYGTCM6P.js";import{m as i,o as d,r as y}from"./chunk-DOUR5YEY.js";import{a as n}from"./chunk-2XAO2OYD.js";import p from"enquirer";var{prompt:S}=p,t=g("login","credentials");async function l(e){u(t);let s=e["access-key"]||e.accessKey||e.key||e.Key||e.accesskey,c=e["access-secret"]||e.accessSecret||e.secret||e.Secret||e.accesssecret;if(!s||!c){let r=[];s||r.push({type:"input",name:"accessKey",message:"Access Key ID:",required:!0}),c||r.push({type:"password",name:"accessSecret",message:"Secret Access Key:",required:!0});let a=await S(r);s=s||a.accessKey,c=c||a.accessSecret}(!s||!c)&&(m(t,"Access key and secret are required"),process.exit(1));let f=i()?.endpoint||n;await d({accessKeyId:s,secretAccessKey:c,endpoint:f}),await y("credentials"),o(t)}export{l as a};