@microsoft/cmr-cli 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -14
- package/THIRD-PARTY-NOTICES.txt +287 -30
- package/dist/Add-4RULNL6A.js +11 -0
- package/dist/AddConfig-D2DCR3JH.js +12 -0
- package/dist/AddConnector-5ZR5AF6H.js +19 -0
- package/dist/AddDeployment-7U4I5IC4.js +11 -0
- package/dist/AddDeploymentBinding-BZVRRZ7H.js +18 -0
- package/dist/AddRayfin-45ASHNIX.js +87 -0
- package/dist/Alter-36TSNZ4M.js +11 -0
- package/dist/{AuthStatus-XA6RGYYZ.js → AuthStatus-W5ZHOAVD.js} +2 -2
- package/dist/AuthSwitch-7HRPTGEG.js +13 -0
- package/dist/Bin.js +1 -1
- package/dist/BuildMaafApp-TLQXOVQC.js +11 -0
- package/dist/Clear-X55BZKYF.js +11 -0
- package/dist/Cli-EEO7V3MZ.js +47 -0
- package/dist/CloneMaafApp-4EHW3HE2.js +12 -0
- package/dist/CreateMaafApp-VNXWCAP4.js +23 -0
- package/dist/CreateMaafProject-WVBNZPVL.js +11 -0
- package/dist/DeleteMaafApp-UGUKARMO.js +11 -0
- package/dist/DeployMaafApp-GJO567TK.js +8 -0
- package/dist/DeployMaafProject-4TSW2SFJ.js +11 -0
- package/dist/DeploymentApprovals-SZKNJT76.js +11 -0
- package/dist/Dev-ZD3L6WYY.js +15 -0
- package/dist/{EnvironmentVariableAuthenticationProvider-EBRBQ5I2.js → EnvironmentVariableAuthenticationProvider-EURTERVX.js} +2 -2
- package/dist/FeatureSettings-GG7JGFIY.js +11 -0
- package/dist/{GenerateCode-Z2OY3SZR.js → GenerateCode-PNYC45SK.js} +2 -2
- package/dist/GetMaafBuildStatus-UTPVWF5L.js +11 -0
- package/dist/GetMaafProjectDeployStatus-PLK52YC4.js +12 -0
- package/dist/{GetSettings-64N4P6L7.js → GetSettings-RLRDJEC7.js} +2 -2
- package/dist/InfoMaafApp-CTB6IPRU.js +13 -0
- package/dist/InfoMaafProject-TULH566X.js +11 -0
- package/dist/Init-TYWP2E6U.js +11 -0
- package/dist/ListConnectorActions-UQS6D4UN.js +11 -0
- package/dist/ListConnectors-OCDO64AT.js +11 -0
- package/dist/ListDeployments-PDLJ3IEI.js +11 -0
- package/dist/ListMaafApps-UAWTTCGB.js +11 -0
- package/dist/ListMaafProjects-T3Q2GEDX.js +11 -0
- package/dist/{ListSchema-IR7FTBRR.js → ListSchema-G673LK5Q.js} +2 -2
- package/dist/{ListSettings-3M7UOOLI.js → ListSettings-EXCK5ZS6.js} +2 -2
- package/dist/{Login-G7TNQISG.js → Login-XZATPT4L.js} +2 -2
- package/dist/{Logout-AOOISVWK.js → Logout-2XM4IMZF.js} +2 -2
- package/dist/{MockFetch-GKQMNDW3.js → MockFetch-LW3KYEGC.js} +2 -2
- package/dist/NodeMsalAuthenticationProvider-ALMFNUEV.js +17 -0
- package/dist/Pack-RH4D4C7W.js +8 -0
- package/dist/PackProject-5DUWSBFA.js +14 -0
- package/dist/PlayMaafApp-5BXGXE6O.js +8 -0
- package/dist/ProjectApprovals-K3JF6D72.js +13 -0
- package/dist/ProjectRoleAssignments-7IUDEVBN.js +11 -0
- package/dist/RefreshDataSource-CMHDF2GP.js +11 -0
- package/dist/RefreshGitAuth-4TRO5IOQ.js +11 -0
- package/dist/Remove-KZD3SDDC.js +11 -0
- package/dist/{RemoveDataSource-T2AG7ZWC.js → RemoveDataSource-C7UXOUNH.js} +3 -3
- package/dist/RemoveDeployment-ZQJWQPD6.js +11 -0
- package/dist/ServicePrincipalAuthenticationProvider-3NPJTLF5.js +11 -0
- package/dist/SetSetting-3XO6HPG7.js +11 -0
- package/dist/{SetSetting-KOWAPJWX.js → SetSetting-ZW7F43GC.js} +2 -2
- package/dist/ShareLinkCreate-JXPW5H7A.js +11 -0
- package/dist/ShareLinkList-ICYPRIQV.js +11 -0
- package/dist/ShareLinkRevoke-JVMQZF7K.js +11 -0
- package/dist/ShareList-YGSTFMVE.js +11 -0
- package/dist/ShareMaafApp-ZCY72WHK.js +11 -0
- package/dist/{TelemetrySettings-FVJUK5MR.js → TelemetrySettings-P6WYWGW4.js} +2 -2
- package/dist/UnshareMaafApp-N4UR6Q4A.js +11 -0
- package/dist/{chunk-JWSX7DVU.js → chunk-2SRFM7D6.js} +2 -2
- package/dist/chunk-3YCPXSCO.js +11 -0
- package/dist/chunk-45EZLDPE.js +147 -0
- package/dist/{chunk-EFTF4FA7.js → chunk-4PI5THLA.js} +2 -2
- package/dist/{chunk-4C6DWU2Y.js → chunk-6KOL66SF.js} +2 -2
- package/dist/{chunk-2VJIWD7V.js → chunk-74RNALDY.js} +2 -2
- package/dist/{chunk-4JTUAUHI.js → chunk-7AEULMP2.js} +2 -2
- package/dist/{chunk-MWN7R4VR.js → chunk-7LAMG4KK.js} +2 -2
- package/dist/chunk-A5INC5TY.js +11 -0
- package/dist/chunk-AICYZHWK.js +11 -0
- package/dist/chunk-B4NTYKGH.js +12 -0
- package/dist/chunk-BAQPANON.js +11 -0
- package/dist/{chunk-BREK3DVB.js → chunk-BMOTNINY.js} +6 -6
- package/dist/{chunk-OUKOEUZA.js → chunk-C7UWPNC3.js} +1 -1
- package/dist/{chunk-2UMD5IAQ.js → chunk-CLY3OASM.js} +2 -2
- package/dist/chunk-DLUQVMUE.js +11 -0
- package/dist/{chunk-JDRULLI3.js → chunk-ENDUKF4E.js} +2 -2
- package/dist/{chunk-DOCWK326.js → chunk-FESGOCAP.js} +7 -7
- package/dist/{chunk-IM7SC23O.js → chunk-GO22IDEN.js} +6 -6
- package/dist/{chunk-WV7KDGLS.js → chunk-HHW4SKVU.js} +2 -2
- package/dist/{chunk-CONEIY4I.js → chunk-HZGDQAKA.js} +2 -2
- package/dist/{chunk-O4G2KO7E.js → chunk-IMVZRBSQ.js} +2 -2
- package/dist/chunk-K77VBHFP.js +12 -0
- package/dist/{chunk-CER3QPDN.js → chunk-KD4NQIYX.js} +3 -3
- package/dist/{chunk-4WQT5P2M.js → chunk-KN66FSQK.js} +2 -2
- package/dist/{chunk-4UHMKZLH.js → chunk-KPKJZKWW.js} +2 -2
- package/dist/chunk-NMZFJESU.js +12 -0
- package/dist/{chunk-ZREDMBLO.js → chunk-NNYOT7IR.js} +2 -2
- package/dist/{chunk-JMF444BA.js → chunk-OH3TCDCC.js} +2 -2
- package/dist/{chunk-A57M2UGH.js → chunk-OHQNTYJG.js} +2 -2
- package/dist/{chunk-4AO24KKT.js → chunk-PYPCPMCR.js} +5 -5
- package/dist/{chunk-OTXBVG3E.js → chunk-R2IECDVU.js} +3 -3
- package/dist/{chunk-FGB6GFXI.js → chunk-RA74M3YD.js} +2 -2
- package/dist/{chunk-E2O4YZX2.js → chunk-RSHOMYG6.js} +228 -227
- package/dist/chunk-UHNOINTO.js +11 -0
- package/dist/{chunk-ELHOJBVT.js → chunk-XC7Y6E2C.js} +11 -11
- package/dist/chunk-XJXWNOJR.js +11 -0
- package/dist/chunk-Y2D37EFX.js +13 -0
- package/dist/{chunk-C7V6WEZM.js → chunk-YEWRCEPT.js} +2 -2
- package/dist/chunk-Z4UX3JOS.js +12 -0
- package/dist/chunk-ZBQT5XZJ.js +32 -0
- package/dist/chunk-ZGBTKTTU.js +11 -0
- package/dist/{chunk-5BE4TLDK.js → chunk-ZLK2CMMJ.js} +23 -23
- package/dist/chunk-ZWJ5T5VI.js +11 -0
- package/dist/node-PLZPXPD7.js +29 -0
- package/dist/typescript-6OTSQQEW.js +458 -0
- package/package.json +5 -4
- package/dist/Add-75RSJNM4.js +0 -11
- package/dist/AddConfig-4SAYYOBQ.js +0 -12
- package/dist/AddConnector-P4R4NJ5P.js +0 -16
- package/dist/AddDeployment-TBA3AAGD.js +0 -11
- package/dist/AddDeploymentBinding-6FZ7Y5JM.js +0 -18
- package/dist/AddRayfin-35GBGCWF.js +0 -38
- package/dist/Alter-U7WDVOMU.js +0 -11
- package/dist/AuthSwitch-2FXB7WFU.js +0 -13
- package/dist/BuildMaafApp-3EGRD23G.js +0 -11
- package/dist/Clear-MZGQZ2XK.js +0 -11
- package/dist/Cli-6A2HUP7R.js +0 -47
- package/dist/CloneMaafApp-YAEYSP23.js +0 -12
- package/dist/CreateMaafApp-2XYROOHB.js +0 -23
- package/dist/CreateMaafProject-Q7KIVAR2.js +0 -11
- package/dist/DeleteMaafApp-G3SL3GGP.js +0 -11
- package/dist/DeployMaafApp-DBJONCUH.js +0 -8
- package/dist/DeployMaafProject-SOMMKVJO.js +0 -11
- package/dist/DeploymentApprovals-Y67LSQQG.js +0 -11
- package/dist/Dev-TXJLPT7K.js +0 -15
- package/dist/FeatureSettings-LYV6QUZB.js +0 -11
- package/dist/GetMaafBuildStatus-ZR5GCREL.js +0 -11
- package/dist/GetMaafProjectDeployStatus-OJ56DPZ6.js +0 -12
- package/dist/InfoMaafApp-FJM7UI5H.js +0 -13
- package/dist/InfoMaafProject-EU6OQ7DX.js +0 -11
- package/dist/Init-MTONJT7V.js +0 -11
- package/dist/ListConnectorActions-PJTNNWLH.js +0 -11
- package/dist/ListConnectors-JYNVPB3O.js +0 -11
- package/dist/ListDeployments-UV6J6WA5.js +0 -11
- package/dist/ListMaafApps-QPEX7JA4.js +0 -11
- package/dist/ListMaafProjects-RDR2S3HD.js +0 -11
- package/dist/NodeMsalAuthenticationProvider-6ABSS6QK.js +0 -17
- package/dist/Pack-QJZCMVEM.js +0 -8
- package/dist/PackProject-Y3Q3KOTC.js +0 -14
- package/dist/PlayMaafApp-MH66OLOV.js +0 -8
- package/dist/ProjectApprovals-NTFYLH3W.js +0 -13
- package/dist/ProjectRoleAssignments-7IDK6SGJ.js +0 -11
- package/dist/RefreshDataSource-CISFHQNA.js +0 -11
- package/dist/RefreshGitAuth-NUQ7JNJA.js +0 -11
- package/dist/Remove-IYDTKDJE.js +0 -11
- package/dist/RemoveDeployment-K3GDRCXJ.js +0 -11
- package/dist/ServicePrincipalAuthenticationProvider-CEHIAANL.js +0 -11
- package/dist/SetSetting-PD76MA6O.js +0 -11
- package/dist/ShareLinkCreate-VCWVBQ4B.js +0 -11
- package/dist/ShareLinkList-5VG5CG34.js +0 -11
- package/dist/ShareLinkRevoke-KYUNMTG5.js +0 -11
- package/dist/ShareList-M25UE6LD.js +0 -11
- package/dist/ShareMaafApp-QMEJEXPZ.js +0 -11
- package/dist/UnshareMaafApp-RIUUYHIL.js +0 -11
- package/dist/chunk-36YYCVFC.js +0 -12
- package/dist/chunk-3UIUI5Q2.js +0 -11
- package/dist/chunk-B6REHI77.js +0 -11
- package/dist/chunk-GVLAG66W.js +0 -13
- package/dist/chunk-HWEMI6JI.js +0 -12
- package/dist/chunk-OB6WEE2V.js +0 -11
- package/dist/chunk-OBATM5M4.js +0 -11
- package/dist/chunk-PBXK6LJO.js +0 -11
- package/dist/chunk-VAKAW5BD.js +0 -12
- package/dist/chunk-WV7D7PTW.js +0 -12
- package/dist/chunk-YMRQPXY7.js +0 -32
- package/dist/chunk-YYXAAA2U.js +0 -11
- package/dist/rayfin-pack-HOUOLOHQ.js +0 -164
|
@@ -4,16 +4,16 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{n as z}from"./chunk-
|
|
7
|
+
import{n as z}from"./chunk-UHNOINTO.js";import{a as D}from"./chunk-DLUQVMUE.js";import{a as l}from"./chunk-AICYZHWK.js";import{a as H,b as w,d as we}from"./chunk-UT667QSU.js";var v=w(M=>{var S=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},N=class extends S{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};M.CommanderError=S;M.InvalidArgumentError=N});var F=w(L=>{var{InvalidArgumentError:xe}=v(),q=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new xe(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Oe(a){let e=a.name()+(a.variadic===!0?"...":"");return a.required?"<"+e+">":"["+e+"]"}L.Argument=q;L.humanReadableArgName=Oe});var W=w(se=>{var{humanReadableArgName:He}=F(),I=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden);if(e._hasImplicitHelpCommand()){let[,n,i]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),r=e.createCommand(n).helpOption(!1);r.description(e._helpCommandDescription),i&&r.arguments(i),t.push(r)}return this.sortSubcommands&&t.sort((n,i)=>n.name().localeCompare(i.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(r=>!r.hidden),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),i=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||i){let r;n?i?r=e.createOption(e._helpFlags,e._helpDescription):r=e.createOption(e._helpShortFlag,e._helpDescription):r=e.createOption(e._helpLongFlag,e._helpDescription),t.push(r)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(r=>!r.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e._args.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e._args.find(t=>t.description)?e._args:[]}subcommandTerm(e){let t=e._args.map(n=>He(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,i)=>Math.max(n,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,t.argumentTerm(i).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth||80,r=2,s=2;function p(m,b){if(b){let j=`${m.padEnd(n+s)}${b}`;return t.wrap(j,i-r,n+s)}return m}function o(m){return m.join(`
|
|
8
8
|
`).replace(/^/gm," ".repeat(r))}let c=[`Usage: ${t.commandUsage(e)}`,""],u=t.commandDescription(e);u.length>0&&(c=c.concat([t.wrap(u,i,0),""]));let h=t.visibleArguments(e).map(m=>p(t.argumentTerm(m),t.argumentDescription(m)));h.length>0&&(c=c.concat(["Arguments:",o(h),""]));let f=t.visibleOptions(e).map(m=>p(t.optionTerm(m),t.optionDescription(m)));if(f.length>0&&(c=c.concat(["Options:",o(f),""])),this.showGlobalOptions){let m=t.visibleGlobalOptions(e).map(b=>p(t.optionTerm(b),t.optionDescription(b)));m.length>0&&(c=c.concat(["Global Options:",o(m),""]))}let C=t.visibleCommands(e).map(m=>p(t.subcommandTerm(m),t.subcommandDescription(m)));return C.length>0&&(c=c.concat(["Commands:",o(C),""])),c.join(`
|
|
9
9
|
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){let r=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",s=new RegExp(`[\\n][${r}]+`);if(e.match(s))return e;let p=t-n;if(p<i)return e;let o=e.slice(0,n),c=e.slice(n).replace(`\r
|
|
10
10
|
`,`
|
|
11
11
|
`),u=" ".repeat(n),f="\\s\u200B",C=new RegExp(`
|
|
12
12
|
|.{1,${p-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g"),m=c.match(C)||[];return o+m.map((b,j)=>b===`
|
|
13
13
|
`?"":(j>0?u:"")+b.trimEnd()).join(`
|
|
14
|
-
`)}};se.Help=I});var G=
|
|
14
|
+
`)}};se.Help=I});var G=w(k=>{var{InvalidArgumentError:Te}=v(),R=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=ae(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Te(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return ve(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},U=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,r=i!==void 0?i:!1;return t.negate===(r===e)}};function ve(a){return a.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function ae(a){let e,t,n=a.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}k.Option=R;k.splitOptionFlags=ae;k.DualOptions=U});var le=w(oe=>{function Ee(a,e){if(Math.abs(a.length-e.length)>3)return Math.max(a.length,e.length);let t=[];for(let n=0;n<=a.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=a.length;i++){let r=1;a[i-1]===e[n-1]?r=0:r=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+r),i>1&&n>1&&a[i-1]===e[n-2]&&a[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[a.length][e.length]}function De(a,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=a.startsWith("--");t&&(a=a.slice(2),e=e.map(s=>s.slice(2)));let n=[],i=3,r=.4;return e.forEach(s=>{if(s.length<=1)return;let p=Ee(a,s),o=Math.max(a.length,s.length);(o-p)/o>r&&(p<i?(i=p,n=[s]):p===i&&n.push(s))}),n.sort((s,p)=>s.localeCompare(p)),t&&(n=n.map(s=>`--${s}`)),n.length>1?`
|
|
15
15
|
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
|
|
16
|
-
(Did you mean ${n[0]}?)`:""}oe.suggestSimilar=De});var me=
|
|
16
|
+
(Did you mean ${n[0]}?)`:""}oe.suggestSimilar=De});var me=w(de=>{var Ve=H("events").EventEmitter,B=H("child_process"),_=H("path"),K=H("fs"),d=H("process"),{Argument:$e,humanReadableArgName:Se}=F(),{CommanderError:J}=v(),{Help:Fe}=W(),{Option:pe,splitOptionFlags:ke,DualOptions:je}=G(),{suggestSimilar:ce}=le(),Y=class a extends Ve{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>d.stdout.write(t),writeErr:t=>d.stderr.write(t),getOutHelpWidth:()=>d.stdout.isTTY?d.stdout.columns:void 0,getErrHelpWidth:()=>d.stderr.isTTY?d.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,t,n){let i=t,r=n;typeof i=="object"&&i!==null&&(r=i,i=null),r=r||{};let[,s,p]=e.match(/([^ ]+) *(.*)/),o=this.createCommand(s);return i&&(o.description(i),o._executableHandler=!0),r.isDefault&&(this._defaultCommandName=o._name),o._hidden=!!(r.noHelp||r.hidden),o._executableFile=r.executableFile||null,p&&o.arguments(p),this.commands.push(o),o.parent=this,o.copyInheritedSettings(this),i?this:o}createCommand(e){return new a(e)}createHelp(){return Object.assign(new Fe,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
17
17
|
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,t){return new $e(e,t)}argument(e,t,n,i){let r=this.createArgument(e,t);return typeof n=="function"?r.default(i).argParser(n):r.default(n),this.addArgument(r),this}arguments(e){return e.split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this._args.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,t){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
18
18
|
Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new J(e,t,n)),d.exit(e)}action(e){let t=n=>{let i=this._args.length,r=n.slice(0,i);return this._storeOptionsAsProperties?r[i]=this:r[i]=this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new pe(e,t)}addOption(e){let t=e.name(),n=e.attributeName();if(e.negate){let r=e.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");this.options.push(e);let i=(r,s,p)=>{r==null&&e.presetArg!==void 0&&(r=e.presetArg);let o=this.getOptionValue(n);if(r!==null&&e.parseArg)try{r=e.parseArg(r,o)}catch(c){if(c.code==="commander.invalidArgument"){let u=`${s} ${c.message}`;this.error(u,{exitCode:c.exitCode,code:c.code})}throw c}else r!==null&&e.variadic&&(r=e._concatValue(r,o));r==null&&(e.negate?r=!1:e.isBoolean()||e.optional?r=!0:r=""),this.setOptionValueWithSource(n,r,p)};return this.on("option:"+t,r=>{let s=`error: option '${e.flags}' argument '${r}' is invalid.`;i(r,s,"cli")}),e.envVar&&this.on("optionEnv:"+t,r=>{let s=`error: option '${e.flags}' value '${r}' from env '${e.envVar}' is invalid.`;i(r,s,"env")}),this}_optionEx(e,t,n,i,r){if(typeof t=="object"&&t instanceof pe)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(t,n);if(s.makeOptionMandatory(!!e.mandatory),typeof i=="function")s.default(r).argParser(i);else if(i instanceof RegExp){let p=i;i=(o,c)=>{let u=p.exec(o);return u?u[0]:c},s.default(r).argParser(i)}else s.default(i);return this.addOption(s)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return E(this).forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=d.argv,d.versions&&d.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":d.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function r(u,h){let f=_.resolve(u,h);if(K.existsSync(f))return f;if(i.includes(_.extname(h)))return;let C=i.find(m=>K.existsSync(`${f}${m}`));if(C)return`${f}${C}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=e._executableFile||`${this._name}-${e._name}`,p=this._executableDir||"";if(this._scriptPath){let u;try{u=K.realpathSync(this._scriptPath)}catch{u=this._scriptPath}p=_.resolve(_.dirname(u),p)}if(p){let u=r(p,s);if(!u&&!e._executableFile&&this._scriptPath){let h=_.basename(this._scriptPath,_.extname(this._scriptPath));h!==this._name&&(u=r(p,`${h}-${e._name}`))}s=u||s}n=i.includes(_.extname(s));let o;d.platform!=="win32"?n?(t.unshift(s),t=he(d.execArgv).concat(t),o=B.spawn(d.argv[0],t,{stdio:"inherit"})):o=B.spawn(s,t,{stdio:"inherit"}):(t.unshift(s),t=he(d.execArgv).concat(t),o=B.spawn(d.execPath,t,{stdio:"inherit"})),o.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{d.on(h,()=>{o.killed===!1&&o.exitCode===null&&o.kill(h)})});let c=this._exitCallback;c?o.on("close",()=>{c(new J(d.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):o.on("close",d.exit.bind(d)),o.on("error",u=>{if(u.code==="ENOENT"){let h=p?`searched for local subcommand relative to directory '${p}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",f=`'${s}' does not exist
|
|
19
19
|
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
@@ -24,9 +24,9 @@ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
|
|
|
24
24
|
`),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,r=n.code||"commander.error";this._exit(i,r,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in d.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,d.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new je(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=s=>{let p=s.attributeName(),o=this.getOptionValue(p),c=this.options.find(h=>h.negate&&p===h.attributeName()),u=this.options.find(h=>!h.negate&&p===h.attributeName());return c&&(c.presetArg===void 0&&o===!1||c.presetArg!==void 0&&o===c.presetArg)?c:u||s},i=s=>{let p=n(s),o=p.attributeName();return this.getOptionValueSource(o)==="env"?`environment variable '${p.envVar}'`:`option '${p.flags}'`},r=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],r=this;do{let s=r.createHelp().visibleOptions(r).filter(p=>p.long).map(p=>p.long);i=i.concat(s),r=r.parent}while(r&&!r._enablePositionalOptions);t=ce(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this._args.length,n=t===1?"":"s",r=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(r=>{i.push(r.name()),r.alias()&&i.push(r.alias())}),t=ce(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this.options.push(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
25
25
|
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this._args.map(n=>Se(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=_.basename(e,_.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},n;return t.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getHelpContext(e);E(this).reverse().forEach(r=>r.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this.emit(this._helpLongFlag),this.emit("afterHelp",n),E(this).forEach(r=>r.emit("afterAllHelp",n))}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=ke(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e);let t=d.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
26
26
|
Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,r=>{let s;typeof t=="function"?s=t({error:r.error,command:r.command}):s=t,s&&r.write(`${s}
|
|
27
|
-
`)}),this}};function ue(a,e){a._hasHelpOption&&e.find(n=>n===a._helpLongFlag||n===a._helpShortFlag)&&(a.outputHelp(),a._exit(0,"commander.helpDisplayed","(outputHelp)"))}function he(a){return a.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",r;return(r=e.match(/^(--inspect(-brk)?)$/))!==null?t=r[1]:(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=r[1],/^\d+$/.test(r[3])?i=r[3]:n=r[3]):(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=r[1],n=r[3],i=r[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}function E(a){let e=[];for(let t=a;t;t=t.parent)e.push(t);return e}de.Command=Y});var _e=x((g,ye)=>{var{Argument:ze}=F(),{Command:fe}=me(),{CommanderError:Ne,InvalidArgumentError:ge}=v(),{Help:Pe}=W(),{Option:Me}=G();g=ye.exports=new fe;g.program=g;g.Argument=ze;g.Command=fe;g.CommanderError=Ne;g.Help=Pe;g.InvalidArgumentError=ge;g.InvalidOptionArgumentError=ge;g.Option=Me});function te(a){return a.requiresFeature===void 0||z(a.requiresFeature)}function A(a){return a.typed===!0}function V(a){return typeof a.lazyHandler=="function"}function w(a,e){if(!Object.prototype.hasOwnProperty.call(a,e))return;let t=a[e];return te(t)?t:void 0}function $(a){return Object.entries(a).filter(([,e])=>te(e))}function N(a){return a.requiresFeature!==void 0&&!z(a.requiresFeature)?!1:$(a.commands).length>0}function ne(a){return Object.entries(a).filter(([,e])=>N(e))}function We(a,e){let t=a.slice(2);if(t.length===0||t[0].startsWith("-"))return null;let[n]=t;return T(n,e)?ie(e[n].commands,t,1,[n]):null}function ie(a,e,t,n){if(t>=e.length)return null;let i=e[t];if(i.startsWith("-"))return null;let r=w(a,i);if(!r)return null;let s=[...n,i];if(!A(r))return{path:s,lazyHandler:r.lazyHandler,tokensConsumed:t+1,...r.localOnly?{localOnly:r.localOnly}:{}};let p=e[t+1];return p!==void 0&&!p.startsWith("-")&&w(r.commands,p)!==void 0?ie(r.commands,e,t+1,s):V(r)?{path:s,lazyHandler:r.lazyHandler,tokensConsumed:t+1}:null}function Re(a,e){let t=a.slice(2),n=t.findIndex(u=>u.startsWith("-")),i=n===-1?t:t.slice(0,n);if(i.length<2)return null;let[r,...s]=i;if(!T(r,e))return null;let p=e[r].commands,o=[r],c=!1;for(let u of s){let h=w(p,u);if(!h)return c?{pathTokens:o,unknownToken:u}:null;if(!A(h))return null;o.push(u),p=h.commands,c=!0}return c?{pathTokens:o,unknownToken:void 0}:null}function T(a,e){return Object.prototype.hasOwnProperty.call(e,a)?N(e[a]):!1}var O={auth:{"@description":"Manage authentication state.",commands:{login:{"@helpText":l.auth.login.description,lazyHandler:async()=>(await import("./Login-G7TNQISG.js")).loginAsync},logout:{"@helpText":l.auth.logout.description,lazyHandler:async()=>(await import("./Logout-AOOISVWK.js")).logoutAsync},status:{"@helpText":l.auth.status.description,lazyHandler:async()=>(await import("./AuthStatus-XA6RGYYZ.js")).authStatusAsync},switch:{"@helpText":l.auth.switch.description,lazyHandler:async()=>(await import("./AuthSwitch-2FXB7WFU.js")).authSwitchAsync}}},app:{"@description":"Manage apps and their resources.",commands:{clone:{"@helpText":l.app.clone.description,lazyHandler:async()=>(await import("./CloneMaafApp-YAEYSP23.js")).cloneMaafAppAsync},create:{"@helpText":l.app.create.description,lazyHandler:async()=>(await import("./CreateMaafApp-2XYROOHB.js")).createMaafAppAsync},init:{"@helpText":l.app.init.description,lazyHandler:async()=>(await import("./Init-MTONJT7V.js")).initAsync},list:{"@helpText":l.app.list.description,lazyHandler:async()=>(await import("./ListMaafApps-QPEX7JA4.js")).listMaafAppsAsync},show:{"@helpText":l.app.show.deprecation,lazyHandler:async()=>(await import("./InfoMaafApp-FJM7UI5H.js")).showMaafAppAsync},share:{typed:!0,"@helpText":l.app.share.description,lazyHandler:async()=>(await import("./ShareMaafApp-QMEJEXPZ.js")).shareMaafAppAsync,commands:{link:{typed:!0,"@helpText":l.app.shareLink.description,commands:{create:{"@helpText":l.app.shareLink.create.description,lazyHandler:async()=>(await import("./ShareLinkCreate-VCWVBQ4B.js")).shareLinkCreateAsync},list:{"@helpText":l.app.shareLink.list.description,lazyHandler:async()=>(await import("./ShareLinkList-5VG5CG34.js")).shareLinkListAsync},revoke:{"@helpText":l.app.shareLink.revoke.description,lazyHandler:async()=>(await import("./ShareLinkRevoke-KYUNMTG5.js")).shareLinkRevokeAsync}}},list:{"@helpText":l.app.share.list.description,lazyHandler:async()=>(await import("./ShareList-M25UE6LD.js")).shareListAsync}}},unshare:{"@helpText":l.app.unshare.description,lazyHandler:async()=>(await import("./UnshareMaafApp-RIUUYHIL.js")).unshareMaafAppAsync},info:{"@helpText":l.app.info.description,lazyHandler:async()=>(await import("./InfoMaafApp-FJM7UI5H.js")).infoMaafAppAsync},build:{"@helpText":l.app.build.description,lazyHandler:async()=>(await import("./BuildMaafApp-3EGRD23G.js")).buildMaafAppAsync},"build-status":{"@helpText":l.app.buildStatus.description,lazyHandler:async()=>(await import("./GetMaafBuildStatus-ZR5GCREL.js")).getMaafBuildStatusAsync},deploy:{"@helpText":l.app.deploy.description,lazyHandler:async()=>(await import("./DeployMaafApp-DBJONCUH.js")).deployMaafAppAsync},pack:{"@helpText":l.app.pack.description,lazyHandler:async()=>(await import("./Pack-QJZCMVEM.js")).packAsync},play:{"@helpText":l.app.play.description,lazyHandler:async()=>(await import("./PlayMaafApp-MH66OLOV.js")).playMaafAppAsync},dev:{"@helpText":l.app.dev.description,lazyHandler:async()=>(await import("./Dev-TXJLPT7K.js")).devAsync},delete:{"@helpText":l.app.delete.description,lazyHandler:async()=>(await import("./DeleteMaafApp-G3SL3GGP.js")).deleteMaafAppAsync},refresh:{typed:!0,commands:{"data-source":{"@helpText":l.app.refresh.dataSource.description,lazyHandler:async()=>(await import("./RefreshDataSource-CISFHQNA.js")).refreshDataSourceAsync}}},override:{typed:!0,requiresFeature:"alm",commands:{"data-source":{"@helpText":l.app.override.dataSource.description,lazyHandler:async()=>(await import("./AddDeploymentBinding-6FZ7Y5JM.js")).overrideDataSourceAsync}}},add:{typed:!0,commands:{config:{"@helpText":l.app.add.config.description,requiresFeature:"alm",lazyHandler:async()=>(await import("./AddConfig-4SAYYOBQ.js")).addConfigAsync},backend:{"@helpText":l.app.add.backend.description,requiresFeature:"rayfin",lazyHandler:async()=>(await import("./AddRayfin-35GBGCWF.js")).addRayfinAsync},"data-source":{"@helpText":l.app.add.connector.description,lazyHandler:async()=>(await import("./AddConnector-P4R4NJ5P.js")).addConnectorAsync},connector:{"@helpText":"(deprecated) Use 'data-source' instead.",lazyHandler:async()=>(await import("./AddConnector-P4R4NJ5P.js")).addConnectorAsync}}},remove:{typed:!0,commands:{"data-source":{"@helpText":l.app.remove.description,lazyHandler:async()=>(await import("./RemoveDataSource-T2AG7ZWC.js")).removeDataSourceAsync},connector:{"@helpText":"(deprecated) Use 'data-source' instead.",lazyHandler:async()=>(await import("./RemoveDataSource-T2AG7ZWC.js")).removeDataSourceAsync}}},"set-setting":{"@helpText":l.app["set-setting"].description,lazyHandler:async()=>(await import("./SetSetting-PD76MA6O.js")).setSettingAsync},"get-settings":{"@helpText":l.app["get-settings"].description,lazyHandler:async()=>(await import("./GetSettings-64N4P6L7.js")).getSettingsAsync}}},project:{"@description":"Manage projects.",commands:{assign:{"@helpText":l.project.assign.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./ProjectRoleAssignments-7IDK6SGJ.js")).assignProjectRoleAsyncVerb},unassign:{"@helpText":l.project.unassign.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./ProjectRoleAssignments-7IDK6SGJ.js")).unassignProjectRoleAsyncVerb},add:{typed:!0,requiresFeature:"projects",commands:{"deployment-target":{"@helpText":l.project.add.deployment.description,lazyHandler:async()=>(await import("./AddDeployment-TBA3AAGD.js")).addDeploymentAsync},approval:{"@helpText":l.project.add.approval.description,lazyHandler:async()=>(await import("./ProjectApprovals-NTFYLH3W.js")).addProjectApprovalAsync}}},create:{"@helpText":l.project.create.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./CreateMaafProject-Q7KIVAR2.js")).createMaafProjectAsync},info:{"@helpText":l.project.info.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./InfoMaafProject-EU6OQ7DX.js")).infoMaafProjectAsync},list:{typed:!0,"@helpText":l.project.list.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./ListMaafProjects-RDR2S3HD.js")).listMaafProjectsAsync,commands:{approval:{"@helpText":l.project.list.approval.description,lazyHandler:async()=>(await import("./ProjectApprovals-NTFYLH3W.js")).listProjectApprovalAsync}}},remove:{typed:!0,requiresFeature:"projects",commands:{"deployment-target":{"@helpText":l.project.remove.deployment.description,lazyHandler:async()=>(await import("./RemoveDeployment-K3GDRCXJ.js")).removeDeploymentAsync},approval:{"@helpText":l.project.remove.approval.description,lazyHandler:async()=>(await import("./ProjectApprovals-NTFYLH3W.js")).removeProjectApprovalAsync}}},build:{"@helpText":l.project.build.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./BuildMaafApp-3EGRD23G.js")).buildMaafProjectAsync},deploy:{"@helpText":l.project.deploy.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./DeployMaafProject-SOMMKVJO.js")).deployMaafProjectAsync},"deployment-status":{"@helpText":l.project.deployStatus.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./GetMaafProjectDeployStatus-OJ56DPZ6.js")).getMaafProjectDeployStatusAsync},"build-status":{"@helpText":l.project.buildStatus.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./GetMaafBuildStatus-ZR5GCREL.js")).getMaafProjectBuildStatusAsync},pack:{"@helpText":l.project.pack.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./PackProject-Y3Q3KOTC.js")).packProjectAsync},state:{typed:!0,"@helpText":l.project.state.description,requiresFeature:"state",commands:{clear:{"@helpText":l.project.state.clear.description,lazyHandler:async()=>(await import("./Clear-MZGQZ2XK.js")).clearDataAsync},"generate-code":{"@helpText":l.project.state["generate-code"].description,localOnly:!0,lazyHandler:async()=>(await import("./GenerateCode-Z2OY3SZR.js")).dataGenerateCodeAsync},add:{"@helpText":l.project.state.add.description,lazyHandler:async()=>(await import("./Add-75RSJNM4.js")).dataAddAsync},alter:{"@helpText":l.project.state.alter.description,lazyHandler:async()=>(await import("./Alter-U7WDVOMU.js")).dataAlterAsync},remove:{"@helpText":l.project.state.remove.description,lazyHandler:async()=>(await import("./Remove-IYDTKDJE.js")).dataRemoveAsync},"list-schema":{"@helpText":l.project.state["list-schema"].description,lazyHandler:async()=>(await import("./ListSchema-IR7FTBRR.js")).dataListSchemaAsync},"list-settings":{"@helpText":l.project.state["list-settings"].description,lazyHandler:async()=>(await import("./ListSettings-3M7UOOLI.js")).dataListSettingsAsync},"set-setting":{"@helpText":l.project.state["set-setting"].description,lazyHandler:async()=>(await import("./SetSetting-KOWAPJWX.js")).dataSetSettingAsync}}}}},connector:{"@description":"Discover available connectors and their operations.",commands:{list:{"@helpText":l.connector.list.description,lazyHandler:async()=>(await import("./ListConnectors-JYNVPB3O.js")).listConnectorsCliAsync},"list-actions":{"@helpText":l.connector["list-actions"].description,lazyHandler:async()=>(await import("./ListConnectorActions-PJTNNWLH.js")).listConnectorActionsCliAsync}}},deployment:{"@description":"Inspect deployment history and manage deployment approvals.",requiresFeature:"projects",commands:{list:{"@helpText":l.deployment.list.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./ListDeployments-UV6J6WA5.js")).listDeploymentsAsync},status:{"@helpText":l.deployment.status.description,lazyHandler:async()=>(await import("./GetMaafProjectDeployStatus-OJ56DPZ6.js")).getMaafProjectDeployStatusAsync},approve:{"@helpText":l.deployment.approve.description,lazyHandler:async()=>(await import("./DeploymentApprovals-Y67LSQQG.js")).approveDeploymentAsync},reject:{"@helpText":l.deployment.reject.description,lazyHandler:async()=>(await import("./DeploymentApprovals-Y67LSQQG.js")).rejectDeploymentAsync},cancel:{"@helpText":l.deployment.cancel.description,lazyHandler:async()=>(await import("./DeploymentApprovals-Y67LSQQG.js")).cancelDeploymentAsync}}},git:{"@description":"Manage GitHub integration for apps.",commands:{auth:{typed:!0,commands:{refresh:{"@helpText":l.git.auth.refresh.description,lazyHandler:async()=>(await import("./RefreshGitAuth-NUQ7JNJA.js")).refreshGitAuthAsync}}}}},telemetry:{"@description":"Manage CLI telemetry settings.",commands:{enable:{"@helpText":l.telemetry.enable.description,lazyHandler:async()=>(await import("./TelemetrySettings-FVJUK5MR.js")).telemetryEnableAsync},disable:{"@helpText":l.telemetry.disable.description,lazyHandler:async()=>(await import("./TelemetrySettings-FVJUK5MR.js")).telemetryDisableAsync},status:{"@helpText":l.telemetry.status.description,lazyHandler:async()=>(await import("./TelemetrySettings-FVJUK5MR.js")).telemetryStatusAsync}}},feature:{"@description":"Manage experimental and preview CLI features.",commands:{list:{"@helpText":l.feature.list.description,lazyHandler:async()=>(await import("./FeatureSettings-LYV6QUZB.js")).featureListAsync},status:{"@helpText":l.feature.status.description,lazyHandler:async()=>(await import("./FeatureSettings-LYV6QUZB.js")).featureStatusAsync},enable:{"@helpText":l.feature.enable.description,lazyHandler:async()=>(await import("./FeatureSettings-LYV6QUZB.js")).featureEnableAsync},disable:{"@helpText":l.feature.disable.description,lazyHandler:async()=>(await import("./FeatureSettings-LYV6QUZB.js")).featureDisableAsync},reset:{"@helpText":l.feature.reset.description,lazyHandler:async()=>(await import("./FeatureSettings-LYV6QUZB.js")).featureResetAsync}}}};function re(){return`${"ms"} v${D.version} (preview)`}var be=xe(_e(),1),{program:it,createCommand:rt,createArgument:st,createOption:at,CommanderError:ot,InvalidArgumentError:lt,InvalidOptionArgumentError:pt,Command:Q,Argument:ct,Option:ut,Help:Ae}=be.default;function X(a,e,t){let n=new Ae;n.helpWidth=process.stdout.columns??80;let i=Math.max(...t.map(([p])=>p.length),8),r=2,s=2;a.push(e);for(let[p,o]of t){let c=`${p.padEnd(i+s)}${o}`;a.push(n.wrap(c,n.helpWidth-r,i+s,1).replace(/^/gm," ".repeat(r)))}}function Ce(){let a=[],e=ne(O);if(e.length>0){let t=Math.max(...e.map(([i])=>i.length)),n=Math.max(t+2,10);a.push("Command Groups:"),a.push("");for(let[i,r]of e)a.push(` ${i.padEnd(n)} ${r["@description"]}`);a.push(""),a.push(`Run '${"ms"} <group> --help' for commands within a group.`)}return a.join(`
|
|
27
|
+
`)}),this}};function ue(a,e){a._hasHelpOption&&e.find(n=>n===a._helpLongFlag||n===a._helpShortFlag)&&(a.outputHelp(),a._exit(0,"commander.helpDisplayed","(outputHelp)"))}function he(a){return a.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",r;return(r=e.match(/^(--inspect(-brk)?)$/))!==null?t=r[1]:(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=r[1],/^\d+$/.test(r[3])?i=r[3]:n=r[3]):(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=r[1],n=r[3],i=r[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}function E(a){let e=[];for(let t=a;t;t=t.parent)e.push(t);return e}de.Command=Y});var _e=w((g,ye)=>{var{Argument:ze}=F(),{Command:fe}=me(),{CommanderError:Pe,InvalidArgumentError:ge}=v(),{Help:Ne}=W(),{Option:Me}=G();g=ye.exports=new fe;g.program=g;g.Argument=ze;g.Command=fe;g.CommanderError=Pe;g.Help=Ne;g.InvalidArgumentError=ge;g.InvalidOptionArgumentError=ge;g.Option=Me});function te(a){return a.requiresFeature===void 0||z(a.requiresFeature)}function A(a){return a.typed===!0}function V(a){return typeof a.lazyHandler=="function"}function x(a,e){if(!Object.prototype.hasOwnProperty.call(a,e))return;let t=a[e];return te(t)?t:void 0}function $(a){return Object.entries(a).filter(([,e])=>te(e))}function P(a){return a.requiresFeature!==void 0&&!z(a.requiresFeature)?!1:$(a.commands).length>0}function ne(a){return Object.entries(a).filter(([,e])=>P(e))}function We(a,e){let t=a.slice(2);if(t.length===0||t[0].startsWith("-"))return null;let[n]=t;return T(n,e)?ie(e[n].commands,t,1,[n]):null}function ie(a,e,t,n){if(t>=e.length)return null;let i=e[t];if(i.startsWith("-"))return null;let r=x(a,i);if(!r)return null;let s=[...n,i];if(!A(r))return{path:s,lazyHandler:r.lazyHandler,tokensConsumed:t+1,...r.localOnly?{localOnly:r.localOnly}:{}};let p=e[t+1];return p!==void 0&&!p.startsWith("-")&&x(r.commands,p)!==void 0?ie(r.commands,e,t+1,s):V(r)?{path:s,lazyHandler:r.lazyHandler,tokensConsumed:t+1}:null}function Re(a,e){let t=a.slice(2),n=t.findIndex(u=>u.startsWith("-")),i=n===-1?t:t.slice(0,n);if(i.length<2)return null;let[r,...s]=i;if(!T(r,e))return null;let p=e[r].commands,o=[r],c=!1;for(let u of s){let h=x(p,u);if(!h)return c?{pathTokens:o,unknownToken:u}:null;if(!A(h))return null;o.push(u),p=h.commands,c=!0}return c?{pathTokens:o,unknownToken:void 0}:null}function T(a,e){return Object.prototype.hasOwnProperty.call(e,a)?P(e[a]):!1}var O={admin:{"@description":"Administer managed resources.",commands:{project:{typed:!0,"@helpText":"Administer managed projects.",commands:{"assign-owner":{"@helpText":l.admin.project.assignOwner.description,lazyHandler:async()=>(await import("./ProjectRoleAssignments-7IUDEVBN.js")).assignProjectOwnerAsyncVerb}}}}},auth:{"@description":"Manage authentication state.",commands:{login:{"@helpText":l.auth.login.description,lazyHandler:async()=>(await import("./Login-XZATPT4L.js")).loginAsync},logout:{"@helpText":l.auth.logout.description,lazyHandler:async()=>(await import("./Logout-2XM4IMZF.js")).logoutAsync},status:{"@helpText":l.auth.status.description,lazyHandler:async()=>(await import("./AuthStatus-W5ZHOAVD.js")).authStatusAsync},switch:{"@helpText":l.auth.switch.description,lazyHandler:async()=>(await import("./AuthSwitch-7HRPTGEG.js")).authSwitchAsync}}},app:{"@description":"Manage apps and their resources.",commands:{clone:{"@helpText":l.app.clone.description,lazyHandler:async()=>(await import("./CloneMaafApp-4EHW3HE2.js")).cloneMaafAppAsync},create:{"@helpText":l.app.create.description,lazyHandler:async()=>(await import("./CreateMaafApp-VNXWCAP4.js")).createMaafAppAsync},init:{"@helpText":l.app.init.description,lazyHandler:async()=>(await import("./Init-TYWP2E6U.js")).initAsync},list:{"@helpText":l.app.list.description,lazyHandler:async()=>(await import("./ListMaafApps-UAWTTCGB.js")).listMaafAppsAsync},show:{"@helpText":l.app.show.deprecation,lazyHandler:async()=>(await import("./InfoMaafApp-CTB6IPRU.js")).showMaafAppAsync},share:{typed:!0,"@helpText":l.app.share.description,lazyHandler:async()=>(await import("./ShareMaafApp-ZCY72WHK.js")).shareMaafAppAsync,commands:{link:{typed:!0,"@helpText":l.app.shareLink.description,commands:{create:{"@helpText":l.app.shareLink.create.description,lazyHandler:async()=>(await import("./ShareLinkCreate-JXPW5H7A.js")).shareLinkCreateAsync},list:{"@helpText":l.app.shareLink.list.description,lazyHandler:async()=>(await import("./ShareLinkList-ICYPRIQV.js")).shareLinkListAsync},revoke:{"@helpText":l.app.shareLink.revoke.description,lazyHandler:async()=>(await import("./ShareLinkRevoke-JVMQZF7K.js")).shareLinkRevokeAsync}}},list:{"@helpText":l.app.share.list.description,lazyHandler:async()=>(await import("./ShareList-YGSTFMVE.js")).shareListAsync}}},unshare:{"@helpText":l.app.unshare.description,lazyHandler:async()=>(await import("./UnshareMaafApp-N4UR6Q4A.js")).unshareMaafAppAsync},info:{"@helpText":l.app.info.description,lazyHandler:async()=>(await import("./InfoMaafApp-CTB6IPRU.js")).infoMaafAppAsync},build:{"@helpText":l.app.build.description,lazyHandler:async()=>(await import("./BuildMaafApp-TLQXOVQC.js")).buildMaafAppAsync},"build-status":{"@helpText":l.app.buildStatus.description,lazyHandler:async()=>(await import("./GetMaafBuildStatus-UTPVWF5L.js")).getMaafBuildStatusAsync},deploy:{"@helpText":l.app.deploy.description,lazyHandler:async()=>(await import("./DeployMaafApp-GJO567TK.js")).deployMaafAppAsync},pack:{"@helpText":l.app.pack.description,lazyHandler:async()=>(await import("./Pack-RH4D4C7W.js")).packAsync},play:{"@helpText":l.app.play.description,lazyHandler:async()=>(await import("./PlayMaafApp-5BXGXE6O.js")).playMaafAppAsync},dev:{"@helpText":l.app.dev.description,lazyHandler:async()=>(await import("./Dev-ZD3L6WYY.js")).devAsync},delete:{"@helpText":l.app.delete.description,lazyHandler:async()=>(await import("./DeleteMaafApp-UGUKARMO.js")).deleteMaafAppAsync},refresh:{typed:!0,commands:{"data-source":{"@helpText":l.app.refresh.dataSource.description,lazyHandler:async()=>(await import("./RefreshDataSource-CMHDF2GP.js")).refreshDataSourceAsync}}},override:{typed:!0,requiresFeature:"alm",commands:{"data-source":{"@helpText":l.app.override.dataSource.description,lazyHandler:async()=>(await import("./AddDeploymentBinding-BZVRRZ7H.js")).overrideDataSourceAsync}}},add:{typed:!0,commands:{config:{"@helpText":l.app.add.config.description,requiresFeature:"alm",lazyHandler:async()=>(await import("./AddConfig-D2DCR3JH.js")).addConfigAsync},backend:{"@helpText":l.app.add.backend.description,requiresFeature:"rayfin",lazyHandler:async()=>(await import("./AddRayfin-45ASHNIX.js")).addRayfinAsync},"data-source":{"@helpText":l.app.add.connector.description,lazyHandler:async()=>(await import("./AddConnector-5ZR5AF6H.js")).addConnectorAsync},connector:{"@helpText":"(deprecated) Use 'data-source' instead.",lazyHandler:async()=>(await import("./AddConnector-5ZR5AF6H.js")).addConnectorAsync}}},remove:{typed:!0,commands:{"data-source":{"@helpText":l.app.remove.description,lazyHandler:async()=>(await import("./RemoveDataSource-C7UXOUNH.js")).removeDataSourceAsync},connector:{"@helpText":"(deprecated) Use 'data-source' instead.",lazyHandler:async()=>(await import("./RemoveDataSource-C7UXOUNH.js")).removeDataSourceAsync}}},"set-setting":{"@helpText":l.app["set-setting"].description,lazyHandler:async()=>(await import("./SetSetting-3XO6HPG7.js")).setSettingAsync},"get-settings":{"@helpText":l.app["get-settings"].description,lazyHandler:async()=>(await import("./GetSettings-RLRDJEC7.js")).getSettingsAsync}}},project:{"@description":"Manage projects.",commands:{assign:{"@helpText":l.project.assign.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./ProjectRoleAssignments-7IUDEVBN.js")).assignProjectRoleAsyncVerb},unassign:{"@helpText":l.project.unassign.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./ProjectRoleAssignments-7IUDEVBN.js")).unassignProjectRoleAsyncVerb},add:{typed:!0,requiresFeature:"projects",commands:{"deployment-target":{"@helpText":l.project.add.deployment.description,lazyHandler:async()=>(await import("./AddDeployment-7U4I5IC4.js")).addDeploymentAsync},approval:{"@helpText":l.project.add.approval.description,lazyHandler:async()=>(await import("./ProjectApprovals-K3JF6D72.js")).addProjectApprovalAsync}}},create:{"@helpText":l.project.create.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./CreateMaafProject-WVBNZPVL.js")).createMaafProjectAsync},info:{"@helpText":l.project.info.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./InfoMaafProject-TULH566X.js")).infoMaafProjectAsync},list:{typed:!0,"@helpText":l.project.list.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./ListMaafProjects-T3Q2GEDX.js")).listMaafProjectsAsync,commands:{approval:{"@helpText":l.project.list.approval.description,lazyHandler:async()=>(await import("./ProjectApprovals-K3JF6D72.js")).listProjectApprovalAsync}}},remove:{typed:!0,requiresFeature:"projects",commands:{"deployment-target":{"@helpText":l.project.remove.deployment.description,lazyHandler:async()=>(await import("./RemoveDeployment-ZQJWQPD6.js")).removeDeploymentAsync},approval:{"@helpText":l.project.remove.approval.description,lazyHandler:async()=>(await import("./ProjectApprovals-K3JF6D72.js")).removeProjectApprovalAsync}}},build:{"@helpText":l.project.build.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./BuildMaafApp-TLQXOVQC.js")).buildMaafProjectAsync},deploy:{"@helpText":l.project.deploy.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./DeployMaafProject-4TSW2SFJ.js")).deployMaafProjectAsync},"deployment-status":{"@helpText":l.project.deployStatus.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./GetMaafProjectDeployStatus-PLK52YC4.js")).getMaafProjectDeployStatusAsync},"build-status":{"@helpText":l.project.buildStatus.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./GetMaafBuildStatus-UTPVWF5L.js")).getMaafProjectBuildStatusAsync},pack:{"@helpText":l.project.pack.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./PackProject-5DUWSBFA.js")).packProjectAsync},state:{typed:!0,"@helpText":l.project.state.description,requiresFeature:"state",commands:{clear:{"@helpText":l.project.state.clear.description,lazyHandler:async()=>(await import("./Clear-X55BZKYF.js")).clearDataAsync},"generate-code":{"@helpText":l.project.state["generate-code"].description,localOnly:!0,lazyHandler:async()=>(await import("./GenerateCode-PNYC45SK.js")).dataGenerateCodeAsync},add:{"@helpText":l.project.state.add.description,lazyHandler:async()=>(await import("./Add-4RULNL6A.js")).dataAddAsync},alter:{"@helpText":l.project.state.alter.description,lazyHandler:async()=>(await import("./Alter-36TSNZ4M.js")).dataAlterAsync},remove:{"@helpText":l.project.state.remove.description,lazyHandler:async()=>(await import("./Remove-KZD3SDDC.js")).dataRemoveAsync},"list-schema":{"@helpText":l.project.state["list-schema"].description,lazyHandler:async()=>(await import("./ListSchema-G673LK5Q.js")).dataListSchemaAsync},"list-settings":{"@helpText":l.project.state["list-settings"].description,lazyHandler:async()=>(await import("./ListSettings-EXCK5ZS6.js")).dataListSettingsAsync},"set-setting":{"@helpText":l.project.state["set-setting"].description,lazyHandler:async()=>(await import("./SetSetting-ZW7F43GC.js")).dataSetSettingAsync}}}}},connector:{"@description":"Discover available connectors and their operations.",commands:{list:{"@helpText":l.connector.list.description,lazyHandler:async()=>(await import("./ListConnectors-OCDO64AT.js")).listConnectorsCliAsync},"list-actions":{"@helpText":l.connector["list-actions"].description,lazyHandler:async()=>(await import("./ListConnectorActions-UQS6D4UN.js")).listConnectorActionsCliAsync}}},deployment:{"@description":"Inspect deployment history and manage deployment approvals.",requiresFeature:"projects",commands:{list:{"@helpText":l.deployment.list.description,requiresFeature:"projects",lazyHandler:async()=>(await import("./ListDeployments-PDLJ3IEI.js")).listDeploymentsAsync},status:{"@helpText":l.deployment.status.description,lazyHandler:async()=>(await import("./GetMaafProjectDeployStatus-PLK52YC4.js")).getMaafProjectDeployStatusAsync},approve:{"@helpText":l.deployment.approve.description,lazyHandler:async()=>(await import("./DeploymentApprovals-SZKNJT76.js")).approveDeploymentAsync},reject:{"@helpText":l.deployment.reject.description,lazyHandler:async()=>(await import("./DeploymentApprovals-SZKNJT76.js")).rejectDeploymentAsync},cancel:{"@helpText":l.deployment.cancel.description,lazyHandler:async()=>(await import("./DeploymentApprovals-SZKNJT76.js")).cancelDeploymentAsync}}},git:{"@description":"Manage GitHub integration for apps.",commands:{auth:{typed:!0,commands:{refresh:{"@helpText":l.git.auth.refresh.description,lazyHandler:async()=>(await import("./RefreshGitAuth-4TRO5IOQ.js")).refreshGitAuthAsync}}}}},telemetry:{"@description":"Manage CLI telemetry settings.",commands:{enable:{"@helpText":l.telemetry.enable.description,lazyHandler:async()=>(await import("./TelemetrySettings-P6WYWGW4.js")).telemetryEnableAsync},disable:{"@helpText":l.telemetry.disable.description,lazyHandler:async()=>(await import("./TelemetrySettings-P6WYWGW4.js")).telemetryDisableAsync},status:{"@helpText":l.telemetry.status.description,lazyHandler:async()=>(await import("./TelemetrySettings-P6WYWGW4.js")).telemetryStatusAsync}}},feature:{"@description":"Manage experimental and preview CLI features.",commands:{list:{"@helpText":l.feature.list.description,lazyHandler:async()=>(await import("./FeatureSettings-GG7JGFIY.js")).featureListAsync},status:{"@helpText":l.feature.status.description,lazyHandler:async()=>(await import("./FeatureSettings-GG7JGFIY.js")).featureStatusAsync},enable:{"@helpText":l.feature.enable.description,lazyHandler:async()=>(await import("./FeatureSettings-GG7JGFIY.js")).featureEnableAsync},disable:{"@helpText":l.feature.disable.description,lazyHandler:async()=>(await import("./FeatureSettings-GG7JGFIY.js")).featureDisableAsync},reset:{"@helpText":l.feature.reset.description,lazyHandler:async()=>(await import("./FeatureSettings-GG7JGFIY.js")).featureResetAsync}}}};function re(){return`${"ms"} v${D.version}`}var be=we(_e(),1),{program:it,createCommand:rt,createArgument:st,createOption:at,CommanderError:ot,InvalidArgumentError:lt,InvalidOptionArgumentError:pt,Command:Q,Argument:ct,Option:ut,Help:Ae}=be.default;function X(a,e,t){let n=new Ae;n.helpWidth=process.stdout.columns??80;let i=Math.max(...t.map(([p])=>p.length),8),r=2,s=2;a.push(e);for(let[p,o]of t){let c=`${p.padEnd(i+s)}${o}`;a.push(n.wrap(c,n.helpWidth-r,i+s,1).replace(/^/gm," ".repeat(r)))}}function Ce(){let a=[],e=ne(O);if(e.length>0){let t=Math.max(...e.map(([i])=>i.length)),n=Math.max(t+2,10);a.push("Command Groups:"),a.push("");for(let[i,r]of e)a.push(` ${i.padEnd(n)} ${r["@description"]}`);a.push(""),a.push(`Run '${"ms"} <group> --help' for commands within a group.`)}return a.join(`
|
|
28
28
|
`)}function _t(a){if(!T(a,O))return"";let e=O[a],t=[];t.push(`Usage: ${"ms"} ${a} <command> [flags]`),t.push(""),t.push(e["@description"]),t.push("");let n=[],i=[];for(let[r,s]of $(e.commands))if(A(s)){let p=s["@helpText"];V(s)&&p!==void 0?(n.push([r,p]),i.push([r,s])):p!==void 0?n.push([r,p]):i.push([r,s])}else n.push([r,s["@helpText"]]);if(n.length>0&&X(t,"Commands:",n),i.length>0){t.push("");for(let[r,s]of i)X(t,`${r} <type>:`,Z(s,r).map(([p,o])=>[p,o]))}return t.push(""),t.push(`Run '${"ms"} ${a} <command> --help' for command-specific flags.`),t.join(`
|
|
29
|
-
`)}function Z(a,e){let t=[];for(let[n,i]of $(a.commands)){let r=e?`${e} ${n}`:n;A(i)?t.push(...Z(i,r)):t.push([r,i["@helpText"]])}return t}function bt(a){if(a.length<2)return null;let[e,...t]=a;if(!T(e,O))return null;let n=O[e].commands,i;for(let p of t){let o=
|
|
29
|
+
`)}function Z(a,e){let t=[];for(let[n,i]of $(a.commands)){let r=e?`${e} ${n}`:n;A(i)?t.push(...Z(i,r)):t.push([r,i["@helpText"]])}return t}function bt(a){if(a.length<2)return null;let[e,...t]=a;if(!T(e,O))return null;let n=O[e].commands,i;for(let p of t){let o=x(n,p);if(!o)return null;if(i=o,A(o))n=o.commands;else return null}if(!i||!A(i))return null;let r=a.join(" "),s=[];return s.push(`Usage: ${"ms"} ${r} <type> [flags]`),s.push(""),X(s,"Types:",Z(i,"")),s.push(""),s.push(`Run '${"ms"} ${r} <type> --help' for type-specific flags.`),s.join(`
|
|
30
30
|
`)}var ee=class extends Q{parseOptions(e){let t=super.parseOptions(e),n=t.unknown.indexOf("--"),i=t.unknown.slice(0,n===-1?void 0:n).find(r=>r==="--version"||r==="-v");return i&&this.error(`unknown option '${i}'`,{code:"commander.unknownOption"}),t}};function vt(a){let e=a?new ee:new Q;return e.option("--non-interactive","Run in non-interactive mode (no prompts, all parameters must be provided via flags or environment variables)"),e.option("--json","Format output as JSON"),e.option("--no-color","Disable colored output"),a?(e.name(`${"ms"} ${a.path.join(" ")}`),a.localOnly&&e.allowExcessArguments(!1)):(e.name("ms"),e.usage("[option] [command] [<args>]"),e.version(D.version,"-v, --version","output the current version")),e.description(l.global.programDescription),e.addHelpText("beforeAll",()=>`${re()}
|
|
31
31
|
|
|
32
32
|
`),e.addHelpText("after",()=>a?"":`
|
|
@@ -35,4 +35,4 @@ Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,r=>{let
|
|
|
35
35
|
/*!
|
|
36
36
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
37
37
|
*/
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-GO22IDEN.js.map
|
|
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as c}from"./chunk-
|
|
7
|
+
import{a as c}from"./chunk-BMOTNINY.js";import{m}from"./chunk-ZLK2CMMJ.js";import{A as a,Na as p,Ob as i,Pb as g,gb as d,y as r}from"./chunk-RSHOMYG6.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
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-HHW4SKVU.js.map
|
|
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{b as p}from"./chunk-
|
|
7
|
+
import{b as p}from"./chunk-CLY3OASM.js";import{Qb as f,l as a,v as u,w as s,x as i}from"./chunk-RSHOMYG6.js";import{J as l}from"./chunk-PYPCPMCR.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 a))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,u.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;l({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
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-HZGDQAKA.js.map
|
|
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{Na as r,Ob as p,y as o}from"./chunk-
|
|
7
|
+
import{Na as r,Ob as p,y as o}from"./chunk-RSHOMYG6.js";import{a as n}from"./chunk-PYPCPMCR.js";var u="This app is not backed by a platform managed repo. Repository access must be configured in the external repository.",a="00000000-0000-0000-0000-000000000000";function i(e){return!!e&&e!==a}function g(e){let t=(e??"play").trim().toLowerCase();if(t==="play"||t==="edit"||t==="test")return t;throw new o(`Unknown --access value '${e}'. Use 'play' (default \u2014 app access), 'edit', or 'test'.`)}function A(e){if(e.repoType)return e.repoType;if(i(e.repositoryId))throw new o(`${n} is missing the 'repoType' field but has a 'repositoryId' set. This usually means the file was written by an older CLI. Re-run "${"ms"} app init" to migrate the config, then retry.`);return"none"}async function m(e){return r({tenantId:e.tenantId,environmentId:e.environmentId,logger:p(),actionsParams:{appName:e.appName}})}async function I(e){let t=await m(e);if(!i(t.repositoryId))throw new o(`App '${e.appName}' has no associated repository.`);return t}export{u as a,i as b,g as c,A as d,m as e,I as f};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-IMVZRBSQ.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 D,c as K,d as W,f as S}from"./chunk-IMVZRBSQ.js";import{b as V}from"./chunk-4PI5THLA.js";import{a as z}from"./chunk-SQI4XLR7.js";import{l as B,m as _,n as q}from"./chunk-ZLK2CMMJ.js";import{A as G,Na as T,O as N,Ob as R,P as w,Pb as L,Q as k,Qa as $,Xa as j,l as P,la as C,qb as U,rb as x,sa as F,y}from"./chunk-RSHOMYG6.js";import{D as J,E as H}from"./chunk-WS6TGUH7.js";import{a as I}from"./chunk-AICYZHWK.js";import{H as b,I as O,N as A,P as v,a as E}from"./chunk-PYPCPMCR.js";var te=64*1024,X=1e3;async function Ee(e,n){Re(e,n),await e.runVerb();let t=L();if(!t.appConfig)throw new y(`No ${E} found in the current directory. Run "${"ms"} app init" first.`);let s=await _(e),c=await e.getTenantIdAsync();if(!c)throw new y("Unable to determine tenant ID. Ensure you are logged in.");let r=await B(e),p=K(await e.getOption("access")),f=p==="edit"?W(t.appConfig):t.appConfig.repoType??"none",m=le(e.getPositionalArgs(0));if(m.length===0)throw new y("Provide at least one principal (object ID or user/group email address). Separate multiple entries with commas, spaces, or both.");let a=p!=="edit"||f!=="native",l=R(),u=l.trackScenario("CmrApp.SharePermissions",{mode:n,access:p,repoType:f,inputCount:m.length});try{let o=[],i=await ce(m,o,a);if(l.trackActivityEvent("CmrApp.SharePermissions.PrincipalResolution",{mode:n,inputCount:m.length,resolvedCount:i.length,failedCount:o.length,emailPassthrough:a}),i.length===0)throw new y(Q(o));o.length>0&&v(Q(o));let d=await(n==="share"?ie:re)({tenantId:c,environmentId:s,appName:r,access:p,refs:i,repoType:f,jsonMode:e.isJsonMode()});u.complete({resolvedCount:i.length,failedResolutionCount:o.length,scope:d.scope,role:d.role,appScopeContributorFallback:p==="edit"&&d.scope==="app",...n==="unshare"&&{revokedCount:d.revokedCount??0,revokedPrincipalCount:d.revokedPrincipalCount??0,notFoundCount:d.notFound?.length??0,skippedCount:d.skipped?.length??0}});let g=n==="share"&&p==="edit"?await ae({appInfo:d.appInfo,tenantId:c,environmentId:s,appName:r,jsonMode:e.isJsonMode()}):void 0;e.isJsonMode()?O({access:p,partialFailure:o.length>0,...d.result,...n==="unshare"&&{revokedCount:d.revokedCount??0,revokedPrincipalCount:d.revokedPrincipalCount??0,notFound:(d.notFound??[]).map(ee),skipped:(d.skipped??[]).map(ee)},...g&&{repoType:g.repoType,cloneUrl:g.cloneUrl},warnings:o}):(ye({appName:r,mode:n,access:p,inputCount:i.length,outcome:d}),pe(g))}catch(o){let i=se(o);throw u.failure(i??o),i??o}}function se(e){if(!(e instanceof P)||e.status!==400)return null;let n=e.code,t;if(e.body&&e.body.length<=te)try{let f=JSON.parse(e.body);typeof f?.error?.code=="string"&&(n=f.error.code),typeof f?.error?.message=="string"&&f.error.message.trim()&&(t=f.error.message)}catch{}let s=`${n??""} ${t??""}`.toLowerCase(),c={httpStatus:e.status,...n&&{serverErrorCode:n},...t&&{serverMessage:t}},r={httpStatus:e.status},p=t?{serverMessage:oe(t)}:void 0;return s.includes("limit")||s.includes("quota")?new y("The sharing limit for this app has been reached.",c,{errorCode:"SharingLimitExceeded",exitCode:1,telemetryDetails:r,outputDetails:p}):s.includes("policy")||s.includes("not allowed")?new G("This sharing request is blocked by an environment or tenant policy.",c,{errorCode:"SharingRequestPolicyDenied",exitCode:1,telemetryDetails:V("app_sharing",r),outputDetails:p}):new y("The sharing request was rejected.",c,{errorCode:"SharingRequestRejected",exitCode:1,telemetryDetails:r,outputDetails:p})}function oe(e){let n=[...e].map(t=>{let s=t.codePointAt(0)??0;return s<=31||s>=127&&s<=159?" ":t}).join("").trim();return n.length<=X?n:`${n.slice(0,X)}\u2026`}async function ie(e){let{tenantId:n,environmentId:t,appName:s,access:c,refs:r,repoType:p,jsonMode:f}=e;if(c==="play"||c==="test"){let u=c==="test"?k:N,o=r.map(h=>Z(h,u));return{result:await $({tenantId:n,environmentId:t,logger:R(),actionsParams:{appName:s,put:o,delete:[]}}),scope:"app",role:u}}if(p!=="native"){!f&&p==="github"&&v(D);let u=r.map(i=>Z(i,w));return{result:await $({tenantId:n,environmentId:t,logger:R(),actionsParams:{appName:s,put:u,delete:[]}}),scope:"app",role:w}}let m=await S({tenantId:n,environmentId:t,appName:s}),a=r.map(he);return{result:await U({tenantId:n,environmentId:t,logger:R(),actionsParams:{repoId:m.repositoryId,put:a,delete:[]}}),scope:"repo",role:C,appInfo:m}}async function re(e){let{tenantId:n,environmentId:t,appName:s,access:c,refs:r,repoType:p,jsonMode:f}=e,m=c!=="edit"||p!=="native",a=m?c==="test"?k:c==="play"?N:w:C,l,u=[],o;if(m){c==="edit"&&p==="github"&&(f||v(D));let i=[],h=[];o=new Map;for(let g of r)if(g.id)i.push(g.id),o.set(`id:${g.id}`,g);else if(g.email)h.push(g.email),o.set(`email:${g.email.toLowerCase()}`,g);else throw new y(`Could not resolve '${g.input}' to an AAD object ID or email.`);let d=await j({tenantId:n,environmentId:t,logger:R(),actionsParams:{appName:s,principalIds:i,principalEmails:h,roleDefinitionName:a}});l=d,u=d.notFoundEmails}else{let i=r.map(Y);o=new Map(r.map(d=>[`id:${Y(d)}`,d]));let h=await S({tenantId:n,environmentId:t,appName:s});l=await x({tenantId:n,environmentId:t,logger:R(),actionsParams:{repoId:h.repositoryId,principalIds:i}})}return{result:l.result,scope:m?"app":"repo",role:a,revokedCount:l.revokedCount,revokedPrincipalCount:l.revokedPrincipalCount,notFound:[...l.notFoundPrincipalIds.map(i=>o.get(`id:${i}`)??{id:i,input:i}),...u.map(i=>o.get(`email:${i}`)??{email:i,input:i})],skipped:l.skippedNullRoleAssignments.map(i=>o.get(`id:${i.principalObjectId}`)??o.get(`email:${i.principalObjectId}`)??{id:i.principalObjectId,input:i.principalObjectId})}}function Y(e){if(!e.id)throw new y(`Could not resolve '${e.input}' to an object ID. Unshare requires object IDs.`);return e.id}async function ae(e){let n=e.appInfo;if(!n)try{n=await T({tenantId:e.tenantId,environmentId:e.environmentId,logger:R(),actionsParams:{appName:e.appName}})}catch{e.jsonMode||v(`Share succeeded, but repository details for '${e.appName}' could not be read.`);return}return z(n)}function pe(e){e&&(e.repoType&&A(`Repo type: ${e.repoType}`),e.cloneUrl&&A(`Clone URL: ${e.cloneUrl}`))}function le(e){let n=new Set;for(let t of e)for(let s of t.split(",")){let c=s.trim();c&&n.add(c)}return[...n]}async function ce(e,n,t){let s=new Map,c=new Map,p=(await Promise.all(e.map(async a=>{let l=a.toLowerCase(),u=s.get(l);if(u)return u;if(q(a)){let o={id:a,input:a};return s.set(l,o),o}if(!fe(a))return n.push({input:a,reason:"not an object ID (GUID) or a valid email address"}),null;if(t){let o={input:a,email:a};return s.set(l,o),o}try{let o=c.get(l);o||(o=F(a,R()),c.set(l,o));let i=await o;if(!i)return n.push({input:a,reason:"no user or group found in this tenant (invite as a guest in Entra ID first if external)"}),null;let h={id:i.id,input:a,type:i.type,email:a,displayName:i.displayName};return s.set(l,h),h}catch(o){return n.push({input:a,reason:ue(o)}),null}}))).filter(a=>a!==null),f=[],m=new Set;for(let a of p){let l=(a.id??a.email??a.input).toLowerCase();m.has(l)||(m.add(l),f.push(a))}return f}function Q(e){let n=e.length===1?"entry":"entries",t=e.map(s=>` - ${s.input}: ${s.reason}`);return[`Could not resolve ${e.length} ${n}:`,...t].join(`
|
|
8
|
+
`)}function ue(e){if(e instanceof P){if(e.status===403)return de(e.status);let n=me(e.body);return n!==void 0?`Graph ${e.status}: ${n}`:e.message}return e instanceof Error?e.message:String(e)}function de(e){return`Graph ${e}: your sign-in lacks permission to look up accounts by email. Pass the object ID (GUID) instead, or have an admin grant the User.ReadBasic.All and Group.Read.All Graph permissions.`}function me(e){if(e)try{let t=JSON.parse(e)?.error?.message;return typeof t=="string"?t:void 0}catch{return}}function fe(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function Z(e,n){return{name:e.displayName??e.input,properties:{roleName:n,principal:ge(e)}}}function ge(e){return e.id?e.email?{id:e.id,email:e.email}:{id:e.id}:{email:e.email??e.input}}function he(e){let n=e.id??e.input;return{name:e.displayName??e.input,properties:{roleName:C,principal:e.type?{id:n,type:e.type}:{id:n}}}}function ee(e){return{id:e.id??e.input,label:e.displayName??e.input}}function ye(e){let{appName:n,mode:t,access:s,inputCount:c,outcome:r}=e,p=s==="play"?"play":s==="test"?"test":"edit";if(t==="share"){let u=r.result.put?.length??0;if(u===0){A("No changes were applied.");return}b(`Shared app '${n}' with ${u} ${M("principal",u)}. They can now ${p} the app.`);return}let f=r.revokedCount??0,m=r.revokedPrincipalCount??f,a=(r.skipped?.length??0)>0;if(m===0&&!a){A(`No ${p} assignments to revoke on '${n}' \u2014 none of the ${c} ${M("principal",c)} had existing access.`);return}if(m>0?b(`Revoked ${p} permissions for ${m} ${M("principal",m)} on '${n}'.`):A(`No ${p} access changes were applied on '${n}'.`),r.notFound&&r.notFound.length>0){let l=r.notFound.map(u=>u.displayName??u.input).join(", ");A(`${r.notFound.length} ${M("principal",r.notFound.length)} had no existing ${p} access (no-op): ${l}`)}if(r.skipped&&r.skipped.length>0){let l=r.skipped.map(u=>u.displayName??u.input).join(", ");A(`${r.skipped.length} ${M("principal",r.skipped.length)} had a role assignment with an unknown role definition; ${p} access was not modified for: ${l}. Investigate via the role-assignments API.`)}}function M(e,n){return n===1?e:`${e}s`}function Re(e,n){let t=n==="share"?I.app.share:I.app.unshare,s=n==="share"?J:H;e.setDescription(t.description),e.addExamples(t.examples),e.consumePositionalArgs("principal"),e.addOptions([{flags:{key:s.AppName.name},env:s.AppName.envVar,description:t.options.app,optionalInNonInteractive:!0},{flags:{key:s.Access.name},env:s.Access.envVar,default:s.Access.defaultValue,description:t.options.access,optionalInNonInteractive:!0}])}export{Ee as a};
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk-K77VBHFP.js.map
|
|
@@ -4,12 +4,12 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{m as E}from"./chunk-
|
|
7
|
+
import{m as E}from"./chunk-ZLK2CMMJ.js";import{C as c,L as p,q as m,r as f,t as v,u as l,y as a}from"./chunk-RSHOMYG6.js";import{p as w}from"./chunk-DLUQVMUE.js";import{N as u,Q as y}from"./chunk-PYPCPMCR.js";async function A(n,r,t){try{let e=await n;if(e.status===200){if(e.data.operationSuccess===!1||e.data.environmentFound===!1||e.data.errorCode)throw new m(200,e.data.message,e.data.errorCode);let i=e.data.environment?.name;if(!i)throw new c("Routing service returned 200 with no environment name.");return i}let o=await l(r,e.pollingUrl,e.authResource,t);if(!o.environment?.name)throw new c("Routing service finished provisioning but returned no environment name.");return o.environment.name}catch(e){throw P(e)}}function P(n){if(n instanceof m){let r=n.apiMessage?` ${n.apiMessage}`:" Ensure your account has the required permissions to create a Developer environment.";return new a(`Could not provision a Developer environment for your tenant (status ${n.status}).${r}`)}return n instanceof f?new a("Timed out waiting for a Developer environment to provision. Try again."):n instanceof Error?n:new Error(String(n))}function k(n,r,t,e,o){let{trackBackgroundFailure:i=!0,dogfood:I=!1}=o??{},g=n.getHttpClient(),{region:R}=p(),d=A(v(g,r,w,{provisionDataverse:!1,...I?{dogfood:!0}:{}},R,t),g,t);return i&&d.catch(s=>{t.trackErrorEvent(`${e}.RoutingEnvironmentBackgroundFailure`,{error:s instanceof Error?s.message:String(s)})}),d}function h(n){let r=n instanceof Error?n.message:String(n);y(`Failed to resolve a developer environment.
|
|
8
8
|
|
|
9
9
|
${r}
|
|
10
10
|
|
|
11
|
-
To retry, run the same command again. Alternatively, pass --environment-id <id> to use a known environment.`)}async function D(n,r){if(n)return n;if(!r)throw new a("Unable to resolve a developer environment. Pass --environment-id <id> to specify one explicitly.");try{return await r}catch(t){throw h(t),t}}async function L(n,r,t){let e=await E(n,{failIfMissing:!1});if(e)return e;let o=await n.getTenantIdAsync();if(!o)throw new a("Unable to determine tenant ID. Ensure you are logged in.");t?.jsonMode||
|
|
11
|
+
To retry, run the same command again. Alternatively, pass --environment-id <id> to use a known environment.`)}async function D(n,r){if(n)return n;if(!r)throw new a("Unable to resolve a developer environment. Pass --environment-id <id> to specify one explicitly.");try{return await r}catch(t){throw h(t),t}}async function L(n,r,t){let e=await E(n,{failIfMissing:!1});if(e)return e;let o=await n.getTenantIdAsync();if(!o)throw new a("Unable to determine tenant ID. Ensure you are logged in.");t?.jsonMode||u("No environment specified \u2014 resolving your developer environment\u2026");let i=await C(n,o,r,t?.telemetryNamespace??"BrowseVerb");return n.updateEnvironmentId(i),t?.jsonMode||u(`Using developer environment ${i}.`),i}async function C(n,r,t,e){try{return await k(n,r,t,e,{trackBackgroundFailure:!1})}catch(o){throw h(o),o}}export{k as a,D as b,L as c};
|
|
12
12
|
/*!
|
|
13
13
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
14
14
|
*/
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-KD4NQIYX.js.map
|
|
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{h as s}from"./chunk-
|
|
7
|
+
import{h as s}from"./chunk-GO22IDEN.js";import{h as n}from"./chunk-C7UWPNC3.js";var l=new Set(["--help","-h","--version","-v","--json","--no-color","--non-interactive"]);function t(e){let o=e.slice(2);return o.some(r=>r==="--help"||r==="-h"||r==="--version"||r==="-v")&&o.every(r=>l.has(r))}function u(e){return t(e)?(e.includes("--no-color")&&n("NO_COLOR","1"),s(null).parse([...e]),!0):!1}export{u as a};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-KN66FSQK.js.map
|
|
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{l as o,qa as r}from"./chunk-
|
|
7
|
+
import{l as o,qa as r}from"./chunk-RSHOMYG6.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
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-KPKJZKWW.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 I}from"./chunk-TYRVM4PP.js";import{y as u}from"./chunk-RSHOMYG6.js";import{a as t}from"./chunk-DLUQVMUE.js";import{P as d,m,p as f}from"./chunk-PYPCPMCR.js";import{d as A}from"./chunk-UT667QSU.js";import*as l from"path";function g(e){let n=e.buildType?.trim().toLowerCase()||void 0;if(n!==void 0&&n!=="build"&&n!=="none")throw new u("'--build-type' must be one of: build, none.");let i=n;return{...i!==void 0&&{buildType:i},buildPath:e.buildPath??(i==="none"?"./artifacts":"./dist"),...i!=="none"&&{buildCommand:e.buildCommand??"npm run build"},buildEntryPoint:e.buildEntryPoint??"index.html"}}function $(e){let n=g(e),i={version:m,appId:e.appId,appDisplayName:e.appDisplayName,environmentId:e.environmentId,description:e.description,repoType:e.repoType,cloud:e.cloud,buildPath:n.buildPath};return n.buildCommand!==void 0&&(i.buildCommand=n.buildCommand),i.buildEntryPoint=n.buildEntryPoint,n.buildType!==void 0&&(i.buildType=n.buildType),e.repositoryId&&(i.repositoryId=e.repositoryId),e.externalRepoUrl&&(i.externalRepoUrl=e.externalRepoUrl),e.iconPath&&(i.iconPath=e.iconPath),e.localAppUrl&&(i.localAppUrl=e.localAppUrl),e.connectionReferences!==void 0&&(i.connectionReferences=e.connectionReferences),e.appSettings!==void 0&&(i.appSettings=e.appSettings),i}function w(e,n){let i=f.shape.projectLocalAppId.safeParse(n??l.basename(l.resolve(e)));if(!i.success)throw new u("Project-local app IDs must be non-empty and contain only ASCII letters, digits, hyphens, and underscores. Specify --project-local-app-id.");return i.data}function E(e){return f.parse({version:"1.0",projectLocalAppId:e.projectLocalAppId,displayName:e.appDisplayName,description:e.description,...g(e)})}import*as o from"fs";import*as b from"path";var c=A(I(),1);var P="https://registry.npmjs.org",R=5e3;async function y(e,n=t.version){if(!c.default.valid(n))return;if(c.default.prerelease(n)===null)return n;let i=await T(e);return i?`^${i}`:void 0}async function T(e){try{let{data:n}=await e.get(`${P}/${t.name}/latest`,{headers:{"user-agent":`${t.name}/${t.version}`},signal:AbortSignal.timeout(R)});return typeof n?.version=="string"&&c.default.valid(n.version)?n.version:void 0}catch{return}}async function k(e,n,i){let s=b.join(e,"package.json");if(!o.existsSync(s))return;let p=await y(i);if(!p){n||d(`Skipping the project-local CLI pin: '${t.version}' is not a published release and no published version could be resolved. Install '${t.name}' into the project manually if you want a project-local CLI.`);return}!n&&p!==t.version&&d(`'${t.version}' is a prerelease build; pinning the latest published CLI ('${p}') into the app instead.`);try{let r=JSON.parse(o.readFileSync(s,"utf8")),a="@microsoft/managed-apps-cli",C=r.dependencies?.[a]!==void 0||r.devDependencies?.[a]!==void 0;delete r.dependencies?.[a],delete r.devDependencies?.[a],r.devDependencies=Object.fromEntries(Object.entries({...r.devDependencies,[t.name]:p}).sort(([h],[v])=>h.localeCompare(v,"en"))),o.writeFileSync(s,`${JSON.stringify(r,null,2)}
|
|
8
|
+
`),C&&!n&&d(`Replaced '${a}' with '${t.name}' because both provide 'ms'. Migrate SDK dependencies, imports, generated sources, and Vite configuration together.`)}catch(r){n||d(`Could not pin '${t.name}' into ${s} (${r instanceof Error?r.message:String(r)}). Add "${t.name}": "${p}" to devDependencies manually.`)}}export{g as a,$ as b,w as c,E as d,k as e};
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk-NMZFJESU.js.map
|
|
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as w}from"./chunk-OL6CTXQR.js";import{Ga as g,Ob as M,Pb as b,x as c}from"./chunk-
|
|
7
|
+
import{a as w}from"./chunk-OL6CTXQR.js";import{Ga as g,Ob as M,Pb as b,x as c}from"./chunk-RSHOMYG6.js";import{N as p}from"./chunk-PYPCPMCR.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
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-NNYOT7IR.js.map
|
|
@@ -4,9 +4,9 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{d as i}from"./chunk-
|
|
7
|
+
import{d as i}from"./chunk-R2IECDVU.js";import{A as o}from"./chunk-RSHOMYG6.js";var a=["repository not found","fatal: repository","could not read username","terminal prompts disabled","authentication failed","permission denied","403","remote: not found"];function u(r){let t=r.stderr;return typeof t=="string"?t:Buffer.isBuffer(t)?t.toString():t instanceof Uint8Array?Buffer.from(t).toString():""}function c(r,t){let e=r instanceof Error?r.message:String(r),n=t.trim();return!n||e.includes(n)?e:`${e}
|
|
8
8
|
${n}`}function d(r){let t=r.toLowerCase();return a.some(e=>t.includes(e))}function f(){return"Make sure the repository exists and that you have access to it."}function g({directory:r,repoUrl:t}){try{i(["-c","http.sslVersion=tlsv1.3","clone","--",t,r],{emitStderr:!1})}catch(e){let n=u(e);n&&process.stderr.write(n);let s=d(n)?`Failed to clone '${t}' into '${r}'. ${f()}`:`Failed to clone '${t}' into '${r}'. See the git output above for details.`;throw new o(s,{underlyingError:c(e,n)})}}export{c as a,d as b,f as c,g as d};
|
|
9
9
|
/*!
|
|
10
10
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
11
|
*/
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-OH3TCDCC.js.map
|
|
@@ -4,8 +4,8 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{f as s}from"./chunk-
|
|
7
|
+
import{f as s}from"./chunk-C7UWPNC3.js";import{J as a,N as i}from"./chunk-PYPCPMCR.js";import{spawn as c}from"node:child_process";var g={showUserCode({userCode:t,verificationUri:e,expiresIn:r}){i(""),i("First copy your one-time code:"),i(""),i(` ${t}`),i(""),i("Then visit this URL to sign in to GitHub:"),i(""),i(` ${e}`),i(""),i(`(Code expires in ${Math.round(r/60)} minutes.)`)},showWaiting(){i("Waiting for authentication...")},openVerificationUri(t){return f(t,{skip:!1})}},p=class{showUserCode(e){this._emit({phase:"github-auth-initiated",sessionId:e.sessionId,userCode:e.userCode,verificationUri:e.verificationUri,expiresIn:e.expiresIn,pollIntervalSeconds:e.pollIntervalSeconds})}showWaiting(){}showPollIteration(){this._emit({phase:"github-auth-pending"})}showComplete(e){this._emit({phase:"github-auth-complete",githubLogin:e.githubLogin,mappingExpiresAt:e.mappingExpiresAt})}_emit(e){a(e)}};function f(t,e){if(e.skip||process.stdin.isTTY===!1||s("MS_NO_BROWSER")==="1"||s("CI")==="true")return!1;let r;try{r=new URL(t)}catch{return!1}if(r.protocol!=="https:")return!1;try{let n=l(t,process.platform);if(!n)return!1;let o=c(n.file,n.args,{shell:!1,detached:!0,stdio:"ignore"});return o.on("error",()=>{}),o.unref(),!0}catch{return!1}}function l(t,e){switch(e){case"win32":return{file:"cmd.exe",args:["/c","start","",t]};case"darwin":return{file:"open",args:[t]};case"linux":return{file:"xdg-open",args:[t]};default:return}}export{g as a,p as b};
|
|
8
8
|
/*!
|
|
9
9
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
10
|
*/
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-OHQNTYJG.js.map
|