From f5bf21072d0ee9f7dcd649dcff4a72db115cf7cb Mon Sep 17 00:00:00 2001 From: jenipha Date: Tue, 3 Sep 2019 22:42:13 +0530 Subject: [PATCH] moved to prod --- .../boxen/node_modules/chalk/index.js.flow | 2 +- .../boxen/node_modules/chalk/package.json | 31 ++++++++--------- node_modules/serve-handler/package.json | 29 +++++++--------- node_modules/serve-handler/src/index.js | 5 +-- node_modules/serve/bin/serve.js | 23 ++++++++----- node_modules/serve/package.json | 34 +++++++++---------- package-lock.json | 26 +++++++------- package.json | 4 +-- 8 files changed, 77 insertions(+), 77 deletions(-) diff --git a/node_modules/boxen/node_modules/chalk/index.js.flow b/node_modules/boxen/node_modules/chalk/index.js.flow index 872a1562..622caaa2 100644 --- a/node_modules/boxen/node_modules/chalk/index.js.flow +++ b/node_modules/boxen/node_modules/chalk/index.js.flow @@ -1,4 +1,4 @@ -// @flow +// @flow strict type TemplateStringsArray = $ReadOnlyArray; diff --git a/node_modules/boxen/node_modules/chalk/package.json b/node_modules/boxen/node_modules/chalk/package.json index d8cb8306..9444ba01 100644 --- a/node_modules/boxen/node_modules/chalk/package.json +++ b/node_modules/boxen/node_modules/chalk/package.json @@ -1,40 +1,37 @@ { - "_args": [ - [ - "chalk@2.4.1", - "/home/jenipha/Desktop/Practise/React-For-Beginners-Starter-Files/catch-of-the-day" - ] - ], - "_from": "chalk@2.4.1", - "_id": "chalk@2.4.1", + "_from": "chalk@^2.0.1", + "_id": "chalk@2.4.2", "_inBundle": false, - "_integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "_integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "_location": "/boxen/chalk", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "chalk@2.4.1", + "raw": "chalk@^2.0.1", "name": "chalk", "escapedName": "chalk", - "rawSpec": "2.4.1", + "rawSpec": "^2.0.1", "saveSpec": null, - "fetchSpec": "2.4.1" + "fetchSpec": "^2.0.1" }, "_requiredBy": [ "/boxen" ], - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "_spec": "2.4.1", - "_where": "/home/jenipha/Desktop/Practise/React-For-Beginners-Starter-Files/catch-of-the-day", + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "_shasum": "cd42541677a54333cf541a49108c1432b44c9424", + "_spec": "chalk@^2.0.1", + "_where": "/home/jenipha/Desktop/Practise/catch-of-the-day/node_modules/boxen", "bugs": { "url": "https://github.com/chalk/chalk/issues" }, + "bundleDependencies": false, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" }, + "deprecated": false, "description": "Terminal string styling done right", "devDependencies": { "ava": "*", @@ -93,7 +90,7 @@ "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" }, "types": "types/index.d.ts", - "version": "2.4.1", + "version": "2.4.2", "xo": { "envs": [ "node", diff --git a/node_modules/serve-handler/package.json b/node_modules/serve-handler/package.json index 6d7ec230..34703f55 100644 --- a/node_modules/serve-handler/package.json +++ b/node_modules/serve-handler/package.json @@ -1,38 +1,34 @@ { - "_args": [ - [ - "serve-handler@5.0.7", - "/home/jenipha/Desktop/Practise/React-For-Beginners-Starter-Files/catch-of-the-day" - ] - ], - "_from": "serve-handler@5.0.7", - "_id": "serve-handler@5.0.7", + "_from": "serve-handler@5.0.8", + "_id": "serve-handler@5.0.8", "_inBundle": false, - "_integrity": "sha512-PuLoJHAO2jj3p1fYWfXVHsEqNesx1+h+6qj0FIWrCe526ZtpDqeYuKA4knE5pjK9xoOVShoB+qGOP93EY46xEw==", + "_integrity": "sha512-pqk0SChbBLLHfMIxQ55czjdiW7tj2cFy53svvP8e5VqEN/uB/QpfiTJ8k1uIYeFTDVoi+FGi5aqXScuu88bymg==", "_location": "/serve-handler", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "serve-handler@5.0.7", + "raw": "serve-handler@5.0.8", "name": "serve-handler", "escapedName": "serve-handler", - "rawSpec": "5.0.7", + "rawSpec": "5.0.8", "saveSpec": null, - "fetchSpec": "5.0.7" + "fetchSpec": "5.0.8" }, "_requiredBy": [ "/serve" ], - "_resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-5.0.7.tgz", - "_spec": "5.0.7", - "_where": "/home/jenipha/Desktop/Practise/React-For-Beginners-Starter-Files/catch-of-the-day", + "_resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-5.0.8.tgz", + "_shasum": "790dbe340dabf1d61bdbaa02ea37dcab372377a8", + "_spec": "serve-handler@5.0.8", + "_where": "/home/jenipha/Desktop/Practise/catch-of-the-day/node_modules/serve", "author": { "name": "leo" }, "bugs": { "url": "https://github.com/zeit/serve-handler/issues" }, + "bundleDependencies": false, "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", @@ -43,6 +39,7 @@ "path-to-regexp": "2.2.1", "range-parser": "1.2.0" }, + "deprecated": false, "description": "The routing foundation of `serve` and static deployments on Now", "devDependencies": { "@zeit/eslint-config-node": "0.2.13", @@ -108,5 +105,5 @@ "test-integration": "nyc --reporter=html --reporter=text ava test/integration.js", "test-lint": "zeit-eslint --ext .jsx,.js ." }, - "version": "5.0.7" + "version": "5.0.8" } diff --git a/node_modules/serve-handler/src/index.js b/node_modules/serve-handler/src/index.js index 3edaeb1d..eacbda1e 100644 --- a/node_modules/serve-handler/src/index.js +++ b/node_modules/serve-handler/src/index.js @@ -21,6 +21,7 @@ const errorTemplate = require('./error'); const sourceMatches = (source, requestPath, allowSegments) => { const keys = []; const slashed = slasher(source); + const resolvedPath = path.resolve(requestPath); let results = null; @@ -28,7 +29,7 @@ const sourceMatches = (source, requestPath, allowSegments) => { const normalized = slashed.replace('*', '(.*)'); const expression = pathToRegExp(normalized, keys); - results = expression.exec(requestPath); + results = expression.exec(resolvedPath); if (!results) { // clear keys so that they are not used @@ -38,7 +39,7 @@ const sourceMatches = (source, requestPath, allowSegments) => { } } - if (results || minimatch(requestPath, slashed)) { + if (results || minimatch(resolvedPath, slashed)) { return { keys, results diff --git a/node_modules/serve/bin/serve.js b/node_modules/serve/bin/serve.js index f04b1048..c69470c1 100755 --- a/node_modules/serve/bin/serve.js +++ b/node_modules/serve/bin/serve.js @@ -6,7 +6,6 @@ const path = require('path'); const fs = require('fs'); const {promisify} = require('util'); const {parse} = require('url'); -const dns = require('dns'); const os = require('os'); // Packages @@ -24,9 +23,10 @@ const compression = require('compression'); const pkg = require('../package'); const readFile = promisify(fs.readFile); -const lookup = promisify(dns.lookup); const compressionHandler = promisify(compression()); +const interfaces = os.networkInterfaces(); + const warning = (message) => chalk`{yellow WARNING:} ${message}`; const info = (message) => chalk`{magenta INFO:} ${message}`; const error = (message) => chalk`{red ERROR:} ${message}`; @@ -154,6 +154,17 @@ const registerShutdown = (fn) => { process.on('exit', wrapper); }; +const getNetworkAddress = () => { + for (const name of Object.keys(interfaces)) { + for (const interface of interfaces[name]) { + const {address, family, internal} = interface; + if (family === 'IPv4' && !internal) { + return address; + } + } + } +}; + const startEndpoint = (endpoint, config, args, previous) => { const {isTTY} = process.stdout; const clipboard = args['--no-clipboard'] !== true; @@ -188,14 +199,10 @@ const startEndpoint = (endpoint, config, args, previous) => { localAddress = details; } else if (typeof details === 'object' && details.port) { const address = details.address === '::' ? 'localhost' : details.address; + const ip = getNetworkAddress(); localAddress = `http://${address}:${details.port}`; - try { - const {address: ip} = await lookup(os.hostname()); - networkAddress = `http://${ip}:${details.port}`; - } catch (err) { - console.error(error(`DNS lookup failed: ${err.message}`)); - } + networkAddress = `http://${ip}:${details.port}`; } if (isTTY && process.env.NODE_ENV !== 'production') { diff --git a/node_modules/serve/package.json b/node_modules/serve/package.json index 338b1b3c..54c966c4 100644 --- a/node_modules/serve/package.json +++ b/node_modules/serve/package.json @@ -1,35 +1,31 @@ { - "_args": [ - [ - "serve@10.1.1", - "/home/jenipha/Desktop/Practise/React-For-Beginners-Starter-Files/catch-of-the-day" - ] - ], - "_from": "serve@10.1.1", - "_id": "serve@10.1.1", + "_from": "serve@^10.1.1", + "_id": "serve@10.1.2", "_inBundle": false, - "_integrity": "sha512-B1ca73zGFRS/bYQkbDw6BVEpRiUKdtnkwtvkMjx598jU5tyieua9lHyqdwUoup4/ek20I74EzncTC0gZuYng4Q==", + "_integrity": "sha512-TVH35uwndRlCqSeX3grR3Ntrjx2aBTeu6sx+zTD2CzN2N/rHuEDTvxiBwWbrellJNyWiQFz2xZmoW+UxV+Zahg==", "_location": "/serve", "_phantomChildren": { "color-convert": "1.9.3", "escape-string-regexp": "1.0.5" }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "serve@10.1.1", + "raw": "serve@^10.1.1", "name": "serve", "escapedName": "serve", - "rawSpec": "10.1.1", + "rawSpec": "^10.1.1", "saveSpec": null, - "fetchSpec": "10.1.1" + "fetchSpec": "^10.1.1" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/serve/-/serve-10.1.1.tgz", - "_spec": "10.1.1", - "_where": "/home/jenipha/Desktop/Practise/React-For-Beginners-Starter-Files/catch-of-the-day", + "_resolved": "https://registry.npmjs.org/serve/-/serve-10.1.2.tgz", + "_shasum": "805917f2692ed5d8720bbd1981ac3974d38b7d8d", + "_spec": "serve@^10.1.1", + "_where": "/home/jenipha/Desktop/Practise/catch-of-the-day", "author": { "name": "leo" }, @@ -39,6 +35,7 @@ "bugs": { "url": "https://github.com/zeit/serve/issues" }, + "bundleDependencies": false, "dependencies": { "@zeit/schemas": "2.6.0", "ajv": "6.5.3", @@ -47,9 +44,10 @@ "chalk": "2.4.1", "clipboardy": "1.2.3", "compression": "1.7.3", - "serve-handler": "5.0.7", + "serve-handler": "5.0.8", "update-check": "1.5.2" }, + "deprecated": false, "description": "Static file serving and directory listing", "devDependencies": { "@zeit/eslint-config-node": "0.3.0", @@ -85,5 +83,5 @@ "lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint", "test": "yarn lint" }, - "version": "10.1.1" + "version": "10.1.2" } diff --git a/package-lock.json b/package-lock.json index b522a67c..138e13fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2135,7 +2135,7 @@ }, "arg": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/arg/-/arg-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/arg/-/arg-2.0.0.tgz", "integrity": "sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w==" }, "argparse": { @@ -3154,9 +3154,9 @@ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -20904,9 +20904,9 @@ "dev": true }, "serve": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/serve/-/serve-10.1.1.tgz", - "integrity": "sha512-B1ca73zGFRS/bYQkbDw6BVEpRiUKdtnkwtvkMjx598jU5tyieua9lHyqdwUoup4/ek20I74EzncTC0gZuYng4Q==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/serve/-/serve-10.1.2.tgz", + "integrity": "sha512-TVH35uwndRlCqSeX3grR3Ntrjx2aBTeu6sx+zTD2CzN2N/rHuEDTvxiBwWbrellJNyWiQFz2xZmoW+UxV+Zahg==", "requires": { "@zeit/schemas": "2.6.0", "ajv": "6.5.3", @@ -20915,7 +20915,7 @@ "chalk": "2.4.1", "clipboardy": "1.2.3", "compression": "1.7.3", - "serve-handler": "5.0.7", + "serve-handler": "5.0.8", "update-check": "1.5.2" }, "dependencies": { @@ -20953,9 +20953,9 @@ } }, "serve-handler": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-5.0.7.tgz", - "integrity": "sha512-PuLoJHAO2jj3p1fYWfXVHsEqNesx1+h+6qj0FIWrCe526ZtpDqeYuKA4knE5pjK9xoOVShoB+qGOP93EY46xEw==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-5.0.8.tgz", + "integrity": "sha512-pqk0SChbBLLHfMIxQ55czjdiW7tj2cFy53svvP8e5VqEN/uB/QpfiTJ8k1uIYeFTDVoi+FGi5aqXScuu88bymg==", "requires": { "bytes": "3.0.0", "content-disposition": "0.5.2", @@ -20969,12 +20969,12 @@ "dependencies": { "mime-db": { "version": "1.33.0", - "resolved": "http://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" }, "mime-types": { "version": "2.1.18", - "resolved": "http://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { "mime-db": "~1.33.0" diff --git a/package.json b/package.json index cdbf6a10..7f10f1ad 100755 --- a/package.json +++ b/package.json @@ -16,12 +16,12 @@ "react-dom": "^16.6.3", "react-router-dom": "^4.2.2", "react-transition-group": "^2.2.1", - "serve": "^10.1.1", + "serve": "^10.1.2", "stylus": "0.54.5" }, "scripts": { "dev": "react-scripts start", - "start": "react-scripts start", + "start": "serve --single ./build", "watch": "concurrently --names \"webpack, stylus\" --prefix name \"npm run start\" \"npm run styles:watch\"", "build": "react-scripts build", "eject": "react-scripts eject",