@open-audio-stack/core 0.0.23 → 0.1.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.
Files changed (48) hide show
  1. package/README.md +18 -4
  2. package/build/classes/Config.d.ts +41 -0
  3. package/build/{Config.js → classes/Config.js} +20 -13
  4. package/build/classes/ConfigLocal.d.ts +10 -0
  5. package/build/classes/ConfigLocal.js +32 -0
  6. package/build/classes/Manager.d.ts +20 -0
  7. package/build/classes/Manager.js +85 -0
  8. package/build/classes/ManagerLocal.d.ts +11 -0
  9. package/build/classes/ManagerLocal.js +135 -0
  10. package/build/classes/Package.d.ts +13 -0
  11. package/build/classes/Package.js +50 -0
  12. package/build/classes/Registry.d.ts +14 -0
  13. package/build/classes/Registry.js +37 -0
  14. package/build/helpers/admin.d.ts +9 -0
  15. package/build/helpers/admin.js +28 -0
  16. package/build/helpers/config.d.ts +2 -0
  17. package/build/helpers/config.js +11 -0
  18. package/build/helpers/configLocal.d.ts +2 -0
  19. package/build/helpers/configLocal.js +11 -0
  20. package/build/helpers/file.d.ts +9 -3
  21. package/build/helpers/file.js +117 -29
  22. package/build/helpers/package.d.ts +25 -23
  23. package/build/helpers/package.js +32 -2
  24. package/build/helpers/registry.d.ts +2 -0
  25. package/build/helpers/registry.js +10 -0
  26. package/build/helpers/utils.d.ts +11 -1
  27. package/build/helpers/utils.js +53 -3
  28. package/build/index-browser.d.ts +6 -2
  29. package/build/index-browser.js +10 -2
  30. package/build/index.d.ts +9 -2
  31. package/build/index.js +10 -2
  32. package/build/types/Config.d.ts +10 -0
  33. package/build/types/Package.d.ts +4 -8
  34. package/build/types/Package.js +1 -6
  35. package/build/types/Plugin.d.ts +2 -2
  36. package/build/types/PluginFormat.d.ts +5 -1
  37. package/build/types/PluginFormat.js +23 -6
  38. package/build/types/Preset.d.ts +2 -2
  39. package/build/types/PresetFormat.d.ts +5 -1
  40. package/build/types/PresetFormat.js +15 -1
  41. package/build/types/Project.d.ts +2 -2
  42. package/build/types/ProjectFormat.d.ts +4 -0
  43. package/build/types/ProjectFormat.js +14 -0
  44. package/build/types/Registry.d.ts +3 -3
  45. package/package.json +6 -2
  46. package/build/Config.d.ts +0 -39
  47. package/build/Registry.d.ts +0 -23
  48. package/build/Registry.js +0 -82
@@ -1,6 +1 @@
1
- export var PackageValidation;
2
- (function (PackageValidation) {
3
- PackageValidation["MISSING_FIELD"] = "missing-field";
4
- PackageValidation["INVALID_TYPE"] = "invalid-type";
5
- PackageValidation["INVALID_VALUE"] = "invalid-value";
6
- })(PackageValidation || (PackageValidation = {}));
1
+ export {};
@@ -1,8 +1,8 @@
1
1
  import { FileInterface } from './File.js';
2
- import { PackageVersion } from './Package.js';
2
+ import { PackageBase } from './Package.js';
3
3
  import { PluginFormat } from './PluginFormat.js';
4
4
  import { PluginType } from './PluginType.js';
5
- export interface PluginInterface extends PackageVersion {
5
+ export interface PluginInterface extends PackageBase {
6
6
  files: PluginFile[];
7
7
  type: PluginType;
8
8
  }
@@ -6,8 +6,8 @@ export declare enum PluginFormat {
6
6
  LinuxStandalone = "elf",
7
7
  MacStandalone = "app",
8
8
  RealTimeAudioSuite = "rta",
9
- SoundFont2 = "sf2",
10
9
  SFZ = "sfz",
10
+ SoundFont2 = "sf2",
11
11
  TimeDivisionMultiplexing = "tdm",
12
12
  VSTLinux = "so",
13
13
  VSTMac = "vst",
@@ -15,6 +15,10 @@ export declare enum PluginFormat {
15
15
  VST3 = "vst3",
16
16
  WinStandalone = "exe"
17
17
  }
18
+ export type PluginFormatDir = {
19
+ [format in PluginFormat]: string;
20
+ };
21
+ export declare const pluginFormatDir: PluginFormatDir;
18
22
  export interface PluginFormatOption {
19
23
  description: string;
20
24
  value: PluginFormat;
@@ -7,8 +7,8 @@ export var PluginFormat;
7
7
  PluginFormat["LinuxStandalone"] = "elf";
8
8
  PluginFormat["MacStandalone"] = "app";
9
9
  PluginFormat["RealTimeAudioSuite"] = "rta";
10
- PluginFormat["SoundFont2"] = "sf2";
11
10
  PluginFormat["SFZ"] = "sfz";
11
+ PluginFormat["SoundFont2"] = "sf2";
12
12
  PluginFormat["TimeDivisionMultiplexing"] = "tdm";
13
13
  PluginFormat["VSTLinux"] = "so";
14
14
  PluginFormat["VSTMac"] = "vst";
@@ -16,6 +16,23 @@ export var PluginFormat;
16
16
  PluginFormat["VST3"] = "vst3";
17
17
  PluginFormat["WinStandalone"] = "exe";
18
18
  })(PluginFormat || (PluginFormat = {}));
19
+ export const pluginFormatDir = {
20
+ [PluginFormat.AudioUnits]: 'Components',
21
+ [PluginFormat.AvidAudioExtension]: 'Avid',
22
+ [PluginFormat.CleverAudioPlugin]: 'Clap',
23
+ [PluginFormat.LADSPAVersion2]: 'Lv2',
24
+ [PluginFormat.LinuxStandalone]: 'Elf',
25
+ [PluginFormat.MacStandalone]: 'App',
26
+ [PluginFormat.RealTimeAudioSuite]: 'Rta',
27
+ [PluginFormat.SFZ]: 'Sfz',
28
+ [PluginFormat.SoundFont2]: 'Sf2',
29
+ [PluginFormat.TimeDivisionMultiplexing]: 'Tdm',
30
+ [PluginFormat.VST3]: 'VST3',
31
+ [PluginFormat.VSTLinux]: 'VST',
32
+ [PluginFormat.VSTMac]: 'VST',
33
+ [PluginFormat.VSTWin]: 'VST',
34
+ [PluginFormat.WinStandalone]: 'Exe',
35
+ };
19
36
  export const pluginFormats = [
20
37
  {
21
38
  description: "Apple's proprietary plugin format for macOS and iOS.",
@@ -52,16 +69,16 @@ export const pluginFormats = [
52
69
  value: PluginFormat.MacStandalone,
53
70
  name: 'MacOS Standalone',
54
71
  },
55
- {
56
- description: 'Widely used format for sound samples in musical instruments.',
57
- value: PluginFormat.SoundFont2,
58
- name: 'SoundFont 2',
59
- },
60
72
  {
61
73
  description: 'An open standard for defining instrument patches and sound samples.',
62
74
  value: PluginFormat.SFZ,
63
75
  name: 'SFZ',
64
76
  },
77
+ {
78
+ description: 'Widely used format for sound samples in musical instruments.',
79
+ value: PluginFormat.SoundFont2,
80
+ name: 'SoundFont 2',
81
+ },
65
82
  {
66
83
  description: 'Legacy plugin format used in early Pro Tools systems.',
67
84
  value: PluginFormat.TimeDivisionMultiplexing,
@@ -1,8 +1,8 @@
1
1
  import { FileInterface } from './File.js';
2
- import { PackageVersion } from './Package.js';
2
+ import { PackageBase } from './Package.js';
3
3
  import { PresetFormat } from './PresetFormat.js';
4
4
  import { PresetType } from './PresetType.js';
5
- export interface PresetInterface extends PackageVersion {
5
+ export interface PresetInterface extends PackageBase {
6
6
  files: PresetFile[];
7
7
  plugins: PresetPlugins;
8
8
  type: PresetType;
@@ -5,13 +5,17 @@ export declare enum PresetFormat {
5
5
  LADSPAVersion2 = "lv2",
6
6
  NativeInstruments = "nksf",
7
7
  RealTimeAudioSuite = "rtas",
8
- SoundFont2 = "preset.sf2",
9
8
  SFZ = "preset.sfz",
9
+ SoundFont2 = "preset.sf2",
10
10
  TimeDivisionMultiplexing = "tdm",
11
11
  VSTBank = "fxb",
12
12
  VSTPreset = "fxp",
13
13
  VST3 = "vstpreset"
14
14
  }
15
+ export type PresetFormatDir = {
16
+ [format in PresetFormat]: string;
17
+ };
18
+ export declare const presetFormatDir: PresetFormatDir;
15
19
  export interface PresetFormatOption {
16
20
  description: string;
17
21
  value: PresetFormat;
@@ -6,13 +6,27 @@ export var PresetFormat;
6
6
  PresetFormat["LADSPAVersion2"] = "lv2";
7
7
  PresetFormat["NativeInstruments"] = "nksf";
8
8
  PresetFormat["RealTimeAudioSuite"] = "rtas";
9
- PresetFormat["SoundFont2"] = "preset.sf2";
10
9
  PresetFormat["SFZ"] = "preset.sfz";
10
+ PresetFormat["SoundFont2"] = "preset.sf2";
11
11
  PresetFormat["TimeDivisionMultiplexing"] = "tdm";
12
12
  PresetFormat["VSTBank"] = "fxb";
13
13
  PresetFormat["VSTPreset"] = "fxp";
14
14
  PresetFormat["VST3"] = "vstpreset";
15
15
  })(PresetFormat || (PresetFormat = {}));
16
+ export const presetFormatDir = {
17
+ [PresetFormat.AudioUnits]: 'Components',
18
+ [PresetFormat.AvidAudioExtension]: 'Avid',
19
+ [PresetFormat.CleverAudioPlugin]: 'Clap',
20
+ [PresetFormat.LADSPAVersion2]: 'Lv2',
21
+ [PresetFormat.NativeInstruments]: 'Elf',
22
+ [PresetFormat.RealTimeAudioSuite]: 'Rta',
23
+ [PresetFormat.SFZ]: 'Sfz',
24
+ [PresetFormat.SoundFont2]: 'Sf2',
25
+ [PresetFormat.TimeDivisionMultiplexing]: 'Tdm',
26
+ [PresetFormat.VSTBank]: 'VSTBank',
27
+ [PresetFormat.VSTPreset]: 'VSTPreset',
28
+ [PresetFormat.VST3]: 'VST3',
29
+ };
16
30
  export const presetFormats = [
17
31
  {
18
32
  description: "Apple's proprietary plugin format for macOS and iOS.",
@@ -1,8 +1,8 @@
1
1
  import { FileInterface } from './File.js';
2
- import { PackageVersion } from './Package.js';
2
+ import { PackageBase } from './Package.js';
3
3
  import { ProjectFormat } from './ProjectFormat.js';
4
4
  import { ProjectType } from './ProjectType.js';
5
- export interface ProjectInterface extends PackageVersion {
5
+ export interface ProjectInterface extends PackageBase {
6
6
  files: ProjectFile[];
7
7
  plugins: ProjectPlugins;
8
8
  type: ProjectType;
@@ -12,6 +12,10 @@ export declare enum ProjectFormat {
12
12
  Reaper = "rpp",
13
13
  Sonar = "cwp"
14
14
  }
15
+ export type ProjectFormatDir = {
16
+ [format in ProjectFormat]: string;
17
+ };
18
+ export declare const projectFormatDir: ProjectFormatDir;
15
19
  export interface ProjectFormatOption {
16
20
  description: string;
17
21
  value: ProjectFormat;
@@ -13,6 +13,20 @@ export var ProjectFormat;
13
13
  ProjectFormat["Reaper"] = "rpp";
14
14
  ProjectFormat["Sonar"] = "cwp";
15
15
  })(ProjectFormat || (ProjectFormat = {}));
16
+ export const projectFormatDir = {
17
+ [ProjectFormat.AbletonLive]: 'Ableton',
18
+ [ProjectFormat.Bitwig]: 'Bitwig',
19
+ [ProjectFormat.Cubase]: 'Cubase',
20
+ [ProjectFormat.DAWproject]: 'DAWproject',
21
+ [ProjectFormat.FLStudio]: 'FLStudio',
22
+ [ProjectFormat.Garageband]: 'Garageband',
23
+ [ProjectFormat.Lmms]: 'Lmms',
24
+ [ProjectFormat.Logic]: 'Logic',
25
+ [ProjectFormat.Musescore]: 'Musescore',
26
+ [ProjectFormat.ProTools]: 'ProTools',
27
+ [ProjectFormat.Reaper]: 'Reaper',
28
+ [ProjectFormat.Sonar]: 'Sonar',
29
+ };
16
30
  export const projectFormats = [
17
31
  {
18
32
  description: 'Used to store all information about a Live set.',
@@ -1,11 +1,11 @@
1
1
  import { PackageInterface } from './Package.js';
2
2
  export interface RegistryInterface {
3
3
  name: string;
4
- [RegistryType.Plugins]: RegistryPackages;
5
- [RegistryType.Presets]: RegistryPackages;
6
- [RegistryType.Projects]: RegistryPackages;
7
4
  url: string;
8
5
  version: string;
6
+ [RegistryType.Plugins]?: RegistryPackages;
7
+ [RegistryType.Presets]?: RegistryPackages;
8
+ [RegistryType.Projects]?: RegistryPackages;
9
9
  }
10
10
  export declare enum RegistryType {
11
11
  Plugins = "plugins",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-audio-stack/core",
3
- "version": "0.0.23",
3
+ "version": "0.1.0",
4
4
  "description": "Open-source audio plugin management software",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
@@ -18,7 +18,7 @@
18
18
  "format": "prettier . --write",
19
19
  "lint": "eslint .",
20
20
  "start": "node build/index.js",
21
- "test": "vitest run --config vitest.config.ts",
21
+ "test": "vitest run ./tests --hook-timeout=60000 --test-timeout=60000 --no-file-parallelism",
22
22
  "test:watch": "vitest ./tests"
23
23
  },
24
24
  "author": "kmturley",
@@ -36,6 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@eslint/js": "^9.12.0",
39
+ "@types/7zip-min": "^1.3.3",
39
40
  "@types/adm-zip": "^0.5.5",
40
41
  "@types/fs-extra": "^11.0.4",
41
42
  "@types/js-yaml": "^4.0.9",
@@ -51,12 +52,15 @@
51
52
  "vitest": "^2.1.3"
52
53
  },
53
54
  "dependencies": {
55
+ "@vscode/sudo-prompt": "^9.3.1",
56
+ "7zip-min": "^1.4.5",
54
57
  "adm-zip": "^0.5.16",
55
58
  "chalk": "^5.3.0",
56
59
  "fs-extra": "^11.2.0",
57
60
  "glob": "^11.0.0",
58
61
  "js-yaml": "^4.1.0",
59
62
  "semver": "^7.6.3",
63
+ "tar": "^7.4.3",
60
64
  "zod": "^3.23.8"
61
65
  },
62
66
  "repository": {
package/build/Config.d.ts DELETED
@@ -1,39 +0,0 @@
1
- import { Architecture } from './types/Architecture.js';
2
- import { ConfigInterface } from './types/Config.js';
3
- import { FileFormat } from './types/FileFormat.js';
4
- import { FileType } from './types/FileType.js';
5
- import { License } from './types/License.js';
6
- import { PluginFormat } from './types/PluginFormat.js';
7
- import { PluginType } from './types/PluginType.js';
8
- import { PresetFormat } from './types/PresetFormat.js';
9
- import { PresetType } from './types/PresetType.js';
10
- import { ProjectFormat } from './types/ProjectFormat.js';
11
- import { ProjectType } from './types/ProjectType.js';
12
- import { SystemType } from './types/SystemType.js';
13
- export declare class Config {
14
- config: ConfigInterface;
15
- constructor(config?: ConfigInterface);
16
- get(): ConfigInterface;
17
- architecture(type: Architecture): import("./types/Architecture.js").ArchitectureOption;
18
- architectures(): import("./types/Architecture.js").ArchitectureOption[];
19
- fileFormat(format: FileFormat): import("./types/FileFormat.js").FileFormatOption;
20
- fileFormats(): import("./types/FileFormat.js").FileFormatOption[];
21
- fileType(type: FileType): import("./types/FileType.js").FileTypeOption;
22
- fileTypes(): import("./types/FileType.js").FileTypeOption[];
23
- license(type: License): import("./types/License.js").LicenseOption;
24
- licenses(): import("./types/License.js").LicenseOption[];
25
- pluginFormat(format: PluginFormat): import("./types/PluginFormat.js").PluginFormatOption;
26
- pluginFormats(): import("./types/PluginFormat.js").PluginFormatOption[];
27
- pluginType(type: PluginType): import("./types/PluginType.js").PluginTypeOption;
28
- pluginTypes(): import("./types/PluginType.js").PluginTypeOption[];
29
- presetFormat(format: PresetFormat): import("./types/PresetFormat.js").PresetFormatOption;
30
- presetFormats(): import("./types/PresetFormat.js").PresetFormatOption[];
31
- presetType(type: PresetType): import("./types/PresetType.js").PresetTypeOption;
32
- presetTypes(): import("./types/PresetType.js").PresetTypeOption[];
33
- projectFormat(format: ProjectFormat): import("./types/ProjectFormat.js").ProjectFormatOption;
34
- projectFormats(): import("./types/ProjectFormat.js").ProjectFormatOption[];
35
- projectType(type: ProjectType): import("./types/ProjectType.js").ProjectTypeOption;
36
- projectTypes(): import("./types/ProjectType.js").ProjectTypeOption[];
37
- system(type: SystemType): import("./types/SystemType.js").SystemTypeOption;
38
- systems(): import("./types/SystemType.js").SystemTypeOption[];
39
- }
@@ -1,23 +0,0 @@
1
- import { PackageInterface, PackageVersion, PackageVersions, PackageVersionType } from './types/Package.js';
2
- import { RegistryInterface, RegistryPackages, RegistryType } from './types/Registry.js';
3
- export declare class Registry {
4
- registry: RegistryInterface;
5
- constructor(registry?: RegistryInterface);
6
- packageAdd(slug: string, type: RegistryType): {
7
- slug: string;
8
- version: string;
9
- versions: {};
10
- };
11
- packageVersionAdd(slug: string, type: RegistryType, version: string, pkgVersion: PackageVersionType): void;
12
- package(slug: string, type: RegistryType): PackageInterface;
13
- packages(type: RegistryType): RegistryPackages;
14
- packagesFilter(type: RegistryType, field: keyof PackageVersion, value: string | number | object): RegistryPackages;
15
- packageLatest(slug: string, type: RegistryType, version?: string): PackageVersionType;
16
- packageVersionLatest(versions: PackageVersions): string;
17
- get(): RegistryInterface;
18
- name(): string;
19
- url(): string;
20
- version(): string;
21
- packageRemove(slug: string, type: RegistryType): void;
22
- packageVersionRemove(slug: string, type: RegistryType, version: string): void;
23
- }
package/build/Registry.js DELETED
@@ -1,82 +0,0 @@
1
- import * as semver from 'semver';
2
- export class Registry {
3
- registry;
4
- constructor(registry) {
5
- this.registry = Object.assign({}, registry);
6
- }
7
- packageAdd(slug, type) {
8
- return (this.registry[type][slug] = {
9
- slug,
10
- version: '',
11
- versions: {},
12
- });
13
- }
14
- packageVersionAdd(slug, type, version, pkgVersion) {
15
- if (!semver.valid(version))
16
- throw Error(`${version} is not a valid Semantic version`);
17
- let pkg = this.package(slug, type);
18
- if (!pkg) {
19
- pkg = this.packageAdd(slug, type);
20
- }
21
- pkg.versions[version] = pkgVersion;
22
- pkg.version = this.packageVersionLatest(pkg.versions);
23
- }
24
- package(slug, type) {
25
- return this.registry[type][slug];
26
- }
27
- packages(type) {
28
- return this.registry[type];
29
- }
30
- packagesFilter(type, field, value) {
31
- const registryFiltered = {};
32
- Object.keys(this.registry[type]).forEach((slug) => {
33
- if (this.packageLatest(slug, type)[field] === value) {
34
- registryFiltered[slug] = this.registry[type][slug];
35
- }
36
- });
37
- return registryFiltered;
38
- }
39
- packageLatest(slug, type, version) {
40
- if (version && !semver.valid(version))
41
- throw Error(`${version} is not a valid Semantic version`);
42
- const pkg = this.package(slug, type);
43
- const pkgVersion = this.packageVersionLatest(pkg.versions);
44
- return pkg.versions[version || pkgVersion];
45
- }
46
- packageVersionLatest(versions) {
47
- let latest = '0.0.0';
48
- Object.keys(versions).forEach((version) => {
49
- if (semver.gt(version, latest)) {
50
- latest = version;
51
- }
52
- });
53
- return latest;
54
- }
55
- get() {
56
- return this.registry;
57
- }
58
- name() {
59
- return this.registry.name;
60
- }
61
- url() {
62
- return this.registry.url;
63
- }
64
- version() {
65
- return this.registry.version;
66
- }
67
- packageRemove(slug, type) {
68
- delete this.registry[type][slug];
69
- }
70
- packageVersionRemove(slug, type, version) {
71
- if (!semver.valid(version))
72
- throw Error(`${version} is not a valid Semantic version`);
73
- const pkg = this.package(slug, type);
74
- if (pkg && pkg.versions[version]) {
75
- delete pkg.versions[version];
76
- pkg.version = this.packageVersionLatest(pkg.versions);
77
- }
78
- if (!Object.keys(pkg.versions).length) {
79
- this.packageRemove(slug, type);
80
- }
81
- }
82
- }