@vcityio/cli 0.7.2 → 0.7.3

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ Logged in as ${C(j)}.
55
55
  `),b(n)}async function br(e,t={}){let r=g(t.json),o=p(t.org),s=k(t.data),i=s&&typeof s==="object"?{...s}:{};if(t.title!==void 0)i.title=t.title;if(t.description!==void 0)i.description=t.description;if(t.type!==void 0)i.type=t.type;if(t.disabled!==void 0)i.disabled=t.disabled;if(Object.keys(i).length===0)throw Error("rooms update: nothing to update (pass at least one field or --data)");let a=await m().rooms.update(o,e,i);if(r==="json"){l(a);return}process.stdout.write(`Updated room:
56
56
  `),b(a)}async function wr(e,t={}){let r=g(t.json),o=p(t.org);if(!t.yes){if(r==="json")throw Error("rooms delete: --yes is required in JSON / non-interactive mode");if(!await T(`Delete room ${e} in org ${o}? [y/N]`)){process.stdout.write(`Aborted.
57
57
  `);return}}let i=await m().rooms.delete(o,e);if(r==="json"){l(i);return}process.stdout.write(`Deleted room ${e}.
58
- `)}import{spawn as Cr}from"node:child_process";import te from"node:path";var Me={name:"@vcityio/cli",version:"0.7.2",type:"module",description:"vcity command-line interface for org owners",main:"./dist/index.js",bin:{vcity:"./dist/index.js"},files:["dist","README.md","LICENSE"],engines:{node:">=20"},publishConfig:{access:"public"},optionalDependencies:{open:"^10.0.0"},keywords:["vcity","cli"],author:"Otherwise SAS",license:"MIT",homepage:"https://vcity.io",bugs:{email:"support@owsas.com"}};var N=Me.version,z=Me.name;var jr="https://vcity.io/cli/install.sh",vr=1e4,Rr=64,En=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function Cn(e){return e.length>0&&e.length<=Rr&&En.test(e)}function Rn(){return typeof process.versions.bun==="string"?"binary":"npm"}async function Tn(){let e=`https://registry.npmjs.org/${z}/latest`,t;try{t=await fetch(e,{headers:{accept:"application/json"},signal:AbortSignal.timeout(vr)})}catch(o){if(o instanceof Error&&o.name==="TimeoutError")throw Error(`npm registry did not respond within ${vr/1000}s. Try again later.`,{cause:o});throw Error("Could not reach the npm registry. Check your internet connection.",{cause:o})}if(!t.ok)throw Error(`Failed to fetch latest version from npm (HTTP ${t.status})`);let r=await t.json();if(!r.version||typeof r.version!=="string"||r.version.length>Rr)throw Error("Latest version response from npm is missing or invalid `version` field");return r.version}function kr(e){let[t,...r]=e.split("-"),[o,s,i]=t.split(".").map((n)=>parseInt(n,10));return{major:Number.isFinite(o)?o:0,minor:Number.isFinite(s)?s:0,patch:Number.isFinite(i)?i:0,prerelease:r.join("-")}}function Ge(e,t){let r=kr(e),o=kr(t);if(r.major!==o.major)return r.major-o.major;if(r.minor!==o.minor)return r.minor-o.minor;if(r.patch!==o.patch)return r.patch-o.patch;if(r.prerelease===o.prerelease)return 0;if(r.prerelease==="")return 1;if(o.prerelease==="")return-1;return r.prerelease<o.prerelease?-1:1}function Sn(e,t){return new Promise((r,o)=>{let s=Cr(e,t,{stdio:"inherit",shell:!1});s.on("error",o),s.on("exit",(i)=>r({exitCode:i??1}))})}function In(e,t=["--version"]){return new Promise((r)=>{let o=Cr(e,t,{stdio:"ignore",shell:!1});o.on("error",()=>r(!1)),o.on("exit",(s)=>r(s===0))})}async function On(){let e=te.dirname(process.execPath),t=process.platform==="win32"?[te.join(e,"npm.cmd"),te.join(e,"npm")]:[te.join(e,"npm")];for(let r of t)if(await In(r))return r;return}function Er(){process.stdout.write(`Download, inspect, then run (recommended):
58
+ `)}import{spawn as Cr}from"node:child_process";import te from"node:path";var Me={name:"@vcityio/cli",version:"0.7.3",type:"module",description:"vcity command-line interface for org owners",main:"./dist/index.js",bin:{vcity:"./dist/index.js"},files:["dist","README.md","LICENSE"],engines:{node:">=20"},publishConfig:{access:"public"},optionalDependencies:{open:"^10.0.0"},keywords:["vcity","cli"],author:"Otherwise SAS",license:"MIT",homepage:"https://vcity.io",bugs:{email:"support@owsas.com"}};var N=Me.version,z=Me.name;var jr="https://vcity.io/cli/install.sh",vr=1e4,Rr=64,En=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function Cn(e){return e.length>0&&e.length<=Rr&&En.test(e)}function Rn(){return typeof process.versions.bun==="string"?"binary":"npm"}async function Tn(){let e=`https://registry.npmjs.org/${z}/latest`,t;try{t=await fetch(e,{headers:{accept:"application/json"},signal:AbortSignal.timeout(vr)})}catch(o){if(o instanceof Error&&o.name==="TimeoutError")throw Error(`npm registry did not respond within ${vr/1000}s. Try again later.`,{cause:o});throw Error("Could not reach the npm registry. Check your internet connection.",{cause:o})}if(!t.ok)throw Error(`Failed to fetch latest version from npm (HTTP ${t.status})`);let r=await t.json();if(!r.version||typeof r.version!=="string"||r.version.length>Rr)throw Error("Latest version response from npm is missing or invalid `version` field");return r.version}function kr(e){let[t,...r]=e.split("-"),[o,s,i]=t.split(".").map((n)=>parseInt(n,10));return{major:Number.isFinite(o)?o:0,minor:Number.isFinite(s)?s:0,patch:Number.isFinite(i)?i:0,prerelease:r.join("-")}}function Ge(e,t){let r=kr(e),o=kr(t);if(r.major!==o.major)return r.major-o.major;if(r.minor!==o.minor)return r.minor-o.minor;if(r.patch!==o.patch)return r.patch-o.patch;if(r.prerelease===o.prerelease)return 0;if(r.prerelease==="")return 1;if(o.prerelease==="")return-1;return r.prerelease<o.prerelease?-1:1}function Sn(e,t){return new Promise((r,o)=>{let s=Cr(e,t,{stdio:"inherit",shell:!1});s.on("error",o),s.on("exit",(i)=>r({exitCode:i??1}))})}function In(e,t=["--version"]){return new Promise((r)=>{let o=Cr(e,t,{stdio:"ignore",shell:!1});o.on("error",()=>r(!1)),o.on("exit",(s)=>r(s===0))})}async function On(){let e=te.dirname(process.execPath),t=process.platform==="win32"?[te.join(e,"npm.cmd"),te.join(e,"npm")]:[te.join(e,"npm")];for(let r of t)if(await In(r))return r;return}function Er(){process.stdout.write(`Download, inspect, then run (recommended):
59
59
  `),process.stdout.write(` curl -fsSL ${jr} -o /tmp/vcity-install.sh
60
60
  `),process.stdout.write(` less /tmp/vcity-install.sh
61
61
  `),process.stdout.write(` bash /tmp/vcity-install.sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcityio/cli",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "type": "module",
5
5
  "description": "vcity command-line interface for org owners",
6
6
  "main": "./dist/index.js",