@open-audio-stack/core 0.1.48 → 0.1.49

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.
@@ -4,6 +4,7 @@ import { Package } from './Package.js';
4
4
  import { ManagerReport, PackageVersion } from '../types/Package.js';
5
5
  import { RegistryPackages, RegistryType } from '../types/Registry.js';
6
6
  import { Base } from './Base.js';
7
+ import { Architecture, SystemType } from '../index-browser.js';
7
8
  export declare class Manager extends Base {
8
9
  protected config: Config;
9
10
  protected packages: Map<string, Package>;
@@ -14,7 +15,7 @@ export declare class Manager extends Base {
14
15
  getPackage(slug: string): Package | undefined;
15
16
  getReport(): ManagerReport;
16
17
  outputReport(): void;
17
- listPackages(installed?: boolean, showAll?: boolean): Package[];
18
+ listPackages(installed?: boolean, architecture?: Architecture, system?: SystemType): Package[];
18
19
  removePackage(slug: string): void;
19
20
  reset(): void;
20
21
  search(query: string): Package[];
@@ -3,7 +3,6 @@ import { Config } from './Config.js';
3
3
  import { Package } from './Package.js';
4
4
  import { Base } from './Base.js';
5
5
  import { packageCompatibleFiles } from '../helpers/package.js';
6
- import { getArchitecture, getSystem } from '../helpers/utilsLocal.js';
7
6
  export class Manager extends Base {
8
7
  config;
9
8
  packages;
@@ -54,17 +53,19 @@ export class Manager extends Base {
54
53
  }
55
54
  }
56
55
  }
57
- listPackages(installed, showAll = false) {
56
+ listPackages(installed, architecture, system) {
58
57
  let packages = Array.from(this.packages.values());
59
58
  if (installed !== undefined) {
60
59
  packages = packages.filter(pkg => Array.from(pkg.versions.values()).some(pkgVersion => (installed === true && pkgVersion.installed) || (installed === false && !pkgVersion.installed)));
61
60
  }
62
- if (!showAll) {
61
+ if (architecture || system) {
63
62
  packages = packages.filter(pkg => {
64
63
  const pkgVersion = pkg.getVersionLatest();
65
64
  if (!pkgVersion)
66
65
  return false;
67
- const files = packageCompatibleFiles(pkgVersion, [getArchitecture()], [getSystem()], []);
66
+ const archArr = architecture ? [architecture] : [];
67
+ const sysArr = system ? [system] : [];
68
+ const files = packageCompatibleFiles(pkgVersion, archArr, sysArr, []);
68
69
  return files.length > 0;
69
70
  });
70
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-audio-stack/core",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "Open-source audio plugin management software",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",