@tigrisdata/cli 2.12.1 → 2.12.2

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.
@@ -1,4 +1,4 @@
1
- import{d as m,e as d,f}from"./chunk-2XAO2OYD.js";import{readFileSync as T,writeFileSync as I,mkdirSync as N}from"fs";import{join as g}from"path";import{homedir as h}from"os";import k from"https";var u="2.12.1";var b=g(h(),".tigris","update-check.json");function y(){try{let e=T(b,"utf-8"),i=JSON.parse(e);return typeof i.latestVersion=="string"&&typeof i.lastChecked=="number"?i:null}catch{return null}}function v(e){try{N(g(h(),".tigris"),{recursive:!0}),I(b,JSON.stringify(e),"utf-8")}catch{}}function j(e,i){let a=o=>{let r=o.startsWith("v")?o.slice(1):o,c=null,l=r.indexOf("-");l!==-1&&(c=r.slice(l+1),r=r.slice(0,l));let p=r.split(".");if(p.length!==3)return null;let n=p.map(Number);return n.some(isNaN)?null:{major:n[0],minor:n[1],patch:n[2],prerelease:c}},t=a(e),s=a(i);return!t||!s?!1:s.major>t.major?!0:s.major<t.major?!1:s.minor>t.minor?!0:s.minor<t.minor?!1:s.patch>t.patch?!0:s.patch<t.patch?!1:t.prerelease&&!s.prerelease?!0:(!t.prerelease&&s.prerelease,!1)}function x(){try{let e=k.get(m,{timeout:5e3},i=>{let a="";i.on("data",t=>{a+=t}),i.on("end",()=>{try{let t=JSON.parse(a);if(typeof t.version=="string"){let s=y();v({...s,latestVersion:t.version,lastChecked:Date.now()})}}catch{}})});e.on("error",()=>{}),e.on("timeout",()=>{e.destroy()}),e.end(),e.on("socket",i=>{i.unref()})}catch{}}function V(){if(process.env.TIGRIS_NO_UPDATE_CHECK==="1"||!process.stdout.isTTY)return;let e=y(),i=Number(process.env.TIGRIS_UPDATE_NOTIFY_INTERVAL_MS)||216e5;if(e&&j(u,e.latestVersion)&&(!e.lastNotified||Date.now()-e.lastNotified>i)){let t=globalThis.__TIGRIS_BINARY===!0,s=process.platform==="win32",o=`Update available: ${u} \u2192 ${e.latestVersion}`,r;t?s?r="Run `irm https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.ps1 | iex`":r="Run `curl -fsSL https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.sh | sh`":r="Run `npm install -g @tigrisdata/cli` to upgrade.";let c=Math.max(o.length,r.length)+4,l="\u250C"+"\u2500".repeat(c-2)+"\u2510",p="\u2514"+"\u2500".repeat(c-2)+"\u2518",n=_=>"\u2502 "+_.padEnd(c-4)+" \u2502";console.log(`
1
+ import{d as m,e as d,f}from"./chunk-2XAO2OYD.js";import{readFileSync as T,writeFileSync as I,mkdirSync as N}from"fs";import{join as g}from"path";import{homedir as h}from"os";import k from"https";var u="2.12.2";var b=g(h(),".tigris","update-check.json");function y(){try{let e=T(b,"utf-8"),i=JSON.parse(e);return typeof i.latestVersion=="string"&&typeof i.lastChecked=="number"?i:null}catch{return null}}function v(e){try{N(g(h(),".tigris"),{recursive:!0}),I(b,JSON.stringify(e),"utf-8")}catch{}}function j(e,i){let a=o=>{let r=o.startsWith("v")?o.slice(1):o,c=null,l=r.indexOf("-");l!==-1&&(c=r.slice(l+1),r=r.slice(0,l));let p=r.split(".");if(p.length!==3)return null;let n=p.map(Number);return n.some(isNaN)?null:{major:n[0],minor:n[1],patch:n[2],prerelease:c}},t=a(e),s=a(i);return!t||!s?!1:s.major>t.major?!0:s.major<t.major?!1:s.minor>t.minor?!0:s.minor<t.minor?!1:s.patch>t.patch?!0:s.patch<t.patch?!1:t.prerelease&&!s.prerelease?!0:(!t.prerelease&&s.prerelease,!1)}function x(){try{let e=k.get(m,{timeout:5e3},i=>{let a="";i.on("data",t=>{a+=t}),i.on("end",()=>{try{let t=JSON.parse(a);if(typeof t.version=="string"){let s=y();v({...s,latestVersion:t.version,lastChecked:Date.now()})}}catch{}})});e.on("error",()=>{}),e.on("timeout",()=>{e.destroy()}),e.end(),e.on("socket",i=>{i.unref()})}catch{}}function V(){if(process.env.TIGRIS_NO_UPDATE_CHECK==="1"||!process.stdout.isTTY)return;let e=y(),i=Number(process.env.TIGRIS_UPDATE_NOTIFY_INTERVAL_MS)||216e5;if(e&&j(u,e.latestVersion)&&(!e.lastNotified||Date.now()-e.lastNotified>i)){let t=globalThis.__TIGRIS_BINARY===!0,s=process.platform==="win32",o=`Update available: ${u} \u2192 ${e.latestVersion}`,r;t?s?r="Run `irm https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.ps1 | iex`":r="Run `curl -fsSL https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.sh | sh`":r="Run `npm install -g @tigrisdata/cli` to upgrade.";let c=Math.max(o.length,r.length)+4,l="\u250C"+"\u2500".repeat(c-2)+"\u2510",p="\u2514"+"\u2500".repeat(c-2)+"\u2518",n=_=>"\u2502 "+_.padEnd(c-4)+" \u2502";console.log(`
2
2
  ${l}
3
3
  ${n("")}
4
4
  ${n(o)}
@@ -1 +1 @@
1
- import{a as s,c as l}from"./chunk-2BLMIQ2B.js";import{b as m}from"./chunk-BETAO4PB.js";import{a as t,k as i}from"./chunk-4V35SYMM.js";import{existsSync as c}from"fs";import{join as a,dirname as u}from"path";import{fileURLToPath as f}from"url";t();var j=f(import.meta.url),d=u(j),h=m(),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=i({specs:h,version:s,loadModule:b,hasImplementation:y});x.parse();l();
1
+ import{a as s,c as l}from"./chunk-M6Q225WF.js";import{b as m}from"./chunk-BETAO4PB.js";import{a as t,k as i}from"./chunk-4V35SYMM.js";import{existsSync as c}from"fs";import{join as a,dirname as u}from"path";import{fileURLToPath as f}from"url";t();var j=f(import.meta.url),d=u(j),h=m(),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=i({specs:h,version:s,loadModule:b,hasImplementation:y});x.parse();l();
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import"./chunk-6M7WK6ZZ.js";import"./chunk-2BLMIQ2B.js";import"./chunk-BETAO4PB.js";import"./chunk-4V35SYMM.js";import"./chunk-2XAO2OYD.js";
2
+ import"./chunk-ZBHK6TIZ.js";import"./chunk-M6Q225WF.js";import"./chunk-BETAO4PB.js";import"./chunk-4V35SYMM.js";import"./chunk-2XAO2OYD.js";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import"./chunk-6M7WK6ZZ.js";import"./chunk-2BLMIQ2B.js";import"./chunk-BETAO4PB.js";import"./chunk-4V35SYMM.js";import"./chunk-2XAO2OYD.js";
1
+ import"./chunk-ZBHK6TIZ.js";import"./chunk-M6Q225WF.js";import"./chunk-BETAO4PB.js";import"./chunk-4V35SYMM.js";import"./chunk-2XAO2OYD.js";
package/dist/specs.yaml CHANGED
@@ -699,7 +699,7 @@ commands:
699
699
  multiple: true
700
700
  deprecated: true
701
701
  - name: locations
702
- description: Bucket location (can specify up to two for dual-region)
702
+ description: Bucket location (see https://www.tigrisdata.com/docs/buckets/locations/ for more details)
703
703
  options: *location_options
704
704
  multiple: true
705
705
  - name: allow-object-acl
@@ -1 +1 @@
1
- import{b as a,c as b}from"../chunk-2BLMIQ2B.js";import"../chunk-2XAO2OYD.js";export{b as checkForUpdates,a as isNewerVersion};
1
+ import{b as a,c as b}from"../chunk-M6Q225WF.js";import"../chunk-2XAO2OYD.js";export{b as checkForUpdates,a as isNewerVersion};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tigrisdata/cli",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "description": "Command line interface for Tigris object storage",
5
5
  "type": "module",
6
6
  "exports": {