@tigrisdata/cli 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +122 -0
- package/dist/auth/iam.js +1 -1
- package/dist/auth/provider.js +1 -1
- package/dist/{chunk-D3UQD6W2.js → chunk-2GLKQBPM.js} +1 -1
- package/dist/chunk-2ITYREA5.js +1 -0
- package/dist/{chunk-2OQSVS4G.js → chunk-HHDQ3ISR.js} +1 -1
- package/dist/{chunk-YWSU7MW7.js → chunk-NOD4ZVXO.js} +3 -3
- package/dist/{chunk-EFPPY2JQ.js → chunk-VQDOL2GU.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/list.js +1 -1
- package/dist/lib/buckets/merge.js +1 -0
- package/dist/lib/buckets/migrate.js +1 -1
- package/dist/lib/buckets/rebase.js +1 -0
- 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/unlink-key.js +1 -1
- package/dist/lib/iam/teams/create.js +1 -0
- package/dist/lib/iam/teams/edit.js +1 -0
- package/dist/lib/iam/teams/list.js +1 -0
- package/dist/lib/iam/teams/shared.js +1 -0
- 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/select.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 -0
- package/dist/lib/objects/restore.js +1 -0
- 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 +208 -2
- package/dist/utils/update-check.js +1 -1
- package/package.json +9 -50
- /package/dist/{chunk-YN2TKPPT.js → chunk-RS4HZYP3.js} +0 -0
package/dist/lib/rm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v,b as h}from"../chunk-S77OAN6Y.js";import{a as j,b as I,d as N,f as O,g as E,i as J}from"../chunk-RXNG56FL.js";import{d as W}from"../chunk-
|
|
1
|
+
import{a as v,b as h}from"../chunk-S77OAN6Y.js";import{a as j,b as I,d as N,f as O,g as E,i as J}from"../chunk-RXNG56FL.js";import{d as W}from"../chunk-RS4HZYP3.js";import{a as $,b as P}from"../chunk-S6KFKBMY.js";import{a as s}from"../chunk-UBANDLB4.js";import"../chunk-DV3LCXRH.js";import"../chunk-7ZUCJBD5.js";import"../chunk-PPNBQWSR.js";import"../chunk-ATBINUDP.js";import"../chunk-3EAZ2L6H.js";import"../chunk-OHGCOC5Q.js";import{list as U,remove as b,removeBucket as T}from"@tigrisdata/storage";var i=!1;async function q(m){let d=$(m,["path"]),g=$(m,["yes","y","force","f"]),k=!!$(m,["recursive","r"]);i=P(m)==="json",d||s("path argument is required"),j(d)||s("Path must be a remote Tigris path (t3:// or tigris://)");let{bucket:e,path:o}=I(d);e||s("Invalid path");let n=await W(),R=d.endsWith("/");if(!o&&!R){if(!g&&(v("Use --yes to skip confirmation"),!await h(`Are you sure you want to delete bucket '${e}'?`))){i||console.log("Aborted");return}let{error:r}=await T(e,{config:n,force:g});r&&s(r),console.log(i?JSON.stringify({action:"removed",bucket:e}):`Removed bucket '${e}'`);return}let a=o.includes("*"),u=o.endsWith("/")||!o&&R;if(!a&&!u&&(u=await N(e,o,n)),u&&!a&&!k&&s("Source is a remote folder (not removed). Use -r to remove recursively."),a||u){let r=a?E(o):o?o.endsWith("/")?o:`${o}/`:"",{items:w,error:S}=await J(e,r||void 0,n);S&&s(S);let f=w;if(a){let t=o.split("/").pop(),l=O(t);f=f.filter(A=>{let F=r?A.name.slice(r.length):A.name;return!k&&F.includes("/")?!1:l.test(F.split("/").pop())})}let c=r,M=f.some(t=>t.name===c),y=!1;if(!M&&!a){let{data:t}=await U({prefix:c,limit:1,config:{...n,bucket:e}});y=t?.items?.some(l=>l.name===c)||!1}let x=f.length+(y?1:0);if(x===0){console.log(i?JSON.stringify({action:"removed",count:0}):"No objects to remove");return}if(!g&&(v("Use --yes to skip confirmation"),!await h(`Are you sure you want to delete ${x} object(s)?`))){i||console.log("Aborted");return}let p=0;for(let t of f){let{error:l}=await b(t.name,{config:{...n,bucket:e}});l?console.error(`Failed to remove ${t.name}: ${l.message}`):(i||console.log(`Removed t3://${e}/${t.name}`),p++)}if(y){let{error:t}=await b(c,{config:{...n,bucket:e}});t?console.error(`Failed to remove ${c}: ${t.message}`):(i||console.log(`Removed t3://${e}/${c}`),p++)}console.log(i?JSON.stringify({action:"removed",count:p}):`Removed ${p} object(s)`)}else{if(!g&&(v("Use --yes to skip confirmation"),!await h(`Are you sure you want to delete 't3://${e}/${o}'?`))){i||console.log("Aborted");return}let{error:r}=await b(o,{config:{...n,bucket:e}});r&&s(r),console.log(i?JSON.stringify({action:"removed",count:1,path:`t3://${e}/${o}`}):`Removed t3://${e}/${o}`)}process.exit(0)}export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as S}from"../../chunk-IRDNZN7R.js";import{d as x}from"../../chunk-
|
|
1
|
+
import{g as S}from"../../chunk-IRDNZN7R.js";import{d as x}from"../../chunk-RS4HZYP3.js";import{a as k,b as y,c as T}from"../../chunk-S6KFKBMY.js";import{b as i}from"../../chunk-UBANDLB4.js";import"../../chunk-DV3LCXRH.js";import{b as f,c as u,e as d,i as h,j as l}from"../../chunk-7ZUCJBD5.js";import"../../chunk-PPNBQWSR.js";import"../../chunk-ATBINUDP.js";import"../../chunk-3EAZ2L6H.js";import"../../chunk-OHGCOC5Q.js";import{listBucketSnapshots as P}from"@tigrisdata/storage";var t=l("snapshots","list");async function B(o){f(t);let r=k(o,["name"]),e=y(o),{limit:s,pageToken:m}=T(o);r||i(t,"Bucket name is required");let v=await x(),{data:n,error:c}=await P(r,{...s!==void 0?{limit:s}:{},...m?{paginationToken:m}:{},config:v});if(c&&i(t,c),!n.snapshots||n.snapshots.length===0){d(t);return}let p=n.snapshots.map(a=>({name:a.name||"",version:a.version||"",created:a.creationDate})),w=[{key:"name",header:"Name"},{key:"version",header:"Version"},{key:"created",header:"Created"}],g=n.paginationToken||void 0,O=S(p,e,"snapshots","snapshot",w,{paginationToken:g});console.log(O),e!=="json"&&e!=="xml"&&h(g),u(t,{count:p.length})}export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as g}from"../../chunk-
|
|
1
|
+
import{d as g}from"../../chunk-RS4HZYP3.js";import{a,b as f}from"../../chunk-S6KFKBMY.js";import{b as r}from"../../chunk-UBANDLB4.js";import"../../chunk-DV3LCXRH.js";import{b as m,c,j as p}from"../../chunk-7ZUCJBD5.js";import"../../chunk-PPNBQWSR.js";import"../../chunk-ATBINUDP.js";import"../../chunk-3EAZ2L6H.js";import"../../chunk-OHGCOC5Q.js";import{createBucketSnapshot as k}from"@tigrisdata/storage";var o=p("snapshots","take");async function S(n){m(o);let h=f(n),t=a(n,["name"]),e=a(n,["snapshot-name","snapshotName"]);t||r(o,"Bucket name is required");let u=await g(),{data:s,error:i}=await k(t,{name:e,config:u});i&&r(o,i),h==="json"&&console.log(JSON.stringify({action:"taken",bucket:t,version:s?.snapshotVersion})),c(o,{name:t,snapshotName:e||s?.snapshotVersion,version:s?.snapshotVersion})}export{S as default};
|
package/dist/lib/stat.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w}from"../chunk-LAB2KJTN.js";import{a as d,f as m}from"../chunk-IRDNZN7R.js";import"../chunk-N3Y6RFSK.js";import"../chunk-S77OAN6Y.js";import{e as I}from"../chunk-RXNG56FL.js";import{d as j}from"../chunk-
|
|
1
|
+
import{c as w}from"../chunk-LAB2KJTN.js";import{a as d,f as m}from"../chunk-IRDNZN7R.js";import"../chunk-N3Y6RFSK.js";import"../chunk-S77OAN6Y.js";import{e as I}from"../chunk-RXNG56FL.js";import{d as j}from"../chunk-RS4HZYP3.js";import{a as u,b as O}from"../chunk-S6KFKBMY.js";import{b as i}from"../chunk-UBANDLB4.js";import"../chunk-DV3LCXRH.js";import{b as y,c,j as b}from"../chunk-7ZUCJBD5.js";import"../chunk-PPNBQWSR.js";import"../chunk-ATBINUDP.js";import"../chunk-3EAZ2L6H.js";import"../chunk-OHGCOC5Q.js";import{getBucketInfo as A,getStats as M,head as z}from"@tigrisdata/storage";var t=b("stat");async function C(s){y(t);let h=u(s,["path"]),f=O(s),v=u(s,["snapshot-version","snapshotVersion","snapshot"]),S=u(s,["version-id","versionId"]),l=await j();if(!h){let{data:o,error:a}=await M({config:l});a&&i(t,a);let p=[{metric:"Active Buckets",value:String(o.stats.activeBuckets)},{metric:"Total Objects",value:String(o.stats.totalObjects)},{metric:"Total Unique Objects",value:String(o.stats.totalUniqueObjects)},{metric:"Total Storage",value:d(o.stats.totalStorageBytes)}],g=m(p,f,"stats","stat",[{key:"metric",header:"Metric"},{key:"value",header:"Value"}]);console.log(g),c(t),process.exit(0)}let{bucket:r,path:n}=I(h);if(r||i(t,"Invalid path"),!n||n==="/"){let{data:o,error:a}=await A(r,{config:l});a&&i(t,a);let p=w(o).map(({label:T,value:V})=>({metric:T,value:V})),g=m(p,f,"bucket-info","info",[{key:"metric",header:"Metric"},{key:"value",header:"Value"}]);console.log(g),c(t,{bucket:r}),process.exit(0)}let{data:e,error:k}=await z(n,{...v?{snapshotVersion:v}:{},...S?{versionId:S}:{},config:{...l,bucket:r}});k&&i(t,k),e||i(t,"Object not found");let x=[{metric:"Path",value:e.path},{metric:"Size",value:d(e.size)},{metric:"Content-Type",value:e.contentType||"N/A"},{metric:"Content-Disposition",value:e.contentDisposition||"N/A"},{metric:"Modified",value:e.modified.toISOString()}],B=m(x,f,"object-info","info",[{key:"metric",header:"Metric"},{key:"value",header:"Value"}]);console.log(B),c(t,{bucket:r,path:n}),process.exit(0)}export{C as default};
|
package/dist/lib/touch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as f}from"../chunk-RXNG56FL.js";import{d as s}from"../chunk-
|
|
1
|
+
import{e as f}from"../chunk-RXNG56FL.js";import{d as s}from"../chunk-RS4HZYP3.js";import{a,b as c}from"../chunk-S6KFKBMY.js";import{a as t}from"../chunk-UBANDLB4.js";import"../chunk-DV3LCXRH.js";import"../chunk-7ZUCJBD5.js";import"../chunk-PPNBQWSR.js";import"../chunk-ATBINUDP.js";import"../chunk-3EAZ2L6H.js";import"../chunk-OHGCOC5Q.js";import{put as p}from"@tigrisdata/storage";async function u(e){let i=a(e,["path"]);i||t("path argument is required");let{bucket:o,path:r}=f(i);o||t("Invalid path"),r||t("Object key is required (use mk to create buckets)");let g=c(e),m=await s(),{error:n}=await p(r,"",{config:{...m,bucket:o}});n&&t(n),console.log(g==="json"?JSON.stringify({action:"created",bucket:o,path:r}):`Created '${o}/${r}'`),process.exit(0)}export{u as default};
|
package/dist/lib/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as d}from"../chunk-S6KFKBMY.js";import{a as t,c as l,d as p,e as f}from"../chunk-
|
|
1
|
+
import{b as d}from"../chunk-S6KFKBMY.js";import{a as t,c as l,d as p,e as f}from"../chunk-NOD4ZVXO.js";import{b as m}from"../chunk-UBANDLB4.js";import"../chunk-DV3LCXRH.js";import{b as s,c as i,f as a,j as c}from"../chunk-7ZUCJBD5.js";import"../chunk-PPNBQWSR.js";import"../chunk-ATBINUDP.js";import{execSync as h}from"child_process";var r=c("update");async function v(u={}){let g=d(u);s(r);try{let o=await f(),e=l(t,o),n=p();if(g==="json"){console.log(JSON.stringify({currentVersion:t,latestVersion:o,updateAvailable:e,updateCommand:n}));return}console.log(`Current version: ${t}`),e?(console.log(`Latest version: ${o}`),console.log("Updating..."),h(n,{stdio:"inherit",...process.platform==="win32"?{shell:"powershell.exe"}:{}}),i(r,{latestVersion:o})):a(r,{currentVersion:t})}catch(o){m(r,o)}}export{v as default};
|
package/dist/lib/whoami.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as $,c as b}from"../chunk-
|
|
1
|
+
import{a as $,c as b}from"../chunk-RS4HZYP3.js";import{b as w}from"../chunk-S6KFKBMY.js";import{b as A}from"../chunk-UBANDLB4.js";import"../chunk-DV3LCXRH.js";import{f as g,j as I}from"../chunk-7ZUCJBD5.js";import"../chunk-PPNBQWSR.js";import"../chunk-ATBINUDP.js";import{c as z}from"../chunk-3EAZ2L6H.js";import{i as y}from"../chunk-OHGCOC5Q.js";import{whoami as k}from"@tigrisdata/iam";var f=I("whoami"),v={"aws-profile":"AWS Profile",oauth:"OAuth",credentials:"Access Key Credentials",environment:"Environment Variables",configured:"Configured Credentials"};async function l(h,u){try{let t=$(),{data:c}=await k({config:{accessKeyId:h,secretAccessKey:u,iamEndpoint:t.iamEndpoint}});return{userId:c?.userId,organizationId:c?.organizationId}}catch{return{userId:void 0,organizationId:void 0}}}async function K(h={}){try{let u=w(h),t=await b();if(t.type==="none"){g(f);return}let c,r,o,n,d,e=[""],m=v[t.type]??t.type;switch(t.type){case"aws-profile":{e.push(`Auth method: ${m} (${t.profile})`);let i=await l(t.accessKeyId,t.secretAccessKey);r=i.userId,o=i.organizationId;break}case"oauth":{e.push(`Auth method: ${m}`);let i=z();if(!await i.isAuthenticated()){g(f);return}let a=await i.getIdTokenClaims();c=a.email,r=a.sub,d=y(),n=await i.getOrganizations();break}case"credentials":{e.push(`Auth method: ${m}`);let i=await l(t.accessKeyId,t.secretAccessKey);r=i.userId,o=i.organizationId;break}case"environment":{let i=t.source==="tigris"?"TIGRIS_STORAGE_*":"AWS_*";e.push(`Auth method: ${m} (${i})`);let s=await l(t.accessKeyId,t.secretAccessKey);r=s.userId,o=s.organizationId;break}case"configured":{e.push(`Auth method: ${m}`);let i=await l(t.accessKeyId,t.secretAccessKey);r=i.userId,o=i.organizationId;break}}if(e.push(""),e.push("User Information:"),e.push(` Email: ${c||"N/A"}`),e.push(` User ID: ${r||"N/A"}`),n)if(n.length>0){let s=n.slice(0,5);if(e.push(""),e.push(`Organizations (${n.length}):`),s.forEach(a=>{let O=a.id===d?">":" ";e.push(` ${O} ${a.name} (${a.id})`)}),n.length>5&&e.push(` ... and ${n.length-5} more. Run "tigris organizations list" to see all.`),d){let a=n.find(p=>p.id===d);a&&(e.push(""),e.push(`Active: ${a.name}`))}}else e.push(""),e.push("Organizations: None");else o&&e.push(` Organization: ${o}`);if(u==="json"){let i={authMethod:t.type,email:c,userId:r};if(n&&(i.organizations=n.map(s=>({id:s.id,name:s.name})),d)){let s=n.find(a=>a.id===d);s&&(i.activeOrganization=s.name)}o&&(i.organizationId=o),console.log(JSON.stringify(i));return}e.push(""),console.log(e.join(`
|
|
2
2
|
`))}catch(u){A(f,u)}}export{K as default};
|
package/dist/specs.yaml
CHANGED
|
@@ -298,6 +298,8 @@ commands:
|
|
|
298
298
|
examples:
|
|
299
299
|
- "tigris mk my-bucket"
|
|
300
300
|
- "tigris mk my-bucket --access public --region iad"
|
|
301
|
+
- "tigris mk my-bucket --allow-object-acl"
|
|
302
|
+
- "tigris mk my-bucket --public --enable-directory-listing"
|
|
301
303
|
- "tigris mk my-bucket/images/"
|
|
302
304
|
- "tigris mk t3://my-bucket"
|
|
303
305
|
- "tigris mk my-fork --fork-of my-bucket"
|
|
@@ -327,6 +329,14 @@ commands:
|
|
|
327
329
|
alias: s
|
|
328
330
|
type: flag
|
|
329
331
|
default: false
|
|
332
|
+
- name: allow-object-acl
|
|
333
|
+
description: Allow per-object ACLs on the bucket (only applies when creating a bucket)
|
|
334
|
+
type: flag
|
|
335
|
+
default: false
|
|
336
|
+
- name: enable-directory-listing
|
|
337
|
+
description: Enable directory listing, relevant for public buckets (only applies when creating a bucket)
|
|
338
|
+
type: flag
|
|
339
|
+
default: false
|
|
330
340
|
- name: default-tier
|
|
331
341
|
description: Default storage tier (only applies when creating a bucket)
|
|
332
342
|
alias: t
|
|
@@ -447,6 +457,7 @@ commands:
|
|
|
447
457
|
alias: copy
|
|
448
458
|
examples:
|
|
449
459
|
- "tigris cp ./file.txt t3://my-bucket/file.txt"
|
|
460
|
+
- "tigris cp ./logo.png t3://my-bucket/logo.png --access public"
|
|
450
461
|
- "tigris cp t3://my-bucket/file.txt ./local-copy.txt"
|
|
451
462
|
- "tigris cp t3://my-bucket/src/ t3://my-bucket/dest/ -r"
|
|
452
463
|
- "tigris cp ./images/ t3://my-bucket/images/ -r"
|
|
@@ -476,6 +487,10 @@ commands:
|
|
|
476
487
|
type: flag
|
|
477
488
|
alias: r
|
|
478
489
|
description: Copy directories recursively
|
|
490
|
+
- name: access
|
|
491
|
+
description: Access level for uploaded objects (only applies to local-to-remote uploads)
|
|
492
|
+
alias: a
|
|
493
|
+
options: *access_options
|
|
479
494
|
|
|
480
495
|
# mv
|
|
481
496
|
- name: mv
|
|
@@ -699,6 +714,8 @@ commands:
|
|
|
699
714
|
- "tigris buckets create my-bucket"
|
|
700
715
|
- "tigris buckets create my-bucket --access public --locations iad"
|
|
701
716
|
- "tigris buckets create my-bucket --enable-snapshots --default-tier STANDARD_IA"
|
|
717
|
+
- "tigris buckets create my-bucket --allow-object-acl"
|
|
718
|
+
- "tigris buckets create my-bucket --public --enable-directory-listing"
|
|
702
719
|
- "tigris buckets create my-fork --fork-of my-bucket"
|
|
703
720
|
- "tigris buckets create my-fork --fork-of my-bucket --source-snapshot 1765889000501544464"
|
|
704
721
|
messages:
|
|
@@ -730,6 +747,14 @@ commands:
|
|
|
730
747
|
alias: s
|
|
731
748
|
type: flag
|
|
732
749
|
default: false
|
|
750
|
+
- name: allow-object-acl
|
|
751
|
+
description: Allow per-object ACLs on the bucket
|
|
752
|
+
type: flag
|
|
753
|
+
default: false
|
|
754
|
+
- name: enable-directory-listing
|
|
755
|
+
description: Enable directory listing, relevant for public buckets
|
|
756
|
+
type: flag
|
|
757
|
+
default: false
|
|
733
758
|
- name: default-tier
|
|
734
759
|
description: Choose the default tier for the bucket
|
|
735
760
|
alias: t
|
|
@@ -754,6 +779,54 @@ commands:
|
|
|
754
779
|
- name: source-snapshot
|
|
755
780
|
description: Fork from a specific snapshot of the source bucket. Accepts a snapshot version string or any UNIX nanosecond-precision timestamp (e.g. 1765889000501544464). Requires --fork-of
|
|
756
781
|
alias: source-snap
|
|
782
|
+
# rebase
|
|
783
|
+
- name: rebase
|
|
784
|
+
description: Update a fork with the latest changes from its source bucket
|
|
785
|
+
examples:
|
|
786
|
+
- "tigris buckets rebase my-fork"
|
|
787
|
+
- "tigris buckets rebase my-fork --yes"
|
|
788
|
+
messages:
|
|
789
|
+
onStart: 'Rebasing fork...'
|
|
790
|
+
onSuccess: "Fork '{{fork}}' rebased onto its source (snapshot {{snapshotVersion}})"
|
|
791
|
+
onFailure: "Failed to rebase fork '{{fork}}'"
|
|
792
|
+
nextActions:
|
|
793
|
+
- command: 'tigris buckets merge {{fork}}'
|
|
794
|
+
description: "Merge the fork's changes back into its source bucket"
|
|
795
|
+
arguments:
|
|
796
|
+
- name: fork
|
|
797
|
+
description: Name of the fork bucket to rebase onto its source
|
|
798
|
+
type: positional
|
|
799
|
+
required: true
|
|
800
|
+
examples:
|
|
801
|
+
- my-fork
|
|
802
|
+
# merge
|
|
803
|
+
- name: merge
|
|
804
|
+
description: Merge a fork's changes back into its source bucket
|
|
805
|
+
examples:
|
|
806
|
+
- "tigris buckets merge my-fork"
|
|
807
|
+
- "tigris buckets merge my-fork --into my-bucket"
|
|
808
|
+
- "tigris buckets merge my-fork --from-snapshot 1765889000501544464"
|
|
809
|
+
- "tigris buckets merge my-fork --yes"
|
|
810
|
+
messages:
|
|
811
|
+
onStart: 'Merging fork...'
|
|
812
|
+
onSuccess: "Fork '{{fork}}' merged into '{{into}}' (snapshot {{snapshotVersion}})"
|
|
813
|
+
onFailure: "Failed to merge fork '{{fork}}'"
|
|
814
|
+
nextActions:
|
|
815
|
+
- command: 'tigris buckets get {{into}}'
|
|
816
|
+
description: 'Inspect the updated source bucket'
|
|
817
|
+
arguments:
|
|
818
|
+
- name: fork
|
|
819
|
+
description: Name of the fork bucket whose changes will be merged
|
|
820
|
+
type: positional
|
|
821
|
+
required: true
|
|
822
|
+
examples:
|
|
823
|
+
- my-fork
|
|
824
|
+
- name: into
|
|
825
|
+
description: Source bucket to merge into. Defaults to the fork's parent source bucket
|
|
826
|
+
alias: source
|
|
827
|
+
- name: from-snapshot
|
|
828
|
+
description: 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)
|
|
829
|
+
alias: from-snap
|
|
757
830
|
# get
|
|
758
831
|
- name: get
|
|
759
832
|
description: Show details for a bucket including access level, region, tier, and custom domain
|
|
@@ -1394,12 +1467,14 @@ commands:
|
|
|
1394
1467
|
description: Object version id to download (requires bucket versioning). Omit to download the latest version
|
|
1395
1468
|
# put
|
|
1396
1469
|
- name: put
|
|
1397
|
-
description: Upload a local file as an object. Content-type is auto-detected from extension unless overridden
|
|
1470
|
+
description: Upload a local file — or data piped via stdin — as an object. Content-type is auto-detected from the file extension unless overridden
|
|
1398
1471
|
alias: p
|
|
1399
1472
|
examples:
|
|
1400
1473
|
- "tigris objects put my-bucket report.pdf ./report.pdf"
|
|
1401
1474
|
- "tigris objects put t3://my-bucket/report.pdf ./report.pdf"
|
|
1402
1475
|
- "tigris objects put my-bucket logo.png ./logo.png --access public --content-type image/png"
|
|
1476
|
+
- "echo 'hello' | tigris objects put t3://my-bucket/hello.txt"
|
|
1477
|
+
- "cat report.pdf | tigris objects put my-bucket report.pdf --content-type application/pdf"
|
|
1403
1478
|
messages:
|
|
1404
1479
|
onStart: 'Uploading object...'
|
|
1405
1480
|
onSuccess: "Object '{{key}}' uploaded successfully"
|
|
@@ -1421,7 +1496,7 @@ commands:
|
|
|
1421
1496
|
examples:
|
|
1422
1497
|
- my-file.txt
|
|
1423
1498
|
- name: file
|
|
1424
|
-
description: Path to the local file to upload
|
|
1499
|
+
description: Path to the local file to upload. Omit to read the object data from stdin (piped input)
|
|
1425
1500
|
type: positional
|
|
1426
1501
|
examples:
|
|
1427
1502
|
- ./my-file.txt
|
|
@@ -1563,6 +1638,62 @@ commands:
|
|
|
1563
1638
|
alias: snapshot
|
|
1564
1639
|
- name: version-id
|
|
1565
1640
|
description: Object version id (requires bucket versioning). Omit to read the latest version
|
|
1641
|
+
# restore
|
|
1642
|
+
- name: restore
|
|
1643
|
+
description: Restore an archived object (e.g. one in the GLACIER tier) into an actively-readable copy for a number of days
|
|
1644
|
+
alias: rs
|
|
1645
|
+
examples:
|
|
1646
|
+
- "tigris objects restore my-bucket archived.bin"
|
|
1647
|
+
- "tigris objects restore my-bucket archived.bin --days 3"
|
|
1648
|
+
- "tigris objects restore t3://my-bucket/archived.bin --days 7"
|
|
1649
|
+
messages:
|
|
1650
|
+
onStart: 'Requesting restore...'
|
|
1651
|
+
onSuccess: "Restore requested for '{{key}}'"
|
|
1652
|
+
onFailure: 'Failed to restore object'
|
|
1653
|
+
arguments:
|
|
1654
|
+
- name: bucket
|
|
1655
|
+
type: positional
|
|
1656
|
+
required: true
|
|
1657
|
+
description: Name of the bucket, or a full path (t3://bucket/key)
|
|
1658
|
+
- name: key
|
|
1659
|
+
type: positional
|
|
1660
|
+
description: Key of the object (omit if bucket contains the full path)
|
|
1661
|
+
- name: days
|
|
1662
|
+
description: How many days the restored copy stays available before reverting to its archived tier
|
|
1663
|
+
alias: d
|
|
1664
|
+
default: 1
|
|
1665
|
+
- name: version-id
|
|
1666
|
+
description: Restore a specific object version (requires bucket versioning). Omit to restore the current version
|
|
1667
|
+
- name: format
|
|
1668
|
+
description: Output format
|
|
1669
|
+
options: [json, table, xml]
|
|
1670
|
+
default: table
|
|
1671
|
+
# restore-info
|
|
1672
|
+
- name: restore-info
|
|
1673
|
+
description: Show the restore state of an archived object (archived, in-progress, or restored)
|
|
1674
|
+
alias: ri
|
|
1675
|
+
examples:
|
|
1676
|
+
- "tigris objects restore-info my-bucket archived.bin"
|
|
1677
|
+
- "tigris objects restore-info t3://my-bucket/archived.bin --format json"
|
|
1678
|
+
messages:
|
|
1679
|
+
onStart: ''
|
|
1680
|
+
onSuccess: ''
|
|
1681
|
+
onFailure: 'Failed to get restore info'
|
|
1682
|
+
onEmpty: 'No restore information for this object (it is not archived)'
|
|
1683
|
+
arguments:
|
|
1684
|
+
- name: bucket
|
|
1685
|
+
type: positional
|
|
1686
|
+
required: true
|
|
1687
|
+
description: Name of the bucket, or a full path (t3://bucket/key)
|
|
1688
|
+
- name: key
|
|
1689
|
+
type: positional
|
|
1690
|
+
description: Key of the object (omit if bucket contains the full path)
|
|
1691
|
+
- name: version-id
|
|
1692
|
+
description: Inspect a specific object version (requires bucket versioning). Omit to read the current version
|
|
1693
|
+
- name: format
|
|
1694
|
+
description: Output format
|
|
1695
|
+
options: [json, table, xml]
|
|
1696
|
+
default: table
|
|
1566
1697
|
|
|
1567
1698
|
#########################
|
|
1568
1699
|
# Manage access keys
|
|
@@ -2099,3 +2230,78 @@ commands:
|
|
|
2099
2230
|
- name: force
|
|
2100
2231
|
type: flag
|
|
2101
2232
|
description: Skip confirmation prompts (alias for --yes)
|
|
2233
|
+
- name: teams
|
|
2234
|
+
description: Manage organization teams
|
|
2235
|
+
alias: t
|
|
2236
|
+
examples:
|
|
2237
|
+
- "tigris iam teams list"
|
|
2238
|
+
- "tigris iam teams create engineering --members user@example.com"
|
|
2239
|
+
- "tigris iam teams edit team_id --name platform"
|
|
2240
|
+
commands:
|
|
2241
|
+
- name: list
|
|
2242
|
+
description: List all teams in the organization
|
|
2243
|
+
alias: l
|
|
2244
|
+
examples:
|
|
2245
|
+
- "tigris iam teams list"
|
|
2246
|
+
- "tigris iam teams list --format json"
|
|
2247
|
+
messages:
|
|
2248
|
+
onStart: ''
|
|
2249
|
+
onSuccess: ''
|
|
2250
|
+
onFailure: 'Failed to list teams'
|
|
2251
|
+
onEmpty: 'No teams found in this organization'
|
|
2252
|
+
arguments:
|
|
2253
|
+
- name: format
|
|
2254
|
+
description: Output format
|
|
2255
|
+
options: [json, table, xml]
|
|
2256
|
+
default: table
|
|
2257
|
+
- name: create
|
|
2258
|
+
description: Create a new team in the organization
|
|
2259
|
+
alias: c
|
|
2260
|
+
examples:
|
|
2261
|
+
- "tigris iam teams create engineering"
|
|
2262
|
+
- "tigris iam teams create engineering --description 'Engineering team'"
|
|
2263
|
+
- "tigris iam teams create engineering --members a@example.com,b@example.com"
|
|
2264
|
+
messages:
|
|
2265
|
+
onStart: 'Creating team...'
|
|
2266
|
+
onSuccess: "Team '{{name}}' created"
|
|
2267
|
+
onFailure: 'Failed to create team'
|
|
2268
|
+
arguments:
|
|
2269
|
+
- name: name
|
|
2270
|
+
description: Name of the team
|
|
2271
|
+
type: positional
|
|
2272
|
+
required: true
|
|
2273
|
+
examples:
|
|
2274
|
+
- engineering
|
|
2275
|
+
- name: description
|
|
2276
|
+
description: Description for the team
|
|
2277
|
+
alias: d
|
|
2278
|
+
- name: members
|
|
2279
|
+
description: Member email address(es) to add (comma-separated for multiple)
|
|
2280
|
+
alias: m
|
|
2281
|
+
multiple: true
|
|
2282
|
+
- name: edit
|
|
2283
|
+
description: Update a team's name, description, or members. Members are replaced with the provided list
|
|
2284
|
+
alias: e
|
|
2285
|
+
examples:
|
|
2286
|
+
- "tigris iam teams edit team_id --name platform"
|
|
2287
|
+
- "tigris iam teams edit team_id --description 'Platform team'"
|
|
2288
|
+
- "tigris iam teams edit team_id --members a@example.com,b@example.com"
|
|
2289
|
+
messages:
|
|
2290
|
+
onStart: 'Updating team...'
|
|
2291
|
+
onSuccess: "Team updated"
|
|
2292
|
+
onFailure: 'Failed to update team'
|
|
2293
|
+
arguments:
|
|
2294
|
+
- name: id
|
|
2295
|
+
description: ID of the team to edit
|
|
2296
|
+
type: positional
|
|
2297
|
+
required: true
|
|
2298
|
+
- name: name
|
|
2299
|
+
description: New name for the team
|
|
2300
|
+
alias: n
|
|
2301
|
+
- name: description
|
|
2302
|
+
description: New description for the team
|
|
2303
|
+
alias: d
|
|
2304
|
+
- name: members
|
|
2305
|
+
description: Replace the team's members with these email address(es) (comma-separated for multiple)
|
|
2306
|
+
alias: m
|
|
2307
|
+
multiple: true
|
|
@@ -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-NOD4ZVXO.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": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Command line interface for Tigris object storage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -42,8 +42,10 @@
|
|
|
42
42
|
"dev:binary": "npm run generate:registry && tsc --noEmit --watch --preserveWatchOutput -p tsconfig.binary.json & bun build src/cli-binary.ts --compile --watch --outfile=bin/tigris",
|
|
43
43
|
"prepublishOnly": "npm run build",
|
|
44
44
|
"clean": "rm -rf dist",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"prepare": "husky install",
|
|
46
|
+
"changeset": "changeset",
|
|
47
|
+
"version-packages": "changeset version",
|
|
48
|
+
"release": "changeset publish"
|
|
47
49
|
},
|
|
48
50
|
"keywords": [
|
|
49
51
|
"cli",
|
|
@@ -58,52 +60,11 @@
|
|
|
58
60
|
"url": "git+https://github.com/tigrisdata/cli.git"
|
|
59
61
|
},
|
|
60
62
|
"license": "MIT",
|
|
61
|
-
"commitlint": {
|
|
62
|
-
"extends": [
|
|
63
|
-
"@commitlint/config-conventional"
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
"release": {
|
|
67
|
-
"branches": [
|
|
68
|
-
"release",
|
|
69
|
-
{
|
|
70
|
-
"name": "main",
|
|
71
|
-
"prerelease": "beta",
|
|
72
|
-
"channel": "beta"
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"plugins": [
|
|
76
|
-
[
|
|
77
|
-
"@semantic-release/commit-analyzer",
|
|
78
|
-
{
|
|
79
|
-
"preset": "conventionalcommits",
|
|
80
|
-
"releaseRules": [
|
|
81
|
-
{
|
|
82
|
-
"breaking": true,
|
|
83
|
-
"release": "major"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"type": "refactor",
|
|
87
|
-
"release": "patch"
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
[
|
|
93
|
-
"@semantic-release/release-notes-generator",
|
|
94
|
-
{
|
|
95
|
-
"preset": "conventionalcommits"
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
"@semantic-release/github",
|
|
99
|
-
"@semantic-release/npm"
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
63
|
"dependencies": {
|
|
103
64
|
"@aws-sdk/credential-providers": "^3.1038.0",
|
|
104
65
|
"@smithy/shared-ini-file-loader": "^4.4.9",
|
|
105
|
-
"@tigrisdata/iam": "^2.
|
|
106
|
-
"@tigrisdata/storage": "^3.
|
|
66
|
+
"@tigrisdata/iam": "^2.2.0",
|
|
67
|
+
"@tigrisdata/storage": "^3.17.0",
|
|
107
68
|
"commander": "^14.0.3",
|
|
108
69
|
"enquirer": "^2.4.1",
|
|
109
70
|
"jose": "^6.2.3",
|
|
@@ -111,18 +72,16 @@
|
|
|
111
72
|
"yaml": "^2.8.3"
|
|
112
73
|
},
|
|
113
74
|
"devDependencies": {
|
|
114
|
-
"@
|
|
115
|
-
"@
|
|
75
|
+
"@changesets/changelog-github": "^0.7.0",
|
|
76
|
+
"@changesets/cli": "^2.31.0",
|
|
116
77
|
"@eslint/js": "^10.0.1",
|
|
117
78
|
"@types/node": "^22.19.11",
|
|
118
|
-
"conventional-changelog-conventionalcommits": "^9.3.1",
|
|
119
79
|
"dotenv": "^17.4.2",
|
|
120
80
|
"eslint": "^10.2.1",
|
|
121
81
|
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
122
82
|
"husky": "^9.1.7",
|
|
123
83
|
"prettier": "^3.8.3",
|
|
124
84
|
"publint": "^0.3.18",
|
|
125
|
-
"semantic-release": "^25.0.3",
|
|
126
85
|
"tsup": "^8.5.1",
|
|
127
86
|
"tsx": "^4.21.0",
|
|
128
87
|
"typescript": "^5.9.3",
|
|
File without changes
|