@open-audio-stack/core 0.1.15 → 0.1.17
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,7 +4,7 @@ import { RegistryType } from '../types/Registry.js';
|
|
|
4
4
|
import { ConfigInterface } from '../types/Config.js';
|
|
5
5
|
export declare class ManagerLocal extends Manager {
|
|
6
6
|
protected typeDir: string;
|
|
7
|
-
constructor(type: RegistryType, config
|
|
7
|
+
constructor(type: RegistryType, config?: ConfigInterface);
|
|
8
8
|
create(): Promise<void>;
|
|
9
9
|
scan(ext?: string, installable?: boolean): void;
|
|
10
10
|
export(dir: string, ext?: string): boolean;
|
|
@@ -13,6 +13,7 @@ export declare class Package extends Base {
|
|
|
13
13
|
};
|
|
14
14
|
getVersion(num: string): PackageVersion | undefined;
|
|
15
15
|
getVersionLatest(): PackageVersion | undefined;
|
|
16
|
+
getVersionOrLatest(num?: string): PackageVersion | undefined;
|
|
16
17
|
latestVersion(): string;
|
|
17
18
|
toJSON(): {
|
|
18
19
|
slug: string;
|
package/build/classes/Package.js
CHANGED
|
@@ -49,6 +49,14 @@ export class Package extends Base {
|
|
|
49
49
|
getVersionLatest() {
|
|
50
50
|
return this.versions.get(this.latestVersion());
|
|
51
51
|
}
|
|
52
|
+
getVersionOrLatest(num) {
|
|
53
|
+
if (num) {
|
|
54
|
+
const pkgVersion = this.getVersion(num);
|
|
55
|
+
if (pkgVersion)
|
|
56
|
+
return pkgVersion;
|
|
57
|
+
}
|
|
58
|
+
return this.getVersionLatest();
|
|
59
|
+
}
|
|
52
60
|
latestVersion() {
|
|
53
61
|
return Array.from(this.versions.keys()).sort(semver.rcompare)[0] || '0.0.0';
|
|
54
62
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-audio-stack/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "Open-source audio plugin management software",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|
|
7
7
|
"exports": {
|
|
8
|
+
"import": "./build/index.js",
|
|
8
9
|
"node": "./build/index.js",
|
|
9
10
|
"default": "./build/index-browser.js"
|
|
10
11
|
},
|