Skip to content

Commit

Permalink
Config specification v2 (#1576)
Browse files Browse the repository at this point in the history
* Read yaml config

* Testing groupd for v2

* Allow verbose logging

* Implement plugin system

* Properly run steps, actions, and substeps

* Call plugin with immediate value

* Implement core:group and core:user_action steps

* implement core:download action

* Implement core:unpack action

* Implement core:manual_download

* Implement fastboot:oem_unlock and fastboot:flashing_unlock steps

* Move more stuff to handlers

* Allow resuming and retrying

* test end screen

* Test some error handling

* Nuke devices.js

* Implement remote_values plugins

* Disuse some globals

* Fix tests

* Begin restructuring plugins

* Implement props object

* Implement plugin index class

* restructuring

* some skips

* get rid of all globals except packageInfo

* Improve flow

* successful run of ubuntu touch on the nexus 5

* Deprecate ubports-api-node-module

* Arch optimization

* hand over mainEvent

* organize access to logger

* Do not require deviceTools from main

* Allow API to time out

* move deviceTools to core

* Move systemimage client to core

* read config from core

* Streamlining

* Implement eula

* Update deps

* Get correct channels

* fix issue where null device was detected

* Implement unlock code ui
  • Loading branch information
NeoTheThird authored Dec 3, 2020
1 parent 71f0ea4 commit e110458
Show file tree
Hide file tree
Showing 46 changed files with 16,823 additions and 1,226 deletions.
5 changes: 5 additions & 0 deletions __mocks__/7zip-min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const _7z = {
unpack: jest.fn().mockImplementation((a, b, cb) => cb())
};

module.exports = _7z;
8 changes: 8 additions & 0 deletions __mocks__/axios.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const axios = {
get: jest.fn().mockResolvedValue(),
create: jest.fn()
};

axios.create.mockReturnValue(axios);

module.exports = axios;
6 changes: 4 additions & 2 deletions __mocks__/fs-extra.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const fs = {
ensureDir: jest.fn(),
emptyDir: jest.fn()
ensureDir: jest.fn().mockResolvedValue(),
copyFile: jest.fn().mockResolvedValue(),
emptyDir: jest.fn(),
readdirSync: jest.fn().mockReturnValue([])
};

module.exports = fs;
18 changes: 18 additions & 0 deletions __mocks__/progressive-downloader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const { speed } = require("jquery");

const dl = {
checkFile: jest.fn().mockResolvedValue(true),
download: jest.fn().mockImplementation((files, progress, next, activity) =>
Promise.resolve().then(() => {
activity("preparing");
activity("downloading");
next(0, files.length);
progress(0, 0);
progress(0.5, 5);
files.forEach((f, i) => next(i + 1, files.length));
progress(1);
})
)
};

module.exports = dl;
Loading

0 comments on commit e110458

Please sign in to comment.