@backstage/core-app-api 1.11.4-next.0 → 1.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @backstage/core-app-api
2
2
 
3
+ ## 1.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f919be9: Added a utility API for VMware Cloud auth; the API ref is available in the
8
+ `@backstage/core-plugin-api` and `@backstage/frontend-plugin-api` packages, the
9
+ implementation is in `@backstage/core-app-api` and a factory has been added to
10
+ `@backstage/app-defaults`.
11
+
12
+ ### Patch Changes
13
+
14
+ - 9aac2b0: Use `--cwd` as the first `yarn` argument
15
+ - 8fe56a8: Widen `@types/react` dependency range to include version 18.
16
+ - 7da67ce: Change `defaultScopes` for Bitbucket auth from invalid `team` to `account`.
17
+ - Updated dependencies
18
+ - @backstage/core-plugin-api@1.9.0
19
+ - @backstage/config@1.1.1
20
+ - @backstage/types@1.1.1
21
+ - @backstage/version-bridge@1.0.7
22
+
23
+ ## 1.12.0-next.1
24
+
25
+ ### Minor Changes
26
+
27
+ - f919be9: Added a utility API for VMware Cloud auth; the API ref is available in the
28
+ `@backstage/core-plugin-api` and `@backstage/frontend-plugin-api` packages, the
29
+ implementation is in `@backstage/core-app-api` and a factory has been added to
30
+ `@backstage/app-defaults`.
31
+
32
+ ### Patch Changes
33
+
34
+ - 9aac2b0: Use `--cwd` as the first `yarn` argument
35
+ - 8fe56a8: Widen `@types/react` dependency range to include version 18.
36
+ - Updated dependencies
37
+ - @backstage/core-plugin-api@1.9.0-next.1
38
+ - @backstage/config@1.1.1
39
+ - @backstage/types@1.1.1
40
+ - @backstage/version-bridge@1.0.7
41
+
3
42
  ## 1.11.4-next.0
4
43
 
5
44
  ### Patch Changes
package/README.md CHANGED
@@ -7,7 +7,7 @@ This package provides the core API used by Backstage apps.
7
7
  Install the package via Yarn:
8
8
 
9
9
  ```bash
10
- yarn add --cwd packages/app @backstage/core-app-api
10
+ yarn --cwd packages/app add @backstage/core-app-api
11
11
  ```
12
12
 
13
13
  ## Documentation
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode, PropsWithChildren, ComponentType } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
4
- import { ApiHolder, ApiRef, ApiFactory, AnyApiRef, OAuthRequestApi, DiscoveryApi, AuthProviderInfo, ConfigApi, githubAuthApiRef, gitlabAuthApiRef, googleAuthApiRef, OAuthApi, OpenIdConnectApi, ProfileInfoApi, BackstageIdentityApi, SessionApi, SessionState, AuthRequestOptions, BackstageIdentityResponse, ProfileInfo, oktaAuthApiRef, microsoftAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, AlertApi, AlertMessage, AnalyticsApi, AnalyticsEvent, AppThemeApi, AppTheme, ErrorApi, ErrorApiError, ErrorApiErrorContext, FeatureFlagsApi, FeatureFlag, FeatureFlagsSaveOptions, FetchApi, IdentityApi, OAuthRequesterOptions, OAuthRequester, PendingOAuthRequest, StorageApi, StorageValueSnapshot, BackstagePlugin, IconComponent, ExternalRouteRef, AnyApiFactory, RouteRef, SubRouteRef } from '@backstage/core-plugin-api';
4
+ import { ApiHolder, ApiRef, ApiFactory, AnyApiRef, OAuthRequestApi, DiscoveryApi, AuthProviderInfo, ConfigApi, githubAuthApiRef, gitlabAuthApiRef, googleAuthApiRef, OAuthApi, OpenIdConnectApi, ProfileInfoApi, BackstageIdentityApi, SessionApi, SessionState, AuthRequestOptions, BackstageIdentityResponse, ProfileInfo, oktaAuthApiRef, microsoftAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, vmwareCloudAuthApiRef, AlertApi, AlertMessage, AnalyticsApi, AnalyticsEvent, AppThemeApi, AppTheme, ErrorApi, ErrorApiError, ErrorApiErrorContext, FeatureFlagsApi, FeatureFlag, FeatureFlagsSaveOptions, FetchApi, IdentityApi, OAuthRequesterOptions, OAuthRequester, PendingOAuthRequest, StorageApi, StorageValueSnapshot, BackstagePlugin, IconComponent, ExternalRouteRef, AnyApiFactory, RouteRef, SubRouteRef } from '@backstage/core-plugin-api';
5
5
  import * as _backstage_types from '@backstage/types';
6
6
  import { Observable, JsonValue } from '@backstage/types';
7
7
  import { Config, AppConfig } from '@backstage/config';
@@ -327,6 +327,15 @@ declare class AtlassianAuth {
327
327
  static create(options: OAuthApiCreateOptions): typeof atlassianAuthApiRef.T;
328
328
  }
329
329
 
330
+ /**
331
+ * Implements the OAuth flow for VMware Cloud Services
332
+ *
333
+ * @public
334
+ */
335
+ declare class VMwareCloudAuth {
336
+ static create(options: OAuthApiCreateOptions): typeof vmwareCloudAuthApiRef.T;
337
+ }
338
+
330
339
  /**
331
340
  * Base implementation for the AlertApi that simply forwards alerts to consumers.
332
341
  *
@@ -1065,4 +1074,4 @@ type FeatureFlaggedProps = {
1065
1074
  */
1066
1075
  declare const FeatureFlagged: (props: FeatureFlaggedProps) => React.JSX.Element;
1067
1076
 
1068
- export { AlertApiForwarder, ApiFactoryHolder, ApiFactoryRegistry, ApiFactoryScope, ApiProvider, ApiProviderProps, ApiResolver, AppComponents, AppConfigLoader, AppContext, AppIcons, AppOptions, AppRouteBinder, AppRouter, AppRouterProps, AppThemeSelector, AtlassianAuth, AuthApiCreateOptions, BackstageApp, BitbucketAuth, BitbucketServerAuth, BitbucketServerSession, BitbucketSession, BootErrorPageProps, ErrorAlerter, ErrorApiForwarder, ErrorBoundaryFallbackProps, FeatureFlagged, FeatureFlaggedProps, FetchMiddleware, FetchMiddlewares, FlatRoutes, FlatRoutesProps, FrontendHostDiscovery, GithubAuth, GitlabAuth, GoogleAuth, LocalStorageFeatureFlags, MicrosoftAuth, MultipleAnalyticsApi, NoOpAnalyticsApi, OAuth2, OAuth2CreateOptions, OAuth2Session, OAuthApiCreateOptions, OAuthRequestManager, OktaAuth, OneLoginAuth, OneLoginAuthCreateOptions, PopupOptions, SamlAuth, SignInPageProps, UnhandledErrorForwarder, UrlPatternDiscovery, WebStorage, createFetchApi, createSpecializedApp, defaultConfigLoader };
1077
+ export { AlertApiForwarder, ApiFactoryHolder, ApiFactoryRegistry, ApiFactoryScope, ApiProvider, ApiProviderProps, ApiResolver, AppComponents, AppConfigLoader, AppContext, AppIcons, AppOptions, AppRouteBinder, AppRouter, AppRouterProps, AppThemeSelector, AtlassianAuth, AuthApiCreateOptions, BackstageApp, BitbucketAuth, BitbucketServerAuth, BitbucketServerSession, BitbucketSession, BootErrorPageProps, ErrorAlerter, ErrorApiForwarder, ErrorBoundaryFallbackProps, FeatureFlagged, FeatureFlaggedProps, FetchMiddleware, FetchMiddlewares, FlatRoutes, FlatRoutesProps, FrontendHostDiscovery, GithubAuth, GitlabAuth, GoogleAuth, LocalStorageFeatureFlags, MicrosoftAuth, MultipleAnalyticsApi, NoOpAnalyticsApi, OAuth2, OAuth2CreateOptions, OAuth2Session, OAuthApiCreateOptions, OAuthRequestManager, OktaAuth, OneLoginAuth, OneLoginAuthCreateOptions, PopupOptions, SamlAuth, SignInPageProps, UnhandledErrorForwarder, UrlPatternDiscovery, VMwareCloudAuth, WebStorage, createFetchApi, createSpecializedApp, defaultConfigLoader };
package/dist/index.esm.js CHANGED
@@ -909,7 +909,7 @@ var __publicField$b = (obj, key, value) => {
909
909
  __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
910
910
  return value;
911
911
  };
912
- const DEFAULT_PROVIDER$a = {
912
+ const DEFAULT_PROVIDER$b = {
913
913
  id: "oauth2",
914
914
  title: "Your Identity Provider",
915
915
  icon: () => null
@@ -926,7 +926,7 @@ class OAuth2 {
926
926
  configApi,
927
927
  discoveryApi,
928
928
  environment = "development",
929
- provider = DEFAULT_PROVIDER$a,
929
+ provider = DEFAULT_PROVIDER$b,
930
930
  oauthRequestApi,
931
931
  defaultScopes = [],
932
932
  scopeTransform = (x) => x,
@@ -1034,7 +1034,7 @@ class OAuth2 {
1034
1034
  }
1035
1035
  }
1036
1036
 
1037
- const DEFAULT_PROVIDER$9 = {
1037
+ const DEFAULT_PROVIDER$a = {
1038
1038
  id: "github",
1039
1039
  title: "GitHub",
1040
1040
  icon: () => null
@@ -1045,7 +1045,7 @@ class GithubAuth {
1045
1045
  configApi,
1046
1046
  discoveryApi,
1047
1047
  environment = "development",
1048
- provider = DEFAULT_PROVIDER$9,
1048
+ provider = DEFAULT_PROVIDER$a,
1049
1049
  oauthRequestApi,
1050
1050
  defaultScopes = ["read:user"]
1051
1051
  } = options;
@@ -1060,7 +1060,7 @@ class GithubAuth {
1060
1060
  }
1061
1061
  }
1062
1062
 
1063
- const DEFAULT_PROVIDER$8 = {
1063
+ const DEFAULT_PROVIDER$9 = {
1064
1064
  id: "gitlab",
1065
1065
  title: "GitLab",
1066
1066
  icon: () => null
@@ -1071,7 +1071,7 @@ class GitlabAuth {
1071
1071
  configApi,
1072
1072
  discoveryApi,
1073
1073
  environment = "development",
1074
- provider = DEFAULT_PROVIDER$8,
1074
+ provider = DEFAULT_PROVIDER$9,
1075
1075
  oauthRequestApi,
1076
1076
  defaultScopes = ["read_user"]
1077
1077
  } = options;
@@ -1086,7 +1086,7 @@ class GitlabAuth {
1086
1086
  }
1087
1087
  }
1088
1088
 
1089
- const DEFAULT_PROVIDER$7 = {
1089
+ const DEFAULT_PROVIDER$8 = {
1090
1090
  id: "google",
1091
1091
  title: "Google",
1092
1092
  icon: () => null
@@ -1099,7 +1099,7 @@ class GoogleAuth {
1099
1099
  discoveryApi,
1100
1100
  oauthRequestApi,
1101
1101
  environment = "development",
1102
- provider = DEFAULT_PROVIDER$7,
1102
+ provider = DEFAULT_PROVIDER$8,
1103
1103
  defaultScopes = [
1104
1104
  "openid",
1105
1105
  `${SCOPE_PREFIX$1}userinfo.email`,
@@ -1131,7 +1131,7 @@ class GoogleAuth {
1131
1131
  }
1132
1132
  }
1133
1133
 
1134
- const DEFAULT_PROVIDER$6 = {
1134
+ const DEFAULT_PROVIDER$7 = {
1135
1135
  id: "okta",
1136
1136
  title: "Okta",
1137
1137
  icon: () => null
@@ -1152,7 +1152,7 @@ class OktaAuth {
1152
1152
  configApi,
1153
1153
  discoveryApi,
1154
1154
  environment = "development",
1155
- provider = DEFAULT_PROVIDER$6,
1155
+ provider = DEFAULT_PROVIDER$7,
1156
1156
  oauthRequestApi,
1157
1157
  defaultScopes = ["openid", "email", "profile", "offline_access"]
1158
1158
  } = options;
@@ -1194,7 +1194,7 @@ const samlSessionSchema = z.object({
1194
1194
  })
1195
1195
  });
1196
1196
 
1197
- const DEFAULT_PROVIDER$5 = {
1197
+ const DEFAULT_PROVIDER$6 = {
1198
1198
  id: "saml",
1199
1199
  title: "SAML",
1200
1200
  icon: () => null
@@ -1207,7 +1207,7 @@ class SamlAuth {
1207
1207
  const {
1208
1208
  discoveryApi,
1209
1209
  environment = "development",
1210
- provider = DEFAULT_PROVIDER$5
1210
+ provider = DEFAULT_PROVIDER$6
1211
1211
  } = options;
1212
1212
  const connector = new DirectAuthConnector({
1213
1213
  discoveryApi,
@@ -1249,7 +1249,7 @@ var __publicField$a = (obj, key, value) => {
1249
1249
  __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
1250
1250
  return value;
1251
1251
  };
1252
- const DEFAULT_PROVIDER$4 = {
1252
+ const DEFAULT_PROVIDER$5 = {
1253
1253
  id: "microsoft",
1254
1254
  title: "Microsoft",
1255
1255
  icon: () => null
@@ -1266,7 +1266,7 @@ const _MicrosoftAuth = class _MicrosoftAuth {
1266
1266
  const {
1267
1267
  configApi,
1268
1268
  environment = "development",
1269
- provider = DEFAULT_PROVIDER$4,
1269
+ provider = DEFAULT_PROVIDER$5,
1270
1270
  oauthRequestApi,
1271
1271
  discoveryApi,
1272
1272
  defaultScopes = [
@@ -1378,7 +1378,7 @@ const _MicrosoftAuth = class _MicrosoftAuth {
1378
1378
  __publicField$a(_MicrosoftAuth, "MicrosoftGraphID", "00000003-0000-0000-c000-000000000000");
1379
1379
  let MicrosoftAuth = _MicrosoftAuth;
1380
1380
 
1381
- const DEFAULT_PROVIDER$3 = {
1381
+ const DEFAULT_PROVIDER$4 = {
1382
1382
  id: "onelogin",
1383
1383
  title: "onelogin",
1384
1384
  icon: () => null
@@ -1399,7 +1399,7 @@ class OneLoginAuth {
1399
1399
  configApi,
1400
1400
  discoveryApi,
1401
1401
  environment = "development",
1402
- provider = DEFAULT_PROVIDER$3,
1402
+ provider = DEFAULT_PROVIDER$4,
1403
1403
  oauthRequestApi
1404
1404
  } = options;
1405
1405
  return OAuth2.create({
@@ -1424,7 +1424,7 @@ class OneLoginAuth {
1424
1424
  }
1425
1425
  }
1426
1426
 
1427
- const DEFAULT_PROVIDER$2 = {
1427
+ const DEFAULT_PROVIDER$3 = {
1428
1428
  id: "bitbucket",
1429
1429
  title: "Bitbucket",
1430
1430
  icon: () => null
@@ -1435,7 +1435,7 @@ class BitbucketAuth {
1435
1435
  configApi,
1436
1436
  discoveryApi,
1437
1437
  environment = "development",
1438
- provider = DEFAULT_PROVIDER$2,
1438
+ provider = DEFAULT_PROVIDER$3,
1439
1439
  oauthRequestApi,
1440
1440
  defaultScopes = ["account"]
1441
1441
  } = options;
@@ -1450,7 +1450,7 @@ class BitbucketAuth {
1450
1450
  }
1451
1451
  }
1452
1452
 
1453
- const DEFAULT_PROVIDER$1 = {
1453
+ const DEFAULT_PROVIDER$2 = {
1454
1454
  id: "bitbucketServer",
1455
1455
  title: "Bitbucket Server",
1456
1456
  icon: () => null
@@ -1461,7 +1461,7 @@ class BitbucketServerAuth {
1461
1461
  configApi,
1462
1462
  discoveryApi,
1463
1463
  environment = "development",
1464
- provider = DEFAULT_PROVIDER$1,
1464
+ provider = DEFAULT_PROVIDER$2,
1465
1465
  oauthRequestApi,
1466
1466
  defaultScopes = ["PROJECT_ADMIN"]
1467
1467
  } = options;
@@ -1476,7 +1476,7 @@ class BitbucketServerAuth {
1476
1476
  }
1477
1477
  }
1478
1478
 
1479
- const DEFAULT_PROVIDER = {
1479
+ const DEFAULT_PROVIDER$1 = {
1480
1480
  id: "atlassian",
1481
1481
  title: "Atlassian",
1482
1482
  icon: () => null
@@ -1487,7 +1487,7 @@ class AtlassianAuth {
1487
1487
  configApi,
1488
1488
  discoveryApi,
1489
1489
  environment = "development",
1490
- provider = DEFAULT_PROVIDER,
1490
+ provider = DEFAULT_PROVIDER$1,
1491
1491
  oauthRequestApi
1492
1492
  } = options;
1493
1493
  return OAuth2.create({
@@ -1500,6 +1500,32 @@ class AtlassianAuth {
1500
1500
  }
1501
1501
  }
1502
1502
 
1503
+ const DEFAULT_PROVIDER = {
1504
+ id: "vmwareCloudServices",
1505
+ title: "VMware Cloud",
1506
+ icon: () => null
1507
+ };
1508
+ class VMwareCloudAuth {
1509
+ static create(options) {
1510
+ const {
1511
+ configApi,
1512
+ discoveryApi,
1513
+ oauthRequestApi,
1514
+ environment = "development",
1515
+ provider = DEFAULT_PROVIDER,
1516
+ defaultScopes = ["openid"]
1517
+ } = options;
1518
+ return OAuth2.create({
1519
+ configApi,
1520
+ discoveryApi,
1521
+ oauthRequestApi,
1522
+ provider,
1523
+ environment,
1524
+ defaultScopes
1525
+ });
1526
+ }
1527
+ }
1528
+
1503
1529
  var __defProp$9 = Object.defineProperty;
1504
1530
  var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1505
1531
  var __publicField$9 = (obj, key, value) => {
@@ -4033,5 +4059,5 @@ const FlatRoutes = (props) => {
4033
4059
  };
4034
4060
  attachComponentData(FlatRoutes, "core.type", "FlatRoutes");
4035
4061
 
4036
- export { AlertApiForwarder, ApiFactoryRegistry, ApiProvider, ApiResolver, AppRouter, AppThemeSelector, AtlassianAuth, BitbucketAuth, BitbucketServerAuth, ErrorAlerter, ErrorApiForwarder, FeatureFlagged, FetchMiddlewares, FlatRoutes, FrontendHostDiscovery, GithubAuth, GitlabAuth, GoogleAuth, LocalStorageFeatureFlags, MicrosoftAuth, MultipleAnalyticsApi, NoOpAnalyticsApi, OAuth2, OAuthRequestManager, OktaAuth, OneLoginAuth, SamlAuth, UnhandledErrorForwarder, UrlPatternDiscovery, WebStorage, createFetchApi, createSpecializedApp, defaultConfigLoader };
4062
+ export { AlertApiForwarder, ApiFactoryRegistry, ApiProvider, ApiResolver, AppRouter, AppThemeSelector, AtlassianAuth, BitbucketAuth, BitbucketServerAuth, ErrorAlerter, ErrorApiForwarder, FeatureFlagged, FetchMiddlewares, FlatRoutes, FrontendHostDiscovery, GithubAuth, GitlabAuth, GoogleAuth, LocalStorageFeatureFlags, MicrosoftAuth, MultipleAnalyticsApi, NoOpAnalyticsApi, OAuth2, OAuthRequestManager, OktaAuth, OneLoginAuth, SamlAuth, UnhandledErrorForwarder, UrlPatternDiscovery, VMwareCloudAuth, WebStorage, createFetchApi, createSpecializedApp, defaultConfigLoader };
4037
4063
  //# sourceMappingURL=index.esm.js.map