@backstage/core-app-api 1.7.0-next.0 → 1.7.0-next.2

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,27 @@
1
1
  # @backstage/core-app-api
2
2
 
3
+ ## 1.7.0-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-plugin-api@1.5.1-next.1
9
+ - @backstage/config@1.0.7
10
+ - @backstage/types@1.0.2
11
+ - @backstage/version-bridge@1.0.4-next.0
12
+
13
+ ## 1.7.0-next.1
14
+
15
+ ### Patch Changes
16
+
17
+ - 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies.
18
+ - e0c6e8b9c3c: Update peer dependencies
19
+ - Updated dependencies
20
+ - @backstage/core-plugin-api@1.5.1-next.0
21
+ - @backstage/version-bridge@1.0.4-next.0
22
+ - @backstage/config@1.0.7
23
+ - @backstage/types@1.0.2
24
+
3
25
  ## 1.7.0-next.0
4
26
 
5
27
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export { ConfigReader } from '@backstage/config';
10
10
  * Prop types for the ApiProvider component.
11
11
  * @public
12
12
  */
13
- declare type ApiProviderProps = {
13
+ type ApiProviderProps = {
14
14
  apis: ApiHolder;
15
15
  children: ReactNode;
16
16
  };
@@ -23,9 +23,9 @@ declare type ApiProviderProps = {
23
23
  declare const ApiProvider: {
24
24
  (props: PropsWithChildren<ApiProviderProps>): JSX.Element;
25
25
  propTypes: {
26
- apis: PropTypes.Validator<PropTypes.InferProps<{
26
+ apis: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
27
27
  get: PropTypes.Validator<(...args: any[]) => any>;
28
- }>>;
28
+ }>>>;
29
29
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
30
30
  };
31
31
  };
@@ -33,7 +33,7 @@ declare const ApiProvider: {
33
33
  /**
34
34
  * @public
35
35
  */
36
- declare type ApiFactoryHolder = {
36
+ type ApiFactoryHolder = {
37
37
  get<T>(api: ApiRef<T>): ApiFactory<T, T, {
38
38
  [key in string]: unknown;
39
39
  }> | undefined;
@@ -63,7 +63,7 @@ declare class ApiResolver implements ApiHolder {
63
63
  * Scope type when registering API factories.
64
64
  * @public
65
65
  */
66
- declare type ApiFactoryScope = 'default' | 'app' | 'static';
66
+ type ApiFactoryScope = 'default' | 'app' | 'static';
67
67
  /**
68
68
  * ApiFactoryRegistry is an ApiFactoryHolder implementation that enables
69
69
  * registration of API Factories with different scope.
@@ -95,7 +95,7 @@ declare class ApiFactoryRegistry implements ApiFactoryHolder {
95
95
  * Create options for OAuth APIs.
96
96
  * @public
97
97
  */
98
- declare type OAuthApiCreateOptions = AuthApiCreateOptions & {
98
+ type OAuthApiCreateOptions = AuthApiCreateOptions & {
99
99
  oauthRequestApi: OAuthRequestApi;
100
100
  defaultScopes?: string[];
101
101
  };
@@ -103,7 +103,7 @@ declare type OAuthApiCreateOptions = AuthApiCreateOptions & {
103
103
  * Generic create options for auth APIs.
104
104
  * @public
105
105
  */
106
- declare type AuthApiCreateOptions = {
106
+ type AuthApiCreateOptions = {
107
107
  discoveryApi: DiscoveryApi;
108
108
  environment?: string;
109
109
  provider?: AuthProviderInfo;
@@ -141,7 +141,7 @@ declare class GoogleAuth {
141
141
  * OAuth2 create options.
142
142
  * @public
143
143
  */
144
- declare type OAuth2CreateOptions = OAuthApiCreateOptions & {
144
+ type OAuth2CreateOptions = OAuthApiCreateOptions & {
145
145
  scopeTransform?: (scopes: string[]) => string[];
146
146
  };
147
147
  /**
@@ -169,7 +169,7 @@ declare class OAuth2 implements OAuthApi, OpenIdConnectApi, ProfileInfoApi, Back
169
169
  *
170
170
  * @public
171
171
  */
172
- declare type OAuth2Session = {
172
+ type OAuth2Session = {
173
173
  providerInfo: {
174
174
  idToken: string;
175
175
  accessToken: string;
@@ -218,7 +218,7 @@ declare class MicrosoftAuth {
218
218
  * OneLogin auth provider create options.
219
219
  * @public
220
220
  */
221
- declare type OneLoginAuthCreateOptions = {
221
+ type OneLoginAuthCreateOptions = {
222
222
  configApi?: ConfigApi;
223
223
  discoveryApi: DiscoveryApi;
224
224
  oauthRequestApi: OAuthRequestApi;
@@ -239,7 +239,7 @@ declare class OneLoginAuth {
239
239
  *
240
240
  * @public
241
241
  */
242
- declare type BitbucketSession = {
242
+ type BitbucketSession = {
243
243
  providerInfo: {
244
244
  accessToken: string;
245
245
  scopes: Set<string>;
@@ -263,7 +263,7 @@ declare class BitbucketAuth {
263
263
  *
264
264
  * @public
265
265
  */
266
- declare type BitbucketServerSession = {
266
+ type BitbucketServerSession = {
267
267
  providerInfo: {
268
268
  accessToken: string;
269
269
  scopes: Set<string>;
@@ -604,7 +604,7 @@ declare function AppRouter(props: AppRouterProps): JSX.Element;
604
604
  *
605
605
  * @public
606
606
  */
607
- declare type BootErrorPageProps = {
607
+ type BootErrorPageProps = {
608
608
  step: 'load-config' | 'load-chunk';
609
609
  error: Error;
610
610
  };
@@ -613,7 +613,7 @@ declare type BootErrorPageProps = {
613
613
  *
614
614
  * @public
615
615
  */
616
- declare type SignInPageProps = {
616
+ type SignInPageProps = {
617
617
  /**
618
618
  * Set the IdentityApi on successful sign-in. This should only be called once.
619
619
  */
@@ -624,7 +624,7 @@ declare type SignInPageProps = {
624
624
  *
625
625
  * @public
626
626
  */
627
- declare type ErrorBoundaryFallbackProps = {
627
+ type ErrorBoundaryFallbackProps = {
628
628
  plugin?: BackstagePlugin;
629
629
  error: Error;
630
630
  resetError: () => void;
@@ -634,7 +634,7 @@ declare type ErrorBoundaryFallbackProps = {
634
634
  *
635
635
  * @public
636
636
  */
637
- declare type AppComponents = {
637
+ type AppComponents = {
638
638
  NotFoundErrorPage: ComponentType<{}>;
639
639
  BootErrorPage: ComponentType<BootErrorPageProps>;
640
640
  Progress: ComponentType<{}>;
@@ -659,7 +659,7 @@ declare type AppComponents = {
659
659
  *
660
660
  * @public
661
661
  */
662
- declare type AppIcons = {
662
+ type AppIcons = {
663
663
  'kind:api': IconComponent;
664
664
  'kind:component': IconComponent;
665
665
  'kind:domain': IconComponent;
@@ -690,13 +690,13 @@ declare type AppIcons = {
690
690
  *
691
691
  * @public
692
692
  */
693
- declare type AppConfigLoader = () => Promise<AppConfig[]>;
693
+ type AppConfigLoader = () => Promise<AppConfig[]>;
694
694
  /**
695
695
  * Extracts a union of the keys in a map whose value extends the given type
696
696
  *
697
697
  * @ignore
698
698
  */
699
- declare type KeysWithType<Obj extends {
699
+ type KeysWithType<Obj extends {
700
700
  [key in string]: any;
701
701
  }, Type> = {
702
702
  [key in keyof Obj]: Obj[key] extends Type ? key : never;
@@ -706,7 +706,7 @@ declare type KeysWithType<Obj extends {
706
706
  *
707
707
  * @ignore
708
708
  */
709
- declare type PartialKeys<Map extends {
709
+ type PartialKeys<Map extends {
710
710
  [name in string]: any;
711
711
  }, Keys extends keyof Map> = Partial<Pick<Map, Keys>> & Required<Omit<Map, Keys>>;
712
712
  /**
@@ -714,7 +714,7 @@ declare type PartialKeys<Map extends {
714
714
  *
715
715
  * @ignore
716
716
  */
717
- declare type TargetRouteMap<ExternalRoutes extends {
717
+ type TargetRouteMap<ExternalRoutes extends {
718
718
  [name: string]: ExternalRouteRef;
719
719
  }> = {
720
720
  [name in keyof ExternalRoutes]: ExternalRoutes[name] extends ExternalRouteRef<infer Params, any> ? RouteRef<Params> | SubRouteRef<Params> : never;
@@ -725,7 +725,7 @@ declare type TargetRouteMap<ExternalRoutes extends {
725
725
  *
726
726
  * @public
727
727
  */
728
- declare type AppRouteBinder = <ExternalRoutes extends {
728
+ type AppRouteBinder = <ExternalRoutes extends {
729
729
  [name: string]: ExternalRouteRef;
730
730
  }>(externalRoutes: ExternalRoutes, targetRoutes: PartialKeys<TargetRouteMap<ExternalRoutes>, KeysWithType<ExternalRoutes, ExternalRouteRef<any, true>>>) => void;
731
731
  /**
@@ -733,7 +733,7 @@ declare type AppRouteBinder = <ExternalRoutes extends {
733
733
  *
734
734
  * @public
735
735
  */
736
- declare type AppOptions = {
736
+ type AppOptions = {
737
737
  /**
738
738
  * A collection of ApiFactories to register in the application to either
739
739
  * add new ones, or override factories provided by default or by plugins.
@@ -840,7 +840,7 @@ declare type AppOptions = {
840
840
  *
841
841
  * @public
842
842
  */
843
- declare type BackstageApp = {
843
+ type BackstageApp = {
844
844
  /**
845
845
  * Returns all plugins registered for the app.
846
846
  */
@@ -894,7 +894,7 @@ declare type BackstageApp = {
894
894
  *
895
895
  * @public
896
896
  */
897
- declare type AppContext = {
897
+ type AppContext = {
898
898
  /**
899
899
  * Get a list of all plugins that are installed in the app.
900
900
  */
@@ -948,7 +948,7 @@ declare const defaultConfigLoader: AppConfigLoader;
948
948
  *
949
949
  * @public
950
950
  */
951
- declare type FlatRoutesProps = {
951
+ type FlatRoutesProps = {
952
952
  children: ReactNode;
953
953
  };
954
954
  /**
@@ -969,7 +969,7 @@ declare const FlatRoutes: (props: FlatRoutesProps) => JSX.Element | null;
969
969
  *
970
970
  * @public
971
971
  */
972
- declare type FeatureFlaggedProps = {
972
+ type FeatureFlaggedProps = {
973
973
  children: ReactNode;
974
974
  } & ({
975
975
  with: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/core-app-api",
3
3
  "description": "Core app API used by Backstage apps",
4
- "version": "1.7.0-next.0",
4
+ "version": "1.7.0-next.2",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "main": "dist/index.esm.js",
@@ -33,23 +33,26 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@backstage/config": "^1.0.7",
36
- "@backstage/core-plugin-api": "^1.5.0",
36
+ "@backstage/core-plugin-api": "^1.5.1-next.1",
37
37
  "@backstage/types": "^1.0.2",
38
- "@backstage/version-bridge": "^1.0.3",
38
+ "@backstage/version-bridge": "^1.0.4-next.0",
39
39
  "@types/prop-types": "^15.7.3",
40
+ "@types/react": "^16.13.1 || ^17.0.0",
41
+ "history": "^5.0.0",
40
42
  "prop-types": "^15.7.2",
41
43
  "react-use": "^17.2.4",
42
44
  "zen-observable": "^0.10.0",
43
- "zod": "~3.18.0"
45
+ "zod": "^3.21.4"
44
46
  },
45
47
  "peerDependencies": {
46
- "@types/react": "^16.13.1 || ^17.0.0",
47
48
  "react": "^16.13.1 || ^17.0.0",
49
+ "react-dom": "^16.13.1 || ^17.0.0",
48
50
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
49
51
  },
50
52
  "devDependencies": {
51
- "@backstage/cli": "^0.22.6-next.0",
52
- "@backstage/test-utils": "^1.3.0-next.0",
53
+ "@backstage/cli": "^0.22.6-next.2",
54
+ "@backstage/test-utils": "^1.3.0-next.2",
55
+ "@testing-library/dom": "^8.0.0",
53
56
  "@testing-library/jest-dom": "^5.10.1",
54
57
  "@testing-library/react": "^12.1.3",
55
58
  "@testing-library/react-hooks": "^8.0.0",