@tigrisdata/cli 2.14.0-beta.3 → 2.14.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/client.js +1 -1
- package/dist/auth/fly.js +1 -1
- package/dist/auth/iam.js +1 -1
- package/dist/auth/provider.js +1 -1
- package/dist/auth/storage.js +1 -1
- package/dist/{chunk-DZUJWPQ3.js → chunk-2TUK4VV7.js} +1 -1
- package/dist/{chunk-7J6WK54T.js → chunk-7PCH53K3.js} +1 -1
- package/dist/{chunk-RG5EZWTN.js → chunk-B6LV7VDX.js} +1 -1
- package/dist/chunk-DKOYMAUH.js +4 -0
- package/dist/chunk-HJOPATGG.js +5 -0
- package/dist/chunk-JQUG732D.js +1 -0
- package/dist/chunk-PUMT54I3.js +1 -0
- package/dist/chunk-QVVD27QP.js +4 -0
- package/dist/chunk-SC4VKJMX.js +1 -0
- package/dist/chunk-YVUHHGXO.js +2 -0
- 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/create.js +1 -1
- package/dist/lib/access-keys/delete.js +1 -1
- package/dist/lib/access-keys/get.js +1 -1
- package/dist/lib/access-keys/list.js +1 -1
- package/dist/lib/buckets/create.js +1 -1
- package/dist/lib/buckets/delete.js +1 -1
- package/dist/lib/buckets/get.js +1 -1
- package/dist/lib/buckets/list.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-transition.js +1 -1
- package/dist/lib/buckets/set-ttl.js +1 -1
- package/dist/lib/buckets/set.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/forks/create.js +1 -1
- package/dist/lib/forks/list.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/list.js +1 -1
- package/dist/lib/iam/users/invite.js +1 -1
- package/dist/lib/iam/users/list.js +2 -2
- package/dist/lib/iam/users/remove.js +1 -1
- package/dist/lib/iam/users/revoke-invitation.js +1 -1
- package/dist/lib/iam/users/update-role.js +1 -1
- package/dist/lib/login/credentials.js +1 -1
- package/dist/lib/login/oauth.js +1 -1
- package/dist/lib/login/select.js +1 -1
- package/dist/lib/logout.js +1 -1
- package/dist/lib/ls.js +1 -1
- package/dist/lib/mk.js +1 -1
- package/dist/lib/mv.js +1 -1
- package/dist/lib/objects/delete.js +1 -1
- package/dist/lib/objects/get.js +1 -1
- package/dist/lib/objects/info.js +1 -0
- package/dist/lib/objects/list.js +1 -1
- package/dist/lib/objects/put.js +1 -1
- package/dist/lib/objects/set.js +1 -1
- package/dist/lib/organizations/create.js +1 -4
- package/dist/lib/organizations/list.js +1 -1
- package/dist/lib/organizations/select.js +1 -1
- package/dist/lib/presign.js +3 -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 +2 -2
- package/dist/specs.yaml +52 -14
- package/dist/utils/path.js +1 -1
- package/dist/utils/update-check.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-3LHPCSFG.js +0 -4
- package/dist/chunk-52HSMT5H.js +0 -1
- package/dist/chunk-CLO5HM7B.js +0 -1
- package/dist/chunk-EULV7RV7.js +0 -5
- package/dist/chunk-NDNMIXDC.js +0 -1
- package/dist/chunk-RTJM32XN.js +0 -5
- package/dist/chunk-X3GRUJWS.js +0 -1
package/dist/chunk-CLO5HM7B.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as f}from"./chunk-ATBINUDP.js";import{loadSharedConfigFiles as S}from"@smithy/shared-ini-file-loader";import{execFileSync as v}from"child_process";import{chmodSync as I,existsSync as c,mkdirSync as A,readFileSync as _,writeFileSync as T}from"fs";import{homedir as u,platform as E}from"os";import{join as r}from"path";var s=r(u(),".tigris"),a=r(s,"config.json");function p(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function y(e,n){if(E()==="win32")try{let t=process.env.USERNAME;t&&v("icacls",[e,"/inheritance:r","/grant:r",`${t}:F`],{stdio:"ignore"})}catch{console.warn(`Warning: Could not set restrictive permissions on ${e}. It may be accessible to other users.`)}else try{I(e,n)}catch{console.warn(`Warning: Could not set restrictive permissions on ${e}. It may be accessible to other users.`)}}function h(){c(s)||(A(s,{recursive:!0,mode:448}),y(s,448))}function K(e){let n={version:2},t=e.credentials;return p(t)&&typeof t.accessKeyId=="string"&&typeof t.secretAccessKey=="string"&&typeof t.endpoint=="string"&&(n.credentials={saved:{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,endpoint:t.endpoint}}),n}function i(){if(!c(a))return{version:2};try{let e=_(a,"utf8"),n=JSON.parse(e);if(!p(n))return{version:2};if(n.version===2)return n;let t=K(n);return C(t),t}catch{return{version:2}}}function C(e){h(),T(a,JSON.stringify(e,null,2),{mode:384}),y(a,384)}async function o(e){C(e)}async function G(e){let n=i();n.oauth?n.oauth.tokens=e:n.oauth={tokens:e,organizations:[]},await o(n)}async function N(){return i().oauth?.tokens??null}async function D(){let e=i();e.oauth&&delete e.oauth.tokens,await o(e)}async function F(e){let n=i();n.oauth?n.oauth.organizations=e:n.oauth={organizations:e},await o(n)}function b(){return i().oauth?.organizations??[]}async function M(e){let n=i();if(n.activeMethod==="credentials"){let t=n.credentials?.temporary??n.credentials?.saved;t&&(t.organizationId=e)}else n.oauth||(n.oauth={organizations:[]}),n.oauth.selectedOrganization=e;await o(n)}function V(){let e=i();return e.activeMethod==="credentials"?(e.credentials?.temporary??e.credentials?.saved)?.organizationId??null:e.oauth?.selectedOrganization??null}function w(){if(process.env.TIGRIS_STORAGE_ACCESS_KEY_ID||process.env.TIGRIS_STORAGE_SECRET_ACCESS_KEY){let l=process.env.TIGRIS_STORAGE_ACCESS_KEY_ID,g=process.env.TIGRIS_STORAGE_SECRET_ACCESS_KEY;if(!l||!g)return null;let m=process.env.TIGRIS_STORAGE_ENDPOINT||f;return{accessKeyId:l,secretAccessKey:g,endpoint:m}}let e=process.env.AWS_ACCESS_KEY_ID,n=process.env.AWS_SECRET_ACCESS_KEY;if(!e||!n)return null;let t=process.env.AWS_ENDPOINT_URL_S3||f;return{accessKeyId:e,secretAccessKey:n,endpoint:t}}function L(){if(!process.env.AWS_PROFILE)return!1;let e=r(u(),".aws");return c(r(e,"credentials"))||c(r(e,"config"))}async function W(e){try{let{configFile:n}=await S(),t=n[e];return t?{endpoint:t.endpoint_url_s3||t.endpoint_url,iamEndpoint:t.endpoint_url_iam,region:t.region}:{}}catch{return{}}}function Y(){let e=i();return w()||d(e.credentials?.temporary)||d(e.credentials?.saved)||null}function j(){let e=i();return d(e.credentials?.temporary)||d(e.credentials?.saved)||null}async function U(e){let n=i();n.credentials||(n.credentials={}),n.credentials.saved={accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,endpoint:e.endpoint},await o(n)}async function $(e){let n=i();n.credentials||(n.credentials={}),n.credentials.temporary={accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,endpoint:e.endpoint},await o(n)}async function J(){let e=i();e.credentials&&delete e.credentials.saved,await o(e)}async function q(e){let n=i();n.activeMethod=e,await o(n)}function B(){return i().activeMethod??null}async function H(e){let n=i(),t=n.credentials?.temporary??n.credentials?.saved;t&&(t.organizationId=e,await o(n))}async function Q(){let n=i().credentials?.saved;await o({version:2,credentials:n?{saved:n}:void 0})}function d(e){return e?{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,endpoint:e.endpoint}:null}export{s as a,a as b,G as c,N as d,D as e,F as f,b as g,M as h,V as i,w as j,L as k,W as l,Y as m,j as n,U as o,$ as p,J as q,q as r,B as s,H as t,Q as u};
|
package/dist/chunk-EULV7RV7.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as m,d as y}from"./chunk-7J6WK54T.js";import{i as a,j as u,k as p,l as T,m as A,n as g,s as f}from"./chunk-CLO5HM7B.js";import{a as c,b as d,c as l}from"./chunk-ATBINUDP.js";import{fromIni as P}from"@aws-sdk/credential-providers";function _(){return process.env.TIGRIS_STORAGE_ENDPOINT||process.env.TIGRIS_IAM_ENDPOINT?{endpoint:process.env.TIGRIS_STORAGE_ENDPOINT||c,iamEndpoint:process.env.TIGRIS_IAM_ENDPOINT||d,mgmtEndpoint:process.env.TIGRIS_MGMT_ENDPOINT||l}:{endpoint:process.env.AWS_ENDPOINT_URL_S3||c,iamEndpoint:process.env.AWS_ENDPOINT_URL_IAM||d,mgmtEndpoint:process.env.AWS_ENDPOINT_URL_MGMT||l}}var o=_(),w=m(),E=!1;async function K(){if(E||!process.stdin.isTTY)return!1;E=!0,console.log(`Not authenticated. Starting login...
|
|
2
|
-
`);let{default:n}=await import("./lib/login/select.js");return await n({}),console.log(),!0}async function h(){return f()}async function N(n){if(p()){let e=process.env.AWS_PROFILE||"default",t=await T(e),I=await P({profile:e})();return{accessKeyId:I.accessKeyId,secretAccessKey:I.secretAccessKey,endpoint:t.endpoint||o.endpoint||c,iamEndpoint:t.iamEndpoint||o.iamEndpoint}}let i=await h();if(i==="oauth"){let e=y(),t=a();if(!t)throw new Error('No organization selected. Please run "tigris orgs select" first.');return{sessionToken:await e.getAccessToken(),accessKeyId:"",secretAccessKey:"",...n?.withCredentialProvider&&{credentialProvider:async()=>({accessKeyId:"",secretAccessKey:"",sessionToken:await e.getAccessToken(),expiration:new Date(Date.now()+600*1e3)})},endpoint:o.endpoint,organizationId:t,iamEndpoint:o.iamEndpoint,authDomain:w.domain}}if(i==="credentials"){let e=g();if(e){let t=a();return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,endpoint:e.endpoint,organizationId:t??void 0,iamEndpoint:o.iamEndpoint}}}let s=u();if(s)return{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,endpoint:s.endpoint};let r=g();if(r)return{accessKeyId:r.accessKeyId,secretAccessKey:r.secretAccessKey,endpoint:r.endpoint};if(await K())return N(n);throw new Error('Not authenticated. Please run "tigris login" or "tigris configure" first.')}async function v(){return p()||await h()!==null||u()!==null||g()!==null}async function M(){let n=await N(),i=a();return{...n,...i&&!n.organizationId?{organizationId:i}:{}}}function L(n){return f()==="oauth"?!1:(A()?console.log(`You are using access key credentials, which belong to a single organization.
|
|
3
|
-
${n} is only available with OAuth login.
|
|
4
|
-
|
|
5
|
-
Run "tigris login" to login with your Tigris account.`):console.log('Not authenticated. Please run "tigris login" to login with your Tigris account.'),!0)}export{_ as a,h as b,N as c,v as d,M as e,L as f};
|
package/dist/chunk-NDNMIXDC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{list as g}from"@tigrisdata/storage";var p=["t3://","tigris://"];function f(t){return p.some(e=>t.startsWith(e))}function c(t){let e=p.find(r=>t.startsWith(r));return s(t.slice(e.length))}function s(t){let e=t.split("/");return{bucket:e[0],path:e.slice(1).join("/")}}async function m(t,e,r){let{data:i}=await g({prefix:`${e}/`,limit:1,config:{...r,bucket:t}});return!!(i?.items&&i.items.length>0)}function d(t,e){return{source:s(t),destination:s(e)}}function l(t){return f(t)?c(t):s(t)}function P(t){let e=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*");return new RegExp("^"+e+"$")}function x(t){let e=t.indexOf("*"),r=t.lastIndexOf("/",e);return r>=0?t.slice(0,r+1):""}async function h(t,e,r){let i=[],o;do{let{data:n,error:a}=await g({prefix:e,paginationToken:o,config:{...r,bucket:t}});if(a)return{items:i,error:a};n?.items&&i.push(...n.items),o=n?.hasMore?n.paginationToken:void 0}while(o);return{items:i}}export{f as a,c as b,s as c,m as d,d as e,l as f,P as g,x as h,h as i};
|
package/dist/chunk-RTJM32XN.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as g,b as c}from"./chunk-EULV7RV7.js";import{b as n}from"./chunk-3FMWZQ3C.js";import{a as f}from"./chunk-52HSMT5H.js";import{d as r}from"./chunk-7J6WK54T.js";import{i as a,m as d}from"./chunk-CLO5HM7B.js";function C(){let t=a();return f(t??void 0)?(console.log(`User management is not available for Fly.io organizations.
|
|
2
|
-
Your users are managed through Fly.io.
|
|
3
|
-
|
|
4
|
-
Visit https://fly.io to manage your organization members.`),!0):!1}async function M(t){await c()!=="oauth"&&n(t,`This operation requires OAuth login.
|
|
5
|
-
Run "tigris login oauth" first.`);let i=r();await i.isAuthenticated()||n(t,'Not authenticated. Run "tigris login oauth" first.');let o=await i.getAccessToken(),e=a(),{iamEndpoint:s,mgmtEndpoint:l}=g();return{sessionToken:o,organizationId:e??void 0,iamEndpoint:s,mgmtEndpoint:l}}async function z(t){let u=await c(),i=g(),o=a();if(u==="oauth"){let s=r();return await s.isAuthenticated()||n(t,'Not authenticated. Run "tigris login oauth" first.'),{sessionToken:await s.getAccessToken(),organizationId:o??void 0,iamEndpoint:i.iamEndpoint}}let e=d();return e||n(t,'Not authenticated. Run "tigris login" or "tigris configure" first.'),{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,organizationId:o??void 0,iamEndpoint:i.iamEndpoint}}export{C as a,M as b,z as c};
|
package/dist/chunk-X3GRUJWS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-S77OAN6Y.js";import{a as S}from"./chunk-EULV7RV7.js";import{b as K}from"./chunk-AHGPPFCQ.js";import{b as d,d as m}from"./chunk-3FMWZQ3C.js";import{b as i,c as n,i as o}from"./chunk-5VDFQRGP.js";import{n as f,p as y,r as p,t as u}from"./chunk-CLO5HM7B.js";import{a as g}from"./chunk-ATBINUDP.js";import C from"enquirer";import{whoami as h}from"@tigrisdata/iam";var{prompt:I}=C,a=o("login","credentials");async function k(e){i(a);let w=K(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 c=[];s||c.push({type:"input",name:"accessKey",message:"Access Key ID:",required:!0}),r||c.push({type:"password",name:"accessSecret",message:"Secret Access Key:",required:!0}),l("Provide --access-key and --access-secret");let t=await I(c);s=s||t.accessKey,r=r||t.accessSecret}(!s||!r)&&d(a,"Access key and secret are required");let A=f()?.endpoint||g;await y({accessKeyId:s,secretAccessKey:r,endpoint:A}),await p("credentials");try{let c=S(),{data:t}=await h({config:{accessKeyId:s,secretAccessKey:r,iamEndpoint:c.iamEndpoint}});t?.organizationId&&await u(t.organizationId)}catch{}w==="json"&&console.log(JSON.stringify({action:"logged_in"})),n(a),m(a)}export{k as a};
|