@microsoft/managed-apps-cli 0.5.0 → 0.7.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 +65 -24
- package/dist/ArgumentProvider.d.ts +10 -2
- package/dist/ArgumentProvider.d.ts.map +1 -1
- package/dist/ArgumentProvider.js +11 -2
- package/dist/ArgumentProvider.js.map +1 -1
- package/dist/Authentication/ActiveAccountStore.d.ts +24 -0
- package/dist/Authentication/ActiveAccountStore.d.ts.map +1 -0
- package/dist/Authentication/ActiveAccountStore.js +54 -0
- package/dist/Authentication/ActiveAccountStore.js.map +1 -0
- package/dist/Authentication/EnvironmentVariableAuthenticationProvider.d.ts +26 -0
- package/dist/Authentication/EnvironmentVariableAuthenticationProvider.d.ts.map +1 -0
- package/dist/Authentication/EnvironmentVariableAuthenticationProvider.js +31 -0
- package/dist/Authentication/EnvironmentVariableAuthenticationProvider.js.map +1 -0
- package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts +57 -3
- package/dist/Authentication/NodeMsalAuthenticationProvider.d.ts.map +1 -1
- package/dist/Authentication/NodeMsalAuthenticationProvider.js +187 -27
- package/dist/Authentication/NodeMsalAuthenticationProvider.js.map +1 -1
- package/dist/Cli.d.ts.map +1 -1
- package/dist/Cli.js +74 -23
- package/dist/Cli.js.map +1 -1
- package/dist/CliUtils.d.ts +2 -8
- package/dist/CliUtils.d.ts.map +1 -1
- package/dist/CliUtils.js.map +1 -1
- package/dist/Constants/CommandRegistry.d.ts.map +1 -1
- package/dist/Constants/CommandRegistry.js +32 -6
- package/dist/Constants/CommandRegistry.js.map +1 -1
- package/dist/Constants/HelpStrings.d.ts +39 -3
- package/dist/Constants/HelpStrings.d.ts.map +1 -1
- package/dist/Constants/HelpStrings.js +63 -10
- 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 +2 -0
- package/dist/Constants.js.map +1 -1
- package/dist/Errors/GitHubErrorMap.d.ts +39 -0
- package/dist/Errors/GitHubErrorMap.d.ts.map +1 -0
- package/dist/Errors/GitHubErrorMap.js +187 -0
- package/dist/Errors/GitHubErrorMap.js.map +1 -0
- package/dist/HttpClient/CliHttpClient.d.ts +8 -3
- package/dist/HttpClient/CliHttpClient.d.ts.map +1 -1
- package/dist/HttpClient/CliHttpClient.js +33 -13
- package/dist/HttpClient/CliHttpClient.js.map +1 -1
- package/dist/Logger/ConsoleWriter.d.ts.map +1 -1
- package/dist/Logger/ConsoleWriter.js +7 -7
- package/dist/Logger/ConsoleWriter.js.map +1 -1
- package/dist/Middletier/FunctionsBundler.d.ts +17 -0
- package/dist/Middletier/FunctionsBundler.d.ts.map +1 -0
- package/dist/Middletier/FunctionsBundler.js +165 -0
- package/dist/Middletier/FunctionsBundler.js.map +1 -0
- package/dist/Middletier/PackFunctions.d.ts +52 -0
- package/dist/Middletier/PackFunctions.d.ts.map +1 -0
- package/dist/Middletier/PackFunctions.js +122 -0
- package/dist/Middletier/PackFunctions.js.map +1 -0
- package/dist/Types/Cli.types.d.ts +42 -1
- package/dist/Types/Cli.types.d.ts.map +1 -1
- package/dist/Types/Command.types.d.ts +1 -1
- package/dist/Types/Command.types.d.ts.map +1 -1
- package/dist/Utils/ConsoleOutput.d.ts +6 -0
- package/dist/Utils/ConsoleOutput.d.ts.map +1 -1
- package/dist/Utils/ConsoleOutput.js +23 -12
- package/dist/Utils/ConsoleOutput.js.map +1 -1
- 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 +8 -0
- package/dist/Utils/EnvironmentRoutingUtils.d.ts.map +1 -0
- package/dist/Utils/EnvironmentRoutingUtils.js +45 -0
- package/dist/Utils/EnvironmentRoutingUtils.js.map +1 -0
- package/dist/Utils/GitHubDcfFlow.d.ts +59 -0
- package/dist/Utils/GitHubDcfFlow.d.ts.map +1 -0
- package/dist/Utils/GitHubDcfFlow.js +165 -0
- package/dist/Utils/GitHubDcfFlow.js.map +1 -0
- package/dist/Utils/GitUtils.d.ts +5 -0
- package/dist/Utils/GitUtils.d.ts.map +1 -1
- package/dist/Utils/GitUtils.js +15 -0
- package/dist/Utils/GitUtils.js.map +1 -1
- package/dist/Utils/Paging.d.ts.map +1 -1
- package/dist/Utils/Paging.js +4 -4
- package/dist/Utils/Paging.js.map +1 -1
- package/dist/Utils/RepoUrl.d.ts +13 -0
- package/dist/Utils/RepoUrl.d.ts.map +1 -0
- package/dist/Utils/RepoUrl.js +6 -0
- package/dist/Utils/RepoUrl.js.map +1 -0
- package/dist/Utils/Spinner.d.ts +9 -1
- package/dist/Utils/Spinner.d.ts.map +1 -1
- package/dist/Utils/Spinner.js +25 -5
- package/dist/Utils/Spinner.js.map +1 -1
- package/dist/Verbs/AddAction.d.ts.map +1 -1
- package/dist/Verbs/AddAction.js +12 -41
- package/dist/Verbs/AddAction.js.map +1 -1
- package/dist/Verbs/AddConnector.d.ts +24 -0
- package/dist/Verbs/AddConnector.d.ts.map +1 -0
- package/dist/Verbs/AddConnector.js +156 -0
- package/dist/Verbs/AddConnector.js.map +1 -0
- package/dist/Verbs/AddConnectorFlows.d.ts +72 -0
- package/dist/Verbs/AddConnectorFlows.d.ts.map +1 -0
- package/dist/Verbs/AddConnectorFlows.js +198 -0
- package/dist/Verbs/AddConnectorFlows.js.map +1 -0
- package/dist/Verbs/AddDataSource.js +1 -1
- package/dist/Verbs/AddDataSource.js.map +1 -1
- package/dist/Verbs/AddFlow.d.ts.map +1 -1
- package/dist/Verbs/AddFlow.js +3 -2
- package/dist/Verbs/AddFlow.js.map +1 -1
- package/dist/Verbs/AddTable.d.ts.map +1 -1
- package/dist/Verbs/AddTable.js +15 -100
- package/dist/Verbs/AddTable.js.map +1 -1
- package/dist/Verbs/AuthStatus.d.ts.map +1 -1
- package/dist/Verbs/AuthStatus.js +34 -6
- package/dist/Verbs/AuthStatus.js.map +1 -1
- package/dist/Verbs/AuthSwitch.d.ts +6 -0
- package/dist/Verbs/AuthSwitch.d.ts.map +1 -0
- package/dist/Verbs/AuthSwitch.js +67 -0
- package/dist/Verbs/AuthSwitch.js.map +1 -0
- package/dist/Verbs/ConnectorHelpers.d.ts +54 -1
- package/dist/Verbs/ConnectorHelpers.d.ts.map +1 -1
- package/dist/Verbs/ConnectorHelpers.js +217 -16
- package/dist/Verbs/ConnectorHelpers.js.map +1 -1
- package/dist/Verbs/CreateMaafApp.d.ts +26 -1
- package/dist/Verbs/CreateMaafApp.d.ts.map +1 -1
- package/dist/Verbs/CreateMaafApp.js +310 -135
- package/dist/Verbs/CreateMaafApp.js.map +1 -1
- package/dist/Verbs/DeployMaafApp.d.ts.map +1 -1
- package/dist/Verbs/DeployMaafApp.js +4 -0
- package/dist/Verbs/DeployMaafApp.js.map +1 -1
- package/dist/Verbs/Dev.js +5 -5
- package/dist/Verbs/Dev.js.map +1 -1
- package/dist/Verbs/FindDataverseApi.js +15 -15
- package/dist/Verbs/FindDataverseApi.js.map +1 -1
- package/dist/Verbs/GetSettings.d.ts +1 -1
- package/dist/Verbs/GetSettings.js +1 -1
- package/dist/Verbs/Init.d.ts.map +1 -1
- package/dist/Verbs/Init.js +129 -61
- package/dist/Verbs/Init.js.map +1 -1
- package/dist/Verbs/ListConnectors.d.ts.map +1 -1
- package/dist/Verbs/ListConnectors.js +4 -2
- package/dist/Verbs/ListConnectors.js.map +1 -1
- package/dist/Verbs/ListDatasets.d.ts.map +1 -1
- package/dist/Verbs/ListDatasets.js +5 -0
- package/dist/Verbs/ListDatasets.js.map +1 -1
- package/dist/Verbs/ListSqlStoredProcedures.d.ts.map +1 -1
- package/dist/Verbs/ListSqlStoredProcedures.js +5 -0
- package/dist/Verbs/ListSqlStoredProcedures.js.map +1 -1
- package/dist/Verbs/ListTables.d.ts.map +1 -1
- package/dist/Verbs/ListTables.js +5 -0
- package/dist/Verbs/ListTables.js.map +1 -1
- package/dist/Verbs/Login.d.ts.map +1 -1
- package/dist/Verbs/Login.js +16 -13
- package/dist/Verbs/Login.js.map +1 -1
- package/dist/Verbs/Logout.d.ts.map +1 -1
- package/dist/Verbs/Logout.js +19 -13
- package/dist/Verbs/Logout.js.map +1 -1
- package/dist/Verbs/MaafAppPermissions.d.ts +26 -6
- package/dist/Verbs/MaafAppPermissions.d.ts.map +1 -1
- package/dist/Verbs/MaafAppPermissions.js +193 -28
- package/dist/Verbs/MaafAppPermissions.js.map +1 -1
- package/dist/Verbs/Pack.d.ts +6 -6
- package/dist/Verbs/Pack.d.ts.map +1 -1
- package/dist/Verbs/Pack.js +80 -12
- package/dist/Verbs/Pack.js.map +1 -1
- package/dist/Verbs/RefreshDataSource.d.ts.map +1 -1
- package/dist/Verbs/RefreshDataSource.js +4 -3
- package/dist/Verbs/RefreshDataSource.js.map +1 -1
- package/dist/Verbs/RefreshGitAuth.d.ts +6 -0
- package/dist/Verbs/RefreshGitAuth.d.ts.map +1 -0
- package/dist/Verbs/RefreshGitAuth.js +153 -0
- package/dist/Verbs/RefreshGitAuth.js.map +1 -0
- package/dist/Verbs/RemoveFlow.d.ts.map +1 -1
- package/dist/Verbs/RemoveFlow.js +4 -3
- package/dist/Verbs/RemoveFlow.js.map +1 -1
- package/dist/Verbs/SetSetting.d.ts +1 -1
- package/dist/Verbs/SetSetting.js +1 -1
- package/dist/Verbs/VerbConstants.d.ts +72 -16
- package/dist/Verbs/VerbConstants.d.ts.map +1 -1
- package/dist/Verbs/VerbConstants.js +64 -16
- package/dist/Verbs/VerbConstants.js.map +1 -1
- package/dist/Verbs/index.d.ts +3 -0
- package/dist/Verbs/index.d.ts.map +1 -1
- package/dist/Verbs/index.js +3 -0
- package/dist/Verbs/index.js.map +1 -1
- package/package.json +8 -8
- package/dist/Authentication/OrchardAuthenticationProvider.d.ts +0 -13
- package/dist/Authentication/OrchardAuthenticationProvider.d.ts.map +0 -1
- package/dist/Authentication/OrchardAuthenticationProvider.js +0 -30
- package/dist/Authentication/OrchardAuthenticationProvider.js.map +0 -1
- package/dist/HttpClient/OrchardProxy.d.ts +0 -11
- package/dist/HttpClient/OrchardProxy.d.ts.map +0 -1
- package/dist/HttpClient/OrchardProxy.js +0 -25
- package/dist/HttpClient/OrchardProxy.js.map +0 -1
- package/dist/HttpClient/Proxy.d.ts +0 -7
- package/dist/HttpClient/Proxy.d.ts.map +0 -1
- package/dist/HttpClient/Proxy.js +0 -5
- package/dist/HttpClient/Proxy.js.map +0 -1
|
@@ -11,7 +11,7 @@ export declare const HelpStrings: {
|
|
|
11
11
|
description: string;
|
|
12
12
|
examples: string[];
|
|
13
13
|
options: {
|
|
14
|
-
|
|
14
|
+
account: string;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
logout: {
|
|
@@ -22,6 +22,13 @@ export declare const HelpStrings: {
|
|
|
22
22
|
description: string;
|
|
23
23
|
examples: string[];
|
|
24
24
|
};
|
|
25
|
+
switch: {
|
|
26
|
+
description: string;
|
|
27
|
+
examples: string[];
|
|
28
|
+
options: {
|
|
29
|
+
account: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
25
32
|
};
|
|
26
33
|
app: {
|
|
27
34
|
create: {
|
|
@@ -33,7 +40,9 @@ export declare const HelpStrings: {
|
|
|
33
40
|
template: string;
|
|
34
41
|
buildPath: string;
|
|
35
42
|
buildCommand: string;
|
|
43
|
+
buildEntryPoint: string;
|
|
36
44
|
repo: string;
|
|
45
|
+
noBrowser: string;
|
|
37
46
|
};
|
|
38
47
|
examples: string[];
|
|
39
48
|
};
|
|
@@ -46,9 +55,10 @@ export declare const HelpStrings: {
|
|
|
46
55
|
description: string;
|
|
47
56
|
buildPath: string;
|
|
48
57
|
buildCommand: string;
|
|
49
|
-
|
|
50
|
-
appUrl: string;
|
|
58
|
+
buildEntryPoint: string;
|
|
51
59
|
logoPath: string;
|
|
60
|
+
useExistingGitRepo: string;
|
|
61
|
+
provisionGitRepo: string;
|
|
52
62
|
};
|
|
53
63
|
examples: string[];
|
|
54
64
|
};
|
|
@@ -84,6 +94,7 @@ export declare const HelpStrings: {
|
|
|
84
94
|
description: string;
|
|
85
95
|
options: {
|
|
86
96
|
app: string;
|
|
97
|
+
access: string;
|
|
87
98
|
};
|
|
88
99
|
examples: string[];
|
|
89
100
|
};
|
|
@@ -91,6 +102,7 @@ export declare const HelpStrings: {
|
|
|
91
102
|
description: string;
|
|
92
103
|
options: {
|
|
93
104
|
app: string;
|
|
105
|
+
access: string;
|
|
94
106
|
};
|
|
95
107
|
examples: string[];
|
|
96
108
|
};
|
|
@@ -173,6 +185,18 @@ export declare const HelpStrings: {
|
|
|
173
185
|
};
|
|
174
186
|
examples: string[];
|
|
175
187
|
};
|
|
188
|
+
connector: {
|
|
189
|
+
description: string;
|
|
190
|
+
options: {
|
|
191
|
+
apiId: string;
|
|
192
|
+
connectionId: string;
|
|
193
|
+
dataset: string;
|
|
194
|
+
table: string;
|
|
195
|
+
as: string;
|
|
196
|
+
skipCodegen: string;
|
|
197
|
+
};
|
|
198
|
+
examples: string[];
|
|
199
|
+
};
|
|
176
200
|
};
|
|
177
201
|
remove: {
|
|
178
202
|
description: string;
|
|
@@ -317,5 +341,17 @@ export declare const HelpStrings: {
|
|
|
317
341
|
};
|
|
318
342
|
};
|
|
319
343
|
};
|
|
344
|
+
git: {
|
|
345
|
+
auth: {
|
|
346
|
+
refresh: {
|
|
347
|
+
description: string;
|
|
348
|
+
options: {
|
|
349
|
+
repo: string;
|
|
350
|
+
openBrowser: string;
|
|
351
|
+
};
|
|
352
|
+
examples: string[];
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
};
|
|
320
356
|
};
|
|
321
357
|
//# sourceMappingURL=HelpStrings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpStrings.d.ts","sourceRoot":"","sources":["../../src/Constants/HelpStrings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"HelpStrings.d.ts","sourceRoot":"","sources":["../../src/Constants/HelpStrings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiYtB;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2HJ,CAAC"}
|
|
@@ -13,19 +13,30 @@ export const HelpStrings = {
|
|
|
13
13
|
description: 'Sign in to Microsoft Entra ID.',
|
|
14
14
|
examples: [
|
|
15
15
|
`${CLI_BINARY_NAME} auth login`,
|
|
16
|
-
`${CLI_BINARY_NAME} auth login --
|
|
16
|
+
`${CLI_BINARY_NAME} auth login --account user@contoso.com`,
|
|
17
17
|
],
|
|
18
18
|
options: {
|
|
19
|
-
|
|
19
|
+
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 — use `auth switch --account` to choose between cached accounts.',
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
logout: {
|
|
23
|
-
description: '
|
|
23
|
+
description: 'Clear all cached credentials. Removes every cached account and the active-account ' +
|
|
24
|
+
'pointer. Use `auth switch` to change which cached account is active without logging out.',
|
|
24
25
|
examples: [`${CLI_BINARY_NAME} auth logout`],
|
|
25
26
|
},
|
|
26
27
|
status: {
|
|
27
|
-
description: 'Show
|
|
28
|
-
examples: [`${CLI_BINARY_NAME} auth status`],
|
|
28
|
+
description: 'Show cached accounts. The active account (used by other CLI commands) is marked.',
|
|
29
|
+
examples: [`${CLI_BINARY_NAME} auth status`, `${CLI_BINARY_NAME} auth status --json`],
|
|
30
|
+
},
|
|
31
|
+
switch: {
|
|
32
|
+
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.',
|
|
33
|
+
examples: [
|
|
34
|
+
`${CLI_BINARY_NAME} auth switch`,
|
|
35
|
+
`${CLI_BINARY_NAME} auth switch --account user@contoso.com`,
|
|
36
|
+
],
|
|
37
|
+
options: {
|
|
38
|
+
account: 'Username (email) or home account ID of the account to make active.',
|
|
39
|
+
},
|
|
29
40
|
},
|
|
30
41
|
},
|
|
31
42
|
app: {
|
|
@@ -38,7 +49,9 @@ export const HelpStrings = {
|
|
|
38
49
|
template: 'GitHub repository or subpath to scaffold the app from (e.g. github:owner/repo/subdir). Defaults to github:microsoft/Managed-Apps/templates/vite8. Not allowed with --repo none (nothing is scaffolded in that mode).',
|
|
39
50
|
buildPath: 'Path to the build output directory. Defaults to ./dist.',
|
|
40
51
|
buildCommand: 'Full shell command used to build the app. Defaults to "npm run build".',
|
|
52
|
+
buildEntryPoint: 'Entry point HTML file for the app. Defaults to index.html.',
|
|
41
53
|
repo: "Source-control binding for the new app. Omit to use the default platform-managed (GRS) flow. Pass a GitHub Enterprise Cloud repo URL (*.ghe.com, e.g. https://myorg.ghe.com/contoso/expense-tracker) 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 Vite template. Pass '--repo none' to create only the server-side app record: no git binding, no template scaffold, just ms.config.json in [directory]. Cannot be combined with --repository-id.",
|
|
54
|
+
noBrowser: 'Suppress automatic browser launch during inline GitHub authentication. Useful for headless / CI flows. Has no effect when `--json` is set (JSON mode never launches a browser).',
|
|
42
55
|
},
|
|
43
56
|
examples: [
|
|
44
57
|
`${CLI_BINARY_NAME} app create --display-name "My App" --repository-id <id>`,
|
|
@@ -57,9 +70,10 @@ export const HelpStrings = {
|
|
|
57
70
|
description: 'Optional description for the app.',
|
|
58
71
|
buildPath: 'Path to the build output directory. Defaults to ./dist.',
|
|
59
72
|
buildCommand: 'Full shell command used to build the app. Defaults to npm run build.',
|
|
60
|
-
|
|
61
|
-
appUrl: 'Local development URL for the app. Defaults to http://localhost:3000.',
|
|
73
|
+
buildEntryPoint: 'Entry point HTML file for the app. Defaults to index.html.',
|
|
62
74
|
logoPath: 'Path to the app logo. Defaults to Default.',
|
|
75
|
+
useExistingGitRepo: 'When set, the CLI will attempt to use an existing git repository in the current directory instead of initializing a new one. The existing repository must have a remote origin configured, and the CLI will use that remote URL as the repo source for the app.',
|
|
76
|
+
provisionGitRepo: 'When set, the CLI will provision a new platform managed git repository for the app even if an existing repository is detected in the current directory. This is useful when you want to initialize an app in a directory that has a git repository, but you do not want to use that repository for the app.',
|
|
63
77
|
},
|
|
64
78
|
examples: [
|
|
65
79
|
`${CLI_BINARY_NAME} app init --display-name "My App" --environment-id <id>`,
|
|
@@ -109,24 +123,28 @@ export const HelpStrings = {
|
|
|
109
123
|
],
|
|
110
124
|
},
|
|
111
125
|
share: {
|
|
112
|
-
description: 'Share a Microsoft App with users or groups.
|
|
126
|
+
description: 'Share a Microsoft App with users or groups. Use --access play (default) to grant play access to the app, or --access edit to grant edit access to the underlying repository.',
|
|
113
127
|
options: {
|
|
114
128
|
app: `The app name to share. Defaults to appId in ${AppConfigFileName}.`,
|
|
129
|
+
access: 'Access level to grant: "play" (default — run the app) or "edit" (modify the app).',
|
|
115
130
|
},
|
|
116
131
|
examples: [
|
|
117
132
|
`${CLI_BINARY_NAME} app share alice@contoso.com,bob@contoso.com`,
|
|
118
133
|
`${CLI_BINARY_NAME} app share --app my-app <aad-id>`,
|
|
134
|
+
`${CLI_BINARY_NAME} app share alice@contoso.com --access edit`,
|
|
119
135
|
`${CLI_BINARY_NAME} app share alice@contoso.com --json`,
|
|
120
136
|
],
|
|
121
137
|
},
|
|
122
138
|
unshare: {
|
|
123
|
-
description: 'Unshare a Microsoft App from users or groups.
|
|
139
|
+
description: 'Unshare a Microsoft App from users or groups. 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.',
|
|
124
140
|
options: {
|
|
125
141
|
app: `The app name to unshare. Defaults to appId in ${AppConfigFileName}.`,
|
|
142
|
+
access: 'Access level to revoke: "play" (default — app access) or "edit" (repository access).',
|
|
126
143
|
},
|
|
127
144
|
examples: [
|
|
128
145
|
`${CLI_BINARY_NAME} app unshare alice@contoso.com,bob@contoso.com`,
|
|
129
146
|
`${CLI_BINARY_NAME} app unshare --app my-app <aad-id>`,
|
|
147
|
+
`${CLI_BINARY_NAME} app unshare alice@contoso.com --access edit`,
|
|
130
148
|
`${CLI_BINARY_NAME} app unshare alice@contoso.com --json`,
|
|
131
149
|
],
|
|
132
150
|
},
|
|
@@ -208,7 +226,7 @@ export const HelpStrings = {
|
|
|
208
226
|
skipCodegen: 'Skip TypeScript code generation after adding the data source.',
|
|
209
227
|
},
|
|
210
228
|
examples: [
|
|
211
|
-
`${CLI_BINARY_NAME} app add
|
|
229
|
+
`${CLI_BINARY_NAME} app add connector --api-id shared_office365`,
|
|
212
230
|
`${CLI_BINARY_NAME} app add table --api-id shared_sql --connection-id <id> --dataset <db> --table <tbl>`,
|
|
213
231
|
`${CLI_BINARY_NAME} app add procedure --api-id shared_sql --connection-id <id> --dataset <db>`,
|
|
214
232
|
],
|
|
@@ -240,6 +258,23 @@ export const HelpStrings = {
|
|
|
240
258
|
`${CLI_BINARY_NAME} app add table --api-id shared_sharepointonline --skip-codegen`,
|
|
241
259
|
],
|
|
242
260
|
},
|
|
261
|
+
connector: {
|
|
262
|
+
description: 'Add a connector to the app, routing to table or action based on capabilities. Dual-capability connectors (e.g. SharePoint) prompt, or require --as in non-interactive mode.',
|
|
263
|
+
options: {
|
|
264
|
+
apiId: 'Connector API identifier (e.g. shared_office365, shared_sql).',
|
|
265
|
+
connectionId: 'Connection ID to use. If omitted (and a connection is required), you will be prompted to select one.',
|
|
266
|
+
dataset: 'Dataset name (only used when adding as a table). If omitted in table mode, you will be prompted.',
|
|
267
|
+
table: 'Table name (only used when adding as a table). If omitted in table mode, you will be prompted.',
|
|
268
|
+
as: 'Force the dispatch to "table" or "action". Required in non-interactive mode when the connector supports tables.',
|
|
269
|
+
skipCodegen: 'Skip TypeScript code generation after adding the connector.',
|
|
270
|
+
},
|
|
271
|
+
examples: [
|
|
272
|
+
`${CLI_BINARY_NAME} app add connector --api-id shared_office365`,
|
|
273
|
+
`${CLI_BINARY_NAME} app add connector --api-id shared_sql --as table --connection-id <id> --dataset <db> --table <tbl>`,
|
|
274
|
+
`${CLI_BINARY_NAME} app add connector --api-id shared_sharepointonline --as action`,
|
|
275
|
+
`${CLI_BINARY_NAME} app add connector --api-id shared_sql --as table --skip-codegen`,
|
|
276
|
+
],
|
|
277
|
+
},
|
|
243
278
|
},
|
|
244
279
|
remove: {
|
|
245
280
|
description: `Remove an action, table or procedure from the app.`,
|
|
@@ -434,5 +469,23 @@ export const HelpStrings = {
|
|
|
434
469
|
},
|
|
435
470
|
},
|
|
436
471
|
},
|
|
472
|
+
git: {
|
|
473
|
+
auth: {
|
|
474
|
+
refresh: {
|
|
475
|
+
description: 'Authenticate against a GitHub repository so subsequent app create / deploy / preview / build ' +
|
|
476
|
+
'commands targeting that repo know your GitHub identity. Runs the GitHub device-code flow via ' +
|
|
477
|
+
'the Managed Apps GitHub App; no GitHub token is stored locally.',
|
|
478
|
+
options: {
|
|
479
|
+
repo: 'GitHub repository URL (required, must be a ghe.com URL).',
|
|
480
|
+
openBrowser: 'Launch the browser to complete the GitHub device-code flow. Default: do not launch.',
|
|
481
|
+
},
|
|
482
|
+
examples: [
|
|
483
|
+
`${CLI_BINARY_NAME} git auth refresh --repo contoso.ghe.com/contoso/my-app`,
|
|
484
|
+
`${CLI_BINARY_NAME} git auth refresh -r contoso.ghe.com/contoso/my-app --open-browser`,
|
|
485
|
+
`${CLI_BINARY_NAME} git auth refresh --repo contoso.ghe.com/contoso/my-app --json`,
|
|
486
|
+
],
|
|
487
|
+
},
|
|
488
|
+
},
|
|
489
|
+
},
|
|
437
490
|
};
|
|
438
491
|
//# sourceMappingURL=HelpStrings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpStrings.js","sourceRoot":"","sources":["../../src/Constants/HelpStrings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE;QACN,kBAAkB,EAAE,yBAAyB;QAC7C,KAAK,EACH,0HAA0H;KAC7H;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE;gBACR,GAAG,eAAe,aAAa;gBAC/B,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"HelpStrings.js","sourceRoot":"","sources":["../../src/Constants/HelpStrings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE;QACN,kBAAkB,EAAE,yBAAyB;QAC7C,KAAK,EACH,0HAA0H;KAC7H;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE;gBACR,GAAG,eAAe,aAAa;gBAC/B,GAAG,eAAe,wCAAwC;aAC3D;YACD,OAAO,EAAE;gBACP,OAAO,EACL,oNAAoN;aACvN;SACF;QACD,MAAM,EAAE;YACN,WAAW,EACT,oFAAoF;gBACpF,0FAA0F;YAC5F,QAAQ,EAAE,CAAC,GAAG,eAAe,cA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,gCAAgC;gBAC7C,OAAO,EAAE;oBACP,SAAS,EAAE,uBAAuB;oBAClC,UAAU,EAAE,wBAAwB;oBACpC,OAAO,EAAE,eAAe;iBACzB;gBACD,QAAQ,EAAE;oBACR,GAAG,eAAe,iFAAiF;oBACnG,GAAG,eAAe,wFAAwF;iBAC3G;aACF;YACD,aAAa,EAAE;gBACb,WAAW,EAAE,2CAA2C;gBACxD,OAAO,EAAE;oBACP,kBAAkB,EAChB,qGAAqG;oBACvG,MAAM,EACJ,6GAA6G;iBAChH;aACF;SACF;KACF;IACD,GAAG,EAAE;QACH,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,WAAW,EACT,+FAA+F;oBAC/F,+FAA+F;oBAC/F,iEAAiE;gBACnE,OAAO,EAAE;oBACP,IAAI,EAAE,0DAA0D;oBAChE,WAAW,EACT,qFAAqF;iBACxF;gBACD,QAAQ,EAAE;oBACR,GAAG,eAAe,yDAAyD;oBAC3E,GAAG,eAAe,oEAAoE;oBACtF,GAAG,eAAe,gEAAgE;iBACnF;aACF;SACF;KACF;CACF,CAAC"}
|
package/dist/Constants.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export declare const WORKING_DIRECTORY: string;
|
|
|
5
5
|
export declare const CLI_CONFIG_DIRECTORY: string;
|
|
6
6
|
export declare const AUTH_CACHE_DIRECTORY: string;
|
|
7
7
|
export declare const MS_CLIENT_REQUESTID = "x-ms-client-request-id";
|
|
8
|
+
export declare const MS_TARGET_URL = "x-ms-target-url";
|
|
9
|
+
export declare const MS_AUTH_RESOURCE = "x-ms-auth-resource";
|
|
8
10
|
export declare const USER_SETTINGS_FILE = "userSettings.json";
|
|
9
11
|
export declare const CLI_CLIENT_ID = "9cee029c-6210-4654-90bb-17e6e9d36617";
|
|
10
12
|
//# sourceMappingURL=Constants.d.ts.map
|
package/dist/Constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,eAAO,MAAM,iBAAiB,QAAqD,CAAC;AACpF,eAAO,MAAM,oBAAoB,QACiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,QAAmD,CAAC;AACrF,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAC5D,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAOtD,eAAO,MAAM,aAAa,yCAAyC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,eAAO,MAAM,iBAAiB,QAAqD,CAAC;AACpF,eAAO,MAAM,oBAAoB,QACiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,QAAmD,CAAC;AACrF,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAC5D,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAOtD,eAAO,MAAM,aAAa,yCAAyC,CAAC"}
|
package/dist/Constants.js
CHANGED
|
@@ -8,6 +8,8 @@ export const WORKING_DIRECTORY = getCliEnvVar('WORKING_DIRECTORY') ?? process.cw
|
|
|
8
8
|
export const CLI_CONFIG_DIRECTORY = getCliEnvVar('CONFIG_DIR') ?? path.join(os.homedir(), '.ms-cli');
|
|
9
9
|
export const AUTH_CACHE_DIRECTORY = path.join(CLI_CONFIG_DIRECTORY, 'cache', 'auth');
|
|
10
10
|
export const MS_CLIENT_REQUESTID = 'x-ms-client-request-id';
|
|
11
|
+
export const MS_TARGET_URL = 'x-ms-target-url';
|
|
12
|
+
export const MS_AUTH_RESOURCE = 'x-ms-auth-resource';
|
|
11
13
|
export const USER_SETTINGS_FILE = 'userSettings.json';
|
|
12
14
|
// MSAL client ID for `@microsoft/managed-apps-cli` (this package). Used by NodeMsalAuthenticationProvider
|
|
13
15
|
// (token acquisition), GitCredentialConfig (GCM OAuth), and CreateMaafApp (routing API). The
|
package/dist/Constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC,mBAAmB,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAC/B,YAAY,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACrF,MAAM,CAAC,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AAC5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAEtD,0GAA0G;AAC1G,6FAA6F;AAC7F,iFAAiF;AACjF,gGAAgG;AAChG,iCAAiC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC,mBAAmB,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAC/B,YAAY,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACrF,MAAM,CAAC,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AAC5D,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AACrD,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAEtD,0GAA0G;AAC1G,6FAA6F;AAC7F,iFAAiF;AACjF,gGAAgG;AAChG,iCAAiC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { type AppError } from './CliError.js';
|
|
5
|
+
/** Server error envelope (subset of GrsServerError) accepted by the mapper. */
|
|
6
|
+
export interface ServerErrorPayload {
|
|
7
|
+
code?: string;
|
|
8
|
+
message: string;
|
|
9
|
+
status: number;
|
|
10
|
+
details?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export interface MapErrorContext {
|
|
13
|
+
/** Optional repository URL — used to interpolate `{owner}/{repo}` into messages. */
|
|
14
|
+
repoUrl?: string;
|
|
15
|
+
/** The CLI verb that triggered the error (e.g. `'git auth refresh'`). Reserved for future telemetry. */
|
|
16
|
+
verb: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Map a structured server error code to a CLI-facing {@link AppError}.
|
|
20
|
+
* Returns `null` for codes the CLI doesn't recognize so callers can fall back
|
|
21
|
+
* to generic error handling.
|
|
22
|
+
*/
|
|
23
|
+
export declare function mapGitHubServerErrorToCliError(payload: ServerErrorPayload, context: MapErrorContext): AppError | null;
|
|
24
|
+
/**
|
|
25
|
+
* Inspect an unknown error and decide whether the CLI should run the DCF
|
|
26
|
+
* recovery flow (i.e. the verb's catch-and-retry path). Returns the parsed
|
|
27
|
+
* payload + matched code, or `null` if the error is unrelated.
|
|
28
|
+
*
|
|
29
|
+
* Matches:
|
|
30
|
+
* - `GrsServerError` with `code === 'GitHubMappingMissing' | 'GitHubMappingExpired' | 'GitHubMappingStale'`
|
|
31
|
+
* - A plain `Error` with `.status === 401` whose message is JSON containing
|
|
32
|
+
* `error.code` of one of the above values (legacy path before catch-and-retry
|
|
33
|
+
* wires `allowErrorResponse` everywhere).
|
|
34
|
+
*/
|
|
35
|
+
export declare function matchGitHubAuthError(error: unknown): {
|
|
36
|
+
code: 'GitHubMappingMissing' | 'GitHubMappingExpired' | 'GitHubMappingStale';
|
|
37
|
+
payload: ServerErrorPayload;
|
|
38
|
+
} | null;
|
|
39
|
+
//# sourceMappingURL=GitHubErrorMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitHubErrorMap.d.ts","sourceRoot":"","sources":["../../src/Errors/GitHubErrorMap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAqBH,OAAO,EAAE,KAAK,QAAQ,EAAqE,MAAM,YAAY,CAAC;AAE9G,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wGAAwG;IACxG,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,eAAe,GACvB,QAAQ,GAAG,IAAI,CA8GjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG;IACpD,IAAI,EAAE,sBAAsB,GAAG,sBAAsB,GAAG,oBAAoB,CAAC;IAC7E,OAAO,EAAE,kBAAkB,CAAC;CAC7B,GAAG,IAAI,CAiDP"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (C) Microsoft Corporation. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Maps structured server error codes from GRS into CLI-facing {@link AppError}
|
|
6
|
+
* subclasses with user-actionable wording. The mapping table mirrors the
|
|
7
|
+
* server error catalog; keep this file in lock-step with the GRS service contract.
|
|
8
|
+
*
|
|
9
|
+
* Two entry points:
|
|
10
|
+
* - {@link mapGitHubServerErrorToCliError} — call from a verb's catch block
|
|
11
|
+
* after a {@link GrsServerError}; returns `null` for unrecognized codes
|
|
12
|
+
* so the caller can fall back to its default error path.
|
|
13
|
+
* - {@link matchGitHubAuthError} — used by catch-and-retry callers (e.g.
|
|
14
|
+
* `app build` re-running DCF on a 401) to detect the recoverable
|
|
15
|
+
* mapping-error codes (`GitHubMappingMissing`, `GitHubMappingExpired`,
|
|
16
|
+
* `GitHubMappingStale`) regardless of whether the error came back as a
|
|
17
|
+
* {@link GrsServerError} or a legacy plain {@link Error}.
|
|
18
|
+
*/
|
|
19
|
+
import { GrsServerError } from '@microsoft/managed-apps-actions';
|
|
20
|
+
import { parseGitHubRepoUrl } from '../Utils/RepoUrl.js';
|
|
21
|
+
import { AuthenticationError, ConfigurationError, NetworkError, UsageError } from './CliError.js';
|
|
22
|
+
/**
|
|
23
|
+
* Map a structured server error code to a CLI-facing {@link AppError}.
|
|
24
|
+
* Returns `null` for codes the CLI doesn't recognize so callers can fall back
|
|
25
|
+
* to generic error handling.
|
|
26
|
+
*/
|
|
27
|
+
export function mapGitHubServerErrorToCliError(payload, context) {
|
|
28
|
+
const code = payload.code;
|
|
29
|
+
if (!code)
|
|
30
|
+
return null;
|
|
31
|
+
const { host, ownerRepo } = parseRepoContext(context.repoUrl);
|
|
32
|
+
const repoUrl = context.repoUrl ?? '<repo-url>';
|
|
33
|
+
const details = payload.details ?? {};
|
|
34
|
+
switch (code) {
|
|
35
|
+
case 'GitHubMappingMissing':
|
|
36
|
+
return new AuthenticationError(`Your GitHub identity isn't established for ${ownerRepo}. ` +
|
|
37
|
+
`Run \`ms git auth refresh --repo ${host}/${ownerRepo}\` and retry.`);
|
|
38
|
+
case 'GitHubMappingExpired':
|
|
39
|
+
return new AuthenticationError(`Your GitHub authentication for ${ownerRepo} has expired. ` +
|
|
40
|
+
`Run \`ms git auth refresh --repo ${host}/${ownerRepo}\` to refresh.`);
|
|
41
|
+
case 'GitHubMappingStale':
|
|
42
|
+
return new AuthenticationError(`Your stored GitHub identity for ${ownerRepo} no longer matches your GitHub account ` +
|
|
43
|
+
`(it may have been renamed or reassigned). Run \`ms git auth refresh --repo ${host}/${ownerRepo}\` to refresh.`);
|
|
44
|
+
case 'GitHubAppNotInstalled': {
|
|
45
|
+
const appName = stringDetail(details, 'appName') ?? '<app-name>';
|
|
46
|
+
return new ConfigurationError(`The Managed Apps GitHub App isn't installed on the org owning ${ownerRepo}. ` +
|
|
47
|
+
`Ask an admin to install it: https://${host}/apps/${appName}/installations/new`);
|
|
48
|
+
}
|
|
49
|
+
case 'GitHubUserLacksAccess':
|
|
50
|
+
return new AuthenticationError(`Your GitHub account doesn't have access to ${ownerRepo}. ` +
|
|
51
|
+
`Ask the repository admin to grant you access.`);
|
|
52
|
+
case 'GitHubUserLacksRequiredLevel': {
|
|
53
|
+
const minLevel = stringDetail(details, 'minLevel') ?? 'a higher level of';
|
|
54
|
+
const actualLevel = stringDetail(details, 'actualLevel') ?? 'lower';
|
|
55
|
+
return new AuthenticationError(`Operation requires ${minLevel} access on ${ownerRepo}; you have ${actualLevel}.`);
|
|
56
|
+
}
|
|
57
|
+
case 'GitHubRepoArchived':
|
|
58
|
+
return new UsageError(`${ownerRepo} is archived. Unarchive it before continuing.`);
|
|
59
|
+
case 'GitHubInstallationSuspended':
|
|
60
|
+
return new ConfigurationError(`The Managed Apps GitHub App installation for the org owning ${ownerRepo} is suspended. ` +
|
|
61
|
+
`Ask an admin to unsuspend it.`);
|
|
62
|
+
case 'GitHubAuthSessionExpired': {
|
|
63
|
+
const expiresIn = numericDetail(details, 'expiresIn');
|
|
64
|
+
const window = expiresIn !== undefined ? `${expiresIn} seconds` : 'the displayed time window';
|
|
65
|
+
return new AuthenticationError(`Authentication session expired before completion. Re-run the command and complete ` +
|
|
66
|
+
`the GitHub sign-in within ${window}.`);
|
|
67
|
+
}
|
|
68
|
+
case 'GitHubAuthSessionNotFound':
|
|
69
|
+
return new AuthenticationError('Authentication session was not found (the server may have restarted). Re-run the command.');
|
|
70
|
+
case 'GitHubAuthDenied':
|
|
71
|
+
return new AuthenticationError("You declined to authorize the Managed Apps GitHub App. The repository binding can't proceed without authorization.");
|
|
72
|
+
case 'GitHubAuthCancelled':
|
|
73
|
+
// Surfaced when the user hits Ctrl+C / SIGINT during the polling loop.
|
|
74
|
+
// Routed to AuthenticationError for consistent exitCode (3) with the
|
|
75
|
+
// other auth-flow terminations.
|
|
76
|
+
return new AuthenticationError('Authentication cancelled.');
|
|
77
|
+
case 'GitHubRateLimited': {
|
|
78
|
+
const retryAfter = numericDetail(details, 'retryAfterSeconds');
|
|
79
|
+
const window = retryAfter !== undefined ? `${retryAfter} seconds` : 'a few minutes';
|
|
80
|
+
return new NetworkError(`GitHub rate limit reached. Try again in ${window}.`);
|
|
81
|
+
}
|
|
82
|
+
case 'GitHubInvalidRepoUrl':
|
|
83
|
+
return new UsageError(`${repoUrl} is not a valid GitHub Enterprise Cloud (*.ghe.com) URL. ` +
|
|
84
|
+
`Build only supports GHE Cloud tenant repositories.`);
|
|
85
|
+
case 'GitHubUpstreamError': {
|
|
86
|
+
// Upstream errors carry server diagnostics (e.g. Key Vault failures, GitHub
|
|
87
|
+
// API responses) that are the only useful diagnostic for the user. Surface
|
|
88
|
+
// the underlying message verbatim rather than swallowing it.
|
|
89
|
+
const detail = payload.message?.trim();
|
|
90
|
+
return new NetworkError(detail
|
|
91
|
+
? `GitHub returned an unexpected error: ${detail}`
|
|
92
|
+
: 'GitHub returned an unexpected error. Try again.');
|
|
93
|
+
}
|
|
94
|
+
default:
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Inspect an unknown error and decide whether the CLI should run the DCF
|
|
100
|
+
* recovery flow (i.e. the verb's catch-and-retry path). Returns the parsed
|
|
101
|
+
* payload + matched code, or `null` if the error is unrelated.
|
|
102
|
+
*
|
|
103
|
+
* Matches:
|
|
104
|
+
* - `GrsServerError` with `code === 'GitHubMappingMissing' | 'GitHubMappingExpired' | 'GitHubMappingStale'`
|
|
105
|
+
* - A plain `Error` with `.status === 401` whose message is JSON containing
|
|
106
|
+
* `error.code` of one of the above values (legacy path before catch-and-retry
|
|
107
|
+
* wires `allowErrorResponse` everywhere).
|
|
108
|
+
*/
|
|
109
|
+
export function matchGitHubAuthError(error) {
|
|
110
|
+
if (error instanceof GrsServerError) {
|
|
111
|
+
if (error.code === 'GitHubMappingMissing' ||
|
|
112
|
+
error.code === 'GitHubMappingExpired' ||
|
|
113
|
+
error.code === 'GitHubMappingStale') {
|
|
114
|
+
return {
|
|
115
|
+
code: error.code,
|
|
116
|
+
payload: {
|
|
117
|
+
code: error.code,
|
|
118
|
+
message: error.message,
|
|
119
|
+
status: error.status,
|
|
120
|
+
details: error.details,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
// Legacy fallback: a plain Error whose message embeds the JSON envelope.
|
|
127
|
+
if (error instanceof Error) {
|
|
128
|
+
const statusMatch = error.message.match(/status:\s*(\d+)/i);
|
|
129
|
+
if (!statusMatch || statusMatch[1] !== '401')
|
|
130
|
+
return null;
|
|
131
|
+
const jsonMatch = error.message.match(/\{[\s\S]*\}/);
|
|
132
|
+
if (!jsonMatch)
|
|
133
|
+
return null;
|
|
134
|
+
try {
|
|
135
|
+
const parsed = JSON.parse(jsonMatch[0]);
|
|
136
|
+
const code = parsed?.error?.code;
|
|
137
|
+
if (code === 'GitHubMappingMissing' ||
|
|
138
|
+
code === 'GitHubMappingExpired' ||
|
|
139
|
+
code === 'GitHubMappingStale') {
|
|
140
|
+
return {
|
|
141
|
+
code,
|
|
142
|
+
payload: {
|
|
143
|
+
code,
|
|
144
|
+
message: parsed.error.message ?? error.message,
|
|
145
|
+
status: 401,
|
|
146
|
+
details: parsed.error.details,
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
// Not JSON — not a match.
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
// === Helpers ==================================================================
|
|
158
|
+
function parseRepoContext(repoUrl) {
|
|
159
|
+
if (!repoUrl)
|
|
160
|
+
return { host: '<tenant>.ghe.com', ownerRepo: '<owner>/<repo>' };
|
|
161
|
+
try {
|
|
162
|
+
const { host, owner, repo } = parseGitHubRepoUrl(repoUrl);
|
|
163
|
+
return { host, ownerRepo: `${owner}/${repo}` };
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return { host: '<tenant>.ghe.com', ownerRepo: '<owner>/<repo>' };
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function stringDetail(details, key) {
|
|
170
|
+
const v = details[key];
|
|
171
|
+
return typeof v === 'string' ? v : undefined;
|
|
172
|
+
}
|
|
173
|
+
function numericDetail(details, key) {
|
|
174
|
+
const v = details[key];
|
|
175
|
+
if (typeof v === 'number' && Number.isFinite(v))
|
|
176
|
+
return v;
|
|
177
|
+
// Servers sometimes encode integer details as strings (e.g. JSON producers
|
|
178
|
+
// that stringify all `number | bigint` fields). Coerce on a best-effort basis
|
|
179
|
+
// so the user-facing message keeps the seconds/retry value instead of
|
|
180
|
+
// silently dropping it.
|
|
181
|
+
if (typeof v === 'string') {
|
|
182
|
+
const n = Number(v);
|
|
183
|
+
return Number.isFinite(n) ? n : undefined;
|
|
184
|
+
}
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=GitHubErrorMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitHubErrorMap.js","sourceRoot":"","sources":["../../src/Errors/GitHubErrorMap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAiB,mBAAmB,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAiB9G;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAA2B,EAC3B,OAAwB;IAExB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,YAAY,CAAC;IAChD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IAEtC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,sBAAsB;YACzB,OAAO,IAAI,mBAAmB,CAC5B,8CAA8C,SAAS,IAAI;gBACzD,oCAAoC,IAAI,IAAI,SAAS,eAAe,CACvE,CAAC;QAEJ,KAA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AQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { IHttpClient, RequestConfig, Response as HttpClientResponse } from '@microsoft/managed-apps-actions';
|
|
5
5
|
import type { IAuthenticationProvider } from '../Types/Cli.types.js';
|
|
6
|
-
import type { IURLProxy } from './Proxy.js';
|
|
7
6
|
export declare class CliHttpClient implements IHttpClient {
|
|
8
7
|
private _authenticationProvider;
|
|
9
|
-
private
|
|
8
|
+
private _forwardUrl?;
|
|
10
9
|
private _inflight;
|
|
11
10
|
private _spinner;
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @param _authenticationProvider — provides bearer tokens for `authResource`-tagged requests.
|
|
13
|
+
* @param _forwardUrl — when set, every request is forwarded to this URL with the original
|
|
14
|
+
* URL surfaced via the `x-ms-target-url` header and the resource audience (if any) via
|
|
15
|
+
* `x-ms-auth-resource`. Used for proxy / dev-tunnel scenarios.
|
|
16
|
+
*/
|
|
17
|
+
constructor(_authenticationProvider: IAuthenticationProvider, _forwardUrl?: string | undefined);
|
|
13
18
|
get<T = unknown>(url: string, config?: RequestConfig): Promise<HttpClientResponse<T>>;
|
|
14
19
|
post<T = unknown>(url: string, config?: RequestConfig): Promise<HttpClientResponse<T>>;
|
|
15
20
|
patch<T = unknown>(url: string, config?: RequestConfig): Promise<HttpClientResponse<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CliHttpClient.d.ts","sourceRoot":"","sources":["../../src/HttpClient/CliHttpClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,QAAQ,IAAI,kBAAkB,EAC/B,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"CliHttpClient.d.ts","sourceRoot":"","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