@tigrisdata/cli 2.18.0 → 2.18.1-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.
- package/dist/auth/client.js +1 -1
- package/dist/auth/iam.js +1 -1
- package/dist/auth/provider.js +1 -1
- package/dist/chunk-3EAZ2L6H.js +1 -0
- package/dist/{chunk-JP3PXFIQ.js → chunk-7ZUCJBD5.js} +1 -1
- package/dist/{chunk-7ZHRXMPK.js → chunk-D3UQD6W2.js} +1 -1
- package/dist/chunk-EBWDZEHM.js +1 -0
- package/dist/{chunk-27KYKU5U.js → chunk-EFPPY2JQ.js} +1 -1
- package/dist/chunk-HWX63Y3P.js +1 -0
- package/dist/{chunk-T2QR4QOR.js → chunk-KQTMMFPE.js} +1 -1
- package/dist/{chunk-3L2I7HZB.js → chunk-MX5N556B.js} +1 -1
- package/dist/chunk-QWZ6FK7E.js +8 -0
- package/dist/chunk-RXNG56FL.js +1 -0
- package/dist/{chunk-XCZPPS7H.js → chunk-S7EO4QWK.js} +1 -1
- package/dist/{chunk-SMBIT5FI.js → chunk-UBANDLB4.js} +1 -1
- package/dist/chunk-UJFCUY34.js +8 -0
- package/dist/{chunk-EKLR55EQ.js → chunk-YN2TKPPT.js} +1 -1
- package/dist/cli-core.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/access-keys/assign.js +1 -1
- package/dist/lib/access-keys/attach-policy.js +1 -1
- package/dist/lib/access-keys/create.js +1 -1
- package/dist/lib/access-keys/delete.js +1 -1
- package/dist/lib/access-keys/detach-policy.js +1 -1
- package/dist/lib/access-keys/get.js +1 -1
- package/dist/lib/access-keys/list-policies.js +1 -1
- package/dist/lib/access-keys/list.js +1 -1
- package/dist/lib/access-keys/rotate.js +1 -1
- package/dist/lib/buckets/create.js +1 -1
- package/dist/lib/buckets/delete.js +1 -1
- package/dist/lib/buckets/get.js +1 -1
- package/dist/lib/buckets/lifecycle/create.js +1 -0
- package/dist/lib/buckets/lifecycle/edit.js +1 -0
- package/dist/lib/buckets/lifecycle/list.js +1 -0
- package/dist/lib/buckets/lifecycle/shared.js +1 -0
- package/dist/lib/buckets/list.js +1 -1
- package/dist/lib/buckets/migrate.js +1 -1
- package/dist/lib/buckets/set-cors.js +1 -1
- package/dist/lib/buckets/set-locations.js +1 -1
- package/dist/lib/buckets/set-migration.js +1 -1
- package/dist/lib/buckets/set-notifications.js +1 -1
- package/dist/lib/buckets/set.js +1 -1
- package/dist/lib/bundle.js +1 -1
- package/dist/lib/configure/index.js +1 -1
- package/dist/lib/cp.js +1 -1
- package/dist/lib/credentials/test.js +1 -1
- package/dist/lib/iam/policies/create.js +1 -1
- package/dist/lib/iam/policies/delete.js +1 -1
- package/dist/lib/iam/policies/edit.js +1 -1
- package/dist/lib/iam/policies/get.js +1 -1
- package/dist/lib/iam/policies/link-key.js +1 -1
- package/dist/lib/iam/policies/list-keys.js +1 -1
- package/dist/lib/iam/policies/list.js +1 -1
- package/dist/lib/iam/policies/select-policy.js +1 -1
- package/dist/lib/iam/policies/unlink-key.js +1 -1
- package/dist/lib/iam/users/invite.js +1 -1
- package/dist/lib/iam/users/list.js +1 -1
- package/dist/lib/iam/users/remove.js +1 -1
- package/dist/lib/iam/users/revoke-invitation.js +1 -1
- package/dist/lib/iam/users/update-role.js +1 -1
- package/dist/lib/login/credentials.js +1 -1
- package/dist/lib/login/oauth.js +1 -1
- package/dist/lib/login/select.js +1 -1
- package/dist/lib/logout.js +1 -1
- package/dist/lib/ls.js +1 -1
- package/dist/lib/mk.js +1 -1
- package/dist/lib/mv.js +1 -1
- package/dist/lib/objects/delete.js +1 -1
- package/dist/lib/objects/get.js +1 -1
- package/dist/lib/objects/info.js +1 -1
- package/dist/lib/objects/list.js +1 -1
- package/dist/lib/objects/put.js +1 -1
- package/dist/lib/objects/set.js +1 -1
- package/dist/lib/organizations/create.js +1 -1
- package/dist/lib/organizations/list.js +1 -1
- package/dist/lib/organizations/select.js +1 -1
- package/dist/lib/presign.js +1 -1
- package/dist/lib/rm.js +1 -1
- package/dist/lib/snapshots/list.js +1 -1
- package/dist/lib/snapshots/take.js +1 -1
- package/dist/lib/stat.js +1 -1
- package/dist/lib/touch.js +1 -1
- package/dist/lib/update.js +1 -1
- package/dist/lib/whoami.js +1 -1
- package/dist/specs.yaml +129 -143
- package/dist/utils/bucket-info.js +1 -1
- package/dist/utils/exit.js +1 -1
- package/dist/utils/messages.js +1 -1
- package/dist/utils/path.js +1 -1
- package/dist/utils/update-check.js +1 -1
- package/package.json +8 -8
- package/dist/chunk-4ZHCF5D6.js +0 -1
- package/dist/chunk-DQMSOC2W.js +0 -8
- package/dist/chunk-JQUG732D.js +0 -1
- package/dist/chunk-KK7FZ7QM.js +0 -1
- package/dist/chunk-QWBEROER.js +0 -8
- package/dist/lib/buckets/set-transition.js +0 -1
- package/dist/lib/buckets/set-ttl.js +0 -1
- package/dist/lib/forks/create.js +0 -1
- package/dist/lib/forks/list.js +0 -1
package/dist/specs.yaml
CHANGED
|
@@ -30,16 +30,6 @@ definitions:
|
|
|
30
30
|
value: GLACIER_IR
|
|
31
31
|
description: Lowest-cost storage for long-lived data that is rarely accessed and requires retrieval in milliseconds.
|
|
32
32
|
|
|
33
|
-
consistency_options: &consistency_options
|
|
34
|
-
- name: Default
|
|
35
|
-
value: default
|
|
36
|
-
description: Strict read-after-write consistency in same region. Eventual consistency globally.
|
|
37
|
-
- name: Strict
|
|
38
|
-
value: strict
|
|
39
|
-
description: Strict read-after-write consistency globally. Latency will be higher than the default.
|
|
40
|
-
|
|
41
|
-
region_options: ®ion_options
|
|
42
|
-
|
|
43
33
|
location_options: &location_options
|
|
44
34
|
- name: Global
|
|
45
35
|
value: 'global'
|
|
@@ -343,15 +333,13 @@ commands:
|
|
|
343
333
|
options: *tier_options
|
|
344
334
|
default: STANDARD
|
|
345
335
|
- name: consistency
|
|
346
|
-
description: (Deprecated, use --locations) Consistency level (only applies when creating a bucket)
|
|
347
336
|
alias: c
|
|
348
|
-
|
|
349
|
-
|
|
337
|
+
removed: true
|
|
338
|
+
replaced_by: --locations
|
|
350
339
|
- name: region
|
|
351
|
-
description: (Deprecated, use --locations) Region (only applies when creating a bucket)
|
|
352
340
|
alias: r
|
|
353
|
-
|
|
354
|
-
|
|
341
|
+
removed: true
|
|
342
|
+
replaced_by: --locations
|
|
355
343
|
- name: locations
|
|
356
344
|
description: Location for the bucket (only applies when creating a bucket)
|
|
357
345
|
alias: l
|
|
@@ -739,15 +727,13 @@ commands:
|
|
|
739
727
|
options: *tier_options
|
|
740
728
|
default: STANDARD
|
|
741
729
|
- name: consistency
|
|
742
|
-
description: (Deprecated, use --locations) Choose the consistency level for the bucket
|
|
743
730
|
alias: c
|
|
744
|
-
|
|
745
|
-
|
|
731
|
+
removed: true
|
|
732
|
+
replaced_by: --locations
|
|
746
733
|
- name: region
|
|
747
|
-
description: (Deprecated, use --locations) Region
|
|
748
734
|
alias: r
|
|
749
|
-
|
|
750
|
-
|
|
735
|
+
removed: true
|
|
736
|
+
replaced_by: --locations
|
|
751
737
|
- name: locations
|
|
752
738
|
description: Location for the bucket
|
|
753
739
|
alias: l
|
|
@@ -828,10 +814,8 @@ commands:
|
|
|
828
814
|
description: Bucket access level
|
|
829
815
|
options: *access_options
|
|
830
816
|
- name: region
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
multiple: true
|
|
834
|
-
deprecated: true
|
|
817
|
+
removed: true
|
|
818
|
+
replaced_by: --locations
|
|
835
819
|
- name: locations
|
|
836
820
|
description: Bucket location (see https://www.tigrisdata.com/docs/buckets/locations/ for more details)
|
|
837
821
|
options: *location_options
|
|
@@ -854,33 +838,8 @@ commands:
|
|
|
854
838
|
type: boolean
|
|
855
839
|
# set-ttl
|
|
856
840
|
- name: set-ttl
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
- "tigris buckets set-ttl my-bucket --days 30"
|
|
860
|
-
- "tigris buckets set-ttl my-bucket --date 2026-06-01"
|
|
861
|
-
- "tigris buckets set-ttl my-bucket --disable"
|
|
862
|
-
messages:
|
|
863
|
-
onStart: 'Updating TTL settings...'
|
|
864
|
-
onSuccess: 'TTL settings updated for bucket {{name}}'
|
|
865
|
-
onFailure: 'Failed to update TTL settings'
|
|
866
|
-
arguments:
|
|
867
|
-
- name: name
|
|
868
|
-
description: Name of the bucket
|
|
869
|
-
type: positional
|
|
870
|
-
required: true
|
|
871
|
-
examples:
|
|
872
|
-
- my-bucket
|
|
873
|
-
- name: days
|
|
874
|
-
description: Expire objects after this many days
|
|
875
|
-
alias: d
|
|
876
|
-
- name: date
|
|
877
|
-
description: Expire objects on this date (ISO-8601, e.g. 2026-06-01)
|
|
878
|
-
- name: enable
|
|
879
|
-
description: Enable TTL on the bucket (uses existing lifecycle rules)
|
|
880
|
-
type: flag
|
|
881
|
-
- name: disable
|
|
882
|
-
description: Disable TTL on the bucket
|
|
883
|
-
type: flag
|
|
841
|
+
removed: true
|
|
842
|
+
replaced_by: 'tigris buckets lifecycle create <bucket> --expire-days <N>'
|
|
884
843
|
# set-locations
|
|
885
844
|
- name: set-locations
|
|
886
845
|
description: Set the data locations for a bucket
|
|
@@ -965,38 +924,122 @@ commands:
|
|
|
965
924
|
- t3://my-bucket/prefix/
|
|
966
925
|
# set-transition
|
|
967
926
|
- name: set-transition
|
|
968
|
-
|
|
927
|
+
removed: true
|
|
928
|
+
replaced_by: 'tigris buckets lifecycle create <bucket> --storage-class <class> --days <N>'
|
|
929
|
+
# lifecycle
|
|
930
|
+
- name: lifecycle
|
|
931
|
+
description: Manage bucket lifecycle rules. Each rule combines an optional storage-class transition and/or expiration (TTL), scoped to an optional key prefix
|
|
932
|
+
alias: lc
|
|
969
933
|
examples:
|
|
970
|
-
- "tigris buckets
|
|
971
|
-
- "tigris buckets
|
|
972
|
-
- "tigris buckets
|
|
973
|
-
- "tigris buckets
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
arguments:
|
|
979
|
-
- name: name
|
|
980
|
-
description: Name of the bucket
|
|
981
|
-
type: positional
|
|
982
|
-
required: true
|
|
934
|
+
- "tigris buckets lifecycle list my-bucket"
|
|
935
|
+
- "tigris buckets lifecycle create my-bucket --prefix logs/ --storage-class GLACIER --days 90"
|
|
936
|
+
- "tigris buckets lifecycle create my-bucket --prefix tmp/ --expire-days 7"
|
|
937
|
+
- "tigris buckets lifecycle edit my-bucket <id> --days 30"
|
|
938
|
+
commands:
|
|
939
|
+
- name: list
|
|
940
|
+
description: List lifecycle rules on a bucket
|
|
941
|
+
alias: l
|
|
983
942
|
examples:
|
|
984
|
-
- my-bucket
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
943
|
+
- "tigris buckets lifecycle list my-bucket"
|
|
944
|
+
- "tigris buckets lifecycle list my-bucket --json"
|
|
945
|
+
messages:
|
|
946
|
+
onStart: ''
|
|
947
|
+
onSuccess: ''
|
|
948
|
+
onFailure: 'Failed to list lifecycle rules'
|
|
949
|
+
onEmpty: 'No lifecycle rules configured'
|
|
950
|
+
arguments:
|
|
951
|
+
- name: name
|
|
952
|
+
description: Name of the bucket
|
|
953
|
+
type: positional
|
|
954
|
+
required: true
|
|
955
|
+
examples:
|
|
956
|
+
- my-bucket
|
|
957
|
+
- name: format
|
|
958
|
+
description: Output format
|
|
959
|
+
options: [json, table, xml]
|
|
960
|
+
default: table
|
|
961
|
+
- name: create
|
|
962
|
+
description: Create a new lifecycle rule. A rule must include a transition (--storage-class with --days or --date) and/or an expiration (--expire-days or --expire-date), and may optionally be scoped via --prefix
|
|
963
|
+
alias: c
|
|
964
|
+
examples:
|
|
965
|
+
- "tigris buckets lifecycle create my-bucket --storage-class STANDARD_IA --days 30"
|
|
966
|
+
- "tigris buckets lifecycle create my-bucket --prefix logs/ --storage-class GLACIER --days 90"
|
|
967
|
+
- "tigris buckets lifecycle create my-bucket --prefix tmp/ --expire-days 7"
|
|
968
|
+
- "tigris buckets lifecycle create my-bucket --prefix archive/ --storage-class GLACIER --days 30 --expire-days 365"
|
|
969
|
+
messages:
|
|
970
|
+
onStart: 'Creating lifecycle rule...'
|
|
971
|
+
onSuccess: 'Lifecycle rule created on bucket {{name}} (id: {{id}})'
|
|
972
|
+
onFailure: 'Failed to create lifecycle rule'
|
|
973
|
+
arguments:
|
|
974
|
+
- name: name
|
|
975
|
+
description: Name of the bucket
|
|
976
|
+
type: positional
|
|
977
|
+
required: true
|
|
978
|
+
examples:
|
|
979
|
+
- my-bucket
|
|
980
|
+
- name: prefix
|
|
981
|
+
description: Key prefix to scope the rule to. Omit for a bucket-wide rule
|
|
982
|
+
alias: p
|
|
983
|
+
- name: storage-class
|
|
984
|
+
description: Target storage class for the transition
|
|
985
|
+
alias: s
|
|
986
|
+
options: *transition_tier_options
|
|
987
|
+
- name: days
|
|
988
|
+
description: Transition objects after this many days (used with --storage-class)
|
|
989
|
+
alias: d
|
|
990
|
+
- name: date
|
|
991
|
+
description: Transition objects on this date (ISO-8601, e.g. 2026-06-01) (used with --storage-class)
|
|
992
|
+
- name: expire-days
|
|
993
|
+
description: Expire (delete) objects after this many days
|
|
994
|
+
- name: expire-date
|
|
995
|
+
description: Expire (delete) objects on this date (ISO-8601, e.g. 2026-06-01)
|
|
996
|
+
- name: disable
|
|
997
|
+
description: Create the rule in a disabled state
|
|
998
|
+
type: flag
|
|
999
|
+
- name: edit
|
|
1000
|
+
description: Edit an existing lifecycle rule by its id. Only specified fields are changed
|
|
1001
|
+
alias: e
|
|
1002
|
+
examples:
|
|
1003
|
+
- "tigris buckets lifecycle edit my-bucket abc123 --days 60"
|
|
1004
|
+
- "tigris buckets lifecycle edit my-bucket abc123 --expire-days 90"
|
|
1005
|
+
- "tigris buckets lifecycle edit my-bucket abc123 --enable"
|
|
1006
|
+
messages:
|
|
1007
|
+
onStart: 'Updating lifecycle rule...'
|
|
1008
|
+
onSuccess: 'Lifecycle rule {{id}} updated on bucket {{name}}'
|
|
1009
|
+
onFailure: 'Failed to update lifecycle rule'
|
|
1010
|
+
arguments:
|
|
1011
|
+
- name: name
|
|
1012
|
+
description: Name of the bucket
|
|
1013
|
+
type: positional
|
|
1014
|
+
required: true
|
|
1015
|
+
examples:
|
|
1016
|
+
- my-bucket
|
|
1017
|
+
- name: id
|
|
1018
|
+
description: Lifecycle rule id (run `tigris buckets lifecycle list` to see ids)
|
|
1019
|
+
type: positional
|
|
1020
|
+
required: true
|
|
1021
|
+
- name: prefix
|
|
1022
|
+
description: Replace the rule's key prefix
|
|
1023
|
+
alias: p
|
|
1024
|
+
- name: storage-class
|
|
1025
|
+
description: Replace the rule's transition target
|
|
1026
|
+
alias: s
|
|
1027
|
+
options: *transition_tier_options
|
|
1028
|
+
- name: days
|
|
1029
|
+
description: Replace the rule's transition days
|
|
1030
|
+
alias: d
|
|
1031
|
+
- name: date
|
|
1032
|
+
description: Replace the rule's transition date (ISO-8601)
|
|
1033
|
+
- name: expire-days
|
|
1034
|
+
description: Replace the rule's expiration days
|
|
1035
|
+
- name: expire-date
|
|
1036
|
+
description: Replace the rule's expiration date (ISO-8601)
|
|
1037
|
+
- name: enable
|
|
1038
|
+
description: Enable the rule
|
|
1039
|
+
type: flag
|
|
1040
|
+
- name: disable
|
|
1041
|
+
description: Disable the rule (does not remove it)
|
|
1042
|
+
type: flag
|
|
1000
1043
|
# set-notifications
|
|
1001
1044
|
- name: set-notifications
|
|
1002
1045
|
description: Configure object event notifications on a bucket. Sends webhook requests to a URL when objects are created, updated, or deleted
|
|
@@ -1080,69 +1123,12 @@ commands:
|
|
|
1080
1123
|
type: flag
|
|
1081
1124
|
|
|
1082
1125
|
#########################
|
|
1083
|
-
# Manage forks
|
|
1126
|
+
# Manage forks (removed)
|
|
1084
1127
|
#########################
|
|
1085
1128
|
- name: forks
|
|
1086
|
-
description: (Deprecated, use "buckets create --fork-of" and "buckets list --forks-of") List and create forks
|
|
1087
1129
|
alias: f
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
- "tigris forks create my-bucket my-fork"
|
|
1091
|
-
commands:
|
|
1092
|
-
# list
|
|
1093
|
-
- name: list
|
|
1094
|
-
description: (Deprecated, use "buckets list --forks-of") List all forks created from the given source bucket
|
|
1095
|
-
deprecated: true
|
|
1096
|
-
alias: l
|
|
1097
|
-
examples:
|
|
1098
|
-
- "tigris forks list my-bucket"
|
|
1099
|
-
- "tigris forks list my-bucket --format json"
|
|
1100
|
-
messages:
|
|
1101
|
-
onStart: 'Listing forks...'
|
|
1102
|
-
onSuccess: 'Found {{count}} fork(s)'
|
|
1103
|
-
onFailure: 'Failed to list forks'
|
|
1104
|
-
onEmpty: 'No forks found for this bucket'
|
|
1105
|
-
onDeprecated: 'Use "tigris buckets list --forks-of <bucket>" instead'
|
|
1106
|
-
arguments:
|
|
1107
|
-
- name: name
|
|
1108
|
-
description: Name of the source bucket
|
|
1109
|
-
type: positional
|
|
1110
|
-
required: true
|
|
1111
|
-
examples:
|
|
1112
|
-
- my-bucket
|
|
1113
|
-
- name: format
|
|
1114
|
-
description: Output format
|
|
1115
|
-
options: [json, table, xml]
|
|
1116
|
-
default: table
|
|
1117
|
-
# create
|
|
1118
|
-
- name: create
|
|
1119
|
-
description: (Deprecated, use "buckets create --fork-of") Create a new fork (copy-on-write clone) of the source bucket
|
|
1120
|
-
deprecated: true
|
|
1121
|
-
alias: c
|
|
1122
|
-
examples:
|
|
1123
|
-
- "tigris forks create my-bucket my-fork"
|
|
1124
|
-
- "tigris forks create my-bucket my-fork --snapshot 1765889000501544464"
|
|
1125
|
-
messages:
|
|
1126
|
-
onStart: 'Creating fork...'
|
|
1127
|
-
onSuccess: "Fork '{{forkName}}' created from '{{name}}'"
|
|
1128
|
-
onFailure: 'Failed to create fork'
|
|
1129
|
-
onDeprecated: 'Use "tigris buckets create <name> --fork-of <bucket>" instead'
|
|
1130
|
-
arguments:
|
|
1131
|
-
- name: name
|
|
1132
|
-
description: Name of the source bucket
|
|
1133
|
-
type: positional
|
|
1134
|
-
required: true
|
|
1135
|
-
examples:
|
|
1136
|
-
- my-bucket
|
|
1137
|
-
- name: fork-name
|
|
1138
|
-
description: Name for the new fork
|
|
1139
|
-
type: positional
|
|
1140
|
-
required: true
|
|
1141
|
-
examples:
|
|
1142
|
-
- my-fork
|
|
1143
|
-
- name: snapshot
|
|
1144
|
-
description: Create fork from a specific snapshot. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464)
|
|
1145
|
-
alias: s
|
|
1130
|
+
removed: true
|
|
1131
|
+
replaced_by: 'tigris buckets create --fork-of and tigris buckets list --forks-of'
|
|
1146
1132
|
|
|
1147
1133
|
#########################
|
|
1148
1134
|
# Manage snapshots
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-HWX63Y3P.js";import"../chunk-IRDNZN7R.js";export{c as buildBucketInfo,b as describeExpiration,a as describeTransition};
|
package/dist/utils/exit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-UBANDLB4.js";import"../chunk-DV3LCXRH.js";import"../chunk-7ZUCJBD5.js";import"../chunk-PPNBQWSR.js";export{a as exitWithError,b as failWithError,c as getSuccessNextActions,d as printNextActions};
|
package/dist/utils/messages.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-7ZUCJBD5.js";import"../chunk-PPNBQWSR.js";export{a as interpolate,j as msg,f as printAlreadyDone,h as printDeprecated,e as printEmpty,d as printFailure,g as printHint,i as printPaginationHint,b as printStart,c as printSuccess};
|
package/dist/utils/path.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i}from"../chunk-RXNG56FL.js";export{f as globToRegex,d as isPathFolder,a as isRemotePath,i as listAllItems,e as parseAnyPath,c as parsePath,b as parseRemotePath,h as resolveObjectArgs,g as wildcardPrefix};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,c as b,d as c,e as d,f as e}from"../chunk-
|
|
1
|
+
import{b as a,c as b,d as c,e as d,f as e}from"../chunk-UJFCUY34.js";import"../chunk-ATBINUDP.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": "2.18.
|
|
3
|
+
"version": "2.18.1-beta.1",
|
|
4
4
|
"description": "Command line interface for Tigris object storage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc --noEmit && tsup",
|
|
26
26
|
"dev": "export $(grep -v '^#' .env.test | xargs) && (tsc --noEmit --watch --preserveWatchOutput & tsup --watch)",
|
|
27
|
-
"cli": "node dist/cli.js",
|
|
27
|
+
"cli": "export $(grep -v '^#' .env.test | xargs) && node dist/cli.js",
|
|
28
28
|
"lint": "eslint src test",
|
|
29
29
|
"lint:fix": "eslint src test --fix",
|
|
30
30
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
@@ -90,18 +90,18 @@
|
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@aws-sdk/credential-providers": "^3.
|
|
93
|
+
"@aws-sdk/credential-providers": "^3.1038.0",
|
|
94
94
|
"@smithy/shared-ini-file-loader": "^4.4.9",
|
|
95
|
-
"@tigrisdata/iam": "^2.1.
|
|
96
|
-
"@tigrisdata/storage": "^3.
|
|
95
|
+
"@tigrisdata/iam": "^2.1.1",
|
|
96
|
+
"@tigrisdata/storage": "^3.4.0",
|
|
97
97
|
"commander": "^14.0.3",
|
|
98
98
|
"enquirer": "^2.4.1",
|
|
99
|
-
"jose": "^6.2.
|
|
99
|
+
"jose": "^6.2.3",
|
|
100
100
|
"open": "^11.0.0",
|
|
101
101
|
"yaml": "^2.8.3"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@commitlint/cli": "^20.5.
|
|
104
|
+
"@commitlint/cli": "^20.5.2",
|
|
105
105
|
"@commitlint/config-conventional": "^20.5.0",
|
|
106
106
|
"@eslint/js": "^10.0.1",
|
|
107
107
|
"@types/node": "^22.19.11",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"tsup": "^8.5.1",
|
|
116
116
|
"tsx": "^4.21.0",
|
|
117
117
|
"typescript": "^5.9.3",
|
|
118
|
-
"typescript-eslint": "^8.59.
|
|
118
|
+
"typescript-eslint": "^8.59.1",
|
|
119
119
|
"vitest": "^4.1.5"
|
|
120
120
|
}
|
|
121
121
|
}
|
package/dist/chunk-4ZHCF5D6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./chunk-IRDNZN7R.js";function i(e){let s=[{label:"Number of Objects",value:e.sizeInfo.numberOfObjects?.toString()??"N/A"},{label:"Total Size",value:e.sizeInfo.size!==void 0?n(e.sizeInfo.size):"N/A"},{label:"All Versions Count",value:e.sizeInfo.numberOfObjectsAllVersions?.toString()??"N/A"},{label:"Default Tier",value:e.settings.defaultTier},{label:"Snapshots Enabled",value:e.isSnapshotEnabled?"Yes":"No"},{label:"Delete Protection",value:e.settings.deleteProtection?"Yes":"No"},{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&&(s.push({label:"Forked From",value:e.forkInfo.parents[0].bucketName}),s.push({label:"Fork Snapshot",value:e.forkInfo.parents[0].snapshot})),e.settings.ttlConfig&&s.push({label:"TTL",value:e.settings.ttlConfig.enabled?e.settings.ttlConfig.days?`${e.settings.ttlConfig.days} days`:e.settings.ttlConfig.date??"Enabled":"Disabled"}),e.settings.lifecycleRules?.length&&s.push({label:"Lifecycle Rules",value:e.settings.lifecycleRules.map(l=>`${l.storageClass}${l.days?` after ${l.days}d`:""}${l.enabled?"":" (disabled)"}`).join(", ")}),e.settings.corsRules.length&&s.push({label:"CORS Rules",value:`${e.settings.corsRules.length} rule(s)`}),e.settings.notifications&&s.push({label:"Notifications",value:e.settings.notifications.enabled!==!1?"Enabled":"Disabled"}),e.settings.dataMigration&&s.push({label:"Data Migration",value:e.settings.dataMigration.endpoint?`${e.settings.dataMigration.name??"N/A"} (${e.settings.dataMigration.endpoint})`:e.settings.dataMigration.name??"Configured"}),s}export{i as a};
|
package/dist/chunk-DQMSOC2W.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{d,e as m,f}from"./chunk-ATBINUDP.js";import{mkdirSync as w,readFileSync as _,realpathSync as E,writeFileSync as I}from"fs";import T from"https";import{homedir as g}from"os";import{join as h}from"path";var u="2.18.0";var b=h(g(),".tigris","update-check.json");function y(){try{let e=_(b,"utf-8"),n=JSON.parse(e);return typeof n.latestVersion=="string"&&typeof n.lastChecked=="number"?n:null}catch{return null}}function v(e){try{w(h(g(),".tigris"),{recursive:!0}),I(b,JSON.stringify(e),"utf-8")}catch{}}function N(e,n){let a=i=>{let s=i.startsWith("v")?i.slice(1):i,l=null,o=s.indexOf("-");o!==-1&&(l=s.slice(o+1),s=s.slice(0,o));let c=s.split(".");if(c.length!==3)return null;let p=c.map(Number);return p.some(isNaN)?null:{major:p[0],minor:p[1],patch:p[2],prerelease:l}},r=a(e),t=a(n);return!r||!t?!1:t.major>r.major?!0:t.major<r.major?!1:t.minor>r.minor?!0:t.minor<r.minor?!1:t.patch>r.patch?!0:t.patch<r.patch?!1:r.prerelease&&!t.prerelease?!0:(!r.prerelease&&t.prerelease,!1)}function x(){if(process.platform==="win32")return!1;try{let e=E(process.execPath);return e.includes("/Cellar/")||e.includes("/Caskroom/")}catch{return!1}}function M(){return globalThis.__TIGRIS_BINARY===!0?x()?"brew upgrade tigris":process.platform==="win32"?"irm https://github.com/tigrisdata/cli/releases/latest/download/install.ps1 | iex":"curl -fsSL https://github.com/tigrisdata/cli/releases/latest/download/install.sh | sh":"npm install -g @tigrisdata/cli"}function k(e={}){return new Promise((n,a)=>{let r=T.get(d,{timeout:1e4},t=>{let i="";t.on("data",s=>{i+=s}),t.on("end",()=>{try{let s=JSON.parse(i);typeof s.version=="string"?(v({...y(),latestVersion:s.version,lastChecked:Date.now()}),n(s.version)):a(new Error("Unexpected registry response"))}catch{a(new Error("Failed to parse registry response"))}})});r.on("error",t=>{a(t)}),r.on("timeout",()=>{r.destroy(),a(new Error("Request timed out"))}),e.unref&&r.on("socket",t=>{t.unref()}),r.end()})}function j(){k({unref:!0}).catch(()=>{})}function O(){if(process.env.TIGRIS_NO_UPDATE_CHECK==="1"||!process.stdout.isTTY)return;let e=y(),n=Number(process.env.TIGRIS_UPDATE_NOTIFY_INTERVAL_MS)||36e5;if(e&&N(u,e.latestVersion)&&(!e.lastNotified||Date.now()-e.lastNotified>n)){let r=`Update available: ${u} \u2192 ${e.latestVersion}`,t='Run "tigris update" to upgrade.',i=Math.max(r.length,t.length)+4,s="\u250C"+"\u2500".repeat(i-2)+"\u2510",l="\u2514"+"\u2500".repeat(i-2)+"\u2518",o=c=>"\u2502 "+c.padEnd(i-4)+" \u2502";console.log(`
|
|
2
|
-
${s}
|
|
3
|
-
${o("")}
|
|
4
|
-
${o(r)}
|
|
5
|
-
${o(t)}
|
|
6
|
-
${o("")}
|
|
7
|
-
${l}
|
|
8
|
-
`),v({...e,lastNotified:Date.now()})}let a=Number(process.env.TIGRIS_UPDATE_CHECK_INTERVAL_MS)||216e5;(!e||Date.now()-e.lastChecked>a)&&j()}export{u as a,y as b,N as c,M as d,k as e,O as f};
|
package/dist/chunk-JQUG732D.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{list as g}from"@tigrisdata/storage";var c=["t3://","tigris://"];function u(t){return c.some(e=>t.startsWith(e))}function p(t){let e=c.find(r=>t.startsWith(r));return s(t.slice(e.length))}function s(t){let e=t.split("/");return{bucket:e[0],path:e.slice(1).join("/")}}async function d(t,e,r){let{data:n}=await g({prefix:`${e}/`,limit:1,config:{...r,bucket:t}});return!!(n?.items&&n.items.length>0)}function l(t,e){return{source:s(t),destination:s(e)}}function f(t){return u(t)?p(t):s(t)}function x(t){let e=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*");return new RegExp("^"+e+"$")}function P(t){let e=t.indexOf("*"),r=t.lastIndexOf("/",e);return r>=0?t.slice(0,r+1):""}function h(t,e){let r=f(t);return e?{bucket:r.bucket,key:e}:{bucket:r.bucket,key:r.path}}async function b(t,e,r){let n=[],o;do{let{data:i,error:a}=await g({prefix:e,paginationToken:o,config:{...r,bucket:t}});if(a)return{items:n,error:a};i?.items&&n.push(...i.items),o=i?.hasMore?i.paginationToken:void 0}while(o);return{items:n}}export{u as a,p as b,s as c,d,l as e,f,x as g,P as h,h as i,b as j};
|
package/dist/chunk-KK7FZ7QM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,d as s,e as g,f,g as p,o as k}from"./chunk-OHGCOC5Q.js";import{createRemoteJWKSet as w,jwtVerify as T}from"jose";import y from"open";function _(){let a=process.env.TIGRIS_ENV==="development",e=a?"auth-dev.tigris.dev":process.env.AUTH0_DOMAIN??"auth.storage.tigrisdata.io",t=a?"JdJVYIyw0O1uHi5L5OJH903qaWBgd3gF":process.env.AUTH0_CLIENT_ID??"DMejqeM3CQ4IqTjEcd3oA9eEiT40hn8D",n=a?"https://tigris-api-dev":process.env.AUTH0_AUDIENCE??"https://tigris-os-api",i=process.env.TIGRIS_CLAIMS_NAMESPACE??"https://tigris";return{domain:e,clientId:t,audience:n,claimsNamespace:i}}var u=class{config;baseUrl;jwks=null;constructor(){this.config=_(),this.baseUrl=`https://${this.config.domain}`}getJWKS(){return this.jwks||(this.jwks=w(new URL(`${this.baseUrl}/.well-known/jwks.json`))),this.jwks}async verifyIdToken(e){let{payload:t}=await T(e,this.getJWKS(),{issuer:`${this.baseUrl}/`,audience:this.config.clientId});return t}async login(e){let t=await fetch(`${this.baseUrl}/oauth/device/code`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:this.config.clientId,audience:this.config.audience,scope:"openid profile email offline_access"})});if(!t.ok)throw new Error(`Device authorization failed: ${t.statusText}`);let n=JSON.parse(await t.text());e?.onDeviceCode?.(n.user_code,n.verification_uri),await this.sleep(2e3);try{await y(n.verification_uri_complete)}catch{}e?.onWaiting?.();let i=await this.pollForToken(n.device_code,n.interval||5);await l(i),k("oauth"),await this.extractAndStoreOrganizations()}async pollForToken(e,t){let i=0;for(;i<60;){i++;let r=await fetch(`${this.baseUrl}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:this.config.clientId,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});if(!r.ok){let d=await r.text().then(JSON.parse).catch(()=>({}));if(d.error==="authorization_pending"){await this.sleep(t*1e3);continue}if(d.error==="slow_down"){t+=5,await this.sleep(t*1e3);continue}throw new Error(d.error_description||"Authentication failed")}let o=JSON.parse(await r.text());if(!o.id_token)throw new Error("No ID token found. Please try again.");if((await this.verifyIdToken(o.id_token)).email_verified===!1)throw console.log("Email not verified. Please verify your email and try again."),new Error("Email not verified. Please verify your email and try again.");let m=Date.now()+(o.expires_in||3600)*1e3;return{accessToken:o.access_token,refreshToken:o.refresh_token,idToken:o.id_token,expiresAt:m}}throw new Error("Authentication timed out. Please try again.")}async getAccessToken(){let e=await s();if(!e)throw new Error('Not authenticated. Please run "tigris login" to authenticate.');let t=300*1e3;return Date.now()+t>=e.expiresAt&&(e=await this.refreshAccessToken(e)),e.accessToken}async refreshAccessToken(e){let t;if(e?.refreshToken?t=e:t=await s(),!t?.refreshToken)throw new Error('No refresh token available. Please run "tigris login" to re-authenticate.');try{let n=await fetch(`${this.baseUrl}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:this.config.clientId,grant_type:"refresh_token",refresh_token:t.refreshToken,scope:"openid profile email offline_access"})});if(!n.ok)throw new Error("Token refresh failed");let i=JSON.parse(await n.text()),r={accessToken:i.access_token,refreshToken:i.refresh_token||t.refreshToken,idToken:i.id_token||t.idToken,expiresAt:Date.now()+(i.expires_in||3600)*1e3};return await l(r),r}catch{throw await g(),new Error('Token refresh failed. Please run "tigris login" to re-authenticate.')}}async getIdTokenClaims(){let e=await s();if(!e||!e.idToken)throw new Error('Not authenticated. Please run "tigris login" to authenticate.');try{return await this.verifyIdToken(e.idToken)}catch{throw new Error('ID token verification failed. Please run "tigris login" to re-authenticate.')}}async extractAndStoreOrganizations(){try{let e=await this.fetchOrganizationsFromUserInfo();e&&f(e)}catch{}}async fetchOrganizationsFromUserInfo(){try{let{domain:e,claimsNamespace:t}=this.config,n=await this.getAccessToken(),i=await fetch(`https://${e}/userinfo`,{headers:{Authorization:`Bearer ${n}`}});if(!i.ok)return null;let o=JSON.parse(await i.text())[t]?.ns;return Array.isArray(o)?o.map(c=>({id:c.id,name:c.name,slug:c.name})):null}catch{return null}}async getOrganizations(){return await this.getAccessToken(),p()}async isFlyUser(){return(await this.getIdTokenClaims()).sub.includes("fly-sso")}async logout(){await g()}async isAuthenticated(){return await s()!==null}sleep(e){return new Promise(t=>setTimeout(t,e))}},h=null;function I(){return h||(h=new u),h}export{_ as a,u as b,I as c};
|
package/dist/chunk-QWBEROER.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as A}from"./chunk-SMBIT5FI.js";import{h as C}from"./chunk-JP3PXFIQ.js";import{Command as j}from"commander";function y(e,t,n,a,o){let r=e[e.length-1],s=typeof r=="object"&&r!==null&&"args"in r?r.args:e.filter(l=>typeof l=="string");if(s.length===0)return s;let m=s[0],c=(t.commands??[]).filter(l=>g(l,[...n,l.name],o));if(!new Set(c.flatMap(l=>[l.name,...Array.isArray(l.alias)?l.alias:l.alias?[l.alias]:[]])).has(m)){let l=c.map(f=>f.name),p=n.length>0?`'${m}' for '${n.join(" ")}'`:`'${m}'`;console.error(`Unknown command ${p}.`),l.length>0&&console.error(`Available commands: ${l.join(", ")}`);let u=n.length>0?`${a.name} ${n.join(" ")} help`:`${a.name} help`;console.error(`
|
|
2
|
-
Run "${u}" for usage.`),process.exit(1)}return s}function U(){process.on("unhandledRejection",e=>{(e===""||e===void 0)&&(console.error(`
|
|
3
|
-
Operation cancelled`),process.exit(1)),A(e)}),process.on("uncaughtException",e=>{A(e)})}function q(e){return/^[a-zA-Z0-9_-]+$/.test(e)}function R(e){let t;e.type==="positional"?t=` ${e.name}`:(t=` --${e.name}`,e.alias&&typeof e.alias=="string"&&(t+=e.alias.length===1?`, -${e.alias}`:`, --${e.alias}`));let n=26,a=t.length>=n?t+" ":t.padEnd(n),o=e.description;return e.options&&(Array.isArray(e.options)&&typeof e.options[0]=="string"?o+=` (options: ${e.options.join(", ")})`:o+=` (options: ${e.options.map(r=>r.value).join(", ")})`),e.default&&(o+=` [default: ${e.default}]`),e.required&&(o+=" [required]"),e["required-when"]&&(o+=` [required when: ${e["required-when"]}]`),e.multiple&&(o+=" [multiple values: comma-separated]"),e.type==="positional"&&(o+=" [positional argument]"),e.examples&&e.examples.length>0&&(o+=` (examples: ${e.examples.join(", ")})`),`${a}${o}`}function g(e,t,n){return n(t)?!0:e.commands?e.commands.some(a=>g(a,[...t,a.name],n)):!1}function b(e,t,n,a){let o=n.join(" ");if(console.log(`
|
|
4
|
-
${e.name} ${o} - ${t.description}
|
|
5
|
-
`),t.commands&&t.commands.length>0){let m=t.commands.filter(i=>g(i,[...n,i.name],a));m.length>0&&(console.log("Commands:"),m.forEach(i=>{let c=` ${i.name}`;if(i.alias){let l=Array.isArray(i.alias)?i.alias:[i.alias];c+=` (${l.join(", ")})`}let d=c.padEnd(24);console.log(`${d}${i.description}`)}),console.log())}let r=e.definitions?.global_arguments??[],s=x(r,t.arguments);s.length>0&&(console.log("Arguments:"),s.forEach(m=>{console.log(R(m))}),console.log()),t.examples&&t.examples.length>0&&(console.log("Examples:"),t.examples.forEach(m=>{console.log(` ${m}`)}),console.log()),t.commands&&t.commands.length>0&&console.log(`Use "${e.name} ${o} <command> help" for more information about a command.`)}function k(e,t,n){console.log(`Tigris CLI Version: ${t}
|
|
6
|
-
`),console.log(`Usage: tigris [command] [options]
|
|
7
|
-
`),console.log("Commands:"),e.commands.filter(o=>g(o,[o.name],n)).forEach(o=>{let r=` ${o.name}`;if(o.alias){let m=Array.isArray(o.alias)?o.alias:[o.alias];r+=` (${m.join(", ")})`}let s=r.padEnd(24);console.log(`${s}${o.description}`)}),console.log(`
|
|
8
|
-
Use "${e.name} <command> help" for more information about a command.`)}function x(e,t){let n=t??[],a=new Set(n.map(s=>s.name)),o=new Set(n.filter(s=>s.alias).map(s=>s.alias)),r=e.filter(s=>!a.has(s.name)&&!(s.alias&&o.has(s.alias)));return[...n,...r]}function E(e,t=[]){t.forEach(n=>{if(n.type==="positional"){let a=n.required?`<${n.name}>`:`[${n.name}]`;e.argument(a,n.description)}else{let a=n.alias&&typeof n.alias=="string"&&n.alias.length===1,o=n.alias&&typeof n.alias=="string"&&n.alias.length>1,r=a?`-${n.alias}, --${n.name}`:o?`--${n.alias}, --${n.name}`:`--${n.name}`;n.type==="flag"||(n.type==="boolean"?r+=" [value]":n.options?r+=" <value>":r+=n.required||n["required-when"]?" <value>":" [value]"),e.option(r,n.description,n.default)}})}function L(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function w(e,t,n){if(n){let o=n.find(r=>r.name===t);if(o&&o.alias&&typeof o.alias=="string"){let r=o.alias.charAt(0).toUpperCase()+o.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(),L(t)];for(let o of a)if(e[o]!==void 0)return e[o]}function S(e,t){for(let n of e){if(n["required-when"]){let[a,o]=n["required-when"].split("="),r=w(t,a,e),s=w(t,n.name,e);if(r===o&&!s)return console.error(`--${n.name} is required when --${a} is ${o}`),!1}if(n.required&&!w(t,n.name,e))return console.error(`--${n.name} is required`),!1}return!0}function h(e,t,n){let a;"optsWithGlobals"in n&&typeof n.optsWithGlobals=="function"?a=n.optsWithGlobals():"opts"in n&&typeof n.opts=="function"?a=n.opts():a=n;let o={...a};return e.filter(s=>s.type==="positional").forEach((s,m)=>{t[m]!==void 0&&(s.multiple?o[s.name]=t[m].split(",").map(i=>i.trim()):o[s.name]=t[m])}),e.forEach(s=>{s.multiple&&s.type!=="positional"&&o[s.name]&&typeof o[s.name]=="string"&&(o[s.name]=o[s.name].split(",").map(m=>m.trim()))}),o}async function v(e,t,n=[],a={}){(a.json||a.format==="json")&&(globalThis.__TIGRIS_JSON_MODE=!0);let{module:o,error:r}=await e(t);(r||!o)&&(console.error(r),process.exit(1));let s=t[t.length-1],m=o.default||o[s];typeof m!="function"&&(console.error(`Command not implemented: ${t.join(" ")}`),process.exit(1)),await m({...a,_positional:n})}function I(e,t,n,a=[]){let{specs:o,loadModule:r,hasImplementation:s}=e,m=o.definitions?.global_arguments??[];for(let i of n){q(i.name)||(console.error(`Invalid command name "${i.name}": only alphanumeric, hyphens, and underscores allowed`),process.exit(1));let c=[...a,i.name];if(!g(i,c,s))continue;let d=t.command(i.name).description(i.description);if(i.alias&&(Array.isArray(i.alias)?i.alias:[i.alias]).forEach(p=>d.alias(p)),i.commands&&i.commands.length>0)if(I(e,d,i.commands,c),i.default){let l=i.commands.find(p=>p.name===i.default);if(l){let p=x(m,[...i.arguments||[],...l.arguments||[]]);E(d,p),d.allowExcessArguments(!0),d.action(async(...u)=>{let f=u.pop(),$=y([f],i,c,o,s);p.length>0&&!S(p,h(p,$,f))||(l.deprecated&&l.messages?.onDeprecated&&C(l.messages.onDeprecated),await v(r,[...c,l.name],$,h(p,$,f)))})}}else d.allowExcessArguments(!0),d.action((...l)=>{y(l,i,c,o,s),b(o,i,c,s)});else E(d,x(m,i.arguments)),d.action(async(...l)=>{let p=l.pop(),u=l;i.arguments&&!S(i.arguments,h(i.arguments,u,p))||(i.deprecated&&i.messages?.onDeprecated&&C(i.messages.onDeprecated),await v(r,c,u,h(i.arguments||[],u,p)))});d.command("help").description("Show help for this command").action(()=>{b(o,i,c,s)})}}function V(e){let{specs:t,version:n,hasImplementation:a}=e,o=new j;return o.name(t.name).description(t.description).version(n),I(e,o,t.commands),o.command("help").description("Show general help").action(()=>{k(t,n,a)}),o.command("version").description("Show the CLI version").action(()=>{console.log(n)}),o.allowExcessArguments(!0),o.action((...r)=>{y(r,{commands:t.commands},[],t,a),k(t,n,a)}),o}export{U as a,q as b,R as c,g as d,b as e,k as f,E as g,S as h,h as i,I as j,V as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as b}from"../../chunk-EKLR55EQ.js";import{a as i,b as m}from"../../chunk-S6KFKBMY.js";import{b as t}from"../../chunk-SMBIT5FI.js";import"../../chunk-DV3LCXRH.js";import{b as l,c as u,j as g}from"../../chunk-JP3PXFIQ.js";import"../../chunk-PPNBQWSR.js";import"../../chunk-ATBINUDP.js";import"../../chunk-KK7FZ7QM.js";import"../../chunk-OHGCOC5Q.js";import{setBucketLifecycle as S}from"@tigrisdata/storage";var e=g("buckets","set-transition"),y=["STANDARD_IA","GLACIER","GLACIER_IR"];async function A(a){l(e);let N=m(a),d=i(a,["name"]),r=i(a,["storage-class","storageClass"]),s=i(a,["days"]),n=i(a,["date"]),f=i(a,["enable"]),o=i(a,["disable"]);d||t(e,"Bucket name is required"),f&&o&&t(e,"Cannot use both --enable and --disable"),o&&(s!==void 0||n!==void 0||r!==void 0)&&t(e,"Cannot use --disable with --days, --date, or --storage-class"),!f&&!o&&s===void 0&&n===void 0&&t(e,"Provide --days, --date, --enable, or --disable"),(s!==void 0||n!==void 0)&&!r&&t(e,"--storage-class is required when setting --days or --date"),r&&!y.includes(r)&&t(e,`--storage-class must be one of: ${y.join(", ")} (STANDARD is not a valid transition target)`),s!==void 0&&(isNaN(Number(s))||Number(s)<=0)&&t(e,"--days must be a positive number"),n!==void 0&&(typeof n!="string"||!/^\d{4}-\d{2}-\d{2}/.test(n)||isNaN(new Date(n).getTime()))&&t(e,"--date must be a valid ISO-8601 date (e.g. 2026-06-01)");let C=await b(),R={...f?{enabled:!0}:{},...o?{enabled:!1}:{},...r?{storageClass:r}:{},...s!==void 0?{days:Number(s)}:{},...n!==void 0?{date:n}:{}},{error:c}=await S(d,{lifecycleRules:[R],config:C});c&&t(e,c),N==="json"&&console.log(JSON.stringify({action:"updated",bucket:d})),u(e,{name:d})}export{A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as b}from"../../chunk-EKLR55EQ.js";import{a as d,b as m}from"../../chunk-S6KFKBMY.js";import{b as n}from"../../chunk-SMBIT5FI.js";import"../../chunk-DV3LCXRH.js";import{b as u,c as l,j as c}from"../../chunk-JP3PXFIQ.js";import"../../chunk-PPNBQWSR.js";import"../../chunk-ATBINUDP.js";import"../../chunk-KK7FZ7QM.js";import"../../chunk-OHGCOC5Q.js";import{setBucketTtl as p}from"@tigrisdata/storage";var e=c("buckets","set-ttl");async function k(a){u(e);let g=m(a),o=d(a,["name"]),i=d(a,["days"]),t=d(a,["date"]),r=d(a,["enable"]),s=d(a,["disable"]);o||n(e,"Bucket name is required"),r&&s&&n(e,"Cannot use both --enable and --disable"),s&&(i!==void 0||t!==void 0)&&n(e,"Cannot use --disable with --days or --date"),!r&&!s&&i===void 0&&t===void 0&&n(e,"Provide --days, --date, --enable, or --disable"),i!==void 0&&(isNaN(Number(i))||Number(i)<=0)&&n(e,"--days must be a positive number"),t!==void 0&&(typeof t!="string"||!/^\d{4}-\d{2}-\d{2}/.test(t)||isNaN(new Date(t).getTime()))&&n(e,"--date must be a valid ISO-8601 date (e.g. 2026-06-01)");let y=await b(),N={...r?{enabled:!0}:{},...s?{enabled:!1}:{},...i!==void 0?{days:Number(i)}:{},...t!==void 0?{date:t}:{}},{error:f}=await p(o,{ttlConfig:N,config:y});f&&n(e,f),g==="json"&&console.log(JSON.stringify({action:"updated",bucket:o})),l(e,{name:o})}export{k as default};
|
package/dist/lib/forks/create.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as g}from"../../chunk-EKLR55EQ.js";import{a,b as m}from"../../chunk-S6KFKBMY.js";import{b as n}from"../../chunk-SMBIT5FI.js";import"../../chunk-DV3LCXRH.js";import{b as c,c as s,j as f}from"../../chunk-JP3PXFIQ.js";import"../../chunk-PPNBQWSR.js";import"../../chunk-ATBINUDP.js";import"../../chunk-KK7FZ7QM.js";import"../../chunk-OHGCOC5Q.js";import{createBucket as p}from"@tigrisdata/storage";var r=f("forks","create");async function S(t){c(r);let u=m(t),o=a(t,["name"]),e=a(t,["fork-name","forkName"]),k=a(t,["snapshot","s","S"]);o||n(r,"Source bucket name is required"),e||n(r,"Fork name is required");let{error:i}=await p(e,{sourceBucketName:o,sourceBucketSnapshot:k,config:await g()});i&&n(r,i),u==="json"&&console.log(JSON.stringify({action:"created",name:e,forkOf:o})),s(r,{name:o,forkName:e})}export{S as default};
|
package/dist/lib/forks/list.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as l}from"../../chunk-IRDNZN7R.js";import{d as g}from"../../chunk-EKLR55EQ.js";import{a as d,b as p}from"../../chunk-S6KFKBMY.js";import{b as n}from"../../chunk-SMBIT5FI.js";import"../../chunk-DV3LCXRH.js";import{b as m,c as u,e as i,j as k}from"../../chunk-JP3PXFIQ.js";import"../../chunk-PPNBQWSR.js";import"../../chunk-ATBINUDP.js";import"../../chunk-KK7FZ7QM.js";import"../../chunk-OHGCOC5Q.js";import{getBucketInfo as h,listBuckets as S}from"@tigrisdata/storage";var t=k("forks","list");async function E(f){m(t);let r=d(f,["name"]),b=p(f);r||n(t,"Source bucket name is required");let a=await g(),{data:w,error:c}=await h(r,{config:a});if(c&&n(t,c),!w.forkInfo?.hasChildren){i(t);return}let{data:y,error:s}=await S({config:a});s&&n(t,s);let o=[];for(let e of y.buckets){if(e.name===r)continue;let{data:I}=await h(e.name,{config:a});I?.forkInfo?.parents?.some(O=>O.bucketName===r)&&o.push({name:e.name,created:e.creationDate})}if(o.length===0){i(t);return}let C=l(o,b,"forks","fork",[{key:"name",header:"Name"},{key:"created",header:"Created"}]);console.log(C),u(t,{count:o.length})}export{E as default};
|