@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.
Files changed (106) hide show
  1. package/build/@magnolia/cli.js +2 -2
  2. package/build/@withfig/autocomplete-tools.js +2 -2
  3. package/build/airflow.js +2 -2
  4. package/build/ansible-playbook.js +2 -2
  5. package/build/apt.js +4 -4
  6. package/build/asr.js +2 -2
  7. package/build/bun.js +9 -9
  8. package/build/cargo.js +4 -4
  9. package/build/cd.js +2 -2
  10. package/build/chezmoi.js +2 -2
  11. package/build/cloudflared.js +2 -2
  12. package/build/coda.js +3 -3
  13. package/build/codesign.js +2 -2
  14. package/build/dapr.js +2 -2
  15. package/build/deno/generators.js +4 -4
  16. package/build/deno.js +2 -2
  17. package/build/deployctl.js +2 -2
  18. package/build/direnv.js +2 -2
  19. package/build/docker.js +18 -18
  20. package/build/dotenv-vault.js +2 -2
  21. package/build/dotnet/dotnet-add.js +2 -2
  22. package/build/dotnet/dotnet-build.js +2 -2
  23. package/build/dotnet/dotnet-clean.js +2 -2
  24. package/build/dotnet/dotnet-format.js +2 -2
  25. package/build/dotnet/dotnet-list.js +2 -2
  26. package/build/dotnet/dotnet-migrate.js +2 -2
  27. package/build/dotnet/dotnet-nuget.js +3 -3
  28. package/build/dotnet/dotnet-pack.js +2 -2
  29. package/build/dotnet/dotnet-publish.js +2 -2
  30. package/build/dotnet/dotnet-remove.js +2 -2
  31. package/build/dotnet/dotnet-restore.js +2 -2
  32. package/build/dotnet/dotnet-sln.js +2 -2
  33. package/build/dotnet/dotnet-store.js +2 -2
  34. package/build/dotnet/dotnet-test.js +2 -2
  35. package/build/dotnet/dotnet-tool.js +3 -3
  36. package/build/dotnet.js +2 -2
  37. package/build/dtm.js +3 -3
  38. package/build/dynamic/index.js +1 -1
  39. package/build/elixir.js +2 -2
  40. package/build/elm-json.js +2 -2
  41. package/build/esbuild.js +3 -3
  42. package/build/file.js +2 -2
  43. package/build/flutter.js +5 -5
  44. package/build/gh.js +4 -4
  45. package/build/git.js +20 -20
  46. package/build/glow.js +2 -2
  47. package/build/hub.js +20 -20
  48. package/build/iex.js +2 -2
  49. package/build/index.js +1 -1
  50. package/build/index.json +1 -1
  51. package/build/java.js +2 -2
  52. package/build/julia.js +2 -2
  53. package/build/limactl.js +3 -3
  54. package/build/man.js +3 -3
  55. package/build/meteor.js +3 -3
  56. package/build/mgnl.js +2 -2
  57. package/build/mix.js +2 -2
  58. package/build/mongoimport.js +2 -2
  59. package/build/n.js +3 -3
  60. package/build/ni.js +2 -2
  61. package/build/node.js +2 -2
  62. package/build/npm.js +2 -2
  63. package/build/nr.js +3 -3
  64. package/build/nrm.js +2 -2
  65. package/build/opencode.js +2 -2
  66. package/build/osascript.js +2 -2
  67. package/build/osqueryi.js +2 -2
  68. package/build/pandoc.js +3 -3
  69. package/build/pdfunite.js +2 -2
  70. package/build/pi.js +2 -2
  71. package/build/pipenv.js +2 -2
  72. package/build/pm2.js +2 -2
  73. package/build/pnpm.js +23 -24
  74. package/build/pod.js +2 -2
  75. package/build/pre-commit.js +126 -126
  76. package/build/python.js +2 -2
  77. package/build/python3.js +2 -2
  78. package/build/r.js +3 -3
  79. package/build/rails.js +3 -3
  80. package/build/rancher.js +3 -3
  81. package/build/react-native.js +5 -5
  82. package/build/robot.js +2 -2
  83. package/build/rojo.js +2 -2
  84. package/build/rollup.js +2 -2
  85. package/build/rscript.js +2 -2
  86. package/build/rush.js +5 -5
  87. package/build/rushx.js +4 -4
  88. package/build/scc.js +2 -2
  89. package/build/shortcuts.js +2 -2
  90. package/build/sidekiq.js +2 -2
  91. package/build/sqlite3.js +2 -2
  92. package/build/streamlit.js +2 -2
  93. package/build/subl.js +2 -2
  94. package/build/swift.js +2 -2
  95. package/build/systemctl.js +2 -2
  96. package/build/ts-node.js +3 -3
  97. package/build/tsc.js +2 -2
  98. package/build/tsx.js +2 -2
  99. package/build/turbo.js +20 -20
  100. package/build/typst.js +2 -2
  101. package/build/vsce.js +20 -20
  102. package/build/wasm-bindgen.js +2 -2
  103. package/build/yarn.js +4 -4
  104. package/build/yomo.js +2 -2
  105. package/package.json +20 -20
  106. package/build/ai-agents specs.js +0 -1
package/build/rscript.js CHANGED
@@ -1,2 +1,2 @@
1
- var Z=Object.create;var N=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 r of ee(t))!ne.call(e,r)&&r!==n&&N(e,r,{get:()=>t[r],enumerable:!(i=Y(t,r))||i.enumerable});return e};var re=(e,t,n)=>(n=e!=null?Z(te(e)):{},ie(t||!e||!e.__esModule?N(n,"default",{value:e,enumerable:!0}):n,e));var k=T(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,ae=(e,t)=>e.replace(/\$([A-Za-z0-9_]+)/g,r=>{var s;let a=r.slice(1);return(s=t[a])!==null&&s!==void 0?s:r}).replace(/\$\{([A-Za-z0-9_]+)(?::-([^}]+))?\}/g,(r,s,a)=>{var c,u;return(u=(c=t[s])!==null&&c!==void 0?c:a)!==null&&u!==void 0?u:r}),le=(e,t)=>{var n;let{environmentVariables:i}=t;return ae(oe(e,(n=i?.HOME)!==null&&n!==void 0?n:"~"),i)};j.shellExpand=le});var $=T(y=>{"use strict";var ce=y&&y.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(o){try{l(i.next(o))}catch(f){a(f)}}function u(o){try{l(i.throw(o))}catch(f){a(f)}}function l(o){o.done?s(o.value):r(o.value).then(c,u)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(y,"__esModule",{value:!0});y.filepaths=y.folders=y.getCurrentInsertedDirectory=y.sortFilesAlphabetically=void 0;var L=k();function W(e,t=[]){let n=t.map(r=>r.toLowerCase()),i=e.filter(r=>!n.includes(r.toLowerCase()));return[...i.filter(r=>!r.startsWith(".")).sort((r,s)=>r.localeCompare(s)),...i.filter(r=>r.startsWith(".")).sort((r,s)=>r.localeCompare(s)),"../"]}y.sortFilesAlphabetically=W;var ue=(e,t,n)=>{if(e===null)return"/";let i=(0,L.shellExpand)(t,n),r=i.slice(0,i.lastIndexOf("/")+1);return r===""?(0,L.ensureTrailingSlash)(e):r.startsWith("/")?r:`${(0,L.ensureTrailingSlash)(e)}${r}`};y.getCurrentInsertedDirectory=ue;function D(e={}){let{extensions:t=[],equals:n=[],matches:i,filterFolders:r=!1,editFileSuggestions:s,editFolderSuggestions:a,rootDirectory:c,showFolders:u="always"}=e,l=new Set(t),o=new Set(n),f=()=>t.length>0||n.length>0||i,g=(p=[])=>f()?p.filter(({name:v="",type:b})=>{if(!r&&b==="folder"||o.has(v)||i&&v.match(i))return!0;let[,...d]=v.split(".");if(d.length>=1){let _=d.length-1,O=d[_];do{if(l.has(O))return!0;_-=1,O=[d[_],O].join(".")}while(_>=0)}return!1}):p,S=(p=[])=>!s&&!a?p:p.map(v=>Object.assign(Object.assign({},v),(v.type==="file"?s:a)||{}));return{trigger:(p,v)=>{let b=p.lastIndexOf("/"),d=v.lastIndexOf("/");return b!==d?!0:b===-1&&d===-1?!1:p.slice(0,b)!==v.slice(0,d)},getQueryTerm:p=>p.slice(p.lastIndexOf("/")+1),custom:(p,v,b)=>ce(this,void 0,void 0,function*(){var d;let{isDangerous:_,currentWorkingDirectory:O,searchTerm:h}=b,w=(d=(0,y.getCurrentInsertedDirectory)(c??O,h,b))!==null&&d!==void 0?d:"/";try{let E=yield v({command:"ls",args:["-1ApL"],cwd:w}),X=W(E.stdout.split(`
2
- `),[".DS_Store"]),P=[];for(let V of X)if(V){let F=V.endsWith("/")?"folders":"filepaths";(F==="filepaths"&&u!=="only"||F==="folders"&&u!=="never")&&P.push({type:F==="filepaths"?"file":"folder",name:V,insertValue:V,isDangerous:_,context:{templateType:F}})}return S(g(P))}catch{return[]}})}}y.folders=Object.assign(()=>D({showFolders:"only"}),Object.freeze(D({showFolders:"only"})));y.filepaths=Object.assign(D,Object.freeze(D()))});var Q=T(x=>{"use strict";var A=x&&x.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(o){try{l(i.next(o))}catch(f){a(f)}}function u(o){try{l(i.throw(o))}catch(f){a(f)}}function l(o){o.done?s(o.value):r(o.value).then(c,u)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(x,"__esModule",{value:!0});x.keyValueList=x.keyValue=x.valueList=void 0;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 z(e,t,n){return A(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(r=>({name:r}));return C(t,i)}return C(t,e)})}function q(e,t,n,i){return A(this,void 0,void 0,function*(){if(n||Array.isArray(e)){let r=K.get(e);return r===void 0&&(r=yield z(e,t,i),K.set(e,r)),r}return z(e,t,i)})}function J(e,t){return typeof t=="string"?e&&t==="keys"||!e&&t==="values":t}function R(e,...t){return Math.max(...t.map(n=>e.lastIndexOf(n)))}function M(e,t){let n=new Set(e);return t.filter(i=>{var r;return typeof i.name=="string"?!n.has(i.name):!(!((r=i.name)===null||r===void 0)&&r.some(s=>n.has(s)))})}function fe({delimiter:e=",",values:t=[],cache:n=!1,insertDelimiter:i=!1,allowRepeatedValues:r=!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 q(t,i?e:"",n,s);if(r)return c;let[u]=s,l=(a=u[u.length-1])===null||a===void 0?void 0:a.split(e);return M(l,c)})}}x.valueList=fe;function de({separator:e="=",keys:t=[],values:n=[],cache:i=!1,insertSeparator:r=!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,o=J(u,i);return q(l,u&&r?e:"",o,s)})}}x.keyValue=de;function pe({separator:e="=",delimiter:t=",",keys:n=[],values:i=[],cache:r=!1,insertSeparator:s=!0,insertDelimiter:a=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:u=!0}){return{trigger:(l,o)=>{let f=R(l,e,t),g=R(o,e,t);return f!==g},getQueryTerm:l=>{let o=R(l,e,t);return l.slice(o+1)},custom:(...l)=>A(this,void 0,void 0,function*(){let[o]=l,f=o[o.length-1],g=R(f,e,t),S=g===-1||f.slice(g,g+e.length)!==e,p=S?n:i,v=J(S,r),d=yield q(p,S?s?e:"":a?t:"",v,l);if(S){if(c)return d;let O=f.split(t).map(h=>h.slice(0,h.indexOf(e)));return M(O,d)}if(u)return d;let _=f.split(t).map(O=>O.slice(O.indexOf(e)+e.length));return M(_,d)})}}x.keyValueList=pe});var H=T(I=>{"use strict";var he=I&&I.__awaiter||function(e,t,n,i){function r(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(o){try{l(i.next(o))}catch(f){a(f)}}function u(o){try{l(i.throw(o))}catch(f){a(f)}}function l(o){o.done?s(o.value):r(o.value).then(c,u)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(I,"__esModule",{value:!0});I.ai=void 0;var ve=4097,ge=4,ye=.8,me=ve*ge*ye;function _e({name:e,prompt:t,message:n,postProcess:i,temperature:r,splitOn:s}){return{scriptTimeout:15e3,custom:(a,c,u)=>he(this,void 0,void 0,function*(){var l,o;let f=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(f.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:c,generatorContext:u}):t,S=typeof n=="function"?yield n({tokens:a,executeCommand:c,generatorContext:u}):n;if(S===null||S.length===0)return console.warn("No message provided to AI generator"),[];let p=me-((l=g?.length)!==null&&l!==void 0?l:0),v={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:S.slice(0,p)}],temperature:r},b=JSON.stringify(v),d=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",b]}),_=JSON.parse(d.stdout);return(o=_?.choices.map(h=>{var w;return(w=h?.message)===null||w===void 0?void 0:w.content}).filter(h=>typeof h=="string").flatMap(h=>s?h.split(s).filter(w=>w.trim().length>0):[h]).map(h=>{if(i)return i(h);let w=h.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:w,insertValue:`'${w}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}I.ai=_e});var G=T(m=>{"use strict";var be=m&&m.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=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,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Oe=m&&m.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&be(t,e,n)};Object.defineProperty(m,"__esModule",{value:!0});m.ai=m.folders=m.filepaths=void 0;var B=$();Object.defineProperty(m,"filepaths",{enumerable:!0,get:function(){return B.filepaths}});Object.defineProperty(m,"folders",{enumerable:!0,get:function(){return B.folders}});Oe(Q(),m);var Se=H();Object.defineProperty(m,"ai",{enumerable:!0,get:function(){return Se.ai}})});var U=re(G(),1),we={name:"Rscript",description:"Scripting Front-End for R",icon:"https://www.r-project.org/favicon-32x32.png",options:[{name:"-e",description:"R expression to run",isRepeatable:!0,args:{name:"expression",description:"R expression"}},{name:"--help",description:"Print usage and exit",icon:"\u2754"},{name:"--version",description:"Print version and exit"},{name:"--verbose",description:"Print information on progress",icon:"\u{1F4E3}"},{name:"--no-echo",description:"Run as quietly as possible",icon:"\u{1F64A}"},{name:"--no-restore",description:"Don't restore anything"},{name:"--save",description:"Do save workspace at the end of the session",icon:"\u{1F4BE}"},{name:"--no-environ",description:"Don't read the site and user environment files"},{name:"--no-site-file",description:"Don't read the site-wide Rprofile"},{name:"--no-init-file",description:"Don't read the user R profile"},{name:"--restore",description:"Do restore previously saved objects at startup"},{name:"--vanilla",description:"Combine --no-save, --no-restore, --no-site-file --no-init-file and --no-environ"},{name:"--default-packages",description:"Comma separated list of default packages",requiresSeparator:!0,icon:"\u{1F4E6}",args:{name:"packages",description:"A comma-separated set of package names, or 'NULL'"}}],args:[{name:"file",description:"R script to run",isScript:!0,generators:(0,U.filepaths)({extensions:["R"],editFileSuggestions:{priority:76}})},{name:"args",description:"Arguments to pass to the script",isVariadic:!0}]},Fe=we;export{Fe as default};
1
+ var Z=Object.create;var N=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&&N(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?N(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 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,ae=(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}),le=(e,t)=>{var n;let{environmentVariables:r}=t;return ae(oe(e,(n=r?.HOME)!==null&&n!==void 0?n:"~"),r)};j.shellExpand=le});var k=I(_=>{"use strict";var ce=_&&_.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(o){try{l(r.next(o))}catch(f){a(f)}}function u(o){try{l(r.throw(o))}catch(f){a(f)}}function l(o){o.done?s(o.value):i(o.value).then(c,u)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0});_.filepaths=_.folders=_.getCurrentInsertedDirectory=void 0;_.sortFilesAlphabetically=$;var C=W();function $(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 ue=(e,t,n)=>{if(e===null)return"/";let r=(0,C.shellExpand)(t,n),i=r.slice(0,r.lastIndexOf("/")+1);return i===""?(0,C.ensureTrailingSlash)(e):i.startsWith("/")?i:`${(0,C.ensureTrailingSlash)(e)}${i}`};_.getCurrentInsertedDirectory=ue;function R(e={}){let{extensions:t=[],equals:n=[],matches:r,filterFolders:i=!1,editFileSuggestions:s,editFolderSuggestions:a,rootDirectory:c,showFolders:u="always"}=e,l=new Set(t),o=new Set(n),f=()=>t.length>0||n.length>0||r,g=(p=[])=>f()?p.filter(({name:v="",type:O})=>{if(!i&&O==="folder"||o.has(v)||r&&v.match(r))return!0;let[,...d]=v.split(".");if(d.length>=1){let m=d.length-1,b=d[m];do{if(l.has(b))return!0;m-=1,b=[d[m],b].join(".")}while(m>=0)}return!1}):p,S=(p=[])=>!s&&!a?p:p.map(v=>Object.assign(Object.assign({},v),(v.type==="file"?s:a)||{}));return{trigger:(p,v)=>{let O=p.lastIndexOf("/"),d=v.lastIndexOf("/");return O!==d?!0:O===-1&&d===-1?!1:p.slice(0,O)!==v.slice(0,d)},getQueryTerm:p=>p.slice(p.lastIndexOf("/")+1),custom:(p,v,O)=>ce(this,void 0,void 0,function*(){var d;let{isDangerous:m,currentWorkingDirectory:b,searchTerm:h}=O,w=(d=(0,_.getCurrentInsertedDirectory)(c??b,h,O))!==null&&d!==void 0?d:"/";try{let E=yield v({command:"ls",args:["-1ApL"],cwd:w}),X=$(E.stdout.split(`
2
+ `),[".DS_Store"]),P=[];for(let D of X)if(D){let F=D.endsWith("/")?"folders":"filepaths";(F==="filepaths"&&u!=="only"||F==="folders"&&u!=="never")&&P.push({type:F==="filepaths"?"file":"folder",name:D,insertValue:D,isDangerous:m,context:{templateType:F}})}return S(g(P))}catch{return[]}})}}_.folders=Object.assign(()=>R({showFolders:"only"}),Object.freeze(R({showFolders:"only"})));_.filepaths=Object.assign(R,Object.freeze(R()))});var Q=I(x=>{"use strict";var T=x&&x.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(o){try{l(r.next(o))}catch(f){a(f)}}function u(o){try{l(r.throw(o))}catch(f){a(f)}}function l(o){o.done?s(o.value):i(o.value).then(c,u)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(x,"__esModule",{value:!0});x.valueList=fe;x.keyValue=de;x.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 q(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 J(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 M(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,a)=>s.lastIndexOf(e)!==a.lastIndexOf(e),getQueryTerm:s=>s.slice(s.lastIndexOf(e)+e.length),custom:(...s)=>T(this,void 0,void 0,function*(){var a;let c=yield q(t,r?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 M(l,c)})}}function de({separator:e="=",keys:t=[],values:n=[],cache:r=!1,insertSeparator:i=!0}){return{trigger:(s,a)=>s.indexOf(e)!==a.indexOf(e),getQueryTerm:s=>s.slice(s.indexOf(e)+1),custom:(...s)=>T(this,void 0,void 0,function*(){let[a]=s,u=!a[a.length-1].includes(e),l=u?t:n,o=J(u,r);return q(l,u&&i?e:"",o,s)})}}function pe({separator:e="=",delimiter:t=",",keys:n=[],values:r=[],cache:i=!1,insertSeparator:s=!0,insertDelimiter:a=!1,allowRepeatedKeys:c=!1,allowRepeatedValues:u=!0}){return{trigger:(l,o)=>{let f=V(l,e,t),g=V(o,e,t);return f!==g},getQueryTerm:l=>{let o=V(l,e,t);return l.slice(o+1)},custom:(...l)=>T(this,void 0,void 0,function*(){let[o]=l,f=o[o.length-1],g=V(f,e,t),S=g===-1||f.slice(g,g+e.length)!==e,p=S?n:r,v=J(S,i),d=yield q(p,S?s?e:"":a?t:"",v,l);if(S){if(c)return d;let b=f.split(t).map(h=>h.slice(0,h.indexOf(e)));return M(b,d)}if(u)return d;let m=f.split(t).map(b=>b.slice(b.indexOf(e)+e.length));return M(m,d)})}}});var H=I(A=>{"use strict";var he=A&&A.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(o){try{l(r.next(o))}catch(f){a(f)}}function u(o){try{l(r.throw(o))}catch(f){a(f)}}function l(o){o.done?s(o.value):i(o.value).then(c,u)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(A,"__esModule",{value:!0});A.ai=_e;var ve=4097,ge=4,ye=.8,me=ve*ge*ye;function _e({name:e,prompt:t,message:n,postProcess:r,temperature:i,splitOn:s}){return{scriptTimeout:15e3,custom:(a,c,u)=>he(this,void 0,void 0,function*(){var l,o;let f=yield c({command:"fig",args:["settings","--format","json","autocomplete.ai.enabled"]});if(!JSON.parse(f.stdout))return[];let g=typeof t=="function"?yield t({tokens:a,executeCommand:c,generatorContext:u}):t,S=typeof n=="function"?yield n({tokens:a,executeCommand:c,generatorContext:u}):n;if(S===null||S.length===0)return console.warn("No message provided to AI generator"),[];let p=me-((l=g?.length)!==null&&l!==void 0?l:0),v={model:"gpt-3.5-turbo",source:"autocomplete",name:e,messages:[...g?[{role:"system",content:g}]:[],{role:"user",content:S.slice(0,p)}],temperature:i},O=JSON.stringify(v),d=yield c({command:"fig",args:["_","request","--route","/ai/chat","--method","POST","--body",O]}),m=JSON.parse(d.stdout);return(o=m?.choices.map(h=>{var w;return(w=h?.message)===null||w===void 0?void 0:w.content}).filter(h=>typeof h=="string").flatMap(h=>s?h.split(s).filter(w=>w.trim().length>0):[h]).map(h=>{if(r)return r(h);let w=h.trim().replace(/\n/g," ");return{icon:"\u{1FA84}",name:w,insertValue:`'${w}'`,description:"Generated by Fig AI"}}))!==null&&o!==void 0?o:[]})}}});var G=I(y=>{"use strict";var Oe=y&&y.__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=y&&y.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Oe(t,e,n)};Object.defineProperty(y,"__esModule",{value:!0});y.ai=y.folders=y.filepaths=void 0;var B=k();Object.defineProperty(y,"filepaths",{enumerable:!0,get:function(){return B.filepaths}});Object.defineProperty(y,"folders",{enumerable:!0,get:function(){return B.folders}});be(Q(),y);var Se=H();Object.defineProperty(y,"ai",{enumerable:!0,get:function(){return Se.ai}})});var U=ie(G(),1),we={name:"Rscript",description:"Scripting Front-End for R",icon:"https://www.r-project.org/favicon-32x32.png",options:[{name:"-e",description:"R expression to run",isRepeatable:!0,args:{name:"expression",description:"R expression"}},{name:"--help",description:"Print usage and exit",icon:"\u2754"},{name:"--version",description:"Print version and exit"},{name:"--verbose",description:"Print information on progress",icon:"\u{1F4E3}"},{name:"--no-echo",description:"Run as quietly as possible",icon:"\u{1F64A}"},{name:"--no-restore",description:"Don't restore anything"},{name:"--save",description:"Do save workspace at the end of the session",icon:"\u{1F4BE}"},{name:"--no-environ",description:"Don't read the site and user environment files"},{name:"--no-site-file",description:"Don't read the site-wide Rprofile"},{name:"--no-init-file",description:"Don't read the user R profile"},{name:"--restore",description:"Do restore previously saved objects at startup"},{name:"--vanilla",description:"Combine --no-save, --no-restore, --no-site-file --no-init-file and --no-environ"},{name:"--default-packages",description:"Comma separated list of default packages",requiresSeparator:!0,icon:"\u{1F4E6}",args:{name:"packages",description:"A comma-separated set of package names, or 'NULL'"}}],args:[{name:"file",description:"R script to run",isScript:!0,generators:(0,U.filepaths)({extensions:["R"],editFileSuggestions:{priority:76}})},{name:"args",description:"Arguments to pass to the script",isVariadic:!0}]},Fe=we;export{Fe as default};
package/build/rush.js CHANGED
@@ -1,5 +1,5 @@
1
- var R=Symbol("singleComment"),A=Symbol("multiComment"),U=()=>"",L=(e,s,o)=>e.slice(s,o).replace(/[^ \t\r\n]/g," "),V=(e,s)=>{let o=s-1,p=0;for(;e[o]==="\\";)o-=1,p+=1;return!!(p%2)};function P(e,{whitespace:s=!0,trailingCommas:o=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let p=s?L:U,r=!1,n=!1,a=0,c="",h="",y=-1;for(let t=0;t<e.length;t++){let u=e[t],g=e[t+1];if(!n&&u==='"'&&(V(e,t)||(r=!r)),!r)if(!n&&u+g==="//")c+=e.slice(a,t),a=t,n=R,t++;else if(n===R&&u+g===`\r
2
- `){t++,n=!1,c+=p(e,a,t),a=t;continue}else if(n===R&&u===`
3
- `)n=!1,c+=p(e,a,t),a=t;else if(!n&&u+g==="/*"){c+=e.slice(a,t),a=t,n=A,t++;continue}else if(n===A&&u+g==="*/"){t++,n=!1,c+=p(e,a,t+1),a=t+1;continue}else o&&!n&&(y!==-1?u==="}"||u==="]"?(c+=e.slice(a,t),h+=p(c,0,1)+c.slice(1),c="",a=t,y=-1):u!==" "&&u!==" "&&u!=="\r"&&u!==`
4
- `&&(c+=e.slice(a,t),a=t,y=-1):u===","&&(h+=c+e.slice(a,t),c="",a=t,y=t))}let j=n===R?p(e,a):e.slice(a);return h+c+j}function T(e){return{name:e,description:"Uninstall a package",args:{name:"package",generators:F,filterStrategy:"fuzzy",isVariadic:!0},options:G}}var N=e=>(e.match(/@/g)||[]).length,_=e=>async(s,o,p)=>{let r=s[s.length-1];if(r==="")return[];let n=e&&e.length>0?`+keywords:${e.join(",")}`:"",c=["-s","-H","Accept: application/json",n?`https://api.npms.io/v2/search?size=20&q=${r}${n}`:`https://api.npms.io/v2/search/suggestions?q=${r}&size=20`],h=["-s","-H","Accept: application/vnd.npm.install-v1+json",`https://registry.npmjs.org/${r.slice(0,-1)}`],y=t=>o({command:"curl",args:t[t.length-1]==="@"?h:c}),j=r.startsWith("@")?N(r)>1:r.includes("@");try{let t=JSON.parse((await y(r)).stdout);if(j){let g=Object.entries(t["dist-tags"]||{}).map(([S,M])=>({name:S,description:M}));return g.push(...Object.keys(t.versions).map(S=>({name:S})).reverse()),g}return(n?t.results:t).map(g=>({name:g.package.name,description:g.package.description}))}catch(t){return console.error({error:t}),[]}},v={trigger:(e,s)=>s.startsWith("@")?!(N(s)>1&&N(e)>1):!(s.includes("@")&&e.includes("@")),getQueryTerm:"@",cache:{ttl:1e3*60*60*24*2},custom:_()},J={custom:async(e,s)=>{let{stdout:o}=await s({command:"npm",args:["prefix"]}),{stdout:p}=await s({command:"cat",args:[`${o}/package.json`]}),r=[];try{if(p.trim()=="")return r;let a=JSON.parse(p).workspaces;if(a)for(let c of a)r.push({name:c,description:"Workspaces"})}catch(n){console.log(n)}return r}},F={trigger:e=>e==="-g"||e==="--global",custom:async function(e,s){if(!e.includes("-g")&&!e.includes("--global")){let{stdout:o}=await s({command:"npm",args:["prefix"]}),{stdout:p}=await s({command:"cat",args:[`${o}/package.json`]}),r=JSON.parse(p),n=r.dependencies??{},a=r.devDependencies,c=r.optionalDependencies??{};return Object.assign(n,a,c),Object.keys(n).filter(h=>!e.some(j=>j===h)).map(h=>({name:h,icon:"\u{1F4E6}",description:n[h]?"dependency":c[h]?"optionalDependency":"devDependency"}))}else{let{stdout:o}=await s({command:"bash",args:["-c","ls -1 `npm root -g`"]});return o.split(`
5
- `).map(p=>({name:p,icon:"\u{1F4E6}",description:"Global dependency"}))}}},H={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(e,[s]){if(e.trim()=="")return[];try{let o=JSON.parse(e),p=o.scripts,r=o.fig||{};if(p)return Object.entries(p).map(([n,a])=>{let c=s==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",h=r[n];return{name:n,icon:c,description:a,priority:51,...h}})}catch(o){console.error(o)}return[]}},x={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},m={name:"--json",description:"Show output in json format"},I={name:"--omit",description:"Dependency types to omit from the installation tree on disk",args:{name:"Package type",default:"dev",suggestions:["dev","optional","peer"]},isRepeatable:3},b={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},E={name:["-l","--long"],description:"Show extended information"},l=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:J,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],G=[{name:["-S","--save"],description:"Package will be removed from your dependencies"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:"-g",description:"Uninstall global package"},...l],B=[{name:["-a","-all"],description:"Show all outdated or installed packages"},m,E,b,{name:"--depth",description:"The depth to go when recursing packages",args:{name:"depth"}},{name:"--link",description:"Limits output to only those packages that are linked"},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--no-unicode",description:"Uses unicode characters in the tree output"},x,I,...l],i={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},D={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},d={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},f={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},k={name:"--script-shell",description:"The shell to use for scripts run with the npm exec, npm run and npm init <pkg> commands",args:{name:"script-shell"}},w={name:"--dry-run",description:"Indicates that you don't want npm to make any changes and that it should only report what it would have done"},q={name:"npm",parserDirectives:{flagsArePosixNoncompliant:!0},description:"Node package manager",subcommands:[{name:["install","i","add"],description:"Install a package and its dependencies",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[{name:["-P","--save-prod"],description:"Package will appear in your `dependencies`. This is the default unless `-D` or `-O` are present"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:["-E","--save-exact"],description:"Saved dependencies will be configured with an exact version rather than using npm's default semver range operator"},{name:["-B","--save-bundle"],description:"Saved dependencies will also be added to your bundleDependencies list"},x,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder"},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package"},{name:"--legacy-peer-deps",description:"Bypass peerDependency auto-installation. Emulate install behavior of NPM v4 through v6"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},i,D,I,f,{name:"--no-audit",description:"Submit audit reports alongside the current npm command to the default registry and all registries configured for scopes"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},w,...l]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...l,{name:"--if-present",description:"Npm will not exit with an error code when run-script is invoked for a script that isn't defined in the scripts section of package.json"},{name:"--silent",description:""},f,k,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:H}},{name:"init",description:"Trigger the initialization",options:[{name:["-y","--yes"],description:"Automatically answer 'yes' to any prompts that npm might print on the command line"},{name:"-w",description:"Create the folders and boilerplate expected while also adding a reference to your project workspaces property",args:{name:"dir"}}]},{name:"access",description:"Set access controls on private packages"},{name:["adduser","login"],description:"Add a registry user account",options:[i,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:"audit",description:"Run a security audit",subcommands:[{name:"fix",description:"If the fix argument is provided, then remediations will be applied to the package tree",options:[w,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...l]}],options:[...l,{name:"--audit-level",description:"The minimum level of vulnerability for npm audit to exit with a non-zero exit code",args:{name:"audit",suggestions:["info","low","moderate","high","critical","none"]}},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},m,I]},{name:"bin",description:"Print the folder where npm will install executables",options:[x]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm bugs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]},i]},{name:"cache",description:"Manipulates packages cache",subcommands:[{name:"add",description:"Add the specified packages to the local cache"},{name:"clean",description:"Delete all data out of the cache folder"},{name:"verify",description:"Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data"}],options:[{name:"--cache",args:{name:"cache"},description:"The location of npm's cache directory"}]},{name:["ci","clean-install","install-clean"],description:"Install a project with a clean slate",options:[{name:"--audit",description:'When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes',args:{name:"audit",suggestions:["true","false"]},exclusiveOn:["--no-audit"]},{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command",exclusiveOn:["--audit"]},f,k,D,i]},{name:"cit",description:"Install a project with a clean slate and run tests"},{name:"clean-install-test",description:"Install a project with a clean slate and run tests"},{name:"completion",description:"Tab completion for npm"},{name:["config","c"],description:"Manage the npm configuration files",subcommands:[{name:"set",description:"Sets the config key to the value",args:[{name:"key"},{name:"value"}],options:[{name:["-g","--global"],description:"Sets it globally"}]},{name:"get",description:"Echo the config value to stdout",args:{name:"key"}},{name:"list",description:"Show all the config settings",options:[{name:"-g",description:"Lists globally installed packages"},{name:"-l",description:"Also shows defaults"},m]},{name:"delete",description:"Deletes the key from all configuration files",args:{name:"key"}},{name:"edit",description:"Opens the config file in an editor",options:[{name:"--global",description:"Edits the global config"}]}]},{name:"create",description:"Create a package.json file"},{name:["dedupe","ddp"],description:"Reduce duplication in the package tree"},{name:"deprecate",description:"Deprecate a version of a package",options:[i]},{name:"dist-tag",description:"Modify package distribution tags"},{name:["docs","home"],description:"Open documentation for a package in a web browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[...l,i,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm docs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"doctor",description:"Check your npm environment",options:[i]},{name:"edit",description:"Edit an installed package",options:[{name:"--editor",description:"The command to run for npm edit or npm config edit"}]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:F}},{name:"fund",description:"Retrieve funding information"},{name:"get",description:"Echo the config value to stdout"},{name:"help",description:"Get help on npm",args:{name:"term",isVariadic:!0,description:"Terms to search for"},options:[{name:"--viewer",description:"The program to use to view help content",args:{name:"viewer"}}]},{name:"help-search",description:"Search npm help documentation",args:{name:"text",description:"Text to search for"},options:[E]},{name:"hook",description:"Manage registry hooks"},{name:"install-ci-test",description:"Install a project with a clean slate and run tests"},{name:"install-test",description:"Install package(s) and run tests"},{name:"it",description:"Install package(s) and run tests"},{name:"link",description:"Symlink a package folder",args:{name:"path",template:"filepaths"}},{name:"ln",description:"Symlink a package folder"},{name:"logout",description:"Log out of the registry",options:[i,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:["ls","list"],description:"List installed packages",options:B,args:{name:"[@scope]/pkg",isVariadic:!0}},{name:"org",description:"Manage orgs",subcommands:[{name:"set",description:"Add a user to an org or manage roles",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"},{name:"role",isOptional:!0,suggestions:["developer","admin","owner"]}],options:[i,d]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[i,d]},{name:"ls",description:"List users in an org or see what roles a particular user has in an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name",isOptional:!0}],options:[i,d,m,b]}]},{name:"outdated",description:"Check for outdated packages",args:{name:"[<@scope>/]<pkg>",isVariadic:!0,isOptional:!0},options:[{name:["-a","-all"],description:"Show all outdated or installed packages"},m,E,b,{name:"-g",description:"Checks globally"},...l]},{name:["owner","author"],description:"Manage package owners",subcommands:[{name:"ls",description:"List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help",args:{name:"[@scope/]pkg"},options:[i]},{name:"add",description:"Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[i,d]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[i,d]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[m,w,...l,{name:"--pack-destination",description:"Directory in which npm pack will save tarballs",args:{name:"pack-destination",template:["folders"]}}]},{name:"ping",description:"Ping npm registry",options:[i]},{name:"pkg",description:"Manages your package.json",subcommands:[{name:"get",description:"Retrieves a value key, defined in your package.json file. It is possible to get multiple values and values for child fields",args:{name:"field",description:"Name of the field to get. You can view child fields by separating them with a period",isVariadic:!0},options:[m,...l]},{name:"set",description:"Sets a value in your package.json based on the field value. It is possible to set multiple values and values for child fields",args:{name:"field",description:"Name of the field to set. You can set child fields by separating them with a period",isVariadic:!0},options:[m,...l,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"delete",description:"Deletes a key from your package.json",args:{name:"key",description:"Name of the key to delete. You can delete child fields by separating them with a period",isVariadic:!0},options:[...l,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]}]},{name:"prefix",description:"Display prefix",options:[{name:["-g","--global"],description:"Print the global prefix to standard out"}]},{name:"profile",description:"Change settings on your registry profile",subcommands:[{name:"get",description:"Display all of the properties of your profile, or one or more specific properties",args:{name:"property",isOptional:!0,description:"Property name"},options:[i,m,b,d]},{name:"set",description:"Set the value of a profile property",args:[{name:"property",description:"Property name",suggestions:["email","fullname","homepage","freenode","twitter","github"]},{name:"value",description:"Property value"}],options:[i,m,b,d],subcommands:[{name:"password",description:"Change your password. This is interactive, you'll be prompted for your current password and a new password"}]},{name:"enable-2fa",description:"Enables two-factor authentication",args:{name:"mode",description:"Mode for two-factor authentication. Defaults to auth-and-writes mode",isOptional:!0,suggestions:[{name:"auth-only",description:"Require an OTP when logging in or making changes to your account's authentication"},{name:"auth-and-writes",description:"Requires an OTP at all the times auth-only does, and also requires one when publishing a module, setting the latest dist-tag, or changing access via npm access and npm owner"}]},options:[i,d]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[i,d]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[I,w,m,{name:"--production",description:"Remove the packages specified in your devDependencies"},...l]},{name:"publish",description:"Publish a package",args:{name:"tarball|folder",isOptional:!0,description:"A url or file path to a gzipped tar archive containing a single folder with a package.json file inside | A folder containing a package.json file",template:["folders"]},options:[{name:"--tag",description:"Registers the published package with the given tag",args:{name:"tag"}},...l,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},w,d]},{name:["rebuild","rb"],description:"Rebuild a package",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[x,...l,f,{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"}]},{name:"repo",description:"Open package repository page in the browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[...l,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm repo command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"restart",description:"Restart a package",options:[f,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the restart script"}}]},{name:"root",description:"Display npm root",options:[{name:["-g","--global"],description:"Print the effective global node_modules folder to standard out"}]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[E,m,{name:"--color",description:"Show colors",args:{name:"always",suggestions:["always"],description:"Always show colors"},exclusiveOn:["--no-color"]},{name:"--no-color",description:"Do not show colors",exclusiveOn:["--color"]},b,{name:"--no-description",description:"Do not show descriptions"},{name:"--searchopts",description:"Space-separated options that are always passed to search",args:{name:"searchopts"}},{name:"--searchexclude",description:"Space-separated options that limit the results from search",args:{name:"searchexclude"}},i,{name:"--prefer-online",description:"If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data",exclusiveOn:["--prefer-offline","--offline"]},{name:"--prefer-offline",description:"If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server",exclusiveOn:["--prefer-online","--offline"]},{name:"--offline",description:"Force offline mode: no network requests will be done during install",exclusiveOn:["--prefer-online","--prefer-offline"]}]},{name:"set",description:"Sets the config key to the value"},{name:"set-script",description:"Set tasks in the scripts section of package.json",args:[{name:"script",description:"Name of the task to be added to the scripts section of package.json"},{name:"command",description:"Command to run when script is called"}],options:l},{name:"shrinkwrap",description:"Lock down dependency versions for publication"},{name:"star",description:"Mark your favorite packages",args:{name:"pkg",description:"Package to mark as favorite"},options:[i,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:"stars",description:"View packages marked as favorites",args:{name:"user",isOptional:!0,description:"View packages marked as favorites by <user>"},options:[i]},{name:"start",description:"Start a package",options:[f,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[f,k,{name:"--",args:{name:"arg",description:"Arguments to be passed to the stop script"}}]},{name:"team",description:"Manage organization teams and team memberships",subcommands:[{name:"create",args:{name:"scope:team"},options:[i,d]},{name:"destroy",args:{name:"scope:team"},options:[i,d]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[i,d]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[i,d]},{name:"ls",args:{name:"scope|scope:team"},options:[i,m,b]}]},{name:["test","tst","t"],description:"Test a package",options:[f,k]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[m,b]},{name:"create",description:"Create a new authentication token",options:[{name:"--read-only",description:"This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command"},{name:"--cidr",description:"This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command",isRepeatable:!0,args:{name:"cidr"}}]},{name:"revoke",description:"Immediately removes an authentication token from the registry. You will no longer be able to use it",args:{name:"idtoken"}}],options:[i,d]},T("uninstall"),T(["r","rm"]),T("un"),T("remove"),T("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[w,{name:["-f","--force"],description:"Allow unpublishing all versions of a published package. Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...l]},{name:"unstar",description:"Remove an item from your favorite packages",args:{name:"pkg",description:"Package to unmark as favorite"},options:[i,d,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:["update","upgrade","up"],description:"Update a package",options:[{name:"-g",description:"Update global package"},{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder"},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},I,f,{name:"--no-audit",description:"Submit audit reports alongside the current npm command to the default registry and all registries configured for scopes"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},{name:"--save",description:"Update the semver values of direct dependencies in your project package.json"},w,...l]},{name:"version",description:"Bump a package version",options:[...l,m,{name:"--allow-same-version",description:"Prevents throwing an error when npm version is used to set the new version to the same value as the current version"},{name:"--no-commit-hooks",description:"Do not run git commit hooks when using the npm version command"},{name:"--no-git-tag-version",description:"Do not tag the commit when using the npm version command"},{name:"--preid",description:'The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the rc in 1.2.0-rc.8',args:{name:"prerelease-id"}},{name:"--sign-git-tag",description:"If set to true, then the npm version command will tag the version using -s to add a signature"}]},{name:["view","v","info","show"],description:"View registry info",options:[...l,m]},{name:"whoami",description:"Display npm username",options:[i]}]};var O={script:["bash","-c","until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json"],postProcess:function(e){let s=[];try{if(!e)return s;let o=JSON.parse(P(e.trim()));for(let p of o.projects)s.push({name:p.packageName,description:"Projects"})}catch(o){console.log("generate project suggestion fail: ",o)}return s}},C=[{name:["-t","--to"],args:{name:"PROJECT",generators:O},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--to" parameter expands this selection to include PROJECT and all its dependencies. "." can be used as shorthand for the project in the current working directory. For details, refer to the website article "Selecting subsets of projects"'},{name:["-T","--to-except"],args:{name:"PROJECT",generators:O},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--to-except" parameter expands this selection to include all dependencies of PROJECT, but not PROJECT itself. "." can be used as shorthand for the project in the current working directory. For details, refer to the website article "Selecting subsets of projects"'},{name:["-f","--from"],args:{name:"PROJECT",generators:O},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--from" parameter expands this selection to include PROJECT and all projects that depend on it, plus all dependencies of this set. "." can be used as shorthand for the project in the current working directory. For details, refer to the website article "Selecting subsets of projects"'},{name:["-o","--only"],args:{name:"PROJECT",generators:O},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--only" parameter expands this selection to include PROJECT; its dependencies are not added. "." can be used as shorthand for the project in the current working directory. Note that this parameter is "unsafe" as it may produce a selection that excludes some dependencies. For details, refer to the website article "Selecting subsets of projects"'},{name:["-i","--impacted-by"],args:{name:"PROJECT",generators:O},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--impacted-by" parameter expands this selection to include PROJECT and any projects that depend on PROJECT (and thus might be broken by changes to PROJECT). "." can be used as shorthand for the project in the current working directory. Note that this parameter is "unsafe" as it may produce a selection that excludes some dependencies. For details, refer to the website article "Selecting subsets of projects"'},{name:["-I","--impacted-by-except"],args:{name:"PROJECT",generators:O},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--impacted-by-except" parameter works the same as "--impacted-by" except that PROJECT itself is not added to the selection. "." can be used as shorthand for the project in the current working directory. Note that this parameter is "unsafe" as it may produce a selection that excludes some dependencies. For details, refer to the website article "Selecting subsets of projects"'},{name:"--to-version-policy",args:{name:"VERSION_POLICY_NAME"},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. The "--to-version-policy" parameter is equivalent to specifying "--to" for each of the projects belonging to VERSION_POLICY_NAME. For details, refer to the website article "Selecting subsets of projects"'},{name:"--from-version-policy",args:{name:"VERSION_POLICY_NAME"},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. The "--from-version-policy" parameter is equivalent to specifying "--from" for each of the projects belonging to VERSION_POLICY_NAME. For details, refer to the website article "Selecting subsets of projects"'}],W={name:"rush",description:"Multi-Project Build Tool",subcommands:[{name:"add",description:"Adds one or more dependencies to the package.json and runs rush update",options:[{name:["-p","--package"],description:"Specify package to the dependencies of the current project",isRequired:!0,isRepeatable:!0,args:{name:"PACKAGE",generators:v,debounce:!0}},{name:"--exact",description:"If specified, the SemVer specifier added to the package.json will be an exact version (e.g. without tilde or caret)"},{name:"--caret",description:'If specified, the SemVer specifier added to the package.json will be a prepended with a "caret" specifier ("^")'},{name:"--dev",description:'If specified, the package will be added to the "devDependencies" section of the package.json'},{name:["-m","--make-consistent"],description:"If specified, other packages with this dependency will have their package.json files updated to use the same version of the dependency"},{name:["-s","--skip-update"],description:'If specified, the "rush update" command will not be run after updating the package.json files'},{name:"--all",description:"If specified, the dependency will be added to all projects"}]},{name:"change",description:"Records changes made to projects, indicating how the package version number should be bumped for the next publish",options:[{name:["-v","--verify"],description:"Verify the change file has been generated and that it is a valid JSON file"},{name:"--no-fetch",description:'Skips fetching the baseline branch before running "git diff" to detect changes'},{name:["-b","--target-branch"],description:'If this parameter is specified, compare the checked out branch with the specified branch to determine which projects were changed. If this parameter is not specified, the checked out branch is compared against the "master" branch',args:{name:"BRANCH"}},{name:"--overwrite",description:"If a changefile already exists, overwrite without prompting (or erroring in --bulk mode)"},{name:"--email",args:{name:"EMAIL"},description:"The email address to use in changefiles. If this parameter is not provided, the email address will be detected or prompted for in interactive mode"},{name:"--bulk",description:"If this flag is specified, apply the same change message and bump type to all changed projects. The --message and the --bump-type parameters must be specified if the --bulk parameter is specified"},{name:"--message",args:{name:"MESSAGE"},description:"The message to apply to all changed projects if the --bulk flag is provided"},{name:"--bump-type",args:{name:"BUMP_TYPE",suggestions:["major","minor","patch","none"]},description:"The bump type to apply to all changed projects if the --bulk flag is provided"}]},{name:"check",description:"Checks each project's package.json files and ensures that all dependencies are of the same version throughout the repository",options:[{name:"--variant",description:"Run command using a variant installation configuration. This parameter may alternatively be specified via the RUSH_VARIANT environment variable",args:{name:"VARIANT"}},{name:"--json",description:"If this flag is specified, output will be in JSON format"}]},{name:"deploy",description:"Prepares a deployment by copying a subset of Rush projects and their dependencies to a target folder",options:[{name:["-p","--project"],args:{name:"PROJECT_NAME"},description:'Specifies the name of the main Rush project to be deployed. It must appear in the "deploymentProjectNames" setting in the deployment config file'},{name:["-s","--scenario"],args:{name:"SCENARIO_NAME"},description:'By default, the deployment configuration is specified in "common/config/rush/deploy.json". You can use "--scenario" to specify an alternate name. The name must be lowercase and separated by dashes. For example, if SCENARIO_NAME is "web", then the config file would be "common/config/rush/deploy-web.json"'},{name:"--overwrite",description:"By default, deployment will fail if the target folder is not empty. SPECIFYING THIS FLAG WILL RECURSIVELY DELETE EXISTING CONTENTS OF THE TARGET FOLDER"},{name:["-t","--target-folder"],args:{name:"PATH"},description:'By default, files are deployed to the "common/deploy" folder inside the Rush repo. Use this parameter to specify a different location. WARNING: USE CAUTION WHEN COMBINING WITH "--overwrite". This parameter may alternatively be specified via the RUSH_DEPLOY_TARGET_FOLDER environment variable'},{name:"--create-archive",args:{name:"ARCHIVE_PATH"},description:'If specified, after the deployment has been prepared, "rush deploy" will create an archive containing the contents of the target folder. The newly created archive file will be placed according to the designated path, relative to the target folder. Supported file extensions: .zip'}]},{name:"init",description:"Initializes a new repository to be managed by Rush",options:[{name:"--overwrite-existing",description:'By default "rush init" will not overwrite existing config files. Specify this switch to override that. This can be useful when upgrading your repo to a newer release of Rush. WARNING: USE WITH CARE!'},{name:"--rush-example-repo",description:'When copying the template config files, this uncomments fragments that are used by the "rush-example" GitHub repo, which is a sample monorepo that illustrates many Rush features. This option is primarily intended for maintaining that example'}]},{name:"init-autoinstaller",description:"Initializes a new autoinstaller",options:[{name:"--name",args:{name:"AUTOINSTALLER_NAME"},description:"Specifies the name of the autoinstaller folder, which must conform to the naming rules for NPM packages"}]},{name:"init-deploy",description:'Creates a deployment scenario config file for use with "rush deploy"',options:[{name:["-p","--project"],args:{name:"PROJECT_NAME"},description:'Specifies the name of the main Rush project to be deployed in this scenario. It will be added to the "deploymentProjectNames" setting'},{name:["-s","--scenario"],args:{name:"SCENARIO"},description:'By default, the deployment configuration will be written to "common/config/rush/deploy.json". You can use "--scenario" to specify an alternate name. The name must be lowercase and separated by dashes. For example, if the name is "web", then the config file would be "common/config/rush/deploy-web.json"'}]},{name:"install",description:"Install package dependencies for all projects in the repo according to the shrinkwrap file",options:[{name:["-p","--purge"],description:'Perform "rush purge" before starting the installation'},{name:"--bypass-policy",description:'Overrides enforcement of the "gitPolicy" rules from rush.json (use honorably!)'},{name:"--no-link",description:'If "--no-link" is specified, then project symlinks will NOT be created after the installation completes. You will need to run "rush link" manually. This flag is useful for automated builds that want to report stages individually or perform extra operations in between the two stages. This flag is not supported when using workspaces'},{name:"--network-concurrency",args:{name:"COUNT"},description:"If specified, limits the maximum number of concurrent network requests. This is useful when troubleshooting network failures"},{name:"--debug-package-manager",description:"Activates verbose logging for the package manager. You will probably want to pipe the output of Rush to a file when using this command"},{name:"--max-install-attempts",args:{name:"NUMBER"},description:"Overrides the default maximum number of install attempts. The default value is 3"},{name:"--ignore-hooks",description:'Skips execution of the "eventHooks" scripts defined in rush.json. Make sure you know what you are skipping'},{name:"--variant",args:{name:"VARIANT"},description:"Run command using a variant installation configuration. This parameter may alternatively be specified via the RUSH_VARIANT environment variable"},...C,{name:"--check-only",description:"Only check the validity of the shrinkwrap file without performing an install"}]},{name:"link",description:"Create node_modules symlinks for all projects",options:[{name:["-f","--force"],description:"Deletes and recreates all links, even if the filesystem state seems to indicate that this is unnecessary"}]},{name:"list",description:"List package information for all projects in the repo",options:[{name:["-v","--version"],description:"If this flag is specified, the project version will be displayed in a column along with the package name"},{name:["-p","--path"],description:"If this flag is specified, the project path will be displayed in a column along with the package name"},{name:"--full-path",description:"If this flag is specified, the project full path will be displayed in a column along with the package name"},{name:"--detailed",description:"For the non --json view, if this flag is specified, include path (-p), version (-v) columns along with the project's applicable: versionPolicy, versionPolicyName, shouldPublish, and reviewPolicy fields"},{name:"--json",description:"If this flag is specified, output will be in JSON format"}]},{name:"publish",description:'Reads and processes package publishing change requests generated by "rush change"',options:[{name:["-a","--apply"],description:"If this flag is specified, the change requests will be applied to package.json files"},{name:["-b","--target-branch"],args:{name:"BRANCH"},description:"If this flag is specified, applied changes and deleted change requests will be committed and merged into the target branch"},{name:["-p","--publish"],description:"If this flag is specified, applied changes will be published to the NPM registry"},{name:"--add-commit-details",description:"Adds commit author and hash to the changelog.json files for each change"},{name:"--regenerate-changelogs",description:"Regenerates all changelog files based on the current JSON content"},{name:["-r","--registry"],args:{name:"REGISTRY"},description:"Publishes to a specified NPM registry. If this is specified, it will prevent the current commit will not be tagged"},{name:["-n","--npm-auth-token"],args:{name:"TOKEN"},deprecated:!0,description:"(DEPRECATED) Specifies the authentication token to use during publishing. This parameter is deprecated because command line parameters may be readable by unrelated processes on a lab machine. Instead, a safer practice is to pass the token via an environment variable and reference it from your common/config/rush/.npmrc-publish file"},{name:["-t","--tag"],args:{name:"TAG"},description:"The tag option to pass to npm publish. By default NPM will publish using the 'latest' tag, even if the package is older than the current latest, so in publishing workflows for older releases, providing a tag is important. When hotfix changes are made, this parameter defaults to 'hotfix'"},{name:"--set-access-level",args:{name:"ACCESS_LEVEL",suggestions:["public","restricted"]},description:'By default, when Rush invokes "npm publish" it will publish scoped packages with an access level of "restricted". Scoped packages can be published with an access level of "public" by specifying that value for this flag with the initial publication. NPM always publishes unscoped packages with an access level of "public". For more information, see the NPM documentation for the "--access" option of "npm publish"'},{name:"--pack",description:"Packs projects into tarballs instead of publishing to npm repository. It can only be used when --include-all is specified. If this flag is specified, NPM registry related parameters will be ignored"},{name:"--release-folder",args:{name:"FOLDER"},description:"This parameter is used with --pack parameter to provide customized location for the tarballs instead of the default value"},{name:"--include-all",description:"If this flag is specified, all packages with shouldPublish=true in rush.json or with a specified version policy will be published if their version is newer than published version"},{name:"--version-policy",args:{name:"POLICY"},description:"Version policy name. Only projects with this version policy will be published if used with --include-all"},{name:"--prerelease-name",args:{name:"NAME"},description:"Bump up to a prerelease version with the provided prerelease name. Cannot be used with --suffix"},{name:"--partial-prerelease",description:"Used with --prerelease-name. Only bump packages to a prerelease version if they have changes"},{name:"--suffix",args:{name:"SUFFIX"},description:"Append a suffix to all changed versions. Cannot be used with --prerelease-name"},{name:"--force",description:"If this flag is specified with --publish, packages will be published with --force on npm"},{name:"--apply-git-tags-on-pack",description:"If specified with --publish and --pack, git tags will be applied for packages as if a publish was being run without --pack"},{name:["-c","--commit"],args:{name:"COMMIT_ID"},description:"Used in conjunction with git tagging -- apply git tags at the commit hash specified. If not provided, the current HEAD will be tagged"},{name:"--ignore-git-hooks",description:"Skips execution of all git hooks. Make sure you know what you are skipping"}]},{name:"purge",description:"For diagnostic purposes, use this command to delete caches and other temporary files used by Rush",options:[{name:"--unsafe",description:`(UNSAFE!) Also delete shared files such as the package manager instances stored in the ".rush" folder in the user's home directory. This is a more aggressive fix that is NOT SAFE to run in a live environment because it will cause other concurrent Rush processes to fail`}]},{name:"scan",description:"When migrating projects into a Rush repo, this command is helpful for detecting undeclared dependencies",options:[{name:"--json",description:"If this flag is specified, output will be in JSON format"},{name:"--all",description:"If this flag is specified, output will list all detected dependencies"}]},{name:"setup",description:"(EXPERIMENTAL) Invoke this command before working in a new repo to ensure that any required prerequisites are installed and permissions are configured"},{name:"unlink",description:"Delete node_modules symlinks for all projects in the repo"},{name:"update",description:"Install package dependencies for all projects in the repo, and create or update the shrinkwrap file as needed",options:[{name:["-p","--purge"],description:'Perform "rush purge" before starting the installation'},{name:"--bypass-policy",description:'Overrides enforcement of the "gitPolicy" rules from rush.json (use honorably!)'},{name:"--no-link",description:'If "--no-link" is specified, then project symlinks will NOT be created after the installation completes. You will need to run "rush link" manually. This flag is useful for automated builds that want to report stages individually or perform extra operations in between the two stages. This flag is not supported when using workspaces'},{name:"--network-concurrency",args:{name:"COUNT"},description:"If specified, limits the maximum number of concurrent network requests. This is useful when troubleshooting network failures"},{name:"--debug-package-manager",description:"Activates verbose logging for the package manager. You will probably want to pipe the output of Rush to a file when using this command"},{name:"--max-install-attempts",args:{name:"NUMBER"},description:"Overrides the default maximum number of install attempts. The default value is 3"},{name:"--ignore-hooks",description:'Skips execution of the "eventHooks" scripts defined in rush.json. Make sure you know what you are skipping'},{name:"--variant",args:{name:"VARIANT"},description:"Run command using a variant installation configuration. This parameter may alternatively be specified via the RUSH_VARIANT environment variable"},{name:"--full",description:'Normally "rush update" tries to preserve your existing installed versions and only makes the minimum updates needed to satisfy the package.json files. This conservative approach prevents your PR from getting involved with package updates that are unrelated to your work. Use "--full" when you really want to update all dependencies to the latest SemVer-compatible version. This should be done periodically by a person or robot whose role is to deal with potential upgrade regressions'},{name:"--recheck",description:`If the shrinkwrap file appears to already satisfy the package.json files, then "rush update" will skip invoking the package manager at all. In certain situations this heuristic may be inaccurate. Use the "--recheck" flag to force the package manager to process the shrinkwrap file. This will also update your shrinkwrap file with Rush's fixups. (To minimize shrinkwrap churn, these fixups are normally performed only in the temporary folder.)`}]},{name:"update-autoinstaller",description:"Updates autoinstaller package dependenices",options:[{name:"--name",args:{name:"AUTOINSTALLER_NAME"},description:"Specifies the name of the autoinstaller, which must be one of the folders under common/autoinstallers"}]},{name:"update-cloud-credentials",description:"(EXPERIMENTAL) Update the credentials used by the build cache provider",options:[{name:["-i","--interactive"],description:"Run the credential update operation in interactive mode, if supported by the provider"},{name:"--credential",args:{name:"CREDENTIAL_STRING"},description:"A static credential, to be cached"},{name:["-d","--delete"],description:"If specified, delete stored credentials"}]},{name:"version",description:"Manage package versions in the repo",options:[{name:["-b","--target-branch"],args:{name:"BRANCH"},description:"If this flag is specified, changes will be committed and merged into the target branch"},{name:"--ensure-version-policy",description:"Updates package versions if needed to satisfy version policies"},{name:"--override-version",args:{name:"NEW_VERSION"},description:"Override the version in the specified --version-policy. This setting only works for lock-step version policy and when --ensure-version-policy is specified"},{name:"--bump",description:"Bumps package version based on version policies"},{name:"--bypass-policy",description:'Overrides "gitPolicy" enforcement (use honorably!)'},{name:"--version-policy",args:{name:"POLICY"},description:"The name of the version policy"},{name:"--override-bump",args:{name:"BUMPTYPE"},description:"Overrides the bump type in the version-policy.json for the specified version policy. Valid BUMPTYPE values include: prerelease, patch, preminor, minor, major. This setting only works for lock-step version policy in bump action"},{name:"--override-prerelease-id",args:{name:"ID"},description:'Overrides the prerelease identifier in the version value of version-policy.json for the specified version policy. This setting only works for lock-step version policy. This setting increases to new prerelease id when "--bump" is provided but only replaces the prerelease name when "--ensure-version-policy" is provided'},{name:"--ignore-git-hooks",description:"Skips execution of all git hooks. Make sure you know what you are skipping"}]},{name:"build",description:"Build all projects that haven't been built, or have changed since they were last built",options:[{name:["-p","--parallelism"],args:{name:"COUNT"},description:'Specifies the maximum number of concurrent processes to launch during a build. The COUNT should be a positive integer or else the word "max" to specify a count that is equal to the number of CPU cores. If this parameter is omitted, then the default value depends on the operating system and number of CPU cores. This parameter may alternatively be specified via the RUSH_PARALLELISM environment variable'},...C,{name:["-v","--verbose"],description:"Display the logs during the build, rather than just displaying the build status summary"},{name:["-c","--changed-projects-only"],description:'Normally the incremental build logic will rebuild changed projects as well as any projects that directly or indirectly depend on a changed project. Specify "--changed-projects-only" to ignore dependent projects, only rebuilding those projects whose files were changed. Note that this parameter is "unsafe"; it is up to the developer to ensure that the ignored projects are okay to ignore'},{name:"--ignore-hooks",description:'Skips execution of the "eventHooks" scripts defined in rush.json. Make sure you know what you are skipping'}]},{name:"rebuild",description:"Clean and rebuild the entire set of projects",options:[{name:["-p","--parallelism"],args:{name:"COUNT"},description:'Specifies the maximum number of concurrent processes to launch during a build. The COUNT should be a positive integer or else the word "max" to specify a count that is equal to the number of CPU cores. If this parameter is omitted, then the default value depends on the operating system and number of CPU cores. This parameter may alternatively be specified via the RUSH_PARALLELISM environment variable'},...C,{name:["-v","--verbose"],description:"Display the logs during the build, rather than just displaying the build status summary"},{name:"--ignore-hooks",description:'Skips execution of the "eventHooks" scripts defined in rush.json. Make sure you know what you are skipping'}]},{name:"tab-complete",description:"Provides tab completion",options:[{name:"--word",args:{name:"WORD"},description:'The word to complete. The default value is ""'},{name:"--position",args:{name:"INDEX"},description:"The position in the word to be completed. The default value is 0"}]}],options:[{name:["-h","--help"],description:"Show this help message and exit",isPersistent:!0},{name:["-d","--debug"],description:"Show the full call stack if an error occurs while executing the tool"}]},K=W;export{K as default};
1
+ var C=Symbol("singleComment"),U=Symbol("multiComment"),q=()=>"",B=(e,o,r)=>e.slice(o,r).replace(/[^ \t\r\n]/g," "),H=(e,o)=>{let r=o-1,l=0;for(;e[r]==="\\";)r-=1,l+=1;return!!(l%2)};function N(e,{whitespace:o=!0,trailingCommas:r=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let l=o?B:q,p=!1,a=!1,s=0,c="",g="",w=-1;for(let t=0;t<e.length;t++){let u=e[t],h=e[t+1];if(!a&&u==='"'&&(H(e,t)||(p=!p)),!p)if(!a&&u+h==="//")c+=e.slice(s,t),s=t,a=C,t++;else if(a===C&&u+h===`\r
2
+ `){t++,a=!1,c+=l(e,s,t),s=t;continue}else if(a===C&&u===`
3
+ `)a=!1,c+=l(e,s,t),s=t;else if(!a&&u+h==="/*"){c+=e.slice(s,t),s=t,a=U,t++;continue}else if(a===U&&u+h==="*/"){t++,a=!1,c+=l(e,s,t+1),s=t+1;continue}else r&&!a&&(w!==-1?u==="}"||u==="]"?(c+=e.slice(s,t),g+=l(c,0,1)+c.slice(1),c="",s=t,w=-1):u!==" "&&u!==" "&&u!=="\r"&&u!==`
4
+ `&&(c+=e.slice(s,t),s=t,w=-1):u===","&&(g+=c+e.slice(s,t),c="",s=t,w=t))}let I=a===C?l(e,s):e.slice(s);return g+c+I}function T(e){return{name:e,description:"Uninstall a package",args:{name:"package",generators:R,filterStrategy:"fuzzy",isVariadic:!0},options:$}}var F=e=>(e.match(/@/g)||[]).length,W=e=>async(o,r,l)=>{let p=o[o.length-1];if(p==="")return[];let a=e&&e.length>0?`+keywords:${e.join(",")}`:"",c=["-s","-H","Accept: application/json",a?`https://api.npms.io/v2/search?size=20&q=${p}${a}`:`https://api.npms.io/v2/search/suggestions?q=${p}&size=20`],g=["-s","-H","Accept: application/vnd.npm.install-v1+json",`https://registry.npmjs.org/${p.slice(0,-1)}`],w=t=>r({command:"curl",args:t[t.length-1]==="@"?g:c}),I=p.startsWith("@")?F(p)>1:p.includes("@");try{let t=JSON.parse((await w(p)).stdout);if(I){let h=Object.entries(t["dist-tags"]||{}).map(([S,J])=>({name:S,description:J}));return h.push(...Object.keys(t.versions).map(S=>({name:S})).reverse()),h}return(a?t.results:t).map(h=>({name:h.package.name,description:h.package.description}))}catch(t){return console.error({error:t}),[]}},v={trigger:(e,o)=>o.startsWith("@")?!(F(o)>1&&F(e)>1):!(o.includes("@")&&e.includes("@")),getQueryTerm:"@",cache:{ttl:1e3*60*60*24*2},custom:W()},z={custom:async(e,o)=>{let{stdout:r}=await o({command:"npm",args:["prefix"]}),{stdout:l}=await o({command:"cat",args:[`${r}/package.json`]}),p=[];try{if(l.trim()=="")return p;let s=JSON.parse(l).workspaces;if(s)for(let c of s)p.push({name:c,description:"Workspaces"})}catch(a){console.log(a)}return p}},R={trigger:e=>e==="-g"||e==="--global",custom:async function(e,o){if(!e.includes("-g")&&!e.includes("--global")){let{stdout:r}=await o({command:"npm",args:["prefix"]}),{stdout:l}=await o({command:"cat",args:[`${r}/package.json`]}),p=JSON.parse(l),a=p.dependencies??{},s=p.devDependencies,c=p.optionalDependencies??{};return Object.assign(a,s,c),Object.keys(a).filter(g=>!e.some(I=>I===g)).map(g=>({name:g,icon:"\u{1F4E6}",description:a[g]?"dependency":c[g]?"optionalDependency":"devDependency"}))}else{let{stdout:r}=await o({command:"bash",args:["-c","ls -1 `npm root -g`"]});return r.split(`
5
+ `).map(l=>({name:l,icon:"\u{1F4E6}",description:"Global dependency"}))}}},Y={cache:{strategy:"stale-while-revalidate",cacheByDirectory:!0},script:["bash","-c","until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"],postProcess:function(e,[o]){if(e.trim()=="")return[];try{let r=JSON.parse(e),l=r.scripts,p=r.fig||{};if(l)return Object.entries(l).map(([a,s])=>{let c=o==="yarn"?"fig://icon?type=yarn":"fig://icon?type=npm",g=p[a];return{name:a,icon:c,description:s,priority:51,...g}})}catch(r){console.error(r)}return[]}},x={name:["-g","--global"],description:"Operates in 'global' mode, so that packages are installed into the prefix folder instead of the current working directory"},d={name:"--json",description:"Show output in json format"},y={name:"--omit",description:"Dependency types to omit from the installation tree on disk",args:{name:"Package type",default:"dev",suggestions:["dev","optional","peer"]},isRepeatable:3},k={name:["-p","--parseable"],description:"Output parseable results from commands that write to standard output"},P={name:["-l","--long"],description:"Show extended information"},n=[{name:["-w","--workspace"],description:"Enable running a command in the context of the configured workspaces of the current project",args:{name:"workspace",generators:z,isVariadic:!0}},{name:["-ws","--workspaces"],description:"Enable running a command in the context of all the configured workspaces"}],$=[{name:["-S","--save"],description:"Package will be removed from your dependencies"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:"-g",description:"Uninstall global package"},...n],X=[{name:["-a","--all"],description:"Show all outdated or installed packages"},d,P,k,{name:"--depth",description:"The depth to go when recursing packages",args:{name:"depth"}},{name:"--link",description:"Limits output to only those packages that are linked"},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--no-unicode",description:"Uses unicode characters in the tree output"},x,y,...n],i={name:"--registry",description:"The base URL of the npm registry",args:{name:"registry"}},M={name:"--verbose",description:"Show extra information",args:{name:"verbose"}},m={name:"--otp",description:"One-time password from a two-factor authenticator",args:{name:"otp"}},f={name:"--ignore-scripts",description:"If true, npm does not run scripts specified in package.json files"},O={name:"--script-shell",description:"The shell to use for scripts run with the npm exec, npm run and npm init <pkg> commands",args:{name:"script-shell"}},b={name:"--dry-run",description:"Indicates that you don't want npm to make any changes and that it should only report what it would have done"},E={name:"--install-strategy",description:"Sets the strategy for installing packages in node_modules",args:{name:"strategy",default:"hoisted",suggestions:["hoisted","nested","shallow","linked"]}},V={name:"--install-links",description:"Install file: protocol dependencies outside the project root as regular dependencies instead of creating a symlink"},A={name:"--foreground-scripts",description:"Run all build scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process"},_={name:"--allow-git",description:"Limits the ability for npm to install git dependencies",args:{name:"allow-git",suggestions:["all","none","root"]}},G={name:"--allow-remote",description:"Limits the ability for npm to install user-supplied tarball URL dependencies",args:{name:"allow-remote",suggestions:["all","none","root"]}},D=[{name:"--allow-publish",description:"Allows the trusted publisher to run npm publish for the package"},{name:["--allow-stage-publish","--allow-staged-publish"],description:"Allows the trusted publisher to run npm stage for the package"}],Z={name:"npm",parserDirectives:{flagsArePosixNoncompliant:!0},description:"Node package manager",subcommands:[{name:["install","i","add"],description:"Install a package and its dependencies",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[{name:["-P","--save-prod"],description:"Package will appear in your `dependencies`. This is the default unless `-D` or `-O` are present"},{name:["-D","--save-dev"],description:"Package will appear in your `devDependencies`"},{name:["-O","--save-optional"],description:"Package will appear in your `optionalDependencies`"},{name:"--no-save",description:"Prevents saving to `dependencies`"},{name:["-E","--save-exact"],description:"Saved dependencies will be configured with an exact version rather than using npm's default semver range operator"},{name:["-B","--save-bundle"],description:"Saved dependencies will also be added to your bundleDependencies list"},x,E,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder",deprecated:!0},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package",deprecated:!0},{name:"--legacy-peer-deps",description:"Bypass peerDependency auto-installation. Emulate install behavior of NPM v4 through v6"},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},i,M,y,f,A,_,G,V,{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},b,...n]},{name:["run","run-script"],description:"Run arbitrary package scripts",options:[...n,{name:"--if-present",description:"Npm will not exit with an error code when run-script is invoked for a script that isn't defined in the scripts section of package.json"},{name:"--silent",description:""},f,O,{name:"--",args:{name:"args",isVariadic:!0}}],args:{name:"script",description:"Script to run from your package.json",filterStrategy:"fuzzy",generators:Y}},{name:"init",description:"Trigger the initialization",options:[{name:["-y","--yes"],description:"Automatically answer 'yes' to any prompts that npm might print on the command line"},{name:"-w",description:"Create the folders and boilerplate expected while also adding a reference to your project workspaces property",args:{name:"dir"}},{name:"--init-private",description:"Set the private field to true in package.json"},{name:"--scope",description:"Create a scoped package",args:{name:"scope",description:"Scope name"}}]},{name:"access",description:"Set access level on published packages",subcommands:[{name:"list",description:"List packages or collaborators",subcommands:[{name:"packages",description:"List all packages accessible by a user, scope or team",args:[{name:"user|scope|scope:team",isOptional:!0},{name:"package",isOptional:!0}]},{name:"collaborators",description:"List all users with access to a package",args:[{name:"package",isOptional:!0},{name:"user",isOptional:!0}]}]},{name:"get",description:"Get the access status of a package",subcommands:[{name:"status",description:"Get the visibility status of a package",args:{name:"package",isOptional:!0}}]},{name:"set",description:"Set the visibility status or publishing MFA requirement of a package",args:[{name:"status|mfa",suggestions:["status=public","status=private","mfa=none","mfa=publish","mfa=automation"]},{name:"package",isOptional:!0}]},{name:"grant",description:"Grant a team read-only or read-write access to a package",args:[{name:"permissions",suggestions:["read-only","read-write"]},{name:"scope:team"},{name:"package",isOptional:!0}]},{name:"revoke",description:"Revoke a team's access to a package",args:[{name:"scope:team"},{name:"package",isOptional:!0}]}],options:[d,m,i]},{name:"adduser",description:"Add a registry user account",deprecated:!0,options:[i,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:"login",description:"Login to a registry user account",options:[i,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}},{name:"--auth-type",description:"What authentication strategy to use with login",args:{name:"auth-type",default:"web",suggestions:["legacy","web"]}}]},{name:"audit",description:"Run a security audit",subcommands:[{name:"signatures",description:"Verify registry signatures and provenance attestations of downloaded packages",options:[d,{name:"--include-attestations",description:"Include full sigstore attestation bundles in the JSON output"}]},{name:"fix",description:"If the fix argument is provided, then remediations will be applied to the package tree",options:[b,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...n]}],options:[...n,{name:"--audit-level",description:"The minimum level of vulnerability for npm audit to exit with a non-zero exit code",args:{name:"audit",suggestions:["info","low","moderate","high","critical","none"]}},{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},d,y]},{name:"bin",description:"Print the folder where npm will install executables",deprecated:!0,options:[x]},{name:["bugs","issues"],description:"Report bugs for a package in a web browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm bugs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]},i]},{name:"cache",description:"Manipulates packages and npx cache",subcommands:[{name:"add",description:"Add the specified packages to the local cache"},{name:"clean",description:"Delete a single entry or all entries out of the cache folder",args:{name:"key",isOptional:!0}},{name:"ls",description:"List given entries or all entries in the local cache",args:{name:"name@version",isOptional:!0,isVariadic:!0}},{name:"verify",description:"Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data"},{name:"npx",description:"Manipulates the npx cache",subcommands:[{name:"ls",description:"List all entries in the npx cache"},{name:"rm",description:"Remove given entries or all entries from the npx cache",args:{name:"key",isOptional:!0,isVariadic:!0}},{name:"info",description:"Get detailed information about given entries in the npx cache",args:{name:"key",isVariadic:!0}}]}],options:[{name:"--cache",args:{name:"cache"},description:"The location of npm's cache directory"}]},{name:["ci","clean-install","install-clean"],description:"Install a project with a clean slate",options:[{name:"--audit",description:'When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes',args:{name:"audit",suggestions:["true","false"]},exclusiveOn:["--no-audit"]},{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command",exclusiveOn:["--audit"]},f,O,M,i,E,y,A,_,G]},{name:"cit",description:"Install a project with a clean slate and run tests"},{name:"clean-install-test",description:"Install a project with a clean slate and run tests"},{name:"completion",description:"Tab completion for npm"},{name:["config","c"],description:"Manage the npm configuration files",subcommands:[{name:"set",description:"Sets the config key to the value",args:[{name:"key"},{name:"value"}],options:[{name:["-g","--global"],description:"Sets it globally"}]},{name:"get",description:"Echo the config value to stdout",args:{name:"key"}},{name:"list",description:"Show all the config settings",options:[{name:"-g",description:"Lists globally installed packages"},{name:"-l",description:"Also shows defaults"},d]},{name:"delete",description:"Deletes the key from all configuration files",args:{name:"key"}},{name:"edit",description:"Opens the config file in an editor",options:[{name:"--global",description:"Edits the global config"}]},{name:"fix",description:"Attempts to repair invalid configuration items, such as attaching authentication configuration to the configured registry"}]},{name:"create",description:"Create a package.json file"},{name:["dedupe","ddp"],description:"Reduce duplication in the package tree"},{name:"deprecate",description:"Deprecate a version of a package",options:[i]},{name:"diff",description:"The registry diff command",args:{name:"paths",isOptional:!0,isVariadic:!0,template:"filepaths"},options:[{name:"--diff",description:"Define arguments to compare in npm diff",isRepeatable:2,args:{name:"package-spec"}},{name:"--diff-name-only",description:"Prints only filenames when using npm diff"},{name:"--diff-unified",description:"The number of lines of context to print in npm diff",args:{name:"number",default:"3"}},{name:"--diff-ignore-all-space",description:"Ignore whitespace when comparing lines in npm diff"},{name:"--diff-no-prefix",description:"Do not show any source or destination prefix in npm diff output"},{name:"--diff-src-prefix",description:"Source prefix to be used in npm diff output",args:{name:"path",default:"a/"}},{name:"--diff-dst-prefix",description:"Destination prefix to be used in npm diff output",args:{name:"path",default:"b/"}},{name:"--diff-text",description:"Treat all files as text in npm diff"},x,{name:"--tag",description:"The tag used to fetch the tarball that will be compared with the local files",args:{name:"tag",default:"latest"}},...n]},{name:"dist-tag",description:"Modify package distribution tags"},{name:["docs","home"],description:"Open documentation for a package in a web browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[...n,i,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm docs command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"doctor",description:"Check your npm environment",options:[i]},{name:"edit",description:"Edit an installed package",options:[{name:"--editor",description:"The command to run for npm edit or npm config edit"}]},{name:["exec","x"],description:"Run a command from a local or remote npm package",args:{name:"command",isOptional:!0,isVariadic:!0},options:[{name:"--package",description:"The package or packages to install for npm exec",isRepeatable:!0,args:{name:"package-spec",generators:v,debounce:!0}},{name:["-c","--call"],description:"Custom command to be run along with the installed packages",args:{name:"call"}},{name:["-y","--yes"],description:"Automatically answer 'yes' to the prompt to install missing packages",exclusiveOn:["--no"]},{name:"--no",description:"Automatically answer 'no' to the prompt to install missing packages",exclusiveOn:["-y","--yes"]},...n]},{name:["explain","why"],description:"Explain installed packages",args:{name:"package-spec",filterStrategy:"fuzzy",generators:R,isVariadic:!0},options:[d,...n]},{name:"explore",description:"Browse an installed package",args:{name:"package",filterStrategy:"fuzzy",generators:R}},{name:"find-dupes",description:"Find duplication in the package tree",options:[E,y,f,...n]},{name:"fund",description:"Retrieve funding information"},{name:"get",description:"Echo the config value to stdout"},{name:"help",description:"Get help on npm",args:{name:"term",isVariadic:!0,description:"Terms to search for"},options:[{name:"--viewer",description:"The program to use to view help content",args:{name:"viewer"}}]},{name:"help-search",description:"Search npm help documentation",args:{name:"text",description:"Text to search for"},options:[P]},{name:"hook",description:"Manage registry hooks",deprecated:!0},{name:"install-ci-test",description:"Install a project with a clean slate and run tests"},{name:"install-scripts",description:"Manage which dependencies are allowed to run install scripts",subcommands:[{name:"approve",description:"Approve install scripts for packages, pinned to their installed version",args:{name:"pkg",isOptional:!0,isVariadic:!0,generators:R},options:[{name:"--all",description:"Approve all currently-installed install scripts"}]},{name:"deny",description:"Deny install scripts for packages so they stay blocked",args:{name:"pkg",isOptional:!0,isVariadic:!0,generators:R},options:[{name:"--all",description:"Deny all currently-installed install scripts"}]},{name:"ls",description:"List packages whose install scripts still need review"},{name:"prune",description:"Remove stale allowScripts entries",options:[b]}]},{name:"install-test",description:"Install package(s) and run tests"},{name:"it",description:"Install package(s) and run tests"},{name:"link",description:"Symlink a package folder",args:{name:"path",template:"filepaths"}},{name:"ln",description:"Symlink a package folder"},{name:"logout",description:"Log out of the registry",options:[i,{name:"--scope",description:"Associate an operation with a scope for a scoped registry",args:{name:"scope",description:"Scope name"}}]},{name:["ls","list"],description:"List installed packages",options:X,args:{name:"[@scope]/pkg",isVariadic:!0}},{name:"org",description:"Manage orgs",subcommands:[{name:"set",description:"Add a user to an org or manage roles",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"},{name:"role",isOptional:!0,suggestions:["developer","admin","owner"]}],options:[i,m]},{name:"rm",description:"Remove a user from an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name"}],options:[i,m]},{name:"ls",description:"List users in an org or see what roles a particular user has in an org",args:[{name:"orgname",description:"Organization name"},{name:"username",description:"User name",isOptional:!0}],options:[i,m,d,k]}]},{name:"outdated",description:"Check for outdated packages",args:{name:"[<@scope>/]<pkg>",isVariadic:!0,isOptional:!0},options:[{name:["-a","--all"],description:"Show all outdated or installed packages"},d,P,k,{name:"-g",description:"Checks globally"},...n]},{name:["owner","author"],description:"Manage package owners",subcommands:[{name:"ls",description:"List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help",args:{name:"[@scope/]pkg"},options:[i]},{name:"add",description:"Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[i,m]},{name:"rm",description:"Remove a user from the package owner list. This immediately revokes their privileges",args:[{name:"user"},{name:"[@scope/]pkg"}],options:[i,m]}]},{name:"pack",description:"Create a tarball from a package",args:{name:"[<@scope>/]<pkg>"},options:[d,b,...n,{name:"--pack-destination",description:"Directory in which npm pack will save tarballs",args:{name:"pack-destination",template:["folders"]}}]},{name:"ping",description:"Ping npm registry",options:[i]},{name:"pkg",description:"Manages your package.json",subcommands:[{name:"get",description:"Retrieves a value key, defined in your package.json file. It is possible to get multiple values and values for child fields",args:{name:"field",description:"Name of the field to get. You can view child fields by separating them with a period",isVariadic:!0},options:[d,...n]},{name:"set",description:"Sets a value in your package.json based on the field value. It is possible to set multiple values and values for child fields",args:{name:"field",description:"Name of the field to set. You can set child fields by separating them with a period",isVariadic:!0},options:[d,...n,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"delete",description:"Deletes a key from your package.json",args:{name:"key",description:"Name of the key to delete. You can delete child fields by separating them with a period",isVariadic:!0},options:[...n,{name:["-f","--force"],description:"Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. Allow clobbering existing values in npm pkg",isDangerous:!0}]},{name:"fix",description:"Auto corrects common errors in your package.json",options:n}]},{name:"prefix",description:"Display prefix",options:[{name:["-g","--global"],description:"Print the global prefix to standard out"}]},{name:"profile",description:"Change settings on your registry profile",subcommands:[{name:"get",description:"Display all of the properties of your profile, or one or more specific properties",args:{name:"property",isOptional:!0,description:"Property name"},options:[i,d,k,m]},{name:"set",description:"Set the value of a profile property",args:[{name:"property",description:"Property name",suggestions:["email","fullname","homepage","freenode","twitter","github"]},{name:"value",description:"Property value"}],options:[i,d,k,m],subcommands:[{name:"password",description:"Change your password. This is interactive, you'll be prompted for your current password and a new password"}]},{name:"enable-2fa",description:"Enables two-factor authentication",args:{name:"mode",description:"Mode for two-factor authentication. Defaults to auth-and-writes mode",isOptional:!0,suggestions:[{name:"auth-only",description:"Require an OTP when logging in or making changes to your account's authentication"},{name:"auth-and-writes",description:"Requires an OTP at all the times auth-only does, and also requires one when publishing a module, setting the latest dist-tag, or changing access via npm access and npm owner"}]},options:[i,m]},{name:"disable-2fa",description:"Disables two-factor authentication",options:[i,m]}]},{name:"prune",description:"Remove extraneous packages",args:{name:"[<@scope>/]<pkg>",isOptional:!0},options:[y,b,d,{name:"--production",description:"Remove the packages specified in your devDependencies"},...n]},{name:"publish",description:"Publish a package",args:{name:"tarball|folder",isOptional:!0,description:"A url or file path to a gzipped tar archive containing a single folder with a package.json file inside | A folder containing a package.json file",template:["folders"]},options:[{name:"--tag",description:"Registers the published package with the given tag",args:{name:"tag"}},...n,{name:"--access",description:"Sets scoped package to be publicly viewable if set to 'public'",args:{default:"restricted",suggestions:["restricted","public"]}},b,m,{name:"--provenance",description:"When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from",exclusiveOn:["--provenance-file"]},{name:"--provenance-file",description:"When publishing, the provenance bundle at the given path will be used",args:{name:"file",template:"filepaths"},exclusiveOn:["--provenance"]}]},{name:"query",description:"Retrieve a filtered list of packages",args:{name:"selector",description:"Dependency selector, e.g. ':root > .prod'"},options:[x,...n,{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--expect-results",description:"Exit with an error code if the query has no results",exclusiveOn:["--no-expect-results","--expect-result-count"]},{name:"--no-expect-results",description:"Exit with an error code if the query has any results",exclusiveOn:["--expect-results","--expect-result-count"]},{name:"--expect-result-count",description:"Exit with an error code if the query does not return exactly this many results",args:{name:"count"},exclusiveOn:["--expect-results","--no-expect-results"]}]},{name:["rebuild","rb"],description:"Rebuild a package",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[x,...n,f,{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"}]},{name:"repo",description:"Open package repository page in the browser",args:{name:"package",isOptional:!0,generators:v,debounce:!0,isVariadic:!0},options:[...n,{name:"--no-browser",description:"Display in command line instead of browser",exclusiveOn:["--browser"]},{name:"--browser",description:"The browser that is called by the npm repo command to open websites",args:{name:"browser"},exclusiveOn:["--no-browser"]}]},{name:"restart",description:"Restart a package",options:[f,O,{name:"--",args:{name:"arg",description:"Arguments to be passed to the restart script"}}]},{name:"root",description:"Display npm root",options:[{name:["-g","--global"],description:"Print the effective global node_modules folder to standard out"}]},{name:"sbom",description:"Generate a Software Bill of Materials (SBOM)",options:[y,{name:"--package-lock-only",description:"Current operation will only use the package-lock.json, ignoring node_modules"},{name:"--sbom-format",description:"SBOM format to use when generating SBOMs",args:{name:"format",suggestions:["cyclonedx","spdx"]}},...n]},{name:["search","s","se","find"],description:"Search for packages",args:{name:"search terms",isVariadic:!0},options:[P,d,{name:"--color",description:"Show colors",args:{name:"always",suggestions:["always"],description:"Always show colors"},exclusiveOn:["--no-color"]},{name:"--no-color",description:"Do not show colors",exclusiveOn:["--color"]},k,{name:"--no-description",description:"Do not show descriptions"},{name:"--searchopts",description:"Space-separated options that are always passed to search",args:{name:"searchopts"}},{name:"--searchexclude",description:"Space-separated options that limit the results from search",args:{name:"searchexclude"}},i,{name:"--prefer-online",description:"If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data",exclusiveOn:["--prefer-offline","--offline"]},{name:"--prefer-offline",description:"If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server",exclusiveOn:["--prefer-online","--offline"]},{name:"--offline",description:"Force offline mode: no network requests will be done during install",exclusiveOn:["--prefer-online","--prefer-offline"]}]},{name:"set",description:"Sets the config key to the value"},{name:"set-script",description:"Set tasks in the scripts section of package.json",deprecated:!0,args:[{name:"script",description:"Name of the task to be added to the scripts section of package.json"},{name:"command",description:"Command to run when script is called"}],options:n},{name:"shrinkwrap",description:"Lock down dependency versions for publication",deprecated:!0},{name:"stage",description:"Stage a package for publishing, deferring 2FA to a later approval",subcommands:[{name:"publish",description:"Stage a package for publishing",args:{name:"package-spec",isOptional:!0,template:["folders"]},options:[{name:"--tag",description:"Registers the staged package with the given tag",args:{name:"tag"}}]},{name:"list",description:"List all staged package versions",args:{name:"package-spec",isOptional:!0}},{name:"view",description:"View details of a specific staged package",args:{name:"stage-id"}},{name:"approve",description:"Approve a staged package for publishing",args:{name:"stage-id"}},{name:"reject",description:"Reject a staged package",args:{name:"stage-id"}},{name:"download",description:"Download the tarball of a staged package for inspection",args:{name:"stage-id"}}]},{name:"star",description:"Mark your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to mark as favorite"},options:[i,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:"stars",description:"View packages marked as favorites",deprecated:!0,args:{name:"user",isOptional:!0,description:"View packages marked as favorites by <user>"},options:[i]},{name:"start",description:"Start a package",options:[f,O,{name:"--",args:{name:"arg",description:"Arguments to be passed to the start script"}}]},{name:"stop",description:"Stop a package",options:[f,O,{name:"--",args:{name:"arg",description:"Arguments to be passed to the stop script"}}]},{name:"team",description:"Manage organization teams and team memberships",subcommands:[{name:"create",args:{name:"scope:team"},options:[i,m]},{name:"destroy",args:{name:"scope:team"},options:[i,m]},{name:"add",args:[{name:"scope:team"},{name:"user"}],options:[i,m]},{name:"rm",args:[{name:"scope:team"},{name:"user"}],options:[i,m]},{name:"ls",args:{name:"scope|scope:team"},options:[i,d,k]}]},{name:["test","tst","t"],description:"Test a package",options:[f,O]},{name:"token",description:"Manage your authentication tokens",subcommands:[{name:"list",description:"Shows a table of all active authentication tokens",options:[d,k]},{name:"create",description:"Create a new authentication token",options:[{name:"--read-only",description:"This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command"},{name:"--cidr",description:"This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command",isRepeatable:!0,args:{name:"cidr"}}]},{name:"revoke",description:"Immediately removes an authentication token from the registry. You will no longer be able to use it",args:{name:"idtoken"}}],options:[i,m]},{name:"trust",description:"Create a trusted relationship between a package and an OIDC provider",subcommands:[{name:"github",description:"Create a trusted relationship between a package and GitHub Actions",args:{name:"package",isOptional:!0},options:[...D,{name:"--file",description:"Name of the workflow file within the repository's .github folder (must end in yaml or yml)",isRequired:!0,args:{name:"file"}},{name:["--repository","--repo"],description:"Name of the repository in the format owner/repo",args:{name:"repository"}},{name:["--environment","--env"],description:"CI environment name",args:{name:"environment"}}]},{name:"gitlab",description:"Create a trusted relationship between a package and GitLab CI/CD",args:{name:"package",isOptional:!0},options:[...D,{name:"--file",description:"Name of the pipeline file (e.g. .gitlab-ci.yml)",isRequired:!0,args:{name:"file"}},{name:"--project",description:"Name of the project in the format group/project or group/subgroup/project",args:{name:"project"}},{name:["--environment","--env"],description:"CI environment name",args:{name:"environment"}}]},{name:"circleci",description:"Create a trusted relationship between a package and CircleCI",args:{name:"package",isOptional:!0},options:[...D,{name:"--org-id",description:"CircleCI organization UUID",isRequired:!0,args:{name:"org-id"}},{name:"--project-id",description:"CircleCI project UUID",isRequired:!0,args:{name:"project-id"}},{name:"--pipeline-definition-id",description:"CircleCI pipeline definition UUID",isRequired:!0,args:{name:"pipeline-definition-id"}},{name:"--vcs-origin",description:"CircleCI repository origin in the format provider/owner/repo",isRequired:!0,args:{name:"vcs-origin"}},{name:"--context-id",description:"CircleCI context UUID to match",isRepeatable:!0,args:{name:"context-id"}}]},{name:"list",description:"List trusted relationships for a package",args:{name:"package",isOptional:!0}},{name:"revoke",description:"Revoke a trusted relationship for a package",args:{name:"package",isOptional:!0},options:[{name:"--id",description:"ID of the trusted relationship to revoke",args:{name:"trust-id"}}]}]},{name:"undeprecate",description:"Undeprecate a version of a package",args:{name:"package-spec"},options:[i,m,b]},T("uninstall"),T(["r","rm"]),T("un"),T("remove"),T("unlink"),{name:"unpublish",description:"Remove a package from the registry",args:{name:"[<@scope>/]<pkg>[@<version>]"},options:[b,{name:["-f","--force"],description:"Allow unpublishing all versions of a published package. Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input",isDangerous:!0},...n]},{name:"unstar",description:"Remove an item from your favorite packages",deprecated:!0,args:{name:"pkg",description:"Package to unmark as favorite"},options:[i,m,{name:"--no-unicode",description:"Do not use unicode characters in the tree output"}]},{name:["update","upgrade","up","u"],description:"Update a package",options:[{name:"-g",description:"Update global package"},E,{name:"--global-style",description:"Causes npm to install the package into your local node_modules folder with the same layout it uses with the global node_modules folder",deprecated:!0},{name:"--legacy-bundling",description:"Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package",deprecated:!0},{name:"--strict-peer-deps",description:"If set to true, and --legacy-peer-deps is not set, then any conflicting peerDependencies will be treated as an install failure"},{name:"--no-package-lock",description:"Ignores package-lock.json files when installing"},y,f,A,V,{name:"--no-audit",description:"Do not submit audit reports alongside the current npm command"},{name:"--no-bin-links",description:"Tells npm to not create symlinks (or .cmd shims on Windows) for package executables"},{name:"--no-fund",description:"Hides the message at the end of each npm install acknowledging the number of dependencies looking for funding"},{name:"--save",description:"Update the semver values of direct dependencies in your project package.json"},b,...n]},{name:"version",description:"Bump a package version",options:[...n,d,{name:"--allow-same-version",description:"Prevents throwing an error when npm version is used to set the new version to the same value as the current version"},{name:"--no-commit-hooks",description:"Do not run git commit hooks when using the npm version command"},{name:"--no-git-tag-version",description:"Do not tag the commit when using the npm version command"},{name:"--preid",description:'The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the rc in 1.2.0-rc.8',args:{name:"prerelease-id"}},{name:"--sign-git-tag",description:"If set to true, then the npm version command will tag the version using -s to add a signature"}]},{name:["view","v","info","show"],description:"View registry info",options:[...n,d]},{name:"whoami",description:"Display npm username",options:[i]}]};var j={script:["bash","-c","until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json"],postProcess:function(e){let o=[];try{if(!e)return o;let r=JSON.parse(N(e.trim()));for(let l of r.projects)o.push({name:l.packageName,description:"Projects"})}catch(r){console.log("generate project suggestion fail: ",r)}return o}},L=[{name:["-t","--to"],args:{name:"PROJECT",generators:j},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--to" parameter expands this selection to include PROJECT and all its dependencies. "." can be used as shorthand for the project in the current working directory. For details, refer to the website article "Selecting subsets of projects"'},{name:["-T","--to-except"],args:{name:"PROJECT",generators:j},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--to-except" parameter expands this selection to include all dependencies of PROJECT, but not PROJECT itself. "." can be used as shorthand for the project in the current working directory. For details, refer to the website article "Selecting subsets of projects"'},{name:["-f","--from"],args:{name:"PROJECT",generators:j},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--from" parameter expands this selection to include PROJECT and all projects that depend on it, plus all dependencies of this set. "." can be used as shorthand for the project in the current working directory. For details, refer to the website article "Selecting subsets of projects"'},{name:["-o","--only"],args:{name:"PROJECT",generators:j},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--only" parameter expands this selection to include PROJECT; its dependencies are not added. "." can be used as shorthand for the project in the current working directory. Note that this parameter is "unsafe" as it may produce a selection that excludes some dependencies. For details, refer to the website article "Selecting subsets of projects"'},{name:["-i","--impacted-by"],args:{name:"PROJECT",generators:j},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--impacted-by" parameter expands this selection to include PROJECT and any projects that depend on PROJECT (and thus might be broken by changes to PROJECT). "." can be used as shorthand for the project in the current working directory. Note that this parameter is "unsafe" as it may produce a selection that excludes some dependencies. For details, refer to the website article "Selecting subsets of projects"'},{name:["-I","--impacted-by-except"],args:{name:"PROJECT",generators:j},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each "--impacted-by-except" parameter works the same as "--impacted-by" except that PROJECT itself is not added to the selection. "." can be used as shorthand for the project in the current working directory. Note that this parameter is "unsafe" as it may produce a selection that excludes some dependencies. For details, refer to the website article "Selecting subsets of projects"'},{name:"--to-version-policy",args:{name:"VERSION_POLICY_NAME"},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. The "--to-version-policy" parameter is equivalent to specifying "--to" for each of the projects belonging to VERSION_POLICY_NAME. For details, refer to the website article "Selecting subsets of projects"'},{name:"--from-version-policy",args:{name:"VERSION_POLICY_NAME"},description:'Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. The "--from-version-policy" parameter is equivalent to specifying "--from" for each of the projects belonging to VERSION_POLICY_NAME. For details, refer to the website article "Selecting subsets of projects"'}],K={name:"rush",description:"Multi-Project Build Tool",subcommands:[{name:"add",description:"Adds one or more dependencies to the package.json and runs rush update",options:[{name:["-p","--package"],description:"Specify package to the dependencies of the current project",isRequired:!0,isRepeatable:!0,args:{name:"PACKAGE",generators:v,debounce:!0}},{name:"--exact",description:"If specified, the SemVer specifier added to the package.json will be an exact version (e.g. without tilde or caret)"},{name:"--caret",description:'If specified, the SemVer specifier added to the package.json will be a prepended with a "caret" specifier ("^")'},{name:"--dev",description:'If specified, the package will be added to the "devDependencies" section of the package.json'},{name:["-m","--make-consistent"],description:"If specified, other packages with this dependency will have their package.json files updated to use the same version of the dependency"},{name:["-s","--skip-update"],description:'If specified, the "rush update" command will not be run after updating the package.json files'},{name:"--all",description:"If specified, the dependency will be added to all projects"}]},{name:"change",description:"Records changes made to projects, indicating how the package version number should be bumped for the next publish",options:[{name:["-v","--verify"],description:"Verify the change file has been generated and that it is a valid JSON file"},{name:"--no-fetch",description:'Skips fetching the baseline branch before running "git diff" to detect changes'},{name:["-b","--target-branch"],description:'If this parameter is specified, compare the checked out branch with the specified branch to determine which projects were changed. If this parameter is not specified, the checked out branch is compared against the "master" branch',args:{name:"BRANCH"}},{name:"--overwrite",description:"If a changefile already exists, overwrite without prompting (or erroring in --bulk mode)"},{name:"--email",args:{name:"EMAIL"},description:"The email address to use in changefiles. If this parameter is not provided, the email address will be detected or prompted for in interactive mode"},{name:"--bulk",description:"If this flag is specified, apply the same change message and bump type to all changed projects. The --message and the --bump-type parameters must be specified if the --bulk parameter is specified"},{name:"--message",args:{name:"MESSAGE"},description:"The message to apply to all changed projects if the --bulk flag is provided"},{name:"--bump-type",args:{name:"BUMP_TYPE",suggestions:["major","minor","patch","none"]},description:"The bump type to apply to all changed projects if the --bulk flag is provided"}]},{name:"check",description:"Checks each project's package.json files and ensures that all dependencies are of the same version throughout the repository",options:[{name:"--variant",description:"Run command using a variant installation configuration. This parameter may alternatively be specified via the RUSH_VARIANT environment variable",args:{name:"VARIANT"}},{name:"--json",description:"If this flag is specified, output will be in JSON format"}]},{name:"deploy",description:"Prepares a deployment by copying a subset of Rush projects and their dependencies to a target folder",options:[{name:["-p","--project"],args:{name:"PROJECT_NAME"},description:'Specifies the name of the main Rush project to be deployed. It must appear in the "deploymentProjectNames" setting in the deployment config file'},{name:["-s","--scenario"],args:{name:"SCENARIO_NAME"},description:'By default, the deployment configuration is specified in "common/config/rush/deploy.json". You can use "--scenario" to specify an alternate name. The name must be lowercase and separated by dashes. For example, if SCENARIO_NAME is "web", then the config file would be "common/config/rush/deploy-web.json"'},{name:"--overwrite",description:"By default, deployment will fail if the target folder is not empty. SPECIFYING THIS FLAG WILL RECURSIVELY DELETE EXISTING CONTENTS OF THE TARGET FOLDER"},{name:["-t","--target-folder"],args:{name:"PATH"},description:'By default, files are deployed to the "common/deploy" folder inside the Rush repo. Use this parameter to specify a different location. WARNING: USE CAUTION WHEN COMBINING WITH "--overwrite". This parameter may alternatively be specified via the RUSH_DEPLOY_TARGET_FOLDER environment variable'},{name:"--create-archive",args:{name:"ARCHIVE_PATH"},description:'If specified, after the deployment has been prepared, "rush deploy" will create an archive containing the contents of the target folder. The newly created archive file will be placed according to the designated path, relative to the target folder. Supported file extensions: .zip'}]},{name:"init",description:"Initializes a new repository to be managed by Rush",options:[{name:"--overwrite-existing",description:'By default "rush init" will not overwrite existing config files. Specify this switch to override that. This can be useful when upgrading your repo to a newer release of Rush. WARNING: USE WITH CARE!'},{name:"--rush-example-repo",description:'When copying the template config files, this uncomments fragments that are used by the "rush-example" GitHub repo, which is a sample monorepo that illustrates many Rush features. This option is primarily intended for maintaining that example'}]},{name:"init-autoinstaller",description:"Initializes a new autoinstaller",options:[{name:"--name",args:{name:"AUTOINSTALLER_NAME"},description:"Specifies the name of the autoinstaller folder, which must conform to the naming rules for NPM packages"}]},{name:"init-deploy",description:'Creates a deployment scenario config file for use with "rush deploy"',options:[{name:["-p","--project"],args:{name:"PROJECT_NAME"},description:'Specifies the name of the main Rush project to be deployed in this scenario. It will be added to the "deploymentProjectNames" setting'},{name:["-s","--scenario"],args:{name:"SCENARIO"},description:'By default, the deployment configuration will be written to "common/config/rush/deploy.json". You can use "--scenario" to specify an alternate name. The name must be lowercase and separated by dashes. For example, if the name is "web", then the config file would be "common/config/rush/deploy-web.json"'}]},{name:"install",description:"Install package dependencies for all projects in the repo according to the shrinkwrap file",options:[{name:["-p","--purge"],description:'Perform "rush purge" before starting the installation'},{name:"--bypass-policy",description:'Overrides enforcement of the "gitPolicy" rules from rush.json (use honorably!)'},{name:"--no-link",description:'If "--no-link" is specified, then project symlinks will NOT be created after the installation completes. You will need to run "rush link" manually. This flag is useful for automated builds that want to report stages individually or perform extra operations in between the two stages. This flag is not supported when using workspaces'},{name:"--network-concurrency",args:{name:"COUNT"},description:"If specified, limits the maximum number of concurrent network requests. This is useful when troubleshooting network failures"},{name:"--debug-package-manager",description:"Activates verbose logging for the package manager. You will probably want to pipe the output of Rush to a file when using this command"},{name:"--max-install-attempts",args:{name:"NUMBER"},description:"Overrides the default maximum number of install attempts. The default value is 3"},{name:"--ignore-hooks",description:'Skips execution of the "eventHooks" scripts defined in rush.json. Make sure you know what you are skipping'},{name:"--variant",args:{name:"VARIANT"},description:"Run command using a variant installation configuration. This parameter may alternatively be specified via the RUSH_VARIANT environment variable"},...L,{name:"--check-only",description:"Only check the validity of the shrinkwrap file without performing an install"}]},{name:"link",description:"Create node_modules symlinks for all projects",options:[{name:["-f","--force"],description:"Deletes and recreates all links, even if the filesystem state seems to indicate that this is unnecessary"}]},{name:"list",description:"List package information for all projects in the repo",options:[{name:["-v","--version"],description:"If this flag is specified, the project version will be displayed in a column along with the package name"},{name:["-p","--path"],description:"If this flag is specified, the project path will be displayed in a column along with the package name"},{name:"--full-path",description:"If this flag is specified, the project full path will be displayed in a column along with the package name"},{name:"--detailed",description:"For the non --json view, if this flag is specified, include path (-p), version (-v) columns along with the project's applicable: versionPolicy, versionPolicyName, shouldPublish, and reviewPolicy fields"},{name:"--json",description:"If this flag is specified, output will be in JSON format"}]},{name:"publish",description:'Reads and processes package publishing change requests generated by "rush change"',options:[{name:["-a","--apply"],description:"If this flag is specified, the change requests will be applied to package.json files"},{name:["-b","--target-branch"],args:{name:"BRANCH"},description:"If this flag is specified, applied changes and deleted change requests will be committed and merged into the target branch"},{name:["-p","--publish"],description:"If this flag is specified, applied changes will be published to the NPM registry"},{name:"--add-commit-details",description:"Adds commit author and hash to the changelog.json files for each change"},{name:"--regenerate-changelogs",description:"Regenerates all changelog files based on the current JSON content"},{name:["-r","--registry"],args:{name:"REGISTRY"},description:"Publishes to a specified NPM registry. If this is specified, it will prevent the current commit will not be tagged"},{name:["-n","--npm-auth-token"],args:{name:"TOKEN"},deprecated:!0,description:"(DEPRECATED) Specifies the authentication token to use during publishing. This parameter is deprecated because command line parameters may be readable by unrelated processes on a lab machine. Instead, a safer practice is to pass the token via an environment variable and reference it from your common/config/rush/.npmrc-publish file"},{name:["-t","--tag"],args:{name:"TAG"},description:"The tag option to pass to npm publish. By default NPM will publish using the 'latest' tag, even if the package is older than the current latest, so in publishing workflows for older releases, providing a tag is important. When hotfix changes are made, this parameter defaults to 'hotfix'"},{name:"--set-access-level",args:{name:"ACCESS_LEVEL",suggestions:["public","restricted"]},description:'By default, when Rush invokes "npm publish" it will publish scoped packages with an access level of "restricted". Scoped packages can be published with an access level of "public" by specifying that value for this flag with the initial publication. NPM always publishes unscoped packages with an access level of "public". For more information, see the NPM documentation for the "--access" option of "npm publish"'},{name:"--pack",description:"Packs projects into tarballs instead of publishing to npm repository. It can only be used when --include-all is specified. If this flag is specified, NPM registry related parameters will be ignored"},{name:"--release-folder",args:{name:"FOLDER"},description:"This parameter is used with --pack parameter to provide customized location for the tarballs instead of the default value"},{name:"--include-all",description:"If this flag is specified, all packages with shouldPublish=true in rush.json or with a specified version policy will be published if their version is newer than published version"},{name:"--version-policy",args:{name:"POLICY"},description:"Version policy name. Only projects with this version policy will be published if used with --include-all"},{name:"--prerelease-name",args:{name:"NAME"},description:"Bump up to a prerelease version with the provided prerelease name. Cannot be used with --suffix"},{name:"--partial-prerelease",description:"Used with --prerelease-name. Only bump packages to a prerelease version if they have changes"},{name:"--suffix",args:{name:"SUFFIX"},description:"Append a suffix to all changed versions. Cannot be used with --prerelease-name"},{name:"--force",description:"If this flag is specified with --publish, packages will be published with --force on npm"},{name:"--apply-git-tags-on-pack",description:"If specified with --publish and --pack, git tags will be applied for packages as if a publish was being run without --pack"},{name:["-c","--commit"],args:{name:"COMMIT_ID"},description:"Used in conjunction with git tagging -- apply git tags at the commit hash specified. If not provided, the current HEAD will be tagged"},{name:"--ignore-git-hooks",description:"Skips execution of all git hooks. Make sure you know what you are skipping"}]},{name:"purge",description:"For diagnostic purposes, use this command to delete caches and other temporary files used by Rush",options:[{name:"--unsafe",description:`(UNSAFE!) Also delete shared files such as the package manager instances stored in the ".rush" folder in the user's home directory. This is a more aggressive fix that is NOT SAFE to run in a live environment because it will cause other concurrent Rush processes to fail`}]},{name:"scan",description:"When migrating projects into a Rush repo, this command is helpful for detecting undeclared dependencies",options:[{name:"--json",description:"If this flag is specified, output will be in JSON format"},{name:"--all",description:"If this flag is specified, output will list all detected dependencies"}]},{name:"setup",description:"(EXPERIMENTAL) Invoke this command before working in a new repo to ensure that any required prerequisites are installed and permissions are configured"},{name:"unlink",description:"Delete node_modules symlinks for all projects in the repo"},{name:"update",description:"Install package dependencies for all projects in the repo, and create or update the shrinkwrap file as needed",options:[{name:["-p","--purge"],description:'Perform "rush purge" before starting the installation'},{name:"--bypass-policy",description:'Overrides enforcement of the "gitPolicy" rules from rush.json (use honorably!)'},{name:"--no-link",description:'If "--no-link" is specified, then project symlinks will NOT be created after the installation completes. You will need to run "rush link" manually. This flag is useful for automated builds that want to report stages individually or perform extra operations in between the two stages. This flag is not supported when using workspaces'},{name:"--network-concurrency",args:{name:"COUNT"},description:"If specified, limits the maximum number of concurrent network requests. This is useful when troubleshooting network failures"},{name:"--debug-package-manager",description:"Activates verbose logging for the package manager. You will probably want to pipe the output of Rush to a file when using this command"},{name:"--max-install-attempts",args:{name:"NUMBER"},description:"Overrides the default maximum number of install attempts. The default value is 3"},{name:"--ignore-hooks",description:'Skips execution of the "eventHooks" scripts defined in rush.json. Make sure you know what you are skipping'},{name:"--variant",args:{name:"VARIANT"},description:"Run command using a variant installation configuration. This parameter may alternatively be specified via the RUSH_VARIANT environment variable"},{name:"--full",description:'Normally "rush update" tries to preserve your existing installed versions and only makes the minimum updates needed to satisfy the package.json files. This conservative approach prevents your PR from getting involved with package updates that are unrelated to your work. Use "--full" when you really want to update all dependencies to the latest SemVer-compatible version. This should be done periodically by a person or robot whose role is to deal with potential upgrade regressions'},{name:"--recheck",description:`If the shrinkwrap file appears to already satisfy the package.json files, then "rush update" will skip invoking the package manager at all. In certain situations this heuristic may be inaccurate. Use the "--recheck" flag to force the package manager to process the shrinkwrap file. This will also update your shrinkwrap file with Rush's fixups. (To minimize shrinkwrap churn, these fixups are normally performed only in the temporary folder.)`}]},{name:"update-autoinstaller",description:"Updates autoinstaller package dependenices",options:[{name:"--name",args:{name:"AUTOINSTALLER_NAME"},description:"Specifies the name of the autoinstaller, which must be one of the folders under common/autoinstallers"}]},{name:"update-cloud-credentials",description:"(EXPERIMENTAL) Update the credentials used by the build cache provider",options:[{name:["-i","--interactive"],description:"Run the credential update operation in interactive mode, if supported by the provider"},{name:"--credential",args:{name:"CREDENTIAL_STRING"},description:"A static credential, to be cached"},{name:["-d","--delete"],description:"If specified, delete stored credentials"}]},{name:"version",description:"Manage package versions in the repo",options:[{name:["-b","--target-branch"],args:{name:"BRANCH"},description:"If this flag is specified, changes will be committed and merged into the target branch"},{name:"--ensure-version-policy",description:"Updates package versions if needed to satisfy version policies"},{name:"--override-version",args:{name:"NEW_VERSION"},description:"Override the version in the specified --version-policy. This setting only works for lock-step version policy and when --ensure-version-policy is specified"},{name:"--bump",description:"Bumps package version based on version policies"},{name:"--bypass-policy",description:'Overrides "gitPolicy" enforcement (use honorably!)'},{name:"--version-policy",args:{name:"POLICY"},description:"The name of the version policy"},{name:"--override-bump",args:{name:"BUMPTYPE"},description:"Overrides the bump type in the version-policy.json for the specified version policy. Valid BUMPTYPE values include: prerelease, patch, preminor, minor, major. This setting only works for lock-step version policy in bump action"},{name:"--override-prerelease-id",args:{name:"ID"},description:'Overrides the prerelease identifier in the version value of version-policy.json for the specified version policy. This setting only works for lock-step version policy. This setting increases to new prerelease id when "--bump" is provided but only replaces the prerelease name when "--ensure-version-policy" is provided'},{name:"--ignore-git-hooks",description:"Skips execution of all git hooks. Make sure you know what you are skipping"}]},{name:"build",description:"Build all projects that haven't been built, or have changed since they were last built",options:[{name:["-p","--parallelism"],args:{name:"COUNT"},description:'Specifies the maximum number of concurrent processes to launch during a build. The COUNT should be a positive integer or else the word "max" to specify a count that is equal to the number of CPU cores. If this parameter is omitted, then the default value depends on the operating system and number of CPU cores. This parameter may alternatively be specified via the RUSH_PARALLELISM environment variable'},...L,{name:["-v","--verbose"],description:"Display the logs during the build, rather than just displaying the build status summary"},{name:["-c","--changed-projects-only"],description:'Normally the incremental build logic will rebuild changed projects as well as any projects that directly or indirectly depend on a changed project. Specify "--changed-projects-only" to ignore dependent projects, only rebuilding those projects whose files were changed. Note that this parameter is "unsafe"; it is up to the developer to ensure that the ignored projects are okay to ignore'},{name:"--ignore-hooks",description:'Skips execution of the "eventHooks" scripts defined in rush.json. Make sure you know what you are skipping'}]},{name:"rebuild",description:"Clean and rebuild the entire set of projects",options:[{name:["-p","--parallelism"],args:{name:"COUNT"},description:'Specifies the maximum number of concurrent processes to launch during a build. The COUNT should be a positive integer or else the word "max" to specify a count that is equal to the number of CPU cores. If this parameter is omitted, then the default value depends on the operating system and number of CPU cores. This parameter may alternatively be specified via the RUSH_PARALLELISM environment variable'},...L,{name:["-v","--verbose"],description:"Display the logs during the build, rather than just displaying the build status summary"},{name:"--ignore-hooks",description:'Skips execution of the "eventHooks" scripts defined in rush.json. Make sure you know what you are skipping'}]},{name:"tab-complete",description:"Provides tab completion",options:[{name:"--word",args:{name:"WORD"},description:'The word to complete. The default value is ""'},{name:"--position",args:{name:"INDEX"},description:"The position in the word to be completed. The default value is 0"}]}],options:[{name:["-h","--help"],description:"Show this help message and exit",isPersistent:!0},{name:["-d","--debug"],description:"Show the full call stack if an error occurs while executing the tool"}]},ne=K;export{ne as default};