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

19
node_modules/envinfo/.editorconfig generated vendored Normal file
View File

@@ -0,0 +1,19 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
insert_final_newline = true
trim_trailing_whitespace = true
[Makefile]
indent_style = tab
[*.md]
trim_trailing_whitespace = false
indent_size = 4

14
node_modules/envinfo/.eslintrc.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
module.exports = {
env: {
node: true
},
extends: ['airbnb-base/legacy', 'prettier'],
parserOptions: {
sourceType: 'module'
},
plugins: ['prettier'],
rules: {
'vars-on-top': 0,
'prettier/prettier': ['error']
},
};

5
node_modules/envinfo/.prettierrc generated vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"singleQuote": true,
"printWidth": 100,
"trailingComma": "es5"
}

118
node_modules/envinfo/README.md generated vendored Normal file
View File

@@ -0,0 +1,118 @@
# envinfo
Reporting issues is a pain. Responding to issues is a pain. Make it a bit better.
## Installation & Usage
Install this package globally:
```sh
npm install -g envinfo
envinfo
```
```bash
# Outputs.
Environment:
OS: macOS High Sierra 10.13
Node: 8.9.0
Yarn: 1.2.1
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.3 AI-162.3934792
```
## Options
- --packages - Optionally add packages from your package.json: takes either boolean or string in CLI and also array via API
`envinfo --packages react,react-native`
```bash
Environment:
OS: macOS High Sierra 10.13
Node: 8.9.0
Yarn: 1.2.1
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.3 AI-162.3934792
Packages: (wanted => installed)
react: 16.0.0-alpha.6 => 16.0.0-alpha.6
react-native: 0.44.0 => 0.44.0
```
Or all of your packages like this:
`envinfo --packages`
```bash
Environment:
OS: macOS Sierra 10.12.5
Node: 8.1.3
Yarn: 0.27.5
npm: 5.1.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: 2.3 AI-162.3934792
Packages: (wanted => installed)
eslint: ^4.0.0 => 4.2.0
prettier-eslint-cli: ^4.1.1 => 4.1.1
minimist: ^1.2.0 => 1.2.0
os-name: ^2.0.1 => 2.0.1
which: ^1.2.14 => 1.2.14
```
- --clipboard - Optionally copy directly to your clipboard with `envinfo --clipboard`
- --cpu - Add CPU and architecture information with `envinfo --cpu`
```bash
Environment:
OS: macOS High Sierra 10.13
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 8.50GHz
Node: 8.9.0
Yarn: 1.2.1
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.3 AI-162.3934792
```
- --duplicates - will search given packages for duplicates, display in parentheses
```bash
Packages: (wanted => installed)
minimist: ^1.2.0 => 0.0.8, 1.2.0
```
- --fullTree - will traverse and print the entire dependency tree **only works when --packages is array or string
```bash
...
Packages: (wanted => installed)
abab: 1.0.4
xtend: 4.0.1 (2.0.6, 2.1.2, 2.2.0, 3.0.0)
abstract-leveldown: 0.12.4
accepts: 1.3.3
...
```
- --browsers - will print the versions of Chrome, Firefox and Safari if installed.
```bash
...
Browsers:
Chrome: 62.0.3202.94
Chrome Canary: 64.0.3271.0
Firefox: 57.0
Firefox Developer Edition: 57.0
Firefox Nightly: 58.0a1
Safari: 11.0
Safari Technology Preview: 11.1
...
```
## Contributing
PRs for additional features are welcome! Run `npm run lint && npm run format` before commiting.
This project came out of a [PR](https://github.com/facebook/react-native/pull/14428) to the React Native CLI tool - issues are reported frequently without important environment information, like Node/npm versions.
envinfo is now live in react-native as of v0.48 as `react-native info`!

100
node_modules/envinfo/package.json generated vendored Normal file
View File

@@ -0,0 +1,100 @@
{
"_args": [
[
"envinfo@^3.0.0",
"/home/bernhard/freifunk-app/node_modules/react-native"
]
],
"_from": "envinfo@>=3.0.0 <4.0.0",
"_id": "envinfo@3.11.1",
"_inCache": true,
"_installable": true,
"_location": "/envinfo",
"_nodeVersion": "8.9.4",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/envinfo-3.11.1.tgz_1516739742535_0.9975670473650098"
},
"_npmUser": {
"email": "tabrindle@gmail.com",
"name": "tabrindle"
},
"_npmVersion": "5.6.0",
"_phantomChildren": {},
"_requested": {
"name": "envinfo",
"raw": "envinfo@^3.0.0",
"rawSpec": "^3.0.0",
"scope": null,
"spec": ">=3.0.0 <4.0.0",
"type": "range"
},
"_requiredBy": [
"/react-native"
],
"_resolved": "https://registry.npmjs.org/envinfo/-/envinfo-3.11.1.tgz",
"_shasum": "45968faf5079aa797b7dcdc3b123f340d4529e1c",
"_shrinkwrap": null,
"_spec": "envinfo@^3.0.0",
"_where": "/home/bernhard/freifunk-app/node_modules/react-native",
"author": {
"name": "tabrindle@gmail.com"
},
"bin": {
"envinfo": "src/cli.js"
},
"bugs": {
"url": "https://github.com/tabrindle/envinfo/issues"
},
"dependencies": {
"clipboardy": "^1.2.2",
"glob": "^7.1.2",
"minimist": "^1.2.0",
"os-name": "^2.0.1",
"which": "^1.2.14"
},
"description": "Info about your dev environment for debugging purposes",
"devDependencies": {
"eslint": "^4.10.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.7.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-prettier": "^2.3.1",
"prettier-eslint-cli": "^4.1.1"
},
"directories": {},
"dist": {
"integrity": "sha512-hKkh7aKtont6Zuv4RmE4VkOc96TkBj9NXj7Ghsd/qCA9LuJI0Dh+ImwA1N5iORB9Vg+sz5bq9CHJzs51BILNCQ==",
"shasum": "45968faf5079aa797b7dcdc3b123f340d4529e1c",
"tarball": "https://registry.npmjs.org/envinfo/-/envinfo-3.11.1.tgz"
},
"gitHead": "94cd74122b238a09450adcb08516e1f7e59240bc",
"homepage": "https://github.com/tabrindle/envinfo#readme",
"keywords": [
"development",
"environment",
"info",
"issues",
"reporting"
],
"license": "MIT",
"main": "src/envinfo.js",
"maintainers": [
{
"name": "tabrindle",
"email": "tabrindle@gmail.com"
}
],
"name": "envinfo",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/tabrindle/envinfo.git"
},
"scripts": {
"format": "prettier --write 'src/**/*.js'",
"lint": "eslint src"
},
"version": "3.11.1"
}

6
node_modules/envinfo/src/cli.js generated vendored Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env node
var envinfo = require('./envinfo.js');
var argv = require('minimist')(process.argv.slice(2));
envinfo.print(argv);

114
node_modules/envinfo/src/envinfo.js generated vendored Executable file
View File

@@ -0,0 +1,114 @@
#!/usr/bin/env node
'use strict';
var helpers = require('./helpers');
var copypasta = require('clipboardy');
module.exports.helpers = helpers;
module.exports.print = function print(opts) {
var options = opts || {};
var log = [];
log.push('');
options.clipboard ? log.push('Environment:') : log.push('\x1b[4mEnvironment:\x1b[0m');
log.push(' OS: ' + helpers.getOperatingSystemInfo());
if (options.cpu) log.push(' CPU: ' + helpers.getCPUInfo());
log.push(' Node: ' + helpers.getNodeVersion());
log.push(' Yarn: ' + helpers.getYarnVersion());
log.push(' npm: ' + helpers.getNpmVersion());
log.push(' Watchman: ' + helpers.getWatchmanVersion());
if (!options.noNativeIDE) log.push(' Xcode: ' + helpers.getXcodeVersion());
if (!options.noNativeIDE) log.push(' Android Studio: ' + helpers.getAndroidStudioVersion());
log.push('');
if (options.browsers && process.platform === 'darwin') {
options.clipboard ? log.push('Browsers:') : log.push('\x1b[4mBrowsers:\x1b[0m');
var browsers = helpers.browserBundleIdentifiers;
var browserVersions = Object.keys(browsers).map(function browserMap(browser) {
return ' ' + browser + ': ' + helpers.getDarwinApplicationVersion(browsers[browser]);
});
log = log.concat(browserVersions);
log.push('');
}
if (options.packages) {
var packageJson = helpers.getPackageJsonByPath('/package.json');
if (!packageJson) {
log.push('ERROR: package.json not found!');
log.push('');
log = log.join('\n');
if (options.clipboard) copypasta.copy(log);
console.log(log);
return;
}
options.clipboard
? log.push('Packages: (wanted => installed)')
: log.push('\x1b[4mPackages:\x1b[0m (wanted => installed)');
var devDependencies = packageJson.devDependencies || {};
var dependencies = packageJson.dependencies || {};
var topLevelDependencies = Object.assign({}, devDependencies, dependencies);
var packagePaths;
if (options.duplicates || options.fullTree) {
packagePaths = helpers.getAllPackageJsonPaths();
}
var logFunction = function logFunc(dep) {
var trimmedDep = dep.trim();
var wanted = topLevelDependencies[trimmedDep] || '';
var dependencyPackageJson = helpers.getPackageJsonByName(dep);
var installed = dependencyPackageJson ? dependencyPackageJson.version : 'Not Found';
var duplicates = '';
if (options.duplicates) {
duplicates = helpers
.getModuleVersions(dep, packagePaths)
.filter(depVer => depVer !== installed)
.join(', ');
if (duplicates) duplicates = ' (' + duplicates + ')';
}
if (wanted) wanted += ' => ';
log.push(' ' + trimmedDep + ': ' + wanted + installed + duplicates);
};
if (Array.isArray(options.packages)) {
options.packages.map(logFunction);
} else if (typeof options.packages === 'string') {
options.packages.split(',').map(logFunction);
} else if (typeof options.packages === 'boolean') {
if (options.fullTree) {
var allDependencies = packagePaths
.map(filePath => {
var json = helpers.getPackageJsonByPath(filePath);
return {
name: json.name,
version: json.version,
};
})
.reduce((acc, val) => {
return Object.assign(acc, {
[val.name]: acc[val.name] ? acc[val.name].concat([val.version]) : [val.version],
});
}, {});
Object.keys(allDependencies).map(logFunction);
} else {
Object.keys(topLevelDependencies).map(logFunction);
}
}
log.push('');
}
log = log.join('\n');
if (options.clipboard) {
copypasta.writeSync(log);
}
console.log(log);
};

257
node_modules/envinfo/src/helpers.js generated vendored Normal file
View File

@@ -0,0 +1,257 @@
var childProcess = require('child_process');
var fs = require('fs');
var glob = require('glob');
var os = require('os');
var osName = require('os-name');
var path = require('path');
var which = require('which');
var browserBundleIdentifiers = {
Chrome: 'com.google.Chrome',
'Chrome Canary': 'com.google.Chrome.canary',
Firefox: 'org.mozilla.firefox',
'Firefox Developer Edition': 'org.mozilla.firefoxdeveloperedition',
'Firefox Nightly': 'org.mozilla.nightly',
Safari: 'com.apple.Safari',
'Safari Technology Preview': 'com.apple.SafariTechnologyPreview',
};
function uniq(arr) {
return Array.from(new Set(arr));
}
function requireJson(filePath) {
var packageJson;
if (fs.existsSync(filePath)) {
try {
packageJson = require(filePath);
} catch (e) {
return false;
}
return packageJson;
}
return false;
}
function getPackageJsonByName(dep) {
return this.requireJson(path.join(process.cwd(), '/node_modules/', dep, '/package.json'));
}
function getPackageJsonByPath(filePath) {
return this.requireJson(path.join(process.cwd(), filePath));
}
function run(cmd) {
return (
childProcess
.execSync(cmd, {
stdio: [0, 'pipe', 'ignore'],
})
.toString() || ''
).trim();
}
function findDarwinApplication(id) {
var appPath;
try {
appPath = run('mdfind "kMDItemCFBundleIdentifier=="' + id + '""').replace(/(\s)/g, '\\ ');
} catch (error) {
appPath = false;
}
return appPath;
}
function generatePlistBuddyCommand(appPath, options) {
var optionsArray = (options || ['CFBundleShortVersionString']).map(function optionsMap(option) {
return '-c Print:' + option;
});
return ['/usr/libexec/PlistBuddy']
.concat(optionsArray)
.concat([appPath])
.join(' ');
}
function getAndroidStudioVersion() {
var androidStudioVersion = 'Not Found';
if (process.platform === 'darwin') {
try {
androidStudioVersion = run(
generatePlistBuddyCommand('/Applications/Android\\ Studio.app/Contents/Info.plist', [
'CFBundleShortVersionString',
'CFBundleVersion',
])
)
.split('\n')
.join(' ');
} catch (err) {
androidStudioVersion = 'Not Found';
}
} else if (process.platform === 'linux') {
try {
var linuxBuildNumber = run('cat /opt/android-studio/build.txt');
var linuxVersion = run(
'cat /opt/android-studio/bin/studio.sh | grep "$Home/.AndroidStudio" | head -1'
).match(/\d\.\d/)[0];
androidStudioVersion = `${linuxVersion} ${linuxBuildNumber}`;
} catch (err) {
androidStudioVersion = 'Not Found';
}
} else if (process.platform.startsWith('win')) {
try {
var windowsVersion = run(
'wmic datafile where name="C:\\\\Program Files\\\\Android\\\\Android Studio\\\\bin\\\\studio.exe" get Version'
).replace(/(\r\n|\n|\r)/gm, '');
var windowsBuildNumber = run(
'type "C:\\\\Program Files\\\\Android\\\\Android Studio\\\\build.txt"'
).replace(/(\r\n|\n|\r)/gm, '');
androidStudioVersion = `${windowsVersion} ${windowsBuildNumber}`;
} catch (err) {
androidStudioVersion = 'Not Found';
}
}
return androidStudioVersion;
}
function getCPUInfo() {
var CPUInfo;
try {
CPUInfo = os.arch() + ' ' + os.cpus()[0].model;
} catch (error) {
CPUInfo = 'Not Found';
}
return CPUInfo;
}
function getDarwinApplicationVersion(bundleIdentifier) {
var version;
try {
version = run(
generatePlistBuddyCommand(
path.join(findDarwinApplication(bundleIdentifier), 'Contents', 'Info.plist'),
['CFBundleShortVersionString']
)
);
} catch (error) {
version = 'Not Found';
}
return version;
}
function getNodeVersion() {
var nodeVersion;
try {
nodeVersion = run('node --version').replace('v', '');
} catch (error) {
nodeVersion = 'Not Found';
}
return nodeVersion;
}
function getNpmVersion() {
var npmVersion;
try {
npmVersion = run('npm -v');
} catch (error) {
npmVersion = 'Not Found';
}
return npmVersion;
}
function getOperatingSystemInfo() {
var operatingSystemInfo;
try {
operatingSystemInfo = osName(os.platform(), os.release());
if (process.platform === 'darwin') {
operatingSystemInfo = operatingSystemInfo + ' ' + run('sw_vers -productVersion ');
}
} catch (err) {
operatingSystemInfo += ' Unknown Version';
}
return operatingSystemInfo;
}
function getWatchmanVersion() {
var watchmanVersion;
try {
var watchmanPath = which.sync('watchman');
watchmanVersion = watchmanPath && run(watchmanPath + ' --version');
} catch (error) {
watchmanVersion = 'Not Found';
}
return watchmanVersion;
}
function getXcodeVersion() {
var xcodeVersion;
if (process.platform === 'darwin') {
var xcodePath = which.sync('xcodebuild');
try {
xcodeVersion =
xcodePath &&
run(xcodePath + ' -version')
.split('\n')
.join(' ');
} catch (err) {
xcodeVersion = 'Not Found';
}
} else {
xcodeVersion = 'N/A';
}
return xcodeVersion;
}
function getYarnVersion() {
var yarnVersion;
try {
yarnVersion = run('yarn --version');
} catch (error) {
yarnVersion = 'Not Found';
}
return yarnVersion;
}
function getAllPackageJsonPaths() {
return glob.sync('node_modules/**/package.json');
}
function getModuleVersions(dependency, packagePaths) {
var paths;
var versions;
try {
paths = packagePaths.filter(function filterPackagePaths(packagePath) {
return packagePath.includes(`/${dependency}/package.json`);
});
versions = paths
.map(function mapPathsForVersion(packageJsonPath) {
var packageJson = getPackageJsonByPath(packageJsonPath);
if (packageJson) return packageJson.version;
return false;
})
.filter(Boolean);
versions = uniq(versions).sort();
} catch (error) {
versions = [];
}
return versions;
}
module.exports = {
browserBundleIdentifiers: browserBundleIdentifiers,
findDarwinApplication: findDarwinApplication,
generatePlistBuddyCommand: generatePlistBuddyCommand,
getAllPackageJsonPaths: getAllPackageJsonPaths,
getAndroidStudioVersion: getAndroidStudioVersion,
getCPUInfo: getCPUInfo,
getDarwinApplicationVersion: getDarwinApplicationVersion,
getModuleVersions: getModuleVersions,
getNodeVersion: getNodeVersion,
getNpmVersion: getNpmVersion,
getOperatingSystemInfo: getOperatingSystemInfo,
getPackageJsonByName: getPackageJsonByName,
getPackageJsonByPath: getPackageJsonByPath,
getWatchmanVersion: getWatchmanVersion,
getXcodeVersion: getXcodeVersion,
getYarnVersion: getYarnVersion,
requireJson: requireJson,
uniq: uniq,
};

1445
node_modules/envinfo/yarn.lock generated vendored Normal file

File diff suppressed because it is too large Load Diff