summaryrefslogtreecommitdiffstats
path: root/node_modules/is-wsl
diff options
context:
space:
mode:
authorGravatar Piotr Russ <mail@pruss.it> 2020-11-16 00:10:28 +0100
committerGravatar Piotr Russ <mail@pruss.it> 2020-11-16 00:10:28 +0100
commite06ec920f7a5d784e674c4c4b4e6d1da3dc7391d (patch)
tree55713f725f77b44ebfec86e4eec3ce33e71458ca /node_modules/is-wsl
downloadwebsite_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.gz
website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.bz2
website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.zip
api, login, auth
Diffstat (limited to 'node_modules/is-wsl')
-rw-r--r--node_modules/is-wsl/index.js25
-rw-r--r--node_modules/is-wsl/license21
-rw-r--r--node_modules/is-wsl/package.json72
-rw-r--r--node_modules/is-wsl/readme.md28
4 files changed, 146 insertions, 0 deletions
diff --git a/node_modules/is-wsl/index.js b/node_modules/is-wsl/index.js
new file mode 100644
index 0000000..ade6cda
--- /dev/null
+++ b/node_modules/is-wsl/index.js
@@ -0,0 +1,25 @@
+'use strict';
+const os = require('os');
+const fs = require('fs');
+
+const isWsl = () => {
+ if (process.platform !== 'linux') {
+ return false;
+ }
+
+ if (os.release().includes('Microsoft')) {
+ return true;
+ }
+
+ try {
+ return fs.readFileSync('/proc/version', 'utf8').includes('Microsoft');
+ } catch (err) {
+ return false;
+ }
+};
+
+if (process.env.__IS_WSL_TEST__) {
+ module.exports = isWsl;
+} else {
+ module.exports = isWsl();
+}
diff --git a/node_modules/is-wsl/license b/node_modules/is-wsl/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/is-wsl/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/is-wsl/package.json b/node_modules/is-wsl/package.json
new file mode 100644
index 0000000..7fb07fc
--- /dev/null
+++ b/node_modules/is-wsl/package.json
@@ -0,0 +1,72 @@
+{
+ "_from": "is-wsl@^1.1.0",
+ "_id": "is-wsl@1.1.0",
+ "_inBundle": false,
+ "_integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
+ "_location": "/is-wsl",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "is-wsl@^1.1.0",
+ "name": "is-wsl",
+ "escapedName": "is-wsl",
+ "rawSpec": "^1.1.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.1.0"
+ },
+ "_requiredBy": [
+ "/terser-webpack-plugin"
+ ],
+ "_resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
+ "_shasum": "1f16e4aa22b04d1336b66188a66af3c600c3a66d",
+ "_spec": "is-wsl@^1.1.0",
+ "_where": "/home/pruss/Dev/3-minute-website/node_modules/terser-webpack-plugin",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/is-wsl/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)",
+ "devDependencies": {
+ "ava": "*",
+ "clear-require": "^2.0.0",
+ "proxyquire": "^1.7.11",
+ "xo": "*"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/is-wsl#readme",
+ "keywords": [
+ "check",
+ "wsl",
+ "windows",
+ "subsystem",
+ "linux",
+ "detect",
+ "bash",
+ "process",
+ "console",
+ "terminal",
+ "is"
+ ],
+ "license": "MIT",
+ "name": "is-wsl",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/is-wsl.git"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "version": "1.1.0"
+}
diff --git a/node_modules/is-wsl/readme.md b/node_modules/is-wsl/readme.md
new file mode 100644
index 0000000..7ab40c5
--- /dev/null
+++ b/node_modules/is-wsl/readme.md
@@ -0,0 +1,28 @@
+# is-wsl [![Build Status](https://travis-ci.org/sindresorhus/is-wsl.svg?branch=master)](https://travis-ci.org/sindresorhus/is-wsl)
+
+> Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows)
+
+Can be useful if you need to work around unimplemented or buggy features in WSL.
+
+
+## Install
+
+```
+$ npm install --save is-wsl
+```
+
+
+## Usage
+
+```js
+const isWsl = require('is-wsl');
+
+// When running inside Windows Subsystem for Linux
+console.log(isWsl);
+//=> true
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)