@tabsmith/autocomplete-specs 1.0.0 → 1.0.14
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/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/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 +4 -4
- 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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Y=Object.create;var q=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),P=[];for(let A of X)if(A){let D=A.endsWith("/")?"folders":"filepaths";(D==="filepaths"&&u!=="only"||D==="folders"&&u!=="never")&&P.push({type:D==="filepaths"?"file":"folder",name:A,insertValue:A,isDangerous:b,context:{templateType:D}})}return T(g(P))}catch{return[]}})}}y.folders=Object.assign(()=>R({showFolders:"only"}),Object.freeze(R({showFolders:"only"})));y.filepaths=Object.assign(R,Object.freeze(R()))});var z=j(O=>{"use strict";var F=O&&O.__awaiter||function(e,t,n,s){function i(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function c(o){try{l(s.next(o))}catch(d){a(d)}}function u(o){try{l(s.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):i(o.value).then(c,u)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(O,"__esModule",{value:!0});O.keyValueList=O.keyValue=O.valueList=void 0;var G=new Map;function V(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 F(this,void 0,void 0,function*(){if(typeof e=="function"){let s=yield e(...n);return V(t,s)}if(typeof e[0]=="string"){let s=e.map(i=>({name:i}));return V(t,s)}return V(t,e)})}function N(e,t,n,s){return F(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let i=G.get(e);return i===void 0&&(i=yield J(e,t,s),G.set(e,i)),i}return J(e,t,s)})}function U(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function E(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function C(e,t){let n=new Set(e);return t.filter(s=>{var i;return typeof s.name=="string"?!n.has(s.name):!(!((i=s.name)===null||i===void 0)&&i.some(r=>n.has(r)))})}function de({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:s=!1,allowRepeatedValues:i=!1}){return{trigger:(r,a)=>r.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:r=>r.slice(r.lastIndexOf(e)+e.length),custom:(...r)=>F(this,void 0,void 0,function*(){var a;let c=yield N(t,s?e:"",n,r);if(i)return c;let[u]=r,l=(a=u[u.length-1])===null||a===void 0?void 0:a.split(e);return C(l,c)})}}O.valueList=de;function fe({separator:e="=",keys:t=[],values:n=[],cache:s=!1,insertSeparator:i=!0}){return{trigger:(r,a)=>r.indexOf(e)!==a.indexOf(e),getQueryTerm:r=>r.slice(r.indexOf(e)+1),custom:(...r)=>F(this,void 0,void 0,function*(){let[a]=r,u=!a[a.length-1].includes(e),l=u?t:n,o=U(u,s);return N(l,u&&i?e:"",o,r)})}}O.keyValue=fe;function he({separator:e="=",delimiter:t=",",keys:n=[],values:s=[],cache:i=!1,insertSeparator:r=!0,insertDelimiter:a=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:u=!0}){return{trigger:(l,o)=>{let d=E(l,e,t),g=E(o,e,t);return d!==g},getQueryTerm:l=>{let o=E(l,e,t);return l.slice(o+1)},custom:(...l)=>F(this,void 0,void 0,function*(){let[o]=l,d=o[o.length-1],g=E(d,e,t),T=g===-1||d.slice(g,g+e.length)!==e,h=T?n:s,m=U(T,i),f=yield N(h,T?r?e:"":a?t:"",m,l);if(T){if(c)return f;let x=d.split(t).map(p=>p.slice(0,p.indexOf(e)));return C(x,f)}if(u)return f;let b=d.split(t).map(x=>x.slice(x.indexOf(e)+e.length));return C(b,f)})}}O.keyValueList=he});var B=j(I=>{"use strict";var pe=I&&I.__awaiter||function(e,t,n,s){function i(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function c(o){try{l(s.next(o))}catch(d){a(d)}}function u(o){try{l(s.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):i(o.value).then(c,u)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(I,"__esModule",{value:!0});I.ai=void 0;var me=4097,ge=4,ye=.8,ve=me*ge*ye;function be({name:e,prompt:t,message:n,postProcess:s,temperature:i,splitOn:r}){return{scriptTimeout:15e3,custom:(a,c,u)=>pe(this,void 0,void 0,function*(){var l,o;let d=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:c,generatorContext:u}):t,T=typeof n=="function"?yield n({tokens:a,executeCommand:c,generatorContext:u}):n;if(T===null||T.length===0)return console.warn("No message provided to AI generator"),[];let h=ve-((l=g?.length)!==null&&l!==void 0?l:0),m={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:T.slice(0,h)}],temperature:i},w=JSON.stringify(m),f=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",w]}),b=JSON.parse(f.stdout);return(o=b?.choices.map(p=>{var _;return(_=p?.message)===null||_===void 0?void 0:_.content}).filter(p=>typeof p=="string").flatMap(p=>r?p.split(r).filter(_=>_.trim().length>0):[p]).map(p=>{if(s)return s(p);let _=p.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:_,insertValue:`'${_}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}I.ai=be});var H=j(v=>{"use strict";var we=v&&v.__createBinding||(Object.create?function(e,t,n,s){s===void 0&&(s=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,s,i)}:function(e,t,n,s){s===void 0&&(s=n),e[s]=t[n]}),xe=v&&v.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&we(t,e,n)};Object.defineProperty(v,"__esModule",{value:!0});v.ai=v.folders=v.filepaths=void 0;var Q=$();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return Q.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return Q.folders}});xe(z(),v);var Te=B();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return Te.ai}})});var M=ie(H(),1),_e=(0,M.filepaths)({extensions:["csproj","sln","dll"]}),Oe={name:"test",description:"The dotnet test command is used to execute unit tests in a given solution. The dotnet test command builds the solution and runs a test host application for each test project in the solution. The test host executes tests in the given project using a test framework, for example: MSTest, NUnit, or xUnit, and reports the success or failure of each test. If all tests are successful, the test runner returns 0 as an exit code; otherwise if any test fails, it returns 1",args:{name:"PROJECT | SOLUTION | DIRECTORY | DLL",generators:_e},options:[{name:["-a","--test-adapter-path"],description:"Path to a directory to be searched for additional test adapters. Only .dll files with suffix .TestAdapter.dll are inspected. If not specified, the directory of the test .dll is searched",args:{name:"path",template:"folders"}},{name:"--arch",description:"Specifies the target architecture. This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a win-x64 machine, specifying --arch x86 sets the RID to win-x86. If you use this option, don't use the -r|--runtime option. Available since .NET 6 Preview 7",args:{name:"architecture"}},{name:"--blame",description:"Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in TestResults/<Guid>/<Guid>_Sequence.xml that captures the order of tests that were run before the crash"},{name:"--blame-crash",description:"Runs the tests in blame mode and collects a crash dump when the test host exits unexpectedly. This option depends on the version of .NET used, the type of error, and the operating system"},{name:"--blame-crash-dump-type",description:"The type of crash dump to be collected. Implies --blame-crash",args:{name:"type"}},{name:"--blame-crash-collect-always",description:"Collects a crash dump on expected as well as unexpected test host exit"},{name:"--blame-hang",description:"Run the tests in blame mode and collects a hang dump when a test exceeds the given timeout"},{name:"--blame-hang-timeout",description:"Per-test timeout, after which a hang dump is triggered and the test host process and all of its child processes are dumped and terminated",args:{name:"timeout"}},{name:["-c","--configuration"],description:"Defines the build configuration. The default for most projects is Debug, but you can override the build configuration settings in your project",args:{name:"configuration",suggestions:["Debug","Release"]}},{name:"--collect",description:"Enables data collector for the test run",args:{name:"name"}},{name:["-d","--diag"],description:"Enables diagnostic mode for the test platform and writes diagnostic messages to the specified file and to files next to it. The process that is logging the messages determines which files are created, such as *.host_<date>.txt for test host log, and *.datacollector_<date>.txt for data collector log",args:{name:"file",template:"filepaths"}},{name:["-f","--framework"],description:"Forces the use of dotnet or .NET Framework test host for the test binaries. This option only determines which type of host to use. The actual framework version to be used is determined by the runtimeconfig.json of the test project. When not specified, the TargetFramework assembly attribute is used to determine the type of host. When that attribute is stripped from the .dll, the .NET Framework host is used",args:{name:"framework"}},{name:"--filter",description:"Filters out tests in the current project using the given expression. For more information, see the Filter option details section. For more information and examples on how to use selective unit test filtering, see Running selective unit tests",args:{name:"expression"}},{name:"--interactive",description:"Allows the command to stop and wait for user input or action. For example, to complete authentication. Available since .NET Core 3.0 SDK"},{name:["-l","--logger"],description:`Specifies a logger for test results. Unlike MSBuild, dotnet test doesn't accept abbreviations: instead of -l "console;v=d" use -l "console;verbosity=detailed". Specify the parameter multiple times to enable multiple loggers`},{name:"--no-build",description:"Doesn't build the test project before running it. It also implicitly sets the - --no-restore flag"},{name:"--nologo",description:"Run tests without displaying the Microsoft TestPlatform banner. Available since .NET Core 3.0 SDK"},{name:["-o","--output"],description:"Directory in which to find the binaries to run. If not specified, the default path is ./bin/<configuration>/<framework>/. For projects with multiple target frameworks (via the TargetFrameworks property), you also need to define --framework when you specify this option. dotnet test always runs tests from the output directory. You can use AppDomain.BaseDirectory to consume test assets in the output directory",args:{name:"directory",template:"folders"}},{name:"--os",description:"Specifies the target operating system (OS). This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a win-x64 machine, specifying --os os sets the RID to os-x64. If you use this option, don't use the -r|--runtime option. Available since .NET 6 Preview 7",args:{name:"os"}},{name:["-r","--results-directory"],description:"The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is TestResults in the directory that contains the project file",args:{name:"directory",template:"folders"}},{name:"--runtime",description:"The target runtime to test for",args:{name:"runtime"}},{name:["-s","--settings"],description:"The .runsettings file to use for running the tests. The TargetPlatform element (x86|x64) has no effect for dotnet test. To run tests that target x86, install the x86 version of .NET Core. The bitness of the dotnet.exe that is on the path is what will be used for running tests",args:{name:"file",generators:(0,M.filepaths)({extensions:["runsettings"]})}},{name:["-t","--list-tests"],description:"List the discovered tests instead of running the tests"},{name:["-v","--verbosity"],description:"Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. The default is minimal. For more information, see LoggerVerbosity",args:{name:"verbosity",suggestions:["quiet","minimal","normal","detailed","diagnostic"]}},{name:"--",args:{name:"args"}}]},Re=Oe;export{Re as default};
|
|
1
|
+
var Y=Object.create;var q=Object.defineProperty;var Z=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 se=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ee(t))!ne.call(e,i)&&i!==n&&q(e,i,{get:()=>t[i],enumerable:!(s=Z(t,i))||s.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?Y(te(e)):{},se(t||!e||!e.__esModule?q(n,"default",{value:e,enumerable:!0}):n,e));var W=I(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.shellExpand=S.ensureTrailingSlash=void 0;var re=e=>e.endsWith("/")?e:`${e}/`;S.ensureTrailingSlash=re;var oe=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,ae=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,i=>{var r;let a=i.slice(1);return(r=t[a])!==null&&r!==void 0?r:i}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(i,r,a)=>{var c,u;return(u=(c=t[r])!==null&&c!==void 0?c:a)!==null&&u!==void 0?u:i}),le=(e,t)=>{var n;let{environmentVariables:s}=t;return ae(oe(e,(n=s?.HOME)!==null&&n!==void 0?n:"~"),s)};S.shellExpand=le});var $=I(b=>{"use strict";var ce=b&&b.__awaiter||function(e,t,n,s){function i(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function c(o){try{l(s.next(o))}catch(d){a(d)}}function u(o){try{l(s.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):i(o.value).then(c,u)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(b,"__esModule",{value:!0});b.filepaths=b.folders=b.getCurrentInsertedDirectory=void 0;b.sortFilesAlphabetically=K;var C=W();function K(e,t=[]){let n=t.map(i=>i.toLowerCase()),s=e.filter(i=>!n.includes(i.toLowerCase()));return[...s.filter(i=>!i.startsWith(".")).sort((i,r)=>i.localeCompare(r)),...s.filter(i=>i.startsWith(".")).sort((i,r)=>i.localeCompare(r)),"../"]}var ue=(e,t,n)=>{if(e===null)return"/";let s=(0,C.shellExpand)(t,n),i=s.slice(0,s.lastIndexOf("/")+1);return i===""?(0,C.ensureTrailingSlash)(e):i.startsWith("/")?i:`${(0,C.ensureTrailingSlash)(e)}${i}`};b.getCurrentInsertedDirectory=ue;function R(e={}){let{extensions:t=[],equals:n=[],matches:s,filterFolders:i=!1,editFileSuggestions:r,editFolderSuggestions:a,rootDirectory:c,showFolders:u="always"}=e,l=new Set(t),o=new Set(n),d=()=>t.length>0||n.length>0||s,g=(h=[])=>d()?h.filter(({name:m="",type:w})=>{if(!i&&w==="folder"||o.has(m)||s&&m.match(s))return!0;let[,...f]=m.split(".");if(f.length>=1){let v=f.length-1,x=f[v];do{if(l.has(x))return!0;v-=1,x=[f[v],x].join(".")}while(v>=0)}return!1}):h,T=(h=[])=>!r&&!a?h:h.map(m=>Object.assign(Object.assign({},m),(m.type==="file"?r:a)||{}));return{trigger:(h,m)=>{let w=h.lastIndexOf("/"),f=m.lastIndexOf("/");return w!==f?!0:w===-1&&f===-1?!1:h.slice(0,w)!==m.slice(0,f)},getQueryTerm:h=>h.slice(h.lastIndexOf("/")+1),custom:(h,m,w)=>ce(this,void 0,void 0,function*(){var f;let{isDangerous:v,currentWorkingDirectory:x,searchTerm:p}=w,_=(f=(0,b.getCurrentInsertedDirectory)(c??x,p,w))!==null&&f!==void 0?f:"/";try{let P=yield m({command:"ls",args:["-1ApL"],cwd:_}),X=K(P.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),k=[];for(let D of X)if(D){let A=D.endsWith("/")?"folders":"filepaths";(A==="filepaths"&&u!=="only"||A==="folders"&&u!=="never")&&k.push({type:A==="filepaths"?"file":"folder",name:D,insertValue:D,isDangerous:v,context:{templateType:A}})}return T(g(k))}catch{return[]}})}}b.folders=Object.assign(()=>R({showFolders:"only"}),Object.freeze(R({showFolders:"only"})));b.filepaths=Object.assign(R,Object.freeze(R()))});var z=I(O=>{"use strict";var j=O&&O.__awaiter||function(e,t,n,s){function i(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function c(o){try{l(s.next(o))}catch(d){a(d)}}function u(o){try{l(s.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):i(o.value).then(c,u)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(O,"__esModule",{value:!0});O.valueList=de;O.keyValue=fe;O.keyValueList=he;var G=new Map;function N(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 s=yield e(...n);return N(t,s)}if(typeof e[0]=="string"){let s=e.map(i=>({name:i}));return N(t,s)}return N(t,e)})}function M(e,t,n,s){return j(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let i=G.get(e);return i===void 0&&(i=yield J(e,t,s),G.set(e,i)),i}return J(e,t,s)})}function U(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function E(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function L(e,t){let n=new Set(e);return t.filter(s=>{var i;return typeof s.name=="string"?!n.has(s.name):!(!((i=s.name)===null||i===void 0)&&i.some(r=>n.has(r)))})}function de({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:s=!1,allowRepeatedValues:i=!1}){return{trigger:(r,a)=>r.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:r=>r.slice(r.lastIndexOf(e)+e.length),custom:(...r)=>j(this,void 0,void 0,function*(){var a;let c=yield M(t,s?e:"",n,r);if(i)return c;let[u]=r,l=(a=u[u.length-1])===null||a===void 0?void 0:a.split(e);return L(l,c)})}}function fe({separator:e="=",keys:t=[],values:n=[],cache:s=!1,insertSeparator:i=!0}){return{trigger:(r,a)=>r.indexOf(e)!==a.indexOf(e),getQueryTerm:r=>r.slice(r.indexOf(e)+1),custom:(...r)=>j(this,void 0,void 0,function*(){let[a]=r,u=!a[a.length-1].includes(e),l=u?t:n,o=U(u,s);return M(l,u&&i?e:"",o,r)})}}function he({separator:e="=",delimiter:t=",",keys:n=[],values:s=[],cache:i=!1,insertSeparator:r=!0,insertDelimiter:a=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:u=!0}){return{trigger:(l,o)=>{let d=E(l,e,t),g=E(o,e,t);return d!==g},getQueryTerm:l=>{let o=E(l,e,t);return l.slice(o+1)},custom:(...l)=>j(this,void 0,void 0,function*(){let[o]=l,d=o[o.length-1],g=E(d,e,t),T=g===-1||d.slice(g,g+e.length)!==e,h=T?n:s,m=U(T,i),f=yield M(h,T?r?e:"":a?t:"",m,l);if(T){if(c)return f;let x=d.split(t).map(p=>p.slice(0,p.indexOf(e)));return L(x,f)}if(u)return f;let v=d.split(t).map(x=>x.slice(x.indexOf(e)+e.length));return L(v,f)})}}});var B=I(F=>{"use strict";var pe=F&&F.__awaiter||function(e,t,n,s){function i(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function c(o){try{l(s.next(o))}catch(d){a(d)}}function u(o){try{l(s.throw(o))}catch(d){a(d)}}function l(o){o.done?r(o.value):i(o.value).then(c,u)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(F,"__esModule",{value:!0});F.ai=be;var me=4097,ge=4,ye=.8,ve=me*ge*ye;function be({name:e,prompt:t,message:n,postProcess:s,temperature:i,splitOn:r}){return{scriptTimeout:15e3,custom:(a,c,u)=>pe(this,void 0,void 0,function*(){var l,o;let d=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:c,generatorContext:u}):t,T=typeof n=="function"?yield n({tokens:a,executeCommand:c,generatorContext:u}):n;if(T===null||T.length===0)return console.warn("No message provided to AI generator"),[];let h=ve-((l=g?.length)!==null&&l!==void 0?l:0),m={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:T.slice(0,h)}],temperature:i},w=JSON.stringify(m),f=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",w]}),v=JSON.parse(f.stdout);return(o=v?.choices.map(p=>{var _;return(_=p?.message)===null||_===void 0?void 0:_.content}).filter(p=>typeof p=="string").flatMap(p=>r?p.split(r).filter(_=>_.trim().length>0):[p]).map(p=>{if(s)return s(p);let _=p.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:_,insertValue:`'${_}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}});var H=I(y=>{"use strict";var we=y&&y.__createBinding||(Object.create?function(e,t,n,s){s===void 0&&(s=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,s,i)}:function(e,t,n,s){s===void 0&&(s=n),e[s]=t[n]}),xe=y&&y.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&we(t,e,n)};Object.defineProperty(y,"__esModule",{value:!0});y.ai=y.folders=y.filepaths=void 0;var Q=$();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return Q.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return Q.folders}});xe(z(),y);var Te=B();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return Te.ai}})});var V=ie(H(),1),_e=(0,V.filepaths)({extensions:["csproj","sln","dll"]}),Oe={name:"test",description:"The dotnet test command is used to execute unit tests in a given solution. The dotnet test command builds the solution and runs a test host application for each test project in the solution. The test host executes tests in the given project using a test framework, for example: MSTest, NUnit, or xUnit, and reports the success or failure of each test. If all tests are successful, the test runner returns 0 as an exit code; otherwise if any test fails, it returns 1",args:{name:"PROJECT | SOLUTION | DIRECTORY | DLL",generators:_e},options:[{name:["-a","--test-adapter-path"],description:"Path to a directory to be searched for additional test adapters. Only .dll files with suffix .TestAdapter.dll are inspected. If not specified, the directory of the test .dll is searched",args:{name:"path",template:"folders"}},{name:"--arch",description:"Specifies the target architecture. This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a win-x64 machine, specifying --arch x86 sets the RID to win-x86. If you use this option, don't use the -r|--runtime option. Available since .NET 6 Preview 7",args:{name:"architecture"}},{name:"--blame",description:"Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash. When a crash is detected, it creates a sequence file in TestResults/<Guid>/<Guid>_Sequence.xml that captures the order of tests that were run before the crash"},{name:"--blame-crash",description:"Runs the tests in blame mode and collects a crash dump when the test host exits unexpectedly. This option depends on the version of .NET used, the type of error, and the operating system"},{name:"--blame-crash-dump-type",description:"The type of crash dump to be collected. Implies --blame-crash",args:{name:"type"}},{name:"--blame-crash-collect-always",description:"Collects a crash dump on expected as well as unexpected test host exit"},{name:"--blame-hang",description:"Run the tests in blame mode and collects a hang dump when a test exceeds the given timeout"},{name:"--blame-hang-timeout",description:"Per-test timeout, after which a hang dump is triggered and the test host process and all of its child processes are dumped and terminated",args:{name:"timeout"}},{name:["-c","--configuration"],description:"Defines the build configuration. The default for most projects is Debug, but you can override the build configuration settings in your project",args:{name:"configuration",suggestions:["Debug","Release"]}},{name:"--collect",description:"Enables data collector for the test run",args:{name:"name"}},{name:["-d","--diag"],description:"Enables diagnostic mode for the test platform and writes diagnostic messages to the specified file and to files next to it. The process that is logging the messages determines which files are created, such as *.host_<date>.txt for test host log, and *.datacollector_<date>.txt for data collector log",args:{name:"file",template:"filepaths"}},{name:["-f","--framework"],description:"Forces the use of dotnet or .NET Framework test host for the test binaries. This option only determines which type of host to use. The actual framework version to be used is determined by the runtimeconfig.json of the test project. When not specified, the TargetFramework assembly attribute is used to determine the type of host. When that attribute is stripped from the .dll, the .NET Framework host is used",args:{name:"framework"}},{name:"--filter",description:"Filters out tests in the current project using the given expression. For more information, see the Filter option details section. For more information and examples on how to use selective unit test filtering, see Running selective unit tests",args:{name:"expression"}},{name:"--interactive",description:"Allows the command to stop and wait for user input or action. For example, to complete authentication. Available since .NET Core 3.0 SDK"},{name:["-l","--logger"],description:`Specifies a logger for test results. Unlike MSBuild, dotnet test doesn't accept abbreviations: instead of -l "console;v=d" use -l "console;verbosity=detailed". Specify the parameter multiple times to enable multiple loggers`},{name:"--no-build",description:"Doesn't build the test project before running it. It also implicitly sets the - --no-restore flag"},{name:"--nologo",description:"Run tests without displaying the Microsoft TestPlatform banner. Available since .NET Core 3.0 SDK"},{name:["-o","--output"],description:"Directory in which to find the binaries to run. If not specified, the default path is ./bin/<configuration>/<framework>/. For projects with multiple target frameworks (via the TargetFrameworks property), you also need to define --framework when you specify this option. dotnet test always runs tests from the output directory. You can use AppDomain.BaseDirectory to consume test assets in the output directory",args:{name:"directory",template:"folders"}},{name:"--os",description:"Specifies the target operating system (OS). This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a win-x64 machine, specifying --os os sets the RID to os-x64. If you use this option, don't use the -r|--runtime option. Available since .NET 6 Preview 7",args:{name:"os"}},{name:["-r","--results-directory"],description:"The directory where the test results are going to be placed. If the specified directory doesn't exist, it's created. The default is TestResults in the directory that contains the project file",args:{name:"directory",template:"folders"}},{name:"--runtime",description:"The target runtime to test for",args:{name:"runtime"}},{name:["-s","--settings"],description:"The .runsettings file to use for running the tests. The TargetPlatform element (x86|x64) has no effect for dotnet test. To run tests that target x86, install the x86 version of .NET Core. The bitness of the dotnet.exe that is on the path is what will be used for running tests",args:{name:"file",generators:(0,V.filepaths)({extensions:["runsettings"]})}},{name:["-t","--list-tests"],description:"List the discovered tests instead of running the tests"},{name:["-v","--verbosity"],description:"Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. The default is minimal. For more information, see LoggerVerbosity",args:{name:"verbosity",suggestions:["quiet","minimal","normal","detailed","diagnostic"]}},{name:"--",args:{name:"args"}}]},Re=Oe;export{Re as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var te=Object.create;var M=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),
|
|
3
|
-
`).slice(2).map(n=>{let o=/(([a-zA-Z \.\[\]#,/][^ ]{1,})+)/g,[i,s,a]=n.match(o).map(c=>c.trim());return{insertValue:i,name:i,description:a}})}},Z=[{name:"--add-source",description:"Adds an additional NuGet package source to use during installation. Feeds are accessed in parallel, not sequentially in some order of precedence. If the same package and version is in multiple feeds, the fastest feed wins",args:{name:"source"}},{name:"--configfile",description:"The NuGet configuration file (nuget.config) to use. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used",args:{name:"file",generators:Y}},{name:"--disable-parallel",description:"Prevent restoring multiple projects in parallel"},{name:"--framework",description:"Specifies the target framework to install the tool for. By default, the .NET SDK tries to choose the most appropriate target framework",args:{name:"framework"}},{name:["-g","--global"],description:"Specifies that the installation is user wide. Can't be combined with the --tool-path option. Omitting both --global and --tool-path specifies a local tool installation",exclusiveOn:["--tool-path"]},{name:"--ignore-failed-sources",description:"Treat package source failures as warnings"},{name:"--interactive",description:"Allows the command to stop and wait for user input or action. For example, to complete authentication"},{name:"--local",description:"Update the tool and the local tool manifest. Can't be combined with the --global option or the --tool-path option",exclusiveOn:["--global","--tool-path"]},{name:"--no-cache",description:"Do not cache packages and HTTP requests"},{name:"--tool-manifest",description:"Path to the manifest file",args:{name:"path",template:"filepaths"}},{name:["-v","--verbosity"],description:"Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. The default is minimal",args:{name:"verbosity",suggestions:["quiet","minimal","normal","detailed","diagnostic"]}},{name:"--version",description:"The version of the tool to install. By default, the latest stable package version is installed. Use this option to install preview or older versions of the tool",args:{name:"version",debounce:!0,generators:
|
|
1
|
+
var te=Object.create;var M=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ae=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oe(t))!se.call(e,i)&&i!==n&&M(e,i,{get:()=>t[i],enumerable:!(o=ne(t,i))||o.enumerable});return e};var re=(e,t,n)=>(n=e!=null?te(ie(e)):{},ae(t||!e||!e.__esModule?M(n,"default",{value:e,enumerable:!0}):n,e));var R=I(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.shellExpand=x.ensureTrailingSlash=void 0;var le=e=>e.endsWith("/")?e:`${e}/`;x.ensureTrailingSlash=le;var ce=(e,t)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",t):e,ue=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,i=>{var s;let a=i.slice(1);return(s=t[a])!==null&&s!==void 0?s:i}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(i,s,a)=>{var c,u;return(u=(c=t[s])!==null&&c!==void 0?c:a)!==null&&u!==void 0?u:i}),de=(e,t)=>{var n;let{environmentVariables:o}=t;return ue(ce(e,(n=o?.HOME)!==null&&n!==void 0?n:"~"),o)};x.shellExpand=de});var W=I(y=>{"use strict";var fe=y&&y.__awaiter||function(e,t,n,o){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(r){try{l(o.next(r))}catch(d){a(d)}}function u(r){try{l(o.throw(r))}catch(d){a(d)}}function l(r){r.done?s(r.value):i(r.value).then(c,u)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(y,"__esModule",{value:!0});y.filepaths=y.folders=y.getCurrentInsertedDirectory=void 0;y.sortFilesAlphabetically=H;var C=R();function H(e,t=[]){let n=t.map(i=>i.toLowerCase()),o=e.filter(i=>!n.includes(i.toLowerCase()));return[...o.filter(i=>!i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),...o.filter(i=>i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),"../"]}var he=(e,t,n)=>{if(e===null)return"/";let o=(0,C.shellExpand)(t,n),i=o.slice(0,o.lastIndexOf("/")+1);return i===""?(0,C.ensureTrailingSlash)(e):i.startsWith("/")?i:`${(0,C.ensureTrailingSlash)(e)}${i}`};y.getCurrentInsertedDirectory=he;function N(e={}){let{extensions:t=[],equals:n=[],matches:o,filterFolders:i=!1,editFileSuggestions:s,editFolderSuggestions:a,rootDirectory:c,showFolders:u="always"}=e,l=new Set(t),r=new Set(n),d=()=>t.length>0||n.length>0||o,g=(h=[])=>d()?h.filter(({name:m="",type:w})=>{if(!i&&w==="folder"||r.has(m)||o&&m.match(o))return!0;let[,...f]=m.split(".");if(f.length>=1){let b=f.length-1,O=f[b];do{if(l.has(O))return!0;b-=1,O=[f[b],O].join(".")}while(b>=0)}return!1}):h,T=(h=[])=>!s&&!a?h:h.map(m=>Object.assign(Object.assign({},m),(m.type==="file"?s:a)||{}));return{trigger:(h,m)=>{let w=h.lastIndexOf("/"),f=m.lastIndexOf("/");return w!==f?!0:w===-1&&f===-1?!1:h.slice(0,w)!==m.slice(0,f)},getQueryTerm:h=>h.slice(h.lastIndexOf("/")+1),custom:(h,m,w)=>fe(this,void 0,void 0,function*(){var f;let{isDangerous:b,currentWorkingDirectory:O,searchTerm:p}=w,S=(f=(0,y.getCurrentInsertedDirectory)(c??O,p,w))!==null&&f!==void 0?f:"/";try{let G=yield m({command:"ls",args:["-1ApL"],cwd:S}),ee=H(G.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),L=[];for(let F of ee)if(F){let j=F.endsWith("/")?"folders":"filepaths";(j==="filepaths"&&u!=="only"||j==="folders"&&u!=="never")&&L.push({type:j==="filepaths"?"file":"folder",name:F,insertValue:F,isDangerous:b,context:{templateType:j}})}return T(g(L))}catch{return[]}})}}y.folders=Object.assign(()=>N({showFolders:"only"}),Object.freeze(N({showFolders:"only"})));y.filepaths=Object.assign(N,Object.freeze(N()))});var K=I(_=>{"use strict";var A=_&&_.__awaiter||function(e,t,n,o){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(r){try{l(o.next(r))}catch(d){a(d)}}function u(r){try{l(o.throw(r))}catch(d){a(d)}}function l(r){r.done?s(r.value):i(r.value).then(c,u)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.valueList=pe;_.keyValue=me;_.keyValueList=ge;var $=new Map;function D(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 A(this,void 0,void 0,function*(){if(typeof e=="function"){let o=yield e(...n);return D(t,o)}if(typeof e[0]=="string"){let o=e.map(i=>({name:i}));return D(t,o)}return D(t,e)})}function V(e,t,n,o){return A(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let i=$.get(e);return i===void 0&&(i=yield z(e,t,o),$.set(e,i)),i}return z(e,t,o)})}function J(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function q(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function P(e,t){let n=new Set(e);return t.filter(o=>{var i;return typeof o.name=="string"?!n.has(o.name):!(!((i=o.name)===null||i===void 0)&&i.some(s=>n.has(s)))})}function pe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:o=!1,allowRepeatedValues:i=!1}){return{trigger:(s,a)=>s.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>A(this,void 0,void 0,function*(){var a;let c=yield V(t,o?e:"",n,s);if(i)return c;let[u]=s,l=(a=u[u.length-1])===null||a===void 0?void 0:a.split(e);return P(l,c)})}}function me({separator:e="=",keys:t=[],values:n=[],cache:o=!1,insertSeparator:i=!0}){return{trigger:(s,a)=>s.indexOf(e)!==a.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>A(this,void 0,void 0,function*(){let[a]=s,u=!a[a.length-1].includes(e),l=u?t:n,r=J(u,o);return V(l,u&&i?e:"",r,s)})}}function ge({separator:e="=",delimiter:t=",",keys:n=[],values:o=[],cache:i=!1,insertSeparator:s=!0,insertDelimiter:a=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:u=!0}){return{trigger:(l,r)=>{let d=q(l,e,t),g=q(r,e,t);return d!==g},getQueryTerm:l=>{let r=q(l,e,t);return l.slice(r+1)},custom:(...l)=>A(this,void 0,void 0,function*(){let[r]=l,d=r[r.length-1],g=q(d,e,t),T=g===-1||d.slice(g,g+e.length)!==e,h=T?n:o,m=J(T,i),f=yield V(h,T?s?e:"":a?t:"",m,l);if(T){if(c)return f;let O=d.split(t).map(p=>p.slice(0,p.indexOf(e)));return P(O,f)}if(u)return f;let b=d.split(t).map(O=>O.slice(O.indexOf(e)+e.length));return P(b,f)})}}});var U=I(k=>{"use strict";var ve=k&&k.__awaiter||function(e,t,n,o){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(r){try{l(o.next(r))}catch(d){a(d)}}function u(r){try{l(o.throw(r))}catch(d){a(d)}}function l(r){r.done?s(r.value):i(r.value).then(c,u)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(k,"__esModule",{value:!0});k.ai=Te;var be=4097,ye=4,we=.8,Oe=be*ye*we;function Te({name:e,prompt:t,message:n,postProcess:o,temperature:i,splitOn:s}){return{scriptTimeout:15e3,custom:(a,c,u)=>ve(this,void 0,void 0,function*(){var l,r;let d=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:c,generatorContext:u}):t,T=typeof n=="function"?yield n({tokens:a,executeCommand:c,generatorContext:u}):n;if(T===null||T.length===0)return console.warn("No message provided to AI generator"),[];let h=Oe-((l=g?.length)!==null&&l!==void 0?l:0),m={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:T.slice(0,h)}],temperature:i},w=JSON.stringify(m),f=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",w]}),b=JSON.parse(f.stdout);return(r=b?.choices.map(p=>{var S;return(S=p?.message)===null||S===void 0?void 0:S.content}).filter(p=>typeof p=="string").flatMap(p=>s?p.split(s).filter(S=>S.trim().length>0):[p]).map(p=>{if(o)return o(p);let S=p.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:S,insertValue:`'${S}'`,description:"Generated by Fig AI"}}))!==null&&r!==void 0?r:[]})}}});var Q=I(v=>{"use strict";var Se=v&&v.__createBinding||(Object.create?function(e,t,n,o){o===void 0&&(o=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,o,i)}:function(e,t,n,o){o===void 0&&(o=n),e[o]=t[n]}),_e=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=W();Object.defineProperty(v,"filepaths",{enumerable:!0,get:function(){return B.filepaths}});Object.defineProperty(v,"folders",{enumerable:!0,get:function(){return B.folders}});_e(K(),v);var xe=U();Object.defineProperty(v,"ai",{enumerable:!0,get:function(){return xe.ai}})});var X=re(Q(),1),Ie={script(e){return["curl","-s","-H","Accept: application/json",`https://azuresearch-usnc.nuget.org/query?packageType=DotnetTool&q=${e[e.length-1]}`]},postProcess(e){return JSON.parse(e).data.map(n=>({name:n.title,insertValue:n.id,description:n.description}))}},Ae={script(e){let t=["install","update"],n=e.filter(s=>!s.startsWith("-")),o=n.findIndex(s=>t.includes(s));return["curl","-s","-H","Accept: application/json",`https://api.nuget.org/v3-flatcontainer/${n[o+1].toLowerCase()}/index.json`]},postProcess(e){return JSON.parse(e).versions.reverse().map(n=>({name:n}))}},Y=(0,X.filepaths)({equals:"nuget.config"}),E={trigger:()=>!0,script(e){let t=["-g","--global"];return e.some(n=>t.includes(n))?["dotnet","tool","list","--global"]:["dotnet","tool","list"]},postProcess(e){return e.split(`
|
|
3
|
+
`).slice(2).map(n=>{let o=/(([a-zA-Z \.\[\]#,/][^ ]{1,})+)/g,[i,s,a]=n.match(o).map(c=>c.trim());return{insertValue:i,name:i,description:a}})}},Z=[{name:"--add-source",description:"Adds an additional NuGet package source to use during installation. Feeds are accessed in parallel, not sequentially in some order of precedence. If the same package and version is in multiple feeds, the fastest feed wins",args:{name:"source"}},{name:"--configfile",description:"The NuGet configuration file (nuget.config) to use. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used",args:{name:"file",generators:Y}},{name:"--disable-parallel",description:"Prevent restoring multiple projects in parallel"},{name:"--framework",description:"Specifies the target framework to install the tool for. By default, the .NET SDK tries to choose the most appropriate target framework",args:{name:"framework"}},{name:["-g","--global"],description:"Specifies that the installation is user wide. Can't be combined with the --tool-path option. Omitting both --global and --tool-path specifies a local tool installation",exclusiveOn:["--tool-path"]},{name:"--ignore-failed-sources",description:"Treat package source failures as warnings"},{name:"--interactive",description:"Allows the command to stop and wait for user input or action. For example, to complete authentication"},{name:"--local",description:"Update the tool and the local tool manifest. Can't be combined with the --global option or the --tool-path option",exclusiveOn:["--global","--tool-path"]},{name:"--no-cache",description:"Do not cache packages and HTTP requests"},{name:"--tool-manifest",description:"Path to the manifest file",args:{name:"path",template:"filepaths"}},{name:["-v","--verbosity"],description:"Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. The default is minimal",args:{name:"verbosity",suggestions:["quiet","minimal","normal","detailed","diagnostic"]}},{name:"--version",description:"The version of the tool to install. By default, the latest stable package version is installed. Use this option to install preview or older versions of the tool",args:{name:"version",debounce:!0,generators:Ae}}],ke={name:"tool",description:"The dotnet tool install command provides a way for you to install .NET tools on your machine",subcommands:[{name:"install",args:{name:"package",debounce:!0,generators:Ie},options:Z},{name:"list",description:"The dotnet tool list command provides a way for you to list all .NET global, tool-path, or local tools installed on your machine. The command lists the package name, version installed, and the tool command",options:[{name:["-g","--global"],description:"Lists user-wide global tools. Can't be combined with the --tool-path option. Omitting both --global and --tool-path lists local tools",exclusiveOn:["--tool-path"]},{name:"--local",description:"Lists local tools for the current directory. Can't be combined with the --global or --tool-path options. Omitting both --global and --tool-path lists local tools even if --local is not specified",exclusiveOn:["--global","--tool-path"]},{name:"--tool-path",description:"Specifies a custom location where to find global tools. PATH can be absolute or relative. Can't be combined with the --global option. Omitting both --global and --tool-path lists local tools",exclusiveOn:["--global"]}]},{name:"restore",description:"The dotnet tool restore command finds the tool manifest file that is in scope for the current directory and installs the tools that are listed in it. For information about manifest files, see Install a local tool and Invoke a local tool",options:[{name:"--configfile",description:"The NuGet configuration file (nuget.config) to use. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used",args:{name:"file",generators:Y}},{name:"--add-source",description:"Adds an additional NuGet package source to use during installation. Feeds are accessed in parallel, not sequentially in some order of precedence. If the same package and version is in multiple feeds, the fastest feed wins",args:{name:"source"}},{name:"--tool-manifest",description:"Path to the manifest file",args:{name:"path",template:"filepaths"}},{name:"--ignore-failed-sources",description:"Treat package source failures as warnings"},{name:"--no-cache",description:"Do not cache packages and HTTP requests"},{name:"--interactive",description:"Allows the command to stop and wait for user input or action. For example, to complete authentication"},{name:["-v","--verbosity"],description:"Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. The default is minimal",args:{name:"verbosity",suggestions:["quiet","minimal","normal","detailed","diagnostic"]}}]},{name:"run",description:"The dotnet tool run command searches tool manifest files that are in scope for the current directory. When it finds a reference to the specified tool, it runs the tool",args:{name:"command",generators:E}},{name:"search",description:"The dotnet tool search command provides a way for you to search NuGet for tools that can be used as .NET global, tool-path, or local tools. The command searches the tool names and metadata such as titles, descriptions, and tags",options:[{name:"--detail",description:"Shows detailed results from the query"},{name:"--prerelease",description:"Includes pre-release packages"},{name:"--skip",description:"Specifies the number of query results to skip. Used for pagination",args:{name:"number"}},{name:"--take",description:"Specifies the number of query results to show. Used for pagination",args:{name:"number"}}]},{name:"uninstall",description:"The dotnet tool uninstall command provides a way for you to uninstall .NET tools from your machine",args:{name:"package",description:"Name/ID of the NuGet package that contains the .NET tool to uninstall. You can find the package name using the dotnet tool list command",generators:E},options:[{name:["-g","--global"],description:"Specifies that the tool to be removed is from a user-wide installation. Can't be combined with the --tool-path option. Omitting both --global and --tool-path specifies that the tool to be removed is a local tool",exclusiveOn:["--tool-path"]},{name:"--tool-path",description:"Specifies the location where to uninstall the tool. PATH can be absolute or relative. Can't be combined with the --global option. Omitting both --global and --tool-path specifies that the tool to be removed is a local tool",exclusiveOn:["--global"]}]},{name:"update",description:"The dotnet tool update command provides a way for you to update .NET tools on your machine to the latest stable version of the package",args:{name:"package",generators:E},options:Z}]},Pe=ke;export{Pe as default};
|
package/build/dotnet.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var Y=Object.create;var R=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty;var
|
|
2
|
-
`),[".DS_Store"]),K=[];for(let F of U)if(F){let M=F.endsWith("/")?"folders":"filepaths";(M==="filepaths"&&u!=="only"||M==="folders"&&u!=="never")&&K.push({type:M==="filepaths"?"file":"folder",name:F,insertValue:F,isDangerous:
|
|
1
|
+
var Y=Object.create;var R=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ie=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of te(t))!oe.call(e,i)&&i!==n&&R(e,i,{get:()=>t[i],enumerable:!(o=ee(t,i))||o.enumerable});return e};var se=(e,t,n)=>(n=e!=null?Y(ne(e)):{},ie(t||!e||!e.__esModule?R(n,"default",{value:e,enumerable:!0}):n,e));var W=I(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.shellExpand=j.ensureTrailingSlash=void 0;var re=e=>e.endsWith("/")?e:`${e}/`;j.ensureTrailingSlash=re;var ae=(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 a=i.slice(1);return(s=t[a])!==null&&s!==void 0?s:i}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(i,s,a)=>{var d,u;return(u=(d=t[s])!==null&&d!==void 0?d:a)!==null&&u!==void 0?u:i}),ce=(e,t)=>{var n;let{environmentVariables:o}=t;return le(ae(e,(n=o?.HOME)!==null&&n!==void 0?n:"~"),o)};j.shellExpand=ce});var k=I(S=>{"use strict";var de=S&&S.__awaiter||function(e,t,n,o){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function d(r){try{l(o.next(r))}catch(c){a(c)}}function u(r){try{l(o.throw(r))}catch(c){a(c)}}function l(r){r.done?s(r.value):i(r.value).then(d,u)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.filepaths=S.folders=S.getCurrentInsertedDirectory=void 0;S.sortFilesAlphabetically=$;var P=W();function $(e,t=[]){let n=t.map(i=>i.toLowerCase()),o=e.filter(i=>!n.includes(i.toLowerCase()));return[...o.filter(i=>!i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),...o.filter(i=>i.startsWith(".")).sort((i,s)=>i.localeCompare(s)),"../"]}var ue=(e,t,n)=>{if(e===null)return"/";let o=(0,P.shellExpand)(t,n),i=o.slice(0,o.lastIndexOf("/")+1);return i===""?(0,P.ensureTrailingSlash)(e):i.startsWith("/")?i:`${(0,P.ensureTrailingSlash)(e)}${i}`};S.getCurrentInsertedDirectory=ue;function N(e={}){let{extensions:t=[],equals:n=[],matches:o,filterFolders:i=!1,editFileSuggestions:s,editFolderSuggestions:a,rootDirectory:d,showFolders:u="always"}=e,l=new Set(t),r=new Set(n),c=()=>t.length>0||n.length>0||o,v=(m=[])=>c()?m.filter(({name:g="",type:_})=>{if(!i&&_==="folder"||r.has(g)||o&&g.match(o))return!0;let[,...p]=g.split(".");if(p.length>=1){let b=p.length-1,O=p[b];do{if(l.has(O))return!0;b-=1,O=[p[b],O].join(".")}while(b>=0)}return!1}):m,w=(m=[])=>!s&&!a?m:m.map(g=>Object.assign(Object.assign({},g),(g.type==="file"?s:a)||{}));return{trigger:(m,g)=>{let _=m.lastIndexOf("/"),p=g.lastIndexOf("/");return _!==p?!0:_===-1&&p===-1?!1:m.slice(0,_)!==g.slice(0,p)},getQueryTerm:m=>m.slice(m.lastIndexOf("/")+1),custom:(m,g,_)=>de(this,void 0,void 0,function*(){var p;let{isDangerous:b,currentWorkingDirectory:O,searchTerm:h}=_,T=(p=(0,S.getCurrentInsertedDirectory)(d??O,h,_))!==null&&p!==void 0?p:"/";try{let q=yield g({command:"ls",args:["-1ApL"],cwd:T}),U=$(q.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),K=[];for(let F of U)if(F){let M=F.endsWith("/")?"folders":"filepaths";(M==="filepaths"&&u!=="only"||M==="folders"&&u!=="never")&&K.push({type:M==="filepaths"?"file":"folder",name:F,insertValue:F,isDangerous:b,context:{templateType:M}})}return w(v(K))}catch{return[]}})}}S.folders=Object.assign(()=>N({showFolders:"only"}),Object.freeze(N({showFolders:"only"})));S.filepaths=Object.assign(N,Object.freeze(N()))});var J=I(x=>{"use strict";var A=x&&x.__awaiter||function(e,t,n,o){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function d(r){try{l(o.next(r))}catch(c){a(c)}}function u(r){try{l(o.throw(r))}catch(c){a(c)}}function l(r){r.done?s(r.value):i(r.value).then(d,u)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(x,"__esModule",{value:!0});x.valueList=fe;x.keyValue=pe;x.keyValueList=me;var z=new Map;function V(e,t){return e.length===0?t:t.map(n=>n.insertValue?n:Object.assign(Object.assign({},n),{insertValue:n.name+e}))}function H(e,t,n){return A(this,void 0,void 0,function*(){if(typeof e=="function"){let o=yield e(...n);return V(t,o)}if(typeof e[0]=="string"){let o=e.map(i=>({name:i}));return V(t,o)}return V(t,e)})}function L(e,t,n,o){return A(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let i=z.get(e);return i===void 0&&(i=yield H(e,t,o),z.set(e,i)),i}return H(e,t,o)})}function G(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function D(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function C(e,t){let n=new Set(e);return t.filter(o=>{var i;return typeof o.name=="string"?!n.has(o.name):!(!((i=o.name)===null||i===void 0)&&i.some(s=>n.has(s)))})}function fe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:o=!1,allowRepeatedValues:i=!1}){return{trigger:(s,a)=>s.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>A(this,void 0,void 0,function*(){var a;let d=yield L(t,o?e:"",n,s);if(i)return d;let[u]=s,l=(a=u[u.length-1])===null||a===void 0?void 0:a.split(e);return C(l,d)})}}function pe({separator:e="=",keys:t=[],values:n=[],cache:o=!1,insertSeparator:i=!0}){return{trigger:(s,a)=>s.indexOf(e)!==a.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>A(this,void 0,void 0,function*(){let[a]=s,u=!a[a.length-1].includes(e),l=u?t:n,r=G(u,o);return L(l,u&&i?e:"",r,s)})}}function me({separator:e="=",delimiter:t=",",keys:n=[],values:o=[],cache:i=!1,insertSeparator:s=!0,insertDelimiter:a=!1,allowRepeatedKeys:d=!1,allowRepeatedValues:u=!0}){return{trigger:(l,r)=>{let c=D(l,e,t),v=D(r,e,t);return c!==v},getQueryTerm:l=>{let r=D(l,e,t);return l.slice(r+1)},custom:(...l)=>A(this,void 0,void 0,function*(){let[r]=l,c=r[r.length-1],v=D(c,e,t),w=v===-1||c.slice(v,v+e.length)!==e,m=w?n:o,g=G(w,i),p=yield L(m,w?s?e:"":a?t:"",g,l);if(w){if(d)return p;let O=c.split(t).map(h=>h.slice(0,h.indexOf(e)));return C(O,p)}if(u)return p;let b=c.split(t).map(O=>O.slice(O.indexOf(e)+e.length));return C(b,p)})}}});var Q=I(E=>{"use strict";var he=E&&E.__awaiter||function(e,t,n,o){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function d(r){try{l(o.next(r))}catch(c){a(c)}}function u(r){try{l(o.throw(r))}catch(c){a(c)}}function l(r){r.done?s(r.value):i(r.value).then(d,u)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(E,"__esModule",{value:!0});E.ai=Se;var ge=4097,ve=4,ye=.8,be=ge*ve*ye;function Se({name:e,prompt:t,message:n,postProcess:o,temperature:i,splitOn:s}){return{scriptTimeout:15e3,custom:(a,d,u)=>he(this,void 0,void 0,function*(){var l,r;let c=yield d({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(c.stdout))return[];let v=typeof t=="function"?yield t({tokens:a,executeCommand:d,generatorContext:u}):t,w=typeof n=="function"?yield n({tokens:a,executeCommand:d,generatorContext:u}):n;if(w===null||w.length===0)return console.warn("No message provided to AI generator"),[];let m=be-((l=v?.length)!==null&&l!==void 0?l:0),g={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...v?[{role:"system",content:v}]:[],{role:"user",content:w.slice(0,m)}],temperature:i},_=JSON.stringify(g),p=yield d({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",_]}),b=JSON.parse(p.stdout);return(r=b?.choices.map(h=>{var T;return(T=h?.message)===null||T===void 0?void 0:T.content}).filter(h=>typeof h=="string").flatMap(h=>s?h.split(s).filter(T=>T.trim().length>0):[h]).map(h=>{if(o)return o(h);let T=h.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:T,insertValue:`'${T}'`,description:"Generated by Fig AI"}}))!==null&&r!==void 0?r:[]})}}});var B=I(y=>{"use strict";var _e=y&&y.__createBinding||(Object.create?function(e,t,n,o){o===void 0&&(o=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,o,i)}:function(e,t,n,o){o===void 0&&(o=n),e[o]=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 Z=k();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return Z.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return Z.folders}});Oe(J(),y);var we=Q();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return we.ai}})});var X=se(B(),1),f="https://upload.wikimedia.org/wikipedia/commons/7/7d/Microsoft_.NET_logo.svg",Te=[{name:"new",loadSpec:"dotnet/dotnet-new",icon:f},{name:"add",loadSpec:"dotnet/dotnet-add",icon:f},{name:"list",loadSpec:"dotnet/dotnet-list",icon:f},{name:"remove",loadSpec:"dotnet/dotnet-remove",icon:f},{name:"build",loadSpec:"dotnet/dotnet-build",icon:f},{name:"build-server",loadSpec:"dotnet/dotnet-build-server",icon:f},{name:"clean",loadSpec:"dotnet/dotnet-clean",icon:f},{name:"format",loadSpec:"dotnet/dotnet-format",icon:f},{name:"migrate",loadSpec:"dotnet/dotnet-migrate",icon:f},{name:"msbuild",loadSpec:"dotnet/dotnet-msbuild",icon:f},{name:"nuget",loadSpec:"dotnet/dotnet-nuget",icon:f},{name:"pack",loadSpec:"dotnet/dotnet-pack",icon:f},{name:"publish",loadSpec:"dotnet/dotnet-publish",icon:f},{name:"restore",loadSpec:"dotnet/dotnet-restore",icon:f},{name:"run",loadSpec:"dotnet/dotnet-run",icon:f},{name:"sln",loadSpec:"dotnet/dotnet-sln",icon:f},{name:"store",loadSpec:"dotnet/dotnet-store",icon:f},{name:"test",loadSpec:"dotnet/dotnet-test",icon:f},{name:"tool",loadSpec:"dotnet/dotnet-tool",icon:f}],xe={name:"dotnet",description:"The dotnet cli",icon:f,args:{name:"command",isOptional:!0,generators:(0,X.filepaths)({extensions:["dll"]})},options:[{name:"--version",description:"Prints out the version of the .NET SDK used by dotnet commands. Includes the effects of any global.json"},{name:"--info",description:"Prints out detailed information about a .NET installation and the machine environment, such as the current operating system, and commit SHA of the .NET version"},{name:"--list-runtimes",description:"Prints out a list of the installed .NET runtimes. An x86 version of the SDK lists only x86 runtimes, and an x64 version of the SDK lists only x64 runtimes"},{name:"--list-sdks",description:"Prints out a list of the installed .NET SDKs"},{name:["-?","-h","--help"],description:"Prints out a list of available commands"},{name:["-d","--diagnostics"],description:"Enables diagnostic output"},{name:["-v","--verbosity"],description:"Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. Not supported in every command. See specific command page to determine if this option is available",args:{name:"verbosity",suggestions:["quiet","minimal","normal","detailed","diagnostic"]}},{name:"--additionalprobingpath",description:"Path containing probing policy and assemblies to probe",args:{name:"path",template:"folders"}},{name:"--additional-deps",description:"Path to an additional .deps.json file. A deps.json file contains a list of dependencies, compilation dependencies, and version information used to address assembly conflicts. For more information, see Runtime Configuration Files on GitHub",args:{name:"deps",template:"filepaths"}},{name:"-depsfile",description:"Path to the deps.json file. A deps.json file is a configuration file that contains information about dependencies necessary to run the application. This file is generated by the .NET SDK",args:{name:"deps",template:"filepaths"}},{name:"--runtimeconfig",description:"Path to a runtimeconfig.json file. A runtimeconfig.json file is a configuration file that contains run-time settings",args:{name:"path",template:"filepaths"}},{name:"--roll-forward",description:"Controls how roll forward is applied to the app. The SETTING can be one of the following values. If not specified, Minor is the default",args:{name:"setting",suggestions:["LatestPatch","Minor","Major","LatestMinor","LatestMajor","Disable"]}},{name:"--fx-version",description:"Version of the .NET runtime to use to run the application",args:{name:"version"}}],subcommands:Te,async generateSpec(e,t){let n=/(([a-zA-Z \.\[\]#,/][^ ]{1,})+)/g,o=[],{stdout:i}=await t({command:"dotnet",args:["tool","list","--global"]}),s=i.split(`
|
|
3
3
|
`).slice(2);for(let a of s){let[d,u,l]=a.match(n).map(c=>c.trim()),r=l.split(",").map(c=>({name:c.replace("dotnet-",""),description:c,args:{name:"args",isOptional:!0}}));o.push(...r)}return{name:"dotnet",subcommands:o}}},Ne=xe;export{Ne as default};
|
package/build/dtm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var Y=Object.create;var W=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var I=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var oe=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of ne(n))!ie.call(e,o)&&o!==t&&W(e,o,{get:()=>n[o],enumerable:!(i=ee(n,o))||i.enumerable});return e};var re=(e,n,t)=>(t=e!=null?Y(te(e)):{},oe(n||!e||!e.__esModule?W(t,"default",{value:e,enumerable:!0}):t,e));var N=I(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.shellExpand=x.ensureTrailingSlash=void 0;var se=e=>e.endsWith("/")?e:`${e}/`;x.ensureTrailingSlash=se;var ae=(e,n)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",n):e,le=(e,n)=>e.replace(/\$([A-Za-z0-9_]+)/g,o=>{var r;let a=o.slice(1);return(r=n[a])!==null&&r!==void 0?r:o}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(o,r,a)=>{var c,u;return(u=(c=n[r])!==null&&c!==void 0?c:a)!==null&&u!==void 0?u:o}),ce=(e,n)=>{var t;let{environmentVariables:i}=n;return le(ae(e,(t=i?.HOME)!==null&&t!==void 0?t:"~"),i)};x.shellExpand=ce});var $=I(
|
|
2
|
-
`),[".DS_Store"]),z=[];for(let j of
|
|
3
|
-
`).map(n=>({name:n.trim(),description:"Plugin"}))},yamlFiles:(0,
|
|
1
|
+
var Y=Object.create;var W=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var I=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var oe=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of ne(n))!ie.call(e,o)&&o!==t&&W(e,o,{get:()=>n[o],enumerable:!(i=ee(n,o))||i.enumerable});return e};var re=(e,n,t)=>(t=e!=null?Y(te(e)):{},oe(n||!e||!e.__esModule?W(t,"default",{value:e,enumerable:!0}):t,e));var N=I(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.shellExpand=x.ensureTrailingSlash=void 0;var se=e=>e.endsWith("/")?e:`${e}/`;x.ensureTrailingSlash=se;var ae=(e,n)=>e.startsWith("~")&&(e.length===1||e.charAt(1)==="/")?e.replace("~",n):e,le=(e,n)=>e.replace(/\$([A-Za-z0-9_]+)/g,o=>{var r;let a=o.slice(1);return(r=n[a])!==null&&r!==void 0?r:o}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(o,r,a)=>{var c,u;return(u=(c=n[r])!==null&&c!==void 0?c:a)!==null&&u!==void 0?u:o}),ce=(e,n)=>{var t;let{environmentVariables:i}=n;return le(ae(e,(t=i?.HOME)!==null&&t!==void 0?t:"~"),i)};x.shellExpand=ce});var $=I(b=>{"use strict";var ue=b&&b.__awaiter||function(e,n,t,i){function o(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function c(s){try{l(i.next(s))}catch(d){a(d)}}function u(s){try{l(i.throw(s))}catch(d){a(d)}}function l(s){s.done?r(s.value):o(s.value).then(c,u)}l((i=i.apply(e,n||[])).next())})};Object.defineProperty(b,"__esModule",{value:!0});b.filepaths=b.folders=b.getCurrentInsertedDirectory=void 0;b.sortFilesAlphabetically=R;var G=N();function R(e,n=[]){let t=n.map(o=>o.toLowerCase()),i=e.filter(o=>!t.includes(o.toLowerCase()));return[...i.filter(o=>!o.startsWith(".")).sort((o,r)=>o.localeCompare(r)),...i.filter(o=>o.startsWith(".")).sort((o,r)=>o.localeCompare(r)),"../"]}var de=(e,n,t)=>{if(e===null)return"/";let i=(0,G.shellExpand)(n,t),o=i.slice(0,i.lastIndexOf("/")+1);return o===""?(0,G.ensureTrailingSlash)(e):o.startsWith("/")?o:`${(0,G.ensureTrailingSlash)(e)}${o}`};b.getCurrentInsertedDirectory=de;function V(e={}){let{extensions:n=[],equals:t=[],matches:i,filterFolders:o=!1,editFileSuggestions:r,editFolderSuggestions:a,rootDirectory:c,showFolders:u="always"}=e,l=new Set(n),s=new Set(t),d=()=>n.length>0||t.length>0||i,h=(p=[])=>d()?p.filter(({name:g="",type:w})=>{if(!o&&w==="folder"||s.has(g)||i&&g.match(i))return!0;let[,...f]=g.split(".");if(f.length>=1){let v=f.length-1,S=f[v];do{if(l.has(S))return!0;v-=1,S=[f[v],S].join(".")}while(v>=0)}return!1}):p,O=(p=[])=>!r&&!a?p:p.map(g=>Object.assign(Object.assign({},g),(g.type==="file"?r:a)||{}));return{trigger:(p,g)=>{let w=p.lastIndexOf("/"),f=g.lastIndexOf("/");return w!==f?!0:w===-1&&f===-1?!1:p.slice(0,w)!==g.slice(0,f)},getQueryTerm:p=>p.slice(p.lastIndexOf("/")+1),custom:(p,g,w)=>ue(this,void 0,void 0,function*(){var f;let{isDangerous:v,currentWorkingDirectory:S,searchTerm:m}=w,_=(f=(0,b.getCurrentInsertedDirectory)(c??S,m,w))!==null&&f!==void 0?f:"/";try{let E=yield g({command:"ls",args:["-1ApL"],cwd:_}),k=R(E.stdout.split(`
|
|
2
|
+
`),[".DS_Store"]),z=[];for(let j of k)if(j){let C=j.endsWith("/")?"folders":"filepaths";(C==="filepaths"&&u!=="only"||C==="folders"&&u!=="never")&&z.push({type:C==="filepaths"?"file":"folder",name:j,insertValue:j,isDangerous:v,context:{templateType:C}})}return O(h(z))}catch{return[]}})}}b.folders=Object.assign(()=>V({showFolders:"only"}),Object.freeze(V({showFolders:"only"})));b.filepaths=Object.assign(V,Object.freeze(V()))});var Q=I(D=>{"use strict";var F=D&&D.__awaiter||function(e,n,t,i){function o(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function c(s){try{l(i.next(s))}catch(d){a(d)}}function u(s){try{l(i.throw(s))}catch(d){a(d)}}function l(s){s.done?r(s.value):o(s.value).then(c,u)}l((i=i.apply(e,n||[])).next())})};Object.defineProperty(D,"__esModule",{value:!0});D.valueList=fe;D.keyValue=pe;D.keyValueList=me;var K=new Map;function L(e,n){return e.length===0?n:n.map(t=>t.insertValue?t:Object.assign(Object.assign({},t),{insertValue:t.name+e}))}function H(e,n,t){return F(this,void 0,void 0,function*(){if(typeof e=="function"){let i=yield e(...t);return L(n,i)}if(typeof e[0]=="string"){let i=e.map(o=>({name:o}));return L(n,i)}return L(n,e)})}function q(e,n,t,i){return F(this,void 0,void 0,function*(){if(t||Array.isArray(e)){let o=K.get(e);return o===void 0&&(o=yield H(e,n,i),K.set(e,o)),o}return H(e,n,i)})}function J(e,n){return typeof n=="string"?e&&n==="keys"||!e&&n==="values":n}function A(e,...n){return Math.max(...n.map(t=>e.lastIndexOf(t)))}function M(e,n){let t=new Set(e);return n.filter(i=>{var o;return typeof i.name=="string"?!t.has(i.name):!(!((o=i.name)===null||o===void 0)&&o.some(r=>t.has(r)))})}function fe({delimiter:e=",",values:n=[],cache:t=!1,insertDelimiter:i=!1,allowRepeatedValues:o=!1}){return{trigger:(r,a)=>r.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:r=>r.slice(r.lastIndexOf(e)+e.length),custom:(...r)=>F(this,void 0,void 0,function*(){var a;let c=yield q(n,i?e:"",t,r);if(o)return c;let[u]=r,l=(a=u[u.length-1])===null||a===void 0?void 0:a.split(e);return M(l,c)})}}function pe({separator:e="=",keys:n=[],values:t=[],cache:i=!1,insertSeparator:o=!0}){return{trigger:(r,a)=>r.indexOf(e)!==a.indexOf(e),getQueryTerm:r=>r.slice(r.indexOf(e)+1),custom:(...r)=>F(this,void 0,void 0,function*(){let[a]=r,u=!a[a.length-1].includes(e),l=u?n:t,s=J(u,i);return q(l,u&&o?e:"",s,r)})}}function me({separator:e="=",delimiter:n=",",keys:t=[],values:i=[],cache:o=!1,insertSeparator:r=!0,insertDelimiter:a=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:u=!0}){return{trigger:(l,s)=>{let d=A(l,e,n),h=A(s,e,n);return d!==h},getQueryTerm:l=>{let s=A(l,e,n);return l.slice(s+1)},custom:(...l)=>F(this,void 0,void 0,function*(){let[s]=l,d=s[s.length-1],h=A(d,e,n),O=h===-1||d.slice(h,h+e.length)!==e,p=O?t:i,g=J(O,o),f=yield q(p,O?r?e:"":a?n:"",g,l);if(O){if(c)return f;let S=d.split(n).map(m=>m.slice(0,m.indexOf(e)));return M(S,f)}if(u)return f;let v=d.split(n).map(S=>S.slice(S.indexOf(e)+e.length));return M(v,f)})}}});var U=I(P=>{"use strict";var ge=P&&P.__awaiter||function(e,n,t,i){function o(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function c(s){try{l(i.next(s))}catch(d){a(d)}}function u(s){try{l(i.throw(s))}catch(d){a(d)}}function l(s){s.done?r(s.value):o(s.value).then(c,u)}l((i=i.apply(e,n||[])).next())})};Object.defineProperty(P,"__esModule",{value:!0});P.ai=we;var he=4097,ye=4,ve=.8,be=he*ye*ve;function we({name:e,prompt:n,message:t,postProcess:i,temperature:o,splitOn:r}){return{scriptTimeout:15e3,custom:(a,c,u)=>ge(this,void 0,void 0,function*(){var l,s;let d=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(d.stdout))return[];let h=typeof n=="function"?yield n({tokens:a,executeCommand:c,generatorContext:u}):n,O=typeof t=="function"?yield t({tokens:a,executeCommand:c,generatorContext:u}):t;if(O===null||O.length===0)return console.warn("No message provided to AI generator"),[];let p=be-((l=h?.length)!==null&&l!==void 0?l:0),g={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...h?[{role:"system",content:h}]:[],{role:"user",content:O.slice(0,p)}],temperature:o},w=JSON.stringify(g),f=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",w]}),v=JSON.parse(f.stdout);return(s=v?.choices.map(m=>{var _;return(_=m?.message)===null||_===void 0?void 0:_.content}).filter(m=>typeof m=="string").flatMap(m=>r?m.split(r).filter(_=>_.trim().length>0):[m]).map(m=>{if(i)return i(m);let _=m.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:_,insertValue:`'${_}'`,description:"Generated by Fig AI"}}))!==null&&s!==void 0?s:[]})}}});var X=I(y=>{"use strict";var Se=y&&y.__createBinding||(Object.create?function(e,n,t,i){i===void 0&&(i=t);var o=Object.getOwnPropertyDescriptor(n,t);(!o||("get"in o?!n.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,i,o)}:function(e,n,t,i){i===void 0&&(i=t),e[i]=n[t]}),Oe=y&&y.__exportStar||function(e,n){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(n,t)&&Se(n,e,t)};Object.defineProperty(y,"__esModule",{value:!0});y.ai=y.folders=y.filepaths=void 0;var B=$();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return B.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return B.folders}});Oe(Q(),y);var _e=U();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return _e.ai}})});var Z=re(X(),1),T={plugins:{script:["dtm","list","plugins"],postProcess:e=>e.startsWith("fatal:")?[]:e.split(`
|
|
3
|
+
`).map(n=>({name:n.trim(),description:"Plugin"}))},yamlFiles:(0,Z.filepaths)({extensions:["yaml","yml"]})},De={name:"dtm",description:"DevStream is an open-source DevOps toolchain manager",subcommands:[{name:"apply",description:"Create or update DevOps tools according to DevStream configuration file",options:[{name:["--config-file","-f"],description:"Config file",args:{name:"config-file",default:"config.yaml",template:["filepaths"],generators:T.yamlFiles}},{name:["--plugin-dir","-d"],description:"Plugins directory",args:{name:"plugin-dir",template:["folders"]}},{name:["--yes","-y"],description:"Apply directly without confirmation"}]},{name:"completion",description:"Generate the autocompletion script for dtm for the specified shell",subcommands:[{name:"bash",description:"Generate autocompletion script for bash"},{name:"fish",description:"Generate autocompletion script for fish"},{name:"powershell",description:"Generate autocompletion script for powershell"},{name:"zsh",description:"Generate autocompletion script for zsh"}]},{name:"delete",description:"Delete DevOps tools according to DevStream configuration file",options:[{name:["--config-file","-f"],description:"Config file",args:{name:"config-file",default:"config.yaml",template:["filepaths"],generators:T.yamlFiles}},{name:"--force",description:"Force delete by config"},{name:["--plugin-dir","-d"],description:"Plugins directory",args:{name:"plugin-dir",template:["folders"]}},{name:["--yes","-y"],description:"Delete directly without confirmation"}]},{name:"destroy",description:"Destroy DevOps tools deployment according to DevStream configuration file & state file",options:[{name:["--config-file","-f"],description:"Config file",args:{name:"config-file",default:"config.yaml",template:["filepaths"],generators:T.yamlFiles}},{name:"--force",description:"Force destroy by config"},{name:["--plugin-dir","-d"],description:"Plugins directory",args:{name:"plugin-dir"}},{name:["--yes","-y"],description:"Destroy directly without confirmation"}]},{name:"develop",description:"Develop is used for develop a new plugin",subcommands:[{name:"create-plugin",description:"Create a new plugin",options:[{name:["--name","-n"],description:"Specify name of the plugin to be created",isPersistent:!0,args:{name:"name"}}]},{name:"validate-plugin",description:"Validate a plugin",options:[{name:["--all","-a"],description:"Validate all plugins",isPersistent:!0},{name:["--name","-n"],description:"Specify name of the plugin to be validated",isPersistent:!0,args:{name:"name"}}]}]},{name:"init",description:"Download needed plugins according to the config file",options:[{name:["--all","-a"],description:"Download all plugins"},{name:"--arch",description:"Download plugins for specific arch",args:{name:"arch",default:"amd64"}},{name:["--config-file","-f"],description:"Config file",args:{name:"config-file",default:"config.yaml",template:["filepaths"],generators:T.yamlFiles}},{name:"--download-only",description:"Download plugins only"},{name:"--os",description:"Download plugins for specific os",args:{name:"os",default:"linux"}},{name:["--plugin-dir","-d"],description:"Plugins directory",args:{name:"plugin-dir",template:["folders"]}},{name:["--plugins","-p"],description:"The plugins to be downloaded",args:{name:"plugins"}}]},{name:"list",description:"This command only supports listing plugins now",subcommands:[{name:"plugins",description:"List all plugins",options:[{name:["--filter","-r"],description:"Filter plugin by regex",isPersistent:!0,args:{name:"filter"}}]}]},{name:"show",description:"Show is used to print plugins' configuration templates or status",subcommands:[{name:"config",description:"Show configuration information",options:[{name:["--plugin","-p"],description:"Specify name with the plugin",args:{name:"plugin",generators:T.plugins}},{name:["--template","-t"],description:"Print a template config, e.g. quickstart/gitops/",args:{name:"template"}}]},{name:"status",description:"Show status information",options:[{name:["--all","-a"],description:"Show all instances of all plugins status"},{name:["--config-file","-f"],description:"Config file",args:{name:"config-file",default:"config.yaml"}},{name:["--id","-i"],description:"Specify id with the plugin instance",args:{name:"id"}},{name:["--plugin","-p"],description:"Specify name with the plugin",args:{name:"plugin"}},{name:["--plugin-dir","-d"],description:"Plugins directory",args:{name:"plugin-dir"}}]}]},{name:"upgrade",description:"Upgrade dtm to the latest release version",options:[{name:["--yes","-y"],description:"Upgrade directly without confirmation"}]},{name:"verify",description:"Verify DevOps tools according to DevStream config file and state",options:[{name:["--config-file","-f"],description:"Config file",args:{name:"config-file",default:"config.yaml",template:["filepaths"],generators:T.yamlFiles}},{name:["--plugin-dir","-d"],description:"Plugins directory",args:{name:"plugin-dir",template:["folders"]}}]},{name:"version",description:"Print the version number of DevStream"},{name:"help",description:"Help about any command",subcommands:[{name:"apply",description:"Create or update DevOps tools according to DevStream configuration file"},{name:"completion",description:"Generate the autocompletion script for dtm for the specified shell",subcommands:[{name:"bash",description:"Generate autocompletion script for bash"},{name:"fish",description:"Generate autocompletion script for fish"},{name:"powershell",description:"Generate autocompletion script for powershell"},{name:"zsh",description:"Generate autocompletion script for zsh"}]},{name:"delete",description:"Delete DevOps tools according to DevStream configuration file"},{name:"destroy",description:"Destroy DevOps tools deployment according to DevStream configuration file & state file"},{name:"develop",description:"Develop is used for develop a new plugin",subcommands:[{name:"create-plugin",description:"Create a new plugin"},{name:"validate-plugin",description:"Validate a plugin"}]},{name:"init",description:"Download needed plugins according to the config file"},{name:"list",description:"This command only supports listing plugins now",subcommands:[{name:"plugins",description:"List all plugins"}]},{name:"show",description:"Show is used to print plugins' configuration templates or status",subcommands:[{name:"config",description:"Show configuration information"},{name:"status",description:"Show status information"}]},{name:"upgrade",description:"Upgrade dtm to the latest release version"},{name:"verify",description:"Verify DevOps tools according to DevStream config file and state"},{name:"version",description:"Print the version number of DevStream"}]}],options:[{name:"--debug",description:"Debug level log",isPersistent:!0},{name:["--help","-h"],description:"Display help",isPersistent:!0}]},Ce=De;export{Ce as default};
|