@tigrisdata/cli 3.17.1 → 3.18.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 +573 -459
- package/SKILL.md +1 -1
- package/dist/auth/iam.js +1 -1
- package/dist/auth/provider.js +1 -1
- package/dist/browser/index.d.ts +2 -1
- package/dist/browser/index.js +488 -464
- package/dist/{chunk-M4JVQTPR.js → chunk-33VTJA5G.js} +1 -1
- package/dist/chunk-36RAXRXY.js +1 -0
- package/dist/chunk-55YC7L3R.js +8 -0
- package/dist/{chunk-PMFE4543.js → chunk-5R42YPIF.js} +1 -1
- package/dist/{chunk-EBZOJ2UO.js → chunk-BQPKRG5X.js} +1 -1
- package/dist/{chunk-EYLDWSKA.js → chunk-E52D2O5C.js} +1 -1
- package/dist/{chunk-OUSR4REZ.js → chunk-GREORRSJ.js} +1 -1
- package/dist/{chunk-RUJKMQPD.js → chunk-NEHPRANM.js} +1 -1
- package/dist/{chunk-VFFI5OXM.js → chunk-OK2INJKO.js} +1 -1
- package/dist/chunk-PYPHHAPF.js +4 -0
- package/dist/chunk-Q24ZEHJN.js +1 -0
- package/dist/chunk-QOOQVR7J.js +1 -0
- package/dist/chunk-SFXAZO6M.js +1 -0
- package/dist/{chunk-APVIWSSE.js → chunk-STUJSAPH.js} +1 -1
- package/dist/{chunk-MZ6PKN6C.js → chunk-TBJQJJ45.js} +1 -1
- package/dist/{chunk-H5EV2OLS.js → chunk-TBX42XAN.js} +1 -1
- package/dist/cli-core.js +3 -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/default-permissions.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/roles.js +1 -1
- package/dist/lib/access-keys/rotate.js +1 -1
- package/dist/lib/access-keys/set.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/purge.js +1 -1
- 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/buckets/share.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/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/purge.js +1 -1
- package/dist/lib/objects/put.js +1 -1
- package/dist/lib/objects/restore-deleted.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/delete.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/delete.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/telemetry/disable.js +1 -1
- package/dist/lib/telemetry/enable.js +1 -1
- package/dist/lib/telemetry/status.js +2 -2
- package/dist/lib/touch.js +1 -1
- package/dist/lib/update.js +1 -1
- package/dist/lib/usage.js +1 -1
- package/dist/lib/whoami.js +1 -1
- package/dist/specs.yaml +323 -299
- package/dist/utils/analytics.js +1 -1
- package/dist/utils/bucket-info.js +1 -1
- package/dist/utils/exit.js +1 -1
- package/dist/utils/telemetry-sender.js +1 -0
- package/dist/utils/telemetry.js +1 -1
- package/dist/utils/update-check.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-27XCIHXN.js +0 -1
- package/dist/chunk-IAAJ66FY.js +0 -1
- package/dist/chunk-P76USEKI.js +0 -4
- package/dist/chunk-UURDKGI7.js +0 -3
- package/dist/chunk-WJWKFYJJ.js +0 -1
- package/dist/chunk-YEO7OHQF.js +0 -7
- /package/dist/{chunk-HQ4JNO3D.js → chunk-ILMD5XON.js} +0 -0
package/dist/utils/analytics.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-55YC7L3R.js";import"../chunk-APJUJ6TW.js";import"../chunk-BMWWPXMU.js";import"../chunk-DV3LCXRH.js";import"../chunk-QPUL2AAI.js";import"../chunk-36RAXRXY.js";import"../chunk-SFXAZO6M.js";import"../chunk-G4OJTPSI.js";export{g as commandHandlesSigint,c as decodeTokenEmail,d as errorCodeOf,h as finishCommand,j as identifyOnLogin,a as isCI,f as recordCommandError,i as resetCommandTrackingForTesting,e as trackCommand,b as usedFlags};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-STUJSAPH.js";import"../chunk-N3Y6RFSK.js";import"../chunk-S77OAN6Y.js";import"../chunk-Q4FK2FUN.js";export{c as buildBucketInfo,b as describeExpiration,a as describeTransition};
|
package/dist/utils/exit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-PYPHHAPF.js";import"../chunk-QOOQVR7J.js";import"../chunk-D7WXNA2O.js";import"../chunk-NI4EYBQH.js";import"../chunk-55YC7L3R.js";import"../chunk-APJUJ6TW.js";import"../chunk-BMWWPXMU.js";import"../chunk-DV3LCXRH.js";import"../chunk-QPUL2AAI.js";import"../chunk-36RAXRXY.js";import"../chunk-SFXAZO6M.js";import"../chunk-G4OJTPSI.js";export{a as exitWithError,b as failWithError,c as getSuccessNextActions,d as printNextActions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"../chunk-36RAXRXY.js";import"../chunk-G4OJTPSI.js";export{b as PAYLOAD_FILE_PREFIX,a as TELEMETRY_SEND_COMMAND,f as post,c as queueTelemetry,h as resetTelemetryQueueForTesting,g as runTelemetrySender,d as sendQueuedTelemetry,e as senderCommand};
|
package/dist/utils/telemetry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j}from"../chunk-
|
|
1
|
+
import{a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k}from"../chunk-QOOQVR7J.js";import"../chunk-APJUJ6TW.js";import{a,b}from"../chunk-BMWWPXMU.js";import"../chunk-QPUL2AAI.js";import"../chunk-36RAXRXY.js";import"../chunk-SFXAZO6M.js";import"../chunk-G4OJTPSI.js";export{f as DATA_COLLECTION,d as DISABLED_INTEGRATIONS,h as beforeSend,j as captureError,k as flushTelemetry,i as initTelemetry,c as invocationCommand,g as makeQueuedTransport,a as redactSecrets,b as scrubArgv,e as selectIntegrations};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-5R42YPIF.js";import"../chunk-QPUL2AAI.js";import"../chunk-SFXAZO6M.js";import"../chunk-G4OJTPSI.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.18.0",
|
|
4
4
|
"description": "Command line interface for Tigris object storage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"open": "^11.0.0",
|
|
58
58
|
"yaml": "^2.8.3",
|
|
59
59
|
"@tigrisdata/iam": "^2.8.0",
|
|
60
|
-
"@tigrisdata/storage": "^3.
|
|
60
|
+
"@tigrisdata/storage": "^3.24.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"buffer": "^6.0.3",
|
package/dist/chunk-27XCIHXN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as y}from"./chunk-APJUJ6TW.js";import{a as f}from"./chunk-WJWKFYJJ.js";import{a as m,b as g}from"./chunk-BMWWPXMU.js";import{i as p}from"./chunk-QPUL2AAI.js";var T=new Set(["general","network"]),E=!1,n="off",s,h,c=[],v=20;function x(){return process.env.TIGRIS_SENTRY_DSN?.trim()||p}var C=process.env.TIGRIS_ENV==="development"?"development":"production";function b(e){let t=e[0];return t&&!t.startsWith("-")?t:void 0}var N=new Set(["OnUncaughtException","OnUnhandledRejection","LocalVariables","LocalVariablesAsync","Console","ChildProcess"]);function R(e){return e.filter(t=>!N.has(t.name))}var A={userInfo:!1,cookies:!1,httpHeaders:!1,httpBodies:[],urlQueryParams:!1,graphQL:{document:!1,variables:!1},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,queues:!1,stackFrameVariables:!1};function l(e){if(typeof e=="string")return m(e);if(Array.isArray(e))return e.map(l);if(e!==null&&typeof e=="object"){let t=e;for(let r of Object.keys(t))t[r]=l(t[r]);return t}return e}function I(e){return e.server_name=void 0,l(e)}function j(){if(E)return;E=!0;let e=x();!e||y()||(n="loading",h=import("@sentry/node").then(t=>O(t,e)).catch(()=>{n="failed",c.length=0}))}function O(e,t){e.init({dsn:t,release:`@tigrisdata/cli@${f}`,environment:C,tracesSampleRate:0,dataCollection:A,integrations:R,beforeSend:I}),e.setContext("cli",{version:f,node:process.version,platform:process.platform,arch:process.arch});let r=process.argv.slice(2);e.setContext("invocation",{command:g(r).join(" ")});let o=b(r);o&&e.setTag("command",o),s=e,n="on";for(let a of c.splice(0))a(e)}function M(e,t={}){if(n==="off"||n==="failed")return;let{category:r,command:o,crash:a,exitCode:d}=t;if(!a&&r&&!T.has(r))return;let u=S=>{try{S.captureException(e,i=>(i.setTag("crash",a===!0),r&&i.setTag("error.category",r),o&&i.setTag("command",o),d!==void 0&&i.setTag("exit_code",d),i))}catch{}};s?u(s):c.length<v&&c.push(u)}async function P(e=2e3){if(!(n==="off"||n==="failed"))try{await h,s&&await s.flush(e)}catch{}}export{b as a,N as b,R as c,A as d,I as e,j as f,M as g,P as h};
|
package/dist/chunk-IAAJ66FY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as l}from"./chunk-PMFE4543.js";import{a as m,i as s}from"./chunk-UURDKGI7.js";import{b as i}from"./chunk-NI4EYBQH.js";import{a as t}from"./chunk-WJWKFYJJ.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=i(),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:t,loadModule:b,hasImplementation:y});x.parse();l();
|
package/dist/chunk-P76USEKI.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{g as m}from"./chunk-27XCIHXN.js";import{a as r,d as a}from"./chunk-D7WXNA2O.js";import{c}from"./chunk-NI4EYBQH.js";import{b as i}from"./chunk-DV3LCXRH.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
|
-
Error: ${e.message}`),g()&&e.nextActions.length>0){console.error(`
|
|
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
|
-
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};
|
package/dist/chunk-UURDKGI7.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{e as b}from"./chunk-YEO7OHQF.js";import{a as _}from"./chunk-P76USEKI.js";import{f as S,g as I,h as R}from"./chunk-27XCIHXN.js";import{h as A}from"./chunk-D7WXNA2O.js";import{b as E}from"./chunk-DV3LCXRH.js";import{a as L,b as H,c as x,d as g,e as h,f as j}from"./chunk-ABDWDZNK.js";import{Command as O,Option as N}from"commander";function y(e,o,n,t,r){let s=e[e.length-1],i=typeof s=="object"&&s!==null&&"args"in s?s.args:e.filter(l=>typeof l=="string");if(i.length===0)return i;let m=i[0],u=(o.commands??[]).filter(l=>v(l,[...n,l.name],r));if(!new Set(u.flatMap(l=>[l.name,...Array.isArray(l.alias)?l.alias:l.alias?[l.alias]:[]])).has(m)){let l=u.map(p=>p.name),d=n.length>0?`'${m}' for '${n.join(" ")}'`:`'${m}'`;console.error(`Unknown command ${d}.`),l.length>0&&console.error(`Available commands: ${l.join(", ")}`);let f=n.length>0?`${t.name} ${n.join(" ")} help`:`${t.name} help`;console.error(`
|
|
2
|
-
Run "${f}" for usage.`),process.exit(1)}return i}function ee(){S();let e=!1,o=async t=>{e&&process.exit(1),e=!0,I(t,{crash:!0,exitCode:E(t).exitCode}),await R(),_(t,void 0,{skipCapture:!0})},n=()=>{console.error(`
|
|
3
|
-
Operation cancelled`),process.exit(1)};process.on("unhandledRejection",t=>{D(t)&&n(),o(t)}),process.on("uncaughtException",t=>{D(t)&&n(),o(t)})}function D(e){return e===""||e===void 0?!0:typeof e=="object"&&e!==null&&e.code==="ERR_USE_AFTER_CLOSE"}function z(e){return/^[a-zA-Z0-9_-]+$/.test(e)}function v(e,o,n){return e.removed||n(o)?!0:e.commands?e.commands.some(t=>v(t,[...o,t.name],n)):!1}function W(e,o){let n=o?` Use ${o} instead.`:" See the changelog for migration guidance.";console.error(`${e} was removed in this version.${n}`),process.exit(1)}function G(e,o){if(e)for(let n of e){if(!n.removed)continue;C(o,n.name,e)!==void 0&&W(`--${n.name}`,n.replaced_by)}}function T(e,o){let n=o??[],t=new Set(n.map(i=>i.name)),r=new Set(n.filter(i=>i.alias).map(i=>i.alias)),s=e.filter(i=>!t.has(i.name)&&!(i.alias&&r.has(i.alias)));return[...n,...s]}function $(e){let o=e.alias&&typeof e.alias=="string"&&e.alias.length===1,n=e.alias&&typeof e.alias=="string"&&e.alias.length>1,t=o?`-${e.alias}, --${e.name}`:n?`--${e.alias}, --${e.name}`:`--${e.name}`;return e.type==="flag"?t:e.type==="boolean"?`${t} [value]`:e.options?`${t} <value>`:e.required||e["required-when"]?`${t} <value>`:`${t} [value]`}function q(e,o=[],n=[]){let t=s=>n.findIndex(i=>i.name===s.name);[...o.filter(s=>t(s)===-1),...o.filter(s=>t(s)!==-1).sort((s,i)=>t(s)-t(i))].forEach(s=>{if(s.type==="positional"){let i=s.required?`<${s.name}>`:`[${s.name}]`;e.argument(i,h(s))}else s.removed||s.hidden?e.addOption(new N($(s),s.description??"").hideHelp()):(n.length>0&&e.optionsGroup(t(s)===-1?L:H),e.option($(s),h(s),s.default))})}function K(e){return e.replace(/-([a-z])/g,(o,n)=>n.toUpperCase())}function C(e,o,n){if(n){let r=n.find(s=>s.name===o);if(r?.alias&&typeof r.alias=="string"){let s=r.alias.charAt(0).toUpperCase()+r.alias.slice(1);if(e[s]!==void 0)return e[s]}}let t=[o,o.replace(/-/g,""),o.replace(/-/g,"").toLowerCase(),o.charAt(0).toUpperCase(),K(o)];for(let r of t)if(e[r]!==void 0)return e[r]}function U(e,o){for(let n of e){if(n["required-when"]){let[t,r]=n["required-when"].split("="),s=C(o,t,e),i=C(o,n.name,e);if(s===r&&!i)return console.error(`--${n.name} is required when --${t} is ${r}`),!1}if(n.required&&!C(o,n.name,e))return console.error(`--${n.name} is required`),n.description&&console.error(` ${n.description}`),!1}return!0}function M(e,o,n){let t;"optsWithGlobals"in n&&typeof n.optsWithGlobals=="function"?t=n.optsWithGlobals():"opts"in n&&typeof n.opts=="function"?t=n.opts():t=n;let r={...t};return e.filter(i=>i.type==="positional").forEach((i,m)=>{o[m]!==void 0&&(i.multiple?r[i.name]=o[m].split(",").map(a=>a.trim()):r[i.name]=o[m])}),e.forEach(i=>{i.multiple&&i.type!=="positional"&&r[i.name]&&typeof r[i.name]=="string"&&(r[i.name]=r[i.name].split(",").map(m=>m.trim()))}),r}async function V(e,o,n=[],t={}){(t.json||t.format==="json")&&(globalThis.__TIGRIS_JSON_MODE=!0);let{module:r,error:s}=await e(o);(s||!r)&&(console.error(s),process.exit(1));let i=o[o.length-1],m=r.default||r[i];typeof m!="function"&&(console.error(`Command not implemented: ${o.join(" ")}`),process.exit(1)),b(o),await m({...t,_positional:n})}function F(e,o,n,t=[]){let{specs:r,loadModule:s,hasImplementation:i}=e,m=r.definitions?.global_arguments??[];for(let a of n){z(a.name)||(console.error(`Invalid command name "${a.name}": only alphanumeric, hyphens, and underscores allowed`),process.exit(1));let u=[...t,a.name];if(!v(a,u,i))continue;let c=o.command(a.name,a.removed?{hidden:!0}:void 0).description(a.description??"").summary(a.helpText??"");if(a.group&&c.helpGroup(g(a.group)),x(c,{examples:a.examples,groups:a.groups,defaultCommand:a.default}),a.alias&&(Array.isArray(a.alias)?a.alias:[a.alias]).forEach(d=>{c.alias(d)}),a.removed){c.allowUnknownOption(!0),c.allowExcessArguments(!0),c.action(()=>{W(`${r.name} ${u.join(" ")}`,a.replaced_by)});continue}if(a.commands&&a.commands.length>0)if(F(e,c,a.commands,u),a.default){let l=a.commands.find(d=>d.name===a.default);if(l){let d=T(m,[...a.arguments||[],...l.arguments||[]]);q(c,d,m),c.allowExcessArguments(!0),c.action(async(...f)=>{let p=f.pop(),k=y([p],a,u,r,i),w=M(d,k,p);d.length>0&&!U(d,w)&&process.exit(1),G(d,w),l.deprecated&&l.messages?.onDeprecated&&A(l.messages.onDeprecated),await V(s,[...u,l.name],k,w)})}}else c.allowExcessArguments(!0),c.action((...l)=>{y(l,a,u,r,i),c.outputHelp()});else q(c,T(m,a.arguments),m),c.action(async(...l)=>{let d=l.pop(),f=l,p=M(a.arguments||[],f,d);a.arguments&&!U(a.arguments,p)&&process.exit(1),G(a.arguments,p),a.deprecated&&a.messages?.onDeprecated&&A(a.messages.onDeprecated),await V(s,u,f,p)});c.command("help",{hidden:!0}).action(()=>{c.outputHelp()})}}function ne(e){let{specs:o,version:n,hasImplementation:t}=e,r=new O;r.name(o.name).description(o.description).version(n,"-V, --version","Show the CLI version").helpOption("-h, --help","Show help").configureHelp(j),F(e,r,o.commands);let s=(o.definitions?.global_arguments??[]).filter(u=>!u.removed).map(u=>new N($(u),h(u)));x(r,{groups:o.groups,globalOptions:s});let i=o.groups?.[o.groups.length-1],m=r.command("help").description("Show general help").action(()=>{r.outputHelp()}),a=r.command("version").description("Show the CLI version").action(()=>{console.log(n)});return i&&(m.helpGroup(g(i)),a.helpGroup(g(i))),r.allowExcessArguments(!0),r.action((...u)=>{y(u,{commands:o.commands},[],o,t),r.outputHelp()}),r}export{ee as a,D as b,z as c,v as d,q as e,U as f,M as g,F as h,ne as i};
|
package/dist/chunk-WJWKFYJJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s="3.17.1";export{s as a};
|
package/dist/chunk-YEO7OHQF.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as p,b as a}from"./chunk-G4OJTPSI.js";import{e as c,f as I,h as _,i as g}from"./chunk-APJUJ6TW.js";import{a as r}from"./chunk-WJWKFYJJ.js";import{b as f}from"./chunk-BMWWPXMU.js";import{j as l,k as m}from"./chunk-QPUL2AAI.js";import{request as O}from"http";import{request as v}from"https";var E="/i/v0/e/",N=1e3;function y(){return process.env.TIGRIS_POSTHOG_KEY?.trim()||l}function R(){return process.env.TIGRIS_POSTHOG_HOST?.trim()||m}var C=["CI","CONTINUOUS_INTEGRATION","BUILD_NUMBER","GITHUB_ACTIONS","GITLAB_CI","CIRCLECI","TRAVIS","JENKINS_URL","BUILDKITE","TEAMCITY_VERSION","TF_BUILD"];function w(){return C.some(e=>{let t=process.env[e];return t!==void 0&&t!==""&&t!=="0"&&t.toLowerCase()!=="false"})}var k=/^[a-z0-9][a-z0-9-]*$/i;function M(e){let t=new Set;for(let o of e){if(o==="--")break;if(!o.startsWith("-")||o==="-")continue;let n=o.split("=")[0].replace(/^--?/,"");k.test(n)&&t.add(n)}return[...t].sort()}function b(e){try{let t=e.split(".")[1];if(!t)return;let n=JSON.parse(Buffer.from(t,"base64url").toString("utf8"))?.email;return typeof n=="string"&&n.length>0?n:void 0}catch{return}}async function h(){let e=I(),t={distinctId:e,anonymousId:e,isIdentified:!1,authMethod:"none"};try{let o=await import("./auth/storage.js"),n=await o.getTokens(),i=n?.idToken?b(n.idToken):void 0;return{distinctId:i??e,anonymousId:e,isIdentified:i!==void 0,authMethod:o.getLoginMethod()??"none",organizationId:o.getSelectedOrganization()??void 0}}catch{return t}}function T(){return{$lib:"tigris-cli",$lib_version:r,interface:"cli",cli_version:r,runtime:p()?"binary":"node",install_method:a(),node_version:process.version,os:process.platform,arch:process.arch,is_ci:w(),is_tty:process.stdout.isTTY===!0}}function S(e){return new Promise(t=>{let o=!1,n=()=>{o||(o=!0,t())};try{let i=new URL(E,R()),u=JSON.stringify(e),s=(i.protocol==="http:"?O:v)({protocol:i.protocol,hostname:i.hostname,port:i.port||void 0,path:i.pathname,method:"POST",timeout:N,headers:{"content-type":"application/json","content-length":Buffer.byteLength(u),"user-agent":`tigris-cli/${r}`}},d=>{d.resume(),d.on("end",n),d.on("error",n)});s.on("error",n),s.on("timeout",()=>{s.destroy(),n()}),s.end(u)}catch{n()}})}var L=`
|
|
2
|
-
Tigris CLI collects usage analytics (which commands you run and their
|
|
3
|
-
arguments, CLI version, OS) and error reports, to help us decide what to
|
|
4
|
-
improve. Credentials \u2014 access keys, secrets, tokens \u2014 are never collected.
|
|
5
|
-
|
|
6
|
-
Opt out any time: tigris telemetry disable (or set TIGRIS_NO_TELEMETRY=1)
|
|
7
|
-
`,A=new Set(["telemetry"]);function G(){c()||process.stderr.isTTY!==!0||globalThis.__TIGRIS_JSON_MODE===!0||_()&&(console.error(L),g())}async function U(e){try{let t=y();if(!t||c())return;let o=await h(),n=process.argv.slice(2);await S({api_key:t,event:"cli_command",distinct_id:o.distinctId,properties:{...T(),command:e.join(" "),command_root:e[0],command_args:f(n).join(" "),flags:M(n),auth_method:o.authMethod,json_mode:globalThis.__TIGRIS_JSON_MODE===!0,$set:{cli_version:r,cli_install_method:a(),cli_last_os:process.platform},...o.organizationId?{$groups:{company:o.organizationId}}:{}}})}catch{}}function x(e){A.has(e[0])||(G(),U(e))}async function Y(){try{let e=y();if(!e||c())return;let t=await h();if(!t.isIdentified)return;await S({api_key:e,event:"$identify",distinct_id:t.distinctId,properties:{...T(),$anon_distinct_id:t.anonymousId,$set:{email:t.distinctId,cli_version:r,cli_install_method:a()},...t.organizationId?{$groups:{company:t.organizationId}}:{}}})}catch{}}export{w as a,M as b,b as c,U as d,x as e,Y as f};
|
|
File without changes
|