@knit/needle
Advanced tools
Comparing version 0.3.3 to 0.5.0
53
index.js
@@ -1,16 +0,16 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _defineProperty2 = require('babel-runtime/helpers/defineProperty'); | ||
var _defineProperty2 = require("babel-runtime/helpers/defineProperty"); | ||
var _defineProperty3 = _interopRequireDefault(_defineProperty2); | ||
var _keys = require('babel-runtime/core-js/object/keys'); | ||
var _keys = require("babel-runtime/core-js/object/keys"); | ||
var _keys2 = _interopRequireDefault(_keys); | ||
var _stringify = require('babel-runtime/core-js/json/stringify'); | ||
var _stringify = require("babel-runtime/core-js/json/stringify"); | ||
var _stringify2 = _interopRequireDefault(_stringify); | ||
var _assign = require('babel-runtime/core-js/object/assign'); | ||
var _assign = require("babel-runtime/core-js/object/assign"); | ||
@@ -21,4 +21,4 @@ var _assign2 = _interopRequireDefault(_assign); | ||
var path = require('path'); | ||
var readPkgUp = require('read-pkg-up'); | ||
var path = require("path"); | ||
var readPkgUp = require("read-pkg-up"); | ||
@@ -29,16 +29,9 @@ var pkg = (readPkgUp.sync() || {}).pkg || {}; | ||
var pkgPaths = (pkgNeedle || {}).paths || {}; | ||
var ROOT_DIR = process.env.PWD || ''; | ||
var MOD_STUB = pkgPaths.modulesStub || path.join('modules', 'node_modules'); | ||
var DIST_STUB = pkgPaths.distStub || 'dist'; | ||
var LIB_STUB = pkgPaths.libStub || 'lib'; | ||
var ES6_STUB = pkgPaths.es6Stub || 'es6'; | ||
var UMD_STUB = pkgPaths.umdStub || 'umd'; | ||
var TESTS_STUB = pkgPaths.testsStub || '__tests__'; | ||
var DATA_STUB = pkgPaths.dataStub || 'data'; | ||
var ENTRY_DIR = pkgPaths.entryStub || 'webpack_entry'; | ||
var ROOT_DIR = process.env.PWD || ""; | ||
var SRC_STUB = pkgPaths.src || "src"; | ||
var MOD_STUB = pkgPaths.modulesStub || path.join(SRC_STUB, "modules"); | ||
var DIST_STUB = pkgPaths.distStub || "dist"; | ||
var TESTS_STUB = pkgPaths.testsStub || "__tests__"; | ||
var DATA_STUB = pkgPaths.dataStub || "data"; | ||
var pkgServer = (pkgNeedle || {}).server || {}; | ||
var SERVER_HOST = process.env.HOST || pkgServer.host || 'localhost'; | ||
var SERVER_PORT = parseInt(process.env.PORT || pkgServer.port, 10) || 8080; | ||
var PKG_ENV = (pkgNeedle || {}).env || {}; | ||
@@ -55,20 +48,8 @@ | ||
distStub: DIST_STUB, | ||
lib: path.join(ROOT_DIR, DIST_STUB, LIB_STUB), | ||
libStub: LIB_STUB, | ||
jsnext: path.join(ROOT_DIR, DIST_STUB, ES6_STUB), | ||
jsnextStub: ES6_STUB, | ||
umd: path.join(ROOT_DIR, DIST_STUB, UMD_STUB), | ||
umdStub: UMD_STUB, | ||
testsStub: TESTS_STUB, | ||
entryStub: ENTRY_DIR, | ||
entry: path.join(ROOT_DIR, MOD_STUB, ENTRY_DIR) | ||
srcStub: SRC_STUB, | ||
src: path.join(ROOT_DIR, SRC_STUB) | ||
}, | ||
server: { | ||
host: SERVER_HOST, | ||
port: SERVER_PORT, | ||
public: 'http://' + SERVER_HOST + ':' + SERVER_PORT + '/' | ||
}, | ||
proxy: process.env.PROXY || (pkgNeedle || {}).proxy || 'http://localhost:5000', | ||
env: (0, _assign2.default)({}, { | ||
'process.env': { | ||
"process.env": { | ||
NODE_ENV: (0, _stringify2.default)(process.env.NODE_ENV), | ||
@@ -79,3 +60,3 @@ BABEL_ENV: (0, _stringify2.default)(process.env.BABEL_ENV), | ||
DEBUG: parseInt(process.env.DEBUG, 10) === 1, | ||
BASE: (0, _stringify2.default)(process.env.BASE) || '' | ||
BASE: (0, _stringify2.default)(process.env.BASE) || "" | ||
}, (0, _keys2.default)(PKG_ENV).reduce(function (acc, k) { | ||
@@ -82,0 +63,0 @@ return (0, _assign2.default)({}, acc, (0, _defineProperty3.default)({}, k, (0, _stringify2.default)(process.env[k] || PKG_ENV[k]))); |
@@ -12,3 +12,3 @@ { | ||
"engines": { | ||
"node": ">=6", | ||
"node": ">=4", | ||
"npm": ">=3" | ||
@@ -22,8 +22,6 @@ }, | ||
"description": "Knitting needle", | ||
"version": "0.3.3", | ||
"version": "0.5.0", | ||
"dependencies": { | ||
"read-pkg-up": "2.0.0" | ||
}, | ||
"peerDependencies": {}, | ||
"optionalDependencies": {} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
7
70729
5
52