@microsoft/cmr-cli 0.33.0 → 0.34.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.
- package/README.md +37 -14
- package/THIRD-PARTY-NOTICES.txt +287 -30
- package/dist/Add-4RULNL6A.js +11 -0
- package/dist/AddConfig-D2DCR3JH.js +12 -0
- package/dist/AddConnector-5ZR5AF6H.js +19 -0
- package/dist/AddDeployment-7U4I5IC4.js +11 -0
- package/dist/AddDeploymentBinding-BZVRRZ7H.js +18 -0
- package/dist/AddRayfin-45ASHNIX.js +87 -0
- package/dist/Alter-36TSNZ4M.js +11 -0
- package/dist/{AuthStatus-XA6RGYYZ.js → AuthStatus-W5ZHOAVD.js} +2 -2
- package/dist/AuthSwitch-7HRPTGEG.js +13 -0
- package/dist/Bin.js +1 -1
- package/dist/BuildMaafApp-TLQXOVQC.js +11 -0
- package/dist/Clear-X55BZKYF.js +11 -0
- package/dist/Cli-EEO7V3MZ.js +47 -0
- package/dist/CloneMaafApp-4EHW3HE2.js +12 -0
- package/dist/CreateMaafApp-VNXWCAP4.js +23 -0
- package/dist/CreateMaafProject-WVBNZPVL.js +11 -0
- package/dist/DeleteMaafApp-UGUKARMO.js +11 -0
- package/dist/DeployMaafApp-GJO567TK.js +8 -0
- package/dist/DeployMaafProject-4TSW2SFJ.js +11 -0
- package/dist/DeploymentApprovals-SZKNJT76.js +11 -0
- package/dist/Dev-ZD3L6WYY.js +15 -0
- package/dist/{EnvironmentVariableAuthenticationProvider-EBRBQ5I2.js → EnvironmentVariableAuthenticationProvider-EURTERVX.js} +2 -2
- package/dist/FeatureSettings-GG7JGFIY.js +11 -0
- package/dist/{GenerateCode-Z2OY3SZR.js → GenerateCode-PNYC45SK.js} +2 -2
- package/dist/GetMaafBuildStatus-UTPVWF5L.js +11 -0
- package/dist/GetMaafProjectDeployStatus-PLK52YC4.js +12 -0
- package/dist/{GetSettings-64N4P6L7.js → GetSettings-RLRDJEC7.js} +2 -2
- package/dist/InfoMaafApp-CTB6IPRU.js +13 -0
- package/dist/InfoMaafProject-TULH566X.js +11 -0
- package/dist/Init-TYWP2E6U.js +11 -0
- package/dist/ListConnectorActions-UQS6D4UN.js +11 -0
- package/dist/ListConnectors-OCDO64AT.js +11 -0
- package/dist/ListDeployments-PDLJ3IEI.js +11 -0
- package/dist/ListMaafApps-UAWTTCGB.js +11 -0
- package/dist/ListMaafProjects-T3Q2GEDX.js +11 -0
- package/dist/{ListSchema-IR7FTBRR.js → ListSchema-G673LK5Q.js} +2 -2
- package/dist/{ListSettings-3M7UOOLI.js → ListSettings-EXCK5ZS6.js} +2 -2
- package/dist/{Login-G7TNQISG.js → Login-XZATPT4L.js} +2 -2
- package/dist/{Logout-AOOISVWK.js → Logout-2XM4IMZF.js} +2 -2
- package/dist/{MockFetch-GKQMNDW3.js → MockFetch-LW3KYEGC.js} +2 -2
- package/dist/NodeMsalAuthenticationProvider-ALMFNUEV.js +17 -0
- package/dist/Pack-RH4D4C7W.js +8 -0
- package/dist/PackProject-5DUWSBFA.js +14 -0
- package/dist/PlayMaafApp-5BXGXE6O.js +8 -0
- package/dist/ProjectApprovals-K3JF6D72.js +13 -0
- package/dist/ProjectRoleAssignments-7IUDEVBN.js +11 -0
- package/dist/RefreshDataSource-CMHDF2GP.js +11 -0
- package/dist/RefreshGitAuth-4TRO5IOQ.js +11 -0
- package/dist/Remove-KZD3SDDC.js +11 -0
- package/dist/{RemoveDataSource-T2AG7ZWC.js → RemoveDataSource-C7UXOUNH.js} +3 -3
- package/dist/RemoveDeployment-ZQJWQPD6.js +11 -0
- package/dist/ServicePrincipalAuthenticationProvider-3NPJTLF5.js +11 -0
- package/dist/SetSetting-3XO6HPG7.js +11 -0
- package/dist/{SetSetting-KOWAPJWX.js → SetSetting-ZW7F43GC.js} +2 -2
- package/dist/ShareLinkCreate-JXPW5H7A.js +11 -0
- package/dist/ShareLinkList-ICYPRIQV.js +11 -0
- package/dist/ShareLinkRevoke-JVMQZF7K.js +11 -0
- package/dist/ShareList-YGSTFMVE.js +11 -0
- package/dist/ShareMaafApp-ZCY72WHK.js +11 -0
- package/dist/{TelemetrySettings-FVJUK5MR.js → TelemetrySettings-P6WYWGW4.js} +2 -2
- package/dist/UnshareMaafApp-N4UR6Q4A.js +11 -0
- package/dist/{chunk-JWSX7DVU.js → chunk-2SRFM7D6.js} +2 -2
- package/dist/chunk-3YCPXSCO.js +11 -0
- package/dist/chunk-45EZLDPE.js +147 -0
- package/dist/{chunk-EFTF4FA7.js → chunk-4PI5THLA.js} +2 -2
- package/dist/{chunk-4C6DWU2Y.js → chunk-6KOL66SF.js} +2 -2
- package/dist/{chunk-2VJIWD7V.js → chunk-74RNALDY.js} +2 -2
- package/dist/{chunk-4JTUAUHI.js → chunk-7AEULMP2.js} +2 -2
- package/dist/{chunk-MWN7R4VR.js → chunk-7LAMG4KK.js} +2 -2
- package/dist/chunk-A5INC5TY.js +11 -0
- package/dist/chunk-AICYZHWK.js +11 -0
- package/dist/chunk-B4NTYKGH.js +12 -0
- package/dist/chunk-BAQPANON.js +11 -0
- package/dist/{chunk-BREK3DVB.js → chunk-BMOTNINY.js} +6 -6
- package/dist/{chunk-OUKOEUZA.js → chunk-C7UWPNC3.js} +1 -1
- package/dist/{chunk-2UMD5IAQ.js → chunk-CLY3OASM.js} +2 -2
- package/dist/chunk-DLUQVMUE.js +11 -0
- package/dist/{chunk-JDRULLI3.js → chunk-ENDUKF4E.js} +2 -2
- package/dist/{chunk-DOCWK326.js → chunk-FESGOCAP.js} +7 -7
- package/dist/{chunk-IM7SC23O.js → chunk-GO22IDEN.js} +6 -6
- package/dist/{chunk-WV7KDGLS.js → chunk-HHW4SKVU.js} +2 -2
- package/dist/{chunk-CONEIY4I.js → chunk-HZGDQAKA.js} +2 -2
- package/dist/{chunk-O4G2KO7E.js → chunk-IMVZRBSQ.js} +2 -2
- package/dist/chunk-K77VBHFP.js +12 -0
- package/dist/{chunk-CER3QPDN.js → chunk-KD4NQIYX.js} +3 -3
- package/dist/{chunk-4WQT5P2M.js → chunk-KN66FSQK.js} +2 -2
- package/dist/{chunk-4UHMKZLH.js → chunk-KPKJZKWW.js} +2 -2
- package/dist/chunk-NMZFJESU.js +12 -0
- package/dist/{chunk-ZREDMBLO.js → chunk-NNYOT7IR.js} +2 -2
- package/dist/{chunk-JMF444BA.js → chunk-OH3TCDCC.js} +2 -2
- package/dist/{chunk-A57M2UGH.js → chunk-OHQNTYJG.js} +2 -2
- package/dist/{chunk-4AO24KKT.js → chunk-PYPCPMCR.js} +5 -5
- package/dist/{chunk-OTXBVG3E.js → chunk-R2IECDVU.js} +3 -3
- package/dist/{chunk-FGB6GFXI.js → chunk-RA74M3YD.js} +2 -2
- package/dist/{chunk-E2O4YZX2.js → chunk-RSHOMYG6.js} +228 -227
- package/dist/chunk-UHNOINTO.js +11 -0
- package/dist/{chunk-ELHOJBVT.js → chunk-XC7Y6E2C.js} +11 -11
- package/dist/chunk-XJXWNOJR.js +11 -0
- package/dist/chunk-Y2D37EFX.js +13 -0
- package/dist/{chunk-C7V6WEZM.js → chunk-YEWRCEPT.js} +2 -2
- package/dist/chunk-Z4UX3JOS.js +12 -0
- package/dist/chunk-ZBQT5XZJ.js +32 -0
- package/dist/chunk-ZGBTKTTU.js +11 -0
- package/dist/{chunk-5BE4TLDK.js → chunk-ZLK2CMMJ.js} +23 -23
- package/dist/chunk-ZWJ5T5VI.js +11 -0
- package/dist/node-PLZPXPD7.js +29 -0
- package/dist/typescript-6OTSQQEW.js +458 -0
- package/package.json +5 -4
- package/dist/Add-75RSJNM4.js +0 -11
- package/dist/AddConfig-4SAYYOBQ.js +0 -12
- package/dist/AddConnector-P4R4NJ5P.js +0 -16
- package/dist/AddDeployment-TBA3AAGD.js +0 -11
- package/dist/AddDeploymentBinding-6FZ7Y5JM.js +0 -18
- package/dist/AddRayfin-35GBGCWF.js +0 -38
- package/dist/Alter-U7WDVOMU.js +0 -11
- package/dist/AuthSwitch-2FXB7WFU.js +0 -13
- package/dist/BuildMaafApp-3EGRD23G.js +0 -11
- package/dist/Clear-MZGQZ2XK.js +0 -11
- package/dist/Cli-6A2HUP7R.js +0 -47
- package/dist/CloneMaafApp-YAEYSP23.js +0 -12
- package/dist/CreateMaafApp-2XYROOHB.js +0 -23
- package/dist/CreateMaafProject-Q7KIVAR2.js +0 -11
- package/dist/DeleteMaafApp-G3SL3GGP.js +0 -11
- package/dist/DeployMaafApp-DBJONCUH.js +0 -8
- package/dist/DeployMaafProject-SOMMKVJO.js +0 -11
- package/dist/DeploymentApprovals-Y67LSQQG.js +0 -11
- package/dist/Dev-TXJLPT7K.js +0 -15
- package/dist/FeatureSettings-LYV6QUZB.js +0 -11
- package/dist/GetMaafBuildStatus-ZR5GCREL.js +0 -11
- package/dist/GetMaafProjectDeployStatus-OJ56DPZ6.js +0 -12
- package/dist/InfoMaafApp-FJM7UI5H.js +0 -13
- package/dist/InfoMaafProject-EU6OQ7DX.js +0 -11
- package/dist/Init-MTONJT7V.js +0 -11
- package/dist/ListConnectorActions-PJTNNWLH.js +0 -11
- package/dist/ListConnectors-JYNVPB3O.js +0 -11
- package/dist/ListDeployments-UV6J6WA5.js +0 -11
- package/dist/ListMaafApps-QPEX7JA4.js +0 -11
- package/dist/ListMaafProjects-RDR2S3HD.js +0 -11
- package/dist/NodeMsalAuthenticationProvider-6ABSS6QK.js +0 -17
- package/dist/Pack-QJZCMVEM.js +0 -8
- package/dist/PackProject-Y3Q3KOTC.js +0 -14
- package/dist/PlayMaafApp-MH66OLOV.js +0 -8
- package/dist/ProjectApprovals-NTFYLH3W.js +0 -13
- package/dist/ProjectRoleAssignments-7IDK6SGJ.js +0 -11
- package/dist/RefreshDataSource-CISFHQNA.js +0 -11
- package/dist/RefreshGitAuth-NUQ7JNJA.js +0 -11
- package/dist/Remove-IYDTKDJE.js +0 -11
- package/dist/RemoveDeployment-K3GDRCXJ.js +0 -11
- package/dist/ServicePrincipalAuthenticationProvider-CEHIAANL.js +0 -11
- package/dist/SetSetting-PD76MA6O.js +0 -11
- package/dist/ShareLinkCreate-VCWVBQ4B.js +0 -11
- package/dist/ShareLinkList-5VG5CG34.js +0 -11
- package/dist/ShareLinkRevoke-KYUNMTG5.js +0 -11
- package/dist/ShareList-M25UE6LD.js +0 -11
- package/dist/ShareMaafApp-QMEJEXPZ.js +0 -11
- package/dist/UnshareMaafApp-RIUUYHIL.js +0 -11
- package/dist/chunk-36YYCVFC.js +0 -12
- package/dist/chunk-3UIUI5Q2.js +0 -11
- package/dist/chunk-B6REHI77.js +0 -11
- package/dist/chunk-GVLAG66W.js +0 -13
- package/dist/chunk-HWEMI6JI.js +0 -12
- package/dist/chunk-OB6WEE2V.js +0 -11
- package/dist/chunk-OBATM5M4.js +0 -11
- package/dist/chunk-PBXK6LJO.js +0 -11
- package/dist/chunk-VAKAW5BD.js +0 -12
- package/dist/chunk-WV7D7PTW.js +0 -12
- package/dist/chunk-YMRQPXY7.js +0 -32
- package/dist/chunk-YYXAAA2U.js +0 -11
- package/dist/rayfin-pack-HOUOLOHQ.js +0 -164
|
@@ -0,0 +1,17 @@
|
|
|
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 w,b as y}from"./chunk-3YRE4IQ3.js";import"./chunk-HBLO3WDD.js";import{a as v}from"./chunk-OL6CTXQR.js";import"./chunk-TYRVM4PP.js";import{o as I}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{Pb as m,y as u}from"./chunk-RSHOMYG6.js";import{d,f as p,g as A,o as f}from"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{P as g,Q as _}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as S from"node:fs";import*as R from"node:path";import T from"open";import*as c from"fs";import*as C from"path";var E="active-account.json";function P(s){let e=s.lastIndexOf(".");if(!(e<=0))return s.slice(e+1).trim()||void 0}var h=class{constructor(e=d){this._cacheDir=e;this._filePath=C.join(this._cacheDir,E)}_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 b=class{_msalClient;_tenantId;_region;_persistence;_activeStore;_cacheDirectory;_isJsonMode=()=>process.argv.includes("--json");constructor(e=d){this._cacheDirectory=e,this._activeStore=new h(e)}async initAsync(e){this._region=e;let{DataProtectionScope:t,PersistenceCachePlugin:n,PersistenceCreator:i}=await import("./dist-7N5TXK2L.js"),r={cachePath:R.join(this._cacheDirectory,"msal_cache.json"),dataProtectionScope:t.CurrentUser,serviceName:p,accountName:A,usePlaintextFileOnLinux:!1},o=await i.createPersistence(r);this._persistence=o;let l={auth:{authority:I(this._region,this._tenantId),clientId:f},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(){if(this._tenantId!==void 0)return this._tenantId;let e=this._activeStore.read()?.homeAccountId;return e===void 0?void 0:P(e)}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 S.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 g(`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
|
+
`),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
|
+
${r}
|
|
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||k(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 v: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+`
|
|
11
|
+
`)},n=await this._msalClient.acquireTokenByDeviceCode(t);if(!n?.account)throw new Error("Device code sign-in did not return an account.");return this._tenantId=n.tenantId,this._ensureActivePointer(n.account),{...n,account:n.account}}_getInteractiveLoginRequest(e,t){return{scopes:[e],openBrowser:async i=>{try{await T(i,{wait:!1})}catch(r){_(`Couldn't open a browser automatically (${String(r)}).
|
|
12
|
+
Open this URL to finish signing in:
|
|
13
|
+
${i}`)}},successTemplate:"You can close this window now.",...t&&{loginHint:t}}}};function k(s){if(!(s instanceof Error))return!1;let e=s.errorCode;if(e===3400073247||e==="3400073247")return!0;let t=(s.message??"").toLowerCase();return t.includes("integrated windows auth")&&t.includes("federation")}export{b as NodeMsalAuthenticationProvider};
|
|
14
|
+
/*!
|
|
15
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
16
|
+
*/
|
|
17
|
+
//# sourceMappingURL=NodeMsalAuthenticationProvider-ALMFNUEV.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{h as a,i as b,j as c,k as d,l as e}from"./chunk-ZBQT5XZJ.js";import"./chunk-XC7Y6E2C.js";import"./chunk-HBLO3WDD.js";import"./chunk-ZWJ5T5VI.js";import"./chunk-OL6CTXQR.js";import"./chunk-TYRVM4PP.js";import"./chunk-A5INC5TY.js";import"./chunk-RSHOMYG6.js";import"./chunk-UHNOINTO.js";import"./chunk-YEWRCEPT.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import"./chunk-AICYZHWK.js";import"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";export{b as assertAppConfigSchemaValid,a as assertPackPreconditions,d as packAppArtifactAsync,e as packAsync,c as tryPackAppArtifactAsync};
|
|
8
|
+
//# sourceMappingURL=Pack-RH4D4C7W.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
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 Q,b as R,c as Z,d as q,e as B,f as tt,g as et,h as ot,i as at,j as nt}from"./chunk-ZBQT5XZJ.js";import{a as st,b as it}from"./chunk-ATUGCFVC.js";import{i as rt}from"./chunk-XC7Y6E2C.js";import"./chunk-HBLO3WDD.js";import"./chunk-ZWJ5T5VI.js";import"./chunk-OL6CTXQR.js";import"./chunk-TYRVM4PP.js";import{a as H}from"./chunk-A5INC5TY.js";import{A as m,Ob as $,Pb as O,Qb as Y,x as F}from"./chunk-RSHOMYG6.js";import"./chunk-UHNOINTO.js";import"./chunk-YEWRCEPT.js";import{a as z}from"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as N}from"./chunk-AICYZHWK.js";import{H as V,I as W,L as X,N as D,P as h,r as C,v as I}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import{randomUUID as K}from"node:crypto";import*as s from"node:fs/promises";import*as l from"node:path";function A(t){return typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"}var yt=new Set([".git",".ms","node_modules"]),lt="project-pack-",dt=".log",T=50*1024*1024,At=5,kt=1440*60*1e3;async function jt(t){try{return(await s.stat(t)).isFile()}catch(e){if(A(e))return!1;throw e}}async function Et(t){try{let e=await s.realpath(t),r=await s.readdir(e,{withFileTypes:!0}),o=new Set(r.filter(a=>a.isFile()).map(a=>a.name)),n=I.find(a=>o.has(a));if(!n)throw new m(`An app config (${I.join(" or ")}) is required at the project root: ${e}`);return await s.realpath(l.join(e,n))}catch(e){throw A(e)?new m(`Unable to resolve the project root or app config: ${e.message}`):e}}async function ut(t){let e;try{e=await s.readFile(t,"utf-8")}catch(r){throw new m(`Failed to read ${t}: ${r.message}`)}try{let r=JSON.parse(e);at(r),ot(r,l.basename(t));let o=l.resolve(t)===l.resolve(O().fileConfig.appConfigPath);return{appConfigPath:t,appId:et(o?await H():r.appId,l.basename(t)),environmentId:r.environmentId,buildType:r.buildType}}catch(r){throw r instanceof F?(r.message=`${t}: ${r.message}`,r):new m(`${t}: ${r.message}`)}}async function mt(t,e){let r=await s.realpath(e);if(!R(t,r,!0))throw new m(`Project app directory resolves outside the project root: ${e}`);let o=await s.readdir(r,{withFileTypes:!0}),n=new Set(o.filter(p=>p.isFile()).map(p=>p.name)),a=I.find(p=>n.has(p));if(!a)return;let c=l.join(r,a),i=await s.realpath(c);if(!R(t,i))throw new m(`Discovered app config resolves outside the project root: ${c}`);return i}async function Ct(t){let e=[],r=await s.realpath(t);async function o(n){let a=await mt(r,n);a&&e.push(a)}try{await o(r);let a=(await s.readdir(r,{withFileTypes:!0})).filter(c=>c.isDirectory()&&!yt.has(c.name)).sort((c,i)=>c.name.localeCompare(i.name));for(let c of a)await o(l.join(r,c.name))}catch(n){throw A(n)?new m(`Project contents changed while discovering app configurations: ${n.message}`):n}return e}async function It(t,e){let r=await s.realpath(t),o=[],n=new Set;for(let a of e){let c=l.resolve(r,a);if(!R(r,c,!0))throw new m(`Project app directory must be the project root or one of its descendants: ${a}`);let i;try{i=await s.realpath(c)}catch(P){throw A(P)?new m(`Project app directory does not exist: ${a}`):P}if(!R(r,i,!0))throw new m(`Project app directory resolves outside the project root: ${a}`);if(n.has(i))continue;n.add(i);let p=await mt(r,i);if(!p)throw new m(`Project app directory does not contain ${I.join(" or ")}: ${a}`);o.push(p)}return o}async function ct(t){let e=await Promise.all(t.map(ut)),r=new Map;for(let{appId:o,appConfigPath:n}of e){let a=r.get(o);if(a)throw new m(`Duplicate appId "${o}" in ${a} and ${n}`);r.set(o,n)}return e}async function gt(t=!1){let{fileConfig:e,projectConfig:r,projectConfigError:o}=O();if(o)throw new m(`Invalid ${C}: ${o.message}`);let n;if(r){if(!e.projectConfigPath)throw new m(`Unable to resolve the path to ${C}.`);n=l.dirname(l.resolve(e.projectConfigPath));let c=r.components?.apps;return c?(t||D(`Using app directories listed in ${C}.`),{projectRoot:n,apps:await ct(await It(n,c))}):(t||D(`No app directories are listed in ${C}; discovering apps at the project root and in immediate child directories.`),{projectRoot:n,apps:await ct(await Ct(n))})}else n=l.dirname(l.resolve(e.appConfigPath));let a=await Et(n);return{projectRoot:n,apps:[await ut(a)]}}async function Ft(t){try{return await s.stat(t),!0}catch(e){if(A(e))return!1;throw e}}function Pt(t){return{errorCode:typeof t=="object"&&t!==null&&"code"in t&&typeof t.code=="string"?t.code:"UNKNOWN",errorName:t instanceof Error?t.name:typeof t}}async function pt(t,e){if(!t)return{};try{let r=(await s.stat(t)).size,o=Math.max(0,T-r);return o>0?{logFilePath:t,logFileMaxBytes:o,onLogError:e}:{}}catch(r){return A(r)?{logFilePath:t,logFileMaxBytes:T,onLogError:e}:(e(r),{})}}async function J(t,e,r,o,n){if($().trackErrorEvent("ProjectPack.AppFailed",{stage:e,...Pt(r)}),!!o)try{let a=(await s.stat(o)).size,c=T-a;if(c<=0)return;let i=Buffer.from(`
|
|
8
|
+
[ms project pack] ${e} failed for app ${t}: ${y(r)}
|
|
9
|
+
`);await s.appendFile(o,i.subarray(0,c))}catch(a){if(!A(a)){n(a);return}try{let c=Buffer.from(`[ms project pack] ${e} failed for app ${t}: ${y(r)}
|
|
10
|
+
`);await s.writeFile(o,c.subarray(0,T))}catch(c){n(c)}}}async function Dt(t,e,r){try{let o=await s.readdir(t,{withFileTypes:!0}),n=[],a=[],c=Date.now();for(let i of o){let p=l.join(t,i.name);i.isFile()&&i.name.startsWith(lt)&&i.name.endsWith(dt)?n.push({path:p,modifiedAt:(await s.stat(p)).mtimeMs}):i.isDirectory()&&i.name.startsWith("packed-staging-")&&p!==e&&c-(await s.stat(p)).mtimeMs>=kt&&a.push(p)}n.sort((i,p)=>p.modifiedAt-i.modifiedAt);for(let i of n.slice(At))await s.rm(i.path,{force:!0});for(let i of a)await s.rm(i,{recursive:!0,force:!0})}catch(o){$().trackErrorEvent("ProjectPack.ArtifactPruneFailed",Pt(o)),r||h(`Unable to prune old project-pack diagnostics: ${y(o)}`)}}async function $t(t,e){let r=`${e}-backup-${K()}`,o=await Ft(e);o&&await s.rename(e,r);try{await s.rename(t,e)}catch(n){if(o)try{await s.rename(r,e)}catch(a){throw new F(`Failed to promote the new project artifact and restore the previous artifact. The previous artifact remains at ${r}. Promotion error: ${n.message}. Restore error: ${a.message}`)}throw n}if(o)try{await s.rm(r,{recursive:!0,force:!0})}catch(n){return{retainedBackupFolder:r,cleanupError:n}}return{}}async function wt(t,e,r=t.apps){let o=Date.now(),{projectRoot:n}=t,a=r;if(a.length===0)throw new m("No apps were found to pack. Add an app config or list app directories in ms.project.config.json.");let c=Z(n),i=tt(n,K()),p=e?l.join(l.dirname(c),`${lt}${K()}${dt}`):void 0,P=k=>{let L="code"in k&&typeof k.code=="string"?k.code:"LOG_CAPTURE_FAILED";$().trackErrorEvent("ProjectPack.LogCaptureFailed",{errorCode:L,errorName:k.name}),p=void 0},j=new Map,U=new Set,v=0,_=0,E=0,M=!1;try{await s.mkdir(i,{recursive:!0});let k=Date.now();for(let[u,f]of a.entries()){let g=l.dirname(f.appConfigPath);if(f.buildType==="none"||!await jt(l.join(g,"package.json")))continue;let d=st(g,it(g)),w=d==="npm"?"npm install --prefer-offline":`${d} install`;e||D(`Installing dependencies for app ${u+1} of ${a.length} (${f.appId})...`);let ht=Date.now();try{let x=await pt(p,P);await rt(w,g,{quiet:e,...x})}catch(x){await J(f.appId,"dependencyInstall",x,p,P),U.add(f.appId),j.set(f.appId,{success:!1,appId:f.appId,error:{code:"APP_DEPENDENCY_INSTALL_FAILED",message:`Dependency installation failed for app ${f.appId}.`},timings:ft(Date.now()-ht)}),e||h(`Dependency installation failed for app ${f.appId}: ${y(x)}`)}}v=Date.now()-k;let L=Date.now();for(let[u,f]of a.entries()){if(U.has(f.appId))continue;e||D(`Packing app ${u+1} of ${a.length} (${f.appId})...`);let g=Date.now();try{let d=await pt(p,P),w=await nt({quiet:e,commandLogFilePath:d.logFilePath,commandLogFileMaxBytes:d.logFileMaxBytes,onCommandLogError:d.onLogError,appConfigPath:f.appConfigPath,packedFolder:i,cleanPackedFolder:!1});w.success?j.set(f.appId,{success:!0,...w.result}):(await J(f.appId,"pack",w.error,p,P),j.set(f.appId,{success:!1,appId:f.appId,error:{code:"APP_PACK_FAILED",message:`Packing failed for app ${f.appId}.`},timings:w.timings}),e||h(`Packing failed for app ${f.appId}: ${y(w.error)}`))}catch(d){await J(f.appId,"pack",d,p,P),j.set(f.appId,{success:!1,appId:f.appId,error:{code:"APP_PACK_FAILED",message:`Packing failed for app ${f.appId}.`},timings:ft(Date.now()-g)}),e||h(`Packing failed for app ${f.appId}: ${y(d)}`)}}_=Date.now()-L;let S=a.map(({appId:u})=>{let f=j.get(u);if(!f)throw new F(`Project pack did not produce a result for app ${u}.`);return f});if(S.some(u=>!u.success))return M=S.some(u=>u.success),{success:!1,...p?{logFile:p}:{},components:{apps:S},timings:{dependencyInstallMs:v,appPackingMs:_,finalizationMs:E,totalMs:Date.now()-o},error:{code:"PROJECT_PACK_FAILED",message:"One or more apps failed to pack."}};let b=S.filter(u=>u.success),G=Date.now();try{let u=b.map(({appId:d})=>({appId:d,path:q(d)})),f={cliVersion:z.version,manifestVersion:Q,apps:u};await s.writeFile(B(i),JSON.stringify(f,null,2));let g=await $t(i,c);if(g.cleanupError&&g.retainedBackupFolder){let d=g.cleanupError;$().trackErrorEvent("ProjectPack.BackupCleanupFailed",{errorCode:typeof d=="object"&&d!==null&&"code"in d&&typeof d.code=="string"?d.code:"BACKUP_CLEANUP_FAILED",errorName:d instanceof Error?d.name:typeof d}),e||h(`Project packed successfully, but the previous artifact backup could not be removed: ${g.retainedBackupFolder}`)}E=Date.now()-G}catch(u){return E=Date.now()-G,M=b.length>0,e||h(`Project artifact finalization failed: ${y(u)}`),{success:!1,...p?{logFile:p}:{},components:{apps:b},timings:{dependencyInstallMs:v,appPackingMs:_,finalizationMs:E,totalMs:Date.now()-o},error:{code:"PROJECT_PACK_FAILED",message:"Project artifact finalization failed."}}}return{success:!0,...p?{logFile:p}:{},packedFolder:c,projectManifestPath:B(c),components:{apps:b.map(u=>({...u,packedFolder:c,packAppOutputDir:u.packAppOutputDir.replace(i,c),packClientOutputDir:u.packClientOutputDir.replace(i,c)}))},timings:{dependencyInstallMs:v,appPackingMs:_,finalizationMs:E,totalMs:Date.now()-o}}}finally{M||await s.rm(i,{recursive:!0,force:!0}),await Dt(l.dirname(c),M?i:void 0,e)}}function ft(t){return{clientBuildMs:0,clientCopyMs:0,dataSourcesMs:0,functionsDiscoveryMs:0,middletierBuildMs:0,functionsArchiveMs:0,rayfinPackMs:0,totalMs:t}}function y(t){return t instanceof Error?t.message:String(t)}async function Ut(t={}){let{quiet:e=!1}=t;return wt(await gt(e),e)}async function Gt(t){t.setDescription(N.project.pack.description),t.addExamples(N.project.pack.examples),await t.runVerb();let e=t.isJsonMode(),r=await gt(e),o=await wt(r,e);if(e)if(o.success){let{success:n,...a}=o;W(a)}else{let{success:n,...a}=o;throw X(a),new Y(o.error.message)}else if(o.success)V("Project successfully packed.");else throw new F(o.error.message)}export{Ct as discoverProjectAppConfigsAsync,Ut as packProjectArtifactAsync,Gt as packProjectAsync,wt as packResolvedProjectArtifactAsync};
|
|
11
|
+
/*!
|
|
12
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
13
|
+
*/
|
|
14
|
+
//# sourceMappingURL=PackProject-5DUWSBFA.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{a,b}from"./chunk-Z4UX3JOS.js";import"./chunk-2SRFM7D6.js";import"./chunk-R2IECDVU.js";import"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import"./chunk-RSHOMYG6.js";import"./chunk-WS6TGUH7.js";import"./chunk-UHNOINTO.js";import"./chunk-YEWRCEPT.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import"./chunk-AICYZHWK.js";import"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";export{b as buildPlayUrl,a as playMaafAppAsync};
|
|
8
|
+
//# sourceMappingURL=PlayMaafApp-5BXGXE6O.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
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 L,b as q}from"./chunk-4PI5THLA.js";import{b as T}from"./chunk-HHW4SKVU.js";import"./chunk-BMOTNINY.js";import{n as M}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{B as N,Ob as E,Qb as H,bb as A,cb as G,db as F,eb as b,l as w,v as y,w as D,x as I,y as h,z as S}from"./chunk-RSHOMYG6.js";import{O as c}from"./chunk-WS6TGUH7.js";import"./chunk-GO22IDEN.js";import"./chunk-UHNOINTO.js";import"./chunk-YEWRCEPT.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as l}from"./chunk-AICYZHWK.js";import{F as V,H as P,I as R,L as B,P as C}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";function x(e){return e.trim().toLowerCase()}function Y(e){let t=new Map;for(let n of e){if(!n.email)continue;let r=n.email.toLowerCase(),o=t.get(r)??new Set;o.add(x(n.objectId)),t.set(r,o)}return t}function z(e,t){let n=new Set,r=Y(t);for(let o of e){if(typeof o.entry.objectId=="string"){n.add(x(o.entry.objectId));continue}let i=r.get(o.entry.email.toLowerCase());if(i)for(let a of i)n.add(a)}return n}function K(e,t,n){let r=new Set(e.map(a=>x(a.objectId))),o=z(n,t),i=0;for(let a of o)r.has(a)||(i+=1);return i}async function Ie(e){ae(e),await e.runVerb();let t=_(e.getPositionalArgs(0));if(t.length===0)throw new h("Provide at least one approver (object ID or user/group email address). Separate multiple entries with commas, spaces, or both.");let n=E(),r=n.trackScenario("ProjectApproval.Add",{inputCount:t.length});try{let o=[],i=ne(t,o);if(i.length===0)throw new h(k(o));o.length>0&&C(k(o));let{projectId:a,tenantId:d,environmentId:s}=await T(e),u=await O(e),p={tenantId:d,environmentId:s,logger:n},m={projectId:a,...u?{target:u}:{}},j=await Z(p,m,"before-add");try{await G({...p,actionsParams:{projectId:a,approvers:i.map(g=>g.entry),...u?{target:u}:{}}})}catch(g){throw oe(g)}let f,v;try{let g=await b({...p,actionsParams:m});f=K(j,g,i)}catch(g){v=X(g)}if(r.complete({...f!==void 0?{addedCount:f}:{},failedResolutionCount:o.length,postAddVerificationSucceeded:!v}),e.isJsonMode()){R({projectId:a,...u?{target:u}:{},partialFailure:o.length>0||!!v,...f!==void 0?{addedCount:f}:{},added:i.map(g=>({input:g.input})),warnings:o,...v?{verificationWarning:v}:{}});return}f===void 0?P(`Approver update was accepted for the ${u??A} target of project '${a}'.`):P(`Added ${f} approver${f===1?"":"s"} to the ${u??A} target of project '${a}'.`),v&&C(v)}catch(o){throw ee(r,o),o}}function Z(e,t,n){return b({...e,actionsParams:t}).catch(r=>{throw Q(r,n)})}function Q(e,t){if(!(e instanceof w))return e;let n=W(e),r={telemetryDetails:{status:e.status,serviceErrorCode:n}};return e.status===401?new S(`The service did not accept your sign-in. Run \`${"ms"} auth login\`, then try again.`,void 0,r):e.status===403?new I("You do not have permission to read approvers on this project.",y.GeneralError,void 0,{errorCode:L.ProjectApprovalPermissionDenied,errorCategory:D.User,telemetryDetails:q("project_approvals",r.telemetryDetails)}):e.status===429?new N("The service is limiting requests right now. Wait a moment, then try again.",void 0,r):t==="before-add"?new I(`The service could not read current approvers for this project (HTTP ${e.status}). No approvers were added.`,y.GeneralError,void 0,{errorCode:"ServiceError",...r}):new I(`The service could not read approvers for this project (HTTP ${e.status}).`,y.GeneralError,void 0,{errorCode:"ServiceError",...r})}function X(e){return e instanceof w?e.status===401?`The add request succeeded, but sign-in was not accepted while verifying approvers. Run \`${"ms"} auth login\` if needed.`:e.status===403?"The add request succeeded, but you do not have permission to list approvers for verification.":e.status===429?"The add request succeeded, but the service is limiting requests and verification could not complete.":`The add request succeeded, but approvers could not be listed afterward to verify the added count (HTTP ${e.status}).`:"The add request succeeded, but approvers could not be listed afterward to verify the added count."}function ee(e,t){t instanceof w?e.failure(void 0,{status:t.status,errorCode:t.code}):e.failure(t)}var te={PrincipalNotFound:"An approver was not found in the tenant directory. Check the email address or object ID.",InvalidPrincipalId:"An approver ID is not a valid object ID (GUID).",InvalidPrincipalType:"An approver is a kind of principal that cannot be an approver, or its type does not match.",InvalidRequestContent:"An approver entry was not accepted. An email address may be malformed or match more than one account; pass the object ID instead."};function W(e){return e.code&&/^[A-Za-z][A-Za-z0-9_.]{0,63}$/.test(e.code)?e.code:void 0}function oe(e){if(!(e instanceof w))return e;let t=W(e),n={telemetryDetails:{status:e.status,serviceErrorCode:t}};if(e.status===400){let r=e.code?te[e.code]:void 0;return new h(`The service rejected the approvers; none were added. ${r??`The request was not accepted${t?` (${t})`:""}.`}`,void 0,n)}return e.status===502&&e.code==="BadGateway"?new h("The tenant directory could not be reached to resolve an approver; none were added. Try again.",void 0,n):e.status===401?new S(`The service did not accept your sign-in. Run \`${"ms"} auth login\`, then try again.`,void 0,n):e.status===403?new I("You do not have permission to manage approvers on this project.",y.GeneralError,void 0,{errorCode:L.ProjectApprovalPermissionDenied,errorCategory:D.User,telemetryDetails:q("project_approvals",n.telemetryDetails)}):e.status===429?new N("The service is limiting requests right now. Wait a moment, then try again.",void 0,n):new I(`The service could not complete the request (HTTP ${e.status}). Run \`${"ms"} project list approval\` to see which approvers are configured, then try again.`,y.GeneralError,void 0,{errorCode:"ServiceError",...n})}async function ye(e){ie(e),await e.runVerb();let t=await e.getOption(c.All.name,!0),n=_(e.getPositionalArgs(0));if(t&&n.length>0)throw new h("Provide either explicit approvers or --all, not both.");if(!t&&n.length===0)throw new h("Provide at least one approver (object ID or user/group email address) to remove, or pass --all to remove every approver.");let{projectId:r,tenantId:o,environmentId:i}=await T(e),a=await O(e),d=a??A,s=E(),u=s.trackScenario("ProjectApproval.Remove",{all:!!t,inputCount:n.length});try{let p,m=[],j=[];if(t)p=await F({tenantId:o,environmentId:i,logger:s,actionsParams:{projectId:r,all:!0,...a?{target:a}:{}}});else{if(m=[],j=await re(n,m,()=>b({tenantId:o,environmentId:i,logger:s,actionsParams:{projectId:r,...a?{target:a}:{}}})),j.length===0)throw new h(k(m));m.length>0&&C(k(m)),p=await F({tenantId:o,environmentId:i,logger:s,actionsParams:{projectId:r,principalIds:j.map(v=>v.objectId),...a?{target:a}:{}}})}u.complete({all:!!t,removedCount:p.removed.length,failureCount:p.failures.length,failedResolutionCount:m.length});let f=p.failures.length>0;if(e.isJsonMode()){let v={projectId:r,...a?{target:a}:{},all:!!t,partialFailure:m.length>0||f,removed:p.removed,failures:p.failures,warnings:m};if(f)throw B(v),new H(U(p.failures,j));R(v);return}if(t)P(`Removed every approver from the ${d} target of project '${r}'.`);else if(p.removed.length>0&&P(`Removed ${p.removed.length} approver${p.removed.length===1?"":"s"} from the ${d} target of project '${r}'.`),f)throw new I(U(p.failures,j))}catch(p){throw u.failure(p),p}}async function we(e){se(e),await e.runVerb();let{projectId:t,tenantId:n,environmentId:r}=await T(e),o=await O(e),i=E(),a=i.trackScenario("ProjectApproval.List");try{let d=await b({tenantId:n,environmentId:r,logger:i,actionsParams:{projectId:t,...o?{target:o}:{}}});if(a.complete({approverCount:d.length}),e.isJsonMode()){R({projectId:t,...o?{target:o}:{},approvers:d.map(s=>({objectId:s.objectId,objectType:s.objectType,...s.email?{email:s.email}:{},...s.displayName?{displayName:s.displayName}:{}}))});return}V({title:`Approvers \u2014 project '${t}' (${o??A} target)`,columns:[{header:"Name"},{header:"Email"},{header:"Type"},{header:"Object ID",maxWidth:38}],rows:d.map(s=>[s.displayName??"-",s.email??"-",s.objectType,s.objectId]),emptyMessage:"No approvers are configured for this project.",totalLabel:"approver(s)"})}catch(d){throw a.failure(d),d}}function _(e){let t=new Set;for(let n of e)for(let r of n.split(",")){let o=r.trim();o&&t.add(o)}return[...t]}function ne(e,t){let n=[],r=new Set;for(let o of e){let i=o.toLowerCase();if(!r.has(i)){if(M(o))n.push({input:o,entry:{objectId:o}});else if(J(o))n.push({input:o,entry:{email:o}});else{t.push({input:o,reason:"not an object ID (GUID) or a valid email address"});continue}r.add(i)}}return n}async function re(e,t,n){let r,o=[];for(let a of e){if(M(a)){o.push({objectId:a,input:a});continue}if(!J(a)){t.push({input:a,reason:"not an object ID (GUID) or a valid email address"});continue}r??=await n();let d=new Map;for(let u of r)if(u.email?.toLowerCase()===a.toLowerCase()){let p=u.objectId.trim().toLowerCase();d.has(p)||d.set(p,u.objectId)}let s=[...d.values()];if(s.length===0){t.push({input:a,reason:"not a current approver, or the service reports a different address for them (pass the object ID shown by `project list approval` instead)"});continue}if(s.length>1){t.push({input:a,reason:`matches ${s.length} approvers (${s.join(", ")}); none was removed. Pass the object ID of the one to remove instead`});continue}o.push({objectId:s[0],input:a})}let i=new Set;return o.filter(a=>{let d=a.objectId.toLowerCase();return i.has(d)?!1:(i.add(d),!0)})}function U(e,t){let n=e.length===1?"approver":"approvers",r=e.map(o=>` - ${t.find(a=>a.objectId===o.principalId)?.input??o.principalId}`);return[`Failed to remove ${e.length} ${n}:`,...r].join(`
|
|
8
|
+
`)}function k(e){let t=e.length===1?"entry":"entries",n=e.map(r=>` - ${r.input}: ${r.reason}`);return[`Could not resolve ${e.length} ${t}:`,...n].join(`
|
|
9
|
+
`)}function J(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}async function O(e){return(await e.getOption(c.Target.name,!0))?.trim()||void 0}function ae(e){e.setDescription(l.project.add.approval.description),e.addExamples(l.project.add.approval.examples),e.consumePositionalArgs("principal"),e.addOptions([{flags:{key:c.ProjectId.name,alias:c.ProjectId.alias},description:l.project.add.approval.options.projectId,optionalInNonInteractive:!0},{flags:{key:c.EnvironmentId.name,alias:c.EnvironmentId.alias},env:c.EnvironmentId.envVar,description:l.project.add.approval.options.environmentId,optionalInNonInteractive:!0},{flags:{key:c.Target.name},description:l.project.add.approval.options.target,optionalInNonInteractive:!0,hidden:!0}])}function ie(e){e.setDescription(l.project.remove.approval.description),e.addExamples(l.project.remove.approval.examples),e.consumePositionalArgs("principal"),e.addSwitch({flags:{key:c.All.name},description:l.project.remove.approval.options.all}),e.addOptions([{flags:{key:c.ProjectId.name,alias:c.ProjectId.alias},description:l.project.remove.approval.options.projectId,optionalInNonInteractive:!0},{flags:{key:c.EnvironmentId.name,alias:c.EnvironmentId.alias},env:c.EnvironmentId.envVar,description:l.project.remove.approval.options.environmentId,optionalInNonInteractive:!0},{flags:{key:c.Target.name},description:l.project.remove.approval.options.target,optionalInNonInteractive:!0,hidden:!0}])}function se(e){e.setDescription(l.project.list.approval.description),e.addExamples(l.project.list.approval.examples),e.addOptions([{flags:{key:c.ProjectId.name,alias:c.ProjectId.alias},description:l.project.list.approval.options.projectId,optionalInNonInteractive:!0},{flags:{key:c.EnvironmentId.name,alias:c.EnvironmentId.alias},env:c.EnvironmentId.envVar,description:l.project.list.approval.options.environmentId,optionalInNonInteractive:!0},{flags:{key:c.Target.name},description:l.project.list.approval.options.target,optionalInNonInteractive:!0,hidden:!0}])}export{Ie as addProjectApprovalAsync,we as listProjectApprovalAsync,ye as removeProjectApprovalAsync};
|
|
10
|
+
/*!
|
|
11
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
12
|
+
*/
|
|
13
|
+
//# sourceMappingURL=ProjectApprovals-K3JF6D72.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{c as I}from"./chunk-HHW4SKVU.js";import"./chunk-BMOTNINY.js";import"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{Ob as v,fb as y,ob as A,x as j,y as p}from"./chunk-RSHOMYG6.js";import{P as o}from"./chunk-WS6TGUH7.js";import"./chunk-GO22IDEN.js";import"./chunk-UHNOINTO.js";import"./chunk-YEWRCEPT.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as c}from"./chunk-AICYZHWK.js";import{H as l,I as g,N as m,P as h}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function E(e){await d(e,"assign")}async function V(e){await d(e,"unassign")}async function D(e){await d(e,"assign-owner")}async function d(e,r){let a=r==="assign-owner"?c.admin.project.assignOwner:c.project[r];e.setDescription(a.description),e.addExamples(a.examples),e.consumePositionalArgs("principal"),e.addOptions([...r==="assign-owner"?[]:[{flags:{key:o.Role.name},description:c.project[r].options.role}],{flags:{key:o.ProjectId.name,alias:o.ProjectId.alias},description:a.options.projectId,optionalInNonInteractive:!0},{flags:{key:o.EnvironmentId.name,alias:o.EnvironmentId.alias},env:o.EnvironmentId.envVar,description:a.options.environmentId,optionalInNonInteractive:!0}]),await e.runVerb();let n=r==="assign-owner"?"owner":await e.getOption(o.Role.name,!0);if(n!=="contributor"&&n!=="owner"&&n!=="reader")throw new p("--role is required. Choose contributor, owner, or reader.");let f=e.getPositionalArgs(0);if(f.length===0)throw new p("Provide at least one principal (object ID or email address).");let{projectId:i}=await I(e),u={projectId:i,role:n,principals:f,logger:v()};if(r==="unassign"){let{result:s,...t}=await A(u);if(e.isJsonMode()){g({projectId:i,role:n,...s,...t});return}t.revokedCount>0?l(`Unassigned the ${n} role from ${t.revokedPrincipalCount} principal(s) on project '${i}'.`):m(`No ${n} role assignments were removed from project '${i}'.`),t.notFound.length>0&&m(`No matching ${n} assignment found (no-op): ${t.notFound.join(", ")}. If an email was not listed, retry using the principal's object ID.`),t.skipped.length>0&&h(`${t.skipped.length} assignment(s) had no role-definition ID and were skipped. Inspect the project's role assignments before retrying.`);return}let w;try{w=await y(u)}catch(s){throw r==="assign-owner"&&s instanceof j&&s.errorCode==="GeneralError"&&(s.message+=" Verify that the environment contains this project. Use --environment-id to override the configured environment."),s}if(e.isJsonMode()){g({projectId:i,role:n,...w});return}l(`Assigned the ${n} role on project '${i}'.`)}export{D as assignProjectOwnerAsyncVerb,E as assignProjectRoleAsyncVerb,V as unassignProjectRoleAsyncVerb};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ProjectRoleAssignments-7IUDEVBN.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{k as D}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{Da as m,Ea as h,L as u,Ob as c,Pb as v,Qb as C}from"./chunk-RSHOMYG6.js";import{k as a}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as o}from"./chunk-AICYZHWK.js";import{H as g,I as S,L as A,N as y,Q as N}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function L(e){let w=v(),{fileConfig:n,cliFs:$}=w;b(e),await e.runVerb(),D();let i=!!await e.getOption("offline",!0),f=await e.getOption("name",!0)||void 0,p=u(),l={vfs:$,authProvider:e.getAuthenticationProvider(),httpClient:e.getHttpClient(),region:p.region,environmentName:p.environmentName,localFilePaths:{appConfigPath:n.appConfigPath,schemaPath:n.schemaPath,codeGenPath:n.codeGenPath},logger:c()},t=i?await h({...l,actionsParams:{dataSource:f}}):await m({...l,actionsParams:{dataSourceName:f}}),s=i?"regenerated":"refreshed",P=i?"regenerate":"refresh";if(e.isJsonMode()){if(t.failed.length===0){S(t);return}let r=t.failed.map(({dataSourceName:d,error:O})=>{try{c().trackErrorEvent("RefreshDataSource.Failure",{dataSourceName:d,error:O})}catch{}return{dataSourceName:d,error:`Data source could not be ${s}.`}});A({succeeded:t.succeeded,failed:r})}else{for(let r of t.succeeded)g(`'${r}' ${s} successfully.`);for(let r of t.failed)N(`Failed to ${P} '${r.dataSourceName}': ${r.error}`)}if(t.failed.length>0)throw new C(`${t.failed.length} data source(s) could not be ${s}; ${t.succeeded.length} succeeded.`);t.succeeded.length>0&&t.failed.length===0&&y(`Hint: Run '${"ms"} app dev' to test locally.`)}function b(e){e.setDescription(o.app.refresh.dataSource.description),e.addExamples(o.app.refresh.dataSource.examples),e.addOptions([{flags:{key:a.DataSourceName.name,alias:a.DataSourceName.alias},env:a.DataSourceName.envVar,description:o.app.refresh.dataSource.options.name,optionalInNonInteractive:!0}]),e.addSwitch({flags:{key:a.Offline.name},env:a.Offline.env,description:o.app.refresh.dataSource.options.offline})}export{L as refreshDataSourceAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=RefreshDataSource-CMHDF2GP.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 f,b as D}from"./chunk-OHQNTYJG.js";import{i as b}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{Kb as w,Lb as y,Ob as m,d,y as p}from"./chunk-RSHOMYG6.js";import{F as o}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as n}from"./chunk-AICYZHWK.js";import{H as c,I as A}from"./chunk-PYPCPMCR.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}=d(i),I=t&&r?w(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 y({remoteUrl:S,tenantId:l,logger:m(),display:R,skipBrowser:!1,signal:u.signal});g?A({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
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=RefreshGitAuth-4TRO5IOQ.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 w,d as a}from"./chunk-RA74M3YD.js";import{b as u,i as g}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{Cb as p,Db as l,Pb as y,y as m}from"./chunk-RSHOMYG6.js";import{b as t}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as n}from"./chunk-AICYZHWK.js";import{H as f,I as d,N as r}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function x(e){v(e),await e.runVerb();let o=await e.getOption(t.Collection.name),i=await e.getOption(t.Property.name,!0),h=await e.getOption("force",!0),c=w();if(i===void 0){await a(async()=>await p({...c,tableName:o}));return}if(!h){if(!y().interactive)throw new m("Removing a property requires confirmation. Re-run with --force in non-interactive mode.");if(!await u({message:`Remove property '${i}' from collection '${o}'? Stored values are not deleted, but they will no longer be validated or indexed by this definition.`})){r("Remove cancelled.");return}}let{schemaPath:s}=await a(async()=>await l({...c,tableName:o,columnName:i}));if(e.isJsonMode()){d({schemaPath:s,collection:o,property:i,removed:!0});return}f(`Property '${i}' removed from collection '${o}' in ${s}`),r(n.project.state.remove.hint)}function v(e){let o=n.project.state.remove;e.setDescription(o.description),e.addExamples(o.examples),e.addOptions([g({flags:{key:t.Collection.name},message:t.Collection.promptMessage,description:o.options.collection}),{flags:{key:t.Property.name},description:o.options.property,optionalInNonInteractive:!0}]),e.addSwitch({flags:{key:"force",alias:"f"},description:o.options.force})}export{x as dataRemoveAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=Remove-KZD3SDDC.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,g as E,k as R}from"./chunk-
|
|
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
|
|
7
|
+
import{b as C,g as E,k as R}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{L as y,Ob as b,Pb as A,h as D,xa as w,y as p,ya as $}from"./chunk-RSHOMYG6.js";import{j as f}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as r}from"./chunk-AICYZHWK.js";import{F as N,H as S,P as u}from"./chunk-PYPCPMCR.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){u("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 p(`Re-run with --name <name>. Example:
|
|
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 p(`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(", ");u(`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})){u("Remove cancelled.");return}}let h=y(),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 u(`The ${v} '${d}' was not found or could not be removed.`)}async function O(e){let o;try{o=await D(e)}catch{throw new p(`Could not read ms.config.json at '${e}'. Run this command from your app directory after adding a data source.`)}let{all:i}=w(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 p(`Data source '${i}' not found in ms.config.json.`);return m}function x(e){N({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-
|
|
14
|
+
//# sourceMappingURL=RemoveDataSource-C7UXOUNH.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 I}from"./chunk-ZGBTKTTU.js";import"./chunk-7LAMG4KK.js";import"./chunk-BMOTNINY.js";import{b as D}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{A as p,C as c,Ob as d,Pb as E,kb as g,l as s,lb as v,x as y,y as m}from"./chunk-RSHOMYG6.js";import{i as f}from"./chunk-WS6TGUH7.js";import"./chunk-GO22IDEN.js";import"./chunk-UHNOINTO.js";import"./chunk-YEWRCEPT.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as l}from"./chunk-AICYZHWK.js";import{H as j,I as w,P as h}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function U(e){let t=l.project.remove.deployment;e.setDescription(t.description),e.addExamples(t.examples),e.addOptions([{flags:{key:f.Target.name},description:t.options.target}]),e.addSwitch({flags:{key:"force",alias:"f"},description:t.options.force}),await e.runVerb();let o=g(await e.getOption(f.Target.name)),r=E();if(r.projectConfigError)throw new p("Unable to read the managed project configuration. Fix or remove the project configuration file and retry.");let a=e.isJsonMode(),u=await e.getOption("force",!0)===!0;if(!u&&(a||!r.interactive))throw new m("Removing a deployment target requires confirmation. Pass --force in JSON or non-interactive mode.");let i;try{i=await I(e,!1,k(d()))}catch(n){throw n instanceof m||n instanceof p?n:b(n)}e.updateEnvironmentId(i.environmentId);try{if(await v({projectId:i.projectId,deploymentTargetName:o,logger:d(),...u?{}:{confirm:async()=>await D({message:`Remove deployment target '${o}' from project '${i.projectId}' in environment '${i.environmentId}'? This removal cannot be undone.`,initialValue:!1})}})===null){h("Deployment target removal cancelled. No removal request was sent.");return}}catch(n){throw b(n)}if(a){w({projectId:i.projectId,deploymentTargetName:o,deletionRequested:!0});return}j(`Removal started for deployment target '${o}'. Its name and URL remain reserved until removal completes.`)}function k(e){return{trackActivityEvent:(t,o,r)=>e.trackActivityEvent(t,o,r),trackVerboseEvent:(t,o,r)=>e.trackVerboseEvent(t,o,r),trackErrorEvent:(t,o,r)=>e.trackErrorEvent(t,o,r),trackScenario:(t,o)=>{let r=e.trackScenario(t,o);return{...r,failure:a=>r.failure(void 0,{status:a instanceof s?a.status:void 0})}},identifyUser:t=>e.identifyUser(t),get sessionId(){return e.sessionId},set sessionId(t){e.sessionId=t},flush:async()=>await e.flush(),withDefaults:t=>k(e.withDefaults(t)),addDefaults:t=>e.addDefaults(t)}}function b(e){let t=e instanceof s?e.status:void 0;return d().trackErrorEvent("ManagedProject.RemoveDeployment.Failed",{status:t}),e instanceof s&&t===404?e.code==="ProjectNotFound"?new c("The current project could not be found.",void 0,{errorCode:"ProjectNotFound",outputDetails:{code:"ProjectNotFound"}}):e.code==="StageNotFound"?new c("Deployment target 'test' could not be found in the current project.",void 0,{errorCode:"DeploymentTargetNotFound",outputDetails:{code:"DeploymentTargetNotFound"}}):new c("The project or deployment target could not be found."):new y("The deployment target removal request failed. Inspect its current state before retrying; background teardown may already have started.")}export{U as removeDeploymentAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=RemoveDeployment-ZQJWQPD6.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{c}from"./chunk-3YRE4IQ3.js";import"./chunk-HBLO3WDD.js";import"./chunk-TYRVM4PP.js";import{o as s}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import"./chunk-RSHOMYG6.js";import"./chunk-DLUQVMUE.js";import{a as n,b as r}from"./chunk-C7UWPNC3.js";import"./chunk-PYPCPMCR.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
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ServicePrincipalAuthenticationProvider-3NPJTLF5.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{Hb as s,Jb as w,Pb as v,h as m,i as h,y as r}from"./chunk-RSHOMYG6.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as c}from"./chunk-AICYZHWK.js";import{I as S,N as f,a as d}from"./chunk-PYPCPMCR.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=w(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 m(n.fileConfig.appConfigPath);if(l.appSettings={...l.appSettings??{},...a},await h(n.fileConfig.appConfigPath,l),t.isJsonMode())S({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
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=SetSetting-3XO6HPG7.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 s,d as r,e as h}from"./chunk-
|
|
7
|
+
import{a as s,d as r,e as h}from"./chunk-RA74M3YD.js";import{Eb as m,Fb as f,y as p}from"./chunk-RSHOMYG6.js";import{b as e}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as d}from"./chunk-AICYZHWK.js";import{H as a,I as o,P as g}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function O(n){u(n),await n.runVerb();let t=await n.getOption(e.Locale.name,!0),i=h(e.Validation.name,await n.getOption(e.Validation.name,!0));if(t===void 0==(i===void 0))throw new p("Pass exactly one of --locale or --validation.");if(t!==void 0){let{schemaPath:l}=await r(async()=>await m({...s(),locale:t}));if(n.isJsonMode()){o({schemaPath:l,locale:t});return}a(`Locale set to '${t}' in ${l}`),g("Changing locale changes string-index collation. Validate the change in Preview before deploying.");return}let{schemaPath:c}=await r(async()=>await f({...s(),validationEnabled:i}));if(n.isJsonMode()){o({schemaPath:c,validation:i});return}a(`Schema validation ${i?"enabled":"disabled"} in ${c}`)}function u(n){let t=d.project.state["set-setting"];n.setDescription(t.description),n.addExamples(t.examples),n.addOptions([{flags:{key:e.Locale.name},description:t.options.locale,optionalInNonInteractive:!0},{flags:{key:e.Validation.name},description:t.options.validation,optionalInNonInteractive:!0}])}export{O as dataSetSettingAsync};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=SetSetting-
|
|
11
|
+
//# sourceMappingURL=SetSetting-ZW7F43GC.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{d as I}from"./chunk-4PI5THLA.js";import{l as f,m as h}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{Ob as d,Ua as p,y as s}from"./chunk-RSHOMYG6.js";import{G as n}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as r}from"./chunk-AICYZHWK.js";import{H as m,I as c,N as l}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function N(e){A(e),await e.runVerb();let k=await h(e),i=await e.getTenantIdAsync();if(!i)throw new s("Unable to determine tenant ID. Ensure you are logged in.");let o=await f(e),t;try{t=await p({tenantId:i,environmentId:k,logger:d(),actionsParams:{appName:o}})}catch(a){throw I(a)??a}if(e.isJsonMode()){c({appName:o,...t});return}m(`Share link created for '${o}' (id: ${t.appShareLinkId}). Anyone in your tenant who opens this link will be granted Microsoft App Reader access. Share URL:`),l(t.shareLinkUrl)}function A(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{N as shareLinkCreateAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ShareLinkCreate-JXPW5H7A.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{d as f}from"./chunk-4PI5THLA.js";import{l as c,m as h}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{Ob as d,Va as p,y as s}from"./chunk-RSHOMYG6.js";import{H as r}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as t}from"./chunk-AICYZHWK.js";import{F as m,I as l}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function w(e){g(e),await e.runVerb();let I=await h(e),o=await e.getTenantIdAsync();if(!o)throw new s("Unable to determine tenant ID. Ensure you are logged in.");let i=await c(e),a;try{a=await p({tenantId:o,environmentId:I,logger:d(),actionsParams:{appName:i}})}catch(n){throw f(n)??n}if(e.isJsonMode()){l({appName:i,...a});return}m({title:`Share links for '${i}'`,columns:[{header:"LINK ID"},{header:"ROLE"},{header:"REDEEMERS"},{header:"CREATED BY",maxWidth:36}],rows:a.value.map(n=>[n.appShareLinkId,n.managedAppRoleName,String(n.redeemedPrincipalIds.length),n.createdByObjectId]),emptyMessage:`No share links issued for '${i}'.`,totalLabel:"link(s)"})}function g(e){e.setDescription(t.app.shareLink.list.description),e.addExamples(t.app.shareLink.list.examples),e.addOptions([{flags:{key:r.AppName.name},env:r.AppName.envVar,description:t.app.shareLink.list.options.app,optionalInNonInteractive:!0},{flags:{key:r.EnvironmentId.name,alias:r.EnvironmentId.alias},env:r.EnvironmentId.envVar,description:t.app.shareLink.list.options.environmentId,optionalInNonInteractive:!0}])}export{w as shareLinkListAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ShareLinkList-ICYPRIQV.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{d as w}from"./chunk-4PI5THLA.js";import{b as v,l as u,m as I}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{Ob as k,Pb as h,Wa as m,l,y as a}from"./chunk-RSHOMYG6.js";import{J as n}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as r}from"./chunk-AICYZHWK.js";import{H as f,I as s,P as p}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function R(e){L(e),await e.runVerb();let c=await I(e),d=await e.getTenantIdAsync();if(!d)throw new a("Unable to determine tenant ID. Ensure you are logged in.");let i=await u(e),o=await e.getOption(n.LinkId.camelName);if(!o)throw new a("Provide a share link ID via --link-id.");if(!await e.getOption(n.Force.name,!0)&&h().interactive&&!await v({message:`Revoke share link '${o}' for app '${i}'? Anyone who has not yet redeemed it will lose access; redeemers will have their Microsoft App Reader role revoked.`})){p("Revoke cancelled.");return}try{await m({tenantId:d,environmentId:c,logger:k(),actionsParams:{appName:i,appShareLinkId:o}})}catch(t){if(g(t)){if(e.isJsonMode()){s({appName:i,linkId:o,existed:!1});return}p(`Share link '${o}' was not found on '${i}'; nothing was revoked.`);return}throw w(t)??t}if(e.isJsonMode()){s({appName:i,linkId:o,existed:!0});return}f(`Share link '${o}' revoked for '${i}'.`)}function g(e){if(!(e instanceof l)||e.status!==404||!e.body)return!1;try{return JSON.parse(e.body).error?.code==="AppShareLinkNotFound"}catch{return!1}}function L(e){e.setDescription(r.app.shareLink.revoke.description),e.addExamples(r.app.shareLink.revoke.examples),e.addSwitch({flags:{key:n.Force.name,alias:n.Force.alias},description:r.app.shareLink.revoke.options.force}),e.addOptions([{flags:{key:n.LinkId.name,alias:n.LinkId.alias},env:n.LinkId.envVar,description:r.app.shareLink.revoke.options.linkId},{flags:{key:n.AppName.name},env:n.AppName.envVar,description:r.app.shareLink.revoke.options.app,optionalInNonInteractive:!0},{flags:{key:n.EnvironmentId.name,alias:n.EnvironmentId.alias},env:n.EnvironmentId.envVar,description:r.app.shareLink.revoke.options.environmentId,optionalInNonInteractive:!0}])}export{R as shareLinkRevokeAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ShareLinkRevoke-JVMQZF7K.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 L,b as y,c as x,d as $,e as P,f as G}from"./chunk-IMVZRBSQ.js";import{l as b,m as O}from"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import{O as I,Ob as N,P as g,Pa as w,Pb as E,Q as h,la as R,pb as D,y as u}from"./chunk-RSHOMYG6.js";import{I as r}from"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as l}from"./chunk-AICYZHWK.js";import{F as T,I as C,N as M,P as S}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function Z(e){k(e),await e.runVerb();let i=await O(e),p=await e.getTenantIdAsync();if(!p)throw new u("Unable to determine tenant ID. Ensure you are logged in.");let o=await b(e),f=!!await e.getOption("app",!0),m=await e.getOption("access",!0);if(!m||!m.trim())throw new u("The --access option is required. Use --access play, --access edit, or --access test.");let t=x(m),s,a="none",d;if(f)(t==="edit"||e.isJsonMode())&&(s=await P({tenantId:p,environmentId:i,appName:o}),a=F(s));else{let n=E().appConfig??{};d=y(n.repositoryId)?n.repositoryId:void 0,a=t==="edit"?$(n):n.repoType??"none"}let J=W(t,a);!e.isJsonMode()&&t==="edit"&&a==="github"&&S(L);let A=await Promise.all(J.map(n=>V({target:n,tenantId:p,environmentId:i,appName:o,appInfo:s,configRepoId:d})));if(e.isJsonMode()){C({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 U=A.flatMap(n=>n.assignments.map(c=>[n.scope,c.principalObjectId??"-",String(c.principalType??"-"),B(c.roleDefinitionName),c.createdOn??"-"]));T({title:`${t==="play"?"Play":t==="test"?"Test":"Edit"} shares for '${o}'`,columns:[{header:"SCOPE"},{header:"PRINCIPAL ID"},{header:"TYPE"},{header:"ROLE"},{header:"CREATED ON"}],rows:U,emptyMessage:`No ${t} shares for '${o}'.`,totalLabel:"assignment(s)"});let v=A.reduce((n,c)=>n+c.unclassifiedCount,0);v>0&&M(`${v} assignment(s) with an unrecognized role definition were not shown.`)}async function V(e){let{target:i,tenantId:p,environmentId:o,appName:f,appInfo:m,configRepoId:t}=e;if(i.scope==="app"){let d=await w({tenantId:p,environmentId:o,logger:N(),actionsParams:{appName:f,roleDefinitionName:i.roleDefinitionName}});return{scope:"app",roleDefinitionName:i.roleDefinitionName,assignments:d.assignments,unclassifiedCount:d.unclassifiedCount}}let s=[t,m?.repositoryId].find(y);if(s||(s=(await G({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 D({tenantId:p,environmentId:o,logger:N(),actionsParams:{repoId:s}});return{scope:"repo",roleDefinitionName:i.roleDefinitionName,repoId:s,assignments:a.assignments,unclassifiedCount:a.unclassifiedCount}}function k(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":return"github";default:return"none"}}function B(e){switch(e){case I:return"App Reader";case g:return"App Contributor";case h:return"App Test Operator";case R:return"Repository Contributor";default:return e??"-"}}function W(e,i){return e==="play"||e==="test"?[{scope:"app",roleDefinitionName:e==="test"?h:I}]:i!=="native"?[{scope:"app",roleDefinitionName:g}]:[{scope:"repo",roleDefinitionName:R},{scope:"app",roleDefinitionName:g}]}export{Z as shareListAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ShareList-YGSTFMVE.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 r}from"./chunk-K77VBHFP.js";import"./chunk-IMVZRBSQ.js";import"./chunk-4PI5THLA.js";import"./chunk-SQI4XLR7.js";import"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import"./chunk-RSHOMYG6.js";import"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import"./chunk-AICYZHWK.js";import"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function i(e){await r(e,"share")}export{i as shareMaafAppAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=ShareMaafApp-ZCY72WHK.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
|
|
7
|
+
import{A as a,Ob as d}from"./chunk-RSHOMYG6.js";import{b as p,d as u,e as y,f as g}from"./chunk-YEWRCEPT.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import{a as s}from"./chunk-AICYZHWK.js";import{G as c,I as o,P as m}from"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var l={remote:!0,console:!1};async function C(e){f(e,s.telemetry.enable.options),e.setDescription(s.telemetry.enable.description),e.addExamples(s.telemetry.enable.examples),await e.runVerb();let t=S(await e.getOption("remote",!0),await e.getOption("console",!0),!0);b(t)}async function v(e){f(e,s.telemetry.disable.options),e.setDescription(s.telemetry.disable.description),e.addExamples(s.telemetry.disable.examples),await e.runVerb();let t=S(await e.getOption("remote",!0),await e.getOption("console",!0),!1);b(t)}async function k(e){e.setDescription(s.telemetry.status.description),e.addExamples(s.telemetry.status.examples),await e.runVerb(),U(e.isJsonMode())}function f(e,t){e.addSwitches([{flags:{key:"remote"},description:t.remote},{flags:{key:"console"},description:t.console}])}function S(e,t,r){let i=!e&&!t,n={};return(e||i)&&(n.remote=r),t&&(n.console=r),n}function U(e){try{let t=u();if(t&&("remote"in t||"console"in t)){let r=t,i={remote:r.remote??l.remote,console:r.console??l.console};if(e){o({settings:i});return}c({title:"Telemetry Settings:",items:[i],fields:[{label:"Remote",value:n=>String(n.remote)},{label:"Console",value:n=>String(n.console)}]})}else{if(e){o({settings:null});return}m("No telemetry settings found. Using default settings.")}}catch(t){throw T("read",t)}}function b(e){try{g(t=>({...l,...t,...e}))}catch(t){throw T("update",t)}}function T(e,t){return d().trackErrorEvent("Telemetry.SettingsFileFailed",{operation:e,...y(t)}),p(),new a(e==="read"?"Couldn't read the CLI's userSettings.json. Make sure it contains a valid JSON object, or delete it to clear your saved settings.":"Couldn't save your telemetry settings to the CLI's userSettings.json. Make sure it contains a valid JSON object and can be written.")}export{v as telemetryDisableAsync,C as telemetryEnableAsync,k as telemetryStatusAsync};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=TelemetrySettings-
|
|
11
|
+
//# sourceMappingURL=TelemetrySettings-P6WYWGW4.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 r}from"./chunk-K77VBHFP.js";import"./chunk-IMVZRBSQ.js";import"./chunk-4PI5THLA.js";import"./chunk-SQI4XLR7.js";import"./chunk-ZLK2CMMJ.js";import"./chunk-A5INC5TY.js";import"./chunk-RSHOMYG6.js";import"./chunk-WS6TGUH7.js";import"./chunk-DLUQVMUE.js";import"./chunk-C7UWPNC3.js";import"./chunk-AICYZHWK.js";import"./chunk-PYPCPMCR.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function i(e){await r(e,"unshare")}export{i as unshareMaafAppAsync};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=UnshareMaafApp-N4UR6Q4A.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 p,Pb as m,y as i}from"./chunk-
|
|
7
|
+
import{A as p,Pb as m,y as i}from"./chunk-RSHOMYG6.js";import{v as f,w as g}from"./chunk-PYPCPMCR.js";import*as a from"node:fs";import*as n from"node:path";function y(){let{fileConfig:o,appConfig:t}=m(),e=n.resolve(o.appConfigPath);if(!a.existsSync(e))throw new i("No Managed app configuration was found. Run this command from an app directory.");let r=t;if(!r)try{r=JSON.parse(a.readFileSync(e,"utf8"))}catch(s){let d=s instanceof Error?s.message:String(s);throw new p(`'${e}' is not a valid app configuration: ${d}`)}if(r===null||typeof r!="object"||Array.isArray(r))throw new p(`'${e}' is not a valid app configuration: the file must contain a JSON object.`);return{appRoot:n.dirname(e),fileName:n.basename(e),filePath:e,config:r}}var c="prod",l="test",w=[c,l];function C(o,t="--target"){let e=o?.trim();if(!e)throw new i(`${t} is required.`);if(e!==c&&e!==l)throw new i(`'${e}' is not a valid target name. Supported target names are 'prod' and 'test'.`);return e}function u(o,t){if(f.includes(t))throw new i(`'${o}' is a reserved target name because its config file would be named '${t}', which is a base app config filename. Choose a different target name.`)}function A(o,t){let e=g(t,o.fileName);return u(t,e),n.join(o.appRoot,e)}export{y as a,c as b,l as c,w as d,C as e,u as f,A as g};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-2SRFM7D6.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 A,b as l,c as v}from"./chunk-CLY3OASM.js";import{a as R,b as x}from"./chunk-OHQNTYJG.js";import{Kb as H,Lb as G,Ob as j,d as D,ha as b,z as g}from"./chunk-RSHOMYG6.js";import{N as h}from"./chunk-PYPCPMCR.js";async function C(r){let{remoteUrl:a,tenantId:m,jsonMode:t,openBrowser:s,verb:u}=r,{host:n,owner:f,repo:i}=D(a),o=f&&i?H(f,i):"",p=j(),e=I(u);p.trackActivityEvent(e,{repoHost:n,repoHash:o}),t||h("GitHub authentication is required for this action.");let y=T({isJson:t,openBrowser:s}),c=new AbortController,d=()=>{c.abort()};process.once("SIGINT",d);try{await G({remoteUrl:a,tenantId:m,logger:p,display:y,skipBrowser:!1,signal:c.signal})}catch(w){throw p.trackActivityEvent(`${e}.Failed`,{repoHost:n,repoHash:o}),l(w)??w}finally{process.removeListener("SIGINT",d)}p.trackActivityEvent(`${e}.Complete`,{repoHost:n,repoHash:o}),t||h(E(u))}function E(r){switch(r){case"app create":return"Resuming create...";case"app init":return"Resuming init...";case"app build":case"project build":return"Resuming build...";case"app deploy":case"project deploy":return"Resuming deploy...";case"project create":return"Resuming project create..."}}function T(r){return r.isJson?new x:r.openBrowser?R:{...R,openVerificationUri:void 0}}function I(r){switch(r){case"app create":return"CmrApp.Create.GitHubDcfRecovery";case"app init":return"CmrApp.Init.GitHubDcfRecovery";case"app build":case"project build":return"CmrApp.Build.GitHubDcfRecovery";case"app deploy":case"project deploy":return"CmrApp.Deploy.GitHubDcfRecovery";case"project create":return"CmrApp.ProjectCreate.GitHubDcfRecovery"}}async function F(r,a,m=C){let{repoType:t,externalRepoUrl:s,tenantId:u,jsonMode:n,openBrowser:f,verb:i}=a;try{return await r({isRetry:!1})}catch(o){if(t!=="github")throw o;if(!v(o)){if(o instanceof b)throw o;let e=l(o);throw e||o}if(!s)throw new g(`GitHub authentication is required, but the app config does not record the external repository URL needed to recover the identity mapping. This app may have been created before the URL was persisted to \`ms.config.json\`. Either add \`externalRepoUrl: "<your repo url>"\` to \`ms.config.json\`, or recreate the app with \`ms app create --repo <your repo url>\`, then run \`ms ${i}\` again.`);await m({remoteUrl:s,tenantId:u,jsonMode:n,openBrowser:f,verb:i});try{return await r({isRetry:!0})}catch(e){if(e instanceof b)throw e;let y=v(e);if(y)throw A(y.payload)??e;let c=l(e);throw c||e}}}export{F as a};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-3YCPXSCO.js.map
|