@microsoft/cmr-cli 0.0.0-stage → 0.32.3
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/LICENSE +21 -0
- package/README.md +172 -2
- package/THIRD-PARTY-NOTICES.txt +9751 -0
- package/dist/Add-FU57YE5G.js +11 -0
- package/dist/AddConfig-CI7KNLIG.js +12 -0
- package/dist/AddConnector-WH4IU3ND.js +16 -0
- package/dist/AddDeployment-GWFCPAL5.js +11 -0
- package/dist/AddDeploymentBinding-RFLI6DKH.js +18 -0
- package/dist/AddRayfin-VRCFEOIL.js +38 -0
- package/dist/Alter-JFFT5JOA.js +11 -0
- package/dist/AuthStatus-WCZYGI5G.js +11 -0
- package/dist/AuthSwitch-XJMG7IUR.js +13 -0
- package/dist/Bin.js +12 -0
- package/dist/BuildMaafApp-7AUZHYOQ.js +11 -0
- package/dist/Clear-7B7CDIPV.js +11 -0
- package/dist/Cli-XZ4SJKBZ.js +47 -0
- package/dist/CloneMaafApp-7W246RZA.js +12 -0
- package/dist/CreateMaafApp-6MSPHUU4.js +22 -0
- package/dist/CreateMaafProject-JKMF5TH3.js +11 -0
- package/dist/DeleteMaafApp-TFGWGJO3.js +11 -0
- package/dist/DeployMaafApp-K2APWFOD.js +8 -0
- package/dist/DeployMaafProject-6WRKGIIW.js +11 -0
- package/dist/DeploymentApprovals-WTXBXCKE.js +11 -0
- package/dist/Dev-CIEWFRXR.js +15 -0
- package/dist/EnvironmentVariableAuthenticationProvider-EBRBQ5I2.js +11 -0
- package/dist/FeatureSettings-77LZQSKD.js +11 -0
- package/dist/GenerateCode-UQCHTRGP.js +13 -0
- package/dist/GetMaafBuildStatus-6ZSLIZCH.js +11 -0
- package/dist/GetMaafProjectDeployStatus-NZEMVQGJ.js +12 -0
- package/dist/GetSettings-MVVEXMJC.js +11 -0
- package/dist/InfoMaafApp-7Z6OJCHD.js +13 -0
- package/dist/InfoMaafProject-SQYB736C.js +11 -0
- package/dist/Init-PBH2IXVK.js +11 -0
- package/dist/ListConnectorActions-UERYZ2C7.js +11 -0
- package/dist/ListConnectors-2FUTJMHY.js +11 -0
- package/dist/ListDeployments-4YWCHVKF.js +11 -0
- package/dist/ListMaafApps-ZATO77G3.js +11 -0
- package/dist/ListMaafProjects-GNUXZSYL.js +11 -0
- package/dist/ListSchema-QKVHVPHB.js +8 -0
- package/dist/ListSettings-IIA5OGMP.js +12 -0
- package/dist/Login-BT6UTPCZ.js +11 -0
- package/dist/Logout-FBJE35Q5.js +11 -0
- package/dist/MockFetch-LQLQGTNT.js +13 -0
- package/dist/NoOpAuthenticationProvider-ZZK2OB27.js +11 -0
- package/dist/NodeMsalAuthenticationProvider-5TJFMHR4.js +17 -0
- package/dist/Pack-TSFHSTB5.js +8 -0
- package/dist/PackProject-T575KJQ4.js +14 -0
- package/dist/PlayMaafApp-74TQEAO5.js +8 -0
- package/dist/ProjectApprovals-5KLYEM7V.js +13 -0
- package/dist/ProjectRoleAssignments-AI2FQ2VX.js +11 -0
- package/dist/RefreshDataSource-VARFN3IV.js +11 -0
- package/dist/RefreshGitAuth-DC5NAZBJ.js +11 -0
- package/dist/Remove-MCQZVI3K.js +11 -0
- package/dist/RemoveDataSource-RRND46QZ.js +14 -0
- package/dist/RemoveDeployment-STNFNNZF.js +11 -0
- package/dist/ServicePrincipalAuthenticationProvider-7RBHTYYY.js +11 -0
- package/dist/SetSetting-CEH44OT3.js +11 -0
- package/dist/SetSetting-Q7EQNOTI.js +11 -0
- package/dist/ShareLinkCreate-ZUVHUQLH.js +11 -0
- package/dist/ShareLinkList-IEYU6NZW.js +11 -0
- package/dist/ShareLinkRevoke-22RFGOFJ.js +11 -0
- package/dist/ShareList-6UWIHPBM.js +11 -0
- package/dist/ShareMaafApp-SFNOOMOD.js +11 -0
- package/dist/TelemetrySettings-XCT73DEI.js +11 -0
- package/dist/UnshareMaafApp-TU7U3LQ3.js +11 -0
- package/dist/acorn-CYBWGE5M.js +23 -0
- package/dist/angular-Q62TJP23.js +11 -0
- package/dist/babel-AOXBHIIS.js +22 -0
- package/dist/chunk-2LDU3F6O.js +11 -0
- package/dist/chunk-2LKCCYRF.js +11 -0
- package/dist/chunk-2VJIWD7V.js +11 -0
- package/dist/chunk-3E7QQ2BR.js +11 -0
- package/dist/chunk-3YRE4IQ3.js +132 -0
- package/dist/chunk-4U53RYJJ.js +11 -0
- package/dist/chunk-4XKA5APP.js +42915 -0
- package/dist/chunk-5MHBEEMZ.js +11 -0
- package/dist/chunk-6EF722GY.js +94 -0
- package/dist/chunk-A4PVXTJS.js +13 -0
- package/dist/chunk-ADRQC63G.js +14 -0
- package/dist/chunk-ATUGCFVC.js +11 -0
- package/dist/chunk-BA52TY55.js +12 -0
- package/dist/chunk-BRRT2E75.js +38 -0
- package/dist/chunk-DGUO74I3.js +15 -0
- package/dist/chunk-DKSLWH4O.js +18 -0
- package/dist/chunk-EFY2BSWB.js +12 -0
- package/dist/chunk-FHE3OXIP.js +11 -0
- package/dist/chunk-GE3UFHZ5.js +54 -0
- package/dist/chunk-HBLO3WDD.js +13 -0
- package/dist/chunk-HOIFXUTG.js +11 -0
- package/dist/chunk-HSNRWBA6.js +11 -0
- package/dist/chunk-KKC5ZK4D.js +77 -0
- package/dist/chunk-KT2SUHGM.js +11 -0
- package/dist/chunk-NYPHWF7Q.js +32 -0
- package/dist/chunk-OL6CTXQR.js +11 -0
- package/dist/chunk-OUKOEUZA.js +12 -0
- package/dist/chunk-PEZMQ2A3.js +11 -0
- package/dist/chunk-PLFDUGBA.js +12 -0
- package/dist/chunk-PZIEJEF5.js +11 -0
- package/dist/chunk-Q3ONTUZ7.js +11 -0
- package/dist/chunk-QLK3ZVWP.js +11 -0
- package/dist/chunk-RDXQ3ZPT.js +11 -0
- package/dist/chunk-RFLXPXBN.js +11 -0
- package/dist/chunk-SIEI2EB5.js +12 -0
- package/dist/chunk-SQI4XLR7.js +11 -0
- package/dist/chunk-TMYOZDLM.js +11 -0
- package/dist/chunk-TXMTKOEJ.js +12 -0
- package/dist/chunk-TYRVM4PP.js +8 -0
- package/dist/chunk-UEZV46GZ.js +44 -0
- package/dist/chunk-UT667QSU.js +8 -0
- package/dist/chunk-UXKJNXTZ.js +11 -0
- package/dist/chunk-WTTK2GTG.js +11 -0
- package/dist/chunk-WV7D7PTW.js +12 -0
- package/dist/chunk-WWVAS3DS.js +11 -0
- package/dist/chunk-XIX2O22O.js +11 -0
- package/dist/chunk-Y5AMO72S.js +10 -0
- package/dist/chunk-YRPTITKD.js +12 -0
- package/dist/chunk-ZB6MB7GZ.js +17 -0
- package/dist/dist-7N5TXK2L.js +45 -0
- package/dist/estree-HPTPQIMZ.js +51 -0
- package/dist/flow-B6JUMONE.js +27 -0
- package/dist/glimmer-36KZ3DJ5.js +44 -0
- package/dist/graphql-E6CIFZFV.js +35 -0
- package/dist/html-BUTTPQE6.js +32 -0
- package/dist/markdown-K2C5OZHT.js +69 -0
- package/dist/meriyah-27UE2OSX.js +12 -0
- package/dist/native/arm64/dpapi.node +0 -0
- package/dist/native/ia32/dpapi.node +0 -0
- package/dist/native/x64/dpapi.node +0 -0
- package/dist/postcss-QUHZLBB7.js +68 -0
- package/dist/rayfin-pack-HOUOLOHQ.js +164 -0
- package/dist/typescript-G2G6TDZF.js +28 -0
- package/dist/yaml-W5P5CGFK.js +166 -0
- package/package.json +62 -4
|
@@ -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{da as k}from"./chunk-4XKA5APP.js";import{A as u,I as x,J as n}from"./chunk-KKC5ZK4D.js";import*as b from"readline";var P=20;async function w(){return new Promise(i=>{b.emitKeypressEvents(process.stdin),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume();let e=(a,t)=>{process.stdin.removeListener("keypress",e),process.stdin.isTTY&&process.stdin.setRawMode(!1),process.stdin.pause(),t.ctrl&&t.name==="c"&&process.exit(0),t.name==="escape"||t.name==="q"?i("exit"):i("continue")};process.stdin.on("keypress",e)})}async function S(i){let e=i.split(/\r?\n/);if(!process.stdout.isTTY){for(let s of e)x(s);return}let a=e.length,t=Math.max(1,Math.ceil(a/P));for(let s=0;s<t;s++){let c=s*P,f=e.slice(c,c+P),r=s===t-1;for(let m of f)x(m);if(r||(n(" Press Enter for more, Esc or q to exit"),await w()==="exit"))break}}async function v(i){let{title:e,metadata:a,columns:t,firstPage:s,fetchNextPage:c,toRow:f,emptyMessage:r,totalLabel:l}=i,m=process.stdout.isTTY??!1,o=s,d=0,p=0;for(;;){d++;let g=o.items.map(f);(g.length>0||!o.nextSkipToken&&p===0)&&(u({title:e,metadata:a,columns:t,rows:g,emptyMessage:r}),p+=g.length,n(` Showing ${p} ${l}`));let{nextSkipToken:T}=o;if(!T)break;if(d>=200)throw new k(`printServerPagedTable: exceeded ${200}-page cap for ${e}; the server is likely returning a $skiptoken cycle.`,200);if(m&&g.length>0&&(n(" Press Enter for more, Esc or q to exit"),await w()==="exit"))break;o=await c(T)}return p}async function M(i){let{title:e,metadata:a,columns:t,rows:s,emptyMessage:c,totalLabel:f,hint:r}=i,l=s.length;if(!process.stdout.isTTY){u({title:e,metadata:a,columns:t,rows:s,emptyMessage:c}),n(` Showing ${l} of ${l} ${f}`),r&&n(` ${r}`);return}let m=Math.max(1,Math.ceil(l/P));for(let o=0;o<m;o++){let d=o*P,p=s.slice(d,d+P),g=o===m-1;if(u({title:e,metadata:a,columns:t,rows:p,emptyMessage:c}),n(` Showing ${d+p.length} of ${l} ${f}`),r&&n(` ${r}`),g||n(" Press Enter for more, Esc or q to exit"),g||await w()==="exit")break}}export{S as a,v as b,M as c};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-KT2SUHGM.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
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 dt,b as le,c as _u,d as Ee,e as pe,f as de,g as me,h as Be,i as ge,j as he,k as ye}from"./chunk-6EF722GY.js";import{a as Ce}from"./chunk-OL6CTXQR.js";import{a as pt}from"./chunk-TYRVM4PP.js";import{Ob as Fe,b as ce,w as K,z as B}from"./chunk-4XKA5APP.js";import{m as fe}from"./chunk-2LDU3F6O.js";import{a as Nu}from"./chunk-FHE3OXIP.js";import{k as Ae}from"./chunk-OUKOEUZA.js";import{a as Ou}from"./chunk-HOIFXUTG.js";import{C as oe,D as se,I as X,K as Fu,a as xu,e as H,l as ee,n as te,o as ne,q as re,r as ie,s as ae,w as De,x as $u}from"./chunk-KKC5ZK4D.js";import{b as tu,d as ku}from"./chunk-UT667QSU.js";var be=tu((wn,Cu)=>{Cu.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Cu.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;Cu.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var Mu=tu((Pn,Se)=>{var Iu=be();Se.exports={isSpaceSeparator(u){return typeof u=="string"&&Iu.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||Iu.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u==="\u200C"||u==="\u200D"||Iu.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}}});var $e=tu((bn,xe)=>{var N=Mu(),Tu,O,J,lu,W,R,x,Vu,ru;xe.exports=function(e,n){Tu=String(e),O="start",J=[],lu=0,W=1,R=0,x=void 0,Vu=void 0,ru=void 0;do x=gt(),wt[O]();while(x.type!=="eof");return typeof n=="function"?ju({"":ru},"",n):ru};function ju(u,e,n){let t=u[e];if(t!=null&&typeof t=="object")if(Array.isArray(t))for(let i=0;i<t.length;i++){let a=String(i),D=ju(t,a,n);D===void 0?delete t[a]:Object.defineProperty(t,a,{value:D,writable:!0,enumerable:!0,configurable:!0})}else for(let i in t){let a=ju(t,i,n);a===void 0?delete t[i]:Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0})}return n.call(u,e,t)}var F,s,nu,V,f;function gt(){for(F="default",s="",nu=!1,V=1;;){f=z();let u=ke[F]();if(u)return u}}function z(){if(Tu[lu])return String.fromCodePoint(Tu.codePointAt(lu))}function r(){let u=z();return u===`
|
|
8
|
+
`?(W++,R=0):u?R+=u.length:R++,u&&(lu+=u.length),u}var ke={default(){switch(f){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
9
|
+
`:case"\r":case"\u2028":case"\u2029":r();return;case"/":r(),F="comment";return;case void 0:return r(),w("eof")}if(N.isSpaceSeparator(f)){r();return}return ke[O]()},comment(){switch(f){case"*":r(),F="multiLineComment";return;case"/":r(),F="singleLineComment";return}throw P(r())},multiLineComment(){switch(f){case"*":r(),F="multiLineCommentAsterisk";return;case void 0:throw P(r())}r()},multiLineCommentAsterisk(){switch(f){case"*":r();return;case"/":r(),F="default";return;case void 0:throw P(r())}r(),F="multiLineComment"},singleLineComment(){switch(f){case`
|
|
10
|
+
`:case"\r":case"\u2028":case"\u2029":r(),F="default";return;case void 0:return r(),w("eof")}r()},value(){switch(f){case"{":case"[":return w("punctuator",r());case"n":return r(),Z("ull"),w("null",null);case"t":return r(),Z("rue"),w("boolean",!0);case"f":return r(),Z("alse"),w("boolean",!1);case"-":case"+":r()==="-"&&(V=-1),F="sign";return;case".":s=r(),F="decimalPointLeading";return;case"0":s=r(),F="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s=r(),F="decimalInteger";return;case"I":return r(),Z("nfinity"),w("numeric",1/0);case"N":return r(),Z("aN"),w("numeric",NaN);case'"':case"'":nu=r()==='"',s="",F="string";return}throw P(r())},identifierNameStartEscape(){if(f!=="u")throw P(r());r();let u=Lu();switch(u){case"$":case"_":break;default:if(!N.isIdStartChar(u))throw ve();break}s+=u,F="identifierName"},identifierName(){switch(f){case"$":case"_":case"\u200C":case"\u200D":s+=r();return;case"\\":r(),F="identifierNameEscape";return}if(N.isIdContinueChar(f)){s+=r();return}return w("identifier",s)},identifierNameEscape(){if(f!=="u")throw P(r());r();let u=Lu();switch(u){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!N.isIdContinueChar(u))throw ve();break}s+=u,F="identifierName"},sign(){switch(f){case".":s=r(),F="decimalPointLeading";return;case"0":s=r(),F="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s=r(),F="decimalInteger";return;case"I":return r(),Z("nfinity"),w("numeric",V*(1/0));case"N":return r(),Z("aN"),w("numeric",NaN)}throw P(r())},zero(){switch(f){case".":s+=r(),F="decimalPoint";return;case"e":case"E":s+=r(),F="decimalExponent";return;case"x":case"X":s+=r(),F="hexadecimal";return}return w("numeric",V*0)},decimalInteger(){switch(f){case".":s+=r(),F="decimalPoint";return;case"e":case"E":s+=r(),F="decimalExponent";return}if(N.isDigit(f)){s+=r();return}return w("numeric",V*Number(s))},decimalPointLeading(){if(N.isDigit(f)){s+=r(),F="decimalFraction";return}throw P(r())},decimalPoint(){switch(f){case"e":case"E":s+=r(),F="decimalExponent";return}if(N.isDigit(f)){s+=r(),F="decimalFraction";return}return w("numeric",V*Number(s))},decimalFraction(){switch(f){case"e":case"E":s+=r(),F="decimalExponent";return}if(N.isDigit(f)){s+=r();return}return w("numeric",V*Number(s))},decimalExponent(){switch(f){case"+":case"-":s+=r(),F="decimalExponentSign";return}if(N.isDigit(f)){s+=r(),F="decimalExponentInteger";return}throw P(r())},decimalExponentSign(){if(N.isDigit(f)){s+=r(),F="decimalExponentInteger";return}throw P(r())},decimalExponentInteger(){if(N.isDigit(f)){s+=r();return}return w("numeric",V*Number(s))},hexadecimal(){if(N.isHexDigit(f)){s+=r(),F="hexadecimalInteger";return}throw P(r())},hexadecimalInteger(){if(N.isHexDigit(f)){s+=r();return}return w("numeric",V*Number(s))},string(){switch(f){case"\\":r(),s+=ht();return;case'"':if(nu)return r(),w("string",s);s+=r();return;case"'":if(!nu)return r(),w("string",s);s+=r();return;case`
|
|
11
|
+
`:case"\r":throw P(r());case"\u2028":case"\u2029":Pt(f);break;case void 0:throw P(r())}s+=r()},start(){switch(f){case"{":case"[":return w("punctuator",r())}F="value"},beforePropertyName(){switch(f){case"$":case"_":s=r(),F="identifierName";return;case"\\":r(),F="identifierNameStartEscape";return;case"}":return w("punctuator",r());case'"':case"'":nu=r()==='"',F="string";return}if(N.isIdStartChar(f)){s+=r(),F="identifierName";return}throw P(r())},afterPropertyName(){if(f===":")return w("punctuator",r());throw P(r())},beforePropertyValue(){F="value"},afterPropertyValue(){switch(f){case",":case"}":return w("punctuator",r())}throw P(r())},beforeArrayValue(){if(f==="]")return w("punctuator",r());F="value"},afterArrayValue(){switch(f){case",":case"]":return w("punctuator",r())}throw P(r())},end(){throw P(r())}};function w(u,e){return{type:u,value:e,line:W,column:R}}function Z(u){for(let e of u){if(z()!==e)throw P(r());r()}}function ht(){switch(z()){case"b":return r(),"\b";case"f":return r(),"\f";case"n":return r(),`
|
|
12
|
+
`;case"r":return r(),"\r";case"t":return r()," ";case"v":return r(),"\v";case"0":if(r(),N.isDigit(z()))throw P(r());return"\0";case"x":return r(),yt();case"u":return r(),Lu();case`
|
|
13
|
+
`:case"\u2028":case"\u2029":return r(),"";case"\r":return r(),z()===`
|
|
14
|
+
`&&r(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw P(r());case void 0:throw P(r())}return r()}function yt(){let u="",e=z();if(!N.isHexDigit(e)||(u+=r(),e=z(),!N.isHexDigit(e)))throw P(r());return u+=r(),String.fromCodePoint(parseInt(u,16))}function Lu(){let u="",e=4;for(;e-- >0;){let n=z();if(!N.isHexDigit(n))throw P(r());u+=r()}return String.fromCodePoint(parseInt(u,16))}var wt={start(){if(x.type==="eof")throw Q();Ru()},beforePropertyName(){switch(x.type){case"identifier":case"string":Vu=x.value,O="afterPropertyName";return;case"punctuator":fu();return;case"eof":throw Q()}},afterPropertyName(){if(x.type==="eof")throw Q();O="beforePropertyValue"},beforePropertyValue(){if(x.type==="eof")throw Q();Ru()},beforeArrayValue(){if(x.type==="eof")throw Q();if(x.type==="punctuator"&&x.value==="]"){fu();return}Ru()},afterPropertyValue(){if(x.type==="eof")throw Q();switch(x.value){case",":O="beforePropertyName";return;case"}":fu()}},afterArrayValue(){if(x.type==="eof")throw Q();switch(x.value){case",":O="beforeArrayValue";return;case"]":fu()}},end(){}};function Ru(){let u;switch(x.type){case"punctuator":switch(x.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=x.value;break}if(ru===void 0)ru=u;else{let e=J[J.length-1];Array.isArray(e)?e.push(u):Object.defineProperty(e,Vu,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")J.push(u),Array.isArray(u)?O="beforeArrayValue":O="beforePropertyName";else{let e=J[J.length-1];e==null?O="end":Array.isArray(e)?O="afterArrayValue":O="afterPropertyValue"}}function fu(){J.pop();let u=J[J.length-1];u==null?O="end":Array.isArray(u)?O="afterArrayValue":O="afterPropertyValue"}function P(u){return Eu(u===void 0?`JSON5: invalid end of input at ${W}:${R}`:`JSON5: invalid character '${Ne(u)}' at ${W}:${R}`)}function Q(){return Eu(`JSON5: invalid end of input at ${W}:${R}`)}function ve(){return R-=5,Eu(`JSON5: invalid identifier character at ${W}:${R}`)}function Pt(u){console.warn(`JSON5: '${Ne(u)}' in strings is not valid ECMAScript; consider escaping`)}function Ne(u){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){let n=u.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return u}function Eu(u){let e=new SyntaxError(u);return e.lineNumber=W,e.columnNumber=R,e}});var _e=tu((Sn,Oe)=>{var Ju=Mu();Oe.exports=function(e,n,t){let i=[],a="",D,c,p="",l;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(t=n.space,l=n.quote,n=n.replacer),typeof n=="function")c=n;else if(Array.isArray(n)){D=[];for(let C of n){let h;typeof C=="string"?h=C:(typeof C=="number"||C instanceof String||C instanceof Number)&&(h=String(C)),h!==void 0&&D.indexOf(h)<0&&D.push(h)}}return t instanceof Number?t=Number(t):t instanceof String&&(t=String(t)),typeof t=="number"?t>0&&(t=Math.min(10,Math.floor(t)),p=" ".substr(0,t)):typeof t=="string"&&(p=t.substr(0,10)),g("",{"":e});function g(C,h){let o=h[C];switch(o!=null&&(typeof o.toJSON5=="function"?o=o.toJSON5(C):typeof o.toJSON=="function"&&(o=o.toJSON(C))),c&&(o=c.call(h,C,o)),o instanceof Number?o=Number(o):o instanceof String?o=String(o):o instanceof Boolean&&(o=o.valueOf()),o){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof o=="string")return S(o,!1);if(typeof o=="number")return String(o);if(typeof o=="object")return Array.isArray(o)?yu(o):M(o)}function S(C){let h={"'":.1,'"':.2},o={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},m="";for(let y=0;y<C.length;y++){let k=C[y];switch(k){case"'":case'"':h[k]++,m+=k;continue;case"\0":if(Ju.isDigit(C[y+1])){m+="\\x00";continue}}if(o[k]){m+=o[k];continue}if(k<" "){let U=k.charCodeAt(0).toString(16);m+="\\x"+("00"+U).substring(U.length);continue}m+=k}let E=l||Object.keys(h).reduce((y,k)=>h[y]<h[k]?y:k);return m=m.replace(new RegExp(E,"g"),o[E]),E+m+E}function M(C){if(i.indexOf(C)>=0)throw TypeError("Converting circular structure to JSON5");i.push(C);let h=a;a=a+p;let o=D||Object.keys(C),m=[];for(let y of o){let k=g(y,C);if(k!==void 0){let U=L(y)+":";p!==""&&(U+=" "),U+=k,m.push(U)}}let E;if(m.length===0)E="{}";else{let y;if(p==="")y=m.join(","),E="{"+y+"}";else{let k=`,
|
|
15
|
+
`+a;y=m.join(k),E=`{
|
|
16
|
+
`+a+y+`,
|
|
17
|
+
`+h+"}"}}return i.pop(),a=h,E}function L(C){if(C.length===0)return S(C,!0);let h=String.fromCodePoint(C.codePointAt(0));if(!Ju.isIdStartChar(h))return S(C,!0);for(let o=h.length;o<C.length;o++)if(!Ju.isIdContinueChar(String.fromCodePoint(C.codePointAt(o))))return S(C,!0);return C}function yu(C){if(i.indexOf(C)>=0)throw TypeError("Converting circular structure to JSON5");i.push(C);let h=a;a=a+p;let o=[];for(let E=0;E<C.length;E++){let y=g(String(E),C);o.push(y!==void 0?y:"null")}let m;if(o.length===0)m="[]";else if(p==="")m="["+o.join(",")+"]";else{let E=`,
|
|
18
|
+
`+a,y=o.join(E);m=`[
|
|
19
|
+
`+a+y+`,
|
|
20
|
+
`+h+"]"}return i.pop(),a=h,m}}});var Me=tu((vn,Ie)=>{var bt=$e(),St=_e(),vt={parse:bt,stringify:St};Ie.exports=vt});import*as d from"node:fs/promises";import*as A from"node:path";var we="0.0",mt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,Pe=H.object({appId:H.string().regex(mt),path:H.string()}).refine(({appId:u,path:e})=>e===`apps/${u}`,{message:"Packed app path must be the portable relative path apps/<appId>.",path:["path"]}),Bt=H.object({cliVersion:H.string(),manifestVersion:H.literal(we),apps:H.array(Pe)});var ct=ku(Me(),1);import*as j from"node:path";var pu={"@microsoft/cmr-apps/data":"@microsoft/cmr-functions/data","@microsoft/managed-apps/data":"@microsoft/cmr-functions/data"},Re="@config/dataSources";async function Te(u){let{projectRoot:e,functions:n}=u;if(n.length===0)return new Map;let t=await import("esbuild").catch(a=>{throw new K(`esbuild is required to pack functions but could not be loaded: ${a.message}`)}),i=await Promise.all(n.map(async a=>{let c=(await t.build({entryPoints:[a.absPath],bundle:!0,write:!1,format:"esm",platform:"neutral",target:"es2022",external:[...Object.values(pu),Re],alias:pu,plugins:[kt(e),Nt(e)],logLevel:"silent"})).outputFiles?.[0];if(!c)throw new K(`Failed to bundle function ${a.relPath}: esbuild produced no output`);return[a.relPath,c.text]}));return new Map(i)}function kt(u){let e=j.resolve(u,"generated/dataSources.ts");return{name:"external-data-sources",setup(n){n.onResolve({filter:/(^|\/)dataSources$/},t=>!t.path.startsWith(".")||j.resolve(j.dirname(t.importer),t.path)+".ts"!==e?null:{path:Re,external:!0})}}}function Nt(u){let e=j.resolve(u,"generated");return{name:"allowlist-imports",setup(n){n.onResolve({filter:/.*/},t=>{if(t.kind==="entry-point")return null;if(t.path.startsWith(".")){let i=j.resolve(j.dirname(t.importer),t.path);return i===e||i.startsWith(e+j.sep)?null:{errors:[{text:`Relative import '${t.path}' is outside the allowed 'generated/' folder`}]}}return pu[t.path]?null:{errors:[{text:`Import '${t.path}' is not on the allowlist. Allowed: relative imports into 'generated/' and ${Object.keys(pu).map(i=>`'${i}'`).join(", ")}.`}]}})}}}var Le=ku(dt(),1);import*as du from"node:fs/promises";import*as je from"node:path";var zu="functions.zip",Ve={archive:"zip",compression:"deflate"};async function Je(u){let e=[];return await ze(u,"",e),e.sort((n,t)=>n.relPath.localeCompare(t.relPath)),e}async function ze(u,e,n){let t=await du.readdir(u,{withFileTypes:!0});for(let i of t){let a=e?`${e}/${i.name}`:i.name,D=je.join(u,i.name);i.isDirectory()?await ze(D,a,n):i.isFile()&&xt(i.name)&&n.push({relPath:a,absPath:D})}}function xt(u){return u.endsWith(".ts")&&!u.endsWith(".d.ts")&&!u.endsWith(".test.ts")&&!u.endsWith(".spec.ts")}async function qe(u){let e;try{e=await du.stat(u)}catch{throw new B(`functions.baseDirectory does not exist: ${u}`)}if(!e.isDirectory())throw new B(`functions.baseDirectory is not a directory: ${u}`)}function Ue(u,e){let n={};for(let t of u){let i=`${e}/${He(t.relPath)}`;n[`/${i}`]={type:"function",path:`${i}.js`}}return n}function He(u){return u.slice(0,-3)}async function Ke(u){let{baseDirName:e,functions:n,bundles:t,manifestContent:i,dataSourcesJson:a}=u;return new Promise((D,c)=>{let p=[],l=(0,Le.default)("zip",{zlib:{level:9}});l.on("data",g=>p.push(g)),l.on("warning",c),l.on("error",c),l.on("end",()=>D(Buffer.concat(p)));for(let g of n){let S=t.get(g.relPath);if(S===void 0){c(new Error(`Missing bundled output for function ${g.relPath}`));return}let M=He(g.relPath);l.append(S,{name:`${e}/${M}.js`})}l.append(i,{name:"manifest.json"}),a!==void 0&&l.append(a,{name:"dataSources.json"}),l.finalize()})}import*as Bu from"node:fs";import*as b from"node:path";var We="packed",Ge="apps",Uu="client",$t="project.manifest.json";function qu(u,e,n=!1){let t=b.relative(u,e);return t.length===0?n:t!==".."&&!t.startsWith(`..${b.sep}`)&&!b.isAbsolute(t)}function Ye(u,e,n=b.join(u,`.${"ms"}`)){if(!e)return b.join(gu(u),We);let t=b.resolve(e),i=b.resolve(n),a=mu(t),D=mu(i);if(!qu(i,t)||!qu(D,a))throw new B(`Packed folder override must be inside ${i}: ${t}`);return t}function gu(u){let e=mu(u),n=mu(b.join(u,`.${"ms"}`));if(!qu(e,n))throw new B(`The .${"ms"} directory must resolve inside the project root: ${u}`);return n}function mu(u){let e=b.resolve(u),n=[];for(;!Ot(e);){let t=b.dirname(e);if(t===e)break;n.unshift(b.basename(e)),e=t}return b.resolve(Bu.realpathSync.native(e),...n)}function Ot(u){try{return Bu.lstatSync(u),!0}catch(e){if(e.code==="ENOENT")return!1;throw e}}function Hu(u,e){return b.join(u,Ge,e)}function Xe(u,e){return b.join(Hu(u,e),Uu)}function Mn(u){return b.posix.join(Ge,u)}function Rn(u){return b.join(u,$t)}function Tn(u,e){return b.join(gu(u),`${We}-staging-${e}`)}function Ze(u,e){if(!u)throw new B(`appId is required in ${e}`);if(!ee(u))throw new B(`appId in ${e} must be a valid GUID`);return u.toLowerCase()}var tt=ku(pt(),1);import*as $ from"node:fs/promises";import*as q from"node:path";var Qe="package-inventory.json",_t=1024*1024,It=10*1024*1024,Mt=1e4,ut=200,Rt=64*1024,Tt=/^(?:@[a-z0-9~][a-z0-9._~-]*\/)?[a-z0-9~][a-z0-9._~-]*$/i,_=class extends Error{constructor(n){super(n);this.reason=n}reason};function Ku(u){return{schemaVersion:1,status:"unavailable",reason:u}}function au(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function nt(u){return typeof u=="string"&&u.length<=214&&Tt.test(u)}async function et(u,e){if(!(await $.stat(u)).isFile())throw new _("invalid-package-manifest");let n=await $.open(u,"r");try{let t=await n.stat();if(!t.isFile())throw new _("invalid-package-manifest");if(t.size>_t)throw new _("package-manifest-too-large");if(e.bytes+=t.size,e.bytes>It)throw new _("manifest-data-too-large");let i=Buffer.alloc(t.size+1),a=0;for(;a<i.length;){let{bytesRead:D}=await n.read(i,a,i.length-a,null);if(D===0)break;a+=D}if(a!==t.size)throw new _("read-failed");try{return JSON.parse(i.subarray(0,a).toString("utf8"))}catch{throw new _("invalid-package-manifest")}}finally{await n.close()}}function jt(u){if(!au(u))throw new _("invalid-production-dependencies");let e=new Map;for(let n of["dependencies","optionalDependencies"]){let t=u[n];if(t!==void 0){if(!au(t))throw new _("invalid-production-dependencies");for(let[i,a]of Object.entries(t)){if(!nt(i)||typeof a!="string")throw new _("invalid-production-dependencies");if(e.set(i,n==="optionalDependencies"),e.size>Mt)throw new _("too-many-packages")}}}return e}async function Lt(u){try{let e=jt(await et(q.join(u,"package.json"),{bytes:0})),n=q.join(u,"node_modules");if(e.size>0)try{if(!(await $.stat(n)).isDirectory())return Ku("invalid-node-modules")}catch(c){return Ku(au(c)&&c.code==="ENOENT"?"missing-node-modules":"read-failed")}let t=new Map,i={bytes:0},a=0;for(let c of[...e.keys()].sort()){let p=e.get(c)===!0,l=q.join(n,c);try{await $.lstat(l)}catch(L){if(!au(L)||L.code!=="ENOENT")throw L;p||a++;continue}let g=await et(q.join(l,"package.json"),i);if(!au(g)||!nt(g.name)||typeof g.version!="string"||g.version.length>256||(0,tt.valid)(g.version)===null)throw new _("invalid-package-manifest");let S=JSON.stringify([g.name,g.version]),M=t.get(S);M?M.optional=M.optional&&p:t.set(S,{name:g.name,version:g.version,optional:p})}let D={schemaVersion:1,status:"available",scope:"directProduction",totalPackageCount:t.size+a,truncated:t.size>ut,unresolvedPackageCount:a,packages:[...t.values()].slice(0,ut)};for(;Buffer.byteLength(JSON.stringify(D)+`
|
|
21
|
+
`)>Rt;)D.packages.pop(),D.truncated=!0;return D}catch(e){return Ku(e instanceof _?e.reason:"read-failed")}}async function rt(u,e){let n=await Lt(u);n.status==="unavailable"&&Fu(`Package inventory is unavailable (${n.reason}).`);let t;try{let i=q.join(u,`.${"ms"}`);await $.mkdir(i,{recursive:!0}),t=await $.mkdtemp(q.join(i,"package-inventory-"));let a=q.join(t,Qe);await $.writeFile(a,JSON.stringify(n)+`
|
|
22
|
+
`),await $.rename(a,q.join(e,Qe))}catch{Fu("Could not write package inventory; packing will continue.")}finally{if(t!==void 0)try{await $.rm(t,{recursive:!0,force:!0})}catch{Fu("Could not remove temporary package inventory outside the packed output.")}}}function Vt(u,e,n){let t=0,i=!1,a=Promise.resolve();return{write(D){if(i)return;let c=e-t;if(c<=0)return;let p=Buffer.from(`${D}
|
|
23
|
+
`,"utf8"),l=p.length<=c?p:p.subarray(0,c);t+=l.length,a=a.then(async()=>{if(!i)try{await d.appendFile(u,l)}catch(g){i=!0,n?.(g)}})},drainAsync:()=>a}}async function Jt(u,e){try{let n=(await d.stat(u)).size;return Math.max(0,e-n)}catch(n){if(typeof n=="object"&&n!==null&&"code"in n&&n.code==="ENOENT")return e;throw n}}function zt(u,e,n){if(!e||!(u instanceof K))return u;let t=Be(me(e),n);return t?new K(u.message,u.exitCode,u.errorData,{errorCode:u.errorCode,errorCategory:u.errorCategory,telemetryDetails:u.telemetryDetails,retryable:u.retryable,outputDetails:{...u.outputDetails,rayfinBuildOutputTail:t}}):u}var qt="manifest.json",Ut="dataSources.json",it="dataSchema.json",at=10*1024*1024,Ht="For tabular data sources (allowedActions under dataSets), use only: get, post, patch, delete.";function Kt(u,e=xu){if(!u.buildPath)throw new B(`buildPath is required in ${e} to pack an app`);if(!u.buildEntryPoint)throw new B(`buildEntryPoint is required in ${e} to pack an app`);if(u.buildType!=="none"&&!u.buildCommand)throw new B(`buildCommand is required in ${e} to pack an app`)}function Wt(u,e=n=>new B(n)){let n=te.safeParse(u);if(n.success)return;let t=n.error.issues.map(D=>`${D.path.length>0?D.path.join("."):"(root)"}: ${D.message}`),a=n.error.issues.some(D=>{let c=D.path.map(String);return c.includes("dataSets")&&c.at(-1)==="allowedActions"})?`
|
|
24
|
+
${Ht}`:"";throw e(`Invalid ${xu} for shared connection policy enforcement:
|
|
25
|
+
${t.join(`
|
|
26
|
+
`)}${a}`)}async function Gt(u,e){let n=e.state!==void 0?"state":e.data!==void 0?"data":"db",t=e[n]?.schemaPath;if(t===void 0)return;let i=`${n}.schemaPath`;if(!t.trim())throw new B(`${i} must not be empty: "${t}"`);if(A.isAbsolute(t))throw new B(`${i} must be relative to the project root: "${t}"`);let a=A.resolve(u,t),D=A.relative(u,a);if(D===".."||D.startsWith(`..${A.sep}`)||A.isAbsolute(D))throw new B(`${i} must not resolve outside the project root: "${t}"`);let c;try{c=await d.stat(a)}catch(l){throw new B(`Unable to access ${i} "${t}": ${l.message}`)}if(!c.isFile())throw new B(`${i} must reference a regular file: "${t}"`);if(c.size>at)throw new B(`${i} "${t}" is ${c.size} bytes, which exceeds the ${at/(1024*1024)} MB limit`);let p;try{p=await d.readFile(a)}catch(l){throw new B(`Unable to read ${i} "${t}": ${l.message}`)}try{JSON.parse(p.toString("utf8"))}catch(l){throw new B(`${i} "${t}" must contain valid JSON: ${l.message}`)}return p}var Dt="prod";function Wu(u,e){return{fileName:e,filePath:A.join(u,e)}}async function ot(u){try{return(await d.stat(u)).isFile()}catch(e){if(typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT")return!1;throw e}}async function Yt(u,e){let n=A.basename(e);if(await ot(A.resolve(e)))return Wu(u,n);for(let t of re)if(t!==n&&await ot(A.join(u,t)))return Wu(u,t);return Wu(u,n)}async function Xt(u){let e;try{e=await d.readFile(u,"utf-8")}catch(n){throw new B(`Failed to read ${A.basename(u)}: ${n.message}`)}try{return JSON.parse(e)}catch(n){throw new B(`${A.basename(u)}: ${n.message}`)}}async function Zt(u,e,n){let i=(await d.readdir(u,{withFileTypes:!0})).filter(D=>D.isFile()&&D.name!==ne).map(D=>({fileName:D.name,stageName:ae(D.name,n.fileName)})).filter(D=>D.stageName!==void 0).sort((D,c)=>D.fileName.localeCompare(c.fileName)),a=[];for(let{fileName:D,stageName:c}of i){let p;try{p=await d.readFile(A.join(u,D),"utf-8")}catch(S){throw new B(`Failed to read stage config: ${D}: ${S.message}`)}let l;try{l=De(p)}catch(S){throw new B(`${D}: ${S.message}`)}let g;try{({config:g}=$u(e,l))}catch(S){throw new B(`${D} contains invalid overrides:
|
|
27
|
+
${S.message}`)}a.push({stageName:c,resolvedConfig:g})}if(!a.some(({stageName:D})=>D===Dt)){let{config:D}=$u(e);a.push({stageName:Dt,resolvedConfig:D})}return a}async function Qt(u={}){let e=Date.now(),n=0,t=0,i=0,a=0,D=0,c=0,p=0,{quiet:l=!1,cleanPackedFolder:g=!0,commandLogFilePath:S,commandLogFileMaxBytes:M,onCommandLogError:L}=u,{appConfig:yu,fileConfig:C}=Fe(),h=u.appConfigPath??C.appConfigPath,o=A.dirname(A.resolve(h)),m=await Yt(o,h),E=A.resolve(m.filePath)===A.resolve(C.appConfigPath)?yu:await Xt(m.filePath);if(!E)throw new B(`${m.fileName} is required to pack an app`);Wt(E);let y=Ze(E.appId,m.fileName);Kt(E,m.fileName);let{buildPath:k,buildEntryPoint:U}=E,At=C.projectConfigPath?A.dirname(A.resolve(C.projectConfigPath)):o,Ft=gu(At),Du=Ye(o,u.packedFolder,Ft),T=Hu(Du,y),wu=Xe(Du,y),Gu=E.state?.enabled??E.data?.enabled??E.db?.enabled,Pu=await Gt(o,E),G=E.functions?.baseDirectory?A.resolve(o,E.functions.baseDirectory):void 0;G!==void 0&&await qe(G);let Ct=await Zt(o,E,m),ft=A.resolve(o,k),uu=l?null:new Ce;try{if(E.buildType!=="none"){let{buildCommand:v}=E;l||X(`Running: ${v}`);let I=Date.now();try{await ge(v,o,{quiet:l,...S?{logFilePath:S}:{},...M!==void 0?{logFileMaxBytes:M}:{},...L?{onLogError:L}:{}})}finally{n=Date.now()-I}}uu?.start("Packing client output...");let bu=Date.now();try{g&&await d.rm(Du,{recursive:!0,force:!0}),await d.mkdir(wu,{recursive:!0}),await d.cp(ft,wu,{recursive:!0}),await d.copyFile(m.filePath,A.join(T,m.fileName)),Pu!==void 0&&await d.writeFile(A.join(T,it),Pu);for(let{stageName:v,resolvedConfig:I}of Ct)await d.writeFile(A.join(T,ie(v,m.fileName)),JSON.stringify(I,null,2))}finally{t=Date.now()-bu}let Yu=Date.now(),Su;try{Su=await tn(o,T,{quiet:l})}catch(v){throw i=Date.now()-Yu,v}Su!==void 0&&(i=Date.now()-Yu);let Xu=Date.now(),vu;if(fe("rayfin")&&await le(o)){uu?.update("Packing Rayfin backend...");let v=l&&S?Vt(S,await Jt(S,M??Number.POSITIVE_INFINITY),L):void 0,I=l&&!S?pe():void 0,Au=l?v?.write??(I?eu=>de(I,Buffer.from(`${eu}
|
|
28
|
+
`,"utf8"),Ee):void 0):X;try{vu=await ye({projectRoot:o,packAppOutputDir:T,cliVersion:Nu.version,env:Ae(await he(o)),...Au?{onDetail:Au}:{}}),await v?.drainAsync()}catch(eu){throw a=Date.now()-Xu,await v?.drainAsync(),zt(eu,I,o)}a=Date.now()-Xu}let Zu=Date.now(),Y;try{Y=G!==void 0?await Je(G):[]}catch(v){throw D=Date.now()-Zu,v}G!==void 0&&(D=Date.now()-Zu);let ou=Y.length>0,su=G!==void 0?A.basename(G):void 0,Qu={"/":{type:"client",path:U}};ou&&su!==void 0&&Object.assign(Qu,Ue(Y,su));let cu;if(E.iconPath){let v=A.join(o,E.iconPath),I=A.extname(v).toLowerCase();if(I!==".png"&&I!==".jpg")throw new B(`iconPath in ${m.fileName} must reference a .png or .jpg file, but got "${A.basename(v)}".`);cu=A.basename(v),await d.copyFile(v,A.join(T,cu))}let lt={cliVersion:Nu.version,manifestVersion:_u,clientDirectory:Uu,hasCustomMiddleTier:ou,...ou?{functionsPackage:{path:zu,...Ve}}:{},...cu?{iconPath:cu}:{},...Pu!==void 0?{dataSchemaPath:it}:{},...Gu!==void 0?{dataEnabled:Gu}:{},...vu?{rayfinPackage:vu,backends:{default:{kind:"rayfin"}}}:{},routes:Qu},ue=JSON.stringify(lt,null,2);if(await d.writeFile(A.join(T,qt),ue),ou&&su!==void 0){uu?.update(`Bundling ${Y.length} function${Y.length===1?"":"s"}...`);let v=Date.now(),I;try{I=await Te({projectRoot:o,functions:Y})}finally{c=Date.now()-v}uu?.update("Writing functions archive...");let Au=Date.now();try{let eu=await Ke({baseDirName:su,functions:Y,bundles:I,manifestContent:ue,dataSourcesJson:Su});await d.writeFile(A.join(T,zu),eu)}finally{p=Date.now()-Au}}await rt(o,T);let Et=st({startedAt:e,clientBuildMs:n,clientCopyMs:t,dataSourcesMs:i,rayfinPackMs:a,functionsDiscoveryMs:D,middletierBuildMs:c,functionsArchiveMs:p});return{success:!0,result:{appId:y,packedFolder:Du,packAppOutputDir:T,packClientOutputDir:wu,timings:Et}}}catch(bu){return{success:!1,appId:y,error:bu,timings:st({startedAt:e,clientBuildMs:n,clientCopyMs:t,dataSourcesMs:i,rayfinPackMs:a,functionsDiscoveryMs:D,middletierBuildMs:c,functionsArchiveMs:p})}}finally{uu?.stop()}}function st({startedAt:u,clientBuildMs:e,clientCopyMs:n,dataSourcesMs:t,rayfinPackMs:i,functionsDiscoveryMs:a,middletierBuildMs:D,functionsArchiveMs:c}){return{clientBuildMs:e,clientCopyMs:n,dataSourcesMs:t,rayfinPackMs:i,functionsDiscoveryMs:a,middletierBuildMs:D,functionsArchiveMs:c,totalMs:Date.now()-u}}async function un(u={}){let e=await Qt(u);if(!e.success)throw e.error;return e.result}var hu=A.join(ce,"dataSources.ts"),en=/export\s+default\s+(\{[\s\S]*\});/;async function tn(u,e,n){let t=A.join(u,hu);try{await d.access(t)}catch{n.quiet||X(`${hu} not found \u2014 dataSources.json will not be included in the pack.`);return}let i=await d.readFile(t,"utf-8"),a=en.exec(i);if(!a?.[1])throw new K(`Could not extract dataSources from ${hu}`);let D;try{D=ct.default.parse(a[1])}catch(p){throw new K(`${hu} has an unexpected format: ${p.message}`)}let c=JSON.stringify(D,null,2);return await d.writeFile(A.join(e,Ut),c),c}function nn(u){return u<1e3?`${Math.round(u)}ms`:`${(u/1e3).toFixed(2)}s`}function rn(u){let e=[["Client build",u.clientBuildMs],["Client copy",u.clientCopyMs]];u.dataSourcesMs>0&&e.push(["Data sources",u.dataSourcesMs]),u.rayfinPackMs>0&&e.push(["Rayfin pack",u.rayfinPackMs]),u.middletierBuildMs>0&&e.push(["Middletier build",u.middletierBuildMs]),u.functionsArchiveMs>0&&e.push(["Functions archive",u.functionsArchiveMs]),e.push(["Total",u.totalMs]);let n=Math.max(...e.map(([t])=>t.length));X(""),X("Timings:");for(let[t,i]of e)X(` ${t.padEnd(n)} ${nn(i)}`)}async function Dr(u){u.setDescription(Ou.app.pack.description),u.addExamples(Ou.app.pack.examples),await u.runVerb();let e=u.isJsonMode(),n=await un({quiet:e});e?se(n):(oe("App successfully packed."),rn(n.timings))}export{we as a,qu as b,Ye as c,Mn as d,Rn as e,Tn as f,Ze as g,Kt as h,Wt as i,Qt as j,un as k,Dr as l};
|
|
29
|
+
/*!
|
|
30
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
31
|
+
*/
|
|
32
|
+
//# sourceMappingURL=chunk-NYPHWF7Q.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 t=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r=class{_timer=null;_frameIndex=0;_label="";_render(){let e=this._label.length>0?` ${this._label}`:"";process.stdout.write(`\r${t[this._frameIndex]}${e}\x1B[K`)}_restoreCursor=()=>{process.stdout.write("\r\x1B[K"),process.stdout.write("\x1B[?25h")};_handleSIGINT=()=>{this._timer!==null&&clearInterval(this._timer),this._restoreCursor(),process.kill(process.pid,"SIGINT")};_handleSIGTERM=()=>{this._timer!==null&&clearInterval(this._timer),this._restoreCursor(),process.kill(process.pid,"SIGTERM")};_handleUncaughtException=e=>{throw this._timer!==null&&clearInterval(this._timer),this._restoreCursor(),e};_handleUnhandledRejection=e=>{throw this._timer!==null&&clearInterval(this._timer),this._restoreCursor(),e};start(e=""){if(this._label=e,this._timer!==null){this._render();return}process.stdout.write("\x1B[?25l"),process.once("exit",this._restoreCursor),process.once("SIGINT",this._handleSIGINT),process.once("SIGTERM",this._handleSIGTERM),process.once("uncaughtException",this._handleUncaughtException),process.once("unhandledRejection",this._handleUnhandledRejection),this._render(),this._timer=setInterval(()=>{this._render(),this._frameIndex=(this._frameIndex+1)%t.length},80)}update(e){this._label=e,this._timer!==null&&this._render()}stop(){this._timer!==null&&(clearInterval(this._timer),this._timer=null,this._frameIndex=0,process.off("exit",this._restoreCursor),process.off("SIGINT",this._handleSIGINT),process.off("SIGTERM",this._handleSIGTERM),process.off("uncaughtException",this._handleUncaughtException),process.off("unhandledRejection",this._handleUnhandledRejection),this._restoreCursor())}};export{r as a};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-OL6CTXQR.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
var c=`${"ms".toUpperCase()}_CLI_`;function u(n){return`${c}${n}`}function T(n){return process.env[u(n)]}var R=new Set(["1","true","yes","on"]),O=new Set(["0","false","no","off"]);function C(n){return!!n&&R.has(n.trim().toLowerCase())}function d(n){return!!n&&O.has(n.trim().toLowerCase())}function g(n){return C(T(n))}function V(n){return process.env[n]}function F(n,e){process.env[u(n)]=e}function H(n,e){process.env[n]=e}function U(n){delete process.env[n]}function Y(){return{...process.env}}var I=["PATH","NODE_ENV","TEMP","TMP","TMPDIR","HOME","USERPROFILE","HOMEDRIVE","HOMEPATH","APPDATA","LOCALAPPDATA","SystemRoot","windir","ProgramFiles","ProgramFiles(x86)","ComSpec","PATHEXT","LANG","LC_ALL","SHELL"];function f(){let n={};for(let e of I){let t=process.env[e];t!==void 0&&(n[e]=t)}return n}var P=/\$\{(\w+)(?::-(?:[^}\\]*(?:\\.[^}\\]*)*))?\}/g,S=/^\s*(?:-\s*)?(?:[^:#'"]*:\s*)?[|>](?:(?:([1-9])[+-]?)|(?:[+-]([1-9])?))?\s*(?:#.*)?$/;function D(n){let e=S.exec(n);if(!e)return null;let t=e[1]??e[2];return{explicitIndent:t!==void 0?Number(t):null}}function L(n,e){let{inSingleQuote:t,inDoubleQuote:o}=e;for(let r=0;r<n.length;r++){let E=n[r];if(t){if(E==="'"){if(n[r+1]==="'"){r++;continue}t=!1}continue}if(o){if(E==="\\"){r++;continue}E==='"'&&(o=!1);continue}if(E==="'"){t=!0;continue}if(E==='"'){o=!0;continue}if(E==="#"&&(r===0||/\s/.test(n[r-1])))return e.inSingleQuote=t,e.inDoubleQuote=o,n.slice(0,r)}return e.inSingleQuote=t,e.inDoubleQuote=o,n}function p(n){let e=n.split(/\r?\n/),t=[],o=!1,r=0,E=null,N={inSingleQuote:!1,inDoubleQuote:!1};for(let i of e){let A=/^\s*/.exec(i),_=A?A[0].length:0,l=i.trim().length===0;if(o){if(l){t.push(i);continue}if(E===null&&(E=_),_>=E&&_>r){t.push(i);continue}o=!1,E=null}let s=l?null:D(i);s&&(o=!0,r=_,E=s.explicitIndent!==null?_+s.explicitIndent:null),t.push(L(i,N))}return t.join(`
|
|
8
|
+
`)}function M(n){let e=new Set,t=p(n);for(let o of t.matchAll(P))e.add(o[1]);return e}var m=["RAYFIN_ENV_FILE"];function x(n){let e=f(),t=c.toLowerCase();for(let o of m){let r=process.env[o];r!==void 0&&(e[o]=r)}for(let o of M(n)){if(o.toLowerCase().startsWith(t))continue;let r=process.env[o];r!==void 0&&(e[o]=r)}return e}export{u as a,T as b,C as c,d,g as e,V as f,F as g,H as h,U as i,Y as j,x as k};
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk-OUKOEUZA.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{b as p}from"./chunk-Q3ONTUZ7.js";import{Pb as f,k as u,u as l,v as s,w as i}from"./chunk-4XKA5APP.js";import{E as a}from"./chunk-KKC5ZK4D.js";function c(t){if(t instanceof Error)return t.message;if(typeof t=="string")return t;if(t==null)return String(t);try{let e=new WeakSet;return JSON.stringify(t,(n,r)=>{if(typeof r=="object"&&r!==null){if(e.has(r))return"[Circular]";e.add(r)}return r})}catch{return String(t)}}function m(t){if(!(t instanceof u))return null;let e="HttpRequestFailed",n=s.Platform,r=!1;return t.status===401?(e="HttpAuthenticationFailed",n=s.User):t.status===403?(e="HttpAuthorizationFailed",n=s.User):t.status===404?(e="HttpResourceNotFound",n=s.User):t.status===408?e="HttpRequestTimedOut":t.status===429?(e="HttpRequestThrottled",r=!0):t.status>=400&&t.status<500?(e="HttpRequestRejected",n=s.User):t.status>=500&&t.status<600&&(e="HttpServiceUnavailable"),new i(t.message,l.GeneralError,void 0,{errorCode:e,errorCategory:n,retryable:r,telemetryDetails:{httpStatus:t.status}})}function C(t){let e=p(t)??m(t)??t;return{error:e,message:c(e),exitCode:e instanceof i?e.exitCode:1}}function h(t){let{error:e,message:n,exitCode:r}=C(t),o=e instanceof i?e.outputDetails:void 0;a({success:!1,exitCode:r,errorMessage:n,...o!==void 0&&{errorData:o}});let d=e instanceof i?{errorCode:e.errorCode,errorCategory:e.errorCategory,exitCode:r,telemetryDetails:e.telemetryDetails,retryable:e.retryable}:{exitCode:r};throw new f(n,e instanceof i?e.errorData:void 0,d,e)}export{C as a,h as b};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-PEZMQ2A3.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b as $,e as E}from"./chunk-QLK3ZVWP.js";import{l as C,m as R}from"./chunk-GE3UFHZ5.js";import{Ma as M,Nb as L,x as p}from"./chunk-4XKA5APP.js";import{m as U}from"./chunk-2LDU3F6O.js";import{x as o}from"./chunk-4U53RYJJ.js";import{a as i}from"./chunk-HOIFXUTG.js";import{C as N,D as A,I as h,K as b}from"./chunk-KKC5ZK4D.js";import S from"open";async function q(e){k(e),await e.runVerb();let n=await C(e),r=await R(e),l=await e.getTenantIdAsync();if(!l)throw new p("Unable to determine tenant ID. Ensure you are logged in.");let m=await e.getOption(o.NoBrowser.camelName,!0)===!1,c=e.isJsonMode(),a=await e.getOption(o.CommitSha.name,!0),d=await e.getOption(o.Branch.name,!0),g=await e.getOption(o.Mode.name,!0),t=await e.getOption(o.Target.name,!0),s=t===void 0?void 0:E(t);if(s&&(g||a||d))throw new p("--target cannot be used with --mode, --commit, or --branch.");let f=T(g);if(!s&&f==="live"&&(a||d))throw new p("--commit and --branch are only valid with --mode preview.");if(a&&d)throw new p("--commit and --branch cannot be used together.");await x({appName:n,environmentId:r,tenantId:l,noBrowser:m,isJson:c,mode:f,commitId:a,branch:d,target:s})}async function x(e){let{appName:n,environmentId:r,tenantId:l,noBrowser:m,isJson:c,mode:a,commitId:d,branch:g,target:t}=e,s=await M({tenantId:l,environmentId:r,logger:L(),actionsParams:{appName:n}}),f=t!==void 0&&t!==$,u=f?s.stages?.find(v=>v.stageName.toLowerCase()===t):void 0;if(f&&!u)throw new p(`Deployment target '${t}' does not exist for app '${n}'. Run 'ms app add config --target ${t}' to create it.`);let I=u?u.commitHash:s.commitHash,y=B(s.appPlayUri,a,d,g,f?t:void 0);if(!y)throw new p(!t&&a==="live"?`No live build is available for app '${n}' yet. Run 'ms app deploy' to deploy one, then re-run 'ms app play'.`:t?`No play URL is available for app '${n}' on target '${t}'.`:`No appPlayUri is available for app '${n}' in environment '${r}'.`);let w=a==="live"&&!I?[`App '${n}' has not been deployed to target '${t??$}'. Run 'ms app deploy${t?` --target ${t}`:""}' to deploy it.`]:[];if(c){A({appName:n,mode:t?"target":a,...t?{target:t}:{},url:y,commitHash:I??null,...w.length>0?{warnings:w}:{}});return}N(`${t?"Target":a==="live"?"Live":"Preview"} URL for '${s.displayName??n}': ${y}`);for(let v of w)b(v);!t&&a==="live"&&b("Live does not auto-update. Run 'ms app deploy' to publish a new version to the live URL."),await O(y,m)}function B(e,n,r,l="main",m){if(!e)return;if(m){let a;try{a=new URL(e)}catch{throw new p("The app play URL returned by the service is not a valid absolute URL.")}return a.pathname=`${a.pathname.replace(/\/$/,"")}/target/${encodeURIComponent(m)}`,a.toString()}if(n==="live")return e;let c=e.replace(/\/$/,"");return r?`${c}/commit/${r}`:`${c}/branch/${encodeURIComponent(l)}`}async function O(e,n){if(!n){h(`Opening browser at ${e}`);try{await S(e,{wait:!1})}catch{h(`Could not open browser automatically. Please navigate to:
|
|
8
|
+
${e}`)}}}function T(e){let n=(e??o.Mode.defaultValue).trim().toLowerCase();if(n!=="live"&&n!=="preview")throw new p(`Invalid --mode value '${e}'. Expected 'live' or 'preview'.`);return n}function k(e){let n=U("alm");e.setDescription(i.app.play.description),e.addExamples(n?i.app.play.examples:i.app.play.examples.filter(r=>!r.includes(" --target "))),e.addSwitch({flags:{key:o.NoBrowser.name},description:i.app.play.options.noBrowser}),e.addOptions([{flags:{key:o.AppName.name},env:o.AppName.envVar,description:i.app.play.options.app,optionalInNonInteractive:!0},{flags:{key:o.Mode.name,alias:o.Mode.alias},env:o.Mode.envVar,description:i.app.play.options.mode,optionalInNonInteractive:!0},...n?[{flags:{key:o.Target.name},description:i.app.play.options.target,optionalInNonInteractive:!0}]:[],{flags:{key:o.CommitSha.name,alias:o.CommitSha.alias},env:o.CommitSha.envVar,description:i.app.play.options.commit,optionalInNonInteractive:!0},{flags:{key:o.Branch.name},description:i.app.play.options.branch,optionalInNonInteractive:!0}])}export{q as a,B as b};
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk-PLFDUGBA.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{Fa as g,Nb as M,Ob as b,w as c}from"./chunk-4XKA5APP.js";import{I as p}from"./chunk-KKC5ZK4D.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-PZIEJEF5.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{A as f,ba as E,ca as g,ga as a,ia as u,k as c,w as o,x as l,y as d,z as p}from"./chunk-4XKA5APP.js";var S=["GitHubMappingMissing","GitHubMappingExpired","GitHubMappingStale"];function h(e){return typeof e=="string"&&S.includes(e)}function v(e){let t=e.code;if(!t)return null;let r=e.message;if(!r||!r.trim())return null;switch(t){case"GitHubMappingMissing":case"GitHubMappingExpired":case"GitHubMappingStale":case"GitHubUserLacksAccess":case"GitHubUserLacksRequiredLevel":case"GitHubAuthSessionExpired":case"GitHubAuthSessionNotFound":case"GitHubAuthDenied":case"GitHubAuthCancelled":return new d(r,n(e),{errorCode:t,telemetryDetails:i(e)});case"GitHubAppNotInstalled":case"GitHubInstallationSuspended":return new p(r,n(e),{errorCode:t,telemetryDetails:i(e)});case"GitHubRateLimited":case"GitHubEvaluationError":case"GitHubUpstreamError":return new f(r,n(e),{errorCode:t,retryable:!0,telemetryDetails:i(e)});case"GitHubRepoArchived":case"GitHubRepoNotEnterprise":case"GitHubRepoNotFound":return new l(r,n(e),{errorCode:t,telemetryDetails:i(e)});case"OperationNotFound":return new o(r,void 0,n(e),{errorCode:t,telemetryDetails:i(e)});default:return null}function n(s){return{...s.httpStatus!==void 0&&{httpStatus:s.httpStatus},...s.details!==void 0&&{details:s.details}}}function i(s){return{...s.httpStatus!==void 0&&{httpStatus:s.httpStatus}}}}function w(e){if(e instanceof o)return null;let t=b(e);return t?v(t):null}function C(e){let t=b(e);if(!t)return null;let r=t.code;return!h(r)||!(e instanceof u||e instanceof a)&&t.httpStatus!==401?null:{code:r,payload:t}}function b(e){if(e instanceof E||e instanceof g)return null;if(e instanceof a)return{code:e.code,message:e.message};if(e instanceof u)return{code:e.code,message:e.message,httpStatus:e.status,details:e.details};if(e instanceof c){let t=m(e.body);return t?{code:t.code,message:t.message??"",httpStatus:e.status,details:t.details}:null}if(e instanceof Error){let t=e.message.match(/\{[\s\S]*\}/);if(!t)return null;let r=m(t[0]);if(!r?.code)return null;let n=e.message.match(/status:\s*(\d+)/i);return{code:r.code,message:r.message??"",httpStatus:n?Number(n[1]):void 0,details:r.details}}return null}function m(e){if(!e)return null;try{let r=JSON.parse(e)?.error;return!r||typeof r!="object"?null:{code:typeof r.code=="string"?r.code:void 0,message:typeof r.message=="string"?r.message:void 0,details:r.details}}catch{return null}}export{v as a,w as b,C as c};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-Q3ONTUZ7.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{Ob as m,x as i,z as p}from"./chunk-4XKA5APP.js";import{q as f,r as g}from"./chunk-KKC5ZK4D.js";import*as a from"node:fs";import*as n from"node:path";function y(){let{fileConfig:o,appConfig:t}=m(),e=n.resolve(o.appConfigPath);if(!a.existsSync(e))throw new i("No Managed app configuration was found. Run this command from an app directory.");let r=t;if(!r)try{r=JSON.parse(a.readFileSync(e,"utf8"))}catch(s){let d=s instanceof Error?s.message:String(s);throw new p(`'${e}' is not a valid app configuration: ${d}`)}if(r===null||typeof r!="object"||Array.isArray(r))throw new p(`'${e}' is not a valid app configuration: the file must contain a JSON object.`);return{appRoot:n.dirname(e),fileName:n.basename(e),filePath:e,config:r}}var c="prod",l="test",w=[c,l];function C(o,t="--target"){let e=o?.trim();if(!e)throw new i(`${t} is required.`);if(e!==c&&e!==l)throw new i(`'${e}' is not a valid target name. Supported target names are 'prod' and 'test'.`);return e}function u(o,t){if(f.includes(t))throw new i(`'${o}' is a reserved target name because its config file would be named '${t}', which is a base app config filename. Choose a different target name.`)}function A(o,t){let e=g(t,o.fileName);return u(t,e),n.join(o.appRoot,e)}export{y as a,c as b,l as c,w as d,C as e,u as f,A as g};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-QLK3ZVWP.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 x,b as l,c as v}from"./chunk-Q3ONTUZ7.js";import{a as R,b as E}from"./chunk-XIX2O22O.js";import{Jb as H,Kb as G,Nb as j,d as D,ga as h,y as g}from"./chunk-4XKA5APP.js";import{I as b}from"./chunk-KKC5ZK4D.js";async function T(r){let{remoteUrl:p,tenantId:m,jsonMode:t,openBrowser:s,verb:f}=r,{host:n,owner:u,repo:i}=D(p),o=u&&i?H(u,i):"",c=j(),e=I(f);c.trackActivityEvent(e,{repoHost:n,repoHash:o}),t||b("GitHub authentication is required for this action.");let y=A({isJson:t,openBrowser:s}),a=new AbortController,d=()=>{a.abort()};process.once("SIGINT",d);try{await G({remoteUrl:p,tenantId:m,logger:c,display:y,skipBrowser:!1,signal:a.signal})}catch(w){throw c.trackActivityEvent(`${e}.Failed`,{repoHost:n,repoHash:o}),l(w)??w}finally{process.removeListener("SIGINT",d)}c.trackActivityEvent(`${e}.Complete`,{repoHost:n,repoHash:o}),t||b(M(f))}function M(r){switch(r){case"app create":return"Resuming create...";case"app init":return"Resuming init...";case"app build":case"project build":return"Resuming build...";case"app deploy":case"project deploy":return"Resuming deploy...";case"project create":return"Resuming project create..."}}function A(r){return r.isJson?new E:r.openBrowser?R:{...R,openVerificationUri:void 0}}function I(r){switch(r){case"app create":return"Maaf.Create.GitHubDcfRecovery";case"app init":return"Maaf.Init.GitHubDcfRecovery";case"app build":case"project build":return"Maaf.Build.GitHubDcfRecovery";case"app deploy":case"project deploy":return"Maaf.Deploy.GitHubDcfRecovery";case"project create":return"Maaf.ProjectCreate.GitHubDcfRecovery"}}async function F(r,p,m=T){let{repoType:t,externalRepoUrl:s,tenantId:f,jsonMode:n,openBrowser:u,verb:i}=p;try{return await r({isRetry:!1})}catch(o){if(t!=="github")throw o;if(!v(o)){if(o instanceof h)throw o;let e=l(o);throw e||o}if(!s)throw new g(`GitHub authentication is required, but the app config does not record the external repository URL needed to recover the identity mapping. This app may have been created before the URL was persisted to \`ms.config.json\`. Either add \`externalRepoUrl: "<your repo url>"\` to \`ms.config.json\`, or recreate the app with \`ms app create --repo <your repo url>\`, then run \`ms ${i}\` again.`);await m({remoteUrl:s,tenantId:f,jsonMode:n,openBrowser:u,verb:i});try{return await r({isRetry:!0})}catch(e){if(e instanceof h)throw e;let y=v(e);if(y)throw x(y.payload)??e;let a=l(e);throw a||e}}}export{F as a};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-RDXQ3ZPT.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{c as r,m as i}from"./chunk-FHE3OXIP.js";import{K as o}from"./chunk-KKC5ZK4D.js";import*as e from"fs";import*as u from"path";function s(){return u.join(r,i)}function g(){o(`The CLI's settings file is at ${s()}.`)}function f(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function a(){let t=s();if(!e.existsSync(t))return;let n=JSON.parse(e.readFileSync(t,"utf-8"));if(!f(n))throw new Error(`${i} must contain a JSON object.`);return n}function S(t){return{errorName:t instanceof Error?t.name:typeof t,errorCode:t?.code}}function d(t){let n=t(a()??{});return e.mkdirSync(r,{recursive:!0}),e.writeFileSync(s(),JSON.stringify(n,null,2),"utf-8"),n}export{s as a,g as b,f as c,a as d,S as e,d as f};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-RFLXPXBN.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as p,d}from"./chunk-ADRQC63G.js";import{Fb as m}from"./chunk-4XKA5APP.js";import{a as s}from"./chunk-HOIFXUTG.js";import{A as o,D as c,I as r,K as a}from"./chunk-KKC5ZK4D.js";var f="*";async function C(e){D(e),await e.runVerb();let t=await d(async()=>await m(p()));if(e.isJsonMode()){c(u(t));return}b(t)}function u(e){let{tables:t,...n}=e;return{...n,collections:t.map(({columns:i,...h})=>({...h,properties:i}))}}function b(e){if(r(`Schema: ${e.schemaPath}`),!e.exists){r("No state schema found. Create the file to start defining collections.");return}if(r(`Locale: ${e.locale}`),e.validationEnabled||a("Write validation is disabled ('x-ms-validation' is false). Declared indexes remain active."),e.tables.length===0){r("No collections defined.");return}let t=!1;for(let n of e.tables)t||=n.columns.some(i=>i.automatic),o({title:n.name,columns:[{header:"Property",maxWidth:32},{header:"Type"},{header:"Required"},{header:"Index"},{header:"Constraints",maxWidth:40}],rows:n.columns.map(i=>[i.automatic?`${i.name}${f}`:i.name,i.type,i.required?"Yes":"No",g(i),x(i)]),emptyMessage:"No properties defined.",totalLabel:"properties"}),n.representable||a(`Collection '${n.name}' also uses schema constructs not shown in the scalar-property view (${n.unrepresentableAt}).`);t&&r(`
|
|
8
|
+
${f} set by the platform on every collection.`),r(s.project.state["list-schema"].hint),r(`Run "${"ms"} project state list-schema --json" for the full definition.`)}function g(e){if(!e.indexed)return"No";let t=[];return e.index?.ignoreCase&&t.push("ignore case"),e.index?.ignoreAccents&&t.push("ignore accents"),t.length===0?"Yes":`Yes (${t.join(", ")})`}function x(e){let t=[];return e.format!==void 0&&t.push(`format=${e.format}`),e.minLength!==void 0&&t.push(`minLength=${e.minLength}`),e.maxLength!==void 0&&t.push(`maxLength=${e.maxLength}`),e.minValue!==void 0&&t.push(`min=${e.minValue}`),e.maxValue!==void 0&&t.push(`max=${e.maxValue}`),e.resourceKind!==void 0&&t.push(`kind=${e.resourceKind}`),t.join(", ")}function D(e){e.setDescription(s.project.state["list-schema"].description),e.addExamples(s.project.state["list-schema"].examples)}export{C as a,u as b};
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk-SIEI2EB5.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
|
+
function t(e){switch(e){case void 0:return;case"Native":return"Platform-managed Git repository";case"ExternallyProvidedBuild":return"Externally provided build (no source)";case"ExternalGitProviderBound":return"External Git provider";default:return e}}function i(e){let n=t(e.repoType),r=e.cloneUrl??void 0;if(!(!n&&!r))return{repoType:n,cloneUrl:r}}export{i as a};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-SQI4XLR7.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 E}from"./chunk-TYRVM4PP.js";import{c as m,d as c}from"./chunk-ZB6MB7GZ.js";import{z as s}from"./chunk-4XKA5APP.js";import{a as p}from"./chunk-FHE3OXIP.js";import{d as w}from"./chunk-UT667QSU.js";var l=w(E(),1);import{execFileSync as G}from"child_process";import{dirname as u,join as a}from"path";function x(){let e=c(["--version"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!e.success){if(e.error.code!=="ENOENT"){let i=m("",{action:"checking the Git version"},e.error);throw i||new s("Git could not be started while checking its version. Check the Git executable and your endpoint security policy, then retry.",{prerequisite:"git"},{errorCode:"GitProcessLaunchFailed",retryable:!1,telemetryDetails:{prerequisite:"git"}})}throw new s("'git' is required but was not found on PATH.",{prerequisite:"git"},{errorCode:"GitNotInstalled",telemetryDetails:{prerequisite:"git"}})}let r=e.stdout,t=p.engines.git;if(!l.default.validRange(t))return;let n=l.default.coerce(r);if(n&&!l.default.satisfies(n,t))throw new s(`Git ${t} is required (found ${n.version}). Please upgrade git.`,{prerequisite:"git",requiredVersion:t,foundVersion:n.version},{errorCode:"GitVersionUnsupported",telemetryDetails:{prerequisite:"git",requiredVersion:t,foundVersion:n.version}})}function B(){let e=b(),r=h("git-credential-manager",e),t=r.success?r:h("git-credential-manager-core",e);if(!t.success){let i=!r.success&&d(r.error),y=d(t.error);if(i&&y)throw new s("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.",{prerequisite:"git-credential-manager"},{errorCode:"GitCredentialManagerNotInstalled",telemetryDetails:{prerequisite:"git-credential-manager"}});let f=[r,t].filter(o=>!o.success).map(o=>o.error).find(o=>o.code!=="ENOENT");throw f?M(f):new s("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.",{prerequisite:"git-credential-manager"},{errorCode:"GitCredentialManagerNotInstalled",telemetryDetails:{prerequisite:"git-credential-manager"}})}let n=c(["config","--get-all","credential.helper"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});if(!(n.success?n.stdout.split(/\r?\n/).some(i=>/(?:^|[\\/])git-credential-manager(?:-core)?(?:\.exe)?(?:["']|\s|$)/i.test(i.trim())||/^(?:manager|manager-core)$/i.test(i.trim())):!1))throw new s("Git Credential Manager is installed but not configured as a Git credential helper. Run `git-credential-manager configure` and retry.",{prerequisite:"git-credential-manager"},{errorCode:"GitCredentialManagerNotConfigured",telemetryDetails:{prerequisite:"git-credential-manager"}})}function b(){let e=c(["--exec-path"],{captureStdout:!0,allowFailure:!0,emitStderr:!1});return e.success&&e.stdout.trim()?e.stdout.trim():void 0}function h(e,r){let t=C(e);if(t.success||!d(t.error)||!r)return t;let n=process.platform==="win32"?[a(r,`${e}.exe`),a(r,e),a(u(u(r)),"bin",`${e}.exe`),a(u(u(r)),"bin",e)]:[a(r,e)];for(let g of n){let i=C(g);if(i.success||!d(i.error))return i}return t}function C(e){try{return G(e,["--version"],{stdio:["ignore","ignore","ignore"]}),{success:!0}}catch(r){return{success:!1,error:r instanceof Error?r:new Error(String(r))}}}function d(e){return e.code==="ENOENT"}function M(e){let r="git-credential-manager";return e.code==="EACCES"?new s("Git Credential Manager is installed but is not permitted to run. Check its executable permissions and your endpoint security policy, then retry.",{prerequisite:r,classifierBucket:"process-access-denied"},{errorCode:"GitCredentialManagerProcessAccessDenied",retryable:!1,telemetryDetails:{prerequisite:r,classifierBucket:"process-access-denied"}}):e.code==="EBADARCH"||e.errno===86||e.errno===-86?new s("Git Credential Manager is installed but is incompatible with this Mac. Install a build for this Mac's architecture, then retry.",{prerequisite:r,classifierBucket:"process-bad-architecture"},{errorCode:"GitCredentialManagerProcessBadArchitecture",retryable:!1,telemetryDetails:{prerequisite:r,classifierBucket:"process-bad-architecture"}}):new s("Git Credential Manager was found but could not be started. Check its installation and your endpoint security policy, then retry.",{prerequisite:r,classifierBucket:"process-launch-failed"},{errorCode:"GitCredentialManagerProcessLaunchFailed",retryable:!1,telemetryDetails:{prerequisite:r,classifierBucket:"process-launch-failed"}})}export{x as a,B as b};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-TMYOZDLM.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import*as r from"node:fs";function i(e){switch(e){case"Native":return"native";case"ExternalGitProviderBound":return"github";case"ExternallyProvidedBuild":return"none"}}function p(e,t,o){return{projectId:e.projectId,displayName:e.displayName,repositoryId:e.repositoryId,repoType:i(e.repoType),...e.repoType==="ExternalGitProviderBound"&&o&&{externalRepoUrl:o},environmentId:e.environmentId,cloud:t}}function c(e,t){let o=`${e}.${process.pid}.tmp`;try{r.writeFileSync(o,`${JSON.stringify(t,null,2)}
|
|
8
|
+
`,{encoding:"utf8",flag:"wx"}),r.renameSync(o,e)}catch(n){try{r.rmSync(o,{force:!0})}catch{}throw n}}export{i as a,p as b,c};
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk-TXMTKOEJ.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{b as h}from"./chunk-UT667QSU.js";var g=h((Zi,fe)=>{"use strict";var rt="2.0.0",tt=Number.MAX_SAFE_INTEGER||9007199254740991,st=16,it=250,nt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];fe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:st,MAX_SAFE_BUILD_LENGTH:it,MAX_SAFE_INTEGER:tt,RELEASE_TYPES:nt,SEMVER_SPEC_VERSION:rt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var P=h((Ji,he)=>{"use strict";var ot=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};he.exports=ot});var w=h((T,pe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:B,MAX_SAFE_BUILD_LENGTH:ct,MAX_LENGTH:lt}=g(),at=P();T=pe.exports={};var ut=T.re=[],Et=T.safeRe=[],c=T.src=[],ft=T.safeSrc=[],l=T.t={},ht=0,W="[a-zA-Z0-9-]",pt=[["\\s",1],["\\d",lt],[W,ct]],Rt=t=>{for(let[e,r]of pt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},p=(t,e,r)=>{let s=Rt(e),i=ht++;at(t,i,e),l[t]=i,c[i]=e,ft[i]=s,ut[i]=new RegExp(e,r?"g":void 0),Et[i]=new RegExp(s,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*");p("NUMERICIDENTIFIERLOOSE","\\d+");p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${W}*`);p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`);p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`);p("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`);p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`);p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`);p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`);p("BUILDIDENTIFIER",`${W}+`);p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`);p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`);p("FULL",`^${c[l.FULLPLAIN]}$`);p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`);p("LOOSE",`^${c[l.LOOSEPLAIN]}$`);p("GTLT","((?:<|>)?=?)");p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`);p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`);p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`);p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`);p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`);p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${B}})(?:\\.(\\d{1,${B}}))?(?:\\.(\\d{1,${B}}))?`);p("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`);p("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`);p("COERCERTL",c[l.COERCE],!0);p("COERCERTLFULL",c[l.COERCEFULL],!0);p("LONETILDE","(?:~>?)");p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`);p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`);p("LONECARET","(?:\\^)");p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`);p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`);p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`);p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`);p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`);p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`);p("STAR","(<|>)?=?\\s*\\*");p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var y=h((Qi,Re)=>{"use strict";var $t=Object.freeze({loose:!0}),mt=Object.freeze({}),It=t=>t?typeof t!="object"?$t:t:mt;Re.exports=It});var z=h((en,Ie)=>{"use strict";var $e=/^[0-9]+$/,me=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=$e.test(t),s=$e.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Lt=(t,e)=>me(e,t);Ie.exports={compareIdentifiers:me,rcompareIdentifiers:Lt}});var L=h((rn,Ne)=>{"use strict";var F=P(),{MAX_LENGTH:Le,MAX_SAFE_INTEGER:j}=g(),{safeRe:X,t:U}=w(),Nt=y(),{compareIdentifiers:K}=z(),Z=class t{constructor(e,r){if(r=Nt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Le)throw new TypeError(`version is longer than ${Le} characters`);F("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?X[U.LOOSE]:X[U.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>j||this.major<0)throw new TypeError("Invalid major version");if(this.minor>j||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>j||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<j)return n}return i}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(F("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(F("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return K(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(F("build compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return K(s,i)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=`-${r}`.match(this.options.loose?X[U.PRERELEASELOOSE]:X[U.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let n=[r,i];s===!1&&(n=[r]),K(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ne.exports=Z});var q=h((tn,Se)=>{"use strict";var Oe=L(),Ot=(t,e,r=!1)=>{if(t instanceof Oe)return t;try{return new Oe(t,e)}catch(s){if(!r)return null;throw s}};Se.exports=Ot});var Ae=h((sn,de)=>{"use strict";var St=q(),dt=(t,e)=>{let r=St(t,e);return r?r.version:null};de.exports=dt});var qe=h((nn,Te)=>{"use strict";var At=q(),Tt=(t,e)=>{let r=At(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Te.exports=Tt});var Pe=h((on,ge)=>{"use strict";var we=L(),qt=(t,e,r,s,i)=>{typeof r=="string"&&(i=s,s=r,r=void 0);try{return new we(t instanceof we?t.version:t,r).inc(e,s,i).version}catch{return null}};ge.exports=qt});var Ce=h((cn,xe)=>{"use strict";var ve=q(),wt=(t,e)=>{let r=ve(t,null,!0),s=ve(e,null,!0),i=r.compare(s);if(i===0)return null;let n=i>0,o=n?r:s,a=n?s:r,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};xe.exports=wt});var Ge=h((ln,De)=>{"use strict";var gt=L(),Pt=(t,e)=>new gt(t,e).major;De.exports=Pt});var Fe=h((an,ye)=>{"use strict";var vt=L(),xt=(t,e)=>new vt(t,e).minor;ye.exports=xt});var Xe=h((un,je)=>{"use strict";var Ct=L(),Dt=(t,e)=>new Ct(t,e).patch;je.exports=Dt});var Ve=h((En,Ue)=>{"use strict";var Gt=q(),yt=(t,e)=>{let r=Gt(t,e);return r&&r.prerelease.length?r.prerelease:null};Ue.exports=yt});var d=h((fn,He)=>{"use strict";var _e=L(),Ft=(t,e,r)=>new _e(t,r).compare(new _e(e,r));He.exports=Ft});var ke=h((hn,be)=>{"use strict";var jt=d(),Xt=(t,e,r)=>jt(e,t,r);be.exports=Xt});var Ye=h((pn,Me)=>{"use strict";var Ut=d(),Vt=(t,e)=>Ut(t,e,!0);Me.exports=Vt});var V=h((Rn,We)=>{"use strict";var Be=L(),_t=(t,e,r)=>{let s=new Be(t,r),i=new Be(e,r);return s.compare(i)||s.compareBuild(i)};We.exports=_t});var Ke=h(($n,ze)=>{"use strict";var Ht=V(),bt=(t,e)=>t.sort((r,s)=>Ht(r,s,e));ze.exports=bt});var Je=h((mn,Ze)=>{"use strict";var kt=V(),Mt=(t,e)=>t.sort((r,s)=>kt(s,r,e));Ze.exports=Mt});var v=h((In,Qe)=>{"use strict";var Yt=d(),Bt=(t,e,r)=>Yt(t,e,r)>0;Qe.exports=Bt});var _=h((Ln,er)=>{"use strict";var Wt=d(),zt=(t,e,r)=>Wt(t,e,r)<0;er.exports=zt});var J=h((Nn,rr)=>{"use strict";var Kt=d(),Zt=(t,e,r)=>Kt(t,e,r)===0;rr.exports=Zt});var Q=h((On,tr)=>{"use strict";var Jt=d(),Qt=(t,e,r)=>Jt(t,e,r)!==0;tr.exports=Qt});var H=h((Sn,sr)=>{"use strict";var es=d(),rs=(t,e,r)=>es(t,e,r)>=0;sr.exports=rs});var b=h((dn,ir)=>{"use strict";var ts=d(),ss=(t,e,r)=>ts(t,e,r)<=0;ir.exports=ss});var ee=h((An,nr)=>{"use strict";var is=J(),ns=Q(),os=v(),cs=H(),ls=_(),as=b(),us=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return is(t,r,s);case"!=":return ns(t,r,s);case">":return os(t,r,s);case">=":return cs(t,r,s);case"<":return ls(t,r,s);case"<=":return as(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};nr.exports=us});var cr=h((Tn,or)=>{"use strict";var Es=L(),fs=q(),{safeRe:k,t:M}=w(),hs=(t,e)=>{if(t instanceof Es)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?k[M.COERCEFULL]:k[M.COERCE]);else{let u=e.includePrerelease?k[M.COERCERTLFULL]:k[M.COERCERTL],R;for(;(R=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||R.index+R[0].length!==r.index+r[0].length)&&(r=R),u.lastIndex=R.index+R[1].length+R[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],i=r[3]||"0",n=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return fs(`${s}.${i}.${n}${o}${a}`,e)};or.exports=hs});var ar=h((qn,lr)=>{"use strict";var re=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};lr.exports=re});var A=h((wn,hr)=>{"use strict";var ps=/\s+/g,te=class t{constructor(e,r){if(r=$s(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof se)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(ps," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!Er(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&ds(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Os)|(this.options.loose&&Ss))+":"+e,i=ur.get(s);if(i)return i;let n=this.options.loose,o=n?O[N.HYPHENRANGELOOSE]:O[N.HYPHENRANGE];e=e.replace(o,Ds(this.options.includePrerelease)),m("hyphen replace",e),e=e.replace(O[N.COMPARATORTRIM],Is),m("comparator trim",e),e=e.replace(O[N.TILDETRIM],Ls),m("tilde trim",e),e=e.replace(O[N.CARETTRIM],Ns),m("caret trim",e);let a=e.split(" ").map(E=>As(E,this.options)).join(" ").split(/\s+/).map(E=>Cs(E,this.options));n&&(a=a.filter(E=>(m("loose invalid filter",E,this.options),!!E.match(O[N.COMPARATORLOOSE])))),m("range list",a);let u=new Map,R=a.map(E=>new se(E,this.options));for(let E of R){if(Er(E))return[E];u.set(E.value,E)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return ur.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>fr(s,r)&&e.set.some(i=>fr(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ms(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Gs(this.set[r],e,this.options))return!0;return!1}};hr.exports=te;var Rs=ar(),ur=new Rs,$s=y(),se=x(),m=P(),ms=L(),{safeRe:O,t:N,comparatorTrimReplace:Is,tildeTrimReplace:Ls,caretTrimReplace:Ns}=w(),{FLAG_INCLUDE_PRERELEASE:Os,FLAG_LOOSE:Ss}=g(),Er=t=>t.value==="<0.0.0-0",ds=t=>t.value==="",fr=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},As=(t,e)=>(t=t.replace(O[N.BUILD],""),m("comp",t,e),t=ws(t,e),m("caret",t),t=Ts(t,e),m("tildes",t),t=Ps(t,e),m("xrange",t),t=xs(t,e),m("stars",t),t),S=t=>!t||t.toLowerCase()==="x"||t==="*",Ts=(t,e)=>t.trim().split(/\s+/).map(r=>qs(r,e)).join(" "),qs=(t,e)=>{let r=e.loose?O[N.TILDELOOSE]:O[N.TILDE];return t.replace(r,(s,i,n,o,a)=>{m("tilde",t,s,i,n,o,a);let u;return S(i)?u="":S(n)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:S(o)?u=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(m("replaceTilde pr",a),u=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):u=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,m("tilde return",u),u})},ws=(t,e)=>t.trim().split(/\s+/).map(r=>gs(r,e)).join(" "),gs=(t,e)=>{m("caret",t,e);let r=e.loose?O[N.CARETLOOSE]:O[N.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,u)=>{m("caret",t,i,n,o,a,u);let R;return S(n)?R="":S(o)?R=`>=${n}.0.0${s} <${+n+1}.0.0-0`:S(a)?n==="0"?R=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:R=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:u?(m("replaceCaret pr",u),n==="0"?o==="0"?R=`>=${n}.${o}.${a}-${u} <${n}.${o}.${+a+1}-0`:R=`>=${n}.${o}.${a}-${u} <${n}.${+o+1}.0-0`:R=`>=${n}.${o}.${a}-${u} <${+n+1}.0.0-0`):(m("no pr"),n==="0"?o==="0"?R=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:R=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:R=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),m("caret return",R),R})},Ps=(t,e)=>(m("replaceXRanges",t,e),t.split(/\s+/).map(r=>vs(r,e)).join(" ")),vs=(t,e)=>{t=t.trim();let r=e.loose?O[N.XRANGELOOSE]:O[N.XRANGE];return t.replace(r,(s,i,n,o,a,u)=>{m("xRange",t,s,i,n,o,a,u);let R=S(n),$=R||S(o),E=$||S(a),I=E;return i==="="&&I&&(i=""),u=e.includePrerelease?"-0":"",R?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&I?($&&(o=0),a=0,i===">"?(i=">=",$?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",$?n=+n+1:o=+o+1),i==="<"&&(u="-0"),s=`${i+n}.${o}.${a}${u}`):$?s=`>=${n}.0.0${u} <${+n+1}.0.0-0`:E&&(s=`>=${n}.${o}.0${u} <${n}.${+o+1}.0-0`),m("xRange return",s),s})},xs=(t,e)=>(m("replaceStars",t,e),t.trim().replace(O[N.STAR],"")),Cs=(t,e)=>(m("replaceGTE0",t,e),t.trim().replace(O[e.includePrerelease?N.GTE0PRE:N.GTE0],"")),Ds=t=>(e,r,s,i,n,o,a,u,R,$,E,I)=>(S(s)?r="":S(i)?r=`>=${s}.0.0${t?"-0":""}`:S(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,S(R)?u="":S($)?u=`<${+R+1}.0.0-0`:S(E)?u=`<${R}.${+$+1}.0-0`:I?u=`<=${R}.${$}.${E}-${I}`:t?u=`<${R}.${$}.${+E+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),Gs=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(m(t[s].semver),t[s].semver!==se.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var x=h((gn,Lr)=>{"use strict";var C=Symbol("SemVer ANY"),oe=class t{static get ANY(){return C}constructor(e,r){if(r=pr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ne("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===C?this.value="":this.value=this.operator+this.semver.version,ne("comp",this)}parse(e){let r=this.options.loose?Rr[$r.COMPARATORLOOSE]:Rr[$r.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new mr(s[2],this.options.loose):this.semver=C}toString(){return this.value}test(e){if(ne("Comparator.test",e,this.options.loose),this.semver===C||e===C)return!0;if(typeof e=="string")try{e=new mr(e,this.options)}catch{return!1}return ie(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Ir(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Ir(this.value,r).test(e.semver):(r=pr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||ie(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ie(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Lr.exports=oe;var pr=y(),{safeRe:Rr,t:$r}=w(),ie=ee(),ne=P(),mr=L(),Ir=A()});var D=h((Pn,Nr)=>{"use strict";var ys=A(),Fs=(t,e,r)=>{try{e=new ys(e,r)}catch{return!1}return e.test(t)};Nr.exports=Fs});var Sr=h((vn,Or)=>{"use strict";var js=A(),Xs=(t,e)=>new js(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Or.exports=Xs});var Ar=h((xn,dr)=>{"use strict";var Us=L(),Vs=A(),_s=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Vs(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new Us(s,r))}),s};dr.exports=_s});var qr=h((Cn,Tr)=>{"use strict";var Hs=L(),bs=A(),ks=(t,e,r)=>{let s=null,i=null,n=null;try{n=new bs(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new Hs(s,r))}),s};Tr.exports=ks});var Pr=h((Dn,gr)=>{"use strict";var ce=L(),Ms=A(),wr=v(),Ys=(t,e)=>{t=new Ms(t,e);let r=new ce("0.0.0");if(t.test(r)||(r=new ce("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new ce(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||wr(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||wr(r,n))&&(r=n)}return r&&t.test(r)?r:null};gr.exports=Ys});var xr=h((Gn,vr)=>{"use strict";var Bs=A(),Ws=(t,e)=>{try{return new Bs(t,e).range||"*"}catch{return null}};vr.exports=Ws});var Y=h((yn,yr)=>{"use strict";var zs=L(),Gr=x(),{ANY:Ks}=Gr,Zs=A(),Js=D(),Cr=v(),Dr=_(),Qs=b(),ei=H(),ri=(t,e,r,s)=>{t=new zs(t,s),e=new Zs(e,s);let i,n,o,a,u;switch(r){case">":i=Cr,n=Qs,o=Dr,a=">",u=">=";break;case"<":i=Dr,n=ei,o=Cr,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Js(t,e,s))return!1;for(let R=0;R<e.set.length;++R){let $=e.set[R],E=null,I=null;if($.forEach(f=>{f.semver===Ks&&(f=new Gr(">=0.0.0")),E=E||f,I=I||f,i(f.semver,E.semver,s)?E=f:o(f.semver,I.semver,s)&&(I=f)}),E.operator===a||E.operator===u||(!I.operator||I.operator===a)&&n(t,I.semver))return!1;if(I.operator===u&&o(t,I.semver))return!1}return!0};yr.exports=ri});var jr=h((Fn,Fr)=>{"use strict";var ti=Y(),si=(t,e,r)=>ti(t,e,">",r);Fr.exports=si});var Ur=h((jn,Xr)=>{"use strict";var ii=Y(),ni=(t,e,r)=>ii(t,e,"<",r);Xr.exports=ni});var Hr=h((Xn,_r)=>{"use strict";var Vr=A(),oi=(t,e,r)=>(t=new Vr(t,r),e=new Vr(e,r),t.intersects(e,r));_r.exports=oi});var kr=h((Un,br)=>{"use strict";var ci=D(),li=d();br.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort(($,E)=>li($,E,r));for(let $ of o)ci($,e,r)?(n=$,i||(i=$)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[$,E]of s)$===E?a.push($):!E&&$===o[0]?a.push("*"):E?$===o[0]?a.push(`<=${E}`):a.push(`${$} - ${E}`):a.push(`>=${$}`);let u=a.join(" || "),R=typeof e.raw=="string"?e.raw:String(e);return u.length<R.length?u:e}});var Kr=h((Vn,zr)=>{"use strict";var Mr=A(),ae=x(),{ANY:le}=ae,G=D(),ue=d(),ai=(t,e,r={})=>{if(t===e)return!0;t=new Mr(t,r),e=new Mr(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=Ei(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},ui=[new ae(">=0.0.0-0")],Yr=[new ae(">=0.0.0")],Ei=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===le){if(e.length===1&&e[0].semver===le)return!0;r.includePrerelease?t=ui:t=Yr}if(e.length===1&&e[0].semver===le){if(r.includePrerelease)return!0;e=Yr}let s=new Set,i,n;for(let f of t)f.operator===">"||f.operator===">="?i=Br(i,f,r):f.operator==="<"||f.operator==="<="?n=Wr(n,f,r):s.add(f.semver);if(s.size>1)return null;let o;if(i&&n){if(o=ue(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let f of s){if(i&&!G(f,String(i),r)||n&&!G(f,String(n),r))return null;for(let et of e)if(!G(f,String(et),r))return!1;return!0}let a,u,R,$,E=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,I=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;E&&E.prerelease.length===1&&n.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let f of e){if($=$||f.operator===">"||f.operator===">=",R=R||f.operator==="<"||f.operator==="<=",i){if(I&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===I.major&&f.semver.minor===I.minor&&f.semver.patch===I.patch&&(I=!1),f.operator===">"||f.operator===">="){if(a=Br(i,f,r),a===f&&a!==i)return!1}else if(i.operator===">="&&!G(i.semver,String(f),r))return!1}if(n){if(E&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===E.major&&f.semver.minor===E.minor&&f.semver.patch===E.patch&&(E=!1),f.operator==="<"||f.operator==="<="){if(u=Wr(n,f,r),u===f&&u!==n)return!1}else if(n.operator==="<="&&!G(n.semver,String(f),r))return!1}if(!f.operator&&(n||i)&&o!==0)return!1}return!(i&&R&&!n&&o!==0||n&&$&&!i&&o!==0||I||E)},Br=(t,e,r)=>{if(!t)return e;let s=ue(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Wr=(t,e,r)=>{if(!t)return e;let s=ue(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};zr.exports=ai});var Ki=h((_n,Qr)=>{"use strict";var Ee=w(),Zr=g(),fi=L(),Jr=z(),hi=q(),pi=Ae(),Ri=qe(),$i=Pe(),mi=Ce(),Ii=Ge(),Li=Fe(),Ni=Xe(),Oi=Ve(),Si=d(),di=ke(),Ai=Ye(),Ti=V(),qi=Ke(),wi=Je(),gi=v(),Pi=_(),vi=J(),xi=Q(),Ci=H(),Di=b(),Gi=ee(),yi=cr(),Fi=x(),ji=A(),Xi=D(),Ui=Sr(),Vi=Ar(),_i=qr(),Hi=Pr(),bi=xr(),ki=Y(),Mi=jr(),Yi=Ur(),Bi=Hr(),Wi=kr(),zi=Kr();Qr.exports={parse:hi,valid:pi,clean:Ri,inc:$i,diff:mi,major:Ii,minor:Li,patch:Ni,prerelease:Oi,compare:Si,rcompare:di,compareLoose:Ai,compareBuild:Ti,sort:qi,rsort:wi,gt:gi,lt:Pi,eq:vi,neq:xi,gte:Ci,lte:Di,cmp:Gi,coerce:yi,Comparator:Fi,Range:ji,satisfies:Xi,toComparators:Ui,maxSatisfying:Vi,minSatisfying:_i,minVersion:Hi,validRange:bi,outside:ki,gtr:Mi,ltr:Yi,intersects:Bi,simplifyRange:Wi,subset:zi,SemVer:fi,re:Ee.re,src:Ee.src,tokens:Ee.t,SEMVER_SPEC_VERSION:Zr.SEMVER_SPEC_VERSION,RELEASE_TYPES:Zr.RELEASE_TYPES,compareIdentifiers:Jr.compareIdentifiers,rcompareIdentifiers:Jr.rcompareIdentifiers}});export{Ki as a};
|
|
8
|
+
//# sourceMappingURL=chunk-TYRVM4PP.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
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 K,c as Q}from"./chunk-2LKCCYRF.js";import{c as _}from"./chunk-GE3UFHZ5.js";import{B as F,K as E,Nb as I,Ob as M,R as H,T as W,U as Y,V,W as x,X as R,Y as O,_ as G,k as D,n as j,va as J,w as B,x as m}from"./chunk-4XKA5APP.js";import{e as z}from"./chunk-OUKOEUZA.js";import{A as q,C as $,I as g,K as v}from"./chunk-KKC5ZK4D.js";import*as ee from"http";import ne from"open";var X={defaultBehavior:"Allow",allowedConnectors:[]},T="Reason: The connector service rejected the automatic connection request.";function k(r,t){I().trackErrorEvent("Connection.AutoCreateFailed",{apiId:r,error:t instanceof Error?t.message:String(t)})}async function ge(r,t,e){if(r.toLowerCase().startsWith("shared_"))return r;let n=await Y(void 0,t??void 0),o=r.toLowerCase(),s=n.find(c=>c.name.toLowerCase()===`shared_${o}`);if(s)return s.name;let u=n.filter(c=>c.properties.displayName.toLowerCase()===o),a=u.length===0,f=a?n.filter(c=>c.properties.displayName.toLowerCase().includes(o)):u;if(f.length===0)return r;if(f.length===1)return a&&!e?.jsonMode&&g(`Resolved '${r}' \u2192 '${f[0].properties.displayName}' (${f[0].name})`),f[0].name;if(M().interactive&&!e?.jsonMode)return await _({message:`Multiple connectors match '${r}'. Select a connector:`,options:f.map(c=>({value:c.name,label:c.properties.displayName,hint:c.name}))});let l=f.map(c=>` ${c.name} (${c.properties.displayName})`).join(`
|
|
8
|
+
`);throw new m(`Multiple connectors match '${r}'. Specify the connector ID directly:
|
|
9
|
+
${l}`)}var Z="__create__",oe=600*1e3,L="1";async function Ce(r,t){let e=I(),n=await r.getTenantIdAsync();n||(e.trackErrorEvent("DlpSkippedNoTenantId",{apiId:t}),v(`Could not resolve tenant ID; skipping connector policy check. Sign in with '${"ms"} auth login' for full enforcement.`));let[o,s]=await Promise.all([H(t,e),n?G(e,n).catch(()=>(v("Could not verify connector policy; proceeding without enforcement."),X)):Promise.resolve(X)]);if(!o)throw new F(`Connector '${t}' not found. Run '${"ms"} connector list' to see available connector IDs.`);let u=(o.name??t).toLowerCase(),a=new Map(s.allowedConnectors.map(c=>[c.connectorId.toLowerCase(),c])),f=new Set((s.blockedConnectors??[]).map(c=>c.connectorId.toLowerCase()));if(s.defaultBehavior==="Block"?!a.has(u):f.has(u))throw Q(`Connector '${o.properties.displayName??t}' is blocked by your organization's connector policy.`,K.ConnectorPolicyBlocked,"connector_preflight");return{connector:o,tenantId:n,policy:s}}async function ye(r){let t=M(),{argumentProvider:e,apiId:n,connector:o,useSso:s,interactive:u=t.interactive,quiet:a=!1,nonInteractiveReason:f="cli-mode",connectionFilter:l,noMatchingConnectionMessage:c,beforeConnectionTest:i}=r,d=I(),C=E(),w=await W(n,d)??[],S=l?w.filter(l):w;if(!u&&l&&w.length>0&&S.length===0)throw new m(c??`No existing connections for '${o.properties.displayName??n}' satisfy the required connection settings.`);if(!u)return te({argumentProvider:e,apiId:n,connector:o,connections:S,useSso:s,quiet:a,nonInteractiveReason:f,beforeConnectionTest:i});if(s){if(!R(o))throw new m(`--use-sso was set but '${o.properties.displayName??n}' does not support single sign-on (SSO) authentication.
|
|
10
|
+
To fix: Re-run without --use-sso to create a connection interactively.`);let h=S.filter(p=>O(p,o));if(h.length>0){let[p]=h;return g(`Using existing SSO connection '${p.properties.displayName}' (${p.name}).`),h.length>1&&v(`Multiple SSO connections found for '${o.properties.displayName??n}'. Re-run with --connection-id <id> or -c <id> to use a specific one.`),{connectionId:p.name,autoSelected:!0}}let y=await A(e,n,i);return $(`Created a new connection '${y.properties.displayName}' (${y.name}).`),{connectionId:y.name,autoSelected:!1}}let N=[...S.map(h=>({value:h.name,label:h.properties.displayName,hint:h.name})),{value:Z,label:"(Create a new connection)"}],b=await _({message:"Select a connection:",options:N});if(b===Z){if(x(o))try{return{connectionId:(await A(e,n,i)).name,autoSelected:!1}}catch(U){k(n,U),v("Silent connection creation failed."),g(`Falling back to browser-based connection creation...
|
|
11
|
+
`)}else g(`This connector requires manual interaction. Opening browser for connection creation...
|
|
12
|
+
`);let h=n.startsWith("shared_")?n:`shared_${n}`,y=e.getEnvironmentId();if(!y)throw new m("Missing required information. Make sure you are running this command in a Copilot Managed Runtime directory.");let p=await re({connectorName:h,region:C.region,environmentId:y});if(p.status==="created"&&p.connectionName)return $("Connection created successfully!"),p.displayName&&g(` Display Name: ${p.displayName}`),g(` Connection ID: ${p.connectionName}`),{connectionId:p.connectionName,autoSelected:!1};throw p.status==="error"?new B(p.errorMessage??"Connection creation failed in the browser."):new m("Connection creation was cancelled.")}return{connectionId:b,autoSelected:!1}}async function te(r){let{argumentProvider:t,apiId:e,connector:n,connections:o,useSso:s,quiet:u=!1,nonInteractiveReason:a,beforeConnectionTest:f}=r,l=n.properties.displayName??e;if(s){if(!R(n))throw a==="json-mode"?new m(`--use-sso was set but '${l}' does not support single sign-on (SSO) authentication.
|
|
13
|
+
To fix: Re-run without --use-sso and provide --connection-id <id> or -c <id>.`):new m(`--use-sso was set but '${l}' does not support single sign-on (SSO) authentication.
|
|
14
|
+
To fix: Re-run without both --use-sso and --non-interactive to create a connection interactively.`);let i=o.filter(d=>O(d,n));if(i.length>0){let[d]=i;return u||g(`Using existing SSO connection '${d.properties.displayName}' (${d.name}).`),!u&&i.length>1&&v(`Multiple SSO connections found for '${l}'. Re-run with --connection-id <id> or -c <id> to use a specific one.`),{connectionId:d.name,autoSelected:!0}}try{let d=await A(t,e,f);return u||$(`Created a new connection '${d.properties.displayName}' (${d.name}).`),{connectionId:d.name,autoSelected:!1}}catch(d){throw k(e,d),a==="json-mode"?new m(`No SSO connection exists for '${l}' and automatic connection creation failed.
|
|
15
|
+
${T}
|
|
16
|
+
To fix: Create a connection, then re-run with --connection-id <id> or -c <id>.`):new m(`No SSO connection exists for '${l}' and automatic connection creation failed.
|
|
17
|
+
${T}
|
|
18
|
+
To fix: Create one interactively (re-run without --non-interactive),
|
|
19
|
+
then re-run with --connection-id <id> or -c <id>.`)}}if(o.length===1){let[i]=o;return u||g(`Using existing connection '${i.properties.displayName}' (${i.name}).`),{connectionId:i.name,autoSelected:!0}}if(o.length===0&&x(n))try{let i=await A(t,e,f);return u||$(`Created a new connection '${i.properties.displayName}' (${i.name}).`),{connectionId:i.name,autoSelected:!1}}catch(i){throw k(e,i),a==="json-mode"?new m(`No connection exists for '${l}' and automatic connection creation failed.
|
|
20
|
+
${T}
|
|
21
|
+
To fix: Create a connection, then re-run with --connection-id <id> or -c <id>.`):new m(`No connection exists for '${l}' and automatic connection creation failed.
|
|
22
|
+
${T}
|
|
23
|
+
To fix: Create one interactively (re-run without --non-interactive),
|
|
24
|
+
then re-run with --connection-id <id> or -c <id>.`)}throw o.length>1?(u||q({title:`Available connections for ${l}`,columns:[{header:"Display Name",maxWidth:40},{header:"Connection ID"}],rows:o.map(i=>[i.properties.displayName,i.name]),totalLabel:"connection(s) found"}),a==="json-mode"?new m(`Multiple connections exist for '${l}', so one cannot be selected automatically.
|
|
25
|
+
To fix: Re-run with --connection-id <id> or -c <id> to choose one.`):new m(`Multiple connections exist for '${l}', so one cannot be selected automatically.
|
|
26
|
+
To fix: Re-run with --connection-id <id> or -c <id> to choose one,
|
|
27
|
+
or re-run without --non-interactive to select one interactively.`)):a==="json-mode"?new m(`'${l}' requires a connection that cannot be created automatically in JSON mode.
|
|
28
|
+
To fix: Create a connection, then re-run with --connection-id <id> or -c <id>.
|
|
29
|
+
Tip: Run '${"ms"} connector list' to browse available connectors.`):new m(`'${l}' requires a connection that cannot be created automatically in non-interactive mode.
|
|
30
|
+
To fix: Create one interactively (re-run without --non-interactive),
|
|
31
|
+
then re-run with --connection-id <id> or -c <id>.
|
|
32
|
+
Tip: Run '${"ms"} connector list' to browse available connectors.`)}async function A(r,t,e){let n=I(),o=E();return J({authProvider:r.getAuthenticationProvider(),region:o.region,environmentName:o.environmentName,actionsParams:{connectorId:t},logger:n,beforeConnectionTest:e})}function ie(r,t){return`Note: connection '${r}' was auto-selected for connector '${t}' because no --connection-id was provided. For tabular connectors, the connection needs to have access to the target resource, so this failure may not clearly indicate the root cause:
|
|
33
|
+
- If the connection is broken or expired, re-authenticate it and re-run.
|
|
34
|
+
- If the connection is valid but targets the wrong resource, re-run with an explicit --connection-id <id> for the intended resource.`}async function we(r,t){try{return await r()}catch(e){throw t.autoSelected&&e instanceof Error&&!(e instanceof m)&&(e.message=`${e.message}
|
|
35
|
+
|
|
36
|
+
${ie(t.connectionId,t.connectorLabel)}`),e}}var ve="The connection test and later calls";async function Se(r){if(!z("ENABLE_CONNECTOR_USER_CONSENT"))return;let{apiId:t,connectionId:e}=r,n=r.impact??"The data source was added, but later calls",o=I(),s=o.trackScenario("ConnectorUserConsent",{apiId:t,connectionId:e}),u=a=>(r.defer||v(a),a);try{await V(t,e,o),s.complete();return}catch(a){return s.failure(a),a instanceof D&&a.status===403?u(`Could not request user consent on connection '${e}' (HTTP 403). ${n} against this connection may fail until your tenant admin grants the calling application the 'Connectivity.Connections.UserConsent' delegated permission.`):u(`Could not request user consent on connection '${e}'. ${n} against this connection may fail.`)}}async function re(r){let{connectorName:t,region:e,environmentId:n}=r,o=crypto.randomUUID();return new Promise((s,u)=>{let a=ee.createServer((i,d)=>{let C=new URL(i.url??"/","http://localhost");if(C.pathname==="/callback"&&i.method==="GET"){if(C.searchParams.get("nonce")!==o){d.writeHead(403,{"Content-Type":"text/html; charset=utf-8"}),d.end("<html><body><h2>Connection request verification failed. Please run the CLI command again.</h2></body></html>"),c(),s({status:"cancelled"});return}let S=C.searchParams.get("v");S!==L&&v(`Warning: callback protocol version mismatch (expected ${L}, got ${S??"none"}). Update the CLI to the latest version.`);let N=C.searchParams.get("status"),b=C.searchParams.get("message")??void 0;d.writeHead(200,{"Content-Type":"text/html; charset=utf-8"});let h;if(N==="created")h="<html><body><h2>Connection created! You can close this tab.</h2></body></html>";else if(N==="error"){let y=b?b.replace(/[&<>"']/g,p=>`&#${p.charCodeAt(0)};`):"";h=y?`<html><body><h2>Connection creation failed. You can close this tab.</h2><p>${y}</p></body></html>`:"<html><body><h2>Connection creation failed. You can close this tab.</h2></body></html>"}else h="<html><body><h2>Connection creation cancelled. You can close this tab.</h2></body></html>";d.end(h),c(),s(N==="created"?{status:"created",connectionId:C.searchParams.get("connectionId")??void 0,connectionName:C.searchParams.get("connectionName")??void 0,displayName:C.searchParams.get("displayName")??void 0}:N==="error"?{status:"error",errorMessage:b}:{status:"cancelled"});return}d.writeHead(404),d.end("Not found")});a.listen(0,"localhost",async()=>{let i=a.address(),C=`http://localhost:${typeof i=="object"&&i?i.port:0}/callback`,w=j(e,{connector:t,callbackUrl:C,nonce:o,protocolVersion:L,environmentId:n});g(`Opening browser at ${w}`);try{await ne(w,{wait:!1})}catch{g(`Could not open browser automatically. Please navigate to:
|
|
37
|
+
${w}`)}g(`Waiting for connection creation... (press Ctrl+C to cancel)
|
|
38
|
+
`)}),a.on("error",i=>{c(),u(i)});let f=setTimeout(()=>{g(`
|
|
39
|
+
Connection creation timed out after 10 minutes.`),c(),s({status:"cancelled"})},oe),l=()=>{g(`
|
|
40
|
+
Cancelling...`),c(),s({status:"cancelled"})};function c(){clearTimeout(f),process.off("SIGINT",l),a.close()}process.on("SIGINT",l)})}export{ge as a,Ce as b,ye as c,we as d,ve as e,Se as f};
|
|
41
|
+
/*!
|
|
42
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
43
|
+
*/
|
|
44
|
+
//# sourceMappingURL=chunk-UEZV46GZ.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>{try{return b||a((b={exports:{}}).exports,b),b.exports}catch(c){throw b=0,c}},o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
|
|
8
|
+
//# sourceMappingURL=chunk-UT667QSU.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{k as o,pa as r}from"./chunk-4XKA5APP.js";async function m(e,a){let t=!0;try{await r(e,{stageName:a})}catch(n){if(i(n))t=!1;else throw n}return{projectId:e,deploymentCreated:t}}function i(e){return e instanceof o&&e.status===409&&e.code==="StageNameConflict"}export{m as a};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-UXKJNXTZ.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 c}from"./chunk-DKSLWH4O.js";import{m}from"./chunk-GE3UFHZ5.js";import{Ma as p,Nb as i,Ob as g,fb as d,x as r,z as a}from"./chunk-4XKA5APP.js";async function w(n,t,o){let e=await p({tenantId:t,environmentId:o,logger:i(),actionsParams:{appName:n}});return{projectId:c(e.projectId),environmentId:c(e.environmentId)}}async function A(n){let{projectId:t,environmentId:o}=await j(n);n.updateEnvironmentId(o);let e=await d({projectId:t,logger:i()});return{projectId:e.projectId,tenantId:e.tenantId,environmentId:e.environmentId}}async function C(n){let{projectId:t,environmentId:o}=await j(n);n.updateEnvironmentId(o);let e=await n.getTenantIdAsync();if(!e)throw new r("Unable to determine tenant ID. Ensure you are logged in.");return{projectId:t,tenantId:e,environmentId:o}}async function j(n){let t=g(),o=(await n.getOption("project",!0))?.trim();if(!o&&t.projectConfigError)throw new a(`Unable to read ${t.fileConfig.projectConfigPath}. ${t.projectConfigError.message}`);let e=o||t.projectConfig?.projectId;if(!e)throw new r("Argument project is required. Use --project or -p to specify it, or run from a directory containing ms.project.config.json.");let f=!o||t.projectConfig?.projectId.toLowerCase()===o.toLowerCase()?t.projectConfig:void 0,s=await m(n,{failIfMissing:!1})??f?.environmentId;if(!s)throw new r("Unable to determine the environment hosting this project. Use --environment-id or -e to specify it, or run from a directory containing ms.project.config.json.");return{projectId:e,environmentId:s}}export{w as a,A as b,C as c};
|
|
8
|
+
/*!
|
|
9
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=chunk-WTTK2GTG.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
function l(e){let n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}function i(e){let n=e?.replace(/[\u0000-\u001f\u007f-\u009f]/g,"").trim();return n||void 0}function u(e){let n=e?.replace(/\r\n?/g,`
|
|
8
|
+
`).replace(/[\u0000-\u0008\u000b-\u001f\u007f-\u009f]/g,"").trim();return n||void 0}function d(e){if(!e)return;let n=i(e.email);if(n){let t=n.lastIndexOf("@");if(t>0)return n.slice(0,t);if(t<0)return n}return i(e.displayName)??i(e.objectId)}function a(e){return d(e.approvalDecidedBy)}function c(e){return d(e.cancelledBy)}function f(e){let n=e.cancelledBy;return[n?.objectId,n?.displayName,n?.email].some(r=>typeof r=="string"&&r.trim()!=="")?n??void 0:void 0}function o(e){return e.cancelledTime?.trim()||void 0}function m(e){let n=c(e),t=o(e);return n||t?{by:n,time:t}:{by:a(e),time:e.approvalDecidedTime?.trim()||void 0}}export{l as a,i as b,u as c,f as d,o as e,m as f};
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk-WV7D7PTW.js.map
|