@tigrisdata/cli 2.3.0 → 2.5.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.
Files changed (44) hide show
  1. package/README.md +86 -0
  2. package/dist/auth/client.js +1 -1
  3. package/dist/auth/config.js +1 -1
  4. package/dist/auth/s3-client.js +1 -1
  5. package/dist/auth/storage.js +1 -1
  6. package/dist/cli.js +5 -5
  7. package/dist/constants.js +1 -0
  8. package/dist/index.js +5 -5
  9. package/dist/lib/access-keys/assign.js +3 -0
  10. package/dist/lib/access-keys/create.js +3 -0
  11. package/dist/lib/access-keys/delete.js +3 -0
  12. package/dist/lib/access-keys/get.js +3 -0
  13. package/dist/lib/access-keys/list.js +8 -0
  14. package/dist/lib/buckets/create.js +2 -2
  15. package/dist/lib/buckets/delete.js +2 -2
  16. package/dist/lib/buckets/get.js +7 -7
  17. package/dist/lib/buckets/list.js +7 -7
  18. package/dist/lib/buckets/set.js +2 -2
  19. package/dist/lib/configure/index.js +2 -2
  20. package/dist/lib/cp.js +1 -1
  21. package/dist/lib/credentials/test.js +2 -2
  22. package/dist/lib/forks/create.js +2 -2
  23. package/dist/lib/forks/list.js +7 -7
  24. package/dist/lib/login/credentials.js +2 -2
  25. package/dist/lib/login/oauth.js +3 -3
  26. package/dist/lib/login/select.js +4 -4
  27. package/dist/lib/logout.js +2 -2
  28. package/dist/lib/ls.js +5 -5
  29. package/dist/lib/mk.js +1 -1
  30. package/dist/lib/mv.js +1 -1
  31. package/dist/lib/objects/delete.js +2 -2
  32. package/dist/lib/objects/get.js +2 -2
  33. package/dist/lib/objects/list.js +7 -7
  34. package/dist/lib/objects/put.js +7 -7
  35. package/dist/lib/organizations/create.js +3 -3
  36. package/dist/lib/organizations/list.js +7 -7
  37. package/dist/lib/organizations/select.js +5 -5
  38. package/dist/lib/rm.js +1 -1
  39. package/dist/lib/snapshots/list.js +6 -6
  40. package/dist/lib/snapshots/take.js +2 -2
  41. package/dist/lib/touch.js +1 -1
  42. package/dist/lib/whoami.js +3 -3
  43. package/dist/specs.yaml +132 -2
  44. package/package.json +5 -3
package/dist/specs.yaml CHANGED
@@ -79,7 +79,7 @@ commands:
79
79
  #########################
80
80
  # configure
81
81
  - name: configure
82
- description: Save credentials permanently. After running this, all commands work automatically
82
+ description: Save credentials permanently. After running this, all commands uses these credentials.
83
83
  alias: c
84
84
  messages:
85
85
  onStart: 'Saving credentials...'
@@ -189,6 +189,7 @@ commands:
189
189
  alias: b
190
190
  required: false
191
191
 
192
+
192
193
  #########################
193
194
  # Unix style commands
194
195
  #########################
@@ -347,6 +348,8 @@ commands:
347
348
  type: positional
348
349
  required: true
349
350
  description: Name of the organization
351
+ examples:
352
+ - my-organization
350
353
  - name: select
351
354
  description: Select the organization to use
352
355
  alias: s
@@ -359,6 +362,8 @@ commands:
359
362
  type: positional
360
363
  required: true
361
364
  description: Name of the organization
365
+ examples:
366
+ - my-organization
362
367
 
363
368
  #########################
364
369
  # Manage buckets
@@ -385,7 +390,7 @@ commands:
385
390
  # create
386
391
  - name: create
387
392
  description: Create bucket
388
- alias: [c]
393
+ alias: c
389
394
  messages:
390
395
  onStart: 'Creating bucket...'
391
396
  onSuccess: "Bucket '{{name}}' created successfully"
@@ -395,6 +400,8 @@ commands:
395
400
  description: Name of the bucket
396
401
  type: positional
397
402
  required: false
403
+ examples:
404
+ - my-bucket
398
405
  - name: access
399
406
  description: Access level
400
407
  alias: a
@@ -433,6 +440,8 @@ commands:
433
440
  description: Name of the bucket
434
441
  type: positional
435
442
  required: true
443
+ examples:
444
+ - my-bucket
436
445
  # delete
437
446
  - name: delete
438
447
  description: Delete bucket
@@ -447,6 +456,8 @@ commands:
447
456
  type: positional
448
457
  required: true
449
458
  multiple: true
459
+ examples:
460
+ - my-bucket
450
461
  # set
451
462
  - name: set
452
463
  description: Update bucket settings
@@ -460,6 +471,8 @@ commands:
460
471
  description: Name of the bucket
461
472
  type: positional
462
473
  required: true
474
+ examples:
475
+ - my-bucket
463
476
  - name: access
464
477
  description: Bucket access level
465
478
  options: *access_options
@@ -502,6 +515,8 @@ commands:
502
515
  description: Name of the source bucket
503
516
  type: positional
504
517
  required: true
518
+ examples:
519
+ - my-bucket
505
520
  - name: format
506
521
  description: Output format
507
522
  alias: f
@@ -520,10 +535,14 @@ commands:
520
535
  description: Name of the source bucket
521
536
  type: positional
522
537
  required: true
538
+ examples:
539
+ - my-bucket
523
540
  - name: fork-name
524
541
  description: Name for the new fork
525
542
  type: positional
526
543
  required: true
544
+ examples:
545
+ - my-fork
527
546
  - name: snapshot
528
547
  description: Create fork from a specific snapshot
529
548
  alias: s
@@ -549,6 +568,8 @@ commands:
549
568
  description: Name of the bucket
550
569
  type: positional
551
570
  required: true
571
+ examples:
572
+ - my-bucket
552
573
  - name: format
553
574
  description: Output format
554
575
  alias: f
@@ -567,10 +588,14 @@ commands:
567
588
  description: Name of the bucket
568
589
  type: positional
569
590
  required: true
591
+ examples:
592
+ - my-bucket
570
593
  - name: snapshot-name
571
594
  description: Name of the snapshot (optional)
572
595
  type: positional
573
596
  required: false
597
+ examples:
598
+ - my-snapshot
574
599
 
575
600
  #########################
576
601
  # Manage objects
@@ -593,6 +618,8 @@ commands:
593
618
  description: Name of the bucket
594
619
  type: positional
595
620
  required: true
621
+ examples:
622
+ - my-bucket
596
623
  - name: prefix
597
624
  description: Filter objects by prefix
598
625
  alias: p
@@ -614,10 +641,14 @@ commands:
614
641
  description: Name of the bucket
615
642
  type: positional
616
643
  required: true
644
+ examples:
645
+ - my-bucket
617
646
  - name: key
618
647
  description: Key of the object
619
648
  type: positional
620
649
  required: true
650
+ examples:
651
+ - my-file.txt
621
652
  - name: output
622
653
  description: Output file path (if not specified, prints to stdout)
623
654
  alias: o
@@ -638,14 +669,20 @@ commands:
638
669
  description: Name of the bucket
639
670
  type: positional
640
671
  required: true
672
+ examples:
673
+ - my-bucket
641
674
  - name: key
642
675
  description: Key for the object
643
676
  type: positional
644
677
  required: true
678
+ examples:
679
+ - my-file.txt
645
680
  - name: file
646
681
  description: Path to the file to upload
647
682
  type: positional
648
683
  required: true
684
+ examples:
685
+ - ./my-file.txt
649
686
  - name: access
650
687
  description: Access level
651
688
  alias: a
@@ -672,8 +709,101 @@ commands:
672
709
  description: Name of the bucket
673
710
  type: positional
674
711
  required: true
712
+ examples:
713
+ - my-bucket
675
714
  - name: key
676
715
  description: Key of the object (comma separated for multiple)
677
716
  type: positional
678
717
  required: true
679
718
  multiple: true
719
+ examples:
720
+ - my-file.txt
721
+
722
+ #########################
723
+ # Manage access keys
724
+ #########################
725
+ - name: access-keys
726
+ description: Manage access keys
727
+ alias: keys
728
+ operations:
729
+ - name: list
730
+ description: List all access keys
731
+ alias: l
732
+ messages:
733
+ onStart: ''
734
+ onSuccess: ''
735
+ onFailure: 'Failed to list access keys'
736
+ onEmpty: 'No access keys found'
737
+ - name: create
738
+ description: Create a new access key
739
+ alias: c
740
+ messages:
741
+ onStart: 'Creating access key...'
742
+ onSuccess: 'Access key created'
743
+ onFailure: 'Failed to create access key'
744
+ arguments:
745
+ - name: name
746
+ description: Name for the access key
747
+ type: positional
748
+ required: true
749
+ examples:
750
+ - my-key
751
+ - name: delete
752
+ description: Delete an access key
753
+ alias: d
754
+ messages:
755
+ onStart: 'Deleting access key...'
756
+ onSuccess: 'Access key deleted'
757
+ onFailure: 'Failed to delete access key'
758
+ arguments:
759
+ - name: id
760
+ description: Access key ID
761
+ type: positional
762
+ required: true
763
+ examples:
764
+ - tid_AaBbCcDdEeFf
765
+ - name: get
766
+ description: Get details of an access key
767
+ alias: g
768
+ messages:
769
+ onStart: ''
770
+ onSuccess: ''
771
+ onFailure: 'Failed to get access key'
772
+ arguments:
773
+ - name: id
774
+ description: Access key ID
775
+ type: positional
776
+ required: true
777
+ examples:
778
+ - tid_AaBbCcDdEeFf
779
+ - name: assign
780
+ description: Assign bucket roles to an access key
781
+ alias: a
782
+ messages:
783
+ onStart: 'Assigning bucket roles...'
784
+ onSuccess: 'Bucket roles assigned'
785
+ onFailure: 'Failed to assign bucket roles'
786
+ arguments:
787
+ - name: id
788
+ description: Access key ID
789
+ type: positional
790
+ required: true
791
+ examples:
792
+ - tid_AaBbCcDdEeFf
793
+ - name: bucket
794
+ alias: b
795
+ description: Bucket name (can specify multiple)
796
+ multiple: true
797
+ - name: role
798
+ alias: r
799
+ description: Role to assign (can specify multiple to pair with buckets)
800
+ multiple: true
801
+ options:
802
+ - Editor
803
+ - ReadOnly
804
+ - name: admin
805
+ description: Grant admin access to all buckets in the organization
806
+ type: flag
807
+ - name: revoke-roles
808
+ description: Revoke all bucket roles from the access key
809
+ type: flag
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tigrisdata/cli",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "Command line interface for Tigris object storage",
5
5
  "type": "module",
6
6
  "exports": {
@@ -78,8 +78,10 @@
78
78
  },
79
79
  "dependencies": {
80
80
  "@aws-sdk/client-s3": "^3.908.0",
81
- "@tigrisdata/iam": "^1.0.0",
82
- "@tigrisdata/storage": "^2.11.0",
81
+ "@aws-sdk/credential-providers": "^3.981.0",
82
+ "@smithy/shared-ini-file-loader": "^4.4.3",
83
+ "@tigrisdata/iam": "^1.1.0",
84
+ "@tigrisdata/storage": "^2.12.0",
83
85
  "axios": "^1.12.2",
84
86
  "commander": "^11.0.0",
85
87
  "enquirer": "^2.4.1",