@firestartr/cli 2.11.0-snapshot-import-filter-fix → 2.11.0-snapshot-import-filter-fix-2

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/build/index.js CHANGED
@@ -173409,25 +173409,23 @@ class CollectionMixins {
173409
173409
  async filter(kind, filters, elementList) {
173410
173410
  if (filters.length === 0)
173411
173411
  return elementList;
173412
+ let filteredList = elementList;
173412
173413
  if (this.IS_FILTER_BY_NAME_SET(filters, kind)) {
173413
- return this.FILTER_BY_NAME_APPLY(filters, kind, (names) => {
173414
- const result = elementList.filter((el) => names.indexOf(el) !== -1);
173415
- return result;
173416
- });
173414
+ filteredList = this.FILTER_BY_NAME_APPLY(filters, kind, (names) => filteredList.filter((el) => names.indexOf(el) !== -1));
173417
173415
  }
173418
- if (this.IS_FILTER_BY_REGEXP_SET(filters, kind)) {
173419
- return this.FILTER_BY_REGEXP_APPLY(filters, kind, (nameRegExp) => {
173420
- return elementList.filter((el) => nameRegExp.test(el));
173416
+ else if (this.IS_FILTER_BY_REGEXP_SET(filters, kind)) {
173417
+ filteredList = this.FILTER_BY_REGEXP_APPLY(filters, kind, (nameRegExp) => {
173418
+ return filteredList.filter((el) => nameRegExp.test(el));
173421
173419
  });
173422
173420
  }
173423
173421
  if (this.IS_FILTER_BY_FUNCTION_SET(filters, kind)) {
173424
- await this.FILTER_BY_FUNCTION_APPLY(filters, kind, async (fn) => {
173425
- elementList = (await Promise.all(elementList.map(async (el) => {
173422
+ filteredList = await this.FILTER_BY_FUNCTION_APPLY(filters, kind, async (fn) => {
173423
+ return (await Promise.all(filteredList.map(async (el) => {
173426
173424
  return (await fn(kind, el)) ? el : undefined;
173427
173425
  }))).filter((el) => el !== undefined);
173428
173426
  });
173429
173427
  }
173430
- return elementList;
173428
+ return filteredList;
173431
173429
  }
173432
173430
  }
173433
173431
 
@@ -713425,7 +713423,7 @@ const crsStatusSubcommand = {
713425
713423
  };
713426
713424
 
713427
713425
  ;// CONCATENATED MODULE: ./package.json
713428
- const package_namespaceObject = JSON.parse('{"i8":"2.11.0-snapshot-import-filter-fix"}');
713426
+ const package_namespaceObject = JSON.parse('{"i8":"2.11.0-snapshot-import-filter-fix-2"}');
713429
713427
  ;// CONCATENATED MODULE: ../../package.json
713430
713428
  const package_namespaceObject_1 = {"i8":"2.10.0"};
713431
713429
  // EXTERNAL MODULE: ../../node_modules/semver/index.js
@@ -8,7 +8,7 @@ export declare class CollectionMixins {
8
8
  FILTER_BY_NAME_APPLY(filters: any[], kind: string, fn: Function): any;
9
9
  FILTER_BY_REGEXP_APPLY(filters: any[], kind: string, fn: Function): any;
10
10
  FILTER_BY_FUNCTION_APPLY(filters: any[], kind: string, fn: Function): any;
11
- filter(kind: string, filters: any[], elementList: any[]): Promise<any>;
11
+ filter(kind: string, filters: any[], elementList: any[]): Promise<any[]>;
12
12
  }
13
13
  export interface ICollection extends CollectionMixins {
14
14
  }
@@ -1,9 +1,10 @@
1
+ import OrgSettingsGithubDecanter from './github_org_settings';
1
2
  import { ICollection } from '../collections';
2
3
  import { CollectionFilter } from '../filters';
3
4
  import { GithubDecanter } from './base';
4
5
  declare class OrgSettingsCollectionGithubDecanter extends GithubDecanter {
5
6
  static collectionKind: string;
6
- collection(filters?: CollectionFilter[]): Promise<any>;
7
+ collection(filters?: CollectionFilter[]): Promise<OrgSettingsGithubDecanter[]>;
7
8
  }
8
9
  interface OrgSettingsCollectionGithubDecanter extends ICollection {
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "2.11.0-snapshot-import-filter-fix",
3
+ "version": "2.11.0-snapshot-import-filter-fix-2",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",