empty setup

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-09-10 17:36:29 +02:00
parent f094dfd54a
commit c40aa8798c
10 changed files with 366 additions and 4 deletions
@@ -0,0 +1,101 @@
## API Report File for "@backstage/catalog-client"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { AddLocationRequest } from '@backstage/catalog-client';
import { AddLocationResponse } from '@backstage/catalog-client';
import { CatalogApi } from '@backstage/catalog-client';
import { CatalogRequestOptions } from '@backstage/catalog-client';
import { CompoundEntityRef } from '@backstage/catalog-model';
import { Entity } from '@backstage/catalog-model';
import { GetEntitiesByRefsRequest } from '@backstage/catalog-client';
import { GetEntitiesByRefsResponse } from '@backstage/catalog-client';
import { GetEntitiesRequest } from '@backstage/catalog-client';
import { GetEntitiesResponse } from '@backstage/catalog-client';
import { GetEntityAncestorsRequest } from '@backstage/catalog-client';
import { GetEntityAncestorsResponse } from '@backstage/catalog-client';
import { GetEntityFacetsRequest } from '@backstage/catalog-client';
import { GetEntityFacetsResponse } from '@backstage/catalog-client';
import { Location as Location_2 } from '@backstage/catalog-client';
import { QueryEntitiesRequest } from '@backstage/catalog-client';
import { QueryEntitiesResponse } from '@backstage/catalog-client';
import { ValidateEntityResponse } from '@backstage/catalog-client';
// @public (undocumented)
export class InMemoryCatalogClient implements CatalogApi {
// (undocumented)
addLocation(
_location: AddLocationRequest,
_options?: CatalogRequestOptions | undefined,
): Promise<AddLocationResponse>;
// (undocumented)
getEntities(
_request?: GetEntitiesRequest | undefined,
_options?: CatalogRequestOptions | undefined,
): Promise<GetEntitiesResponse>;
// (undocumented)
getEntitiesByRefs(
_request: GetEntitiesByRefsRequest,
_options?: CatalogRequestOptions | undefined,
): Promise<GetEntitiesByRefsResponse>;
// (undocumented)
getEntityAncestors(
_request: GetEntityAncestorsRequest,
_options?: CatalogRequestOptions | undefined,
): Promise<GetEntityAncestorsResponse>;
// (undocumented)
getEntityByRef(
_entityRef: string | CompoundEntityRef,
_options?: CatalogRequestOptions | undefined,
): Promise<Entity | undefined>;
// (undocumented)
getEntityFacets(
_request: GetEntityFacetsRequest,
_options?: CatalogRequestOptions | undefined,
): Promise<GetEntityFacetsResponse>;
// (undocumented)
getLocationByEntity(
_entityRef: string | CompoundEntityRef,
_options?: CatalogRequestOptions | undefined,
): Promise<Location_2 | undefined>;
// (undocumented)
getLocationById(
_id: string,
_options?: CatalogRequestOptions | undefined,
): Promise<Location_2 | undefined>;
// (undocumented)
getLocationByRef(
_locationRef: string,
_options?: CatalogRequestOptions | undefined,
): Promise<Location_2 | undefined>;
// (undocumented)
queryEntities(
_request?: QueryEntitiesRequest | undefined,
_options?: CatalogRequestOptions | undefined,
): Promise<QueryEntitiesResponse>;
// (undocumented)
refreshEntity(
_entityRef: string,
_options?: CatalogRequestOptions | undefined,
): Promise<void>;
// (undocumented)
removeEntityByUid(
_uid: string,
_options?: CatalogRequestOptions | undefined,
): Promise<void>;
// (undocumented)
removeLocationById(
_id: string,
_options?: CatalogRequestOptions | undefined,
): Promise<void>;
// (undocumented)
validateEntity(
_entity: Entity,
_locationRef: string,
_options?: CatalogRequestOptions | undefined,
): Promise<ValidateEntityResponse>;
}
// (No @packageDocumentation comment for this package)
```
+16 -4
View File
@@ -6,10 +6,7 @@
"role": "common-library"
},
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts"
"access": "public"
},
"keywords": [
"backstage"
@@ -22,8 +19,23 @@
},
"license": "Apache-2.0",
"sideEffects": false,
"exports": {
".": "./src/index.ts",
"./testUtils": "./src/testUtils.ts",
"./package.json": "./package.json"
},
"main": "src/index.ts",
"types": "src/index.ts",
"typesVersions": {
"*": {
"testUtils": [
"src/testUtils.ts"
],
"package.json": [
"package.json"
]
}
},
"files": [
"dist"
],
+17
View File
@@ -0,0 +1,17 @@
/*
* Copyright 2024 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 { InMemoryCatalogClient } from './testUtils/InMemoryCatalogClient';
@@ -0,0 +1,138 @@
/*
* Copyright 2024 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 {
AddLocationRequest,
AddLocationResponse,
CatalogApi,
CatalogRequestOptions,
GetEntitiesByRefsRequest,
GetEntitiesByRefsResponse,
GetEntitiesRequest,
GetEntitiesResponse,
GetEntityAncestorsRequest,
GetEntityAncestorsResponse,
GetEntityFacetsRequest,
GetEntityFacetsResponse,
Location,
QueryEntitiesRequest,
QueryEntitiesResponse,
ValidateEntityResponse,
} from '@backstage/catalog-client';
import { CompoundEntityRef, Entity } from '@backstage/catalog-model';
import { NotImplementedError } from '@backstage/errors';
/** @public */
export class InMemoryCatalogClient implements CatalogApi {
getEntities(
_request?: GetEntitiesRequest | undefined,
_options?: CatalogRequestOptions | undefined,
): Promise<GetEntitiesResponse> {
throw new NotImplementedError('Method not implemented.');
}
getEntitiesByRefs(
_request: GetEntitiesByRefsRequest,
_options?: CatalogRequestOptions | undefined,
): Promise<GetEntitiesByRefsResponse> {
throw new NotImplementedError('Method not implemented.');
}
queryEntities(
_request?: QueryEntitiesRequest | undefined,
_options?: CatalogRequestOptions | undefined,
): Promise<QueryEntitiesResponse> {
throw new NotImplementedError('Method not implemented.');
}
getEntityAncestors(
_request: GetEntityAncestorsRequest,
_options?: CatalogRequestOptions | undefined,
): Promise<GetEntityAncestorsResponse> {
throw new NotImplementedError('Method not implemented.');
}
getEntityByRef(
_entityRef: string | CompoundEntityRef,
_options?: CatalogRequestOptions | undefined,
): Promise<Entity | undefined> {
throw new NotImplementedError('Method not implemented.');
}
removeEntityByUid(
_uid: string,
_options?: CatalogRequestOptions | undefined,
): Promise<void> {
throw new NotImplementedError('Method not implemented.');
}
refreshEntity(
_entityRef: string,
_options?: CatalogRequestOptions | undefined,
): Promise<void> {
throw new NotImplementedError('Method not implemented.');
}
getEntityFacets(
_request: GetEntityFacetsRequest,
_options?: CatalogRequestOptions | undefined,
): Promise<GetEntityFacetsResponse> {
throw new NotImplementedError('Method not implemented.');
}
getLocationById(
_id: string,
_options?: CatalogRequestOptions | undefined,
): Promise<Location | undefined> {
throw new NotImplementedError('Method not implemented.');
}
getLocationByRef(
_locationRef: string,
_options?: CatalogRequestOptions | undefined,
): Promise<Location | undefined> {
throw new NotImplementedError('Method not implemented.');
}
addLocation(
_location: AddLocationRequest,
_options?: CatalogRequestOptions | undefined,
): Promise<AddLocationResponse> {
throw new NotImplementedError('Method not implemented.');
}
removeLocationById(
_id: string,
_options?: CatalogRequestOptions | undefined,
): Promise<void> {
throw new NotImplementedError('Method not implemented.');
}
getLocationByEntity(
_entityRef: string | CompoundEntityRef,
_options?: CatalogRequestOptions | undefined,
): Promise<Location | undefined> {
throw new NotImplementedError('Method not implemented.');
}
validateEntity(
_entity: Entity,
_locationRef: string,
_options?: CatalogRequestOptions | undefined,
): Promise<ValidateEntityResponse> {
throw new NotImplementedError('Method not implemented.');
}
}
@@ -0,0 +1,17 @@
/*
* Copyright 2024 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 { InMemoryCatalogClient } from './InMemoryCatalogClient';
@@ -0,0 +1,7 @@
## 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
// (No @packageDocumentation comment for this package)
```
+4
View File
@@ -26,6 +26,7 @@
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts",
"./testUtils": "./src/testUtils.ts",
"./package.json": "./package.json"
},
"main": "src/index.ts",
@@ -35,6 +36,9 @@
"alpha": [
"src/alpha.ts"
],
"testUtils": [
"src/testUtils.ts"
],
"package.json": [
"package.json"
]
+17
View File
@@ -0,0 +1,17 @@
/*
* Copyright 2024 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 * from './testUtils';
@@ -0,0 +1,32 @@
/*
* Copyright 2024 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 { createServiceFactory } from '@backstage/backend-plugin-api';
import { catalogServiceRef } from '@backstage/plugin-catalog-node/alpha';
import { InMemoryCatalogClient } from '@backstage/catalog-client/testUtils';
/** @public */
export function catalogServiceMock() {}
/** @public */
export namespace catalogServiceMock {
export const factory = () =>
createServiceFactory({
service: catalogServiceRef,
deps: {},
factory: () => new InMemoryCatalogClient(),
});
}
@@ -0,0 +1,17 @@
/*
* Copyright 2024 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 { type catalogServiceMock } from './catalogServiceMock';