added panel mgmt

This commit is contained in:
2025-07-01 14:09:27 +02:00
parent 5aca14159b
commit 6bc2fc8bf3
2195 changed files with 146523 additions and 5 deletions

View File

@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10

View File

@@ -0,0 +1,58 @@
var spawn = require('child_process').spawn;
var path = require('path');
var fs = require('fs');
function installArchSpecificPackage(version, require) {
process.env.npm_config_global = 'false';
process.env.npm_config_repository = '';
var platform = process.platform == 'win32' ? 'win' : process.platform;
var arch = platform == 'win' && process.arch == 'ia32' ? 'x86' : process.arch;
var prefix = (process.platform == 'darwin' && process.arch == 'arm64') ? 'node-bin' : 'node';
var cp = spawn(platform == 'win' ? 'npm.cmd' : 'npm', ['install', '--no-save', [prefix, platform, arch].join('-') + '@' + version], {
stdio: 'inherit',
shell: true
});
cp.on('close', function(code) {
var pkgJson = require.resolve([prefix, platform, arch].join('-') + '/package.json');
var subpkg = JSON.parse(fs.readFileSync(pkgJson, 'utf8'));
var executable = subpkg.bin.node;
var bin = path.resolve(path.dirname(pkgJson), executable);
try {
fs.mkdirSync(path.resolve(process.cwd(), 'bin'));
} catch (e) {
if (e.code != 'EEXIST') {
throw e;
}
}
linkSync(bin, path.resolve(process.cwd(), executable));
if (platform == 'win') {
var pkg = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), 'package.json')));
fs.writeFileSync(path.resolve(process.cwd(), 'bin/node'), 'This file intentionally left blank');
pkg.bin.node = 'bin/node.exe';
fs.writeFileSync(path.resolve(process.cwd(), 'package.json'), JSON.stringify(pkg, null, 2));
}
return process.exit(code);
});
}
function linkSync(src, dest) {
try {
fs.unlinkSync(dest);
} catch (e) {
if (e.code != 'ENOENT') {
throw e;
}
}
return fs.linkSync(src, dest);
}
module.exports = installArchSpecificPackage;

View File

@@ -0,0 +1,12 @@
{
"name": "node-bin-setup",
"version": "1.1.4",
"description": "Internal script used by the node package to install architecture-specific packages",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/aredridel/node-bin-setup.git"
},
"author": "Aria Stewart <aredridel@dinhe.net>",
"license": "ISC"
}