app-backend: migrate to use exports

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-16 10:41:48 +01:00
parent c64fcc8443
commit dcc79493bf
5 changed files with 55 additions and 20 deletions
+21
View File
@@ -0,0 +1,21 @@
## API Report File for "@backstage/plugin-app-backend"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import express from 'express';
// @alpha
export const appPlugin: (options: AppPluginOptions) => BackendFeature;
// @alpha (undocumented)
export type AppPluginOptions = {
appPackageName?: string;
staticFallbackHandler?: express.Handler;
disableConfigInjection?: boolean;
disableStaticFallbackCache?: boolean;
};
// (No @packageDocumentation comment for this package)
```
-12
View File
@@ -3,23 +3,11 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import express from 'express';
import { Logger } from 'winston';
import { PluginDatabaseManager } from '@backstage/backend-common';
// @alpha
export const appPlugin: (options: AppPluginOptions) => BackendFeature;
// @alpha (undocumented)
export type AppPluginOptions = {
appPackageName?: string;
staticFallbackHandler?: express.Handler;
disableConfigInjection?: boolean;
disableStaticFallbackCache?: boolean;
};
// @public (undocumented)
export function createRouter(options: RouterOptions): Promise<express.Router>;
+16 -6
View File
@@ -6,10 +6,21 @@
"types": "src/index.ts",
"license": "Apache-2.0",
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"alphaTypes": "dist/index.alpha.d.ts"
"access": "public"
},
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts"
},
"typesVersions": {
"*": {
"*": [
"src/index.ts"
],
"alpha": [
"src/alpha.ts"
]
}
},
"backstage": {
"role": "backend-plugin"
@@ -25,7 +36,7 @@
],
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build --experimental-type-build",
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"prepack": "backstage-cli package prepack",
@@ -63,7 +74,6 @@
},
"files": [
"dist",
"alpha",
"migrations/**/*.{js,d.ts}",
"static"
]
+18
View File
@@ -0,0 +1,18 @@
/*
* 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.
*/
export { appPlugin } from './service/appPlugin';
export type { AppPluginOptions } from './service/appPlugin';
-2
View File
@@ -21,5 +21,3 @@
*/
export * from './service/router';
export { appPlugin } from './service/appPlugin';
export type { AppPluginOptions } from './service/appPlugin';