@tabsmith/autocomplete-specs 1.0.0 → 1.0.15
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/build/@magnolia/cli.js +2 -2
- package/build/@withfig/autocomplete-tools.js +2 -2
- package/build/airflow.js +2 -2
- package/build/ansible-playbook.js +2 -2
- package/build/apt.js +4 -4
- package/build/asr.js +2 -2
- package/build/bun.js +9 -9
- package/build/cargo.js +4 -4
- package/build/cd.js +2 -2
- package/build/chezmoi.js +2 -2
- package/build/cloudflared.js +2 -2
- package/build/coda.js +3 -3
- package/build/codeburn.js +1 -0
- package/build/codesign.js +2 -2
- package/build/dapr.js +2 -2
- package/build/deno/generators.js +4 -4
- package/build/deno.js +2 -2
- package/build/deployctl.js +2 -2
- package/build/direnv.js +2 -2
- package/build/docker.js +18 -18
- package/build/dotenv-vault.js +2 -2
- package/build/dotnet/dotnet-add.js +2 -2
- package/build/dotnet/dotnet-build.js +2 -2
- package/build/dotnet/dotnet-clean.js +2 -2
- package/build/dotnet/dotnet-format.js +2 -2
- package/build/dotnet/dotnet-list.js +2 -2
- package/build/dotnet/dotnet-migrate.js +2 -2
- package/build/dotnet/dotnet-nuget.js +3 -3
- package/build/dotnet/dotnet-pack.js +2 -2
- package/build/dotnet/dotnet-publish.js +2 -2
- package/build/dotnet/dotnet-remove.js +2 -2
- package/build/dotnet/dotnet-restore.js +2 -2
- package/build/dotnet/dotnet-sln.js +2 -2
- package/build/dotnet/dotnet-store.js +2 -2
- package/build/dotnet/dotnet-test.js +2 -2
- package/build/dotnet/dotnet-tool.js +3 -3
- package/build/dotnet.js +2 -2
- package/build/dsh.js +2 -0
- package/build/dtm.js +3 -3
- package/build/dynamic/index.js +1 -1
- package/build/elixir.js +2 -2
- package/build/elm-json.js +2 -2
- package/build/esbuild.js +3 -3
- package/build/file.js +2 -2
- package/build/flutter.js +5 -5
- package/build/gh.js +6 -37
- package/build/git.js +20 -20
- package/build/glow.js +2 -2
- package/build/hub.js +20 -20
- package/build/iex.js +2 -2
- package/build/index.js +1 -1
- package/build/index.json +1 -1
- package/build/java.js +2 -2
- package/build/julia.js +2 -2
- package/build/limactl.js +3 -3
- package/build/man.js +3 -3
- package/build/meteor.js +3 -3
- package/build/mgnl.js +2 -2
- package/build/mix.js +2 -2
- package/build/mongoimport.js +2 -2
- package/build/n.js +3 -3
- package/build/ni.js +2 -2
- package/build/node.js +2 -2
- package/build/npm.js +2 -2
- package/build/nr.js +3 -3
- package/build/nrm.js +2 -2
- package/build/opencode.js +2 -2
- package/build/osascript.js +2 -2
- package/build/osqueryi.js +2 -2
- package/build/pandoc.js +3 -3
- package/build/pdfunite.js +2 -2
- package/build/pi.js +2 -2
- package/build/pipenv.js +2 -2
- package/build/pm2.js +2 -2
- package/build/pnpm.js +23 -24
- package/build/pod.js +2 -2
- package/build/pre-commit.js +126 -126
- package/build/python.js +2 -2
- package/build/python3.js +2 -2
- package/build/r.js +3 -3
- package/build/rails.js +3 -3
- package/build/rancher.js +3 -3
- package/build/react-native.js +5 -5
- package/build/robot.js +2 -2
- package/build/rojo.js +2 -2
- package/build/rollup.js +2 -2
- package/build/rscript.js +2 -2
- package/build/rush.js +5 -5
- package/build/rushx.js +4 -4
- package/build/scc.js +2 -2
- package/build/shortcuts.js +2 -2
- package/build/sidekiq.js +2 -2
- package/build/sqlite3.js +2 -2
- package/build/streamlit.js +2 -2
- package/build/subl.js +2 -2
- package/build/swift.js +2 -2
- package/build/systemctl.js +2 -2
- package/build/ts-node.js +3 -3
- package/build/tsc.js +2 -2
- package/build/tsx.js +2 -2
- package/build/turbo.js +20 -20
- package/build/typst.js +2 -2
- package/build/vsce.js +20 -20
- package/build/wasm-bindgen.js +2 -2
- package/build/yarn.js +4 -4
- package/build/yomo.js +2 -2
- package/package.json +20 -20
- package/build/ai-agents specs.js +0 -1
package/build/codesign.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Z=Object.create;var
|
|
2
|
-
`),[".DS_Store"]),R=[];for(let q of X)if(q){let A=q.endsWith("/")?"folders":"filepaths";(A==="filepaths"&&u!=="only"||A==="folders"&&u!=="never")&&R.push({type:A==="filepaths"?"file":"folder",name:q,insertValue:q,isDangerous:b,context:{templateType:A}})}return w(m(R))}catch{return[]}})}}y.folders=Object.assign(()=>V({showFolders:"only"}),Object.freeze(V({showFolders:"only"})));y.filepaths=Object.assign(V,Object.freeze(V()))});var B=j(S=>{"use strict";var D=S&&S.__awaiter||function(e,t,n,i){function s(r){return r instanceof n?r:new n(function(o){o(r)})}return new(n||(n=Promise))(function(r,o){function l(a){try{c(i.next(a))}catch(d){o(d)}}function u(a){try{c(i.throw(a))}catch(d){o(d)}}function c(a){a.done?r(a.value):s(a.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.keyValueList=S.keyValue=S.valueList=void 0;var K=new Map;function M(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function J(e,t,n){return D(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...n);return M(t,i)}if(typeof e[0]=="string"){let i=e.map(s=>({name:s}));return M(t,i)}return M(t,e)})}function E(e,t,n,i){return D(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let s=K.get(e);return s===void 0&&(s=yield J(e,t,i),K.set(e,s)),s}return J(e,t,i)})}function Q(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function W(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function C(e,t){let n=new Set(e);return t.filter(i=>{var s;return typeof i.name=="string"?!n.has(i.name):!(!((s=i.name)===null||s===void 0)&&s.some(r=>n.has(r)))})}function de({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:s=!1}){return{trigger:(r,o)=>r.lastIndexOf(e)!==o.lastIndexOf(e),getQueryTerm:r=>r.slice(r.lastIndexOf(e)+e.length),custom:(...r)=>D(this,void 0,void 0,function*(){var o;let l=yield E(t,i?e:"",n,r);if(s)return l;let[u]=r,c=(o=u[u.length-1])===null||o===void 0?void 0:o.split(e);return C(c,l)})}}S.valueList=de;function fe({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:s=!0}){return{trigger:(r,o)=>r.indexOf(e)!==o.indexOf(e),getQueryTerm:r=>r.slice(r.indexOf(e)+1),custom:(...r)=>D(this,void 0,void 0,function*(){let[o]=r,u=!o[o.length-1].includes(e),c=u?t:n,a=Q(u,i);return E(c,u&&s?e:"",a,r)})}}S.keyValue=fe;function he({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:s=!1,insertSeparator:r=!0,insertDelimiter:o=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:u=!0}){return{trigger:(c,a)=>{let d=W(c,e,t),m=W(a,e,t);return d!==m},getQueryTerm:c=>{let a=W(c,e,t);return c.slice(a+1)},custom:(...c)=>D(this,void 0,void 0,function*(){let[a]=c,d=a[a.length-1],m=W(d,e,t),w=m===-1||d.slice(m,m+e.length)!==e,h=w?n:i,p=Q(w,s),f=yield E(h,w?r?e:"":o?t:"",p,c);if(w){if(l)return f;let O=d.split(t).map(g=>g.slice(0,g.indexOf(e)));return C(O,f)}if(u)return f;let b=d.split(t).map(O=>O.slice(O.indexOf(e)+e.length));return C(b,f)})}}S.keyValueList=he});var H=j(T=>{"use strict";var ge=T&&T.__awaiter||function(e,t,n,i){function s(r){return r instanceof n?r:new n(function(o){o(r)})}return new(n||(n=Promise))(function(r,o){function l(a){try{c(i.next(a))}catch(d){o(d)}}function u(a){try{c(i.throw(a))}catch(d){o(d)}}function c(a){a.done?r(a.value):s(a.value).then(l,u)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(T,"__esModule",{value:!0});T.ai=void 0;var pe=4097,me=4,ye=.8,ve=pe*me*ye;function be({name:e,prompt:t,message:n,postProcess:i,temperature:s,splitOn:r}){return{scriptTimeout:15e3,custom:(o,l,u)=>ge(this,void 0,void 0,function*(){var c,a;let d=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let m=typeof t=="function"?yield t({tokens:o,executeCommand:l,generatorContext:u}):t,w=typeof n=="function"?yield n({tokens:o,executeCommand:l,generatorContext:u}):n;if(w===null||w.length===0)return console.warn("No message provided to AI generator"),[];let h=ve-((c=m?.length)!==null&&c!==void 0?c:0),p={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...m?[{role:"system",content:m}]:[],{role:"user",content:w.slice(0,h)}],temperature:s},_=JSON.stringify(p),f=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",_]}),b=JSON.parse(f.stdout);return(a=b?.choices.map(g=>{var x;return(x=g?.message)===null||x===void 0?void 0:x.content}).filter(g=>typeof g=="string").flatMap(g=>r?g.split(r).filter(x=>x.trim().length>0):[g]).map(g=>{if(i)return i(g);let x=g.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:x,insertValue:`'${x}'`,description:"Generated by Fig AI"}}))!==null&&a!==void 0?a:[]})}}T.ai=be});var U=j(v=>{"use strict";var _e=v&&v.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Oe=v&&v.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_e(t,e,n)};Object.defineProperty(v,"__esModule",{value:!0});v.ai=v.folders=v.filepaths=void 0;var G=$();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return G.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return G.folders}});Oe(B(),v);var we=H();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return we.ai}})});var F=se(U(),1),xe={name:"codesign",description:"Create and manipulate code signatures",options:[{name:"--all-architectures",description:"When verifying a code signature on code that has a universal ('fat') Mach-O binary, separately verify each architecture contained. This is the default unless overridden with the -a (--architecture) option"},{name:["-a","--architecture"],description:"When verifying or displaying signatures, explicitly select the Mach-O architecture given",args:{name:"architecture"}},{name:"--bundle-version",description:"When handling versioned bundles such as frameworks, explicitly specify the version to operate on",args:{name:"version-string"}},{name:["-d","--display"],description:"Display information about the code at the path(s) given"},{name:["-D","--detached"],description:"When signing, designates that a detached signature should be written to the specified file",args:{name:"file",template:"filepaths"}},{name:"--deep",description:"When signing a bundle, specifies that nested code content such as helpers, frameworks, and plug-ins, should be recursively signed in turn. Beware that all signing options you specify will apply, in turn, to such nested content"},{name:"--detached-database",description:"When signing, specifies that a detached signature should be generated as with the --detached option, but that the resulting signature should be written into a system database, from where it is made automatically available whenever apparently unsigned code is validated on the system"},{name:["-f","--force"],description:"When signing, causes codesign to replace any existing signature on the path(s) given"},{name:["-h","--hosting"],description:"Constructs and prints the hosting chain of a running program"},{name:["-i","--identifier"],description:"During signing, explicitly specify the unique identifier string that is embedded in code signatures",args:{name:"identifier"}},{name:["-o","--options"],description:"During signing, specifies a set of option flags to be embedded in the code signature",args:{name:"version-string",generators:(0,F.valueList)({})}},{name:["-P","--pagesize"],description:"Indicates the granularity of code signing. Pagesize must be a power of two",args:{name:"size"}},{name:["-r","--requirements"],description:"During signing, indicates that internal requirements should be embedded in the code path(s) as specified",args:{name:"requirements"}},{name:["-R","--test-requirement"],description:"During verification, indicates that the path(s) given should be verified against the code requirement specified",args:{name:"requirement"}},{name:["-s","--sign"],description:"Sign the code at the path(s) given using this identity",args:{name:"identity"}},{name:["-v","--verify"],description:"Requests verification of code signatures"},{name:"--continue",description:"Instructs codesign to continue processing path arguments even if processing one fails"},{name:"--dryrun",description:"During signing, performs almost all signing operations, but does not actually write the result anywhere"},{name:"--entitlements",description:"When signing, take the file at the given path and embed its contents in the signature as entitlement data",args:{name:"path"}},{name:"--extract-certificates",description:"When displaying a signature, extract the certificates in the embedded certificate chain and write them to individual files",args:{name:"prefix"}},{name:"--file-list",description:"When signing or displaying a signature, codesign writes to the given path a list of files that may have been modified as part of the signing process",args:{name:"file",template:"filepaths",isVariadic:!0}},{name:"--ignore-resources",description:"During static validation, do not validate the contents of the code's resources"},{name:"--keychain",description:"During signing, only search for the signing identity in the keychain file specified",args:{name:"filename"}},{name:"--prefix",description:"If no explicit unique identifier is specified (using the -i option), and if the implicitly generated identifier does not contain any dot (.) characters, then the given string is prefixed to the identifier before use",args:{name:"prefix"}},{name:"--preserve-metadata=list",description:"When re-signing code that is already signed, reuse some information from the old signature"},{name:"--resource-rules",args:{name:"file",generators:(0,F.filepaths)({extensions:["plist"]})},description:"During signing, this option overrides the default rules for identifying and collecting bundle resources and nested code to be sealed into the signature"},{name:"--timestamp",description:"During signing, requests that a timestamp authority server be contacted to authenticate the time of signing",requiresSeparator:!0,args:{name:"URL",isOptional:!0}}]},Ae=xe;export{Ae as default};
|
|
1
|
+
var Z=Object.create;var z=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ie=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ee(t))!ne.call(e,s)&&s!==n&&z(e,s,{get:()=>t[s],enumerable:!(i=Y(t,s))||i.enumerable});return e};var se=(e,t,n)=>(n=e!=null?Z(te(e)):{},ie(t||!e||!e.__esModule?z(n,"default",{value:e,enumerable:!0}):n,e));var N=T(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.shellExpand=I.ensureTrailingSlash=void 0;var re=e=>e.endsWith("/")?e:`${e}/`;I.ensureTrailingSlash=re;var ae=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,oe=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,s=>{var r;let o=s.slice(1);return(r=t[o])!==null&&r!==void 0?r:s}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(s,r,o)=>{var u,l;return(l=(u=t[r])!==null&&u!==void 0?u:o)!==null&&l!==void 0?l:s}),ce=(e,t)=>{var n;let{environmentVariables:i}=t;return oe(ae(e,(n=i?.HOME)!==null&&n!==void 0?n:"~"),i)};I.shellExpand=ce});var k=T(b=>{"use strict";var ue=b&&b.__awaiter||function(e,t,n,i){function s(r){return r instanceof n?r:new n(function(o){o(r)})}return new(n||(n=Promise))(function(r,o){function u(a){try{c(i.next(a))}catch(d){o(d)}}function l(a){try{c(i.throw(a))}catch(d){o(d)}}function c(a){a.done?r(a.value):s(a.value).then(u,l)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(b,"__esModule",{value:!0});b.filepaths=b.folders=b.getCurrentInsertedDirectory=void 0;b.sortFilesAlphabetically=$;var F=N();function $(e,t=[]){let n=t.map(s=>s.toLowerCase()),i=e.filter(s=>!n.includes(s.toLowerCase()));return[...i.filter(s=>!s.startsWith(".")).sort((s,r)=>s.localeCompare(r)),...i.filter(s=>s.startsWith(".")).sort((s,r)=>s.localeCompare(r)),"../"]}var le=(e,t,n)=>{if(e===null)return"/";let i=(0,F.shellExpand)(t,n),s=i.slice(0,i.lastIndexOf("/")+1);return s===""?(0,F.ensureTrailingSlash)(e):s.startsWith("/")?s:`${(0,F.ensureTrailingSlash)(e)}${s}`};b.getCurrentInsertedDirectory=le;function W(e={}){let{extensions:t=[],equals:n=[],matches:i,filterFolders:s=!1,editFileSuggestions:r,editFolderSuggestions:o,rootDirectory:u,showFolders:l="always"}=e,c=new Set(t),a=new Set(n),d=()=>t.length>0||n.length>0||i,m=(h=[])=>d()?h.filter(({name:p="",type:_})=>{if(!s&&_==="folder"||a.has(p)||i&&p.match(i))return!0;let[,...f]=p.split(".");if(f.length>=1){let v=f.length-1,O=f[v];do{if(c.has(O))return!0;v-=1,O=[f[v],O].join(".")}while(v>=0)}return!1}):h,w=(h=[])=>!r&&!o?h:h.map(p=>Object.assign(Object.assign({},p),(p.type==="file"?r:o)||{}));return{trigger:(h,p)=>{let _=h.lastIndexOf("/"),f=p.lastIndexOf("/");return _!==f?!0:_===-1&&f===-1?!1:h.slice(0,_)!==p.slice(0,f)},getQueryTerm:h=>h.slice(h.lastIndexOf("/")+1),custom:(h,p,_)=>ue(this,void 0,void 0,function*(){var f;let{isDangerous:v,currentWorkingDirectory:O,searchTerm:g}=_,x=(f=(0,b.getCurrentInsertedDirectory)(u??O,g,_))!==null&&f!==void 0?f:"/";try{let P=yield p({command:"ls",args:["-1ApL"],cwd:x}),X=$(P.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),R=[];for(let q of X)if(q){let A=q.endsWith("/")?"folders":"filepaths";(A==="filepaths"&&l!=="only"||A==="folders"&&l!=="never")&&R.push({type:A==="filepaths"?"file":"folder",name:q,insertValue:q,isDangerous:v,context:{templateType:A}})}return w(m(R))}catch{return[]}})}}b.folders=Object.assign(()=>W({showFolders:"only"}),Object.freeze(W({showFolders:"only"})));b.filepaths=Object.assign(W,Object.freeze(W()))});var B=T(S=>{"use strict";var j=S&&S.__awaiter||function(e,t,n,i){function s(r){return r instanceof n?r:new n(function(o){o(r)})}return new(n||(n=Promise))(function(r,o){function u(a){try{c(i.next(a))}catch(d){o(d)}}function l(a){try{c(i.throw(a))}catch(d){o(d)}}function c(a){a.done?r(a.value):s(a.value).then(u,l)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.valueList=de;S.keyValue=fe;S.keyValueList=he;var K=new Map;function C(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function J(e,t,n){return j(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...n);return C(t,i)}if(typeof e[0]=="string"){let i=e.map(s=>({name:s}));return C(t,i)}return C(t,e)})}function E(e,t,n,i){return j(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let s=K.get(e);return s===void 0&&(s=yield J(e,t,i),K.set(e,s)),s}return J(e,t,i)})}function Q(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function V(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function L(e,t){let n=new Set(e);return t.filter(i=>{var s;return typeof i.name=="string"?!n.has(i.name):!(!((s=i.name)===null||s===void 0)&&s.some(r=>n.has(r)))})}function de({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:s=!1}){return{trigger:(r,o)=>r.lastIndexOf(e)!==o.lastIndexOf(e),getQueryTerm:r=>r.slice(r.lastIndexOf(e)+e.length),custom:(...r)=>j(this,void 0,void 0,function*(){var o;let u=yield E(t,i?e:"",n,r);if(s)return u;let[l]=r,c=(o=l[l.length-1])===null||o===void 0?void 0:o.split(e);return L(c,u)})}}function fe({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:s=!0}){return{trigger:(r,o)=>r.indexOf(e)!==o.indexOf(e),getQueryTerm:r=>r.slice(r.indexOf(e)+1),custom:(...r)=>j(this,void 0,void 0,function*(){let[o]=r,l=!o[o.length-1].includes(e),c=l?t:n,a=Q(l,i);return E(c,l&&s?e:"",a,r)})}}function he({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:s=!1,insertSeparator:r=!0,insertDelimiter:o=!1,allowRepeatedKeys:u=!1,allowRepeatedValues:l=!0}){return{trigger:(c,a)=>{let d=V(c,e,t),m=V(a,e,t);return d!==m},getQueryTerm:c=>{let a=V(c,e,t);return c.slice(a+1)},custom:(...c)=>j(this,void 0,void 0,function*(){let[a]=c,d=a[a.length-1],m=V(d,e,t),w=m===-1||d.slice(m,m+e.length)!==e,h=w?n:i,p=Q(w,s),f=yield E(h,w?r?e:"":o?t:"",p,c);if(w){if(u)return f;let O=d.split(t).map(g=>g.slice(0,g.indexOf(e)));return L(O,f)}if(l)return f;let v=d.split(t).map(O=>O.slice(O.indexOf(e)+e.length));return L(v,f)})}}});var H=T(D=>{"use strict";var ge=D&&D.__awaiter||function(e,t,n,i){function s(r){return r instanceof n?r:new n(function(o){o(r)})}return new(n||(n=Promise))(function(r,o){function u(a){try{c(i.next(a))}catch(d){o(d)}}function l(a){try{c(i.throw(a))}catch(d){o(d)}}function c(a){a.done?r(a.value):s(a.value).then(u,l)}c((i=i.apply(e,t||[])).next())})};Object.defineProperty(D,"__esModule",{value:!0});D.ai=be;var pe=4097,me=4,ye=.8,ve=pe*me*ye;function be({name:e,prompt:t,message:n,postProcess:i,temperature:s,splitOn:r}){return{scriptTimeout:15e3,custom:(o,u,l)=>ge(this,void 0,void 0,function*(){var c,a;let d=yield u({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let m=typeof t=="function"?yield t({tokens:o,executeCommand:u,generatorContext:l}):t,w=typeof n=="function"?yield n({tokens:o,executeCommand:u,generatorContext:l}):n;if(w===null||w.length===0)return console.warn("No message provided to AI generator"),[];let h=ve-((c=m?.length)!==null&&c!==void 0?c:0),p={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...m?[{role:"system",content:m}]:[],{role:"user",content:w.slice(0,h)}],temperature:s},_=JSON.stringify(p),f=yield u({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",_]}),v=JSON.parse(f.stdout);return(a=v?.choices.map(g=>{var x;return(x=g?.message)===null||x===void 0?void 0:x.content}).filter(g=>typeof g=="string").flatMap(g=>r?g.split(r).filter(x=>x.trim().length>0):[g]).map(g=>{if(i)return i(g);let x=g.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:x,insertValue:`'${x}'`,description:"Generated by Fig AI"}}))!==null&&a!==void 0?a:[]})}}});var U=T(y=>{"use strict";var _e=y&&y.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Oe=y&&y.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_e(t,e,n)};Object.defineProperty(y,"__esModule",{value:!0});y.ai=y.folders=y.filepaths=void 0;var G=k();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return G.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return G.folders}});Oe(B(),y);var we=H();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return we.ai}})});var M=se(U(),1),xe={name:"codesign",description:"Create and manipulate code signatures",options:[{name:"--all-architectures",description:"When verifying a code signature on code that has a universal ('fat') Mach-O binary, separately verify each architecture contained. This is the default unless overridden with the -a (--architecture) option"},{name:["-a","--architecture"],description:"When verifying or displaying signatures, explicitly select the Mach-O architecture given",args:{name:"architecture"}},{name:"--bundle-version",description:"When handling versioned bundles such as frameworks, explicitly specify the version to operate on",args:{name:"version-string"}},{name:["-d","--display"],description:"Display information about the code at the path(s) given"},{name:["-D","--detached"],description:"When signing, designates that a detached signature should be written to the specified file",args:{name:"file",template:"filepaths"}},{name:"--deep",description:"When signing a bundle, specifies that nested code content such as helpers, frameworks, and plug-ins, should be recursively signed in turn. Beware that all signing options you specify will apply, in turn, to such nested content"},{name:"--detached-database",description:"When signing, specifies that a detached signature should be generated as with the --detached option, but that the resulting signature should be written into a system database, from where it is made automatically available whenever apparently unsigned code is validated on the system"},{name:["-f","--force"],description:"When signing, causes codesign to replace any existing signature on the path(s) given"},{name:["-h","--hosting"],description:"Constructs and prints the hosting chain of a running program"},{name:["-i","--identifier"],description:"During signing, explicitly specify the unique identifier string that is embedded in code signatures",args:{name:"identifier"}},{name:["-o","--options"],description:"During signing, specifies a set of option flags to be embedded in the code signature",args:{name:"version-string",generators:(0,M.valueList)({})}},{name:["-P","--pagesize"],description:"Indicates the granularity of code signing. Pagesize must be a power of two",args:{name:"size"}},{name:["-r","--requirements"],description:"During signing, indicates that internal requirements should be embedded in the code path(s) as specified",args:{name:"requirements"}},{name:["-R","--test-requirement"],description:"During verification, indicates that the path(s) given should be verified against the code requirement specified",args:{name:"requirement"}},{name:["-s","--sign"],description:"Sign the code at the path(s) given using this identity",args:{name:"identity"}},{name:["-v","--verify"],description:"Requests verification of code signatures"},{name:"--continue",description:"Instructs codesign to continue processing path arguments even if processing one fails"},{name:"--dryrun",description:"During signing, performs almost all signing operations, but does not actually write the result anywhere"},{name:"--entitlements",description:"When signing, take the file at the given path and embed its contents in the signature as entitlement data",args:{name:"path"}},{name:"--extract-certificates",description:"When displaying a signature, extract the certificates in the embedded certificate chain and write them to individual files",args:{name:"prefix"}},{name:"--file-list",description:"When signing or displaying a signature, codesign writes to the given path a list of files that may have been modified as part of the signing process",args:{name:"file",template:"filepaths",isVariadic:!0}},{name:"--ignore-resources",description:"During static validation, do not validate the contents of the code's resources"},{name:"--keychain",description:"During signing, only search for the signing identity in the keychain file specified",args:{name:"filename"}},{name:"--prefix",description:"If no explicit unique identifier is specified (using the -i option), and if the implicitly generated identifier does not contain any dot (.) characters, then the given string is prefixed to the identifier before use",args:{name:"prefix"}},{name:"--preserve-metadata=list",description:"When re-signing code that is already signed, reuse some information from the old signature"},{name:"--resource-rules",args:{name:"file",generators:(0,M.filepaths)({extensions:["plist"]})},description:"During signing, this option overrides the default rules for identifying and collecting bundle resources and nested code to be sealed into the signature"},{name:"--timestamp",description:"During signing, requests that a timestamp authority server be contacted to authenticate the time of signing",requiresSeparator:!0,args:{name:"URL",isOptional:!0}}]},Ae=xe;export{Ae as default};
|
package/build/dapr.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Y=Object.create;var G=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),V=[];for(let I of X)if(I){let L=I.endsWith("/")?"folders":"filepaths";(L==="filepaths"&&d!=="only"||L==="folders"&&d!=="never")&&V.push({type:L==="filepaths"?"file":"folder",name:I,insertValue:I,isDangerous:y,context:{templateType:L}})}return k(g(V))}catch{return[]}})}}b.folders=Object.assign(()=>R({showFolders:"only"}),Object.freeze(R({showFolders:"only"})));b.filepaths=Object.assign(R,Object.freeze(R()))});var W=K(w=>{"use strict";var _=w&&w.__awaiter||function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function l(o){try{p(a.next(o))}catch(c){i(c)}}function d(o){try{p(a.throw(o))}catch(c){i(c)}}function p(o){o.done?s(o.value):r(o.value).then(l,d)}p((a=a.apply(e,t||[])).next())})};Object.defineProperty(w,"__esModule",{value:!0});w.keyValueList=w.keyValue=w.valueList=void 0;var H=new Map;function C(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function J(e,t,n){return _(this,void 0,void 0,function*(){if(typeof e=="function"){let a=yield e(...n);return C(t,a)}if(typeof e[0]=="string"){let a=e.map(r=>({name:r}));return C(t,a)}return C(t,e)})}function F(e,t,n,a){return _(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let r=H.get(e);return r===void 0&&(r=yield J(e,t,a),H.set(e,r)),r}return J(e,t,a)})}function $(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function A(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function E(e,t){let n=new Set(e);return t.filter(a=>{var r;return typeof a.name=="string"?!n.has(a.name):!(!((r=a.name)===null||r===void 0)&&r.some(s=>n.has(s)))})}function ue({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:a=!1,allowRepeatedValues:r=!1}){return{trigger:(s,i)=>s.lastIndexOf(e)!==i.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>_(this,void 0,void 0,function*(){var i;let l=yield F(t,a?e:"",n,s);if(r)return l;let[d]=s,p=(i=d[d.length-1])===null||i===void 0?void 0:i.split(e);return E(p,l)})}}w.valueList=ue;function me({separator:e="=",keys:t=[],values:n=[],cache:a=!1,insertSeparator:r=!0}){return{trigger:(s,i)=>s.indexOf(e)!==i.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>_(this,void 0,void 0,function*(){let[i]=s,d=!i[i.length-1].includes(e),p=d?t:n,o=$(d,a);return F(p,d&&r?e:"",o,s)})}}w.keyValue=me;function he({separator:e="=",delimiter:t=",",keys:n=[],values:a=[],cache:r=!1,insertSeparator:s=!0,insertDelimiter:i=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:d=!0}){return{trigger:(p,o)=>{let c=A(p,e,t),g=A(o,e,t);return c!==g},getQueryTerm:p=>{let o=A(p,e,t);return p.slice(o+1)},custom:(...p)=>_(this,void 0,void 0,function*(){let[o]=p,c=o[o.length-1],g=A(c,e,t),k=g===-1||c.slice(g,g+e.length)!==e,m=k?n:a,f=$(k,r),u=yield F(m,k?s?e:"":i?t:"",f,p);if(k){if(l)return u;let S=c.split(t).map(h=>h.slice(0,h.indexOf(e)));return E(S,u)}if(d)return u;let y=c.split(t).map(S=>S.slice(S.indexOf(e)+e.length));return E(y,u)})}}w.keyValueList=he});var Z=K(P=>{"use strict";var fe=P&&P.__awaiter||function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function l(o){try{p(a.next(o))}catch(c){i(c)}}function d(o){try{p(a.throw(o))}catch(c){i(c)}}function p(o){o.done?s(o.value):r(o.value).then(l,d)}p((a=a.apply(e,t||[])).next())})};Object.defineProperty(P,"__esModule",{value:!0});P.ai=void 0;var ge=4097,be=4,ve=.8,ye=ge*be*ve;function Te({name:e,prompt:t,message:n,postProcess:a,temperature:r,splitOn:s}){return{scriptTimeout:15e3,custom:(i,l,d)=>fe(this,void 0,void 0,function*(){var p,o;let c=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(c.stdout))return[];let g=typeof t=="function"?yield t({tokens:i,executeCommand:l,generatorContext:d}):t,k=typeof n=="function"?yield n({tokens:i,executeCommand:l,generatorContext:d}):n;if(k===null||k.length===0)return console.warn("No message provided to AI generator"),[];let m=ye-((p=g?.length)!==null&&p!==void 0?p:0),f={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:k.slice(0,m)}],temperature:r},T=JSON.stringify(f),u=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",T]}),y=JSON.parse(u.stdout);return(o=y?.choices.map(h=>{var D;return(D=h?.message)===null||D===void 0?void 0:D.content}).filter(h=>typeof h=="string").flatMap(h=>s?h.split(s).filter(D=>D.trim().length>0):[h]).map(h=>{if(a)return a(h);let D=h.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:D,insertValue:`'${D}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}P.ai=Te});var Q=K(v=>{"use strict";var Se=v&&v.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,r)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),ke=v&&v.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Se(t,e,n)};Object.defineProperty(v,"__esModule",{value:!0});v.ai=v.folders=v.filepaths=void 0;var B=N();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return B.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return B.folders}});ke(W(),v);var De=Z();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return De.ai}})});var O=se(Q(),1),q={script:["dapr","list","-A","-o","json"],postProcess:function(e){try{return JSON.parse(e).map(n=>({name:n.appId,description:`HTTP Port: ${n.httpPort} age: ${n.age}`}))}catch{return[]}}},we={cache:{ttl:1e3*60*60*24*2},custom:async(e,t)=>{let n=["-s","-H","Accept: application/json","https://hub.docker.com/v2/namespaces/daprio/repositories/daprd/tags?page_size=100"],a=()=>t({command:"curl",args:n});try{return JSON.parse((await a()).stdout).results.map(i=>({name:i.name,description:`Updated: ${i.last_updated}`}))}catch(r){return console.error({error:r}),[]}}},xe={name:"dapr",description:"Dapr CLI",subcommands:[{name:"annotate",description:"Add dapr annotations to a Kubernetes configuration. Supported platforms: Kubernetes",options:[{name:"--api-token-secret",description:"The secret to use for the API token",args:{name:"api-token-secret"}},{name:["--app-id","-a"],description:"The app id to annotate",args:{name:"app-id",generators:q}},{name:"--app-max-concurrency",description:"The maximum number of concurrent requests to allow",args:{name:"app-max-concurrency",default:"-1"}},{name:["--app-port","-p"],description:"The port to expose the app on",args:{name:"app-port",default:"-1"}},{name:"--app-protocol",description:"The protocol to use for the app. Allowed values http, https, h2c, grpc, grpcs",args:{name:"app-protocol",suggestions:["http","https","h2c","grpc","grpcs"]}},{name:"--app-ssl",description:"Enable SSL for the app",hidden:!0},{name:"--app-token-secret",description:"The secret to use for the app token",args:{name:"app-token-secret"}},{name:["--config","-c"],description:"The config file to annotate",args:{name:"config",generators:(0,O.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:99}})}},{name:"--cpu-limit",description:"The CPU limit to set",args:{name:"cpu-limit"}},{name:"--cpu-request",description:"The CPU request to set",args:{name:"cpu-request"}},{name:"--dapr-image",description:"The image to use for the dapr sidecar container",args:{name:"dapr-image"}},{name:"--disable-builtin-k8s-secret-store",description:"Disable the built-in k8s secret store"},{name:"--enable-api-logging",description:"Enable API logging for the Dapr sidecar"},{name:"--enable-debug",description:"Enable debug"},{name:"--enable-metrics",description:"Enable metrics"},{name:"--enable-profile",description:"Enable profiling"},{name:"--env",description:"Environment variables to set (key value pairs, comma separated)",args:{name:"env"}},{name:"--graceful-shutdown-seconds",description:"The number of seconds to wait for the app to shutdown",args:{name:"graceful-shutdown-seconds",default:"-1"}},{name:"--http-read-buffer-size",description:"The maximum size of HTTP header read buffer in kilobytes",args:{name:"http-read-buffer-size",default:"-1"}},{name:"--http-stream-request-body",description:"Enable streaming request body for HTTP"},{name:["--kubernetes","-k"],description:"Apply annotations to Kubernetes resources",isRequired:!0,priority:100},{name:"--listen-addresses",description:"The addresses to listen on",args:{name:"listen-addresses"}},{name:"--liveness-probe-delay",description:"The delay to use for the liveness probe",args:{name:"liveness-probe-delay",default:"-1"}},{name:"--liveness-probe-period",description:"The period to use for the liveness probe",args:{name:"liveness-probe-period",default:"-1"}},{name:"--liveness-probe-threshold",description:"The threshold to use for the liveness probe",args:{name:"liveness-probe-threshold",default:"-1"}},{name:"--liveness-probe-timeout",description:"The timeout to use for the liveness probe",args:{name:"liveness-probe-timeout",default:"-1"}},{name:"--log-as-json",description:"Log as JSON"},{name:"--log-level",description:"The log level to use",args:{name:"log-level"}},{name:"--max-request-body-size",description:"The maximum request body size to use",args:{name:"max-request-body-size",default:"-1"}},{name:"--memory-limit",description:"The memory limit to set",args:{name:"memory-limit"}},{name:"--memory-request",description:"The memory request to set",args:{name:"memory-request"}},{name:"--metrics-port",description:"The port to expose the metrics on",args:{name:"metrics-port",default:"-1"}},{name:["--namespace","-n"],description:"The namespace the resource target is in (can only be set if --resource is also set)",args:{name:"namespace"}},{name:"--placement-host-address",description:"Comma separated list of addresses for Dapr actor placement servers",args:{name:"placement-host-address"}},{name:"--readiness-probe-delay",description:"The delay to use for the readiness probe",args:{name:"readiness-probe-delay",default:"-1"}},{name:"--readiness-probe-period",description:"The period to use for the readiness probe",args:{name:"readiness-probe-period",default:"-1"}},{name:"--readiness-probe-threshold",description:"The threshold to use for the readiness probe",args:{name:"readiness-probe-threshold",default:"-1"}},{name:"--readiness-probe-timeout",description:"The timeout to use for the readiness probe",args:{name:"readiness-probe-timeout",default:"-1"}},{name:["--resource","-r"],description:"The resource to target to annotate",args:{name:"resource"}},{name:"--unix-domain-socket-path",description:"Linux domain socket path to use for communicating with the Dapr sidecar",args:{name:"unix-domain-socket-path"}},{name:"--volume-mounts",description:"List of pod volumes to be mounted to the sidecar container in read-only mode",args:{name:"volume-mounts"}},{name:"--volume-mounts-rw",description:"List of pod volumes to be mounted to the sidecar container in read-write mode",args:{name:"volume-mounts-rw"}}],args:{name:"config",generators:(0,O.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:99}})}},{name:"build-info",description:"Print build info of Dapr CLI and runtime",options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"completion",description:"Generates shell completion scripts",subcommands:[{name:"bash",description:"Generates bash completion scripts",options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"fish",description:"Generates fish completion scripts",options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"powershell",description:"Generates powershell completion scripts",options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"zsh",description:"Generates zsh completion scripts",options:[{name:["--help","-h"],description:"Print this help message"}]}],options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"components",description:"List all Dapr components. Supported platforms: Kubernetes",options:[{name:["--all-namespaces","-A"],description:"If true, list all Dapr components in all namespaces"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"List all Dapr components in a Kubernetes cluster",isRequired:!0},{name:["--name","-n"],description:"The components name to be printed (optional)",args:{name:"name"}},{name:"--namespace",description:"List all namespace components in a Kubernetes cluster",args:{name:"namespace"}},{name:["--output","-o"],description:"Output format (options: json or yaml or list)",args:{name:"output",default:"list",suggestions:["json","yaml","list"]}}]},{name:"configurations",description:"List all Dapr configurations. Supported platforms: Kubernetes",options:[{name:["--all-namespaces","-A"],description:"If true, list all Dapr configurations in all namespaces"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"List all Dapr configurations in a Kubernetes cluster",isRequired:!0},{name:["--name","-n"],description:"The configuration name to be printed (optional)",args:{name:"name"}},{name:"--namespace",description:"List Define namespace configurations in a Kubernetes cluster",args:{name:"namespace"}},{name:["--output","-o"],description:"Output format (options: json or yaml or list)",args:{name:"output",default:"list",suggestions:["json","yaml","list"]}}]},{name:"dashboard",description:"Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted",options:[{name:["--address","-a"],description:"Address to listen on. Only accepts IP address or localhost as a value",args:{name:"address",default:"localhost"}},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Opens Dapr dashboard in local browser via local proxy to Kubernetes cluster"},{name:["--namespace","-n"],description:"The namespace where Dapr dashboard is running",args:{name:"namespace",default:"dapr-system"}},{name:["--port","-p"],description:"The local port on which to serve Dapr dashboard",args:{name:"port",default:"8080"}},{name:["--version","-v"],description:"Print the version for Dapr dashboard"}]},{name:"init",description:"Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted",options:[{name:"--ca-root-certificate",description:"The root certificate file",args:{name:"ca-root-certificate"}},{name:"--container-runtime",description:"The container runtime to use. Supported values are docker (default) and podman",args:{name:"container-runtime",default:"docker",suggestions:["docker","podman"]}},{name:"--dashboard-version",description:"The version of the Dapr dashboard to install, for example: 0.13.0",args:{name:"dashboard-version",default:"latest"}},{name:"--dev",description:"Use Dev mode. Deploy Redis, Zipkin also in the Kubernetes cluster"},{name:"--enable-ha",description:"Enable high availability (HA) mode"},{name:"--enable-mtls",description:"Enable mTLS in your cluster"},{name:"--from-dir",description:"Use Dapr artifacts from local directory for self-hosted installation",args:{name:"from-dir"}},{name:["--help","-h"],description:"Print this help message"},{name:"--image-registry",description:"Custom/private docker image repository URL",args:{name:"image-registry"}},{name:"--image-variant",description:"The image variant to use for the Dapr runtime, for example: mariner",args:{name:"image-variant"}},{name:"--issuer-private-key",description:"The issuer certificate private key",args:{name:"issuer-private-key"}},{name:"--issuer-public-certificate",description:"The issuer certificate",args:{name:"issuer-public-certificate"}},{name:["--kubernetes","-k"],description:"Deploy Dapr to a Kubernetes cluster"},{name:["--namespace","-n"],description:"The Kubernetes namespace to install Dapr in",args:{name:"namespace",default:"dapr-system"}},{name:"--network",description:"The Docker network on which to deploy the Dapr runtime",args:{name:"network"}},{name:"--runtime-version",description:"The version of the Dapr runtime to install, for example: 1.0.0",args:{name:"runtime-version",default:"latest",suggestCurrentToken:!0,generators:we}},{name:"--set",description:"Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)",isRepeatable:!0,args:{name:"set"}},{name:["--slim","-s"],description:"Exclude placement service, Redis and Zipkin containers from self-hosted installation"},{name:"--timeout",description:"The wait timeout for the Kubernetes installation",args:{name:"timeout",default:"300"}},{name:"--wait",description:"Wait for Kubernetes initialization to complete"}]},{name:"invoke",description:"Invoke a method on a given Dapr application. Supported platforms: Self-hosted",options:[{name:["--app-id","-a"],description:"The application id to invoke",args:{name:"app-id",generators:q},isRequired:!0},{name:["--data","-d"],description:"The JSON serialized data string (optional)",args:{name:"data"}},{name:["--data-file","-f"],description:"A file containing the JSON serialized data (optional)",args:{name:"data-file",template:"filepaths"}},{name:["--help","-h"],description:"Print this help message"},{name:["--method","-m"],description:"The method to invoke",args:{name:"method"},isRequired:!0},{name:["--unix-domain-socket","-u"],description:"Path to a unix domain socket dir. If specified, Dapr API servers will use Unix Domain Sockets",args:{name:"unix-domain-socket"}},{name:["--verb","-v"],description:"The HTTP verb to use",args:{name:"verb",default:"POST"}}]},{name:"list",description:"List all Dapr instances. Supported platforms: Kubernetes and self-hosted",options:[{name:["--all-namespaces","-A"],description:"If true, list all Dapr pods in all namespaces"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"List all Dapr pods in a Kubernetes cluster"},{name:"--namespace",description:"List define namespace pod in a Kubernetes cluster",args:{name:"namespace"}},{name:["--output","-o"],description:"The output format of the list. Valid values are: json, yaml, or table (default)",args:{name:"output",suggestions:["json","yaml","table"]}}]},{name:"logs",description:"Get Dapr sidecar logs for an application. Supported platforms: Kubernetes",options:[{name:["--app-id","-a"],description:"The application id for which logs are needed",args:{name:"app-id",generators:q},isRequired:!0},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Get logs from a Kubernetes cluster",isRequired:!0,priority:100},{name:["--namespace","-n"],description:"The Kubernetes namespace in which your application is deployed",args:{name:"namespace",default:"default"}},{name:["--pod-name","-p"],description:"The name of the pod in Kubernetes, in case your application has multiple pods (optional)",args:{name:"pod-name"}}]},{name:"mtls",description:"Check if mTLS is enabled. Supported platforms: Kubernetes",subcommands:[{name:"expiry",description:"Checks the expiry of the root certificate"},{name:"export",description:"Export the root CA, issuer cert and key from Kubernetes to local files",options:[{name:["--help","-h"],description:"Print this help message"},{name:["--out","-o"],description:"The output directory path to save the certs",args:{name:"out",default:"."}}]},{name:["renew-cert","rnc","renew-certificate"],description:"Rotates the Dapr root certificate on your Kubernetes cluster",options:[{name:"--ca-root-certificate",description:"The root certificate file",args:{name:"ca-root-certificate"}},{name:"--image-variant",description:"The image variant to use for the Dapr runtime, for example: mariner",args:{name:"image-variant"}},{name:"--issuer-private-key",description:"The issuer certificate private key",args:{name:"issuer-private-key"}},{name:"--issuer-public-certificate",description:"The issuer certificate",args:{name:"issuer-public-certificate"}},{name:["--kubernetes","-k"],description:"Renews root and issuer certificates of Dapr in a Kubernetes cluster",isRequired:!0},{name:"--private-key",description:"The root.key file which is used to generate root certificate",args:{name:"private-key"}},{name:"--restart",description:"Restart Dapr control plane services"},{name:"--timeout",description:"The timeout for the certificate renewal",args:{name:"timeout",default:"300"}},{name:"--valid-until",description:"Max days before certificate expires",args:{name:"valid-until",default:"365"}}]}],options:[{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Check if mTLS is enabled in a Kubernetes cluster",isRequired:!0}]},{name:"publish",description:"Publish a pub-sub event. Supported platforms: Self-hosted",options:[{name:["--data","-d"],description:"The JSON serialized data string (optional)",args:{name:"data"}},{name:["--data-file","-f"],description:"A file containing the JSON serialized data (optional)",args:{name:"data-file"}},{name:["--help","-h"],description:"Print this help message"},{name:["--metadata","-m"],description:"The JSON serialized publish metadata (optional)",args:{name:"metadata"}},{name:["--publish-app-id","-i"],description:"The ID of the publishing app",args:{name:"publish-app-id"},isRequired:!0},{name:["--pubsub","-p"],description:"The name of the pub/sub component",args:{name:"pubsub"},isRequired:!0},{name:["--topic","-t"],description:"The topic to be published to",args:{name:"topic"},isRequired:!0},{name:["--unix-domain-socket","-u"],description:"Path to a unix domain socket dir. If specified, Dapr API servers will use Unix Domain Sockets",args:{name:"unix-domain-socket"}}]},{name:"run",description:"Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted",options:[{name:"--app-channel-address",description:"The network address the application listens on",args:{name:"app-channel-address",default:"127.0.0.1"}},{name:"--app-health-check-path",description:"Path used for health checks; HTTP only",args:{name:"app-health-check-path"}},{name:"--app-health-probe-interval",description:"Interval to probe for the health of the app in seconds",args:{name:"app-health-probe-interval",default:"0"}},{name:"--app-health-probe-timeout",description:"Timeout for app health probes in milliseconds",args:{name:"app-health-probe-timeout",default:"0"}},{name:"--app-health-threshold",description:"Number of consecutive failures for the app to be considered unhealthy",args:{name:"app-health-threshold",default:"0"}},{name:["--app-id","-a"],description:"The id for your application, used for service discovery",args:{name:"app-id"}},{name:"--app-max-concurrency",description:"The concurrency level of the application, otherwise is unlimited",args:{name:"app-max-concurrency",default:"-1"}},{name:["--app-port","-p"],description:"The port your application is listening on",args:{name:"app-port",default:"-1"}},{name:["--app-protocol","-P"],description:"The protocol (grpc, grpcs, http, https, h2c) Dapr uses to talk to the application",args:{name:"app-protocol",default:"http",suggestions:["http","https","h2c","grpc","grpcs"]}},{name:"--app-ssl",description:"Enable https when Dapr invokes the application"},{name:["--components-path","-d"],description:"The path for components directory. Default is $HOME/.dapr/components or %USERPROFILE%.daprcomponents",args:{name:"components-path",template:"folders"}},{name:["--config","-c"],description:"Dapr configuration file",args:{name:"config",generators:(0,O.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:100}})}},{name:["--dapr-grpc-port","-G"],description:"The gRPC port for Dapr to listen on",args:{name:"dapr-grpc-port",default:"-1"}},{name:"--dapr-http-max-request-size",description:"Max size of request body in MB",args:{name:"dapr-http-max-request-size",default:"-1"}},{name:["--dapr-http-port","-H"],description:"The HTTP port for Dapr to listen on",args:{name:"dapr-http-port",default:"-1"}},{name:"--dapr-http-read-buffer-size",description:"HTTP header read buffer in KB",args:{name:"dapr-http-read-buffer-size",default:"-1"}},{name:["--dapr-internal-grpc-port","-I"],description:"The gRPC port for the Dapr internal API to listen on",args:{name:"dapr-internal-grpc-port",default:"-1"}},{name:"--dapr-listen-addresses",description:"Comma separated list of IP addresses that sidecar will listen to",args:{name:"dapr-listen-addresses"}},{name:"--enable-api-logging",description:"Log API calls at INFO verbosity. Valid values are: true or false"},{name:"--enable-app-health-check",description:"Enable health checks for the application using the protocol defined with app-protocol"},{name:"--enable-profiling",description:"Enable pprof profiling via an HTTP endpoint"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Run the multi-app run template against Kubernetes environment"},{name:"--log-level",description:"The log verbosity. Valid values are: debug, info, warn, error, fatal, or panic",args:{name:"log-level",default:"info"}},{name:["--metrics-port","-M"],description:"The port of metrics on dapr",args:{name:"metrics-port",default:"-1"}},{name:"--placement-host-address",description:"The address of the placement service. Format is either <hostname> for default port or <hostname>:<port> for custom port",args:{name:"placement-host-address",default:"localhost"}},{name:"--profile-port",description:"The port for the profile server to listen on",args:{name:"profile-port",default:"-1"}},{name:"--resources-path",description:"The path for resources directory",isRepeatable:!0,args:{name:"resources-path",template:"folders"}},{name:["--run-file","-f"],description:"Path to the run template file for the list of apps to run",args:{name:"run-file",generators:(0,O.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:100}})}},{name:["--unix-domain-socket","-u"],description:"Path to a unix domain socket dir. If specified, Dapr API servers will use Unix Domain Sockets",args:{name:"unix-domain-socket"}}]},{name:"status",description:"Show the health status of Dapr services. Supported platforms: Kubernetes",options:[{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Show the health status of Dapr services on Kubernetes cluster",isRequired:!0}]},{name:"stop",description:"Stop Dapr instances and their associated apps. Supported platforms: Self-hosted",options:[{name:["--app-id","-a"],description:"The application id to be stopped",args:{name:"app-id",isVariadic:!0,generators:q}},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Stop deployments in Kunernetes based on multi-app run file"},{name:["--run-file","-f"],description:"Path to the run template file for the list of apps to stop",args:{name:"run-file",generators:(0,O.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:100}})}}]},{name:"uninstall",description:"Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted",options:[{name:"--all",description:"Remove .dapr directory, Redis, Placement and Zipkin containers on local machine, and CRDs on a Kubernetes cluster"},{name:"--container-runtime",description:"The container runtime to use. Supported values are docker (default) and podman",args:{name:"container-runtime",default:"docker"}},{name:"--dev",description:"Uninstall Dapr Redis and Zipking installations from Kubernetes cluster"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Uninstall Dapr from a Kubernetes cluster"},{name:["--namespace","-n"],description:"The Kubernetes namespace to uninstall Dapr from",args:{name:"namespace",default:"dapr-system"}},{name:"--network",description:"The Docker network from which to remove the Dapr runtime",args:{name:"network"}},{name:"--timeout",description:"The timeout for the Kubernetes uninstall",args:{name:"timeout",default:"300"}}]},{name:"upgrade",description:"Upgrades or downgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes",options:[{name:"--dashboard-version",description:"The version of the Dapr dashboard to upgrade or downgrade to, for example: 0.13.0",args:{name:"dashboard-version"}},{name:["--help","-h"],description:"Print this help message"},{name:"--image-registry",description:"Custom/Private docker image repository URL",args:{name:"image-registry"}},{name:"--image-variant",description:"The image variant to use for the Dapr runtime, for example: mariner",args:{name:"image-variant"}},{name:["--kubernetes","-k"],description:"Upgrade or downgrade Dapr in a Kubernetes cluster",isRequired:!0},{name:"--runtime-version",description:"The version of the Dapr runtime to upgrade or downgrade to, for example: 1.0.0",args:{name:"runtime-version"},isRequired:!0},{name:"--set",description:"Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)",isRepeatable:!0,args:{name:"set"}},{name:"--timeout",description:"The timeout for the Kubernetes upgrade",args:{name:"timeout",default:"300"}}]},{name:"version",description:"Print the Dapr runtime and CLI version",options:[{name:["--help","-h"],description:"Print this help message"},{name:["--output","-o"],description:"The output format of the version command. Valid values are: json",args:{name:"output",suggestions:["json"]}}]},{name:"help",description:"Help about any command",subcommands:[{name:"annotate",description:"Add dapr annotations to a Kubernetes configuration. Supported platforms: Kubernetes"},{name:"build-info",description:"Print build info of Dapr CLI and runtime"},{name:"completion",description:"Generates shell completion scripts",subcommands:[{name:"bash",description:"Generates bash completion scripts"},{name:"fish",description:"Generates fish completion scripts"},{name:"powershell",description:"Generates powershell completion scripts"},{name:"zsh",description:"Generates zsh completion scripts"}]},{name:"components",description:"List all Dapr components. Supported platforms: Kubernetes"},{name:"configurations",description:"List all Dapr configurations. Supported platforms: Kubernetes"},{name:"dashboard",description:"Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted"},{name:"init",description:"Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted"},{name:"invoke",description:"Invoke a method on a given Dapr application. Supported platforms: Self-hosted"},{name:"list",description:"List all Dapr instances. Supported platforms: Kubernetes and self-hosted"},{name:"logs",description:"Get Dapr sidecar logs for an application. Supported platforms: Kubernetes"},{name:"mtls",description:"Check if mTLS is enabled. Supported platforms: Kubernetes",subcommands:[{name:"expiry",description:"Checks the expiry of the root certificate"},{name:"export",description:"Export the root CA, issuer cert and key from Kubernetes to local files"},{name:["renew-cert","rnc","renew-certificate"],description:"Rotates the Dapr root certificate on your Kubernetes cluster"}]},{name:"publish",description:"Publish a pub-sub event. Supported platforms: Self-hosted"},{name:"run",description:"Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted"},{name:"status",description:"Show the health status of Dapr services. Supported platforms: Kubernetes"},{name:"stop",description:"Stop Dapr instances and their associated apps. Supported platforms: Self-hosted"},{name:"uninstall",description:"Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted"},{name:"upgrade",description:"Upgrades or downgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes"},{name:"version",description:"Print the Dapr runtime and CLI version"}]}],options:[{name:["--version","-v"],description:"Version for dapr"},{name:"--log-as-json",description:"Log output in JSON format",isPersistent:!0},{name:"--runtime-path",description:"The path to the dapr runtime installation directory",isPersistent:!0,args:{name:"runtime-path",template:"folders"}},{name:["--help","-h"],description:"Display help",isPersistent:!0}]},Re=xe;export{Re as default};
|
|
1
|
+
var Y=Object.create;var G=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ae=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of te(t))!re.call(e,r)&&r!==n&&G(e,r,{get:()=>t[r],enumerable:!(a=ee(t,r))||a.enumerable});return e};var se=(e,t,n)=>(n=e!=null?Y(ne(e)):{},ae(t||!e||!e.__esModule?G(n,"default",{value:e,enumerable:!0}):n,e));var U=O(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.shellExpand=x.ensureTrailingSlash=void 0;var ie=e=>e.endsWith("/")?e:`${e}/`;x.ensureTrailingSlash=ie;var oe=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,pe=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,r=>{var s;let i=r.slice(1);return(s=t[i])!==null&&s!==void 0?s:r}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(r,s,i)=>{var l,c;return(c=(l=t[s])!==null&&l!==void 0?l:i)!==null&&c!==void 0?c:r}),le=(e,t)=>{var n;let{environmentVariables:a}=t;return pe(oe(e,(n=a?.HOME)!==null&&n!==void 0?n:"~"),a)};x.shellExpand=le});var N=O(y=>{"use strict";var ce=y&&y.__awaiter||function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function l(o){try{p(a.next(o))}catch(d){i(d)}}function c(o){try{p(a.throw(o))}catch(d){i(d)}}function p(o){o.done?s(o.value):r(o.value).then(l,c)}p((a=a.apply(e,t||[])).next())})};Object.defineProperty(y,"__esModule",{value:!0});y.filepaths=y.folders=y.getCurrentInsertedDirectory=void 0;y.sortFilesAlphabetically=M;var j=U();function M(e,t=[]){let n=t.map(r=>r.toLowerCase()),a=e.filter(r=>!n.includes(r.toLowerCase()));return[...a.filter(r=>!r.startsWith(".")).sort((r,s)=>r.localeCompare(s)),...a.filter(r=>r.startsWith(".")).sort((r,s)=>r.localeCompare(s)),"../"]}var de=(e,t,n)=>{if(e===null)return"/";let a=(0,j.shellExpand)(t,n),r=a.slice(0,a.lastIndexOf("/")+1);return r===""?(0,j.ensureTrailingSlash)(e):r.startsWith("/")?r:`${(0,j.ensureTrailingSlash)(e)}${r}`};y.getCurrentInsertedDirectory=de;function R(e={}){let{extensions:t=[],equals:n=[],matches:a,filterFolders:r=!1,editFileSuggestions:s,editFolderSuggestions:i,rootDirectory:l,showFolders:c="always"}=e,p=new Set(t),o=new Set(n),d=()=>t.length>0||n.length>0||a,g=(m=[])=>d()?m.filter(({name:f="",type:T})=>{if(!r&&T==="folder"||o.has(f)||a&&f.match(a))return!0;let[,...u]=f.split(".");if(u.length>=1){let v=u.length-1,S=u[v];do{if(p.has(S))return!0;v-=1,S=[u[v],S].join(".")}while(v>=0)}return!1}):m,k=(m=[])=>!s&&!i?m:m.map(f=>Object.assign(Object.assign({},f),(f.type==="file"?s:i)||{}));return{trigger:(m,f)=>{let T=m.lastIndexOf("/"),u=f.lastIndexOf("/");return T!==u?!0:T===-1&&u===-1?!1:m.slice(0,T)!==f.slice(0,u)},getQueryTerm:m=>m.slice(m.lastIndexOf("/")+1),custom:(m,f,T)=>ce(this,void 0,void 0,function*(){var u;let{isDangerous:v,currentWorkingDirectory:S,searchTerm:h}=T,D=(u=(0,y.getCurrentInsertedDirectory)(l??S,h,T))!==null&&u!==void 0?u:"/";try{let F=yield f({command:"ls",args:["-1ApL"],cwd:D}),X=M(F.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),V=[];for(let I of X)if(I){let L=I.endsWith("/")?"folders":"filepaths";(L==="filepaths"&&c!=="only"||L==="folders"&&c!=="never")&&V.push({type:L==="filepaths"?"file":"folder",name:I,insertValue:I,isDangerous:v,context:{templateType:L}})}return k(g(V))}catch{return[]}})}}y.folders=Object.assign(()=>R({showFolders:"only"}),Object.freeze(R({showFolders:"only"})));y.filepaths=Object.assign(R,Object.freeze(R()))});var W=O(w=>{"use strict";var K=w&&w.__awaiter||function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function l(o){try{p(a.next(o))}catch(d){i(d)}}function c(o){try{p(a.throw(o))}catch(d){i(d)}}function p(o){o.done?s(o.value):r(o.value).then(l,c)}p((a=a.apply(e,t||[])).next())})};Object.defineProperty(w,"__esModule",{value:!0});w.valueList=ue;w.keyValue=me;w.keyValueList=he;var H=new Map;function C(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function J(e,t,n){return K(this,void 0,void 0,function*(){if(typeof e=="function"){let a=yield e(...n);return C(t,a)}if(typeof e[0]=="string"){let a=e.map(r=>({name:r}));return C(t,a)}return C(t,e)})}function z(e,t,n,a){return K(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let r=H.get(e);return r===void 0&&(r=yield J(e,t,a),H.set(e,r)),r}return J(e,t,a)})}function $(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function A(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function E(e,t){let n=new Set(e);return t.filter(a=>{var r;return typeof a.name=="string"?!n.has(a.name):!(!((r=a.name)===null||r===void 0)&&r.some(s=>n.has(s)))})}function ue({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:a=!1,allowRepeatedValues:r=!1}){return{trigger:(s,i)=>s.lastIndexOf(e)!==i.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>K(this,void 0,void 0,function*(){var i;let l=yield z(t,a?e:"",n,s);if(r)return l;let[c]=s,p=(i=c[c.length-1])===null||i===void 0?void 0:i.split(e);return E(p,l)})}}function me({separator:e="=",keys:t=[],values:n=[],cache:a=!1,insertSeparator:r=!0}){return{trigger:(s,i)=>s.indexOf(e)!==i.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>K(this,void 0,void 0,function*(){let[i]=s,c=!i[i.length-1].includes(e),p=c?t:n,o=$(c,a);return z(p,c&&r?e:"",o,s)})}}function he({separator:e="=",delimiter:t=",",keys:n=[],values:a=[],cache:r=!1,insertSeparator:s=!0,insertDelimiter:i=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:c=!0}){return{trigger:(p,o)=>{let d=A(p,e,t),g=A(o,e,t);return d!==g},getQueryTerm:p=>{let o=A(p,e,t);return p.slice(o+1)},custom:(...p)=>K(this,void 0,void 0,function*(){let[o]=p,d=o[o.length-1],g=A(d,e,t),k=g===-1||d.slice(g,g+e.length)!==e,m=k?n:a,f=$(k,r),u=yield z(m,k?s?e:"":i?t:"",f,p);if(k){if(l)return u;let S=d.split(t).map(h=>h.slice(0,h.indexOf(e)));return E(S,u)}if(c)return u;let v=d.split(t).map(S=>S.slice(S.indexOf(e)+e.length));return E(v,u)})}}});var Z=O(_=>{"use strict";var fe=_&&_.__awaiter||function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function l(o){try{p(a.next(o))}catch(d){i(d)}}function c(o){try{p(a.throw(o))}catch(d){i(d)}}function p(o){o.done?s(o.value):r(o.value).then(l,c)}p((a=a.apply(e,t||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.ai=Te;var ge=4097,be=4,ve=.8,ye=ge*be*ve;function Te({name:e,prompt:t,message:n,postProcess:a,temperature:r,splitOn:s}){return{scriptTimeout:15e3,custom:(i,l,c)=>fe(this,void 0,void 0,function*(){var p,o;let d=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let g=typeof t=="function"?yield t({tokens:i,executeCommand:l,generatorContext:c}):t,k=typeof n=="function"?yield n({tokens:i,executeCommand:l,generatorContext:c}):n;if(k===null||k.length===0)return console.warn("No message provided to AI generator"),[];let m=ye-((p=g?.length)!==null&&p!==void 0?p:0),f={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:k.slice(0,m)}],temperature:r},T=JSON.stringify(f),u=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",T]}),v=JSON.parse(u.stdout);return(o=v?.choices.map(h=>{var D;return(D=h?.message)===null||D===void 0?void 0:D.content}).filter(h=>typeof h=="string").flatMap(h=>s?h.split(s).filter(D=>D.trim().length>0):[h]).map(h=>{if(a)return a(h);let D=h.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:D,insertValue:`'${D}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}});var Q=O(b=>{"use strict";var Se=b&&b.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,r)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),ke=b&&b.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Se(t,e,n)};Object.defineProperty(b,"__esModule",{value:!0});b.ai=b.folders=b.filepaths=void 0;var B=N();Object.defineProperty(b,"filepaths",{enumerable:!0,get:function(){return B.filepaths}});Object.defineProperty(b,"folders",{enumerable:!0,get:function(){return B.folders}});ke(W(),b);var De=Z();Object.defineProperty(b,"ai",{enumerable:!0,get:function(){return De.ai}})});var P=se(Q(),1),q={script:["dapr","list","-A","-o","json"],postProcess:function(e){try{return JSON.parse(e).map(n=>({name:n.appId,description:`HTTP Port: ${n.httpPort} age: ${n.age}`}))}catch{return[]}}},we={cache:{ttl:1e3*60*60*24*2},custom:async(e,t)=>{let n=["-s","-H","Accept: application/json","https://hub.docker.com/v2/namespaces/daprio/repositories/daprd/tags?page_size=100"],a=()=>t({command:"curl",args:n});try{return JSON.parse((await a()).stdout).results.map(i=>({name:i.name,description:`Updated: ${i.last_updated}`}))}catch(r){return console.error({error:r}),[]}}},xe={name:"dapr",description:"Dapr CLI",subcommands:[{name:"annotate",description:"Add dapr annotations to a Kubernetes configuration. Supported platforms: Kubernetes",options:[{name:"--api-token-secret",description:"The secret to use for the API token",args:{name:"api-token-secret"}},{name:["--app-id","-a"],description:"The app id to annotate",args:{name:"app-id",generators:q}},{name:"--app-max-concurrency",description:"The maximum number of concurrent requests to allow",args:{name:"app-max-concurrency",default:"-1"}},{name:["--app-port","-p"],description:"The port to expose the app on",args:{name:"app-port",default:"-1"}},{name:"--app-protocol",description:"The protocol to use for the app. Allowed values http, https, h2c, grpc, grpcs",args:{name:"app-protocol",suggestions:["http","https","h2c","grpc","grpcs"]}},{name:"--app-ssl",description:"Enable SSL for the app",hidden:!0},{name:"--app-token-secret",description:"The secret to use for the app token",args:{name:"app-token-secret"}},{name:["--config","-c"],description:"The config file to annotate",args:{name:"config",generators:(0,P.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:99}})}},{name:"--cpu-limit",description:"The CPU limit to set",args:{name:"cpu-limit"}},{name:"--cpu-request",description:"The CPU request to set",args:{name:"cpu-request"}},{name:"--dapr-image",description:"The image to use for the dapr sidecar container",args:{name:"dapr-image"}},{name:"--disable-builtin-k8s-secret-store",description:"Disable the built-in k8s secret store"},{name:"--enable-api-logging",description:"Enable API logging for the Dapr sidecar"},{name:"--enable-debug",description:"Enable debug"},{name:"--enable-metrics",description:"Enable metrics"},{name:"--enable-profile",description:"Enable profiling"},{name:"--env",description:"Environment variables to set (key value pairs, comma separated)",args:{name:"env"}},{name:"--graceful-shutdown-seconds",description:"The number of seconds to wait for the app to shutdown",args:{name:"graceful-shutdown-seconds",default:"-1"}},{name:"--http-read-buffer-size",description:"The maximum size of HTTP header read buffer in kilobytes",args:{name:"http-read-buffer-size",default:"-1"}},{name:"--http-stream-request-body",description:"Enable streaming request body for HTTP"},{name:["--kubernetes","-k"],description:"Apply annotations to Kubernetes resources",isRequired:!0,priority:100},{name:"--listen-addresses",description:"The addresses to listen on",args:{name:"listen-addresses"}},{name:"--liveness-probe-delay",description:"The delay to use for the liveness probe",args:{name:"liveness-probe-delay",default:"-1"}},{name:"--liveness-probe-period",description:"The period to use for the liveness probe",args:{name:"liveness-probe-period",default:"-1"}},{name:"--liveness-probe-threshold",description:"The threshold to use for the liveness probe",args:{name:"liveness-probe-threshold",default:"-1"}},{name:"--liveness-probe-timeout",description:"The timeout to use for the liveness probe",args:{name:"liveness-probe-timeout",default:"-1"}},{name:"--log-as-json",description:"Log as JSON"},{name:"--log-level",description:"The log level to use",args:{name:"log-level"}},{name:"--max-request-body-size",description:"The maximum request body size to use",args:{name:"max-request-body-size",default:"-1"}},{name:"--memory-limit",description:"The memory limit to set",args:{name:"memory-limit"}},{name:"--memory-request",description:"The memory request to set",args:{name:"memory-request"}},{name:"--metrics-port",description:"The port to expose the metrics on",args:{name:"metrics-port",default:"-1"}},{name:["--namespace","-n"],description:"The namespace the resource target is in (can only be set if --resource is also set)",args:{name:"namespace"}},{name:"--placement-host-address",description:"Comma separated list of addresses for Dapr actor placement servers",args:{name:"placement-host-address"}},{name:"--readiness-probe-delay",description:"The delay to use for the readiness probe",args:{name:"readiness-probe-delay",default:"-1"}},{name:"--readiness-probe-period",description:"The period to use for the readiness probe",args:{name:"readiness-probe-period",default:"-1"}},{name:"--readiness-probe-threshold",description:"The threshold to use for the readiness probe",args:{name:"readiness-probe-threshold",default:"-1"}},{name:"--readiness-probe-timeout",description:"The timeout to use for the readiness probe",args:{name:"readiness-probe-timeout",default:"-1"}},{name:["--resource","-r"],description:"The resource to target to annotate",args:{name:"resource"}},{name:"--unix-domain-socket-path",description:"Linux domain socket path to use for communicating with the Dapr sidecar",args:{name:"unix-domain-socket-path"}},{name:"--volume-mounts",description:"List of pod volumes to be mounted to the sidecar container in read-only mode",args:{name:"volume-mounts"}},{name:"--volume-mounts-rw",description:"List of pod volumes to be mounted to the sidecar container in read-write mode",args:{name:"volume-mounts-rw"}}],args:{name:"config",generators:(0,P.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:99}})}},{name:"build-info",description:"Print build info of Dapr CLI and runtime",options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"completion",description:"Generates shell completion scripts",subcommands:[{name:"bash",description:"Generates bash completion scripts",options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"fish",description:"Generates fish completion scripts",options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"powershell",description:"Generates powershell completion scripts",options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"zsh",description:"Generates zsh completion scripts",options:[{name:["--help","-h"],description:"Print this help message"}]}],options:[{name:["--help","-h"],description:"Print this help message"}]},{name:"components",description:"List all Dapr components. Supported platforms: Kubernetes",options:[{name:["--all-namespaces","-A"],description:"If true, list all Dapr components in all namespaces"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"List all Dapr components in a Kubernetes cluster",isRequired:!0},{name:["--name","-n"],description:"The components name to be printed (optional)",args:{name:"name"}},{name:"--namespace",description:"List all namespace components in a Kubernetes cluster",args:{name:"namespace"}},{name:["--output","-o"],description:"Output format (options: json or yaml or list)",args:{name:"output",default:"list",suggestions:["json","yaml","list"]}}]},{name:"configurations",description:"List all Dapr configurations. Supported platforms: Kubernetes",options:[{name:["--all-namespaces","-A"],description:"If true, list all Dapr configurations in all namespaces"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"List all Dapr configurations in a Kubernetes cluster",isRequired:!0},{name:["--name","-n"],description:"The configuration name to be printed (optional)",args:{name:"name"}},{name:"--namespace",description:"List Define namespace configurations in a Kubernetes cluster",args:{name:"namespace"}},{name:["--output","-o"],description:"Output format (options: json or yaml or list)",args:{name:"output",default:"list",suggestions:["json","yaml","list"]}}]},{name:"dashboard",description:"Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted",options:[{name:["--address","-a"],description:"Address to listen on. Only accepts IP address or localhost as a value",args:{name:"address",default:"localhost"}},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Opens Dapr dashboard in local browser via local proxy to Kubernetes cluster"},{name:["--namespace","-n"],description:"The namespace where Dapr dashboard is running",args:{name:"namespace",default:"dapr-system"}},{name:["--port","-p"],description:"The local port on which to serve Dapr dashboard",args:{name:"port",default:"8080"}},{name:["--version","-v"],description:"Print the version for Dapr dashboard"}]},{name:"init",description:"Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted",options:[{name:"--ca-root-certificate",description:"The root certificate file",args:{name:"ca-root-certificate"}},{name:"--container-runtime",description:"The container runtime to use. Supported values are docker (default) and podman",args:{name:"container-runtime",default:"docker",suggestions:["docker","podman"]}},{name:"--dashboard-version",description:"The version of the Dapr dashboard to install, for example: 0.13.0",args:{name:"dashboard-version",default:"latest"}},{name:"--dev",description:"Use Dev mode. Deploy Redis, Zipkin also in the Kubernetes cluster"},{name:"--enable-ha",description:"Enable high availability (HA) mode"},{name:"--enable-mtls",description:"Enable mTLS in your cluster"},{name:"--from-dir",description:"Use Dapr artifacts from local directory for self-hosted installation",args:{name:"from-dir"}},{name:["--help","-h"],description:"Print this help message"},{name:"--image-registry",description:"Custom/private docker image repository URL",args:{name:"image-registry"}},{name:"--image-variant",description:"The image variant to use for the Dapr runtime, for example: mariner",args:{name:"image-variant"}},{name:"--issuer-private-key",description:"The issuer certificate private key",args:{name:"issuer-private-key"}},{name:"--issuer-public-certificate",description:"The issuer certificate",args:{name:"issuer-public-certificate"}},{name:["--kubernetes","-k"],description:"Deploy Dapr to a Kubernetes cluster"},{name:["--namespace","-n"],description:"The Kubernetes namespace to install Dapr in",args:{name:"namespace",default:"dapr-system"}},{name:"--network",description:"The Docker network on which to deploy the Dapr runtime",args:{name:"network"}},{name:"--runtime-version",description:"The version of the Dapr runtime to install, for example: 1.0.0",args:{name:"runtime-version",default:"latest",suggestCurrentToken:!0,generators:we}},{name:"--set",description:"Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)",isRepeatable:!0,args:{name:"set"}},{name:["--slim","-s"],description:"Exclude placement service, Redis and Zipkin containers from self-hosted installation"},{name:"--timeout",description:"The wait timeout for the Kubernetes installation",args:{name:"timeout",default:"300"}},{name:"--wait",description:"Wait for Kubernetes initialization to complete"}]},{name:"invoke",description:"Invoke a method on a given Dapr application. Supported platforms: Self-hosted",options:[{name:["--app-id","-a"],description:"The application id to invoke",args:{name:"app-id",generators:q},isRequired:!0},{name:["--data","-d"],description:"The JSON serialized data string (optional)",args:{name:"data"}},{name:["--data-file","-f"],description:"A file containing the JSON serialized data (optional)",args:{name:"data-file",template:"filepaths"}},{name:["--help","-h"],description:"Print this help message"},{name:["--method","-m"],description:"The method to invoke",args:{name:"method"},isRequired:!0},{name:["--unix-domain-socket","-u"],description:"Path to a unix domain socket dir. If specified, Dapr API servers will use Unix Domain Sockets",args:{name:"unix-domain-socket"}},{name:["--verb","-v"],description:"The HTTP verb to use",args:{name:"verb",default:"POST"}}]},{name:"list",description:"List all Dapr instances. Supported platforms: Kubernetes and self-hosted",options:[{name:["--all-namespaces","-A"],description:"If true, list all Dapr pods in all namespaces"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"List all Dapr pods in a Kubernetes cluster"},{name:"--namespace",description:"List define namespace pod in a Kubernetes cluster",args:{name:"namespace"}},{name:["--output","-o"],description:"The output format of the list. Valid values are: json, yaml, or table (default)",args:{name:"output",suggestions:["json","yaml","table"]}}]},{name:"logs",description:"Get Dapr sidecar logs for an application. Supported platforms: Kubernetes",options:[{name:["--app-id","-a"],description:"The application id for which logs are needed",args:{name:"app-id",generators:q},isRequired:!0},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Get logs from a Kubernetes cluster",isRequired:!0,priority:100},{name:["--namespace","-n"],description:"The Kubernetes namespace in which your application is deployed",args:{name:"namespace",default:"default"}},{name:["--pod-name","-p"],description:"The name of the pod in Kubernetes, in case your application has multiple pods (optional)",args:{name:"pod-name"}}]},{name:"mtls",description:"Check if mTLS is enabled. Supported platforms: Kubernetes",subcommands:[{name:"expiry",description:"Checks the expiry of the root certificate"},{name:"export",description:"Export the root CA, issuer cert and key from Kubernetes to local files",options:[{name:["--help","-h"],description:"Print this help message"},{name:["--out","-o"],description:"The output directory path to save the certs",args:{name:"out",default:"."}}]},{name:["renew-cert","rnc","renew-certificate"],description:"Rotates the Dapr root certificate on your Kubernetes cluster",options:[{name:"--ca-root-certificate",description:"The root certificate file",args:{name:"ca-root-certificate"}},{name:"--image-variant",description:"The image variant to use for the Dapr runtime, for example: mariner",args:{name:"image-variant"}},{name:"--issuer-private-key",description:"The issuer certificate private key",args:{name:"issuer-private-key"}},{name:"--issuer-public-certificate",description:"The issuer certificate",args:{name:"issuer-public-certificate"}},{name:["--kubernetes","-k"],description:"Renews root and issuer certificates of Dapr in a Kubernetes cluster",isRequired:!0},{name:"--private-key",description:"The root.key file which is used to generate root certificate",args:{name:"private-key"}},{name:"--restart",description:"Restart Dapr control plane services"},{name:"--timeout",description:"The timeout for the certificate renewal",args:{name:"timeout",default:"300"}},{name:"--valid-until",description:"Max days before certificate expires",args:{name:"valid-until",default:"365"}}]}],options:[{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Check if mTLS is enabled in a Kubernetes cluster",isRequired:!0}]},{name:"publish",description:"Publish a pub-sub event. Supported platforms: Self-hosted",options:[{name:["--data","-d"],description:"The JSON serialized data string (optional)",args:{name:"data"}},{name:["--data-file","-f"],description:"A file containing the JSON serialized data (optional)",args:{name:"data-file"}},{name:["--help","-h"],description:"Print this help message"},{name:["--metadata","-m"],description:"The JSON serialized publish metadata (optional)",args:{name:"metadata"}},{name:["--publish-app-id","-i"],description:"The ID of the publishing app",args:{name:"publish-app-id"},isRequired:!0},{name:["--pubsub","-p"],description:"The name of the pub/sub component",args:{name:"pubsub"},isRequired:!0},{name:["--topic","-t"],description:"The topic to be published to",args:{name:"topic"},isRequired:!0},{name:["--unix-domain-socket","-u"],description:"Path to a unix domain socket dir. If specified, Dapr API servers will use Unix Domain Sockets",args:{name:"unix-domain-socket"}}]},{name:"run",description:"Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted",options:[{name:"--app-channel-address",description:"The network address the application listens on",args:{name:"app-channel-address",default:"127.0.0.1"}},{name:"--app-health-check-path",description:"Path used for health checks; HTTP only",args:{name:"app-health-check-path"}},{name:"--app-health-probe-interval",description:"Interval to probe for the health of the app in seconds",args:{name:"app-health-probe-interval",default:"0"}},{name:"--app-health-probe-timeout",description:"Timeout for app health probes in milliseconds",args:{name:"app-health-probe-timeout",default:"0"}},{name:"--app-health-threshold",description:"Number of consecutive failures for the app to be considered unhealthy",args:{name:"app-health-threshold",default:"0"}},{name:["--app-id","-a"],description:"The id for your application, used for service discovery",args:{name:"app-id"}},{name:"--app-max-concurrency",description:"The concurrency level of the application, otherwise is unlimited",args:{name:"app-max-concurrency",default:"-1"}},{name:["--app-port","-p"],description:"The port your application is listening on",args:{name:"app-port",default:"-1"}},{name:["--app-protocol","-P"],description:"The protocol (grpc, grpcs, http, https, h2c) Dapr uses to talk to the application",args:{name:"app-protocol",default:"http",suggestions:["http","https","h2c","grpc","grpcs"]}},{name:"--app-ssl",description:"Enable https when Dapr invokes the application"},{name:["--components-path","-d"],description:"The path for components directory. Default is $HOME/.dapr/components or %USERPROFILE%.daprcomponents",args:{name:"components-path",template:"folders"}},{name:["--config","-c"],description:"Dapr configuration file",args:{name:"config",generators:(0,P.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:100}})}},{name:["--dapr-grpc-port","-G"],description:"The gRPC port for Dapr to listen on",args:{name:"dapr-grpc-port",default:"-1"}},{name:"--dapr-http-max-request-size",description:"Max size of request body in MB",args:{name:"dapr-http-max-request-size",default:"-1"}},{name:["--dapr-http-port","-H"],description:"The HTTP port for Dapr to listen on",args:{name:"dapr-http-port",default:"-1"}},{name:"--dapr-http-read-buffer-size",description:"HTTP header read buffer in KB",args:{name:"dapr-http-read-buffer-size",default:"-1"}},{name:["--dapr-internal-grpc-port","-I"],description:"The gRPC port for the Dapr internal API to listen on",args:{name:"dapr-internal-grpc-port",default:"-1"}},{name:"--dapr-listen-addresses",description:"Comma separated list of IP addresses that sidecar will listen to",args:{name:"dapr-listen-addresses"}},{name:"--enable-api-logging",description:"Log API calls at INFO verbosity. Valid values are: true or false"},{name:"--enable-app-health-check",description:"Enable health checks for the application using the protocol defined with app-protocol"},{name:"--enable-profiling",description:"Enable pprof profiling via an HTTP endpoint"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Run the multi-app run template against Kubernetes environment"},{name:"--log-level",description:"The log verbosity. Valid values are: debug, info, warn, error, fatal, or panic",args:{name:"log-level",default:"info"}},{name:["--metrics-port","-M"],description:"The port of metrics on dapr",args:{name:"metrics-port",default:"-1"}},{name:"--placement-host-address",description:"The address of the placement service. Format is either <hostname> for default port or <hostname>:<port> for custom port",args:{name:"placement-host-address",default:"localhost"}},{name:"--profile-port",description:"The port for the profile server to listen on",args:{name:"profile-port",default:"-1"}},{name:"--resources-path",description:"The path for resources directory",isRepeatable:!0,args:{name:"resources-path",template:"folders"}},{name:["--run-file","-f"],description:"Path to the run template file for the list of apps to run",args:{name:"run-file",generators:(0,P.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:100}})}},{name:["--unix-domain-socket","-u"],description:"Path to a unix domain socket dir. If specified, Dapr API servers will use Unix Domain Sockets",args:{name:"unix-domain-socket"}}]},{name:"status",description:"Show the health status of Dapr services. Supported platforms: Kubernetes",options:[{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Show the health status of Dapr services on Kubernetes cluster",isRequired:!0}]},{name:"stop",description:"Stop Dapr instances and their associated apps. Supported platforms: Self-hosted",options:[{name:["--app-id","-a"],description:"The application id to be stopped",args:{name:"app-id",isVariadic:!0,generators:q}},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Stop deployments in Kunernetes based on multi-app run file"},{name:["--run-file","-f"],description:"Path to the run template file for the list of apps to stop",args:{name:"run-file",generators:(0,P.filepaths)({extensions:["yaml","yml"],editFileSuggestions:{priority:100}})}}]},{name:"uninstall",description:"Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted",options:[{name:"--all",description:"Remove .dapr directory, Redis, Placement and Zipkin containers on local machine, and CRDs on a Kubernetes cluster"},{name:"--container-runtime",description:"The container runtime to use. Supported values are docker (default) and podman",args:{name:"container-runtime",default:"docker"}},{name:"--dev",description:"Uninstall Dapr Redis and Zipking installations from Kubernetes cluster"},{name:["--help","-h"],description:"Print this help message"},{name:["--kubernetes","-k"],description:"Uninstall Dapr from a Kubernetes cluster"},{name:["--namespace","-n"],description:"The Kubernetes namespace to uninstall Dapr from",args:{name:"namespace",default:"dapr-system"}},{name:"--network",description:"The Docker network from which to remove the Dapr runtime",args:{name:"network"}},{name:"--timeout",description:"The timeout for the Kubernetes uninstall",args:{name:"timeout",default:"300"}}]},{name:"upgrade",description:"Upgrades or downgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes",options:[{name:"--dashboard-version",description:"The version of the Dapr dashboard to upgrade or downgrade to, for example: 0.13.0",args:{name:"dashboard-version"}},{name:["--help","-h"],description:"Print this help message"},{name:"--image-registry",description:"Custom/Private docker image repository URL",args:{name:"image-registry"}},{name:"--image-variant",description:"The image variant to use for the Dapr runtime, for example: mariner",args:{name:"image-variant"}},{name:["--kubernetes","-k"],description:"Upgrade or downgrade Dapr in a Kubernetes cluster",isRequired:!0},{name:"--runtime-version",description:"The version of the Dapr runtime to upgrade or downgrade to, for example: 1.0.0",args:{name:"runtime-version"},isRequired:!0},{name:"--set",description:"Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)",isRepeatable:!0,args:{name:"set"}},{name:"--timeout",description:"The timeout for the Kubernetes upgrade",args:{name:"timeout",default:"300"}}]},{name:"version",description:"Print the Dapr runtime and CLI version",options:[{name:["--help","-h"],description:"Print this help message"},{name:["--output","-o"],description:"The output format of the version command. Valid values are: json",args:{name:"output",suggestions:["json"]}}]},{name:"help",description:"Help about any command",subcommands:[{name:"annotate",description:"Add dapr annotations to a Kubernetes configuration. Supported platforms: Kubernetes"},{name:"build-info",description:"Print build info of Dapr CLI and runtime"},{name:"completion",description:"Generates shell completion scripts",subcommands:[{name:"bash",description:"Generates bash completion scripts"},{name:"fish",description:"Generates fish completion scripts"},{name:"powershell",description:"Generates powershell completion scripts"},{name:"zsh",description:"Generates zsh completion scripts"}]},{name:"components",description:"List all Dapr components. Supported platforms: Kubernetes"},{name:"configurations",description:"List all Dapr configurations. Supported platforms: Kubernetes"},{name:"dashboard",description:"Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted"},{name:"init",description:"Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted"},{name:"invoke",description:"Invoke a method on a given Dapr application. Supported platforms: Self-hosted"},{name:"list",description:"List all Dapr instances. Supported platforms: Kubernetes and self-hosted"},{name:"logs",description:"Get Dapr sidecar logs for an application. Supported platforms: Kubernetes"},{name:"mtls",description:"Check if mTLS is enabled. Supported platforms: Kubernetes",subcommands:[{name:"expiry",description:"Checks the expiry of the root certificate"},{name:"export",description:"Export the root CA, issuer cert and key from Kubernetes to local files"},{name:["renew-cert","rnc","renew-certificate"],description:"Rotates the Dapr root certificate on your Kubernetes cluster"}]},{name:"publish",description:"Publish a pub-sub event. Supported platforms: Self-hosted"},{name:"run",description:"Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted"},{name:"status",description:"Show the health status of Dapr services. Supported platforms: Kubernetes"},{name:"stop",description:"Stop Dapr instances and their associated apps. Supported platforms: Self-hosted"},{name:"uninstall",description:"Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted"},{name:"upgrade",description:"Upgrades or downgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes"},{name:"version",description:"Print the Dapr runtime and CLI version"}]}],options:[{name:["--version","-v"],description:"Version for dapr"},{name:"--log-as-json",description:"Log output in JSON format",isPersistent:!0},{name:"--runtime-path",description:"The path to the dapr runtime installation directory",isPersistent:!0,args:{name:"runtime-path",template:"folders"}},{name:["--help","-h"],description:"Display help",isPersistent:!0}]},Re=xe;export{Re as default};
|
package/build/deno/generators.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var te=Object.create;var
|
|
2
|
-
`),[".DS_Store"])
|
|
1
|
+
var te=Object.create;var L=Object.defineProperty;var ie=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var oe=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var N=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var ae=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of se(n))!re.call(e,s)&&s!==t&&L(e,s,{get:()=>n[s],enumerable:!(i=ie(n,s))||i.enumerable});return e};var ce=(e,n,t)=>(t=e!=null?te(oe(e)):{},ae(n||!e||!e.__esModule?L(t,"default",{value:e,enumerable:!0}):t,e));var J=N(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.shellExpand=S.ensureTrailingSlash=void 0;var le=e=>e.endsWith("/")?e:`${e}/`;S.ensureTrailingSlash=le;var ue=(e,n)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",n):e,de=(e,n)=>e.replace(/\$([A-Za-z0-9_]+)/g,s=>{var o;let r=s.slice(1);return(o=n[r])!==null&&o!==void 0?o:s}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(s,o,r)=>{var l,d;return(d=(l=n[o])!==null&&l!==void 0?l:r)!==null&&d!==void 0?d:s}),fe=(e,n)=>{var t;let{environmentVariables:i}=n;return de(ue(e,(t=i?.HOME)!==null&&t!==void 0?t:"~"),i)};S.shellExpand=fe});var z=N(b=>{"use strict";var pe=b&&b.__awaiter||function(e,n,t,i){function s(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function l(c){try{u(i.next(c))}catch(a){r(a)}}function d(c){try{u(i.throw(c))}catch(a){r(a)}}function u(c){c.done?o(c.value):s(c.value).then(l,d)}u((i=i.apply(e,n||[])).next())})};Object.defineProperty(b,"__esModule",{value:!0});b.filepaths=b.folders=b.getCurrentInsertedDirectory=void 0;b.sortFilesAlphabetically=G;var W=J();function G(e,n=[]){let t=n.map(s=>s.toLowerCase()),i=e.filter(s=>!t.includes(s.toLowerCase()));return[...i.filter(s=>!s.startsWith(".")).sort((s,o)=>s.localeCompare(o)),...i.filter(s=>s.startsWith(".")).sort((s,o)=>s.localeCompare(o)),"../"]}var me=(e,n,t)=>{if(e===null)return"/";let i=(0,W.shellExpand)(n,t),s=i.slice(0,i.lastIndexOf("/")+1);return s===""?(0,W.ensureTrailingSlash)(e):s.startsWith("/")?s:`${(0,W.ensureTrailingSlash)(e)}${s}`};b.getCurrentInsertedDirectory=me;function k(e={}){let{extensions:n=[],equals:t=[],matches:i,filterFolders:s=!1,editFileSuggestions:o,editFolderSuggestions:r,rootDirectory:l,showFolders:d="always"}=e,u=new Set(n),c=new Set(t),a=()=>n.length>0||t.length>0||i,f=(m=[])=>a()?m.filter(({name:y="",type:D})=>{if(!s&&D==="folder"||c.has(y)||i&&y.match(i))return!0;let[,...p]=y.split(".");if(p.length>=1){let v=p.length-1,x=p[v];do{if(u.has(x))return!0;v-=1,x=[p[v],x].join(".")}while(v>=0)}return!1}):m,g=(m=[])=>!o&&!r?m:m.map(y=>Object.assign(Object.assign({},y),(y.type==="file"?o:r)||{}));return{trigger:(m,y)=>{let D=m.lastIndexOf("/"),p=y.lastIndexOf("/");return D!==p?!0:D===-1&&p===-1?!1:m.slice(0,D)!==y.slice(0,p)},getQueryTerm:m=>m.slice(m.lastIndexOf("/")+1),custom:(m,y,D)=>pe(this,void 0,void 0,function*(){var p;let{isDangerous:v,currentWorkingDirectory:x,searchTerm:h}=D,O=(p=(0,b.getCurrentInsertedDirectory)(l??x,h,D))!==null&&p!==void 0?p:"/";try{let M=yield y({command:"ls",args:["-1ApL"],cwd:O}),ne=G(M.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),$=[];for(let C of ne)if(C){let j=C.endsWith("/")?"folders":"filepaths";(j==="filepaths"&&d!=="only"||j==="folders"&&d!=="never")&&$.push({type:j==="filepaths"?"file":"folder",name:C,insertValue:C,isDangerous:v,context:{templateType:j}})}return g(f($))}catch{return[]}})}}b.folders=Object.assign(()=>k({showFolders:"only"}),Object.freeze(k({showFolders:"only"})));b.filepaths=Object.assign(k,Object.freeze(k()))});var U=N(_=>{"use strict";var T=_&&_.__awaiter||function(e,n,t,i){function s(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function l(c){try{u(i.next(c))}catch(a){r(a)}}function d(c){try{u(i.throw(c))}catch(a){r(a)}}function u(c){c.done?o(c.value):s(c.value).then(l,d)}u((i=i.apply(e,n||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.valueList=he;_.keyValue=ge;_.keyValueList=ye;var K=new Map;function R(e,n){return e.length===0?n:n.map(t=>t.insertValue?t:Object.assign(Object.assign({},t),{insertValue:t.name+e}))}function B(e,n,t){return T(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...t);return R(n,i)}if(typeof e[0]=="string"){let i=e.map(s=>({name:s}));return R(n,i)}return R(n,e)})}function V(e,n,t,i){return T(this,void 0,void 0,function*(){if(t||Array.isArray(e)){let s=K.get(e);return s===void 0&&(s=yield B(e,n,i),K.set(e,s)),s}return B(e,n,i)})}function Q(e,n){return typeof n=="string"?e&&n==="keys"||!e&&n==="values":n}function F(e,...n){return Math.max(...n.map(t=>e.lastIndexOf(t)))}function q(e,n){let t=new Set(e);return n.filter(i=>{var s;return typeof i.name=="string"?!t.has(i.name):!(!((s=i.name)===null||s===void 0)&&s.some(o=>t.has(o)))})}function he({delimiter:e=",",values:n=[],cache:t=!1,insertDelimiter:i=!1,allowRepeatedValues:s=!1}){return{trigger:(o,r)=>o.lastIndexOf(e)!==r.lastIndexOf(e),getQueryTerm:o=>o.slice(o.lastIndexOf(e)+e.length),custom:(...o)=>T(this,void 0,void 0,function*(){var r;let l=yield V(n,i?e:"",t,o);if(s)return l;let[d]=o,u=(r=d[d.length-1])===null||r===void 0?void 0:r.split(e);return q(u,l)})}}function ge({separator:e="=",keys:n=[],values:t=[],cache:i=!1,insertSeparator:s=!0}){return{trigger:(o,r)=>o.indexOf(e)!==r.indexOf(e),getQueryTerm:o=>o.slice(o.indexOf(e)+1),custom:(...o)=>T(this,void 0,void 0,function*(){let[r]=o,d=!r[r.length-1].includes(e),u=d?n:t,c=Q(d,i);return V(u,d&&s?e:"",c,o)})}}function ye({separator:e="=",delimiter:n=",",keys:t=[],values:i=[],cache:s=!1,insertSeparator:o=!0,insertDelimiter:r=!1,allowRepeatedKeys:l=!1,allowRepeatedValues:d=!0}){return{trigger:(u,c)=>{let a=F(u,e,n),f=F(c,e,n);return a!==f},getQueryTerm:u=>{let c=F(u,e,n);return u.slice(c+1)},custom:(...u)=>T(this,void 0,void 0,function*(){let[c]=u,a=c[c.length-1],f=F(a,e,n),g=f===-1||a.slice(f,f+e.length)!==e,m=g?t:i,y=Q(g,s),p=yield V(m,g?o?e:"":r?n:"",y,u);if(g){if(l)return p;let x=a.split(n).map(h=>h.slice(0,h.indexOf(e)));return q(x,p)}if(d)return p;let v=a.split(n).map(x=>x.slice(x.indexOf(e)+e.length));return q(v,p)})}}});var Z=N(I=>{"use strict";var we=I&&I.__awaiter||function(e,n,t,i){function s(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function l(c){try{u(i.next(c))}catch(a){r(a)}}function d(c){try{u(i.throw(c))}catch(a){r(a)}}function u(c){c.done?o(c.value):s(c.value).then(l,d)}u((i=i.apply(e,n||[])).next())})};Object.defineProperty(I,"__esModule",{value:!0});I.ai=Oe;var ve=4097,be=4,De=.8,xe=ve*be*De;function Oe({name:e,prompt:n,message:t,postProcess:i,temperature:s,splitOn:o}){return{scriptTimeout:15e3,custom:(r,l,d)=>we(this,void 0,void 0,function*(){var u,c;let a=yield l({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(a.stdout))return[];let f=typeof n=="function"?yield n({tokens:r,executeCommand:l,generatorContext:d}):n,g=typeof t=="function"?yield t({tokens:r,executeCommand:l,generatorContext:d}):t;if(g===null||g.length===0)return console.warn("No message provided to AI generator"),[];let m=xe-((u=f?.length)!==null&&u!==void 0?u:0),y={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...f?[{role:"system",content:f}]:[],{role:"user",content:g.slice(0,m)}],temperature:s},D=JSON.stringify(y),p=yield l({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",D]}),v=JSON.parse(p.stdout);return(c=v?.choices.map(h=>{var O;return(O=h?.message)===null||O===void 0?void 0:O.content}).filter(h=>typeof h=="string").flatMap(h=>o?h.split(o).filter(O=>O.trim().length>0):[h]).map(h=>{if(i)return i(h);let O=h.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:O,insertValue:`'${O}'`,description:"Generated by Fig AI"}}))!==null&&c!==void 0?c:[]})}}});var X=N(w=>{"use strict";var _e=w&&w.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var s=Object.getOwnPropertyDescriptor(n,t);(!s||("get"in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,s)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),Se=w&&w.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&_e(n,e,t)};Object.defineProperty(w,"__esModule",{value:!0});w.ai=w.folders=w.filepaths=void 0;var H=z();Object.defineProperty(w,"filepaths",{enumerable:!0,get:function(){return H.filepaths}});Object.defineProperty(w,"folders",{enumerable:!0,get:function(){return H.folders}});Se(U(),w);var Ne=Z();Object.defineProperty(w,"ai",{enumerable:!0,get:function(){return Ne.ai}})});var A=ce(X(),1);var P=Symbol("singleComment"),Y=Symbol("multiComment"),Te=()=>"",Ie=(e,n,t)=>e.slice(n,t).replace(/[^ \t\r\n]/g," "),Ce=(e,n)=>{let t=n-1,i=0;for(;e[t]==="\\";)t-=1,i+=1;return!!(i%2)};function E(e,{whitespace:n=!0,trailingCommas:t=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let i=n?Ie:Te,s=!1,o=!1,r=0,l="",d="",u=-1;for(let a=0;a<e.length;a++){let f=e[a],g=e[a+1];if(!o&&f==='"'&&(Ce(e,a)||(s=!s)),!s)if(!o&&f+g==="//")l+=e.slice(r,a),r=a,o=P,a++;else if(o===P&&f+g===`\r
|
|
3
3
|
`){a++,o=!1,l+=i(e,r,a),r=a;continue}else if(o===P&&f===`
|
|
4
4
|
`)o=!1,l+=i(e,r,a),r=a;else if(!o&&f+g==="/*"){l+=e.slice(r,a),r=a,o=Y,a++;continue}else if(o===Y&&f+g==="*/"){a++,o=!1,l+=i(e,r,a+1),r=a+1;continue}else t&&!o&&(u!==-1?f==="}"||f==="]"?(l+=e.slice(r,a),d+=i(l,0,1)+l.slice(1),l="",r=a,u=-1):f!==" "&&f!==" "&&f!=="\r"&&f!==`
|
|
5
|
-
`&&(l+=e.slice(r,a),r=a,u=-1):f===","&&(d+=l+e.slice(r,a),l="",r=a,u=a))}let c=o===P?i(e,r):e.slice(r);return d+l+c}function ke(e){let n=new Set,t=[];for(let i of e)n.has(i.name)||(n.add(i.name),t.push(i));return t}function Fe(e){return"kind"in e?e.kind==="namespace"?e.namespaceDef.elements:e.kind==="interface"?[...e.interfaceDef.methods,...e.interfaceDef.properties]:e.kind==="class"?[...e.classDef.methods,...e.classDef.properties]:[]:[]}function ee(e,n){let[t,...i]=n;return t?e.filter(s=>s.name===t).flatMap(s=>ee(Fe(s),i)):e}function je(e){return/^[A-Z]/.test(e)?60:e.startsWith("_")?40:50}function Pe(e){if("kind"in e){if(e.kind==="typeAlias")return"Type";let n=e.kind;return`${n.charAt(0).toUpperCase()}${n.slice(1)}`}return"Property"}function Ae(e,n){let{showPrivateNodes:t}=n;return e.filter(i=>!("kind"in i&&(i.kind==="moduleDoc"||i.kind==="import")||"declarationKind"in i&&!t&&i.declarationKind==="private"))}function We(e){return{name:e.name,description:Pe(e),priority:je(e.name),icon:"fig://icon?type=asterisk"}}var Qe={scriptTimeout:12e3,trigger:".",getQueryTerm:".",script:e=>{let n=new Set(["--private","--builtin","--unstable"]),t=e.slice(0,-1).filter(i=>!(i.startsWith("-")&&!n.has(i))&&!i.startsWith("$")&&!i.startsWith("("));return t.push("--json"),t},postProcess:(e,n)=>{let t=JSON.parse(e),s=n[n.length-1].split(".").slice(0,-1),o=ee(t,s),r=Ae(o,{showPrivateNodes:n.includes("--private")});return ke(r).map(d=>We(d))}},Ue={script:["curl","-sL","https://cdn.deno.land/deno/meta/versions.json"],cache:{ttl:1e3*60*60*24},postProcess:e=>JSON.parse(e).versions.map(t=>({name:t.startsWith("v")?t.slice(1):t}))};function Ze(e){let n=new Set(e.names),t=e.matchPriority??75;return{template:"filepaths",filterTemplateSuggestions:i=>{for(let s of i)n.has(s.name)&&(s.priority=t);return i}}}var He=(0,A.filepaths)({matches:/\.(m?(j|t)sx?)$/i,editFileSuggestions:{priority:75}}),Xe=(0,A.valueList)({insertDelimiter:!0,values:[{name:"adjacent-overload-signatures",description:"Requires overload signatures to be adjacent to each other"},{name:"ban-ts-comment",description:"Disallows the use of Typescript directives without a comment"},{name:"ban-types",description:"Bans the use of primitive wrapper objects (e.g. `String` the object is a wrapper\nof `string` the primitive) in addition to the non-explicit `Function` type and\nthe misunderstood `Object` type"},{name:"ban-unknown-rule-code",description:"Warns the usage of unknown rule codes in ignore directives"},{name:"ban-untagged-ignore",description:"Requires `deno-lint-ignore` to be annotated with one or more rule names"},{name:"ban-unused-ignore",description:"Warns unused ignore directives"},{name:"constructor-super",description:"Verifies the correct usage of constructors and calls to `super()`"},{name:"for-direction",description:"Requires `for` loop control variables to increment in the correct direction"},{name:"getter-return",description:"Requires all property getter functions to return a value"},{name:"no-array-constructor",description:"Enforce conventional usage of array construction"},{name:"no-async-promise-executor",description:"Requires that async promise executor functions are not used"},{name:"no-case-declarations",description:"Requires lexical declarations (`let`, `const`, `function` and `class`) in switch\n`case` or `default` clauses to be scoped with brackets"},{name:"no-class-assign",description:"Disallows modifying variables of class declarations"},{name:"no-compare-neg-zero",description:"Disallows comparing against negative zero (`-0`)"},{name:"no-cond-assign",description:"Disallows the use of the assignment operator, `=`, in conditional statements"},{name:"no-constant-condition",description:"Disallows the use of a constant expression in conditional test"},{name:"no-control-regex",description:"Disallows the use ascii control characters in regular expressions"},{name:"no-debugger",description:"Disallows the use of the `debugger` statement"},{name:"no-delete-var",description:"Disallows the deletion of variables"},{name:"no-deprecated-deno-api",description:"Warns the usage of the deprecated Deno APIs"},{name:"no-dupe-args",description:"Disallows using an argument name more than once in a function signature"},{name:"no-dupe-class-members",description:"Disallows using a class member function name more than once"},{name:"no-dupe-else-if",description:"Disallows using the same condition twice in an `if`/`else if` statement"},{name:"no-dupe-keys",description:"Disallows duplicate keys in object literals"},{name:"no-duplicate-case",description:"Disallows using the same case clause in a switch statement more than once"},{name:"no-empty",description:"Disallows the use of empty block statements"},{name:"no-empty-character-class",description:"Disallows using the empty character class in a regular expression"},{name:"no-empty-enum",description:"Disallows the declaration of an empty enum"},{name:"no-empty-interface",description:"Disallows the declaration of an empty interface"},{name:"no-empty-pattern",description:"Disallows the use of empty patterns in destructuring"},{name:"no-ex-assign",description:"Disallows the reassignment of exception parameters"},{name:"no-explicit-any",description:"Disallows use of the `any` type"},{name:"no-extra-boolean-cast",description:"Disallows unnecessary boolean casts"},{name:"no-extra-non-null-assertion",description:"Disallows unnecessary non-null assertions"},{name:"no-extra-semi",description:"<!-- deno-fmt-ignore-file -->"},{name:"no-fallthrough",description:"Disallows the implicit fallthrough of case statements"},{name:"no-func-assign",description:"Disallows the overwriting/reassignment of an existing function"},{name:"no-global-assign",description:"Disallows assignment to native Javascript objects"},{name:"no-import-assign",description:"Disallows reassignment of imported module bindings"},{name:"no-inferrable-types",description:"Disallows easily inferrable types"},{name:"no-inner-declarations",description:"Disallows variable or function definitions in nested blocks"},{name:"no-invalid-regexp",description:"Disallows specifying invalid regular expressions in RegExp constructors"},{name:"no-invalid-triple-slash-reference",description:"Warns the wrong usage of triple-slash reference directives"},{name:"no-irregular-whitespace",description:"Disallows the use of non-space or non-tab whitespace characters"},{name:"no-misused-new",description:"Disallows defining `constructor`s for interfaces or `new` for classes"},{name:"no-namespace",description:"Disallows the use of `namespace` and `module` keywords in TypeScript code"},{name:"no-new-symbol",description:"Disallows the use of `new` operators with built-in `Symbol`s"},{name:"no-obj-calls",description:"Disallows calling built-in global objects like functions"},{name:"no-octal",description:"Disallows expressing octal numbers via numeric literals beginning with `0`"},{name:"no-prototype-builtins",description:"Disallows the use of `Object.prototype` builtins directly"},{name:"no-redeclare",description:"Disallows redeclaration of variables, functions, parameters with the same name"},{name:"no-regex-spaces",description:"Disallows multiple spaces in regular expression literals"},{name:"no-self-assign",description:"Disallows self assignments"},{name:"no-setter-return",description:"Disallows returning values from setters"},{name:"no-shadow-restricted-names",description:"Disallows shadowing of restricted names"},{name:"no-this-alias",description:"Disallows assigning variables to `this`"},{name:"no-this-before-super",description:"Disallows use of `this` or `super` before calling `super()` in constructors"},{name:"no-unreachable",description:"Disallows the unreachable code after the control flow statements"},{name:"no-unsafe-finally",description:"Disallows the use of control flow statements within `finally` blocks"},{name:"no-unsafe-negation",description:"Disallows the usage of negation operator `!` as the left operand of relational\noperators"},{name:"no-unused-labels",description:"Disallows unused labels"},{name:"no-unused-vars",description:"Enforces all variables used at least once"},{name:"no-var",description:"Enforces the use of block scoped variables over more error prone function scoped\nvariables. Block scoped variables are defined using `const` and `let` keywords"},{name:"no-window-prefix",description:"Disallows the use of Web APIs via the `window` object"},{name:"no-with",description:"Disallows the usage of `with` statements"},{name:"prefer-as-const",description:"Recommends using const assertion (`as const`) over explicitly specifying literal\ntypes or using type assertion"},{name:"prefer-const",description:"Recommends declaring variables with [`const`] over [`let`]"},{name:"prefer-namespace-keyword",description:"Recommends the use of `namespace` keyword over `module` keyword when declaring\nTypeScript module"},{name:"require-await",description:"Disallows async functions that have no await expression"},{name:"require-yield",description:"Disallows generator functions that have no `yield`"},{name:"use-isnan",description:"Disallows comparisons to `NaN`"},{name:"valid-typeof",description:"Restricts the use of the `typeof` operator to a specific set of string literals"}].map(e=>({...e,icon:"fig://icon?type=string"}))});function Re(e){let n=/^(-[A-Zabd-z]*c=?|--config(?:=|$))/;for(let[t,i]of e.entries()){let s=i.match(n);if(s===null)continue;let o=i.slice(s[1].length);return o===""?e[t+1]:o}return null}async function Ve(e,n){let t=Re(e),i;if(t){let{stdout:s}=await n({command:"cat",args:[t]});i=s}else{let{stdout:s}=await n({command:"bash",args:["-c","until [[ ( -f deno.json || -f deno.jsonc || $PWD = '/' ) ]]; do cd ..; done; \\cat deno.json 2>/dev/null || \\cat deno.jsonc 2>/dev/null"]})}try{return JSON.parse(E(i))}catch(s){return console.error(`Error parsing config file: ${s}`),null}}var Ye={cache:{strategy:"stale-while-revalidate"},custom:async(e,n)=>{let t=await Ve(e,n);return t===null?[]:Object.entries(t.tasks||{}).map(([i,s])=>{let o=t.fig?.[i]||{};return{name:i,displayName:o.displayName,description:o.description||s,icon:o.icon||"\u2699\uFE0F",priority:o.priority,hidden:o.hidden}})}},en={script:["bash","-c","command find ~/.deno/bin -maxdepth 1 -perm -111 -type f"],postProcess:e=>e.split(`
|
|
6
|
-
`).filter(n=>!n.endsWith("/deno")).map(n=>({name:n.slice(n.lastIndexOf("/")+1),icon:"\u{1F4E6}",description:n}))},
|
|
5
|
+
`&&(l+=e.slice(r,a),r=a,u=-1):f===","&&(d+=l+e.slice(r,a),l="",r=a,u=a))}let c=o===P?i(e,r):e.slice(r);return d+l+c}function je(e){let n=new Set,t=[];for(let i of e)n.has(i.name)||(n.add(i.name),t.push(i));return t}function ke(e){return"kind"in e?e.kind==="namespace"?e.namespaceDef.elements:e.kind==="interface"?[...e.interfaceDef.methods,...e.interfaceDef.properties]:e.kind==="class"?[...e.classDef.methods,...e.classDef.properties]:[]:[]}function ee(e,n){let[t,...i]=n;return t?e.filter(s=>s.name===t).flatMap(s=>ee(ke(s),i)):e}function Fe(e){return/^[A-Z]/.test(e)?60:e.startsWith("_")?40:50}function Pe(e){if("kind"in e){if(e.kind==="typeAlias")return"Type";let n=e.kind;return`${n.charAt(0).toUpperCase()}${n.slice(1)}`}return"Property"}function Ae(e,n){let{showPrivateNodes:t}=n;return e.filter(i=>!("kind"in i&&(i.kind==="moduleDoc"||i.kind==="import")||"declarationKind"in i&&!t&&i.declarationKind==="private"))}function We(e){return{name:e.name,description:Pe(e),priority:Fe(e.name),icon:"fig://icon?type=asterisk"}}var Qe={scriptTimeout:12e3,trigger:".",getQueryTerm:".",script:e=>{let n=new Set(["--private","--builtin","--unstable"]),t=e.slice(0,-1).filter(i=>!(i.startsWith("-")&&!n.has(i))&&!i.startsWith("$")&&!i.startsWith("("));return t.push("--json"),t},postProcess:(e,n)=>{let t=JSON.parse(e),s=n[n.length-1].split(".").slice(0,-1),o=ee(t,s),r=Ae(o,{showPrivateNodes:n.includes("--private")});return je(r).map(d=>We(d))}},Ue={script:["curl","-sL","https://cdn.deno.land/deno/meta/versions.json"],cache:{ttl:1e3*60*60*24},postProcess:e=>JSON.parse(e).versions.map(t=>({name:t.startsWith("v")?t.slice(1):t}))};function Ze(e){let n=new Set(e.names),t=e.matchPriority??75;return{template:"filepaths",filterTemplateSuggestions:i=>{for(let s of i)n.has(s.name)&&(s.priority=t);return i}}}var He=(0,A.filepaths)({matches:/\.(m?(j|t)sx?)$/i,editFileSuggestions:{priority:75}}),Xe=(0,A.valueList)({insertDelimiter:!0,values:[{name:"adjacent-overload-signatures",description:"Requires overload signatures to be adjacent to each other"},{name:"ban-ts-comment",description:"Disallows the use of Typescript directives without a comment"},{name:"ban-types",description:"Bans the use of primitive wrapper objects (e.g. `String` the object is a wrapper\nof `string` the primitive) in addition to the non-explicit `Function` type and\nthe misunderstood `Object` type"},{name:"ban-unknown-rule-code",description:"Warns the usage of unknown rule codes in ignore directives"},{name:"ban-untagged-ignore",description:"Requires `deno-lint-ignore` to be annotated with one or more rule names"},{name:"ban-unused-ignore",description:"Warns unused ignore directives"},{name:"constructor-super",description:"Verifies the correct usage of constructors and calls to `super()`"},{name:"for-direction",description:"Requires `for` loop control variables to increment in the correct direction"},{name:"getter-return",description:"Requires all property getter functions to return a value"},{name:"no-array-constructor",description:"Enforce conventional usage of array construction"},{name:"no-async-promise-executor",description:"Requires that async promise executor functions are not used"},{name:"no-case-declarations",description:"Requires lexical declarations (`let`, `const`, `function` and `class`) in switch\n`case` or `default` clauses to be scoped with brackets"},{name:"no-class-assign",description:"Disallows modifying variables of class declarations"},{name:"no-compare-neg-zero",description:"Disallows comparing against negative zero (`-0`)"},{name:"no-cond-assign",description:"Disallows the use of the assignment operator, `=`, in conditional statements"},{name:"no-constant-condition",description:"Disallows the use of a constant expression in conditional test"},{name:"no-control-regex",description:"Disallows the use ascii control characters in regular expressions"},{name:"no-debugger",description:"Disallows the use of the `debugger` statement"},{name:"no-delete-var",description:"Disallows the deletion of variables"},{name:"no-deprecated-deno-api",description:"Warns the usage of the deprecated Deno APIs"},{name:"no-dupe-args",description:"Disallows using an argument name more than once in a function signature"},{name:"no-dupe-class-members",description:"Disallows using a class member function name more than once"},{name:"no-dupe-else-if",description:"Disallows using the same condition twice in an `if`/`else if` statement"},{name:"no-dupe-keys",description:"Disallows duplicate keys in object literals"},{name:"no-duplicate-case",description:"Disallows using the same case clause in a switch statement more than once"},{name:"no-empty",description:"Disallows the use of empty block statements"},{name:"no-empty-character-class",description:"Disallows using the empty character class in a regular expression"},{name:"no-empty-enum",description:"Disallows the declaration of an empty enum"},{name:"no-empty-interface",description:"Disallows the declaration of an empty interface"},{name:"no-empty-pattern",description:"Disallows the use of empty patterns in destructuring"},{name:"no-ex-assign",description:"Disallows the reassignment of exception parameters"},{name:"no-explicit-any",description:"Disallows use of the `any` type"},{name:"no-extra-boolean-cast",description:"Disallows unnecessary boolean casts"},{name:"no-extra-non-null-assertion",description:"Disallows unnecessary non-null assertions"},{name:"no-extra-semi",description:"<!-- deno-fmt-ignore-file -->"},{name:"no-fallthrough",description:"Disallows the implicit fallthrough of case statements"},{name:"no-func-assign",description:"Disallows the overwriting/reassignment of an existing function"},{name:"no-global-assign",description:"Disallows assignment to native Javascript objects"},{name:"no-import-assign",description:"Disallows reassignment of imported module bindings"},{name:"no-inferrable-types",description:"Disallows easily inferrable types"},{name:"no-inner-declarations",description:"Disallows variable or function definitions in nested blocks"},{name:"no-invalid-regexp",description:"Disallows specifying invalid regular expressions in RegExp constructors"},{name:"no-invalid-triple-slash-reference",description:"Warns the wrong usage of triple-slash reference directives"},{name:"no-irregular-whitespace",description:"Disallows the use of non-space or non-tab whitespace characters"},{name:"no-misused-new",description:"Disallows defining `constructor`s for interfaces or `new` for classes"},{name:"no-namespace",description:"Disallows the use of `namespace` and `module` keywords in TypeScript code"},{name:"no-new-symbol",description:"Disallows the use of `new` operators with built-in `Symbol`s"},{name:"no-obj-calls",description:"Disallows calling built-in global objects like functions"},{name:"no-octal",description:"Disallows expressing octal numbers via numeric literals beginning with `0`"},{name:"no-prototype-builtins",description:"Disallows the use of `Object.prototype` builtins directly"},{name:"no-redeclare",description:"Disallows redeclaration of variables, functions, parameters with the same name"},{name:"no-regex-spaces",description:"Disallows multiple spaces in regular expression literals"},{name:"no-self-assign",description:"Disallows self assignments"},{name:"no-setter-return",description:"Disallows returning values from setters"},{name:"no-shadow-restricted-names",description:"Disallows shadowing of restricted names"},{name:"no-this-alias",description:"Disallows assigning variables to `this`"},{name:"no-this-before-super",description:"Disallows use of `this` or `super` before calling `super()` in constructors"},{name:"no-unreachable",description:"Disallows the unreachable code after the control flow statements"},{name:"no-unsafe-finally",description:"Disallows the use of control flow statements within `finally` blocks"},{name:"no-unsafe-negation",description:"Disallows the usage of negation operator `!` as the left operand of relational\noperators"},{name:"no-unused-labels",description:"Disallows unused labels"},{name:"no-unused-vars",description:"Enforces all variables used at least once"},{name:"no-var",description:"Enforces the use of block scoped variables over more error prone function scoped\nvariables. Block scoped variables are defined using `const` and `let` keywords"},{name:"no-window-prefix",description:"Disallows the use of Web APIs via the `window` object"},{name:"no-with",description:"Disallows the usage of `with` statements"},{name:"prefer-as-const",description:"Recommends using const assertion (`as const`) over explicitly specifying literal\ntypes or using type assertion"},{name:"prefer-const",description:"Recommends declaring variables with [`const`] over [`let`]"},{name:"prefer-namespace-keyword",description:"Recommends the use of `namespace` keyword over `module` keyword when declaring\nTypeScript module"},{name:"require-await",description:"Disallows async functions that have no await expression"},{name:"require-yield",description:"Disallows generator functions that have no `yield`"},{name:"use-isnan",description:"Disallows comparisons to `NaN`"},{name:"valid-typeof",description:"Restricts the use of the `typeof` operator to a specific set of string literals"}].map(e=>({...e,icon:"fig://icon?type=string"}))});function Re(e){let n=/^(-[A-Zabd-z]*c=?|--config(?:=|$))/;for(let[t,i]of e.entries()){let s=i.match(n);if(s===null)continue;let o=i.slice(s[1].length);return o===""?e[t+1]:o}return null}async function qe(e,n){let t=Re(e),i;if(t){let{stdout:s}=await n({command:"cat",args:[t]});i=s}else{let{stdout:s}=await n({command:"bash",args:["-c","until [[ ( -f deno.json || -f deno.jsonc || $PWD = '/' ) ]]; do cd ..; done; \\cat deno.json 2>/dev/null || \\cat deno.jsonc 2>/dev/null"]})}try{return JSON.parse(E(i))}catch(s){return console.error(`Error parsing config file: ${s}`),null}}var Ye={cache:{strategy:"stale-while-revalidate"},custom:async(e,n)=>{let t=await qe(e,n);return t===null?[]:Object.entries(t.tasks||{}).map(([i,s])=>{let o=t.fig?.[i]||{};return{name:i,displayName:o.displayName,description:o.description||s,icon:o.icon||"\u2699\uFE0F",priority:o.priority,hidden:o.hidden}})}},en={script:["bash","-c","command find ~/.deno/bin -maxdepth 1 -perm -111 -type f"],postProcess:e=>e.split(`
|
|
6
|
+
`).filter(n=>!n.endsWith("/deno")).map(n=>({name:n.slice(n.lastIndexOf("/")+1),icon:"\u{1F4E6}",description:n}))},Ve=/^(https?:\/\/.*\.(?:m?[jt]sx?))(?:\?.*)?(?:\#.*)?$/,Ee=[e=>{let n=e.match(Ve);return n?n[1]:!1},e=>e.startsWith("npm:")],nn={script:["pbpaste"],postProcess:e=>{if(e=e.trim(),!e)return[];for(let n of Ee){let t=n(e);if(t)return[{name:t===!0?e:t,icon:"fig://template?badge=\u{1F4CB}&color=000000",priority:100}]}}};export{Qe as generateDocs,en as generateInstalledDenoScripts,Xe as generateLintRules,Ze as generatePreferredFilepaths,He as generateRunnableFiles,Ye as generateTasks,nn as generateUrlScript,Ue as generateVersions};
|
package/build/deno.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var le=Object.create;var J=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var ue=Object.getPrototypeOf,de=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),B=[];for(let T of oe)if(T){let E=T.endsWith("/")?"folders":"filepaths";(E==="filepaths"&&u!=="only"||E==="folders"&&u!=="never")&&B.push({type:E==="filepaths"?"file":"folder",name:T,insertValue:T,isDangerous:
|
|
1
|
+
var le=Object.create;var J=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var ue=Object.getPrototypeOf,de=Object.prototype.hasOwnProperty;var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var me=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of pe(t))!de.call(e,r)&&r!==i&&J(e,r,{get:()=>t[r],enumerable:!(n=ce(t,r))||n.enumerable});return e};var fe=(e,t,i)=>(i=e!=null?le(ue(e)):{},me(t||!e||!e.__esModule?J(i,"default",{value:e,enumerable:!0}):i,e));var G=A(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.shellExpand=D.ensureTrailingSlash=void 0;var ge=e=>e.endsWith("/")?e:`${e}/`;D.ensureTrailingSlash=ge;var he=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,we=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,r=>{var a;let s=r.slice(1);return(a=t[s])!==null&&a!==void 0?a:r}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(r,a,s)=>{var c,u;return(u=(c=t[a])!==null&&c!==void 0?c:s)!==null&&u!==void 0?u:r}),be=(e,t)=>{var i;let{environmentVariables:n}=t;return we(he(e,(i=n?.HOME)!==null&&i!==void 0?i:"~"),n)};D.shellExpand=be});var z=A(y=>{"use strict";var ve=y&&y.__awaiter||function(e,t,i,n){function r(a){return a instanceof i?a:new i(function(s){s(a)})}return new(i||(i=Promise))(function(a,s){function c(l){try{p(n.next(l))}catch(o){s(o)}}function u(l){try{p(n.throw(l))}catch(o){s(o)}}function p(l){l.done?a(l.value):r(l.value).then(c,u)}p((n=n.apply(e,t||[])).next())})};Object.defineProperty(y,"__esModule",{value:!0});y.filepaths=y.folders=y.getCurrentInsertedDirectory=void 0;y.sortFilesAlphabetically=$;var C=G();function $(e,t=[]){let i=t.map(r=>r.toLowerCase()),n=e.filter(r=>!i.includes(r.toLowerCase()));return[...n.filter(r=>!r.startsWith(".")).sort((r,a)=>r.localeCompare(a)),...n.filter(r=>r.startsWith(".")).sort((r,a)=>r.localeCompare(a)),"../"]}var ye=(e,t,i)=>{if(e===null)return"/";let n=(0,C.shellExpand)(t,i),r=n.slice(0,n.lastIndexOf("/")+1);return r===""?(0,C.ensureTrailingSlash)(e):r.startsWith("/")?r:`${(0,C.ensureTrailingSlash)(e)}${r}`};y.getCurrentInsertedDirectory=ye;function L(e={}){let{extensions:t=[],equals:i=[],matches:n,filterFolders:r=!1,editFileSuggestions:a,editFolderSuggestions:s,rootDirectory:c,showFolders:u="always"}=e,p=new Set(t),l=new Set(i),o=()=>t.length>0||i.length>0||n,d=(f=[])=>o()?f.filter(({name:w="",type:O})=>{if(!r&&O==="folder"||l.has(w)||n&&w.match(n))return!0;let[,...m]=w.split(".");if(m.length>=1){let v=m.length-1,S=m[v];do{if(p.has(S))return!0;v-=1,S=[m[v],S].join(".")}while(v>=0)}return!1}):f,h=(f=[])=>!a&&!s?f:f.map(w=>Object.assign(Object.assign({},w),(w.type==="file"?a:s)||{}));return{trigger:(f,w)=>{let O=f.lastIndexOf("/"),m=w.lastIndexOf("/");return O!==m?!0:O===-1&&m===-1?!1:f.slice(0,O)!==w.slice(0,m)},getQueryTerm:f=>f.slice(f.lastIndexOf("/")+1),custom:(f,w,O)=>ve(this,void 0,void 0,function*(){var m;let{isDangerous:v,currentWorkingDirectory:S,searchTerm:g}=O,k=(m=(0,y.getCurrentInsertedDirectory)(c??S,g,O))!==null&&m!==void 0?m:"/";try{let U=yield w({command:"ls",args:["-1ApL"],cwd:k}),oe=$(U.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),B=[];for(let T of oe)if(T){let E=T.endsWith("/")?"folders":"filepaths";(E==="filepaths"&&u!=="only"||E==="folders"&&u!=="never")&&B.push({type:E==="filepaths"?"file":"folder",name:T,insertValue:T,isDangerous:v,context:{templateType:E}})}return h(d(B))}catch{return[]}})}}y.folders=Object.assign(()=>L({showFolders:"only"}),Object.freeze(L({showFolders:"only"})));y.filepaths=Object.assign(L,Object.freeze(L()))});var Z=A(q=>{"use strict";var V=q&&q.__awaiter||function(e,t,i,n){function r(a){return a instanceof i?a:new i(function(s){s(a)})}return new(i||(i=Promise))(function(a,s){function c(l){try{p(n.next(l))}catch(o){s(o)}}function u(l){try{p(n.throw(l))}catch(o){s(o)}}function p(l){l.done?a(l.value):r(l.value).then(c,u)}p((n=n.apply(e,t||[])).next())})};Object.defineProperty(q,"__esModule",{value:!0});q.valueList=Oe;q.keyValue=Se;q.keyValueList=ke;var K=new Map;function j(e,t){return e.length===0?t:t.map(i=>i.insertValue?i:Object.assign(Object.assign({},i),{insertValue:i.name+e}))}function Q(e,t,i){return V(this,void 0,void 0,function*(){if(typeof e=="function"){let n=yield e(...i);return j(t,n)}if(typeof e[0]=="string"){let n=e.map(r=>({name:r}));return j(t,n)}return j(t,e)})}function F(e,t,i,n){return V(this,void 0,void 0,function*(){if(i||Array.isArray(e)){let r=K.get(e);return r===void 0&&(r=yield Q(e,t,n),K.set(e,r)),r}return Q(e,t,n)})}function H(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function I(e,...t){return Math.max(...t.map(i=>e.lastIndexOf(i)))}function W(e,t){let i=new Set(e);return t.filter(n=>{var r;return typeof n.name=="string"?!i.has(n.name):!(!((r=n.name)===null||r===void 0)&&r.some(a=>i.has(a)))})}function Oe({delimiter:e=",",values:t=[],cache:i=!1,insertDelimiter:n=!1,allowRepeatedValues:r=!1}){return{trigger:(a,s)=>a.lastIndexOf(e)!==s.lastIndexOf(e),getQueryTerm:a=>a.slice(a.lastIndexOf(e)+e.length),custom:(...a)=>V(this,void 0,void 0,function*(){var s;let c=yield F(t,n?e:"",i,a);if(r)return c;let[u]=a,p=(s=u[u.length-1])===null||s===void 0?void 0:s.split(e);return W(p,c)})}}function Se({separator:e="=",keys:t=[],values:i=[],cache:n=!1,insertSeparator:r=!0}){return{trigger:(a,s)=>a.indexOf(e)!==s.indexOf(e),getQueryTerm:a=>a.slice(a.indexOf(e)+1),custom:(...a)=>V(this,void 0,void 0,function*(){let[s]=a,u=!s[s.length-1].includes(e),p=u?t:i,l=H(u,n);return F(p,u&&r?e:"",l,a)})}}function ke({separator:e="=",delimiter:t=",",keys:i=[],values:n=[],cache:r=!1,insertSeparator:a=!0,insertDelimiter:s=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:u=!0}){return{trigger:(p,l)=>{let o=I(p,e,t),d=I(l,e,t);return o!==d},getQueryTerm:p=>{let l=I(p,e,t);return p.slice(l+1)},custom:(...p)=>V(this,void 0,void 0,function*(){let[l]=p,o=l[l.length-1],d=I(o,e,t),h=d===-1||o.slice(d,d+e.length)!==e,f=h?i:n,w=H(h,r),m=yield F(f,h?a?e:"":s?t:"",w,p);if(h){if(c)return m;let S=o.split(t).map(g=>g.slice(0,g.indexOf(e)));return W(S,m)}if(u)return m;let v=o.split(t).map(S=>S.slice(S.indexOf(e)+e.length));return W(v,m)})}}});var X=A(x=>{"use strict";var qe=x&&x.__awaiter||function(e,t,i,n){function r(a){return a instanceof i?a:new i(function(s){s(a)})}return new(i||(i=Promise))(function(a,s){function c(l){try{p(n.next(l))}catch(o){s(o)}}function u(l){try{p(n.throw(l))}catch(o){s(o)}}function p(l){l.done?a(l.value):r(l.value).then(c,u)}p((n=n.apply(e,t||[])).next())})};Object.defineProperty(x,"__esModule",{value:!0});x.ai=Pe;var De=4097,Ae=4,Ve=.8,xe=De*Ae*Ve;function Pe({name:e,prompt:t,message:i,postProcess:n,temperature:r,splitOn:a}){return{scriptTimeout:15e3,custom:(s,c,u)=>qe(this,void 0,void 0,function*(){var p,l;let o=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(o.stdout))return[];let d=typeof t=="function"?yield t({tokens:s,executeCommand:c,generatorContext:u}):t,h=typeof i=="function"?yield i({tokens:s,executeCommand:c,generatorContext:u}):i;if(h===null||h.length===0)return console.warn("No message provided to AI generator"),[];let f=xe-((p=d?.length)!==null&&p!==void 0?p:0),w={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...d?[{role:"system",content:d}]:[],{role:"user",content:h.slice(0,f)}],temperature:r},O=JSON.stringify(w),m=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",O]}),v=JSON.parse(m.stdout);return(l=v?.choices.map(g=>{var k;return(k=g?.message)===null||k===void 0?void 0:k.content}).filter(g=>typeof g=="string").flatMap(g=>a?g.split(a).filter(k=>k.trim().length>0):[g]).map(g=>{if(n)return n(g);let k=g.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:k,insertValue:`'${k}'`,description:"Generated by Fig AI"}}))!==null&&l!==void 0?l:[]})}}});var ee=A(b=>{"use strict";var Te=b&&b.__createBinding||(Object.create?function(e,t,i,n){n===void 0&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){n===void 0&&(n=i),e[n]=t[i]}),Ee=b&&b.__exportStar||function(e,t){for(var i in e)i!=="default"&&!Object.prototype.hasOwnProperty.call(t,i)&&Te(t,e,i)};Object.defineProperty(b,"__esModule",{value:!0});b.ai=b.folders=b.filepaths=void 0;var Y=z();Object.defineProperty(b,"filepaths",{enumerable:!0,get:function(){return Y.filepaths}});Object.defineProperty(b,"folders",{enumerable:!0,get:function(){return Y.folders}});Ee(Z(),b);var Le=X();Object.defineProperty(b,"ai",{enumerable:!0,get:function(){return Le.ai}})});var R=fe(ee(),1);var N=Symbol("singleComment"),te=Symbol("multiComment"),Ie=()=>"",Ne=(e,t,i)=>e.slice(t,i).replace(/[^ \t\r\n]/g," "),Re=(e,t)=>{let i=t-1,n=0;for(;e[i]==="\\";)i-=1,n+=1;return!!(n%2)};function M(e,{whitespace:t=!0,trailingCommas:i=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let n=t?Ne:Ie,r=!1,a=!1,s=0,c="",u="",p=-1;for(let o=0;o<e.length;o++){let d=e[o],h=e[o+1];if(!a&&d==='"'&&(Re(e,o)||(r=!r)),!r)if(!a&&d+h==="//")c+=e.slice(s,o),s=o,a=N,o++;else if(a===N&&d+h===`\r
|
|
3
3
|
`){o++,a=!1,c+=n(e,s,o),s=o;continue}else if(a===N&&d===`
|
|
4
4
|
`)a=!1,c+=n(e,s,o),s=o;else if(!a&&d+h==="/*"){c+=e.slice(s,o),s=o,a=te,o++;continue}else if(a===te&&d+h==="*/"){o++,a=!1,c+=n(e,s,o+1),s=o+1;continue}else i&&!a&&(p!==-1?d==="}"||d==="]"?(c+=e.slice(s,o),u+=n(c,0,1)+c.slice(1),c="",s=o,p=-1):d!==" "&&d!==" "&&d!=="\r"&&d!==`
|
|
5
5
|
`&&(c+=e.slice(s,o),s=o,p=-1):d===","&&(u+=c+e.slice(s,o),c="",s=o,p=o))}let l=a===N?n(e,s):e.slice(s);return u+c+l}function _e(e){let t=new Set,i=[];for(let n of e)t.has(n.name)||(t.add(n.name),i.push(n));return i}function Ce(e){return"kind"in e?e.kind==="namespace"?e.namespaceDef.elements:e.kind==="interface"?[...e.interfaceDef.methods,...e.interfaceDef.properties]:e.kind==="class"?[...e.classDef.methods,...e.classDef.properties]:[]:[]}function ie(e,t){let[i,...n]=t;return i?e.filter(r=>r.name===i).flatMap(r=>ie(Ce(r),n)):e}function je(e){return/^[A-Z]/.test(e)?60:e.startsWith("_")?40:50}function We(e){if("kind"in e){if(e.kind==="typeAlias")return"Type";let t=e.kind;return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}return"Property"}function Fe(e,t){let{showPrivateNodes:i}=t;return e.filter(n=>!("kind"in n&&(n.kind==="moduleDoc"||n.kind==="import")||"declarationKind"in n&&!i&&n.declarationKind==="private"))}function Me(e){return{name:e.name,description:We(e),priority:je(e.name),icon:"fig://icon?type=asterisk"}}var ne={scriptTimeout:12e3,trigger:".",getQueryTerm:".",script:e=>{let t=new Set(["--private","--builtin","--unstable"]),i=e.slice(0,-1).filter(n=>!(n.startsWith("-")&&!t.has(n))&&!n.startsWith("$")&&!n.startsWith("("));return i.push("--json"),i},postProcess:(e,t)=>{let i=JSON.parse(e),r=t[t.length-1].split(".").slice(0,-1),a=ie(i,r),s=Fe(a,{showPrivateNodes:t.includes("--private")});return _e(s).map(u=>Me(u))}},re={script:["curl","-sL","https://cdn.deno.land/deno/meta/versions.json"],cache:{ttl:1e3*60*60*24},postProcess:e=>JSON.parse(e).versions.map(i=>({name:i.startsWith("v")?i.slice(1):i}))};var tt=(0,R.filepaths)({matches:/\.(m?(j|t)sx?)$/i,editFileSuggestions:{priority:75}}),_=(0,R.valueList)({insertDelimiter:!0,values:[{name:"adjacent-overload-signatures",description:"Requires overload signatures to be adjacent to each other"},{name:"ban-ts-comment",description:"Disallows the use of Typescript directives without a comment"},{name:"ban-types",description:"Bans the use of primitive wrapper objects (e.g. `String` the object is a wrapper\nof `string` the primitive) in addition to the non-explicit `Function` type and\nthe misunderstood `Object` type"},{name:"ban-unknown-rule-code",description:"Warns the usage of unknown rule codes in ignore directives"},{name:"ban-untagged-ignore",description:"Requires `deno-lint-ignore` to be annotated with one or more rule names"},{name:"ban-unused-ignore",description:"Warns unused ignore directives"},{name:"constructor-super",description:"Verifies the correct usage of constructors and calls to `super()`"},{name:"for-direction",description:"Requires `for` loop control variables to increment in the correct direction"},{name:"getter-return",description:"Requires all property getter functions to return a value"},{name:"no-array-constructor",description:"Enforce conventional usage of array construction"},{name:"no-async-promise-executor",description:"Requires that async promise executor functions are not used"},{name:"no-case-declarations",description:"Requires lexical declarations (`let`, `const`, `function` and `class`) in switch\n`case` or `default` clauses to be scoped with brackets"},{name:"no-class-assign",description:"Disallows modifying variables of class declarations"},{name:"no-compare-neg-zero",description:"Disallows comparing against negative zero (`-0`)"},{name:"no-cond-assign",description:"Disallows the use of the assignment operator, `=`, in conditional statements"},{name:"no-constant-condition",description:"Disallows the use of a constant expression in conditional test"},{name:"no-control-regex",description:"Disallows the use ascii control characters in regular expressions"},{name:"no-debugger",description:"Disallows the use of the `debugger` statement"},{name:"no-delete-var",description:"Disallows the deletion of variables"},{name:"no-deprecated-deno-api",description:"Warns the usage of the deprecated Deno APIs"},{name:"no-dupe-args",description:"Disallows using an argument name more than once in a function signature"},{name:"no-dupe-class-members",description:"Disallows using a class member function name more than once"},{name:"no-dupe-else-if",description:"Disallows using the same condition twice in an `if`/`else if` statement"},{name:"no-dupe-keys",description:"Disallows duplicate keys in object literals"},{name:"no-duplicate-case",description:"Disallows using the same case clause in a switch statement more than once"},{name:"no-empty",description:"Disallows the use of empty block statements"},{name:"no-empty-character-class",description:"Disallows using the empty character class in a regular expression"},{name:"no-empty-enum",description:"Disallows the declaration of an empty enum"},{name:"no-empty-interface",description:"Disallows the declaration of an empty interface"},{name:"no-empty-pattern",description:"Disallows the use of empty patterns in destructuring"},{name:"no-ex-assign",description:"Disallows the reassignment of exception parameters"},{name:"no-explicit-any",description:"Disallows use of the `any` type"},{name:"no-extra-boolean-cast",description:"Disallows unnecessary boolean casts"},{name:"no-extra-non-null-assertion",description:"Disallows unnecessary non-null assertions"},{name:"no-extra-semi",description:"<!-- deno-fmt-ignore-file -->"},{name:"no-fallthrough",description:"Disallows the implicit fallthrough of case statements"},{name:"no-func-assign",description:"Disallows the overwriting/reassignment of an existing function"},{name:"no-global-assign",description:"Disallows assignment to native Javascript objects"},{name:"no-import-assign",description:"Disallows reassignment of imported module bindings"},{name:"no-inferrable-types",description:"Disallows easily inferrable types"},{name:"no-inner-declarations",description:"Disallows variable or function definitions in nested blocks"},{name:"no-invalid-regexp",description:"Disallows specifying invalid regular expressions in RegExp constructors"},{name:"no-invalid-triple-slash-reference",description:"Warns the wrong usage of triple-slash reference directives"},{name:"no-irregular-whitespace",description:"Disallows the use of non-space or non-tab whitespace characters"},{name:"no-misused-new",description:"Disallows defining `constructor`s for interfaces or `new` for classes"},{name:"no-namespace",description:"Disallows the use of `namespace` and `module` keywords in TypeScript code"},{name:"no-new-symbol",description:"Disallows the use of `new` operators with built-in `Symbol`s"},{name:"no-obj-calls",description:"Disallows calling built-in global objects like functions"},{name:"no-octal",description:"Disallows expressing octal numbers via numeric literals beginning with `0`"},{name:"no-prototype-builtins",description:"Disallows the use of `Object.prototype` builtins directly"},{name:"no-redeclare",description:"Disallows redeclaration of variables, functions, parameters with the same name"},{name:"no-regex-spaces",description:"Disallows multiple spaces in regular expression literals"},{name:"no-self-assign",description:"Disallows self assignments"},{name:"no-setter-return",description:"Disallows returning values from setters"},{name:"no-shadow-restricted-names",description:"Disallows shadowing of restricted names"},{name:"no-this-alias",description:"Disallows assigning variables to `this`"},{name:"no-this-before-super",description:"Disallows use of `this` or `super` before calling `super()` in constructors"},{name:"no-unreachable",description:"Disallows the unreachable code after the control flow statements"},{name:"no-unsafe-finally",description:"Disallows the use of control flow statements within `finally` blocks"},{name:"no-unsafe-negation",description:"Disallows the usage of negation operator `!` as the left operand of relational\noperators"},{name:"no-unused-labels",description:"Disallows unused labels"},{name:"no-unused-vars",description:"Enforces all variables used at least once"},{name:"no-var",description:"Enforces the use of block scoped variables over more error prone function scoped\nvariables. Block scoped variables are defined using `const` and `let` keywords"},{name:"no-window-prefix",description:"Disallows the use of Web APIs via the `window` object"},{name:"no-with",description:"Disallows the usage of `with` statements"},{name:"prefer-as-const",description:"Recommends using const assertion (`as const`) over explicitly specifying literal\ntypes or using type assertion"},{name:"prefer-const",description:"Recommends declaring variables with [`const`] over [`let`]"},{name:"prefer-namespace-keyword",description:"Recommends the use of `namespace` keyword over `module` keyword when declaring\nTypeScript module"},{name:"require-await",description:"Disallows async functions that have no await expression"},{name:"require-yield",description:"Disallows generator functions that have no `yield`"},{name:"use-isnan",description:"Disallows comparisons to `NaN`"},{name:"valid-typeof",description:"Restricts the use of the `typeof` operator to a specific set of string literals"}].map(e=>({...e,icon:"fig://icon?type=string"}))});function Ue(e){let t=/^(-[A-Zabd-z]*c=?|--config(?:=|$))/;for(let[i,n]of e.entries()){let r=n.match(t);if(r===null)continue;let a=n.slice(r[1].length);return a===""?e[i+1]:a}return null}async function Be(e,t){let i=Ue(e),n;if(i){let{stdout:r}=await t({command:"cat",args:[i]});n=r}else{let{stdout:r}=await t({command:"bash",args:["-c","until [[ ( -f deno.json || -f deno.jsonc || $PWD = '/' ) ]]; do cd ..; done; \\cat deno.json 2>/dev/null || \\cat deno.jsonc 2>/dev/null"]})}try{return JSON.parse(M(n))}catch(r){return console.error(`Error parsing config file: ${r}`),null}}var ae={cache:{strategy:"stale-while-revalidate"},custom:async(e,t)=>{let i=await Be(e,t);return i===null?[]:Object.entries(i.tasks||{}).map(([n,r])=>{let a=i.fig?.[n]||{};return{name:n,displayName:a.displayName,description:a.description||r,icon:a.icon||"\u2699\uFE0F",priority:a.priority,hidden:a.hidden}})}},se={script:["bash","-c","command find ~/.deno/bin -maxdepth 1 -perm -111 -type f"],postProcess:e=>e.split(`
|
package/build/deployctl.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Z=Object.create;var W=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),q=[];for(let A of X)if(A){let D=A.endsWith("/")?"folders":"filepaths";(D==="filepaths"&&c!=="only"||D==="folders"&&c!=="never")&&q.push({type:D==="filepaths"?"file":"folder",name:A,insertValue:A,isDangerous:
|
|
1
|
+
var Z=Object.create;var W=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var re=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ee(t))!ne.call(e,i)&&i!==n&&W(e,i,{get:()=>t[i],enumerable:!(r=Y(t,i))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?Z(te(e)):{},re(t||!e||!e.__esModule?W(n,"default",{value:e,enumerable:!0}):n,e));var J=I(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.shellExpand=j.ensureTrailingSlash=void 0;var se=e=>e.endsWith("/")?e:`${e}/`;j.ensureTrailingSlash=se;var oe=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,le=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,i=>{var s;let l=i.slice(1);return(s=t[l])!==null&&s!==void 0?s:i}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(i,s,l)=>{var u,c;return(c=(u=t[s])!==null&&u!==void 0?u:l)!==null&&c!==void 0?c:i}),ae=(e,t)=>{var n;let{environmentVariables:r}=t;return le(oe(e,(n=r?.HOME)!==null&&n!==void 0?n:"~"),r)};j.shellExpand=ae});var $=I(_=>{"use strict";var ue=_&&_.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(l){l(s)})}return new(n||(n=Promise))(function(s,l){function u(o){try{a(r.next(o))}catch(f){l(f)}}function c(o){try{a(r.throw(o))}catch(f){l(f)}}function a(o){o.done?s(o.value):i(o.value).then(u,c)}a((r=r.apply(e,t||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.filepaths=_.folders=_.getCurrentInsertedDirectory=void 0;_.sortFilesAlphabetically=R;var M=J();function R(e,t=[]){let n=t.map(i=>i.toLowerCase()),r=e.filter(i=>!n.includes(i.toLowerCase()));return[...r.filter(i=>!i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),...r.filter(i=>i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),"../"]}var ce=(e,t,n)=>{if(e===null)return"/";let r=(0,M.shellExpand)(t,n),i=r.slice(0,r.lastIndexOf("/")+1);return i===""?(0,M.ensureTrailingSlash)(e):i.startsWith("/")?i:`${(0,M.ensureTrailingSlash)(e)}${i}`};_.getCurrentInsertedDirectory=ce;function C(e={}){let{extensions:t=[],equals:n=[],matches:r,filterFolders:i=!1,editFileSuggestions:s,editFolderSuggestions:l,rootDirectory:u,showFolders:c="always"}=e,a=new Set(t),o=new Set(n),f=()=>t.length>0||n.length>0||r,v=(p=[])=>f()?p.filter(({name:y="",type:O})=>{if(!i&&O==="folder"||o.has(y)||r&&y.match(r))return!0;let[,...d]=y.split(".");if(d.length>=1){let m=d.length-1,b=d[m];do{if(a.has(b))return!0;m-=1,b=[d[m],b].join(".")}while(m>=0)}return!1}):p,S=(p=[])=>!s&&!l?p:p.map(y=>Object.assign(Object.assign({},y),(y.type==="file"?s:l)||{}));return{trigger:(p,y)=>{let O=p.lastIndexOf("/"),d=y.lastIndexOf("/");return O!==d?!0:O===-1&&d===-1?!1:p.slice(0,O)!==y.slice(0,d)},getQueryTerm:p=>p.slice(p.lastIndexOf("/")+1),custom:(p,y,O)=>ue(this,void 0,void 0,function*(){var d;let{isDangerous:m,currentWorkingDirectory:b,searchTerm:h}=O,x=(d=(0,_.getCurrentInsertedDirectory)(u??b,h,O))!==null&&d!==void 0?d:"/";try{let P=yield y({command:"ls",args:["-1ApL"],cwd:x}),X=R(P.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),q=[];for(let A of X)if(A){let D=A.endsWith("/")?"folders":"filepaths";(D==="filepaths"&&c!=="only"||D==="folders"&&c!=="never")&&q.push({type:D==="filepaths"?"file":"folder",name:A,insertValue:A,isDangerous:m,context:{templateType:D}})}return S(v(q))}catch{return[]}})}}_.folders=Object.assign(()=>C({showFolders:"only"}),Object.freeze(C({showFolders:"only"})));_.filepaths=Object.assign(C,Object.freeze(C()))});var k=I(w=>{"use strict";var T=w&&w.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(l){l(s)})}return new(n||(n=Promise))(function(s,l){function u(o){try{a(r.next(o))}catch(f){l(f)}}function c(o){try{a(r.throw(o))}catch(f){l(f)}}function a(o){o.done?s(o.value):i(o.value).then(u,c)}a((r=r.apply(e,t||[])).next())})};Object.defineProperty(w,"__esModule",{value:!0});w.valueList=fe;w.keyValue=de;w.keyValueList=pe;var K=new Map;function L(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function z(e,t,n){return T(this,void 0,void 0,function*(){if(typeof e=="function"){let r=yield e(...n);return L(t,r)}if(typeof e[0]=="string"){let r=e.map(i=>({name:i}));return L(t,r)}return L(t,e)})}function N(e,t,n,r){return T(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let i=K.get(e);return i===void 0&&(i=yield z(e,t,r),K.set(e,i)),i}return z(e,t,r)})}function Q(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function F(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function E(e,t){let n=new Set(e);return t.filter(r=>{var i;return typeof r.name=="string"?!n.has(r.name):!(!((i=r.name)===null||i===void 0)&&i.some(s=>n.has(s)))})}function fe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:r=!1,allowRepeatedValues:i=!1}){return{trigger:(s,l)=>s.lastIndexOf(e)!==l.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>T(this,void 0,void 0,function*(){var l;let u=yield N(t,r?e:"",n,s);if(i)return u;let[c]=s,a=(l=c[c.length-1])===null||l===void 0?void 0:l.split(e);return E(a,u)})}}function de({separator:e="=",keys:t=[],values:n=[],cache:r=!1,insertSeparator:i=!0}){return{trigger:(s,l)=>s.indexOf(e)!==l.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>T(this,void 0,void 0,function*(){let[l]=s,c=!l[l.length-1].includes(e),a=c?t:n,o=Q(c,r);return N(a,c&&i?e:"",o,s)})}}function pe({separator:e="=",delimiter:t=",",keys:n=[],values:r=[],cache:i=!1,insertSeparator:s=!0,insertDelimiter:l=!1,allowRepeatedKeys:u=!1,allowRepeatedValues:c=!0}){return{trigger:(a,o)=>{let f=F(a,e,t),v=F(o,e,t);return f!==v},getQueryTerm:a=>{let o=F(a,e,t);return a.slice(o+1)},custom:(...a)=>T(this,void 0,void 0,function*(){let[o]=a,f=o[o.length-1],v=F(f,e,t),S=v===-1||f.slice(v,v+e.length)!==e,p=S?n:r,y=Q(S,i),d=yield N(p,S?s?e:"":l?t:"",y,a);if(S){if(u)return d;let b=f.split(t).map(h=>h.slice(0,h.indexOf(e)));return E(b,d)}if(c)return d;let m=f.split(t).map(b=>b.slice(b.indexOf(e)+e.length));return E(m,d)})}}});var H=I(V=>{"use strict";var he=V&&V.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(l){l(s)})}return new(n||(n=Promise))(function(s,l){function u(o){try{a(r.next(o))}catch(f){l(f)}}function c(o){try{a(r.throw(o))}catch(f){l(f)}}function a(o){o.done?s(o.value):i(o.value).then(u,c)}a((r=r.apply(e,t||[])).next())})};Object.defineProperty(V,"__esModule",{value:!0});V.ai=_e;var ye=4097,ve=4,ge=.8,me=ye*ve*ge;function _e({name:e,prompt:t,message:n,postProcess:r,temperature:i,splitOn:s}){return{scriptTimeout:15e3,custom:(l,u,c)=>he(this,void 0,void 0,function*(){var a,o;let f=yield u({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(f.stdout))return[];let v=typeof t=="function"?yield t({tokens:l,executeCommand:u,generatorContext:c}):t,S=typeof n=="function"?yield n({tokens:l,executeCommand:u,generatorContext:c}):n;if(S===null||S.length===0)return console.warn("No message provided to AI generator"),[];let p=me-((a=v?.length)!==null&&a!==void 0?a:0),y={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...v?[{role:"system",content:v}]:[],{role:"user",content:S.slice(0,p)}],temperature:i},O=JSON.stringify(y),d=yield u({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",O]}),m=JSON.parse(d.stdout);return(o=m?.choices.map(h=>{var x;return(x=h?.message)===null||x===void 0?void 0:x.content}).filter(h=>typeof h=="string").flatMap(h=>s?h.split(s).filter(x=>x.trim().length>0):[h]).map(h=>{if(r)return r(h);let x=h.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:x,insertValue:`'${x}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}});var G=I(g=>{"use strict";var Oe=g&&g.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),be=g&&g.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Oe(t,e,n)};Object.defineProperty(g,"__esModule",{value:!0});g.ai=g.folders=g.filepaths=void 0;var B=$();Object.defineProperty(g,"filepaths",{enumerable:!0,get:function(){return B.filepaths}});Object.defineProperty(g,"folders",{enumerable:!0,get:function(){return B.folders}});be(k(),g);var Se=H();Object.defineProperty(g,"ai",{enumerable:!0,get:function(){return Se.ai}})});var U=ie(G(),1),xe={name:"deployctl",description:"Command line tool for Deno Deploy",subcommands:[{name:"deploy",description:"Deploy a script with static files to Deno Deploy",args:{name:"entrypoint",generators:(0,U.filepaths)({extensions:["js","mjs","jsx","mjsx","ts","mts","tsx","mtsx"]})},options:[{name:"--exclude",insertValue:"--exclude '{cursor}'",description:"Exclude files that match this pattern",args:{name:"pattern"}},{name:"--include",insertValue:"--include '{cursor}'",description:"Only upload files that match this pattern",args:{name:"pattern"}},{name:"--no-static",description:"Don't include the files in the CWD as static files"},{name:"--prod",description:"Create a production deployment (default is preview deployment)"},{name:["-p","--project"],description:"The project to deploy to",args:{name:"name"}},{name:"--token",description:"The API token to use",args:{name:"token"}}]},{name:"upgrade",description:"Upgrade deployctl",args:{name:"version",isOptional:!0,generators:{script:["curl","-sL","https://cdn.deno.land/deploy/meta/versions.json"],cache:{ttl:1e3*60*60*24},postProcess:e=>{let t=JSON.parse(e);return t.versions.map(n=>({name:n,icon:n===t.latest?"\u2B50\uFE0F":"\u{1F995}"}))}}}}],options:[{name:["--help","-h"],description:"Show help",isPersistent:!0},{name:["-V","--version"],description:"Show the version"}]},De=xe;export{De as default};
|