@tigrisdata/cli 3.9.1 → 3.11.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 (120) hide show
  1. package/README.md +84 -7
  2. package/dist/auth/iam.js +1 -1
  3. package/dist/auth/provider.js +1 -1
  4. package/dist/{chunk-YS3BDOPE.js → chunk-5AGM4LUA.js} +1 -1
  5. package/dist/{chunk-LNMRG2VH.js → chunk-5QNWWNPL.js} +1 -1
  6. package/dist/{chunk-R5SYFHP5.js → chunk-6TTEDYLD.js} +1 -1
  7. package/dist/{chunk-L3733IUI.js → chunk-7BUC7A7V.js} +1 -1
  8. package/dist/{chunk-AJOTB3MR.js → chunk-7Q44GQ2Y.js} +1 -1
  9. package/dist/{chunk-3IH53DPU.js → chunk-GMZ3URGL.js} +1 -1
  10. package/dist/{chunk-VBFFBPYR.js → chunk-GZMEHP36.js} +1 -1
  11. package/dist/{chunk-IOA742JD.js → chunk-IEFUKJDE.js} +1 -1
  12. package/dist/chunk-IUIKP2LU.js +1 -0
  13. package/dist/chunk-KJXUEGXY.js +8 -0
  14. package/dist/{chunk-MKQ7H3JV.js → chunk-PUHRE62R.js} +1 -1
  15. package/dist/chunk-QPUL2AAI.js +1 -0
  16. package/dist/{chunk-RH5OMEH2.js → chunk-TVH7NCXE.js} +2 -2
  17. package/dist/{chunk-WX7P2JTJ.js → chunk-VPELL4UB.js} +1 -1
  18. package/dist/chunk-Z54TMLIH.js +1 -0
  19. package/dist/{chunk-KNQIS63O.js → chunk-Z5DYQHN2.js} +1 -1
  20. package/dist/cli-core.js +1 -1
  21. package/dist/cli.js +1 -1
  22. package/dist/constants.js +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/lib/access-keys/assign.js +1 -1
  25. package/dist/lib/access-keys/attach-policy.js +1 -1
  26. package/dist/lib/access-keys/create.js +1 -1
  27. package/dist/lib/access-keys/delete.js +1 -1
  28. package/dist/lib/access-keys/detach-policy.js +1 -1
  29. package/dist/lib/access-keys/get.js +1 -1
  30. package/dist/lib/access-keys/list-policies.js +1 -1
  31. package/dist/lib/access-keys/list.js +1 -1
  32. package/dist/lib/access-keys/rotate.js +1 -1
  33. package/dist/lib/buckets/create.js +1 -1
  34. package/dist/lib/buckets/delete.js +1 -1
  35. package/dist/lib/buckets/disable-snapshots.js +1 -1
  36. package/dist/lib/buckets/enable-snapshots.js +1 -1
  37. package/dist/lib/buckets/get.js +1 -1
  38. package/dist/lib/buckets/lifecycle/create.js +1 -1
  39. package/dist/lib/buckets/lifecycle/edit.js +1 -1
  40. package/dist/lib/buckets/lifecycle/list.js +1 -1
  41. package/dist/lib/buckets/lifecycle/shared.js +1 -1
  42. package/dist/lib/buckets/list.js +1 -1
  43. package/dist/lib/buckets/merge.js +1 -1
  44. package/dist/lib/buckets/migrate.js +1 -1
  45. package/dist/lib/buckets/rebase.js +1 -1
  46. package/dist/lib/buckets/restore.js +1 -1
  47. package/dist/lib/buckets/set-cors.js +1 -1
  48. package/dist/lib/buckets/set-locations.js +1 -1
  49. package/dist/lib/buckets/set-migration.js +1 -1
  50. package/dist/lib/buckets/set-notifications.js +1 -1
  51. package/dist/lib/buckets/set.js +1 -1
  52. package/dist/lib/buckets/share.js +1 -0
  53. package/dist/lib/bundle.js +1 -1
  54. package/dist/lib/configure/index.js +1 -1
  55. package/dist/lib/cp.js +1 -1
  56. package/dist/lib/credentials/test.js +1 -1
  57. package/dist/lib/iam/policies/create.js +1 -1
  58. package/dist/lib/iam/policies/delete.js +1 -1
  59. package/dist/lib/iam/policies/edit.js +1 -1
  60. package/dist/lib/iam/policies/get.js +1 -1
  61. package/dist/lib/iam/policies/link-key.js +1 -1
  62. package/dist/lib/iam/policies/list-keys.js +1 -1
  63. package/dist/lib/iam/policies/list.js +1 -1
  64. package/dist/lib/iam/policies/select-policy.js +1 -1
  65. package/dist/lib/iam/policies/unlink-key.js +1 -1
  66. package/dist/lib/iam/teams/create.js +1 -1
  67. package/dist/lib/iam/teams/edit.js +1 -1
  68. package/dist/lib/iam/teams/list.js +1 -1
  69. package/dist/lib/iam/teams/shared.js +1 -1
  70. package/dist/lib/iam/users/invite.js +1 -1
  71. package/dist/lib/iam/users/list.js +1 -1
  72. package/dist/lib/iam/users/remove.js +1 -1
  73. package/dist/lib/iam/users/revoke-invitation.js +1 -1
  74. package/dist/lib/iam/users/update-role.js +1 -1
  75. package/dist/lib/init/index.js +1 -1
  76. package/dist/lib/login/credentials.js +1 -1
  77. package/dist/lib/login/oauth.js +1 -1
  78. package/dist/lib/login/select.js +1 -1
  79. package/dist/lib/logout.js +1 -1
  80. package/dist/lib/ls.js +1 -1
  81. package/dist/lib/mk.js +1 -1
  82. package/dist/lib/mv.js +1 -1
  83. package/dist/lib/objects/delete.js +1 -1
  84. package/dist/lib/objects/get.js +1 -1
  85. package/dist/lib/objects/info.js +1 -1
  86. package/dist/lib/objects/list-versions.js +4 -4
  87. package/dist/lib/objects/list.js +1 -1
  88. package/dist/lib/objects/purge.js +1 -0
  89. package/dist/lib/objects/put.js +1 -1
  90. package/dist/lib/objects/restore-deleted.js +1 -0
  91. package/dist/lib/objects/restore-info.js +1 -1
  92. package/dist/lib/objects/restore.js +1 -1
  93. package/dist/lib/objects/set-access.js +1 -1
  94. package/dist/lib/objects/set.js +1 -1
  95. package/dist/lib/organizations/create.js +1 -1
  96. package/dist/lib/organizations/list.js +1 -1
  97. package/dist/lib/organizations/select.js +1 -1
  98. package/dist/lib/presign.js +2 -2
  99. package/dist/lib/rm.js +1 -1
  100. package/dist/lib/snapshots/delete.js +1 -1
  101. package/dist/lib/snapshots/list.js +1 -1
  102. package/dist/lib/snapshots/take.js +1 -1
  103. package/dist/lib/stat.js +1 -1
  104. package/dist/lib/telemetry/disable.js +1 -1
  105. package/dist/lib/telemetry/enable.js +1 -1
  106. package/dist/lib/telemetry/status.js +1 -1
  107. package/dist/lib/touch.js +1 -1
  108. package/dist/lib/update.js +1 -1
  109. package/dist/lib/whoami.js +1 -1
  110. package/dist/specs.yaml +134 -3
  111. package/dist/utils/analytics.js +1 -1
  112. package/dist/utils/bucket-info.js +1 -1
  113. package/dist/utils/exit.js +1 -1
  114. package/dist/utils/telemetry.js +1 -1
  115. package/dist/utils/update-check.js +1 -1
  116. package/package.json +3 -3
  117. package/dist/chunk-JNSFDQGG.js +0 -1
  118. package/dist/chunk-L6RBXP7Z.js +0 -1
  119. package/dist/chunk-UPKISX4L.js +0 -8
  120. package/dist/chunk-V6JZFDRE.js +0 -1
package/dist/specs.yaml CHANGED
@@ -516,6 +516,7 @@ commands:
516
516
  examples:
517
517
  - "tigris cp ./file.txt t3://my-bucket/file.txt"
518
518
  - "tigris cp ./logo.png t3://my-bucket/logo.png --access public"
519
+ - "tigris cp ./dist/ t3://my-bucket/assets/ -r --cache-control 'public, max-age=31536000, immutable'"
519
520
  - "tigris cp t3://my-bucket/file.txt ./local-copy.txt"
520
521
  - "tigris cp t3://my-bucket/src/ t3://my-bucket/dest/ -r"
521
522
  - "tigris cp ./images/ t3://my-bucket/images/ -r"
@@ -549,6 +550,8 @@ commands:
549
550
  description: Access level for uploaded objects (only applies to local-to-remote uploads)
550
551
  alias: a
551
552
  options: *access_options
553
+ - name: cache-control
554
+ description: Cache-Control header stored with uploaded objects (only applies to local-to-remote uploads)
552
555
 
553
556
  # mv
554
557
  - name: mv
@@ -1330,6 +1333,54 @@ commands:
1330
1333
  description: Clear all CORS rules on the bucket
1331
1334
  type: flag
1332
1335
 
1336
+ # share
1337
+ - name: share
1338
+ description: Share a bucket with your whole organization, specific teams, or specific users. Existing shares are kept unless --override or --reset is used
1339
+ examples:
1340
+ - "tigris buckets share my-bucket --organization --role ReadOnly"
1341
+ - "tigris buckets share my-bucket --team tmid_MQQUhV --role Editor"
1342
+ - "tigris buckets share my-bucket --user uid_MQQUhV --role ReadOnly"
1343
+ - "tigris buckets share my-bucket --team tmid_A,tmid_B --role Editor,ReadOnly"
1344
+ - "tigris buckets share my-bucket --team tmid_MQQUhV --role Editor --override"
1345
+ - "tigris buckets share my-bucket --reset"
1346
+ messages:
1347
+ onStart: 'Updating bucket shares...'
1348
+ onSuccess: 'Shares updated for bucket {{name}}'
1349
+ onFailure: 'Failed to update bucket shares'
1350
+ arguments:
1351
+ - name: name
1352
+ description: Name of the bucket
1353
+ type: positional
1354
+ required: true
1355
+ examples:
1356
+ - my-bucket
1357
+ - name: organization
1358
+ alias: org
1359
+ description: Give access to everyone in your organization. Takes exactly one --role and cannot be combined with --team or --user
1360
+ type: flag
1361
+ - name: team
1362
+ alias: t
1363
+ description: Team ID to share with (can specify multiple, comma-separated). Each team is paired positionally with a --role value
1364
+ multiple: true
1365
+ - name: user
1366
+ alias: u
1367
+ description: User ID to share with (can specify multiple, comma-separated). Each user is paired positionally with a --role value
1368
+ multiple: true
1369
+ - name: role
1370
+ alias: r
1371
+ description: Role to grant (can specify multiple, comma-separated). A single role applies to every target; otherwise each role pairs with the corresponding --team or --user value
1372
+ multiple: true
1373
+ options:
1374
+ - ReadOnly
1375
+ - ReadWrite
1376
+ - Editor
1377
+ - name: override
1378
+ description: Replace all existing shares instead of merging with them
1379
+ type: flag
1380
+ - name: reset
1381
+ description: Remove all shares from the bucket
1382
+ type: flag
1383
+
1333
1384
  #########################
1334
1385
  # Manage forks (removed)
1335
1386
  #########################
@@ -1458,6 +1509,7 @@ commands:
1458
1509
  - "tigris objects list t3://my-bucket/images/"
1459
1510
  - "tigris objects list my-bucket --prefix images/"
1460
1511
  - "tigris objects list my-bucket --format json"
1512
+ - "tigris objects list my-bucket --deleted"
1461
1513
  messages:
1462
1514
  onStart: 'Listing objects...'
1463
1515
  onSuccess: 'Found {{count}} object(s)'
@@ -1490,15 +1542,19 @@ commands:
1490
1542
  - name: source
1491
1543
  description: List objects from a specific storage source on buckets with shadow migration enabled
1492
1544
  options: [tigris, shadow]
1545
+ - name: deleted
1546
+ description: List soft-deleted objects instead of live ones. Requires soft delete on the bucket. On a snapshot bucket a plain delete records a delete marker instead, so use "tigris objects list-versions" for those
1547
+ type: flag
1493
1548
  # list-versions
1494
1549
  - name: list-versions
1495
- description: List object versions and delete markers in a bucket (requires bucket versioning). Returns both arrays separately to match the S3 ListObjectVersions response
1550
+ description: List object versions and delete markers in a bucket (requires bucket versioning), or with --deleted the recoverable versions of soft-deleted objects. Returns both arrays separately to match the S3 ListObjectVersions response
1496
1551
  alias: lv
1497
1552
  examples:
1498
1553
  - "tigris objects list-versions my-bucket"
1499
1554
  - "tigris objects list-versions t3://my-bucket/logs/"
1500
1555
  - "tigris objects list-versions my-bucket --prefix images/"
1501
1556
  - "tigris objects list-versions my-bucket --format json"
1557
+ - "tigris objects list-versions my-bucket --prefix report.pdf --deleted"
1502
1558
  messages:
1503
1559
  onStart: 'Listing object versions...'
1504
1560
  onSuccess: 'Found {{versions}} version(s) and {{deleteMarkers}} delete marker(s)'
@@ -1528,6 +1584,9 @@ commands:
1528
1584
  description: Pagination marker — the key to start listing from (from a prior nextKeyMarker)
1529
1585
  - name: version-id-marker
1530
1586
  description: Pagination marker — the version id to start listing from (from a prior nextVersionIdMarker)
1587
+ - name: deleted
1588
+ description: List the recoverable versions of soft-deleted objects. Use the version id with "tigris objects restore-deleted" or "tigris objects purge"
1589
+ type: flag
1531
1590
  # get
1532
1591
  - name: get
1533
1592
  description: Download an object by key. Prints to stdout by default, or saves to a file with --output
@@ -1573,6 +1632,7 @@ commands:
1573
1632
  - "tigris objects put my-bucket report.pdf ./report.pdf"
1574
1633
  - "tigris objects put t3://my-bucket/report.pdf ./report.pdf"
1575
1634
  - "tigris objects put my-bucket logo.png ./logo.png --access public --content-type image/png"
1635
+ - "tigris objects put my-bucket app.js ./app.js --cache-control 'public, max-age=31536000, immutable'"
1576
1636
  - "echo 'hello' | tigris objects put t3://my-bucket/hello.txt"
1577
1637
  - "cat report.pdf | tigris objects put my-bucket report.pdf --content-type application/pdf"
1578
1638
  messages:
@@ -1608,6 +1668,8 @@ commands:
1608
1668
  - name: content-type
1609
1669
  description: Content type (auto-detected from extension if omitted)
1610
1670
  alias: t
1671
+ - name: cache-control
1672
+ description: Cache-Control header stored with the object and returned on every read (e.g. "public, max-age=31536000, immutable")
1611
1673
  - name: format
1612
1674
  description: Output format
1613
1675
  options: [json, table, xml]
@@ -1644,7 +1706,7 @@ commands:
1644
1706
  examples:
1645
1707
  - my-file.txt
1646
1708
  - name: version-id
1647
- description: Hard-delete a specific object version (requires bucket versioning). Targets a single key
1709
+ description: Hard-delete a specific object version (requires bucket versioning). Targets a single key. To destroy a soft-deleted version, use "tigris objects purge"
1648
1710
  - name: all-versions
1649
1711
  description: Hard-delete every version and delete marker for the given key(s). Mutually exclusive with --version-id
1650
1712
  type: flag
@@ -1802,6 +1864,74 @@ commands:
1802
1864
  description: Output format
1803
1865
  options: [json, table, xml]
1804
1866
  default: table
1867
+ # restore-deleted
1868
+ - name: restore-deleted
1869
+ description: Restore a soft-deleted object within its retention window. List recoverable objects with "tigris objects list --deleted", then pick a version with "tigris objects list-versions --deleted"
1870
+ alias: rd
1871
+ examples:
1872
+ - "tigris objects restore-deleted my-bucket report.pdf --version-id 1787749774802410496"
1873
+ - "tigris objects restore-deleted t3://my-bucket/report.pdf --version-id 1787749774802410496"
1874
+ messages:
1875
+ onStart: 'Restoring deleted object...'
1876
+ onSuccess: "Object '{{key}}' restored successfully"
1877
+ onFailure: 'Failed to restore deleted object'
1878
+ nextActions:
1879
+ - command: 'tigris ls {{bucket}}'
1880
+ description: 'List objects in the bucket'
1881
+ arguments:
1882
+ - name: bucket
1883
+ type: positional
1884
+ required: true
1885
+ description: Name of the bucket, or a full path (t3://bucket/key)
1886
+ examples:
1887
+ - my-bucket
1888
+ - t3://my-bucket/report.pdf
1889
+ - name: key
1890
+ type: positional
1891
+ description: Key of the object (omit if bucket contains the full path)
1892
+ examples:
1893
+ - report.pdf
1894
+ - name: version-id
1895
+ required: true
1896
+ description: The soft-deleted version to bring back, from "tigris objects list-versions --deleted"
1897
+ - name: format
1898
+ description: Output format
1899
+ options: [json, table, xml]
1900
+ default: table
1901
+ # purge
1902
+ - name: purge
1903
+ description: Permanently destroy a soft-deleted object version before its retention period expires. This cannot be undone — the version can no longer be restored with "tigris objects restore-deleted"
1904
+ alias: pg
1905
+ examples:
1906
+ - "tigris objects purge my-bucket report.pdf --version-id 1787749774802410496 --yes"
1907
+ - "tigris objects purge t3://my-bucket/report.pdf --version-id 1787749774802410496 --yes"
1908
+ messages:
1909
+ onStart: 'Purging deleted object...'
1910
+ onSuccess: "Purged version '{{versionId}}' of '{{key}}'"
1911
+ onFailure: 'Failed to purge deleted object'
1912
+ arguments:
1913
+ - name: bucket
1914
+ type: positional
1915
+ required: true
1916
+ description: Name of the bucket, or a full path (t3://bucket/key)
1917
+ examples:
1918
+ - my-bucket
1919
+ - t3://my-bucket/report.pdf
1920
+ - name: key
1921
+ type: positional
1922
+ description: Key of the object (omit if bucket contains the full path)
1923
+ examples:
1924
+ - report.pdf
1925
+ - name: version-id
1926
+ required: true
1927
+ description: The soft-deleted version to destroy, from "tigris objects list-versions --deleted"
1928
+ - name: force
1929
+ type: flag
1930
+ description: Skip confirmation prompts (alias for --yes)
1931
+ - name: format
1932
+ description: Output format
1933
+ options: [json, table, xml]
1934
+ default: table
1805
1935
 
1806
1936
  #########################
1807
1937
  # Manage access keys
@@ -1889,7 +2019,7 @@ commands:
1889
2019
  examples:
1890
2020
  - tid_AaBbCcDdEeFf
1891
2021
  - name: assign
1892
- 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
2022
+ description: Assign per-bucket roles to an access key. Pair each --bucket with a --role (Editor, ReadWrite, or ReadOnly), or use --admin for org-wide access
1893
2023
  alias: a
1894
2024
  examples:
1895
2025
  - "tigris access-keys assign tid_AaBb --bucket my-bucket --role Editor"
@@ -1920,6 +2050,7 @@ commands:
1920
2050
  multiple: true
1921
2051
  options:
1922
2052
  - Editor
2053
+ - ReadWrite
1923
2054
  - ReadOnly
1924
2055
  - name: admin
1925
2056
  description: Grant admin access to all buckets in the organization
@@ -1 +1 @@
1
- import{a,b,c,d,e,f}from"../chunk-L3733IUI.js";import"../chunk-G4OJTPSI.js";import"../chunk-L6RBXP7Z.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-V6JZFDRE.js";export{d as captureCommand,c as decodeTokenEmail,f as identifyOnLogin,a as isCI,e as trackCommand,b as usedFlags};
1
+ import{a,b,c,d,e,f}from"../chunk-7BUC7A7V.js";import"../chunk-G4OJTPSI.js";import"../chunk-Z54TMLIH.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-QPUL2AAI.js";export{d as captureCommand,c as decodeTokenEmail,f as identifyOnLogin,a as isCI,e as trackCommand,b as usedFlags};
@@ -1 +1 @@
1
- import{a,b,c}from"../chunk-JNSFDQGG.js";import"../chunk-AFM3TY2D.js";import"../chunk-N3Y6RFSK.js";import"../chunk-S77OAN6Y.js";export{c as buildBucketInfo,b as describeExpiration,a as describeTransition};
1
+ import{a,b,c}from"../chunk-IUIKP2LU.js";import"../chunk-AFM3TY2D.js";import"../chunk-N3Y6RFSK.js";import"../chunk-S77OAN6Y.js";export{c as buildBucketInfo,b as describeExpiration,a as describeTransition};
@@ -1 +1 @@
1
- import{a,b,c,d}from"../chunk-R5SYFHP5.js";import"../chunk-D7WXNA2O.js";import"../chunk-NI4EYBQH.js";import"../chunk-AJOTB3MR.js";import"../chunk-DV3LCXRH.js";import"../chunk-L6RBXP7Z.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-V6JZFDRE.js";export{a as exitWithError,b as failWithError,c as getSuccessNextActions,d as printNextActions};
1
+ import{a,b,c,d}from"../chunk-6TTEDYLD.js";import"../chunk-D7WXNA2O.js";import"../chunk-NI4EYBQH.js";import"../chunk-7Q44GQ2Y.js";import"../chunk-DV3LCXRH.js";import"../chunk-Z54TMLIH.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-QPUL2AAI.js";export{a as exitWithError,b as failWithError,c as getSuccessNextActions,d as printNextActions};
@@ -1 +1 @@
1
- import{a as c,b as d,c as e,d as f,e as g}from"../chunk-AJOTB3MR.js";import"../chunk-L6RBXP7Z.js";import{a,b}from"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-V6JZFDRE.js";export{d as beforeSend,f as captureError,g as flushTelemetry,e as initTelemetry,c as invocationCommand,a as redactSecrets,b as scrubArgv};
1
+ import{a as c,b as d,c as e,d as f,e as g}from"../chunk-7Q44GQ2Y.js";import"../chunk-Z54TMLIH.js";import{a,b}from"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-QPUL2AAI.js";export{d as beforeSend,f as captureError,g as flushTelemetry,e as initTelemetry,c as invocationCommand,a as redactSecrets,b as scrubArgv};
@@ -1 +1 @@
1
- import{a,b,c,d,e}from"../chunk-UPKISX4L.js";import"../chunk-G4OJTPSI.js";import"../chunk-L6RBXP7Z.js";import"../chunk-V6JZFDRE.js";export{e as checkForUpdates,d as fetchLatestVersion,c as getUpdateCommand,b as isNewerVersion,a as readUpdateCache};
1
+ import{a,b,c,d,e}from"../chunk-KJXUEGXY.js";import"../chunk-G4OJTPSI.js";import"../chunk-Z54TMLIH.js";import"../chunk-QPUL2AAI.js";export{e as checkForUpdates,d as fetchLatestVersion,c as getUpdateCommand,b as isNewerVersion,a as readUpdateCache};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tigrisdata/cli",
3
- "version": "3.9.1",
3
+ "version": "3.11.0",
4
4
  "description": "Command line interface for Tigris object storage",
5
5
  "type": "module",
6
6
  "exports": {
@@ -46,8 +46,8 @@
46
46
  "jsonc-parser": "^3.3.1",
47
47
  "open": "^11.0.0",
48
48
  "yaml": "^2.8.3",
49
- "@tigrisdata/iam": "^2.3.0",
50
- "@tigrisdata/storage": "^3.18.0"
49
+ "@tigrisdata/iam": "^2.5.0",
50
+ "@tigrisdata/storage": "^3.21.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "tsx": "^4.21.0"
@@ -1 +0,0 @@
1
- import{a as l}from"./chunk-AFM3TY2D.js";import{b as r}from"./chunk-N3Y6RFSK.js";function a(e){if(e.storageClass)return e.days!==void 0?`${e.storageClass} after ${e.days}d`:e.date!==void 0?`${e.storageClass} on ${e.date}`:e.storageClass}function f(e){if(e.expiration){if(e.expiration.days!==void 0)return`${e.expiration.days}d`;if(e.expiration.date!==void 0)return e.expiration.date}}function u(e){let n=[],i=a(e);i&&n.push(i);let t=f(e);t&&n.push(e.expiration?.days!==void 0?`expire after ${t}`:`expire on ${t}`);let s=[];e.filter?.prefix&&s.push(`prefix=${e.filter.prefix}`),e.enabled===!1&&s.push("disabled");let o=n.join(", ");return s.length>0?`${o} (${s.join(", ")})`:o}function p(e){let n=[{label:"Number of Objects",value:e.sizeInfo.numberOfObjects?.toString()??"N/A"},{label:"Total Size",value:e.sizeInfo.size!==void 0?l(e.sizeInfo.size):"N/A"},{label:"All Versions Count",value:e.sizeInfo.numberOfObjectsAllVersions?.toString()??"N/A"},{label:"Default Tier",value:e.settings.defaultTier},{label:"Locations",value:r(e.locations)},{label:"Snapshots Enabled",value:e.isSnapshotEnabled?"Yes":"No"},{label:"Delete Protection",value:e.settings.deleteProtection?"Yes":"No"},{label:"Soft Delete",value:e.settings.softDelete.enabled?`Enabled (${e.settings.softDelete.retentionDays} day retention)`:"Disabled"},{label:"Allow Object ACL",value:e.settings.allowObjectAcl?"Yes":"No"},{label:"Custom Domain",value:e.settings.customDomain??"None"},{label:"Has Forks",value:e.forkInfo?.hasChildren?"Yes":"No"}];return e.forkInfo?.parents?.length&&(n.push({label:"Forked From",value:e.forkInfo.parents[0].bucketName}),n.push({label:"Fork Snapshot",value:e.forkInfo.parents[0].snapshot})),e.settings.lifecycleRules?.length&&n.push({label:"Lifecycle Rules",value:e.settings.lifecycleRules.map(i=>u(i)).join(", ")}),e.settings.additionalHeaders&&n.push({label:"Additional Headers",value:Object.entries(e.settings.additionalHeaders).map(([i,t])=>`${i}: ${t}`).join(", ")}),e.settings.corsRules.length&&n.push({label:"CORS Rules",value:`${e.settings.corsRules.length} rule(s)`}),e.settings.notifications&&n.push({label:"Notifications",value:e.settings.notifications.enabled!==!1?"Enabled":"Disabled"}),e.settings.dataMigration&&n.push({label:"Data Migration",value:e.settings.dataMigration.endpoint?`${e.settings.dataMigration.name??"N/A"} (${e.settings.dataMigration.endpoint})`:e.settings.dataMigration.name??"Configured"}),n}export{a,f as b,p as c};
@@ -1 +0,0 @@
1
- var e="3.9.1";export{e as a};
@@ -1,8 +0,0 @@
1
- import{b as h}from"./chunk-G4OJTPSI.js";import{a as p}from"./chunk-L6RBXP7Z.js";import{d as f,e as m,f as d}from"./chunk-V6JZFDRE.js";import{mkdirSync as w,readFileSync as E,writeFileSync as T}from"fs";import I from"https";import{homedir as g}from"os";import{join as C}from"path";var N=C(g(),".tigris","update-check.json");function _(){try{let r=E(N,"utf-8"),i=JSON.parse(r);return typeof i.latestVersion=="string"&&typeof i.lastChecked=="number"?i:null}catch{return null}}function b(r){try{w(C(g(),".tigris"),{recursive:!0}),T(N,JSON.stringify(r),"utf-8")}catch{}}function U(r,i){let o=s=>{let n=s.startsWith("v")?s.slice(1):s,c=null,a=n.indexOf("-");a!==-1&&(c=n.slice(a+1),n=n.slice(0,a));let l=n.split(".");if(l.length!==3)return null;let u=l.map(Number);return u.some(Number.isNaN)?null:{major:u[0],minor:u[1],patch:u[2],prerelease:c}},t=o(r),e=o(i);return!t||!e?!1:e.major>t.major?!0:e.major<t.major?!1:e.minor>t.minor?!0:e.minor<t.minor?!1:e.patch>t.patch?!0:e.patch<t.patch?!1:t.prerelease&&!e.prerelease?!0:(!t.prerelease&&e.prerelease,!1)}function D(){switch(h()){case"npm":return"npm install -g @tigrisdata/cli";case"homebrew":return"brew upgrade tigris";default:return process.platform==="win32"?"irm https://raw.githubusercontent.com/tigrisdata/storage/main/packages/cli/scripts/install.ps1 | iex":"curl -fsSL https://raw.githubusercontent.com/tigrisdata/storage/main/packages/cli/scripts/install.sh | sh"}}function k(r={}){return new Promise((i,o)=>{let t=I.get(f,{timeout:1e4},e=>{let s="";e.on("data",n=>{s+=n}),e.on("end",()=>{try{let n=JSON.parse(s);typeof n.version=="string"?(b({..._(),latestVersion:n.version,lastChecked:Date.now()}),i(n.version)):o(new Error("Unexpected registry response"))}catch{o(new Error("Failed to parse registry response"))}})});t.on("error",e=>{o(e)}),t.on("timeout",()=>{t.destroy(),o(new Error("Request timed out"))}),r.unref&&t.on("socket",e=>{e.unref()}),t.end()})}function S(){k({unref:!0}).catch(()=>{})}function M(){if(process.env.TIGRIS_NO_UPDATE_CHECK==="1"||!process.stdout.isTTY)return;let r=_(),i=Number(process.env.TIGRIS_UPDATE_NOTIFY_INTERVAL_MS)||36e5;if(r&&U(p,r.latestVersion)&&(!r.lastNotified||Date.now()-r.lastNotified>i)){let t=`Update available: ${p} \u2192 ${r.latestVersion}`,e='Run "tigris update" to upgrade.',s=Math.max(t.length,e.length)+4,n=`\u250C${"\u2500".repeat(s-2)}\u2510`,c=`\u2514${"\u2500".repeat(s-2)}\u2518`,a=l=>`\u2502 ${l.padEnd(s-4)} \u2502`;console.log(`
2
- ${n}
3
- ${a("")}
4
- ${a(t)}
5
- ${a(e)}
6
- ${a("")}
7
- ${c}
8
- `),b({...r,lastNotified:Date.now()})}let o=Number(process.env.TIGRIS_UPDATE_CHECK_INTERVAL_MS)||216e5;(!r||Date.now()-r.lastChecked>o)&&S()}export{_ as a,U as b,D as c,k as d,M as e};
@@ -1 +0,0 @@
1
- var t="https://t3.storage.dev",o="https://iam.storageapi.dev",s="https://mgmt.storageapi.dev",p="https://registry.npmjs.org/@tigrisdata/cli/latest",_=216e5,e=36e5,T="TIGRIS_NO_BANNER",r="https://c3a84c6a2811c557d70e42412cda4ffa@o4507410155896832.ingest.us.sentry.io/4511767771545600",E="phc_6a2zd9w9hGzIqYl527bL4dXk3Wz8J9pEHyXTwP1hHq4",N="https://ph.tigrisdata.com";export{t as a,o as b,s as c,p as d,_ as e,e as f,T as g,r as h,E as i,N as j};