@backstage/plugin-catalog-backend 0.24.0 → 1.1.0-next.1
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 +168 -0
- package/alpha/package.json +1 -1
- package/config.d.ts +0 -33
- package/dist/index.alpha.d.ts +61 -481
- package/dist/index.beta.d.ts +16 -460
- package/dist/index.cjs.js +1564 -1601
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +16 -460
- package/package.json +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,171 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.1.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8012ac46a0: **BREAKING (alpha api):** Replace `createCatalogPolicyDecision` export with `createCatalogConditionalDecision`, which accepts a permission parameter of type `ResourcePermission<'catalog-entity'>` along with conditions. The permission passed is expected to be the handled permission in `PermissionPolicy#handle`, whose type must first be narrowed using methods like `isPermission` and `isResourcePermission`:
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
class TestPermissionPolicy implements PermissionPolicy {
|
|
11
|
+
async handle(
|
|
12
|
+
request: PolicyQuery<Permission>,
|
|
13
|
+
_user?: BackstageIdentityResponse,
|
|
14
|
+
): Promise<PolicyDecision> {
|
|
15
|
+
if (
|
|
16
|
+
// Narrow type of `request.permission` to `ResourcePermission<'catalog-entity'>
|
|
17
|
+
isResourcePermission(request.permission, RESOURCE_TYPE_CATALOG_ENTITY)
|
|
18
|
+
) {
|
|
19
|
+
return createCatalogConditionalDecision(
|
|
20
|
+
request.permission,
|
|
21
|
+
catalogConditions.isEntityOwner(
|
|
22
|
+
_user?.identity.ownershipEntityRefs ?? [],
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
result: AuthorizeResult.ALLOW,
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- 8012ac46a0: **BREAKING:** Mark CatalogBuilder#addPermissionRules as @alpha.
|
|
33
|
+
- fb02d2d94d: export `locationSpecToLocationEntity`
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- ada4446733: Specify type of `visibilityPermission` property on collators and collator factories.
|
|
38
|
+
- 1691c6c5c2: Clarify that config locations that emit User and Group kinds now need to declare so in the `catalog.locations.[].rules`
|
|
39
|
+
- 8012ac46a0: Handle changes to @alpha permission-related types.
|
|
40
|
+
|
|
41
|
+
- All exported permission rules and conditions now have a `resourceType`.
|
|
42
|
+
- `createCatalogConditionalDecision` now expects supplied conditions to have the appropriate `resourceType`.
|
|
43
|
+
- `createCatalogPermissionRule` now expects `resourceType` as part of the supplied rule object.
|
|
44
|
+
- Introduce new `CatalogPermissionRule` convenience type.
|
|
45
|
+
|
|
46
|
+
- Updated dependencies
|
|
47
|
+
- @backstage/integration@1.1.0-next.1
|
|
48
|
+
- @backstage/plugin-permission-common@0.6.0-next.0
|
|
49
|
+
- @backstage/plugin-permission-node@0.6.0-next.1
|
|
50
|
+
- @backstage/plugin-catalog-common@1.0.1-next.1
|
|
51
|
+
- @backstage/backend-common@0.13.2-next.1
|
|
52
|
+
- @backstage/plugin-search-common@0.3.3-next.1
|
|
53
|
+
|
|
54
|
+
## 1.0.1-next.0
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- 9fe24b0fc8: Adjust the error messages when entities fail validation, to clearly state what entity that failed it
|
|
59
|
+
- 95408dbe99: Enable internal batching of very large deletions, to not run into SQL binding limits
|
|
60
|
+
- ffec894ed0: add gitlab to AnnotateScmSlugEntityProcessor
|
|
61
|
+
- Updated dependencies
|
|
62
|
+
- @backstage/catalog-model@1.0.1-next.0
|
|
63
|
+
- @backstage/plugin-search-common@0.3.3-next.0
|
|
64
|
+
- @backstage/backend-common@0.13.2-next.0
|
|
65
|
+
- @backstage/integration@1.0.1-next.0
|
|
66
|
+
- @backstage/catalog-client@1.0.1-next.0
|
|
67
|
+
- @backstage/plugin-scaffolder-common@1.0.1-next.0
|
|
68
|
+
- @backstage/plugin-permission-node@0.5.6-next.0
|
|
69
|
+
- @backstage/plugin-catalog-common@1.0.1-next.0
|
|
70
|
+
|
|
71
|
+
## 1.0.0
|
|
72
|
+
|
|
73
|
+
### Major Changes
|
|
74
|
+
|
|
75
|
+
- b58c70c223: This package has been promoted to v1.0! To understand how this change affects the package, please check out our [versioning policy](https://backstage.io/docs/overview/versioning-policy).
|
|
76
|
+
|
|
77
|
+
### Minor Changes
|
|
78
|
+
|
|
79
|
+
- 6145ca7189: **BREAKING**: A number of types and classes have been removed, without a prior deprecation period. These were all very internal, essentially unused by the vast majority of users, and their being exposed was leading to excessive breaking of public interfaces for little-to-zero benefit. So for the 1.0 release of the catalog, the following interface changes have been made (but should have no effect on most users):
|
|
80
|
+
|
|
81
|
+
- The return type of `CatalogBuilder.build()` now only has the fields `processingEngine` and `router` which is what most users actually consume; the other three fields (`entitiesCatalog`, `locationAnalyzer`, `locationService`) that see very little use have been removed. If you were relying on the presence of either of these in any way, please [open an issue](https://github.com/backstage/backstage/issues/new/choose) that describes your use case, and we'll see how we could fill the gap.
|
|
82
|
+
|
|
83
|
+
- The function `createRouter` is removed; use `CatalogBuilder` as follows instead:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
const builder = await CatalogBuilder.create(env);
|
|
87
|
+
// add things as needed, e.g builder.addProcessor(new ScaffolderEntitiesProcessor());
|
|
88
|
+
const { processingEngine, router } = await builder.build();
|
|
89
|
+
await processingEngine.start();
|
|
90
|
+
return router;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
- The following types were removed:
|
|
94
|
+
|
|
95
|
+
- `CatalogProcessingOrchestrator`
|
|
96
|
+
- `CatalogRule`
|
|
97
|
+
- `CatalogRulesEnforcer`
|
|
98
|
+
- `EntityAncestryResponse`
|
|
99
|
+
- `EntityFacetsRequest`
|
|
100
|
+
- `EntityFacetsResponse`
|
|
101
|
+
- `EntityPagination`
|
|
102
|
+
- `EntityProcessingRequest`
|
|
103
|
+
- `EntityProcessingResult`
|
|
104
|
+
- `EntitiesCatalog`
|
|
105
|
+
- `EntitiesRequest`
|
|
106
|
+
- `EntitiesResponse`
|
|
107
|
+
- `LocationService`
|
|
108
|
+
- `LocationInput`
|
|
109
|
+
- `LocationStore`
|
|
110
|
+
- `PageInfo`
|
|
111
|
+
- `RefreshOptions`
|
|
112
|
+
- `RefreshService`
|
|
113
|
+
- `RouterOptions`
|
|
114
|
+
|
|
115
|
+
- The following classes were removed:
|
|
116
|
+
|
|
117
|
+
- `DefaultCatalogProcessingOrchestrator`
|
|
118
|
+
- `DefaultCatalogRulesEnforcer`
|
|
119
|
+
|
|
120
|
+
- 02ad19d189: **BREAKING**: Removed the deprecated `metadata.generation` field entirely. It is no longer present in TS types, nor in the REST API output. Entities that have not yet been re-stitched may still have the field present for some time, but it will get phased out gradually by your catalog instance.
|
|
121
|
+
- 7250b6993d: **BREAKING**: Removed the previously deprecated `results` export. Please use `processingResult` instead.
|
|
122
|
+
- 077e7c132f: **BREAKING**: Removed the following deprecated symbols:
|
|
123
|
+
|
|
124
|
+
- `catalogBuilder.setRefreshInterval`, use `catalogBuilder.setProcessingInterval` instead.
|
|
125
|
+
- `catalogBuilder.setRefreshIntervalSeconds`, use `catalogBuilder.setProcessingIntervalSeconds` instead.
|
|
126
|
+
- `createRandomRefreshInterval`, use `createRandomProcessingInterval` instead.
|
|
127
|
+
- `RefreshIntervalFunction`, use `ProcessingIntervalFunction` instead.
|
|
128
|
+
|
|
129
|
+
- 74375be2c6: **BREAKING**: Removed the export of the `RecursivePartial` utility type. If you relied on this type it can be redefined like this:
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
type RecursivePartial<T> = {
|
|
133
|
+
[P in keyof T]?: T[P] extends (infer U)[]
|
|
134
|
+
? RecursivePartial<U>[]
|
|
135
|
+
: T[P] extends object
|
|
136
|
+
? RecursivePartial<T[P]>
|
|
137
|
+
: T[P];
|
|
138
|
+
};
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
- ced3016f2a: **BREAKING**: The deprecated `CatalogEntityDocument` export has been removed, it can be imported from `@backstage/plugin-catalog-common` instead.
|
|
142
|
+
- 0163c41be2: **BREAKING**: Removed the deprecated `presence` field from `LocationInput`.
|
|
143
|
+
- d3e9ec43b7: **BREAKING**: Removed the `target` property from `EntityRelation`. This field has been replaced by `targetRef`.
|
|
144
|
+
This means that `target: { name: 'team-a', kind: 'group', namespace: 'default' }` is now replaced with `targetRef: 'group:default/team-a'` in entity relations.
|
|
145
|
+
|
|
146
|
+
The entities API endpoint still return the old `target` field for to ease transitions, however the future removal of this field will be considered non breaking.
|
|
147
|
+
|
|
148
|
+
### Patch Changes
|
|
149
|
+
|
|
150
|
+
- 89c7e47967: Minor README update
|
|
151
|
+
- 26fb159a30: Pass in auth token to ancestry endpoint
|
|
152
|
+
- efc73db10c: Use `better-sqlite3` instead of `@vscode/sqlite3`
|
|
153
|
+
- f24ef7864e: Minor typo fixes
|
|
154
|
+
- e949d68059: Made sure to move the catalog-related github and ldap config into their right places
|
|
155
|
+
- Updated dependencies
|
|
156
|
+
- @backstage/backend-common@0.13.1
|
|
157
|
+
- @backstage/catalog-model@1.0.0
|
|
158
|
+
- @backstage/plugin-scaffolder-common@1.0.0
|
|
159
|
+
- @backstage/integration@1.0.0
|
|
160
|
+
- @backstage/catalog-client@1.0.0
|
|
161
|
+
- @backstage/config@1.0.0
|
|
162
|
+
- @backstage/errors@1.0.0
|
|
163
|
+
- @backstage/types@1.0.0
|
|
164
|
+
- @backstage/plugin-catalog-common@1.0.0
|
|
165
|
+
- @backstage/plugin-permission-common@0.5.3
|
|
166
|
+
- @backstage/plugin-permission-node@0.5.5
|
|
167
|
+
- @backstage/plugin-search-common@0.3.2
|
|
168
|
+
|
|
3
169
|
## 0.24.0
|
|
4
170
|
|
|
5
171
|
### Minor Changes
|
|
@@ -1279,6 +1445,8 @@
|
|
|
1279
1445
|
locations:
|
|
1280
1446
|
- type: github-multi-org
|
|
1281
1447
|
target: https://github.myorg.com
|
|
1448
|
+
rules:
|
|
1449
|
+
- allow: [User, Group]
|
|
1282
1450
|
|
|
1283
1451
|
processors:
|
|
1284
1452
|
githubMultiOrg:
|
package/alpha/package.json
CHANGED
package/config.d.ts
CHANGED
|
@@ -105,38 +105,5 @@ export interface Config {
|
|
|
105
105
|
allow: Array<string>;
|
|
106
106
|
}>;
|
|
107
107
|
}>;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* List of processor-specific options and attributes
|
|
111
|
-
*/
|
|
112
|
-
processors?: {
|
|
113
|
-
/**
|
|
114
|
-
* GithubMultiOrgReaderProcessor configuration
|
|
115
|
-
*/
|
|
116
|
-
githubMultiOrg?: {
|
|
117
|
-
/**
|
|
118
|
-
* The configuration parameters for each GitHub org to process.
|
|
119
|
-
*/
|
|
120
|
-
orgs: Array<{
|
|
121
|
-
/**
|
|
122
|
-
* The name of the GitHub org to process.
|
|
123
|
-
*/
|
|
124
|
-
name: string;
|
|
125
|
-
/**
|
|
126
|
-
* The namespace of the group created for this org.
|
|
127
|
-
*
|
|
128
|
-
* Defaults to org name if omitted.
|
|
129
|
-
*/
|
|
130
|
-
groupNamespace?: string;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The namespace of the users created from this org.
|
|
134
|
-
*
|
|
135
|
-
* Defaults to empty string if omitted.
|
|
136
|
-
*/
|
|
137
|
-
userNamespace?: string;
|
|
138
|
-
}>;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
108
|
};
|
|
142
109
|
}
|