@tigrisdata/cli 2.2.0 → 2.4.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 (41) 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/cli.js +2 -2
  6. package/dist/index.js +4 -4
  7. package/dist/lib/access-keys/assign.js +3 -0
  8. package/dist/lib/access-keys/create.js +3 -0
  9. package/dist/lib/access-keys/delete.js +3 -0
  10. package/dist/lib/access-keys/get.js +3 -0
  11. package/dist/lib/access-keys/list.js +8 -0
  12. package/dist/lib/buckets/create.js +1 -1
  13. package/dist/lib/buckets/delete.js +2 -2
  14. package/dist/lib/buckets/get.js +4 -4
  15. package/dist/lib/buckets/list.js +3 -3
  16. package/dist/lib/buckets/set.js +2 -0
  17. package/dist/lib/cp.js +1 -1
  18. package/dist/lib/credentials/test.js +2 -0
  19. package/dist/lib/forks/create.js +2 -2
  20. package/dist/lib/forks/list.js +2 -2
  21. package/dist/lib/login/credentials.js +1 -1
  22. package/dist/lib/login/oauth.js +2 -2
  23. package/dist/lib/login/select.js +3 -3
  24. package/dist/lib/ls.js +1 -1
  25. package/dist/lib/mk.js +1 -1
  26. package/dist/lib/mv.js +1 -1
  27. package/dist/lib/objects/delete.js +2 -2
  28. package/dist/lib/objects/get.js +2 -2
  29. package/dist/lib/objects/list.js +4 -4
  30. package/dist/lib/objects/put.js +3 -3
  31. package/dist/lib/organizations/create.js +3 -3
  32. package/dist/lib/organizations/list.js +7 -7
  33. package/dist/lib/organizations/select.js +5 -5
  34. package/dist/lib/rm.js +1 -1
  35. package/dist/lib/snapshots/list.js +7 -7
  36. package/dist/lib/snapshots/take.js +2 -2
  37. package/dist/lib/touch.js +1 -1
  38. package/dist/lib/whoami.js +3 -3
  39. package/dist/specs.yaml +130 -0
  40. package/dist/utils/options.js +1 -1
  41. package/package.json +3 -2
package/dist/specs.yaml CHANGED
@@ -171,6 +171,103 @@ commands:
171
171
  onSuccess: 'Logged out. Your configured credentials are still saved.'
172
172
  onFailure: 'Failed to logout'
173
173
 
174
+ # credentials
175
+ - name: credentials
176
+ description: Manage and test credentials
177
+ alias: creds
178
+ operations:
179
+ - name: test
180
+ description: Test if credentials have access to Tigris (optionally to a specific bucket)
181
+ alias: t
182
+ messages:
183
+ onStart: 'Testing credentials...'
184
+ onSuccess: 'Credentials are valid'
185
+ onFailure: 'Credentials test failed'
186
+ arguments:
187
+ - name: bucket
188
+ description: Bucket name to test access against (optional)
189
+ alias: b
190
+ required: false
191
+
192
+ # access-keys
193
+ - name: access-keys
194
+ description: Manage access keys
195
+ alias: keys
196
+ operations:
197
+ - name: list
198
+ description: List all access keys
199
+ alias: l
200
+ messages:
201
+ onStart: ''
202
+ onSuccess: ''
203
+ onFailure: 'Failed to list access keys'
204
+ onEmpty: 'No access keys found'
205
+ - name: create
206
+ description: Create a new access key
207
+ alias: c
208
+ messages:
209
+ onStart: 'Creating access key...'
210
+ onSuccess: 'Access key created'
211
+ onFailure: 'Failed to create access key'
212
+ arguments:
213
+ - name: name
214
+ description: Name for the access key
215
+ type: positional
216
+ required: true
217
+ - name: delete
218
+ description: Delete an access key
219
+ alias: d
220
+ messages:
221
+ onStart: 'Deleting access key...'
222
+ onSuccess: 'Access key deleted'
223
+ onFailure: 'Failed to delete access key'
224
+ arguments:
225
+ - name: id
226
+ description: Access key ID
227
+ type: positional
228
+ required: true
229
+ - name: get
230
+ description: Get details of an access key
231
+ alias: g
232
+ messages:
233
+ onStart: ''
234
+ onSuccess: ''
235
+ onFailure: 'Failed to get access key'
236
+ arguments:
237
+ - name: id
238
+ description: Access key ID
239
+ type: positional
240
+ required: true
241
+ - name: assign
242
+ description: Assign bucket roles to an access key
243
+ alias: a
244
+ messages:
245
+ onStart: 'Assigning bucket roles...'
246
+ onSuccess: 'Bucket roles assigned'
247
+ onFailure: 'Failed to assign bucket roles'
248
+ arguments:
249
+ - name: id
250
+ description: Access key ID
251
+ type: positional
252
+ required: true
253
+ - name: bucket
254
+ alias: b
255
+ description: Bucket name (can specify multiple)
256
+ multiple: true
257
+ - name: role
258
+ alias: r
259
+ description: Role to assign (can specify multiple to pair with buckets)
260
+ multiple: true
261
+ options:
262
+ - Editor
263
+ - ReadOnly
264
+ - name: admin
265
+ description: Grant admin access to all buckets in the organization
266
+ type: flag
267
+ - name: revoke-roles
268
+ description: Revoke all bucket roles from the access key
269
+ type: flag
270
+
174
271
  #########################
175
272
  # Unix style commands
176
273
  #########################
@@ -429,6 +526,39 @@ commands:
429
526
  type: positional
430
527
  required: true
431
528
  multiple: true
529
+ # set
530
+ - name: set
531
+ description: Update bucket settings
532
+ alias: s
533
+ messages:
534
+ onStart: 'Updating bucket...'
535
+ onSuccess: 'Bucket {{name}} updated successfully'
536
+ onFailure: 'Failed to update bucket'
537
+ arguments:
538
+ - name: name
539
+ description: Name of the bucket
540
+ type: positional
541
+ required: true
542
+ - name: access
543
+ description: Bucket access level
544
+ options: *access_options
545
+ - name: region
546
+ description: Allowed regions (can specify multiple)
547
+ options: *region_options
548
+ multiple: true
549
+ - name: allow-object-acl
550
+ description: Enable object-level ACL
551
+ type: boolean
552
+ - name: disable-directory-listing
553
+ description: Disable directory listing
554
+ type: boolean
555
+ - name: cache-control
556
+ description: Default cache-control header value
557
+ - name: custom-domain
558
+ description: Custom domain for the bucket
559
+ - name: enable-delete-protection
560
+ description: Enable delete protection
561
+ type: boolean
432
562
 
433
563
  #########################
434
564
  # Manage forks
@@ -1 +1 @@
1
- function f(n,r,t){for(let e of r)if(n[e]!==void 0)return n[e];return t}export{f as getOption};
1
+ function t(n,r,o){for(let e of r)if(n[e]!==void 0)return n[e];return o}function f(n){if(n!==void 0)return typeof n=="boolean"?n:n==="true"}export{t as getOption,f as parseBoolean};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tigrisdata/cli",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "Command line interface for Tigris object storage",
5
5
  "type": "module",
6
6
  "exports": {
@@ -78,7 +78,8 @@
78
78
  },
79
79
  "dependencies": {
80
80
  "@aws-sdk/client-s3": "^3.908.0",
81
- "@tigrisdata/storage": "^2.10.1",
81
+ "@tigrisdata/iam": "^1.1.0",
82
+ "@tigrisdata/storage": "^2.12.0",
82
83
  "axios": "^1.12.2",
83
84
  "commander": "^11.0.0",
84
85
  "enquirer": "^2.4.1",