catalog-node: migrate to use exports

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-16 09:57:40 +01:00
parent e1c35fbaab
commit dac6ddfae8
5 changed files with 75 additions and 31 deletions
+39
View File
@@ -0,0 +1,39 @@
## API Report File for "@backstage/plugin-catalog-node"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
/// <reference types="node" />
import { CatalogApi } from '@backstage/catalog-client';
import { CompoundEntityRef } from '@backstage/catalog-model';
import { Entity } from '@backstage/catalog-model';
import { ExtensionPoint } from '@backstage/backend-plugin-api';
import { JsonValue } from '@backstage/types';
import { LocationSpec } from '@backstage/plugin-catalog-common';
import { ServiceRef } from '@backstage/backend-plugin-api';
// @alpha (undocumented)
export interface CatalogProcessingExtensionPoint {
// Warning: (ae-forgotten-export) The symbol "EntityProvider" needs to be exported by the entry point alpha.d.ts
//
// (undocumented)
addEntityProvider(
...providers: Array<EntityProvider | Array<EntityProvider>>
): void;
// Warning: (ae-forgotten-export) The symbol "CatalogProcessor" needs to be exported by the entry point alpha.d.ts
//
// (undocumented)
addProcessor(
...processors: Array<CatalogProcessor | Array<CatalogProcessor>>
): void;
}
// @alpha (undocumented)
export const catalogProcessingExtensionPoint: ExtensionPoint<CatalogProcessingExtensionPoint>;
// @alpha
export const catalogServiceRef: ServiceRef<CatalogApi, 'plugin'>;
// (No @packageDocumentation comment for this package)
```
-21
View File
@@ -5,28 +5,10 @@
```ts
/// <reference types="node" />
import { CatalogApi } from '@backstage/catalog-client';
import { CompoundEntityRef } from '@backstage/catalog-model';
import { Entity } from '@backstage/catalog-model';
import { ExtensionPoint } from '@backstage/backend-plugin-api';
import { JsonValue } from '@backstage/types';
import { LocationSpec as LocationSpec_2 } from '@backstage/plugin-catalog-common';
import { ServiceRef } from '@backstage/backend-plugin-api';
// @alpha (undocumented)
export interface CatalogProcessingExtensionPoint {
// (undocumented)
addEntityProvider(
...providers: Array<EntityProvider | Array<EntityProvider>>
): void;
// (undocumented)
addProcessor(
...processors: Array<CatalogProcessor | Array<CatalogProcessor>>
): void;
}
// @alpha (undocumented)
export const catalogProcessingExtensionPoint: ExtensionPoint<CatalogProcessingExtensionPoint>;
// @public (undocumented)
export type CatalogProcessor = {
@@ -109,9 +91,6 @@ export type CatalogProcessorResult =
| CatalogProcessorErrorResult
| CatalogProcessorRefreshKeysResult;
// @alpha
export const catalogServiceRef: ServiceRef<CatalogApi, 'plugin'>;
// @public
export type DeferredEntity = {
entity: Entity;
+17 -7
View File
@@ -6,17 +6,28 @@
"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": "node-library"
},
"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",
"clean": "backstage-cli package clean",
@@ -37,7 +48,6 @@
"@backstage/cli": "workspace:^"
},
"files": [
"dist",
"alpha"
"dist"
]
}
+19
View File
@@ -0,0 +1,19 @@
/*
* 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 { catalogServiceRef } from './catalogService';
export type { CatalogProcessingExtensionPoint } from './extensions';
export { catalogProcessingExtensionPoint } from './extensions';
-3
View File
@@ -20,8 +20,5 @@
* @packageDocumentation
*/
export type { CatalogProcessingExtensionPoint } from './extensions';
export { catalogProcessingExtensionPoint } from './extensions';
export { catalogServiceRef } from './catalogService';
export * from './api';
export * from './processing';