@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{a as w,b as y}from"./chunk-3YRE4IQ3.js";import"./chunk-HBLO3WDD.js";import{a as I}from"./chunk-OL6CTXQR.js";import"./chunk-TYRVM4PP.js";import{k as v}from"./chunk-5AUOEXAR.js";import{va as m}from"./chunk-G33Q5FWT.js";import{b as u}from"./chunk-RBG2H562.js";import{c as h,e as f,f as g,m as _}from"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{i as p,j as A}from"./chunk-PVAIJSAI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as b from"node:fs";import*as R from"node:path";import E from"open";import*as c from"fs";import*as C from"path";var S="active-account.json",d=class{constructor(e=h){this._cacheDir=e;this._filePath=C.join(this._cacheDir,S)}_cacheDir;_filePath;read(){if(c.existsSync(this._filePath))try{let e=c.readFileSync(this._filePath,"utf-8"),t=JSON.parse(e);return typeof t.homeAccountId=="string"&&typeof t.username=="string"&&t.homeAccountId.length>0?{homeAccountId:t.homeAccountId,username:t.username}:void 0}catch{return}}write(e){c.mkdirSync(this._cacheDir,{recursive:!0});let t=`${this._filePath}.${process.pid}.tmp`;c.writeFileSync(t,JSON.stringify(e,null,2),"utf-8"),c.renameSync(t,this._filePath)}clear(){let e=c.existsSync(this._filePath);return c.rmSync(this._filePath,{force:!0}),e}};var P=class{_msalClient;_tenantId;_region;_persistence;_activeStore;_cacheDirectory;_isJsonMode=()=>process.argv.includes("--json");constructor(e=h){this._cacheDirectory=e,this._activeStore=new d(e)}async initAsync(e){this._region=e;let{DataProtectionScope:t,PersistenceCachePlugin:n,PersistenceCreator:i}=await import("@azure/msal-node-extensions"),r={cachePath:R.join(this._cacheDirectory,"msal_cache.json"),dataProtectionScope:t.CurrentUser,serviceName:f,accountName:g,usePlaintextFileOnLinux:!1},o=await i.createPersistence(r);this._persistence=o;let l={auth:{authority:v(this._region,this._tenantId),clientId:_},cache:{cachePlugin:new n(o)}};this._msalClient=new y(l)}setJsonModeResolver(e){this._isJsonMode=e}async getAccessTokenForResource(e,t){let n=await this._acquireTokenInternal(e+"/.default",t);return this._tenantId=n.tenantId,n.accessToken}getUserTenantId(){return this._tenantId}async getCachedAccountAsync(){let e=await this._getAccounts();return this._pickActiveAccount(e)?.username}async listCachedAccountsAsync(){let e=await this._getAccounts();if(e.length===0)return[];let t=this._pickActiveAccount(e);return e.map(n=>({homeAccountId:n.homeAccountId,username:n.username,isActive:n.homeAccountId===t?.homeAccountId}))}async setActiveAccountAsync(e){let t=await this._getAccounts(),n=this._findAccount(t,e);if(!n)throw new u(`No cached account matches '${e}'. Run \`${"ms"} auth status\` to list cached accounts.`);return this._activeStore.write({homeAccountId:n.homeAccountId,username:n.username}),{homeAccountId:n.homeAccountId,username:n.username,isActive:!0}}async loginInteractiveAsync(e,t,n){let i=e+"/.default";if(n){let o=await this._signInWithDeviceCodeAndPersist(i);return{homeAccountId:o.account.homeAccountId,username:o.account.username,isActive:!0}}let r=await this._signInInteractiveAndPersist(i,t,{prompt:t?void 0:"select_account"});if(!r.account)throw new Error("Interactive sign-in did not return an account.");return{homeAccountId:r.account.homeAccountId,username:r.account.username,isActive:!0}}async clearCacheAsync(){let e=await this._clearPersistenceAsync(),t=this._activeStore.clear();return b.rmSync(this._cacheDirectory,{recursive:!0,force:!0}),e||t}async _clearPersistenceAsync(){if(!this._persistence)throw new Error("Authentication not initialized yet");let e;try{e=await this._persistence.load()!==null}catch{e=!0}return await this._persistence.delete(),e}async _getAccounts(){if(!this._msalClient)throw new Error("Authentication not initialized yet");try{return await this._msalClient.getTokenCache().getAllAccounts()}catch(e){return p(`Could not read the MSAL token cache (${e.message}). It may have been written by an older CLI version. Run \`${"ms"} auth logout\` and sign in again to reset it.`),[]}}_findAccount(e,t){let n=t.toLowerCase();return e.find(i=>i.homeAccountId.toLowerCase()===n)??e.find(i=>i.username.toLowerCase()===n)}_pickActiveAccount(e){if(e.length===0)return;if(e.length===1)return e[0];let t=this._activeStore.read();if(t)return e.find(n=>n.homeAccountId===t.homeAccountId)}_ensureActivePointer(e){this._activeStore.read()?.homeAccountId!==e.homeAccountId&&this._activeStore.write({homeAccountId:e.homeAccountId,username:e.username})}async _acquireTokenInternal(e,t){if(!this._msalClient)throw new Error("Authentication not initialized yet");let n=await this._getAccounts();if(n.length===0)return this._ensureInteractiveSignInAllowed("no-account"),this._signInInteractiveAndPersist(e,t);let i=this._pickActiveAccount(n);if(!i){let r=n.map(l=>` - ${l.username}`).join(`
7
+ import{a as w,b as y}from"./chunk-3YRE4IQ3.js";import"./chunk-HBLO3WDD.js";import{a as I}from"./chunk-OL6CTXQR.js";import"./chunk-TYRVM4PP.js";import{k as v}from"./chunk-SNWTSI75.js";import{va as m}from"./chunk-4LIR3ZYP.js";import{b as u}from"./chunk-RBG2H562.js";import{c as h,e as f,f as g,m as _}from"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{i as p,j as A}from"./chunk-PVAIJSAI.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as b from"node:fs";import*as R from"node:path";import E from"open";import*as c from"fs";import*as C from"path";var S="active-account.json",d=class{constructor(e=h){this._cacheDir=e;this._filePath=C.join(this._cacheDir,S)}_cacheDir;_filePath;read(){if(c.existsSync(this._filePath))try{let e=c.readFileSync(this._filePath,"utf-8"),t=JSON.parse(e);return typeof t.homeAccountId=="string"&&typeof t.username=="string"&&t.homeAccountId.length>0?{homeAccountId:t.homeAccountId,username:t.username}:void 0}catch{return}}write(e){c.mkdirSync(this._cacheDir,{recursive:!0});let t=`${this._filePath}.${process.pid}.tmp`;c.writeFileSync(t,JSON.stringify(e,null,2),"utf-8"),c.renameSync(t,this._filePath)}clear(){let e=c.existsSync(this._filePath);return c.rmSync(this._filePath,{force:!0}),e}};var P=class{_msalClient;_tenantId;_region;_persistence;_activeStore;_cacheDirectory;_isJsonMode=()=>process.argv.includes("--json");constructor(e=h){this._cacheDirectory=e,this._activeStore=new d(e)}async initAsync(e){this._region=e;let{DataProtectionScope:t,PersistenceCachePlugin:n,PersistenceCreator:i}=await import("@azure/msal-node-extensions"),r={cachePath:R.join(this._cacheDirectory,"msal_cache.json"),dataProtectionScope:t.CurrentUser,serviceName:f,accountName:g,usePlaintextFileOnLinux:!1},o=await i.createPersistence(r);this._persistence=o;let l={auth:{authority:v(this._region,this._tenantId),clientId:_},cache:{cachePlugin:new n(o)}};this._msalClient=new y(l)}setJsonModeResolver(e){this._isJsonMode=e}async getAccessTokenForResource(e,t){let n=await this._acquireTokenInternal(e+"/.default",t);return this._tenantId=n.tenantId,n.accessToken}getUserTenantId(){return this._tenantId}async getCachedAccountAsync(){let e=await this._getAccounts();return this._pickActiveAccount(e)?.username}async listCachedAccountsAsync(){let e=await this._getAccounts();if(e.length===0)return[];let t=this._pickActiveAccount(e);return e.map(n=>({homeAccountId:n.homeAccountId,username:n.username,isActive:n.homeAccountId===t?.homeAccountId}))}async setActiveAccountAsync(e){let t=await this._getAccounts(),n=this._findAccount(t,e);if(!n)throw new u(`No cached account matches '${e}'. Run \`${"ms"} auth status\` to list cached accounts.`);return this._activeStore.write({homeAccountId:n.homeAccountId,username:n.username}),{homeAccountId:n.homeAccountId,username:n.username,isActive:!0}}async loginInteractiveAsync(e,t,n){let i=e+"/.default";if(n){let o=await this._signInWithDeviceCodeAndPersist(i);return{homeAccountId:o.account.homeAccountId,username:o.account.username,isActive:!0}}let r=await this._signInInteractiveAndPersist(i,t,{prompt:t?void 0:"select_account"});if(!r.account)throw new Error("Interactive sign-in did not return an account.");return{homeAccountId:r.account.homeAccountId,username:r.account.username,isActive:!0}}async clearCacheAsync(){let e=await this._clearPersistenceAsync(),t=this._activeStore.clear();return b.rmSync(this._cacheDirectory,{recursive:!0,force:!0}),e||t}async _clearPersistenceAsync(){if(!this._persistence)throw new Error("Authentication not initialized yet");let e;try{e=await this._persistence.load()!==null}catch{e=!0}return await this._persistence.delete(),e}async _getAccounts(){if(!this._msalClient)throw new Error("Authentication not initialized yet");try{return await this._msalClient.getTokenCache().getAllAccounts()}catch(e){return p(`Could not read the MSAL token cache (${e.message}). It may have been written by an older CLI version. Run \`${"ms"} auth logout\` and sign in again to reset it.`),[]}}_findAccount(e,t){let n=t.toLowerCase();return e.find(i=>i.homeAccountId.toLowerCase()===n)??e.find(i=>i.username.toLowerCase()===n)}_pickActiveAccount(e){if(e.length===0)return;if(e.length===1)return e[0];let t=this._activeStore.read();if(t)return e.find(n=>n.homeAccountId===t.homeAccountId)}_ensureActivePointer(e){this._activeStore.read()?.homeAccountId!==e.homeAccountId&&this._activeStore.write({homeAccountId:e.homeAccountId,username:e.username})}async _acquireTokenInternal(e,t){if(!this._msalClient)throw new Error("Authentication not initialized yet");let n=await this._getAccounts();if(n.length===0)return this._ensureInteractiveSignInAllowed("no-account"),this._signInInteractiveAndPersist(e,t);let i=this._pickActiveAccount(n);if(!i){let r=n.map(l=>` - ${l.username}`).join(`
8
8
  `),o=m().interactive?`Run \`${"ms"} auth switch\` to choose one, or \`${"ms"} auth logout\` to clear all cached accounts and start over.`:`Run \`${"ms"} auth switch --account <email>\` to resolve, then retry.`;throw new u(`Multiple accounts are cached and no active account is selected:
9
9
  ${r}
10
10
  ${o}`)}try{let r=await this._msalClient.acquireTokenSilent({account:i,scopes:[e]});return this._ensureActivePointer(r.account??i),r}catch(r){if(r instanceof w||T(r))return this._ensureInteractiveSignInAllowed("expired"),this._signInInteractiveAndPersist(e,t??i.username);throw r}}_ensureInteractiveSignInAllowed(e){if(m().interactive)return;let t=e==="no-account"?"You are not signed in":"Your sign-in session has expired and could not be renewed silently";throw new u(`${t}. Interactive sign-in is required, but the CLI is running in non-interactive mode. Run \`${"ms"} auth login\` to sign in, then retry.`)}async _signInInteractiveAndPersist(e,t,n){if(!this._msalClient)throw new Error("Authentication not initialized yet");let i=this._getInteractiveLoginRequest(e,t);n?.prompt&&(i.prompt=n.prompt);let r=process.stdout.isTTY&&!this._isJsonMode()?new I:null;r?.start("Opening your browser to sign in \u2014 complete the sign-in there to continue...");try{let o=await this._msalClient.acquireTokenInteractive(i);return this._tenantId=o.tenantId,o.account&&this._ensureActivePointer(o.account),o}finally{r?.stop()}}async _signInWithDeviceCodeAndPersist(e){if(!this._msalClient)throw new Error("Authentication not initialized yet");let t={scopes:[e],deviceCodeCallback:i=>process.stderr.write(i.message+`
@@ -14,4 +14,4 @@ ${i}`)}},successTemplate:"You can close this window now.",...t&&{loginHint:t}}}}
14
14
  /*!
15
15
  * Copyright (C) Microsoft Corporation. All rights reserved.
16
16
  */
17
- //# sourceMappingURL=NodeMsalAuthenticationProvider-HTH3V3G2.js.map
17
+ //# sourceMappingURL=NodeMsalAuthenticationProvider-VVQ6CCZ5.js.map
@@ -0,0 +1,8 @@
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-6LKH5WE7.js";import"./chunk-HBLO3WDD.js";import"./chunk-OL6CTXQR.js";import"./chunk-4LIR3ZYP.js";import"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import"./chunk-PVAIJSAI.js";import"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";export{a as assertPackPreconditions,b as packAppArtifactAsync,c as packAsync};
8
+ //# sourceMappingURL=Pack-IWU3PFQL.js.map
@@ -0,0 +1,12 @@
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 b,i as I}from"./chunk-SNWTSI75.js";import{ba as g,ua as h}from"./chunk-4LIR3ZYP.js";import{b as s}from"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{p as n}from"./chunk-3JIZGVCA.js";import{c as w,d as u,h as y,i as v}from"./chunk-PVAIJSAI.js";import{a}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import A from"open";async function E(e){B(e),await e.runVerb();let o=await b(e),t=await I(e),p=await e.getTenantIdAsync();if(!p)throw new s("Unable to determine tenant ID. Ensure you are logged in.");let i=await C(e),d=await e.getOption(n.NoBrowser.camelName,!0)===!1,r=e.isJsonMode(),l=await e.getOption(n.CommitSha.name,!0),m=await e.getOption(n.Branch.name,!0);if(i==="live"&&(l||m))throw new s("--commit and --branch are only valid with --mode preview.");if(l&&m)throw new s("--commit and --branch cannot be used together.");await N({appName:o,environmentId:t,tenantId:p,noBrowser:d,isJson:r,mode:i,commitId:l,branch:m})}async function N(e){let{appName:o,environmentId:t,tenantId:p,noBrowser:i,isJson:d,mode:r,commitId:l,branch:m}=e,f=await g({tenantId:p,environmentId:t,logger:h(),actionsParams:{appName:o}}),c=M(f.appPlayUri,r,l,m);if(!c)throw new s(r==="live"?`No live build is available for app '${o}' yet. Run 'ms app deploy' to deploy one, then re-run 'ms app play'.`:`No appPlayUri is available for app '${o}' in environment '${t}'.`);if(d){u({appName:o,mode:r,url:c,commitHash:f.commitHash??null});return}w(`${r==="live"?"Live":"Preview"} URL for '${f.displayName??o}': ${c}`),r==="live"&&v("Live does not auto-update. Run 'ms app deploy' to publish a new version to the live URL."),await $(c,i)}function M(e,o,t,p="main"){if(!e)return;if(o==="live")return e;let i=e.replace(/\/$/,"");return t?`${i}/commit/${t}`:`${i}/branch/${encodeURIComponent(p)}`}async function $(e,o){if(!o){y(`Opening browser at ${e}`);try{await A(e,{wait:!1})}catch{y(`Could not open browser automatically. Please navigate to:
8
+ ${e}`)}}}async function C(e){let o=await e.getOption(n.Mode.name,!0),t=(o??n.Mode.defaultValue).trim().toLowerCase();if(t!=="live"&&t!=="preview")throw new s(`Invalid --mode value '${o}'. Expected 'live' or 'preview'.`);return t}function B(e){e.setDescription(a.app.play.description),e.addExamples(a.app.play.examples),e.addSwitch({flags:{key:n.NoBrowser.name},description:a.app.play.options.noBrowser}),e.addOptions([{flags:{key:n.AppName.name},env:n.AppName.envVar,description:a.app.play.options.app,optionalInNonInteractive:!0},{flags:{key:n.Mode.name,alias:n.Mode.alias},env:n.Mode.envVar,default:n.Mode.defaultValue,description:a.app.play.options.mode,optionalInNonInteractive:!0},{flags:{key:n.CommitSha.name,alias:n.CommitSha.alias},env:n.CommitSha.envVar,description:a.app.play.options.commit,optionalInNonInteractive:!0},{flags:{key:n.Branch.name},description:a.app.play.options.branch,optionalInNonInteractive:!0}])}export{M as buildPlayUrl,E as playMaafAppAsync};
9
+ /*!
10
+ * Copyright (C) Microsoft Corporation. All rights reserved.
11
+ */
12
+ //# sourceMappingURL=PlayMaafApp-5H3DCJ2C.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{g as A}from"./chunk-5AUOEXAR.js";import{V as u,W as g,q as d,ua as h,va as S}from"./chunk-G33Q5FWT.js";import"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{e as t}from"./chunk-6MXOK2LG.js";import{c as p,h as l,j as m}from"./chunk-PVAIJSAI.js";import{a}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function H(e){let N=S(),{fileConfig:n,cliFs:y}=N;P(e),await e.runVerb(),A();let i=!!await e.getOption("offline",!0),s=await e.getOption("name",!0)||void 0,c=d(),f={vfs:y,authProvider:e.getAuthenticationProvider(),httpClient:e.getHttpClient(),region:c.region,environmentName:c.environmentName,localFilePaths:{appConfigPath:n.appConfigPath,schemaPath:n.schemaPath,codeGenPath:n.codeGenPath},logger:h()},o=i?await g({...f,actionsParams:{dataSource:s}}):await u({...f,actionsParams:{dataSourceName:s}}),v=i?"regenerated":"refreshed",C=i?"regenerate":"refresh";for(let r of o.succeeded)p(`'${r}' ${v} successfully.`);for(let r of o.failed)m(`Failed to ${C} '${r.dataSourceName}': ${r.error}`);o.succeeded.length>0&&o.failed.length===0&&l(`Hint: Run '${"ms"} app dev' to test locally.`)}function P(e){e.setDescription(a.app.refresh.dataSource.description),e.addExamples(a.app.refresh.dataSource.examples),e.addOptions([{flags:{key:t.DataSourceName.name,alias:t.DataSourceName.alias},env:t.DataSourceName.envVar,description:a.app.refresh.dataSource.options.name,optionalInNonInteractive:!0}]),e.addSwitch({flags:{key:t.Offline.name},env:t.Offline.env,description:a.app.refresh.dataSource.options.offline})}export{H as refreshDataSourceAsync};
7
+ import{g as A}from"./chunk-SNWTSI75.js";import{V as u,W as g,q as d,ua as h,va as S}from"./chunk-4LIR3ZYP.js";import"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{e as t}from"./chunk-3JIZGVCA.js";import{c as p,h as l,j as m}from"./chunk-PVAIJSAI.js";import{a}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function H(e){let N=S(),{fileConfig:n,cliFs:y}=N;P(e),await e.runVerb(),A();let i=!!await e.getOption("offline",!0),s=await e.getOption("name",!0)||void 0,c=d(),f={vfs:y,authProvider:e.getAuthenticationProvider(),httpClient:e.getHttpClient(),region:c.region,environmentName:c.environmentName,localFilePaths:{appConfigPath:n.appConfigPath,schemaPath:n.schemaPath,codeGenPath:n.codeGenPath},logger:h()},o=i?await g({...f,actionsParams:{dataSource:s}}):await u({...f,actionsParams:{dataSourceName:s}}),v=i?"regenerated":"refreshed",C=i?"regenerate":"refresh";for(let r of o.succeeded)p(`'${r}' ${v} successfully.`);for(let r of o.failed)m(`Failed to ${C} '${r.dataSourceName}': ${r.error}`);o.succeeded.length>0&&o.failed.length===0&&l(`Hint: Run '${"ms"} app dev' to test locally.`)}function P(e){e.setDescription(a.app.refresh.dataSource.description),e.addExamples(a.app.refresh.dataSource.examples),e.addOptions([{flags:{key:t.DataSourceName.name,alias:t.DataSourceName.alias},env:t.DataSourceName.envVar,description:a.app.refresh.dataSource.options.name,optionalInNonInteractive:!0}]),e.addSwitch({flags:{key:t.Offline.name},env:t.Offline.env,description:a.app.refresh.dataSource.options.offline})}export{H as refreshDataSourceAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=RefreshDataSource-ZFZJXJ5L.js.map
11
+ //# sourceMappingURL=RefreshDataSource-XQT7LVMO.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,b as D}from"./chunk-MFPX2RFH.js";import{e as b}from"./chunk-5AUOEXAR.js";import{b as w,qa as y,ra as A,ua as m}from"./chunk-G33Q5FWT.js";import{b as p}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{t as o}from"./chunk-6MXOK2LG.js";import{c,d}from"./chunk-PVAIJSAI.js";import{a as n}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function C(e){H(e),await e.runVerb();let l=await e.getTenantIdAsync();if(!l)throw new p("Unable to determine tenant ID. Ensure you are logged in.");if(!e.getEnvironmentId())throw new p("Environment id is required for ms git auth refresh. Set 'environmentId' in ms.config.json, or set the MS_CLI_MAAF_DEBUG_ENVIRONMENT_ID env var for debug runs.");let i=await e.getOption(o.Repo.name);if(!i)throw new p("Argument repo is required. Use --repo or -r to specify the GitHub repository (e.g. --repo https://contoso.ghe.com/contoso/my-app).");let{host:a,owner:t,repo:r}=w(i),I=t&&r?y(t,r):"";m().trackActivityEvent("Git.Auth.Refresh.Start",{repoHost:a,repoHash:I});let E=await e.getOption(o.OpenBrowser.camelName,!0)??!1,g=e.isJsonMode(),R=v({isJson:g,openBrowser:E}),u=new AbortController,h=()=>{u.abort()};process.once("SIGINT",h);let S=a&&t&&r?`https://${a}/${t}/${r}`:i,G=t&&r?`${t}/${r}`:i;try{let s=await A({remoteUrl:S,tenantId:l,logger:m(),display:R,skipBrowser:!1,signal:u.signal});g?d({githubLogin:s.githubLogin,mappingExpiresAt:s.mappingExpiresAt}):(c(`Authenticated as ${s.githubLogin} for ${G}.`),c(`Mapping established; expires around ${s.mappingExpiresAt}.`))}finally{process.removeListener("SIGINT",h)}}function v(e){return e.isJson?new D:e.openBrowser?f:{...f,openVerificationUri:void 0}}function H(e){e.setDescription(n.git.auth.refresh.description),e.addExamples(n.git.auth.refresh.examples),e.addOptions([b({flags:{key:o.Repo.name,alias:o.Repo.alias},env:o.Repo.envVar,message:o.Repo.promptMessage,description:n.git.auth.refresh.options.repo})]),e.addSwitch({flags:{key:o.OpenBrowser.name},description:n.git.auth.refresh.options.openBrowser})}export{C as refreshGitAuthAsync};
7
+ import{a as f,b as D}from"./chunk-4VBFOKV6.js";import{e as b}from"./chunk-SNWTSI75.js";import{b as w,qa as y,ra as A,ua as m}from"./chunk-4LIR3ZYP.js";import{b as p}from"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{u as o}from"./chunk-3JIZGVCA.js";import{c,d}from"./chunk-PVAIJSAI.js";import{a as n}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function C(e){H(e),await e.runVerb();let l=await e.getTenantIdAsync();if(!l)throw new p("Unable to determine tenant ID. Ensure you are logged in.");if(!e.getEnvironmentId())throw new p("Environment id is required for ms git auth refresh. Set 'environmentId' in ms.config.json, or set the MS_CLI_MAAF_DEBUG_ENVIRONMENT_ID env var for debug runs.");let i=await e.getOption(o.Repo.name);if(!i)throw new p("Argument repo is required. Use --repo or -r to specify the GitHub repository (e.g. --repo https://contoso.ghe.com/contoso/my-app).");let{host:a,owner:t,repo:r}=w(i),I=t&&r?y(t,r):"";m().trackActivityEvent("Git.Auth.Refresh.Start",{repoHost:a,repoHash:I});let E=await e.getOption(o.OpenBrowser.camelName,!0)??!1,g=e.isJsonMode(),R=v({isJson:g,openBrowser:E}),u=new AbortController,h=()=>{u.abort()};process.once("SIGINT",h);let S=a&&t&&r?`https://${a}/${t}/${r}`:i,G=t&&r?`${t}/${r}`:i;try{let s=await A({remoteUrl:S,tenantId:l,logger:m(),display:R,skipBrowser:!1,signal:u.signal});g?d({githubLogin:s.githubLogin,mappingExpiresAt:s.mappingExpiresAt}):(c(`Authenticated as ${s.githubLogin} for ${G}.`),c(`Mapping established; expires around ${s.mappingExpiresAt}.`))}finally{process.removeListener("SIGINT",h)}}function v(e){return e.isJson?new D:e.openBrowser?f:{...f,openVerificationUri:void 0}}function H(e){e.setDescription(n.git.auth.refresh.description),e.addExamples(n.git.auth.refresh.examples),e.addOptions([b({flags:{key:o.Repo.name,alias:o.Repo.alias},env:o.Repo.envVar,message:o.Repo.promptMessage,description:n.git.auth.refresh.options.repo})]),e.addSwitch({flags:{key:o.OpenBrowser.name},description:n.git.auth.refresh.options.openBrowser})}export{C as refreshGitAuthAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=RefreshGitAuth-5A3SX2HC.js.map
11
+ //# sourceMappingURL=RefreshGitAuth-IQBAFR37.js.map
@@ -4,11 +4,11 @@ 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{b as C,d as E,g as R}from"./chunk-5AUOEXAR.js";import{P as $,Q as N,c as y,q as w,ua as b,va as A}from"./chunk-G33Q5FWT.js";import{b as u}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{d as f}from"./chunk-6MXOK2LG.js";import{a as D,c as S,i as p}from"./chunk-PVAIJSAI.js";import{a as r}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function z(e){let o=A(),{fileConfig:i,cliFs:m}=o;W(e),await e.runVerb(),R();let t=await e.getOption("force",!0),s=await O(i.appConfigPath);if(s.length===0){p("No data sources found in ms.config.json. Nothing to remove.");return}let l;if(o.interactive)l=await F(s);else{let a=await e.getOption("name");if(!a)throw x(s),new u(`Re-run with --name <name>. Example:
7
+ import{b as C,d as E,g as R}from"./chunk-SNWTSI75.js";import{P as $,Q as N,c as y,q as w,ua as b,va as A}from"./chunk-4LIR3ZYP.js";import{b as u}from"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{d as f}from"./chunk-3JIZGVCA.js";import{a as D,c as S,i as p}from"./chunk-PVAIJSAI.js";import{a as r}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function z(e){let o=A(),{fileConfig:i,cliFs:m}=o;W(e),await e.runVerb(),R();let t=await e.getOption("force",!0),s=await O(i.appConfigPath);if(s.length===0){p("No data sources found in ms.config.json. Nothing to remove.");return}let l;if(o.interactive)l=await F(s);else{let a=await e.getOption("name");if(!a)throw x(s),new u(`Re-run with --name <name>. Example:
8
8
  ${"ms"} app remove data-source --name ${s[0]?.name??"<name>"}`);let c=s.find(P=>P.name===a);if(!c)throw x(s),new u(`Data source '${a}' not found in ms.config.json. See available data sources above.`);l=c}let{name:d,kind:v,connectorId:I,connectorDisplayName:g}=l,n=l.dataverseTable?[]:s.filter(a=>a.dataverseTable&&a.connectorId===l.connectorId);if(n.length>0){let a=n.map(c=>c.name).join(", ");p(`Removing '${d}' will also remove ${n.length} associated Dataverse table(s): ${a}.`)}if(!t&&o.interactive){let a=n.length>0?`Remove '${g}' and its ${n.length} Dataverse table(s)?`:`Are you sure you want to remove the ${v} '${d}' from '${g}'?`;if(!await C({message:a})){p("Remove cancelled.");return}}let h=w(),k=e.getAuthenticationProvider(),j={vfs:m,authProvider:k,region:h.region,environmentName:h.environmentName,localFilePaths:i,actionsParams:{apiId:I,dataSourceName:d,sqlStoredProcedure:""},logger:b()};if(await $(j)){if(S(`Removed ${v} '${d}' from '${g}'.`),n.length>0){let a=n.map(c=>c.name).join(", ");S(`Also removed ${n.length} Dataverse table(s): ${a}.`)}}else p(`The ${v} '${d}' was not found or could not be removed.`)}async function O(e){let o;try{o=await y(e)}catch{throw new u(`Could not read ms.config.json at '${e}'. Run this command from your app directory after adding a data source.`)}let{all:i}=N(o);return i.filter(m=>!m.sqlStoredProcedure)}async function F(e){let o=e.map(t=>({value:t.name,label:`${t.name} (${t.connectorDisplayName})`,hint:t.kind})),i=await E({message:"Which data source would you like to remove?",options:o,manualPromptMessage:"Enter the data source name:"}),m=e.find(t=>t.name===i);if(!m)throw new u(`Data source '${i}' not found in ms.config.json.`);return m}function x(e){D({title:"Available data sources",columns:[{header:"Data Source"},{header:"Connector",maxWidth:30},{header:"Type",maxWidth:6}],rows:e.map(o=>[o.name,o.connectorDisplayName,o.kind]),emptyMessage:"No data sources found in ms.config.json.",totalLabel:"data source(s) found"})}function W(e){e.getResolvedCommand()?.path.at(-1)==="connector"?(e.setDescription(`${r.app.remove.deprecation}
9
9
 
10
10
  ${r.app.remove.description}`),e.addExamples(r.app.remove.deprecatedExamples)):(e.setDescription(r.app.remove.description),e.addExamples(r.app.remove.examples)),e.addSwitch({flags:{key:"force",alias:"f"},description:r.app.remove.options.force}),e.addOptions([{flags:{key:f.DataSourceName.name,alias:f.DataSourceName.alias},env:f.DataSourceName.envVar,description:r.app.remove.options.dataSourceName,optionalInNonInteractive:!0}])}export{z as removeDataSourceAsync};
11
11
  /*!
12
12
  * Copyright (C) Microsoft Corporation. All rights reserved.
13
13
  */
14
- //# sourceMappingURL=RemoveDataSource-57JJLK5I.js.map
14
+ //# sourceMappingURL=RemoveDataSource-PGPLMJUX.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{c}from"./chunk-3YRE4IQ3.js";import"./chunk-HBLO3WDD.js";import"./chunk-TYRVM4PP.js";import{k as s}from"./chunk-5AUOEXAR.js";import"./chunk-G33Q5FWT.js";import"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import{a as n,b as r}from"./chunk-7NXJAIJX.js";import"./chunk-PVAIJSAI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var a=class{_msalClient;_clientId;_clientSecret;_tenantId;_region;constructor(){let t=r("SP_CLIENT_ID"),e=r("SP_CLIENT_SECRET"),i=r("SP_TENANT_ID");if(!t||!e||!i)throw new Error(`Service principal environment variables ${n("SP_CLIENT_ID")}, ${n("SP_CLIENT_SECRET")}, and ${n("SP_TENANT_ID")} must be set`);this._clientId=t,this._clientSecret=e,this._tenantId=i}async initAsync(t){this._region=t;let e={auth:{clientId:this._clientId,clientSecret:this._clientSecret,authority:s(this._region,this._tenantId)}};this._msalClient=new c(e)}async getAccessTokenForResource(t,e){if(!this._msalClient)throw new Error("Authentication not initialized yet");let i={scopes:[t+"/.default"]},o=await this._msalClient.acquireTokenByClientCredential(i);if(!o?.accessToken)throw new Error("Failed to acquire token using service principal");return o.accessToken}getUserTenantId(){return this._tenantId}async getCachedAccountAsync(){return`Service Principal:${this._clientId}`}};export{a as ServicePrincipalAuthenticationProvider};
7
+ import{c}from"./chunk-3YRE4IQ3.js";import"./chunk-HBLO3WDD.js";import"./chunk-TYRVM4PP.js";import{k as s}from"./chunk-SNWTSI75.js";import"./chunk-4LIR3ZYP.js";import"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import{a as n,b as r}from"./chunk-EX6IKPAO.js";import"./chunk-PVAIJSAI.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var a=class{_msalClient;_clientId;_clientSecret;_tenantId;_region;constructor(){let t=r("SP_CLIENT_ID"),e=r("SP_CLIENT_SECRET"),i=r("SP_TENANT_ID");if(!t||!e||!i)throw new Error(`Service principal environment variables ${n("SP_CLIENT_ID")}, ${n("SP_CLIENT_SECRET")}, and ${n("SP_TENANT_ID")} must be set`);this._clientId=t,this._clientSecret=e,this._tenantId=i}async initAsync(t){this._region=t;let e={auth:{clientId:this._clientId,clientSecret:this._clientSecret,authority:s(this._region,this._tenantId)}};this._msalClient=new c(e)}async getAccessTokenForResource(t,e){if(!this._msalClient)throw new Error("Authentication not initialized yet");let i={scopes:[t+"/.default"]},o=await this._msalClient.acquireTokenByClientCredential(i);if(!o?.accessToken)throw new Error("Failed to acquire token using service principal");return o.accessToken}getUserTenantId(){return this._tenantId}async getCachedAccountAsync(){return`Service Principal:${this._clientId}`}};export{a as ServicePrincipalAuthenticationProvider};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=ServicePrincipalAuthenticationProvider-SVKDZG6X.js.map
11
+ //# sourceMappingURL=ServicePrincipalAuthenticationProvider-IZZRJFZQ.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{c as h,d as w,na as s,pa as S,va as v}from"./chunk-G33Q5FWT.js";import{b as r}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{d as m,h as f}from"./chunk-PVAIJSAI.js";import{a as c}from"./chunk-VNEZZ3RI.js";import{a as d}from"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";function R(t){let o=new Set(s.map(n=>`--${n.name}`)),e=t.getRegisteredFlags();for(let n of process.argv.slice(2))if(n.startsWith("--")&&n!=="--help"&&!o.has(n)&&!e.has(n))return n;return null}function E(){for(let t of s){let o=`--${t.name}`;if(process.argv.filter(n=>n===o).length>1)return t.name}return null}var A="The setting value or name you have input is invalid. Check your input, and try again.",N="You have input duplicate setting flags. Try again with one value per setting.";async function O(t){if(F(t),R(t))throw new r(A);if(E())throw new r(N);await t.runVerb();let n=v();if(!n.appConfig)throw new r(`No ${d} found in the current directory. Run "${"ms"} app init" first.`);let a={},u=[];for(let i of s){let p=S(i.name),g=await t.getOption(p,!0);g!==void 0&&i.type==="boolean"&&(g!=="true"&&g!=="false"?u.push(i.name):a[i.configKey]=g==="true")}if(u.length>0)throw new r(A);if(Object.keys(a).length===0){f("No settings provided. Use --<setting> <value> to update a setting, e.g. --show-header false."),f(`Run "${"ms"} app get-settings" to see available settings.`);return}let l=await h(n.fileConfig.appConfigPath);if(l.appSettings={...l.appSettings??{},...a},await w(n.fileConfig.appConfigPath,l),t.isJsonMode())m({settings:a});else for(let i of s){let p=a[i.configKey];p!==void 0&&f(`${i.name} = ${p}`)}}var C={"show-header":"APP_SHOW_HEADER"};function F(t){t.setDescription(c.app["set-setting"].description),t.addExamples(c.app["set-setting"].examples??[]);let o=c.app["set-setting"].options;t.addOptions(s.map(e=>({flags:{key:e.name},env:C[e.name],description:o?.[e.name]??e.description})))}export{O as setSettingAsync};
7
+ import{c as h,d as w,na as s,pa as S,va as v}from"./chunk-4LIR3ZYP.js";import{b as r}from"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{d as m,h as f}from"./chunk-PVAIJSAI.js";import{a as c}from"./chunk-47LJLFDF.js";import{a as d}from"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";function R(t){let o=new Set(s.map(n=>`--${n.name}`)),e=t.getRegisteredFlags();for(let n of process.argv.slice(2))if(n.startsWith("--")&&n!=="--help"&&!o.has(n)&&!e.has(n))return n;return null}function E(){for(let t of s){let o=`--${t.name}`;if(process.argv.filter(n=>n===o).length>1)return t.name}return null}var A="The setting value or name you have input is invalid. Check your input, and try again.",N="You have input duplicate setting flags. Try again with one value per setting.";async function O(t){if(F(t),R(t))throw new r(A);if(E())throw new r(N);await t.runVerb();let n=v();if(!n.appConfig)throw new r(`No ${d} found in the current directory. Run "${"ms"} app init" first.`);let a={},u=[];for(let i of s){let p=S(i.name),g=await t.getOption(p,!0);g!==void 0&&i.type==="boolean"&&(g!=="true"&&g!=="false"?u.push(i.name):a[i.configKey]=g==="true")}if(u.length>0)throw new r(A);if(Object.keys(a).length===0){f("No settings provided. Use --<setting> <value> to update a setting, e.g. --show-header false."),f(`Run "${"ms"} app get-settings" to see available settings.`);return}let l=await h(n.fileConfig.appConfigPath);if(l.appSettings={...l.appSettings??{},...a},await w(n.fileConfig.appConfigPath,l),t.isJsonMode())m({settings:a});else for(let i of s){let p=a[i.configKey];p!==void 0&&f(`${i.name} = ${p}`)}}var C={"show-header":"APP_SHOW_HEADER"};function F(t){t.setDescription(c.app["set-setting"].description),t.addExamples(c.app["set-setting"].examples??[]);let o=c.app["set-setting"].options;t.addOptions(s.map(e=>({flags:{key:e.name},env:C[e.name],description:o?.[e.name]??e.description})))}export{O as setSettingAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=SetSetting-RB3F7IXG.js.map
11
+ //# sourceMappingURL=SetSetting-SEWDA4TF.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{h as l,i as f}from"./chunk-5AUOEXAR.js";import{ga as m,ua as d}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{u as n}from"./chunk-6MXOK2LG.js";import{c as a,d as s,h as p}from"./chunk-PVAIJSAI.js";import{a as r}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function w(e){I(e),await e.runVerb();let h=await f(e),o=await e.getTenantIdAsync();if(!o)throw new c("Unable to determine tenant ID. Ensure you are logged in.");let t=await l(e),i=await m({tenantId:o,environmentId:h,logger:d(),actionsParams:{appName:t}});if(e.isJsonMode()){s({appName:t,...i});return}a(`Share link created for '${t}' (id: ${i.appShareLinkId}). Anyone in your tenant who opens this link will be granted Microsoft App Reader access. Share URL:`),p(i.shareLinkUrl)}function I(e){e.setDescription(r.app.shareLink.create.description),e.addExamples(r.app.shareLink.create.examples),e.addOptions([{flags:{key:n.AppName.name},env:n.AppName.envVar,description:r.app.shareLink.create.options.app,optionalInNonInteractive:!0},{flags:{key:n.EnvironmentId.name,alias:n.EnvironmentId.alias},env:n.EnvironmentId.envVar,description:r.app.shareLink.create.options.environmentId,optionalInNonInteractive:!0}])}export{w as shareLinkCreateAsync};
7
+ import{h as l,i as f}from"./chunk-SNWTSI75.js";import{ga as m,ua as d}from"./chunk-4LIR3ZYP.js";import{b as c}from"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{v as n}from"./chunk-3JIZGVCA.js";import{c as a,d as s,h as p}from"./chunk-PVAIJSAI.js";import{a as r}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function w(e){I(e),await e.runVerb();let h=await f(e),o=await e.getTenantIdAsync();if(!o)throw new c("Unable to determine tenant ID. Ensure you are logged in.");let t=await l(e),i=await m({tenantId:o,environmentId:h,logger:d(),actionsParams:{appName:t}});if(e.isJsonMode()){s({appName:t,...i});return}a(`Share link created for '${t}' (id: ${i.appShareLinkId}). Anyone in your tenant who opens this link will be granted Microsoft App Reader access. Share URL:`),p(i.shareLinkUrl)}function I(e){e.setDescription(r.app.shareLink.create.description),e.addExamples(r.app.shareLink.create.examples),e.addOptions([{flags:{key:n.AppName.name},env:n.AppName.envVar,description:r.app.shareLink.create.options.app,optionalInNonInteractive:!0},{flags:{key:n.EnvironmentId.name,alias:n.EnvironmentId.alias},env:n.EnvironmentId.envVar,description:r.app.shareLink.create.options.environmentId,optionalInNonInteractive:!0}])}export{w as shareLinkCreateAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=ShareLinkCreate-7BCDPWY6.js.map
11
+ //# sourceMappingURL=ShareLinkCreate-T5FN47J2.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{h as c,i as h}from"./chunk-5AUOEXAR.js";import{ha as d,ua as l}from"./chunk-G33Q5FWT.js";import{b as m}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{v as n}from"./chunk-6MXOK2LG.js";import{a as s,d 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 k(e){f(e),await e.runVerb();let I=await h(e),r=await e.getTenantIdAsync();if(!r)throw new m("Unable to determine tenant ID. Ensure you are logged in.");let i=await c(e),o=await d({tenantId:r,environmentId:I,logger:l(),actionsParams:{appName:i}});if(e.isJsonMode()){p({appName:i,...o});return}s({title:`Share links for '${i}'`,columns:[{header:"LINK ID"},{header:"ROLE"},{header:"REDEEMERS"},{header:"CREATED BY",maxWidth:36}],rows:o.value.map(a=>[a.appShareLinkId,a.managedAppRoleName,String(a.redeemedPrincipalIds.length),a.createdByObjectId]),emptyMessage:`No share links issued for '${i}'.`,totalLabel:"link(s)"})}function f(e){e.setDescription(t.app.shareLink.list.description),e.addExamples(t.app.shareLink.list.examples),e.addOptions([{flags:{key:n.AppName.name},env:n.AppName.envVar,description:t.app.shareLink.list.options.app,optionalInNonInteractive:!0},{flags:{key:n.EnvironmentId.name,alias:n.EnvironmentId.alias},env:n.EnvironmentId.envVar,description:t.app.shareLink.list.options.environmentId,optionalInNonInteractive:!0}])}export{k as shareLinkListAsync};
7
+ import{h as c,i as h}from"./chunk-SNWTSI75.js";import{ha as d,ua as l}from"./chunk-4LIR3ZYP.js";import{b as m}from"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{w as n}from"./chunk-3JIZGVCA.js";import{a as s,d as p}from"./chunk-PVAIJSAI.js";import{a as t}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function k(e){f(e),await e.runVerb();let I=await h(e),r=await e.getTenantIdAsync();if(!r)throw new m("Unable to determine tenant ID. Ensure you are logged in.");let i=await c(e),o=await d({tenantId:r,environmentId:I,logger:l(),actionsParams:{appName:i}});if(e.isJsonMode()){p({appName:i,...o});return}s({title:`Share links for '${i}'`,columns:[{header:"LINK ID"},{header:"ROLE"},{header:"REDEEMERS"},{header:"CREATED BY",maxWidth:36}],rows:o.value.map(a=>[a.appShareLinkId,a.managedAppRoleName,String(a.redeemedPrincipalIds.length),a.createdByObjectId]),emptyMessage:`No share links issued for '${i}'.`,totalLabel:"link(s)"})}function f(e){e.setDescription(t.app.shareLink.list.description),e.addExamples(t.app.shareLink.list.examples),e.addOptions([{flags:{key:n.AppName.name},env:n.AppName.envVar,description:t.app.shareLink.list.options.app,optionalInNonInteractive:!0},{flags:{key:n.EnvironmentId.name,alias:n.EnvironmentId.alias},env:n.EnvironmentId.envVar,description:t.app.shareLink.list.options.environmentId,optionalInNonInteractive:!0}])}export{k as shareLinkListAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=ShareLinkList-4BI3WMNN.js.map
11
+ //# sourceMappingURL=ShareLinkList-6JCVEYNC.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{b as h,h as u,i as I}from"./chunk-5AUOEXAR.js";import{f,ia as k,ua as m,va as v}from"./chunk-G33Q5FWT.js";import{b as p}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{x as n}from"./chunk-6MXOK2LG.js";import{c as l,d as a,i as s}from"./chunk-PVAIJSAI.js";import{a as i}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function F(e){g(e),await e.runVerb();let c=await I(e),d=await e.getTenantIdAsync();if(!d)throw new p("Unable to determine tenant ID. Ensure you are logged in.");let r=await u(e),o=await e.getOption(n.LinkId.name);if(!o)throw new p("Provide a share link ID via --link-id.");if(!await e.getOption(n.Force.name,!0)&&v().interactive&&!await h({message:`Revoke share link '${o}' for app '${r}'? Anyone who has not yet redeemed it will lose access; redeemers will have their Microsoft App Reader role revoked.`})){s("Revoke cancelled.");return}try{await k({tenantId:d,environmentId:c,logger:m(),actionsParams:{appName:r,appShareLinkId:o}})}catch(t){if(w(t)){if(e.isJsonMode()){a({appName:r,linkId:o,existed:!1});return}s(`Share link '${o}' was not found on '${r}'; nothing was revoked.`);return}throw t}if(e.isJsonMode()){a({appName:r,linkId:o,existed:!0});return}l(`Share link '${o}' revoked for '${r}'.`)}function w(e){if(!(e instanceof f)||e.status!==404||!e.body)return!1;try{return JSON.parse(e.body).error?.code==="AppShareLinkNotFound"}catch{return!1}}function g(e){e.setDescription(i.app.shareLink.revoke.description),e.addExamples(i.app.shareLink.revoke.examples),e.addSwitch({flags:{key:n.Force.name,alias:n.Force.alias},description:i.app.shareLink.revoke.options.force}),e.addOptions([{flags:{key:n.LinkId.name,alias:n.LinkId.alias},env:n.LinkId.envVar,description:i.app.shareLink.revoke.options.linkId},{flags:{key:n.AppName.name},env:n.AppName.envVar,description:i.app.shareLink.revoke.options.app,optionalInNonInteractive:!0},{flags:{key:n.EnvironmentId.name,alias:n.EnvironmentId.alias},env:n.EnvironmentId.envVar,description:i.app.shareLink.revoke.options.environmentId,optionalInNonInteractive:!0}])}export{F as shareLinkRevokeAsync};
7
+ import{b as h,h as u,i as I}from"./chunk-SNWTSI75.js";import{f,ia as k,ua as m,va as v}from"./chunk-4LIR3ZYP.js";import{b as p}from"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{y as n}from"./chunk-3JIZGVCA.js";import{c as l,d as a,i as s}from"./chunk-PVAIJSAI.js";import{a as i}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function F(e){g(e),await e.runVerb();let c=await I(e),d=await e.getTenantIdAsync();if(!d)throw new p("Unable to determine tenant ID. Ensure you are logged in.");let r=await u(e),o=await e.getOption(n.LinkId.name);if(!o)throw new p("Provide a share link ID via --link-id.");if(!await e.getOption(n.Force.name,!0)&&v().interactive&&!await h({message:`Revoke share link '${o}' for app '${r}'? Anyone who has not yet redeemed it will lose access; redeemers will have their Microsoft App Reader role revoked.`})){s("Revoke cancelled.");return}try{await k({tenantId:d,environmentId:c,logger:m(),actionsParams:{appName:r,appShareLinkId:o}})}catch(t){if(w(t)){if(e.isJsonMode()){a({appName:r,linkId:o,existed:!1});return}s(`Share link '${o}' was not found on '${r}'; nothing was revoked.`);return}throw t}if(e.isJsonMode()){a({appName:r,linkId:o,existed:!0});return}l(`Share link '${o}' revoked for '${r}'.`)}function w(e){if(!(e instanceof f)||e.status!==404||!e.body)return!1;try{return JSON.parse(e.body).error?.code==="AppShareLinkNotFound"}catch{return!1}}function g(e){e.setDescription(i.app.shareLink.revoke.description),e.addExamples(i.app.shareLink.revoke.examples),e.addSwitch({flags:{key:n.Force.name,alias:n.Force.alias},description:i.app.shareLink.revoke.options.force}),e.addOptions([{flags:{key:n.LinkId.name,alias:n.LinkId.alias},env:n.LinkId.envVar,description:i.app.shareLink.revoke.options.linkId},{flags:{key:n.AppName.name},env:n.AppName.envVar,description:i.app.shareLink.revoke.options.app,optionalInNonInteractive:!0},{flags:{key:n.EnvironmentId.name,alias:n.EnvironmentId.alias},env:n.EnvironmentId.envVar,description:i.app.shareLink.revoke.options.environmentId,optionalInNonInteractive:!0}])}export{F as shareLinkRevokeAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=ShareLinkRevoke-EEJVCRCY.js.map
11
+ //# sourceMappingURL=ShareLinkRevoke-OH5DZDHR.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 L,b as O,c as y,d as x,e as $,f as P,g as k}from"./chunk-6FFQN2SO.js";import{h as E,i as b}from"./chunk-5AUOEXAR.js";import{I as h,J as I,K as g,da as C,ka as M,ua as R,va as S}from"./chunk-G33Q5FWT.js";import{b as u}from"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{w as r}from"./chunk-6MXOK2LG.js";import{a as v,d as w,h as D,i as T}from"./chunk-PVAIJSAI.js";import{a as l}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function Z(e){V(e),await e.runVerb();let i=await b(e),p=await e.getTenantIdAsync();if(!p)throw new u("Unable to determine tenant ID. Ensure you are logged in.");let o=await E(e),f=!!await e.getOption("app",!0),d=await e.getOption("access",!0);if(!d||!d.trim())throw new u("The --access option is required. Use --access play to list app (play) access, or --access edit to list edit access.");let t=x(d),s,a="none",m;if(f)(t==="edit"||e.isJsonMode())&&(s=await P({tenantId:p,environmentId:i,appName:o}),a=F(s));else{let n=S().appConfig??{};m=y(n.repositoryId)?n.repositoryId:void 0,a=t==="edit"?$(n):n.repoType??"none"}let G=W(t,a);!e.isJsonMode()&&t==="edit"&&a==="github"&&T(O);let A=await Promise.all(G.map(n=>U({target:n,tenantId:p,environmentId:i,appName:o,appInfo:s,configRepoId:m})));if(e.isJsonMode()){w({appName:o,access:t,repoType:a,results:A.map(n=>({scope:n.scope,roleDefinitionName:n.roleDefinitionName,...n.repoId?{repoId:n.repoId}:{},unclassifiedCount:n.unclassifiedCount,value:n.assignments}))});return}let J=A.flatMap(n=>n.assignments.map(c=>[n.scope,c.principalObjectId??"-",c.principalType??"-",B(c.roleDefinitionName),c.createdOn??"-"]));v({title:`${t==="play"?"Play":"Edit"} shares for '${o}'`,columns:[{header:"SCOPE"},{header:"PRINCIPAL ID"},{header:"TYPE"},{header:"ROLE"},{header:"CREATED ON"}],rows:J,emptyMessage:`No ${t} shares for '${o}'.`,totalLabel:"assignment(s)"});let N=A.reduce((n,c)=>n+c.unclassifiedCount,0);N>0&&D(`${N} assignment(s) with an unrecognized role definition were not shown.`)}async function U(e){let{target:i,tenantId:p,environmentId:o,appName:f,appInfo:d,configRepoId:t}=e;if(i.scope==="app"){let m=await C({tenantId:p,environmentId:o,logger:R(),actionsParams:{appName:f,roleDefinitionName:i.roleDefinitionName}});return{scope:"app",roleDefinitionName:i.roleDefinitionName,assignments:m.assignments,unclassifiedCount:m.unclassifiedCount}}let s=[t,d?.repositoryId].find(y);if(s||(s=(await k({tenantId:p,environmentId:o,appName:f})).repositoryId),!y(s))throw new u(`App '${f}' has no associated repository, so edit access cannot be listed.`);let a=await M({tenantId:p,environmentId:o,logger:R(),actionsParams:{repoId:s}});return{scope:"repo",roleDefinitionName:i.roleDefinitionName,repoId:s,assignments:a.assignments,unclassifiedCount:a.unclassifiedCount}}function V(e){e.setDescription(l.app.share.list.description),e.addExamples(l.app.share.list.examples),e.addOptions([{flags:{key:r.AppName.name},env:r.AppName.envVar,description:l.app.share.list.options.app,optionalInNonInteractive:!0},{flags:{key:r.EnvironmentId.name,alias:r.EnvironmentId.alias},env:r.EnvironmentId.envVar,description:l.app.share.list.options.environmentId,optionalInNonInteractive:!0},{flags:{key:r.Access.name},env:r.Access.envVar,description:l.app.share.list.options.access}])}function F(e){switch(e.repoType){case"Native":return"native";case"ExternalGitProviderBound":case"ExternallyProvidedBuild":return"github";default:return"none"}}function B(e){switch(e){case I:return"App Reader";case g:return"App Contributor";case h:return"Repository Contributor";default:return e??"-"}}function W(e,i){if(e==="play")return[{scope:"app",roleDefinitionName:I}];if(i==="none")throw new u(L);return i!=="native"?[{scope:"app",roleDefinitionName:g}]:[{scope:"repo",roleDefinitionName:h},{scope:"app",roleDefinitionName:g}]}export{Z as shareListAsync};
7
+ import{a as L,b as O,c as y,d as x,e as $,f as P,g as k}from"./chunk-LQ65CHNN.js";import{h as E,i as b}from"./chunk-SNWTSI75.js";import{I as h,J as I,K as g,da as C,ka as M,ua as R,va as S}from"./chunk-4LIR3ZYP.js";import{b as u}from"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{x as r}from"./chunk-3JIZGVCA.js";import{a as v,d as w,h as D,i as T}from"./chunk-PVAIJSAI.js";import{a as l}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function Z(e){V(e),await e.runVerb();let i=await b(e),p=await e.getTenantIdAsync();if(!p)throw new u("Unable to determine tenant ID. Ensure you are logged in.");let o=await E(e),f=!!await e.getOption("app",!0),d=await e.getOption("access",!0);if(!d||!d.trim())throw new u("The --access option is required. Use --access play to list app (play) access, or --access edit to list edit access.");let t=x(d),s,a="none",m;if(f)(t==="edit"||e.isJsonMode())&&(s=await P({tenantId:p,environmentId:i,appName:o}),a=F(s));else{let n=S().appConfig??{};m=y(n.repositoryId)?n.repositoryId:void 0,a=t==="edit"?$(n):n.repoType??"none"}let G=W(t,a);!e.isJsonMode()&&t==="edit"&&a==="github"&&T(O);let A=await Promise.all(G.map(n=>U({target:n,tenantId:p,environmentId:i,appName:o,appInfo:s,configRepoId:m})));if(e.isJsonMode()){w({appName:o,access:t,repoType:a,results:A.map(n=>({scope:n.scope,roleDefinitionName:n.roleDefinitionName,...n.repoId?{repoId:n.repoId}:{},unclassifiedCount:n.unclassifiedCount,value:n.assignments}))});return}let J=A.flatMap(n=>n.assignments.map(c=>[n.scope,c.principalObjectId??"-",c.principalType??"-",B(c.roleDefinitionName),c.createdOn??"-"]));v({title:`${t==="play"?"Play":"Edit"} shares for '${o}'`,columns:[{header:"SCOPE"},{header:"PRINCIPAL ID"},{header:"TYPE"},{header:"ROLE"},{header:"CREATED ON"}],rows:J,emptyMessage:`No ${t} shares for '${o}'.`,totalLabel:"assignment(s)"});let N=A.reduce((n,c)=>n+c.unclassifiedCount,0);N>0&&D(`${N} assignment(s) with an unrecognized role definition were not shown.`)}async function U(e){let{target:i,tenantId:p,environmentId:o,appName:f,appInfo:d,configRepoId:t}=e;if(i.scope==="app"){let m=await C({tenantId:p,environmentId:o,logger:R(),actionsParams:{appName:f,roleDefinitionName:i.roleDefinitionName}});return{scope:"app",roleDefinitionName:i.roleDefinitionName,assignments:m.assignments,unclassifiedCount:m.unclassifiedCount}}let s=[t,d?.repositoryId].find(y);if(s||(s=(await k({tenantId:p,environmentId:o,appName:f})).repositoryId),!y(s))throw new u(`App '${f}' has no associated repository, so edit access cannot be listed.`);let a=await M({tenantId:p,environmentId:o,logger:R(),actionsParams:{repoId:s}});return{scope:"repo",roleDefinitionName:i.roleDefinitionName,repoId:s,assignments:a.assignments,unclassifiedCount:a.unclassifiedCount}}function V(e){e.setDescription(l.app.share.list.description),e.addExamples(l.app.share.list.examples),e.addOptions([{flags:{key:r.AppName.name},env:r.AppName.envVar,description:l.app.share.list.options.app,optionalInNonInteractive:!0},{flags:{key:r.EnvironmentId.name,alias:r.EnvironmentId.alias},env:r.EnvironmentId.envVar,description:l.app.share.list.options.environmentId,optionalInNonInteractive:!0},{flags:{key:r.Access.name},env:r.Access.envVar,description:l.app.share.list.options.access}])}function F(e){switch(e.repoType){case"Native":return"native";case"ExternalGitProviderBound":case"ExternallyProvidedBuild":return"github";default:return"none"}}function B(e){switch(e){case I:return"App Reader";case g:return"App Contributor";case h:return"Repository Contributor";default:return e??"-"}}function W(e,i){if(e==="play")return[{scope:"app",roleDefinitionName:I}];if(i==="none")throw new u(L);return i!=="native"?[{scope:"app",roleDefinitionName:g}]:[{scope:"repo",roleDefinitionName:h},{scope:"app",roleDefinitionName:g}]}export{Z as shareListAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=ShareList-LJDAEGI3.js.map
11
+ //# sourceMappingURL=ShareList-QCEL7QNJ.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 r}from"./chunk-NP2KJOYC.js";import"./chunk-6FFQN2SO.js";import"./chunk-USRRI5H4.js";import"./chunk-5AUOEXAR.js";import"./chunk-G33Q5FWT.js";import"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import"./chunk-6MXOK2LG.js";import"./chunk-PVAIJSAI.js";import"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function i(e){await r(e,"share")}export{i as shareMaafAppAsync};
7
+ import{a as r}from"./chunk-EQCYKUEU.js";import"./chunk-LQ65CHNN.js";import"./chunk-USRRI5H4.js";import"./chunk-SNWTSI75.js";import"./chunk-4LIR3ZYP.js";import"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import"./chunk-3JIZGVCA.js";import"./chunk-PVAIJSAI.js";import"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function i(e){await r(e,"share")}export{i as shareMaafAppAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=ShareMaafApp-QFRXLYUD.js.map
11
+ //# sourceMappingURL=ShareMaafApp-6MKZ33HW.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{d as c}from"./chunk-RBG2H562.js";import{b as l,k as m}from"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import{b as y,d as a,i as f}from"./chunk-PVAIJSAI.js";import{a as n}from"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as s from"fs";import*as p from"path";var d={remote:!0,console:!1};async function h(e){u(e,n.telemetry.enable.options),e.setDescription(n.telemetry.enable.description),e.addExamples(n.telemetry.enable.examples),await e.runVerb();let t=S(await e.getOption("remote",!0),await e.getOption("console",!0),!0);g(t)}async function E(e){u(e,n.telemetry.disable.options),e.setDescription(n.telemetry.disable.description),e.addExamples(n.telemetry.disable.examples),await e.runVerb();let t=S(await e.getOption("remote",!0),await e.getOption("console",!0),!1);g(t)}async function A(e){e.setDescription(n.telemetry.status.description),e.addExamples(n.telemetry.status.examples),await e.runVerb(),b(e.isJsonMode())}function u(e,t){e.addSwitches([{flags:{key:"remote"},description:t.remote},{flags:{key:"console"},description:t.console}])}function S(e,t,r){let o=!e&&!t,i={};return(e||o)&&(i.remote=r),t&&(i.console=r),i}function b(e){try{let t=p.join(l,m);if(s.existsSync(t)){let r=s.readFileSync(t,"utf-8"),o=JSON.parse(r);if(e){a({settings:o});return}y({title:"Telemetry Settings:",items:[o],fields:[{label:"Remote",value:i=>String(i.remote)},{label:"Console",value:i=>String(i.console)}]})}else{if(e){a({settings:null});return}f("No telemetry settings found. Using default settings.")}}catch(t){throw new c(`Failed to read telemetry settings: ${t.message}`)}}function g(e){try{s.existsSync(l)||s.mkdirSync(l,{recursive:!0});let t=p.join(l,m),r={...d};if(s.existsSync(t)){let o=s.readFileSync(t,"utf-8"),i=JSON.parse(o);r={...d,...i}}s.writeFileSync(t,JSON.stringify({...r,...e},null,2),"utf-8")}catch(t){throw new c(`Failed to update telemetry settings: ${t.message}`)}}export{E as telemetryDisableAsync,h as telemetryEnableAsync,A as telemetryStatusAsync};
7
+ import{d as c}from"./chunk-RBG2H562.js";import{b as l,k as m}from"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import{b as y,d as a,i as f}from"./chunk-PVAIJSAI.js";import{a as n}from"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as s from"fs";import*as p from"path";var d={remote:!0,console:!1};async function h(e){u(e,n.telemetry.enable.options),e.setDescription(n.telemetry.enable.description),e.addExamples(n.telemetry.enable.examples),await e.runVerb();let t=S(await e.getOption("remote",!0),await e.getOption("console",!0),!0);g(t)}async function E(e){u(e,n.telemetry.disable.options),e.setDescription(n.telemetry.disable.description),e.addExamples(n.telemetry.disable.examples),await e.runVerb();let t=S(await e.getOption("remote",!0),await e.getOption("console",!0),!1);g(t)}async function A(e){e.setDescription(n.telemetry.status.description),e.addExamples(n.telemetry.status.examples),await e.runVerb(),b(e.isJsonMode())}function u(e,t){e.addSwitches([{flags:{key:"remote"},description:t.remote},{flags:{key:"console"},description:t.console}])}function S(e,t,r){let o=!e&&!t,i={};return(e||o)&&(i.remote=r),t&&(i.console=r),i}function b(e){try{let t=p.join(l,m);if(s.existsSync(t)){let r=s.readFileSync(t,"utf-8"),o=JSON.parse(r);if(e){a({settings:o});return}y({title:"Telemetry Settings:",items:[o],fields:[{label:"Remote",value:i=>String(i.remote)},{label:"Console",value:i=>String(i.console)}]})}else{if(e){a({settings:null});return}f("No telemetry settings found. Using default settings.")}}catch(t){throw new c(`Failed to read telemetry settings: ${t.message}`)}}function g(e){try{s.existsSync(l)||s.mkdirSync(l,{recursive:!0});let t=p.join(l,m),r={...d};if(s.existsSync(t)){let o=s.readFileSync(t,"utf-8"),i=JSON.parse(o);r={...d,...i}}s.writeFileSync(t,JSON.stringify({...r,...e},null,2),"utf-8")}catch(t){throw new c(`Failed to update telemetry settings: ${t.message}`)}}export{E as telemetryDisableAsync,h as telemetryEnableAsync,A as telemetryStatusAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=TelemetrySettings-A474HALH.js.map
11
+ //# sourceMappingURL=TelemetrySettings-RXPPIEVO.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 r}from"./chunk-NP2KJOYC.js";import"./chunk-6FFQN2SO.js";import"./chunk-USRRI5H4.js";import"./chunk-5AUOEXAR.js";import"./chunk-G33Q5FWT.js";import"./chunk-RBG2H562.js";import"./chunk-S5HEU7XK.js";import"./chunk-EV3TTTOT.js";import"./chunk-7NXJAIJX.js";import"./chunk-6MXOK2LG.js";import"./chunk-PVAIJSAI.js";import"./chunk-VNEZZ3RI.js";import"./chunk-U36HMOQW.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function i(e){await r(e,"unshare")}export{i as unshareMaafAppAsync};
7
+ import{a as r}from"./chunk-EQCYKUEU.js";import"./chunk-LQ65CHNN.js";import"./chunk-USRRI5H4.js";import"./chunk-SNWTSI75.js";import"./chunk-4LIR3ZYP.js";import"./chunk-RBG2H562.js";import"./chunk-UNJJUCSA.js";import"./chunk-6RSE3J4X.js";import"./chunk-EX6IKPAO.js";import"./chunk-3JIZGVCA.js";import"./chunk-PVAIJSAI.js";import"./chunk-47LJLFDF.js";import"./chunk-PPW4XUZO.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function i(e){await r(e,"unshare")}export{i as unshareMaafAppAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=UnshareMaafApp-423RNXCN.js.map
11
+ //# sourceMappingURL=UnshareMaafApp-OSE2TOBJ.js.map
@@ -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{i as E}from"./chunk-5AUOEXAR.js";import{k as u,l as f,n as l,o as p,q as w}from"./chunk-G33Q5FWT.js";import{b as a,f as c}from"./chunk-RBG2H562.js";import{n as y}from"./chunk-S5HEU7XK.js";import{h as m,j as v}from"./chunk-PVAIJSAI.js";async function R(n,r,t){try{let e=await n;if(e.status===200){if(e.data.operationSuccess===!1||e.data.environmentFound===!1||e.data.errorCode)throw new u(200,e.data.message,e.data.errorCode);let i=e.data.environment?.name;if(!i)throw new c("Routing service returned 200 with no environment name.");return i}let o=await p(r,e.pollingUrl,e.authResource,t);if(!o.environment?.name)throw new c("Routing service finished provisioning but returned no environment name.");return o.environment.name}catch(e){throw A(e)}}function A(n){if(n instanceof u){let r=n.apiMessage?` ${n.apiMessage}`:" Ensure your account has the required permissions to create a Developer environment.";return new a(`Could not provision a Developer environment for your tenant (status ${n.status}).${r}`)}return n instanceof f?new a("Timed out waiting for a Developer environment to provision. Try again."):n instanceof Error?n:new Error(String(n))}function P(n,r,t,e,o){let{trackBackgroundFailure:i=!0}=o??{},g=n.getHttpClient(),{region:I}=w(),d=R(l(g,r,y,{provisionDataverse:!1},I,t),g,t);return i&&d.catch(s=>{t.trackErrorEvent(`${e}.RoutingEnvironmentBackgroundFailure`,{error:s instanceof Error?s.message:String(s)})}),d}function h(n){let r=n instanceof Error?n.message:String(n);v(`Failed to resolve a developer environment.
7
+ import{i as E}from"./chunk-SNWTSI75.js";import{k as u,l as f,n as l,o as p,q as w}from"./chunk-4LIR3ZYP.js";import{b as a,f as c}from"./chunk-RBG2H562.js";import{n as y}from"./chunk-UNJJUCSA.js";import{h as m,j as v}from"./chunk-PVAIJSAI.js";async function R(n,r,t){try{let e=await n;if(e.status===200){if(e.data.operationSuccess===!1||e.data.environmentFound===!1||e.data.errorCode)throw new u(200,e.data.message,e.data.errorCode);let i=e.data.environment?.name;if(!i)throw new c("Routing service returned 200 with no environment name.");return i}let o=await p(r,e.pollingUrl,e.authResource,t);if(!o.environment?.name)throw new c("Routing service finished provisioning but returned no environment name.");return o.environment.name}catch(e){throw A(e)}}function A(n){if(n instanceof u){let r=n.apiMessage?` ${n.apiMessage}`:" Ensure your account has the required permissions to create a Developer environment.";return new a(`Could not provision a Developer environment for your tenant (status ${n.status}).${r}`)}return n instanceof f?new a("Timed out waiting for a Developer environment to provision. Try again."):n instanceof Error?n:new Error(String(n))}function P(n,r,t,e,o){let{trackBackgroundFailure:i=!0}=o??{},g=n.getHttpClient(),{region:I}=w(),d=R(l(g,r,y,{provisionDataverse:!1},I,t),g,t);return i&&d.catch(s=>{t.trackErrorEvent(`${e}.RoutingEnvironmentBackgroundFailure`,{error:s instanceof Error?s.message:String(s)})}),d}function h(n){let r=n instanceof Error?n.message:String(n);v(`Failed to resolve a developer environment.
8
8
 
9
9
  ${r}
10
10
 
@@ -12,4 +12,4 @@ To retry, run the same command again. Alternatively, pass --environment-id <id>
12
12
  /*!
13
13
  * Copyright (C) Microsoft Corporation. All rights reserved.
14
14
  */
15
- //# sourceMappingURL=chunk-YIKNM523.js.map
15
+ //# sourceMappingURL=chunk-23T63QIT.js.map
@@ -0,0 +1,11 @@
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"}},r={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"}},e={SkipCodegen:{name:"skip-codegen",env:"SKIP_CODEGEN"},UseV1Codegen:{name:"use-v1-codegen",env:"USE_V1_CODEGEN"}},m={...e},t={Table:{name:"table",alias:"t",promptMessage:"Please provide the table name:",envVar:"TABLE_NAME"},...e},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"},...e},c={ConnectionRef:{name:"connection-ref",alias:"cr",promptMessage:"Please provide the Connection Reference:",envVar:"CONNECTION_REF"},...e},A={DataSourceName:{name:"name",alias:"n",promptMessage:"Please provide the data source or table name:",envVar:"DATA_SOURCE_NAME"}},l={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={SearchTerm:{...r.Search,promptMessage:"Please provide a search term to filter Dataverse operations by name:",envVar:"DATAVERSE_API_SEARCH_TERM"}},P={Search:{...r.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"}},_={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:{...r.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 s={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"}},a={name:"force-reauth",camelName:"forceReauth"},u={...s,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:a},E={App:{name:"app",promptMessage:"Please provide the app ID:"},EnvironmentId:{name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"},Directory:"[directory]"},g={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:a},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"},Branch:{name:"branch"},NoBrowser:{name:"no-browser",camelName:"browser"}},C={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:a},S={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"}},n={name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},o={name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"},T={AppName:n,EnvironmentId:o},f={AppName:n,EnvironmentId:o},L={AppName:n,EnvironmentId:o,Access:{name:"access",envVar:"MAAF_APP_ACCESS"}},F={AppName:n,EnvironmentId:o,LinkId:{name:"link-id",alias:"l",promptMessage:"Please provide the share link ID:",envVar:"MAAF_SHARE_LINK_ID"},Force:{name:"force",alias:"f"}},b={...s,Repo:{name:"repo",envVar:"APP_REPO"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"},ForceReauth:a};export{p as a,r as b,i as c,A as d,l as e,d as f,v as g,P as h,_ as i,N as j,u as k,E as l,g as m,h as n,I as o,V as p,C as q,S as r,O as s,D as t,R as u,T as v,f as w,L as x,F as y,b as z};
8
+ /*!
9
+ * Copyright (C) Microsoft Corporation. All rights reserved.
10
+ */
11
+ //# sourceMappingURL=chunk-3JIZGVCA.js.map
@@ -0,0 +1,11 @@
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-PPW4XUZO.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:{clone:{description:"Clone an existing app with a platform-managed repository into an empty target directory and configure Git Credential Manager. Apps bound to external repositories or without source control are not supported.",options:{app:"App ID (GUID) of the app to clone.",environmentId:"Environment ID containing the app (optional)."},examples:[`${"ms"} app clone --app <app-id>`,`${"ms"} app clone ./my-app --app <app-id>`]},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:"Show an app's configuration and bound resources.",options:{app:`The app identifier to retrieve (logical name or app ID GUID). Defaults to the current app in ${t}.`,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:{deprecation:`(deprecated) '${"ms"} app show' is deprecated. Use '${"ms"} app info' instead.`,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, a provided branch, or a 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. Cannot be combined with --branch.",branch:"Preview mode only. The branch to open. Defaults to main and cannot be combined with --commit.",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 --branch feature/my-change`,`${"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:{"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-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`]}}},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-47LJLFDF.js.map