@backstage/plugin-catalog-backend 1.1.2 → 1.2.0-next.0

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 CHANGED
@@ -1,5 +1,28 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.2.0-next.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b594679ae3: Allow array as non-spread arguments at the `CatalogBuilder`.
8
+
9
+ ```typescript
10
+ builder.addEntityProvider(...getArrayOfProviders());
11
+ ```
12
+
13
+ can be simplified to
14
+
15
+ ```typescript
16
+ builder.addEntityProvider(getArrayOfProviders());
17
+ ```
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+ - @backstage/backend-common@0.13.6-next.0
23
+ - @backstage/integration@1.2.1-next.0
24
+ - @backstage/plugin-permission-node@0.6.2-next.0
25
+
3
26
  ## 1.1.2
4
27
 
5
28
  ### Patch Changes
@@ -495,7 +518,7 @@
495
518
  - 022507c860: A `DefaultCatalogCollatorFactory`, which works with the new stream-based
496
519
  search indexing subsystem, is now available. The `DefaultCatalogCollator` will
497
520
  continue to be available for those unable to upgrade to the stream-based
498
- `@backstage/search-backend-node` (and related packages), however it is now
521
+ `@backstage/plugin-search-backend-node` (and related packages), however it is now
499
522
  marked as deprecated and will be removed in a future version.
500
523
 
501
524
  To upgrade this plugin and the search indexing subsystem in one go, check
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.1.2",
3
+ "version": "1.2.0-next.0",
4
4
  "main": "../dist/index.cjs.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
@@ -170,7 +170,7 @@ export declare class CatalogBuilder {
170
170
  *
171
171
  * @param policies - One or more policies
172
172
  */
173
- addEntityPolicy(...policies: EntityPolicy[]): CatalogBuilder;
173
+ addEntityPolicy(...policies: Array<EntityPolicy | Array<EntityPolicy>>): CatalogBuilder;
174
174
  /**
175
175
  * Processing interval determines how often entities should be processed.
176
176
  * Seconds provided will be multiplied by 1.5
@@ -229,14 +229,14 @@ export declare class CatalogBuilder {
229
229
  *
230
230
  * @param providers - One or more entity providers
231
231
  */
232
- addEntityProvider(...providers: EntityProvider[]): CatalogBuilder;
232
+ addEntityProvider(...providers: Array<EntityProvider | Array<EntityProvider>>): CatalogBuilder;
233
233
  /**
234
234
  * Adds entity processors. These are responsible for reading, parsing, and
235
235
  * processing entities before they are persisted in the catalog.
236
236
  *
237
237
  * @param processors - One or more processors
238
238
  */
239
- addProcessor(...processors: CatalogProcessor[]): CatalogBuilder;
239
+ addProcessor(...processors: Array<CatalogProcessor | Array<CatalogProcessor>>): CatalogBuilder;
240
240
  /**
241
241
  * Sets what entity processors to use. These are responsible for reading,
242
242
  * parsing, and processing entities before they are persisted in the catalog.
@@ -274,7 +274,7 @@ export declare class CatalogBuilder {
274
274
  * @param permissionRules - Additional permission rules
275
275
  * @alpha
276
276
  */
277
- addPermissionRules(...permissionRules: CatalogPermissionRule[]): void;
277
+ addPermissionRules(...permissionRules: Array<CatalogPermissionRule | Array<CatalogPermissionRule>>): void;
278
278
  /**
279
279
  * Wires up and returns all of the component parts of the catalog
280
280
  */
@@ -531,7 +531,7 @@ export declare function createRandomProcessingInterval(options: {
531
531
 
532
532
  /**
533
533
  * @public
534
- * @deprecated Upgrade to a more recent `@backstage/search-backend-node` and
534
+ * @deprecated Upgrade to a more recent `@backstage/plugin-search-backend-node` and
535
535
  * use `DefaultCatalogCollatorFactory` instead.
536
536
  */
537
537
  export declare class DefaultCatalogCollator {
@@ -170,7 +170,7 @@ export declare class CatalogBuilder {
170
170
  *
171
171
  * @param policies - One or more policies
172
172
  */
173
- addEntityPolicy(...policies: EntityPolicy[]): CatalogBuilder;
173
+ addEntityPolicy(...policies: Array<EntityPolicy | Array<EntityPolicy>>): CatalogBuilder;
174
174
  /**
175
175
  * Processing interval determines how often entities should be processed.
176
176
  * Seconds provided will be multiplied by 1.5
@@ -229,14 +229,14 @@ export declare class CatalogBuilder {
229
229
  *
230
230
  * @param providers - One or more entity providers
231
231
  */
232
- addEntityProvider(...providers: EntityProvider[]): CatalogBuilder;
232
+ addEntityProvider(...providers: Array<EntityProvider | Array<EntityProvider>>): CatalogBuilder;
233
233
  /**
234
234
  * Adds entity processors. These are responsible for reading, parsing, and
235
235
  * processing entities before they are persisted in the catalog.
236
236
  *
237
237
  * @param processors - One or more processors
238
238
  */
239
- addProcessor(...processors: CatalogProcessor[]): CatalogBuilder;
239
+ addProcessor(...processors: Array<CatalogProcessor | Array<CatalogProcessor>>): CatalogBuilder;
240
240
  /**
241
241
  * Sets what entity processors to use. These are responsible for reading,
242
242
  * parsing, and processing entities before they are persisted in the catalog.
@@ -465,7 +465,7 @@ export declare function createRandomProcessingInterval(options: {
465
465
 
466
466
  /**
467
467
  * @public
468
- * @deprecated Upgrade to a more recent `@backstage/search-backend-node` and
468
+ * @deprecated Upgrade to a more recent `@backstage/plugin-search-backend-node` and
469
469
  * use `DefaultCatalogCollatorFactory` instead.
470
470
  */
471
471
  export declare class DefaultCatalogCollator {
package/dist/index.cjs.js CHANGED
@@ -3397,7 +3397,7 @@ class CatalogBuilder {
3397
3397
  return new CatalogBuilder(env);
3398
3398
  }
3399
3399
  addEntityPolicy(...policies) {
3400
- this.entityPolicies.push(...policies);
3400
+ this.entityPolicies.push(...policies.flat());
3401
3401
  return this;
3402
3402
  }
3403
3403
  setProcessingIntervalSeconds(seconds) {
@@ -3429,11 +3429,11 @@ class CatalogBuilder {
3429
3429
  return this;
3430
3430
  }
3431
3431
  addEntityProvider(...providers) {
3432
- this.entityProviders.push(...providers);
3432
+ this.entityProviders.push(...providers.flat());
3433
3433
  return this;
3434
3434
  }
3435
3435
  addProcessor(...processors) {
3436
- this.processors.push(...processors);
3436
+ this.processors.push(...processors.flat());
3437
3437
  return this;
3438
3438
  }
3439
3439
  replaceProcessors(processors) {
@@ -3456,7 +3456,7 @@ class CatalogBuilder {
3456
3456
  return this;
3457
3457
  }
3458
3458
  addPermissionRules(...permissionRules) {
3459
- this.permissionRules.push(...permissionRules);
3459
+ this.permissionRules.push(...permissionRules.flat());
3460
3460
  }
3461
3461
  async build() {
3462
3462
  var _a, _b;