@raycast/api 1.96.2 → 1.97.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/dist/api/evals.js +2 -2
- package/dist/commands/develop/index.js +1 -1
- package/dist/commands/lint/index.js +1 -1
- package/dist/commands/logout/index.js +1 -1
- package/dist/commands/publish/index.js +2 -2
- package/dist/commands/token/index.js +4 -4
- package/dist/commands/validate/index.js +1 -1
- package/dist/commands/version/index.js +1 -1
- package/dist/config.js +1 -1
- package/dist/utils/raycast-app-communication.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +59 -8
package/dist/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.create;var o=Object.defineProperty;var
|
|
1
|
+
"use strict";var A=Object.create;var o=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},g=(e,t,n,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of N(t))!T.call(e,s)&&s!==n&&o(e,s,{get:()=>t[s],enumerable:!(p=I(t,s))||p.enumerable});return e};var c=(e,t,n)=>(n=e!=null?A(k(e)):{},g(t||!e||!e.__esModule?o(n,"default",{value:e,enumerable:!0}):n,e)),D=e=>g(o({},"__esModule",{value:!0}),e);var L={};C(L,{API_ENV:()=>d,extensionBuildDirectory:()=>w,getConfig:()=>b,initConfig:()=>S,raycastAppScheme:()=>v,raycastBundleID:()=>R,raycastConfigDirectory:()=>l,setConfig:()=>U});module.exports=D(L);var a=c(require("node:fs")),i=c(require("node:path")),x=c(require("node:os"));var m=c(require("node:path")),h=c(require("node:fs"));function y(){let e;try{e=m.resolve("package.json")}catch(n){throw new Error(`cannot resolve package manifest path: ${n}`)}let t;try{t=JSON.parse(h.readFileSync(e,"utf8"))}catch(n){throw new Error(`cannot read package manifest: ${n}`)}return t.name=t.name.replace(/^@workaround/g,""),t}var d={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"],E="e69bae0ec90f5e838555",r={},f;function w(){let e=y();if(!e.name)throw new Error("extension name in manifest cannot be empty");return i.join(l(),"extensions",e.name)}function R(){let e=u(f);return e?.startsWith("x")?e==="x"?"com.raycast-x.macos":`com.raycast-x.macos.${e.replace("x-","")}`:e?`com.raycast.macos.${e}`:"com.raycast.macos"}function v(){let e=u(f);return e?.startsWith("x")?e==="x"?"com.raycast-x":`com.raycast-x.${e.replace("x-","")}`:`raycast${e}`}function S(e){f=e;try{r=JSON.parse(a.readFileSync(i.join(l(),"config.json"),"utf8"))}catch(t){if(t instanceof Error&&t.code==="ENOENT")return;throw new Error(`Failed to read config file: ${t}`)}}function b(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||r.APIURL||d.url;case"raycastAccessToken":return process.env.RAY_TOKEN||r.Token||r.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||r.ClientID||d.clientID;case"githubClientId":return process.env.RAY_GithubClientID||r.GithubClientID||E;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||r.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target||(typeof r.Target>"u"?u("release"):r.Target)}}function U(e,t){switch(e){case"raycastApiURL":t===void 0?delete r.APIURL:r.APIURL=t;break;case"raycastAccessToken":t===void 0?delete r.Token:r.Token=t,delete r.AccessToken;break;case"raycastClientId":t===void 0?delete r.ClientID:r.ClientID=t;break;case"githubAccessToken":t===void 0?delete r.GithubAccessToken:r.GithubAccessToken=t;break;case"flavorName":t===void 0?delete r.Target:r.Target=t;break}let n=l();a.writeFileSync(i.join(n,"config.json"),JSON.stringify(r,null," "),"utf8")}function u(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-debug":return"x-debug";case void 0:return b("flavorName")}}function G(){let e=u(f);return e==""?"raycast":`raycast-${e}`}function l(){let e=i.join(x.default.homedir(),".config",G());return a.mkdirSync(e,{recursive:!0}),e}0&&(module.exports={API_ENV,extensionBuildDirectory,getConfig,initConfig,raycastAppScheme,raycastBundleID,raycastConfigDirectory,setConfig});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var pe=Object.create;var E=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var he=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty;var y=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),we=(e,r)=>{for(var t in r)E(e,t,{get:r[t],enumerable:!0})},U=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of me(r))!ye.call(e,s)&&s!==t&&E(e,s,{get:()=>r[s],enumerable:!(i=ge(r,s))||i.enumerable});return e};var p=(e,r,t)=>(t=e!=null?pe(he(e)):{},U(r||!e||!e.__esModule?E(t,"default",{value:e,enumerable:!0}):t,e)),xe=e=>U(E({},"__esModule",{value:!0}),e);var J=y((ze,H)=>{var ke=require("node:tty"),Ce=ke?.WriteStream?.prototype?.hasColors?.()??!1,o=(e,r)=>{if(!Ce)return s=>s;let t=`\x1B[${e}m`,i=`\x1B[${r}m`;return s=>{let a=s+"",c=a.indexOf(i);if(c===-1)return t+a+i;let f=t,u=0;for(;c!==-1;)f+=a.slice(u,c)+t,u=c+i.length,c=a.indexOf(i,u);return f+=a.slice(u)+i,f}},n={};n.reset=o(0,0);n.bold=o(1,22);n.dim=o(2,22);n.italic=o(3,23);n.underline=o(4,24);n.overline=o(53,55);n.inverse=o(7,27);n.hidden=o(8,28);n.strikethrough=o(9,29);n.black=o(30,39);n.red=o(31,39);n.green=o(32,39);n.yellow=o(33,39);n.blue=o(34,39);n.magenta=o(35,39);n.cyan=o(36,39);n.white=o(37,39);n.gray=o(90,39);n.bgBlack=o(40,49);n.bgRed=o(41,49);n.bgGreen=o(42,49);n.bgYellow=o(43,49);n.bgBlue=o(44,49);n.bgMagenta=o(45,49);n.bgCyan=o(46,49);n.bgWhite=o(47,49);n.bgGray=o(100,49);n.redBright=o(91,39);n.greenBright=o(92,39);n.yellowBright=o(93,39);n.blueBright=o(94,39);n.magentaBright=o(95,39);n.cyanBright=o(96,39);n.whiteBright=o(97,39);n.bgRedBright=o(101,49);n.bgGreenBright=o(102,49);n.bgYellowBright=o(103,49);n.bgBlueBright=o(104,49);n.bgMagentaBright=o(105,49);n.bgCyanBright=o(106,49);n.bgWhiteBright=o(107,49);H.exports=n});var O=y((er,Z)=>{"use strict";var z=require("fs"),B;function $e(){try{return z.statSync("/.dockerenv"),!0}catch{return!1}}function Pe(){try{return z.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Z.exports=()=>(B===void 0&&(B=$e()||Pe()),B)});var re=y((rr,F)=>{"use strict";var Se=require("os"),Te=require("fs"),Q=O(),ee=()=>{if(process.platform!=="linux")return!1;if(Se.release().toLowerCase().includes("microsoft"))return!Q();try{return Te.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Q():!1}catch{return!1}};process.env.__IS_WSL_TEST__?F.exports=ee:F.exports=ee()});var ne=y((tr,te)=>{"use strict";te.exports=(e,r,t)=>{let i=s=>Object.defineProperty(e,r,{value:s,enumerable:!0,writable:!0});return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){let s=t();return i(s),s},set(s){i(s)}}),e}});var le=y((nr,ue)=>{var Ne=require("path"),De=require("child_process"),{promises:$,constants:ce}=require("fs"),v=re(),Be=O(),_=ne(),oe=Ne.join(__dirname,"xdg-open"),{platform:h,arch:se}=process,Oe=()=>{try{return $.statSync("/run/.containerenv"),!0}catch{return!1}},R;function Fe(){return R===void 0&&(R=Oe()||Be()),R}var Re=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let t="/etc/wsl.conf",i=!1;try{await $.access(t,ce.F_OK),i=!0}catch{}if(!i)return e;let s=await $.readFile(t,{encoding:"utf8"}),a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(s);return a?(r=a.groups.mountPoint.trim(),r=r.endsWith("/")?r:`${r}/`,r):e}})(),ie=async(e,r)=>{let t;for(let i of e)try{return await r(i)}catch(s){t=s}throw t},P=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return ie(e.app,f=>P({...e,app:f}));let{name:r,arguments:t=[]}=e.app||{};if(t=[...t],Array.isArray(r))return ie(r,f=>P({...e,app:{name:f,arguments:t}}));let i,s=[],a={};if(h==="darwin")i="open",e.wait&&s.push("--wait-apps"),e.background&&s.push("--background"),e.newInstance&&s.push("--new"),r&&s.push("-a",r);else if(h==="win32"||v&&!Fe()&&!r){let f=await Re();i=v?`${f}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,s.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),v||(a.windowsVerbatimArguments=!0);let u=["Start"];e.wait&&u.push("-Wait"),r?(u.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&t.unshift(e.target)):e.target&&u.push(`"${e.target}"`),t.length>0&&(t=t.map(m=>`"\`"${m}\`""`),u.push(t.join(","))),e.target=Buffer.from(u.join(" "),"utf16le").toString("base64")}else{if(r)i=r;else{let f=!__dirname||__dirname==="/",u=!1;try{await $.access(oe,ce.X_OK),u=!0}catch{}i=process.versions.electron||h==="android"||f||!u?"xdg-open":oe}t.length>0&&s.push(...t),e.wait||(a.stdio="ignore",a.detached=!0)}e.target&&s.push(e.target),h==="darwin"&&t.length>0&&s.push("--args",...t);let c=De.spawn(i,s,a);return e.wait?new Promise((f,u)=>{c.once("error",u),c.once("close",m=>{if(!e.allowNonzeroExitCode&&m>0){u(new Error(`Exited with code ${m}`));return}f(c)})}):(c.unref(),c)},G=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return P({...r,target:e})},_e=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=r||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return P({...r,app:{name:e,arguments:t}})};function ae(e){if(typeof e=="string"||Array.isArray(e))return e;let{[se]:r}=e;if(!r)throw new Error(`${se} is not supported`);return r}function M({[h]:e},{wsl:r}){if(r&&v)return ae(r);if(!e)throw new Error(`${h} is not supported`);return ae(e)}var S={};_(S,"chrome",()=>M({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));_(S,"firefox",()=>M({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));_(S,"edge",()=>M({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));G.apps=S;G.openApp=_e;ue.exports=G});var qe={};we(qe,{commFilePath:()=>L,notifyRaycast:()=>Ge,updatePid:()=>de});module.exports=xe(qe);var b=require("node:child_process"),d=p(require("node:fs")),I=p(require("node:path"));var k=p(require("node:fs")),T=p(require("node:path")),K=p(require("node:os"));var q=p(require("node:path")),W=p(require("node:fs"));function A(){let e;try{e=q.resolve("package.json")}catch(t){throw new Error(`cannot resolve package manifest path: ${t}`)}let r;try{r=JSON.parse(W.readFileSync(e,"utf8"))}catch(t){throw new Error(`cannot read package manifest: ${t}`)}return r.name=r.name.replace(/^@workaround/g,""),r}var Y={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"],be="e69bae0ec90f5e838555",g={},N;function w(){let e=A();if(!e.name)throw new Error("extension name in manifest cannot be empty");return T.join(Ae(),"extensions",e.name)}function V(){let e=C(N);return e?.startsWith("x")?e==="x"?"com.raycast-x.macos":`com.raycast-x.macos.${e.replace("x-","")}`:e?`com.raycast.macos.${e}`:"com.raycast.macos"}function X(){return`raycast${C(N)}`}function Ie(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||g.APIURL||Y.url;case"raycastAccessToken":return process.env.RAY_TOKEN||g.Token||g.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||g.ClientID||Y.clientID;case"githubClientId":return process.env.RAY_GithubClientID||g.GithubClientID||be;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||g.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target||(typeof g.Target>"u"?C("release"):g.Target)}}function C(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-debug":return"x-debug";case void 0:return Ie("flavorName")}}function Ee(){let e=C(N);return e==""?"raycast":`raycast-${e}`}function Ae(){let e=T.join(K.default.homedir(),".config",Ee());return k.mkdirSync(e,{recursive:!0}),e}var l=p(J());var Ze=(0,l.blue)((0,l.dim)("internal only"));function D(e,r,t){console.log(ve[e]+r),typeof t?.exit<"u"&&process.exit(t.exit)}var ve={wait:`\u{1F550}${(0,l.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,l.cyan)("info")} - `,success:`\u2705${(0,l.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,l.yellow)("warn")} - `,error:`\u{1F4A5}${(0,l.red)("error")} - `,event:`\u26A1\uFE0F${(0,l.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,l.yellowBright)("plan")} - `};var fe=p(le());async function Ge(e,r){let t=!1;switch(e){case"start":{Le(),de(),Me();break}case"stop":{try{d.unlinkSync(L("log"))}catch{}try{d.unlinkSync(L("pid"))}catch{}return}default:t=!0}let i;try{i=A()}catch{return}Ue()||D("warn","Raycast is not running"),t?je(i.name,e,r):await j(i.name,e,r)}function L(e){return I.join(w(),e==="log"?"dev.log":"cli.pid")}function de(){let e=w();try{d.mkdirSync(e,{recursive:!0})}catch(t){throw new Error(`cannot create output directory (${t.message})`)}let r=process.pid.toString();try{d.writeFileSync(I.join(e,"cli.pid"),r,{mode:420})}catch(t){throw new Error(`cannot write pid file (${t.message})`)}}function Me(){let e=w();try{d.mkdirSync(e,{recursive:!0})}catch(r){throw new Error(`cannot create output directory (${r.message})`)}try{d.writeFileSync(I.join(e,"dev.log"),"")}catch(r){throw new Error(`cannot write log file (${r.message})`)}}function Le(){let e=I.join(w(),"cli.pid");try{let t=d.readFileSync(e,"utf8").trim();process.platform==="win32"?(0,b.execSync)(`taskkill /F /PID ${t}`):(0,b.execSync)(`kill -9 ${t}`,{shell:"/bin/sh"})}catch{}}var x=null;function je(e,r,t){x?(clearTimeout(x),x=setTimeout(()=>{j(e,r,t)},300)):(j(e,r,t),x=setTimeout(()=>{x=null},300))}async function j(e,r,t){let i=process.cwd(),s=`${X()}://cli/${e}/${r}?cwd=${encodeURIComponent(i)}&info=${encodeURIComponent(t||"")}`;try{await(0,fe.default)(s,{background:!0})}catch(a){D("error",`cannot notify Raycast (${a.message})`)}}function Ue(){if(process.platform==="win32")return(0,b.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe");{let r=V(),t="ps -e -o args | grep -v grep | grep -i contents/macos/raycast",i;try{i=(0,b.execSync)(t,{shell:"/bin/sh",encoding:"utf8"})}catch{return!1}let s=i.trim();if(s==="")return!1;let a=s.split(`
|
|
1
|
+
"use strict";var pe=Object.create;var E=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var he=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty;var y=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),we=(e,r)=>{for(var t in r)E(e,t,{get:r[t],enumerable:!0})},U=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of me(r))!ye.call(e,o)&&o!==t&&E(e,o,{get:()=>r[o],enumerable:!(i=ge(r,o))||i.enumerable});return e};var p=(e,r,t)=>(t=e!=null?pe(he(e)):{},U(r||!e||!e.__esModule?E(t,"default",{value:e,enumerable:!0}):t,e)),xe=e=>U(E({},"__esModule",{value:!0}),e);var J=y((ze,H)=>{var ke=require("node:tty"),Ce=ke?.WriteStream?.prototype?.hasColors?.()??!1,s=(e,r)=>{if(!Ce)return o=>o;let t=`\x1B[${e}m`,i=`\x1B[${r}m`;return o=>{let a=o+"",c=a.indexOf(i);if(c===-1)return t+a+i;let f=t,u=0;for(;c!==-1;)f+=a.slice(u,c)+t,u=c+i.length,c=a.indexOf(i,u);return f+=a.slice(u)+i,f}},n={};n.reset=s(0,0);n.bold=s(1,22);n.dim=s(2,22);n.italic=s(3,23);n.underline=s(4,24);n.overline=s(53,55);n.inverse=s(7,27);n.hidden=s(8,28);n.strikethrough=s(9,29);n.black=s(30,39);n.red=s(31,39);n.green=s(32,39);n.yellow=s(33,39);n.blue=s(34,39);n.magenta=s(35,39);n.cyan=s(36,39);n.white=s(37,39);n.gray=s(90,39);n.bgBlack=s(40,49);n.bgRed=s(41,49);n.bgGreen=s(42,49);n.bgYellow=s(43,49);n.bgBlue=s(44,49);n.bgMagenta=s(45,49);n.bgCyan=s(46,49);n.bgWhite=s(47,49);n.bgGray=s(100,49);n.redBright=s(91,39);n.greenBright=s(92,39);n.yellowBright=s(93,39);n.blueBright=s(94,39);n.magentaBright=s(95,39);n.cyanBright=s(96,39);n.whiteBright=s(97,39);n.bgRedBright=s(101,49);n.bgGreenBright=s(102,49);n.bgYellowBright=s(103,49);n.bgBlueBright=s(104,49);n.bgMagentaBright=s(105,49);n.bgCyanBright=s(106,49);n.bgWhiteBright=s(107,49);H.exports=n});var O=y((er,Z)=>{"use strict";var z=require("fs"),B;function ve(){try{return z.statSync("/.dockerenv"),!0}catch{return!1}}function Pe(){try{return z.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Z.exports=()=>(B===void 0&&(B=ve()||Pe()),B)});var re=y((rr,F)=>{"use strict";var Se=require("os"),Te=require("fs"),Q=O(),ee=()=>{if(process.platform!=="linux")return!1;if(Se.release().toLowerCase().includes("microsoft"))return!Q();try{return Te.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Q():!1}catch{return!1}};process.env.__IS_WSL_TEST__?F.exports=ee:F.exports=ee()});var ne=y((tr,te)=>{"use strict";te.exports=(e,r,t)=>{let i=o=>Object.defineProperty(e,r,{value:o,enumerable:!0,writable:!0});return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){let o=t();return i(o),o},set(o){i(o)}}),e}});var le=y((nr,ue)=>{var Ne=require("path"),De=require("child_process"),{promises:v,constants:ce}=require("fs"),$=re(),Be=O(),_=ne(),se=Ne.join(__dirname,"xdg-open"),{platform:h,arch:oe}=process,Oe=()=>{try{return v.statSync("/run/.containerenv"),!0}catch{return!1}},R;function Fe(){return R===void 0&&(R=Oe()||Be()),R}var Re=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let t="/etc/wsl.conf",i=!1;try{await v.access(t,ce.F_OK),i=!0}catch{}if(!i)return e;let o=await v.readFile(t,{encoding:"utf8"}),a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(o);return a?(r=a.groups.mountPoint.trim(),r=r.endsWith("/")?r:`${r}/`,r):e}})(),ie=async(e,r)=>{let t;for(let i of e)try{return await r(i)}catch(o){t=o}throw t},P=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return ie(e.app,f=>P({...e,app:f}));let{name:r,arguments:t=[]}=e.app||{};if(t=[...t],Array.isArray(r))return ie(r,f=>P({...e,app:{name:f,arguments:t}}));let i,o=[],a={};if(h==="darwin")i="open",e.wait&&o.push("--wait-apps"),e.background&&o.push("--background"),e.newInstance&&o.push("--new"),r&&o.push("-a",r);else if(h==="win32"||$&&!Fe()&&!r){let f=await Re();i=$?`${f}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,o.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),$||(a.windowsVerbatimArguments=!0);let u=["Start"];e.wait&&u.push("-Wait"),r?(u.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&t.unshift(e.target)):e.target&&u.push(`"${e.target}"`),t.length>0&&(t=t.map(m=>`"\`"${m}\`""`),u.push(t.join(","))),e.target=Buffer.from(u.join(" "),"utf16le").toString("base64")}else{if(r)i=r;else{let f=!__dirname||__dirname==="/",u=!1;try{await v.access(se,ce.X_OK),u=!0}catch{}i=process.versions.electron||h==="android"||f||!u?"xdg-open":se}t.length>0&&o.push(...t),e.wait||(a.stdio="ignore",a.detached=!0)}e.target&&o.push(e.target),h==="darwin"&&t.length>0&&o.push("--args",...t);let c=De.spawn(i,o,a);return e.wait?new Promise((f,u)=>{c.once("error",u),c.once("close",m=>{if(!e.allowNonzeroExitCode&&m>0){u(new Error(`Exited with code ${m}`));return}f(c)})}):(c.unref(),c)},G=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return P({...r,target:e})},_e=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=r||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return P({...r,app:{name:e,arguments:t}})};function ae(e){if(typeof e=="string"||Array.isArray(e))return e;let{[oe]:r}=e;if(!r)throw new Error(`${oe} is not supported`);return r}function M({[h]:e},{wsl:r}){if(r&&$)return ae(r);if(!e)throw new Error(`${h} is not supported`);return ae(e)}var S={};_(S,"chrome",()=>M({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));_(S,"firefox",()=>M({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));_(S,"edge",()=>M({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));G.apps=S;G.openApp=_e;ue.exports=G});var qe={};we(qe,{commFilePath:()=>L,notifyRaycast:()=>Ge,updatePid:()=>de});module.exports=xe(qe);var b=require("node:child_process"),d=p(require("node:fs")),I=p(require("node:path"));var k=p(require("node:fs")),T=p(require("node:path")),K=p(require("node:os"));var q=p(require("node:path")),W=p(require("node:fs"));function A(){let e;try{e=q.resolve("package.json")}catch(t){throw new Error(`cannot resolve package manifest path: ${t}`)}let r;try{r=JSON.parse(W.readFileSync(e,"utf8"))}catch(t){throw new Error(`cannot read package manifest: ${t}`)}return r.name=r.name.replace(/^@workaround/g,""),r}var Y={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"],be="e69bae0ec90f5e838555",g={},N;function w(){let e=A();if(!e.name)throw new Error("extension name in manifest cannot be empty");return T.join(Ae(),"extensions",e.name)}function V(){let e=C(N);return e?.startsWith("x")?e==="x"?"com.raycast-x.macos":`com.raycast-x.macos.${e.replace("x-","")}`:e?`com.raycast.macos.${e}`:"com.raycast.macos"}function X(){let e=C(N);return e?.startsWith("x")?e==="x"?"com.raycast-x":`com.raycast-x.${e.replace("x-","")}`:`raycast${e}`}function Ie(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||g.APIURL||Y.url;case"raycastAccessToken":return process.env.RAY_TOKEN||g.Token||g.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||g.ClientID||Y.clientID;case"githubClientId":return process.env.RAY_GithubClientID||g.GithubClientID||be;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||g.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target||(typeof g.Target>"u"?C("release"):g.Target)}}function C(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-debug":return"x-debug";case void 0:return Ie("flavorName")}}function Ee(){let e=C(N);return e==""?"raycast":`raycast-${e}`}function Ae(){let e=T.join(K.default.homedir(),".config",Ee());return k.mkdirSync(e,{recursive:!0}),e}var l=p(J());var Ze=(0,l.blue)((0,l.dim)("internal only"));function D(e,r,t){console.log($e[e]+r),typeof t?.exit<"u"&&process.exit(t.exit)}var $e={wait:`\u{1F550}${(0,l.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,l.cyan)("info")} - `,success:`\u2705${(0,l.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,l.yellow)("warn")} - `,error:`\u{1F4A5}${(0,l.red)("error")} - `,event:`\u26A1\uFE0F${(0,l.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,l.yellowBright)("plan")} - `};var fe=p(le());async function Ge(e,r){let t=!1;switch(e){case"start":{Le(),de(),Me();break}case"stop":{try{d.unlinkSync(L("log"))}catch{}try{d.unlinkSync(L("pid"))}catch{}return}default:t=!0}let i;try{i=A()}catch{return}Ue()||D("warn","Raycast is not running"),t?je(i.name,e,r):await j(i.name,e,r)}function L(e){return I.join(w(),e==="log"?"dev.log":"cli.pid")}function de(){let e=w();try{d.mkdirSync(e,{recursive:!0})}catch(t){throw new Error(`cannot create output directory (${t.message})`)}let r=process.pid.toString();try{d.writeFileSync(I.join(e,"cli.pid"),r,{mode:420})}catch(t){throw new Error(`cannot write pid file (${t.message})`)}}function Me(){let e=w();try{d.mkdirSync(e,{recursive:!0})}catch(r){throw new Error(`cannot create output directory (${r.message})`)}try{d.writeFileSync(I.join(e,"dev.log"),"")}catch(r){throw new Error(`cannot write log file (${r.message})`)}}function Le(){let e=I.join(w(),"cli.pid");try{let t=d.readFileSync(e,"utf8").trim();process.platform==="win32"?(0,b.execSync)(`taskkill /F /PID ${t}`):(0,b.execSync)(`kill -9 ${t}`,{shell:"/bin/sh"})}catch{}}var x=null;function je(e,r,t){x?(clearTimeout(x),x=setTimeout(()=>{j(e,r,t)},300)):(j(e,r,t),x=setTimeout(()=>{x=null},300))}async function j(e,r,t){let i=process.cwd(),o=`${X()}://cli/${e}/${r}?cwd=${encodeURIComponent(i)}&info=${encodeURIComponent(t||"")}`;try{await(0,fe.default)(o,{background:!0})}catch(a){D("error",`cannot notify Raycast (${a.message})`)}}function Ue(){if(process.platform==="win32")return(0,b.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe");{let r=V(),t="ps -e -o args | grep -v grep | grep -i contents/macos/raycast",i;try{i=(0,b.execSync)(t,{shell:"/bin/sh",encoding:"utf8"})}catch{return!1}let o=i.trim();if(o==="")return!1;let a=o.split(`
|
|
2
2
|
`);for(let c of a){let f=c.indexOf("/Contents/MacOS/Raycast");if(f>-1&&(c=c.substring(0,f)),!!d.existsSync(c))return!0}}return!1}0&&(module.exports={commFilePath,notifyRaycast,updatePid});
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -60,6 +60,12 @@ export declare namespace Action {
|
|
|
60
60
|
*/
|
|
61
61
|
export type Props = CreateSnippetProps;
|
|
62
62
|
}
|
|
63
|
+
export namespace InstallMCPServer {
|
|
64
|
+
/**
|
|
65
|
+
* Props of the {@link Action.InstallMCPServer} React component.
|
|
66
|
+
*/
|
|
67
|
+
export type Props = InstallMCPServerProps;
|
|
68
|
+
}
|
|
63
69
|
export namespace Open {
|
|
64
70
|
/**
|
|
65
71
|
* Props of the {@link Action.Open} React component.
|
|
@@ -491,12 +497,17 @@ export declare namespace AI {
|
|
|
491
497
|
export enum Model {
|
|
492
498
|
OpenAI_GPT4 = "openai-gpt-4",
|
|
493
499
|
"OpenAI_GPT4-turbo" = "openai-gpt-4-turbo",
|
|
500
|
+
"OpenAI_GPT4.1" = "openai-gpt-4.1",
|
|
501
|
+
"OpenAI_GPT4.1-nano" = "openai-gpt-4.1-nano",
|
|
502
|
+
"OpenAI_GPT4.1-mini" = "openai-gpt-4.1-mini",
|
|
494
503
|
OpenAI_GPT4o = "openai-gpt-4o",
|
|
495
504
|
"OpenAI_GPT4o-mini" = "openai-gpt-4o-mini",
|
|
496
505
|
"OpenAI_o1-preview" = "openai_o1-o1-preview",
|
|
497
506
|
"OpenAI_o1-mini" = "openai_o1-o1-mini",
|
|
498
507
|
"OpenAI_o3-mini" = "openai_o1-o3-mini",
|
|
508
|
+
"OpenAI_o4-mini" = "openai_o1-o4-mini",
|
|
499
509
|
OpenAI_o1 = "openai_o1-o1",
|
|
510
|
+
OpenAI_o3 = "openai_o1-o3",
|
|
500
511
|
Anthropic_Claude_Haiku = "anthropic-claude-haiku",
|
|
501
512
|
Anthropic_Claude_Opus = "anthropic-claude-opus",
|
|
502
513
|
Anthropic_Claude_Sonnet = "anthropic-claude-sonnet",
|
|
@@ -519,11 +530,11 @@ export declare namespace AI {
|
|
|
519
530
|
"DeepSeek_R1_Distill_Llama_3.3_70B" = "groq-deepseek-r1-distill-llama-70b",
|
|
520
531
|
"Google_Gemini_2.0_Flash" = "google-gemini-2.0-flash",
|
|
521
532
|
"Google_Gemini_2.0_Flash_Thinking" = "google-gemini-2.0-flash-thinking",
|
|
533
|
+
"Google_Gemini_2.5_Flash" = "google-gemini-2.5-flash",
|
|
522
534
|
"Google_Gemini_2.5_Pro" = "google-gemini-2.5-pro",
|
|
523
535
|
xAI_Grok_2 = "xai-grok-2-latest",
|
|
524
536
|
xAI_Grok_3 = "xai-grok-3",
|
|
525
537
|
xAI_Grok_3_Mini = "xai-grok-3-mini",
|
|
526
|
-
"Qwen_2.5_32B" = "groq-qwen-2.5-32b",
|
|
527
538
|
/** @deprecated Use `AI.Model["OpenAI_GPT4o-mini"]` instead */
|
|
528
539
|
"OpenAI_GPT3.5-turbo-instruct" = "openai-gpt-4o-mini",
|
|
529
540
|
/** @deprecated Use `AI.Model.Llama3_70B` instead */
|
|
@@ -561,7 +572,9 @@ export declare namespace AI {
|
|
|
561
572
|
/** @deprecated Use `AI.Model["Google_Gemini_2.0_Flash"]` instead */
|
|
562
573
|
"Google_Gemini_1.5_Pro" = "google-gemini-1.5-pro",
|
|
563
574
|
/** @deprecated Use `AI.Model.Mistral_Nemo` instead */
|
|
564
|
-
Mixtral_8x7B = "mistral-nemo"
|
|
575
|
+
Mixtral_8x7B = "mistral-nemo",
|
|
576
|
+
/** @deprecated Use `AI.Model.Mistral_Nemo` instead */
|
|
577
|
+
"Qwen_2.5_32B" = "groq-qwen-2.5-32b"
|
|
565
578
|
}
|
|
566
579
|
|
|
567
580
|
/** @deprecated Use the `AI.Model` enum instead */
|
|
@@ -1595,6 +1608,7 @@ declare interface ConvenienceActions {
|
|
|
1595
1608
|
* ```
|
|
1596
1609
|
*/
|
|
1597
1610
|
CreateQuicklink: typeof CreateQuicklink;
|
|
1611
|
+
|
|
1598
1612
|
/**
|
|
1599
1613
|
* Action that toggles the Quick Look to preview a file.
|
|
1600
1614
|
*
|
|
@@ -1732,7 +1746,7 @@ declare interface CreateQuicklinkProps {
|
|
|
1732
1746
|
}
|
|
1733
1747
|
|
|
1734
1748
|
/**
|
|
1735
|
-
* See {@link Action.
|
|
1749
|
+
* See {@link Action.CreateSnippet}
|
|
1736
1750
|
*/
|
|
1737
1751
|
declare const CreateSnippet: FunctionComponent<CreateSnippetProps>;
|
|
1738
1752
|
|
|
@@ -5762,7 +5776,7 @@ export declare namespace Keyboard {
|
|
|
5762
5776
|
* }
|
|
5763
5777
|
* ```
|
|
5764
5778
|
*/
|
|
5765
|
-
export
|
|
5779
|
+
export type Shortcut = {
|
|
5766
5780
|
/**
|
|
5767
5781
|
* The modifier keys of the keyboard shortcut.
|
|
5768
5782
|
*/
|
|
@@ -5771,7 +5785,28 @@ export declare namespace Keyboard {
|
|
|
5771
5785
|
* The key of the keyboard shortcut.
|
|
5772
5786
|
*/
|
|
5773
5787
|
key: KeyEquivalent;
|
|
5774
|
-
}
|
|
5788
|
+
} | {
|
|
5789
|
+
windows: {
|
|
5790
|
+
/**
|
|
5791
|
+
* The modifier keys of the keyboard shortcut.
|
|
5792
|
+
*/
|
|
5793
|
+
modifiers: KeyModifier[];
|
|
5794
|
+
/**
|
|
5795
|
+
* The key of the keyboard shortcut.
|
|
5796
|
+
*/
|
|
5797
|
+
key: KeyEquivalent;
|
|
5798
|
+
};
|
|
5799
|
+
macOS: {
|
|
5800
|
+
/**
|
|
5801
|
+
* The modifier keys of the keyboard shortcut.
|
|
5802
|
+
*/
|
|
5803
|
+
modifiers: KeyModifier[];
|
|
5804
|
+
/**
|
|
5805
|
+
* The key of the keyboard shortcut.
|
|
5806
|
+
*/
|
|
5807
|
+
key: KeyEquivalent;
|
|
5808
|
+
};
|
|
5809
|
+
};
|
|
5775
5810
|
export namespace Shortcut {
|
|
5776
5811
|
/**
|
|
5777
5812
|
* Shortcuts that are commonly used throughout Raycast. Use them to provide a consistent experience.
|
|
@@ -5860,8 +5895,7 @@ export declare namespace Keyboard {
|
|
|
5860
5895
|
/**
|
|
5861
5896
|
* @deprecated Use {@link Keyboard.Shortcut} instead
|
|
5862
5897
|
*/
|
|
5863
|
-
export declare
|
|
5864
|
-
}
|
|
5898
|
+
export declare type KeyboardShortcut = Keyboard.Shortcut;
|
|
5865
5899
|
|
|
5866
5900
|
/**
|
|
5867
5901
|
* @deprecated Use {@link Keyboard.KeyEquivalent} instead
|
|
@@ -7954,7 +7988,24 @@ declare interface LabelProps {
|
|
|
7954
7988
|
/**
|
|
7955
7989
|
* @deprecated Use the key directly
|
|
7956
7990
|
*/
|
|
7957
|
-
export declare const specialKeys:
|
|
7991
|
+
export declare const specialKeys: {
|
|
7992
|
+
return: string;
|
|
7993
|
+
delete: string;
|
|
7994
|
+
deleteForward: string;
|
|
7995
|
+
tab: string;
|
|
7996
|
+
arrowUp: string;
|
|
7997
|
+
arrowDown: string;
|
|
7998
|
+
arrowLeft: string;
|
|
7999
|
+
arrowRight: string;
|
|
8000
|
+
pageUp: string;
|
|
8001
|
+
pageDown: string;
|
|
8002
|
+
home: string;
|
|
8003
|
+
end: string;
|
|
8004
|
+
space: string;
|
|
8005
|
+
escape: string;
|
|
8006
|
+
enter: string;
|
|
8007
|
+
backspace: string;
|
|
8008
|
+
};
|
|
7958
8009
|
|
|
7959
8010
|
/**
|
|
7960
8011
|
* See {@link ActionPanel.Submenu}
|