components,app-api,plugin-api: prefix package names with core-
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
# @backstage/app-api
|
||||
# @backstage/core-app-api
|
||||
|
||||
This package provides the core API used by Backstage plugins and apps.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install --save @backstage/app-api
|
||||
$ npm install --save @backstage/core-app-api
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add @backstage/app-api
|
||||
$ yarn add @backstage/core-app-api
|
||||
```
|
||||
|
||||
## Documentation
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@backstage/app-api",
|
||||
"name": "@backstage/core-app-api",
|
||||
"description": "Core app API used by Backstage plugins and apps",
|
||||
"version": "0.1.0",
|
||||
"private": false,
|
||||
@@ -12,7 +12,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/backstage/backstage",
|
||||
"directory": "packages/app-api"
|
||||
"directory": "packages/core-app-api"
|
||||
},
|
||||
"keywords": [
|
||||
"backstage"
|
||||
@@ -29,9 +29,9 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/components": "^0.1.0",
|
||||
"@backstage/core-components": "^0.1.0",
|
||||
"@backstage/config": "^0.1.3",
|
||||
"@backstage/plugin-api": "^0.1.0",
|
||||
"@backstage/core-plugin-api": "^0.1.0",
|
||||
"@backstage/theme": "^0.2.3",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { AlertApi, AlertMessage } from '@backstage/plugin-api';
|
||||
import { AlertApi, AlertMessage } from '@backstage/core-plugin-api';
|
||||
import { PublishSubject } from '../../../lib/subjects';
|
||||
import { Observable } from '../../../types';
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AppTheme } from '@backstage/plugin-api';
|
||||
import { AppTheme } from '@backstage/core-plugin-api';
|
||||
import { AppThemeSelector } from './AppThemeSelector';
|
||||
|
||||
describe('AppThemeSelector', () => {
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AppThemeApi, AppTheme } from '@backstage/plugin-api';
|
||||
import { AppThemeApi, AppTheme } from '@backstage/core-plugin-api';
|
||||
import { BehaviorSubject } from '../../../lib/subjects';
|
||||
import { Observable } from '../../../types';
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DiscoveryApi } from '@backstage/plugin-api';
|
||||
import { DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
|
||||
/**
|
||||
* UrlPatternDiscovery is a lightweight DiscoveryApi implementation.
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ErrorApi, ErrorContext, AlertApi } from '@backstage/plugin-api';
|
||||
import { ErrorApi, ErrorContext, AlertApi } from '@backstage/core-plugin-api';
|
||||
|
||||
/**
|
||||
* Decorates an ErrorApi by also forwarding error messages
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ErrorApi, ErrorContext } from '@backstage/plugin-api';
|
||||
import { ErrorApi, ErrorContext } from '@backstage/core-plugin-api';
|
||||
import { PublishSubject } from '../../../lib/subjects';
|
||||
import { Observable } from '../../../types';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { LocalStorageFeatureFlags } from './LocalStorageFeatureFlags';
|
||||
import { FeatureFlagState, FeatureFlagsApi } from '@backstage/plugin-api';
|
||||
import { FeatureFlagState, FeatureFlagsApi } from '@backstage/core-plugin-api';
|
||||
|
||||
describe('FeatureFlags', () => {
|
||||
beforeEach(() => {
|
||||
+1
-1
@@ -19,7 +19,7 @@ import {
|
||||
FeatureFlagsApi,
|
||||
FeatureFlag,
|
||||
FeatureFlagsSaveOptions,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
export function validateFlagName(name: string): void {
|
||||
if (name.length < 3) {
|
||||
+4
-1
@@ -14,7 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { OAuthRequestApi, AuthRequesterOptions } from '@backstage/plugin-api';
|
||||
import {
|
||||
OAuthRequestApi,
|
||||
AuthRequesterOptions,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { OAuthRequestManager } from './OAuthRequestManager';
|
||||
|
||||
export default class MockOAuthApi implements OAuthRequestApi {
|
||||
+1
-1
@@ -19,7 +19,7 @@ import {
|
||||
PendingAuthRequest,
|
||||
AuthRequester,
|
||||
AuthRequesterOptions,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { OAuthPendingRequests, PendingRequest } from './OAuthPendingRequests';
|
||||
import { BehaviorSubject } from '../../../lib/subjects';
|
||||
import { Observable } from '../../../types';
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { CreateStorageApiOptions, WebStorage } from './WebStorage';
|
||||
import { StorageApi } from '@backstage/plugin-api';
|
||||
import { StorageApi } from '@backstage/core-plugin-api';
|
||||
|
||||
describe('WebStorage Storage API', () => {
|
||||
const mockErrorApi = { post: jest.fn(), error$: jest.fn() };
|
||||
+1
-1
@@ -17,7 +17,7 @@ import {
|
||||
StorageApi,
|
||||
StorageValueChange,
|
||||
ErrorApi,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { Observable } from '../../../types';
|
||||
import ObservableImpl from 'zen-observable';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import Auth0Icon from '@material-ui/icons/AcUnit';
|
||||
import { auth0AuthApiRef } from '@backstage/plugin-api';
|
||||
import { auth0AuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { OAuth2 } from '../oauth2';
|
||||
import { OAuthApiCreateOptions } from '../types';
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import {
|
||||
ProfileInfo,
|
||||
BackstageIdentity,
|
||||
AuthRequestOptions,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { SessionManager } from '../../../../lib/AuthSessionManager/types';
|
||||
import {
|
||||
AuthSessionStore,
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ProfileInfo, BackstageIdentity } from '@backstage/plugin-api';
|
||||
import { ProfileInfo, BackstageIdentity } from '@backstage/core-plugin-api';
|
||||
|
||||
export type GithubSession = {
|
||||
providerInfo: {
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import GitlabIcon from '@material-ui/icons/AcUnit';
|
||||
import { gitlabAuthApiRef } from '@backstage/plugin-api';
|
||||
import { gitlabAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { OAuth2 } from '../oauth2';
|
||||
import { OAuthApiCreateOptions } from '../types';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import GoogleIcon from '@material-ui/icons/AcUnit';
|
||||
import { googleAuthApiRef } from '@backstage/plugin-api';
|
||||
import { googleAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { OAuth2 } from '../oauth2';
|
||||
import { OAuthApiCreateOptions } from '../types';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import MicrosoftIcon from '@material-ui/icons/AcUnit';
|
||||
import { microsoftAuthApiRef } from '@backstage/plugin-api';
|
||||
import { microsoftAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { OAuth2 } from '../oauth2';
|
||||
import { OAuthApiCreateOptions } from '../types';
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import {
|
||||
SessionState,
|
||||
SessionApi,
|
||||
BackstageIdentityApi,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { OAuth2Session } from './types';
|
||||
import { OAuthApiCreateOptions } from '../types';
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ProfileInfo, BackstageIdentity } from '@backstage/plugin-api';
|
||||
import { ProfileInfo, BackstageIdentity } from '@backstage/core-plugin-api';
|
||||
|
||||
export type OAuth2Session = {
|
||||
providerInfo: {
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import OktaIcon from '@material-ui/icons/AcUnit';
|
||||
import { oktaAuthApiRef } from '@backstage/plugin-api';
|
||||
import { oktaAuthApiRef } from '@backstage/core-plugin-api';
|
||||
import { OAuth2 } from '../oauth2';
|
||||
import { OAuthApiCreateOptions } from '../types';
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
OAuthRequestApi,
|
||||
AuthProvider,
|
||||
DiscoveryApi,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { OAuth2 } from '../oauth2';
|
||||
|
||||
type CreateOptions = {
|
||||
+1
-1
@@ -26,7 +26,7 @@ import {
|
||||
ProfileInfoApi,
|
||||
BackstageIdentityApi,
|
||||
SessionApi,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { SamlSession } from './types';
|
||||
import {
|
||||
AuthSessionStore,
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ProfileInfo, BackstageIdentity } from '@backstage/plugin-api';
|
||||
import { ProfileInfo, BackstageIdentity } from '@backstage/core-plugin-api';
|
||||
|
||||
export type SamlSession = {
|
||||
userId: string;
|
||||
+1
-1
@@ -18,7 +18,7 @@ import {
|
||||
AuthProvider,
|
||||
DiscoveryApi,
|
||||
OAuthRequestApi,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
export type OAuthApiCreateOptions = AuthApiCreateOptions & {
|
||||
oauthRequestApi: OAuthRequestApi;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiRef } from '@backstage/plugin-api';
|
||||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
import { ApiAggregator } from './ApiAggregator';
|
||||
import { ApiRegistry } from './ApiRegistry';
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiRef, ApiHolder } from '@backstage/plugin-api';
|
||||
import { ApiRef, ApiHolder } from '@backstage/core-plugin-api';
|
||||
|
||||
/**
|
||||
* An ApiHolder that queries multiple other holders from for
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiRef } from '@backstage/plugin-api';
|
||||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
import { ApiFactoryRegistry } from './ApiFactoryRegistry';
|
||||
|
||||
const aRef = createApiRef<number>({ id: 'a' });
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
ApiFactory,
|
||||
AnyApiRef,
|
||||
AnyApiFactory,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
type ApiFactoryScope =
|
||||
| 'default' // Default factories registered by core and plugins
|
||||
+1
-1
@@ -21,7 +21,7 @@ import {
|
||||
withApis,
|
||||
ApiHolder,
|
||||
ApiRef,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { ApiProvider } from './ApiProvider';
|
||||
import { ApiRegistry } from './ApiRegistry';
|
||||
import { render } from '@testing-library/react';
|
||||
+1
-1
@@ -21,7 +21,7 @@ import React, {
|
||||
PropsWithChildren,
|
||||
} from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ApiHolder } from '@backstage/plugin-api';
|
||||
import { ApiHolder } from '@backstage/core-plugin-api';
|
||||
import { ApiAggregator } from './ApiAggregator';
|
||||
import { getOrCreateGlobalSingleton } from '../../lib/globalObject';
|
||||
import {
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiRef } from '@backstage/plugin-api';
|
||||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
import { ApiRegistry } from './ApiRegistry';
|
||||
|
||||
describe('ApiRegistry', () => {
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiRef, ApiHolder } from '@backstage/plugin-api';
|
||||
import { ApiRef, ApiHolder } from '@backstage/core-plugin-api';
|
||||
|
||||
type ApiImpl<T = unknown> = readonly [ApiRef<T>, T];
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiRef } from '@backstage/plugin-api';
|
||||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
import { ApiResolver } from './ApiResolver';
|
||||
import { ApiFactoryRegistry } from './ApiFactoryRegistry';
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import {
|
||||
ApiHolder,
|
||||
AnyApiRef,
|
||||
TypesToApiRefs,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { ApiFactoryHolder } from './types';
|
||||
|
||||
export class ApiResolver implements ApiHolder {
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiFactory, ApiRef } from '@backstage/plugin-api';
|
||||
import { ApiFactory, ApiRef } from '@backstage/core-plugin-api';
|
||||
|
||||
export type ApiFactoryHolder = {
|
||||
get<T>(
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
createExternalRouteRef,
|
||||
createRouteRef,
|
||||
createSubRouteRef,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { generateBoundRoutes, PrivateAppImpl } from './App';
|
||||
|
||||
describe('generateBoundRoutes', () => {
|
||||
@@ -48,7 +48,7 @@ import {
|
||||
RouteRef,
|
||||
SubRouteRef,
|
||||
ExternalRouteRef,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { ApiFactoryRegistry, ApiResolver } from '../apis/system';
|
||||
import {
|
||||
childDiscoverer,
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { IdentityApi, ProfileInfo } from '@backstage/plugin-api';
|
||||
import { IdentityApi, ProfileInfo } from '@backstage/core-plugin-api';
|
||||
import { SignInResult } from './types';
|
||||
|
||||
/**
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
import React, { useMemo, useEffect, useState, PropsWithChildren } from 'react';
|
||||
import { ThemeProvider, CssBaseline } from '@material-ui/core';
|
||||
import { useApi, appThemeApiRef, AppTheme } from '@backstage/plugin-api';
|
||||
import { useApi, appThemeApiRef, AppTheme } from '@backstage/core-plugin-api';
|
||||
import { useObservable } from 'react-use';
|
||||
|
||||
// This tries to find the most accurate match, but also falls back to less
|
||||
+1
-1
@@ -24,7 +24,7 @@ import {
|
||||
} from 'react-router-dom';
|
||||
import LightIcon from '@material-ui/icons/WbSunny';
|
||||
import DarkIcon from '@material-ui/icons/Brightness2';
|
||||
import { ErrorPage, Progress } from '@backstage/components';
|
||||
import { ErrorPage, Progress } from '@backstage/core-components';
|
||||
import { defaultApis } from './defaultApis';
|
||||
import { lightTheme, darkTheme } from '@backstage/theme';
|
||||
import { AppConfig, JsonObject } from '@backstage/config';
|
||||
+1
-1
@@ -50,7 +50,7 @@ import {
|
||||
samlAuthApiRef,
|
||||
oneloginAuthApiRef,
|
||||
oidcAuthApiRef,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
import OAuth2Icon from '@material-ui/icons/AcUnit';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { IconComponent } from '@backstage/plugin-api';
|
||||
import { IconComponent } from '@backstage/core-plugin-api';
|
||||
import MuiMenuBookIcon from '@material-ui/icons/MenuBook';
|
||||
import MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';
|
||||
import MuiChatIcon from '@material-ui/icons/Chat';
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
RouteRef,
|
||||
SubRouteRef,
|
||||
ExternalRouteRef,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { AppConfig } from '@backstage/config';
|
||||
import { AppIcons } from './icons';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { createPlugin, createRouteRef } from '@backstage/plugin-api';
|
||||
import { createPlugin, createRouteRef } from '@backstage/core-plugin-api';
|
||||
import { getComponentData } from './componentData';
|
||||
import {
|
||||
createComponentExtension,
|
||||
+1
-1
@@ -22,7 +22,7 @@ import {
|
||||
RouteRef,
|
||||
useRouteRef,
|
||||
useApp,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
type ComponentLoader<T> =
|
||||
| {
|
||||
+1
-1
@@ -19,7 +19,7 @@ import {
|
||||
OAuthRequestApi,
|
||||
AuthProvider,
|
||||
DiscoveryApi,
|
||||
} from '@backstage/plugin-api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { showLoginPopup } from '../loginPopup';
|
||||
import { AuthConnector, CreateSessionOptions } from './types';
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { AuthProvider, DiscoveryApi } from '@backstage/plugin-api';
|
||||
import { AuthProvider, DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
import { showLoginPopup } from '../loginPopup';
|
||||
|
||||
type Options = {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user