Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion electron-src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import isDev from 'electron-is-dev';
import { createServer as createServerHttp, IncomingMessage, ServerResponse } from 'http';
import createServer from 'next/dist/server/next.js';
import { ConfigInterface, fileOpen, Package, RegistryType } from '@open-audio-stack/core';
import { config, managers } from '../renderer/lib/managers.js';
import { config, managers } from './managers.js';

// Ensure Electron apps subprocess on macOS and Linux inherit system $PATH
fixPath();
Expand Down
37 changes: 37 additions & 0 deletions electron-src/managers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { ConfigInterface, ConfigLocal, isTests, ManagerLocal, RegistryType } from '@open-audio-stack/core';
import path from 'path';

export const CONFIG: ConfigInterface = {
registries: [
{
name: 'Open Audio Registry',
url: 'https://open-audio-stack.github.io/open-audio-stack-registry',
},
],
version: '1.0.0',
};

export const CONFIG_LOCAL_TEST: ConfigInterface = {
...CONFIG,
appDir: 'test',
pluginsDir: path.join('test', 'installed', 'plugins'),
presetsDir: path.join('test', 'installed', 'presets'),
projectsDir: path.join('test', 'installed', 'projects'),
};

export const config: ConfigLocal = new ConfigLocal(isTests() ? CONFIG_LOCAL_TEST : undefined);
config.logEnable();
console.log('appDir', config.get('appDir'));
console.log('pluginsDir', config.get('pluginsDir'));
console.log('presetsDir', config.get('presetsDir'));
console.log('projectsDir', config.get('projectsDir'));

export const managers: Record<string, ManagerLocal> = {};
const types = [RegistryType.Plugins, RegistryType.Presets, RegistryType.Projects];
for (const type of types) {
const manager: ManagerLocal = new ManagerLocal(type as RegistryType, isTests() ? CONFIG_LOCAL_TEST : undefined);
manager.logEnable();
await manager.sync();
manager.scan();
managers[type] = manager;
}
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ['build', 'coverage', 'renderer/.next', 'node_modules', 'out'],
ignores: ['build', 'coverage', 'dist', 'renderer/.next', 'node_modules', 'out'],
},
{
languageOptions: { globals: globals.node },
Expand Down
Loading
Loading