Skip to content

Commit

Permalink
Two-level ids
Browse files Browse the repository at this point in the history
  • Loading branch information
kmturley committed Jun 28, 2024
1 parent f55f268 commit 9ab41ba
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 76 deletions.
4 changes: 2 additions & 2 deletions src/admin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Run when Electron needs elevated privileges
// npm run build && node ./build/admin.js --operation install --id studiorack/mda/mda
// npm run build && node ./build/admin.js --operation uninstall --id studiorack/mda/mda
// npm run build && node ./build/admin.js --operation install --id studiorack/mda
// npm run build && node ./build/admin.js --operation uninstall --id studiorack/mda

import { pluginInstall, pluginUninstall } from './plugin.js';

Expand Down
146 changes: 73 additions & 73 deletions tests/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { PluginVersion, PluginVersionLocal, PluginTemplate, PluginLicense } from
// };

const PLUGIN_DIR: string = path.join('test', 'plugins');
const PLUGIN_ID: string = 'studiorack/mda/mda';
const PLUGIN_ID: string = 'studiorack/mda';
const PLUGIN_TYPE: string = 'VST';
const PLUGIN_TEMPLATE: keyof PluginTemplate = 'dplug';
const PLUGIN_LICENSE: PluginLicense = {
Expand Down Expand Up @@ -75,7 +75,7 @@ const PLUGIN: PluginVersion = {
},
},
license: 'gpl-3.0',
id: 'studiorack/mda/mda',
id: 'studiorack/mda',
version: '1.0.4',
};
const PLUGIN_LOCAL: PluginVersionLocal = {
Expand Down Expand Up @@ -113,88 +113,88 @@ const PLUGIN_LOCAL: PluginVersionLocal = {
},
},
license: 'gpl-3.0',
id: 'studiorack/mda/mda',
id: 'studiorack/mda',
version: '1.0.4',
paths: [],
status: 'installed',
};

if (process.platform === 'win32') {
PLUGIN_LOCAL.paths = [
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Bandisto.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda BeatBox.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Combo.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda De-ess.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Degrade.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Delay.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Detune.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Dither.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda DubDelay.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Dynamics.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Envelope.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Image.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Leslie.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Limiter.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Loudness.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda MultiBand.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Overdrive.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda RePsycho!.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda RezFilter.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda RingMod.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda RoundPan.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Shepard.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Splitter.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Stereo.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda SubSynth.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Talkbox.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda TestTone.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda ThruZero.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Tracker.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda VocInput.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Vocoder.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Bandisto.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda BeatBox.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Combo.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda De-ess.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Degrade.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Delay.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Detune.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Dither.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda DubDelay.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Dynamics.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Envelope.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Image.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Leslie.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Limiter.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Loudness.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda MultiBand.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Overdrive.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda RePsycho!.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda RezFilter.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda RingMod.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda RoundPan.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Shepard.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Splitter.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Stereo.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda SubSynth.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Talkbox.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda TestTone.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda ThruZero.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Tracker.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda VocInput.dll'),
path.join('test', 'plugins', 'DLL', 'studiorack', 'mda', '1.0.4', 'mda Vocoder.dll'),
];
} else if (process.platform === 'darwin') {
PLUGIN_LOCAL.paths = [
path.join('test', 'plugins', 'Components', 'studiorack', 'mda', 'mda', '1.0.4', 'mda.component'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Ambience.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Bandisto.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda BeatBox.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Combo.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda DX10.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda De-ess.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Degrade.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Delay.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Detune.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Dither.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda DubDelay.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Dynamics.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Image.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda JX10.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Leslie.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Limiter.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Looplex.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Loudness.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda MultiBand.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Overdrive.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Piano.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda RePsycho!.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda RezFilter.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda RingMod.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda RoundPan.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Shepard.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Splitter.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Stereo.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda SubBass.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Talkbox.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda TestTone.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda ThruZero.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Tracker.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda VocInput.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda Vocoder.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', 'mda', '1.0.4', 'mda ePiano.vst'),
path.join('test', 'plugins', 'Components', 'studiorack', 'mda', '1.0.4', 'mda.component'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Ambience.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Bandisto.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda BeatBox.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Combo.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda DX10.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda De-ess.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Degrade.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Delay.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Detune.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Dither.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda DubDelay.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Dynamics.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Image.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda JX10.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Leslie.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Limiter.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Looplex.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Loudness.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda MultiBand.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Overdrive.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Piano.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda RePsycho!.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda RezFilter.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda RingMod.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda RoundPan.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Shepard.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Splitter.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Stereo.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda SubBass.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Talkbox.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda TestTone.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda ThruZero.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Tracker.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda VocInput.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda Vocoder.vst'),
path.join('test', 'plugins', 'VST', 'studiorack', 'mda', '1.0.4', 'mda ePiano.vst'),
];
} else {
PLUGIN_LOCAL.paths = [path.join('test', 'plugins', 'LV2', 'studiorack', 'mda', 'mda', '1.0.4', 'mda.lv2')];
PLUGIN_LOCAL.paths = [path.join('test', 'plugins', 'LV2', 'studiorack', 'mda', '1.0.4', 'mda.lv2')];
}
// PLUGIN_LOCAL.paths.sort();

Expand Down Expand Up @@ -247,7 +247,7 @@ test('Check if plugin is installed locally', () => {
});

test('Get plugin locally', async () => {
expect(await pluginGetLocal('studiorack/mda/mda')).toMatchObject(PLUGIN_LOCAL);
expect(await pluginGetLocal('studiorack/mda')).toMatchObject(PLUGIN_LOCAL);
});

test('List plugins in registry', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/tool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { pluginInstall } from '../src/plugin';

// const APP_DIR: string = path.join(dirAppData(), 'studiorack');
const TEST_DIR: string = path.join('test', 'tool');
const PLUGIN_ID: string = 'studiorack/mda/mda';
const PLUGIN_ID: string = 'studiorack/mda';
// const PLUGIN_PATH: string = path.join('test', 'tool', 'VST3', 'studiorack', 'surge', 'surge', '1.9.0', 'Surge XT.vst3');
// const PLUGIN_PATH_CLAP: string = path.join(
// 'test',
Expand Down

0 comments on commit 9ab41ba

Please sign in to comment.