Add Robot_JoyIt driver

This commit is contained in:
2026-01-17 16:50:07 +01:00
parent e9e50acf5f
commit 0cfb4d5a95
15848 changed files with 570836 additions and 268976 deletions

4
node_modules/pirates/README.md generated vendored
View File

@@ -2,6 +2,10 @@
### Properly hijack require
This library allows to add custom require hooks, which do not interfere with other require hooks.
This library only works with commonJS.
[codecov-badge]: https://img.shields.io/codecov/c/github/danez/pirates/master.svg?style=flat "codecov"
[codecov-link]: https://codecov.io/gh/danez/pirates "codecov"

50
node_modules/pirates/lib/index.js generated vendored
View File

@@ -1,18 +1,23 @@
"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.addHook = addHook;
var _module = _interopRequireDefault(require("module"));
var _path = _interopRequireDefault(require("path"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* (c) 2015 Ari Porad (@ariporad) <http://ariporad.com>. License: ariporad.mit-license.org */
const BuiltinModule = require('module');
const path = require('path');
const nodeModulesRegex = /^(?:.*[\\/])?node_modules(?:[\\/].*)?$/;
// Guard against poorly mocked module constructors.
const Module = module.constructor.length > 1 ? module.constructor : _module.default;
const HOOK_RETURNED_NOTHING_ERROR_MESSAGE = '[Pirates] A hook returned a non-string, or nothing at all! This is a' + ' violation of intergalactic law!\n' + '--------------------\n' + 'If you have no idea what this means or what Pirates is, let me explain: ' + 'Pirates is a module that makes is easy to implement require hooks. One of' + " the require hooks you're using uses it. One of these require hooks" + " didn't return anything from it's handler, so we don't know what to" + ' do. You might want to debug this.';
// Guard against poorly-mocked module constructors.
const Module =
module.constructor.length > 1 ? module.constructor : BuiltinModule;
const HOOK_RETURNED_NOTHING_ERROR_MESSAGE =
'[Pirates] A hook returned a non-string, or nothing at all! This is a' +
' violation of intergalactic law!\n' +
'--------------------\n' +
'If you have no idea what this means or what Pirates is, let me explain: ' +
'Pirates is a module that makes it easy to implement require hooks. One of' +
" the require hooks you're using uses it. One of these require hooks" +
" didn't return anything from it's handler, so we don't know what to" +
' do. You might want to debug this.';
/**
* @param {string} filename The filename to check.
@@ -24,16 +29,19 @@ function shouldCompile(filename, exts, matcher, ignoreNodeModules) {
if (typeof filename !== 'string') {
return false;
}
if (exts.indexOf(_path.default.extname(filename)) === -1) {
if (exts.indexOf(path.extname(filename)) === -1) {
return false;
}
const resolvedFilename = _path.default.resolve(filename);
const resolvedFilename = path.resolve(filename);
if (ignoreNodeModules && nodeModulesRegex.test(resolvedFilename)) {
return false;
}
if (matcher && typeof matcher === 'function') {
return !!matcher(resolvedFilename);
}
return true;
}
@@ -86,18 +94,21 @@ function addHook(hook, opts = {}) {
// We modify the .js loader, then use the modified .js loader for as the base for .jsx.
// This prevents that.
const originalJSLoader = Module._extensions['.js'];
const matcher = opts.matcher || null;
const ignoreNodeModules = opts.ignoreNodeModules !== false;
exts = opts.extensions || opts.exts || opts.extension || opts.ext || ['.js'];
if (!Array.isArray(exts)) {
exts = [exts];
}
exts.forEach(ext => {
exts.forEach((ext) => {
if (typeof ext !== 'string') {
throw new TypeError(`Invalid Extension: ${ext}`);
}
const oldLoader = Module._extensions[ext] || originalJSLoader;
oldLoaders[ext] = Module._extensions[ext];
loaders[ext] = Module._extensions[ext] = function newLoader(mod, filename) {
let compile;
if (!reverted) {
@@ -114,19 +125,22 @@ function addHook(hook, opts = {}) {
if (typeof newCode !== 'string') {
throw new Error(HOOK_RETURNED_NOTHING_ERROR_MESSAGE);
}
return mod._compile(newCode, filename);
};
}
}
oldLoader(mod, filename);
};
});
return function revert() {
if (reverted) return;
reverted = true;
exts.forEach(ext => {
exts.forEach((ext) => {
// if the current loader for the extension is our loader then unregister it and set the oldLoader again
// if not we can not do anything as we cannot remove a loader from within the loader-chain
// if not we cannot do anything as we cannot remove a loader from within the loader-chain
if (Module._extensions[ext] === loaders[ext]) {
if (!oldLoaders[ext]) {
delete Module._extensions[ext];
@@ -136,4 +150,6 @@ function addHook(hook, opts = {}) {
}
});
};
}
}
exports.addHook = addHook;

37
node_modules/pirates/package.json generated vendored
View File

@@ -4,11 +4,7 @@
"main": "lib/index.js",
"types": "index.d.ts",
"scripts": {
"clean": "rimraf lib",
"build": "babel src -d lib",
"test": "cross-env BABEL_ENV=test yarn run build && nyc ava",
"lint": "eslint --report-unused-disable-directives .",
"prepublishOnly": "yarn run build"
"test": "ava"
},
"files": [
"lib",
@@ -27,24 +23,8 @@
"url": "http://ariporad.com"
},
"devDependencies": {
"@babel/cli": "7.21.0",
"@babel/core": "7.21.4",
"@babel/preset-env": "7.21.4",
"ava": "1.4.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.1.0",
"babel-plugin-istanbul": "5.2.0",
"cross-env": "5.2.1",
"decache": "4.6.1",
"eslint": "5.16.0",
"eslint-config-prettier": "4.3.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-prettier": "3.4.1",
"mock-require": "3.0.3",
"nyc": "13.3.0",
"prettier": "1.19.1",
"rewire": "4.0.1",
"rimraf": "3.0.2"
"decache": "4.6.2"
},
"license": "MIT",
"bugs": {
@@ -59,16 +39,5 @@
"lib/**/*.js"
]
},
"nyc": {
"include": [
"src/*.js"
],
"reporter": [
"json",
"text"
],
"sourceMap": false,
"instrument": false
},
"version": "4.0.6"
"version": "4.0.7"
}