@raycast/api 1.87.1 → 1.87.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/build/index.js +36 -36
- package/dist/commands/develop/index.js +36 -36
- package/dist/commands/lint/index.js +3 -3
- package/dist/commands/publish/index.js +52 -52
- package/dist/commands/pull-contributions/index.js +4 -4
- package/dist/commands/validate/index.js +4 -4
- package/dist/commands/version/index.js +1 -1
- package/dist/utils/BaseCommand.js +1 -1
- package/dist/utils/esbuild-plugins/swift-files.js +3 -3
- package/dist/utils/output.js +1 -1
- package/dist/utils/publish/publish-to-public-repo.js +4 -4
- package/dist/utils/publish/publish-to-store.js +47 -47
- package/dist/utils/publish/pull-contributions.js +4 -4
- package/dist/utils/publish/setup-github-fork.js +4 -4
- package/dist/utils/raycast-app-communication.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/utils/output.js
CHANGED
|
@@ -10,4 +10,4 @@ ${D}`,VD=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),HD=Objec
|
|
|
10
10
|
`);return n!==-1&&(D=rD(D,r,t,n)),t+D+r};Object.defineProperties(P.prototype,w);var ae=P(),st=P({level:iD?iD.level:0});var A=ae;var m=c(require("node:process"),1);function mu(){return m.default.platform!=="win32"?m.default.env.TERM!=="linux":!!m.default.env.CI||!!m.default.env.WT_SESSION||!!m.default.env.TERMINUS_SUBLIME||m.default.env.ConEmuTask==="{cmd::Cmder}"||m.default.env.TERM_PROGRAM==="Terminus-Sublime"||m.default.env.TERM_PROGRAM==="vscode"||m.default.env.TERM==="xterm-256color"||m.default.env.TERM==="alacritty"||m.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ce={info:A.blue("\u2139"),success:A.green("\u2714"),warning:A.yellow("\u26A0"),error:A.red("\u2716")},Ee={info:A.blue("i"),success:A.green("\u221A"),warning:A.yellow("\u203C"),error:A.red("\xD7")},fe=mu()?Ce:Ee,j=fe;function du({onlyFirst:u=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,u?void 0:"g")}var ce=du();function G(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(ce,"")}function sD(u){return u===161||u===164||u===167||u===168||u===170||u===173||u===174||u>=176&&u<=180||u>=182&&u<=186||u>=188&&u<=191||u===198||u===208||u===215||u===216||u>=222&&u<=225||u===230||u>=232&&u<=234||u===236||u===237||u===240||u===242||u===243||u>=247&&u<=250||u===252||u===254||u===257||u===273||u===275||u===283||u===294||u===295||u===299||u>=305&&u<=307||u===312||u>=319&&u<=322||u===324||u>=328&&u<=331||u===333||u===338||u===339||u===358||u===359||u===363||u===462||u===464||u===466||u===468||u===470||u===472||u===474||u===476||u===593||u===609||u===708||u===711||u>=713&&u<=715||u===717||u===720||u>=728&&u<=731||u===733||u===735||u>=768&&u<=879||u>=913&&u<=929||u>=931&&u<=937||u>=945&&u<=961||u>=963&&u<=969||u===1025||u>=1040&&u<=1103||u===1105||u===8208||u>=8211&&u<=8214||u===8216||u===8217||u===8220||u===8221||u>=8224&&u<=8226||u>=8228&&u<=8231||u===8240||u===8242||u===8243||u===8245||u===8251||u===8254||u===8308||u===8319||u>=8321&&u<=8324||u===8364||u===8451||u===8453||u===8457||u===8467||u===8470||u===8481||u===8482||u===8486||u===8491||u===8531||u===8532||u>=8539&&u<=8542||u>=8544&&u<=8555||u>=8560&&u<=8569||u===8585||u>=8592&&u<=8601||u===8632||u===8633||u===8658||u===8660||u===8679||u===8704||u===8706||u===8707||u===8711||u===8712||u===8715||u===8719||u===8721||u===8725||u===8730||u>=8733&&u<=8736||u===8739||u===8741||u>=8743&&u<=8748||u===8750||u>=8756&&u<=8759||u===8764||u===8765||u===8776||u===8780||u===8786||u===8800||u===8801||u>=8804&&u<=8807||u===8810||u===8811||u===8814||u===8815||u===8834||u===8835||u===8838||u===8839||u===8853||u===8857||u===8869||u===8895||u===8978||u>=9312&&u<=9449||u>=9451&&u<=9547||u>=9552&&u<=9587||u>=9600&&u<=9615||u>=9618&&u<=9621||u===9632||u===9633||u>=9635&&u<=9641||u===9650||u===9651||u===9654||u===9655||u===9660||u===9661||u===9664||u===9665||u>=9670&&u<=9672||u===9675||u>=9678&&u<=9681||u>=9698&&u<=9701||u===9711||u===9733||u===9734||u===9737||u===9742||u===9743||u===9756||u===9758||u===9792||u===9794||u===9824||u===9825||u>=9827&&u<=9829||u>=9831&&u<=9834||u===9836||u===9837||u===9839||u===9886||u===9887||u===9919||u>=9926&&u<=9933||u>=9935&&u<=9939||u>=9941&&u<=9953||u===9955||u===9960||u===9961||u>=9963&&u<=9969||u===9972||u>=9974&&u<=9977||u===9979||u===9980||u===9982||u===9983||u===10045||u>=10102&&u<=10111||u>=11094&&u<=11097||u>=12872&&u<=12879||u>=57344&&u<=63743||u>=65024&&u<=65039||u===65533||u>=127232&&u<=127242||u>=127248&&u<=127277||u>=127280&&u<=127337||u>=127344&&u<=127373||u===127375||u===127376||u>=127387&&u<=127404||u>=917760&&u<=917999||u>=983040&&u<=1048573||u>=1048576&&u<=1114109}function FD(u){return u===12288||u>=65281&&u<=65376||u>=65504&&u<=65510}function lD(u){return u>=4352&&u<=4447||u===8986||u===8987||u===9001||u===9002||u>=9193&&u<=9196||u===9200||u===9203||u===9725||u===9726||u===9748||u===9749||u>=9776&&u<=9783||u>=9800&&u<=9811||u===9855||u>=9866&&u<=9871||u===9875||u===9889||u===9898||u===9899||u===9917||u===9918||u===9924||u===9925||u===9934||u===9940||u===9962||u===9970||u===9971||u===9973||u===9978||u===9981||u===9989||u===9994||u===9995||u===10024||u===10060||u===10062||u>=10067&&u<=10069||u===10071||u>=10133&&u<=10135||u===10160||u===10175||u===11035||u===11036||u===11088||u===11093||u>=11904&&u<=11929||u>=11931&&u<=12019||u>=12032&&u<=12245||u>=12272&&u<=12287||u>=12289&&u<=12350||u>=12353&&u<=12438||u>=12441&&u<=12543||u>=12549&&u<=12591||u>=12593&&u<=12686||u>=12688&&u<=12773||u>=12783&&u<=12830||u>=12832&&u<=12871||u>=12880&&u<=42124||u>=42128&&u<=42182||u>=43360&&u<=43388||u>=44032&&u<=55203||u>=63744&&u<=64255||u>=65040&&u<=65049||u>=65072&&u<=65106||u>=65108&&u<=65126||u>=65128&&u<=65131||u>=94176&&u<=94180||u===94192||u===94193||u>=94208&&u<=100343||u>=100352&&u<=101589||u>=101631&&u<=101640||u>=110576&&u<=110579||u>=110581&&u<=110587||u===110589||u===110590||u>=110592&&u<=110882||u===110898||u>=110928&&u<=110930||u===110933||u>=110948&&u<=110951||u>=110960&&u<=111355||u>=119552&&u<=119638||u>=119648&&u<=119670||u===126980||u===127183||u===127374||u>=127377&&u<=127386||u>=127488&&u<=127490||u>=127504&&u<=127547||u>=127552&&u<=127560||u===127568||u===127569||u>=127584&&u<=127589||u>=127744&&u<=127776||u>=127789&&u<=127797||u>=127799&&u<=127868||u>=127870&&u<=127891||u>=127904&&u<=127946||u>=127951&&u<=127955||u>=127968&&u<=127984||u===127988||u>=127992&&u<=128062||u===128064||u>=128066&&u<=128252||u>=128255&&u<=128317||u>=128331&&u<=128334||u>=128336&&u<=128359||u===128378||u===128405||u===128406||u===128420||u>=128507&&u<=128591||u>=128640&&u<=128709||u===128716||u>=128720&&u<=128722||u>=128725&&u<=128727||u>=128732&&u<=128735||u===128747||u===128748||u>=128756&&u<=128764||u>=128992&&u<=129003||u===129008||u>=129292&&u<=129338||u>=129340&&u<=129349||u>=129351&&u<=129535||u>=129648&&u<=129660||u>=129664&&u<=129673||u>=129679&&u<=129734||u>=129742&&u<=129756||u>=129759&&u<=129769||u>=129776&&u<=129784||u>=131072&&u<=196605||u>=196608&&u<=262141}function he(u){if(!Number.isSafeInteger(u))throw new TypeError(`Expected a code point, got \`${typeof u}\`.`)}function aD(u,{ambiguousAsWide:D=!1}={}){return he(u),FD(u)||lD(u)||D&&sD(u)?2:1}var fD=c(ED(),1),Be=new Intl.Segmenter,me=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function _u(u,D={}){if(typeof u!="string"||u.length===0)return 0;let{ambiguousIsNarrow:e=!0,countAnsiEscapeCodes:t=!1}=D;if(t||(u=G(u)),u.length===0)return 0;let r=0,n={ambiguousAsWide:!e};for(let{segment:i}of Be.segment(u)){let F=i.codePointAt(0);if(!(F<=31||F>=127&&F<=159)&&!(F>=8203&&F<=8207||F===65279)&&!(F>=768&&F<=879||F>=6832&&F<=6911||F>=7616&&F<=7679||F>=8400&&F<=8447||F>=65056&&F<=65071)&&!(F>=55296&&F<=57343)&&!(F>=65024&&F<=65039)&&!me.test(i)){if((0,fD.default)().test(i)){r+=2;continue}r+=aD(F,n)}}return r}function pu({stream:u=process.stdout}={}){return!!(u&&u.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Au=c(require("node:process"),1);function gu(){let{env:u}=Au.default,{TERM:D,TERM_PROGRAM:e}=u;return Au.default.platform!=="win32"?D!=="linux":!!u.WT_SESSION||!!u.TERMINUS_SUBLIME||u.ConEmuTask==="{cmd::Cmder}"||e==="Terminus-Sublime"||e==="vscode"||D==="xterm-256color"||D==="alacritty"||D==="rxvt-unicode"||D==="rxvt-unicode-256color"||u.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var p=c(require("node:process"),1),de=3,bu=class{#i=0;start(){this.#i++,this.#i===1&&this.#e()}stop(){if(this.#i<=0)throw new Error("`stop` called more times than `start`");this.#i--,this.#i===0&&this.#u()}#e(){p.default.platform==="win32"||!p.default.stdin.isTTY||(p.default.stdin.setRawMode(!0),p.default.stdin.on("data",this.#r),p.default.stdin.resume())}#u(){p.default.stdin.isTTY&&(p.default.stdin.off("data",this.#r),p.default.stdin.pause(),p.default.stdin.setRawMode(!1))}#r(D){D[0]===de&&p.default.emit("SIGINT")}},_e=new bu,xu=_e;var pe=c(Eu(),1),Tu=class{#i=0;#e=!1;#u=0;#r=-1;#C=0;#D;#n;#t;#E;#c;#F;#l;#a;#h;#o;#s;color;constructor(D){typeof D=="string"&&(D={text:D}),this.#D={color:"cyan",stream:L.default.stderr,discardStdin:!0,hideCursor:!0,...D},this.color=this.#D.color,this.spinner=this.#D.spinner,this.#c=this.#D.interval,this.#t=this.#D.stream,this.#F=typeof this.#D.isEnabled=="boolean"?this.#D.isEnabled:pu({stream:this.#t}),this.#l=typeof this.#D.isSilent=="boolean"?this.#D.isSilent:!1,this.text=this.#D.text,this.prefixText=this.#D.prefixText,this.suffixText=this.#D.suffixText,this.indent=this.#D.indent,L.default.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#F,Object.defineProperty(this,"_linesToClear",{get(){return this.#i},set(e){this.#i=e}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#r}}),Object.defineProperty(this,"_lineCount",{get(){return this.#u}}))}get indent(){return this.#a}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw new Error("The `indent` option must be an integer from 0 and up");this.#a=D,this.#f()}get interval(){return this.#c??this.#n.interval??100}get spinner(){return this.#n}set spinner(D){if(this.#r=-1,this.#c=void 0,typeof D=="object"){if(D.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#n=D}else if(!gu())this.#n=k.default.line;else if(D===void 0)this.#n=k.default.dots;else if(D!=="default"&&k.default[D])this.#n=k.default[D];else throw new Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#h}set text(D=""){this.#h=D,this.#f()}get prefixText(){return this.#o}set prefixText(D=""){this.#o=D,this.#f()}get suffixText(){return this.#s}set suffixText(D=""){this.#s=D,this.#f()}get isSpinning(){return this.#E!==void 0}#B(D=this.#o,e=" "){return typeof D=="string"&&D!==""?D+e:typeof D=="function"?D()+e:""}#m(D=this.#s,e=" "){return typeof D=="string"&&D!==""?e+D:typeof D=="function"?e+D():""}#f(){let D=this.#t.columns??80,e=this.#B(this.#o,"-"),t=this.#m(this.#s,"-"),r=" ".repeat(this.#a)+e+"--"+this.#h+"--"+t;this.#u=0;for(let n of G(r).split(`
|
|
11
11
|
`))this.#u+=Math.max(1,Math.ceil(_u(n,{countAnsiEscapeCodes:!0})/D))}get isEnabled(){return this.#F&&!this.#l}set isEnabled(D){if(typeof D!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#F=D}get isSilent(){return this.#l}set isSilent(D){if(typeof D!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#l=D}frame(){let D=Date.now();(this.#r===-1||D-this.#C>=this.interval)&&(this.#r=++this.#r%this.#n.frames.length,this.#C=D);let{frames:e}=this.#n,t=e[this.#r];this.color&&(t=Yu[this.color](t));let r=typeof this.#o=="string"&&this.#o!==""?this.#o+" ":"",n=typeof this.text=="string"?" "+this.text:"",i=typeof this.#s=="string"&&this.#s!==""?" "+this.#s:"";return r+t+n+i}clear(){if(!this.#F||!this.#t.isTTY)return this;this.#t.cursorTo(0);for(let D=0;D<this.#i;D++)D>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);return(this.#a||this.lastIndent!==this.#a)&&this.#t.cursorTo(this.#a),this.lastIndent=this.#a,this.#i=0,this}render(){return this.#l?this:(this.clear(),this.#t.write(this.frame()),this.#i=this.#u,this)}start(D){return D&&(this.text=D),this.#l?this:this.#F?this.isSpinning?this:(this.#D.hideCursor&&Cu.hide(this.#t),this.#D.discardStdin&&L.default.stdin.isTTY&&(this.#e=!0,xu.start()),this.render(),this.#E=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#t.write(`- ${this.text}
|
|
12
12
|
`),this)}stop(){return this.#F?(clearInterval(this.#E),this.#E=void 0,this.#r=0,this.clear(),this.#D.hideCursor&&Cu.show(this.#t),this.#D.discardStdin&&L.default.stdin.isTTY&&this.#e&&(xu.stop(),this.#e=!1),this):this}succeed(D){return this.stopAndPersist({symbol:j.success,text:D})}fail(D){return this.stopAndPersist({symbol:j.error,text:D})}warn(D){return this.stopAndPersist({symbol:j.warning,text:D})}info(D){return this.stopAndPersist({symbol:j.info,text:D})}stopAndPersist(D={}){if(this.#l)return this;let e=D.prefixText??this.#o,t=this.#B(e," "),r=D.symbol??" ",n=D.text??this.text,F=typeof n=="string"?(r?" ":"")+n:"",x=D.suffixText??this.#s,hD=this.#m(x," "),BD=t+r+F+hD+`
|
|
13
|
-
`;return this.stop(),this.#t.write(BD),this}};function yu(u){return new Tu(u)}var Ae=(0,l.blue)((0,l.dim)("internal only"));function R(u,D,e){console.log(g[u]+D),typeof e?.exit<"u"&&process.exit(e.exit)}function ge(u){Object.entries(u).forEach(([D,e])=>{console.log(`${(0,l.blue)(`- ${D}: `)}${e}`)})}async function be(u,D,e){if(!cD){R("wait",u);try{let r=await D();r&&console.log(r),R("success",u);return}catch(r){return R("error",u),e?.printError!==!1&&console.
|
|
13
|
+
`;return this.stop(),this.#t.write(BD),this}};function yu(u){return new Tu(u)}var Ae=(0,l.blue)((0,l.dim)("internal only"));function R(u,D,e){console.log(g[u]+D),typeof e?.exit<"u"&&process.exit(e.exit)}function ge(u){Object.entries(u).forEach(([D,e])=>{console.log(`${(0,l.blue)(`- ${D}: `)}${e}`)})}async function be(u,D,e){if(!cD){R("wait",u);try{let r=await D();r&&console.log(r),R("success",u);return}catch(r){return R("error",u),e?.printError!==!1&&console.log((0,l.red)(r.message)),r}}let t=yu({spinner:"simpleDots",prefixText:g.wait+u}).start();try{let r=await D();t.stop(),R("success",u),r&&console.log(r)}catch(r){return t.stop(),R("error",u),e?.printError!==!1&&console.error(r.message),r}}var g={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")} - `},cD=!0;function xe(u,D){u||(g.wait=`${(0,l.blue)("wait")} - `,g.info=`${(0,l.cyan)("info")} - `,g.success=`${(0,l.green)("ready")} - `,g.warn=`${(0,l.yellow)("warn")} - `,g.error=`${(0,l.red)("error")} - `,g.event=`${(0,l.magenta)("event")} - `,g.paymentPrompt=`${(0,l.yellowBright)("plan")} - `),D&&(cD=!1)}0&&(module.exports={initLogger,internalOnlyHint,log,logObject,wait});
|