core-app-api: rollback alpha exports

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2023-10-10 19:38:35 +02:00
parent 18c8dee6f5
commit 73e704f3ed
6 changed files with 5 additions and 146 deletions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': patch
---
Exported `I18nextTranslationApi` utility
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': patch
---
Exported `AppLanguageSelector` utility
-94
View File
@@ -1,94 +0,0 @@
## API Report File for "@backstage/core-app-api"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { AppLanguageApi } from '@backstage/core-plugin-api/alpha';
import { AppTheme } from '@backstage/core-plugin-api';
import { AppThemeApi } from '@backstage/core-plugin-api';
import { Observable } from '@backstage/types';
import { TranslationApi } from '@backstage/core-plugin-api/alpha';
import { TranslationMessages } from '@backstage/core-plugin-api/alpha';
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
import { TranslationResource } from '@backstage/core-plugin-api/alpha';
import { TranslationSnapshot } from '@backstage/core-plugin-api/alpha';
// @alpha
export class AppLanguageSelector implements AppLanguageApi {
// (undocumented)
static create(options?: AppLanguageSelectorOptions): AppLanguageSelector;
// (undocumented)
static createWithStorage(
options?: AppLanguageSelectorOptions,
): AppLanguageSelector;
// (undocumented)
getAvailableLanguages(): {
languages: string[];
};
// (undocumented)
getLanguage(): {
language: string;
};
// (undocumented)
language$(): Observable<{
language: string;
}>;
// (undocumented)
setLanguage(language?: string | undefined): void;
}
// @alpha (undocumented)
export interface AppLanguageSelectorOptions {
// (undocumented)
availableLanguages?: string[];
// (undocumented)
defaultLanguage?: string;
}
// @public
export class AppThemeSelector implements AppThemeApi {
constructor(themes: AppTheme[]);
// (undocumented)
activeThemeId$(): Observable<string | undefined>;
// (undocumented)
static createWithStorage(themes: AppTheme[]): AppThemeSelector;
// (undocumented)
getActiveThemeId(): string | undefined;
// (undocumented)
getInstalledThemes(): AppTheme[];
// (undocumented)
setActiveThemeId(themeId?: string): void;
}
// @alpha (undocumented)
export class I18nextTranslationApi implements TranslationApi {
// (undocumented)
static create(options: I18nextTranslationApiOptions): I18nextTranslationApi;
// (undocumented)
getTranslation<
TMessages extends {
[key in string]: string;
},
>(
translationRef: TranslationRef<string, TMessages>,
): TranslationSnapshot<TMessages>;
// (undocumented)
translation$<
TMessages extends {
[key in string]: string;
},
>(
translationRef: TranslationRef<string, TMessages>,
): Observable<TranslationSnapshot<TMessages>>;
}
// @alpha (undocumented)
export interface I18nextTranslationApiOptions {
// (undocumented)
languageApi: AppLanguageApi;
// (undocumented)
resources?: Array<TranslationMessages | TranslationResource>;
}
// (No @packageDocumentation comment for this package)
```
-4
View File
@@ -7,14 +7,10 @@
},
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"alpha": [
"src/alpha.ts"
],
"package.json": [
"package.json"
]
-32
View File
@@ -1,32 +0,0 @@
/*
* Copyright 2023 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AppThemeSelector } from './apis';
import {
AppLanguageSelector,
AppLanguageSelectorOptions,
} from './apis/implementations/AppLanguageApi';
import {
I18nextTranslationApi,
I18nextTranslationApiOptions,
} from './apis/implementations/TranslationApi';
export {
type AppLanguageSelectorOptions,
type I18nextTranslationApiOptions,
AppLanguageSelector,
AppThemeSelector,
I18nextTranslationApi,
};
@@ -57,13 +57,8 @@ import {
ApiFactoryRegistry,
ApiProvider,
ApiResolver,
} from '@backstage/core-app-api';
import {
AppLanguageSelector,
AppThemeSelector,
I18nextTranslationApi,
} from '@backstage/core-app-api/alpha';
} from '@backstage/core-app-api';
// TODO: Get rid of all of these
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
@@ -81,6 +76,10 @@ import { overrideBaseUrlConfigs } from '../../../core-app-api/src/app/overrideBa
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
import { RoutingProvider } from '../../../core-app-api/src/routing/RoutingProvider';
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
import { AppLanguageSelector } from '../../../core-app-api/src/apis/implementations/AppLanguageApi/AppLanguageSelector';
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
import { I18nextTranslationApi } from '../../../core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi';
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
import {
apis as defaultApis,
components as defaultComponents,