initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

48
node_modules/clipboardy/lib/linux.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
'use strict';
const path = require('path');
const execa = require('execa');
const handler = err => {
if (err.code === 'ENOENT') {
throw new Error('Couldn\'t find the required `xsel` binary. On Debian/Ubuntu you can install it with: sudo apt install xsel');
}
throw err;
};
const xsel = path.join(__dirname, '../fallbacks/linux/xsel');
module.exports = {
copy: opts => {
return execa(xsel, ['--clipboard', '--input'], opts)
.catch(() => execa('xsel', ['--clipboard', '--input'], opts))
.catch(handler);
},
paste: opts => {
return execa.stdout(xsel, ['--clipboard', '--output'], opts)
.catch(() => execa.stdout('xsel', ['--clipboard', '--output'], opts))
.catch(handler);
},
copySync: opts => {
try {
return execa.sync(xsel, ['--clipboard', '--input'], opts);
} catch (err) {
try {
return execa.sync('xsel', ['--clipboard', '--input'], opts);
} catch (err) {
handler(err);
}
}
},
pasteSync: opts => {
try {
return execa.sync(xsel, ['--clipboard', '--output'], opts);
} catch (err) {
try {
return execa.sync('xsel', ['--clipboard', '--output'], opts);
} catch (err) {
handler(err);
}
}
}
};

11
node_modules/clipboardy/lib/macos.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
'use strict';
const execa = require('execa');
const env = Object.assign({}, process.env, {LC_CTYPE: 'UTF-8'});
module.exports = {
copy: opts => execa('pbcopy', Object.assign({}, opts, {env})),
paste: opts => execa.stdout('pbpaste', Object.assign({}, opts, {env})),
copySync: opts => execa.sync('pbcopy', Object.assign({}, opts, {env})),
pasteSync: opts => execa.sync('pbpaste', Object.assign({}, opts, {env}))
};

29
node_modules/clipboardy/lib/termux.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
'use strict';
const execa = require('execa');
const handler = err => {
if (err.code === 'ENOENT') {
throw new Error('Couldn\'t find the termux-api scripts. You can install them with: apt install termux-api');
}
throw err;
};
module.exports = {
copy: opts => execa('termux-clipboard-set', opts).catch(handler),
paste: opts => execa.stdout('termux-clipboard-get', opts).catch(handler),
copySync: opts => {
try {
return execa.sync('termux-clipboard-set', opts);
} catch (err) {
handler(err);
}
},
pasteSync: opts => {
try {
return execa.sync('termux-clipboard-get', opts);
} catch (err) {
handler(err);
}
}
};

16
node_modules/clipboardy/lib/windows.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
'use strict';
const path = require('path');
const execa = require('execa');
const arch = require('arch');
// Binaries from: https://github.com/sindresorhus/win-clipboard
const winBinPath = arch() === 'x64' ?
path.join(__dirname, '../fallbacks/windows/clipboard_x86_64.exe') :
path.join(__dirname, '../fallbacks/windows/clipboard_i686.exe');
module.exports = {
copy: opts => execa(winBinPath, ['--copy'], opts),
paste: opts => execa.stdout(winBinPath, ['--paste'], opts),
copySync: opts => execa.sync(winBinPath, ['--copy'], opts),
pasteSync: opts => execa.sync(winBinPath, ['--paste'], opts)
};