@microsoft/managed-apps-cli 0.23.0 → 0.24.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 +7 -0
  2. package/dist/AddConfig-ZIDAN5AS.js +12 -0
  3. package/dist/{AddConnector-HJCCENAM.js → AddConnector-YNHO2HAW.js} +2 -2
  4. package/dist/{AuthStatus-WCICFN6O.js → AuthStatus-S3K6JJG6.js} +2 -2
  5. package/dist/{AuthSwitch-5PKHCTM2.js → AuthSwitch-RSQ777N2.js} +2 -2
  6. package/dist/Bin.js +1 -1
  7. package/dist/{BuildMaafApp-Q74EFM3Q.js → BuildMaafApp-MKHYNTJN.js} +2 -2
  8. package/dist/{Cli-7EVTIORX.js → Cli-7SHW4PIZ.js} +12 -12
  9. package/dist/{CloneMaafApp-EKHHLMWD.js → CloneMaafApp-N5NBJDO4.js} +2 -2
  10. package/dist/{CreateMaafApp-L3XX2UVT.js → CreateMaafApp-OY6P6WIY.js} +2 -2
  11. package/dist/{DeleteMaafApp-YCDKWFRG.js → DeleteMaafApp-SJE7YRQZ.js} +2 -2
  12. package/dist/DeployMaafApp-VK4MJKVY.js +14 -0
  13. package/dist/{Dev-BTJUJGP5.js → Dev-75M4ANEA.js} +2 -2
  14. package/dist/{GetMaafBuildStatus-7B6ZNSEA.js → GetMaafBuildStatus-I5Y6STGB.js} +2 -2
  15. package/dist/{GetSettings-GJWIPK2T.js → GetSettings-5T3STEOV.js} +2 -2
  16. package/dist/{InfoMaafApp-WGNDYYGN.js → InfoMaafApp-OHDDS3OQ.js} +2 -2
  17. package/dist/{Init-TJOSV5DE.js → Init-NLNDZJBN.js} +2 -2
  18. package/dist/{ListConnectorActions-HTD6YSCY.js → ListConnectorActions-N2IX4VWY.js} +2 -2
  19. package/dist/ListConnectors-YVJRDRID.js +11 -0
  20. package/dist/{ListMaafApps-KRXJMAEU.js → ListMaafApps-3DEVXWSG.js} +2 -2
  21. package/dist/{Login-5TFNB24B.js → Login-CYDAY6K7.js} +2 -2
  22. package/dist/{Logout-35U4J627.js → Logout-OB4QJDAY.js} +2 -2
  23. package/dist/{MockFetch-XSZECQYX.js → MockFetch-PJWH2XTJ.js} +2 -2
  24. package/dist/{NodeMsalAuthenticationProvider-OUL57BVL.js → NodeMsalAuthenticationProvider-NT7XAXTC.js} +2 -2
  25. package/dist/{Pack-S7P4MIT6.js → Pack-O5U5MPSJ.js} +2 -2
  26. package/dist/{PlayMaafApp-D4KLJKLT.js → PlayMaafApp-DLD27TQL.js} +2 -2
  27. package/dist/{RefreshDataSource-N5CEH23S.js → RefreshDataSource-JU3V5L2Y.js} +2 -2
  28. package/dist/{RefreshGitAuth-2VL6VBLU.js → RefreshGitAuth-N5RQYP3P.js} +2 -2
  29. package/dist/{RemoveDataSource-XR5Q4O3F.js → RemoveDataSource-LXIOJFX4.js} +2 -2
  30. package/dist/{ServicePrincipalAuthenticationProvider-H3PTPXYY.js → ServicePrincipalAuthenticationProvider-QJJ5WSV5.js} +2 -2
  31. package/dist/{SetSetting-HXY4YSKC.js → SetSetting-GNWY5HWU.js} +2 -2
  32. package/dist/{ShareLinkCreate-YG3DACP2.js → ShareLinkCreate-HJV3TLI3.js} +2 -2
  33. package/dist/{ShareLinkList-XF6BIB3M.js → ShareLinkList-2NJLTXFX.js} +2 -2
  34. package/dist/{ShareLinkRevoke-4USAQKLB.js → ShareLinkRevoke-G2EXN5WH.js} +2 -2
  35. package/dist/ShareList-CDGJCXBF.js +11 -0
  36. package/dist/{ShareMaafApp-PZI5MCBA.js → ShareMaafApp-TMTGLD5F.js} +2 -2
  37. package/dist/{TelemetrySettings-WWVPRF7T.js → TelemetrySettings-KWEGCAGS.js} +2 -2
  38. package/dist/{UnshareMaafApp-MHBIV5OR.js → UnshareMaafApp-YZPPEA32.js} +2 -2
  39. package/dist/chunk-7DFBXNI7.js +11 -0
  40. package/dist/{chunk-UIW77LMA.js → chunk-CBXGTKIE.js} +206 -206
  41. package/dist/{chunk-FMJDKXNM.js → chunk-EKMZGVZA.js} +2 -2
  42. package/dist/{chunk-SBVJ4SMO.js → chunk-EQHSV77H.js} +2 -2
  43. package/dist/{chunk-7PH2NK5K.js → chunk-HO6LX3K7.js} +2 -2
  44. package/dist/chunk-II367GCP.js +11 -0
  45. package/dist/{chunk-HCPTQP7J.js → chunk-IMBY742Q.js} +2 -2
  46. package/dist/{chunk-2FNWZUPW.js → chunk-IXZUOQPP.js} +2 -2
  47. package/dist/{chunk-WQKDXHGX.js → chunk-KZIKF2VH.js} +2 -2
  48. package/dist/chunk-LGJ3PMWD.js +11 -0
  49. package/dist/{chunk-F3HGM3IU.js → chunk-LSAJM3LO.js} +17 -16
  50. package/dist/chunk-MAWTAPQE.js +12 -0
  51. package/dist/{chunk-2HSJ2XAQ.js → chunk-MKCTKQZA.js} +2 -2
  52. package/dist/{chunk-3FP37TPE.js → chunk-MPRAPBI2.js} +7 -7
  53. package/dist/{chunk-TZRZFNLH.js → chunk-MVRNQN2O.js} +3 -3
  54. package/dist/{chunk-LDP2SHPJ.js → chunk-PDS5FYC4.js} +2 -2
  55. package/dist/{chunk-ZIONKKAV.js → chunk-PVGICWWI.js} +2 -2
  56. package/dist/chunk-QKHCRDMM.js +11 -0
  57. package/dist/{chunk-DD7E4ADI.js → chunk-WADQ54KB.js} +2 -2
  58. package/package.json +4 -4
  59. package/dist/AddConfig-GZO2UMFR.js +0 -12
  60. package/dist/DeployMaafApp-HF67BQRZ.js +0 -14
  61. package/dist/ListConnectors-OET7STMW.js +0 -11
  62. package/dist/ShareList-6QI7ZAMZ.js +0 -11
  63. package/dist/chunk-5XRK3F43.js +0 -11
  64. package/dist/chunk-DAG6RPOF.js +0 -11
  65. package/dist/chunk-I22E6YZT.js +0 -11
  66. package/dist/chunk-PKDXP7CL.js +0 -11
  67. package/dist/chunk-SCJXITCN.js +0 -12
@@ -4,9 +4,9 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __pathDirname(__filename);
7
- import{a as E}from"./chunk-TYRVM4PP.js";import{c}from"./chunk-SBVJ4SMO.js";import{g as m}from"./chunk-UIW77LMA.js";import{b as g,c as y,d as p,e as h}from"./chunk-RBG2H562.js";import{a as i}from"./chunk-7PH2NK5K.js";import{i as d}from"./chunk-PVAIJSAI.js";import{j as C}from"./chunk-3FP37TPE.js";import{d as v}from"./chunk-UT667QSU.js";function T(e){if(e.body)try{let n=JSON.parse(e.body);if(typeof n?.error?.message=="string"&&n.error.message.trim())return n.error.message}catch{}}var w=new Set(["ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ETIMEDOUT","ECONNRESET","ConnectionRefused","ConnectionClosed","FailedToOpenSocket"]);function b(e){if(!(e instanceof Error)||e instanceof m)return!1;let n=e.code;return typeof n=="string"&&w.has(n)||w.has(e.name)}function G(e,n){let{environmentId:t}=n;if(b(e))return new h(`Could not reach environment ${t}. Its endpoint did not resolve or did not respond, which usually means the environment id is wrong or the environment does not exist in this cloud \u2014 verify the id and the --cloud value. If the id is correct, check your network connection, VPN, or proxy.`,{underlyingError:e.message,environmentId:t});if(!(e instanceof m))return null;let r=T(e),o=n.repoType==="native",a="Ask an admin to grant you the required permission in this environment.";if(e.status===401)return new y(r??"Your sign-in session has expired or is invalid. Run `ms auth login` and try again.");if(e.status===403){let f=r??(o?`You do not have permission to create repositories in environment ${t}.`:`You do not have permission to create an app in environment ${t}.`);return new y(`${f} ${a}`)}return e.status===404?new g(r??`Environment ${t} was not found. Verify the environment id and that you have access to it.`):e.status===409?new g(r??`An app with the same name already exists in environment ${t}. Choose a different name.`):e.status===429||e.status===503?new h(r??"The service is temporarily unavailable or rate-limited. Wait a moment and try again."):null}var u=v(E(),1);function j(){let e=c(["--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!e.success)throw new p("'git' is required but was not found on PATH.");let n=e.stdout,t=i.engines.git;if(!u.default.validRange(t))return;let r=u.default.coerce(n);if(r&&!u.default.satisfies(r,t))throw new p(`Git ${t} is required (found ${r.version}). Please upgrade git.`)}function F(){let e=c(["credential-manager","--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!(e.success?e:c(["credential-manager-core","--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1})).success)throw new p("Git Credential Manager is required for the native app flow but was not found. Install Git Credential Manager, then run `git-credential-manager configure` and retry.");let t=c(["config","--get-all","credential.helper"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!(t.success?t.stdout.split(/\r?\n/).some(o=>/(?:^|[\\/])git-credential-manager(?:-core)?(?:\.exe)?(?:["']|\s|$)/i.test(o.trim())||/^(?:manager|manager-core)$/i.test(o.trim())):!1))throw new p("Git Credential Manager is installed but not configured as a Git credential helper. Run `git-credential-manager configure` and retry.")}function J(e){let n={version:C,appId:e.appId,appDisplayName:e.appDisplayName,environmentId:e.environmentId,description:e.description,repoType:e.repoType,cloud:e.cloud,buildPath:e.buildPath??"./dist",buildCommand:e.buildCommand??"npm run build",buildEntryPoint:e.buildEntryPoint??"index.html"};return e.repositoryId&&(n.repositoryId=e.repositoryId),e.externalRepoUrl&&(n.externalRepoUrl=e.externalRepoUrl),e.iconPath&&(n.iconPath=e.iconPath),e.localAppUrl&&(n.localAppUrl=e.localAppUrl),e.connectionReferences!==void 0&&(n.connectionReferences=e.connectionReferences),e.appSettings!==void 0&&(n.appSettings=e.appSettings),n}import*as s from"fs";import*as S from"path";var l=v(E(),1);var A="https://registry.npmjs.org",N=5e3;async function I(e,n=i.version){if(!l.default.valid(n))return;if(l.default.prerelease(n)===null)return n;let t=await $(e);return t?`^${t}`:void 0}async function $(e){try{let{data:n}=await e.get(`${A}/${i.name}/latest`,{headers:{"user-agent":`${i.name}/${i.version}`},signal:AbortSignal.timeout(N)});return typeof n?.version=="string"&&l.default.valid(n.version)?n.version:void 0}catch{return}}async function Q(e,n,t){let r=S.join(e,"package.json");if(!s.existsSync(r))return;let o=await I(t);if(!o){n||d(`Skipping the project-local CLI pin: '${i.version}' is not a published release and no published version could be resolved. Install '${i.name}' into the project manually if you want a project-local CLI.`);return}!n&&o!==i.version&&d(`'${i.version}' is a prerelease build; pinning the latest published CLI ('${o}') into the app instead.`);try{let a=JSON.parse(s.readFileSync(r,"utf8"));a.devDependencies=Object.fromEntries(Object.entries({...a.devDependencies,[i.name]:o}).sort(([f],[R])=>f.localeCompare(R,"en"))),s.writeFileSync(r,`${JSON.stringify(a,null,2)}
7
+ import{a as E}from"./chunk-TYRVM4PP.js";import{c}from"./chunk-EQHSV77H.js";import{g as m}from"./chunk-CBXGTKIE.js";import{b as g,c as y,d as p,e as h}from"./chunk-RBG2H562.js";import{a as i}from"./chunk-HO6LX3K7.js";import{i as d}from"./chunk-PVAIJSAI.js";import{j as C}from"./chunk-MPRAPBI2.js";import{d as v}from"./chunk-UT667QSU.js";function T(e){if(e.body)try{let n=JSON.parse(e.body);if(typeof n?.error?.message=="string"&&n.error.message.trim())return n.error.message}catch{}}var w=new Set(["ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ETIMEDOUT","ECONNRESET","ConnectionRefused","ConnectionClosed","FailedToOpenSocket"]);function b(e){if(!(e instanceof Error)||e instanceof m)return!1;let n=e.code;return typeof n=="string"&&w.has(n)||w.has(e.name)}function G(e,n){let{environmentId:t}=n;if(b(e))return new h(`Could not reach environment ${t}. Its endpoint did not resolve or did not respond, which usually means the environment id is wrong or the environment does not exist in this cloud \u2014 verify the id and the --cloud value. If the id is correct, check your network connection, VPN, or proxy.`,{underlyingError:e.message,environmentId:t});if(!(e instanceof m))return null;let r=T(e),o=n.repoType==="native",a="Ask an admin to grant you the required permission in this environment.";if(e.status===401)return new y(r??"Your sign-in session has expired or is invalid. Run `ms auth login` and try again.");if(e.status===403){let f=r??(o?`You do not have permission to create repositories in environment ${t}.`:`You do not have permission to create an app in environment ${t}.`);return new y(`${f} ${a}`)}return e.status===404?new g(r??`Environment ${t} was not found. Verify the environment id and that you have access to it.`):e.status===409?new g(r??`An app with the same name already exists in environment ${t}. Choose a different name.`):e.status===429||e.status===503?new h(r??"The service is temporarily unavailable or rate-limited. Wait a moment and try again."):null}var u=v(E(),1);function j(){let e=c(["--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!e.success)throw new p("'git' is required but was not found on PATH.");let n=e.stdout,t=i.engines.git;if(!u.default.validRange(t))return;let r=u.default.coerce(n);if(r&&!u.default.satisfies(r,t))throw new p(`Git ${t} is required (found ${r.version}). Please upgrade git.`)}function F(){let e=c(["credential-manager","--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!(e.success?e:c(["credential-manager-core","--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1})).success)throw new p("Git Credential Manager is required for the native app flow but was not found. Install Git Credential Manager, then run `git-credential-manager configure` and retry.");let t=c(["config","--get-all","credential.helper"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!(t.success?t.stdout.split(/\r?\n/).some(o=>/(?:^|[\\/])git-credential-manager(?:-core)?(?:\.exe)?(?:["']|\s|$)/i.test(o.trim())||/^(?:manager|manager-core)$/i.test(o.trim())):!1))throw new p("Git Credential Manager is installed but not configured as a Git credential helper. Run `git-credential-manager configure` and retry.")}function J(e){let n={version:C,appId:e.appId,appDisplayName:e.appDisplayName,environmentId:e.environmentId,description:e.description,repoType:e.repoType,cloud:e.cloud,buildPath:e.buildPath??"./dist",buildCommand:e.buildCommand??"npm run build",buildEntryPoint:e.buildEntryPoint??"index.html"};return e.repositoryId&&(n.repositoryId=e.repositoryId),e.externalRepoUrl&&(n.externalRepoUrl=e.externalRepoUrl),e.iconPath&&(n.iconPath=e.iconPath),e.localAppUrl&&(n.localAppUrl=e.localAppUrl),e.connectionReferences!==void 0&&(n.connectionReferences=e.connectionReferences),e.appSettings!==void 0&&(n.appSettings=e.appSettings),n}import*as s from"fs";import*as S from"path";var l=v(E(),1);var A="https://registry.npmjs.org",N=5e3;async function I(e,n=i.version){if(!l.default.valid(n))return;if(l.default.prerelease(n)===null)return n;let t=await $(e);return t?`^${t}`:void 0}async function $(e){try{let{data:n}=await e.get(`${A}/${i.name}/latest`,{headers:{"user-agent":`${i.name}/${i.version}`},signal:AbortSignal.timeout(N)});return typeof n?.version=="string"&&l.default.valid(n.version)?n.version:void 0}catch{return}}async function Q(e,n,t){let r=S.join(e,"package.json");if(!s.existsSync(r))return;let o=await I(t);if(!o){n||d(`Skipping the project-local CLI pin: '${i.version}' is not a published release and no published version could be resolved. Install '${i.name}' into the project manually if you want a project-local CLI.`);return}!n&&o!==i.version&&d(`'${i.version}' is a prerelease build; pinning the latest published CLI ('${o}') into the app instead.`);try{let a=JSON.parse(s.readFileSync(r,"utf8"));a.devDependencies=Object.fromEntries(Object.entries({...a.devDependencies,[i.name]:o}).sort(([f],[R])=>f.localeCompare(R,"en"))),s.writeFileSync(r,`${JSON.stringify(a,null,2)}
8
8
  `)}catch(a){n||d(`Could not pin '${i.name}' into ${r} (${a instanceof Error?a.message:String(a)}). Add "${i.name}": "${o}" to devDependencies manually.`)}}var O="none",P="native",x=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Z(e){return x.test(e.trim())}function ee(e){if(e===void 0||e==="")return{repoType:"native",remoteUrl:void 0};let n=e.trim();return n.toLowerCase()===P?{repoType:"native",remoteUrl:void 0}:n.toLowerCase()===O?{repoType:"none",remoteUrl:void 0}:{repoType:"github",remoteUrl:n}}export{G as a,j as b,F as c,J as d,Q as e,Z as f,ee as g};
9
9
  /*!
10
10
  * Copyright (C) Microsoft Corporation. All rights reserved.
11
11
  */
12
- //# sourceMappingURL=chunk-FMJDKXNM.js.map
12
+ //# sourceMappingURL=chunk-EKMZGVZA.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{c as S,d as x,e as v}from"./chunk-RBG2H562.js";import{n as O}from"./chunk-LDP2SHPJ.js";import{d as I,f as N}from"./chunk-Y7TZZLPW.js";import{h as C}from"./chunk-PVAIJSAI.js";function b(t){try{return new URL(t).host}catch{return t}}function q(t,e,i){e||C(`Authenticating to ${b(t)} for ${i}. A browser window may open. Sign in with the account associated with this tenant.`)}import{execFileSync as A}from"child_process";var D=[{patterns:[/403 forbidden/i,/returned error: 403/i,/access denied/i],bucket:"auth-403",build:t=>`Git reached the remote but access was denied while ${t} (HTTP 403). This usually means one of:
7
+ import{c as S,d as x,e as v}from"./chunk-RBG2H562.js";import{n as O}from"./chunk-PDS5FYC4.js";import{d as I,f as N}from"./chunk-Y7TZZLPW.js";import{h as C}from"./chunk-PVAIJSAI.js";function b(t){try{return new URL(t).host}catch{return t}}function q(t,e,i){e||C(`Authenticating to ${b(t)} for ${i}. A browser window may open. Sign in with the account associated with this tenant.`)}import{execFileSync as A}from"child_process";var D=[{patterns:[/403 forbidden/i,/returned error: 403/i,/access denied/i],bucket:"auth-403",build:t=>`Git reached the remote but access was denied while ${t} (HTTP 403). This usually means one of:
8
8
  - the signed-in account is in the wrong tenant, or lacks permission to this app's repo; or
9
9
  - Git Credential Manager returned a cached credential for a different account than your current 'ms auth' sign-in (a stale or mismatched credential).
10
10
  Confirm 'ms auth status' shows the account and tenant for this environment. If it doesn't match, clear the cached git credential for the host ('git credential-manager erase', or remove it from your OS credential store) so Git re-prompts, then re-run.`},{patterns:[/terminal prompts disabled/i,/could not read username/i,/could not read password/i],bucket:"auth-prompt-unavailable",build:t=>`Git could not obtain a credential while ${t}: there is no cached credential and the session can't prompt for one. Make sure Git Credential Manager is installed, then re-run in an interactive terminal so the browser sign-in can complete.`},{patterns:[/authentication failed/i,/invalid username or password/i],bucket:"auth-invalid-credential",build:t=>`Git authentication failed while ${t}: the credential was missing, invalid, or expired. When the browser opens, sign in with the account for this environment's tenant; if a stale credential is cached, clear it in Git Credential Manager and re-run.`}],F=[/could not resolve host/i,/could not resolve proxy/i,/failed to connect/i,/connection timed out/i,/connection refused/i,/network is unreachable/i,/temporary failure in name resolution/i];function U(t){return t.replace(/(\b[a-z][a-z0-9+.-]*:\/\/)[^/\s@]+@/gi,"$1[REDACTED]@")}function $(t,e){let i=U(t.trimEnd());if(!i)return null;for(let r of D)if(r.patterns.some(n=>n.test(i)))return new S(`${r.build(e.action)}
@@ -17,4 +17,4 @@ ${i}`,{classifierBucket:"network",action:e.action}):null}function m(t){return t=
17
17
  /*!
18
18
  * Copyright (C) Microsoft Corporation. All rights reserved.
19
19
  */
20
- //# sourceMappingURL=chunk-SBVJ4SMO.js.map
20
+ //# sourceMappingURL=chunk-EQHSV77H.js.map
@@ -4,5 +4,5 @@ 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
- var t={name:"@microsoft/managed-apps-cli",version:"0.23.0",type:"module",description:"Command-line interface for building and managing Microsoft Managed Apps",license:"MIT",bin:{ms:"./dist/Bin.js"},files:["dist","!dist/*.map","LICENSE","README.md","THIRD-PARTY-NOTICES.txt"],scripts:{build:"bun scripts/build.ts","generate:cgmanifest":"bun scripts/generate-cgmanifest.ts","benchmark:startup":"bun scripts/benchmark-startup.ts",dev:"tsc -p tsconfig.json --watch","check-types":"tsc --noEmit",lint:"eslint src/",test:"bun test --isolate src/","test:e2e":"bun test src/__tests__/e2e/",clean:"bun ../../scripts/clean.ts dist .turbo tsconfig.tsbuildinfo THIRD-PARTY-NOTICES.txt"},dependencies:{"@azure/msal-node-extensions":"5.2.2",esbuild:"catalog:build",open:"11.0.0"},engines:{node:">=24.11.0",git:">=2.27.0"},devDependencies:{"@microsoft/managed-apps-actions":"workspace:*","@microsoft/managed-apps-codegen":"workspace:*","@microsoft/managed-apps-common":"workspace:*","@azure/msal-node":"5.2.2","@clack/prompts":"1.4.0","@microsoft/1ds-core-js":"4.3.11","@microsoft/1ds-post-js":"4.3.11","@repo/repo-config":"workspace:*","@rnx-kit/third-party-notices":"3.0.0","@types/archiver":"6.0.3","@types/bun":"1.3.13","@types/node":"catalog:","@types/semver":"7.7.1",archiver:"7.0.1",commander:"10.0.1",json5:"2.2.3",memfs:"^4.57.2",semver:"7.7.4","tsc-esm-fix":"catalog:build",typescript:"5.9.3"}};export{t as a};
8
- //# sourceMappingURL=chunk-7PH2NK5K.js.map
7
+ var t={name:"@microsoft/managed-apps-cli",version:"0.24.0",type:"module",description:"Command-line interface for building and managing Microsoft Managed Apps",license:"MIT",bin:{ms:"./dist/Bin.js"},files:["dist","!dist/*.map","LICENSE","README.md","THIRD-PARTY-NOTICES.txt"],scripts:{build:"bun scripts/build.ts","generate:cgmanifest":"bun scripts/generate-cgmanifest.ts","benchmark:startup":"bun scripts/benchmark-startup.ts",dev:"tsc -p tsconfig.json --watch","check-types":"tsc --noEmit",lint:"eslint src/",test:"bun test --isolate src/","test:e2e":"bun test src/__tests__/e2e/",clean:"bun ../../scripts/clean.ts dist .turbo tsconfig.tsbuildinfo THIRD-PARTY-NOTICES.txt"},dependencies:{"@azure/msal-node-extensions":"5.2.2",esbuild:"catalog:build",open:"11.0.0"},engines:{node:">=24.11.0",git:">=2.27.0"},devDependencies:{"@microsoft/managed-apps-actions":"workspace:*","@microsoft/managed-apps-codegen":"workspace:*","@microsoft/managed-apps-common":"workspace:*","@azure/msal-node":"5.2.2","@clack/prompts":"1.4.0","@microsoft/1ds-core-js":"4.3.11","@microsoft/1ds-post-js":"4.3.11","@repo/repo-config":"workspace:*","@rnx-kit/third-party-notices":"3.0.0","@types/archiver":"6.0.3","@types/bun":"1.3.13","@types/node":"catalog:","@types/semver":"7.7.1",archiver:"7.0.1",commander:"10.0.1",json5:"2.2.3",memfs:"^4.57.2",semver:"7.7.4","tsc-esm-fix":"catalog:build",typescript:"5.9.3"}};export{t as a};
8
+ //# sourceMappingURL=chunk-HO6LX3K7.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}from"./chunk-OL6CTXQR.js";import{Ga as M,Ha as b,fa as g}from"./chunk-CBXGTKIE.js";import{a as c}from"./chunk-RBG2H562.js";import{h as p}from"./chunk-PVAIJSAI.js";var h=1e3;function A(t){if(typeof t=="string"){let n=t.trim();return n?{errorMessage:n}:{}}if(!t||typeof t!="object")return{};let e=t,a=typeof e.code=="string"&&e.code.trim()?e.code.trim():void 0;if(typeof e.error=="string"){let n=e.error.trim(),o=S(a,n||void 0);return o?{errorMessage:o}:{}}let d,r,i;if(e.error&&typeof e.error=="object"){let n=e.error.code,o=e.error.message,s=e.error.buildOutput;d=typeof n=="string"&&n.trim()?n.trim():void 0,r=typeof o=="string"&&o.trim()?o.trim():void 0,i=typeof s=="string"&&s.trim()?s.trim():void 0}!r&&typeof e.message=="string"&&e.message.trim()&&(r=e.message.trim()),!i&&typeof e.buildOutput=="string"&&e.buildOutput.trim()&&(i=e.buildOutput.trim());let l=S(d??a,r);return l||i?{errorMessage:l,buildOutput:i}:{}}async function I(t){let e=M(),a=h,d=t.maxIntervalMs??1/0,r=Math.min(d,Math.max(a,t.initialWaitMs)),i=t.deadlineMs!=null?Date.now()+t.deadlineMs:null,l=t.spinnerLabel??"Waiting for build status...",n=b().origin.toLowerCase().startsWith("plugin/"),s=!t.isJsonMode&&process.stdout.isTTY===!0&&!n?new w:null;!t.isJsonMode&&n&&p(l),s?.start(l);try{for(;;){if(i!==null&&Date.now()>=i)throw new c(`Build did not complete within ${Math.round(t.deadlineMs/6e4)} minutes. Commit SHA: ${t.commitSha}.`);await B(r);let u=await g({logger:e,actionsParams:{appName:t.appName,commitSha:t.commitSha}});switch(u.status){case"Succeeded":return u;case"Failed":case"Canceled":{s?.stop();let m=A(u.result);!t.isJsonMode&&m.buildOutput&&p(m.buildOutput);let f=m.errorMessage??"",y=f?`Build ${u.status.toLowerCase()}: ${f}.`:`Build ${u.status.toLowerCase()}.`;throw new c(y+(t.commitSha?` Commit SHA: ${t.commitSha}.`:""))}case"NotStarted":case"Running":{let m=u.retryAfterMs??r;r=Math.min(d,Math.max(a,m));break}default:return L(u.status)}}}finally{s?.stop()}}function L(t){throw new c(`Unexpected build status from server: ${String(t)}.`)}function S(t,e){return t&&e?`${t}: ${e}`:t??e}function B(t){return new Promise(e=>setTimeout(e,t))}export{A as a,I as b};
8
+ /*!
9
+ * Copyright (C) Microsoft Corporation. All rights reserved.
10
+ */
11
+ //# sourceMappingURL=chunk-II367GCP.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{N as a,Q as i,g as o}from"./chunk-UIW77LMA.js";import{a as s,b as u,c,d as l,e as d}from"./chunk-RBG2H562.js";var g=["GitHubMappingMissing","GitHubMappingExpired","GitHubMappingStale"];function E(e){return typeof e=="string"&&g.includes(e)}function m(e){let n=e.code;if(!n)return null;let t=e.message;if(!t||!t.trim())return null;switch(n){case"GitHubMappingMissing":case"GitHubMappingExpired":case"GitHubMappingStale":case"GitHubUserLacksAccess":case"GitHubUserLacksRequiredLevel":case"GitHubAuthSessionExpired":case"GitHubAuthSessionNotFound":case"GitHubAuthDenied":case"GitHubAuthCancelled":return new c(t);case"GitHubAppNotInstalled":case"GitHubInstallationSuspended":return new l(t);case"GitHubRateLimited":case"GitHubEvaluationError":case"GitHubUpstreamError":return new d(t);case"GitHubRepoArchived":case"GitHubRepoNotEnterprise":case"GitHubRepoNotFound":return new u(t);case"OperationNotFound":return new s(t);default:return null}}function v(e){if(e instanceof s)return null;let n=f(e);return n?m(n):null}function S(e){let n=f(e);if(!n)return null;let t=n.code;return!E(t)||!(e instanceof i||e instanceof a)&&n.httpStatus!==401?null:{code:t,payload:n}}function f(e){if(e instanceof a)return{code:e.code,message:e.message,details:e.details};if(e instanceof i)return{code:e.code,message:e.message,httpStatus:e.status,details:e.details};if(e instanceof o){let n=p(e.body);return n?{code:n.code,message:n.message??"",httpStatus:e.status,details:n.details}:null}if(e instanceof Error){let n=e.message.match(/\{[\s\S]*\}/);if(!n)return null;let t=p(n[0]);if(!t?.code)return null;let r=e.message.match(/status:\s*(\d+)/i);return{code:t.code,message:t.message??"",httpStatus:r?Number(r[1]):void 0,details:t.details}}return null}function p(e){if(!e)return null;try{let t=JSON.parse(e)?.error;return!t||typeof t!="object"?null:{code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0,details:t.details}}catch{return null}}export{m as a,v as b,S as c};
7
+ import{N as a,P as i,g as o}from"./chunk-CBXGTKIE.js";import{a as s,b as u,c,d as l,e as d}from"./chunk-RBG2H562.js";var g=["GitHubMappingMissing","GitHubMappingExpired","GitHubMappingStale"];function E(e){return typeof e=="string"&&g.includes(e)}function m(e){let n=e.code;if(!n)return null;let t=e.message;if(!t||!t.trim())return null;switch(n){case"GitHubMappingMissing":case"GitHubMappingExpired":case"GitHubMappingStale":case"GitHubUserLacksAccess":case"GitHubUserLacksRequiredLevel":case"GitHubAuthSessionExpired":case"GitHubAuthSessionNotFound":case"GitHubAuthDenied":case"GitHubAuthCancelled":return new c(t);case"GitHubAppNotInstalled":case"GitHubInstallationSuspended":return new l(t);case"GitHubRateLimited":case"GitHubEvaluationError":case"GitHubUpstreamError":return new d(t);case"GitHubRepoArchived":case"GitHubRepoNotEnterprise":case"GitHubRepoNotFound":return new u(t);case"OperationNotFound":return new s(t);default:return null}}function v(e){if(e instanceof s)return null;let n=f(e);return n?m(n):null}function S(e){let n=f(e);if(!n)return null;let t=n.code;return!E(t)||!(e instanceof i||e instanceof a)&&n.httpStatus!==401?null:{code:t,payload:n}}function f(e){if(e instanceof a)return{code:e.code,message:e.message,details:e.details};if(e instanceof i)return{code:e.code,message:e.message,httpStatus:e.status,details:e.details};if(e instanceof o){let n=p(e.body);return n?{code:n.code,message:n.message??"",httpStatus:e.status,details:n.details}:null}if(e instanceof Error){let n=e.message.match(/\{[\s\S]*\}/);if(!n)return null;let t=p(n[0]);if(!t?.code)return null;let r=e.message.match(/status:\s*(\d+)/i);return{code:t.code,message:t.message??"",httpStatus:r?Number(r[1]):void 0,details:t.details}}return null}function p(e){if(!e)return null;try{let t=JSON.parse(e)?.error;return!t||typeof t!="object"?null:{code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0,details:t.details}}catch{return null}}export{m as a,v as b,S as c};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=chunk-HCPTQP7J.js.map
11
+ //# sourceMappingURL=chunk-IMBY742Q.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-DD7E4ADI.js";import{l as u,m as f,o as l,p,u as w}from"./chunk-UIW77LMA.js";import{b as a,f as c}from"./chunk-RBG2H562.js";import{o as y}from"./chunk-LDP2SHPJ.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-WADQ54KB.js";import{l as u,m as f,o as l,p,u as w}from"./chunk-CBXGTKIE.js";import{b as a,f as c}from"./chunk-RBG2H562.js";import{o as y}from"./chunk-PDS5FYC4.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-2FNWZUPW.js.map
15
+ //# sourceMappingURL=chunk-IXZUOQPP.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 t}from"./chunk-3FP37TPE.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, which defaults to the app display name. Provisions a platform-managed git repo by default; see --repo to bind an external GitHub repo or skip git scaffolding. To use the current directory, specify '.'. 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.",projectId:"Existing managed project ID to associate with the app. Skips managed project and repository creation.",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, --access edit to grant edit access, or --access test to grant test operator access. 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), "edit", or "test" (test operator access).'},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", "edit", or "test" (test operator access).'},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, --access edit to revoke edit access, or --access test to revoke test operator access. 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), "edit", or "test" (test operator 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. By default the CLI waits for deployment to finish; set MS_CLI_MAAF_DEPLOY_VIA_MANAGED_DEVOPS to 2 or 3 and pass --no-wait to return after submission.`,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.",deployment:"Named deployment to deploy into, e.g. 'test'. Must already be registered with `ms app add config --deployment <name>`. Defaults to the app's production deployment.",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.",noWait:"With MS_CLI_MAAF_DEPLOY_VIA_MANAGED_DEVOPS set to 2 or 3, return after deployment submission and print the operation ID instead of polling to completion.",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 --no-wait`,`${"ms"} app deploy --artifact ./build.zip`,`${"ms"} app deploy --deployment test`,`${"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:{config:{description:"Register a deployment with the current app project and create its local deployment configuration overlay.",options:{deployment:"Deployment name. 1-64 lowercase letters, numbers, or hyphens, starting with a letter or number. Names starting with 'prod' or 'dev' are reserved, except 'prod' itself. Defaults to 'prod'."},examples:[`${"ms"} app add config --deployment prod`,`${"ms"} app add config --deployment test`]},connector:{description:"Add a data source (a connector table or action) to the app.",options:{connector:'Connector ID (e.g. office365, 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 commondataserviceforapps it is the Dataverse table logical name (e.g. account). If omitted, you will be prompted.",deployment:"Deployment whose existing config overlay receives the binding. Preview; requires MS_CLI_ALM=true.",for:"Existing logical name of the tabular data source to bind for the deployment.",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 office365`,`${"ms"} app add data-source --connector "Office 365 Users"`,`${"ms"} app add data-source --connector 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 sharepointonline --as action`,`${"ms"} app add data-source --connector "SharePoint" --as action`,`${"ms"} app add data-source --connector office365 --as action --use-sso`,`${"ms"} app add data-source --connector sql --as table --skip-codegen`,`${"ms"} app add data-source --connector commondataserviceforapps --as action --connection-id <id> --dataverse-environment-id <env-guid> --table account`,`${"ms"} app add data-source --deployment prod --for <name> --table <id>`],deprecation:`(deprecated) '${"ms"} app add connector' is deprecated. Use '${"ms"} app add data-source' instead.`,deprecatedExamples:[`${"ms"} app add connector --connector office365`,`${"ms"} app add connector --connector sql --as table --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add connector --connector sharepointonline --as action`,`${"ms"} app add connector --connector sql --as table --skip-codegen`,`${"ms"} app add connector --connector 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. 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. office365).",environmentId:"Environment ID (optional).",search:"Filter actions by summary or action ID (case-insensitive)."},examples:[`${"ms"} connector list-actions --connector office365`,`${"ms"} connector list-actions --connector sql --search "execute"`,`${"ms"} connector list-actions --connector office365 --environment-id <env-id>`,`${"ms"} connector list-actions --connector 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`]}},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};
7
+ import{a as t}from"./chunk-MPRAPBI2.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, which defaults to the app display name. Provisions a platform-managed git repo by default; see --repo to bind an external GitHub repo or skip git scaffolding. To use the current directory, specify '.'. 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.",projectId:"Existing managed project ID to associate with the app. Skips managed project and repository creation.",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, --access edit to grant edit access, or --access test to grant test operator access. 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), "edit", or "test" (test operator access).'},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", "edit", or "test" (test operator access).'},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, --access edit to revoke edit access, or --access test to revoke test operator access. 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), "edit", or "test" (test operator 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. By default the CLI waits for deployment to finish; set MS_CLI_MAAF_DEPLOY_VIA_MANAGED_DEVOPS to 2 or 3 and pass --no-wait to return after submission.`,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.",deployment:"Named deployment to deploy into, e.g. 'test'. Must already be registered with `ms app add config --deployment <name>`. Defaults to the app's production deployment.",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.",noWait:"With MS_CLI_MAAF_DEPLOY_VIA_MANAGED_DEVOPS set to 2 or 3, return after deployment submission and print the operation ID instead of polling to completion.",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 --no-wait`,`${"ms"} app deploy --artifact ./build.zip`,`${"ms"} app deploy --deployment test`,`${"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:{config:{description:"Register a deployment with the current app project and create its local deployment configuration overlay.",options:{deployment:"Deployment to configure: 'prod' or 'test'. Omit to configure both deployments."},examples:[`${"ms"} app add config`,`${"ms"} app add config --deployment prod`,`${"ms"} app add config --deployment test`]},connector:{description:"Add a data source (a connector table or action) to the app.",options:{connector:'Connector ID (e.g. office365, 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 commondataserviceforapps it is the Dataverse table logical name (e.g. account). If omitted, you will be prompted.",deployment:"Deployment whose existing config overlay receives the binding. Preview; requires MS_CLI_ALM=true.",for:"Existing logical name of the tabular data source to bind for the deployment.",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 office365`,`${"ms"} app add data-source --connector "Office 365 Users"`,`${"ms"} app add data-source --connector 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 sharepointonline --as action`,`${"ms"} app add data-source --connector "SharePoint" --as action`,`${"ms"} app add data-source --connector office365 --as action --use-sso`,`${"ms"} app add data-source --connector sql --as table --skip-codegen`,`${"ms"} app add data-source --connector commondataserviceforapps --as action --connection-id <id> --dataverse-environment-id <env-guid> --table account`,`${"ms"} app add data-source --deployment prod --for <name> --table <id>`],deprecation:`(deprecated) '${"ms"} app add connector' is deprecated. Use '${"ms"} app add data-source' instead.`,deprecatedExamples:[`${"ms"} app add connector --connector office365`,`${"ms"} app add connector --connector sql --as table --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add connector --connector sharepointonline --as action`,`${"ms"} app add connector --connector sql --as table --skip-codegen`,`${"ms"} app add connector --connector 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. 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. office365).",environmentId:"Environment ID (optional).",search:"Filter actions by summary or action ID (case-insensitive)."},examples:[`${"ms"} connector list-actions --connector office365`,`${"ms"} connector list-actions --connector sql --search "execute"`,`${"ms"} connector list-actions --connector office365 --environment-id <env-id>`,`${"ms"} connector list-actions --connector 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`]}},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
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=chunk-WQKDXHGX.js.map
11
+ //# sourceMappingURL=chunk-KZIKF2VH.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"}},o={Help:{name:"help",alias:"h"},Connector:{name:"connector",promptMessage:"Please provide the connector (e.g. shared_office365):",envVar:"CONNECTOR"},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"},Search:{name:"search",alias:"s",promptMessage:"Please provide a search term:",envVar:"SEARCH_TERM"}},t={SkipCodegen:{name:"skip-codegen",env:"SKIP_CODEGEN"},UseV1Codegen:{name:"use-v1-codegen",env:"USE_V1_CODEGEN"}},s={Table:{name:"table",alias:"t",promptMessage:"Please provide the table name:",envVar:"TABLE_NAME"},...t},m={As:{name:"as",promptMessage:"Add as table or action?",envVar:"ADD_CONNECTOR_AS"},Table:s.Table,DataverseEnvironmentId:{name:"dataverse-environment-id",promptMessage:"Please provide the Dataverse environment ID:",envVar:"DATAVERSE_ENVIRONMENT_ID"},UseSso:{name:"use-sso",env:"USE_SSO"},...t},i={Deployment:{name:"deployment"},For:{name:"for"}},c={Deployment:{name:"deployment"}},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={Search:{...o.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"}},P={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:{...o.Search,promptMessage:"Please provide a search term to filter actions by summary or action ID:",envVar:"CONNECTOR_ACTION_SEARCH"},EnvironmentId:{name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"}};var r={EnvironmentId:{name:"environment-id",alias:"e",promptMessage:"Please provide the environment ID:",envVar:"ENVIRONMENT_ID"},DisplayName:{name:"display-name",alias:"n",promptMessage:"Please provide the display name for the app:",envVar:"APP_DISPLAY_NAME"},Description:{name:"description",alias:"d",promptMessage:"Please provide a description for the app (optional):",envVar:"APP_DESCRIPTION"},BuildPath:{name:"build-path",alias:"b",promptMessage:"Please provide the build output path:",envVar:"BUILD_PATH",initialValue:"./dist"},BuildCommand:{name:"build-command",alias:"S",promptMessage:"Please provide the full command used to build your app:",envVar:"BUILD_COMMAND",initialValue:"npm run build"},BuildEntryPoint:{name:"build-entry-point",promptMessage:"Please provide the entry point HTML file:",envVar:"BUILD_ENTRY_POINT",initialValue:"index.html"},IconPath:{name:"icon-path",camelName:"iconPath",envVar:"APP_ICON_PATH"},LocalAppUrl:{name:"local-app-url",camelName:"localAppUrl",envVar:"LOCAL_APP_URL"}},e={name:"force-reauth",camelName:"forceReauth"},_={...r,AppId:{name:"app-id",alias:"i",promptMessage:"Please provide an app ID (letters, numbers, and underscores only, 1-64 chars):",envVar:"APP_ID"},Template:{name:"template",alias:"t",promptMessage:"Please provide the template name:",envVar:"APP_TEMPLATE"},RepositoryId:{name:"repository-id",alias:"r",promptMessage:"Please provide the repository ID:",envVar:"APP_REPOSITORY_ID"},ProjectId:{name:"project-id",camelName:"projectId",envVar:"APP_PROJECT_ID"},Repo:{name:"repo",envVar:"APP_REPO"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"},ForceReauth:e},u={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"}},E={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:e},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"}},h={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"}},V={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"},Deployment:{name:"deployment",envVar:"MAAF_DEPLOYMENT"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"},Force:{name:"force"},NoWait:{name:"no-wait",camelName:"wait"},ForceReauth:e},C={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},EnvironmentId:{name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"}},D={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},Access:{name:"access",envVar:"MAAF_APP_ACCESS",defaultValue:"play"}},O={AppName:{name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},Access:{name:"access",envVar:"MAAF_APP_ACCESS",defaultValue:"play"}},S={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"}},a={name:"app",promptMessage:"Please provide the app name:",envVar:"MAAF_APP_NAME"},n={name:"environment-id",alias:"e",envVar:"MAAF_ENVIRONMENT_ID"},T={AppName:a,EnvironmentId:n},R={AppName:a,EnvironmentId:n},f={AppName:a,EnvironmentId:n,Access:{name:"access",envVar:"MAAF_APP_ACCESS"}},L={AppName:a,EnvironmentId:n,LinkId:{name:"link-id",alias:"l",promptMessage:"Please provide the share link ID:",envVar:"MAAF_SHARE_LINK_ID"},Force:{name:"force",alias:"f"}},y={...r,Repo:{name:"repo",envVar:"APP_REPO"},OpenBrowser:{name:"open-browser",camelName:"openBrowser"},ForceReauth:e};export{p as a,o as b,m as c,i as d,c as e,A as f,l as g,d as h,v as i,M as j,P as k,N as l,_ as m,u as n,g as o,E as p,I as q,h as r,V as s,C as t,D as u,O as v,S as w,T as x,R as y,f as z,L as A,y as B};
8
+ /*!
9
+ * Copyright (C) Microsoft Corporation. All rights reserved.
10
+ */
11
+ //# sourceMappingURL=chunk-LGJ3PMWD.js.map