@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
package/README.md CHANGED
@@ -24,6 +24,13 @@ Run `ms <command> --help` for the options on any command.
24
24
 
25
25
  `ms app deploy --no-wait` is available only when `MS_CLI_MAAF_DEPLOY_VIA_MANAGED_DEVOPS` is `2` or `3`. It skips deployment polling, but still waits for a queued prerequisite build on git-backed apps and still packs/uploads external artifacts before submitting the deployment. After the service accepts the deployment, the command returns its stable operation ID for later tracking.
26
26
 
27
+ To include a schema in `ms app pack`, set `data.schemaPath` in the base app config to a
28
+ project-relative JSON file. The legacy `db.schemaPath` alias remains supported; when both are
29
+ present, their path strings must match exactly (no normalization). Invalid aliases fail even if
30
+ the other alias is valid. Both are base-only and cannot be overridden by a deployment overlay.
31
+ Pack writes `dataSchema.json` and points the unchanged `manifest.dataSchemaPath` field to it,
32
+ regardless of which alias was configured.
33
+
27
34
  ## Global options
28
35
 
29
36
  | Option | Alias | Description |
@@ -0,0 +1,12 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __pathDirname(__filename);
7
+ import{a as w,b as c,c as B,d,e as E,f as J,g as f}from"./chunk-7DFBXNI7.js";import{Ga as $,S as I,b as N,g as v,ma as O}from"./chunk-CBXGTKIE.js";import{b as P,d as a}from"./chunk-RBG2H562.js";import"./chunk-PDS5FYC4.js";import"./chunk-HO6LX3K7.js";import"./chunk-Y7TZZLPW.js";import{e as u}from"./chunk-LGJ3PMWD.js";import{c as g,d as y,i as C}from"./chunk-PVAIJSAI.js";import{a as p}from"./chunk-KZIKF2VH.js";import{c as h}from"./chunk-MPRAPBI2.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as m from"node:fs";import*as l from"node:fs/promises";import*as S from"node:path";async function se(e){q(e),await e.runVerb();let t=await e.getOption(u.Deployment.name),n=w();if(!t?.trim()){await Y(e,n);return}let i=E(t),o=f(n,i);await L(n.appRoot,o);let r=await x(e,n,i);if(e.isJsonMode()){y({...r});return}F(r)}async function Y(e,t){for(let o of d)await L(t.appRoot,f(t,o));let n=new Map;for(let o of d)o!==c&&n.set(o,await j(e,t,o));let i=[];for(let o of d)i.push(await x(e,t,o,n.get(o)));if(e.isJsonMode()){y({deployments:i});return}for(let o of i)F(o)}async function j(e,t,n){let i=await G(e,t.config),o=i.projectId?.trim();if(!o)throw new a(`App '${i.displayName}' is not associated with a managed project, so a deployment cannot be configured.`);e.updateEnvironmentId(i.environmentId);let r=!0;try{await I(o,{stageName:n})}catch(s){if(K(s))r=!1;else throw s}return{projectId:o,deploymentCreated:r}}async function x(e,t,n,i){let o=f(t,n);if(n===c){let W=`Deployment '${n}' is already provisioned.`,D=await M(o);return{deployment:n,deploymentCreated:!1,configCreated:D.created,configPath:o,...T(R(W,o,D.error))}}let{projectId:r,deploymentCreated:s}=i??await j(e,t,n),A=await M(o),U=s?`Registered deployment '${n}' with project '${r}'.`:`Deployment '${n}' is already registered with project '${r}'.`;return{deployment:n,projectId:r,deploymentCreated:s,configCreated:A.created,configPath:o,...T(R(U,o,A.error))}}function F(e){if(e.warning){C(e.warning);return}e.projectId&&g(e.deploymentCreated?`Registered deployment '${e.deployment}' with project '${e.projectId}'.`:`Deployment '${e.deployment}' is already registered with project '${e.projectId}'.`),g(`Created deployment config '${e.configPath}'.`)}function T(e){return e?{warning:e}:{}}var k=/^default-/i;function b(e,t,n=!1){if(e==null)return;if(typeof e!="string")throw new a(`The base app config field '${t}' must be a string, but is of type ${typeof e}.`);let i=e.trim();if(!i)return;let o=n?i.replace(k,""):i;if(!N(o))throw new a(`The base app config field '${t}' must be a GUID, but is '${i}'.`);return i}async function G(e,t){let n=b(t.appId,"appId");if(!n)throw new a("The base app config does not contain an appId.");let i=b(t.environmentId,"environmentId",!0),o=await e.getTenantIdAsync();if(!o)throw new P("Unable to determine tenant ID. Ensure you are logged in.");return O({tenantId:o,environmentId:i,logger:$(),actionsParams:{appName:n}})}function _(e){return new a(`${S.basename(e)} already exists. Edit it directly, or delete it and rerun to recreate it.`)}async function L(e,t){if(m.existsSync(t))throw _(t);try{await l.access(e,m.constants.W_OK)}catch(n){throw new a(`App directory '${e}' is not writable.`,{underlyingError:n})}}async function X(e,t){await l.writeFile(e,t,{encoding:"utf8",flag:"wx"})}async function H(e){await X(e,`${JSON.stringify({$schema:h},null,2)}
8
+ `)}async function M(e){try{return await H(e),{created:!0}}catch(t){if(V(t))throw _(e);return{created:!1,error:t instanceof Error?t.message:String(t)}}}function V(e){return typeof e=="object"&&e!==null&&e.code==="EEXIST"}function R(e,t,n){if(n!==void 0)return`${e} The deployment config '${t}' could not be created. Fix the filesystem error and rerun the command; the existing deployment will be reused. Reason: ${n}`}function K(e){return e instanceof v&&e.status===409&&e.code==="StageNameConflict"}function q(e){e.setDescription(p.app.add.config.description),e.addExamples(p.app.add.config.examples),e.addOptions([{flags:{key:u.Deployment.name},description:p.app.add.config.options.deployment,optionalInNonInteractive:!0}])}export{c as DEFAULT_DEPLOYMENT_NAME,d as SUPPORTED_DEPLOYMENT_NAMES,B as TEST_DEPLOYMENT_NAME,se as addConfigAsync,J as assertOverlayNameNotReserved,w as resolveBaseConfig,b as validateConfigGuid,E as validateDeploymentName};
9
+ /*!
10
+ * Copyright (C) Microsoft Corporation. All rights reserved.
11
+ */
12
+ //# sourceMappingURL=AddConfig-ZIDAN5AS.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{a as ke,b as Be,c as H,d as ee,e as _}from"./chunk-ZIONKKAV.js";import{a as Ee,c as xe,e as Pe}from"./chunk-5XRK3F43.js";import{a as X,b as Z,d as J,e as Te,g as Oe}from"./chunk-DD7E4ADI.js";import{B as we,Ga as B,Ha as E,J as Ce,K as Ae,V as le,W as Se,X as Ie,_ as De,ba as $e,ca as Ne,f as ye,u as q}from"./chunk-UIW77LMA.js";import{b as a}from"./chunk-RBG2H562.js";import"./chunk-LDP2SHPJ.js";import"./chunk-7PH2NK5K.js";import{c as Fe}from"./chunk-Y7TZZLPW.js";import{b as D,c as A,d as V}from"./chunk-DAG6RPOF.js";import{a as W,c as M,d as he,h as j,i as Q}from"./chunk-PVAIJSAI.js";import{a as p}from"./chunk-WQKDXHGX.js";import{o as K,p as de,q as ve,r as be}from"./chunk-3FP37TPE.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var Ye=["shared_commondataserviceforapps","commondataserviceforapps"];function te(e){let n=e.toLowerCase();return Ye.some(t=>n===t||n.endsWith(`/${t}`))}function Re(e){e.length!==0&&Q(`The following connector operations are blocked by your organization's policy and were not generated.
7
+ import{a as ke,b as Be,c as H,d as ee,e as _}from"./chunk-PVGICWWI.js";import{a as Ee,e as xe,g as Pe}from"./chunk-7DFBXNI7.js";import{a as X,b as Z,d as J,e as Te,g as Oe}from"./chunk-WADQ54KB.js";import{B as we,Ga as B,Ha as E,J as Ce,K as Ae,U as le,V as Se,W as Ie,Z as De,aa as $e,ba as Ne,f as ye,u as q}from"./chunk-CBXGTKIE.js";import{b as a}from"./chunk-RBG2H562.js";import"./chunk-PDS5FYC4.js";import"./chunk-HO6LX3K7.js";import{c as Fe}from"./chunk-Y7TZZLPW.js";import{b as D,c as A,d as V}from"./chunk-LGJ3PMWD.js";import{a as W,c as M,d as he,h as j,i as Q}from"./chunk-PVAIJSAI.js";import{a as p}from"./chunk-KZIKF2VH.js";import{o as K,p as de,q as ve,r as be}from"./chunk-MPRAPBI2.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var Ye=["shared_commondataserviceforapps","commondataserviceforapps"];function te(e){let n=e.toLowerCase();return Ye.some(t=>n===t||n.endsWith(`/${t}`))}function Re(e){e.length!==0&&Q(`The following connector operations are blocked by your organization's policy and were not generated.
8
8
  Ask your admin to allow them on 'Microsoft Dataverse' to restore the missing service methods:
9
9
  `+e.map(({operationId:n,methodName:t})=>` \u2022 ${n} (generates ${t}())`).join(`
10
10
  `))}async function Me(e){let{argumentProvider:n,connector:t,apiId:o,connectionIdFlag:c,datasetFlag:m,tableFlag:f,skipCodegen:v,useV1Codegen:h,useSso:$}=e,i=E(),{fileConfig:l,cliFs:S}=i,g=q(),y=n.getAuthenticationProvider(),F=B(),k={appConfigPath:l.appConfigPath,schemaPath:l.schemaPath,codeGenPath:l.codeGenPath},T={vfs:S,authProvider:y,httpClient:n.getHttpClient(),region:g.region,environmentName:g.environmentName,localFilePaths:k,logger:F},x=t.properties.displayName??o,s=c,b=!1;if(!s){let N=await H({argumentProvider:n,apiId:o,connector:t,useSso:$});s=N.connectionId,b=N.autoSelected}let w={autoSelected:b,connectionId:s,connectorLabel:x};await _({apiId:o,connectionId:s});let I=m;if(!I){let N={...T,actionsParams:{apiId:o,connectionId:s}},{value:L}=await ee(()=>$e(N),w);if(!i.interactive)throw W({title:`Available datasets for ${x}`,columns:[{header:"Display Name",maxWidth:40},{header:"Dataset Name"}],rows:L.map(r=>[r.DisplayName||r.Name,r.Name]),emptyMessage:"No datasets found for this connection.",totalLabel:"dataset(s) found"}),new a("Re-run with --dataset <name> or -d <name>.");I=await J({message:"Select a dataset:",options:L.map(r=>({value:r.Name,label:r.DisplayName||r.Name,hint:r.Name})),manualPromptMessage:"Enter dataset name:"})}let O=f;if(!O){let N={...T,actionsParams:{apiId:o,connectionId:s,dataset:I}},{value:L}=await ee(()=>Ne(N),w);if(!i.interactive)throw W({title:`Available tables in dataset '${I}'`,columns:[{header:"Display Name",maxWidth:40},{header:"Table Name"}],rows:L.map(r=>[r.DisplayName||r.Name,r.Name]),emptyMessage:"No tables found in this dataset.",totalLabel:"table(s) found"}),new a("Re-run with --table <name> or -t <name>.");O=await J({message:"Select a table:",options:L.map(r=>({value:r.Name,label:r.DisplayName||r.Name,hint:r.Name})),manualPromptMessage:"Enter table name:"})}let C={...T,actionsParams:{apiId:o,connectionId:s,dataset:I,tableName:O,skipCodegen:v,useV1Codegen:h}},u=await ee(()=>Se(C),w);M(`Data source '${u}' added successfully (table '${O}' from connector '${x}').`),j(`Hint: Run '${"ms"} app dev' to test locally, or '${"ms"} app deploy' to deploy.`)}async function pe(e){let{argumentProvider:n,connector:t,apiId:o,connectionIdFlag:c,skipCodegen:m,useV1Codegen:f,useSso:v,policy:h,dataverseEnvironmentId:$,dataverseTable:i,forceTableBinding:l}=e,S=E(),{fileConfig:g,cliFs:y}=S,F=q(),k=n.getAuthenticationProvider(),T=B(),x=(t.properties.connectionParameterSets?.values?.length??0)>1,s=c;x&&!s&&(s=(await H({argumentProvider:n,apiId:o,connector:t,useSso:v})).connectionId),x&&s&&await _({apiId:o,connectionId:s});let b=h?Ae(h,t.name??o):void 0,w=te(o),I=await Ke({isCommonDataServiceForApps:w,forceTableBinding:!!l,dataverseEnvironmentId:$,dataverseTable:i}),O=u=>({vfs:y,authProvider:k,httpClient:n.getHttpClient(),region:F.region,environmentName:F.environmentName,actionsParams:{apiId:o,connectionId:s,skipCodegen:m,useV1Codegen:f,actionPolicy:b,...u},localFilePaths:{appConfigPath:g.appConfigPath,schemaPath:g.schemaPath,codeGenPath:g.codeGenPath},logger:T}),C;try{C=await le(O(I))}catch(u){throw u instanceof Ce||u instanceof ye?new a(u.message):u}if(C.filteredCount>0&&j(`Skipped ${C.filteredCount} of ${C.totalCount} actions due to your organization's connector policy.`),Re(C.skippedDataverseMethods),M(`Data source '${C.dataSourceName}' added successfully (connector '${t.properties.displayName??o}').`),I?.dataverseTable&&M(`Dataverse table '${I.dataverseTable}' bound successfully.`),w&&S.interactive&&!I&&await Z({message:"Connect this to a specific Dataverse table?",initialValue:!0})){let N=await le(O(await Ve({})));M("Dataverse table binding added successfully."),Re(N.skippedDataverseMethods)}j(`Hint: Run '${"ms"} app dev' to test locally, or '${"ms"} app deploy' to deploy.`)}async function Ke(e){if(!e.isCommonDataServiceForApps)return;let n=E(),t=!!e.dataverseTable;if(!n.interactive)return t?{dataverseEnvironmentId:e.dataverseEnvironmentId,dataverseTable:e.dataverseTable}:void 0;if(!(!t&&!e.forceTableBinding))return Ve({dataverseEnvironmentId:e.dataverseEnvironmentId,dataverseTable:e.dataverseTable})}async function Ve(e){let n=e.dataverseTable??await X({message:"Dataverse table logical name:"});return{dataverseEnvironmentId:e.dataverseEnvironmentId,dataverseTable:n}}function Le(e){return e.properties.capabilities?.some(n=>n.toLowerCase()==="tabular")??!1}import*as We from"node:path";async function qe(e,n){let t=xe(n,"--deployment"),o=Ee(),c=Pe(o,t),m=We.basename(c),f=E(),v=e.isJsonMode(),h=f.interactive&&!v,$=De(o.config).all.filter(d=>d.kind==="table"&&!d.sqlStoredProcedure),i=await Qe({argumentProvider:e,deployment:t,eligibleDataSources:$,interactive:h,isJsonMode:v}),l=$.find(d=>d.name===i);if(!l)throw v||Je($),new a(`Data source '${i}' not found in the base app config. Run '${"ms"} app add data-source' (without --deployment) to add it first.`);let S=await e.getOption(D.Connector.name,!0);if(R(S)&&!tt(S,l))throw new a(`Connector '${S}' does not match data source '${i}', which uses connector '${l.connectorId}'.`);if(!await f.cliFs.exists(c))throw new a(`Deployment '${t}' has no config file ('${m}'). Run '${"ms"} app add config --deployment ${t}' first, then re-run this command.`);let g=await Xe(c,m),y=K(o.config),F=K(g);Ze(y,F,m);let k=Object.entries(y.connectionReferences??{}).find(([,d])=>d.dataSources?.includes(i));if(!k)throw new a(`Data source '${i}' is not associated with a connection reference in the base app config.`);let[T,x]=k,s=R(x.sharedConnectionId),w=ve(y,F).connectionReferences?.[T],I=s?z(w?.sharedConnectionId??void 0):void 0,O=await e.getOption("connectionId",!0),C=await e.getOption("dataset",!0),u=await e.getOption("table",!0);h||je({deployment:t,datasetFlag:C,tableFlag:u,persistsSharedConnection:s,connectionIsBindingInput:s&&R(O)});let N=z(O),r=N??(h?void 0:I),He=N===void 0&&r!==void 0;if(r===void 0){let d=await we(l.connectorId,B());r=(await H({argumentProvider:e,apiId:l.connectorId,connector:d,interactive:h,quiet:v,nonInteractiveReason:v?"json-mode":"cli-mode"})).connectionId}let ne=me(r);h&&(C??=await Ue("Dataset for this deployment (leave blank to keep the current value for this deployment):"),u??=await Ue("Table for this deployment (required when changing the dataset; otherwise leave blank to keep the current value for this deployment):"),je({deployment:t,datasetFlag:C,tableFlag:u,persistsSharedConnection:s,connectionIsBindingInput:s}));let oe=et(w,i),ae=z(C),fe=z(u);if(ae!==void 0&&ae!==oe.dataset&&fe===void 0)throw new a(`Changing the dataset for '${i}' requires --table because table identifiers are dataset-specific.`);let G=ae??oe.dataset,U=fe??oe.tableName;if(!G||!U){let d=[G?void 0:"--dataset",U?void 0:"--table"].filter(ce=>ce!==void 0).join(" and ");throw new a(`The effective binding for '${i}' is missing ${d}. Provide the missing value and re-run the command.`)}let _e=await _({apiId:l.connectorId,connectionId:ne,impact:"The deployment binding was saved, but later calls",defer:!0}),ge=q(),ie=await Ie({vfs:f.cliFs,authProvider:e.getAuthenticationProvider(),httpClient:e.getHttpClient(),region:ge.region,environmentName:ge.environmentName,actionsParams:{apiId:l.connectorId,connectionId:ne,dataset:G,tableName:U,dataSourceName:i},localFilePaths:f.fileConfig,logger:B()});if(ie.drift.length>0)throw new a(`Table '${U}' for deployment '${t}' does not match the base schema for '${i}'.
@@ -20,4 +20,4 @@ ${p.app.add.connector.description}`),e.addExamples(p.app.add.connector.deprecate
20
20
  /*!
21
21
  * Copyright (C) Microsoft Corporation. All rights reserved.
22
22
  */
23
- //# sourceMappingURL=AddConnector-HJCCENAM.js.map
23
+ //# sourceMappingURL=AddConnector-YNHO2HAW.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 i,d as u,h as a,i as s}from"./chunk-PVAIJSAI.js";import{a as o}from"./chunk-WQKDXHGX.js";import"./chunk-3FP37TPE.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function l(n){n.setDescription(o.auth.status.description),n.addExamples(o.auth.status.examples),await n.runVerb();let t=await n.getAccountManager().listCachedAccountsAsync();if(n.isJsonMode()){let e=t.find(c=>c.isActive);u({signedIn:t.length>0,activeAccount:e?{username:e.username,homeAccountId:e.homeAccountId}:null,accounts:t.map(c=>({username:c.username,homeAccountId:c.homeAccountId,isActive:c.isActive}))});return}if(t.length===0){s(`Not signed in. Run \`${"ms"} auth login\` to authenticate.`);return}if(t.length===1){a(`Signed in as ${t[0].username} (account ID: ${t[0].homeAccountId})`);return}let m=t.some(e=>e.isActive);i({title:"Cached accounts",columns:[{header:"Active"},{header:"Username"},{header:"Account ID"}],rows:t.map(e=>[e.isActive?"*":"",e.username,e.homeAccountId])}),m||s(`No active account selected. Run \`${"ms"} auth switch\` to choose one.`)}export{l as authStatusAsync};
7
+ import{a as i,d as u,h as a,i as s}from"./chunk-PVAIJSAI.js";import{a as o}from"./chunk-KZIKF2VH.js";import"./chunk-MPRAPBI2.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function l(n){n.setDescription(o.auth.status.description),n.addExamples(o.auth.status.examples),await n.runVerb();let t=await n.getAccountManager().listCachedAccountsAsync();if(n.isJsonMode()){let e=t.find(c=>c.isActive);u({signedIn:t.length>0,activeAccount:e?{username:e.username,homeAccountId:e.homeAccountId}:null,accounts:t.map(c=>({username:c.username,homeAccountId:c.homeAccountId,isActive:c.isActive}))});return}if(t.length===0){s(`Not signed in. Run \`${"ms"} auth login\` to authenticate.`);return}if(t.length===1){a(`Signed in as ${t[0].username} (account ID: ${t[0].homeAccountId})`);return}let m=t.some(e=>e.isActive);i({title:"Cached accounts",columns:[{header:"Active"},{header:"Username"},{header:"Account ID"}],rows:t.map(e=>[e.isActive?"*":"",e.username,e.homeAccountId])}),m||s(`No active account selected. Run \`${"ms"} auth switch\` to choose one.`)}export{l as authStatusAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=AuthStatus-WCICFN6O.js.map
11
+ //# sourceMappingURL=AuthStatus-S3K6JJG6.js.map
@@ -4,10 +4,10 @@ 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 f}from"./chunk-DD7E4ADI.js";import{Ha as h}from"./chunk-UIW77LMA.js";import{b as l}from"./chunk-RBG2H562.js";import"./chunk-LDP2SHPJ.js";import"./chunk-7PH2NK5K.js";import"./chunk-Y7TZZLPW.js";import{a as u}from"./chunk-DAG6RPOF.js";import{c as p,d as r,i as A}from"./chunk-PVAIJSAI.js";import{a as i}from"./chunk-WQKDXHGX.js";import"./chunk-3FP37TPE.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function b(t){t.setDescription(i.auth.switch.description),t.addExamples(i.auth.switch.examples),t.addOption({flags:{key:u.Account.name},description:i.auth.switch.options.account,optionalInNonInteractive:!0}),await t.runVerb();let n=t.getAccountManager(),s=await t.getOption(u.Account.name,!0),o=t.isJsonMode(),e=await n.listCachedAccountsAsync();if(e.length===0){if(o){r({activeAccount:null});return}A(`No cached accounts. Run \`${"ms"} auth login\` first.`);return}let a=s;if(!a){if(e.length===1){let c=await n.setActiveAccountAsync(e[0].homeAccountId);d(c.username,c.homeAccountId,o);return}if(o||!h().interactive)throw new l(`Multiple accounts are cached. Pass --account <email> to choose one.
7
+ import{c as f}from"./chunk-WADQ54KB.js";import{Ha as h}from"./chunk-CBXGTKIE.js";import{b as l}from"./chunk-RBG2H562.js";import"./chunk-PDS5FYC4.js";import"./chunk-HO6LX3K7.js";import"./chunk-Y7TZZLPW.js";import{a as u}from"./chunk-LGJ3PMWD.js";import{c as p,d as r,i as A}from"./chunk-PVAIJSAI.js";import{a as i}from"./chunk-KZIKF2VH.js";import"./chunk-MPRAPBI2.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function b(t){t.setDescription(i.auth.switch.description),t.addExamples(i.auth.switch.examples),t.addOption({flags:{key:u.Account.name},description:i.auth.switch.options.account,optionalInNonInteractive:!0}),await t.runVerb();let n=t.getAccountManager(),s=await t.getOption(u.Account.name,!0),o=t.isJsonMode(),e=await n.listCachedAccountsAsync();if(e.length===0){if(o){r({activeAccount:null});return}A(`No cached accounts. Run \`${"ms"} auth login\` first.`);return}let a=s;if(!a){if(e.length===1){let c=await n.setActiveAccountAsync(e[0].homeAccountId);d(c.username,c.homeAccountId,o);return}if(o||!h().interactive)throw new l(`Multiple accounts are cached. Pass --account <email> to choose one.
8
8
  `+e.map(c=>` - ${c.username}`).join(`
9
9
  `));a=await f({message:"Choose the active account:",options:e.map(c=>({value:c.homeAccountId,label:c.username,hint:c.isActive?"currently active":void 0}))})}let m=await n.setActiveAccountAsync(a);d(m.username,m.homeAccountId,o)}function d(t,n,s){s?r({activeAccount:{username:t,homeAccountId:n}}):p(`Active account is ${t}.`)}export{b as authSwitchAsync};
10
10
  /*!
11
11
  * Copyright (C) Microsoft Corporation. All rights reserved.
12
12
  */
13
- //# sourceMappingURL=AuthSwitch-5PKHCTM2.js.map
13
+ //# sourceMappingURL=AuthSwitch-RSQ777N2.js.map
package/dist/Bin.js CHANGED
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'node:path';
5
5
  const require = __createRequire(import.meta.url);
6
6
  const __filename = __fileURLToPath(import.meta.url);
7
7
  const __dirname = __pathDirname(__filename);
8
- import{i as a}from"./chunk-TZRZFNLH.js";import"./chunk-7PH2NK5K.js";import"./chunk-Y7TZZLPW.js";import"./chunk-WQKDXHGX.js";import"./chunk-3FP37TPE.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";if(!a(process.argv)){let{boot:o}=await import("./Cli-7EVTIORX.js");await o()}
8
+ import{i as a}from"./chunk-MVRNQN2O.js";import"./chunk-HO6LX3K7.js";import"./chunk-Y7TZZLPW.js";import"./chunk-KZIKF2VH.js";import"./chunk-MPRAPBI2.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";if(!a(process.argv)){let{boot:o}=await import("./Cli-7SHW4PIZ.js");await o()}
9
9
  /*!
10
10
  * Copyright (C) Microsoft Corporation. All rights reserved.
11
11
  */
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __pathDirname(__filename);
7
- import{b as v}from"./chunk-I22E6YZT.js";import"./chunk-OL6CTXQR.js";import{a as $}from"./chunk-PKDXP7CL.js";import"./chunk-HCPTQP7J.js";import"./chunk-X5O77GZS.js";import{d as I,j as R}from"./chunk-SBVJ4SMO.js";import{h as C}from"./chunk-DD7E4ADI.js";import{Ga as N,Ha as B,fa as M}from"./chunk-UIW77LMA.js";import{b as l}from"./chunk-RBG2H562.js";import"./chunk-LDP2SHPJ.js";import"./chunk-7PH2NK5K.js";import"./chunk-Y7TZZLPW.js";import{p as e}from"./chunk-DAG6RPOF.js";import{c as r,d as c,e as A,h as b,i as S}from"./chunk-PVAIJSAI.js";import{a}from"./chunk-WQKDXHGX.js";import{a as h}from"./chunk-3FP37TPE.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function Y(t){if(J(t),await t.runVerb(),!t.getEnvironmentId())throw new l(`\`ms app build-app\` is deprecated and the \`--environment-id\` flag has been removed. The replacement flow is \`ms app create\` (scaffolds the app and writes ${h}) followed by \`ms app deploy\`. To run this deprecated command, invoke it from a directory with a ${h} (created by \`ms app create\`).`);let n=await t.getTenantIdAsync();if(!n)throw new l("Unable to determine tenant ID. Ensure you are logged in.");let m=await C(t),F=await t.getOption(e.NoWait.camelName)===!1,o=await t.getOption("commit",!0),d,g=!1;if(!o){let i=I();if(!i)throw new l("Could not determine the latest commit ID. Use --commit or -c to specify it.");o=i.commitSha,d=i.detached?void 0:i.branch,g=!0}let p=t.isJsonMode();if(g&&!p&&b(d?`Using branch '${d}' at commit ${o}.`:`Detached HEAD at commit ${o}.`),!p){let i=R();i&&S(i)}let y=B().appConfig,u=y?.repoType,W=y?.externalRepoUrl,k=await t.getOption(e.OpenBrowser.camelName,!0)??!1,D=await t.getOption(e.ForceReauth.camelName,!0)??!1;p&&u==="github"&&A({phase:"build-validation"});let w=await $(({isRetry:i})=>M({logger:N(),actionsParams:{appName:m,commitSha:o,...D&&!i&&u==="github"&&{forceReauth:!0}}}),{repoType:u,externalRepoUrl:W,tenantId:n,jsonMode:p,openBrowser:k,verb:"app build"});if(w===null){T(t.isJsonMode(),o);return}if(F){O(t.isJsonMode(),m,o);return}let f=await v({appName:m,commitSha:o,initialWaitMs:w.retryAfterMs??1e3,isJsonMode:t.isJsonMode()});t.isJsonMode()?c(f):(r(`Build status: ${f.status}`),f.status==="Succeeded"&&b(`Run \`ms app dev\` to run your app locally, or \`ms app deploy --commit ${o}\` to make this app live.`))}function J(t){t.setDescription(a.app.build.description),t.addExamples(a.app.build.examples),t.addOptions([{flags:{key:e.AppName.name},env:e.AppName.envVar,description:a.app.build.options.appName,optionalInNonInteractive:!0},{flags:{key:e.CommitSha.name,alias:e.CommitSha.alias},env:e.CommitSha.envVar,description:a.app.build.options.commitSha,optionalInNonInteractive:!0}]),t.addSwitch({flags:{key:e.NoWait.name},description:a.app.build.options.noWait}),t.addSwitch({flags:{key:e.OpenBrowser.name},description:a.app.build.options.openBrowser}),t.addSwitch({flags:{key:e.ForceReauth.name},description:a.app.build.options.forceReauth})}function O(t,s,n){if(t){c({commitSha:n,buildStatusCommand:`ms app build-status --app ${s} --commit ${n}`});return}r(`Build started for commit ${n}. Run \`ms app build-status --app ${s} --commit ${n}\` to check status.`)}function T(t,s){if(t){c({cached:!0,commitSha:s});return}r("Build already up to date for this commit.")}export{Y as buildMaafAppAsync};
7
+ import{b as v}from"./chunk-II367GCP.js";import"./chunk-OL6CTXQR.js";import{a as $}from"./chunk-QKHCRDMM.js";import"./chunk-IMBY742Q.js";import"./chunk-X5O77GZS.js";import{d as I,j as R}from"./chunk-EQHSV77H.js";import{h as C}from"./chunk-WADQ54KB.js";import{Ga as N,Ha as B,ea as M}from"./chunk-CBXGTKIE.js";import{b as l}from"./chunk-RBG2H562.js";import"./chunk-PDS5FYC4.js";import"./chunk-HO6LX3K7.js";import"./chunk-Y7TZZLPW.js";import{p as e}from"./chunk-LGJ3PMWD.js";import{c as r,d as c,e as A,h as b,i as S}from"./chunk-PVAIJSAI.js";import{a}from"./chunk-KZIKF2VH.js";import{a as h}from"./chunk-MPRAPBI2.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function Y(t){if(J(t),await t.runVerb(),!t.getEnvironmentId())throw new l(`\`ms app build-app\` is deprecated and the \`--environment-id\` flag has been removed. The replacement flow is \`ms app create\` (scaffolds the app and writes ${h}) followed by \`ms app deploy\`. To run this deprecated command, invoke it from a directory with a ${h} (created by \`ms app create\`).`);let n=await t.getTenantIdAsync();if(!n)throw new l("Unable to determine tenant ID. Ensure you are logged in.");let m=await C(t),F=await t.getOption(e.NoWait.camelName)===!1,o=await t.getOption("commit",!0),d,g=!1;if(!o){let i=I();if(!i)throw new l("Could not determine the latest commit ID. Use --commit or -c to specify it.");o=i.commitSha,d=i.detached?void 0:i.branch,g=!0}let p=t.isJsonMode();if(g&&!p&&b(d?`Using branch '${d}' at commit ${o}.`:`Detached HEAD at commit ${o}.`),!p){let i=R();i&&S(i)}let y=B().appConfig,u=y?.repoType,W=y?.externalRepoUrl,k=await t.getOption(e.OpenBrowser.camelName,!0)??!1,D=await t.getOption(e.ForceReauth.camelName,!0)??!1;p&&u==="github"&&A({phase:"build-validation"});let w=await $(({isRetry:i})=>M({logger:N(),actionsParams:{appName:m,commitSha:o,...D&&!i&&u==="github"&&{forceReauth:!0}}}),{repoType:u,externalRepoUrl:W,tenantId:n,jsonMode:p,openBrowser:k,verb:"app build"});if(w===null){T(t.isJsonMode(),o);return}if(F){O(t.isJsonMode(),m,o);return}let f=await v({appName:m,commitSha:o,initialWaitMs:w.retryAfterMs??1e3,isJsonMode:t.isJsonMode()});t.isJsonMode()?c(f):(r(`Build status: ${f.status}`),f.status==="Succeeded"&&b(`Run \`ms app dev\` to run your app locally, or \`ms app deploy --commit ${o}\` to make this app live.`))}function J(t){t.setDescription(a.app.build.description),t.addExamples(a.app.build.examples),t.addOptions([{flags:{key:e.AppName.name},env:e.AppName.envVar,description:a.app.build.options.appName,optionalInNonInteractive:!0},{flags:{key:e.CommitSha.name,alias:e.CommitSha.alias},env:e.CommitSha.envVar,description:a.app.build.options.commitSha,optionalInNonInteractive:!0}]),t.addSwitch({flags:{key:e.NoWait.name},description:a.app.build.options.noWait}),t.addSwitch({flags:{key:e.OpenBrowser.name},description:a.app.build.options.openBrowser}),t.addSwitch({flags:{key:e.ForceReauth.name},description:a.app.build.options.forceReauth})}function O(t,s,n){if(t){c({commitSha:n,buildStatusCommand:`ms app build-status --app ${s} --commit ${n}`});return}r(`Build started for commit ${n}. Run \`ms app build-status --app ${s} --commit ${n}\` to check status.`)}function T(t,s){if(t){c({cached:!0,commitSha:s});return}r("Build already up to date for this commit.")}export{Y as buildMaafAppAsync};
8
8
  /*!
9
9
  * Copyright (C) Microsoft Corporation. All rights reserved.
10
10
  */
11
- //# sourceMappingURL=BuildMaafApp-Q74EFM3Q.js.map
11
+ //# sourceMappingURL=BuildMaafApp-MKHYNTJN.js.map