This commit is contained in:
pelikhan 2022-01-26 14:00:03 -08:00
Родитель 8785d2587a
Коммит 56ae3f912d
3 изменённых файлов: 1741 добавлений и 1369 удалений

Просмотреть файл

@ -31,40 +31,40 @@
}
},
"dependencies": {
"jacdac-ts": "^1.20.0",
"jacdac-ts": "^1.24.5",
"webusb": "^2.2.0",
"serialport": "^9.2.5"
"serialport": "^9.2.8"
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.3.0",
"@semantic-release/exec": "^6.0.2",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/express": "^4.17.13",
"@types/jest": "^27.0.2",
"@types/node": "^16.11.6",
"@types/node-red": "^1.1.1",
"@types/jest": "^27.4.0",
"@types/node": "^17.0.12",
"@types/node-red": "^1.2.0",
"@types/node-red-node-test-helper": "^0.2.2",
"@types/sinon": "^10.0.6",
"@types/sinon": "^10.0.8",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"colorette": "^2.0.16",
"concurrently": "^6.3.0",
"concurrently": "^7.0.0",
"copyfiles": "^2.4.1",
"eslint": "^8.1.0",
"eslint": "^8.7.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jest": "^25.2.2",
"eslint-plugin-jest": "^26.0.0",
"glob": "^7.2.0",
"jest": "^27.3.1",
"jest": "^27.4.7",
"mustache": "^4.2.0",
"node-red": "^2.1.3",
"node-red": "^2.1.6",
"node-red-node-test-helper": "^0.2.7",
"onchange": "^7.1.0",
"prettier": "^2.4.1",
"rollup": "^2.59.0",
"semantic-release": "^18.0.0",
"ts-jest": "^27.0.7",
"typescript": "^4.4.4"
"prettier": "^2.5.1",
"rollup": "^2.66.1",
"semantic-release": "^19.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5"
},
"jest": {
"testEnvironment": "node",

Просмотреть файл

@ -9,13 +9,30 @@ import {
Transport,
createUSBTransport,
createNodeWebSerialTransport,
createNodeSPITransport,
} from "jacdac-ts"
function tryRequire(id: string) {
try {
return require(id)
} catch (e) {
return undefined
}
}
const usb = tryRequire("webusb")
const serialport = tryRequire("serialport")
const rpio = tryRequire("rpio")
const transports: Transport[] = [
createUSBTransport(createNodeUSBOptions()),
createNodeWebSerialTransport(require("serialport")),
usb && createUSBTransport(createNodeUSBOptions()),
serialport && createNodeWebSerialTransport(serialport),
rpio && createNodeSPITransport(require(rpio)),
]
export const bus = new JDBus(transports, { client: false })
export const bus = new JDBus(transports, {
client: false,
disableRoleManager: true,
})
export function connectStatus(node: Node) {
const updateStatus = () => {

3049
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу