@microsoft/managed-apps-cli 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +13 -7
  2. package/dist/ArgumentProvider.d.ts.map +1 -1
  3. package/dist/ArgumentProvider.js +30 -21
  4. package/dist/ArgumentProvider.js.map +1 -1
  5. package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts +16 -0
  6. package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts.map +1 -1
  7. package/dist/Authentication/NodeMsalAuthenticationProvider.js +58 -6
  8. package/dist/Authentication/NodeMsalAuthenticationProvider.js.map +1 -1
  9. package/dist/Cli.d.ts.map +1 -1
  10. package/dist/Cli.js +22 -7
  11. package/dist/Cli.js.map +1 -1
  12. package/dist/CliSettings.d.ts +2 -2
  13. package/dist/CliSettings.d.ts.map +1 -1
  14. package/dist/CliSettings.js +2 -2
  15. package/dist/CliUtils.d.ts +16 -6
  16. package/dist/CliUtils.d.ts.map +1 -1
  17. package/dist/CliUtils.js +15 -23
  18. package/dist/CliUtils.js.map +1 -1
  19. package/dist/Constants/HelpStrings.d.ts +3 -2
  20. package/dist/Constants/HelpStrings.d.ts.map +1 -1
  21. package/dist/Constants/HelpStrings.js +16 -13
  22. package/dist/Constants/HelpStrings.js.map +1 -1
  23. package/dist/Constants.d.ts +1 -1
  24. package/dist/Constants.d.ts.map +1 -1
  25. package/dist/Constants.js +5 -2
  26. package/dist/Constants.js.map +1 -1
  27. package/dist/Errors/GitHubErrorMap.d.ts.map +1 -1
  28. package/dist/Errors/GitHubErrorMap.js +17 -10
  29. package/dist/Errors/GitHubErrorMap.js.map +1 -1
  30. package/dist/HttpClient/CliHttpClient.d.ts +13 -0
  31. package/dist/HttpClient/CliHttpClient.d.ts.map +1 -1
  32. package/dist/HttpClient/CliHttpClient.js +24 -0
  33. package/dist/HttpClient/CliHttpClient.js.map +1 -1
  34. package/dist/Logger/CliLogger.d.ts +50 -8
  35. package/dist/Logger/CliLogger.d.ts.map +1 -1
  36. package/dist/Logger/CliLogger.js +92 -37
  37. package/dist/Logger/CliLogger.js.map +1 -1
  38. package/dist/Logger/ConsoleWriter.d.ts +5 -0
  39. package/dist/Logger/ConsoleWriter.d.ts.map +1 -1
  40. package/dist/Logger/ConsoleWriter.js +22 -14
  41. package/dist/Logger/ConsoleWriter.js.map +1 -1
  42. package/dist/Middletier/FunctionsBundler.js +5 -1
  43. package/dist/Middletier/FunctionsBundler.js.map +1 -1
  44. package/dist/Middletier/PackFunctions.d.ts +5 -4
  45. package/dist/Middletier/PackFunctions.d.ts.map +1 -1
  46. package/dist/Middletier/PackFunctions.js +8 -7
  47. package/dist/Middletier/PackFunctions.js.map +1 -1
  48. package/dist/Types/Cli.types.d.ts +1 -1
  49. package/dist/Types/Cli.types.d.ts.map +1 -1
  50. package/dist/Utils/DcfRecovery.d.ts.map +1 -1
  51. package/dist/Utils/DcfRecovery.js +12 -4
  52. package/dist/Utils/DcfRecovery.js.map +1 -1
  53. package/dist/Utils/EnvVars.d.ts +1 -1
  54. package/dist/Utils/EnvVars.d.ts.map +1 -1
  55. package/dist/Utils/EnvVars.js.map +1 -1
  56. package/dist/Utils/EnvironmentRoutingUtils.d.ts +55 -0
  57. package/dist/Utils/EnvironmentRoutingUtils.d.ts.map +1 -1
  58. package/dist/Utils/EnvironmentRoutingUtils.js +85 -1
  59. package/dist/Utils/EnvironmentRoutingUtils.js.map +1 -1
  60. package/dist/Utils/HelpBanner.d.ts +11 -0
  61. package/dist/Utils/HelpBanner.d.ts.map +1 -0
  62. package/dist/Utils/HelpBanner.js +15 -0
  63. package/dist/Utils/HelpBanner.js.map +1 -0
  64. package/dist/Utils/RepoUrl.d.ts +11 -6
  65. package/dist/Utils/RepoUrl.d.ts.map +1 -1
  66. package/dist/Utils/RepoUrl.js +1 -1
  67. package/dist/Utils/RepoUrl.js.map +1 -1
  68. package/dist/Utils/ResolveCommand.d.ts +32 -2
  69. package/dist/Utils/ResolveCommand.d.ts.map +1 -1
  70. package/dist/Utils/ResolveCommand.js +70 -11
  71. package/dist/Utils/ResolveCommand.js.map +1 -1
  72. package/dist/Verbs/CreateMaafApp.d.ts +5 -5
  73. package/dist/Verbs/CreateMaafApp.d.ts.map +1 -1
  74. package/dist/Verbs/CreateMaafApp.js +46 -39
  75. package/dist/Verbs/CreateMaafApp.js.map +1 -1
  76. package/dist/Verbs/DeployMaafApp.js +2 -2
  77. package/dist/Verbs/DeployMaafApp.js.map +1 -1
  78. package/dist/Verbs/GetSettings.d.ts.map +1 -1
  79. package/dist/Verbs/GetSettings.js +9 -18
  80. package/dist/Verbs/GetSettings.js.map +1 -1
  81. package/dist/Verbs/Init.d.ts.map +1 -1
  82. package/dist/Verbs/Init.js +33 -81
  83. package/dist/Verbs/Init.js.map +1 -1
  84. package/dist/Verbs/ListConnectorActions.d.ts.map +1 -1
  85. package/dist/Verbs/ListConnectorActions.js +16 -5
  86. package/dist/Verbs/ListConnectorActions.js.map +1 -1
  87. package/dist/Verbs/ListConnectors.d.ts.map +1 -1
  88. package/dist/Verbs/ListConnectors.js +16 -5
  89. package/dist/Verbs/ListConnectors.js.map +1 -1
  90. package/dist/Verbs/ListMaafApps.js +1 -1
  91. package/dist/Verbs/ListMaafApps.js.map +1 -1
  92. package/dist/Verbs/MaafAppPermissions.d.ts +12 -6
  93. package/dist/Verbs/MaafAppPermissions.d.ts.map +1 -1
  94. package/dist/Verbs/MaafAppPermissions.js +208 -66
  95. package/dist/Verbs/MaafAppPermissions.js.map +1 -1
  96. package/dist/Verbs/Pack.d.ts.map +1 -1
  97. package/dist/Verbs/Pack.js +11 -0
  98. package/dist/Verbs/Pack.js.map +1 -1
  99. package/dist/Verbs/RefreshGitAuth.d.ts.map +1 -1
  100. package/dist/Verbs/RefreshGitAuth.js +30 -15
  101. package/dist/Verbs/RefreshGitAuth.js.map +1 -1
  102. package/dist/Verbs/SetSetting.d.ts.map +1 -1
  103. package/dist/Verbs/SetSetting.js +39 -49
  104. package/dist/Verbs/SetSetting.js.map +1 -1
  105. package/dist/Verbs/VerbConstants.d.ts +23 -19
  106. package/dist/Verbs/VerbConstants.d.ts.map +1 -1
  107. package/dist/Verbs/VerbConstants.js +20 -22
  108. package/dist/Verbs/VerbConstants.js.map +1 -1
  109. package/package.json +5 -5
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Copyright (C) Microsoft Corporation. All rights reserved.
3
3
  */
4
- export type CliEnvVarName = 'USE_SP_AUTH' | 'SP_CLIENT_ID' | 'SP_CLIENT_SECRET' | 'SP_TENANT_ID' | 'USE_HTTP_FORWARD' | 'HTTP_FORWARD_URL' | 'HTTP_FORWARD_AUTH_TOKEN' | 'HTTP_FORWARD_TENANT_ID' | 'ENABLE_CONNECTOR_USER_CONSENT' | 'REMOTE_TELEMETRY' | 'CONSOLE_TELEMETRY' | 'CONFIG_DIR' | 'WORKING_DIRECTORY' | 'MAAF_DEBUG_ENVIRONMENT_ID' | 'MAAF_GRS_ENDPOINT_OVERRIDE' | 'ENVIRONMENT_ID' | 'APP_DISPLAY_NAME' | 'APP_DESCRIPTION' | 'APP_ID' | 'APP_TEMPLATE' | 'APP_REPOSITORY_ID' | 'APP_REPO' | 'LOCAL_APP_URL' | 'BUILD_PATH' | 'BUILD_COMMAND' | 'BUILD_ENTRY_POINT' | 'LOGO_PATH' | 'CONFIG_ONLY' | 'PORT' | 'CLOUD_INSTANCE' | 'API_ID' | 'CONNECTION_ID' | 'CONNECTION_REF' | 'CONNECTOR_ID' | 'CONNECTOR_SEARCH' | 'CONNECTOR_ACTION_SEARCH' | 'DATASET' | 'TABLE' | 'TABLE_NAME' | 'DATA_SOURCE_NAME' | 'SEARCH_TERM' | 'DATAVERSE_API_SEARCH_TERM' | 'SQL_STORED_PROCEDURE' | 'ENV_URL' | 'SOLUTION_ID' | 'ADD_CONNECTOR_AS' | 'FLOW_ID' | 'FLOW_SEARCH' | 'FLOW_DATA_SOURCE_NAME' | 'REMOVE_FLOW_ID' | 'MAAF_APP_NAME' | 'MAAF_APP_ACCESS' | 'MAAF_COMMIT_SHA' | 'MAAF_PLAY_MODE' | 'MAAF_ENVIRONMENT_ID' | 'MAAF_SHARE_LINK_ID' | 'MAAF_DEPLOY_ARTIFACT' | 'MAAF_GITHUB_REPO' | 'LIST_ENVIRONMENT_ID' | 'LIST_PERMISSION' | 'SKIP_CODEGEN' | 'USE_V1_CODEGEN' | 'APP_SHOW_HEADER';
4
+ export type CliEnvVarName = 'USE_SP_AUTH' | 'SP_CLIENT_ID' | 'SP_CLIENT_SECRET' | 'SP_TENANT_ID' | 'USE_HTTP_FORWARD' | 'HTTP_FORWARD_URL' | 'HTTP_FORWARD_AUTH_TOKEN' | 'HTTP_FORWARD_TENANT_ID' | 'ENABLE_CONNECTOR_USER_CONSENT' | 'REMOTE_TELEMETRY' | 'CONSOLE_TELEMETRY' | 'ORIGIN' | 'USE_MMA_APP_ID' | 'CONFIG_DIR' | 'WORKING_DIRECTORY' | 'MAAF_DEBUG_ENVIRONMENT_ID' | 'MAAF_GRS_ENDPOINT_OVERRIDE' | 'ENVIRONMENT_ID' | 'APP_DISPLAY_NAME' | 'APP_DESCRIPTION' | 'APP_ID' | 'APP_TEMPLATE' | 'APP_REPOSITORY_ID' | 'APP_REPO' | 'LOCAL_APP_URL' | 'BUILD_PATH' | 'BUILD_COMMAND' | 'BUILD_ENTRY_POINT' | 'CONFIG_ONLY' | 'PORT' | 'CLOUD_INSTANCE' | 'API_ID' | 'CONNECTION_ID' | 'CONNECTION_REF' | 'CONNECTOR_ID' | 'CONNECTOR_SEARCH' | 'CONNECTOR_ACTION_SEARCH' | 'DATASET' | 'TABLE' | 'TABLE_NAME' | 'DATA_SOURCE_NAME' | 'SEARCH_TERM' | 'DATAVERSE_API_SEARCH_TERM' | 'SQL_STORED_PROCEDURE' | 'ENV_URL' | 'SOLUTION_ID' | 'ADD_CONNECTOR_AS' | 'FLOW_ID' | 'FLOW_SEARCH' | 'FLOW_DATA_SOURCE_NAME' | 'REMOVE_FLOW_ID' | 'MAAF_APP_NAME' | 'MAAF_APP_ACCESS' | 'MAAF_COMMIT_SHA' | 'MAAF_PLAY_MODE' | 'MAAF_ENVIRONMENT_ID' | 'MAAF_SHARE_LINK_ID' | 'MAAF_DEPLOY_ARTIFACT' | 'MAAF_GITHUB_REPO' | 'LIST_ENVIRONMENT_ID' | 'LIST_PERMISSION' | 'SKIP_CODEGEN' | 'USE_V1_CODEGEN' | 'APP_SHOW_HEADER';
5
5
  export declare function cliEnvVarFullName(name: CliEnvVarName): string;
6
6
  export declare function getCliEnvVar(name: CliEnvVarName): string | undefined;
7
7
  export declare function getCliEnvVarBool(name: CliEnvVarName): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"EnvVars.d.ts","sourceRoot":"","sources":["../../src/Utils/EnvVars.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,MAAM,MAAM,aAAa,GAErB,aAAa,GACb,cAAc,GACd,kBAAkB,GAClB,cAAc,GAEd,kBAAkB,GAClB,kBAAkB,GAClB,yBAAyB,GACzB,wBAAwB,GAExB,+BAA+B,GAE/B,kBAAkB,GAClB,mBAAmB,GAEnB,YAAY,GACZ,mBAAmB,GACnB,2BAA2B,GAC3B,4BAA4B,GAE5B,gBAAgB,GAChB,kBAAkB,GAClB,iBAAiB,GACjB,QAAQ,GACR,cAAc,GACd,mBAAmB,GACnB,UAAU,GACV,eAAe,GACf,YAAY,GACZ,eAAe,GACf,mBAAmB,GACnB,WAAW,GACX,aAAa,GACb,MAAM,GACN,gBAAgB,GAEhB,QAAQ,GACR,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,kBAAkB,GAClB,yBAAyB,GACzB,SAAS,GACT,OAAO,GACP,YAAY,GACZ,kBAAkB,GAClB,aAAa,GACb,2BAA2B,GAC3B,sBAAsB,GACtB,SAAS,GACT,aAAa,GACb,kBAAkB,GAElB,SAAS,GACT,aAAa,GACb,uBAAuB,GACvB,gBAAgB,GAEhB,eAAe,GAC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AC,CAAC,CAAC;AAC9C,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,KAAa;IACzD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,QAA4B;IACrD,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;AAChC,CAAC"}
@@ -4,5 +4,60 @@
4
4
  import type { IHttpClient } from '@microsoft/managed-apps-actions';
5
5
  import type { GetUserRoutingEnvironmentResult } from '@microsoft/managed-apps-common/services';
6
6
  import type { ILogger } from '@microsoft/managed-apps-common/telemetry';
7
+ import type { ArgumentProvider } from '../ArgumentProvider.js';
7
8
  export declare function resolveRoutingEnvironmentIdAsync(resultPromise: Promise<GetUserRoutingEnvironmentResult>, httpClient: IHttpClient, logger: ILogger): Promise<string>;
9
+ /**
10
+ * Kicks off PDE routing as a background promise so the network round-trip
11
+ * can overlap with interactive prompts in `app init` / `app create`. When
12
+ * `trackBackgroundFailure` is true (the default), a `.catch()` is attached
13
+ * so that a later thrown prompt does not surface the rejection as an
14
+ * unhandled promise rejection — the eventual `await` still re-throws
15
+ * normally for the caller to handle, and a `*.RoutingEnvironmentBackgroundFailure`
16
+ * telemetry event records the original error.
17
+ *
18
+ * Callers that `await` the returned promise immediately (no intervening
19
+ * prompts) should pass `trackBackgroundFailure: false` so the failure path
20
+ * is reported once, by the caller's own error handler, instead of being
21
+ * double-counted as a "background" failure.
22
+ *
23
+ * Always calls the routing service with `provisionDataverse: false` — the
24
+ * lightweight DV-free PDE is sufficient for `app init`, `app create`, and
25
+ * the read-only browse verbs.
26
+ *
27
+ * @param telemetryNamespace - Prefix for the background-failure error event
28
+ * (e.g. `'Init'` → `'Init.RoutingEnvironmentBackgroundFailure'`). Unused
29
+ * when `trackBackgroundFailure` is false.
30
+ */
31
+ export declare function startPdeRoutingAsync(argumentProvider: ArgumentProvider, tenantId: string, logger: ILogger, telemetryNamespace: string, options?: {
32
+ trackBackgroundFailure?: boolean;
33
+ }): Promise<string>;
34
+ /**
35
+ * Resolves an environment ID for read-only browse verbs (`ms connector list`,
36
+ * `ms connector list-actions`, etc.) without ever prompting the user.
37
+ *
38
+ * Resolution order:
39
+ * 1. `--environment-id` flag (when the verb registers it).
40
+ * 2. `ms.config.json` (when the verb runs inside an existing app project).
41
+ * 3. The user's Personal Developer Environment (PDE) via the routing service.
42
+ * If no PDE exists yet, the routing service provisions one (with
43
+ * `provisionDataverse: false`) and we poll until it's ready.
44
+ *
45
+ * Steps 1 and 2 are both handled by `resolveEnvironmentId({ failIfMissing: false })`,
46
+ * which prefers the flag over the config.
47
+ *
48
+ * In non-JSON mode, prints a "resolving …" info line *before* the await so
49
+ * the user gets immediate feedback during the (potentially multi-second)
50
+ * provision/poll, then a final "Using developer environment …" line once
51
+ * the id is known.
52
+ *
53
+ * Always calls `updateEnvironmentName` so downstream player-service URLs
54
+ * target the right tenant cluster.
55
+ *
56
+ * Throws `UsageError` when the tenant ID can't be resolved (auth issue) or
57
+ * when the routing service returns an actionable failure.
58
+ */
59
+ export declare function resolveEnvironmentIdOrPdeAsync(argumentProvider: ArgumentProvider, logger: ILogger, options?: {
60
+ jsonMode?: boolean;
61
+ telemetryNamespace?: string;
62
+ }): Promise<string>;
8
63
  //# sourceMappingURL=EnvironmentRoutingUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentRoutingUtils.d.ts","sourceRoot":"","sources":["../../src/Utils/EnvironmentRoutingUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAA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CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5D,OAAO,CAAC,MAAM,CAAC,CA8BjB"}
@@ -1,8 +1,12 @@
1
1
  /*!
2
2
  * Copyright (C) Microsoft Corporation. All rights reserved.
3
3
  */
4
+ import { getPlayerServiceConfig, updateEnvironmentName } from '@microsoft/managed-apps-actions';
4
5
  import { NotFoundError, UsageError } from '@microsoft/managed-apps-common/errors';
5
- import { ManagedGovernanceError, ManagedGovernanceTimeoutError, pollRoutingEnvironmentAsync, } from '@microsoft/managed-apps-common/services';
6
+ import { getUserRoutingEnvironmentAsync, ManagedGovernanceError, ManagedGovernanceTimeoutError, pollRoutingEnvironmentAsync, } from '@microsoft/managed-apps-common/services';
7
+ import { resolveEnvironmentId } from '../CliUtils.js';
8
+ import { CLI_CLIENT_ID } from '../Constants.js';
9
+ import { printInfo } from './ConsoleOutput.js';
6
10
  export async function resolveRoutingEnvironmentIdAsync(resultPromise, httpClient, logger) {
7
11
  // Translate routing-service errors into a UsageError so the user sees an actionable message
8
12
  // rather than the raw "ManagedGovernance request failed with status 403" implementation detail.
@@ -42,4 +46,84 @@ function toRoutingUsageError(err) {
42
46
  }
43
47
  return err instanceof Error ? err : new Error(String(err));
44
48
  }
49
+ /**
50
+ * Kicks off PDE routing as a background promise so the network round-trip
51
+ * can overlap with interactive prompts in `app init` / `app create`. When
52
+ * `trackBackgroundFailure` is true (the default), a `.catch()` is attached
53
+ * so that a later thrown prompt does not surface the rejection as an
54
+ * unhandled promise rejection — the eventual `await` still re-throws
55
+ * normally for the caller to handle, and a `*.RoutingEnvironmentBackgroundFailure`
56
+ * telemetry event records the original error.
57
+ *
58
+ * Callers that `await` the returned promise immediately (no intervening
59
+ * prompts) should pass `trackBackgroundFailure: false` so the failure path
60
+ * is reported once, by the caller's own error handler, instead of being
61
+ * double-counted as a "background" failure.
62
+ *
63
+ * Always calls the routing service with `provisionDataverse: false` — the
64
+ * lightweight DV-free PDE is sufficient for `app init`, `app create`, and
65
+ * the read-only browse verbs.
66
+ *
67
+ * @param telemetryNamespace - Prefix for the background-failure error event
68
+ * (e.g. `'Init'` → `'Init.RoutingEnvironmentBackgroundFailure'`). Unused
69
+ * when `trackBackgroundFailure` is false.
70
+ */
71
+ export function startPdeRoutingAsync(argumentProvider, tenantId, logger, telemetryNamespace, options) {
72
+ const { trackBackgroundFailure = true } = options ?? {};
73
+ const httpClient = argumentProvider.getHttpClient();
74
+ const { region } = getPlayerServiceConfig();
75
+ const promise = resolveRoutingEnvironmentIdAsync(getUserRoutingEnvironmentAsync(httpClient, tenantId, CLI_CLIENT_ID, { provisionDataverse: false }, region, logger), httpClient, logger);
76
+ if (trackBackgroundFailure) {
77
+ promise.catch((error) => {
78
+ logger.trackErrorEvent(`${telemetryNamespace}.RoutingEnvironmentBackgroundFailure`, {
79
+ error: error instanceof Error ? error.message : String(error),
80
+ });
81
+ });
82
+ }
83
+ return promise;
84
+ }
85
+ /**
86
+ * Resolves an environment ID for read-only browse verbs (`ms connector list`,
87
+ * `ms connector list-actions`, etc.) without ever prompting the user.
88
+ *
89
+ * Resolution order:
90
+ * 1. `--environment-id` flag (when the verb registers it).
91
+ * 2. `ms.config.json` (when the verb runs inside an existing app project).
92
+ * 3. The user's Personal Developer Environment (PDE) via the routing service.
93
+ * If no PDE exists yet, the routing service provisions one (with
94
+ * `provisionDataverse: false`) and we poll until it's ready.
95
+ *
96
+ * Steps 1 and 2 are both handled by `resolveEnvironmentId({ failIfMissing: false })`,
97
+ * which prefers the flag over the config.
98
+ *
99
+ * In non-JSON mode, prints a "resolving …" info line *before* the await so
100
+ * the user gets immediate feedback during the (potentially multi-second)
101
+ * provision/poll, then a final "Using developer environment …" line once
102
+ * the id is known.
103
+ *
104
+ * Always calls `updateEnvironmentName` so downstream player-service URLs
105
+ * target the right tenant cluster.
106
+ *
107
+ * Throws `UsageError` when the tenant ID can't be resolved (auth issue) or
108
+ * when the routing service returns an actionable failure.
109
+ */
110
+ export async function resolveEnvironmentIdOrPdeAsync(argumentProvider, logger, options) {
111
+ const fromConfig = await resolveEnvironmentId(argumentProvider, { failIfMissing: false });
112
+ if (fromConfig) {
113
+ return fromConfig;
114
+ }
115
+ const tenantId = await argumentProvider.getTenantIdAsync();
116
+ if (!tenantId) {
117
+ throw new UsageError('Unable to determine tenant ID. Ensure you are logged in.');
118
+ }
119
+ if (!options?.jsonMode) {
120
+ printInfo('No environment specified — resolving your developer environment…');
121
+ }
122
+ const environmentId = await startPdeRoutingAsync(argumentProvider, tenantId, logger, options?.telemetryNamespace ?? 'BrowseVerb', { trackBackgroundFailure: false });
123
+ updateEnvironmentName(environmentId);
124
+ if (!options?.jsonMode) {
125
+ printInfo(`Using developer environment ${environmentId}.`);
126
+ }
127
+ return environmentId;
128
+ }
45
129
  //# sourceMappingURL=EnvironmentRoutingUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentRoutingUtils.js","sourceRoot":"","sources":["../../src/Utils/EnvironmentRoutingUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAElF,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,yCAAyC,CAAC;AAGjD,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,aAAuD,EACvD,UAAuB,EACvB,MAAe;IAEf,4FAA4F;IAC5F,gGAAgG;IAChG,4FAA4F;IAC5F,0CAA0C;IAC1C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;QAEnC,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;YAC3C,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,IAAI,aAAa,CAAC,wDAAwD,CAAC,CAAC;YACpF,CAAC;YACD,OAAO,IAAI,CA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,KAAK,CAAC;aAC9D,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,gBAAkC,EAClC,MAAe,EACf,OAA6D;IAE7D,MAAM,UAAU,GAAG,MAAM,oBAAoB,CAAC,gBAAgB,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1F,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;IAC3D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,UAAU,CAAC,0DAA0D,CAAC,CAAC;IACnF,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC;QACvB,SAAS,CAAC,kEAAkE,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,aAAa,GAAG,MAAM,oBAAoB,CAC9C,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,OAAO,EAAE,kBAAkB,IAAI,YAAY,EAC3C,EAAE,sBAAsB,EAAE,KAAK,EAAE,CAClC,CAAC;IAEF,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAErC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC;QACvB,SAAS,CAAC,+BAA+B,aAAa,GAAG,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ /**
5
+ * The first line shown at the top of every `--help` output across the CLI
6
+ * (Commander-rendered help, noun-level help, and nested typed-verb help).
7
+ * Surfaces the CLI version and the (preview) tag so users always know which
8
+ * version they are running and that the surface is still pre-release.
9
+ */
10
+ export declare function getHelpBanner(): string;
11
+ //# sourceMappingURL=HelpBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelpBanner.d.ts","sourceRoot":"","sources":["../../src/Utils/HelpBanner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}
@@ -0,0 +1,15 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import packageJson from '../../package.json' with { type: 'json' };
5
+ import { CLI_BINARY_NAME } from '../Constants/CliConstants.js';
6
+ /**
7
+ * The first line shown at the top of every `--help` output across the CLI
8
+ * (Commander-rendered help, noun-level help, and nested typed-verb help).
9
+ * Surfaces the CLI version and the (preview) tag so users always know which
10
+ * version they are running and that the surface is still pre-release.
11
+ */
12
+ export function getHelpBanner() {
13
+ return `${CLI_BINARY_NAME} v${packageJson.version} (preview)`;
14
+ }
15
+ //# sourceMappingURL=HelpBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelpBanner.js","sourceRoot":"","sources":["../../src/Utils/HelpBanner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,GAAG,eAAe,KAAK,WAAW,CAAC,OAAO,YAAY,CAAC;AAChE,CAAC"}
@@ -2,12 +2,17 @@
2
2
  * Copyright (C) Microsoft Corporation. All rights reserved.
3
3
  */
4
4
  /**
5
- * Re-export of the canonical GitHub repo URL parser. The implementation lives
6
- * in `@microsoft/managed-apps-common/utils` so the actions package and the CLI agree
7
- * on a single parser; this file preserves the historical CLI import path for
8
- * existing consumers.
5
+ * Re-export of the canonical generic remote URL splitter. The implementation
6
+ * lives in `@microsoft/managed-apps-common/utils` so the actions package and
7
+ * the CLI agree on a single splitter; this file preserves the historical CLI
8
+ * import path for existing consumers.
9
+ *
10
+ * The CLI no longer performs scheme/host/shape validation on repo URLs — the
11
+ * server is the sole authority on URL acceptability. `parseRemoteUrl` is a
12
+ * best-effort splitter used purely for OAuth dispatch host extraction and
13
+ * PII-safe telemetry shaping.
9
14
  */
10
- export type { ParsedGitHubRepoUrl } from '@microsoft/managed-apps-common/utils';
11
- export { parseGitHubRepoUrl } from '@microsoft/managed-apps-common/utils';
15
+ export type { ParsedRemoteUrl } from '@microsoft/managed-apps-common/utils';
16
+ export { parseRemoteUrl } from '@microsoft/managed-apps-common/utils';
12
17
  export { computeRepoHash } from '@microsoft/managed-apps-common/utils/RepoHash';
13
18
  //# sourceMappingURL=RepoUrl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RepoUrl.d.ts","sourceRoot":"","sources":["../../src/Utils/RepoUrl.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,YAAY,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC"}
1
+ {"version":3,"file":"RepoUrl.d.ts","sourceRoot":"","sources":["../../src/Utils/RepoUrl.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AAEH,YAAY,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * Copyright (C) Microsoft Corporation. All rights reserved.
3
3
  */
4
- export { parseGitHubRepoUrl } from '@microsoft/managed-apps-common/utils';
4
+ export { parseRemoteUrl } from '@microsoft/managed-apps-common/utils';
5
5
  export { computeRepoHash } from '@microsoft/managed-apps-common/utils/RepoHash';
6
6
  //# sourceMappingURL=RepoUrl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RepoUrl.js","sourceRoot":"","sources":["../../src/Utils/RepoUrl.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC"}
1
+ {"version":3,"file":"RepoUrl.js","sourceRoot":"","sources":["../../src/Utils/RepoUrl.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC"}
@@ -9,16 +9,46 @@ import type { CommandTree, NounKey, ResolvedCommand } from '../Types/Command.typ
9
9
  * Typed verbs may nest arbitrarily, so a command path can be any depth (e.g.
10
10
  * `app add table` is 3 tokens, `app share link create` is 4). The walker
11
11
  * descends as deep as it can; when a typed verb has its own handler ("hybrid"
12
- * verb, like `app share`) and the next token does not name a known subcommand,
12
+ * verb, like `app share`) and the next token is **not** a known subcommand,
13
13
  * it falls back to the parent handler so the remaining tokens become
14
14
  * positional arguments — letting `ms app share alice@contoso.com` route to
15
- * the `share` handler.
15
+ * the `share` handler. When the next token IS a known sub-group of the
16
+ * typed verb but no leaf is reached, we return null instead of falling back,
17
+ * so callers can surface group help rather than misinterpret the sub-group
18
+ * name as a positional argument.
16
19
  *
17
20
  * @param argv - The full process.argv array (argv[0] = node, argv[1] = script)
18
21
  * @param tree - The command tree to resolve against
19
22
  * @returns The resolved command, or null if no match was found
20
23
  */
21
24
  export declare function resolveCommand(argv: readonly string[], tree: CommandTree): ResolvedCommand | null;
25
+ /**
26
+ * Describes a partially-resolved typed-verb path. Returned by
27
+ * `findIncompleteTypedPath` when argv tokens reach a typed verb group but
28
+ * stop short of (or overshoot) any leaf command.
29
+ */
30
+ export interface IncompleteTypedPath {
31
+ /** Tokens that matched the command tree along a typed-verb path, e.g. ['app','share','link']. */
32
+ pathTokens: readonly string[];
33
+ /** The next non-flag argv token after `pathTokens` if it failed to match a sub-key, else undefined. */
34
+ unknownToken: string | undefined;
35
+ }
36
+ /**
37
+ * Walks argv tokens along the command tree to detect an incomplete typed-verb
38
+ * path — i.e. a path that reached one or more typed verbs (groups) but did not
39
+ * land on a leaf command. Used by `ArgumentProvider` (when `resolveCommand`
40
+ * returns null) to either:
41
+ *
42
+ * - print the typed group's flattened help (when no extra non-flag token
43
+ * follows, e.g. `ms app share link` or `ms app add --connector shared_sql`), or
44
+ * - throw an "Unknown type 'X' for 'ms <path>'" error (when a bogus
45
+ * sub-token follows, e.g. `ms app share link bogus`).
46
+ *
47
+ * Returns null when the path is fully resolvable, when the noun is unknown,
48
+ * when only a noun is provided, or when the second token is not a typed verb
49
+ * (those cases are handled elsewhere in `ArgumentProvider`).
50
+ */
51
+ export declare function findIncompleteTypedPath(argv: readonly string[], tree: CommandTree): IncompleteTypedPath | null;
22
52
  /**
23
53
  * Checks whether the given token is a known noun in the command tree.
24
54
  * Used to distinguish `ms app` (show noun help) from `ms nonexistent` (error).
@@ -1 +1 @@
1
- {"version":3,"file":"ResolveCommand.d.ts","sourceRoot":"","sources":["../../src/Utils/ResolveCommand.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAEV,WAAW,EAEX,OAAO,EACP,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAGhC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,GAAG,eAAe,GAAG,IAAI,CAWjG;AAyCD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,KAAK,IAAI,OAAO,CAE9E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAK1F"}
1
+ {"version":3,"file":"ResolveCommand.d.ts","sourceRoot":"","sources":["../../src/Utils/ResolveCommand.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAEV,WAAW,EAEX,OAAO,EACP,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAGhC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,GAAG,eAAe,GAAG,IAAI,CAWjG;AAuDD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,iGAAiG;IACjG,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,uGAAuG;IACvG,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,IAAI,EAAE,WAAW,GAChB,mBAAmB,GAAG,IAAI,CA8B5B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,KAAK,IAAI,OAAO,CAE9E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAK1F"}
@@ -9,10 +9,13 @@ import { hasParentHandler, isTypedVerbDef } from '../Types/Command.types.js';
9
9
  * Typed verbs may nest arbitrarily, so a command path can be any depth (e.g.
10
10
  * `app add table` is 3 tokens, `app share link create` is 4). The walker
11
11
  * descends as deep as it can; when a typed verb has its own handler ("hybrid"
12
- * verb, like `app share`) and the next token does not name a known subcommand,
12
+ * verb, like `app share`) and the next token is **not** a known subcommand,
13
13
  * it falls back to the parent handler so the remaining tokens become
14
14
  * positional arguments — letting `ms app share alice@contoso.com` route to
15
- * the `share` handler.
15
+ * the `share` handler. When the next token IS a known sub-group of the
16
+ * typed verb but no leaf is reached, we return null instead of falling back,
17
+ * so callers can surface group help rather than misinterpret the sub-group
18
+ * name as a positional argument.
16
19
  *
17
20
  * @param argv - The full process.argv array (argv[0] = node, argv[1] = script)
18
21
  * @param tree - The command tree to resolve against
@@ -29,9 +32,24 @@ export function resolveCommand(argv, tree) {
29
32
  return walkCommands(tree[t0].commands, tokens, 1, [t0]);
30
33
  }
31
34
  /**
32
- * Recursively walks the command tree, consuming one token per level. Returns
33
- * the deepest match. If a typed verb's next token doesn't match any sub but
34
- * the typed verb itself has a handler, returns that handler (hybrid fallback).
35
+ * Recursively walks the command tree, consuming one token per level.
36
+ *
37
+ * When the current token names a typed verb, we look at the *next* token to
38
+ * decide whether the user meant to drill deeper or pass a positional argument
39
+ * to a hybrid parent:
40
+ *
41
+ * - If the next token is a known sub-key of this typed verb, the user clearly
42
+ * intended to drill in. We descend and **do not** fall back to a hybrid
43
+ * ancestor if the deeper walk fails to reach a leaf — otherwise
44
+ * `ms app share link` would re-resolve as `ms app share <link>`, treating
45
+ * "link" as a positional principal. Returning null here lets
46
+ * `ArgumentProvider` surface the typed-group help (or an "Unknown type"
47
+ * error if a bogus sub-token follows).
48
+ *
49
+ * - If the next token is missing, a flag, or unrelated to this typed verb's
50
+ * children, we fall back to the typed verb's own handler when it has one
51
+ * (hybrid verb), so `ms app share alice@contoso.com` routes to `share`
52
+ * with `alice@contoso.com` as a positional argument.
35
53
  */
36
54
  function walkCommands(commands, tokens, index, path) {
37
55
  if (index >= tokens.length)
@@ -46,19 +64,60 @@ function walkCommands(commands, tokens, index, path) {
46
64
  if (!isTypedVerbDef(entry)) {
47
65
  return { path: nextPath, handler: entry.handler, tokensConsumed: index + 1 };
48
66
  }
49
- // Typed verb — try to descend first.
50
67
  const next = tokens[index + 1];
51
- if (next && !next.startsWith('-')) {
52
- const deeper = walkCommands(entry.commands, tokens, index + 1, nextPath);
53
- if (deeper)
54
- return deeper;
68
+ const nextIsKnownSub = next !== undefined && !next.startsWith('-') && next in entry.commands;
69
+ if (nextIsKnownSub) {
70
+ return walkCommands(entry.commands, tokens, index + 1, nextPath);
55
71
  }
56
- // No deeper match — fall back to the parent handler if this is a hybrid verb.
57
72
  if (hasParentHandler(entry)) {
58
73
  return { path: nextPath, handler: entry.handler, tokensConsumed: index + 1 };
59
74
  }
60
75
  return null;
61
76
  }
77
+ /**
78
+ * Walks argv tokens along the command tree to detect an incomplete typed-verb
79
+ * path — i.e. a path that reached one or more typed verbs (groups) but did not
80
+ * land on a leaf command. Used by `ArgumentProvider` (when `resolveCommand`
81
+ * returns null) to either:
82
+ *
83
+ * - print the typed group's flattened help (when no extra non-flag token
84
+ * follows, e.g. `ms app share link` or `ms app add --connector shared_sql`), or
85
+ * - throw an "Unknown type 'X' for 'ms <path>'" error (when a bogus
86
+ * sub-token follows, e.g. `ms app share link bogus`).
87
+ *
88
+ * Returns null when the path is fully resolvable, when the noun is unknown,
89
+ * when only a noun is provided, or when the second token is not a typed verb
90
+ * (those cases are handled elsewhere in `ArgumentProvider`).
91
+ */
92
+ export function findIncompleteTypedPath(argv, tree) {
93
+ // Stop at the first flag token so flag *values* (e.g. `shared_sql` in
94
+ // `--connector shared_sql`) are not misclassified as subcommand/type tokens.
95
+ const allTokens = argv.slice(2);
96
+ const firstFlagIndex = allTokens.findIndex((t) => t.startsWith('-'));
97
+ const tokens = firstFlagIndex === -1 ? allTokens : allTokens.slice(0, firstFlagIndex);
98
+ if (tokens.length < 2)
99
+ return null;
100
+ const [noun, ...rest] = tokens;
101
+ if (!isKnownNoun(noun, tree))
102
+ return null;
103
+ let commands = tree[noun].commands;
104
+ const pathTokens = [noun];
105
+ let inTypedGroup = false;
106
+ for (const token of rest) {
107
+ const entry = commands[token];
108
+ if (!entry) {
109
+ return inTypedGroup ? { pathTokens, unknownToken: token } : null;
110
+ }
111
+ if (!isTypedVerbDef(entry)) {
112
+ // Matched a leaf — `resolveCommand` already handles this fully.
113
+ return null;
114
+ }
115
+ pathTokens.push(token);
116
+ commands = entry.commands;
117
+ inTypedGroup = true;
118
+ }
119
+ return inTypedGroup ? { pathTokens, unknownToken: undefined } : null;
120
+ }
62
121
  /**
63
122
  * Checks whether the given token is a known noun in the command tree.
64
123
  * Used to distinguish `ms app` (show noun help) from `ms nonexistent` (error).
@@ -1 +1 @@
1
- {"version":3,"file":"ResolveCommand.js","sourceRoot":"","sources":["../../src/Utils/ResolveCommand.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE1E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,cAAc,CAAC,IAAuB,EAAE,IAAiB;IACvE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE7B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;IACpB,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAExC,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED;;;;GAIG;AACH,SAAS,YAAY,CACnB,QAAuD,EACvD,MAAyB,EACzB,KAAa,EACb,IAAuB;IAEvB,IAAI,KAAK,IAAI,MAAM,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACxC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CA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;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,IAAY,EAAE,IAAiB;IAC/E,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,SAAS,KAAK,SAAS,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC;AAC9D,CAAC"}
@@ -8,7 +8,7 @@ import type { ArgumentProvider } from '../ArgumentProvider.js';
8
8
  *
9
9
  * - `native` (default): MAAF auto-provisions a platform-managed git repo, no remote URL.
10
10
  * - `none`: source-control-free; no platform-managed repo, no remote URL.
11
- * - `github`: bound to an external GitHub Enterprise repo at `remoteUrl`.
11
+ * - `github`: bound to an external GitHub repo (`*.ghe.com` or `github.com`) at `remoteUrl`.
12
12
  *
13
13
  * `remoteUrl` is populated only when `repoType === 'github'`. This is a flat
14
14
  * interface (not a discriminated union), so `if (repoType === 'github')` does NOT
@@ -33,8 +33,8 @@ interface PushOutcome {
33
33
  * Maps the raw `--repo` flag value to a `(repoType, remoteUrl)` pair.
34
34
  * - omitted / empty → `native` (default GRS-backed flow)
35
35
  * - `none` (case-insensitive) → `none` (no GRS, no local setup)
36
- * - any other non-empty value → `github` (external GHE binding, value flows through as
37
- * `remoteUrl` to the action and the eventual git clone)
36
+ * - any other non-empty value → `github` (external GitHub binding `*.ghe.com` or `github.com`;
37
+ * value flows through as `remoteUrl` to the action and the eventual git clone)
38
38
  *
39
39
  * Runtime invariant: `remoteUrl` is set iff `repoType === 'github'`. Consumers
40
40
  * branch on `repoType` and assert `remoteUrl!` at github use sites — see
@@ -46,7 +46,7 @@ export declare function parseRepoOption(rawRepoValue: string | undefined): RepoS
46
46
  *
47
47
  * Three repo flows, selected by `--repo`:
48
48
  * - `native` (default): server auto-provisions a GRS repo; local clone happens via GCM.
49
- * - `github`: external GHE Cloud binding. Clones the user's repo locally. On the first
49
+ * - `github`: external GitHub binding (`*.ghe.com` or `github.com`). Clones the user's repo locally. On the first
50
50
  * `createAsync` call, a missing/expired server-side GitHub identity mapping is
51
51
  * recoverable in-band: a single inline DCF run + exactly one `createAsync` retry.
52
52
  * Any other error — or a second mapping failure after DCF — is a hard fail.
@@ -76,7 +76,7 @@ interface CloneRepoOptions {
76
76
  repoUrl: string;
77
77
  }
78
78
  /**
79
- * Clones the developer's external repo (GitHub Enterprise Cloud in v1) into `directory`.
79
+ * Clones the developer's external GitHub repo (`*.ghe.com` tenant or `github.com`) into `directory`.
80
80
  * Auth flows through the user's existing git credential setup — the CLI does not inject
81
81
  * tokens here. On failure, surfaces a CLI-friendly error pointing the user at the
82
82
  * GitHub App install prerequisite; git's own stderr is preserved (stdio: inherit) so
@@ -1 +1 @@
1
- {"version":3,"file":"CreateMaafApp.d.ts","sourceRoot":"","sources":["../../src/Verbs/CreateMaafApp.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAQzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA+B5D;;;;;;;;;;GAUG;AACH,UAAU,aAAa;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;GAKG;AACH,UAAU,WAAW;IACnB,OAAO,EAAE,OAAO,CAAC;IAKjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAQ/E;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,gBAAgB,EAA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