@microsoft/cmr-cli 0.32.3 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Add-FU57YE5G.js → Add-75RSJNM4.js} +2 -2
- package/dist/{AddConfig-CI7KNLIG.js → AddConfig-4SAYYOBQ.js} +2 -2
- package/dist/{AddConnector-WH4IU3ND.js → AddConnector-P4R4NJ5P.js} +2 -2
- package/dist/{AddDeployment-GWFCPAL5.js → AddDeployment-TBA3AAGD.js} +2 -2
- package/dist/{AddDeploymentBinding-RFLI6DKH.js → AddDeploymentBinding-6FZ7Y5JM.js} +2 -2
- package/dist/{AddRayfin-VRCFEOIL.js → AddRayfin-35GBGCWF.js} +2 -2
- package/dist/{Alter-JFFT5JOA.js → Alter-U7WDVOMU.js} +2 -2
- package/dist/{AuthStatus-WCZYGI5G.js → AuthStatus-XA6RGYYZ.js} +2 -2
- package/dist/{AuthSwitch-XJMG7IUR.js → AuthSwitch-2FXB7WFU.js} +2 -2
- package/dist/Bin.js +1 -1
- package/dist/{BuildMaafApp-7AUZHYOQ.js → BuildMaafApp-3EGRD23G.js} +2 -2
- package/dist/{Clear-7B7CDIPV.js → Clear-MZGQZ2XK.js} +2 -2
- package/dist/{Cli-XZ4SJKBZ.js → Cli-6A2HUP7R.js} +3 -3
- package/dist/{CloneMaafApp-7W246RZA.js → CloneMaafApp-YAEYSP23.js} +2 -2
- package/dist/CreateMaafApp-2XYROOHB.js +23 -0
- package/dist/CreateMaafProject-Q7KIVAR2.js +11 -0
- package/dist/{DeleteMaafApp-TFGWGJO3.js → DeleteMaafApp-G3SL3GGP.js} +2 -2
- package/dist/DeployMaafApp-DBJONCUH.js +8 -0
- package/dist/DeployMaafProject-SOMMKVJO.js +11 -0
- package/dist/{DeploymentApprovals-WTXBXCKE.js → DeploymentApprovals-Y67LSQQG.js} +2 -2
- package/dist/{Dev-CIEWFRXR.js → Dev-TXJLPT7K.js} +3 -3
- package/dist/FeatureSettings-LYV6QUZB.js +11 -0
- package/dist/{GenerateCode-UQCHTRGP.js → GenerateCode-Z2OY3SZR.js} +2 -2
- package/dist/{GetMaafBuildStatus-6ZSLIZCH.js → GetMaafBuildStatus-ZR5GCREL.js} +2 -2
- package/dist/{GetMaafProjectDeployStatus-NZEMVQGJ.js → GetMaafProjectDeployStatus-OJ56DPZ6.js} +2 -2
- package/dist/{GetSettings-MVVEXMJC.js → GetSettings-64N4P6L7.js} +2 -2
- package/dist/{InfoMaafApp-7Z6OJCHD.js → InfoMaafApp-FJM7UI5H.js} +2 -2
- package/dist/InfoMaafProject-EU6OQ7DX.js +11 -0
- package/dist/{Init-PBH2IXVK.js → Init-MTONJT7V.js} +2 -2
- package/dist/{ListConnectorActions-UERYZ2C7.js → ListConnectorActions-PJTNNWLH.js} +2 -2
- package/dist/{ListConnectors-2FUTJMHY.js → ListConnectors-JYNVPB3O.js} +2 -2
- package/dist/{ListDeployments-4YWCHVKF.js → ListDeployments-UV6J6WA5.js} +2 -2
- package/dist/ListMaafApps-QPEX7JA4.js +11 -0
- package/dist/{ListMaafProjects-GNUXZSYL.js → ListMaafProjects-RDR2S3HD.js} +2 -2
- package/dist/{ListSchema-QKVHVPHB.js → ListSchema-IR7FTBRR.js} +2 -2
- package/dist/{ListSettings-IIA5OGMP.js → ListSettings-3M7UOOLI.js} +2 -2
- package/dist/{Login-BT6UTPCZ.js → Login-G7TNQISG.js} +2 -2
- package/dist/{Logout-FBJE35Q5.js → Logout-AOOISVWK.js} +2 -2
- package/dist/{MockFetch-LQLQGTNT.js → MockFetch-GKQMNDW3.js} +2 -2
- package/dist/{NodeMsalAuthenticationProvider-5TJFMHR4.js → NodeMsalAuthenticationProvider-6ABSS6QK.js} +2 -2
- package/dist/{Pack-TSFHSTB5.js → Pack-QJZCMVEM.js} +2 -2
- package/dist/{PackProject-T575KJQ4.js → PackProject-Y3Q3KOTC.js} +2 -2
- package/dist/{PlayMaafApp-74TQEAO5.js → PlayMaafApp-MH66OLOV.js} +2 -2
- package/dist/ProjectApprovals-NTFYLH3W.js +13 -0
- package/dist/{ProjectRoleAssignments-AI2FQ2VX.js → ProjectRoleAssignments-7IDK6SGJ.js} +2 -2
- package/dist/{RefreshDataSource-VARFN3IV.js → RefreshDataSource-CISFHQNA.js} +2 -2
- package/dist/{RefreshGitAuth-DC5NAZBJ.js → RefreshGitAuth-NUQ7JNJA.js} +2 -2
- package/dist/{Remove-MCQZVI3K.js → Remove-IYDTKDJE.js} +2 -2
- package/dist/{RemoveDataSource-RRND46QZ.js → RemoveDataSource-T2AG7ZWC.js} +2 -2
- package/dist/{RemoveDeployment-STNFNNZF.js → RemoveDeployment-K3GDRCXJ.js} +2 -2
- package/dist/{ServicePrincipalAuthenticationProvider-7RBHTYYY.js → ServicePrincipalAuthenticationProvider-CEHIAANL.js} +2 -2
- package/dist/{SetSetting-Q7EQNOTI.js → SetSetting-KOWAPJWX.js} +2 -2
- package/dist/{SetSetting-CEH44OT3.js → SetSetting-PD76MA6O.js} +2 -2
- package/dist/{ShareLinkCreate-ZUVHUQLH.js → ShareLinkCreate-VCWVBQ4B.js} +2 -2
- package/dist/{ShareLinkList-IEYU6NZW.js → ShareLinkList-5VG5CG34.js} +2 -2
- package/dist/ShareLinkRevoke-KYUNMTG5.js +11 -0
- package/dist/ShareList-M25UE6LD.js +11 -0
- package/dist/{ShareMaafApp-SFNOOMOD.js → ShareMaafApp-QMEJEXPZ.js} +2 -2
- package/dist/{TelemetrySettings-XCT73DEI.js → TelemetrySettings-FVJUK5MR.js} +2 -2
- package/dist/{UnshareMaafApp-TU7U3LQ3.js → UnshareMaafApp-RIUUYHIL.js} +2 -2
- package/dist/{chunk-Q3ONTUZ7.js → chunk-2UMD5IAQ.js} +2 -2
- package/dist/chunk-36YYCVFC.js +12 -0
- package/dist/chunk-3UIUI5Q2.js +11 -0
- package/dist/{chunk-KKC5ZK4D.js → chunk-4AO24KKT.js} +21 -21
- package/dist/{chunk-TMYOZDLM.js → chunk-4C6DWU2Y.js} +2 -2
- package/dist/{chunk-SIEI2EB5.js → chunk-4JTUAUHI.js} +2 -2
- package/dist/{chunk-UXKJNXTZ.js → chunk-4UHMKZLH.js} +2 -2
- package/dist/{chunk-3E7QQ2BR.js → chunk-4WQT5P2M.js} +2 -2
- package/dist/{chunk-GE3UFHZ5.js → chunk-5BE4TLDK.js} +2 -2
- package/dist/{chunk-XIX2O22O.js → chunk-A57M2UGH.js} +2 -2
- package/dist/chunk-B6REHI77.js +11 -0
- package/dist/{chunk-DKSLWH4O.js → chunk-BREK3DVB.js} +2 -2
- package/dist/{chunk-RFLXPXBN.js → chunk-C7V6WEZM.js} +2 -2
- package/dist/{chunk-DGUO74I3.js → chunk-CER3QPDN.js} +2 -2
- package/dist/{chunk-PEZMQ2A3.js → chunk-CONEIY4I.js} +2 -2
- package/dist/{chunk-UEZV46GZ.js → chunk-DOCWK326.js} +2 -2
- package/dist/{chunk-4XKA5APP.js → chunk-E2O4YZX2.js} +192 -192
- package/dist/{chunk-2LKCCYRF.js → chunk-EFTF4FA7.js} +2 -2
- package/dist/{chunk-6EF722GY.js → chunk-ELHOJBVT.js} +11 -11
- package/dist/{chunk-ADRQC63G.js → chunk-FGB6GFXI.js} +2 -2
- package/dist/chunk-GVLAG66W.js +13 -0
- package/dist/{chunk-PLFDUGBA.js → chunk-HWEMI6JI.js} +2 -2
- package/dist/{chunk-BRRT2E75.js → chunk-IM7SC23O.js} +3 -3
- package/dist/{chunk-KT2SUHGM.js → chunk-JDRULLI3.js} +2 -2
- package/dist/{chunk-EFY2BSWB.js → chunk-JMF444BA.js} +2 -2
- package/dist/{chunk-QLK3ZVWP.js → chunk-JWSX7DVU.js} +2 -2
- package/dist/chunk-MWN7R4VR.js +12 -0
- package/dist/{chunk-HSNRWBA6.js → chunk-O4G2KO7E.js} +2 -2
- package/dist/{chunk-FHE3OXIP.js → chunk-OB6WEE2V.js} +2 -2
- package/dist/{chunk-RDXQ3ZPT.js → chunk-OBATM5M4.js} +2 -2
- package/dist/{chunk-ZB6MB7GZ.js → chunk-OTXBVG3E.js} +2 -2
- package/dist/{chunk-5MHBEEMZ.js → chunk-PBXK6LJO.js} +2 -2
- package/dist/chunk-VAKAW5BD.js +12 -0
- package/dist/{chunk-4U53RYJJ.js → chunk-WS6TGUH7.js} +2 -2
- package/dist/{chunk-WTTK2GTG.js → chunk-WV7KDGLS.js} +2 -2
- package/dist/{chunk-NYPHWF7Q.js → chunk-YMRQPXY7.js} +2 -2
- package/dist/{chunk-WWVAS3DS.js → chunk-YYXAAA2U.js} +2 -2
- package/dist/{chunk-PZIEJEF5.js → chunk-ZREDMBLO.js} +2 -2
- package/package.json +4 -4
- package/dist/CreateMaafApp-6MSPHUU4.js +0 -22
- package/dist/CreateMaafProject-JKMF5TH3.js +0 -11
- package/dist/DeployMaafApp-K2APWFOD.js +0 -8
- package/dist/DeployMaafProject-6WRKGIIW.js +0 -11
- package/dist/FeatureSettings-77LZQSKD.js +0 -11
- package/dist/InfoMaafProject-SQYB736C.js +0 -11
- package/dist/ListMaafApps-ZATO77G3.js +0 -11
- package/dist/ProjectApprovals-5KLYEM7V.js +0 -13
- package/dist/ShareLinkRevoke-22RFGOFJ.js +0 -11
- package/dist/ShareList-6UWIHPBM.js +0 -11
- package/dist/chunk-2LDU3F6O.js +0 -11
- package/dist/chunk-A4PVXTJS.js +0 -13
- package/dist/chunk-BA52TY55.js +0 -12
- package/dist/chunk-HOIFXUTG.js +0 -11
- package/dist/chunk-TXMTKOEJ.js +0 -12
- package/dist/chunk-YRPTITKD.js +0 -12
|
@@ -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 d,c as O,d as m,f as C,h as S}from"./chunk-
|
|
7
|
+
import{b as d,c as O,d as m,f as C,h as S}from"./chunk-FGB6GFXI.js";import{i as c}from"./chunk-5BE4TLDK.js";import{Ab as h,wb as A,y as w,zb as g}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{b as o}from"./chunk-WS6TGUH7.js";import{a as u}from"./chunk-3UIUI5Q2.js";import{G as s,H as p,M as f}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function L(e){D(e),await e.runVerb();let t=await e.getOption(o.Collection.name),i=await e.getOption(o.Property.name,!0),r=await e.getOption(o.Type.name,!0),n=await C(e);if(i===void 0){if(r!==void 0||Object.values(n).some(a=>a!==void 0))throw new w("Property options require --property.");await $(e,t);return}r??=await e.getOption(o.Type.name),await b(e,t,i,r,n)}async function $(e,t){let{schemaPath:i}=await m(async()=>{let n=await d(),a=await g({...n.actionOptions,tableName:t,initialLocale:r()});return await n.commitConfigAsync(),a});if(e.isJsonMode()){p({schemaPath:i,collection:t,created:!0});return}function r(){let n=Intl.DateTimeFormat().resolvedOptions().locale;return/^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(n)?n:"en-US"}s(`Collection '${t}' added to ${i}`),f(`Run "${"ms"} project state add --collection ${t} --property <name> --type <type>" to define a property.`)}async function b(e,t,i,r,n){let a=O(()=>A(r)),{schemaPath:l}=await m(async()=>{let y=await d(),I=await h({...y.actionOptions,...n,tableName:t,columnName:i,type:a});return await y.commitConfigAsync(),I});if(e.isJsonMode()){p({schemaPath:l,collection:t,property:i,type:a,created:!0});return}s(`Property '${i}' (${a}) added to collection '${t}' in ${l}`)}function D(e){let t=u.project.state.add;e.setDescription(t.description),e.addExamples(t.examples),e.addOptions([c({flags:{key:o.Collection.name},message:o.Collection.promptMessage,description:t.options.collection}),{flags:{key:o.Property.name},description:t.options.property,optionalInNonInteractive:!0},c({flags:{key:o.Type.name},message:o.Type.promptMessage,description:t.options.type,optionalInNonInteractive:!0}),...S(t.options)])}export{L as dataAddAsync};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=Add-
|
|
11
|
+
//# sourceMappingURL=Add-75RSJNM4.js.map
|
|
@@ -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 P}from"./chunk-
|
|
7
|
+
import{a as P}from"./chunk-4UHMKZLH.js";import{a as y,b as f,c as W,d as s,e as w,f as B,g}from"./chunk-JWSX7DVU.js";import{A as o,Na as I,Ob as N,y as v}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{f as u}from"./chunk-WS6TGUH7.js";import{a as c}from"./chunk-3UIUI5Q2.js";import{G as m,H as l,O as T,c as C,l as D}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as d from"node:fs";import*as p from"node:fs/promises";import*as F from"node:path";async function oe(e){H(e),await e.runVerb();let t=await e.getOption(u.Target.name),n=y();if(!t?.trim()){await J(e,n);return}let i=w(t),r=g(n,i);await L(n.appRoot,r);let a=await x(e,n,i);if(e.isJsonMode()){l({...a});return}_(a)}async function J(e,t){for(let r of s)await L(t.appRoot,g(t,r));let n=new Map;for(let r of s)r!==f&&n.set(r,await R(e,t,r));let i=[];for(let r of s)i.push(await x(e,t,r,n.get(r)));if(e.isJsonMode()){l({targets:i});return}for(let r of i)_(r)}async function R(e,t,n){let i=await G(e,t.config),r=i.projectId?.trim();if(!r)throw new o(`App '${i.displayName}' is not associated with a managed project, so a target cannot be configured.`);return e.updateEnvironmentId(i.environmentId),P(r,n)}async function x(e,t,n,i){let r=g(t,n);if(n===f){let U=`Target '${n}' is already provisioned.`,h=await M(r);return{target:n,targetCreated:!1,configCreated:h.created,configPath:r,...$(b(U,r,h.error))}}let{projectId:a,deploymentCreated:A}=i??await R(e,t,n),E=await M(r),j=A?`Registered target '${n}' with app '${a}'.`:`Target '${n}' is already registered with app '${a}'.`;return{target:n,projectId:a,targetCreated:A,configCreated:E.created,configPath:r,...$(b(j,r,E.error))}}function _(e){if(e.warning){T(e.warning);return}e.projectId&&m(e.targetCreated?`Registered target '${e.target}' with app '${e.projectId}'.`:`Target '${e.target}' is already registered with app '${e.projectId}'.`),m(`Created target config '${e.configPath}'.`)}function $(e){return e?{warning:e}:{}}var Y=/^default-/i;function O(e,t,n=!1){if(e==null)return;if(typeof e!="string")throw new o(`The base app config field '${t}' must be a string, but is of type ${typeof e}.`);let i=e.trim();if(!i)return;let r=n?i.replace(Y,""):i;if(!D(r))throw new o(`The base app config field '${t}' must be a GUID, but is '${i}'.`);return i}async function G(e,t){let n=O(t.appId,"appId");if(!n)throw new o("The base app config does not contain an appId.");let i=O(t.environmentId,"environmentId",!0),r=await e.getTenantIdAsync();if(!r)throw new v("Unable to determine tenant ID. Ensure you are logged in.");return I({tenantId:r,environmentId:i,logger:N(),actionsParams:{appName:n}})}function S(e){return new o(`${F.basename(e)} already exists. Edit it directly, or delete it and rerun to recreate it.`)}async function L(e,t){if(d.existsSync(t))throw S(t);try{await p.access(e,d.constants.W_OK)}catch(n){throw new o(`App directory '${e}' is not writable.`,{underlyingError:n})}}async function k(e,t){await p.writeFile(e,t,{encoding:"utf8",flag:"wx"})}async function X(e){await k(e,`${JSON.stringify({$schema:C},null,2)}
|
|
8
8
|
`)}async function M(e){try{return await X(e),{created:!0}}catch(t){if(V(t))throw S(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 b(e,t,n){if(n!==void 0)return`${e} The target config '${t}' could not be created. Fix the filesystem error and rerun the command; the existing target will be reused. Reason: ${n}`}function H(e){e.setDescription(c.app.add.config.description),e.addExamples(c.app.add.config.examples),e.addOptions([{flags:{key:u.Target.name},description:c.app.add.config.options.target,optionalInNonInteractive:!0}])}export{f as DEFAULT_DEPLOYMENT_NAME,s as DEFAULT_DEPLOYMENT_NAMES,W as TEST_DEPLOYMENT_NAME,oe as addConfigAsync,B as assertOverlayNameNotReserved,y as resolveBaseConfig,O as validateConfigGuid,w as validateDeploymentName};
|
|
9
9
|
/*!
|
|
10
10
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
11
|
*/
|
|
12
|
-
//# sourceMappingURL=AddConfig-
|
|
12
|
+
//# sourceMappingURL=AddConfig-4SAYYOBQ.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 be,b as Ce,c as Q,d as W,e as X,f as L}from"./chunk-
|
|
7
|
+
import{a as be,b as Ce,c as Q,d as W,e as X,f as L}from"./chunk-DOCWK326.js";import{a as Y,c as K}from"./chunk-EFTF4FA7.js";import{a as pe,b as J,d as V,e as me,f as fe,h as ue,i as ge,k as ve}from"./chunk-5BE4TLDK.js";import{Ba as ce,Ca as de,L as G,Ob as O,Pb as F,Qb as le,aa as se,ba as ie,k as oe,ta as j,ua as re,w as ae,y as u}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{c as C,d as p}from"./chunk-WS6TGUH7.js";import{a as l}from"./chunk-3UIUI5Q2.js";import{E as _,G as P,H as q,M as U,O as te,P as ne}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";var we=["shared_commondataserviceforapps","commondataserviceforapps"];function H(e){let o=e.toLowerCase();return we.some(s=>o===s||o.endsWith(`/${s}`))}function Z(e){e.length!==0&&te(`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:o,methodName:s})=>` \u2022 ${o} (generates ${s}())`).join(`
|
|
10
10
|
`))}async function Ae(e){let{argumentProvider:o,connector:s,apiId:a,connectionIdFlag:v,datasetFlag:A,tableFlags:S=[],skipCodegen:D,useV1Codegen:I,useSso:N}=e,h=F(),{fileConfig:f,cliFs:g}=h,y=G(),x=o.getAuthenticationProvider(),E=O(),R={appConfigPath:f.appConfigPath,schemaPath:f.schemaPath,codeGenPath:f.codeGenPath},T={vfs:g,authProvider:x,httpClient:o.getHttpClient(),region:y.region,environmentName:y.environmentName,localFilePaths:R,logger:E},c=s.properties.displayName??a,d=v,b=!1,$={};if(!d){let t=await Q({argumentProvider:o,apiId:a,connector:s,useSso:N,beforeConnectionTest:async r=>{$.connectionId=r.name,await L({apiId:a,connectionId:r.name,impact:X})}});d=t.connectionId,b=t.autoSelected}let M={autoSelected:b,connectionId:d,connectorLabel:c};d!==$.connectionId&&await L({apiId:a,connectionId:d});let m=A;if(m&&V(m,"Dataset"),!m){let t={...T,actionsParams:{apiId:a,connectionId:d}},{value:r}=await W(()=>ce(t),M);if(!h.interactive)throw _({title:`Available datasets for ${c}`,columns:[{header:"Display Name",maxWidth:40},{header:"Dataset Name"}],rows:r.map(i=>[i.DisplayName||i.Name,i.Name]),emptyMessage:"No datasets found for this connection.",totalLabel:"dataset(s) found"}),new u("Re-run with --dataset <name> or -d <name>.");let k=await ue({message:"Select a dataset:",options:r.map(i=>({value:i.Name,label:i.DisplayName||i.Name,hint:i.Name})),manualPromptMessage:"Enter dataset name:"});m=k.value,k.source==="manual"&&V(m,"Dataset")}let w=S;for(let t of w)V(t,"Table name");if(w.length===0){let t={...T,actionsParams:{apiId:a,connectionId:d,dataset:m}},{value:r}=await W(()=>de(t),M);if(!h.interactive)throw _({title:`Available tables in dataset '${m}'`,columns:[{header:"Display Name",maxWidth:40},{header:"Table Name"}],rows:r.map(i=>[i.DisplayName||i.Name,i.Name]),emptyMessage:"No tables found in this dataset.",totalLabel:"table(s) found"}),new u("Re-run with --table <name> or -t <name>.");let k=await fe({message:"Select one or more tables:",options:r.map(i=>({value:i.Name,label:i.DisplayName||i.Name,hint:i.Name})),manualPromptMessage:"Enter table name:"});for(let i of k)i.source==="manual"&&V(i.value,"Table name");w=k.map(({value:i})=>i)}let B={...T,actionsParams:{apiId:a,connectionId:d,dataset:m,tableNames:w,skipCodegen:D,useV1Codegen:I}},n=await W(()=>re(B),M);if(o.isJsonMode())q({connector:a,dataset:m,succeeded:n.succeeded.map(({tableName:t,dataSourceName:r})=>({table:t,dataSource:r})),failed:n.failed.map(({tableName:t,error:r})=>({table:t,error:r}))});else{if(n.succeeded.length===1){let[t]=n.succeeded;P(`Data source '${t.dataSourceName}' added successfully (table '${t.tableName}' from connector '${c}').`)}else n.succeeded.length>1&&(P(`Added ${n.succeeded.length} data sources from connector '${c}' and dataset '${m}'.`),_({title:"Added tables",columns:[{header:"Table"},{header:"Data Source"}],rows:n.succeeded.map(({tableName:t,dataSourceName:r})=>[t,r]),totalLabel:"table(s) added"}));for(let t of n.failed)ne(`Failed to add table '${t.tableName}': ${t.error}`)}if(n.failed.length>0){let t={failedCount:n.failed.length,succeededCount:n.succeeded.length,failures:n.failed.map(({tableName:r})=>({tableName:r,errorCode:"DataSourceTableAddFailed",errorCategory:"configuration"}))};throw new le(`${n.failed.length} table(s) could not be added; ${n.succeeded.length} succeeded.`,t,{errorCode:"DataSourceTableAddFailed",errorCategory:ae.Configuration,telemetryDetails:{failedCount:n.failed.length,succeededCount:n.succeeded.length,failures:n.failed.map(()=>({errorCode:"DataSourceTableAddFailed",errorCategory:"configuration"}))}})}o.isJsonMode()||U(`Hint: Run '${"ms"} app dev' to test locally, or '${"ms"} app deploy' to deploy.`)}async function ee(e){let{argumentProvider:o,connector:s,apiId:a,connectionIdFlag:v,skipCodegen:A,useV1Codegen:S,useSso:D,policy:I,dataverseEnvironmentId:N,dataverseTable:h,forceTableBinding:f}=e,g=F(),{fileConfig:y,cliFs:x}=g,E=G(),R=o.getAuthenticationProvider(),T=O(),c=o.isJsonMode(),d=(s.properties.connectionParameterSets?.values?.length??0)>1,b=v,$={};d&&!b&&(b=(await Q({argumentProvider:o,apiId:a,connector:s,useSso:D,interactive:c?!1:g.interactive,quiet:c,nonInteractiveReason:c?"json-mode":"cli-mode",beforeConnectionTest:async r=>{$.connectionId=r.name,await L({apiId:a,connectionId:r.name,impact:X})}})).connectionId),d&&b&&b!==$.connectionId&&await L({apiId:a,connectionId:b});let M=I?ie(I,s.name??a):void 0,m=H(a),w=await Ie({isCommonDataServiceForApps:m,isJsonMode:c,forceTableBinding:!!f,dataverseEnvironmentId:N,dataverseTable:h}),B=t=>({vfs:x,authProvider:R,httpClient:o.getHttpClient(),region:E.region,environmentName:E.environmentName,actionsParams:{apiId:a,connectionId:b,skipCodegen:A,useV1Codegen:S,actionPolicy:M,...t},localFilePaths:{appConfigPath:y.appConfigPath,schemaPath:y.schemaPath,codeGenPath:y.codeGenPath},logger:T}),n;try{n=await j(B(w))}catch(t){throw t instanceof se?K(t.message,Y.ConnectorActionsPolicyBlocked,"connector_action_filter"):t instanceof oe?K(t.message,Y.ConnectorHasNoPublicActions,"connector_capability"):t}if(c){Z(n.skippedDataverseMethods),q({connector:a,dataSource:n.dataSourceName,policyFilteredActionCount:n.filteredCount,totalActionCount:n.totalCount});return}if(n.filteredCount>0&&U(`Skipped ${n.filteredCount} of ${n.totalCount} actions due to your organization's connector policy.`),Z(n.skippedDataverseMethods),P(`Data source '${n.dataSourceName}' added successfully (connector '${s.properties.displayName??a}').`),w?.dataverseTable&&P(`Dataverse table '${w.dataverseTable}' bound successfully.`),m&&g.interactive&&!w&&await J({message:"Connect this to a specific Dataverse table?",initialValue:!0})){let r=await j(B(await he({})));P("Dataverse table binding added successfully."),Z(r.skippedDataverseMethods)}U(`Hint: Run '${"ms"} app dev' to test locally, or '${"ms"} app deploy' to deploy.`)}async function Ie(e){if(!e.isCommonDataServiceForApps)return;let o=F(),s=!!e.dataverseTable;if(!o.interactive||e.isJsonMode)return s?{dataverseEnvironmentId:e.dataverseEnvironmentId,dataverseTable:e.dataverseTable}:void 0;if(!(!s&&!e.forceTableBinding))return he({dataverseEnvironmentId:e.dataverseEnvironmentId,dataverseTable:e.dataverseTable})}async function he(e){let o=e.dataverseTable??await pe({message:"Dataverse table logical name:"});return{dataverseEnvironmentId:e.dataverseEnvironmentId,dataverseTable:o}}function ye(e){return e.properties.capabilities?.some(o=>o.toLowerCase()==="tabular")??!1}async function qe(e){Se(e),await e.runVerb(),ve();let o=await e.getOption("connector"),s=await e.getOption("connectionId",!0),a=await e.getOption("dataset",!0),v=De(await e.getOption("table",!0)),A=await e.getOption("as",!0),S=await e.getOption("dataverseEnvironmentId",!0),D=!!await e.getOption("skipCodegen",!0),I=!!await e.getOption("useV1Codegen",!0),N=!!await e.getOption("useSso",!0),h;if(A!==void 0&&A!==""){let c=A.toLowerCase();if(c!=="table"&&c!=="action")throw new u(`Invalid value for --as: '${A}'. Expected 'table' or 'action'.`);h=c}let f=await be(o,O(),{jsonMode:e.isJsonMode()}),{connector:g,policy:y}=await Ce(e,f),x=g.properties.displayName??f,E=ye(g);if(H(f)){if(v.length>1)throw new u("Adding multiple Dataverse tables in one invocation is not supported yet. Re-run once per Dataverse table.");let c=v[0];if(a)throw new u("--dataset is not used with the Common Data Service for Apps connector. Use --table to specify a Dataverse logical name.");let d=h==="table";if((!F().interactive||e.isJsonMode())&&(d||S)&&!c)throw new u("Adding a Dataverse table requires --table <logical-name> for the Common Data Service for Apps connector. --dataverse-environment-id is optional and defaults to the app environment.");await ee({argumentProvider:e,connector:g,apiId:f,connectionIdFlag:s,skipCodegen:D,useV1Codegen:I,useSso:N,policy:y,dataverseEnvironmentId:S,dataverseTable:c,forceTableBinding:d});return}if(S)throw new u("--dataverse-environment-id can only be used with the Common Data Service for Apps connector (--connector shared_commondataserviceforapps or --connector commondataserviceforapps).");let T=await Te({isTabular:E,asFlag:h,connectorLabel:x});if(T==="action"&&(a||v.length>0))throw new u("--dataset and --table cannot be used with --as action. Re-run with --as table, or omit those flags.");T==="table"?await Ae({argumentProvider:e,connector:g,apiId:f,connectionIdFlag:s,datasetFlag:a,tableFlags:v,skipCodegen:D,useV1Codegen:I,useSso:N}):await ee({argumentProvider:e,connector:g,apiId:f,connectionIdFlag:s,skipCodegen:D,useV1Codegen:I,useSso:N,policy:y})}async function Te(e){let{isTabular:o,asFlag:s,connectorLabel:a}=e,v=F();if(!o){if(s==="table")throw new u(`Connector '${a}' does not support tabular data sources. Re-run without --as table, or with --as action.`);return"action"}if(s)return s;if(!v.interactive)throw new u(`Connector '${a}' supports both tables and actions. Specify --as table or --as action.`);return await J({message:`Connector '${a}' supports tables. Add a table? (No \u2192 add actions instead)`,initialValue:!0})?"table":"action"}function Se(e){e.getResolvedCommand()?.path.at(-1)==="connector"?(e.setDescription(`${l.app.add.connector.deprecation}
|
|
@@ -13,4 +13,4 @@ ${l.app.add.connector.description}`),e.addExamples(l.app.add.connector.deprecate
|
|
|
13
13
|
/*!
|
|
14
14
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
15
15
|
*/
|
|
16
|
-
//# sourceMappingURL=AddConnector-
|
|
16
|
+
//# sourceMappingURL=AddConnector-P4R4NJ5P.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 g}from"./chunk-
|
|
7
|
+
import{a as g}from"./chunk-YYXAAA2U.js";import"./chunk-BREK3DVB.js";import{a as j}from"./chunk-4UHMKZLH.js";import{b as l,e as y}from"./chunk-JWSX7DVU.js";import"./chunk-MWN7R4VR.js";import"./chunk-5BE4TLDK.js";import{A as c,Pb as f}from"./chunk-E2O4YZX2.js";import"./chunk-IM7SC23O.js";import"./chunk-B6REHI77.js";import"./chunk-C7V6WEZM.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{h as i}from"./chunk-WS6TGUH7.js";import{a as r}from"./chunk-3UIUI5Q2.js";import{G as d,H as a,M as s}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function O(e){I(e),await e.runVerb();let n=f();if(n.projectConfigError)throw new c(`Unable to read ${n.fileConfig.projectConfigPath}. ${n.projectConfigError.message}`);let A=await e.getOption(i.Name.name),t=y(A,"--name"),p=await g(e);e.updateEnvironmentId(p.environmentId);let o=t===l?{projectId:p.projectId,deploymentCreated:!1}:await j(p.projectId,t),m=`${"ms"} app add config --target ${t}`;if(e.isJsonMode()){a({projectId:o.projectId,deploymentName:t,deploymentCreated:o.deploymentCreated,nextCommand:m});return}d(o.deploymentCreated?`Added deployment '${t}' to project '${o.projectId}'.`:`Deployment '${t}' already exists in project '${o.projectId}'.`),s(`Run '${m}' from an app in this project to create its override configuration.`)}function I(e){e.setDescription(r.project.add.deployment.description),e.addExamples(r.project.add.deployment.examples),e.addOptions([{flags:{key:i.Name.name},description:r.project.add.deployment.options.name}])}export{O as addDeploymentAsync};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=AddDeployment-
|
|
11
|
+
//# sourceMappingURL=AddDeployment-TBA3AAGD.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{f as $e}from"./chunk-
|
|
7
|
+
import{f as $e}from"./chunk-DOCWK326.js";import{a as ve,d as ye,e as Se,g as Ce}from"./chunk-JWSX7DVU.js";import"./chunk-EFTF4FA7.js";import{a as V,d as A,e as be,g as J}from"./chunk-5BE4TLDK.js";import{L as fe,Ob as $,Pb as P,S as ge,T as ue,U as me,_ as pe,l as le,va as he,y as a,ya as we}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{c as p,d as R,e as E}from"./chunk-WS6TGUH7.js";import{a as ie}from"./chunk-3UIUI5Q2.js";import{A as ae,E as oe,G as re,H as se,M as ce,O as de,x as F,y as L,z as ne}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as Ie from"node:path";var Ae=200,xe=/^[A-Za-z0-9_$-]+$/;async function ct(e){let t=ie.app.override.dataSource;if(e.setDescription(t.description),e.addExamples(t.examples),e.consumePositionalArg(E.Name),e.addOptions([{flags:{key:E.Target.name},description:t.options.target},{flags:{key:p.ConnectionId.name,alias:p.ConnectionId.alias},env:p.ConnectionId.envVar,description:t.options.connectionId},{flags:{key:p.Dataset.name,alias:p.Dataset.alias},env:p.Dataset.envVar,description:t.options.dataset},{flags:{key:R.Table.name,alias:R.Table.alias},env:R.Table.envVar,description:t.options.table,parseArg:be,optionalInNonInteractive:!0}]),await e.runVerb(),!c(e.getPositionalArg(0)))throw new a(`Data source name is required. Run '${"ms"} app override data-source <name> --target <target>'.`);let n=await e.getOption(E.Target.name,!0);if(!c(n)){if(!P().interactive||e.isJsonMode())throw new a("--target is required. Specify --target prod or --target test.");n=await J({message:"Select a deployment target:",options:ye.map(o=>({value:o,label:o})),manualPromptMessage:"Enter deployment target:"})}await Be(e,n)}async function Be(e,t){let n=Se(t,"--target"),o=ve(),s=Ce(o,n),f=Ie.basename(s),S=P(),D=e.isJsonMode(),_=S.interactive&&!D,x=we(o.config).all.filter(i=>i.kind==="table"&&!i.sqlStoredProcedure),r=je({argumentProvider:e,target:n,eligibleDataSources:x,isJsonMode:D}),g=x.find(i=>i.name===r);if(!g)throw D||Ne(x),new a(`Data source '${r}' not found in the base app config. Run '${"ms"} app add data-source' to add it first.`);if(!await S.cliFs.exists(s))throw new a(`Target '${n}' has no config file ('${f}'). Run '${"ms"} app add config --target ${n}' first, then re-run this command.`);let U=await qe(s,f),I=F(o.config),H=F(U);ke(I,H,f);let W=Object.entries(I.connectionReferences??{}).find(([,i])=>i.dataSources?.includes(r));if(!W)throw new a(`Data source '${r}' is not associated with a connection reference in the base app config.`);let[G,Oe]=W,N=c(Oe.sharedConnectionId),Te=ne(I,H).connectionReferences?.[G],Fe=await e.getOption("connectionId",!0),d=await e.getOption("dataset",!0),z=He(await e.getOption("table",!0));if(z.length>1)throw new a("--table can be specified only once with --target because one logical data source is being rebound.");let l=z[0];if(d&&A(d,"Dataset"),l!==void 0&&(A(l,"Table name"),!l.trim()))throw new a("Table names cannot be empty.");let X=g.dataverseTable===void 0,C=y(Fe);if(!_){if(C===void 0)throw new a("--connection-id is required. Provide an existing connection ID.");if(X&&!c(d))throw new a("--dataset is required for this data source. Provide a dataset name or site URL.")}let Y,Z=async()=>(Y??=await ge(g.connectorId,$()),Y);if(C===void 0){let i=await Z(),te=(await me(g.connectorId,$())??[]).filter(b=>!N||De(b,i));if(te.length===0)throw new a(`No compatible existing connections were found for '${r}'. Create a connection first, then re-run with --connection-id <id>.`);if(C=y(await J({message:"Select an existing connection:",options:te.map(b=>({value:b.name,label:b.properties.displayName||b.name,hint:b.name})),manualPromptMessage:"Enter existing connection ID:"})),C===void 0)throw new a("--connection-id is required. Provide an existing connection ID.")}let u=Ve(C);Je(u,"connectionId");let B;try{B=await ue(u,g.connectorId,$())}catch(i){throw i instanceof le&&i.status===404?new a(`Connection '${u}' was not found for connector '${g.connectorId}'.`):i}if(!B)throw new a(`Connection '${u}' was not found for connector '${g.connectorId}'.`);if(N&&!De(B,await Z()))throw new a(Me(r,u));if(_){if(X&&!c(d)){if(d=await V({message:"Dataset name or site URL for this target:"}),!c(d))throw new a("--dataset is required for this data source. Provide a dataset name or site URL.");A(d,"Dataset")}l??=await Ge("Table for this target (required when changing the dataset; otherwise leave blank to keep the current value for this target):"),l!==void 0&&A(l,"Table name")}We({target:n,datasetFlag:d,tableFlag:l,persistsSharedConnection:N});let M=Le(Te,r),j=y(d),K=y(l);if(j!==void 0&&j!==M.dataset&&K===void 0)throw new a(`Changing the dataset for '${r}' requires --table because table identifiers are dataset-specific.`);let h=j??M.dataset,m=K??M.tableName;if(!h||!m?.trim()){let i=[h?void 0:"--dataset",m?.trim()?void 0:"--table"].filter(w=>w!==void 0).join(" and ");throw new a(`The effective binding for '${r}' is missing ${i}. Provide the missing value and re-run the command.`)}for(let[i,w]of[["--dataset",d??h],["--table",l??m],["--dataset",h],["--table",m]])if(/[\p{Cc}\p{Cs}]/u.test(w))throw new a(`${i} must not contain control characters or malformed Unicode.`);let Re=await $e({apiId:g.connectorId,connectionId:u,impact:"The target binding was saved, but later calls",defer:!0}),Q=fe(),O=await he({vfs:S.cliFs,authProvider:e.getAuthenticationProvider(),httpClient:e.getHttpClient(),region:Q.region,environmentName:Q.environmentName,actionsParams:{apiId:g.connectorId,connectionId:u,dataset:h,tableName:m,dataSourceName:r},localFilePaths:S.fileConfig,logger:$()});if(O.drift.length>0)throw new a(`Table '${m}' for target '${n}' does not match the base schema for '${r}'.
|
|
8
8
|
${O.drift.map(i=>` - ${i}`).join(`
|
|
9
9
|
`)}`);let Ee=O.baseSchemaMissing?`Schema parity could not be evaluated for '${r}' because its base schema file is missing.`:void 0,q=_e(U),Pe=q.connectionReferences??={},T=Pe[G]??={};if(N?T.sharedConnectionId=u:delete T.sharedConnectionId,c(d)||c(l)){Ue(T,r);let i=T.dataSets??={},w=i[h]??={dataSources:{}};w.dataSources[r]={tableName:O.tableName??m}}let ee=L(I,F(q));if(!ee.valid)throw new a(`The updated target config '${f}' is invalid:
|
|
10
10
|
${ee.errors.join(`
|
|
@@ -15,4 +15,4 @@ ${o.errors.join(`
|
|
|
15
15
|
/*!
|
|
16
16
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
17
17
|
*/
|
|
18
|
-
//# sourceMappingURL=AddDeploymentBinding-
|
|
18
|
+
//# sourceMappingURL=AddDeploymentBinding-6FZ7Y5JM.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 W}from"./chunk-
|
|
7
|
+
import{a as W}from"./chunk-JWSX7DVU.js";import{a as te}from"./chunk-TYRVM4PP.js";import{b as K}from"./chunk-EFTF4FA7.js";import{A as y,B as M,F as Y,Ob as w,ga as L,l as j,y as J,z as N}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{g as p}from"./chunk-WS6TGUH7.js";import{a as E}from"./chunk-3UIUI5Q2.js";import{G as $,H as T,O as h}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import{d as ne}from"./chunk-UT667QSU.js";import{randomBytes as ae}from"node:crypto";import*as m from"node:fs";import*as o from"node:fs/promises";import*as r from"node:path";var R=ne(te(),1);var A="rayfin",X="rayfin",re="rayfin.yml",ie="tsconfig.json",oe="package.json",se="data",ce=".rayfin-scaffold.lock",de="@microsoft/rayfin-client",S="1.37.0-alpha.2148",_="@microsoft/rayfin-core",b=S,le="@types/node",fe="^24.0.0",pe="@microsoft/rayfin-auth-provider-fabric",ue=S;function ye(e,t){return`# Rayfin backend configuration for this Managed App.
|
|
8
8
|
#
|
|
9
9
|
# This file was scaffolded by \`ms app add backend --provider rayfin\`. Its full schema is still
|
|
10
10
|
# being defined with the Rayfin team; this is a minimal, valid starting point (data service
|
|
@@ -35,4 +35,4 @@ services:
|
|
|
35
35
|
/*!
|
|
36
36
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
37
37
|
*/
|
|
38
|
-
//# sourceMappingURL=AddRayfin-
|
|
38
|
+
//# sourceMappingURL=AddRayfin-35GBGCWF.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 h,c as w,d as A,f as C,g as S,h as O}from"./chunk-
|
|
7
|
+
import{a as h,c as w,d as A,f as C,g as S,h as O}from"./chunk-FGB6GFXI.js";import{i as a}from"./chunk-5BE4TLDK.js";import{Bb as g,wb as y,y as u}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{b as n}from"./chunk-WS6TGUH7.js";import{a as s}from"./chunk-3UIUI5Q2.js";import{G as m,H as l,M as d,O as f}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function k(e){N(e),await e.runVerb();let t=await e.getOption(n.Collection.name),o=await e.getOption(n.Property.name),p=await e.getOption(n.Type.name,!0),i=p===void 0?void 0:w(()=>y(p)),r=await C(e);if(!S(r,i))throw new u(`Nothing to change on property '${o}'. Pass --type or at least one validation switch.`);i!==void 0&&!e.isJsonMode()&&f(`Changing the type of '${o}' can leave existing stored values invalid.`);let{schemaPath:c}=await A(async()=>await g({...h(),...r,tableName:t,columnName:o,type:i}));if(e.isJsonMode()){l({schemaPath:c,collection:t,property:o,updated:!0});return}m(`Property '${o}' updated in collection '${t}' in ${c}`),x(r)&&d(s.project.state.alter.hint)}function x(e){return e.index!==void 0||e.ignoreCase!==void 0||e.ignoreAccents!==void 0}function N(e){let t=s.project.state.alter;e.setDescription(t.description),e.addExamples(t.examples),e.addOptions([a({flags:{key:n.Collection.name},message:n.Collection.promptMessage,description:t.options.collection}),a({flags:{key:n.Property.name},message:n.Property.promptMessage,description:t.options.property}),{flags:{key:n.Type.name},description:t.options.type,optionalInNonInteractive:!0},...O(t.options)])}export{k as dataAlterAsync};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=Alter-
|
|
11
|
+
//# sourceMappingURL=Alter-U7WDVOMU.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 o}from"./chunk-
|
|
7
|
+
import{a as o}from"./chunk-3UIUI5Q2.js";import{E as i,H as u,M as a,O as s}from"./chunk-4AO24KKT.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-
|
|
11
|
+
//# sourceMappingURL=AuthStatus-XA6RGYYZ.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-
|
|
7
|
+
import{c as f}from"./chunk-5BE4TLDK.js";import{Pb as h,y as l}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{a as u}from"./chunk-WS6TGUH7.js";import{a as i}from"./chunk-3UIUI5Q2.js";import{G as p,H as r,O as A}from"./chunk-4AO24KKT.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-
|
|
13
|
+
//# sourceMappingURL=AuthSwitch-2FXB7WFU.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{a}from"./chunk-
|
|
8
|
+
import{a}from"./chunk-4WQT5P2M.js";import"./chunk-IM7SC23O.js";import"./chunk-B6REHI77.js";import"./chunk-C7V6WEZM.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import"./chunk-3UIUI5Q2.js";import"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";if(!a(process.argv)){let{boot:o}=await import("./Cli-6A2HUP7R.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 W}from"./chunk-
|
|
7
|
+
import{b as W}from"./chunk-ZREDMBLO.js";import"./chunk-OL6CTXQR.js";import{a as U}from"./chunk-OBATM5M4.js";import"./chunk-2UMD5IAQ.js";import"./chunk-A57M2UGH.js";import{e as k,f as F,m as O}from"./chunk-OTXBVG3E.js";import{l as D}from"./chunk-5BE4TLDK.js";import{Fa as T,Na as x,Ob as v,Pb as j,y as a}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{v as o}from"./chunk-WS6TGUH7.js";import{a as f}from"./chunk-3UIUI5Q2.js";import{G as w,H as b,I as R,M as A,O as E,a as m,q as S}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";import*as u from"node:path";async function st(t){await J(t,!1)}async function rt(t){await J(t,!0)}async function J(t,e){z(t,e),await t.runVerb();let n=await t.getOption("commit",!0),s=j().appConfig,c=s?.repoType,h=n?F(n,c!=="none"):void 0,i=e?await V(t):void 0;if(!(t.getEnvironmentId()??i?.environmentId))throw new a(e?`No environment ID found. Use \`ms project build\` from a directory with a valid ${m}.`:`\`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 ${m}) followed by \`ms app deploy\`. To run this deprecated command, invoke it from a directory with a ${m} (created by \`ms app create\`).`);!t.getEnvironmentId()&&i?.environmentId&&t.updateEnvironmentId(i.environmentId);let N=i?.tenantId??await t.getTenantIdAsync();if(!N)throw new a("Unable to determine tenant ID. Ensure you are logged in.");let y=i?.appName??await D(t),M=await t.getOption(o.NoWait.camelName)===!1,r=h,I,B=!1;if(!r){let p=k();if(!p)throw new a("Could not determine the latest commit ID. Use --commit or -c to specify it.");r=p.commitSha,I=p.detached?void 0:p.branch,B=!0}let g=t.isJsonMode();if(B&&!g&&A(I?`Using branch '${I}' at commit ${r}.`:`Detached HEAD at commit ${r}.`),!g){let p=O();p&&E(p)}let G=s?.externalRepoUrl,H=await t.getOption(o.OpenBrowser.camelName,!0)??!1,L=await t.getOption(o.ForceReauth.camelName,!0)??!1;g&&c==="github"&&R({phase:"build-validation"});let $=await U(({isRetry:p})=>T({logger:v(),actionsParams:{appName:y,commitSha:r,...L&&!p&&c==="github"&&{forceReauth:!0}}}),{repoType:c,externalRepoUrl:G,tenantId:N,jsonMode:g,openBrowser:H,verb:e?"project build":"app build"});if($===null){K(t.isJsonMode(),r);return}if(M){q(t.isJsonMode(),y,r,e);return}let C=await W({appName:y,commitSha:r,initialWaitMs:$.retryAfterMs??1e3,isJsonMode:t.isJsonMode()});t.isJsonMode()?b(C):(w(`Build status: ${C.status}`),!e&&C.status==="Succeeded"&&A(`Run \`ms app dev\` to run your app locally, or \`ms app deploy --commit ${r}\` to make this app live.`))}async function V(t){let e=j(),n=e.appConfig;if(!n)throw new a(`This app is not associated with a project. A valid ${m} is required.`);if(e.projectConfig||e.projectConfigError){let l=e.fileConfig.projectConfigPath;if(!l||u.dirname(u.resolve(l))!==u.dirname(u.resolve(e.fileConfig.appConfigPath)))throw new a(`${S} must be in the same directory as ${m} for \`ms project build\`.`);if(e.projectConfigError)throw new a("This app is not associated with a project.")}let s=d(n.appId);if(!s)throw new a("This app is not associated with a project.");let c=d(e.projectConfig?.projectId)??d(n.projectId),h=d(t.getEnvironmentId())??d(n.environmentId)??d(e.projectConfig?.environmentId),i;if(!c){if(i=await t.getTenantIdAsync(),!i)throw new a("Unable to determine tenant ID. Ensure you are logged in.");let l=await x({tenantId:i,environmentId:h,logger:v(),actionsParams:{appName:s}});c=d(l.projectId),h??=d(l.environmentId)}if(!c)throw new a("This app is not associated with a project.");if(i??=await t.getTenantIdAsync(),!i)throw new a("Unable to determine tenant ID. Ensure you are logged in.");return{appName:s,tenantId:i,environmentId:h}}function d(t){return typeof t=="string"&&t.trim()||void 0}function z(t,e){let n=e?f.project.build:f.app.build;t.setDescription(n.description),t.addExamples(n.examples),t.addOptions([...e?[]:[{flags:{key:o.AppName.name},env:o.AppName.envVar,description:f.app.build.options.appName,optionalInNonInteractive:!0}],{flags:{key:o.CommitSha.name,alias:o.CommitSha.alias},env:o.CommitSha.envVar,description:n.options.commitSha,optionalInNonInteractive:!0}]),t.addSwitch({flags:{key:o.NoWait.name},description:n.options.noWait}),e||(t.addSwitch({flags:{key:o.OpenBrowser.name},description:f.app.build.options.openBrowser}),t.addSwitch({flags:{key:o.ForceReauth.name},description:f.app.build.options.forceReauth}))}function q(t,e,n,s){if(t){b({commitSha:n,buildStatusCommand:s?"ms project build-status":`ms app build-status --app ${e} --commit ${n}`});return}w(s?`Build started for commit ${n}. Run \`ms project build-status\` to check status.`:`Build started for commit ${n}. Run \`ms app build-status --app ${e} --commit ${n}\` to check status.`)}function K(t,e){if(t){b({cached:!0,commitSha:e});return}w("Build already up to date for this commit.")}export{st as buildMaafAppAsync,rt as buildMaafProjectAsync};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=BuildMaafApp-
|
|
11
|
+
//# sourceMappingURL=BuildMaafApp-3EGRD23G.js.map
|
|
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{b as y,l as I}from"./chunk-
|
|
7
|
+
import{b as y,l as I}from"./chunk-5BE4TLDK.js";import{Ob as g,Pb as w,Ta as u,y as p}from"./chunk-E2O4YZX2.js";import"./chunk-OB6WEE2V.js";import"./chunk-OUKOEUZA.js";import{C as i}from"./chunk-WS6TGUH7.js";import{a as m}from"./chunk-3UIUI5Q2.js";import{G as f,H as v,M as a,O as c}from"./chunk-4AO24KKT.js";import"./chunk-Y5AMO72S.js";import"./chunk-UT667QSU.js";async function $(e){b(e),await e.runVerb();let n=e.isJsonMode(),l=await e.getOption("force",!0)===!0;if(!l&&(n||!w().interactive))throw new p("Resetting Preview data for all users requires explicit confirmation. Use --force to acknowledge this Preview-only destructive action in JSON or non-interactive mode. Live data is unchanged.");let h=await I(e),A=e.getEnvironmentId({includeConfig:!1}),d=await e.getTenantIdAsync();if(!d)throw new p("Unable to determine tenant ID. Ensure you are logged in.");let s=new AbortController,r=()=>s.abort();process.once("SIGINT",r),process.once("SIGTERM",r);try{let t=await u({tenantId:d,environmentId:A,logger:g(),actionsParams:{appId:h},signal:s.signal,confirm:l?void 0:async o=>await y({message:`Discard Preview data for app '${o.appId}' in environment '${o.environmentId}'? This affects all users and all item types in Preview state and cannot be undone. Live data is unchanged. Background deletion may continue after the request returns.`,initialValue:!1,signal:s.signal})});if(t===null){c("Preview reset cancelled. No reset request was sent.");return}if(n)v(t);else{let o=`app '${t.appId}' in environment '${t.environmentId}'`;t.isComplete?f(`Preview reset completion confirmed by the service for ${o}.`):a(t.observedEmpty?`Preview emptiness observed for ${o}.`:`Preview reset request succeeded for ${o}. Emptiness was not observed.`),t.wasAlreadyEmpty&&a("Preview state was already empty at the initial observation.")}t.isComplete||c("Background completion is unconfirmed (isComplete: false). Request success and observed emptiness are not purge completion. Do not automatically retry or start Preview, writes, reindexing, or deployment while the reset is unconfirmed. There is no reset status endpoint.")}finally{process.removeListener("SIGINT",r),process.removeListener("SIGTERM",r)}}function b(e){let n=m.project.state.clear;e.setDescription(n.description),e.addExamples(n.examples),e.addSwitch({flags:{key:"force",alias:"f"},description:n.options.force}),e.addOptions([{flags:{key:i.App.name},env:i.App.envVar,description:n.options.app,optionalInNonInteractive:!0},{flags:{key:i.EnvironmentId.name,alias:i.EnvironmentId.alias},env:i.EnvironmentId.envVar,description:n.options.environmentId,optionalInNonInteractive:!0}])}export{$ as clearDataAsync};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=Clear-
|
|
11
|
+
//# sourceMappingURL=Clear-MZGQZ2XK.js.map
|