@microsoft/managed-apps-cli 0.21.0 → 0.23.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 +3 -1
- package/dist/AddConfig-GZO2UMFR.js +12 -0
- package/dist/AddConnector-HJCCENAM.js +23 -0
- package/dist/{AuthStatus-ZZIP3LBD.js → AuthStatus-WCICFN6O.js} +2 -2
- package/dist/{AuthSwitch-HK7JU2FR.js → AuthSwitch-5PKHCTM2.js} +2 -2
- package/dist/Bin.js +1 -1
- package/dist/BuildMaafApp-Q74EFM3Q.js +11 -0
- package/dist/Cli-7EVTIORX.js +54 -0
- package/dist/CloneMaafApp-EKHHLMWD.js +11 -0
- package/dist/CreateMaafApp-L3XX2UVT.js +20 -0
- package/dist/DeleteMaafApp-YCDKWFRG.js +11 -0
- package/dist/DeployMaafApp-HF67BQRZ.js +14 -0
- package/dist/{Dev-SHIA5S7X.js → Dev-BTJUJGP5.js} +2 -2
- package/dist/{EnvironmentVariableAuthenticationProvider-5YTMRAE4.js → EnvironmentVariableAuthenticationProvider-VNN4AG2E.js} +2 -2
- package/dist/GetMaafBuildStatus-7B6ZNSEA.js +11 -0
- package/dist/{GetSettings-NM6H2U5F.js → GetSettings-GJWIPK2T.js} +2 -2
- package/dist/InfoMaafApp-WGNDYYGN.js +13 -0
- package/dist/Init-TJOSV5DE.js +11 -0
- package/dist/ListConnectorActions-HTD6YSCY.js +11 -0
- package/dist/ListConnectors-OET7STMW.js +11 -0
- package/dist/{ListMaafApps-RT3PGZSJ.js → ListMaafApps-KRXJMAEU.js} +2 -2
- package/dist/{Login-HG5S7LBC.js → Login-5TFNB24B.js} +2 -2
- package/dist/{Logout-BUPHLOAH.js → Logout-35U4J627.js} +2 -2
- package/dist/{MockFetch-4CYTSNJ7.js → MockFetch-XSZECQYX.js} +2 -2
- package/dist/{NodeMsalAuthenticationProvider-HTH3V3G2.js → NodeMsalAuthenticationProvider-OUL57BVL.js} +2 -2
- package/dist/Pack-S7P4MIT6.js +8 -0
- package/dist/PlayMaafApp-D4KLJKLT.js +12 -0
- package/dist/RefreshDataSource-N5CEH23S.js +11 -0
- package/dist/{RefreshGitAuth-5A3SX2HC.js → RefreshGitAuth-2VL6VBLU.js} +2 -2
- package/dist/{RemoveDataSource-57JJLK5I.js → RemoveDataSource-XR5Q4O3F.js} +2 -2
- package/dist/{ServicePrincipalAuthenticationProvider-SVKDZG6X.js → ServicePrincipalAuthenticationProvider-H3PTPXYY.js} +2 -2
- package/dist/{SetSetting-RB3F7IXG.js → SetSetting-HXY4YSKC.js} +2 -2
- package/dist/{ShareLinkCreate-7BCDPWY6.js → ShareLinkCreate-YG3DACP2.js} +2 -2
- package/dist/{ShareLinkList-4BI3WMNN.js → ShareLinkList-XF6BIB3M.js} +2 -2
- package/dist/ShareLinkRevoke-4USAQKLB.js +11 -0
- package/dist/ShareList-6QI7ZAMZ.js +11 -0
- package/dist/{ShareMaafApp-QFRXLYUD.js → ShareMaafApp-PZI5MCBA.js} +2 -2
- package/dist/{TelemetrySettings-A474HALH.js → TelemetrySettings-WWVPRF7T.js} +2 -2
- package/dist/{UnshareMaafApp-423RNXCN.js → UnshareMaafApp-MHBIV5OR.js} +2 -2
- package/dist/chunk-2FNWZUPW.js +15 -0
- package/dist/chunk-2HSJ2XAQ.js +13 -0
- package/dist/{chunk-U36HMOQW.js → chunk-3FP37TPE.js} +10 -10
- package/dist/chunk-5XRK3F43.js +11 -0
- package/dist/{chunk-EV3TTTOT.js → chunk-7PH2NK5K.js} +2 -2
- package/dist/chunk-DAG6RPOF.js +11 -0
- package/dist/{chunk-5AUOEXAR.js → chunk-DD7E4ADI.js} +2 -2
- package/dist/chunk-F3HGM3IU.js +106 -0
- package/dist/chunk-FMJDKXNM.js +12 -0
- package/dist/chunk-HCPTQP7J.js +11 -0
- package/dist/chunk-I22E6YZT.js +11 -0
- package/dist/chunk-LDP2SHPJ.js +11 -0
- package/dist/{chunk-3BRAT6NP.js → chunk-PKDXP7CL.js} +2 -2
- package/dist/chunk-SBVJ4SMO.js +20 -0
- package/dist/chunk-SCJXITCN.js +12 -0
- package/dist/chunk-TZRZFNLH.js +38 -0
- package/dist/{chunk-G33Q5FWT.js → chunk-UIW77LMA.js} +234 -234
- package/dist/chunk-WQKDXHGX.js +11 -0
- package/dist/{chunk-MFPX2RFH.js → chunk-X5O77GZS.js} +2 -2
- package/dist/{chunk-7NXJAIJX.js → chunk-Y7TZZLPW.js} +2 -2
- package/dist/chunk-ZIONKKAV.js +44 -0
- package/package.json +4 -4
- package/dist/AddConnector-4AMM746J.js +0 -41
- package/dist/BuildMaafApp-MOTZOLJZ.js +0 -11
- package/dist/Cli-6CCXMCPX.js +0 -54
- package/dist/CreateMaafApp-TUO72CW7.js +0 -20
- package/dist/DeleteMaafApp-MZVGIAX3.js +0 -11
- package/dist/DeployMaafApp-KXATM3E3.js +0 -14
- package/dist/GetMaafApp-ELB5KMHW.js +0 -11
- package/dist/GetMaafBuildStatus-3W7LI5TJ.js +0 -11
- package/dist/Init-CH5DUQWA.js +0 -11
- package/dist/ListConnectorActions-7SIFGPYR.js +0 -11
- package/dist/ListConnectors-TRKIWRVQ.js +0 -11
- package/dist/Pack-AHKC2MYF.js +0 -8
- package/dist/PlayMaafApp-LWKJU2IN.js +0 -12
- package/dist/RefreshDataSource-ZFZJXJ5L.js +0 -11
- package/dist/ShareLinkRevoke-EEJVCRCY.js +0 -11
- package/dist/ShareList-LJDAEGI3.js +0 -11
- package/dist/ShowMaafApp-3KK6NUG2.js +0 -11
- package/dist/chunk-6FFQN2SO.js +0 -13
- package/dist/chunk-6MXOK2LG.js +0 -11
- package/dist/chunk-DREO7EYO.js +0 -20
- package/dist/chunk-NP2KJOYC.js +0 -12
- package/dist/chunk-QAFCXGBD.js +0 -11
- package/dist/chunk-QSB5P4RM.js +0 -38
- package/dist/chunk-S5HEU7XK.js +0 -11
- package/dist/chunk-UBTSW22U.js +0 -11
- package/dist/chunk-VFSTQAZ2.js +0 -12
- package/dist/chunk-VNEZZ3RI.js +0 -11
- package/dist/chunk-W7EWOZPO.js +0 -104
- package/dist/chunk-YIKNM523.js +0 -15
package/dist/chunk-QSB5P4RM.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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 $}from"./chunk-EV3TTTOT.js";import{e as Y}from"./chunk-7NXJAIJX.js";import{a as p}from"./chunk-VNEZZ3RI.js";import{a as H,b as O,d as _e}from"./chunk-UT667QSU.js";var T=O(P=>{var V=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 V{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};P.CommanderError=V;P.InvalidArgumentError=N});var D=O(M=>{var{InvalidArgumentError:ye}=T(),L=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 ye(`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 be(o){let e=o.name()+(o.variadic===!0?"...":"");return o.required?"<"+e+">":"["+e+"]"}M.Argument=L;M.humanReadableArgName=be});var z=O(Q=>{var{humanReadableArgName:Ce}=D(),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(/([^ ]+) *(.*)/),s=e.createCommand(n).helpOption(!1);s.description(e._helpCommandDescription),i&&s.arguments(i),t.push(s)}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(s=>!s.hidden),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),i=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||i){let s;n?i?s=e.createOption(e._helpFlags,e._helpDescription):s=e.createOption(e._helpShortFlag,e._helpDescription):s=e.createOption(e._helpLongFlag,e._helpDescription),t.push(s)}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(s=>!s.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=>Ce(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,s=2,r=2;function l(d,b){if(b){let F=`${d.padEnd(n+r)}${b}`;return t.wrap(F,i-s,n+r)}return d}function a(d){return d.join(`
|
|
8
|
-
`).replace(/^/gm," ".repeat(s))}let h=[`Usage: ${t.commandUsage(e)}`,""],u=t.commandDescription(e);u.length>0&&(h=h.concat([t.wrap(u,i,0),""]));let c=t.visibleArguments(e).map(d=>l(t.argumentTerm(d),t.argumentDescription(d)));c.length>0&&(h=h.concat(["Arguments:",a(c),""]));let f=t.visibleOptions(e).map(d=>l(t.optionTerm(d),t.optionDescription(d)));if(f.length>0&&(h=h.concat(["Options:",a(f),""])),this.showGlobalOptions){let d=t.visibleGlobalOptions(e).map(b=>l(t.optionTerm(b),t.optionDescription(b)));d.length>0&&(h=h.concat(["Global Options:",a(d),""]))}let A=t.visibleCommands(e).map(d=>l(t.subcommandTerm(d),t.subcommandDescription(d)));return A.length>0&&(h=h.concat(["Commands:",a(A),""])),h.join(`
|
|
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 s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",r=new RegExp(`[\\n][${s}]+`);if(e.match(r))return e;let l=t-n;if(l<i)return e;let a=e.slice(0,n),h=e.slice(n).replace(`\r
|
|
10
|
-
`,`
|
|
11
|
-
`),u=" ".repeat(n),f="\\s\u200B",A=new RegExp(`
|
|
12
|
-
|.{1,${l-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g"),d=h.match(A)||[];return a+d.map((b,F)=>b===`
|
|
13
|
-
`?"":(F>0?u:"")+b.trimEnd()).join(`
|
|
14
|
-
`)}};Q.Help=I});var j=O(S=>{var{InvalidArgumentError:Ae}=T(),q=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=X(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 Ae(`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 Oe(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},W=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,s=i!==void 0?i:!1;return t.negate===(s===e)}};function Oe(o){return o.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function X(o){let e,t,n=o.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}}S.Option=q;S.splitOptionFlags=X;S.DualOptions=W});var ee=O(Z=>{function xe(o,e){if(Math.abs(o.length-e.length)>3)return Math.max(o.length,e.length);let t=[];for(let n=0;n<=o.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<=o.length;i++){let s=1;o[i-1]===e[n-1]?s=0:s=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+s),i>1&&n>1&&o[i-1]===e[n-2]&&o[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[o.length][e.length]}function we(o,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=o.startsWith("--");t&&(o=o.slice(2),e=e.map(r=>r.slice(2)));let n=[],i=3,s=.4;return e.forEach(r=>{if(r.length<=1)return;let l=xe(o,r),a=Math.max(o.length,r.length);(a-l)/a>s&&(l<i?(i=l,n=[r]):l===i&&n.push(r))}),n.sort((r,l)=>r.localeCompare(l)),t&&(n=n.map(r=>`--${r}`)),n.length>1?`
|
|
15
|
-
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
|
|
16
|
-
(Did you mean ${n[0]}?)`:""}Z.suggestSimilar=we});var oe=O(re=>{var He=H("events").EventEmitter,R=H("child_process"),y=H("path"),G=H("fs"),m=H("process"),{Argument:Te,humanReadableArgName:Ee}=D(),{CommanderError:U}=T(),{Help:ve}=z(),{Option:te,splitOptionFlags:$e,DualOptions:Ve}=j(),{suggestSimilar:ne}=ee(),B=class o extends He{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=>m.stdout.write(t),writeErr:t=>m.stderr.write(t),getOutHelpWidth:()=>m.stdout.isTTY?m.stdout.columns:void 0,getErrHelpWidth:()=>m.stderr.isTTY?m.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,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,r,l]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(r);return i&&(a.description(i),a._executableHandler=!0),s.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(s.noHelp||s.hidden),a._executableFile=s.executableFile||null,l&&a.arguments(l),this.commands.push(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new o(e)}createHelp(){return Object.assign(new ve,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
|
-
- 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 Te(e,t)}argument(e,t,n,i){let s=this.createArgument(e,t);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),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
|
-
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 U(e,t,n)),m.exit(e)}action(e){let t=n=>{let i=this._args.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new te(e,t)}addOption(e){let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||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=(s,r,l)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let a=this.getOptionValue(n);if(s!==null&&e.parseArg)try{s=e.parseArg(s,a)}catch(h){if(h.code==="commander.invalidArgument"){let u=`${r} ${h.message}`;this.error(u,{exitCode:h.exitCode,code:h.code})}throw h}else s!==null&&e.variadic&&(s=e._concatValue(s,a));s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,l)};return this.on("option:"+t,s=>{let r=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,r,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let r=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,r,"env")}),this}_optionEx(e,t,n,i,s){if(typeof t=="object"&&t instanceof te)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let r=this.createOption(t,n);if(r.makeOptionMandatory(!!e.mandatory),typeof i=="function")r.default(s).argParser(i);else if(i instanceof RegExp){let l=i;i=(a,h)=>{let u=l.exec(a);return u?u[0]:h},r.default(s).argParser(i)}else r.default(i);return this.addOption(r)}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=m.argv,m.versions&&m.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":m.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 s(u,c){let f=y.resolve(u,c);if(G.existsSync(f))return f;if(i.includes(y.extname(c)))return;let A=i.find(d=>G.existsSync(`${f}${d}`));if(A)return`${f}${A}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let u;try{u=G.realpathSync(this._scriptPath)}catch{u=this._scriptPath}l=y.resolve(y.dirname(u),l)}if(l){let u=s(l,r);if(!u&&!e._executableFile&&this._scriptPath){let c=y.basename(this._scriptPath,y.extname(this._scriptPath));c!==this._name&&(u=s(l,`${c}-${e._name}`))}r=u||r}n=i.includes(y.extname(r));let a;m.platform!=="win32"?n?(t.unshift(r),t=se(m.execArgv).concat(t),a=R.spawn(m.argv[0],t,{stdio:"inherit"})):a=R.spawn(r,t,{stdio:"inherit"}):(t.unshift(r),t=se(m.execArgv).concat(t),a=R.spawn(m.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{m.on(c,()=>{a.killed===!1&&a.exitCode===null&&a.kill(c)})});let h=this._exitCallback;h?a.on("close",()=>{h(new U(m.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):a.on("close",m.exit.bind(m)),a.on("error",u=>{if(u.code==="ENOENT"){let c=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",f=`'${r}' does not exist
|
|
19
|
-
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
|
-
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
-
- ${c}`;throw new Error(f)}else if(u.code==="EACCES")throw new Error(`'${r}' not executable`);if(!h)m.exit(1);else{let c=new U(1,"commander.executeSubCommandAsync","(error)");c.nestedError=u,h(c)}}),this.runningCommand=a}_dispatchSubcommand(e,t,n){let i=this._findCommand(e);i||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),s}_checkNumberOfArguments(){this._args.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let r=i;if(i!==null&&n.parseArg)try{r=n.parseArg(i,s)}catch(l){if(l.code==="commander.invalidArgument"){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'. ${l.message}`;this.error(a,{exitCode:l.exitCode,code:l.code})}throw l}return r};this._checkNumberOfArguments();let t=[];this._args.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((r,l)=>e(n,l,r),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,i=[];return E(this).reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(r=>{i.push({hookedCommand:s,callback:r})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return ie(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),ie(this,n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let r;return r=this._chainOrCallHooks(r,"preAction"),r=this._chainOrCall(r,()=>this._actionHandler(this.processedArgs)),this.parent&&(r=this._chainOrCall(r,()=>{this.parent.emit(s,e,t)})),r=this._chainOrCallHooks(r,"postAction"),r}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){for(let e=this;e;e=e.parent)e._checkForConflictingLocalOptions()}parseOptions(e){let t=[],n=[],i=t,s=e.slice();function r(a){return a.length>1&&a[0]==="-"}let l=null;for(;s.length;){let a=s.shift();if(a==="--"){i===n&&i.push(a),i.push(...s);break}if(l&&!r(a)){this.emit(`option:${l.name()}`,a);continue}if(l=null,r(a)){let h=this._findOption(a);if(h){if(h.required){let u=s.shift();u===void 0&&this.optionMissingArgument(h),this.emit(`option:${h.name()}`,u)}else if(h.optional){let u=null;s.length>0&&!r(s[0])&&(u=s.shift()),this.emit(`option:${h.name()}`,u)}else this.emit(`option:${h.name()}`);l=h.variadic?h:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let h=this._findOption(`-${a[1]}`);if(h){h.required||h.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${h.name()}`,a.slice(2)):(this.emit(`option:${h.name()}`),s.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let h=a.indexOf("="),u=this._findOption(a.slice(0,h));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,a.slice(h+1));continue}}if(r(a)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(a)){t.push(a),s.length>0&&n.push(...s);break}else if(a===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(a),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(a),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(a),s.length>0&&i.push(...s);break}i.push(a)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return E(this).reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
|
|
22
|
-
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
|
-
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
24
|
-
`),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in m.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()}`,m.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Ve(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=r=>{let l=r.attributeName(),a=this.getOptionValue(l),h=this.options.find(c=>c.negate&&l===c.attributeName()),u=this.options.find(c=>!c.negate&&l===c.attributeName());return h&&(h.presetArg===void 0&&a===!1||h.presetArg!==void 0&&a===h.presetArg)?h:u||r},i=r=>{let l=n(r),a=l.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let r=s.createHelp().visibleOptions(s).filter(l=>l.long).map(l=>l.long);i=i.concat(r),s=s.parent}while(s&&!s._enablePositionalOptions);t=ne(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",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=ne(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
|
-
`),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=>Ee(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=y.basename(e,y.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(s=>s.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(s=>s.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=$e(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e);let t=m.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
|
-
Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let r;typeof t=="function"?r=t({error:s.error,command:s.command}):r=t,r&&s.write(`${r}
|
|
27
|
-
`)}),this}};function ie(o,e){o._hasHelpOption&&e.find(n=>n===o._helpLongFlag||n===o._helpShortFlag)&&(o.outputHelp(),o._exit(0,"commander.helpDisplayed","(outputHelp)"))}function se(o){return o.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}function E(o){let e=[];for(let t=o;t;t=t.parent)e.push(t);return e}re.Command=B});var ue=O((g,he)=>{var{Argument:De}=D(),{Command:ae}=oe(),{CommanderError:Se,InvalidArgumentError:le}=T(),{Help:ke}=z(),{Option:Fe}=j();g=he.exports=new ae;g.program=g;g.Argument=De;g.Command=ae;g.CommanderError=Se;g.Help=ke;g.InvalidArgumentError=le;g.InvalidOptionArgumentError=le;g.Option=Fe});var pe=_e(ue(),1),{program:je,createCommand:Re,createArgument:Ge,createOption:Ue,CommanderError:Be,InvalidArgumentError:Ke,InvalidOptionArgumentError:Je,Command:ce,Argument:Ye,Option:Qe,Help:Xe}=pe.default;var x={auth:{"@description":"Manage authentication state.",commands:{login:{"@helpText":p.auth.login.description,lazyHandler:async()=>(await import("./Login-HG5S7LBC.js")).loginAsync},logout:{"@helpText":p.auth.logout.description,lazyHandler:async()=>(await import("./Logout-BUPHLOAH.js")).logoutAsync},status:{"@helpText":p.auth.status.description,lazyHandler:async()=>(await import("./AuthStatus-ZZIP3LBD.js")).authStatusAsync},switch:{"@helpText":p.auth.switch.description,lazyHandler:async()=>(await import("./AuthSwitch-HK7JU2FR.js")).authSwitchAsync}}},app:{"@description":"Manage apps and their resources.",commands:{create:{"@helpText":p.app.create.description,lazyHandler:async()=>(await import("./CreateMaafApp-TUO72CW7.js")).createMaafAppAsync},init:{"@helpText":p.app.init.description,lazyHandler:async()=>(await import("./Init-CH5DUQWA.js")).initAsync},list:{"@helpText":p.app.list.description,lazyHandler:async()=>(await import("./ListMaafApps-RT3PGZSJ.js")).listMaafAppsAsync},show:{"@helpText":p.app.show.description,lazyHandler:async()=>(await import("./ShowMaafApp-3KK6NUG2.js")).showMaafAppAsync},share:{typed:!0,"@helpText":p.app.share.description,lazyHandler:async()=>(await import("./ShareMaafApp-QFRXLYUD.js")).shareMaafAppAsync,commands:{link:{typed:!0,"@helpText":p.app.shareLink.description,commands:{create:{"@helpText":p.app.shareLink.create.description,lazyHandler:async()=>(await import("./ShareLinkCreate-7BCDPWY6.js")).shareLinkCreateAsync},list:{"@helpText":p.app.shareLink.list.description,lazyHandler:async()=>(await import("./ShareLinkList-4BI3WMNN.js")).shareLinkListAsync},revoke:{"@helpText":p.app.shareLink.revoke.description,lazyHandler:async()=>(await import("./ShareLinkRevoke-EEJVCRCY.js")).shareLinkRevokeAsync}}},list:{"@helpText":p.app.share.list.description,lazyHandler:async()=>(await import("./ShareList-LJDAEGI3.js")).shareListAsync}}},unshare:{"@helpText":p.app.unshare.description,lazyHandler:async()=>(await import("./UnshareMaafApp-423RNXCN.js")).unshareMaafAppAsync},info:{"@helpText":p.app.info.description,lazyHandler:async()=>(await import("./GetMaafApp-ELB5KMHW.js")).getMaafAppInfoAsync},build:{"@helpText":p.app.build.description,lazyHandler:async()=>(await import("./BuildMaafApp-MOTZOLJZ.js")).buildMaafAppAsync},"build-status":{"@helpText":p.app.buildStatus.description,lazyHandler:async()=>(await import("./GetMaafBuildStatus-3W7LI5TJ.js")).getMaafBuildStatusAsync},deploy:{"@helpText":p.app.deploy.description,lazyHandler:async()=>(await import("./DeployMaafApp-KXATM3E3.js")).deployMaafAppAsync},pack:{"@helpText":p.app.pack.description,lazyHandler:async()=>(await import("./Pack-AHKC2MYF.js")).packAsync},play:{"@helpText":p.app.play.description,lazyHandler:async()=>(await import("./PlayMaafApp-LWKJU2IN.js")).playMaafAppAsync},dev:{"@helpText":p.app.dev.description,lazyHandler:async()=>(await import("./Dev-SHIA5S7X.js")).devAsync},delete:{"@helpText":p.app.delete.description,lazyHandler:async()=>(await import("./DeleteMaafApp-MZVGIAX3.js")).deleteMaafAppAsync},refresh:{typed:!0,commands:{"data-source":{"@helpText":p.app.refresh.dataSource.description,lazyHandler:async()=>(await import("./RefreshDataSource-ZFZJXJ5L.js")).refreshDataSourceAsync}}},add:{typed:!0,commands:{"data-source":{"@helpText":p.app.add.connector.description,lazyHandler:async()=>(await import("./AddConnector-4AMM746J.js")).addConnectorAsync},connector:{"@helpText":"(deprecated) Use 'data-source' instead.",lazyHandler:async()=>(await import("./AddConnector-4AMM746J.js")).addConnectorAsync}}},remove:{typed:!0,commands:{"data-source":{"@helpText":p.app.remove.description,lazyHandler:async()=>(await import("./RemoveDataSource-57JJLK5I.js")).removeDataSourceAsync},connector:{"@helpText":"(deprecated) Use 'data-source' instead.",lazyHandler:async()=>(await import("./RemoveDataSource-57JJLK5I.js")).removeDataSourceAsync}}},"set-setting":{"@helpText":p.app["set-setting"].description,lazyHandler:async()=>(await import("./SetSetting-RB3F7IXG.js")).setSettingAsync},"get-settings":{"@helpText":p.app["get-settings"].description,lazyHandler:async()=>(await import("./GetSettings-NM6H2U5F.js")).getSettingsAsync}}},connector:{"@description":"Discover available connectors and their operations.",commands:{list:{"@helpText":p.connector.list.description,lazyHandler:async()=>(await import("./ListConnectors-TRKIWRVQ.js")).listConnectorsCliAsync},"list-actions":{"@helpText":p.connector["list-actions"].description,lazyHandler:async()=>(await import("./ListConnectorActions-7SIFGPYR.js")).listConnectorActionsCliAsync}}},git:{"@description":"Manage GitHub integration for apps.",commands:{auth:{typed:!0,commands:{refresh:{"@helpText":p.git.auth.refresh.description,lazyHandler:async()=>(await import("./RefreshGitAuth-5A3SX2HC.js")).refreshGitAuthAsync}}},list:{"@helpText":p.app.share.list.description,lazyHandler:async()=>(await import("./ShareList-LJDAEGI3.js")).shareListAsync}}},telemetry:{"@description":"Manage CLI telemetry settings.",commands:{enable:{"@helpText":p.telemetry.enable.description,lazyHandler:async()=>(await import("./TelemetrySettings-A474HALH.js")).telemetryEnableAsync},disable:{"@helpText":p.telemetry.disable.description,lazyHandler:async()=>(await import("./TelemetrySettings-A474HALH.js")).telemetryDisableAsync},status:{"@helpText":p.telemetry.status.description,lazyHandler:async()=>(await import("./TelemetrySettings-A474HALH.js")).telemetryStatusAsync}}}};function C(o){return o.typed===!0}function k(o){return typeof o.lazyHandler=="function"}function w(o,e){return Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0}function st(o,e){let t=o.slice(2);if(t.length===0||t[0].startsWith("-"))return null;let[n]=t;return v(n,e)?me(e[n].commands,t,1,[n]):null}function me(o,e,t,n){if(t>=e.length)return null;let i=e[t];if(i.startsWith("-"))return null;let s=w(o,i);if(!s)return null;let r=[...n,i];if(!C(s))return{path:r,lazyHandler:s.lazyHandler,tokensConsumed:t+1};let l=e[t+1];return l!==void 0&&!l.startsWith("-")&&w(s.commands,l)!==void 0?me(s.commands,e,t+1,r):k(s)?{path:r,lazyHandler:s.lazyHandler,tokensConsumed:t+1}:null}function rt(o,e){let t=o.slice(2),n=t.findIndex(u=>u.startsWith("-")),i=n===-1?t:t.slice(0,n);if(i.length<2)return null;let[s,...r]=i;if(!v(s,e))return null;let l=e[s].commands,a=[s],h=!1;for(let u of r){let c=w(l,u);if(!c)return h?{pathTokens:a,unknownToken:u}:null;if(!C(c))return null;a.push(u),l=c.commands,h=!0}return h?{pathTokens:a,unknownToken:void 0}:null}function v(o,e){return o in e}function K(o,e,t){let n=Math.max(...t.map(([s])=>s.length)),i=Math.max(n+2,10);o.push(e);for(let[s,r]of t)o.push(` ${s.padEnd(i)} ${r}`)}function de(){let o=[],e=Object.entries(x);if(e.length>0){let t=Math.max(...e.map(([i])=>i.length)),n=Math.max(t+2,10);o.push("Command Groups:"),o.push("");for(let[i,s]of e)o.push(` ${i.padEnd(n)} ${s["@description"]}`);o.push(""),o.push(`Run '${"ms"} <group> --help' for commands within a group.`)}return o.join(`
|
|
28
|
-
`)}function pt(o){if(!v(o,x))return"";let e=x[o],t=[];t.push(`Usage: ${"ms"} ${o} <command> [flags]`),t.push(""),t.push(e["@description"]),t.push("");let n=[],i=[];for(let[s,r]of Object.entries(e.commands))if(C(r)){let l=r["@helpText"];k(r)&&l!==void 0&&n.push([s,l]),i.push([s,r])}else n.push([s,r["@helpText"]]);if(n.length>0&&K(t,"Commands:",n),i.length>0){t.push("");for(let[s,r]of i)K(t,`${s} <type>:`,J(r,s).map(([l,a])=>[l,a]))}return t.push(""),t.push(`Run '${"ms"} ${o} <command> --help' for command-specific flags.`),t.join(`
|
|
29
|
-
`)}function J(o,e){let t=[];for(let[n,i]of Object.entries(o.commands)){let s=e?`${e} ${n}`:n;C(i)?t.push(...J(i,s)):t.push([s,i["@helpText"]])}return t}function ct(o){if(o.length<2)return null;let[e,...t]=o;if(!v(e,x))return null;let n=x[e].commands,i;for(let l of t){let a=w(n,l);if(!a)return null;if(i=a,C(a))n=a.commands;else return null}if(!i||!C(i))return null;let s=o.join(" "),r=[];return r.push(`Usage: ${"ms"} ${s} <type> [flags]`),r.push(""),K(r,"Types:",J(i,"")),r.push(""),r.push(`Run '${"ms"} ${s} <type> --help' for type-specific flags.`),r.join(`
|
|
30
|
-
`)}function fe(){return`${"ms"} v${$.version} (preview)`}function ge(o){let e=new ce;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"),o?e.name(`${"ms"} ${o.path.join(" ")}`):(e.name("ms"),e.usage("[option] [command] [<args>]")),e.version($.version,"-v, --version","output the current version"),e.description(p.global.programDescription),e.addHelpText("beforeAll",()=>`${fe()}
|
|
31
|
-
|
|
32
|
-
`),e.addHelpText("after",()=>o?"":`
|
|
33
|
-
`+de()+`
|
|
34
|
-
`),e}var Ne=new Set(["--help","-h","--version","-v","--json","--no-color","--non-interactive"]);function Pe(o){let e=o.slice(2);return e.some(n=>n==="--help"||n==="-h"||n==="--version"||n==="-v")&&e.every(n=>Ne.has(n))}function Tt(o){return Pe(o)?(o.includes("--no-color")&&Y("NO_COLOR","1"),ge(null).parse([...o]),!0):!1}export{x as a,st as b,rt as c,v as d,pt as e,ct as f,fe as g,ge as h,Tt as i};
|
|
35
|
-
/*!
|
|
36
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
37
|
-
*/
|
|
38
|
-
//# sourceMappingURL=chunk-QSB5P4RM.js.map
|
package/dist/chunk-S5HEU7XK.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __pathDirname } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as e}from"./chunk-EV3TTTOT.js";import{b as t,c as s}from"./chunk-7NXJAIJX.js";import*as r from"os";import*as o from"path";var p=t("WORKING_DIRECTORY")??process.cwd(),E=t("CONFIG_DIR")??o.join(r.homedir(),".ms-cli"),n=o.join(E,"cache","auth"),a=o.join(E,"telemetry"),R="microsoft-managed-apps-cli",C="msal-token-cache",I="x-ms-client-request-id",T="x-ms-target-url",i="x-ms-auth-resource",m="x-ms-body-token-resource",x="userSettings.json",N=`managed-apps-cli/${e.version}`,O=s("USE_MMA_APP_ID")?"c4ee713f-aede-4371-91fc-921aa3a5ded9":"9cee029c-6210-4654-90bb-17e6e9d36617",A="managedappscli";export{p as a,E as b,n as c,a as d,R as e,C as f,I as g,T as h,i,m as j,x as k,N as l,O as m,A as n};
|
|
8
|
-
/*!
|
|
9
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
-
*/
|
|
11
|
-
//# sourceMappingURL=chunk-S5HEU7XK.js.map
|
package/dist/chunk-UBTSW22U.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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{H as s,f as o}from"./chunk-G33Q5FWT.js";import{a as r,b as i,c as u,d as c,e as l}from"./chunk-RBG2H562.js";var f=["GitHubMappingMissing","GitHubMappingExpired","GitHubMappingStale"];function g(e){return typeof e=="string"&&f.includes(e)}function E(e){let n=e.code;if(!n)return null;let t=e.message;if(!t||!t.trim())return null;switch(n){case"GitHubMappingMissing":case"GitHubMappingExpired":case"GitHubMappingStale":case"GitHubUserLacksAccess":case"GitHubUserLacksRequiredLevel":case"GitHubAuthSessionExpired":case"GitHubAuthSessionNotFound":case"GitHubAuthDenied":case"GitHubAuthCancelled":return new u(t);case"GitHubAppNotInstalled":case"GitHubInstallationSuspended":return new c(t);case"GitHubRateLimited":case"GitHubEvaluationError":case"GitHubUpstreamError":return new l(t);case"GitHubRepoArchived":case"GitHubRepoNotEnterprise":case"GitHubRepoNotFound":return new i(t);case"OperationNotFound":return new r(t);default:return null}}function H(e){if(e instanceof r)return null;let n=p(e);return n?E(n):null}function v(e){let n=p(e);if(!n)return null;let t=n.code;return!g(t)||!(e instanceof s)&&n.status!==401?null:{code:t,payload:n}}function p(e){if(e instanceof s)return{code:e.code,message:e.message,status:e.status,details:e.details};if(e instanceof o){let n=d(e.body);return n?{code:n.code,message:n.message??"",status:e.status,details:n.details}:null}if(e instanceof Error){let n=e.message.match(/\{[\s\S]*\}/);if(!n)return null;let t=d(n[0]);if(!t?.code)return null;let a=e.message.match(/status:\s*(\d+)/i);return{code:t.code,message:t.message??"",status:a?Number(a[1]):0,details:t.details}}return null}function d(e){if(!e)return null;try{let t=JSON.parse(e)?.error;return!t||typeof t!="object"?null:{code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0,details:t.details&&typeof t.details=="object"?t.details:void 0}}catch{return null}}export{E as a,H as b,v as c};
|
|
8
|
-
/*!
|
|
9
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
-
*/
|
|
11
|
-
//# sourceMappingURL=chunk-UBTSW22U.js.map
|
package/dist/chunk-VFSTQAZ2.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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 y}from"./chunk-TYRVM4PP.js";import{a as i}from"./chunk-EV3TTTOT.js";import{i as s}from"./chunk-PVAIJSAI.js";import{h as d}from"./chunk-U36HMOQW.js";import{d as g}from"./chunk-UT667QSU.js";function T(e){let n={version:d,appId:e.appId,appDisplayName:e.appDisplayName,environmentId:e.environmentId,description:e.description,repoType:e.repoType,cloud:e.cloud,buildPath:e.buildPath??"./dist",buildCommand:e.buildCommand??"npm run build",buildEntryPoint:e.buildEntryPoint??"index.html"};return e.repositoryId&&(n.repositoryId=e.repositoryId),e.externalRepoUrl&&(n.externalRepoUrl=e.externalRepoUrl),e.iconPath&&(n.iconPath=e.iconPath),e.localAppUrl&&(n.localAppUrl=e.localAppUrl),e.connectionReferences!==void 0&&(n.connectionReferences=e.connectionReferences),e.appSettings!==void 0&&(n.appSettings=e.appSettings),n}import*as r from"fs";import*as f from"path";var c=g(y(),1);var I="https://registry.npmjs.org",C=5e3;async function l(e,n=i.version){if(!c.default.valid(n))return;if(c.default.prerelease(n)===null)return n;let p=await R(e);return p?`^${p}`:void 0}async function R(e){try{let{data:n}=await e.get(`${I}/${i.name}/latest`,{headers:{"user-agent":`${i.name}/${i.version}`},signal:AbortSignal.timeout(C)});return typeof n?.version=="string"&&c.default.valid(n.version)?n.version:void 0}catch{return}}async function O(e,n,p){let a=f.join(e,"package.json");if(!r.existsSync(a))return;let o=await l(p);if(!o){n||s(`Skipping the project-local CLI pin: '${i.version}' is not a published release and no published version could be resolved. Install '${i.name}' into the project manually if you want a project-local CLI.`);return}!n&&o!==i.version&&s(`'${i.version}' is a prerelease build; pinning the latest published CLI ('${o}') into the app instead.`);try{let t=JSON.parse(r.readFileSync(a,"utf8"));t.devDependencies=Object.fromEntries(Object.entries({...t.devDependencies,[i.name]:o}).sort(([m],[u])=>m.localeCompare(u,"en"))),r.writeFileSync(a,`${JSON.stringify(t,null,2)}
|
|
8
|
-
`)}catch(t){n||s(`Could not pin '${i.name}' into ${a} (${t instanceof Error?t.message:String(t)}). Add "${i.name}": "${o}" to devDependencies manually.`)}}var h="none",v="native",b=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function _(e){return b.test(e.trim())}function k(e){if(e===void 0||e==="")return{repoType:"native",remoteUrl:void 0};let n=e.trim();return n.toLowerCase()===v?{repoType:"native",remoteUrl:void 0}:n.toLowerCase()===h?{repoType:"none",remoteUrl:void 0}:{repoType:"github",remoteUrl:n}}export{T as a,O as b,_ as c,k as d};
|
|
9
|
-
/*!
|
|
10
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
11
|
-
*/
|
|
12
|
-
//# sourceMappingURL=chunk-VFSTQAZ2.js.map
|
package/dist/chunk-VNEZZ3RI.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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 t}from"./chunk-U36HMOQW.js";var n={global:{programDescription:"CLI for Microsoft managed apps.",cloud:"Cloud environment to target. Valid values include: public, usgov, usgovhigh, usgovdod, china. Defaults to public."},auth:{login:{description:"Sign in to Microsoft Entra ID.",examples:[`${"ms"} auth login`,`${"ms"} auth login --account user@contoso.com`,`${"ms"} auth login --device-code`],options:{account:"Username (email) to pre-fill in the browser sign-in prompt. This is a hint passed to the identity provider, not validated against cached accounts \u2014 use `auth switch --account` to choose between cached accounts.",deviceCode:"Sign in using the device code flow instead of opening a browser. Prints a URL and a code to enter on another device \u2014 use this on headless machines or over SSH where no browser is available."}},logout:{description:"Clear all cached credentials. Removes every cached account and the active-account pointer. Use `auth switch` to change which cached account is active without logging out.",examples:[`${"ms"} auth logout`]},status:{description:"Show cached accounts. The active account (used by other CLI commands) is marked.",examples:[`${"ms"} auth status`,`${"ms"} auth status --json`]},switch:{description:"Choose which cached account other CLI commands run as. When more than one account is cached and --account is omitted, prompts interactively; in non-interactive mode --account is required.",examples:[`${"ms"} auth switch`,`${"ms"} auth switch --account user@contoso.com`],options:{account:"Username (email) or home account ID of the account to make active."}}},app:{create:{description:`Create a new managed app and scaffold the app template into an empty target directory. Provisions a platform-managed git repo by default; see --repo to bind an external GitHub repo or skip git scaffolding. To bind an existing project instead, use '${"ms"} app init'.`,options:{environmentId:"Target environment ID for the new managed app (optional).",displayName:"Display name for the managed app.",description:"Optional description for the managed app.",repositoryId:"Repository ID to associate with the managed app for source control.",template:"GitHub repository or subpath to scaffold the managed app from (e.g. github:owner/repo/subdir). Defaults to github:microsoft/Managed-Apps/templates/vite8. Applies to all --repo modes (native, --repo <url>, and --repo none).",buildPath:"Path to the build output directory. Defaults to ./dist.",buildCommand:'Full shell command used to build the app. Defaults to "npm run build".',buildEntryPoint:"Entry point HTML file for the app. Defaults to index.html.",repo:"Source-control binding for the new app. Omit to use the default platform-managed flow. Pass a repository URL \u2014 for example a GitHub Enterprise Cloud tenant URL (e.g. https://myorg.ghe.com/contoso/expense-tracker) or github.com (e.g. https://github.com/contoso/expense-tracker) \u2014 to bind to an external repo; the repo must already exist and must be empty, and the CLI clones it into [directory] and overlays the template. The server is the authority on which hosts/schemes are accepted. Pass '--repo none' to skip all git binding: the CLI scaffolds the template and writes ms.config.json into [directory] but does not init a local git repo or bind to a remote. The target directory must be empty in every mode \u2014 to bind an existing project to a new app, use 'ms app init' instead. Cannot be combined with --repository-id.",openBrowser:"Launch the browser to complete the GitHub device code flow during inline GitHub authentication. Default: do not launch. Has no effect when `--json` is set (JSON mode never launches a browser).",forceReauth:"Bypass the stored GitHub authentication mapping and force re-authentication via device code flow, as if the mapping had expired. Has no effect on apps not bound to an external GitHub repository."},examples:[`${"ms"} app create --display-name "My App" --repository-id <id>`,`${"ms"} app create ./my-app --display-name "My App" --repository-id <id>`,`${"ms"} app create ./my-app --display-name "My App" --repository-id <id> --description "A description"`,`${"ms"} app create ./my-app --display-name "My App" --repo https://myorg.ghe.com/contoso/expense-tracker`,`${"ms"} app create ./my-app --display-name "My App" --repo none`]},init:{description:"Convert an existing project into a managed app.",options:{environmentId:"Target environment ID for the new managed app (optional).",cloud:"Cloud environment to target. Valid values include: public, usgov, usgovhigh, usgovdod, china. Defaults to public.",displayName:"Display name for the managed app.",description:"Optional description for the managed app.",buildPath:"Path to the build output directory. Defaults to ./dist.",buildCommand:'Full shell command used to build the app. Defaults to "npm run build".',fileEntryPoint:"Entry point HTML file for the app. Defaults to index.html.",appUrl:"Local development URL for the app. Defaults to http://localhost:3000.",buildEntryPoint:"Entry point HTML file for the app. Defaults to index.html.",repo:"Repository behavior for init. Pass '--repo native' to force a platform-managed repo without inspecting the current git setup. Pass '--repo none' to use BYO build flow (no platform-managed repo). Pass '--repo <repo-url>' to bind to an existing GitHub repo (current directory must already contain the cloned repo). Omit to auto-detect current git setup and prompt in interactive mode.",iconPath:"Optional path to a .png or .jpg app icon, written to ms.config.json as iconPath.",localAppUrl:"Optional local development URL for the app, written to ms.config.json as localAppUrl.",openBrowser:"Launch the browser to complete the GitHub device code flow during inline GitHub authentication. Default: do not launch. Has no effect when `--json` is set (JSON mode never launches a browser).",forceReauth:"Bypass the stored GitHub authentication mapping and force re-authentication via device code flow, as if the mapping had expired. Has no effect on apps not bound to an external GitHub repository."},examples:[`${"ms"} app init --display-name "My App" --environment-id <id>`,`${"ms"} app init --display-name "My App" --environment-id <id> --description "A description"`,`${"ms"} app init --display-name "My App" --environment-id <id> --build-path ./out`,`${"ms"} app init --display-name "My App" --repo none`,`${"ms"} app init --display-name "My App" --repo https://myorg.ghe.com/contoso/expense-tracker`]},list:{description:"List all apps you have access to with play URLs. Interactive text output shows edit access; non-interactive and JSON output include clone URL details when available for edit access. By default returns both edit and play access apps across the tenant; pass --environment-id to filter to a single environment.",options:{environmentId:"Optional environment ID to scope the listing to. When omitted, all apps the user can access across the tenant are returned.",permission:"Optional permission filter. Use `edit` for apps the user can contribute to, or `play` for apps the user can play/view. Omit to return both. Case-insensitive."},examples:[`${"ms"} app list`,`${"ms"} app list --json`,`${"ms"} app list --environment-id <id>`,`${"ms"} app list --permission play`]},info:{description:"Get details for an app.",options:{app:"The app identifier to retrieve (logical name or app ID GUID).",environmentId:`Override the environment ID. Defaults to environmentId in ${t}; when neither is set, the environment is resolved automatically from the app identifier.`},examples:[`${"ms"} app info --app my-app`,`${"ms"} app info --app <guid>`,`${"ms"} app info --app my-app --json`]},show:{description:"Show an app's configuration and bound resources.",examples:[`${"ms"} app show`,`${"ms"} app show --json`]},delete:{description:"Delete an app. Soft-deletes the app and cleans up related metadata.",options:{app:`The app name to delete. Defaults to the current app in ${t}.`,environmentId:"Override the environment ID. When omitted, the environment is resolved automatically from the app. Useful for deleting an app from outside its scaffolded directory.",force:"Skip the confirmation prompt."},examples:[`${"ms"} app delete`,`${"ms"} app delete --app my-app`,`${"ms"} app delete --app my-app --environment-id <id> --force`,`${"ms"} app delete --json --force`]},share:{description:"Share an app with users, groups, or service principals. Provide a comma-separated list of user or group email addresses or Entra object IDs. Service principals must be specified by object ID, not application (client) ID. Use --access play (default) to grant play access to the app, or --access edit to grant edit access to the underlying repository. To distribute access via a tenant-wide link instead of named principals, use `ms app share link create` (run `ms app share link --help` for the full link surface).",options:{app:`The app name to share. Defaults to the current app in ${t}.`,access:'Access level to grant: "play" (default \u2014 run the app) or "edit" (modify the app).'},examples:[`${"ms"} app share alice@contoso.com,bob@contoso.com`,`${"ms"} app share --app my-app <aad-id>`,`${"ms"} app share <service-principal-object-id>`,`${"ms"} app share alice@contoso.com --access edit`,`${"ms"} app share alice@contoso.com --json`,`${"ms"} app share link create`],list:{description:"List the users, groups, and service principals an app is shared with at a given access level.",options:{app:`The app name. Defaults to the current app in ${t}.`,environmentId:`Override the environment ID. Defaults to environmentId in ${t}.`,access:'Access level to list (required): "play" (run the app) or "edit" (modify the app).'},examples:[`${"ms"} app share list --access play`,`${"ms"} app share list --access edit`,`${"ms"} app share list --access edit --app my-app`,`${"ms"} app share list --access play --json`]}},unshare:{description:"Unshare an app from users, groups, or service principals. Provide a comma-separated list of user or group email addresses or Entra object IDs. Service principals must be specified by object ID, not application (client) ID. Use --access play (default) to revoke play access on the app, or --access edit to revoke edit access on the underlying repository. Each invocation only touches the requested access level.",options:{app:`The app name to unshare. Defaults to the current app in ${t}.`,access:'Access level to revoke: "play" (default \u2014 app access) or "edit" (repository access).'},examples:[`${"ms"} app unshare alice@contoso.com,bob@contoso.com`,`${"ms"} app unshare --app my-app <aad-id>`,`${"ms"} app unshare alice@contoso.com --access edit`,`${"ms"} app unshare alice@contoso.com --json`]},shareLink:{description:"Manage tenant-wide share links for a managed app. A share link is a JIT-redemption URL: the first time a recipient opens it, they are granted the configured role at the app scope. Links can be listed and revoked at any time.",create:{description:'Create a share link for a managed app. The link grants the "Microsoft App Reader" role at the app scope on redemption. Only this role is supported today; the enum is open server-side for future expansion.',options:{app:`The app name to share. Defaults to the current app in ${t}.`,environmentId:`Override the environment ID. Defaults to environmentId in ${t}.`},examples:[`${"ms"} app share link create`,`${"ms"} app share link create --app my-app`,`${"ms"} app share link create --json`]},list:{description:"List all share links currently issued for a managed app.",options:{app:`The app name. Defaults to the current app in ${t}.`,environmentId:`Override the environment ID. Defaults to environmentId in ${t}.`},examples:[`${"ms"} app share link list`,`${"ms"} app share link list --app my-app`,`${"ms"} app share link list --json`]},revoke:{description:"Revoke a share link by ID. The server attempts to remove the role assignment for every prior redeemer before tearing down the link record; new recipients can no longer redeem the link.",options:{app:`The app name. Defaults to the current app in ${t}.`,environmentId:`Override the environment ID. Defaults to environmentId in ${t}.`,linkId:"The share link ID (4-char lowercase hex) returned at creation time.",force:"Skip the confirmation prompt."},examples:[`${"ms"} app share link revoke --link-id a3f1`,`${"ms"} app share link revoke --link-id a3f1 --force`,`${"ms"} app share link revoke --link-id a3f1 --app my-app --json`]}},build:{description:"Initiate a build for an app. By default the CLI waits for build-status to reach a terminal state; pass --no-wait to return immediately after submission.",options:{appName:"The app name to build.",commitSha:"The commit ID to build from.",openBrowser:"Launch the browser to complete the GitHub device code flow during inline GitHub authentication. Default: do not launch. Has no effect when `--json` is set (JSON mode never launches a browser). Only relevant for apps bound to an external GitHub repository.",noWait:"Return immediately after submitting the build and print a build-status hint.",forceReauth:"Bypass the stored GitHub authentication mapping and force re-authentication via device code flow, as if the mapping had expired. Has no effect on apps not bound to an external GitHub repository."},examples:[`${"ms"} app build --app my-app --commit abc1234`,`${"ms"} app build --app my-app --commit abc1234 --no-wait`,`${"ms"} app build --app my-app --commit abc1234 --json`]},buildStatus:{description:"Check the status of a build.",options:{appName:"The app name.",commitSha:"The commit ID for which a build was initiated by app build.",showLog:"Fetch and print the build log when available."},examples:[`${"ms"} app build-status --app my-app --commit <sha>`,`${"ms"} app build-status --app my-app --commit <sha> --show-log`,`${"ms"} app build-status --app my-app --commit <sha> --json`]},deploy:{description:`Build and deploy an app to live. Behavior depends on the app's repoType in ${t}: git-backed apps (native/github) deploy a commit (default HEAD; override with --commit). External-artifact apps (repoType: 'none') pack and upload locally, or upload a pre-built .zip when --artifact is supplied.`,options:{app:`The app name to deploy. Defaults to the current app in ${t}.`,commit:"The commit ID to deploy (git-backed apps only). Defaults to the commit at HEAD.",artifact:"Path to a local .zip build artifact to upload and deploy. Only valid for apps created with repoType: 'none'; rejected on git-backed apps. Mutually exclusive with --commit.",force:"Deploy even when the working tree has uncommitted changes or local main is ahead of origin/main. Skips the confirmation prompt in interactive mode and the validation error in non-interactive mode.",openBrowser:"Launch the browser to complete the GitHub device code flow during inline GitHub authentication. Default: do not launch. Has no effect when `--json` is set (JSON mode never launches a browser). Only relevant for apps bound to an external GitHub repository.",forceReauth:"Bypass the stored GitHub authentication mapping and force re-authentication via device code flow, as if the mapping had expired. Has no effect on apps not bound to an external GitHub repository."},examples:[`${"ms"} app deploy`,`${"ms"} app deploy --app my-app --commit abc1234`,`${"ms"} app deploy --force`,`${"ms"} app deploy --artifact ./build.zip`,`${"ms"} app deploy --app my-app --commit abc1234 --json`]},pack:{description:"Build the app and copy the output to .ms/packed/apps/<appId>/client/ for local inspection.",examples:[`${"ms"} app pack`]},play:{description:"Open a managed app in the browser. Use --mode live (default) to launch the deployed version, or --mode preview to preview the app on the main branch, or the provided commit ID.",options:{app:`The app name to play. Defaults to the current app in ${t}.`,mode:"Which app to open: 'live' (default \u2014 the deployed version) or 'preview'.",commit:"Preview mode only. The commit ID to open. When omitted, defaults to HEAD on main.",noBrowser:"Print the URL but do not open a browser window."},examples:[`${"ms"} app play`,`${"ms"} app play --mode preview`,`${"ms"} app play --mode preview --commit abc1234`,`${"ms"} app play --app my-app --no-browser`,`${"ms"} app play --json`]},dev:{description:"Start local development.",options:{port:"Port number for the local config server.",localAppUrl:"Local URL where the app is running.",configOnly:"Start only the config server without running the dev script. Use this if you want to manage your dev server separately."},examples:[`${"ms"} app dev`,`${"ms"} app dev --port 8080 --local-app-url http://localhost:3000`,`${"ms"} app dev --local-app-url http://localhost:3000 --config-only`]},refresh:{description:"Refresh data sources in an app.",dataSource:{description:"Re-fetch data source metadata from the service and regenerate TypeScript.",options:{offline:"Regenerate TypeScript from the local schemas in '.ms/schemas' without contacting the service (no network or authentication). Omit to re-fetch metadata from the service and regenerate.",name:"Name of a specific data source to refresh. Omit to refresh all."},examples:[`${"ms"} app refresh data-source`,`${"ms"} app refresh data-source --name teams`,`${"ms"} app refresh data-source --offline`]}},add:{description:"Add a data source to the current app.",options:{connector:"Connector identifier.",connectionId:"Connection identifier.",connectionRef:"Connection reference name.",resourceName:"Table or resource name.",dataset:"Dataset identifier.",sqlStoredProcedure:"SQL stored procedure name.",solutionId:"Solution identifier.",skipCodegen:"Skip TypeScript code generation after adding the data source."},examples:[`${"ms"} app add data-source --connector shared_office365`,`${"ms"} app add table --connector shared_sql --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add procedure --connector shared_sql --connection-id <id> --dataset <db>`],action:{description:"Add a connector to the app as an action data source.",options:{connector:"Connector identifier (e.g. shared_office365).",connectionId:"Connection identifier. Required for multi-auth connectors; prompted interactively when omitted.",skipCodegen:"Skip TypeScript code generation after adding the connector."},examples:[`${"ms"} app add action --connector shared_office365`,`${"ms"} app add action --connector shared_sql --connection-id <id>`,`${"ms"} app add action --connector shared_office365 --skip-codegen`]},table:{description:"Add a connector table to the app as a tabular data source.",options:{connector:"Connector identifier (e.g. shared_sql, shared_sharepointonline).",connectionId:"Connection ID to use. If omitted, you will be prompted to select one.",dataset:"Dataset name (e.g. a SQL server/database or SharePoint site URL). If omitted, you will be prompted.",table:"Table name. If omitted, you will be prompted to select one.",skipCodegen:"Skip TypeScript model service generation after adding the table."},examples:[`${"ms"} app add table --connector shared_sql`,`${"ms"} app add table --connector shared_sql --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add table --connector shared_sharepointonline --skip-codegen`]},connector:{description:"Add a data source (a connector table or action) to the app.",options:{connector:'Connector ID (e.g. shared_office365, shared_sql) or display name (e.g. "Office 365 Users"). Run `ms connector list` to browse connectors.',connectionId:"Connection ID to use. If omitted: interactive mode prompts you to pick or create one; non-interactive mode reuses your only connection, silently creates one for connectors whose sole authentication type is single sign-on when none exist, or errors when the choice is ambiguous. Pass --use-sso to reuse an existing SSO connection (or silently create one) for any SSO-capable connector, not just SSO-only ones.",dataset:"Dataset name (only used when adding as a table). If omitted in table mode, you will be prompted.",table:"Table name. In table mode this is the table name within the dataset. With --connector shared_commondataserviceforapps it is the Dataverse table logical name (e.g. account). If omitted, you will be prompted.",as:'Force the dispatch to "table" or "action". Required in non-interactive mode when the connector supports tables.',dataverseEnvironmentId:"Dataverse environment ID (GUID). Only used with --connector shared_commondataserviceforapps to bind to a specific table.",useSso:"Prefer a single sign-on (Entra ID) connection: reuse the first existing SSO connection when one exists, otherwise silently create one. Works even when the connector offers other authentication types. Errors if the connector is not SSO-capable. Ignored when --connection-id is supplied.",skipCodegen:"Skip TypeScript code generation after adding the data source."},examples:[`${"ms"} app add data-source --connector shared_office365`,`${"ms"} app add data-source --connector "Office 365 Users"`,`${"ms"} app add data-source --connector shared_sql --as table --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add data-source --connector "SQL Server" --as table --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add data-source --connector shared_sharepointonline --as action`,`${"ms"} app add data-source --connector "SharePoint" --as action`,`${"ms"} app add data-source --connector shared_office365 --as action --use-sso`,`${"ms"} app add data-source --connector shared_sql --as table --skip-codegen`,`${"ms"} app add data-source --connector shared_commondataserviceforapps --as action --connection-id <id> --dataverse-environment-id <env-guid> --table account`],deprecation:`(deprecated) '${"ms"} app add connector' is deprecated. Use '${"ms"} app add data-source' instead.`,deprecatedExamples:[`${"ms"} app add connector --connector shared_office365`,`${"ms"} app add connector --connector shared_sql --as table --connection-id <id> --dataset <db> --table <tbl>`,`${"ms"} app add connector --connector shared_sharepointonline --as action`,`${"ms"} app add connector --connector shared_sql --as table --skip-codegen`,`${"ms"} app add connector --connector shared_commondataserviceforapps --as action --connection-id <id> --dataverse-environment-id <env-guid> --table account`]}},remove:{description:"Remove a data source (table or action) from the app.",options:{dataSourceName:"Name of the data source to remove.",force:"Skip confirmation prompt."},examples:[`${"ms"} app remove data-source`,`${"ms"} app remove data-source --name documents`,`${"ms"} app remove data-source --name orders --force`],deprecation:`(deprecated) '${"ms"} app remove connector' is deprecated. Use '${"ms"} app remove data-source' instead.`,deprecatedExamples:[`${"ms"} app remove connector`,`${"ms"} app remove connector --name documents`,`${"ms"} app remove connector --name orders --force`]},"get-settings":{description:"View all app settings.",examples:[`${"ms"} app get-settings`,`${"ms"} app get-settings --json`]},"set-setting":{description:`Update app settings. Changes are written to ${t} and take effect the next time you run '${"ms"} app dev' or '${"ms"} app deploy'.`,options:{"show-header":"Show or hide the app header bar (true or false)."},examples:[`${"ms"} app set-setting --show-header false`]}},connector:{list:{description:"List connectors available in the environment. By default all connectors are shown, including those blocked by tenant policy; pass --only-allowed to list only connectors allowed by tenant policy.",hint:'Use the value in the "Connector" column as the ID (e.g. shared_office365), or pass the display name directly (e.g. "Office 365 Users") to add commands.',options:{environmentId:"Environment ID (optional).",search:"Filter connectors by display name or connector ID (case-insensitive).",onlyAllowed:"List only connectors allowed by tenant policy. By default all connectors are listed, including blocked ones."},examples:[`${"ms"} connector list`,`${"ms"} connector list --search "sql"`,`${"ms"} connector list --only-allowed`,`${"ms"} connector list --environment-id <env-id>`,`${"ms"} connector list --json`]},"list-actions":{description:"List actions available on a connector with their policy behavior.",options:{connector:"Connector identifier (e.g. shared_office365).",environmentId:"Environment ID (optional).",search:"Filter actions by summary or action ID (case-insensitive)."},examples:[`${"ms"} connector list-actions --connector shared_office365`,`${"ms"} connector list-actions --connector shared_sql --search "execute"`,`${"ms"} connector list-actions --connector shared_office365 --environment-id <env-id>`,`${"ms"} connector list-actions --connector shared_office365 --json`]}},telemetry:{enable:{description:"Enable telemetry collection. Defaults to --remote if no target is specified.",options:{remote:"Enable sending telemetry to the cloud service (default).",console:"Enable outputting telemetry to the local console."},examples:[`${"ms"} telemetry enable`,`${"ms"} telemetry enable --console`,`${"ms"} telemetry enable --remote --console`]},disable:{description:"Disable telemetry collection. Defaults to --remote if no target is specified.",options:{remote:"Disable sending telemetry to the cloud service (default).",console:"Disable outputting telemetry to the local console."},examples:[`${"ms"} telemetry disable`,`${"ms"} telemetry disable --console`,`${"ms"} telemetry disable --remote --console`]},status:{description:"Show the current telemetry settings.",examples:[`${"ms"} telemetry status`,`${"ms"} telemetry status --json`]}},deprecated:{Verbs:{"Add-flow":{Description:"Add a cloud flow to the current app by flow ID.",Options:{FlowId:"The unique identifier (GUID) of the flow to add."}},"Build-app":{Description:"Initiate a build for the app. By default waits for the build to reach a terminal state; pass --no-wait to return immediately after submission.",Options:{AppName:"The app name to build.",CommitSha:"The commit ID to build. Defaults to the commit at HEAD.",NoWait:"Return immediately after submitting the build."},Examples:[`${"ms"} app build --app my-app --commit abc1234`,`${"ms"} app build --app my-app --commit abc1234 --no-wait`,`${"ms"} app build --app my-app --commit abc1234 --json`]},"Get-build-status":{Description:"Get the status of an app build operation.",Options:{AppName:"The app name.",CommitSha:"The commit ID for which a build was initiated by app build."},Examples:[`${"ms"} app build-status --app my-app --commit <sha>`,`${"ms"} app build-status --app my-app --commit <sha> --json`]},"List-connection-references":{Description:"List all connection references in the environment.",Options:{SolutionId:"Solution identifier to filter by."},Examples:[`${"ms"} connection list-references`,`${"ms"} connection list-references --json`]},"List-datasets":{Description:"List all datasets for a connection.",Options:{Connector:"Connector identifier.",Connection:"Connection identifier."},Examples:[`${"ms"} connection list-datasets --connector shared_sql --connection <id>`,`${"ms"} connection list-datasets --connector shared_sql --connection <id> --json`]},"List-environment-variables":{Description:"List all environment variables in the environment.",Examples:[`${"ms"} environment list-variables`,`${"ms"} environment list-variables --json`]},"List-flows":{Description:"List all solution cloud flows that are invokable from the app.",Options:{Search:"Filter flows by name (case-insensitive substring match)"},Examples:[`${"ms"} app list-flows`,`${"ms"} app list-flows --search "approval" --json`]},"List-sqlStoredProcedures":{Description:"List all SQL stored procedures for a dataset.",Options:{Connection:"Connection identifier.",Dataset:"Dataset name."},Examples:[`${"ms"} connection list-procedures --connection <id> --dataset <db>`,`${"ms"} connection list-procedures --connection <id> --dataset <db> --json`]},"List-tables":{Description:"List all tables for a dataset.",Options:{Connector:"Connector identifier.",Connection:"Connection identifier.",Dataset:"Dataset name."},Examples:[`${"ms"} connection list-tables --connector shared_sql --connection <id> --dataset <db>`,`${"ms"} connection list-tables --connector shared_sql --connection <id> --dataset <db> --json`]},"Remove-flow":{Description:"Remove a cloud flow from the current app.",Options:{FlowDataSourceName:"The flow data source name to remove (as it appears in ms.config). Provide either this or --flow-id.",FlowId:"The flow resource ID (GUID) to remove \u2014 same ID used with app add flow. Provide either this or --flow-name."}}}},git:{auth:{refresh:{description:"Authenticate against a GitHub repository so subsequent app create / deploy / preview / build commands targeting that repo know your GitHub identity. Runs the GitHub device code flow via the Managed Apps GitHub App; no GitHub token is stored locally.",options:{repo:"GitHub repository URL (e.g. https://contoso.ghe.com/contoso/my-app or https://github.com/contoso/my-app). The Managed Apps GitHub App is the only supported provider; the server enforces which hosts/tenants are accepted.",openBrowser:"Launch the browser to complete the GitHub device code flow. Default: do not launch."},examples:[`${"ms"} git auth refresh --repo https://contoso.ghe.com/contoso/my-app`,`${"ms"} git auth refresh -r https://contoso.ghe.com/contoso/my-app --open-browser`,`${"ms"} git auth refresh --repo https://contoso.ghe.com/contoso/my-app --json`]}}}};export{n as a};
|
|
8
|
-
/*!
|
|
9
|
-
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
10
|
-
*/
|
|
11
|
-
//# sourceMappingURL=chunk-VNEZZ3RI.js.map
|