@backstage/plugin-catalog-unprocessed-entities 0.2.24-next.0 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/api/index.esm.js +2 -27
- package/dist/api/index.esm.js.map +1 -1
- package/dist/index.d.ts +25 -55
- package/dist/package.json.esm.js +5 -5
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-unprocessed-entities
|
|
2
2
|
|
|
3
|
+
## 0.2.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d02db50: Remove unnecessary use of `compatWrapper` and `convertLegacyRouteRef`(s) for the new frontend system.
|
|
8
|
+
- df4d646: Moved types, API and client to the common package, allowing both frontend and
|
|
9
|
+
backend plugins to use the `CatalogUnprocessedEntitiesClient`.
|
|
10
|
+
|
|
11
|
+
The following types, clients and interfaces have been deprecated and should be
|
|
12
|
+
imported from the `@backstage/plugin-catalog-unprocessed-entities-common` instead:
|
|
13
|
+
`CatalogUnprocessedEntitiesApi`, `CatalogUnprocessedEntitiesApiResponse`, `UnprocessedEntity`,
|
|
14
|
+
`UnprocessedEntityCache`, `UnprocessedEntityError`, `CatalogUnprocessedEntitiesClient`.
|
|
15
|
+
|
|
16
|
+
All those types, clients and interfaces are re-exported temporarily in the
|
|
17
|
+
`@backstage/plugin-catalog-unprocessed-entities` package until cleaned up.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/frontend-plugin-api@0.13.2
|
|
21
|
+
- @backstage/core-components@0.18.4
|
|
22
|
+
- @backstage/core-plugin-api@1.12.1
|
|
23
|
+
- @backstage/plugin-catalog-unprocessed-entities-common@0.0.12
|
|
24
|
+
|
|
25
|
+
## 0.2.24-next.1
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- df4d646: Moved types, API and client to the common package, allowing both frontend and
|
|
30
|
+
backend plugins to use the `CatalogUnprocessedEntitiesClient`.
|
|
31
|
+
|
|
32
|
+
The following types, clients and interfaces have been deprecated and should be
|
|
33
|
+
imported from the `@backstage/plugin-catalog-unprocessed-entities-common` instead:
|
|
34
|
+
`CatalogUnprocessedEntitiesApi`, `CatalogUnprocessedEntitiesApiResponse`, `UnprocessedEntity`,
|
|
35
|
+
`UnprocessedEntityCache`, `UnprocessedEntityError`, `CatalogUnprocessedEntitiesClient`.
|
|
36
|
+
|
|
37
|
+
All those types, clients and interfaces are re-exported temporarily in the
|
|
38
|
+
`@backstage/plugin-catalog-unprocessed-entities` package until cleaned up.
|
|
39
|
+
|
|
40
|
+
- Updated dependencies
|
|
41
|
+
- @backstage/core-components@0.18.4-next.1
|
|
42
|
+
- @backstage/plugin-catalog-unprocessed-entities-common@0.0.12-next.0
|
|
43
|
+
|
|
3
44
|
## 0.2.24-next.0
|
|
4
45
|
|
|
5
46
|
### Patch Changes
|
package/dist/api/index.esm.js
CHANGED
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
import { createApiRef } from '@backstage/core-plugin-api';
|
|
2
|
-
import {
|
|
2
|
+
import { CatalogUnprocessedEntitiesClient as CatalogUnprocessedEntitiesClient$1 } from '@backstage/plugin-catalog-unprocessed-entities-common';
|
|
3
3
|
|
|
4
4
|
const catalogUnprocessedEntitiesApiRef = createApiRef({
|
|
5
5
|
id: "plugin.catalog-unprocessed-entities.service"
|
|
6
6
|
});
|
|
7
|
-
class CatalogUnprocessedEntitiesClient {
|
|
8
|
-
discovery;
|
|
9
|
-
fetchApi;
|
|
10
|
-
constructor(discovery, fetchApi) {
|
|
11
|
-
this.discovery = discovery;
|
|
12
|
-
this.fetchApi = fetchApi;
|
|
13
|
-
}
|
|
14
|
-
async fetch(path, init) {
|
|
15
|
-
const url = await this.discovery.getBaseUrl("catalog");
|
|
16
|
-
const resp = await this.fetchApi.fetch(`${url}/${path}`, init);
|
|
17
|
-
if (!resp.ok) {
|
|
18
|
-
throw await ResponseError.fromResponse(resp);
|
|
19
|
-
}
|
|
20
|
-
return resp.status === 204 ? resp : await resp.json();
|
|
21
|
-
}
|
|
22
|
-
async pending() {
|
|
23
|
-
return await this.fetch("entities/unprocessed/pending");
|
|
24
|
-
}
|
|
25
|
-
async failed() {
|
|
26
|
-
return await this.fetch("entities/unprocessed/failed");
|
|
27
|
-
}
|
|
28
|
-
async delete(entityId) {
|
|
29
|
-
await this.fetch(`entities/unprocessed/delete/${entityId}`, {
|
|
30
|
-
method: "DELETE"
|
|
31
|
-
});
|
|
32
|
-
}
|
|
7
|
+
class CatalogUnprocessedEntitiesClient extends CatalogUnprocessedEntitiesClient$1 {
|
|
33
8
|
}
|
|
34
9
|
|
|
35
10
|
export { CatalogUnprocessedEntitiesClient, catalogUnprocessedEntitiesApiRef };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/api/index.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/api/index.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n CatalogUnprocessedEntitiesApiResponse as CommonCatalogUnprocessedEntitiesApiResponse,\n CatalogUnprocessedEntitiesApi as CommonCatalogUnprocessedEntitiesApi,\n CatalogUnprocessedEntitiesClient as CommonCatalogUnprocessedEntitiesClient,\n} from '@backstage/plugin-catalog-unprocessed-entities-common';\n\n/**\n * {@link @backstage/core-plugin-api#ApiRef} for the {@link CatalogUnprocessedEntitiesApi}\n *\n * @public\n */\nexport const catalogUnprocessedEntitiesApiRef =\n createApiRef<CatalogUnprocessedEntitiesApi>({\n id: 'plugin.catalog-unprocessed-entities.service',\n });\n\n/**\n * Response expected by the {@link CatalogUnprocessedEntitiesApi}\n *\n * @public\n * @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport type CatalogUnprocessedEntitiesApiResponse =\n CommonCatalogUnprocessedEntitiesApiResponse;\n\n/**\n * Interface for the CatalogUnprocessedEntitiesApi.\n *\n * @public\n * @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport interface CatalogUnprocessedEntitiesApi\n extends CommonCatalogUnprocessedEntitiesApi {}\n\n/**\n * Default API implementation for the Catalog Unprocessed Entities plugin\n *\n * @public\n * @deprecated Use the client imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.\n */\nexport class CatalogUnprocessedEntitiesClient extends CommonCatalogUnprocessedEntitiesClient {}\n"],"names":["CommonCatalogUnprocessedEntitiesClient"],"mappings":";;;AA2BO,MAAM,mCACX,YAAA,CAA4C;AAAA,EAC1C,EAAA,EAAI;AACN,CAAC;AA0BI,MAAM,yCAAyCA,kCAAA,CAAuC;AAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
-
import
|
|
3
|
+
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
4
|
+
import { CatalogUnprocessedEntitiesApiResponse as CatalogUnprocessedEntitiesApiResponse$1, CatalogUnprocessedEntitiesApi as CatalogUnprocessedEntitiesApi$1, UnprocessedEntity as UnprocessedEntity$1, UnprocessedEntityCache as UnprocessedEntityCache$1, UnprocessedEntityError as UnprocessedEntityError$1 } from '@backstage/plugin-catalog-unprocessed-entities-common';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Plugin entry point
|
|
@@ -21,76 +22,45 @@ declare const CatalogUnprocessedEntitiesPage: () => react_jsx_runtime.JSX.Elemen
|
|
|
21
22
|
declare const UnprocessedEntitiesContent: () => react_jsx_runtime.JSX.Element;
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* {@link @backstage/core-plugin-api#ApiRef} for the {@link CatalogUnprocessedEntitiesApi}
|
|
26
|
+
*
|
|
25
27
|
* @public
|
|
26
28
|
*/
|
|
27
|
-
|
|
28
|
-
entity_id: string;
|
|
29
|
-
entity_ref: string;
|
|
30
|
-
unprocessed_entity: Entity;
|
|
31
|
-
unprocessed_hash?: string;
|
|
32
|
-
processed_entity?: Entity;
|
|
33
|
-
result_hash?: string;
|
|
34
|
-
cache?: UnprocessedEntityCache;
|
|
35
|
-
next_update_at: string | Date;
|
|
36
|
-
last_discovery_at: string | Date;
|
|
37
|
-
errors?: UnprocessedEntityError[];
|
|
38
|
-
location_key?: string;
|
|
39
|
-
};
|
|
29
|
+
declare const catalogUnprocessedEntitiesApiRef: _backstage_frontend_plugin_api.ApiRef<CatalogUnprocessedEntitiesApi>;
|
|
40
30
|
/**
|
|
41
|
-
*
|
|
31
|
+
* Response expected by the {@link CatalogUnprocessedEntitiesApi}
|
|
32
|
+
*
|
|
42
33
|
* @public
|
|
34
|
+
* @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.
|
|
43
35
|
*/
|
|
44
|
-
type
|
|
45
|
-
ttl: number;
|
|
46
|
-
cache: object;
|
|
47
|
-
};
|
|
36
|
+
type CatalogUnprocessedEntitiesApiResponse = CatalogUnprocessedEntitiesApiResponse$1;
|
|
48
37
|
/**
|
|
49
|
-
*
|
|
38
|
+
* Interface for the CatalogUnprocessedEntitiesApi.
|
|
39
|
+
*
|
|
50
40
|
* @public
|
|
41
|
+
* @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.
|
|
51
42
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
message: string;
|
|
55
|
-
cause: {
|
|
56
|
-
name: string;
|
|
57
|
-
message: string;
|
|
58
|
-
stack: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
43
|
+
interface CatalogUnprocessedEntitiesApi extends CatalogUnprocessedEntitiesApi$1 {
|
|
44
|
+
}
|
|
61
45
|
|
|
62
46
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
47
|
+
* Unprocessed entity data stored in the database.
|
|
65
48
|
* @public
|
|
49
|
+
* @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.
|
|
66
50
|
*/
|
|
67
|
-
|
|
51
|
+
type UnprocessedEntity = UnprocessedEntity$1;
|
|
68
52
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
53
|
+
* Unprocessed entity cache stored in the database.
|
|
71
54
|
* @public
|
|
55
|
+
* @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.
|
|
72
56
|
*/
|
|
73
|
-
type
|
|
74
|
-
entities: UnprocessedEntity[];
|
|
75
|
-
};
|
|
57
|
+
type UnprocessedEntityCache = UnprocessedEntityCache$1;
|
|
76
58
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
59
|
+
* Unprocessed entity error information stored in the database.
|
|
79
60
|
* @public
|
|
61
|
+
* @deprecated Use the type imported from `@backstage/plugin-catalog-unprocessed-entities-common` instead.
|
|
80
62
|
*/
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Returns a list of entities with state 'pending'
|
|
84
|
-
*/
|
|
85
|
-
pending(): Promise<CatalogUnprocessedEntitiesApiResponse>;
|
|
86
|
-
/**
|
|
87
|
-
* Returns a list of entities with state 'failed'
|
|
88
|
-
*/
|
|
89
|
-
failed(): Promise<CatalogUnprocessedEntitiesApiResponse>;
|
|
90
|
-
/**
|
|
91
|
-
* Deletes an entity from the refresh_state table
|
|
92
|
-
*/
|
|
93
|
-
delete(entityId: string): Promise<void>;
|
|
94
|
-
}
|
|
63
|
+
type UnprocessedEntityError = UnprocessedEntityError$1;
|
|
95
64
|
|
|
96
|
-
export {
|
|
65
|
+
export { CatalogUnprocessedEntitiesPage, UnprocessedEntitiesContent, catalogUnprocessedEntitiesApiRef, catalogUnprocessedEntitiesPlugin };
|
|
66
|
+
export type { CatalogUnprocessedEntitiesApi, CatalogUnprocessedEntitiesApiResponse, UnprocessedEntity, UnprocessedEntityCache, UnprocessedEntityError };
|
package/dist/package.json.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "@backstage/plugin-catalog-unprocessed-entities";
|
|
2
|
-
var version = "0.2.24
|
|
2
|
+
var version = "0.2.24";
|
|
3
3
|
var backstage = {
|
|
4
4
|
role: "frontend-plugin",
|
|
5
5
|
pluginId: "catalog-unprocessed-entities",
|
|
@@ -19,7 +19,7 @@ var repository = {
|
|
|
19
19
|
};
|
|
20
20
|
var license = "Apache-2.0";
|
|
21
21
|
var sideEffects = false;
|
|
22
|
-
var exports = {
|
|
22
|
+
var exports$1 = {
|
|
23
23
|
".": "./src/index.ts",
|
|
24
24
|
"./alpha": "./src/alpha.ts",
|
|
25
25
|
"./package.json": "./package.json"
|
|
@@ -49,11 +49,11 @@ var scripts = {
|
|
|
49
49
|
test: "backstage-cli package test"
|
|
50
50
|
};
|
|
51
51
|
var dependencies = {
|
|
52
|
-
"@backstage/catalog-model": "workspace:^",
|
|
53
52
|
"@backstage/core-components": "workspace:^",
|
|
54
53
|
"@backstage/core-plugin-api": "workspace:^",
|
|
55
54
|
"@backstage/errors": "workspace:^",
|
|
56
55
|
"@backstage/frontend-plugin-api": "workspace:^",
|
|
56
|
+
"@backstage/plugin-catalog-unprocessed-entities-common": "workspace:^",
|
|
57
57
|
"@material-ui/core": "^4.9.13",
|
|
58
58
|
"@material-ui/icons": "^4.9.1",
|
|
59
59
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
@@ -90,7 +90,7 @@ var _package = {
|
|
|
90
90
|
repository: repository,
|
|
91
91
|
license: license,
|
|
92
92
|
sideEffects: sideEffects,
|
|
93
|
-
exports: exports,
|
|
93
|
+
exports: exports$1,
|
|
94
94
|
main: main,
|
|
95
95
|
types: types,
|
|
96
96
|
typesVersions: typesVersions,
|
|
@@ -102,5 +102,5 @@ var _package = {
|
|
|
102
102
|
peerDependenciesMeta: peerDependenciesMeta
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
export { backstage, _package as default, dependencies, devDependencies, exports, files, homepage, license, main, name, peerDependencies, peerDependenciesMeta, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
|
|
105
|
+
export { backstage, _package as default, dependencies, devDependencies, exports$1 as exports, files, homepage, license, main, name, peerDependencies, peerDependenciesMeta, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
|
|
106
106
|
//# sourceMappingURL=package.json.esm.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-unprocessed-entities",
|
|
3
|
-
"version": "0.2.24
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin",
|
|
6
6
|
"pluginId": "catalog-unprocessed-entities",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"test": "backstage-cli package test"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@backstage/
|
|
66
|
-
"@backstage/core-
|
|
67
|
-
"@backstage/
|
|
68
|
-
"@backstage/
|
|
69
|
-
"@backstage/
|
|
65
|
+
"@backstage/core-components": "^0.18.4",
|
|
66
|
+
"@backstage/core-plugin-api": "^1.12.1",
|
|
67
|
+
"@backstage/errors": "^1.2.7",
|
|
68
|
+
"@backstage/frontend-plugin-api": "^0.13.2",
|
|
69
|
+
"@backstage/plugin-catalog-unprocessed-entities-common": "^0.0.12",
|
|
70
70
|
"@material-ui/core": "^4.9.13",
|
|
71
71
|
"@material-ui/icons": "^4.9.1",
|
|
72
72
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"react-use": "^17.2.4"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@backstage/cli": "0.
|
|
78
|
-
"@backstage/dev-utils": "1.1.18
|
|
77
|
+
"@backstage/cli": "^0.35.0",
|
|
78
|
+
"@backstage/dev-utils": "^1.1.18",
|
|
79
79
|
"@testing-library/jest-dom": "^6.0.0",
|
|
80
80
|
"@testing-library/react": "^16.0.0",
|
|
81
81
|
"@types/react": "^18.0.0",
|