@microsoft/managed-apps-cli 0.13.0 → 0.16.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 +1 -1
- package/dist/ArgumentProvider.d.ts +1 -2
- package/dist/ArgumentProvider.d.ts.map +1 -1
- package/dist/ArgumentProvider.js.map +1 -1
- package/dist/Authentication/NoOpAuthenticationProvider.d.ts +25 -0
- package/dist/Authentication/NoOpAuthenticationProvider.d.ts.map +1 -0
- package/dist/Authentication/NoOpAuthenticationProvider.js +31 -0
- package/dist/Authentication/NoOpAuthenticationProvider.js.map +1 -0
- package/dist/Cli.d.ts.map +1 -1
- package/dist/Cli.js +14 -0
- package/dist/Cli.js.map +1 -1
- package/dist/CliSettings.d.ts.map +1 -1
- package/dist/CliSettings.js +2 -1
- package/dist/CliSettings.js.map +1 -1
- package/dist/Constants/CommandRegistry.d.ts.map +1 -1
- package/dist/Constants/CommandRegistry.js +22 -4
- package/dist/Constants/CommandRegistry.js.map +1 -1
- package/dist/Constants/HelpStrings.d.ts +21 -3
- package/dist/Constants/HelpStrings.d.ts.map +1 -1
- package/dist/Constants/HelpStrings.js +53 -18
- package/dist/Constants/HelpStrings.js.map +1 -1
- package/dist/Constants.d.ts +2 -0
- package/dist/Constants.d.ts.map +1 -1
- package/dist/Constants.js +8 -0
- package/dist/Constants.js.map +1 -1
- package/dist/HttpClient/CliHttpClient.d.ts +1 -1
- package/dist/HttpClient/CliHttpClient.d.ts.map +1 -1
- package/dist/HttpClient/CliHttpClient.js +49 -2
- package/dist/HttpClient/CliHttpClient.js.map +1 -1
- package/dist/Logger/CliLogger.d.ts +1 -1
- package/dist/Logger/CliLogger.d.ts.map +1 -1
- package/dist/Logger/CliLogger.js +23 -4
- package/dist/Logger/CliLogger.js.map +1 -1
- package/dist/Logger/ConsoleWriter.d.ts +1 -0
- package/dist/Logger/ConsoleWriter.d.ts.map +1 -1
- package/dist/Logger/ConsoleWriter.js +3 -0
- package/dist/Logger/ConsoleWriter.js.map +1 -1
- package/dist/Logger/OneDSWriter.d.ts +1 -1
- package/dist/Logger/OneDSWriter.d.ts.map +1 -1
- package/dist/Logger/OneDSWriter.js +8 -3
- package/dist/Logger/OneDSWriter.js.map +1 -1
- package/dist/Testing/MockFetch.d.ts +23 -0
- package/dist/Testing/MockFetch.d.ts.map +1 -0
- package/dist/Testing/MockFetch.js +177 -0
- package/dist/Testing/MockFetch.js.map +1 -0
- package/dist/Testing/MockRoutes.d.ts +34 -0
- package/dist/Testing/MockRoutes.d.ts.map +1 -0
- package/dist/Testing/MockRoutes.js +226 -0
- package/dist/Testing/MockRoutes.js.map +1 -0
- package/dist/Testing/fixtures/connectors/commondataserviceforapps.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/commondataserviceforapps.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/commondataserviceforapps.js +25 -0
- package/dist/Testing/fixtures/connectors/commondataserviceforapps.js.map +1 -0
- package/dist/Testing/fixtures/connectors/dataverseContactEntity.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/dataverseContactEntity.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/dataverseContactEntity.js +55 -0
- package/dist/Testing/fixtures/connectors/dataverseContactEntity.js.map +1 -0
- package/dist/Testing/fixtures/connectors/excelonlinebusiness.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/excelonlinebusiness.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/excelonlinebusiness.js +1970 -0
- package/dist/Testing/fixtures/connectors/excelonlinebusiness.js.map +1 -0
- package/dist/Testing/fixtures/connectors/kusto.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/kusto.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/kusto.js +1333 -0
- package/dist/Testing/fixtures/connectors/kusto.js.map +1 -0
- package/dist/Testing/fixtures/connectors/msnweather.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/msnweather.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/msnweather.js +917 -0
- package/dist/Testing/fixtures/connectors/msnweather.js.map +1 -0
- package/dist/Testing/fixtures/connectors/office365groups.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/office365groups.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/office365groups.js +2144 -0
- package/dist/Testing/fixtures/connectors/office365groups.js.map +1 -0
- package/dist/Testing/fixtures/connectors/office365users.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/office365users.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/office365users.js +1969 -0
- package/dist/Testing/fixtures/connectors/office365users.js.map +1 -0
- package/dist/Testing/fixtures/connectors/onedriveforbusiness.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/onedriveforbusiness.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/onedriveforbusiness.js +4873 -0
- package/dist/Testing/fixtures/connectors/onedriveforbusiness.js.map +1 -0
- package/dist/Testing/fixtures/connectors/powerappsforappmakers.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/powerappsforappmakers.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/powerappsforappmakers.js +4682 -0
- package/dist/Testing/fixtures/connectors/powerappsforappmakers.js.map +1 -0
- package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.js +1078 -0
- package/dist/Testing/fixtures/connectors/sharepointTestListMetadata.js.map +1 -0
- package/dist/Testing/fixtures/connectors/sharepointonline.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/sharepointonline.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/sharepointonline.js +28 -0
- package/dist/Testing/fixtures/connectors/sharepointonline.js.map +1 -0
- package/dist/Testing/fixtures/connectors/teams.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/teams.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/teams.js +9987 -0
- package/dist/Testing/fixtures/connectors/teams.js.map +1 -0
- package/dist/Testing/fixtures/connectors/translatorv2.d.ts +6 -0
- package/dist/Testing/fixtures/connectors/translatorv2.d.ts.map +1 -0
- package/dist/Testing/fixtures/connectors/translatorv2.js +307 -0
- package/dist/Testing/fixtures/connectors/translatorv2.js.map +1 -0
- package/dist/Testing/fixtures/index.d.ts +23 -0
- package/dist/Testing/fixtures/index.d.ts.map +1 -0
- package/dist/Testing/fixtures/index.js +96 -0
- package/dist/Testing/fixtures/index.js.map +1 -0
- package/dist/Types/LoggerTypes.types.d.ts +1 -0
- package/dist/Types/LoggerTypes.types.d.ts.map +1 -1
- package/dist/Utils/CoerceCliVersion.d.ts +27 -0
- package/dist/Utils/CoerceCliVersion.d.ts.map +1 -0
- package/dist/Utils/CoerceCliVersion.js +67 -0
- package/dist/Utils/CoerceCliVersion.js.map +1 -0
- package/dist/Utils/EnvVars.d.ts +1 -1
- package/dist/Utils/EnvVars.d.ts.map +1 -1
- package/dist/Utils/EnvVars.js.map +1 -1
- package/dist/Utils/EnvironmentRoutingUtils.d.ts +1 -2
- package/dist/Utils/EnvironmentRoutingUtils.d.ts.map +1 -1
- package/dist/Utils/EnvironmentRoutingUtils.js.map +1 -1
- package/dist/Utils/MaafAppConfig.d.ts +2 -0
- package/dist/Utils/MaafAppConfig.d.ts.map +1 -1
- package/dist/Utils/MaafAppConfig.js +6 -0
- package/dist/Utils/MaafAppConfig.js.map +1 -1
- package/dist/Utils/PinCli.d.ts +18 -13
- package/dist/Utils/PinCli.d.ts.map +1 -1
- package/dist/Utils/PinCli.js +37 -18
- package/dist/Utils/PinCli.js.map +1 -1
- package/dist/Utils/RepoOption.d.ts +1 -0
- package/dist/Utils/RepoOption.d.ts.map +1 -1
- package/dist/Utils/RepoOption.js +14 -0
- package/dist/Utils/RepoOption.js.map +1 -1
- package/dist/Utils/ShareAccessRouting.d.ts +78 -0
- package/dist/Utils/ShareAccessRouting.d.ts.map +1 -0
- package/dist/Utils/ShareAccessRouting.js +93 -0
- package/dist/Utils/ShareAccessRouting.js.map +1 -0
- package/dist/Verbs/AddConnector.d.ts +6 -6
- package/dist/Verbs/AddConnector.d.ts.map +1 -1
- package/dist/Verbs/AddConnector.js +62 -36
- package/dist/Verbs/AddConnector.js.map +1 -1
- package/dist/Verbs/AddConnectorFlows.d.ts +14 -2
- package/dist/Verbs/AddConnectorFlows.d.ts.map +1 -1
- package/dist/Verbs/AddConnectorFlows.js +67 -18
- package/dist/Verbs/AddConnectorFlows.js.map +1 -1
- package/dist/Verbs/ConnectorHelpers.d.ts +79 -6
- package/dist/Verbs/ConnectorHelpers.d.ts.map +1 -1
- package/dist/Verbs/ConnectorHelpers.js +280 -32
- package/dist/Verbs/ConnectorHelpers.js.map +1 -1
- package/dist/Verbs/CreateMaafApp.d.ts +8 -16
- package/dist/Verbs/CreateMaafApp.d.ts.map +1 -1
- package/dist/Verbs/CreateMaafApp.js +224 -96
- package/dist/Verbs/CreateMaafApp.js.map +1 -1
- package/dist/Verbs/DeleteMaafApp.d.ts +13 -9
- package/dist/Verbs/DeleteMaafApp.d.ts.map +1 -1
- package/dist/Verbs/DeleteMaafApp.js +41 -21
- package/dist/Verbs/DeleteMaafApp.js.map +1 -1
- package/dist/Verbs/Dev.d.ts.map +1 -1
- package/dist/Verbs/Dev.js +34 -3
- package/dist/Verbs/Dev.js.map +1 -1
- package/dist/Verbs/GetMaafApp.d.ts.map +1 -1
- package/dist/Verbs/GetMaafApp.js +18 -6
- package/dist/Verbs/GetMaafApp.js.map +1 -1
- package/dist/Verbs/Init.d.ts.map +1 -1
- package/dist/Verbs/Init.js +58 -5
- package/dist/Verbs/Init.js.map +1 -1
- package/dist/Verbs/ListConnectors.d.ts.map +1 -1
- package/dist/Verbs/ListConnectors.js +12 -1
- package/dist/Verbs/ListConnectors.js.map +1 -1
- package/dist/Verbs/ListMaafApps.d.ts +9 -8
- package/dist/Verbs/ListMaafApps.d.ts.map +1 -1
- package/dist/Verbs/ListMaafApps.js +30 -23
- package/dist/Verbs/ListMaafApps.js.map +1 -1
- package/dist/Verbs/MaafAppPermissions.d.ts +8 -17
- package/dist/Verbs/MaafAppPermissions.d.ts.map +1 -1
- package/dist/Verbs/MaafAppPermissions.js +84 -91
- package/dist/Verbs/MaafAppPermissions.js.map +1 -1
- package/dist/Verbs/Pack.d.ts +30 -1
- package/dist/Verbs/Pack.d.ts.map +1 -1
- package/dist/Verbs/Pack.js +179 -2
- package/dist/Verbs/Pack.js.map +1 -1
- package/dist/Verbs/RefreshDataSource.d.ts +15 -0
- package/dist/Verbs/RefreshDataSource.d.ts.map +1 -1
- package/dist/Verbs/RefreshDataSource.js +41 -27
- package/dist/Verbs/RefreshDataSource.js.map +1 -1
- package/dist/Verbs/RemoveDataSource.d.ts.map +1 -1
- package/dist/Verbs/RemoveDataSource.js +17 -3
- package/dist/Verbs/RemoveDataSource.js.map +1 -1
- package/dist/Verbs/ShareList.d.ts +10 -0
- package/dist/Verbs/ShareList.d.ts.map +1 -0
- package/dist/Verbs/ShareList.js +254 -0
- package/dist/Verbs/ShareList.js.map +1 -0
- package/dist/Verbs/VerbConstants.d.ts +56 -3
- package/dist/Verbs/VerbConstants.d.ts.map +1 -1
- package/dist/Verbs/VerbConstants.js +40 -3
- package/dist/Verbs/VerbConstants.js.map +1 -1
- package/dist/Verbs/index.d.ts +1 -0
- package/dist/Verbs/index.d.ts.map +1 -1
- package/dist/Verbs/index.js +1 -0
- package/dist/Verbs/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { createConnectionAsync, getConnectorAsync, getEffectiveConnectorDataPolicyAsync, getPlayerServiceConfig, isSsoOnlyConnector, listConnectionsForConnectorAsync, requestConnectionUserConsentAsync, } from '@microsoft/managed-apps-actions';
|
|
4
|
+
import { connectorSupportsSso, createConnectionAsync, getConnectorAsync, getEffectiveConnectorDataPolicyAsync, getPlayerServiceConfig, isSsoConnection, isSsoOnlyConnector, listConnectionsForConnectorAsync, listConnectorsServiceAsync, requestConnectionUserConsentAsync, } from '@microsoft/managed-apps-actions';
|
|
5
5
|
import { createMaafConnectionUrl, HttpClientError } from '@microsoft/managed-apps-common/services';
|
|
6
6
|
import * as http from 'http';
|
|
7
7
|
import open from 'open';
|
|
@@ -15,6 +15,57 @@ const ALLOW_ALL_POLICY = {
|
|
|
15
15
|
defaultBehavior: 'Allow',
|
|
16
16
|
allowedConnectors: [],
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Resolves a raw `--connector` argument to a canonical connector API ID.
|
|
20
|
+
*
|
|
21
|
+
* - If `input` starts with `shared_` → returned unchanged (fast path, no network call).
|
|
22
|
+
* - Otherwise the full connector list is fetched. Resolution proceeds in two passes:
|
|
23
|
+
* 1. **Exact match** (case-insensitive `displayName === input`).
|
|
24
|
+
* 2. **Partial match** (case-insensitive `displayName.includes(input)`) —
|
|
25
|
+
* only attempted when the exact pass yields zero results.
|
|
26
|
+
*
|
|
27
|
+
* Outcomes:
|
|
28
|
+
* - One candidate → returns the connector's `name` (its API ID).
|
|
29
|
+
* A notice is printed when the match was partial.
|
|
30
|
+
* - Multiple matches → throws `UsageError` with a disambiguation list.
|
|
31
|
+
* - Zero matches → returns `input` unchanged so that bare aliases
|
|
32
|
+
* such as `commondataserviceforapps` are still
|
|
33
|
+
* accepted by the downstream `getConnectorAsync`.
|
|
34
|
+
*/
|
|
35
|
+
export async function resolveConnectorIdAsync(input, logger) {
|
|
36
|
+
// Fast path: already a canonical ID format — no network call needed.
|
|
37
|
+
if (input.toLowerCase().startsWith('shared_')) {
|
|
38
|
+
return input;
|
|
39
|
+
}
|
|
40
|
+
// Fetch the full connector list and try to resolve the input as a display name.
|
|
41
|
+
// This covers exact names ("Office 365 Users"), partial names ("Office 365"),
|
|
42
|
+
// and single-word partials ("office") — giving a clear disambiguation error
|
|
43
|
+
// instead of a cryptic API rejection. Zero matches fall through to getConnectorAsync
|
|
44
|
+
// so bare aliases like `commondataserviceforapps` continue to work.
|
|
45
|
+
const connectors = await listConnectorsServiceAsync(undefined, logger ?? undefined);
|
|
46
|
+
const lower = input.toLowerCase();
|
|
47
|
+
// Pass 1: exact display name match (case-insensitive).
|
|
48
|
+
const exactMatches = connectors.filter((c) => c.properties.displayName.toLowerCase() === lower);
|
|
49
|
+
// Pass 2: partial (contains) match, only when exact pass found nothing.
|
|
50
|
+
const isPartial = exactMatches.length === 0;
|
|
51
|
+
const candidates = isPartial
|
|
52
|
+
? connectors.filter((c) => c.properties.displayName.toLowerCase().includes(lower))
|
|
53
|
+
: exactMatches;
|
|
54
|
+
if (candidates.length === 0) {
|
|
55
|
+
// No match — pass through unchanged (bare alias or will fail downstream with a clear error).
|
|
56
|
+
return input;
|
|
57
|
+
}
|
|
58
|
+
if (candidates.length === 1) {
|
|
59
|
+
// Unambiguous — print a notice when the match was partial so the user knows what was resolved.
|
|
60
|
+
if (isPartial) {
|
|
61
|
+
printInfo(`Resolved '${input}' → '${candidates[0].properties.displayName}' (${candidates[0].name})`);
|
|
62
|
+
}
|
|
63
|
+
return candidates[0].name;
|
|
64
|
+
}
|
|
65
|
+
// Multiple candidates — surface them so the user can specify an exact ID.
|
|
66
|
+
const idList = candidates.map((c) => ` ${c.name} (${c.properties.displayName})`).join('\n');
|
|
67
|
+
throw new UsageError(`Multiple connectors match '${input}'. Specify the connector ID directly:\n${idList}`);
|
|
68
|
+
}
|
|
18
69
|
const CREATE_NEW_CONNECTION = '__create__';
|
|
19
70
|
const CONNECTION_CREATION_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes
|
|
20
71
|
const PROTOCOL_VERSION = '1';
|
|
@@ -66,28 +117,61 @@ export async function runConnectorDlpPreflightAsync(argumentProvider, apiId) {
|
|
|
66
117
|
return { connector, tenantId, policy };
|
|
67
118
|
}
|
|
68
119
|
/**
|
|
69
|
-
* Resolves a connection for a connector
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
120
|
+
* Resolves a connection for a connector, choosing the strategy based on mode.
|
|
121
|
+
*
|
|
122
|
+
* Interactive mode: lists existing connections and prompts the user to pick one
|
|
123
|
+
* (or create a new one).
|
|
124
|
+
*
|
|
125
|
+
* Non-interactive mode (deterministic auto-resolution — see
|
|
126
|
+
* {@link resolveConnectionNonInteractivelyAsync}): reuses the sole existing
|
|
127
|
+
* connection, silently creates one for SSO-only connectors when none exist,
|
|
128
|
+
* prints the connection table and errors when multiple connections are ambiguous,
|
|
129
|
+
* or errors without a table when zero connections exist for a non-auto-creatable
|
|
130
|
+
* connector.
|
|
131
|
+
*
|
|
132
|
+
* `--use-sso` (`useSso`) short-circuits both modes: it reuses the first existing
|
|
133
|
+
* SSO connection when one exists, otherwise silently creates one via the OBO
|
|
134
|
+
* flow (even when non-SSO connections already exist). It errors up front when the
|
|
135
|
+
* connector cannot use SSO at all. In interactive mode it skips the picker.
|
|
73
136
|
*/
|
|
74
|
-
export async function
|
|
75
|
-
const { argumentProvider, apiId, connector } = options;
|
|
137
|
+
export async function resolveConnectionAsync(options) {
|
|
138
|
+
const { argumentProvider, apiId, connector, useSso } = options;
|
|
76
139
|
const settings = getSettings();
|
|
77
|
-
const { fileConfig, cliFs } = settings;
|
|
78
140
|
const logger = getCliLogger();
|
|
79
141
|
const playerServiceConfig = getPlayerServiceConfig();
|
|
80
|
-
const authProvider = argumentProvider.getAuthenticationProvider();
|
|
81
142
|
const connections = await listConnectionsForConnectorAsync(apiId, logger);
|
|
82
143
|
if (!settings.interactive) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
144
|
+
return resolveConnectionNonInteractivelyAsync({
|
|
145
|
+
argumentProvider,
|
|
146
|
+
apiId,
|
|
147
|
+
connector,
|
|
148
|
+
connections: connections ?? [],
|
|
149
|
+
useSso,
|
|
89
150
|
});
|
|
90
|
-
|
|
151
|
+
}
|
|
152
|
+
// `--use-sso` in interactive mode: skip the connection picker and use SSO
|
|
153
|
+
// deterministically. Reuse the first existing SSO connection if any exist;
|
|
154
|
+
// otherwise silently create one via the on-behalf-of flow. Errors up front
|
|
155
|
+
// when the connector cannot use SSO at all.
|
|
156
|
+
if (useSso) {
|
|
157
|
+
if (!connectorSupportsSso(connector)) {
|
|
158
|
+
throw new UsageError(`--use-sso was set but '${connector.properties.displayName ?? apiId}' does not support ` +
|
|
159
|
+
`single sign-on (SSO) authentication.\n` +
|
|
160
|
+
` To fix: Re-run without --use-sso to create a connection interactively.`);
|
|
161
|
+
}
|
|
162
|
+
const ssoConnections = (connections ?? []).filter((c) => isSsoConnection(c, connector));
|
|
163
|
+
if (ssoConnections.length > 0) {
|
|
164
|
+
const [first] = ssoConnections;
|
|
165
|
+
printInfo(`Using existing SSO connection '${first.properties.displayName}' (${first.name}).`);
|
|
166
|
+
if (ssoConnections.length > 1) {
|
|
167
|
+
printWarning(`Multiple SSO connections found for '${connector.properties.displayName ?? apiId}'. ` +
|
|
168
|
+
`Re-run with --connection-id <id> or -c <id> to use a specific one.`);
|
|
169
|
+
}
|
|
170
|
+
return { connectionId: first.name, autoSelected: true };
|
|
171
|
+
}
|
|
172
|
+
const created = await createSsoConnectionAsync(argumentProvider, apiId);
|
|
173
|
+
printSuccess(`Created a new connection '${created.properties.displayName}' (${created.name}).`);
|
|
174
|
+
return { connectionId: created.name, autoSelected: false };
|
|
91
175
|
}
|
|
92
176
|
const choices = [
|
|
93
177
|
...connections.map((c) => ({
|
|
@@ -106,20 +190,8 @@ export async function resolveConnectionInteractivelyAsync(options) {
|
|
|
106
190
|
// Connectors with multiple auth types need the browser flow so the user can choose.
|
|
107
191
|
if (isSsoOnlyConnector(connector)) {
|
|
108
192
|
try {
|
|
109
|
-
const newConnection = await
|
|
110
|
-
|
|
111
|
-
authProvider,
|
|
112
|
-
region: playerServiceConfig.region,
|
|
113
|
-
environmentName: playerServiceConfig.environmentName,
|
|
114
|
-
actionsParams: { connectorId: apiId },
|
|
115
|
-
localFilePaths: {
|
|
116
|
-
appConfigPath: fileConfig.appConfigPath,
|
|
117
|
-
schemaPath: fileConfig.schemaPath,
|
|
118
|
-
codeGenPath: fileConfig.codeGenPath,
|
|
119
|
-
},
|
|
120
|
-
logger,
|
|
121
|
-
});
|
|
122
|
-
return newConnection.name;
|
|
193
|
+
const newConnection = await createSsoConnectionAsync(argumentProvider, apiId);
|
|
194
|
+
return { connectionId: newConnection.name, autoSelected: false };
|
|
123
195
|
}
|
|
124
196
|
catch (ssoError) {
|
|
125
197
|
printWarning(`Silent connection creation failed: ${ssoError instanceof Error ? ssoError.message : String(ssoError)}`);
|
|
@@ -146,7 +218,7 @@ export async function resolveConnectionInteractivelyAsync(options) {
|
|
|
146
218
|
printInfo(` Display Name: ${result.displayName}`);
|
|
147
219
|
}
|
|
148
220
|
printInfo(` Connection ID: ${result.connectionName}`);
|
|
149
|
-
return result.connectionName;
|
|
221
|
+
return { connectionId: result.connectionName, autoSelected: false };
|
|
150
222
|
}
|
|
151
223
|
else if (result.status === 'error') {
|
|
152
224
|
throw new AppError(result.errorMessage ?? 'Connection creation failed in the browser.');
|
|
@@ -155,7 +227,183 @@ export async function resolveConnectionInteractivelyAsync(options) {
|
|
|
155
227
|
throw new UsageError('Connection creation was cancelled.');
|
|
156
228
|
}
|
|
157
229
|
}
|
|
158
|
-
return selected;
|
|
230
|
+
return { connectionId: selected, autoSelected: false };
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Deterministic connection resolution for non-interactive mode (the default —
|
|
234
|
+
* no flag required). Runs when `--connection-id` was not supplied.
|
|
235
|
+
*
|
|
236
|
+
* When `--use-sso` (`useSso`) is set, an SSO-specific path takes precedence over
|
|
237
|
+
* all cases below:
|
|
238
|
+
* - Connector not SSO-capable → `UsageError` up front (the flag cannot be
|
|
239
|
+
* satisfied).
|
|
240
|
+
* - One or more existing **SSO** connections → reuse the first one. This is an
|
|
241
|
+
* explicit opt-in to picking an SSO connection, so it is safe even when
|
|
242
|
+
* multiple connections (SSO or not) exist — no ambiguity error.
|
|
243
|
+
* - No existing SSO connection → create one silently via the OBO flow
|
|
244
|
+
* ({@link createSsoConnectionAsync}), even when non-SSO connections exist.
|
|
245
|
+
*
|
|
246
|
+
* Otherwise (no `--use-sso`):
|
|
247
|
+
* 1. **Exactly one** existing connection → reuse it. There is no ambiguity, so
|
|
248
|
+
* this is safe for automation and never binds to an arbitrarily-chosen
|
|
249
|
+
* identity. A confirmation line is printed to stdout.
|
|
250
|
+
* 2. **Zero** connections **and** an **SSO-only** connector → create one
|
|
251
|
+
* silently via the OBO flow ({@link createSsoConnectionAsync}). A
|
|
252
|
+
* confirmation line is printed to stdout.
|
|
253
|
+
* 3. **Multiple** connections (ambiguous) → print the connection table to stdout
|
|
254
|
+
* so the user can copy an ID, then throw a `UsageError` directing them to
|
|
255
|
+
* select one via `--connection-id` (or interactively).
|
|
256
|
+
* 4. **Zero** connections **and** a connector that needs credentials/a browser
|
|
257
|
+
* (not auto-creatable) → throw a `UsageError` directing them to create one
|
|
258
|
+
* interactively. No table is printed — there is nothing to show.
|
|
259
|
+
*
|
|
260
|
+
* Success paths print to stdout; failure paths surface their message via the
|
|
261
|
+
* thrown `UsageError` (rendered to stderr by the top-level handler).
|
|
262
|
+
*/
|
|
263
|
+
async function resolveConnectionNonInteractivelyAsync(options) {
|
|
264
|
+
const { argumentProvider, apiId, connector, connections, useSso } = options;
|
|
265
|
+
const label = connector.properties.displayName ?? apiId;
|
|
266
|
+
// `--use-sso`: force an SSO connection deterministically, taking precedence
|
|
267
|
+
// over the default cases below.
|
|
268
|
+
// - Not SSO-capable → error up front (the flag cannot be satisfied).
|
|
269
|
+
// - One or more existing SSO connections → reuse the first. This is an
|
|
270
|
+
// explicit opt-in to picking an SSO connection, so it is safe even when
|
|
271
|
+
// multiple connections (SSO or not) exist.
|
|
272
|
+
// - No existing SSO connection → create one silently via the OBO flow, even
|
|
273
|
+
// when non-SSO connections already exist.
|
|
274
|
+
if (useSso) {
|
|
275
|
+
if (!connectorSupportsSso(connector)) {
|
|
276
|
+
throw new UsageError(`--use-sso was set but '${label}' does not support single sign-on (SSO) authentication.\n` +
|
|
277
|
+
` To fix: Re-run without both --use-sso and --non-interactive to create a connection interactively.`);
|
|
278
|
+
}
|
|
279
|
+
const ssoConnections = connections.filter((c) => isSsoConnection(c, connector));
|
|
280
|
+
if (ssoConnections.length > 0) {
|
|
281
|
+
const [first] = ssoConnections;
|
|
282
|
+
printInfo(`Using existing SSO connection '${first.properties.displayName}' (${first.name}).`);
|
|
283
|
+
if (ssoConnections.length > 1) {
|
|
284
|
+
printWarning(`Multiple SSO connections found for '${label}'. ` +
|
|
285
|
+
`Re-run with --connection-id <id> or -c <id> to use a specific one.`);
|
|
286
|
+
}
|
|
287
|
+
return { connectionId: first.name, autoSelected: true };
|
|
288
|
+
}
|
|
289
|
+
try {
|
|
290
|
+
const created = await createSsoConnectionAsync(argumentProvider, apiId);
|
|
291
|
+
printSuccess(`Created a new connection '${created.properties.displayName}' (${created.name}).`);
|
|
292
|
+
return { connectionId: created.name, autoSelected: false };
|
|
293
|
+
}
|
|
294
|
+
catch (ssoError) {
|
|
295
|
+
const detail = ssoError instanceof Error ? ssoError.message : String(ssoError);
|
|
296
|
+
throw new UsageError(`No SSO connection exists for '${label}' and automatic connection creation failed.\n` +
|
|
297
|
+
` Reason: ${detail}\n` +
|
|
298
|
+
` To fix: Create one interactively (re-run without --non-interactive),\n` +
|
|
299
|
+
` then re-run with --connection-id <id> or -c <id>.`);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
// 1. Exactly one existing connection → reuse it (deterministic, no side effect).
|
|
303
|
+
if (connections.length === 1) {
|
|
304
|
+
const [only] = connections;
|
|
305
|
+
printInfo(`Using existing connection '${only.properties.displayName}' (${only.name}).`);
|
|
306
|
+
return { connectionId: only.name, autoSelected: true };
|
|
307
|
+
}
|
|
308
|
+
// 2. No existing connection + auto-creatable via SSO → create one silently.
|
|
309
|
+
// Only SSO-only connectors here; the broader --use-sso path is handled above.
|
|
310
|
+
const canAutoCreateSso = connections.length === 0 && isSsoOnlyConnector(connector);
|
|
311
|
+
if (canAutoCreateSso) {
|
|
312
|
+
try {
|
|
313
|
+
const created = await createSsoConnectionAsync(argumentProvider, apiId);
|
|
314
|
+
printSuccess(`Created a new connection '${created.properties.displayName}' (${created.name}).`);
|
|
315
|
+
return { connectionId: created.name, autoSelected: false };
|
|
316
|
+
}
|
|
317
|
+
catch (ssoError) {
|
|
318
|
+
const detail = ssoError instanceof Error ? ssoError.message : String(ssoError);
|
|
319
|
+
throw new UsageError(`No connection exists for '${label}' and automatic connection creation failed.\n` +
|
|
320
|
+
` Reason: ${detail}\n` +
|
|
321
|
+
` To fix: Create one interactively (re-run without --non-interactive),\n` +
|
|
322
|
+
` then re-run with --connection-id <id> or -c <id>.`);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
// 3. Ambiguous — multiple connections exist. Print the list so the user can
|
|
326
|
+
// copy an ID, then error. Auto-selecting would bind to an arbitrary identity.
|
|
327
|
+
if (connections.length > 1) {
|
|
328
|
+
printTable({
|
|
329
|
+
title: `Available connections for ${label}`,
|
|
330
|
+
columns: [{ header: 'Display Name', maxWidth: 40 }, { header: 'Connection ID' }],
|
|
331
|
+
rows: connections.map((c) => [c.properties.displayName, c.name]),
|
|
332
|
+
totalLabel: 'connection(s) found',
|
|
333
|
+
});
|
|
334
|
+
throw new UsageError(`Multiple connections exist for '${label}', so one cannot be selected automatically.\n` +
|
|
335
|
+
` To fix: Re-run with --connection-id <id> or -c <id> to choose one,\n` +
|
|
336
|
+
` or re-run without --non-interactive to select one interactively.`);
|
|
337
|
+
}
|
|
338
|
+
// 4. Zero connections for a connector that cannot be auto-created (needs
|
|
339
|
+
// credentials, a browser, or has multiple auth types). No table to show.
|
|
340
|
+
throw new UsageError(`'${label}' requires a connection that cannot be created automatically in non-interactive mode.\n` +
|
|
341
|
+
` To fix: Create one interactively (re-run without --non-interactive),\n` +
|
|
342
|
+
` then re-run with --connection-id <id> or -c <id>.\n` +
|
|
343
|
+
` Tip: Run '${CLI_BINARY_NAME} connector list' to browse available connectors.`);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Creates and authenticates a new SSO connection for an SSO-eligible connector
|
|
347
|
+
* using the on-behalf-of flow. Shared by the interactive "(Create a new
|
|
348
|
+
* connection)" path and the non-interactive auto-create path. Callers must first
|
|
349
|
+
* confirm the connector is SSO-eligible via `isSsoOnlyConnector` (default gate)
|
|
350
|
+
* or `connectorSupportsSso` (the `--use-sso` gate). For multi-auth connectors the
|
|
351
|
+
* underlying `validateSsoEligible` selects the first SSO-eligible parameter set.
|
|
352
|
+
*/
|
|
353
|
+
async function createSsoConnectionAsync(argumentProvider, apiId) {
|
|
354
|
+
const { fileConfig, cliFs } = getSettings();
|
|
355
|
+
const logger = getCliLogger();
|
|
356
|
+
const playerServiceConfig = getPlayerServiceConfig();
|
|
357
|
+
return createConnectionAsync({
|
|
358
|
+
vfs: cliFs,
|
|
359
|
+
authProvider: argumentProvider.getAuthenticationProvider(),
|
|
360
|
+
region: playerServiceConfig.region,
|
|
361
|
+
environmentName: playerServiceConfig.environmentName,
|
|
362
|
+
actionsParams: { connectorId: apiId },
|
|
363
|
+
localFilePaths: {
|
|
364
|
+
appConfigPath: fileConfig.appConfigPath,
|
|
365
|
+
schemaPath: fileConfig.schemaPath,
|
|
366
|
+
codeGenPath: fileConfig.codeGenPath,
|
|
367
|
+
},
|
|
368
|
+
logger,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Builds a remediation hint to append to a downstream failure when the connection
|
|
373
|
+
* was **auto-selected** (no `--connection-id` was provided) rather than explicitly
|
|
374
|
+
* chosen — either the sole connection for the connector, or the first SSO
|
|
375
|
+
* connection under `--use-sso`. For tabular connectors the connection needs to
|
|
376
|
+
* have access to the target resource, so a failure may not clearly indicate the
|
|
377
|
+
* root cause — this spells out both possibilities so an operator or agent can act.
|
|
378
|
+
*/
|
|
379
|
+
export function autoSelectedConnectionHint(connectionId, connectorLabel) {
|
|
380
|
+
return (`Note: connection '${connectionId}' was auto-selected for connector '${connectorLabel}' ` +
|
|
381
|
+
`because no --connection-id was provided. For tabular connectors, the connection needs to ` +
|
|
382
|
+
`have access to the target resource, so this failure may not clearly indicate the root cause:\n` +
|
|
383
|
+
` - If the connection is broken or expired, re-authenticate it and re-run.\n` +
|
|
384
|
+
` - If the connection is valid but targets the wrong resource, re-run with an explicit ` +
|
|
385
|
+
`--connection-id <id> for the intended resource.`);
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Runs a downstream connector API call and, when the connection was
|
|
389
|
+
* auto-selected, appends {@link autoSelectedConnectionHint} to the error message
|
|
390
|
+
* on failure. The original error instance is preserved (message is mutated in
|
|
391
|
+
* place) so its type and `exitCode` survive to the top-level handler.
|
|
392
|
+
*
|
|
393
|
+
* `UsageError`s are left untouched — they are the CLI's own control-flow errors
|
|
394
|
+
* ("re-run with --dataset"), not backend failures, so the connection hint would
|
|
395
|
+
* be noise.
|
|
396
|
+
*/
|
|
397
|
+
export async function withAutoSelectedConnectionHintAsync(op, context) {
|
|
398
|
+
try {
|
|
399
|
+
return await op();
|
|
400
|
+
}
|
|
401
|
+
catch (err) {
|
|
402
|
+
if (context.autoSelected && err instanceof Error && !(err instanceof UsageError)) {
|
|
403
|
+
err.message = `${err.message}\n\n${autoSelectedConnectionHint(context.connectionId, context.connectorLabel)}`;
|
|
404
|
+
}
|
|
405
|
+
throw err;
|
|
406
|
+
}
|
|
159
407
|
}
|
|
160
408
|
/**
|
|
161
409
|
* Best-effort request that the calling application be added to a connection's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectorHelpers.js","sourceRoot":"","sources":["../../src/Verbs/ConnectorHelpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,oC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CAAC,iBAAiB,CAAC,CAAC;YAC7B,OAAO,EAAE,CAAC;YACV,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC;QAEF,SAAS,OAAO;YACd,YAAY,CAAC,SAAS,CAAC,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;YACrC,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;QAED,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import type { ArgumentProvider } from '../ArgumentProvider.js';
|
|
5
|
-
import type { GitClassifyContext } from '../Utils/GitErrorClassifier.js';
|
|
6
5
|
/**
|
|
7
6
|
* Result of `commitAndPushScaffoldAsync`. Carried into the `--json` success
|
|
8
7
|
* envelope (as the `push` field) so automation can distinguish three states:
|
|
@@ -38,17 +37,16 @@ export declare function createMaafAppAsync(argumentProvider: ArgumentProvider):
|
|
|
38
37
|
* progress prose stays out of our pretty output). Stderr handling follows the
|
|
39
38
|
* runGit policy: the un-classified `add`/`commit` steps re-emit git's stderr on
|
|
40
39
|
* failure, and the `push` step either streams stderr live (un-classified github
|
|
41
|
-
* flow, `network: true`) or pipes it for classification (native flow
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* only shapes the warning text and the `--json` error payload.
|
|
40
|
+
* flow, `network: true`) or pipes it for classification (native flow) — either
|
|
41
|
+
* way git's own error context reaches the user alongside our warning. A
|
|
42
|
+
* classified push error is caught here, so its exit code never propagates;
|
|
43
|
+
* classification only shapes the warning text and the `--json` error payload.
|
|
46
44
|
*
|
|
47
45
|
* Commit identity (user.name / user.email) is read by git itself from
|
|
48
46
|
* local-then-global config — we pass nothing. Missing identity surfaces as
|
|
49
47
|
* git's own descriptive commit error via runGit's stderr handling.
|
|
50
48
|
*/
|
|
51
|
-
export declare function commitAndPushScaffoldAsync(appDir: string, jsonMode: boolean,
|
|
49
|
+
export declare function commitAndPushScaffoldAsync(appDir: string, jsonMode: boolean, nativeGitUrl?: string): Promise<PushOutcome>;
|
|
52
50
|
interface CloneRepoOptions {
|
|
53
51
|
directory: string;
|
|
54
52
|
repoUrl: string;
|
|
@@ -74,14 +72,8 @@ interface InitLocalRepoOptions {
|
|
|
74
72
|
gitUrl: string;
|
|
75
73
|
loginAuthority: string;
|
|
76
74
|
authResource: string;
|
|
77
|
-
/**
|
|
78
|
-
* Suppresses the human-readable authentication notice that prints before the
|
|
79
|
-
* first `git fetch`. Callers emitting a `--json` envelope set this to keep
|
|
80
|
-
* stdout free of prose ahead of the envelope. Defaults to false.
|
|
81
|
-
*/
|
|
82
|
-
jsonMode?: boolean;
|
|
83
75
|
}
|
|
84
|
-
export declare function initLocalRepo({ directory, gitUrl, loginAuthority, authResource,
|
|
76
|
+
export declare function initLocalRepo({ directory, gitUrl, loginAuthority, authResource, }: InitLocalRepoOptions): void;
|
|
85
77
|
export declare function buildOrphanedAppRecoveryHint(serverAppId: string, environmentId: string): string;
|
|
86
78
|
export declare function ensureTemplateSourceValid(source: string): void;
|
|
87
79
|
export declare function ensureTargetDirectoryEmpty(appDir: string): void;
|
|
@@ -97,13 +89,13 @@ export declare function ensureRepoTargetDirectoryEmpty(appDir: string): void;
|
|
|
97
89
|
*
|
|
98
90
|
* Failure semantics:
|
|
99
91
|
* - Non-empty tree at HEAD → throws `UsageError` with the "is not empty" /
|
|
100
|
-
* "ms app init" actionable lead, BEFORE createAsync.
|
|
92
|
+
* "ms app init" actionable lead, BEFORE createAsync. Nothing created.
|
|
101
93
|
* - Empty tree (incl. the cleaned-up-repo edge case: commit1 add, commit2
|
|
102
94
|
* delete all) → ls-tree returns no lines → returns without throwing.
|
|
103
95
|
* - Clone fails with a recognizable access/auth signature (private repo
|
|
104
96
|
* hidden as "not found", missing local credentials, 403, …) → throws
|
|
105
97
|
* `ConfigurationError` BEFORE createAsync so we never create a server-side
|
|
106
|
-
* app the user can't clone
|
|
98
|
+
* app the user can't clone.
|
|
107
99
|
* - Any other git error (network blip, server doesn't support --filter,
|
|
108
100
|
* temp-fs hiccup, …) → swallow and return (fail OPEN). The subsequent
|
|
109
101
|
* cloneRepo surfaces the friendlier message for the user-facing failure;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateMaafApp.d.ts","sourceRoot":"","sources":["../../src/Verbs/CreateMaafApp.ts"],"names":[],"mappings":"AAAA;;GAEG;AAcH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"CreateMaafApp.d.ts","sourceRoot":"","sources":["../../src/Verbs/CreateMaafApp.ts"],"names":[],"mappings":"AAAA;;GAEG;AAcH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAwC5D;;;;;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,wBAAsB,kBAAkB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwb1F;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,OAAO,EACjB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,WAAW,CAAC,CA2DtB;AAuDD,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAwED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,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