@tigrisdata/cli 3.6.0 → 3.7.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.
- package/README.md +82 -5
- package/dist/auth/iam.js +1 -1
- package/dist/auth/provider.js +1 -1
- package/dist/{chunk-QFMXV3BK.js → chunk-2CEUCG65.js} +1 -1
- package/dist/chunk-3ILNJZ6D.js +1 -0
- package/dist/{chunk-HLAGKEX3.js → chunk-3RVILEB4.js} +1 -1
- package/dist/{chunk-CB3HWEP5.js → chunk-4HHJ6ZI7.js} +1 -1
- package/dist/{chunk-2XSEQJGZ.js → chunk-5JBNZ4C6.js} +1 -1
- package/dist/{chunk-HUWHOK4M.js → chunk-6QS6QJ65.js} +1 -1
- package/dist/{chunk-XWIL5QBS.js → chunk-DF3BGBKJ.js} +1 -1
- package/dist/chunk-E6COPYXK.js +28 -0
- package/dist/chunk-HCZGZVF3.js +9 -0
- package/dist/chunk-L6I5MSYU.js +5 -0
- package/dist/{chunk-B7CB3ST5.js → chunk-U3422EZ6.js} +1 -1
- package/dist/{chunk-5Z3OHUTR.js → chunk-UIPN4DNR.js} +1 -1
- package/dist/{chunk-EH56YEO2.js → chunk-WXYJJPV2.js} +1 -1
- package/dist/{chunk-S3HKXM3M.js → chunk-Z265ZXTU.js} +1 -1
- package/dist/{chunk-DLK3GTAJ.js → chunk-ZNUPMP3O.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/disable-snapshots.js +1 -1
- package/dist/lib/buckets/enable-snapshots.js +1 -1
- package/dist/lib/buckets/get.js +1 -1
- package/dist/lib/buckets/lifecycle/create.js +1 -1
- package/dist/lib/buckets/lifecycle/edit.js +1 -1
- package/dist/lib/buckets/lifecycle/list.js +1 -1
- package/dist/lib/buckets/lifecycle/shared.js +1 -1
- package/dist/lib/buckets/list.js +1 -1
- package/dist/lib/buckets/merge.js +1 -1
- package/dist/lib/buckets/migrate.js +5 -5
- package/dist/lib/buckets/rebase.js +1 -1
- package/dist/lib/buckets/restore.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/teams/create.js +1 -1
- package/dist/lib/iam/teams/edit.js +1 -1
- package/dist/lib/iam/teams/list.js +1 -1
- package/dist/lib/iam/teams/shared.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/init/index.js +1 -1
- package/dist/lib/init/interactive.js +1 -1
- package/dist/lib/init/plan.js +1 -1
- package/dist/lib/init/shared.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-versions.js +1 -1
- package/dist/lib/objects/list.js +1 -1
- package/dist/lib/objects/put.js +1 -1
- package/dist/lib/objects/restore-info.js +1 -1
- package/dist/lib/objects/restore.js +1 -1
- package/dist/lib/objects/set-access.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 +5 -1
- package/dist/utils/exit.js +1 -1
- package/dist/utils/telemetry.js +1 -1
- package/dist/utils/update-check.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-FB54QSI7.js +0 -35
- package/dist/chunk-HWAEADX7.js +0 -1
- package/dist/chunk-OWYZCGWM.js +0 -8
- package/dist/chunk-ZP7AWQAS.js +0 -6
- /package/dist/{chunk-5UQUUFCL.js → chunk-A3YRE353.js} +0 -0
package/README.md
CHANGED
|
@@ -14,6 +14,13 @@ You can also install CLI using brew
|
|
|
14
14
|
brew install tigrisdata/tap/tigris
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
To try it without installing anything, run it through the unscoped
|
|
18
|
+
[`tigris`](https://www.npmjs.com/package/tigris) alias:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx tigris init
|
|
22
|
+
```
|
|
23
|
+
|
|
17
24
|
## Usage
|
|
18
25
|
|
|
19
26
|
```
|
|
@@ -26,6 +33,7 @@ Run `tigris help` to see all available commands, or `tigris <command> help` for
|
|
|
26
33
|
|
|
27
34
|
| Command | Description |
|
|
28
35
|
|---------|-------------|
|
|
36
|
+
| `tigris init` (start) | Connect Tigris to your AI coding agent — MCP server config and agent skills |
|
|
29
37
|
| `tigris configure` (c) | Save access-key credentials to ~/.tigris/config.json for persistent use across all commands |
|
|
30
38
|
| `tigris login` (l) | Start a session via OAuth (default) or temporary credentials. Session state is cleared on logout |
|
|
31
39
|
| `tigris whoami` (w) | Print the currently authenticated user, organization, and auth method |
|
|
@@ -50,6 +58,25 @@ Run `tigris help` to see all available commands, or `tigris <command> help` for
|
|
|
50
58
|
|
|
51
59
|
---
|
|
52
60
|
|
|
61
|
+
### `tigris init` (start)
|
|
62
|
+
|
|
63
|
+
Connect Tigris to your AI coding agent — MCP server config and agent skills
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
tigris init [flags]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
| Flag | Description |
|
|
70
|
+
|------|-------------|
|
|
71
|
+
| `--agent` | Print a setup recipe for an AI coding agent to follow instead of running the interactive wizard |
|
|
72
|
+
|
|
73
|
+
**Examples:**
|
|
74
|
+
```bash
|
|
75
|
+
tigris init
|
|
76
|
+
npx tigris init
|
|
77
|
+
tigris init --agent
|
|
78
|
+
```
|
|
79
|
+
|
|
53
80
|
### `tigris configure` (c)
|
|
54
81
|
|
|
55
82
|
Save access-key credentials to ~/.tigris/config.json for persistent use across all commands
|
|
@@ -450,10 +477,12 @@ Create, inspect, update, and delete buckets. Buckets are top-level containers th
|
|
|
450
477
|
|---------|-------------|
|
|
451
478
|
| `tigris buckets list` (l) | List all buckets in the current organization |
|
|
452
479
|
| `tigris buckets create` (c) | Create a new bucket with optional access, tier, and location settings |
|
|
480
|
+
| `tigris buckets rebase` | Update a fork with the latest changes from its source bucket |
|
|
481
|
+
| `tigris buckets merge` | Merge a fork's changes back into its source bucket |
|
|
453
482
|
| `tigris buckets get` (g) | Show details for a bucket including access level, region, tier, and custom domain |
|
|
454
483
|
| `tigris buckets delete` (d) | Delete one or more buckets by name. The bucket must be empty or delete-protection must be off |
|
|
455
484
|
| `tigris buckets restore` | Restore a soft-deleted bucket within its retention window. List recoverable buckets with "tigris buckets list --deleted" |
|
|
456
|
-
| `tigris buckets set` (s) | Update settings on an existing bucket such as access level, location, caching, or custom domain |
|
|
485
|
+
| `tigris buckets set` (s) | Update settings on an existing bucket such as access level, default tier, location, caching, or custom domain |
|
|
457
486
|
| `tigris buckets enable-snapshots` | Enable snapshots on an existing bucket, converting it to a snapshot bucket |
|
|
458
487
|
| `tigris buckets disable-snapshots` | Disable snapshots on an existing bucket, converting it back to a regular bucket. Rejected while the bucket has dependent forks |
|
|
459
488
|
| `tigris buckets set-locations` | Set the data locations for a bucket |
|
|
@@ -518,6 +547,41 @@ tigris buckets create my-fork --fork-of my-bucket
|
|
|
518
547
|
tigris buckets create my-fork --fork-of my-bucket --source-snapshot 1765889000501544464
|
|
519
548
|
```
|
|
520
549
|
|
|
550
|
+
#### `tigris buckets rebase`
|
|
551
|
+
|
|
552
|
+
Update a fork with the latest changes from its source bucket
|
|
553
|
+
|
|
554
|
+
```
|
|
555
|
+
tigris buckets rebase <fork>
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
**Examples:**
|
|
559
|
+
```bash
|
|
560
|
+
tigris buckets rebase my-fork
|
|
561
|
+
tigris buckets rebase my-fork --yes
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
#### `tigris buckets merge`
|
|
565
|
+
|
|
566
|
+
Merge a fork's changes back into its source bucket
|
|
567
|
+
|
|
568
|
+
```
|
|
569
|
+
tigris buckets merge <fork> [flags]
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
| Flag | Description |
|
|
573
|
+
|------|-------------|
|
|
574
|
+
| `-source, --into` | Source bucket to merge into. Defaults to the fork's parent source bucket |
|
|
575
|
+
| `-from-snap, --from-snapshot` | Merge from a specific snapshot of the fork rather than its current state. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464) |
|
|
576
|
+
|
|
577
|
+
**Examples:**
|
|
578
|
+
```bash
|
|
579
|
+
tigris buckets merge my-fork
|
|
580
|
+
tigris buckets merge my-fork --into my-bucket
|
|
581
|
+
tigris buckets merge my-fork --from-snapshot 1765889000501544464
|
|
582
|
+
tigris buckets merge my-fork --yes
|
|
583
|
+
```
|
|
584
|
+
|
|
521
585
|
#### `tigris buckets get` (g)
|
|
522
586
|
|
|
523
587
|
Show details for a bucket including access level, region, tier, and custom domain
|
|
@@ -568,7 +632,7 @@ tigris buckets restore my-bucket
|
|
|
568
632
|
|
|
569
633
|
#### `tigris buckets set` (s)
|
|
570
634
|
|
|
571
|
-
Update settings on an existing bucket such as access level, location, caching, or custom domain
|
|
635
|
+
Update settings on an existing bucket such as access level, default tier, location, caching, or custom domain
|
|
572
636
|
|
|
573
637
|
```
|
|
574
638
|
tigris buckets set <name> [flags]
|
|
@@ -577,6 +641,7 @@ tigris buckets set <name> [flags]
|
|
|
577
641
|
| Flag | Description |
|
|
578
642
|
|------|-------------|
|
|
579
643
|
| `--access` | Bucket access level |
|
|
644
|
+
| `--default-tier` | Change the default storage tier for objects uploaded to the bucket |
|
|
580
645
|
| `--locations` | Bucket location (see https://www.tigrisdata.com/docs/buckets/locations/ for more details) |
|
|
581
646
|
| `--allow-object-acl` | Enable object-level ACL |
|
|
582
647
|
| `--disable-directory-listing` | Disable directory listing |
|
|
@@ -590,6 +655,7 @@ tigris buckets set <name> [flags]
|
|
|
590
655
|
**Examples:**
|
|
591
656
|
```bash
|
|
592
657
|
tigris buckets set my-bucket --access public
|
|
658
|
+
tigris buckets set my-bucket --default-tier GLACIER
|
|
593
659
|
tigris buckets set my-bucket --locations iad,fra --cache-control 'max-age=3600'
|
|
594
660
|
tigris buckets set my-bucket --custom-domain assets.example.com
|
|
595
661
|
tigris buckets set my-bucket --soft-delete enable --retention-days 30
|
|
@@ -671,14 +737,19 @@ tigris buckets set-migration my-bucket --disable
|
|
|
671
737
|
Actively migrate all objects from a shadow bucket to Tigris by scheduling server-side migration for unmigrated objects
|
|
672
738
|
|
|
673
739
|
```
|
|
674
|
-
tigris buckets migrate <path>
|
|
740
|
+
tigris buckets migrate <path> [flags]
|
|
675
741
|
```
|
|
676
742
|
|
|
743
|
+
| Flag | Description |
|
|
744
|
+
|------|-------------|
|
|
745
|
+
| `--max-in-flight-gb` | Max total gigabytes of scheduled-but-unconfirmed migrations to keep in flight. Accepts 1-100 (default: 50) |
|
|
746
|
+
|
|
677
747
|
**Examples:**
|
|
678
748
|
```bash
|
|
679
749
|
tigris buckets migrate my-bucket
|
|
680
750
|
tigris buckets migrate my-bucket/images/
|
|
681
751
|
tigris buckets migrate t3://my-bucket/prefix/
|
|
752
|
+
tigris buckets migrate my-bucket --max-in-flight-gb 100
|
|
682
753
|
```
|
|
683
754
|
|
|
684
755
|
#### `tigris buckets lifecycle` (lc)
|
|
@@ -869,7 +940,7 @@ Low-level object operations for listing, downloading, uploading, and deleting in
|
|
|
869
940
|
| `tigris objects list` (l) | List objects in a bucket, optionally filtered by a key prefix |
|
|
870
941
|
| `tigris objects list-versions` (lv) | List object versions and delete markers in a bucket (requires bucket versioning). Returns both arrays separately to match the S3 ListObjectVersions response |
|
|
871
942
|
| `tigris objects get` (g) | Download an object by key. Prints to stdout by default, or saves to a file with --output |
|
|
872
|
-
| `tigris objects put` (p) | Upload a local file as an object. Content-type is auto-detected from extension unless overridden |
|
|
943
|
+
| `tigris objects put` (p) | Upload a local file — or data piped via stdin — as an object. Content-type is auto-detected from the file extension unless overridden |
|
|
873
944
|
| `tigris objects delete` (d) | Delete one or more objects by key from the given bucket. On a versioned bucket, the default creates a delete marker; use --version-id or --all-versions to hard-delete versions |
|
|
874
945
|
| `tigris objects set` (s) | (Deprecated) Update settings on an existing object such as access level. Use `tigris objects set-access` for ACL changes and `tigris mv` to rename |
|
|
875
946
|
| `tigris objects set-access` (sa) | Set the access level (public or private) on an existing object |
|
|
@@ -952,7 +1023,7 @@ tigris objects get my-bucket archive.zip --output ./archive.zip --mode stream
|
|
|
952
1023
|
|
|
953
1024
|
#### `tigris objects put` (p)
|
|
954
1025
|
|
|
955
|
-
Upload a local file as an object. Content-type is auto-detected from extension unless overridden
|
|
1026
|
+
Upload a local file — or data piped via stdin — as an object. Content-type is auto-detected from the file extension unless overridden
|
|
956
1027
|
|
|
957
1028
|
```
|
|
958
1029
|
tigris objects put <bucket> [key] [file] [flags]
|
|
@@ -969,6 +1040,8 @@ tigris objects put <bucket> [key] [file] [flags]
|
|
|
969
1040
|
tigris objects put my-bucket report.pdf ./report.pdf
|
|
970
1041
|
tigris objects put t3://my-bucket/report.pdf ./report.pdf
|
|
971
1042
|
tigris objects put my-bucket logo.png ./logo.png --access public --content-type image/png
|
|
1043
|
+
echo 'hello' | tigris objects put t3://my-bucket/hello.txt
|
|
1044
|
+
cat report.pdf | tigris objects put my-bucket report.pdf --content-type application/pdf
|
|
972
1045
|
```
|
|
973
1046
|
|
|
974
1047
|
#### `tigris objects delete` (d)
|
|
@@ -1066,6 +1139,7 @@ tigris objects restore <bucket> [key] [flags]
|
|
|
1066
1139
|
|------|-------------|
|
|
1067
1140
|
| `-d, --days` | How many days the restored copy stays available before reverting to its archived tier (default: 1) |
|
|
1068
1141
|
| `--version-id` | Restore a specific object version (requires bucket versioning). Omit to restore the current version |
|
|
1142
|
+
| `-snapshot, --snapshot-version` | Restore the object as of a specific bucket snapshot. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464) |
|
|
1069
1143
|
| `--format` | Output format (default: table) |
|
|
1070
1144
|
|
|
1071
1145
|
**Examples:**
|
|
@@ -1073,6 +1147,7 @@ tigris objects restore <bucket> [key] [flags]
|
|
|
1073
1147
|
tigris objects restore my-bucket archived.bin
|
|
1074
1148
|
tigris objects restore my-bucket archived.bin --days 3
|
|
1075
1149
|
tigris objects restore t3://my-bucket/archived.bin --days 7
|
|
1150
|
+
tigris objects restore my-bucket archived.bin --snapshot-version 1765889000501544464
|
|
1076
1151
|
```
|
|
1077
1152
|
|
|
1078
1153
|
#### `tigris objects restore-info` (ri)
|
|
@@ -1086,12 +1161,14 @@ tigris objects restore-info <bucket> [key] [flags]
|
|
|
1086
1161
|
| Flag | Description |
|
|
1087
1162
|
|------|-------------|
|
|
1088
1163
|
| `--version-id` | Inspect a specific object version (requires bucket versioning). Omit to read the current version |
|
|
1164
|
+
| `-snapshot, --snapshot-version` | Inspect the object as of a specific bucket snapshot. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464) |
|
|
1089
1165
|
| `--format` | Output format (default: table) |
|
|
1090
1166
|
|
|
1091
1167
|
**Examples:**
|
|
1092
1168
|
```bash
|
|
1093
1169
|
tigris objects restore-info my-bucket archived.bin
|
|
1094
1170
|
tigris objects restore-info t3://my-bucket/archived.bin --format json
|
|
1171
|
+
tigris objects restore-info my-bucket archived.bin --snapshot-version 1765889000501544464
|
|
1095
1172
|
```
|
|
1096
1173
|
|
|
1097
1174
|
### `tigris access-keys` (keys)
|
package/dist/auth/iam.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,b as c}from"../chunk-
|
|
1
|
+
import{a as b,b as c}from"../chunk-UIPN4DNR.js";import"../chunk-A3YRE353.js";import"../chunk-U3422EZ6.js";import"../chunk-5JBNZ4C6.js";import"../chunk-3ILNJZ6D.js";import"../chunk-DV3LCXRH.js";import"../chunk-D7WXNA2O.js";import"../chunk-NI4EYBQH.js";import"../chunk-6ZZ54RU7.js";import"../chunk-J3MAV7JB.js";import{a}from"../chunk-KJBSIIND.js";import"../chunk-F4AGJWCK.js";export{c as getIAMConfig,b as getOAuthIAMConfig,a as isFlyOrganization};
|
package/dist/auth/provider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../chunk-A3YRE353.js";import"../chunk-6ZZ54RU7.js";import"../chunk-J3MAV7JB.js";import"../chunk-F4AGJWCK.js";export{c as getEnvCredentials,b as getEnvForcePathStyle,e as getStorageConfig,f as getStorageConfigWithOrg,a as getTigrisConfig,g as requireOAuthLogin,d as resolveAuthMethod};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as d}from"./chunk-S6KFKBMY.js";import{a as f,d as e}from"./chunk-
|
|
1
|
+
import{b as d}from"./chunk-S6KFKBMY.js";import{a as f,d as e}from"./chunk-U3422EZ6.js";import{b as s,c as r,d as g,g as c,j as l}from"./chunk-D7WXNA2O.js";import{c as u}from"./chunk-J3MAV7JB.js";import{h as m,r as p}from"./chunk-F4AGJWCK.js";var o=l("login","oauth");async function x(h={}){s(o);let a=d(h);try{let t=u();await t.login({onDeviceCode:(i,w)=>{console.log(`
|
|
2
2
|
Your confirmation code: ${i}
|
|
3
3
|
`),console.log(`If browser doesn't open, visit: ${w}`)},onWaiting:()=>console.log(`
|
|
4
4
|
Waiting for authentication...`)}),await p();let n=await t.getOrganizations();if(n.length>0){let i=n[0];await m(i.id),a==="json"&&console.log(JSON.stringify({action:"logged_in"})),r(o,{org:i.name}),e(o),n.length>1&&c(o,{count:n.length})}else a==="json"&&console.log(JSON.stringify({action:"logged_in"})),r(o,{org:"none"}),e(o)}catch(t){g(o),f(t,o)}}var N=x;export{x as a,N as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e="3.7.0";export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l}from"./chunk-
|
|
1
|
+
import{e as l}from"./chunk-ZNUPMP3O.js";import{a as m,k as s}from"./chunk-4HHJ6ZI7.js";import{a as i}from"./chunk-3ILNJZ6D.js";import{b as t}from"./chunk-NI4EYBQH.js";import{existsSync as c}from"fs";import{dirname as u,join as a}from"path";import{fileURLToPath as f}from"url";m();var j=f(import.meta.url),d=u(j),h=t(),y=o=>{if(o.length===0)return!1;let e=`${a(d,"lib",...o)}.js`;if(c(e))return!0;let r=a(d,"lib",...o,"index.js");return!!c(r)},b=async o=>{let e=[`./lib/${o.join("/")}.js`,`./lib/${o.join("/")}/index.js`];for(let p of e){let n=await import(p).catch(()=>null);if(n)return{module:n,error:null}}return{module:null,error:`Command not found: ${o.join(" ")}`}},x=s({specs:h,version:i,loadModule:b,hasImplementation:y});x.parse();l();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-U3422EZ6.js";import{e as v,f as b,g as k}from"./chunk-5JBNZ4C6.js";import{b as x}from"./chunk-DV3LCXRH.js";import{h as C}from"./chunk-D7WXNA2O.js";import{Command as M,Option as V}from"commander";function y(n,t,e,a,o){let r=n[n.length-1],s=typeof r=="object"&&r!==null&&"args"in r?r.args:n.filter(m=>typeof m=="string");if(s.length===0)return s;let l=s[0],d=(t.commands??[]).filter(m=>g(m,[...e,m.name],o));if(!new Set(d.flatMap(m=>[m.name,...Array.isArray(m.alias)?m.alias:m.alias?[m.alias]:[]])).has(l)){let m=d.map(u=>u.name),p=e.length>0?`'${l}' for '${e.join(" ")}'`:`'${l}'`;console.error(`Unknown command ${p}.`),m.length>0&&console.error(`Available commands: ${m.join(", ")}`);let f=e.length>0?`${a.name} ${e.join(" ")} help`:`${a.name} help`;console.error(`
|
|
2
2
|
Run "${f}" for usage.`),process.exit(1)}return s}function F(){v();let n=!1,t=async e=>{n&&process.exit(1),n=!0,b(e,{crash:!0,exitCode:x(e).exitCode}),await k(),E(e,void 0,{skipCapture:!0})};process.on("unhandledRejection",e=>{(e===""||e===void 0)&&(console.error(`
|
|
3
3
|
Operation cancelled`),process.exit(1)),t(e)}),process.on("uncaughtException",e=>{t(e)})}function H(n){return/^[a-zA-Z0-9_-]+$/.test(n)}function T(n){let t;n.type==="positional"?t=` ${n.name}`:(t=` --${n.name}`,n.alias&&typeof n.alias=="string"&&(t+=n.alias.length===1?`, -${n.alias}`:`, --${n.alias}`));let e=26,a=t.length>=e?`${t} `:t.padEnd(e),o=n.description;return n.options&&(Array.isArray(n.options)&&typeof n.options[0]=="string"?o+=` (options: ${n.options.join(", ")})`:o+=` (options: ${n.options.map(r=>r.value).join(", ")})`),n.default&&(o+=` [default: ${n.default}]`),n.required&&(o+=" [required]"),n.deprecated&&(o+=n.replaced_by?` [deprecated: use ${n.replaced_by}]`:" [deprecated]"),n["required-when"]&&(o+=` [required when: ${n["required-when"]}]`),n.multiple&&(o+=" [multiple values: comma-separated]"),n.type==="positional"&&(o+=" [positional argument]"),n.examples&&n.examples.length>0&&(o+=` (examples: ${n.examples.join(", ")})`),`${a}${o}`}function g(n,t,e){return n.removed||e(t)?!0:n.commands?n.commands.some(a=>g(a,[...t,a.name],e)):!1}function U(n,t){let e=t?` Use ${t} instead.`:" See the changelog for migration guidance.";console.error(`${n} was removed in this version.${e}`),process.exit(1)}function S(n,t){if(n)for(let e of n){if(!e.removed)continue;h(t,e.name,n)!==void 0&&U(`--${e.name}`,e.replaced_by)}}function j(n,t,e,a){let o=e.join(" ");if(console.log(`
|
|
4
4
|
${n.name} ${o} - ${t.description??""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
1
|
+
import{a as d}from"./chunk-3ILNJZ6D.js";import{g as l}from"./chunk-6ZZ54RU7.js";import*as s from"@sentry/node";var p=new Set(["general","network"]),m=!1,c=!1;function y(){return process.env.TIGRIS_SENTRY_DSN?.trim()||l}function S(){return process.env.TIGRIS_NO_TELEMETRY==="1"||process.env.DO_NOT_TRACK==="1"||process.env.NODE_ENV==="test"||process.env.TIGRIS_ENV==="development"}var E=process.env.TIGRIS_ENV==="development"?"development":"production",h=[/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,/\bt(?:id|sec)_[A-Za-z0-9]+/gi,/eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{4,}/g,/Bearer\s+[A-Za-z0-9._-]+/gi,/AKIA[0-9A-Z]{16}/g,/((?:secret[-_ ]?access[-_ ]?key|secret|password|token|authorization)["']?\s*[:=]\s*["']?)([^\s"',]+)/gi];function u(e){let t=e;for(let r of h)t=t.replace(r,(n,o)=>typeof o=="string"?`${o}[redacted]`:"[redacted]");return t}var _=/secret|password|token|credential|auth|user(name)?|e-?mail|owner|name|key$/i,T=new Set(["-t"]);function g(e){return _.test(e)||T.has(e)}function R(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],o=n.indexOf("=");if(n.startsWith("-")&&o!==-1){let i=n.slice(0,o);t.push(g(i)?`${i}=[redacted]`:`${i}=${u(n.slice(o+1))}`);continue}if(n.startsWith("-")&&g(n)&&r+1<e.length&&!e[r+1].startsWith("-")){t.push(n,"[redacted]"),r++;continue}t.push(u(n))}return t}function A(e){let t=e[0];return t&&!t.startsWith("-")?t:void 0}var I=new Set(["OnUncaughtException","OnUnhandledRejection","LocalVariables","LocalVariablesAsync","Console","ChildProcess"]);function f(e){if(typeof e=="string")return u(e);if(Array.isArray(e))return e.map(f);if(e!==null&&typeof e=="object"){let t=e;for(let r of Object.keys(t))t[r]=f(t[r]);return t}return e}function b(e){return e.server_name=void 0,f(e)}function N(){if(m)return;m=!0;let e=y();if(!(!e||S()))try{s.init({dsn:e,release:`@tigrisdata/cli@${d}`,environment:E,tracesSampleRate:0,sendDefaultPii:!1,integrations:n=>n.filter(o=>!I.has(o.name)),beforeSend:b}),s.setContext("cli",{version:d,node:process.version,platform:process.platform,arch:process.arch});let t=process.argv.slice(2);s.setContext("invocation",{command:R(t).join(" ")});let r=A(t);r&&s.setTag("command",r),c=!0}catch{c=!1}}function C(e,t={}){if(!c)return;let{category:r,command:n,crash:o,exitCode:i}=t;if(!(!o&&r&&!p.has(r)))try{s.captureException(e,a=>(a.setTag("crash",o===!0),r&&a.setTag("error.category",r),n&&a.setTag("command",n),i!==void 0&&a.setTag("exit_code",i),a))}catch{}}async function w(e=2e3){if(c)try{await s.flush(e)}catch{}}export{u as a,R as b,A as c,b as d,N as e,C as f,w as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d,b as o}from"./chunk-JNSFDQGG.js";import{a}from"./chunk-S6KFKBMY.js";import{b as i}from"./chunk-
|
|
1
|
+
import{a as d,b as o}from"./chunk-JNSFDQGG.js";import{a}from"./chunk-S6KFKBMY.js";import{b as i}from"./chunk-U3422EZ6.js";import{getBucketInfo as l,setBucketLifecycle as g}from"@tigrisdata/storage";var f=["STANDARD_IA","GLACIER","GLACIER_IR"];function c(e){return f.includes(e)}function u(e){return/^\d{4}-\d{2}-\d{2}/.test(e)&&!Number.isNaN(new Date(e).getTime())}function C(e){return{prefix:a(e,["prefix"]),storageClass:a(e,["storage-class","storageClass"]),days:a(e,["days"]),date:a(e,["date"]),expireDays:a(e,["expire-days","expireDays"]),expireDate:a(e,["expire-date","expireDate"]),enable:a(e,["enable"]),disable:a(e,["disable"])}}function p(e,{requireStorageClassForTiming:r=!0}={}){if(e.enable&&e.disable)return"Cannot use both --enable and --disable";if(r&&(e.days!==void 0||e.date!==void 0)&&!e.storageClass)return"--storage-class is required when setting --days or --date";if(e.storageClass&&!c(e.storageClass))return`--storage-class must be one of: ${f.join(", ")} (STANDARD is not a valid transition target)`;if(e.days!==void 0&&e.date!==void 0)return"Cannot specify both --days and --date";if(e.days!==void 0&&(Number.isNaN(Number(e.days))||Number(e.days)<=0))return"--days must be a positive number";if(e.date!==void 0&&!u(e.date))return"--date must be a valid ISO-8601 date (e.g. 2026-06-01)";if(e.expireDays!==void 0&&e.expireDate!==void 0)return"Cannot specify both --expire-days and --expire-date";if(e.expireDays!==void 0&&(Number.isNaN(Number(e.expireDays))||Number(e.expireDays)<=0))return"--expire-days must be a positive number";if(e.expireDate!==void 0&&!u(e.expireDate))return"--expire-date must be a valid ISO-8601 date (e.g. 2026-06-01)";if(e.prefix!==void 0&&e.prefix==="")return"--prefix cannot be empty"}function D(e){let r={};return e.storageClass&&(r.storageClass=e.storageClass),e.days!==void 0?(r.days=Number(e.days),r.date=void 0):e.date!==void 0&&(r.date=e.date,r.days=void 0),r}function R(e){if(e.expireDays!==void 0)return{days:Number(e.expireDays),date:void 0};if(e.expireDate!==void 0)return{date:e.expireDate,days:void 0}}function I(e){if(e.enable)return!0;if(e.disable)return!1}async function N(e,r,n){let{data:t,error:s}=await l(r,{config:n});return s&&i(e,s),t?.settings.lifecycleRules??[]}async function T(e,r,n,t){let{error:s}=await g(r,{lifecycleRules:n,config:t});s&&i(e,s)}function S(e){return d(e)??"-"}function A(e){return o(e)??"-"}export{C as a,p as b,D as c,R as d,I as e,N as f,T as g,S as h,A as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-U3422EZ6.js";function o(s,e){if(e===void 0)return;let t=(Array.isArray(e)?e:[e]).map(r=>typeof r=="string"?r.trim():"").filter(r=>r.length>0);return t.length===0&&n(s,"--members requires at least one email address"),t}export{o as a};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var i="Ask permission, then install the CLI: `npm install -g @tigrisdata/cli --ignore-scripts`.",r="Ensure the CLI is on the latest version: `tigris update`.",o=["Check if the user is already authenticated using `tigris whoami`. If not, authenticate using `tigris login oauth`.","Run `tigris orgs list --format json`. If there's more than one org, ask which to use, then make it active with `tigris orgs select <org>` so the following commands target it.","Infer the project name from metadata (package.json, go.mod, pyproject.toml, ...). Check `tigris buckets list --format json` first; if the bucket is absent, `tigris buckets create <name> --format json`. Ask the user whenever anything is ambiguous.",`Create the access key into a private temp file (overwrite, never append), then print only the ID:
|
|
2
|
+
\`umask 077; tmpfile=$(mktemp); tigris access-keys create <username>-<project>-devel --format json > "$tmpfile" && jq -r '.id' < "$tmpfile"\``,"Grant bucket access: `tigris access-keys assign <id> --bucket <bucket> --role Editor --format json`.",`Detect whether the code uses the Tigris SDK or the AWS SDK, then have a small script append the right vars to .env, reading \`.id\`/\`.secret\` from the temp file. Do NOT read the secret into your context \u2014 append it via script. Delete the temp file when done: \`rm -f "$tmpfile"\`.
|
|
3
|
+
|
|
4
|
+
Tigris SDK (@tigrisdata/storage, storage-go):
|
|
5
|
+
TIGRIS_STORAGE_ACCESS_KEY_ID = .id
|
|
6
|
+
TIGRIS_STORAGE_SECRET_ACCESS_KEY = .secret (secret)
|
|
7
|
+
TIGRIS_STORAGE_BUCKET = <bucket>
|
|
8
|
+
|
|
9
|
+
AWS SDK:
|
|
10
|
+
AWS_ACCESS_KEY_ID = .id
|
|
11
|
+
AWS_SECRET_ACCESS_KEY = .secret (secret)
|
|
12
|
+
AWS_ENDPOINT_URL_S3 = https://t3.storage.dev (required)
|
|
13
|
+
AWS_ENDPOINT_URL_IAM = https://iam.storageapi.dev (required)
|
|
14
|
+
AWS_REGION = auto (required)
|
|
15
|
+
`,`Congratulate the user and point them to:
|
|
16
|
+
- JS: https://www.tigrisdata.com/docs/sdks/tigris/
|
|
17
|
+
- Go: https://pkg.go.dev/github.com/tigrisdata/storage-go
|
|
18
|
+
- Docs: https://www.tigrisdata.com/docs/
|
|
19
|
+
- Discord: https://community.tigrisdata.com/
|
|
20
|
+
- Skills: https://www.tigrisdata.com/docs/skills/
|
|
21
|
+
|
|
22
|
+
Suggest adding to their agent config:
|
|
23
|
+
> ## Tigris object storage
|
|
24
|
+
> This project uses Tigris. For any Tigris questions, consult https://www.tigrisdata.com/llms.txt before acting; look it up rather than relying on memory.`];function c(t){return`Help the user set up their project with Tigris:
|
|
25
|
+
|
|
26
|
+
${[t?r:i,...o].map((e,s)=>`${s+1}. ${e}`).join(`
|
|
27
|
+
`)}
|
|
28
|
+
`}export{c as a};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{spawnSync as w}from"child_process";import{homedir as O}from"os";import{delimiter as j,join as e,normalize as _,sep as P}from"path";import{fileURLToPath as C}from"url";import{applyEdits as A,modify as I,parse as R}from"jsonc-parser";function G(){return{encoding:"utf8",...process.platform==="win32"?{shell:!0}:{}}}function M(){let r;try{r=C(import.meta.url)}catch{return null}let t=r.indexOf(`${P}node_modules${P}`);return t===-1?null:e(r.slice(0,t),"node_modules",".bin")}var T=/[\\/](?:_npx|dlx(?:-[^\\/]*)?)(?:[\\/]|$)/;function K(r,t=M()){let s=t===null?null:y(t);return(r??"").split(j).filter(n=>n!==""&&!T.test(n)&&(s===null||y(n)!==s)).join(j)}function y(r){let t=_(r),s=t.length>1?t.replace(/[\\/]+$/,""):t;return process.platform==="win32"?s.toLowerCase():s}function W(){let r=w("tigris",["--version"],G());if(r.error||r.status!==0||!r.stdout)return null;let t=r.stdout.trim().split(`
|
|
2
|
+
`)[0].trim();return/^\d+\.\d+\.\d+/.test(t)?t:null}function V(r){return[...r?[]:["CLI - Global"],"MCP - Global","Skills - Project"].join(", ")}var c=O(),f=process.env.XDG_CONFIG_HOME?.trim()||e(c,".config"),E=process.env.CODEX_HOME?.trim()||e(c,".codex");function D(r,t){return process.platform==="darwin"?e(r,"Library","Application Support","Code","User"):process.platform==="win32"?e(t.APPDATA?.trim()||e(r,"AppData","Roaming"),"Code","User"):e(t.XDG_CONFIG_HOME?.trim()||e(r,".config"),"Code","User")}var $=D(c,process.env),S="saoudrizwan.claude-dev";function L(r,t){return e($,"globalStorage",r,"settings",t)}var Z="tigris",d="https://mcp.storage.dev/mcp";function q(r,t,s,n){let o=r?.trim()?r:"{}",l=[],i=R(o,l,{allowTrailingComma:!0});if(l.length>0)throw new Error("config is not valid JSON/JSONC");if(!b(i))throw new Error("config root is not an object");let p=i[t];if(p!==void 0&&!b(p))throw new Error(`"${t}" is not an object`);let a=b(p)&&Object.hasOwn(p,s),u=I(o,[t,s],n,{formattingOptions:{insertSpaces:!0,tabSize:2}});return{content:m(A(o,u)),replaced:a}}function b(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Q(r,t,s,n){let l=[`[${t}.${s}]`,...Object.entries(n).map(([g,x])=>`${g} = ${JSON.stringify(x)}`)],i=r??"";if(N(i,t,s))throw new Error(`existing TOML defines ${t}.${s} inline`);let p=`${t}.${s}`,a=i.length?i.split(`
|
|
3
|
+
`):[],u=a.findIndex(g=>k(g)===p);if(u!==-1){let g=u+1;for(;g<a.length&&k(a[g])===null;)g++;return a.splice(u,g-u,...l),{content:m(a.join(`
|
|
4
|
+
`)),replaced:!0}}let h=i.length===0?"":m(i),v=h.length===0?"":`
|
|
5
|
+
`;return{content:m(h+v+l.join(`
|
|
6
|
+
`)),replaced:!1}}function m(r){return r.endsWith(`
|
|
7
|
+
`)?r:`${r}
|
|
8
|
+
`}function k(r){let t=r.trim().match(/^\[([^[\]]*)\]/);return t?t[1].split(".").map(s=>s.trim()).join("."):null}function N(r,t,s){let n="";for(let o of r.split(`
|
|
9
|
+
`)){let l=o.trim();if(l===""||l.startsWith("#"))continue;let i=k(l);if(i!==null){n=i;continue}let p=l.indexOf("=");if(p===-1)continue;let a=l.slice(0,p).trim().replace(/^['"]|['"]$/g,"");if(n===t&&(a===s||a.startsWith(`${s}.`))||n===""&&(a===`${t}.${s}`||a.startsWith(`${t}.${s}.`)))return!0}return!1}var z={source:"custom",command:"npx",args:["-y","mcp-remote",d]},Y=[{id:"claude-code",label:"Claude Code",mcp:{format:"json",key:"mcpServers",entry:{type:"http",url:d},projectPath:".mcp.json",globalPath:e(c,".claude.json")},skillsAgent:"claude-code",skillsProjectDir:e(".claude","skills"),skillsGlobalDir:e(c,".claude","skills")},{id:"cursor",label:"Cursor",mcp:{format:"json",key:"mcpServers",entry:{url:d},projectPath:e(".cursor","mcp.json"),globalPath:e(c,".cursor","mcp.json")},skillsAgent:"cursor",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".cursor","skills")},{id:"vscode",label:"VS Code",mcp:{format:"json",key:"servers",entry:{type:"http",url:d},projectPath:e(".vscode","mcp.json")},skillsAgent:"github-copilot",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".copilot","skills")},{id:"windsurf",label:"Windsurf",mcp:{format:"json",key:"mcpServers",entry:{serverUrl:d},globalPath:e(c,".codeium","windsurf","mcp_config.json")},skillsAgent:"windsurf",skillsProjectDir:e(".windsurf","skills"),skillsGlobalDir:e(c,".codeium","windsurf","skills")},{id:"codex",label:"Codex",mcp:{format:"toml",key:"mcp_servers",entry:{url:d},projectPath:e(".codex","config.toml"),globalPath:e(E,"config.toml")},skillsAgent:"codex",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(E,"skills")},{id:"antigravity-cli",label:"Antigravity CLI",mcp:{format:"json",key:"mcpServers",entry:{serverUrl:d},globalPath:e(c,".gemini","config","mcp_config.json")},skillsAgent:"antigravity-cli",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".gemini","antigravity-cli","skills")},{id:"cline",label:"Cline",mcp:{format:"json",key:"mcpServers",entry:{type:"streamableHttp",url:d,disabled:!1,autoApprove:[]},globalPath:L(S,"cline_mcp_settings.json"),createDirs:!1},skillsAgent:"cline",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".agents","skills")},{id:"zed",label:"Zed",mcp:{format:"json",key:"context_servers",entry:z,projectPath:e(".zed","settings.json"),globalPath:e(f,"zed","settings.json")},skillsAgent:"zed",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".agents","skills")},{id:"roo",label:"Roo Code",mcp:{format:"json",key:"mcpServers",entry:{type:"streamable-http",url:d},projectPath:e(".roo","mcp.json")},skillsAgent:"roo",skillsProjectDir:e(".roo","skills"),skillsGlobalDir:e(c,".roo","skills")},{id:"opencode",label:"opencode",mcp:{format:"json",key:"mcp",entry:{type:"remote",url:d,enabled:!0},projectPath:"opencode.json",globalPath:e(f,"opencode","opencode.json")},skillsAgent:"opencode",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(f,"opencode","skills")}];function ee(r,t,s){let n=r.map(o=>t==="global"?o.skillsGlobalDir:e(s,o.skillsProjectDir));return[...new Set(n)]}function te(r,t,s){let n=r.mcp;if(!n)return null;let o=n.globalPath!==void 0,l=n.projectPath!==void 0,i=t==="global"?o?"global":l?"project":null:l?"project":o?"global":null;return i==="global"?{path:n.globalPath,scope:i}:i==="project"?{path:e(s,n.projectPath),scope:i}:null}function re(r){let{env:t,cwd:s,home:n,fileExists:o}=r,l=t.XDG_CONFIG_HOME?.trim()||e(n,".config"),i=[];return(t.CLAUDECODE==="1"||o(e(s,".claude"))||o(e(n,".claude.json")))&&i.push("claude-code"),(t.TERM_PROGRAM==="cursor"||o(e(s,".cursor"))||o(e(n,".cursor")))&&i.push("cursor"),(t.TERM_PROGRAM==="vscode"||o(e(s,".vscode")))&&i.push("vscode"),o(e(n,".codeium","windsurf"))&&i.push("windsurf"),(t.CODEX_HOME?.trim()||o(e(n,".codex")))&&i.push("codex"),(o(e(n,".gemini","antigravity-cli"))||o(e(n,".gemini","antigravity"))||o(e(n,".gemini","config")))&&i.push("antigravity-cli"),(o(e(n,".cline"))||o(e(D(n,t),"globalStorage",S)))&&i.push("cline"),(o(e(l,"zed"))||o("/Applications/Zed.app"))&&i.push("zed"),o(e(s,".roo"))&&i.push("roo"),(o(e(l,"opencode"))||o(e(s,"opencode.json"))||o(e(s,"opencode.jsonc")))&&i.push("opencode"),i}var H="github.com/tigrisdata/skills",ne=[{id:"tigris-agent-kit",label:"Agent kit",recommended:!0},{id:"tigris-object-operations",label:"Object operations",recommended:!0},{id:"tigris-bucket-management",label:"Bucket management",recommended:!0},{id:"tigris-sdk-guide",label:"SDK guide",recommended:!0},{id:"tigris-snapshots-forking",label:"Snapshots & forking",recommended:!1},{id:"tigris-snapshots-recovery",label:"Snapshots recovery",recommended:!1},{id:"tigris-lifecycle-management",label:"Lifecycle management",recommended:!1},{id:"tigris-security-access-control",label:"Security & access control",recommended:!1},{id:"tigris-s3-migration",label:"S3 migration",recommended:!1},{id:"tigris-static-assets",label:"Static assets",recommended:!1},{id:"tigris-image-optimization",label:"Image optimization",recommended:!1},{id:"tigris-egress-optimizer",label:"Egress optimizer",recommended:!1},{id:"tigris-backup-export",label:"Backup & export",recommended:!1},{id:"tigris-python-sdk",label:"Python SDK",recommended:!1}];function oe(r,t,s){let n=["-y","skills","add",H];for(let o of r)n.push("--skill",o);s&&n.push("-g");for(let o of t)n.push("-a",o);return n.push("--yes"),n}export{G as a,K as b,W as c,V as d,Z as e,d as f,q as g,Q as h,Y as i,ee as j,te as k,re as l,H as m,ne as n,oe as o};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as I,c as m,d as S,e as v,g as T,h as L,i as C,j as P,k as j,l as x,n as b,o as A}from"./chunk-HCZGZVF3.js";import{spawnSync as M}from"child_process";import{existsSync as d,mkdirSync as F,readFileSync as O,writeFileSync as V}from"fs";import{homedir as W}from"os";import{dirname as E}from"path";import*as t from"@clack/prompts";async function Q(){process.stdin.isTTY||(console.error("Run `tigris init` in an interactive terminal."),process.exit(1));let e=process.cwd(),i=W();t.intro("Connect Tigris to your AI coding agent");let n=x({env:process.env,cwd:e,home:i,fileExists:d}),r=await t.multiselect({message:"Which editor(s) should use Tigris?",options:C.map(l=>({value:l.id,label:l.label})),initialValues:n,required:!0});if(t.isCancel(r))return k();let s=C.filter(l=>r.includes(l.id)),a=m(),o=await t.select({message:"What would you like to install?",options:[{value:"defaults",label:"Defaults",hint:S(a!==null)},{value:"custom",label:"Customize installation"}],initialValue:"defaults"});if(t.isCancel(o))return k();let u="global",c="project";o==="custom"&&(u=await R("MCP server:","global"),c=await R("Agent skills:","project"));let g=b.map(l=>l.id);if(o==="custom"&&c!=="skip"){let l=await t.multiselect({message:"Which skills should your agent get? (space to toggle)",options:b.map(p=>({value:p.id,label:p.label})),initialValues:b.filter(p=>p.recommended).map(p=>p.id),required:!1});if(t.isCancel(l))return k();g=l}let f;if(a?f=N(a)||Y(a):f=G(),u==="skip")t.log.info("MCP server: skipped");else for(let l of s)_(l,u,e,i);if(c==="skip"||g.length===0)t.log.info("Agent skills: skipped");else{let l=s.map(h=>h.skillsAgent),p=A(g,l,c==="global"),w=$("npx",p,`Installing ${g.length} Tigris skill(s) (${c})`);if(w.ok)for(let h of P(s,c,e))t.log.success(`Skills \u2192 ${y(h,i)}`);else w.output&&t.log.error(w.output.split(`
|
|
2
|
+
`).slice(-6).join(`
|
|
3
|
+
`))}t.note(f?"tigris init --agent":"npx tigris init --agent","Paste this to your AI coding agent to finish setup"),t.outro("Your agent will authenticate with Tigris in-browser on first use.")}async function R(e,i){let n=await t.select({message:e,options:[{value:"global",label:"Global (available in all projects)"},{value:"project",label:"Project-level (this project only)"},{value:"skip",label:"Skip"}],initialValue:i});return t.isCancel(n)&&k(),n}function k(){t.cancel("Setup cancelled."),process.exit(1)}function y(e,i){return e.startsWith(i)?`~${e.slice(i.length)}`:e}function _(e,i,n,r){let s=e.mcp,a=j(e,i,n);if(!s||!a){t.log.warn(`${e.label}: no writable MCP config \u2014 skipped.`);return}let o=a.path;!d(o)&&o.endsWith(".json")&&d(`${o}c`)&&(o=`${o}c`);let u=E(o);if(s.createDirs===!1&&!d(E(u))){t.log.warn(`${e.label}: not installed \u2014 skipped.`);return}try{let c=d(o)?O(o,"utf8"):null,g=s.format==="toml"?L(c,s.key,v,H(s.entry)):T(c,s.key,v,s.entry);F(u,{recursive:!0}),V(o,g.content);let f=a.scope===i?"":` (${a.scope}-only)`;t.log.success(`${e.label}: MCP \u2192 ${y(o,r)}${f}`)}catch{t.log.error(`${e.label}: could not update ${y(o,r)} (incompatible or unwritable) \u2014 skipped.`)}}function H(e){let i={};for(let[n,r]of Object.entries(e))typeof r=="string"&&(i[n]=r);return i}function G(){let e=$("npm",["install","-g","@tigrisdata/cli","--ignore-scripts"],"Installing Tigris CLI (global)");return D(e)?m()===null?(t.log.warn("Tigris CLI installed but not on PATH \u2014 the agent handoff will use npx."),!1):!0:!1}function N(e){if(!D($("tigris",["update"],`Checking for Tigris CLI updates (${e})`)))return!1;let n=m();return n&&n!==e&&t.log.success(`Tigris CLI ${e} \u2192 ${n}`),!0}function Y(e){let i=M("tigris",["init","--agent"],I());return i.error||i.status!==0?(t.log.warn(`Tigris CLI ${e} predates \`init --agent\` \u2014 the agent handoff will use npx.`),!1):!0}function $(e,i,n){let r=t.spinner();r.start(n);let s=M(e,i,I());return s.status===0?(r.stop(`${n} \u2014 done`),{ok:!0}):(r.stop(`${n} \u2014 failed`),{ok:!1,output:(s.stderr||s.stdout||s.error?.message||"").trim()})}function D(e){return!e.ok&&e.output&&t.log.error(e.output.split(`
|
|
4
|
+
`).slice(-6).join(`
|
|
5
|
+
`)),e.ok}export{Q as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m}from"./chunk-
|
|
1
|
+
import{f as m}from"./chunk-5JBNZ4C6.js";import{b as i}from"./chunk-DV3LCXRH.js";import{a as r,d as a}from"./chunk-D7WXNA2O.js";import{c}from"./chunk-NI4EYBQH.js";function p(){return globalThis.__TIGRIS_JSON_MODE===!0}function g(){return process.stderr.isTTY===!0}function f(){return process.stdout.isTTY===!0}function u(t,o,n){let e=i(t);if(p()){let s={error:{message:e.message,code:e.exitCode,category:e.category}};e.nextActions.length>0&&(s.nextActions=e.nextActions),console.error(JSON.stringify(s))}else if(o||console.error(`
|
|
2
2
|
Error: ${e.message}`),g()&&e.nextActions.length>0){console.error(`
|
|
3
3
|
Next steps:`);for(let s of e.nextActions)console.error(` \u2192 ${s.command} ${s.description}`)}n?.skipCapture||m(t,{category:e.category,command:o?.command,exitCode:e.exitCode}),process.exit(e.exitCode)}function M(t,o){let n=o instanceof Error?o.message:String(o);a(t,n),u(o,t)}function x(t,o){let n=c(t.command,t.operation);return n?.messages?.nextActions?n.messages.nextActions.map(e=>({command:r(e.command,o),description:r(e.description,o)})):[]}function T(t,o){if(!f()||p())return;let n=x(t,o);if(n.length!==0){console.log(`
|
|
4
4
|
Next steps:`);for(let e of n)console.log(` \u2192 ${e.command} ${e.description}`)}}export{u as a,M as b,x as c,T as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,d as a}from"./chunk-
|
|
1
|
+
import{a as o,d as a}from"./chunk-A3YRE353.js";import{b as i}from"./chunk-U3422EZ6.js";import{c as r}from"./chunk-J3MAV7JB.js";import{i as n,p as s}from"./chunk-F4AGJWCK.js";async function d(e){s()!=="oauth"&&i(e,`This operation requires OAuth login.
|
|
2
2
|
Run "tigris login oauth" first.`);let t=r();await t.isAuthenticated()||i(e,'Not authenticated. Run "tigris login oauth" first.');let c=n(),{iamEndpoint:g,mgmtEndpoint:u}=o();return{sessionToken:await t.getAccessToken(),organizationId:c??void 0,iamEndpoint:g,mgmtEndpoint:u}}async function A(e){let t=await a();switch(t.type){case"oauth":return d(e);case"aws-profile":case"credentials":case"environment":case"configured":return{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,organizationId:n()??void 0,iamEndpoint:o().iamEndpoint};case"none":i(e,'Not authenticated. Run "tigris login" or "tigris configure" first.')}}export{d as a,A as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-S77OAN6Y.js";import{a as w}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-S77OAN6Y.js";import{a as w}from"./chunk-A3YRE353.js";import{b as S}from"./chunk-S6KFKBMY.js";import{b as m,d as g}from"./chunk-U3422EZ6.js";import{b as i,c as n,j as o}from"./chunk-D7WXNA2O.js";import{a as d}from"./chunk-6ZZ54RU7.js";import{l as f,n as y,o as p,q as u,s as l}from"./chunk-F4AGJWCK.js";import C from"enquirer";import{whoami as k}from"@tigrisdata/iam";var{prompt:I}=C,a=o("login","credentials");async function q(e){i(a);let A=S(e),s=e["access-key"]||e.accessKey||e.key||e.Key||e.accesskey,r=e["access-secret"]||e.accessSecret||e.secret||e.Secret||e.accesssecret;if(!s||!r){let t=[];s||t.push({type:"input",name:"accessKey",message:"Access Key ID:",required:!0}),r||t.push({type:"password",name:"accessSecret",message:"Secret Access Key:",required:!0}),K("Provide --access-key and --access-secret");let c=await I(t);s=s||c.accessKey,r=r||c.accessSecret}(!s||!r)&&m(a,"Access key and secret are required");let h=f()?.endpoint||d;await y({accessKeyId:s,secretAccessKey:r,endpoint:h}),await p("credentials"),await l();try{let t=w(),{data:c}=await k({config:{accessKeyId:s,secretAccessKey:r,iamEndpoint:t.iamEndpoint}});c?.organizationId&&await u(c.organizationId,"temporary")}catch{}A==="json"&&console.log(JSON.stringify({action:"logged_in"})),n(a),g(a)}export{q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-S77OAN6Y.js";import{b as s}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-S77OAN6Y.js";import{b as s}from"./chunk-U3422EZ6.js";import{e as o}from"./chunk-D7WXNA2O.js";import m from"enquirer";import{listPolicies as f}from"@tigrisdata/iam";var{prompt:p}=m;async function h(a,t,c="Select a policy:"){let{data:e,error:r}=await f({config:a});if(r&&s(t,r),!e.policies||e.policies.length===0){o(t);return}n("Provide the policy ARN as a positional argument");let{selected:l}=await p({type:"select",name:"selected",message:c,choices:e.policies.map(i=>({name:i.resource,message:`${i.name} (${i.resource})`}))});return l}export{h as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-3ILNJZ6D.js";import{d as f,e as m,f as d}from"./chunk-6ZZ54RU7.js";import{mkdirSync as I,readFileSync as b,realpathSync as T,writeFileSync as w}from"fs";import y from"https";import{homedir as h}from"os";import{join as g}from"path";var _=g(h(),".tigris","update-check.json");function C(){try{let e=b(_,"utf-8"),i=JSON.parse(e);return typeof i.latestVersion=="string"&&typeof i.lastChecked=="number"?i:null}catch{return null}}function N(e){try{I(g(h(),".tigris"),{recursive:!0}),w(_,JSON.stringify(e),"utf-8")}catch{}}function E(e,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}},r=o(e),t=o(i);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 S(){if(process.platform==="win32")return!1;try{let e=T(process.execPath);return e.includes("/Cellar/")||e.includes("/Caskroom/")}catch{return!1}}function P(){return globalThis.__TIGRIS_BINARY===!0?S()?"brew upgrade tigris":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":"npm install -g @tigrisdata/cli"}function k(e={}){return new Promise((i,o)=>{let r=y.get(f,{timeout:1e4},t=>{let s="";t.on("data",n=>{s+=n}),t.on("end",()=>{try{let n=JSON.parse(s);typeof n.version=="string"?(N({...C(),latestVersion:n.version,lastChecked:Date.now()}),i(n.version)):o(new Error("Unexpected registry response"))}catch{o(new Error("Failed to parse registry response"))}})});r.on("error",t=>{o(t)}),r.on("timeout",()=>{r.destroy(),o(new Error("Request timed out"))}),e.unref&&r.on("socket",t=>{t.unref()}),r.end()})}function R(){k({unref:!0}).catch(()=>{})}function D(){if(process.env.TIGRIS_NO_UPDATE_CHECK==="1"||!process.stdout.isTTY)return;let e=C(),i=Number(process.env.TIGRIS_UPDATE_NOTIFY_INTERVAL_MS)||36e5;if(e&&E(p,e.latestVersion)&&(!e.lastNotified||Date.now()-e.lastNotified>i)){let r=`Update available: ${p} \u2192 ${e.latestVersion}`,t='Run "tigris update" to upgrade.',s=Math.max(r.length,t.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
2
|
${n}
|
|
3
3
|
${a("")}
|
|
4
4
|
${a(r)}
|
package/dist/cli-core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-4HHJ6ZI7.js";import"./chunk-U3422EZ6.js";import"./chunk-5JBNZ4C6.js";import"./chunk-3ILNJZ6D.js";import"./chunk-DV3LCXRH.js";import"./chunk-D7WXNA2O.js";import"./chunk-NI4EYBQH.js";import"./chunk-6ZZ54RU7.js";export{g as addArgumentsToCommand,d as commandHasAnyImplementation,k as createProgram,i as extractArgumentValues,c as formatArgumentHelp,b as isValidCommandName,j as registerCommands,a as setupErrorHandlers,e as showCommandHelp,f as showMainHelp,h as validateRequiredWhen};
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-3RVILEB4.js";import"./chunk-ZNUPMP3O.js";import"./chunk-4HHJ6ZI7.js";import"./chunk-U3422EZ6.js";import"./chunk-5JBNZ4C6.js";import"./chunk-3ILNJZ6D.js";import"./chunk-DV3LCXRH.js";import"./chunk-D7WXNA2O.js";import"./chunk-NI4EYBQH.js";import"./chunk-6ZZ54RU7.js";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-3RVILEB4.js";import"./chunk-ZNUPMP3O.js";import"./chunk-4HHJ6ZI7.js";import"./chunk-U3422EZ6.js";import"./chunk-5JBNZ4C6.js";import"./chunk-3ILNJZ6D.js";import"./chunk-DV3LCXRH.js";import"./chunk-D7WXNA2O.js";import"./chunk-NI4EYBQH.js";import"./chunk-6ZZ54RU7.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as y}from"../../chunk-
|
|
1
|
+
import{b as y}from"../../chunk-UIPN4DNR.js";import"../../chunk-A3YRE353.js";import{a as s,b as h}from"../../chunk-S6KFKBMY.js";import{b as n,c as b,d as p}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as A,c as f,j as R}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import{assignBucketRoles as x,revokeAllBucketRoles as w}from"@tigrisdata/iam";var e=R("access-keys","assign"),N=["Editor","ReadOnly","NamespaceAdmin"];function v(r){return r?Array.isArray(r)?r:[r]:[]}async function O(r){A(e);let g=h(r),i=s(r,["id"]),m=s(r,["admin"]),d=s(r,["revokeRoles","revoke-roles"]),l=v(s(r,["bucket","b"])),t=v(s(r,["role","r"]));i||n(e,"Access key ID is required"),m&&d&&n(e,"Cannot use --admin and --revoke-roles together");let u=await y(e);if(d){let{error:o}=await w(i,{config:u});o&&n(e,o),g==="json"&&console.log(JSON.stringify({action:"revoked",id:i})),f(e);return}let a;if(m)a=[{bucket:"*",role:"NamespaceAdmin"}];else{l.length===0&&n(e,"At least one bucket name is required (or use --admin or --revoke-roles)"),t.length===0&&n(e,"At least one role is required (or use --admin or --revoke-roles)");for(let o of t)N.includes(o)||n(e,`Invalid role "${o}". Valid roles are: ${N.join(", ")}`);t.length===1?a=l.map(o=>({bucket:o,role:t[0]})):t.length===l.length?a=l.map((o,c)=>({bucket:o,role:t[c]})):n(e,`Number of roles (${t.length}) must be 1 or match number of buckets (${l.length})`)}let{error:k}=await x(i,a,{config:u});if(k&&n(e,k),g==="json"){let o=b(e),c={action:"assigned",id:i,assignments:a};o.length>0&&(c.nextActions=o),console.log(JSON.stringify(c))}f(e),p(e)}export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u}from"../../chunk-
|
|
1
|
+
import{b as u}from"../../chunk-UIPN4DNR.js";import{a as d}from"../../chunk-S77OAN6Y.js";import"../../chunk-A3YRE353.js";import{a as l,b as h}from"../../chunk-S6KFKBMY.js";import{b as t}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as p,c as y,j as g}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import S from"enquirer";import{attachPolicyToAccessKey as N,listPolicies as R,listPoliciesForAccessKey as q}from"@tigrisdata/iam";var{prompt:k}=S,e=g("access-keys","attach-policy");async function v(s){p(e);let A=h(s),o=l(s,["id"]),r=l(s,["policyArn","policy-arn"]);o||t(e,"Access key ID is required");let c=await u(e);if(!r){d("Use --policy-arn to specify the policy ARN");let[a,n]=await Promise.all([R({config:c}),q(o,{config:c})]);a.error&&t(e,a.error),n.error&&t(e,n.error);let w=new Set(n.data.policies),f=a.data.policies.filter(i=>!w.has(i.name));f.length===0&&t(e,"No unassigned policies available. All policies are already attached to this access key.");let{selected:P}=await k({type:"select",name:"selected",message:"Select a policy to attach:",choices:f.map(i=>({name:i.resource,message:`${i.name} (${i.resource})`}))});r=P}let{error:m}=await N(o,r,{config:c});m&&t(e,m),A==="json"&&console.log(JSON.stringify({action:"attached",id:o,policyArn:r})),y(e)}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u}from"../../chunk-
|
|
1
|
+
import{b as u}from"../../chunk-UIPN4DNR.js";import"../../chunk-A3YRE353.js";import{a as d,b as p}from"../../chunk-S6KFKBMY.js";import{b as o,c as g,d as f}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as a,c as m,j as l}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import{createAccessKey as w}from"@tigrisdata/iam";var t=l("access-keys","create");async function x(n){a(t);let A=p(n),c=d(n,["name"]);c||o(t,"Access key name is required");let y=await u(t),{data:e,error:s}=await w(c,{config:y});if(s&&o(t,s),A==="json"){let r=g(t,{name:e.name,id:e.id}),i={action:"created",name:e.name,id:e.id,secret:e.secret};r.length>0&&(i.nextActions=r),console.log(JSON.stringify(i))}else console.log(` Name: ${e.name}`),console.log(` Access Key ID: ${e.id}`),console.log(` Secret Access Key: ${e.secret}`),console.log(""),console.log(" Save these credentials securely. The secret will not be shown again.");m(t),f(t,{name:e.name,id:e.id})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as g}from"../../chunk-
|
|
1
|
+
import{b as g}from"../../chunk-UIPN4DNR.js";import{a as m,b as a}from"../../chunk-S77OAN6Y.js";import"../../chunk-A3YRE353.js";import{a as i,b as d}from"../../chunk-S6KFKBMY.js";import{b as t}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as n,c as s,j as f}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import{removeAccessKey as u}from"@tigrisdata/iam";var e=f("access-keys","delete");async function k(r){n(e);let l=d(r),o=i(r,["id"]),p=i(r,["yes","y","force"]);if(o||t(e,"Access key ID is required"),!p&&(m("Use --yes to skip confirmation"),!await a(`Delete access key '${o}'?`))){console.log("Aborted");return}let y=await g(e),{error:c}=await u(o,{config:y});c&&t(e,c),l==="json"&&console.log(JSON.stringify({action:"deleted",id:o})),s(e)}export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as A}from"../../chunk-
|
|
1
|
+
import{b as A}from"../../chunk-UIPN4DNR.js";import{a as m,b as h}from"../../chunk-S77OAN6Y.js";import"../../chunk-A3YRE353.js";import{a,b as u}from"../../chunk-S6KFKBMY.js";import{b as o}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as p,c as y,j as g}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import N from"enquirer";import{detachPolicyFromAccessKey as $,listPolicies as q,listPoliciesForAccessKey as F}from"@tigrisdata/iam";var{prompt:R}=N,e=g("access-keys","detach-policy");async function I(c){p(e);let w=u(c),t=a(c,["id"]),i=a(c,["policyArn","policy-arn"]),k=a(c,["yes","y","force"]);t||o(e,"Access key ID is required");let n=await A(e);if(!i){m("Use --policy-arn to specify the policy ARN");let[s,l]=await Promise.all([F(t,{config:n}),q({config:n})]);s.error&&o(e,s.error),l.error&&o(e,l.error);let P=new Set(s.data.policies),d=l.data.policies.filter(r=>P.has(r.name));d.length===0&&o(e,"No policies are attached to this access key.");let{selected:S}=await R({type:"select",name:"selected",message:"Select a policy to detach:",choices:d.map(r=>({name:r.resource,message:`${r.name} (${r.resource})`}))});i=S}if(!k&&(m("Use --yes to skip confirmation"),!await h(`Detach policy '${i}' from access key '${t}'?`))){console.log("Aborted");return}let{error:f}=await $(t,i,{config:n});f&&o(e,f),w==="json"&&console.log(JSON.stringify({action:"detached",id:t,policyArn:i})),y(e)}export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as m}from"../../chunk-
|
|
1
|
+
import{b as m}from"../../chunk-UIPN4DNR.js";import"../../chunk-A3YRE353.js";import{a,b as f}from"../../chunk-S6KFKBMY.js";import{b as t}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as c,c as l,j as g}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import{getAccessKey as u}from"@tigrisdata/iam";var e=g("access-keys","get");async function $(s){c(e);let d=f(s),r=a(s,["id"]);r||t(e,"Access key ID is required");let p=await m(e),{data:o,error:n}=await u(r,{config:p});if(n&&t(e,n),d==="json")console.log(JSON.stringify(o));else if(console.log(` Name: ${o.name}`),console.log(` ID: ${o.id}`),console.log(` Status: ${o.status}`),console.log(` Created: ${o.createdAt}`),console.log(` Organization: ${o.organizationId}`),o.roles&&o.roles.length>0){console.log(" Roles:");for(let i of o.roles)console.log(` - ${i.bucket}: ${i.role}`)}else console.log(" Roles: None");l(e)}export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as P}from"../../chunk-
|
|
1
|
+
import{b as P}from"../../chunk-UIPN4DNR.js";import{g as A}from"../../chunk-AFM3TY2D.js";import"../../chunk-A3YRE353.js";import{a as y,b as k,c as h}from"../../chunk-S6KFKBMY.js";import{b as c}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as m,c as g,e as f,i as d,j as u}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import{listPoliciesForAccessKey as E}from"@tigrisdata/iam";var i=u("access-keys","list-policies");async function F(o){m(i);let n=k(o),{limit:s,pageToken:r}=h(o),a=y(o,["id"]);a||c(i,"Access key ID is required");let T=await P(i),{data:t,error:p}=await E(a,{...s!==void 0?{limit:s}:{},...r?{paginationToken:r}:{},config:T});if(p&&c(i,p),!t.policies||t.policies.length===0){f(i);return}let e=t.policies.map(O=>({policy:O})),x=[{key:"policy",header:e.length>1?"Attached Policies":"Attached Policy"}],l=t.paginationToken||void 0,w=A(e,n,"policies","policy",x,{paginationToken:l});console.log(w),n!=="json"&&n!=="xml"&&d(l),g(i,{count:e.length})}export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as h}from"../../chunk-
|
|
1
|
+
import{b as h}from"../../chunk-UIPN4DNR.js";import{g as T}from"../../chunk-AFM3TY2D.js";import"../../chunk-A3YRE353.js";import{b as k,c as y}from"../../chunk-S6KFKBMY.js";import{b as l}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as d,c as p,e as f,i as g,j as u}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import{listAccessKeys as A}from"@tigrisdata/iam";var t=u("access-keys","list");async function P(a){d(t);let o=k(a),{limit:s,pageToken:i}=y(a),x=await h(t),{data:e,error:r}=await A({...s!==void 0?{limit:s}:{},...i?{paginationToken:i}:{},config:x});if(r&&l(t,r),!e.accessKeys||e.accessKeys.length===0){f(t);return}let c=e.accessKeys.map(n=>({name:n.name,id:n.id,status:n.status,created:n.createdAt})),K=[{key:"name",header:"Name"},{key:"id",header:"ID"},{key:"status",header:"Status"},{key:"created",header:"Created"}],m=e.paginationToken||void 0,w=T(c,o,"keys","key",K,{paginationToken:m});console.log(w),o!=="json"&&o!=="xml"&&g(m),p(t,{count:c.length})}export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as w}from"../../chunk-
|
|
1
|
+
import{b as w}from"../../chunk-UIPN4DNR.js";import{a as u,b as y}from"../../chunk-S77OAN6Y.js";import"../../chunk-A3YRE353.js";import{a as i,b as p}from"../../chunk-S6KFKBMY.js";import{b as n,c as g,d as m}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as f,c as l,j as d}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-KJBSIIND.js";import"../../chunk-F4AGJWCK.js";import{rotateAccessKey as k}from"@tigrisdata/iam";var e=d("access-keys","rotate");async function x(o){f(e);let A=p(o),r=i(o,["id"]),S=i(o,["yes","y","force"]);if(r||n(e,"Access key ID is required"),!S&&(u("Use --yes to skip confirmation"),!await y(`Rotate access key '${r}'? The current secret will be invalidated.`))){console.log("Aborted");return}let h=await w(e),{data:t,error:s}=await k(r,{config:h});if(s&&n(e,s),A==="json"){let c=g(e,{id:t.id}),a={action:"rotated",id:t.id,secret:t.newSecret};c.length>0&&(a.nextActions=c),console.log(JSON.stringify(a))}else console.log(` Access Key ID: ${t.id}`),console.log(` New Secret Access Key: ${t.newSecret}`),console.log(""),console.log(" Save these credentials securely. The secret will not be shown again.");l(e),m(e,{id:t.id})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,c as j}from"../../chunk-N3Y6RFSK.js";import{a as B}from"../../chunk-S77OAN6Y.js";import{e as T}from"../../chunk-
|
|
1
|
+
import{a as C,c as j}from"../../chunk-N3Y6RFSK.js";import{a as B}from"../../chunk-S77OAN6Y.js";import{e as T}from"../../chunk-A3YRE353.js";import{a as t,b as O}from"../../chunk-S6KFKBMY.js";import{b as i,c as x,d as D}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as w,c as v,j as L}from"../../chunk-D7WXNA2O.js";import{d as p,e as g}from"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-F4AGJWCK.js";import{createBucket as E}from"@tigrisdata/storage";import F from"enquirer";var{prompt:J}=F,a=L("buckets","create");async function W(e){w(a);let q=O(e),s=t(e,["name"]),b=t(e,["public"])?"public":t(e,["access","a","A"]),d=t(e,["enable-snapshots","enableSnapshots","s","S"]),N=t(e,["allow-object-acl","allowObjectAcl"]),P=t(e,["enable-directory-listing","enableDirectoryListing"]),h=t(e,["default-tier","t","T"]),I=t(e,["locations","l","L"]),o=t(e,["fork-of","forkOf","fork"]),u=t(e,["source-snapshot","sourceSnapshot","source-snap"]),R=!s,S;if(R){B("Provide --name to skip interactive mode");let c=p("buckets","access","create"),n=g(c),f=n?.findIndex(r=>r.value===c?.default),y=p("buckets","default-tier","create"),A=g(y),m=A?.findIndex(r=>r.value===y?.default),l=await J([{type:"input",name:"name",message:"Bucket name:",required:!0},{type:"select",name:"access",message:"Access level:",choices:n||[],initial:f!==void 0&&f>=0?f:0},{type:"select",name:"defaultTier",message:"Default storage tier:",choices:A||[],initial:m!==void 0&&m>=0?m:0},{type:"confirm",name:"enableSnapshots",message:"Enable snapshots?",initial:!0}]);s=l.name,b=l.access,h=l.defaultTier,d=l.enableSnapshots;try{S=await C()}catch(r){i(a,r)}}s||i(a,"Bucket name is required"),u&&!o&&i(a,"--source-snapshot requires --fork-of");let{error:k}=await E(s,{defaultTier:h??"STANDARD",enableSnapshot:d===!0,allowObjectAcl:N===!0,enableDirectoryListing:P===!0,access:b??"private",locations:S??j(I??"global"),...o?{sourceBucketName:o}:{},...u?{sourceBucketSnapshot:u}:{},config:await T()});if(k&&i(a,k),q==="json"){let c=x(a,{name:s}),n={action:"created",name:s,...o?{forkOf:o}:{}};c.length>0&&(n.nextActions=c),console.log(JSON.stringify(n))}v(a,{name:s}),D(a,{name:s})}export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as x,b as y}from"../../chunk-S77OAN6Y.js";import{e as b}from"../../chunk-
|
|
1
|
+
import{a as x,b as y}from"../../chunk-S77OAN6Y.js";import{e as b}from"../../chunk-A3YRE353.js";import{a as s,b as A}from"../../chunk-S6KFKBMY.js";import{a as p,b as d,c as k,d as h}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as f,c as g,d as u,j as l}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-F4AGJWCK.js";import{removeBucket as N}from"@tigrisdata/storage";var e=l("buckets","delete");async function B(i){f(e);let w=A(i),o=s(i,["name"]),c=s(i,["yes","y","force"]);o||d(e,"Bucket name is required");let a=Array.isArray(o)?o:[o],S=await b();if(!c&&(x("Use --yes to skip confirmation"),!await y(`Delete ${a.length} bucket(s)?`))){console.log("Aborted");return}let m=[],n=[];for(let t of a){let{error:r}=await N(t,{config:S,force:c});r?(u(e,r.message,{name:t}),n.push({name:t,error:r.message})):(m.push(t),g(e,{name:t}))}if(w==="json"){let t=k(e),r={action:"deleted",names:m,errors:n};t.length>0&&(r.nextActions=t),console.log(JSON.stringify(r))}n.length>0&&p(n[0].error,e),h(e)}export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as m}from"../../chunk-
|
|
1
|
+
import{f as m}from"../../chunk-A3YRE353.js";import{a as f,b as c}from"../../chunk-S6KFKBMY.js";import{b as i}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as s,c as a,j as e}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-F4AGJWCK.js";import{disableSnapshot as l}from"@tigrisdata/storage";var o=e("buckets","disable-snapshots");async function d(n){s(o);let g=c(n),t=f(n,["name"]);t||i(o,"Bucket name is required");let p=await m(),{error:r}=await l(t,{config:p});r&&i(o,r),g==="json"&&console.log(JSON.stringify({action:"snapshots-disabled",name:t})),a(o,{name:t})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as m}from"../../chunk-
|
|
1
|
+
import{f as m}from"../../chunk-A3YRE353.js";import{a as f,b as c}from"../../chunk-S6KFKBMY.js";import{b as n}from"../../chunk-U3422EZ6.js";import"../../chunk-5JBNZ4C6.js";import"../../chunk-3ILNJZ6D.js";import"../../chunk-DV3LCXRH.js";import{b as e,c as a,j as s}from"../../chunk-D7WXNA2O.js";import"../../chunk-NI4EYBQH.js";import"../../chunk-6ZZ54RU7.js";import"../../chunk-J3MAV7JB.js";import"../../chunk-F4AGJWCK.js";import{enableSnapshot as l}from"@tigrisdata/storage";var o=s("buckets","enable-snapshots");async function u(r){e(o);let g=c(r),t=f(r,["name"]);t||n(o,"Bucket name is required");let p=await m(),{error:i}=await l(t,{config:p});i&&n(o,i),g==="json"&&console.log(JSON.stringify({action:"snapshots-enabled",name:t})),a(o,{name:t})}export{u as default};
|