MCPcopy Create free account
hub / github.com/bajrangCoder/acode-plugin-packageAdder / addLibrary

Method addLibrary

src/main.js:389–406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

387 }
388
389 async addLibrary(){
390 const addLibTypeSelector = await select('Select Type', ["Api","Download Files"], {default: "Api",});
391 let filesCheckbox = document.querySelectorAll(".filesCheckBox");
392 let filesArray = [];
393 for (var i = 0; i < filesCheckbox.length; i++) {
394 if (filesCheckbox[i].checked) {
395 filesArray.push(filesCheckbox[i].value);
396 }
397 }
398 switch (addLibTypeSelector) {
399 case 'Api':
400 this.addThroughApi(filesArray);
401 break;
402 case 'Download Files':
403 this.addThroughDownload(filesArray);
404 break;
405 }
406 }
407
408 async destroy() {
409 editorManager.editor.commands.removeCommand("packageAdder");

Callers

nothing calls this directly

Calls 2

addThroughApiMethod · 0.95
addThroughDownloadMethod · 0.95

Tested by

no test coverage detected