Browse Source

Remove tests, rename plugins folder to manifests

pull/249/head
Andrew Belt 6 years ago
parent
commit
9e7f72be21
77 changed files with 0 additions and 1461 deletions
  1. +0
    -60
      README.md
  2. +0
    -0
      manifests/AS.json
  3. +0
    -0
      manifests/Alikins.json
  4. +0
    -0
      manifests/AmalgamatedHarmonics.json
  5. +0
    -0
      manifests/AnimatedCircuits.json
  6. +0
    -0
      manifests/ArableInstruments.json
  7. +0
    -0
      manifests/AudibleInstruments.json
  8. +0
    -0
      manifests/Autinn.json
  9. +0
    -0
      manifests/Autodafe-DrumKit.json
  10. +0
    -0
      manifests/Autodafe-REDs.json
  11. +0
    -0
      manifests/Autodafe-REDsFREE.json
  12. +0
    -0
      manifests/Autodafe.json
  13. +0
    -0
      manifests/AutodafeBlankPanel.json
  14. +0
    -0
      manifests/Befaco.json
  15. +0
    -0
      manifests/Bidoo.json
  16. +0
    -0
      manifests/Blamsoft-XFXDistortionPack.json
  17. +0
    -0
      manifests/Blamsoft-XFXF35.json
  18. +0
    -0
      manifests/Blamsoft-XFXReverb.json
  19. +0
    -0
      manifests/Bogaudio.json
  20. +0
    -0
      manifests/CastleRocktronics.json
  21. +0
    -0
      manifests/DrumKit.json
  22. +0
    -0
      manifests/ESeries.json
  23. +0
    -0
      manifests/FrozenWasteland.json
  24. +0
    -0
      manifests/Fundamental.json
  25. +0
    -0
      manifests/Gratrix.json
  26. +0
    -0
      manifests/Grayscale.json
  27. +0
    -0
      manifests/HetrickCV.json
  28. +0
    -0
      manifests/HoraMusic.json
  29. +0
    -0
      manifests/HotBunny.json
  30. +0
    -0
      manifests/IO-Simple.json
  31. +0
    -0
      manifests/JE.json
  32. +0
    -0
      manifests/JW-Modules.json
  33. +0
    -0
      manifests/KarateSnoopy.json
  34. +0
    -0
      manifests/LOGinstruments.json
  35. +0
    -0
      manifests/LindenbergResearch.json
  36. +0
    -0
      manifests/LoopusModules.json
  37. +0
    -0
      manifests/ML_modules.json
  38. +0
    -0
      manifests/MSM.json
  39. +0
    -0
      manifests/MrLumps.json
  40. +0
    -0
      manifests/NYSTHI.json
  41. +0
    -0
      manifests/NauModular.json
  42. +0
    -0
      manifests/Nohmad.json
  43. +0
    -0
      manifests/NonLinearInstruments.json
  44. +0
    -0
      manifests/ParableInstruments.json
  45. +0
    -0
      manifests/PulsumQuadratum-rtlsdr.json
  46. +0
    -0
      manifests/PvC.json
  47. +0
    -0
      manifests/Qwelk.json
  48. +0
    -0
      manifests/RJModules.json
  49. +0
    -0
      manifests/RODENTMODULES.json
  50. +0
    -0
      manifests/SonusModular.json
  51. +0
    -0
      manifests/Southpole.json
  52. +0
    -0
      manifests/StellareModular-Link.json
  53. +0
    -0
      manifests/StellareModular.json
  54. +0
    -0
      manifests/SynthKit.json
  55. +0
    -0
      manifests/TheXOR.json
  56. +0
    -0
      manifests/UnfilteredVolume1.json
  57. +0
    -0
      manifests/VCV-Console.json
  58. +0
    -0
      manifests/VCV-PulseMatrix.json
  59. +0
    -0
      manifests/Valley Free.json
  60. +0
    -0
      manifests/VultModules.json
  61. +0
    -0
      manifests/av500.json
  62. +0
    -0
      manifests/cf.json
  63. +0
    -0
      manifests/dBiz.json
  64. +0
    -0
      manifests/dekstop.json
  65. +0
    -0
      manifests/luckyxxl.json
  66. +0
    -0
      manifests/mental.json
  67. +0
    -0
      manifests/moDllz.json
  68. +0
    -0
      manifests/mscHack.json
  69. +0
    -0
      manifests/mtsch-plugins.json
  70. +0
    -0
      manifests/s-ol.json
  71. +0
    -0
      manifests/trowaSoft.json
  72. +0
    -1056
      package-lock.json
  73. +0
    -24
      package.json
  74. +0
    -36
      spec/README.md
  75. +0
    -116
      spec/manifest.json
  76. +0
    -158
      spec/manifest.tests.spec.js
  77. +0
    -11
      spec/support/jasmine.json

+ 0
- 60
README.md View File

@@ -1,60 +0,0 @@

# VCV community

[![Build Status](https://travis-ci.org/VCVRack/community.svg?branch=master)](https://travis-ci.org/VCVRack/community)

*Manifest repository for VCV Rack plugins*

### Contributing your plugin

Create or edit your plugin's manifest file in `plugins/` using the template and documentation below.
You can do this without cloning by clicking GitHub's "Create new file" button or by clicking the pencil icon to edit a file.

### Manifest template

Filename should be `YourSlug.json`.

```json
{
"slug": "AudibleInstruments",
"name": "Audible Instruments",
"author": "VCV",
"license": "BSD 3-clause",
"version": "0.5.0",
"homepage": "https://vcvrack.com/",
"donation": "https://www.paypal.me/",
"manual": "https://vcvrack.com/manual/AudibleInstruments.html",
"source": "https://github.com/VCVRack/AudibleInstruments",
"downloads": {
"win": {
"download": "https://example.com/AudibleInstruments-0.5.0-win.zip",
"sha256": "9372ce3f8ef42d7e874beda36f7c051b3d7de9c904e259a5fc9dba8dc664bf65"
},
"lin": {
"download": "https://example.com/AudibleInstruments-0.5.0-lin.zip",
"sha256": "238145156cc4e11b3ca6d750df38ca2daf3e09648d9c7db5f23e9518c1ccf5dc"
},
"mac": {
"download": "https://example.com/AudibleInstruments-0.5.0-mac.zip",
"sha256": "c19fcdfd07dc6184ce30953bf9adb2b4a77d20ef66d2b1c6a6024c2ca4ff505b"
}
}
}
```

### Manifest properties

Keys with * are required.

- **slug**\*: Unique identifier for your plugin. Should never change. Avoid spaces. Prefix with your company or developer name if you plan to release multiple plugins, e.g. "VCV-PulseMatrix". But most importantly, should never change.
- **name**: Human-readable display name for your plugin. Defaults to the slug if omitted. May change on a whim.
- **author**: Your name, company, alias, or GitHub username, whichever you prefer
- **version**\*: Your plugin's version, using the guidelines at https://github.com/VCVRack/Rack/issues/266. Do not include the "v" prefix.
- **license**: The license type of your plugin. Use "proprietary" if all rights are reserved. If your license is in the [SPDX license list](https://spdx.org/licenses/), use its abbreviation in the "Identifier" column.
- **homepage**: URL of the landing page of your plugin. Omit if redundant with the source URL.
- **donation**: URL of your donation page. Use this to provide a URL to users who wish to donate.
- **manual**: URL of the manual of your plugin. HTML, PDF, or GitHub readme/wiki are fine.
- **source**: URL of the source code landing page.
- **downloads**: Mapping of supported architectures to downloads.
- **download**: Direct URL to the compiled binary ZIP. If supported architectures are merged into one ZIP file, you can copy the same link into each of the architecture sections. The name of the zip file does not matter. However, each zip must contain a single folder equal to the name of the plugin's slug. GitHub releases is a good choice for open-source plugins.
- **sha256**: Hex SHA256 string of the binary ZIP file for verifying downloads. Use `sha256sum [FILE]` or `sha256 [FILE]` or https://www.virustotal.com

plugins/AS.json → manifests/AS.json View File


plugins/Alikins.json → manifests/Alikins.json View File


plugins/AmalgamatedHarmonics.json → manifests/AmalgamatedHarmonics.json View File


plugins/AnimatedCircuits.json → manifests/AnimatedCircuits.json View File


plugins/ArableInstruments.json → manifests/ArableInstruments.json View File


plugins/AudibleInstruments.json → manifests/AudibleInstruments.json View File


plugins/Autinn.json → manifests/Autinn.json View File


plugins/Autodafe-DrumKit.json → manifests/Autodafe-DrumKit.json View File


plugins/Autodafe-REDs.json → manifests/Autodafe-REDs.json View File


plugins/Autodafe-REDsFREE.json → manifests/Autodafe-REDsFREE.json View File


plugins/Autodafe.json → manifests/Autodafe.json View File


plugins/AutodafeBlankPanel.json → manifests/AutodafeBlankPanel.json View File


plugins/Befaco.json → manifests/Befaco.json View File


plugins/Bidoo.json → manifests/Bidoo.json View File


plugins/Blamsoft-XFXDistortionPack.json → manifests/Blamsoft-XFXDistortionPack.json View File


plugins/Blamsoft-XFXF35.json → manifests/Blamsoft-XFXF35.json View File


plugins/Blamsoft-XFXReverb.json → manifests/Blamsoft-XFXReverb.json View File


plugins/Bogaudio.json → manifests/Bogaudio.json View File


plugins/CastleRocktronics.json → manifests/CastleRocktronics.json View File


plugins/DrumKit.json → manifests/DrumKit.json View File


plugins/ESeries.json → manifests/ESeries.json View File


plugins/FrozenWasteland.json → manifests/FrozenWasteland.json View File


plugins/Fundamental.json → manifests/Fundamental.json View File


plugins/Gratrix.json → manifests/Gratrix.json View File


plugins/Grayscale.json → manifests/Grayscale.json View File


plugins/HetrickCV.json → manifests/HetrickCV.json View File


plugins/HoraMusic.json → manifests/HoraMusic.json View File


plugins/HotBunny.json → manifests/HotBunny.json View File


plugins/IO-Simple.json → manifests/IO-Simple.json View File


plugins/JE.json → manifests/JE.json View File


plugins/JW-Modules.json → manifests/JW-Modules.json View File


plugins/KarateSnoopy.json → manifests/KarateSnoopy.json View File


plugins/LOGinstruments.json → manifests/LOGinstruments.json View File


plugins/LindenbergResearch.json → manifests/LindenbergResearch.json View File


plugins/LoopusModules.json → manifests/LoopusModules.json View File


plugins/ML_modules.json → manifests/ML_modules.json View File


plugins/MSM.json → manifests/MSM.json View File


plugins/MrLumps.json → manifests/MrLumps.json View File


plugins/NYSTHI.json → manifests/NYSTHI.json View File


plugins/NauModular.json → manifests/NauModular.json View File


plugins/Nohmad.json → manifests/Nohmad.json View File


plugins/NonLinearInstruments.json → manifests/NonLinearInstruments.json View File


plugins/ParableInstruments.json → manifests/ParableInstruments.json View File


plugins/PulsumQuadratum-rtlsdr.json → manifests/PulsumQuadratum-rtlsdr.json View File


plugins/PvC.json → manifests/PvC.json View File


plugins/Qwelk.json → manifests/Qwelk.json View File


plugins/RJModules.json → manifests/RJModules.json View File


plugins/RODENTMODULES.json → manifests/RODENTMODULES.json View File


plugins/SonusModular.json → manifests/SonusModular.json View File


plugins/Southpole.json → manifests/Southpole.json View File


plugins/StellareModular-Link.json → manifests/StellareModular-Link.json View File


plugins/StellareModular.json → manifests/StellareModular.json View File


plugins/SynthKit.json → manifests/SynthKit.json View File


plugins/TheXOR.json → manifests/TheXOR.json View File


plugins/UnfilteredVolume1.json → manifests/UnfilteredVolume1.json View File


plugins/VCV-Console.json → manifests/VCV-Console.json View File


plugins/VCV-PulseMatrix.json → manifests/VCV-PulseMatrix.json View File


plugins/Valley Free.json → manifests/Valley Free.json View File


plugins/VultModules.json → manifests/VultModules.json View File


plugins/av500.json → manifests/av500.json View File


plugins/cf.json → manifests/cf.json View File


plugins/dBiz.json → manifests/dBiz.json View File


plugins/dekstop.json → manifests/dekstop.json View File


plugins/luckyxxl.json → manifests/luckyxxl.json View File


plugins/mental.json → manifests/mental.json View File


plugins/moDllz.json → manifests/moDllz.json View File


plugins/mscHack.json → manifests/mscHack.json View File


plugins/mtsch-plugins.json → manifests/mtsch-plugins.json View File


plugins/s-ol.json → manifests/s-ol.json View File


plugins/trowaSoft.json → manifests/trowaSoft.json View File


+ 0
- 1056
package-lock.json
File diff suppressed because it is too large
View File


+ 0
- 24
package.json View File

@@ -1,24 +0,0 @@
{
"name": "community",
"version": "1.0.0",
"description": "*Manifest repository for VCV Rack plugins*",
"scripts": {
"test": "jasmine"
},
"repository": {
"type": "git",
"url": "git+https://github.com/VCVRack/community.git"
},
"bugs": {
"url": "https://github.com/VCVRack/community/issues"
},
"homepage": "https://github.com/VCVRack/community#readme",
"devDependencies": {
"adm-zip": "^0.4.7",
"ajv": "^5.5.2",
"hash-files": "^1.1.1",
"jasmine": "^2.8.0",
"node-virustotal": "^2.4.2",
"request": "^2.83.0"
}
}

+ 0
- 36
spec/README.md View File

@@ -1,36 +0,0 @@
# Tests

## Jasmine

[Jasmine Intro](https://jasmine.github.io/2.8/introduction.html)

Tests only run on changed manifests files.

To run all tests:
```
npm test
```

To force the tests to run for certain manifest files:
```
TEST_MANIFEST=plugins/JW-Modules.json npm test
```

## Schema Validation

Our schema is [here](./manifest.json)

We use [ajv](https://github.com/epoberezkin/ajv) to validate manifests against that schema.


## Virus Total

*Currently Disabled because they are slow and annoying*

**Rate Limit: 4 per minute**

`VT_API_KEY` env var is required and already set in travisci settings

[Public API](https://www.virustotal.com/en/documentation/public-api/v2/)



+ 0
- 116
spec/manifest.json View File

@@ -1,116 +0,0 @@
{
"id": "manifest.json",
"type": "object",
"additionalProperties": false,
"required": [
"slug",
"version"
],
"description": "A plugin manifest file for VCV Rack.",
"properties": {
"slug": {
"type": "string",
"description": "SEE README"
},
"name": {
"type": "string",
"description": "SEE README"
},
"author": {
"type": "string",
"description": "SEE README"
},
"license": {
"type": "string",
"description": "SEE README"
},
"version": {
"type": "string",
"description": "SEE README"
},
"homepage": {
"type": "string",
"description": "SEE README"
},
"donation": {
"type": "string",
"description": "SEE README"
},
"manual": {
"type": "string",
"description": "SEE README"
},
"source": {
"type": "string",
"description": "SEE README"
},
"disabled": {
"type": "boolean",
"description": "used when a plugin needs to be disabled"
},
"productId": {
"type": "string",
"description": "only used by vcv rack website"
},
"downloads": {
"type": "object",
"additionalProperties": false,
"properties": {
"win": {
"type": "object",
"additionalProperties": false,
"required": [
"download",
"sha256"
],
"properties": {
"download": {
"type": "string",
"description": "SEE README"
},
"sha256": {
"type": "string",
"description": "SEE README"
}
}
},
"lin": {
"type": "object",
"additionalProperties": false,
"required": [
"download",
"sha256"
],
"properties": {
"download": {
"type": "string",
"description": "SEE README"
},
"sha256": {
"type": "string",
"description": "SEE README"
}
}
},
"mac": {
"type": "object",
"additionalProperties": false,
"required": [
"download",
"sha256"
],
"properties": {
"download": {
"type": "string",
"description": "SEE README"
},
"sha256": {
"type": "string",
"description": "SEE README"
}
}
}
}
}
}
}

+ 0
- 158
spec/manifest.tests.spec.js View File

@@ -1,158 +0,0 @@
const TEMP_DIR = ".tmp-zips/";
const CUR_VER_PREFIX = '0.5';
const MF_DIR = 'plugins';
const fs = require("fs");

const Ajv = require('ajv'); //https://github.com/epoberezkin/ajv
const ajv = new Ajv({allErrors:true});
const validate = ajv.compile(require('./manifest.json'));

const request = require("request");
const { execSync } = require('child_process');
const AdmZip = require('adm-zip'); //https://github.com/cthackers/adm-zip
const hashFiles = require('hash-files'); //https://github.com/mac-/hash-files
const manifestsToTest = getManifestsThatApply();

if(manifestsToTest.length === 0){
console.log("No manifest files to test.");
return;
}

//virus total stuff
const VIRUS_TOTAL_ENABLED = false;
const vt = require("node-virustotal"); //https://github.com/natewatson999/node-virustotal
const con = vt.MakePublicConnection();
if(VIRUS_TOTAL_ENABLED){
con.setKey(process.env.VT_API_KEY);
con.setDelay(15000);
jasmine.DEFAULT_TIMEOUT_INTERVAL = manifestsToTest.length * 4 * con.getDelay();
}

describe("test manifests", function() {
beforeEach(()=>{
execSync(`mkdir -p ${TEMP_DIR}`)
});
afterEach(()=>{
execSync(`rm ${TEMP_DIR}*.zip`)
fs.rmdirSync(TEMP_DIR);
});

const testMF = (filePath) => {
it("valid properties and zip files", function(done) {

try {
if (!filePath.toLowerCase().endsWith('.json')) {
fail("manifests should have .json extension");
}

const fileContent = fs.readFileSync(filePath, 'utf8');
const mfObj = JSON.parse(fileContent);
const valid = validate(mfObj);
if (!valid) {
validate.errors.map(e => e.message += ` in ${filePath}`)
fail(validate.errors);
}

if (!(/^[a-zA-Z0-9_\-]*$/).test(mfObj.slug)) {
fail(`slug does not match regex in ${filePath}`);
}

const fileName = filePath.replace('plugins/', '');
if (fileName.replace('.json', '') !== mfObj.slug) {
fail(`slug '${mfObj.slug}' does not match fileName: ${fileName}`);
}

if (mfObj.version && !mfObj.version.startsWith(CUR_VER_PREFIX)) {
fail(`version '${mfObj.version}' must start with '${CUR_VER_PREFIX}'`);
}

if(mfObj.downloads){
const urlsChecked = [];
let lastSha256;
['win', 'lin', 'mac'].map(os => {
const osObj = mfObj.downloads[os];
if(osObj && osObj.download && osObj.sha256){
const zipUrl = osObj.download;
if(urlsChecked.includes(zipUrl)){
if(lastSha256 !== osObj.sha256){
fail("SHA256 should be the same if the download URL is the same");
}
} else {
urlsChecked.push(zipUrl);
lastSha256 = osObj.sha256;
testOneZip(mfObj.slug, osObj, done);
}
}
});
}

} catch(err){
fail(`Error while trying to validate manifest: ${filePath}\n${err}`);
}
});
};

manifestsToTest.map(testMF);
});

function testOneZip(expectedRootDir, osObj, done) {
const urlParts = osObj.download.split('/');
const zipName = urlParts[urlParts.length - 1].split('\?')[0];
request(osObj.download).pipe(fs.createWriteStream(TEMP_DIR+zipName)).on('finish', ()=>{

console.log(`Downloaded ${TEMP_DIR+zipName}`);
const zip = new AdmZip(TEMP_DIR+zipName);
const zipEntries = zip.getEntries();
// zipEntries.map(ze=>console.log(ze.toString()));

const slugDirFound = zipEntries.find(ze => ze.isDirectory &&
(ze.entryName === expectedRootDir+'/' || ze.entryName === expectedRootDir+'\\')
);
if(slugDirFound){
const invalidEntry = zipEntries.find(ze => !ze.entryName.startsWith(slugDirFound.entryName));
if(invalidEntry){
fail(`Zip entries should all be under a dir named ${expectedRootDir} but this entry was found: ${invalidEntry.entryName}`);
}
} else {
fail(`Zip should have one dir named ${expectedRootDir}`);
}


if(VIRUS_TOTAL_ENABLED){
con.FileEvaluation(zipName, "application/zip", fs.readFileSync(TEMP_DIR+zipName), function(data) {
console.log(data);
if(osObj.sha256 !== data.sha256){
throw new Error(`Invalid sha256 value. manifest:${osObj.sha256} virustotal:${data.sha256}`);
}
if(data.positives > 2){
throw new Error(`Too many positives from virustotal.`);
}
done();
}, function(err) {
if (err){ throw err; }
done();
});
} else {
hashFiles({files:[TEMP_DIR+zipName], algorithm:'sha256'}, function(error, hash) {
if(osObj.sha256 !== hash){
throw new Error(`Invalid sha256 value. manifest:${osObj.sha256} hash:${hash}`);
}
done();
});
}
});
}

function getManifestsThatApply(){
let paths = "";
if(process.env.TEST_MANIFEST){
paths = process.env.TEST_MANIFEST;
} else {
paths = execSync(`git diff -w --stat --name-only origin/master -- ${MF_DIR}/`, {encoding:'utf8'});
}
return paths.trim().split('\n').filter(s=>s.trim() !== '');
}


+ 0
- 11
spec/support/jasmine.json View File

@@ -1,11 +0,0 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": false
}

Loading…
Cancel
Save