@raycast/api 1.103.3 → 1.103.4
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/build/index.js +68 -68
- package/dist/commands/develop/index.js +69 -69
- package/dist/commands/migrate/index.js +14 -14
- package/dist/commands/publish/index.js +73 -73
- package/dist/commands/pull-contributions/index.js +20 -20
- package/dist/commands/token/index.js +4 -4
- package/dist/commands/version/index.js +1 -1
- package/dist/config.js +1 -1
- package/dist/utils/esbuild-plugins/rust-files.js +8 -8
- package/dist/utils/esbuild-plugins/swift-files.js +13 -13
- package/dist/utils/publish/publish-to-store.js +69 -69
- package/dist/utils/raycast-app-communication.js +1 -1
- package/oclif.manifest.json +82 -82
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var ge=Object.create;var A=Object.defineProperty;var me=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty;var y=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),xe=(e,r)=>{for(var t in r)A(e,t,{get:r[t],enumerable:!0})},q=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of he(r))!we.call(e,s)&&s!==t&&A(e,s,{get:()=>r[s],enumerable:!(i=me(r,s))||i.enumerable});return e};var d=(e,r,t)=>(t=e!=null?ge(ye(e)):{},q(r||!e||!e.__esModule?A(t,"default",{value:e,enumerable:!0}):t,e)),be=e=>q(A({},"__esModule",{value:!0}),e);var z=y((ze,J)=>{var ke=require("node:tty"),ve=ke?.WriteStream?.prototype?.hasColors?.()??!1,o=(e,r)=>{if(!ve)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,l=0,U=(r===22?i:"")+t;for(;c!==-1;)f+=a.slice(l,c)+U,l=c+i.length,c=a.indexOf(i,l);return f+=a.slice(l)+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);J.exports=n});var B=y((er,Q)=>{"use strict";var Z=require("fs"),D;function Pe(){try{return Z.statSync("/.dockerenv"),!0}catch{return!1}}function Se(){try{return Z.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Q.exports=()=>(D===void 0&&(D=Pe()||Se()),D)});var te=y((rr,F)=>{"use strict";var Te=require("os"),Ne=require("fs"),ee=B(),re=()=>{if(process.platform!=="linux")return!1;if(Te.release().toLowerCase().includes("microsoft"))return!ee();try{return Ne.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!ee():!1}catch{return!1}};process.env.__IS_WSL_TEST__?F.exports=re:F.exports=re()});var oe=y((tr,ne)=>{"use strict";ne.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 fe=y((nr,ue)=>{var Oe=require("path"),De=require("child_process"),{promises:$,constants:le}=require("fs"),v=te(),Be=B(),_=oe(),se=Oe.join(__dirname,"xdg-open"),{platform:h,arch:ie}=process,Fe=()=>{try{return $.statSync("/run/.containerenv"),!0}catch{return!1}},R;function Re(){return R===void 0&&(R=Fe()||Be()),R}var _e=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let t="/etc/wsl.conf",i=!1;try{await $.access(t,le.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}})(),ae=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 ae(e.app,f=>P({...e,app:f}));let{name:r,arguments:t=[]}=e.app||{};if(t=[...t],Array.isArray(r))return ae(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&&!Re()&&!r){let f=await _e();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 l=["Start"];e.wait&&l.push("-Wait"),r?(l.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&t.unshift(e.target)):e.target&&l.push(`"${e.target}"`),t.length>0&&(t=t.map(m=>`"\`"${m}\`""`),l.push(t.join(","))),e.target=Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(r)i=r;else{let f=!__dirname||__dirname==="/",l=!1;try{await $.access(se,le.X_OK),l=!0}catch{}i=process.versions.electron||h==="android"||f||!l?"xdg-open":se}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,l)=>{c.once("error",l),c.once("close",m=>{if(!e.allowNonzeroExitCode&&m>0){l(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})},Ge=(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 ce(e){if(typeof e=="string"||Array.isArray(e))return e;let{[ie]:r}=e;if(!r)throw new Error(`${ie} is not supported`);return r}function M({[h]:e},{wsl:r}){if(r&&v)return ce(r);if(!e)throw new Error(`${h} is not supported`);return ce(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=Ge;ue.exports=G});var We={};xe(We,{commFilePath:()=>L,notifyRaycast:()=>Me,updatePid:()=>de});module.exports=be(We);var I=require("node:child_process"),p=d(require("node:fs")),E=d(require("node:path"));var k=d(require("node:fs")),T=d(require("node:path")),V=d(require("node:os"));var W=d(require("node:path")),Y=d(require("node:fs"));function C(){let e;try{e=W.resolve("package.json")}catch(t){throw new Error(`cannot resolve package manifest path: ${t}`)}let r;try{r=JSON.parse(Y.readFileSync(e,"utf8"))}catch(t){throw new Error(`cannot read package manifest: ${t}`)}return r.name=r.name.replace(/^@workaround/g,""),r}var K={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"],Ie="e69bae0ec90f5e838555",g={},N;function x(){let e=C();if(!e.name)throw new Error("extension name in manifest cannot be empty");return T.join(Ce(),"extensions",e.name)}function X(){let e=w(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 H(){let e=w(N);return e==="x"?"raycast":`raycast${e}`}function Ee(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||g.APIURL||K.url;case"raycastAccessToken":return process.env.RAY_TOKEN||g.Token||g.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||g.ClientID||K.clientID;case"githubClientId":return process.env.RAY_GithubClientID||g.GithubClientID||Ie;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||g.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof g.Target<"u"?g.Target:w(process.platform==="win32"?"x":"release")}}function w(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 Ee("flavorName")}}function Ae(){let e=w(N);return e==""?"raycast":`raycast-${e}`}function Ce(){let e=T.join(V.default.homedir(),".config",Ae());return k.mkdirSync(e,{recursive:!0}),e}var u=d(z());var Ze=(0,u.blue)((0,u.dim)("internal only"));function O(e,r,t){console.log($e[e]+r),typeof t?.exit<"u"&&process.exit(t.exit)}var $e={wait:`\u{1F550}${(0,u.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,u.cyan)("info")} - `,success:`\u2705${(0,u.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,u.yellow)("warn")} - `,error:`\u{1F4A5}${(0,u.red)("error")} - `,event:`\u26A1\uFE0F${(0,u.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,u.yellowBright)("plan")} - `};var pe=d(fe());async function Me(e,r){let t=!1;switch(e){case"start":{je(),de(),Le();break}case"stop":{try{p.unlinkSync(L("log"))}catch{}try{p.unlinkSync(L("pid"))}catch{}break}default:t=!0}let i;try{i=C()}catch{return}qe()||O("warn","Raycast is not running"),t?Ue(i.name,e,r):await j(i.name,e,r)}function L(e){return E.join(x(),e==="log"?"dev.log":"cli.pid")}function de(){let e=x();try{p.mkdirSync(e,{recursive:!0})}catch(t){throw new Error(`cannot create output directory (${t.message})`)}let r=process.pid.toString();try{p.writeFileSync(E.join(e,"cli.pid"),r,{mode:420})}catch(t){throw new Error(`cannot write pid file (${t.message})`)}}function Le(){let e=x();try{p.mkdirSync(e,{recursive:!0})}catch(r){throw new Error(`cannot create output directory (${r.message})`)}try{p.writeFileSync(E.join(e,"dev.log"),"")}catch(r){throw new Error(`cannot write log file (${r.message})`)}}function je(){let e=E.join(x(),"cli.pid");try{let t=p.readFileSync(e,"utf8").trim();process.platform==="win32"?(0,I.execSync)(`taskkill /F /PID ${t}`):(0,I.execSync)(`kill -9 ${t}`,{shell:"/bin/sh"})}catch{}}var b=null;function Ue(e,r,t){b?(clearTimeout(b),b=setTimeout(()=>{j(e,r,t)},300)):(j(e,r,t),b=setTimeout(()=>{b=null},300))}async function j(e,r,t){let i=process.cwd(),s=`${H()}://cli/${e}/${r}?cwd=${encodeURIComponent(i)}&info=${encodeURIComponent(t||"")}`;try{await(0,pe.default)(s,{background:!0})}catch(a){O("error",`cannot notify Raycast (${a.message})`)}}function qe(){if(process.platform==="win32"){let r='tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH';try{return(0,I.execSync)(r,{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}else{let r=X(),t="ps -e -o args | grep -v grep | grep -i contents/macos/raycast",i;try{i=(0,I.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 ge=Object.create;var A=Object.defineProperty;var me=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty;var y=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),xe=(e,r)=>{for(var t in r)A(e,t,{get:r[t],enumerable:!0})},q=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of he(r))!we.call(e,s)&&s!==t&&A(e,s,{get:()=>r[s],enumerable:!(i=me(r,s))||i.enumerable});return e};var d=(e,r,t)=>(t=e!=null?ge(ye(e)):{},q(r||!e||!e.__esModule?A(t,"default",{value:e,enumerable:!0}):t,e)),be=e=>q(A({},"__esModule",{value:!0}),e);var z=y((ze,J)=>{var ke=require("node:tty"),ve=ke?.WriteStream?.prototype?.hasColors?.()??!1,o=(e,r)=>{if(!ve)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,l=0,U=(r===22?i:"")+t;for(;c!==-1;)f+=a.slice(l,c)+U,l=c+i.length,c=a.indexOf(i,l);return f+=a.slice(l)+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);J.exports=n});var B=y((er,Q)=>{"use strict";var Z=require("fs"),D;function Pe(){try{return Z.statSync("/.dockerenv"),!0}catch{return!1}}function Se(){try{return Z.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Q.exports=()=>(D===void 0&&(D=Pe()||Se()),D)});var te=y((rr,F)=>{"use strict";var Te=require("os"),Ne=require("fs"),ee=B(),re=()=>{if(process.platform!=="linux")return!1;if(Te.release().toLowerCase().includes("microsoft"))return!ee();try{return Ne.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!ee():!1}catch{return!1}};process.env.__IS_WSL_TEST__?F.exports=re:F.exports=re()});var oe=y((tr,ne)=>{"use strict";ne.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 fe=y((nr,ue)=>{var Oe=require("path"),De=require("child_process"),{promises:$,constants:le}=require("fs"),v=te(),Be=B(),_=oe(),se=Oe.join(__dirname,"xdg-open"),{platform:h,arch:ie}=process,Fe=()=>{try{return $.statSync("/run/.containerenv"),!0}catch{return!1}},R;function Re(){return R===void 0&&(R=Fe()||Be()),R}var _e=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let t="/etc/wsl.conf",i=!1;try{await $.access(t,le.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}})(),ae=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 ae(e.app,f=>P({...e,app:f}));let{name:r,arguments:t=[]}=e.app||{};if(t=[...t],Array.isArray(r))return ae(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&&!Re()&&!r){let f=await _e();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 l=["Start"];e.wait&&l.push("-Wait"),r?(l.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&t.unshift(e.target)):e.target&&l.push(`"${e.target}"`),t.length>0&&(t=t.map(m=>`"\`"${m}\`""`),l.push(t.join(","))),e.target=Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(r)i=r;else{let f=!__dirname||__dirname==="/",l=!1;try{await $.access(se,le.X_OK),l=!0}catch{}i=process.versions.electron||h==="android"||f||!l?"xdg-open":se}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,l)=>{c.once("error",l),c.once("close",m=>{if(!e.allowNonzeroExitCode&&m>0){l(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})},Ge=(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 ce(e){if(typeof e=="string"||Array.isArray(e))return e;let{[ie]:r}=e;if(!r)throw new Error(`${ie} is not supported`);return r}function M({[h]:e},{wsl:r}){if(r&&v)return ce(r);if(!e)throw new Error(`${h} is not supported`);return ce(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=Ge;ue.exports=G});var We={};xe(We,{commFilePath:()=>L,notifyRaycast:()=>Me,updatePid:()=>de});module.exports=be(We);var I=require("node:child_process"),p=d(require("node:fs")),E=d(require("node:path"));var k=d(require("node:fs")),T=d(require("node:path")),V=d(require("node:os"));var W=d(require("node:path")),Y=d(require("node:fs"));function C(){let e;try{e=W.resolve("package.json")}catch(t){throw new Error(`cannot resolve package manifest path: ${t}`)}let r;try{r=JSON.parse(Y.readFileSync(e,"utf8"))}catch(t){throw new Error(`cannot read package manifest: ${t}`)}return r.name=r.name.replace(/^@workaround/g,""),r}var K={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"],Ie="e69bae0ec90f5e838555",g={},N;function x(){let e=C();if(!e.name)throw new Error("extension name in manifest cannot be empty");return T.join(Ce(),"extensions",e.name)}function X(){let e=w(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 H(){let e=w(N);return e==="x"?"raycast":e.startsWith("x-")?`raycast-${e}`:`raycast${e}`}function Ee(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||g.APIURL||K.url;case"raycastAccessToken":return process.env.RAY_TOKEN||g.Token||g.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||g.ClientID||K.clientID;case"githubClientId":return process.env.RAY_GithubClientID||g.GithubClientID||Ie;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||g.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof g.Target<"u"?g.Target:w(process.platform==="win32"?"x":"release")}}function w(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 Ee("flavorName")}}function Ae(){let e=w(N);return e==""?"raycast":`raycast-${e}`}function Ce(){let e=T.join(V.default.homedir(),".config",Ae());return k.mkdirSync(e,{recursive:!0}),e}var u=d(z());var Ze=(0,u.blue)((0,u.dim)("internal only"));function O(e,r,t){console.log($e[e]+r),typeof t?.exit<"u"&&process.exit(t.exit)}var $e={wait:`\u{1F550}${(0,u.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,u.cyan)("info")} - `,success:`\u2705${(0,u.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,u.yellow)("warn")} - `,error:`\u{1F4A5}${(0,u.red)("error")} - `,event:`\u26A1\uFE0F${(0,u.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,u.yellowBright)("plan")} - `};var pe=d(fe());async function Me(e,r){let t=!1;switch(e){case"start":{je(),de(),Le();break}case"stop":{try{p.unlinkSync(L("log"))}catch{}try{p.unlinkSync(L("pid"))}catch{}break}default:t=!0}let i;try{i=C()}catch{return}qe()||O("warn","Raycast is not running"),t?Ue(i.name,e,r):await j(i.name,e,r)}function L(e){return E.join(x(),e==="log"?"dev.log":"cli.pid")}function de(){let e=x();try{p.mkdirSync(e,{recursive:!0})}catch(t){throw new Error(`cannot create output directory (${t.message})`)}let r=process.pid.toString();try{p.writeFileSync(E.join(e,"cli.pid"),r,{mode:420})}catch(t){throw new Error(`cannot write pid file (${t.message})`)}}function Le(){let e=x();try{p.mkdirSync(e,{recursive:!0})}catch(r){throw new Error(`cannot create output directory (${r.message})`)}try{p.writeFileSync(E.join(e,"dev.log"),"")}catch(r){throw new Error(`cannot write log file (${r.message})`)}}function je(){let e=E.join(x(),"cli.pid");try{let t=p.readFileSync(e,"utf8").trim();process.platform==="win32"?(0,I.execSync)(`taskkill /F /PID ${t}`):(0,I.execSync)(`kill -9 ${t}`,{shell:"/bin/sh"})}catch{}}var b=null;function Ue(e,r,t){b?(clearTimeout(b),b=setTimeout(()=>{j(e,r,t)},300)):(j(e,r,t),b=setTimeout(()=>{b=null},300))}async function j(e,r,t){let i=process.cwd(),s=`${H()}://cli/${e}/${r}?cwd=${encodeURIComponent(i)}&info=${encodeURIComponent(t||"")}`;try{await(0,pe.default)(s,{background:!0})}catch(a){O("error",`cannot notify Raycast (${a.message})`)}}function qe(){if(process.platform==="win32"){let r='tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH';try{return(0,I.execSync)(r,{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}else{let r=X(),t="ps -e -o args | grep -v grep | grep -i contents/macos/raycast",i;try{i=(0,I.execSync)(t,{shell:"/bin/sh",encoding:"utf8"})}catch{return!1}let s=i.trim();if(s==="")return!1;let a=s.split(`
|
|
2
2
|
`);for(let c of a){let f=c.indexOf("/Contents/MacOS/Raycast");if(f>-1&&(c=c.substring(0,f)),!!p.existsSync(c))return!0}}return!1}0&&(module.exports={commFilePath,notifyRaycast,updatePid});
|
package/oclif.manifest.json
CHANGED
|
@@ -204,10 +204,10 @@
|
|
|
204
204
|
"index.js"
|
|
205
205
|
]
|
|
206
206
|
},
|
|
207
|
-
"
|
|
207
|
+
"evals": {
|
|
208
208
|
"aliases": [],
|
|
209
209
|
"args": {},
|
|
210
|
-
"description": "
|
|
210
|
+
"description": "Run AI evals defined in extension package.json",
|
|
211
211
|
"flags": {
|
|
212
212
|
"exit-on-error": {
|
|
213
213
|
"aliases": [
|
|
@@ -260,26 +260,37 @@
|
|
|
260
260
|
],
|
|
261
261
|
"type": "option"
|
|
262
262
|
},
|
|
263
|
-
"
|
|
264
|
-
"char": "
|
|
265
|
-
"description": "
|
|
266
|
-
"name": "
|
|
263
|
+
"skipBuild": {
|
|
264
|
+
"char": "s",
|
|
265
|
+
"description": "Skip extension build step",
|
|
266
|
+
"name": "skipBuild",
|
|
267
267
|
"allowNo": false,
|
|
268
268
|
"type": "boolean"
|
|
269
269
|
},
|
|
270
|
-
"
|
|
271
|
-
"char": "
|
|
272
|
-
"description": "
|
|
273
|
-
"name": "
|
|
274
|
-
"
|
|
275
|
-
"
|
|
270
|
+
"extension": {
|
|
271
|
+
"char": "e",
|
|
272
|
+
"description": "Path to extension. Current directory is used by default",
|
|
273
|
+
"name": "extension",
|
|
274
|
+
"default": "./",
|
|
275
|
+
"hasDynamicHelp": false,
|
|
276
|
+
"multiple": false,
|
|
277
|
+
"type": "option"
|
|
276
278
|
},
|
|
277
|
-
"
|
|
278
|
-
"char": "
|
|
279
|
-
"description": "
|
|
279
|
+
"apiEndpoint": {
|
|
280
|
+
"char": "a",
|
|
281
|
+
"description": "AI Evals API endpoint",
|
|
280
282
|
"hidden": true,
|
|
281
|
-
"name": "
|
|
282
|
-
"default": "https://
|
|
283
|
+
"name": "apiEndpoint",
|
|
284
|
+
"default": "https://ai-evals.raycast.com/run-evals",
|
|
285
|
+
"hasDynamicHelp": false,
|
|
286
|
+
"multiple": false,
|
|
287
|
+
"type": "option"
|
|
288
|
+
},
|
|
289
|
+
"only": {
|
|
290
|
+
"char": "o",
|
|
291
|
+
"description": "Only run specified evals (0-2, 1, 1,2,3)",
|
|
292
|
+
"name": "only",
|
|
293
|
+
"default": "",
|
|
283
294
|
"hasDynamicHelp": false,
|
|
284
295
|
"multiple": false,
|
|
285
296
|
"type": "option"
|
|
@@ -287,7 +298,7 @@
|
|
|
287
298
|
},
|
|
288
299
|
"hasDynamicHelp": false,
|
|
289
300
|
"hiddenAliases": [],
|
|
290
|
-
"id": "
|
|
301
|
+
"id": "evals",
|
|
291
302
|
"pluginAlias": "ray",
|
|
292
303
|
"pluginName": "ray",
|
|
293
304
|
"pluginType": "core",
|
|
@@ -297,14 +308,14 @@
|
|
|
297
308
|
"relativePath": [
|
|
298
309
|
"dist",
|
|
299
310
|
"commands",
|
|
300
|
-
"
|
|
311
|
+
"evals",
|
|
301
312
|
"index.js"
|
|
302
313
|
]
|
|
303
314
|
},
|
|
304
|
-
"
|
|
315
|
+
"lint": {
|
|
305
316
|
"aliases": [],
|
|
306
317
|
"args": {},
|
|
307
|
-
"description": "
|
|
318
|
+
"description": "Validate the extension manifest and metadata, and lint its source code",
|
|
308
319
|
"flags": {
|
|
309
320
|
"exit-on-error": {
|
|
310
321
|
"aliases": [
|
|
@@ -357,37 +368,26 @@
|
|
|
357
368
|
],
|
|
358
369
|
"type": "option"
|
|
359
370
|
},
|
|
360
|
-
"
|
|
361
|
-
"char": "
|
|
362
|
-
"description": "
|
|
363
|
-
"name": "
|
|
371
|
+
"fix": {
|
|
372
|
+
"char": "f",
|
|
373
|
+
"description": "Attempt to fix linting issues",
|
|
374
|
+
"name": "fix",
|
|
364
375
|
"allowNo": false,
|
|
365
376
|
"type": "boolean"
|
|
366
377
|
},
|
|
367
|
-
"
|
|
368
|
-
"char": "
|
|
369
|
-
"description": "
|
|
370
|
-
"name": "
|
|
371
|
-
"
|
|
372
|
-
"
|
|
373
|
-
"multiple": false,
|
|
374
|
-
"type": "option"
|
|
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"
|
|
375
384
|
},
|
|
376
|
-
"
|
|
377
|
-
"char": "
|
|
378
|
-
"description": "
|
|
385
|
+
"schema": {
|
|
386
|
+
"char": "s",
|
|
387
|
+
"description": "Path to JSON schema for package.json validation \u001b[34m\u001b[2minternal only\u001b[22m\u001b[39m",
|
|
379
388
|
"hidden": true,
|
|
380
|
-
"name": "
|
|
381
|
-
"default": "https://
|
|
382
|
-
"hasDynamicHelp": false,
|
|
383
|
-
"multiple": false,
|
|
384
|
-
"type": "option"
|
|
385
|
-
},
|
|
386
|
-
"only": {
|
|
387
|
-
"char": "o",
|
|
388
|
-
"description": "Only run specified evals (0-2, 1, 1,2,3)",
|
|
389
|
-
"name": "only",
|
|
390
|
-
"default": "",
|
|
389
|
+
"name": "schema",
|
|
390
|
+
"default": "https://www.raycast.com/schemas/extension.json",
|
|
391
391
|
"hasDynamicHelp": false,
|
|
392
392
|
"multiple": false,
|
|
393
393
|
"type": "option"
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
},
|
|
396
396
|
"hasDynamicHelp": false,
|
|
397
397
|
"hiddenAliases": [],
|
|
398
|
-
"id": "
|
|
398
|
+
"id": "lint",
|
|
399
399
|
"pluginAlias": "ray",
|
|
400
400
|
"pluginName": "ray",
|
|
401
401
|
"pluginType": "core",
|
|
@@ -405,14 +405,14 @@
|
|
|
405
405
|
"relativePath": [
|
|
406
406
|
"dist",
|
|
407
407
|
"commands",
|
|
408
|
-
"
|
|
408
|
+
"lint",
|
|
409
409
|
"index.js"
|
|
410
410
|
]
|
|
411
411
|
},
|
|
412
|
-
"
|
|
412
|
+
"login": {
|
|
413
413
|
"aliases": [],
|
|
414
414
|
"args": {},
|
|
415
|
-
"description": "Log
|
|
415
|
+
"description": "Log into your Raycast account",
|
|
416
416
|
"flags": {
|
|
417
417
|
"exit-on-error": {
|
|
418
418
|
"aliases": [
|
|
@@ -468,7 +468,7 @@
|
|
|
468
468
|
},
|
|
469
469
|
"hasDynamicHelp": false,
|
|
470
470
|
"hiddenAliases": [],
|
|
471
|
-
"id": "
|
|
471
|
+
"id": "login",
|
|
472
472
|
"pluginAlias": "ray",
|
|
473
473
|
"pluginName": "ray",
|
|
474
474
|
"pluginType": "core",
|
|
@@ -478,14 +478,14 @@
|
|
|
478
478
|
"relativePath": [
|
|
479
479
|
"dist",
|
|
480
480
|
"commands",
|
|
481
|
-
"
|
|
481
|
+
"login",
|
|
482
482
|
"index.js"
|
|
483
483
|
]
|
|
484
484
|
},
|
|
485
|
-
"
|
|
485
|
+
"logout": {
|
|
486
486
|
"aliases": [],
|
|
487
487
|
"args": {},
|
|
488
|
-
"description": "Log
|
|
488
|
+
"description": "Log out of your Raycast account",
|
|
489
489
|
"flags": {
|
|
490
490
|
"exit-on-error": {
|
|
491
491
|
"aliases": [
|
|
@@ -541,7 +541,7 @@
|
|
|
541
541
|
},
|
|
542
542
|
"hasDynamicHelp": false,
|
|
543
543
|
"hiddenAliases": [],
|
|
544
|
-
"id": "
|
|
544
|
+
"id": "logout",
|
|
545
545
|
"pluginAlias": "ray",
|
|
546
546
|
"pluginName": "ray",
|
|
547
547
|
"pluginType": "core",
|
|
@@ -551,7 +551,7 @@
|
|
|
551
551
|
"relativePath": [
|
|
552
552
|
"dist",
|
|
553
553
|
"commands",
|
|
554
|
-
"
|
|
554
|
+
"logout",
|
|
555
555
|
"index.js"
|
|
556
556
|
]
|
|
557
557
|
},
|
|
@@ -814,18 +814,11 @@
|
|
|
814
814
|
"index.js"
|
|
815
815
|
]
|
|
816
816
|
},
|
|
817
|
-
"
|
|
817
|
+
"pull-contributions": {
|
|
818
818
|
"aliases": [],
|
|
819
819
|
"args": {},
|
|
820
|
-
"description": "
|
|
820
|
+
"description": "Pull contributions of the extension",
|
|
821
821
|
"flags": {
|
|
822
|
-
"json": {
|
|
823
|
-
"description": "Format output as json.",
|
|
824
|
-
"helpGroup": "GLOBAL",
|
|
825
|
-
"name": "json",
|
|
826
|
-
"allowNo": false,
|
|
827
|
-
"type": "boolean"
|
|
828
|
-
},
|
|
829
822
|
"exit-on-error": {
|
|
830
823
|
"aliases": [
|
|
831
824
|
"exitOnError"
|
|
@@ -876,36 +869,36 @@
|
|
|
876
869
|
"x-internal"
|
|
877
870
|
],
|
|
878
871
|
"type": "option"
|
|
879
|
-
},
|
|
880
|
-
"clipboard": {
|
|
881
|
-
"char": "C",
|
|
882
|
-
"description": "Copy the token to the clipboard",
|
|
883
|
-
"name": "clipboard",
|
|
884
|
-
"allowNo": false,
|
|
885
|
-
"type": "boolean"
|
|
886
872
|
}
|
|
887
873
|
},
|
|
888
874
|
"hasDynamicHelp": false,
|
|
889
875
|
"hiddenAliases": [],
|
|
890
|
-
"id": "
|
|
876
|
+
"id": "pull-contributions",
|
|
891
877
|
"pluginAlias": "ray",
|
|
892
878
|
"pluginName": "ray",
|
|
893
879
|
"pluginType": "core",
|
|
894
880
|
"strict": true,
|
|
895
|
-
"enableJsonFlag":
|
|
881
|
+
"enableJsonFlag": false,
|
|
896
882
|
"isESM": false,
|
|
897
883
|
"relativePath": [
|
|
898
884
|
"dist",
|
|
899
885
|
"commands",
|
|
900
|
-
"
|
|
886
|
+
"pull-contributions",
|
|
901
887
|
"index.js"
|
|
902
888
|
]
|
|
903
889
|
},
|
|
904
|
-
"
|
|
890
|
+
"token": {
|
|
905
891
|
"aliases": [],
|
|
906
892
|
"args": {},
|
|
907
|
-
"description": "
|
|
893
|
+
"description": "Display the access token",
|
|
908
894
|
"flags": {
|
|
895
|
+
"json": {
|
|
896
|
+
"description": "Format output as json.",
|
|
897
|
+
"helpGroup": "GLOBAL",
|
|
898
|
+
"name": "json",
|
|
899
|
+
"allowNo": false,
|
|
900
|
+
"type": "boolean"
|
|
901
|
+
},
|
|
909
902
|
"exit-on-error": {
|
|
910
903
|
"aliases": [
|
|
911
904
|
"exitOnError"
|
|
@@ -956,21 +949,28 @@
|
|
|
956
949
|
"x-internal"
|
|
957
950
|
],
|
|
958
951
|
"type": "option"
|
|
952
|
+
},
|
|
953
|
+
"clipboard": {
|
|
954
|
+
"char": "C",
|
|
955
|
+
"description": "Copy the token to the clipboard",
|
|
956
|
+
"name": "clipboard",
|
|
957
|
+
"allowNo": false,
|
|
958
|
+
"type": "boolean"
|
|
959
959
|
}
|
|
960
960
|
},
|
|
961
961
|
"hasDynamicHelp": false,
|
|
962
962
|
"hiddenAliases": [],
|
|
963
|
-
"id": "
|
|
963
|
+
"id": "token",
|
|
964
964
|
"pluginAlias": "ray",
|
|
965
965
|
"pluginName": "ray",
|
|
966
966
|
"pluginType": "core",
|
|
967
967
|
"strict": true,
|
|
968
|
-
"enableJsonFlag":
|
|
968
|
+
"enableJsonFlag": true,
|
|
969
969
|
"isESM": false,
|
|
970
970
|
"relativePath": [
|
|
971
971
|
"dist",
|
|
972
972
|
"commands",
|
|
973
|
-
"
|
|
973
|
+
"token",
|
|
974
974
|
"index.js"
|
|
975
975
|
]
|
|
976
976
|
},
|
|
@@ -1138,5 +1138,5 @@
|
|
|
1138
1138
|
]
|
|
1139
1139
|
}
|
|
1140
1140
|
},
|
|
1141
|
-
"version": "1.103.
|
|
1141
|
+
"version": "1.103.4"
|
|
1142
1142
|
}
|