@open-audio-stack/core 0.1.28 → 0.1.29

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.
@@ -114,11 +114,13 @@ export class ManagerLocal extends Manager {
114
114
  scan(ext = 'json', installable = true) {
115
115
  const filePaths = dirRead(path.join(this.typeDir, '**', `index.${ext}`));
116
116
  filePaths.forEach((filePath) => {
117
- let subPath = filePath.replace(`${this.typeDir}` + path.sep, '');
117
+ let subPath = filePath.replace(`${this.typeDir}${path.sep}`, '');
118
118
  // TODO improve this code.
119
- const parts = subPath.split(path.sep);
120
- parts.shift();
121
- subPath = parts.join(path.sep);
119
+ if (this.type === RegistryType.Plugins || this.type === RegistryType.Presets) {
120
+ const parts = subPath.split(path.sep);
121
+ parts.shift();
122
+ subPath = parts.join(path.sep);
123
+ }
122
124
  const pkgJson = ext === 'yaml' ? fileReadYaml(filePath) : fileReadJson(filePath);
123
125
  if (installable)
124
126
  pkgJson.installed = true;
@@ -350,7 +352,7 @@ export class ManagerLocal extends Manager {
350
352
  dirDelete(orgDir);
351
353
  });
352
354
  delete pkgVersion.installed;
353
- return this.getPackage(slug)?.getVersion(versionNum);
355
+ return pkgVersion;
354
356
  }
355
357
  async uninstallDependency(slug, version, filePath, type = RegistryType.Plugins) {
356
358
  // Get local package file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-audio-stack/core",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Open-source audio plugin management software",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",