@raycast/api 1.103.8 → 1.103.10

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.
@@ -27,7 +27,7 @@ ${r}`,$c=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Wc=Objec
27
27
  ${l.trim()}
28
28
  ${f.trim()}`));return}r.verbose&&console.log(`${l.trim()}
29
29
  ${f.trim()}`),o(l.trim())})})}async function pu(e){let o=(await k("git rev-list --max-parents=0 HEAD",{...e,throwOnError:!0})).split(/\r?\n/).filter(Boolean);return o[o.length-1]}function mf(){return new Promise(e=>{(0,vo.exec)("git --version",r=>{e(r===null)})})}async function bu(e){return await mf()?await k("git rev-parse --is-inside-work-tree",{...e,throwOnError:!1})==="true":(Pe("info","git is not installed"),!1)}async function er(e){return(await k("git status --porcelain=2",{...e,throwOnError:!0})).split(`
30
- `).filter(i=>i.startsWith("1")||i.startsWith("2")||i.startsWith("u")).length>0}async function gu(e){return await pf(e)?k("git rev-parse HEAD",{...e,throwOnError:!0}):""}async function Fu(e,r,o){Xt=hu.default.dirname(r),await k(`git clone --filter=blob:none --no-checkout ${e} "${r}"`,{...o,throwOnError:!0})}async function _u(e,r,o){try{await k(`git remote set-url ${e} ${r}`,{...o,throwOnError:!0})}catch{await k(`git remote add ${e} ${r}`,{...o,throwOnError:!0})}}function Ao(e,r){return k(`git config --get ${e}`,{...r,throwOnError:!0})}function Ro(e,r,o){return k(`git config --local ${e} "${r}"`,{...o,throwOnError:!0})}function yu(e,r){return k(`git sparse-checkout set ${e}`,{...r,throwOnError:!0})}function Oe(e,r){return k(`git checkout ${e}`,{...r,throwOnError:!0})}function _t(e,r){return k(`git checkout -b ${e} || git checkout ${e}`,{...r,throwOnError:!0})}function Bo(e,r){return k(`git branch -D ${e}`,{...r,throwOnError:!1})}async function Eu(e,r){return await Bo(e,r),k(`git push origin -d ${e}`,{...r,throwOnError:!1})}async function tn(e,r){return await k(`git ls-remote --heads origin ${e}`,{...r,throwOnError:!1})!==""}function To(e,r,o){return k(`git fetch ${e} ${r} --depth=1`,{...o,throwOnError:!1})}function Cu(e,r){return k(`git reset --hard ${e}`,{...r,throwOnError:!0})}async function wu(e,r){let o=await k(`git rev-parse ${e}`,{...r,throwOnError:!0}),i=await k(`git rev-parse origin/${e}`,{...r,throwOnError:!0});return o===i?!0:await k(`git merge-base --is-ancestor ${i} ${o} && echo "success"`,{...r,throwOnError:!1})==="success"}async function Su(e,r){return await k(`git tag -l ${e}`,{...r,throwOnError:!1})!==""}function vu(e,r,o){return k(`git tag -f -a ${e} -m "${r}"`,{...o,throwOnError:!0})}function Au(e,r){return k(`git add . && git commit -m "${e}"`,{...r,throwOnError:!0})}async function Po(e,r){try{return await k(`git pull origin ${e} --ff`,{...r,throwOnError:!0})}catch(o){if(o instanceof Error&&o.message.includes("fatal: refusing to merge unrelated histories"))return await k("git fetch --deepen=1",{...r,throwOnError:!0}),await Po(e,r);throw o}}function Ru(e,r){return k(`git merge ${e}`,{...r,throwOnError:!0})}function Bu(e){return{latestPullTag:"__raycast_latest_pull_"+e+"__",latestPublishTag:"__raycast_latest_publish_"+e+"__"}}async function pf(e){try{return await k("git remote get-url origin",{...e,throwOnError:!1}),!0}catch{return!1}}var xo=x(require("path")),tt=x(require("fs"));function ko(e,r,o=[".git",".github","node_modules","raycast-env.d.ts",".raycast-swift-build",".swiftpm","compiled_raycast_swift","compiled_raycast_rust"]){let i=tt.default.readdirSync(e);try{tt.default.mkdirSync(r,{recursive:!0})}catch{}for(let u of i){let l=xo.default.join(e,u),f=xo.default.join(r,u);if(tt.default.lstatSync(l).isDirectory()){if(!o.includes(u)){try{tt.default.mkdirSync(f,{recursive:!0})}catch{}ko(l,f,o)}}else o.includes(u)||tt.default.copyFileSync(l,f,tt.default.constants.COPYFILE_FICLONE)}}var ai=x(require("path")),Ia=x(require("fs"));var tr=x(require("node:fs")),$o=x(require("node:path")),Pu=x(require("node:os"));var Tu={production:{url:"https://www.raycast.com",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},staging:{url:"https://www.rayca.st",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},development:{url:"http://localhost:3000",clientID:"rOCD_LhnXFObSLu9v7788qOGu25FZDqEzGjet4Q45ZY"}}[process.env.API_ENV||"production"],bf="e69bae0ec90f5e838555",H={},gf;function pe(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||H.APIURL||Tu.url;case"raycastAccessToken":return process.env.RAY_TOKEN||H.Token||H.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||H.ClientID||Tu.clientID;case"githubClientId":return process.env.RAY_GithubClientID||H.GithubClientID||bf;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||H.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof H.Target<"u"?H.Target:Io(process.platform==="win32"?"x":"release")}}function rn(e,r){switch(e){case"raycastApiURL":r===void 0?delete H.APIURL:H.APIURL=r;break;case"raycastAccessToken":r===void 0?delete H.Token:H.Token=r,delete H.AccessToken;break;case"raycastClientId":r===void 0?delete H.ClientID:H.ClientID=r;break;case"githubAccessToken":r===void 0?delete H.GithubAccessToken:H.GithubAccessToken=r;break;case"flavorName":r===void 0?delete H.Target:H.Target=r;break}let o=Wo();tr.writeFileSync($o.join(o,"config.json"),JSON.stringify(H,null," "),"utf8")}function Io(e){switch(e){case"debug":return"debug";case"internal":return"internal";case"release":return"";case"x":return"x";case"x-internal":return"x-internal";case"x-development":return"x-development";case void 0:return pe("flavorName")}}function Ff(){let e=Io(gf);return e==""?"raycast":`raycast-${e}`}function Wo(){let e=$o.join(Pu.default.homedir(),".config",Ff());return tr.mkdirSync(e,{recursive:!0}),e}var Ca=require("@oclif/core"),wa=x(aa()),Sa=x(Ea());async function Ie(e,r){let o;try{o=await(0,wa.default)(e,{method:r.method||"GET",headers:{"Content-Type":"application/json",Accept:"application/json",...r.token?{Authorization:`Bearer ${r.token}`}:void 0},body:r.body})}catch(i){throw new Error(`HTTP request: ${i.message}`)}if(!o.ok){switch(o.status){case 401:throw new He(o,"not authorized - please log in first using `npx ray login`");case 403:throw new He(o,"forbidden - you don't have permissions to perform the request");case 402:throw new He(o,"the limit of free commands has been reached")}let i=await o.text(),u;try{u=JSON.parse(i)}catch{throw new He(o,`HTTP error: ${o.status} - ${i}`)}throw Array.isArray(u.errors)&&u.errors.length>0?new He(o,`error: ${u.errors[0].status} - ${u.errors[0].title}`):new He(o,`HTTP error: ${o.status} - ${i}`)}return await o.json()}var He=class extends Error{constructor(r,o){let i=r.headers.get("X-Request-Id");i?super(`${o} (${r.url} RequestID: ${i})`):super(o),this.name="HTTPError"}};function va(e){(0,Sa.default)(e).catch(r=>{Ca.ux.error(new Error(`failed opening browser to URL ${e}: ${r.message}`),{exit:1})})}var si=x(require("path"));async function Aa(){if(pe("githubAccessToken"))return;let e=pe("githubClientId"),r=await Ie("https://github.com/login/device/code",{method:"POST",body:JSON.stringify({client_id:e,scope:"repo"})});Pe("info",`
30
+ `).filter(i=>i.startsWith("1")||i.startsWith("2")||i.startsWith("u")||i.startsWith("?")).length>0}async function gu(e){return await pf(e)?k("git rev-parse HEAD",{...e,throwOnError:!0}):""}async function Fu(e,r,o){Xt=hu.default.dirname(r),await k(`git clone --filter=blob:none --no-checkout ${e} "${r}"`,{...o,throwOnError:!0})}async function _u(e,r,o){try{await k(`git remote set-url ${e} ${r}`,{...o,throwOnError:!0})}catch{await k(`git remote add ${e} ${r}`,{...o,throwOnError:!0})}}function Ao(e,r){return k(`git config --get ${e}`,{...r,throwOnError:!0})}function Ro(e,r,o){return k(`git config --local ${e} "${r}"`,{...o,throwOnError:!0})}function yu(e,r){return k(`git sparse-checkout set ${e}`,{...r,throwOnError:!0})}function Oe(e,r){return k(`git checkout ${e}`,{...r,throwOnError:!0})}function _t(e,r){return k(`git checkout -b ${e} || git checkout ${e}`,{...r,throwOnError:!0})}function Bo(e,r){return k(`git branch -D ${e}`,{...r,throwOnError:!1})}async function Eu(e,r){return await Bo(e,r),k(`git push origin -d ${e}`,{...r,throwOnError:!1})}async function tn(e,r){return await k(`git ls-remote --heads origin ${e}`,{...r,throwOnError:!1})!==""}function To(e,r,o){return k(`git fetch ${e} ${r} --depth=1`,{...o,throwOnError:!1})}function Cu(e,r){return k(`git reset --hard ${e}`,{...r,throwOnError:!0})}async function wu(e,r){let o=await k(`git rev-parse ${e}`,{...r,throwOnError:!0}),i=await k(`git rev-parse origin/${e}`,{...r,throwOnError:!0});return o===i?!0:await k(`git merge-base --is-ancestor ${i} ${o} && echo "success"`,{...r,throwOnError:!1})==="success"}async function Su(e,r){return await k(`git tag -l ${e}`,{...r,throwOnError:!1})!==""}function vu(e,r,o){return k(`git tag -f -a ${e} -m "${r}"`,{...o,throwOnError:!0})}function Au(e,r){return k(`git add . && git commit -m "${e}"`,{...r,throwOnError:!0})}async function Po(e,r){try{return await k(`git pull origin ${e} --ff`,{...r,throwOnError:!0})}catch(o){if(o instanceof Error&&o.message.includes("fatal: refusing to merge unrelated histories"))return await k("git fetch --deepen=1",{...r,throwOnError:!0}),await Po(e,r);throw o}}function Ru(e,r){return k(`git merge ${e}`,{...r,throwOnError:!0})}function Bu(e){return{latestPullTag:"__raycast_latest_pull_"+e+"__",latestPublishTag:"__raycast_latest_publish_"+e+"__"}}async function pf(e){try{return await k("git remote get-url origin",{...e,throwOnError:!1}),!0}catch{return!1}}var xo=x(require("path")),tt=x(require("fs"));function ko(e,r,o=[".git",".github","node_modules","raycast-env.d.ts",".raycast-swift-build",".swiftpm","compiled_raycast_swift","compiled_raycast_rust"]){let i=tt.default.readdirSync(e);try{tt.default.mkdirSync(r,{recursive:!0})}catch{}for(let u of i){let l=xo.default.join(e,u),f=xo.default.join(r,u);if(tt.default.lstatSync(l).isDirectory()){if(!o.includes(u)){try{tt.default.mkdirSync(f,{recursive:!0})}catch{}ko(l,f,o)}}else o.includes(u)||tt.default.copyFileSync(l,f,tt.default.constants.COPYFILE_FICLONE)}}var ai=x(require("path")),Ia=x(require("fs"));var tr=x(require("node:fs")),$o=x(require("node:path")),Pu=x(require("node:os"));var Tu={production:{url:"https://www.raycast.com",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},staging:{url:"https://www.rayca.st",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},development:{url:"http://localhost:3000",clientID:"rOCD_LhnXFObSLu9v7788qOGu25FZDqEzGjet4Q45ZY"}}[process.env.API_ENV||"production"],bf="e69bae0ec90f5e838555",H={},gf;function pe(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||H.APIURL||Tu.url;case"raycastAccessToken":return process.env.RAY_TOKEN||H.Token||H.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||H.ClientID||Tu.clientID;case"githubClientId":return process.env.RAY_GithubClientID||H.GithubClientID||bf;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||H.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof H.Target<"u"?H.Target:Io(process.platform==="win32"?"x":"release")}}function rn(e,r){switch(e){case"raycastApiURL":r===void 0?delete H.APIURL:H.APIURL=r;break;case"raycastAccessToken":r===void 0?delete H.Token:H.Token=r,delete H.AccessToken;break;case"raycastClientId":r===void 0?delete H.ClientID:H.ClientID=r;break;case"githubAccessToken":r===void 0?delete H.GithubAccessToken:H.GithubAccessToken=r;break;case"flavorName":r===void 0?delete H.Target:H.Target=r;break}let o=Wo();tr.writeFileSync($o.join(o,"config.json"),JSON.stringify(H,null," "),"utf8")}function Io(e){switch(e){case"debug":return"debug";case"internal":return"internal";case"release":return"";case"x":return"x";case"x-internal":return"x-internal";case"x-development":return"x-development";case void 0:return pe("flavorName")}}function Ff(){let e=Io(gf);return e==""?"raycast":`raycast-${e}`}function Wo(){let e=$o.join(Pu.default.homedir(),".config",Ff());return tr.mkdirSync(e,{recursive:!0}),e}var Ca=require("@oclif/core"),wa=x(aa()),Sa=x(Ea());async function Ie(e,r){let o;try{o=await(0,wa.default)(e,{method:r.method||"GET",headers:{"Content-Type":"application/json",Accept:"application/json",...r.token?{Authorization:`Bearer ${r.token}`}:void 0},body:r.body})}catch(i){throw new Error(`HTTP request: ${i.message}`)}if(!o.ok){switch(o.status){case 401:throw new He(o,"not authorized - please log in first using `npx ray login`");case 403:throw new He(o,"forbidden - you don't have permissions to perform the request");case 402:throw new He(o,"the limit of free commands has been reached")}let i=await o.text(),u;try{u=JSON.parse(i)}catch{throw new He(o,`HTTP error: ${o.status} - ${i}`)}throw Array.isArray(u.errors)&&u.errors.length>0?new He(o,`error: ${u.errors[0].status} - ${u.errors[0].title}`):new He(o,`HTTP error: ${o.status} - ${i}`)}return await o.json()}var He=class extends Error{constructor(r,o){let i=r.headers.get("X-Request-Id");i?super(`${o} (${r.url} RequestID: ${i})`):super(o),this.name="HTTPError"}};function va(e){(0,Sa.default)(e).catch(r=>{Ca.ux.error(new Error(`failed opening browser to URL ${e}: ${r.message}`),{exit:1})})}var si=x(require("path"));async function Aa(){if(pe("githubAccessToken"))return;let e=pe("githubClientId"),r=await Ie("https://github.com/login/device/code",{method:"POST",body:JSON.stringify({client_id:e,scope:"repo"})});Pe("info",`
31
31
 
32
32
  \u{1F510} Raycast extensions are published on GitHub.
33
33
  To automate this process, you have to authenticate with GitHub.
@@ -27,7 +27,7 @@ ${r}`,Ec=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Cc=Objec
27
27
  ${l.trim()}
28
28
  ${f.trim()}`));return}r.verbose&&console.log(`${l.trim()}
29
29
  ${f.trim()}`),o(l.trim())})})}function ef(){return new Promise(e=>{(0,Eo.exec)("git --version",r=>{e(r===null)})})}async function su(e){return await ef()?await K("git rev-parse --is-inside-work-tree",{...e,throwOnError:!1})==="true":(Pe("info","git is not installed"),!1)}async function uu(e){return(await K("git status --porcelain=2",{...e,throwOnError:!0})).split(`
30
- `).filter(i=>i.startsWith("1")||i.startsWith("2")||i.startsWith("u")).length>0}async function au(e){return await tf(e)?K("git rev-parse HEAD",{...e,throwOnError:!0}):""}async function lu(e,r,o){Vt=iu.default.dirname(r),await K(`git clone --filter=blob:none --no-checkout ${e} "${r}"`,{...o,throwOnError:!0})}async function cu(e,r,o){try{await K(`git remote set-url ${e} ${r}`,{...o,throwOnError:!0})}catch{await K(`git remote add ${e} ${r}`,{...o,throwOnError:!0})}}function Co(e,r){return K(`git config --get ${e}`,{...r,throwOnError:!0})}function wo(e,r,o){return K(`git config --local ${e} "${r}"`,{...o,throwOnError:!0})}function fu(e,r){return K(`git sparse-checkout set ${e}`,{...r,throwOnError:!0})}function du(e,r){return K(`git checkout ${e}`,{...r,throwOnError:!0})}function Jr(e,r){return K(`git checkout -b ${e} || git checkout ${e}`,{...r,throwOnError:!0})}function So(e,r){return K(`git branch -D ${e}`,{...r,throwOnError:!1})}async function Du(e,r){return await So(e,r),K(`git push origin -d ${e}`,{...r,throwOnError:!1})}async function hu(e,r){return await K(`git ls-remote --heads origin ${e}`,{...r,throwOnError:!1})!==""}function vo(e,r,o){return K(`git fetch ${e} ${r} --depth=1`,{...o,throwOnError:!1})}function mu(e,r){return K(`git reset --hard ${e}`,{...r,throwOnError:!0})}async function tf(e){try{return await K("git remote get-url origin",{...e,throwOnError:!1}),!0}catch{return!1}}var Qt=$(require("node:fs")),Ro=$(require("node:path")),gu=$(require("node:os"));var bu={production:{url:"https://www.raycast.com",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},staging:{url:"https://www.rayca.st",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},development:{url:"http://localhost:3000",clientID:"rOCD_LhnXFObSLu9v7788qOGu25FZDqEzGjet4Q45ZY"}}[process.env.API_ENV||"production"],rf="e69bae0ec90f5e838555",U={},nf;function pe(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||U.APIURL||bu.url;case"raycastAccessToken":return process.env.RAY_TOKEN||U.Token||U.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||U.ClientID||bu.clientID;case"githubClientId":return process.env.RAY_GithubClientID||U.GithubClientID||rf;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||U.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof U.Target<"u"?U.Target:Ao(process.platform==="win32"?"x":"release")}}function Zr(e,r){switch(e){case"raycastApiURL":r===void 0?delete U.APIURL:U.APIURL=r;break;case"raycastAccessToken":r===void 0?delete U.Token:U.Token=r,delete U.AccessToken;break;case"raycastClientId":r===void 0?delete U.ClientID:U.ClientID=r;break;case"githubAccessToken":r===void 0?delete U.GithubAccessToken:U.GithubAccessToken=r;break;case"flavorName":r===void 0?delete U.Target:U.Target=r;break}let o=Bo();Qt.writeFileSync(Ro.join(o,"config.json"),JSON.stringify(U,null," "),"utf8")}function Ao(e){switch(e){case"debug":return"debug";case"internal":return"internal";case"release":return"";case"x":return"x";case"x-internal":return"x-internal";case"x-development":return"x-development";case void 0:return pe("flavorName")}}function of(){let e=Ao(nf);return e==""?"raycast":`raycast-${e}`}function Bo(){let e=Ro.join(gu.default.homedir(),".config",of());return Qt.mkdirSync(e,{recursive:!0}),e}var ca=require("@oclif/core"),fa=$(Qu()),da=$(la());async function ke(e,r){let o;try{o=await(0,fa.default)(e,{method:r.method||"GET",headers:{"Content-Type":"application/json",Accept:"application/json",...r.token?{Authorization:`Bearer ${r.token}`}:void 0},body:r.body})}catch(i){throw new Error(`HTTP request: ${i.message}`)}if(!o.ok){switch(o.status){case 401:throw new Ue(o,"not authorized - please log in first using `npx ray login`");case 403:throw new Ue(o,"forbidden - you don't have permissions to perform the request");case 402:throw new Ue(o,"the limit of free commands has been reached")}let i=await o.text(),u;try{u=JSON.parse(i)}catch{throw new Ue(o,`HTTP error: ${o.status} - ${i}`)}throw Array.isArray(u.errors)&&u.errors.length>0?new Ue(o,`error: ${u.errors[0].status} - ${u.errors[0].title}`):new Ue(o,`HTTP error: ${o.status} - ${i}`)}return await o.json()}var Ue=class extends Error{constructor(r,o){let i=r.headers.get("X-Request-Id");i?super(`${o} (${r.url} RequestID: ${i})`):super(o),this.name="HTTPError"}};function Da(e){(0,da.default)(e).catch(r=>{ca.ux.error(new Error(`failed opening browser to URL ${e}: ${r.message}`),{exit:1})})}var Zo=$(require("path"));async function ha(){if(pe("githubAccessToken"))return;let e=pe("githubClientId"),r=await ke("https://github.com/login/device/code",{method:"POST",body:JSON.stringify({client_id:e,scope:"repo"})});Pe("info",`
30
+ `).filter(i=>i.startsWith("1")||i.startsWith("2")||i.startsWith("u")||i.startsWith("?")).length>0}async function au(e){return await tf(e)?K("git rev-parse HEAD",{...e,throwOnError:!0}):""}async function lu(e,r,o){Vt=iu.default.dirname(r),await K(`git clone --filter=blob:none --no-checkout ${e} "${r}"`,{...o,throwOnError:!0})}async function cu(e,r,o){try{await K(`git remote set-url ${e} ${r}`,{...o,throwOnError:!0})}catch{await K(`git remote add ${e} ${r}`,{...o,throwOnError:!0})}}function Co(e,r){return K(`git config --get ${e}`,{...r,throwOnError:!0})}function wo(e,r,o){return K(`git config --local ${e} "${r}"`,{...o,throwOnError:!0})}function fu(e,r){return K(`git sparse-checkout set ${e}`,{...r,throwOnError:!0})}function du(e,r){return K(`git checkout ${e}`,{...r,throwOnError:!0})}function Jr(e,r){return K(`git checkout -b ${e} || git checkout ${e}`,{...r,throwOnError:!0})}function So(e,r){return K(`git branch -D ${e}`,{...r,throwOnError:!1})}async function Du(e,r){return await So(e,r),K(`git push origin -d ${e}`,{...r,throwOnError:!1})}async function hu(e,r){return await K(`git ls-remote --heads origin ${e}`,{...r,throwOnError:!1})!==""}function vo(e,r,o){return K(`git fetch ${e} ${r} --depth=1`,{...o,throwOnError:!1})}function mu(e,r){return K(`git reset --hard ${e}`,{...r,throwOnError:!0})}async function tf(e){try{return await K("git remote get-url origin",{...e,throwOnError:!1}),!0}catch{return!1}}var Qt=$(require("node:fs")),Ro=$(require("node:path")),gu=$(require("node:os"));var bu={production:{url:"https://www.raycast.com",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},staging:{url:"https://www.rayca.st",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},development:{url:"http://localhost:3000",clientID:"rOCD_LhnXFObSLu9v7788qOGu25FZDqEzGjet4Q45ZY"}}[process.env.API_ENV||"production"],rf="e69bae0ec90f5e838555",U={},nf;function pe(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||U.APIURL||bu.url;case"raycastAccessToken":return process.env.RAY_TOKEN||U.Token||U.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||U.ClientID||bu.clientID;case"githubClientId":return process.env.RAY_GithubClientID||U.GithubClientID||rf;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||U.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof U.Target<"u"?U.Target:Ao(process.platform==="win32"?"x":"release")}}function Zr(e,r){switch(e){case"raycastApiURL":r===void 0?delete U.APIURL:U.APIURL=r;break;case"raycastAccessToken":r===void 0?delete U.Token:U.Token=r,delete U.AccessToken;break;case"raycastClientId":r===void 0?delete U.ClientID:U.ClientID=r;break;case"githubAccessToken":r===void 0?delete U.GithubAccessToken:U.GithubAccessToken=r;break;case"flavorName":r===void 0?delete U.Target:U.Target=r;break}let o=Bo();Qt.writeFileSync(Ro.join(o,"config.json"),JSON.stringify(U,null," "),"utf8")}function Ao(e){switch(e){case"debug":return"debug";case"internal":return"internal";case"release":return"";case"x":return"x";case"x-internal":return"x-internal";case"x-development":return"x-development";case void 0:return pe("flavorName")}}function of(){let e=Ao(nf);return e==""?"raycast":`raycast-${e}`}function Bo(){let e=Ro.join(gu.default.homedir(),".config",of());return Qt.mkdirSync(e,{recursive:!0}),e}var ca=require("@oclif/core"),fa=$(Qu()),da=$(la());async function ke(e,r){let o;try{o=await(0,fa.default)(e,{method:r.method||"GET",headers:{"Content-Type":"application/json",Accept:"application/json",...r.token?{Authorization:`Bearer ${r.token}`}:void 0},body:r.body})}catch(i){throw new Error(`HTTP request: ${i.message}`)}if(!o.ok){switch(o.status){case 401:throw new Ue(o,"not authorized - please log in first using `npx ray login`");case 403:throw new Ue(o,"forbidden - you don't have permissions to perform the request");case 402:throw new Ue(o,"the limit of free commands has been reached")}let i=await o.text(),u;try{u=JSON.parse(i)}catch{throw new Ue(o,`HTTP error: ${o.status} - ${i}`)}throw Array.isArray(u.errors)&&u.errors.length>0?new Ue(o,`error: ${u.errors[0].status} - ${u.errors[0].title}`):new Ue(o,`HTTP error: ${o.status} - ${i}`)}return await o.json()}var Ue=class extends Error{constructor(r,o){let i=r.headers.get("X-Request-Id");i?super(`${o} (${r.url} RequestID: ${i})`):super(o),this.name="HTTPError"}};function Da(e){(0,da.default)(e).catch(r=>{ca.ux.error(new Error(`failed opening browser to URL ${e}: ${r.message}`),{exit:1})})}var Zo=$(require("path"));async function ha(){if(pe("githubAccessToken"))return;let e=pe("githubClientId"),r=await ke("https://github.com/login/device/code",{method:"POST",body:JSON.stringify({client_id:e,scope:"repo"})});Pe("info",`
31
31
 
32
32
  \u{1F510} Raycast extensions are published on GitHub.
33
33
  To automate this process, you have to authenticate with GitHub.
@@ -108,6 +108,102 @@
108
108
  "index.js"
109
109
  ]
110
110
  },
111
+ "develop": {
112
+ "aliases": [
113
+ "dev"
114
+ ],
115
+ "args": {},
116
+ "description": "Start the extension in development mode and watches for changes",
117
+ "flags": {
118
+ "exit-on-error": {
119
+ "aliases": [
120
+ "exitOnError"
121
+ ],
122
+ "deprecateAliases": true,
123
+ "helpGroup": "GLOBAL",
124
+ "name": "exit-on-error",
125
+ "summary": "Always exit with non-zero code on error",
126
+ "allowNo": true,
127
+ "type": "boolean"
128
+ },
129
+ "emoji": {
130
+ "helpGroup": "GLOBAL",
131
+ "name": "emoji",
132
+ "summary": "Prefix output with emojis 🌈",
133
+ "allowNo": false,
134
+ "type": "boolean"
135
+ },
136
+ "help": {
137
+ "helpGroup": "GLOBAL",
138
+ "name": "help",
139
+ "summary": "Show the help message for the command",
140
+ "allowNo": false,
141
+ "type": "boolean"
142
+ },
143
+ "non-interactive": {
144
+ "char": "I",
145
+ "helpGroup": "GLOBAL",
146
+ "name": "non-interactive",
147
+ "summary": "Disable interactive outputs, useful for CI",
148
+ "allowNo": false,
149
+ "type": "boolean"
150
+ },
151
+ "target": {
152
+ "char": "t",
153
+ "description": "Raycast app target",
154
+ "helpGroup": "GLOBAL",
155
+ "hidden": true,
156
+ "name": "target",
157
+ "hasDynamicHelp": false,
158
+ "multiple": false,
159
+ "options": [
160
+ "debug",
161
+ "internal",
162
+ "release",
163
+ "x",
164
+ "x-development",
165
+ "x-internal"
166
+ ],
167
+ "type": "option"
168
+ },
169
+ "print-tool-schemas": {
170
+ "description": "Indicates whether to print the schema tools \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
171
+ "hidden": true,
172
+ "name": "print-tool-schemas",
173
+ "allowNo": false,
174
+ "type": "boolean"
175
+ },
176
+ "print-instructions": {
177
+ "description": "Indicates whether to print the extension's instructions \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
178
+ "hidden": true,
179
+ "name": "print-instructions",
180
+ "allowNo": false,
181
+ "type": "boolean"
182
+ },
183
+ "print-tool-calls": {
184
+ "description": "Indicates whether to print the inputs and outputs of tools when they are called from Raycast \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
185
+ "hidden": true,
186
+ "name": "print-tool-calls",
187
+ "allowNo": false,
188
+ "type": "boolean"
189
+ }
190
+ },
191
+ "hasDynamicHelp": false,
192
+ "hiddenAliases": [],
193
+ "id": "develop",
194
+ "pluginAlias": "ray",
195
+ "pluginName": "ray",
196
+ "pluginType": "core",
197
+ "strict": true,
198
+ "enableJsonFlag": false,
199
+ "isESM": false,
200
+ "relativePath": [
201
+ "dist",
202
+ "commands",
203
+ "develop",
204
+ "index.js"
205
+ ]
206
+ },
111
207
  "lint": {
112
208
  "aliases": [],
113
209
  "args": {},
@@ -974,102 +1070,6 @@
974
1070
  "index.js"
975
1071
  ]
976
1072
  },
977
- "develop": {
978
- "aliases": [
979
- "dev"
980
- ],
981
- "args": {},
982
- "description": "Start the extension in development mode and watches for changes",
983
- "flags": {
984
- "exit-on-error": {
985
- "aliases": [
986
- "exitOnError"
987
- ],
988
- "deprecateAliases": true,
989
- "helpGroup": "GLOBAL",
990
- "name": "exit-on-error",
991
- "summary": "Always exit with non-zero code on error",
992
- "allowNo": true,
993
- "type": "boolean"
994
- },
995
- "emoji": {
996
- "helpGroup": "GLOBAL",
997
- "name": "emoji",
998
- "summary": "Prefix output with emojis 🌈",
999
- "allowNo": false,
1000
- "type": "boolean"
1001
- },
1002
- "help": {
1003
- "helpGroup": "GLOBAL",
1004
- "name": "help",
1005
- "summary": "Show the help message for the command",
1006
- "allowNo": false,
1007
- "type": "boolean"
1008
- },
1009
- "non-interactive": {
1010
- "char": "I",
1011
- "helpGroup": "GLOBAL",
1012
- "name": "non-interactive",
1013
- "summary": "Disable interactive outputs, useful for CI",
1014
- "allowNo": false,
1015
- "type": "boolean"
1016
- },
1017
- "target": {
1018
- "char": "t",
1019
- "description": "Raycast app target",
1020
- "helpGroup": "GLOBAL",
1021
- "hidden": true,
1022
- "name": "target",
1023
- "hasDynamicHelp": false,
1024
- "multiple": false,
1025
- "options": [
1026
- "debug",
1027
- "internal",
1028
- "release",
1029
- "x",
1030
- "x-development",
1031
- "x-internal"
1032
- ],
1033
- "type": "option"
1034
- },
1035
- "print-tool-schemas": {
1036
- "description": "Indicates whether to print the schema tools \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
1037
- "hidden": true,
1038
- "name": "print-tool-schemas",
1039
- "allowNo": false,
1040
- "type": "boolean"
1041
- },
1042
- "print-instructions": {
1043
- "description": "Indicates whether to print the extension's instructions \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
1044
- "hidden": true,
1045
- "name": "print-instructions",
1046
- "allowNo": false,
1047
- "type": "boolean"
1048
- },
1049
- "print-tool-calls": {
1050
- "description": "Indicates whether to print the inputs and outputs of tools when they are called from Raycast \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
1051
- "hidden": true,
1052
- "name": "print-tool-calls",
1053
- "allowNo": false,
1054
- "type": "boolean"
1055
- }
1056
- },
1057
- "hasDynamicHelp": false,
1058
- "hiddenAliases": [],
1059
- "id": "develop",
1060
- "pluginAlias": "ray",
1061
- "pluginName": "ray",
1062
- "pluginType": "core",
1063
- "strict": true,
1064
- "enableJsonFlag": false,
1065
- "isESM": false,
1066
- "relativePath": [
1067
- "dist",
1068
- "commands",
1069
- "develop",
1070
- "index.js"
1071
- ]
1072
- },
1073
1073
  "version": {
1074
1074
  "aliases": [],
1075
1075
  "args": {},
@@ -1144,5 +1144,5 @@
1144
1144
  ]
1145
1145
  }
1146
1146
  },
1147
- "version": "1.103.8"
1147
+ "version": "1.103.10"
1148
1148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raycast/api",
3
- "version": "1.103.8",
3
+ "version": "1.103.10",
4
4
  "description": "Build extensions for Raycast with React and Node.js.",
5
5
  "author": "Raycast Technologies Ltd.",
6
6
  "homepage": "https://developers.raycast.com",