@open-audio-stack/core 0.1.27 → 0.1.28

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.
@@ -12,8 +12,8 @@ export declare class ManagerLocal extends Manager {
12
12
  install(slug: string, version?: string): Promise<void | PackageVersion>;
13
13
  installAll(): Promise<Package[]>;
14
14
  installDependency(slug: string, version?: string, filePath?: string, type?: RegistryType): Promise<any>;
15
- installDependencies(filePath?: string, type?: RegistryType): Promise<any>;
16
- open(filePath?: string): void;
15
+ installDependencies(filePath: string, type?: RegistryType): Promise<any>;
16
+ open(filePath: string): void;
17
17
  uninstall(slug: string, version?: string): Promise<void | PackageVersion>;
18
18
  uninstallDependency(slug: string, version?: string, filePath?: string, type?: RegistryType): Promise<any>;
19
19
  uninstallDependencies(filePath?: string, type?: RegistryType): Promise<any>;
@@ -1,3 +1,4 @@
1
+ import { GlobOptionsWithFileTypesFalse } from 'glob';
1
2
  import { PackageInterface } from '../types/Package.js';
2
3
  import { PluginFile } from '../types/Plugin.js';
3
4
  import { PresetFile } from '../types/Preset.js';
@@ -18,7 +19,7 @@ export declare function dirPackage(pkg: PackageInterface): string;
18
19
  export declare function dirPlugins(): string;
19
20
  export declare function dirPresets(): string;
20
21
  export declare function dirProjects(): string;
21
- export declare function dirRead(dir: string, options?: any): string[];
22
+ export declare function dirRead(dir: string, options?: GlobOptionsWithFileTypesFalse): string[];
22
23
  export declare function dirRename(dir: string, dirNew: string): void | boolean;
23
24
  export declare function fileCreate(filePath: string, data: string | Buffer): void;
24
25
  export declare function fileCreateJson(filePath: string, data: object): void;
@@ -127,7 +127,19 @@ export function dirRead(dir, options) {
127
127
  if (getSystem() === SystemType.Win) {
128
128
  dir = dir.replace(/\\/g, '/');
129
129
  }
130
- return globSync(dir, options);
130
+ // Ignore Mac files in Contents folders
131
+ // Filter out any paths not starting with the base directory
132
+ // This is to prevent issues with symlinks.
133
+ const baseDir = dir.includes('*') ? dir.split('*')[0] : dir;
134
+ const allPaths = globSync(dir, {
135
+ ignore: [`${baseDir}/**/*.{app,component,lv2,vst,vst3}/**/*`],
136
+ realpath: true,
137
+ ...options,
138
+ });
139
+ // Glob input paths use forward slashes.
140
+ // Glob output paths are system-specific.
141
+ const baseDirCrossPlatform = baseDir.split('/').join(path.sep);
142
+ return allPaths.filter(p => p.startsWith(baseDirCrossPlatform));
131
143
  }
132
144
  export function dirRename(dir, dirNew) {
133
145
  if (dirExists(dir)) {
@@ -208,9 +220,7 @@ export function fileMove(filePath, newPath) {
208
220
  }
209
221
  export function filesMove(dirSource, dirTarget, dirSub, formatDir) {
210
222
  // Read files from source directory, ignoring Mac Contents files.
211
- const files = dirRead(`${dirSource}/**/*.*`, {
212
- ignore: [`${dirSource}/**/Contents/**/*`],
213
- });
223
+ const files = dirRead(`${dirSource}/**/*.*`);
214
224
  const filesMoved = [];
215
225
  // For each file, move to correct folder based on type
216
226
  files.forEach((fileSource) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-audio-stack/core",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Open-source audio plugin management software",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",