@raycast/api 1.103.8 → 1.103.9
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/commands/publish/index.js +193 -193
- package/dist/commands/pull-contributions/index.js +1 -1
- package/dist/commands/version/index.js +1 -1
- package/dist/utils/publish/git.js +4 -4
- package/dist/utils/publish/publish-to-public-repo.js +17 -17
- package/dist/utils/publish/pull-contributions.js +1 -1
- package/dist/utils/publish/setup-github-fork.js +1 -1
- package/oclif.manifest.json +140 -140
- package/package.json +1 -1
|
@@ -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.
|
package/oclif.manifest.json
CHANGED
|
@@ -108,10 +108,12 @@
|
|
|
108
108
|
"index.js"
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
|
-
"
|
|
112
|
-
"aliases": [
|
|
111
|
+
"develop": {
|
|
112
|
+
"aliases": [
|
|
113
|
+
"dev"
|
|
114
|
+
],
|
|
113
115
|
"args": {},
|
|
114
|
-
"description": "
|
|
116
|
+
"description": "Start the extension in development mode and watches for changes",
|
|
115
117
|
"flags": {
|
|
116
118
|
"exit-on-error": {
|
|
117
119
|
"aliases": [
|
|
@@ -164,34 +166,31 @@
|
|
|
164
166
|
],
|
|
165
167
|
"type": "option"
|
|
166
168
|
},
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"name": "
|
|
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",
|
|
171
173
|
"allowNo": false,
|
|
172
174
|
"type": "boolean"
|
|
173
175
|
},
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"name": "
|
|
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",
|
|
178
180
|
"allowNo": false,
|
|
179
181
|
"type": "boolean"
|
|
180
182
|
},
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"description": "Path to JSON schema for package.json validation \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
|
|
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",
|
|
184
185
|
"hidden": true,
|
|
185
|
-
"name": "
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"multiple": false,
|
|
189
|
-
"type": "option"
|
|
186
|
+
"name": "print-tool-calls",
|
|
187
|
+
"allowNo": false,
|
|
188
|
+
"type": "boolean"
|
|
190
189
|
}
|
|
191
190
|
},
|
|
192
191
|
"hasDynamicHelp": false,
|
|
193
192
|
"hiddenAliases": [],
|
|
194
|
-
"id": "
|
|
193
|
+
"id": "develop",
|
|
195
194
|
"pluginAlias": "ray",
|
|
196
195
|
"pluginName": "ray",
|
|
197
196
|
"pluginType": "core",
|
|
@@ -201,7 +200,7 @@
|
|
|
201
200
|
"relativePath": [
|
|
202
201
|
"dist",
|
|
203
202
|
"commands",
|
|
204
|
-
"
|
|
203
|
+
"develop",
|
|
205
204
|
"index.js"
|
|
206
205
|
]
|
|
207
206
|
},
|
|
@@ -313,10 +312,10 @@
|
|
|
313
312
|
"index.js"
|
|
314
313
|
]
|
|
315
314
|
},
|
|
316
|
-
"
|
|
315
|
+
"lint": {
|
|
317
316
|
"aliases": [],
|
|
318
317
|
"args": {},
|
|
319
|
-
"description": "
|
|
318
|
+
"description": "Validate the extension manifest and metadata, and lint its source code",
|
|
320
319
|
"flags": {
|
|
321
320
|
"exit-on-error": {
|
|
322
321
|
"aliases": [
|
|
@@ -368,11 +367,35 @@
|
|
|
368
367
|
"x-internal"
|
|
369
368
|
],
|
|
370
369
|
"type": "option"
|
|
370
|
+
},
|
|
371
|
+
"fix": {
|
|
372
|
+
"char": "f",
|
|
373
|
+
"description": "Attempt to fix linting issues",
|
|
374
|
+
"name": "fix",
|
|
375
|
+
"allowNo": false,
|
|
376
|
+
"type": "boolean"
|
|
377
|
+
},
|
|
378
|
+
"relaxed": {
|
|
379
|
+
"char": "r",
|
|
380
|
+
"description": "Use relaxed linting mode to skip validation of: package.json schema, icons and metadata.",
|
|
381
|
+
"name": "relaxed",
|
|
382
|
+
"allowNo": false,
|
|
383
|
+
"type": "boolean"
|
|
384
|
+
},
|
|
385
|
+
"schema": {
|
|
386
|
+
"char": "s",
|
|
387
|
+
"description": "Path to JSON schema for package.json validation \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
|
|
388
|
+
"hidden": true,
|
|
389
|
+
"name": "schema",
|
|
390
|
+
"default": "https://www.raycast.com/schemas/extension.json",
|
|
391
|
+
"hasDynamicHelp": false,
|
|
392
|
+
"multiple": false,
|
|
393
|
+
"type": "option"
|
|
371
394
|
}
|
|
372
395
|
},
|
|
373
396
|
"hasDynamicHelp": false,
|
|
374
397
|
"hiddenAliases": [],
|
|
375
|
-
"id": "
|
|
398
|
+
"id": "lint",
|
|
376
399
|
"pluginAlias": "ray",
|
|
377
400
|
"pluginName": "ray",
|
|
378
401
|
"pluginType": "core",
|
|
@@ -382,14 +405,14 @@
|
|
|
382
405
|
"relativePath": [
|
|
383
406
|
"dist",
|
|
384
407
|
"commands",
|
|
385
|
-
"
|
|
408
|
+
"lint",
|
|
386
409
|
"index.js"
|
|
387
410
|
]
|
|
388
411
|
},
|
|
389
|
-
"
|
|
412
|
+
"login": {
|
|
390
413
|
"aliases": [],
|
|
391
414
|
"args": {},
|
|
392
|
-
"description": "Log
|
|
415
|
+
"description": "Log into your Raycast account",
|
|
393
416
|
"flags": {
|
|
394
417
|
"exit-on-error": {
|
|
395
418
|
"aliases": [
|
|
@@ -445,7 +468,7 @@
|
|
|
445
468
|
},
|
|
446
469
|
"hasDynamicHelp": false,
|
|
447
470
|
"hiddenAliases": [],
|
|
448
|
-
"id": "
|
|
471
|
+
"id": "login",
|
|
449
472
|
"pluginAlias": "ray",
|
|
450
473
|
"pluginName": "ray",
|
|
451
474
|
"pluginType": "core",
|
|
@@ -455,14 +478,14 @@
|
|
|
455
478
|
"relativePath": [
|
|
456
479
|
"dist",
|
|
457
480
|
"commands",
|
|
458
|
-
"
|
|
481
|
+
"login",
|
|
459
482
|
"index.js"
|
|
460
483
|
]
|
|
461
484
|
},
|
|
462
|
-
"
|
|
485
|
+
"logout": {
|
|
463
486
|
"aliases": [],
|
|
464
487
|
"args": {},
|
|
465
|
-
"description": "
|
|
488
|
+
"description": "Log out of your Raycast account",
|
|
466
489
|
"flags": {
|
|
467
490
|
"exit-on-error": {
|
|
468
491
|
"aliases": [
|
|
@@ -514,31 +537,21 @@
|
|
|
514
537
|
"x-internal"
|
|
515
538
|
],
|
|
516
539
|
"type": "option"
|
|
517
|
-
},
|
|
518
|
-
"path": {
|
|
519
|
-
"char": "p",
|
|
520
|
-
"description": "Path to extension root",
|
|
521
|
-
"name": "path",
|
|
522
|
-
"default": ".",
|
|
523
|
-
"hasDynamicHelp": false,
|
|
524
|
-
"multiple": false,
|
|
525
|
-
"type": "option"
|
|
526
540
|
}
|
|
527
541
|
},
|
|
528
542
|
"hasDynamicHelp": false,
|
|
529
543
|
"hiddenAliases": [],
|
|
530
|
-
"id": "
|
|
544
|
+
"id": "logout",
|
|
531
545
|
"pluginAlias": "ray",
|
|
532
546
|
"pluginName": "ray",
|
|
533
547
|
"pluginType": "core",
|
|
534
548
|
"strict": true,
|
|
535
|
-
"summary": "Migrate the extension to a newer version of the Raycast API",
|
|
536
549
|
"enableJsonFlag": false,
|
|
537
550
|
"isESM": false,
|
|
538
551
|
"relativePath": [
|
|
539
552
|
"dist",
|
|
540
553
|
"commands",
|
|
541
|
-
"
|
|
554
|
+
"logout",
|
|
542
555
|
"index.js"
|
|
543
556
|
]
|
|
544
557
|
},
|
|
@@ -622,6 +635,89 @@
|
|
|
622
635
|
"index.js"
|
|
623
636
|
]
|
|
624
637
|
},
|
|
638
|
+
"migrate": {
|
|
639
|
+
"aliases": [],
|
|
640
|
+
"args": {},
|
|
641
|
+
"description": "Migrate the extension to a newer version of the Raycast API\nInternally, the command makes use of https://www.npmjs.com/package/@raycast/migration",
|
|
642
|
+
"flags": {
|
|
643
|
+
"exit-on-error": {
|
|
644
|
+
"aliases": [
|
|
645
|
+
"exitOnError"
|
|
646
|
+
],
|
|
647
|
+
"deprecateAliases": true,
|
|
648
|
+
"helpGroup": "GLOBAL",
|
|
649
|
+
"name": "exit-on-error",
|
|
650
|
+
"summary": "Always exit with non-zero code on error",
|
|
651
|
+
"allowNo": true,
|
|
652
|
+
"type": "boolean"
|
|
653
|
+
},
|
|
654
|
+
"emoji": {
|
|
655
|
+
"helpGroup": "GLOBAL",
|
|
656
|
+
"name": "emoji",
|
|
657
|
+
"summary": "Prefix output with emojis 🌈",
|
|
658
|
+
"allowNo": false,
|
|
659
|
+
"type": "boolean"
|
|
660
|
+
},
|
|
661
|
+
"help": {
|
|
662
|
+
"helpGroup": "GLOBAL",
|
|
663
|
+
"name": "help",
|
|
664
|
+
"summary": "Show the help message for the command",
|
|
665
|
+
"allowNo": false,
|
|
666
|
+
"type": "boolean"
|
|
667
|
+
},
|
|
668
|
+
"non-interactive": {
|
|
669
|
+
"char": "I",
|
|
670
|
+
"helpGroup": "GLOBAL",
|
|
671
|
+
"name": "non-interactive",
|
|
672
|
+
"summary": "Disable interactive outputs, useful for CI",
|
|
673
|
+
"allowNo": false,
|
|
674
|
+
"type": "boolean"
|
|
675
|
+
},
|
|
676
|
+
"target": {
|
|
677
|
+
"char": "t",
|
|
678
|
+
"description": "Raycast app target",
|
|
679
|
+
"helpGroup": "GLOBAL",
|
|
680
|
+
"hidden": true,
|
|
681
|
+
"name": "target",
|
|
682
|
+
"hasDynamicHelp": false,
|
|
683
|
+
"multiple": false,
|
|
684
|
+
"options": [
|
|
685
|
+
"debug",
|
|
686
|
+
"internal",
|
|
687
|
+
"release",
|
|
688
|
+
"x",
|
|
689
|
+
"x-development",
|
|
690
|
+
"x-internal"
|
|
691
|
+
],
|
|
692
|
+
"type": "option"
|
|
693
|
+
},
|
|
694
|
+
"path": {
|
|
695
|
+
"char": "p",
|
|
696
|
+
"description": "Path to extension root",
|
|
697
|
+
"name": "path",
|
|
698
|
+
"default": ".",
|
|
699
|
+
"hasDynamicHelp": false,
|
|
700
|
+
"multiple": false,
|
|
701
|
+
"type": "option"
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
"hasDynamicHelp": false,
|
|
705
|
+
"hiddenAliases": [],
|
|
706
|
+
"id": "migrate",
|
|
707
|
+
"pluginAlias": "ray",
|
|
708
|
+
"pluginName": "ray",
|
|
709
|
+
"pluginType": "core",
|
|
710
|
+
"strict": true,
|
|
711
|
+
"summary": "Migrate the extension to a newer version of the Raycast API",
|
|
712
|
+
"enableJsonFlag": false,
|
|
713
|
+
"isESM": false,
|
|
714
|
+
"relativePath": [
|
|
715
|
+
"dist",
|
|
716
|
+
"commands",
|
|
717
|
+
"migrate",
|
|
718
|
+
"index.js"
|
|
719
|
+
]
|
|
720
|
+
},
|
|
625
721
|
"publish": {
|
|
626
722
|
"aliases": [],
|
|
627
723
|
"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.
|
|
1147
|
+
"version": "1.103.9"
|
|
1148
1148
|
}
|