@microsoft/managed-apps-cli 0.21.0 → 0.22.0

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 (67) hide show
  1. package/README.md +1 -1
  2. package/dist/{AddConnector-4AMM746J.js → AddConnector-5DUBFLEK.js} +2 -2
  3. package/dist/{AuthStatus-ZZIP3LBD.js → AuthStatus-6DMK7O6W.js} +2 -2
  4. package/dist/{AuthSwitch-HK7JU2FR.js → AuthSwitch-NUQIIRCG.js} +2 -2
  5. package/dist/Bin.js +1 -1
  6. package/dist/{BuildMaafApp-MOTZOLJZ.js → BuildMaafApp-A4IUU6LI.js} +2 -2
  7. package/dist/{Cli-6CCXMCPX.js → Cli-LYSWG64H.js} +5 -5
  8. package/dist/CloneMaafApp-B672N7T5.js +11 -0
  9. package/dist/CreateMaafApp-RWL7FXSP.js +20 -0
  10. package/dist/{DeleteMaafApp-MZVGIAX3.js → DeleteMaafApp-GT4CEFAE.js} +2 -2
  11. package/dist/{DeployMaafApp-KXATM3E3.js → DeployMaafApp-E4TQU6RO.js} +4 -4
  12. package/dist/{Dev-SHIA5S7X.js → Dev-ICCA5DEJ.js} +2 -2
  13. package/dist/{EnvironmentVariableAuthenticationProvider-5YTMRAE4.js → EnvironmentVariableAuthenticationProvider-LYCQ5D47.js} +2 -2
  14. package/dist/{GetMaafBuildStatus-3W7LI5TJ.js → GetMaafBuildStatus-UGAHVANE.js} +2 -2
  15. package/dist/{GetSettings-NM6H2U5F.js → GetSettings-ZI2IBKV5.js} +2 -2
  16. package/dist/InfoMaafApp-FL5PICDD.js +13 -0
  17. package/dist/{Init-CH5DUQWA.js → Init-XCSK3WQM.js} +2 -2
  18. package/dist/{ListConnectorActions-7SIFGPYR.js → ListConnectorActions-B2YD24RX.js} +2 -2
  19. package/dist/{ListConnectors-TRKIWRVQ.js → ListConnectors-MYUEVJPT.js} +2 -2
  20. package/dist/{ListMaafApps-RT3PGZSJ.js → ListMaafApps-3W6W6UYP.js} +2 -2
  21. package/dist/{Login-HG5S7LBC.js → Login-7RW6OEST.js} +2 -2
  22. package/dist/{Logout-BUPHLOAH.js → Logout-IXK2TMRL.js} +2 -2
  23. package/dist/{MockFetch-4CYTSNJ7.js → MockFetch-THQJ4KFB.js} +2 -2
  24. package/dist/{NodeMsalAuthenticationProvider-HTH3V3G2.js → NodeMsalAuthenticationProvider-VVQ6CCZ5.js} +2 -2
  25. package/dist/Pack-IWU3PFQL.js +8 -0
  26. package/dist/PlayMaafApp-5H3DCJ2C.js +12 -0
  27. package/dist/{RefreshDataSource-ZFZJXJ5L.js → RefreshDataSource-XQT7LVMO.js} +2 -2
  28. package/dist/{RefreshGitAuth-5A3SX2HC.js → RefreshGitAuth-IQBAFR37.js} +2 -2
  29. package/dist/{RemoveDataSource-57JJLK5I.js → RemoveDataSource-PGPLMJUX.js} +2 -2
  30. package/dist/{ServicePrincipalAuthenticationProvider-SVKDZG6X.js → ServicePrincipalAuthenticationProvider-IZZRJFZQ.js} +2 -2
  31. package/dist/{SetSetting-RB3F7IXG.js → SetSetting-SEWDA4TF.js} +2 -2
  32. package/dist/{ShareLinkCreate-7BCDPWY6.js → ShareLinkCreate-T5FN47J2.js} +2 -2
  33. package/dist/{ShareLinkList-4BI3WMNN.js → ShareLinkList-6JCVEYNC.js} +2 -2
  34. package/dist/{ShareLinkRevoke-EEJVCRCY.js → ShareLinkRevoke-OH5DZDHR.js} +2 -2
  35. package/dist/{ShareList-LJDAEGI3.js → ShareList-QCEL7QNJ.js} +2 -2
  36. package/dist/{ShareMaafApp-QFRXLYUD.js → ShareMaafApp-6MKZ33HW.js} +2 -2
  37. package/dist/{TelemetrySettings-A474HALH.js → TelemetrySettings-RXPPIEVO.js} +2 -2
  38. package/dist/{UnshareMaafApp-423RNXCN.js → UnshareMaafApp-OSE2TOBJ.js} +2 -2
  39. package/dist/{chunk-YIKNM523.js → chunk-23T63QIT.js} +2 -2
  40. package/dist/chunk-3JIZGVCA.js +11 -0
  41. package/dist/chunk-47LJLFDF.js +11 -0
  42. package/dist/{chunk-G33Q5FWT.js → chunk-4LIR3ZYP.js} +243 -243
  43. package/dist/{chunk-MFPX2RFH.js → chunk-4VBFOKV6.js} +2 -2
  44. package/dist/chunk-6LKH5WE7.js +104 -0
  45. package/dist/{chunk-EV3TTTOT.js → chunk-6RSE3J4X.js} +2 -2
  46. package/dist/chunk-7BRIEYGR.js +20 -0
  47. package/dist/{chunk-UBTSW22U.js → chunk-7GGFN2IW.js} +2 -2
  48. package/dist/{chunk-QSB5P4RM.js → chunk-AQLFVAFU.js} +11 -11
  49. package/dist/{chunk-NP2KJOYC.js → chunk-EQCYKUEU.js} +2 -2
  50. package/dist/{chunk-7NXJAIJX.js → chunk-EX6IKPAO.js} +2 -2
  51. package/dist/{chunk-VFSTQAZ2.js → chunk-IQGMFWXB.js} +2 -2
  52. package/dist/{chunk-3BRAT6NP.js → chunk-KYL2Y5G4.js} +2 -2
  53. package/dist/{chunk-6FFQN2SO.js → chunk-LQ65CHNN.js} +2 -2
  54. package/dist/{chunk-U36HMOQW.js → chunk-PPW4XUZO.js} +9 -9
  55. package/dist/{chunk-5AUOEXAR.js → chunk-SNWTSI75.js} +2 -2
  56. package/dist/{chunk-S5HEU7XK.js → chunk-UNJJUCSA.js} +2 -2
  57. package/dist/{chunk-QAFCXGBD.js → chunk-VMSJG53Y.js} +2 -2
  58. package/package.json +4 -4
  59. package/dist/CreateMaafApp-TUO72CW7.js +0 -20
  60. package/dist/GetMaafApp-ELB5KMHW.js +0 -11
  61. package/dist/Pack-AHKC2MYF.js +0 -8
  62. package/dist/PlayMaafApp-LWKJU2IN.js +0 -12
  63. package/dist/ShowMaafApp-3KK6NUG2.js +0 -11
  64. package/dist/chunk-6MXOK2LG.js +0 -11
  65. package/dist/chunk-DREO7EYO.js +0 -20
  66. package/dist/chunk-VNEZZ3RI.js +0 -11
  67. package/dist/chunk-W7EWOZPO.js +0 -104
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __pathDirname(__filename);
7
- import{va as Z}from"./chunk-G33Q5FWT.js";import{b as j}from"./chunk-RBG2H562.js";import{i as k}from"./chunk-PVAIJSAI.js";import{a as G}from"./chunk-U36HMOQW.js";import{b as Gt,d as mt}from"./chunk-UT667QSU.js";var it=Gt((Ee,Tt)=>{"use strict";var st={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let s="";return t<0?s+=`\x1B[${-t}D`:t>0&&(s+=`\x1B[${t}C`),e<0?s+=`\x1B[${-e}A`:e>0&&(s+=`\x1B[${e}B`),s},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Qt={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},te={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let s=0;s<t;s++)e+=this.line+(s<t-1?st.up():"");return t&&(e+=st.left),e}};Tt.exports={cursor:st,scroll:Qt,erase:te,beep:"\x07"}});import{styleText as ee}from"node:util";import{stdout as At,stdin as se}from"node:process";import ie from"node:readline";var gt=(()=>{let t=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return e=>{let s=0;for(t.lastIndex=0;t.test(e);)s+=1;return e.length-s}})(),ft=t=>t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510,$t=t=>t===8987||t===9001||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t>=131072&&t<=196605||t>=196608&&t<=262141;var kt=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,jt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,yt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,Wt=/\t{1,1000}/y,vt=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),Ut=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Bt=new RegExp("\\p{M}+","gu"),Kt={limit:1/0,ellipsis:""},wt=(t,e={},s={})=>{let i=e.limit??1/0,r=e.ellipsis??"",n=e?.ellipsisWidth??(r?wt(r,Kt,s).width:0),o=0,a=s.controlWidth??0,l=s.tabWidth??8,h=s.emojiWidth??2,m=2,c=s.regularWidth??1,d=s.wideWidth??m,y=[[Ut,c],[kt,o],[jt,a],[Wt,l],[vt,h],[yt,d]],g=0,f=0,b=t.length,E=0,A=!1,V=b,F=Math.max(0,i-n),v=0,I=0,w=0,_=0;t:for(;;){if(I>v||f>=b&&f>g){let S=t.slice(v,I)||t.slice(g,f);E=0;for(let O of S.replaceAll(Bt,"")){let x=O.codePointAt(0)||0;if(ft(x)?_=m:$t(x)?_=d:_=c,w+_>F&&(V=Math.min(V,Math.max(v,g)+E)),w+_>i){A=!0;break t}E+=O.length,w+=_}v=I=0}if(f>=b)break t;for(let S=0,O=y.length;S<O;S++){let[x,dt]=y[S];if(x.lastIndex=f,x.test(t)){if(E=x===yt?gt(t.slice(f,x.lastIndex)):x===vt?1:x.lastIndex-f,_=E*dt,w+_>F&&(V=Math.min(V,f+Math.floor((F-w)/dt))),w+_>i){A=!0;break t}w+=_,v=g,I=f,f=g=x.lastIndex;continue t}}f+=1}return{width:A?F:w,index:A?V:b,truncated:A,ellipsed:A&&i>=n}},It=wt;var Ht={limit:1/0,ellipsis:"",ellipsisWidth:0},qt=(t,e={})=>It(t,Ht,e).width,T=qt;var W="\x1B",Ct="\x9B",Jt=39,tt="\x07",Et="[",Yt="]",Mt="m",et=`${Yt}8;;`,bt=new RegExp(`(?:\\${Et}(?<code>\\d+)m|\\${et}(?<uri>.*)${tt})`,"y"),_t=t=>{if(t>=30&&t<=37||t>=90&&t<=97)return 39;if(t>=40&&t<=47||t>=100&&t<=107)return 49;if(t===1||t===2)return 22;if(t===3)return 23;if(t===4)return 24;if(t===7)return 27;if(t===8)return 28;if(t===9)return 29;if(t===0)return 0},St=t=>`${W}${Et}${t}${Mt}`,xt=t=>`${W}${et}${t}${tt}`,Q=(t,e,s)=>{let i=e[Symbol.iterator](),r=!1,n=!1,o=t.at(-1),a=o===void 0?0:T(o),l=i.next(),h=i.next(),m=0;for(;!l.done;){let c=l.value,d=T(c);a+d<=s?t[t.length-1]+=c:(t.push(c),a=0),(c===W||c===Ct)&&(r=!0,n=e.startsWith(et,m+1)),r?n?c===tt&&(r=!1,n=!1):c===Mt&&(r=!1):(a+=d,a===s&&!h.done&&(t.push(""),a=0)),l=h,h=i.next(),m+=c.length}o=t.at(-1),!a&&o!==void 0&&o.length&&t.length>1&&(t[t.length-2]+=t.pop())},zt=t=>{let e=t.split(" "),s=e.length;for(;s&&!T(e[s-1]);)s--;return s===e.length?t:e.slice(0,s).join(" ")+e.slice(s).join("")},Xt=(t,e,s={})=>{if(s.trim!==!1&&t.trim()==="")return"";let i="",r,n,o=t.split(" "),a=[""],l=0;for(let c=0;c<o.length;c++){let d=o[c];if(s.trim!==!1){let g=a.at(-1)??"",f=g.trimStart();g.length!==f.length&&(a[a.length-1]=f,l=T(f))}c!==0&&(l>=e&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),l=0),(l||s.trim===!1)&&(a[a.length-1]+=" ",l++));let y=T(d);if(s.hard&&y>e){let g=e-l,f=1+Math.floor((y-g-1)/e);Math.floor((y-1)/e)<f&&a.push(""),Q(a,d,e),l=T(a.at(-1)??"");continue}if(l+y>e&&l&&y){if(s.wordWrap===!1&&l<e){Q(a,d,e),l=T(a.at(-1)??"");continue}a.push(""),l=0}if(l+y>e&&s.wordWrap===!1){Q(a,d,e),l=T(a.at(-1)??"");continue}a[a.length-1]+=d,l+=y}s.trim!==!1&&(a=a.map(c=>zt(c)));let h=a.join(`
7
+ import{va as Z}from"./chunk-4LIR3ZYP.js";import{b as j}from"./chunk-RBG2H562.js";import{i as k}from"./chunk-PVAIJSAI.js";import{a as G}from"./chunk-PPW4XUZO.js";import{b as Gt,d as mt}from"./chunk-UT667QSU.js";var it=Gt((Ee,Tt)=>{"use strict";var st={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let s="";return t<0?s+=`\x1B[${-t}D`:t>0&&(s+=`\x1B[${t}C`),e<0?s+=`\x1B[${-e}A`:e>0&&(s+=`\x1B[${e}B`),s},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Qt={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},te={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let s=0;s<t;s++)e+=this.line+(s<t-1?st.up():"");return t&&(e+=st.left),e}};Tt.exports={cursor:st,scroll:Qt,erase:te,beep:"\x07"}});import{styleText as ee}from"node:util";import{stdout as At,stdin as se}from"node:process";import ie from"node:readline";var gt=(()=>{let t=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return e=>{let s=0;for(t.lastIndex=0;t.test(e);)s+=1;return e.length-s}})(),ft=t=>t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510,$t=t=>t===8987||t===9001||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12771||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=19903||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t>=131072&&t<=196605||t>=196608&&t<=262141;var kt=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,jt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,yt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,Wt=/\t{1,1000}/y,vt=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),Ut=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Bt=new RegExp("\\p{M}+","gu"),Kt={limit:1/0,ellipsis:""},wt=(t,e={},s={})=>{let i=e.limit??1/0,r=e.ellipsis??"",n=e?.ellipsisWidth??(r?wt(r,Kt,s).width:0),o=0,a=s.controlWidth??0,l=s.tabWidth??8,h=s.emojiWidth??2,m=2,c=s.regularWidth??1,d=s.wideWidth??m,y=[[Ut,c],[kt,o],[jt,a],[Wt,l],[vt,h],[yt,d]],g=0,f=0,b=t.length,E=0,A=!1,V=b,F=Math.max(0,i-n),v=0,I=0,w=0,_=0;t:for(;;){if(I>v||f>=b&&f>g){let S=t.slice(v,I)||t.slice(g,f);E=0;for(let O of S.replaceAll(Bt,"")){let x=O.codePointAt(0)||0;if(ft(x)?_=m:$t(x)?_=d:_=c,w+_>F&&(V=Math.min(V,Math.max(v,g)+E)),w+_>i){A=!0;break t}E+=O.length,w+=_}v=I=0}if(f>=b)break t;for(let S=0,O=y.length;S<O;S++){let[x,dt]=y[S];if(x.lastIndex=f,x.test(t)){if(E=x===yt?gt(t.slice(f,x.lastIndex)):x===vt?1:x.lastIndex-f,_=E*dt,w+_>F&&(V=Math.min(V,f+Math.floor((F-w)/dt))),w+_>i){A=!0;break t}w+=_,v=g,I=f,f=g=x.lastIndex;continue t}}f+=1}return{width:A?F:w,index:A?V:b,truncated:A,ellipsed:A&&i>=n}},It=wt;var Ht={limit:1/0,ellipsis:"",ellipsisWidth:0},qt=(t,e={})=>It(t,Ht,e).width,T=qt;var W="\x1B",Ct="\x9B",Jt=39,tt="\x07",Et="[",Yt="]",Mt="m",et=`${Yt}8;;`,bt=new RegExp(`(?:\\${Et}(?<code>\\d+)m|\\${et}(?<uri>.*)${tt})`,"y"),_t=t=>{if(t>=30&&t<=37||t>=90&&t<=97)return 39;if(t>=40&&t<=47||t>=100&&t<=107)return 49;if(t===1||t===2)return 22;if(t===3)return 23;if(t===4)return 24;if(t===7)return 27;if(t===8)return 28;if(t===9)return 29;if(t===0)return 0},St=t=>`${W}${Et}${t}${Mt}`,xt=t=>`${W}${et}${t}${tt}`,Q=(t,e,s)=>{let i=e[Symbol.iterator](),r=!1,n=!1,o=t.at(-1),a=o===void 0?0:T(o),l=i.next(),h=i.next(),m=0;for(;!l.done;){let c=l.value,d=T(c);a+d<=s?t[t.length-1]+=c:(t.push(c),a=0),(c===W||c===Ct)&&(r=!0,n=e.startsWith(et,m+1)),r?n?c===tt&&(r=!1,n=!1):c===Mt&&(r=!1):(a+=d,a===s&&!h.done&&(t.push(""),a=0)),l=h,h=i.next(),m+=c.length}o=t.at(-1),!a&&o!==void 0&&o.length&&t.length>1&&(t[t.length-2]+=t.pop())},zt=t=>{let e=t.split(" "),s=e.length;for(;s&&!T(e[s-1]);)s--;return s===e.length?t:e.slice(0,s).join(" ")+e.slice(s).join("")},Xt=(t,e,s={})=>{if(s.trim!==!1&&t.trim()==="")return"";let i="",r,n,o=t.split(" "),a=[""],l=0;for(let c=0;c<o.length;c++){let d=o[c];if(s.trim!==!1){let g=a.at(-1)??"",f=g.trimStart();g.length!==f.length&&(a[a.length-1]=f,l=T(f))}c!==0&&(l>=e&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),l=0),(l||s.trim===!1)&&(a[a.length-1]+=" ",l++));let y=T(d);if(s.hard&&y>e){let g=e-l,f=1+Math.floor((y-g-1)/e);Math.floor((y-1)/e)<f&&a.push(""),Q(a,d,e),l=T(a.at(-1)??"");continue}if(l+y>e&&l&&y){if(s.wordWrap===!1&&l<e){Q(a,d,e),l=T(a.at(-1)??"");continue}a.push(""),l=0}if(l+y>e&&s.wordWrap===!1){Q(a,d,e),l=T(a.at(-1)??"");continue}a[a.length-1]+=d,l+=y}s.trim!==!1&&(a=a.map(c=>zt(c)));let h=a.join(`
8
8
  `),m=!1;for(let c=0;c<h.length;c++){let d=h[c];if(i+=d,m)m=!1;else if(m=d>="\uD800"&&d<="\uDBFF",m)continue;if(d===W||d===Ct){bt.lastIndex=c+1;let g=bt.exec(h)?.groups;if(g?.code!==void 0){let f=Number.parseFloat(g.code);r=f===Jt?void 0:f}else g?.uri!==void 0&&(n=g.uri.length===0?void 0:g.uri)}if(h[c+1]===`
9
9
  `){n&&(i+=xt(""));let y=r?_t(r):void 0;r&&y&&(i+=St(y))}else d===`
10
10
  `&&(r&&_t(r)&&(i+=St(r)),n&&(i+=xt(n)))}return i},Zt=/\r?\n/;function R(t,e,s){return String(t).normalize().split(Zt).map(i=>Xt(i,e,s)).join(`
@@ -47,4 +47,4 @@ ${a}
47
47
  /*!
48
48
  * Copyright (C) Microsoft Corporation. All rights reserved.
49
49
  */
50
- //# sourceMappingURL=chunk-5AUOEXAR.js.map
50
+ //# sourceMappingURL=chunk-SNWTSI75.js.map
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __pathDirname(__filename);
7
- import{a as e}from"./chunk-EV3TTTOT.js";import{b as t,c as s}from"./chunk-7NXJAIJX.js";import*as r from"os";import*as o from"path";var p=t("WORKING_DIRECTORY")??process.cwd(),E=t("CONFIG_DIR")??o.join(r.homedir(),".ms-cli"),n=o.join(E,"cache","auth"),a=o.join(E,"telemetry"),R="microsoft-managed-apps-cli",C="msal-token-cache",I="x-ms-client-request-id",T="x-ms-target-url",i="x-ms-auth-resource",m="x-ms-body-token-resource",x="userSettings.json",N=`managed-apps-cli/${e.version}`,O=s("USE_MMA_APP_ID")?"c4ee713f-aede-4371-91fc-921aa3a5ded9":"9cee029c-6210-4654-90bb-17e6e9d36617",A="managedappscli";export{p as a,E as b,n as c,a as d,R as e,C as f,I as g,T as h,i,m as j,x as k,N as l,O as m,A as n};
7
+ import{a as e}from"./chunk-6RSE3J4X.js";import{b as t,c as s}from"./chunk-EX6IKPAO.js";import*as r from"os";import*as o from"path";var p=t("WORKING_DIRECTORY")??process.cwd(),E=t("CONFIG_DIR")??o.join(r.homedir(),".ms-cli"),n=o.join(E,"cache","auth"),a=o.join(E,"telemetry"),R="microsoft-managed-apps-cli",C="msal-token-cache",I="x-ms-client-request-id",T="x-ms-target-url",i="x-ms-auth-resource",m="x-ms-body-token-resource",x="userSettings.json",N=`managed-apps-cli/${e.version}`,O=s("USE_MMA_APP_ID")?"c4ee713f-aede-4371-91fc-921aa3a5ded9":"9cee029c-6210-4654-90bb-17e6e9d36617",A="managedappscli";export{p as a,E as b,n as c,a as d,R as e,C as f,I as g,T as h,i,m as j,x as k,N as l,O as m,A as n};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=chunk-S5HEU7XK.js.map
11
+ //# sourceMappingURL=chunk-UNJJUCSA.js.map
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __pathDirname(__filename);
7
- import{a as f}from"./chunk-OL6CTXQR.js";import{Y as c,ua as p}from"./chunk-G33Q5FWT.js";import{a as l}from"./chunk-RBG2H562.js";import{h as m}from"./chunk-PVAIJSAI.js";var b=1e3;function w(t){if(typeof t=="string"){let r=t.trim();return r?{errorMessage:r}:{}}if(!t||typeof t!="object")return{};let e=t,a=typeof e.code=="string"&&e.code.trim()?e.code.trim():void 0;if(typeof e.error=="string"){let r=e.error.trim(),n=g(a,r||void 0);return n?{errorMessage:n}:{}}let d,i,o;if(e.error&&typeof e.error=="object"){let r=e.error.code,n=e.error.message,u=e.error.buildOutput;d=typeof r=="string"&&r.trim()?r.trim():void 0,i=typeof n=="string"&&n.trim()?n.trim():void 0,o=typeof u=="string"&&u.trim()?u.trim():void 0}!i&&typeof e.message=="string"&&e.message.trim()&&(i=e.message.trim()),!o&&typeof e.buildOutput=="string"&&e.buildOutput.trim()&&(o=e.buildOutput.trim());let s=g(d??a,i);return s||o?{errorMessage:s,buildOutput:o}:{}}async function L(t){let e=p(),a=b,d=t.maxIntervalMs??1/0,i=Math.min(d,Math.max(a,t.initialWaitMs)),o=t.deadlineMs!=null?Date.now()+t.deadlineMs:null,s=t.isJsonMode?null:new f;s?.start(t.spinnerLabel??"Waiting for build status...");try{for(;;){if(o!==null&&Date.now()>=o)throw new l(`Build did not complete within ${Math.round(t.deadlineMs/6e4)} minutes. Commit SHA: ${t.commitSha}.`);await S(i);let r=await c({logger:e,actionsParams:{appName:t.appName,commitSha:t.commitSha}});switch(r.status){case"Succeeded":return r;case"Failed":case"Canceled":{s?.stop();let n=w(r.result);!t.isJsonMode&&n.buildOutput&&m(n.buildOutput);let u=n.errorMessage??"",M=u?`Build ${r.status.toLowerCase()}: ${u}.`:`Build ${r.status.toLowerCase()}.`;throw new l(M+(t.commitSha?` Commit SHA: ${t.commitSha}.`:""))}case"NotStarted":case"Running":{let n=r.retryAfterMs??i;i=Math.min(d,Math.max(a,n));break}default:return y(r.status)}}}finally{s?.stop()}}function y(t){throw new l(`Unexpected build status from server: ${String(t)}.`)}function g(t,e){return t&&e?`${t}: ${e}`:t??e}function S(t){return new Promise(e=>setTimeout(e,t))}export{w as a,L as b};
7
+ import{a as f}from"./chunk-OL6CTXQR.js";import{Y as c,ua as p}from"./chunk-4LIR3ZYP.js";import{a as l}from"./chunk-RBG2H562.js";import{h as m}from"./chunk-PVAIJSAI.js";var b=1e3;function w(t){if(typeof t=="string"){let r=t.trim();return r?{errorMessage:r}:{}}if(!t||typeof t!="object")return{};let e=t,a=typeof e.code=="string"&&e.code.trim()?e.code.trim():void 0;if(typeof e.error=="string"){let r=e.error.trim(),n=g(a,r||void 0);return n?{errorMessage:n}:{}}let d,i,o;if(e.error&&typeof e.error=="object"){let r=e.error.code,n=e.error.message,u=e.error.buildOutput;d=typeof r=="string"&&r.trim()?r.trim():void 0,i=typeof n=="string"&&n.trim()?n.trim():void 0,o=typeof u=="string"&&u.trim()?u.trim():void 0}!i&&typeof e.message=="string"&&e.message.trim()&&(i=e.message.trim()),!o&&typeof e.buildOutput=="string"&&e.buildOutput.trim()&&(o=e.buildOutput.trim());let s=g(d??a,i);return s||o?{errorMessage:s,buildOutput:o}:{}}async function L(t){let e=p(),a=b,d=t.maxIntervalMs??1/0,i=Math.min(d,Math.max(a,t.initialWaitMs)),o=t.deadlineMs!=null?Date.now()+t.deadlineMs:null,s=t.isJsonMode?null:new f;s?.start(t.spinnerLabel??"Waiting for build status...");try{for(;;){if(o!==null&&Date.now()>=o)throw new l(`Build did not complete within ${Math.round(t.deadlineMs/6e4)} minutes. Commit SHA: ${t.commitSha}.`);await S(i);let r=await c({logger:e,actionsParams:{appName:t.appName,commitSha:t.commitSha}});switch(r.status){case"Succeeded":return r;case"Failed":case"Canceled":{s?.stop();let n=w(r.result);!t.isJsonMode&&n.buildOutput&&m(n.buildOutput);let u=n.errorMessage??"",M=u?`Build ${r.status.toLowerCase()}: ${u}.`:`Build ${r.status.toLowerCase()}.`;throw new l(M+(t.commitSha?` Commit SHA: ${t.commitSha}.`:""))}case"NotStarted":case"Running":{let n=r.retryAfterMs??i;i=Math.min(d,Math.max(a,n));break}default:return y(r.status)}}}finally{s?.stop()}}function y(t){throw new l(`Unexpected build status from server: ${String(t)}.`)}function g(t,e){return t&&e?`${t}: ${e}`:t??e}function S(t){return new Promise(e=>setTimeout(e,t))}export{w as a,L as b};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=chunk-QAFCXGBD.js.map
11
+ //# sourceMappingURL=chunk-VMSJG53Y.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/managed-apps-cli",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "description": "Command-line interface for building and managing Microsoft Managed Apps",
6
6
  "license": "MIT",
@@ -35,9 +35,9 @@
35
35
  "git": ">=2.27.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@microsoft/managed-apps-actions": "0.15.0",
39
- "@microsoft/managed-apps-codegen": "0.2.21",
40
- "@microsoft/managed-apps-common": "0.19.0",
38
+ "@microsoft/managed-apps-actions": "0.16.0",
39
+ "@microsoft/managed-apps-codegen": "0.3.0",
40
+ "@microsoft/managed-apps-common": "0.20.0",
41
41
  "@azure/msal-node": "5.2.2",
42
42
  "@clack/prompts": "1.4.0",
43
43
  "@microsoft/1ds-core-js": "4.3.11",
@@ -1,20 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __pathDirname(__filename);
7
- import{a as ue}from"./chunk-OL6CTXQR.js";import{a as ae,b as pe,d as ce}from"./chunk-VFSTQAZ2.js";import{a as oe,b as se}from"./chunk-YIKNM523.js";import{a as ke}from"./chunk-TYRVM4PP.js";import{a as re}from"./chunk-3BRAT6NP.js";import"./chunk-UBTSW22U.js";import"./chunk-MFPX2RFH.js";import{a as d,e as F}from"./chunk-DREO7EYO.js";import{e as T,i as ie}from"./chunk-5AUOEXAR.js";import{Z as ee,d as K,f as Q,q as X,ua as te,va as ne}from"./chunk-G33Q5FWT.js";import{a as I,b as p,c as U,d as E,e as Z}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import{a as _}from"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{k as i}from"./chunk-6MXOK2LG.js";import{c as Y,d as J,e as z,h as v,i as V}from"./chunk-PVAIJSAI.js";import{a as g}from"./chunk-VNEZZ3RI.js";import{a as q,g as W}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import{d as Te}from"./chunk-UT667QSU.js";import*as l from"fs";import*as he from"os";import*as x from"path";import*as w from"fs";import*as le from"os";import*as k from"path";function G(e){if(!e)throw new p("Template source is empty. Use --template to specify one.");if(/^https?:\/\//i.test(e)){let c;try{c=new URL(e)}catch{throw new p(`Template source '${e}' is not a valid URL.`)}if(c.hostname.toLowerCase()!=="github.com")throw new p(`Template source '${e}' uses host '${c.hostname}'; only github.com URLs are supported.`);let S=c.pathname.split("/").filter(Boolean);if(S.length<2)throw new p(`Template source '${e}' is missing the owner/repo path. Use 'https://github.com/<owner>/<repo>'.`);let[y,R,...f]=S,$=R.endsWith(".git")?R.slice(0,-4):R,O=c.hash?c.hash.slice(1):void 0;if(f.length===0)return{owner:y,repo:$,subdir:"",ref:O};if(f[0].toLowerCase()==="tree"&&f.length>=2)return{owner:y,repo:$,subdir:f.slice(2).join("/"),ref:O??f[1]};throw f[0].toLowerCase()==="blob"?new p(`Template source '${e}' points at a file ('/blob/...'). Templates must be a directory \u2014 use the '/tree/<branch>/<subdir>' URL form instead.`):new p(`Template source '${e}' has an unrecognised path. Use 'https://github.com/<owner>/<repo>' or 'https://github.com/<owner>/<repo>/tree/<branch>/<subdir>'.`)}let t=/^([a-z][a-z0-9+.-]*):/i.exec(e);if(t){let c=t[1].toLowerCase();if(c!=="github"&&c!=="gh")throw new p(`Template source '${e}' uses unsupported provider prefix '${t[1]}:'. Only 'github:' (or 'gh:' shorthand) templates are supported.`)}let n=e.replace(/^(?:github|gh):/i,""),[r,s]=n.split("#",2),o=r.split("/").filter(Boolean);if(o.length<2)throw new p(`Template source '${e}' is missing the owner/repo path. Expected 'github:<owner>/<repo>[/<subdir>]'.`);let[h,A,...a]=o;return{owner:h,repo:A,subdir:a.join("/"),ref:s||void 0}}function de(e,t){let n=G(e),r=`https://github.com/${n.owner}/${n.repo}.git`,s=w.mkdtempSync(k.join(le.tmpdir(),"ms-template-"));try{let o=["clone","--depth=1","--filter=blob:none"];n.subdir&&o.push("--sparse"),n.ref&&o.push("--branch",n.ref),o.push(r,s),d(o,{network:!0}),n.subdir&&d(["-C",s,"sparse-checkout","set",n.subdir]);let h=n.subdir?k.join(s,n.subdir):s;if(!w.existsSync(h))throw new p(`Template subdirectory '${n.subdir}' was not found in https://github.com/${n.owner}/${n.repo}${n.ref?` at ref '${n.ref}'`:""}. If the branch name contains '/', use the 'github:<owner>/<repo>/<subdir>#<branch>' form to disambiguate.`);w.mkdirSync(t.dir,{recursive:!0}),w.cpSync(h,t.dir,{recursive:!0,force:!0,filter:A=>k.basename(A)!==".git"})}finally{w.rmSync(s,{recursive:!0,force:!0})}}var M=Te(ke(),1);function fe(){let e=d(["--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!e.success)throw new E("'git' is required but was not found on PATH.");let t=e.stdout,n=_.engines.git;if(!M.default.validRange(n))return;let r=M.default.coerce(t);if(r&&!M.default.satisfies(r,n))throw new E(`Git ${n} is required (found ${r.version}). Please upgrade git.`)}var Oe="github:microsoft/Managed-Apps/templates/vite8",H="Initial scaffold from 'ms app create'";async function Et(e){Ye(e),await e.runVerb();let t=await e.getTenantIdAsync();if(!t)throw new p("Unable to determine tenant ID. Ensure you are logged in.");let n=te(),{region:r}=X(),s=await e.getOption("displayName");if(!s)throw new p("Argument displayName is required. Use --display-name or -n to specify it.");let o=e.getPositionalArg(0)??process.cwd(),h=await e.getOption("template",!0),A=await e.getOption("repo",!0),{repoType:a,remoteUrl:c}=ce(A),S=await e.getOption("repositoryId",!0),y=e.isJsonMode();if(!y){let u=W(r),b=u?`cloud ${u}`:`region ${r}`;v(`About to create app '${s}' in tenant ${t} (${b}).`)}let R=!y&&process.stdout.isTTY;!y&&!R&&v("Running preflight checks...");let f=R?new ue:null;f?.start("Running preflight checks...");try{if(a==="none"&&S)throw new p("'--repo none' is incompatible with '--repository-id'. Use '--repo none' for an app with no git binding, or omit '--repo' (or pass a repo URL) to use a backing repository.");f?.update("Validating template source..."),_e(h),f?.update("Checking git installation..."),fe(),f?.update("Verifying target directory is writable..."),We(o),a==="github"?(f?.update("Verifying target directory is empty..."),ge(o),f?.update(`Verifying ${c} is empty...`),qe(c)):(f?.update("Verifying target directory is empty..."),me(o))}finally{f?.stop()}let $=await ie(e,{failIfMissing:!1}),O=$?void 0:oe(e,t,n,"CreateMaafApp"),ve=await e.getOption("description",!0),Ee=await e.getOption("buildPath",!0),Re=await e.getOption("buildCommand",!0),Ae=await e.getOption("buildEntryPoint",!0),L=await se($,O);e.updateEnvironmentId(L),a==="github"?ge(o):me(o);let Se=await e.getOption(i.OpenBrowser.camelName,!0)??!1,$e=await e.getOption(i.ForceReauth.camelName,!0)??!1;y&&a==="github"&&z({phase:"create-validation"});let Ce={displayName:s,description:ve,repositoryId:S,remoteUrl:c,repoType:a,origin:ne().origin},Ie=({isRetry:u})=>ee({tenantId:t,environmentId:L,logger:n,actionsParams:{...Ce,...$e&&!u&&{forceReauth:!0}}}),j;try{j=await re(Ie,{repoType:a,externalRepoUrl:c,tenantId:t,jsonMode:y,openBrowser:Se,verb:"app create"})}catch(u){let b=je(u,{repoType:a,environmentId:L});throw b||u}let{app:m,cloneUrl:C}=j;if(a==="native"&&!C){let u=P(m.id,m.environmentId);throw new I(`App '${m.displayName}' was created on the server, but creating a git repository failed. This is a platform-side issue; please report it. In the meantime, the partial app needs to be cleaned up.
8
- `+u)}let B=null;try{if(a==="github"){if(Pe({directory:o,repoUrl:c}),l.readdirSync(o).filter(N=>N!==".git").length>0)throw new p(`Repository ${c} is not empty (must contain no files of any kind, including hidden files like .gitignore, .gitattributes, README, or LICENSE). Choose a different repository to create an app or run 'ms app init' to update the existing app.
9
-
10
- `+P(m.id,m.environmentId))}else a==="native"?F({directory:o,gitUrl:C,loginAuthority:e.getLoginAuthority(t),authResource:e.getAuthResourceUrl()}):l.mkdirSync(o,{recursive:!0});y||v(`Fetching template '${h}' into ${o}...`),de(h,{dir:o}),await pe(o,y,e.getHttpClient());let u=ae({appId:m.id,appDisplayName:m.displayName,description:m.description,environmentId:m.environmentId,repoType:a,cloud:e.getCloud(),buildPath:Ee,buildCommand:Re,buildEntryPoint:Ae,repositoryId:a==="native"?m.repositoryId:void 0,externalRepoUrl:a==="github"?c:void 0});await K(x.join(o,q),u),a!=="none"&&(B=await Ne(o,y,a==="native"?C:void 0))}catch(u){if(u instanceof p&&a!=="native")throw u;let b=u instanceof Error?u.message:String(u),N=`App '${m.displayName}' was created, but local setup failed: ${b}
11
- The local directory ${o} may contain partial files; remove them or choose a new directory before retrying.
12
- `+P(m.id,m.environmentId);throw u instanceof I?(u.message=N,u):new I(N)}y?J({appId:m.id,repoType:a,...a==="github"&&c&&{externalRepoUrl:c},...a==="native"&&C&&{gitRemoteUrl:C},appDir:o,...B&&{push:B}}):(Y(`Created app '${m.displayName}' in ${o}.`),a==="github"?v(`Bound to external repository: ${c}.`):a==="none"&&v("Your app has been created. Run `git init` (or your VCS of choice) when ready; subsequent `ms app deploy` calls do not require a git remote."))}async function Ne(e,t,n){let r=n?void 0:`git add . && git commit -m "${H}" && git push -u origin HEAD`;try{return d(["add","."],{cwd:e}),d(["commit","-m",H],{cwd:e}),n&&Me(e,n,t),d(["push","-u","origin","HEAD"],{cwd:e,network:!0,classify:n?{action:`pushing to ${D(n)}`}:void 0}),{success:!0}}catch(s){let o=s instanceof Error?{name:s.name,message:s.message,stack:s.stack}:typeof s=="object"&&s!==null?{...s}:{message:String(s)};if(!t){s instanceof I&&V(s.message);let h=r?`To finish wiring it up, run:
13
- ${r}`:`Resolve the git issue above, then finish the initial push from ${e}.`;V("Could not commit and push the initial scaffold. Your app and local scaffold are ready. "+h)}return{success:!1,error:o,retryCommand:r}}}function Me(e,t,n){He(t,n,"the initial git fetch and push"),Le(e,t),d(["rev-parse","--verify","origin/main"],{cwd:e,allowFailure:!0,emitStderr:!1}).success&&(d(["reset","--soft","origin/main"],{cwd:e}),d(["commit","-m",H],{cwd:e}))}function Le(e,t){d(["fetch","origin"],{cwd:e,network:!0,allowFailure:!0,emitStderr:!1}).success||d(["fetch","origin"],{cwd:e,network:!0,classify:{action:`fetching from ${D(t)}`}})}var Be=["repository not found","fatal: repository","could not read username","terminal prompts disabled","authentication failed","permission denied","403","remote: not found"];function Ve(e){let t=e.stderr;return typeof t=="string"?t:Buffer.isBuffer(t)?t.toString():t instanceof Uint8Array?Buffer.from(t).toString():""}function ye(e,t){let n=e instanceof Error?e.message:String(e),r=t.trim();return!r||n.includes(r)?n:`${n}
14
- ${r}`}function we(e){let t=e.toLowerCase();return Be.some(n=>t.includes(n))}function be(){return"Make sure the repository exists and that you have access to it."}function Ue({directory:e,repoUrl:t}){return`Failed to clone '${t}' into '${e}'. `+be()}function Fe(e){return`Cannot access repository '${e}', so no app was created. `+be()}function Ge({directory:e,repoUrl:t}){return`Failed to clone '${t}' into '${e}'. See the git output above for details.`}function Pe({directory:e,repoUrl:t}){try{d(["clone",t,e],{emitStderr:!1})}catch(n){let r=Ve(n);r&&process.stderr.write(r);let s=we(r)?Ue({directory:e,repoUrl:t}):Ge({directory:e,repoUrl:t});throw new E(s,{underlyingError:ye(n,r)})}}function D(e){try{return new URL(e).host}catch{return e}}function He(e,t,n){t||v(`Authenticating to ${D(e)} for ${n}. A browser window may open. Sign in with the account associated with this tenant.`)}function P(e,t){return`The server app is still in environment ${t} (id: ${e}).
15
- If you want to clean it up before retrying, run the following command:
16
- ${"ms"} app delete --app ${e} --environment-id ${t} --force`}function De(e){if(e.body)try{let t=JSON.parse(e.body);if(typeof t?.error?.message=="string"&&t.error.message.trim())return t.error.message}catch{}}function je(e,t){if(!(e instanceof Q))return null;let{environmentId:n}=t,r=De(e),s=t.repoType==="native",o="Ask an admin to grant you the required permission in this environment.";if(e.status===401)return new U(r??"Your sign-in session has expired or is invalid. Run `ms auth login` and try again.");if(e.status===403){let h=r??(s?`You do not have permission to create repositories in environment ${n}.`:`You do not have permission to create an app in environment ${n}.`);return new U(`${h} ${o}`)}return e.status===404?new p(r??`Environment ${n} was not found. Verify the environment id and that you have access to it.`):e.status===409?new p(r??`An app with the same name already exists in environment ${n}. Choose a different name.`):e.status===429||e.status===503?new Z(r??"The service is temporarily unavailable or rate-limited. Wait a moment and try again."):null}function _e(e){G(e)}function me(e){if(!l.existsSync(e))return;if(l.readdirSync(e).length>0)throw new p(`'${e}' is not empty. Specify an empty directory as the first argument, or run 'ms app init' to bind an existing project to a new app.`)}function ge(e){if(!l.existsSync(e))return;if(l.readdirSync(e).length>0)throw new p(`'${e}' is not empty. --repo requires an empty target directory; specify an empty directory as the first argument, move to one before running, or run 'ms app init' to bind an existing project to a new app.`)}function qe(e){let t;try{t=l.mkdtempSync(x.join(he.tmpdir(),"ms-app-create-probe-"))}catch{return}try{let n=d(["clone","--depth=1","--filter=blob:none","--no-checkout",e,t],{allowFailure:!0,emitStderr:!1});if(!n.success){let o=n.stderr;if(we(o))throw new E(Fe(e),{underlyingError:ye(n.error,o)});return}let r=d(["-C",t,"ls-tree","-r","HEAD"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!r.success)return;if(r.stdout.trim().length>0)throw new p(`Repository ${e} is not empty (must contain no tracked files of any kind, including hidden files like .gitignore, .gitattributes, README, or LICENSE). Choose a different repository to create an app or run 'ms app init' to update the existing app.`)}finally{try{l.rmSync(t,{recursive:!0,force:!0})}catch{}}}function We(e){let t=e;for(;!l.existsSync(t);){let n=x.dirname(t);if(n===t)break;t=n}try{l.accessSync(t,l.constants.W_OK)}catch{throw new E(`'${e}' is not writable. Choose a different directory or fix the permissions and retry.`)}}function Ye(e){e.setDescription(g.app.create.description),e.addExamples(g.app.create.examples),e.consumePositionalArg("[directory]"),e.addOptions([{flags:{key:i.EnvironmentId.name,alias:i.EnvironmentId.alias},env:i.EnvironmentId.envVar,description:g.app.create.options.environmentId,optionalInNonInteractive:!0},T({flags:{key:i.DisplayName.name,alias:i.DisplayName.alias},env:i.DisplayName.envVar,message:i.DisplayName.promptMessage,description:g.app.create.options.displayName}),{flags:{key:i.Description.name,alias:i.Description.alias},env:i.Description.envVar,description:g.app.create.options.description,optionalInNonInteractive:!0},{flags:{key:i.RepositoryId.name,alias:i.RepositoryId.alias},env:i.RepositoryId.envVar,description:g.app.create.options.repositoryId,optionalInNonInteractive:!0},{flags:{key:i.Template.name,alias:i.Template.alias},env:i.Template.envVar,default:Oe,description:g.app.create.options.template,optionalInNonInteractive:!0},{flags:{key:i.Repo.name},env:i.Repo.envVar,description:g.app.create.options.repo,optionalInNonInteractive:!0},T({flags:{key:i.BuildPath.name,alias:i.BuildPath.alias},env:i.BuildPath.envVar,message:i.BuildPath.promptMessage,initialValue:i.BuildPath.initialValue,default:"./dist",description:g.app.create.options.buildPath}),T({flags:{key:i.BuildCommand.name,alias:i.BuildCommand.alias},env:i.BuildCommand.envVar,message:i.BuildCommand.promptMessage,initialValue:i.BuildCommand.initialValue,default:"npm run build",description:g.app.create.options.buildCommand}),T({flags:{key:i.BuildEntryPoint.name},env:i.BuildEntryPoint.envVar,message:i.BuildEntryPoint.promptMessage,initialValue:i.BuildEntryPoint.initialValue,default:"index.html",description:g.app.create.options.buildEntryPoint})]),e.addSwitch({flags:{key:i.OpenBrowser.name},description:g.app.create.options.openBrowser}),e.addSwitch({flags:{key:i.ForceReauth.name},description:g.app.create.options.forceReauth})}export{P as buildOrphanedAppRecoveryHint,Pe as cloneRepo,Ne as commitAndPushScaffoldAsync,Et as createMaafAppAsync,qe as ensureExternalRepoIsEmpty,ge as ensureRepoTargetDirectoryEmpty,me as ensureTargetDirectoryEmpty,We as ensureTargetDirectoryWritable,_e as ensureTemplateSourceValid,F as initLocalRepo};
17
- /*!
18
- * Copyright (C) Microsoft Corporation. All rights reserved.
19
- */
20
- //# sourceMappingURL=CreateMaafApp-TUO72CW7.js.map
@@ -1,11 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __pathDirname(__filename);
7
- import{a as y}from"./chunk-USRRI5H4.js";import{h as d,i as I}from"./chunk-5AUOEXAR.js";import{ba as l,ua as f}from"./chunk-G33Q5FWT.js";import{b as c}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{l as i}from"./chunk-6MXOK2LG.js";import{c as s,d as m,h as p}from"./chunk-PVAIJSAI.js";import{a as t}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function M(n){g(n),await n.runVerb();let v=await I(n,{failIfMissing:!1}),a=await n.getTenantIdAsync();if(!a)throw new c("Unable to determine tenant ID. Ensure you are logged in.");let A=await d(n),e=await l({tenantId:a,environmentId:v,logger:f(),actionsParams:{appName:A}}),r=e.description,o=y(e);n.isJsonMode()?m({appId:e.id,displayName:e.displayName,description:r,environmentId:e.environmentId,...o&&{repoType:o.repoType,cloneUrl:o.cloneUrl}}):(s(`App '${e.displayName}' (${e.id}).`),r&&p(`Description: ${r}`),o?.repoType&&p(`Repo type: ${o.repoType}`),o?.cloneUrl&&p(`Clone URL: ${o.cloneUrl}`))}function g(n){n.setDescription(t.app.info.description),n.addExamples(t.app.info.examples),n.addOptions([{flags:{key:i.App.name},env:i.App.envVar,description:t.app.info.options.app,optionalInNonInteractive:!0},{flags:{key:i.EnvironmentId.name,alias:i.EnvironmentId.alias},env:i.EnvironmentId.envVar,description:t.app.info.options.environmentId,optionalInNonInteractive:!0}])}export{M as getMaafAppInfoAsync};
8
- /*!
9
- * Copyright (C) Microsoft Corporation. All rights reserved.
10
- */
11
- //# sourceMappingURL=GetMaafApp-ELB5KMHW.js.map
@@ -1,8 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __pathDirname(__filename);
7
- import{b as a,c as b,d as c}from"./chunk-W7EWOZPO.js";import"./chunk-HBLO3WDD.js";import"./chunk-OL6CTXQR.js";import"./chunk-G33Q5FWT.js";import"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import"./chunk-PVAIJSAI.js";import"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";export{a as assertPackPreconditions,b as packAppArtifactAsync,c as packAsync};
8
- //# sourceMappingURL=Pack-AHKC2MYF.js.map
@@ -1,12 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __pathDirname(__filename);
7
- import{h as I,i as h}from"./chunk-5AUOEXAR.js";import{ba as w,ua as g}from"./chunk-G33Q5FWT.js";import{b as s}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{o}from"./chunk-6MXOK2LG.js";import{c as y,d as u,h as f,i as v}from"./chunk-PVAIJSAI.js";import{a as r}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import A from"open";async function E(e){C(e),await e.runVerb();let n=await I(e),t=await h(e),p=await e.getTenantIdAsync();if(!p)throw new s("Unable to determine tenant ID. Ensure you are logged in.");let a=await $(e),c=await e.getOption(o.NoBrowser.camelName,!0)===!1,i=e.isJsonMode(),l=await e.getOption(o.CommitSha.name,!0);if(a==="live"&&l)throw new s("--commit is only valid with --mode preview.");await b({appName:n,environmentId:t,tenantId:p,noBrowser:c,isJson:i,mode:a,commitId:l})}async function b(e){let{appName:n,environmentId:t,tenantId:p,noBrowser:a,isJson:c,mode:i,commitId:l}=e,d=await w({tenantId:p,environmentId:t,logger:g(),actionsParams:{appName:n}}),m=N(d.appPlayUri,i,l);if(!m)throw new s(i==="live"?`No live build is available for app '${n}' yet. Run 'ms app deploy' to deploy one, then re-run 'ms app play'.`:`No appPlayUri is available for app '${n}' in environment '${t}'.`);if(c){u({appName:n,mode:i,url:m,commitHash:d.commitHash??null});return}y(`${i==="live"?"Live":"Preview"} URL for '${d.displayName??n}': ${m}`),i==="live"&&v("Live does not auto-update. Run 'ms app deploy' to publish a new version to the live URL."),await M(m,a)}function N(e,n,t,p="main"){if(!e)return;if(n==="live")return e;let a=e.replace(/\/$/,"");return t?`${a}/commit/${t}`:`${a}/branch/${encodeURIComponent(p)}`}async function M(e,n){if(!n){f(`Opening browser at ${e}`);try{await A(e,{wait:!1})}catch{f(`Could not open browser automatically. Please navigate to:
8
- ${e}`)}}}async function $(e){let n=await e.getOption(o.Mode.name,!0),t=(n??o.Mode.defaultValue).trim().toLowerCase();if(t!=="live"&&t!=="preview")throw new s(`Invalid --mode value '${n}'. Expected 'live' or 'preview'.`);return t}function C(e){e.setDescription(r.app.play.description),e.addExamples(r.app.play.examples),e.addSwitch({flags:{key:o.NoBrowser.name},description:r.app.play.options.noBrowser}),e.addOptions([{flags:{key:o.AppName.name},env:o.AppName.envVar,description:r.app.play.options.app,optionalInNonInteractive:!0},{flags:{key:o.Mode.name,alias:o.Mode.alias},env:o.Mode.envVar,default:o.Mode.defaultValue,description:r.app.play.options.mode,optionalInNonInteractive:!0},{flags:{key:o.CommitSha.name,alias:o.CommitSha.alias},env:o.CommitSha.envVar,description:r.app.play.options.commit,optionalInNonInteractive:!0}])}export{N as buildPlayUrl,E as playMaafAppAsync};
9
- /*!
10
- * Copyright (C) Microsoft Corporation. All rights reserved.
11
- */
12
- //# sourceMappingURL=PlayMaafApp-LWKJU2IN.js.map
@@ -1,11 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __pathDirname(__filename);
7
- import{a as $}from"./chunk-USRRI5H4.js";import{i as w}from"./chunk-5AUOEXAR.js";import{ba as y,ua as h,va as b}from"./chunk-G33Q5FWT.js";import{b as d}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{d as g,h as o}from"./chunk-PVAIJSAI.js";import{a as m}from"./chunk-VNEZZ3RI.js";import{a as f}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var I=7;async function O(e){e.setDescription(m.app.show.description),e.addExamples(m.app.show.examples),await e.runVerb();let t=b();if(!t.appConfig)throw new d(`No ${f} found in the current directory. Run "${"ms"} app init" first.`);let n=t.appConfig.appId;if(!n)throw new d(`${f} has no appId. Run "${"ms"} app create" or set appId manually.`);let i=await w(e),r=await e.getTenantIdAsync();if(!r)throw new d("Unable to determine tenant ID. Ensure you are logged in.");let a=await y({tenantId:r,environmentId:i,logger:h(),actionsParams:{appName:n}}),s=S(a,t.appConfig,i);e.isJsonMode()?g(s):E(s)}function S(e,t,n){let i=e.connectionReferences??{},r=Object.entries(i).map(([c,p])=>N(c,p)),a=e.commitHash,s=$(e);return{name:e.displayName,environmentId:e.environmentId??n,appId:e.id,commit:a?a.slice(0,I):void 0,build:C(t),connectors:r,repoType:s?.repoType,cloneUrl:s?.cloneUrl}}function C(e){let{buildPath:t,buildEntryPoint:n}=e;if(t&&n)return{path:t,entryPoint:n};if(t)return{path:t};if(n)return{entryPoint:n}}function N(e,t){let n={connector:e};t.displayName&&(n.displayName=t.displayName),t.actions?.length&&(n.actions=t.actions);let i=t.dataSets??{},r=[],a=[],s=new Set;for(let[c,p]of Object.entries(i))if(!(!p||typeof p!="object"))for(let[l,u]of Object.entries(p.dataSources??{}))s.add(l),u.tableName?r.push({dataset:c,table:u.tableName}):a.push({dataset:c,procedure:l});for(let c of t.dataSources??[])s.has(c)||r.push({table:c});return r.length&&(n.tables=r),a.length&&(n.procedures=a),n}function E(e){o(`Name: ${e.name}`),o(`Environment: ${e.environmentId}`),o(`App ID: ${e.appId}`),e.commit&&o(`Commit: ${e.commit}`);let t=T(e.build);if(t&&o(`Build: ${t}`),e.repoType&&o(`Repo type: ${e.repoType}`),e.cloneUrl&&o(`Clone URL: ${e.cloneUrl}`),e.connectors.length===0){o(""),o("(no connectors bound)");return}for(let n of e.connectors){o("");let i=n.connector.replace(/^shared_/,"");o(n.displayName?`${i} (${n.displayName})`:i),n.actions?.length&&o(` actions: ${n.actions.join(", ")}`),n.tables?.length&&o(` tables: ${n.tables.map(P).join(", ")}`),n.procedures?.length&&o(` procedures: ${n.procedures.map(V).join(", ")}`)}}function P(e){return e.dataset?`${e.table} (${e.dataset})`:e.table}function V(e){return`${e.procedure} (${e.dataset})`}function T(e){if(!e)return;let t="path"in e?e.path:void 0,n="entryPoint"in e?e.entryPoint:void 0;if(t&&n){let i=t.includes("\\")&&!t.includes("/")?"\\":"/",r=t.replace(/[/\\]+$/,""),a=n.replace(/^[/\\]+/,"");return`${r}${i}${a}`}return t??n}export{S as buildAppShowView,O as showMaafAppAsync};
8
- /*!
9
- * Copyright (C) Microsoft Corporation. All rights reserved.
10
- */
11
- //# sourceMappingURL=ShowMaafApp-3KK6NUG2.js.map
@@ -1,11 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __pathDirname(__filename);
7
- var p={Account:{name:"account"},DeviceCode:{name:"device-code",camelName:"deviceCode"}},e={Help:{name:"help",alias:"h"},Connector:{name:"connector",promptMessage:"Please provide the connector (e.g. shared_office365):",envVar:"CONNECTOR"},SolutionId:{name:"solution-id",alias:"s",promptMessage:"Please provide the Solution ID:",envVar:"SOLUTION_ID"},ConnectionId:{name:"connection-id",alias:"c",promptMessage:"Please provide the Connection ID:",envVar:"CONNECTION_ID"},Dataset:{name:"dataset",alias:"d",promptMessage:"Please provide the dataset:",envVar:"DATASET"},SqlStoredProcedure:{name:"sql-stored-procedure",alias:"sp",promptMessage:"Please provide the SQL stored procedure name:",envVar:"SQL_STORED_PROCEDURE"},ResourceName:{name:"resource-name",alias:"t",promptMessage:"Please provide the resource name:",envVar:"TABLE"},Search:{name:"search",alias:"s",promptMessage:"Please provide a search term:",envVar:"SEARCH_TERM"}},a={SkipCodegen:{name:"skip-codegen",env:"SKIP_CODEGEN"},UseV1Codegen:{name:"use-v1-codegen",env:"USE_V1_CODEGEN"}},m={...a},t={Table:{name:"table",alias:"t",promptMessage:"Please provide the table name:",envVar:"TABLE_NAME"},...a},i={As:{name:"as",promptMessage:"Add as table or action?",envVar:"ADD_CONNECTOR_AS"},Table:t.Table,DataverseEnvironmentId:{name:"dataverse-environment-id",promptMessage:"Please provide the Dataverse environment ID:",envVar:"DATAVERSE_ENVIRONMENT_ID"},UseSso:{name:"use-sso",env:"USE_SSO"},...a},c={ConnectionRef:{name:"connection-ref",alias:"cr",promptMessage:"Please provide the Connection Reference:",envVar:"CONNECTION_REF"},...a},l={DataSourceName:{name:"name",alias:"n",promptMessage:"Please provide the data source or table name:",envVar:"DATA_SOURCE_NAME"}},A={DataSourceName:{name:"name",alias:"n",promptMessage:"Please provide the data source name to regenerate:",envVar:"DATA_SOURCE_NAME"},Offline:{name:"offline",env:"OFFLINE"}},d={Cloud:{name:"cloud",promptMessage:"Please select the cloud instance:",envVar:"CLOUD_INSTANCE"}},v={Port:{name:"port",alias:"p",promptMessage:"Please provide the port number:",envVar:"PORT",initialValue:"8080"},LocalAppUrl:{name:"local-app-url",alias:"l",promptMessage:"Please provide the local app URL:",envVar:"LOCAL_APP_URL",initialValue:"http://localhost:3000"},ConfigOnly:{name:"config-only",alias:"C",envVar:"CONFIG_ONLY"}},M={Search:{...e.Search,promptMessage:"Please provide a search term to filter flows by name:",envVar:"FLOW_SEARCH"}};var P={SearchTerm:{...e.Search,promptMessage:"Please provide a search term to filter Dataverse operations by name:",envVar:"DATAVERSE_API_SEARCH_TERM"}},_={Search:{...e.Search,promptMessage:"Please provide a search term to filter connectors by name or ID:",envVar:"CONNECTOR_SEARCH"},EnvironmentId:{name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"},OnlyAllowed:{name:"only-allowed",camelName:"onlyAllowed"}},u={EnvironmentId:{name:"environment-id",camelName:"environmentId",alias:"e",promptMessage:"Please provide the environment ID to filter by:",envVar:"LIST_ENVIRONMENT_ID"},Permission:{name:"permission",alias:"p",promptMessage:"Please provide the permission filter (edit or play):",envVar:"LIST_PERMISSION"}},N={Search:{...e.Search,promptMessage:"Please provide a search term to filter actions by summary or action ID:",envVar:"CONNECTOR_ACTION_SEARCH"},EnvironmentId:{name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"}};var r={EnvironmentId:{name:"environment-id",alias:"e",promptMessage:"Please provide the environment ID:",envVar:"ENVIRONMENT_ID"},DisplayName:{name:"display-name",alias:"n",promptMessage:"Please provide the display name for the app:",envVar:"APP_DISPLAY_NAME"},Description:{name:"description",alias:"d",promptMessage:"Please provide a description for the app (optional):",envVar:"APP_DESCRIPTION"},BuildPath:{name:"build-path",alias:"b",promptMessage:"Please provide the build output path:",envVar:"BUILD_PATH",initialValue:"./dist"},BuildCommand:{name:"build-command",alias:"S",promptMessage:"Please provide the full command used to build your app:",envVar:"BUILD_COMMAND",initialValue:"npm run build"},BuildEntryPoint:{name:"build-entry-point",promptMessage:"Please provide the entry point HTML file:",envVar:"BUILD_ENTRY_POINT",initialValue:"index.html"},IconPath:{name:"icon-path",camelName:"iconPath",envVar:"APP_ICON_PATH"},LocalAppUrl:{name:"local-app-url",camelName:"localAppUrl",envVar:"LOCAL_APP_URL"}},n={name:"force-reauth",camelName:"forceReauth"},g={...r,AppId:{name:"app-id",alias:"i",promptMessage:"Please provide an app ID (letters, numbers, and underscores only, 1-64 chars):",envVar:"APP_ID"},Template:{name:"template",alias:"t",promptMessage:"Please provide the template name:",envVar:"APP_TEMPLATE"},RepositoryId:{name:"repository-id",alias:"r",promptMessage:"Please provide the repository ID:",envVar:"APP_REPOSITORY_ID"},Repo:{name:"repo",envVar:"APP_REPO"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"},ForceReauth:n},E={App:{name:"app",promptMessage:"Please provide the app name or app ID:",envVar:"MAAF_APP_NAME"},EnvironmentId:{name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"}},h={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},CommitSha:{name:"commit",alias:"c",envVar:"MAAF_COMMIT_SHA"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"},NoWait:{name:"no-wait",camelName:"wait"},ForceReauth:n},I={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},CommitSha:{name:"commit",alias:"c",envVar:"MAAF_COMMIT_SHA"},ShowLog:{name:"show-log"}},V={AppName:{name:"app",envVar:"MAAF_APP_NAME"},Mode:{name:"mode",alias:"m",envVar:"MAAF_PLAY_MODE",defaultValue:"live"},CommitSha:{name:"commit",alias:"c",envVar:"MAAF_COMMIT_SHA"},NoBrowser:{name:"no-browser",camelName:"browser"}},S={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},CommitSha:{name:"commit",alias:"c",envVar:"MAAF_COMMIT_SHA"},Artifact:{name:"artifact",envVar:"MAAF_DEPLOY_ARTIFACT"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"},Force:{name:"force"},ForceReauth:n},C={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},EnvironmentId:{name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"}},O={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},Access:{name:"access",envVar:"MAAF_APP_ACCESS",defaultValue:"play"}},D={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},Access:{name:"access",envVar:"MAAF_APP_ACCESS",defaultValue:"play"}},R={Repo:{name:"repo",alias:"r",promptMessage:"Please provide the GitHub repository URL (e.g. https://contoso.ghe.com/owner/repo or https://github.com/owner/repo):",envVar:"MAAF_GITHUB_REPO"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"}},o={name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},s={name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"},T={AppName:o,EnvironmentId:s},f={AppName:o,EnvironmentId:s},L={AppName:o,EnvironmentId:s,Access:{name:"access",envVar:"MAAF_APP_ACCESS"}},F={AppName:o,EnvironmentId:s,LinkId:{name:"link-id",alias:"l",promptMessage:"Please provide the share link ID:",envVar:"MAAF_SHARE_LINK_ID"},Force:{name:"force",alias:"f"}},w={...r,Repo:{name:"repo",envVar:"APP_REPO"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"},ForceReauth:n};export{p as a,e as b,i as c,l as d,A as e,d as f,v as g,_ as h,u as i,N as j,g as k,E as l,h as m,I as n,V as o,S as p,C as q,O as r,D as s,R as t,T as u,f as v,L as w,F as x,w as y};
8
- /*!
9
- * Copyright (C) Microsoft Corporation. All rights reserved.
10
- */
11
- //# sourceMappingURL=chunk-6MXOK2LG.js.map
@@ -1,20 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __pathDirname(__filename);
7
- import{c as E,d as w,e as y}from"./chunk-RBG2H562.js";import{m as R}from"./chunk-S5HEU7XK.js";import{execFileSync as D}from"child_process";var k=[{patterns:[/403 forbidden/i,/returned error: 403/i,/access denied/i],bucket:"auth-403",build:t=>`Git reached the remote but access was denied while ${t} (HTTP 403). This usually means one of:
8
- - the signed-in account is in the wrong tenant, or lacks permission to this app's repo; or
9
- - Git Credential Manager returned a cached credential for a different account than your current 'ms auth' sign-in (a stale or mismatched credential).
10
- Confirm 'ms auth status' shows the account and tenant for this environment. If it doesn't match, clear the cached git credential for the host ('git credential-manager erase', or remove it from your OS credential store) so Git re-prompts, then re-run.`},{patterns:[/terminal prompts disabled/i,/could not read username/i,/could not read password/i],bucket:"auth-prompt-unavailable",build:t=>`Git could not obtain a credential while ${t}: there is no cached credential and the session can't prompt for one. Make sure Git Credential Manager is installed, then re-run in an interactive terminal so the browser sign-in can complete.`},{patterns:[/authentication failed/i,/invalid username or password/i],bucket:"auth-invalid-credential",build:t=>`Git authentication failed while ${t}: the credential was missing, invalid, or expired. When the browser opens, sign in with the account for this environment's tenant; if a stale credential is cached, clear it in Git Credential Manager and re-run.`}],A=[/could not resolve host/i,/could not resolve proxy/i,/failed to connect/i,/connection timed out/i,/connection refused/i,/network is unreachable/i,/temporary failure in name resolution/i];function L(t){return t.replace(/(\b[a-z][a-z0-9+.-]*:\/\/)[^/\s@]+@/gi,"$1[REDACTED]@")}function S(t,e){let r=L(t.trimEnd());if(!r)return null;for(let i of k)if(i.patterns.some(o=>o.test(r)))return new E(`${i.build(e.action)}
11
-
12
- Git output:
13
- ${r}`,{classifierBucket:i.bucket,action:e.action});return A.some(i=>i.test(r))?new y(`Git could not reach the remote while ${e.action}. Check your network connection (and proxy settings, if any) and try again.
14
-
15
- Git output:
16
- ${r}`,{classifierBucket:"network",action:e.action}):null}function g(t){return t==null?"":Buffer.isBuffer(t)?t.toString():t}var I=64*1024*1024;function f(t,e={}){let{cwd:r,allowFailure:i=!1,captureStdout:o=!1,emitStderr:d=!0,classify:u,network:s=!1}=e,c=s&&!u&&!i;try{let n=D("git",t,{cwd:r,stdio:["ignore",o?"pipe":"ignore",c?"inherit":"pipe"],maxBuffer:I});return{success:!0,status:0,stdout:o?g(n):"",stderr:""}}catch(n){let a=n,l=g(a.stderr);if(u&&!i){let $=l||g(a.stdout)||(n instanceof Error?n.message:String(n)),G=S($,u);if(G)throw G}if(d&&l&&process.stderr.write(l),!i)throw n;return{success:!1,status:typeof a.status=="number"?a.status:null,stdout:g(a.stdout),stderr:l,error:n instanceof Error?n:new Error(String(n))}}}import{execFileSync as p}from"child_process";import*as m from"fs";import*as C from"path";function b({gitUrl:t,loginAuthority:e,authResource:r,platform:i=process.platform}){let o;try{o=new URL(t)}catch(n){throw new Error(`Git credential helper setup requires a valid HTTPS remote URL: ${n instanceof Error?n.message:String(n)}`)}if(o.protocol!=="https:")throw new Error(`Git credential helper setup requires an HTTPS remote URL, got '${o.protocol}'.`);let d=o.host,u=`${e}/oauth2/v2.0`,s=`credential.https://${d}`,c=[[`${s}.oauthAuthorizeEndpoint`,`${u}/authorize?prompt=select_account`],[`${s}.oauthTokenEndpoint`,`${u}/token`],[`${s}.oauthDeviceEndpoint`,`${u}/devicecode`],[`${s}.oauthClientId`,R],[`${s}.oauthScopes`,`${r}/.default offline_access`],[`${s}.oauthRedirectUri`,"http://localhost"]];return i==="win32"&&c.push([`${s}.credentialStore`,"dpapi"]),c}function K(){let t=f(["rev-parse","HEAD"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!t.success)return null;let e=f(["rev-parse","--abbrev-ref","HEAD"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!e.success)return null;let r=t.stdout.trim(),i=e.stdout.trim();return{branch:i,commitSha:r,detached:i==="HEAD"}}function X(){let t=f(["config","--get","remote.origin.url"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(t.success)return t.stdout.trim()||void 0}var O=["https://","ssh://","git@"];function T(t){return O.some(e=>t.startsWith(e))&&t.trim()===t&&!t.startsWith("-")&&!/[\r\n\0]/.test(t)}function h(t){return t.replace(/:\/\/[^\s/]+@/g,"://[REDACTED]@")}function Y(t,e=process.cwd()){try{return t!==void 0&&!T(t)?{success:!1,error:"Unsafe git remote URL."}:(v({remoteUrl:t,cwd:e}),{success:!0})}catch(r){return{success:!1,error:h(r instanceof Error?r.message:String(r))}}}function B({directory:t,gitUrl:e,loginAuthority:r,authResource:i}){let o=z({gitUrl:e,loginAuthority:r,authResource:i});v({remoteUrl:e,cwd:t,createDirectory:!0,initialBranch:"main",localConfig:o,updateExistingRemote:!0,emitRemoteError:!0,skipInitIfRepoExists:!0})}function Q(t){try{return B(t),{success:!0}}catch(e){return{success:!1,error:h(e instanceof Error?e.message:String(e))}}}function z({gitUrl:t,loginAuthority:e,authResource:r}){try{return b({gitUrl:t,loginAuthority:e,authResource:r})}catch(i){throw new w(`Git credential helper setup failed: ${i instanceof Error?i.message:String(i)}`)}}function v({remoteUrl:t,cwd:e,createDirectory:r=!1,initialBranch:i,localConfig:o=[],updateExistingRemote:d=!1,emitRemoteError:u=!1,skipInitIfRepoExists:s=!1}){r&&m.mkdirSync(e,{recursive:!0});let c={stdio:"pipe",windowsHide:!0,cwd:e};s&&m.existsSync(C.join(e,".git"))||(p("git",["init"],c),i&&p("git",["symbolic-ref","HEAD",`refs/heads/${i}`],c));for(let[a,l]of o)p("git",["config","--local",a,l],c);if(t)try{p("git",["remote","add","origin",t],c)}catch(a){if(!d||!x(a).includes("already exists"))throw u&&process.stderr.write(h(x(a))),a;p("git",["remote","set-url","origin",t],c)}}function x(t){return typeof t=="object"&&t!==null&&"stderr"in t&&Buffer.isBuffer(t.stderr)?t.stderr.toString():""}function V(){let t=f(["status","--porcelain"],{captureStdout:!0,allowFailure:!0,emitStderr:!1}),e=f(["rev-list","--count","origin/main..main"],{captureStdout:!0,allowFailure:!0,emitStderr:!1}),r=e.stdout.trim();return{hasUncommittedChanges:t.success?t.stdout.trim().length>0:null,isMainAheadOfOrigin:e.success&&/^\d+$/.test(r)?Number(r)>0:null}}export{f as a,K as b,X as c,Y as d,B as e,Q as f,V as g};
17
- /*!
18
- * Copyright (C) Microsoft Corporation. All rights reserved.
19
- */
20
- //# sourceMappingURL=chunk-DREO7EYO.js.map
@@ -1,11 +0,0 @@
1
- import { createRequire as __createRequire } from 'node:module';
2
- import { fileURLToPath as __fileURLToPath } from 'node:url';
3
- import { dirname as __pathDirname } from 'node:path';
4
- const require = __createRequire(import.meta.url);
5
- const __filename = __fileURLToPath(import.meta.url);
6
- const __dirname = __pathDirname(__filename);
7
- import{a as t}from"./chunk-U36HMOQW.js";var n={global:{programDescription:"CLI for Microsoft managed apps.",cloud:"Cloud environment to target. Valid values include: public, usgov, usgovhigh, usgovdod, china. Defaults to public."},auth:{login:{description:"Sign in to Microsoft Entra ID.",examples:[`${"ms"} auth login`,`${"ms"} auth login --account user@contoso.com`,`${"ms"} auth login --device-code`],options:{account:"Username (email) to pre-fill in the browser sign-in prompt. This is a hint passed to the identity provider, not validated against cached accounts \u2014 use `auth switch --account` to choose between cached accounts.",deviceCode:"Sign in using the device code flow instead of opening a browser. Prints a URL and a code to enter on another device \u2014 use this on headless machines or over SSH where no browser is available."}},logout:{description:"Clear all cached credentials. Removes every cached account and the active-account pointer. Use `auth switch` to change which cached account is active without logging out.",examples:[`${"ms"} auth logout`]},status:{description:"Show cached accounts. The active account (used by other CLI commands) is marked.",examples:[`${"ms"} auth status`,`${"ms"} auth status --json`]},switch:{description:"Choose which cached account other CLI commands run as. When more than one account is cached and --account is omitted, prompts interactively; in non-interactive mode --account is required.",examples:[`${"ms"} auth switch`,`${"ms"} auth switch --account user@contoso.com`],options:{account:"Username (email) or home account ID of the account to make active."}}},app:{create:{description:`Create a new managed app and scaffold the app template into an empty target directory. Provisions a platform-managed git repo by default; see --repo to bind an external GitHub repo or skip git scaffolding. To bind an existing project instead, use '${"ms"} app init'.`,options:{environmentId:"Target environment ID for the new managed app (optional).",displayName:"Display name for the managed app.",description:"Optional description for the managed app.",repositoryId:"Repository ID to associate with the managed app for source control.",template:"GitHub repository or subpath to scaffold the managed app from (e.g. github:owner/repo/subdir). Defaults to github:microsoft/Managed-Apps/templates/vite8. Applies to all --repo modes (native, --repo <url>, and --repo none).",buildPath:"Path to the build output directory. Defaults to ./dist.",buildCommand:'Full shell command used to build the app. Defaults to "npm run build".',buildEntryPoint:"Entry point HTML file for the app. Defaults to index.html.",repo:"Source-control binding for the new app. Omit to use the default platform-managed flow. Pass a repository URL \u2014 for example a GitHub Enterprise Cloud tenant URL (e.g. https://myorg.ghe.com/contoso/expense-tracker) or github.com (e.g. https://github.com/contoso/expense-tracker) \u2014 to bind to an external repo; the repo must already exist and must be empty, and the CLI clones it into [directory] and overlays the template. The server is the authority on which hosts/schemes are accepted. Pass '--repo none' to skip all git binding: the CLI scaffolds the template and writes ms.config.json into [directory] but does not init a local git repo or bind to a remote. The target directory must be empty in every mode \u2014 to bind an existing project to a new app, use 'ms app init' instead. Cannot be combined with --repository-id.",openBrowser:"Launch the browser to complete the GitHub device code flow during inline GitHub authentication. Default: do not launch. Has no effect when `--json` is set (JSON mode never launches a browser).",forceReauth:"Bypass the stored GitHub authentication mapping and force re-authentication via device code flow, as if the mapping had expired. Has no effect on apps not bound to an external GitHub repository."},examples:[`${"ms"} app create --display-name "My App" --repository-id <id>`,`${"ms"} app create ./my-app --display-name "My App" --repository-id <id>`,`${"ms"} app create ./my-app --display-name "My App" --repository-id <id> --description "A description"`,`${"ms"} app create ./my-app --display-name "My App" --repo https://myorg.ghe.com/contoso/expense-tracker`,`${"ms"} app create ./my-app --display-name "My App" --repo none`]},init:{description:"Convert an existing project into a managed app.",options:{environmentId:"Target environment ID for the new managed app (optional).",cloud:"Cloud environment to target. Valid values include: public, usgov, usgovhigh, usgovdod, china. Defaults to public.",displayName:"Display name for the managed app.",description:"Optional description for the managed app.",buildPath:"Path to the build output directory. Defaults to ./dist.",buildCommand:'Full shell command used to build the app. Defaults to "npm run build".',fileEntryPoint:"Entry point HTML file for the app. Defaults to index.html.",appUrl:"Local development URL for the app. Defaults to http://localhost:3000.",buildEntryPoint:"Entry point HTML file for the app. Defaults to index.html.",repo:"Repository behavior for init. Pass '--repo native' to force a platform-managed repo without inspecting the current git setup. Pass '--repo none' to use BYO build flow (no platform-managed repo). Pass '--repo <repo-url>' to bind to an existing GitHub repo (current directory must already contain the cloned repo). Omit to auto-detect current git setup and prompt in interactive mode.",iconPath:"Optional path to a .png or .jpg app icon, written to ms.config.json as iconPath.",localAppUrl:"Optional local development URL for the app, written to ms.config.json as localAppUrl.",openBrowser:"Launch the browser to complete the GitHub device code flow during inline GitHub authentication. Default: do not launch. Has no effect when `--json` is set (JSON mode never launches a browser).",forceReauth:"Bypass the stored GitHub authentication mapping and force re-authentication via device code flow, as if the mapping had expired. Has no effect on apps not bound to an external GitHub repository."},examples:[`${"ms"} app init --display-name "My App" --environment-id <id>`,`${"ms"} app init --display-name "My App" --environment-id <id> --description "A description"`,`${"ms"} app init --display-name "My App" --environment-id <id> --build-path ./out`,`${"ms"} app init --display-name "My App" --repo none`,`${"ms"} app init --display-name "My App" --repo https://myorg.ghe.com/contoso/expense-tracker`]},list:{description:"List all apps you have access to with play URLs. Interactive text output shows edit access; non-interactive and JSON output include clone URL details when available for edit access. By default returns both edit and play access apps across the tenant; pass --environment-id to filter to a single environment.",options:{environmentId:"Optional environment ID to scope the listing to. When omitted, all apps the user can access across the tenant are returned.",permission:"Optional permission filter. Use `edit` for apps the user can contribute to, or `play` for apps the user can play/view. Omit to return both. Case-insensitive."},examples:[`${"ms"} app list`,`${"ms"} app list --json`,`${"ms"} app list --environment-id <id>`,`${"ms"} app list --permission play`]},info:{description:"Get details for an app.",options:{app:"The app identifier to retrieve (logical name or app ID GUID).",environmentId:`Override the environment ID. Defaults to environmentId in ${t}; when neither is set, the environment is resolved automatically from the app identifier.`},examples:[`${"ms"} app info --app my-app`,`${"ms"} app info --app <guid>`,`${"ms"} app info --app my-app --json`]},show:{description:"Show an app's configuration and bound resources.",examples:[`${"ms"} app show`,`${"ms"} app show --json`]},delete:{description:"Delete an app. Soft-deletes the app and cleans up related metadata.",options:{app:`The app name to delete. Defaults to the current app in ${t}.`,environmentId:"Override the environment ID. When omitted, the environment is resolved automatically from the app. Useful for deleting an app from outside its scaffolded directory.",force:"Skip the confirmation prompt."},examples:[`${"ms"} app delete`,`${"ms"} app delete --app my-app`,`${"ms"} app delete --app my-app --environment-id <id> --force`,`${"ms"} app delete --json --force`]},share:{description:"Share an app with users, groups, or service principals. Provide a comma-separated list of user or group email addresses or Entra object IDs. Service principals must be specified by object ID, not application (client) ID. Use --access play (default) to grant play access to the app, or --access edit to grant edit access to the underlying repository. To distribute access via a tenant-wide link instead of named principals, use `ms app share link create` (run `ms app share link --help` for the full link surface).",options:{app:`The app name to share. Defaults to the current app in ${t}.`,access:'Access level to grant: "play" (default \u2014 run the app) or "edit" (modify the app).'},examples:[`${"ms"} app share alice@contoso.com,bob@contoso.com`,`${"ms"} app share --app my-app <aad-id>`,`${"ms"} app share <service-principal-object-id>`,`${"ms"} app share alice@contoso.com --access edit`,`${"ms"} app share alice@contoso.com --json`,`${"ms"} app share link create`],list:{description:"List the users, groups, and service principals an app is shared with at a given access level.",options:{app:`The app name. Defaults to the current app in ${t}.`,environmentId:`Override the environment ID. Defaults to environmentId in ${t}.`,access:'Access level to list (required): "play" (run the app) or "edit" (modify the app).'},examples:[`${"ms"} app share list --access play`,`${"ms"} app share list --access edit`,`${"ms"} app share list --access edit --app my-app`,`${"ms"} app share list --access play --json`]}},unshare:{description:"Unshare an app from users, groups, or service principals. Provide a comma-separated list of user or group email addresses or Entra object IDs. Service principals must be specified by object ID, not application (client) ID. Use --access play (default) to revoke play access on the app, or --access edit to revoke edit access on the underlying repository. Each invocation only touches the requested access level.",options:{app:`The app name to unshare. Defaults to the current app in ${t}.`,access:'Access level to revoke: "play" (default \u2014 app access) or "edit" (repository access).'},examples:[`${"ms"} app unshare alice@contoso.com,bob@contoso.com`,`${"ms"} app unshare --app my-app <aad-id>`,`${"ms"} app unshare alice@contoso.com --access edit`,`${"ms"} app unshare alice@contoso.com --json`]},shareLink:{description:"Manage tenant-wide share links for a managed app. A share link is a JIT-redemption URL: the first time a recipient opens it, they are granted the configured role at the app scope. Links can be listed and revoked at any time.",create:{description:'Create a share link for a managed app. The link grants the "Microsoft App Reader" role at the app scope on redemption. Only this role is supported today; the enum is open server-side for future expansion.',options:{app:`The app name to share. Defaults to the current app in ${t}.`,environmentId:`Override the environment ID. Defaults to environmentId in ${t}.`},examples:[`${"ms"} app share link create`,`${"ms"} app share link create --app my-app`,`${"ms"} app share link create --json`]},list:{description:"List all share links currently issued for a managed app.",options:{app:`The app name. Defaults to the current app in ${t}.`,environmentId:`Override the environment ID. Defaults to environmentId in ${t}.`},examples:[`${"ms"} app share link list`,`${"ms"} app share link list --app my-app`,`${"ms"} app share link list --json`]},revoke:{description:"Revoke a share link by ID. The server attempts to remove the role assignment for every prior redeemer before tearing down the link record; new recipients can no longer redeem the link.",options:{app:`The app name. Defaults to the current app in ${t}.`,environmentId:`Override the environment ID. Defaults to environmentId in ${t}.`,linkId:"The share link ID (4-char lowercase hex) returned at creation time.",force:"Skip the confirmation prompt."},examples:[`${"ms"} app share link revoke --link-id a3f1`,`${"ms"} app share link revoke --link-id a3f1 --force`,`${"ms"} app share link revoke --link-id a3f1 --app my-app --json`]}},build:{description:"Initiate a build for an app. By default the CLI waits for build-status to reach a terminal state; pass --no-wait to return immediately after submission.",options:{appName:"The app name to build.",commitSha:"The commit ID to build from.",openBrowser:"Launch the browser to complete the GitHub device code flow during inline GitHub authentication. Default: do not launch. Has no effect when `--json` is set (JSON mode never launches a browser). Only relevant for apps bound to an external GitHub repository.",noWait:"Return immediately after submitting the build and print a build-status hint.",forceReauth:"Bypass the stored GitHub authentication mapping and force re-authentication via device code flow, as if the mapping had expired. Has no effect on apps not bound to an external GitHub repository."},examples:[`${"ms"} app build --app my-app --commit abc1234`,`${"ms"} app build --app my-app --commit abc1234 --no-wait`,`${"ms"} app build --app my-app --commit abc1234 --json`]},buildStatus:{description:"Check the status of a build.",options:{appName:"The app name.",commitSha:"The commit ID for which a build was initiated by app build.",showLog:"Fetch and print the build log when available."},examples:[`${"ms"} app build-status --app my-app --commit <sha>`,`${"ms"} app build-status --app my-app --commit <sha> --show-log`,`${"ms"} app build-status --app my-app --commit <sha> --json`]},deploy:{description:`Build and deploy an app to live. Behavior depends on the app's repoType in ${t}: git-backed apps (native/github) deploy a commit (default HEAD; override with --commit). External-artifact apps (repoType: 'none') pack and upload locally, or upload a pre-built .zip when --artifact is supplied.`,options:{app:`The app name to deploy. Defaults to the current app in ${t}.`,commit:"The commit ID to deploy (git-backed apps only). Defaults to the commit at HEAD.",artifact:"Path to a local .zip build artifact to upload and deploy. Only valid for apps created with repoType: 'none'; rejected on git-backed apps. Mutually exclusive with --commit.",force:"Deploy even when the working tree has uncommitted changes or local main is ahead of origin/main. Skips the confirmation prompt in interactive mode and the validation error in non-interactive mode.",openBrowser:"Launch the browser to complete the GitHub device code flow during inline GitHub authentication. Default: do not launch. Has no effect when `--json` is set (JSON mode never launches a browser). Only relevant for apps bound to an external GitHub repository.",forceReauth:"Bypass the stored GitHub authentication mapping and force re-authentication via device code flow, as if the mapping had expired. Has no effect on apps not bound to an external GitHub repository."},examples:[`${"ms"} app deploy`,`${"ms"} app deploy --app my-app --commit abc1234`,`${"ms"} app deploy --force`,`${"ms"} app deploy --artifact ./build.zip`,`${"ms"} app deploy --app my-app --commit abc1234 --json`]},pack:{description:"Build the app and copy the output to .ms/packed/apps/<appId>/client/ for local inspection.",examples:[`${"ms"} app pack`]},play:{description:"Open a managed app in the browser. Use --mode live (default) to launch the deployed version, or --mode preview to preview the app on the main branch, or the provided commit ID.",options:{app:`The app name to play. Defaults to the current app in ${t}.`,mode:"Which app to open: 'live' (default \u2014 the deployed version) or 'preview'.",commit:"Preview mode only. The commit ID to open. When omitted, defaults to HEAD on main.",noBrowser:"Print the URL but do not open a browser window."},examples:[`${"ms"} app play`,`${"ms"} app play --mode preview`,`${"ms"} app play --mode preview --commit abc1234`,`${"ms"} app play --app my-app --no-browser`,`${"ms"} app play --json`]},dev:{description:"Start local development.",options:{port:"Port number for the local config server.",localAppUrl:"Local URL where the app is running.",configOnly:"Start only the config server without running the dev script. Use this if you want to manage your dev server separately."},examples:[`${"ms"} app dev`,`${"ms"} app dev --port 8080 --local-app-url http://localhost:3000`,`${"ms"} app dev --local-app-url http://localhost:3000 --config-only`]},refresh:{description:"Refresh data sources in an app.",dataSource:{description:"Re-fetch data source metadata from the service and regenerate TypeScript.",options:{offline:"Regenerate TypeScript from the local schemas in '.ms/schemas' without contacting the service (no network or authentication). Omit to re-fetch metadata from the service and regenerate.",name:"Name of a specific data source to refresh. Omit to refresh all."},examples:[`${"ms"} app refresh data-source`,`${"ms"} app refresh data-source --name teams`,`${"ms"} app refresh data-source --offline`]}},add:{description:"Add a data source to the current app.",options:{connector:"Connector identifier.",connectionId:"Connection identifier.",connectionRef:"Connection reference name.",resourceName:"Table or resource name.",dataset:"Dataset identifier.",sqlStoredProcedure:"SQL stored procedure name.",solutionId:"Solution identifier.",skipCodegen:"Skip TypeScript code generation after adding the data source."},examples:[`${"ms"} app add data-source --connector shared_office365`,`${"ms"} app add table --connector shared_sql --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add procedure --connector shared_sql --connection-id <id> --dataset <db>`],action:{description:"Add a connector to the app as an action data source.",options:{connector:"Connector identifier (e.g. shared_office365).",connectionId:"Connection identifier. Required for multi-auth connectors; prompted interactively when omitted.",skipCodegen:"Skip TypeScript code generation after adding the connector."},examples:[`${"ms"} app add action --connector shared_office365`,`${"ms"} app add action --connector shared_sql --connection-id <id>`,`${"ms"} app add action --connector shared_office365 --skip-codegen`]},table:{description:"Add a connector table to the app as a tabular data source.",options:{connector:"Connector identifier (e.g. shared_sql, shared_sharepointonline).",connectionId:"Connection ID to use. If omitted, you will be prompted to select one.",dataset:"Dataset name (e.g. a SQL server/database or SharePoint site URL). If omitted, you will be prompted.",table:"Table name. If omitted, you will be prompted to select one.",skipCodegen:"Skip TypeScript model service generation after adding the table."},examples:[`${"ms"} app add table --connector shared_sql`,`${"ms"} app add table --connector shared_sql --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add table --connector shared_sharepointonline --skip-codegen`]},connector:{description:"Add a data source (a connector table or action) to the app.",options:{connector:'Connector ID (e.g. shared_office365, shared_sql) or display name (e.g. "Office 365 Users"). Run `ms connector list` to browse connectors.',connectionId:"Connection ID to use. If omitted: interactive mode prompts you to pick or create one; non-interactive mode reuses your only connection, silently creates one for connectors whose sole authentication type is single sign-on when none exist, or errors when the choice is ambiguous. Pass --use-sso to reuse an existing SSO connection (or silently create one) for any SSO-capable connector, not just SSO-only ones.",dataset:"Dataset name (only used when adding as a table). If omitted in table mode, you will be prompted.",table:"Table name. In table mode this is the table name within the dataset. With --connector shared_commondataserviceforapps it is the Dataverse table logical name (e.g. account). If omitted, you will be prompted.",as:'Force the dispatch to "table" or "action". Required in non-interactive mode when the connector supports tables.',dataverseEnvironmentId:"Dataverse environment ID (GUID). Only used with --connector shared_commondataserviceforapps to bind to a specific table.",useSso:"Prefer a single sign-on (Entra ID) connection: reuse the first existing SSO connection when one exists, otherwise silently create one. Works even when the connector offers other authentication types. Errors if the connector is not SSO-capable. Ignored when --connection-id is supplied.",skipCodegen:"Skip TypeScript code generation after adding the data source."},examples:[`${"ms"} app add data-source --connector shared_office365`,`${"ms"} app add data-source --connector "Office 365 Users"`,`${"ms"} app add data-source --connector shared_sql --as table --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add data-source --connector "SQL Server" --as table --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add data-source --connector shared_sharepointonline --as action`,`${"ms"} app add data-source --connector "SharePoint" --as action`,`${"ms"} app add data-source --connector shared_office365 --as action --use-sso`,`${"ms"} app add data-source --connector shared_sql --as table --skip-codegen`,`${"ms"} app add data-source --connector shared_commondataserviceforapps --as action --connection-id <id> --dataverse-environment-id <env-guid> --table account`],deprecation:`(deprecated) '${"ms"} app add connector' is deprecated. Use '${"ms"} app add data-source' instead.`,deprecatedExamples:[`${"ms"} app add connector --connector shared_office365`,`${"ms"} app add connector --connector shared_sql --as table --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add connector --connector shared_sharepointonline --as action`,`${"ms"} app add connector --connector shared_sql --as table --skip-codegen`,`${"ms"} app add connector --connector shared_commondataserviceforapps --as action --connection-id <id> --dataverse-environment-id <env-guid> --table account`]}},remove:{description:"Remove a data source (table or action) from the app.",options:{dataSourceName:"Name of the data source to remove.",force:"Skip confirmation prompt."},examples:[`${"ms"} app remove data-source`,`${"ms"} app remove data-source --name documents`,`${"ms"} app remove data-source --name orders --force`],deprecation:`(deprecated) '${"ms"} app remove connector' is deprecated. Use '${"ms"} app remove data-source' instead.`,deprecatedExamples:[`${"ms"} app remove connector`,`${"ms"} app remove connector --name documents`,`${"ms"} app remove connector --name orders --force`]},"get-settings":{description:"View all app settings.",examples:[`${"ms"} app get-settings`,`${"ms"} app get-settings --json`]},"set-setting":{description:`Update app settings. Changes are written to ${t} and take effect the next time you run '${"ms"} app dev' or '${"ms"} app deploy'.`,options:{"show-header":"Show or hide the app header bar (true or false)."},examples:[`${"ms"} app set-setting --show-header false`]}},connector:{list:{description:"List connectors available in the environment. By default all connectors are shown, including those blocked by tenant policy; pass --only-allowed to list only connectors allowed by tenant policy.",hint:'Use the value in the "Connector" column as the ID (e.g. shared_office365), or pass the display name directly (e.g. "Office 365 Users") to add commands.',options:{environmentId:"Environment ID (optional).",search:"Filter connectors by display name or connector ID (case-insensitive).",onlyAllowed:"List only connectors allowed by tenant policy. By default all connectors are listed, including blocked ones."},examples:[`${"ms"} connector list`,`${"ms"} connector list --search "sql"`,`${"ms"} connector list --only-allowed`,`${"ms"} connector list --environment-id <env-id>`,`${"ms"} connector list --json`]},"list-actions":{description:"List actions available on a connector with their policy behavior.",options:{connector:"Connector identifier (e.g. shared_office365).",environmentId:"Environment ID (optional).",search:"Filter actions by summary or action ID (case-insensitive)."},examples:[`${"ms"} connector list-actions --connector shared_office365`,`${"ms"} connector list-actions --connector shared_sql --search "execute"`,`${"ms"} connector list-actions --connector shared_office365 --environment-id <env-id>`,`${"ms"} connector list-actions --connector shared_office365 --json`]}},telemetry:{enable:{description:"Enable telemetry collection. Defaults to --remote if no target is specified.",options:{remote:"Enable sending telemetry to the cloud service (default).",console:"Enable outputting telemetry to the local console."},examples:[`${"ms"} telemetry enable`,`${"ms"} telemetry enable --console`,`${"ms"} telemetry enable --remote --console`]},disable:{description:"Disable telemetry collection. Defaults to --remote if no target is specified.",options:{remote:"Disable sending telemetry to the cloud service (default).",console:"Disable outputting telemetry to the local console."},examples:[`${"ms"} telemetry disable`,`${"ms"} telemetry disable --console`,`${"ms"} telemetry disable --remote --console`]},status:{description:"Show the current telemetry settings.",examples:[`${"ms"} telemetry status`,`${"ms"} telemetry status --json`]}},deprecated:{Verbs:{"Add-flow":{Description:"Add a cloud flow to the current app by flow ID.",Options:{FlowId:"The unique identifier (GUID) of the flow to add."}},"Build-app":{Description:"Initiate a build for the app. By default waits for the build to reach a terminal state; pass --no-wait to return immediately after submission.",Options:{AppName:"The app name to build.",CommitSha:"The commit ID to build. Defaults to the commit at HEAD.",NoWait:"Return immediately after submitting the build."},Examples:[`${"ms"} app build --app my-app --commit abc1234`,`${"ms"} app build --app my-app --commit abc1234 --no-wait`,`${"ms"} app build --app my-app --commit abc1234 --json`]},"Get-build-status":{Description:"Get the status of an app build operation.",Options:{AppName:"The app name.",CommitSha:"The commit ID for which a build was initiated by app build."},Examples:[`${"ms"} app build-status --app my-app --commit <sha>`,`${"ms"} app build-status --app my-app --commit <sha> --json`]},"List-connection-references":{Description:"List all connection references in the environment.",Options:{SolutionId:"Solution identifier to filter by."},Examples:[`${"ms"} connection list-references`,`${"ms"} connection list-references --json`]},"List-datasets":{Description:"List all datasets for a connection.",Options:{Connector:"Connector identifier.",Connection:"Connection identifier."},Examples:[`${"ms"} connection list-datasets --connector shared_sql --connection <id>`,`${"ms"} connection list-datasets --connector shared_sql --connection <id> --json`]},"List-environment-variables":{Description:"List all environment variables in the environment.",Examples:[`${"ms"} environment list-variables`,`${"ms"} environment list-variables --json`]},"List-flows":{Description:"List all solution cloud flows that are invokable from the app.",Options:{Search:"Filter flows by name (case-insensitive substring match)"},Examples:[`${"ms"} app list-flows`,`${"ms"} app list-flows --search "approval" --json`]},"List-sqlStoredProcedures":{Description:"List all SQL stored procedures for a dataset.",Options:{Connection:"Connection identifier.",Dataset:"Dataset name."},Examples:[`${"ms"} connection list-procedures --connection <id> --dataset <db>`,`${"ms"} connection list-procedures --connection <id> --dataset <db> --json`]},"List-tables":{Description:"List all tables for a dataset.",Options:{Connector:"Connector identifier.",Connection:"Connection identifier.",Dataset:"Dataset name."},Examples:[`${"ms"} connection list-tables --connector shared_sql --connection <id> --dataset <db>`,`${"ms"} connection list-tables --connector shared_sql --connection <id> --dataset <db> --json`]},"Remove-flow":{Description:"Remove a cloud flow from the current app.",Options:{FlowDataSourceName:"The flow data source name to remove (as it appears in ms.config). Provide either this or --flow-id.",FlowId:"The flow resource ID (GUID) to remove \u2014 same ID used with app add flow. Provide either this or --flow-name."}}}},git:{auth:{refresh:{description:"Authenticate against a GitHub repository so subsequent app create / deploy / preview / build commands targeting that repo know your GitHub identity. Runs the GitHub device code flow via the Managed Apps GitHub App; no GitHub token is stored locally.",options:{repo:"GitHub repository URL (e.g. https://contoso.ghe.com/contoso/my-app or https://github.com/contoso/my-app). The Managed Apps GitHub App is the only supported provider; the server enforces which hosts/tenants are accepted.",openBrowser:"Launch the browser to complete the GitHub device code flow. Default: do not launch."},examples:[`${"ms"} git auth refresh --repo https://contoso.ghe.com/contoso/my-app`,`${"ms"} git auth refresh -r https://contoso.ghe.com/contoso/my-app --open-browser`,`${"ms"} git auth refresh --repo https://contoso.ghe.com/contoso/my-app --json`]}}}};export{n as a};
8
- /*!
9
- * Copyright (C) Microsoft Corporation. All rights reserved.
10
- */
11
- //# sourceMappingURL=chunk-VNEZZ3RI.js.map