Footprint sideloading progress

This commit is contained in:
Bán Dénes 2022-11-14 00:40:05 +01:00
parent 4446a60380
commit 24466eb01d
8 changed files with 279 additions and 29 deletions

View file

@ -92,8 +92,22 @@ const process = async (raw, debug=false, logger=()=>{}) => {
return results
}
const inject = (type, name, value) => {
if (value === undefined) {
value = name
name = type
type = 'footprint'
}
switch (type) {
case 'footprint':
return pcbs_lib.inject_footprint(name, value)
default:
throw new Error(`Unknown injection type "${type}" with name "${name}" and value "${value}"!`)
}
}
module.exports = {
version,
process,
inject_footprint: pcbs_lib.inject_footprint
inject
}