mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-09-07 07:27:20 +00:00
push all website files
This commit is contained in:
402
website/node_modules/npm/node_modules/libcipm/CHANGELOG.md
generated
vendored
Normal file
402
website/node_modules/npm/node_modules/libcipm/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,402 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
<a name="2.0.2"></a>
|
||||
## [2.0.2](https://github.com/zkat/cipm/compare/v2.0.1...v2.0.2) (2018-08-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **child:** only override dirPacker if opts.dirPacker is defined ([#55](https://github.com/zkat/cipm/issues/55)) ([13ab2f0](https://github.com/zkat/cipm/commit/13ab2f0))
|
||||
|
||||
|
||||
|
||||
<a name="2.0.1"></a>
|
||||
## [2.0.1](https://github.com/zkat/cipm/compare/v2.0.0...v2.0.1) (2018-07-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** move mkdirp to prod deps ([6878f39](https://github.com/zkat/cipm/commit/6878f39))
|
||||
|
||||
|
||||
|
||||
<a name="2.0.0"></a>
|
||||
# [2.0.0](https://github.com/zkat/cipm/compare/v1.6.3...v2.0.0) (2018-05-24)
|
||||
|
||||
|
||||
### meta
|
||||
|
||||
* update node version support ([694b4d3](https://github.com/zkat/cipm/commit/694b4d3))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* node@4 is no longer supported
|
||||
|
||||
|
||||
|
||||
<a name="1.6.3"></a>
|
||||
## [1.6.3](https://github.com/zkat/cipm/compare/v1.6.2...v1.6.3) (2018-05-24)
|
||||
|
||||
|
||||
|
||||
<a name="1.6.2"></a>
|
||||
## [1.6.2](https://github.com/zkat/cipm/compare/v1.6.1...v1.6.2) (2018-04-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lifecycle:** detect binding.gyp for default install lifecycle ([#46](https://github.com/zkat/cipm/issues/46)) ([9149631](https://github.com/zkat/cipm/commit/9149631)), closes [#45](https://github.com/zkat/cipm/issues/45)
|
||||
|
||||
|
||||
|
||||
<a name="1.6.1"></a>
|
||||
## [1.6.1](https://github.com/zkat/cipm/compare/v1.6.0...v1.6.1) (2018-03-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bin:** Set non-zero exit code on error ([#41](https://github.com/zkat/cipm/issues/41)) ([54d0106](https://github.com/zkat/cipm/commit/54d0106))
|
||||
* **lifecycle:** defer to lifecycle’s internal logic as to whether or not to execute a run-script ([#42](https://github.com/zkat/cipm/issues/42)) ([7f27a52](https://github.com/zkat/cipm/commit/7f27a52)), closes [npm/npm#19258](https://github.com/npm/npm/issues/19258)
|
||||
* **prefix:** don't reference prefix before computing it ([#40](https://github.com/zkat/cipm/issues/40)) ([08ed1cc](https://github.com/zkat/cipm/commit/08ed1cc))
|
||||
* **prefix:** Resolve to promise when passing --prefix to npm ci ([#43](https://github.com/zkat/cipm/issues/43)) ([401d466](https://github.com/zkat/cipm/commit/401d466))
|
||||
|
||||
|
||||
|
||||
<a name="1.6.0"></a>
|
||||
# [1.6.0](https://github.com/zkat/cipm/compare/v1.5.1...v1.6.0) (2018-03-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bin:** cli.js was being excluded ([d62668e](https://github.com/zkat/cipm/commit/d62668e))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **libcipm:** working standalone cipm release! ([a3383fd](https://github.com/zkat/cipm/commit/a3383fd))
|
||||
|
||||
|
||||
|
||||
<a name="1.5.1"></a>
|
||||
## [1.5.1](https://github.com/zkat/cipm/compare/v1.5.0...v1.5.1) (2018-03-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **_from:** do not add _from to directory deps ([7405360](https://github.com/zkat/cipm/commit/7405360))
|
||||
|
||||
|
||||
|
||||
<a name="1.5.0"></a>
|
||||
# [1.5.0](https://github.com/zkat/cipm/compare/v1.4.1...v1.5.0) (2018-03-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **errors:** handle aggregate errors better ([6239499](https://github.com/zkat/cipm/commit/6239499))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **logger:** rudimentary progress bar update ([c5d9dc7](https://github.com/zkat/cipm/commit/c5d9dc7))
|
||||
|
||||
|
||||
|
||||
<a name="1.4.1"></a>
|
||||
## [1.4.1](https://github.com/zkat/cipm/compare/v1.4.0...v1.4.1) (2018-02-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **buildTree:** linking in parallel causes hoist-clobbering ([5ffbc0e](https://github.com/zkat/cipm/commit/5ffbc0e)), closes [#39](https://github.com/zkat/cipm/issues/39)
|
||||
* **buildTree:** use checkDepEnv here too ([41a4634](https://github.com/zkat/cipm/commit/41a4634))
|
||||
* **perf:** split up updateJson and buildTree ([df5aba0](https://github.com/zkat/cipm/commit/df5aba0))
|
||||
* **perf:** stop using the readPackageJson version to update packages ([8da3d5a](https://github.com/zkat/cipm/commit/8da3d5a))
|
||||
|
||||
|
||||
|
||||
<a name="1.4.0"></a>
|
||||
# [1.4.0](https://github.com/zkat/cipm/compare/v1.3.3...v1.4.0) (2018-02-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **extract:** add support for --only and --also ([ad143ae](https://github.com/zkat/cipm/commit/ad143ae))
|
||||
|
||||
|
||||
|
||||
<a name="1.3.3"></a>
|
||||
## [1.3.3](https://github.com/zkat/cipm/compare/v1.3.2...v1.3.3) (2018-02-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **extract:** stop extracting deps before parent :\ ([c6847dc](https://github.com/zkat/cipm/commit/c6847dc))
|
||||
|
||||
|
||||
|
||||
<a name="1.3.2"></a>
|
||||
## [1.3.2](https://github.com/zkat/cipm/compare/v1.3.1...v1.3.2) (2018-02-15)
|
||||
|
||||
|
||||
|
||||
<a name="1.3.1"></a>
|
||||
## [1.3.1](https://github.com/zkat/cipm/compare/v1.3.0...v1.3.1) (2018-02-15)
|
||||
|
||||
|
||||
|
||||
<a name="1.3.0"></a>
|
||||
# [1.3.0](https://github.com/zkat/cipm/compare/v1.2.0...v1.3.0) (2018-02-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **extract:** link directory deps and install missing bundle deps ([8334e9e](https://github.com/zkat/cipm/commit/8334e9e))
|
||||
|
||||
|
||||
|
||||
<a name="1.2.0"></a>
|
||||
# [1.2.0](https://github.com/zkat/cipm/compare/v1.1.2...v1.2.0) (2018-02-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **metadata:** add _resolved, _integrity, and _from on install ([36642dc](https://github.com/zkat/cipm/commit/36642dc))
|
||||
|
||||
|
||||
|
||||
<a name="1.1.2"></a>
|
||||
## [1.1.2](https://github.com/zkat/cipm/compare/v1.1.1...v1.1.2) (2018-01-19)
|
||||
|
||||
|
||||
|
||||
<a name="1.1.1"></a>
|
||||
## [1.1.1](https://github.com/zkat/cipm/compare/v1.1.0...v1.1.1) (2018-01-19)
|
||||
|
||||
|
||||
|
||||
<a name="1.1.0"></a>
|
||||
# [1.1.0](https://github.com/zkat/cipm/compare/v1.0.1...v1.1.0) (2018-01-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **log:** add some helpful log output ([f443f03](https://github.com/zkat/cipm/commit/f443f03))
|
||||
|
||||
|
||||
|
||||
<a name="1.0.1"></a>
|
||||
## [1.0.1](https://github.com/zkat/cipm/compare/v1.0.0...v1.0.1) (2018-01-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** added protoduck to pkgjson ([ecbe719](https://github.com/zkat/cipm/commit/ecbe719))
|
||||
|
||||
|
||||
|
||||
<a name="1.0.0"></a>
|
||||
# [1.0.0](https://github.com/zkat/cipm/compare/v0.9.1...v1.0.0) (2018-01-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cli:** splitting off CLI into a separate tool ([cff65c1](https://github.com/zkat/cipm/commit/cff65c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **cli:** libcipm is its own library now,
|
||||
|
||||
|
||||
|
||||
<a name="0.9.1"></a>
|
||||
## [0.9.1](https://github.com/zkat/cipm/compare/v0.9.0...v0.9.1) (2018-01-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **prefix:** oops @ prefix ([cc5adac](https://github.com/zkat/cipm/commit/cc5adac))
|
||||
|
||||
|
||||
|
||||
<a name="0.9.0"></a>
|
||||
# [0.9.0](https://github.com/zkat/cipm/compare/v0.8.0...v0.9.0) (2018-01-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **package:** add pacote to bundleDependencies ([#36](https://github.com/zkat/cipm/issues/36)) ([a69742e](https://github.com/zkat/cipm/commit/a69742e))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **config:** allow injection of npm configs ([#35](https://github.com/zkat/cipm/issues/35)) ([1f5694b](https://github.com/zkat/cipm/commit/1f5694b))
|
||||
|
||||
|
||||
|
||||
<a name="0.8.0"></a>
|
||||
# [0.8.0](https://github.com/zkat/cipm/compare/v0.7.2...v0.8.0) (2017-11-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **gyp:** new npm-lifecycle[@2](https://github.com/2) with included node-gyp ([a4ed938](https://github.com/zkat/cipm/commit/a4ed938))
|
||||
|
||||
|
||||
|
||||
<a name="0.7.2"></a>
|
||||
## [0.7.2](https://github.com/zkat/cipm/compare/v0.7.1...v0.7.2) (2017-10-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **extract:** idk why this was breaking. Seriously. ([433a2be](https://github.com/zkat/cipm/commit/433a2be))
|
||||
* **tree:** pass through a custom Promise to logiTree ([2d29efb](https://github.com/zkat/cipm/commit/2d29efb))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* zoomzoom. Even more concurrency! ([db9c2e0](https://github.com/zkat/cipm/commit/db9c2e0))
|
||||
|
||||
|
||||
|
||||
<a name="0.7.1"></a>
|
||||
## [0.7.1](https://github.com/zkat/cipm/compare/v0.7.0...v0.7.1) (2017-10-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **scripts:** separate extract and build and fix ordering ([eb072a5](https://github.com/zkat/cipm/commit/eb072a5))
|
||||
|
||||
|
||||
|
||||
<a name="0.7.0"></a>
|
||||
# [0.7.0](https://github.com/zkat/cipm/compare/v0.6.0...v0.7.0) (2017-10-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lockfile:** npm-shrinkwrap takes precedence over package-lock (#28) ([3b98fb3](https://github.com/zkat/cipm/commit/3b98fb3))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **optional:** ignore failed optional deps (#27) ([a654629](https://github.com/zkat/cipm/commit/a654629))
|
||||
|
||||
|
||||
|
||||
<a name="0.6.0"></a>
|
||||
# [0.6.0](https://github.com/zkat/cipm/compare/v0.5.1...v0.6.0) (2017-10-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **scripts:** run prepare and prepublish scripts in the root (#26) ([e0e35a3](https://github.com/zkat/cipm/commit/e0e35a3))
|
||||
|
||||
|
||||
|
||||
<a name="0.5.1"></a>
|
||||
## [0.5.1](https://github.com/zkat/cipm/compare/v0.5.0...v0.5.1) (2017-10-09)
|
||||
|
||||
|
||||
|
||||
<a name="0.5.0"></a>
|
||||
# [0.5.0](https://github.com/zkat/cipm/compare/v0.4.0...v0.5.0) (2017-10-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **output:** npm does not punctuate this ([e7ba976](https://github.com/zkat/cipm/commit/e7ba976))
|
||||
* **shutdown:** make sure workers close ([7ab57d0](https://github.com/zkat/cipm/commit/7ab57d0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **bin:** link bins and run scripts (#25) ([fab74bf](https://github.com/zkat/cipm/commit/fab74bf))
|
||||
* **lifecycle:** run scripts in dep order (#23) ([68ecfac](https://github.com/zkat/cipm/commit/68ecfac))
|
||||
|
||||
|
||||
|
||||
<a name="0.4.0"></a>
|
||||
# [0.4.0](https://github.com/zkat/cipm/compare/v0.3.2...v0.4.0) (2017-10-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **opts:** support full range of relevant CLI opts (#19) ([6f2bd51](https://github.com/zkat/cipm/commit/6f2bd51))
|
||||
|
||||
|
||||
|
||||
<a name="0.3.2"></a>
|
||||
## [0.3.2](https://github.com/zkat/cipm/compare/v0.3.1...v0.3.2) (2017-09-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bin:** make cli executable by default (#13) ([14a9a5f](https://github.com/zkat/cipm/commit/14a9a5f))
|
||||
* **config:** use npm.cmd on win32 and fix tests (#12) ([d912d16](https://github.com/zkat/cipm/commit/d912d16)), closes [#12](https://github.com/zkat/cipm/issues/12)
|
||||
* **json:** strip BOM when reading JSON files (#8) ([2529149](https://github.com/zkat/cipm/commit/2529149))
|
||||
|
||||
|
||||
|
||||
<a name="0.3.1"></a>
|
||||
## [0.3.1](https://github.com/zkat/cipm/compare/v0.3.0...v0.3.1) (2017-09-05)
|
||||
|
||||
|
||||
|
||||
<a name="0.3.0"></a>
|
||||
# [0.3.0](https://github.com/zkat/cipm/compare/v0.2.0...v0.3.0) (2017-09-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **lockfile:** verify that lockfile matches package.json (#5) ([f631203](https://github.com/zkat/cipm/commit/f631203))
|
||||
* **scripts:** support --ignore-scripts option (#9) ([213ca02](https://github.com/zkat/cipm/commit/213ca02))
|
||||
|
||||
|
||||
|
||||
<a name="0.2.0"></a>
|
||||
# [0.2.0](https://github.com/zkat/cipm/compare/v0.1.1...v0.2.0) (2017-09-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **main:** default --prefix ([ff06a31](https://github.com/zkat/cipm/commit/ff06a31))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **lifecycle:** actually run lifecycle scripts correctly ([7f8933e](https://github.com/zkat/cipm/commit/7f8933e))
|
||||
|
||||
|
||||
|
||||
<a name="0.1.1"></a>
|
||||
## [0.1.1](https://github.com/zkat/cipm/compare/v0.1.0...v0.1.1) (2017-08-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **files:** oops. forgot to include new files in tarball ([1ee85c9](https://github.com/zkat/cipm/commit/1ee85c9))
|
||||
|
||||
|
||||
|
||||
<a name="0.1.0"></a>
|
||||
# 0.1.0 (2017-08-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **config:** pipe stdout ([08e6af8](https://github.com/zkat/cipm/commit/08e6af8))
|
||||
* **extract:** make sure to extract properly ([9643583](https://github.com/zkat/cipm/commit/9643583))
|
||||
* **license:** switch to MIT ([0d10d0d](https://github.com/zkat/cipm/commit/0d10d0d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **impl:** rough prototype ([2970e43](https://github.com/zkat/cipm/commit/2970e43))
|
||||
* **lifecycle:** Run lifecycle events, implement prefix option, add unit tests (#1) ([d6629be](https://github.com/zkat/cipm/commit/d6629be)), closes [#1](https://github.com/zkat/cipm/issues/1)
|
||||
* **opts:** add usage string and --help ([efcc48d](https://github.com/zkat/cipm/commit/efcc48d))
|
7
website/node_modules/npm/node_modules/libcipm/LICENSE.md
generated
vendored
Normal file
7
website/node_modules/npm/node_modules/libcipm/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright 2017 Kat Marchán and Contributors
|
||||
|
||||
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.
|
37
website/node_modules/npm/node_modules/libcipm/README.md
generated
vendored
Normal file
37
website/node_modules/npm/node_modules/libcipm/README.md
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
[](https://npm.im/libcipm) [](https://npm.im/libcipm) [](https://travis-ci.org/zkat/cipm) [](https://ci.appveyor.com/project/zkat/cipm) [](https://coveralls.io/github/zkat/cipm?branch=latest)
|
||||
|
||||
[`libcipm`](https://github.com/zkat/cipm) installs npm projects in a way that's
|
||||
optimized for continuous integration/deployment/etc scenarios. It gives up
|
||||
the ability to build its own trees or install packages individually, as well
|
||||
as other user-oriented features, in exchange for speed, and being more strict
|
||||
about project state.
|
||||
|
||||
For documentation about the associated command-line tool, see
|
||||
[`cipm`](https://npm.im/cipm).
|
||||
|
||||
## Install
|
||||
|
||||
`$ npm install libcipm`
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Features](#features)
|
||||
* [Contributing](#contributing)
|
||||
* [API](#api)
|
||||
|
||||
### Features
|
||||
|
||||
* npm-compatible project installation
|
||||
* lifecycle script support
|
||||
* blazing fast
|
||||
* npm-compatible caching
|
||||
* errors if `package.json` and `package-lock.json` are out of sync, instead of fixing it like npm does. Essentially provides a `--frozen` install.
|
||||
|
||||
### Contributing
|
||||
|
||||
The libcipm team enthusiastically welcomes contributions and project
|
||||
participation! There's a bunch of things you can do if you want to contribute!
|
||||
The [Contributor Guide](CONTRIBUTING.md) has all the information you need for
|
||||
everything from reporting bugs to contributing entire new features. Please don't
|
||||
hesitate to jump in if you'd like to, or even ask us questions if something
|
||||
isn't clear.
|
402
website/node_modules/npm/node_modules/libcipm/index.js
generated
vendored
Normal file
402
website/node_modules/npm/node_modules/libcipm/index.js
generated
vendored
Normal file
@@ -0,0 +1,402 @@
|
||||
'use strict'
|
||||
|
||||
const BB = require('bluebird')
|
||||
|
||||
const binLink = require('bin-links')
|
||||
const buildLogicalTree = require('npm-logical-tree')
|
||||
const extract = require('./lib/extract.js')
|
||||
const fs = require('graceful-fs')
|
||||
const getPrefix = require('find-npm-prefix')
|
||||
const lifecycle = require('npm-lifecycle')
|
||||
const lockVerify = require('lock-verify')
|
||||
const mkdirp = BB.promisify(require('mkdirp'))
|
||||
const npa = require('npm-package-arg')
|
||||
const path = require('path')
|
||||
const readPkgJson = BB.promisify(require('read-package-json'))
|
||||
const rimraf = BB.promisify(require('rimraf'))
|
||||
|
||||
const readFileAsync = BB.promisify(fs.readFile)
|
||||
const statAsync = BB.promisify(fs.stat)
|
||||
const symlinkAsync = BB.promisify(fs.symlink)
|
||||
const writeFileAsync = BB.promisify(fs.writeFile)
|
||||
|
||||
class Installer {
|
||||
constructor (opts) {
|
||||
this.opts = opts
|
||||
this.config = opts.config
|
||||
|
||||
// Stats
|
||||
this.startTime = Date.now()
|
||||
this.runTime = 0
|
||||
this.timings = { scripts: 0 }
|
||||
this.pkgCount = 0
|
||||
|
||||
// Misc
|
||||
this.log = this.opts.log || require('./lib/silentlog.js')
|
||||
this.pkg = null
|
||||
this.tree = null
|
||||
this.failedDeps = new Set()
|
||||
}
|
||||
|
||||
timedStage (name) {
|
||||
const start = Date.now()
|
||||
return BB.resolve(this[name].apply(this, [].slice.call(arguments, 1)))
|
||||
.tap(() => {
|
||||
this.timings[name] = Date.now() - start
|
||||
this.log.info(name, `Done in ${this.timings[name] / 1000}s`)
|
||||
})
|
||||
}
|
||||
|
||||
run () {
|
||||
return this.timedStage('prepare')
|
||||
.then(() => this.timedStage('extractTree', this.tree))
|
||||
.then(() => this.timedStage('updateJson', this.tree))
|
||||
.then(pkgJsons => this.timedStage('buildTree', this.tree, pkgJsons))
|
||||
.then(() => this.timedStage('garbageCollect', this.tree))
|
||||
.then(() => this.timedStage('runScript', 'prepublish', this.pkg, this.prefix))
|
||||
.then(() => this.timedStage('runScript', 'prepare', this.pkg, this.prefix))
|
||||
.then(() => this.timedStage('teardown'))
|
||||
.then(() => {
|
||||
this.runTime = Date.now() - this.startTime
|
||||
this.log.info(
|
||||
'run-scripts',
|
||||
`total script time: ${this.timings.scripts / 1000}s`
|
||||
)
|
||||
this.log.info(
|
||||
'run-time',
|
||||
`total run time: ${this.runTime / 1000}s`
|
||||
)
|
||||
})
|
||||
.catch(err => {
|
||||
this.timedStage('teardown')
|
||||
if (err.message.match(/aggregate error/)) {
|
||||
throw err[0]
|
||||
} else {
|
||||
throw err
|
||||
}
|
||||
})
|
||||
.then(() => this)
|
||||
}
|
||||
|
||||
prepare () {
|
||||
this.log.info('prepare', 'initializing installer')
|
||||
this.log.level = this.config.get('loglevel')
|
||||
this.log.verbose('prepare', 'starting workers')
|
||||
extract.startWorkers()
|
||||
|
||||
return (
|
||||
this.config.get('prefix') && this.config.get('global')
|
||||
? BB.resolve(this.config.get('prefix'))
|
||||
// There's some Special™ logic around the `--prefix` config when it
|
||||
// comes from a config file or env vs when it comes from the CLI
|
||||
: process.argv.some(arg => arg.match(/^\s*--prefix\s*/i))
|
||||
? BB.resolve(this.config.get('prefix'))
|
||||
: getPrefix(process.cwd())
|
||||
)
|
||||
.then(prefix => {
|
||||
this.prefix = prefix
|
||||
this.log.verbose('prepare', 'installation prefix: ' + prefix)
|
||||
return BB.join(
|
||||
readJson(prefix, 'package.json'),
|
||||
readJson(prefix, 'package-lock.json', true),
|
||||
readJson(prefix, 'npm-shrinkwrap.json', true),
|
||||
(pkg, lock, shrink) => {
|
||||
if (shrink) {
|
||||
this.log.verbose('prepare', 'using npm-shrinkwrap.json')
|
||||
} else if (lock) {
|
||||
this.log.verbose('prepare', 'using package-lock.json')
|
||||
}
|
||||
pkg._shrinkwrap = shrink || lock
|
||||
this.pkg = pkg
|
||||
}
|
||||
)
|
||||
})
|
||||
.then(() => statAsync(
|
||||
path.join(this.prefix, 'node_modules')
|
||||
).catch(err => { if (err.code !== 'ENOENT') { throw err } }))
|
||||
.then(stat => {
|
||||
stat && this.log.warn(
|
||||
'prepare', 'removing existing node_modules/ before installation'
|
||||
)
|
||||
return BB.join(
|
||||
this.checkLock(),
|
||||
stat && rimraf(path.join(this.prefix, 'node_modules'))
|
||||
)
|
||||
}).then(() => {
|
||||
// This needs to happen -after- we've done checkLock()
|
||||
this.tree = buildLogicalTree(this.pkg, this.pkg._shrinkwrap)
|
||||
this.log.silly('tree', this.tree)
|
||||
this.expectedTotal = 0
|
||||
this.tree.forEach((dep, next) => {
|
||||
this.expectedTotal++
|
||||
next()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
teardown () {
|
||||
this.log.verbose('teardown', 'shutting down workers.')
|
||||
return extract.stopWorkers()
|
||||
}
|
||||
|
||||
checkLock () {
|
||||
this.log.verbose('checkLock', 'verifying package-lock data')
|
||||
const pkg = this.pkg
|
||||
const prefix = this.prefix
|
||||
if (!pkg._shrinkwrap || !pkg._shrinkwrap.lockfileVersion) {
|
||||
return BB.reject(
|
||||
new Error(`cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.`)
|
||||
)
|
||||
}
|
||||
return lockVerify(prefix).then(result => {
|
||||
if (result.status) {
|
||||
result.warnings.forEach(w => this.log.warn('lockfile', w))
|
||||
} else {
|
||||
throw new Error(
|
||||
'cipm can only install packages when your package.json and package-lock.json or ' +
|
||||
'npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` ' +
|
||||
'before continuing.\n\n' +
|
||||
result.warnings.map(w => 'Warning: ' + w).join('\n') + '\n' +
|
||||
result.errors.join('\n') + '\n'
|
||||
)
|
||||
}
|
||||
}).catch(err => {
|
||||
throw err
|
||||
})
|
||||
}
|
||||
|
||||
extractTree (tree) {
|
||||
this.log.verbose('extractTree', 'extracting dependencies to node_modules/')
|
||||
const cg = this.log.newItem('extractTree', this.expectedTotal)
|
||||
return tree.forEachAsync((dep, next) => {
|
||||
if (!this.checkDepEnv(dep)) { return }
|
||||
const depPath = dep.path(this.prefix)
|
||||
const spec = npa.resolve(dep.name, dep.version, this.prefix)
|
||||
if (dep.isRoot) {
|
||||
return next()
|
||||
} else if (spec.type === 'directory') {
|
||||
const relative = path.relative(path.dirname(depPath), spec.fetchSpec)
|
||||
this.log.silly('extractTree', `${dep.name}@${spec.fetchSpec} -> ${depPath} (symlink)`)
|
||||
return mkdirp(path.dirname(depPath))
|
||||
.then(() => symlinkAsync(relative, depPath, 'junction'))
|
||||
.catch(
|
||||
() => rimraf(depPath)
|
||||
.then(() => symlinkAsync(relative, depPath, 'junction'))
|
||||
).then(() => next())
|
||||
.then(() => {
|
||||
this.pkgCount++
|
||||
cg.completeWork(1)
|
||||
})
|
||||
} else {
|
||||
this.log.silly('extractTree', `${dep.name}@${dep.version} -> ${depPath}`)
|
||||
return (
|
||||
dep.bundled
|
||||
? statAsync(path.join(depPath, 'package.json')).catch(err => {
|
||||
if (err.code !== 'ENOENT') { throw err }
|
||||
})
|
||||
: BB.resolve(false)
|
||||
)
|
||||
.then(wasBundled => {
|
||||
// Don't extract if a bundled dep is actually present
|
||||
if (wasBundled) {
|
||||
cg.completeWork(1)
|
||||
return next()
|
||||
} else {
|
||||
return BB.resolve(extract.child(
|
||||
dep.name, dep, depPath, this.config, this.opts
|
||||
))
|
||||
.then(() => cg.completeWork(1))
|
||||
.then(() => { this.pkgCount++ })
|
||||
.then(next)
|
||||
}
|
||||
})
|
||||
}
|
||||
}, {concurrency: 50, Promise: BB})
|
||||
.then(() => cg.finish())
|
||||
}
|
||||
|
||||
checkDepEnv (dep) {
|
||||
const includeDev = (
|
||||
// Covers --dev and --development (from npm config itself)
|
||||
this.config.get('dev') ||
|
||||
(
|
||||
!/^prod(uction)?$/.test(this.config.get('only')) &&
|
||||
!this.config.get('production')
|
||||
) ||
|
||||
/^dev(elopment)?$/.test(this.config.get('only')) ||
|
||||
/^dev(elopment)?$/.test(this.config.get('also'))
|
||||
)
|
||||
const includeProd = !/^dev(elopment)?$/.test(this.config.get('only'))
|
||||
return (dep.dev && includeDev) || (!dep.dev && includeProd)
|
||||
}
|
||||
|
||||
updateJson (tree) {
|
||||
this.log.verbose('updateJson', 'updating json deps to include _from')
|
||||
const pkgJsons = new Map()
|
||||
return tree.forEachAsync((dep, next) => {
|
||||
if (!this.checkDepEnv(dep)) { return }
|
||||
const spec = npa.resolve(dep.name, dep.version)
|
||||
const depPath = dep.path(this.prefix)
|
||||
return next()
|
||||
.then(() => readJson(depPath, 'package.json'))
|
||||
.then(pkg => (spec.registry || spec.type === 'directory')
|
||||
? pkg
|
||||
: this.updateFromField(dep, pkg).then(() => pkg)
|
||||
)
|
||||
.then(pkg => (pkg.scripts && pkg.scripts.install)
|
||||
? pkg
|
||||
: this.updateInstallScript(dep, pkg).then(() => pkg)
|
||||
)
|
||||
.tap(pkg => { pkgJsons.set(dep, pkg) })
|
||||
}, {concurrency: 100, Promise: BB})
|
||||
.then(() => pkgJsons)
|
||||
}
|
||||
|
||||
buildTree (tree, pkgJsons) {
|
||||
this.log.verbose('buildTree', 'finalizing tree and running scripts')
|
||||
return tree.forEachAsync((dep, next) => {
|
||||
if (!this.checkDepEnv(dep)) { return }
|
||||
const spec = npa.resolve(dep.name, dep.version)
|
||||
const depPath = dep.path(this.prefix)
|
||||
const pkg = pkgJsons.get(dep)
|
||||
this.log.silly('buildTree', `linking ${spec}`)
|
||||
return this.runScript('preinstall', pkg, depPath)
|
||||
.then(next) // build children between preinstall and binLink
|
||||
// Don't link root bins
|
||||
.then(() => {
|
||||
if (
|
||||
dep.isRoot ||
|
||||
!(pkg.bin || pkg.man || (pkg.directories && pkg.directories.bin))
|
||||
) {
|
||||
// We skip the relatively expensive readPkgJson if there's no way
|
||||
// we'll actually be linking any bins or mans
|
||||
return
|
||||
}
|
||||
return readPkgJson(path.join(depPath, 'package.json'))
|
||||
.then(pkg => binLink(pkg, depPath, false, {
|
||||
force: this.config.get('force'),
|
||||
ignoreScripts: this.config.get('ignore-scripts'),
|
||||
log: Object.assign({}, this.log, { info: () => {} }),
|
||||
name: pkg.name,
|
||||
pkgId: pkg.name + '@' + pkg.version,
|
||||
prefix: this.prefix,
|
||||
prefixes: [this.prefix],
|
||||
umask: this.config.get('umask')
|
||||
}), e => {
|
||||
this.log.verbose('buildTree', `error linking ${spec}: ${e.message} ${e.stack}`)
|
||||
})
|
||||
})
|
||||
.then(() => this.runScript('install', pkg, depPath))
|
||||
.then(() => this.runScript('postinstall', pkg, depPath))
|
||||
.then(() => this)
|
||||
.catch(e => {
|
||||
if (dep.optional) {
|
||||
this.failedDeps.add(dep)
|
||||
} else {
|
||||
throw e
|
||||
}
|
||||
})
|
||||
}, {concurrency: 1, Promise: BB})
|
||||
}
|
||||
|
||||
updateFromField (dep, pkg) {
|
||||
const depPath = dep.path(this.prefix)
|
||||
const depPkgPath = path.join(depPath, 'package.json')
|
||||
const parent = dep.requiredBy.values().next().value
|
||||
return readJson(parent.path(this.prefix), 'package.json')
|
||||
.then(ppkg =>
|
||||
(ppkg.dependencies && ppkg.dependencies[dep.name]) ||
|
||||
(ppkg.devDependencies && ppkg.devDependencies[dep.name]) ||
|
||||
(ppkg.optionalDependencies && ppkg.optionalDependencies[dep.name])
|
||||
)
|
||||
.then(from => npa.resolve(dep.name, from))
|
||||
.then(from => { pkg._from = from.toString() })
|
||||
.then(() => writeFileAsync(depPkgPath, JSON.stringify(pkg, null, 2)))
|
||||
.then(pkg)
|
||||
}
|
||||
|
||||
updateInstallScript (dep, pkg) {
|
||||
const depPath = dep.path(this.prefix)
|
||||
return statAsync(path.join(depPath, 'binding.gyp'))
|
||||
.catch(err => { if (err.code !== 'ENOENT') { throw err } })
|
||||
.then(stat => {
|
||||
if (stat) {
|
||||
if (!pkg.scripts) {
|
||||
pkg.scripts = {}
|
||||
}
|
||||
pkg.scripts.install = 'node-gyp rebuild'
|
||||
}
|
||||
})
|
||||
.then(pkg)
|
||||
}
|
||||
|
||||
// A cute little mark-and-sweep collector!
|
||||
garbageCollect (tree) {
|
||||
if (!this.failedDeps.size) { return }
|
||||
return sweep(
|
||||
tree,
|
||||
this.prefix,
|
||||
mark(tree, this.failedDeps)
|
||||
)
|
||||
.then(purged => {
|
||||
this.purgedDeps = purged
|
||||
this.pkgCount -= purged.size
|
||||
})
|
||||
}
|
||||
|
||||
runScript (stage, pkg, pkgPath) {
|
||||
const start = Date.now()
|
||||
if (!this.config.get('ignore-scripts')) {
|
||||
// TODO(mikesherov): remove pkg._id when npm-lifecycle no longer relies on it
|
||||
pkg._id = pkg.name + '@' + pkg.version
|
||||
const opts = this.config.toLifecycle()
|
||||
return BB.resolve(lifecycle(pkg, stage, pkgPath, opts))
|
||||
.tap(() => { this.timings.scripts += Date.now() - start })
|
||||
}
|
||||
return BB.resolve()
|
||||
}
|
||||
}
|
||||
module.exports = Installer
|
||||
module.exports.CipmConfig = require('./lib/config/npm-config.js').CipmConfig
|
||||
|
||||
function mark (tree, failed) {
|
||||
const liveDeps = new Set()
|
||||
tree.forEach((dep, next) => {
|
||||
if (!failed.has(dep)) {
|
||||
liveDeps.add(dep)
|
||||
next()
|
||||
}
|
||||
})
|
||||
return liveDeps
|
||||
}
|
||||
|
||||
function sweep (tree, prefix, liveDeps) {
|
||||
const purged = new Set()
|
||||
return tree.forEachAsync((dep, next) => {
|
||||
return next().then(() => {
|
||||
if (
|
||||
!dep.isRoot && // never purge root! 🙈
|
||||
!liveDeps.has(dep) &&
|
||||
!purged.has(dep)
|
||||
) {
|
||||
purged.add(dep)
|
||||
return rimraf(dep.path(prefix))
|
||||
}
|
||||
})
|
||||
}, {concurrency: 50, Promise: BB}).then(() => purged)
|
||||
}
|
||||
|
||||
function stripBOM (str) {
|
||||
return str.replace(/^\uFEFF/, '')
|
||||
}
|
||||
|
||||
module.exports._readJson = readJson
|
||||
function readJson (jsonPath, name, ignoreMissing) {
|
||||
return readFileAsync(path.join(jsonPath, name), 'utf8')
|
||||
.then(str => JSON.parse(stripBOM(str)))
|
||||
.catch({code: 'ENOENT'}, err => {
|
||||
if (!ignoreMissing) {
|
||||
throw err
|
||||
}
|
||||
})
|
||||
}
|
29
website/node_modules/npm/node_modules/libcipm/lib/config/lifecycle-opts.js
generated
vendored
Normal file
29
website/node_modules/npm/node_modules/libcipm/lib/config/lifecycle-opts.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict'
|
||||
|
||||
const log = require('npmlog')
|
||||
|
||||
module.exports = lifecycleOpts
|
||||
function lifecycleOpts (opts) {
|
||||
const objConfig = {}
|
||||
for (const key of opts.keys()) {
|
||||
const val = opts.get(key)
|
||||
if (val != null) {
|
||||
objConfig[key] = val
|
||||
}
|
||||
}
|
||||
return {
|
||||
config: objConfig,
|
||||
scriptShell: opts.get('script-shell'),
|
||||
force: opts.get('force'),
|
||||
user: opts.get('user'),
|
||||
group: opts.get('group'),
|
||||
ignoreScripts: opts.get('ignore-scripts'),
|
||||
ignorePrepublish: opts.get('ignore-prepublish'),
|
||||
scriptsPrependNodePath: opts.get('scripts-prepend-node-path'),
|
||||
unsafePerm: opts.get('unsafe-perm'),
|
||||
log,
|
||||
dir: opts.get('prefix'),
|
||||
failOk: false,
|
||||
production: opts.get('production')
|
||||
}
|
||||
}
|
72
website/node_modules/npm/node_modules/libcipm/lib/config/npm-config.js
generated
vendored
Normal file
72
website/node_modules/npm/node_modules/libcipm/lib/config/npm-config.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
'use strict'
|
||||
|
||||
const BB = require('bluebird')
|
||||
const lifecycleOpts = require('./lifecycle-opts.js')
|
||||
const pacoteOpts = require('./pacote-opts.js')
|
||||
const protoduck = require('protoduck')
|
||||
const spawn = require('child_process').spawn
|
||||
|
||||
class NpmConfig extends Map {}
|
||||
|
||||
const CipmConfig = protoduck.define({
|
||||
get: [],
|
||||
set: [],
|
||||
toPacote: [],
|
||||
toLifecycle: []
|
||||
}, {
|
||||
name: 'CipmConfig'
|
||||
})
|
||||
module.exports.CipmConfig = CipmConfig
|
||||
|
||||
CipmConfig.impl(NpmConfig, {
|
||||
get: Map.prototype.get,
|
||||
set: Map.prototype.set,
|
||||
toPacote (opts) {
|
||||
return pacoteOpts(this, opts)
|
||||
},
|
||||
toLifecycle () {
|
||||
return lifecycleOpts(this)
|
||||
}
|
||||
})
|
||||
|
||||
module.exports.fromObject = fromObj
|
||||
function fromObj (obj) {
|
||||
const map = new NpmConfig()
|
||||
Object.keys(obj).forEach(k => map.set(k, obj[k]))
|
||||
return map
|
||||
}
|
||||
|
||||
module.exports.fromNpm = getNpmConfig
|
||||
function getNpmConfig (argv) {
|
||||
return new BB((resolve, reject) => {
|
||||
const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm'
|
||||
const child = spawn(npmBin, [
|
||||
'config', 'ls', '--json', '-l'
|
||||
// We add argv here to get npm to parse those options for us :D
|
||||
].concat(argv || []), {
|
||||
env: process.env,
|
||||
cwd: process.cwd(),
|
||||
stdio: [0, 'pipe', 2]
|
||||
})
|
||||
|
||||
let stdout = ''
|
||||
if (child.stdout) {
|
||||
child.stdout.on('data', (chunk) => {
|
||||
stdout += chunk
|
||||
})
|
||||
}
|
||||
|
||||
child.on('error', reject)
|
||||
child.on('close', (code) => {
|
||||
if (code === 127) {
|
||||
reject(new Error('`npm` command not found. Please ensure you have npm@5.4.0 or later installed.'))
|
||||
} else {
|
||||
try {
|
||||
resolve(fromObj(JSON.parse(stdout)))
|
||||
} catch (e) {
|
||||
reject(new Error('`npm config ls --json` failed to output json. Please ensure you have npm@5.4.0 or later installed.'))
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
135
website/node_modules/npm/node_modules/libcipm/lib/config/pacote-opts.js
generated
vendored
Normal file
135
website/node_modules/npm/node_modules/libcipm/lib/config/pacote-opts.js
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
'use strict'
|
||||
|
||||
const Buffer = require('safe-buffer').Buffer
|
||||
|
||||
const crypto = require('crypto')
|
||||
const path = require('path')
|
||||
|
||||
let effectiveOwner
|
||||
|
||||
const npmSession = crypto.randomBytes(8).toString('hex')
|
||||
|
||||
module.exports = pacoteOpts
|
||||
function pacoteOpts (npmOpts, moreOpts) {
|
||||
const ownerStats = calculateOwner()
|
||||
const opts = {
|
||||
cache: path.join(npmOpts.get('cache'), '_cacache'),
|
||||
ca: npmOpts.get('ca'),
|
||||
cert: npmOpts.get('cert'),
|
||||
git: npmOpts.get('git'),
|
||||
key: npmOpts.get('key'),
|
||||
localAddress: npmOpts.get('local-address'),
|
||||
loglevel: npmOpts.get('loglevel'),
|
||||
maxSockets: +(npmOpts.get('maxsockets') || 15),
|
||||
npmSession: npmSession,
|
||||
offline: npmOpts.get('offline'),
|
||||
projectScope: moreOpts.rootPkg && getProjectScope(moreOpts.rootPkg.name),
|
||||
proxy: npmOpts.get('https-proxy') || npmOpts.get('proxy'),
|
||||
refer: 'cipm',
|
||||
registry: npmOpts.get('registry'),
|
||||
retry: {
|
||||
retries: npmOpts.get('fetch-retries'),
|
||||
factor: npmOpts.get('fetch-retry-factor'),
|
||||
minTimeout: npmOpts.get('fetch-retry-mintimeout'),
|
||||
maxTimeout: npmOpts.get('fetch-retry-maxtimeout')
|
||||
},
|
||||
strictSSL: npmOpts.get('strict-ssl'),
|
||||
userAgent: npmOpts.get('user-agent'),
|
||||
|
||||
dmode: parseInt('0777', 8) & (~npmOpts.get('umask')),
|
||||
fmode: parseInt('0666', 8) & (~npmOpts.get('umask')),
|
||||
umask: npmOpts.get('umask')
|
||||
}
|
||||
|
||||
if (ownerStats.uid != null || ownerStats.gid != null) {
|
||||
Object.assign(opts, ownerStats)
|
||||
}
|
||||
|
||||
(npmOpts.forEach ? Array.from(npmOpts.keys()) : npmOpts.keys).forEach(k => {
|
||||
const authMatchGlobal = k.match(
|
||||
/^(_authToken|username|_password|password|email|always-auth|_auth)$/
|
||||
)
|
||||
const authMatchScoped = k[0] === '/' && k.match(
|
||||
/(.*):(_authToken|username|_password|password|email|always-auth|_auth)$/
|
||||
)
|
||||
|
||||
// if it matches scoped it will also match global
|
||||
if (authMatchGlobal || authMatchScoped) {
|
||||
let nerfDart = null
|
||||
let key = null
|
||||
let val = null
|
||||
|
||||
if (!opts.auth) { opts.auth = {} }
|
||||
|
||||
if (authMatchScoped) {
|
||||
nerfDart = authMatchScoped[1]
|
||||
key = authMatchScoped[2]
|
||||
val = npmOpts.get(k)
|
||||
if (!opts.auth[nerfDart]) {
|
||||
opts.auth[nerfDart] = {
|
||||
alwaysAuth: !!npmOpts.get('always-auth')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
key = authMatchGlobal[1]
|
||||
val = npmOpts.get(k)
|
||||
opts.auth.alwaysAuth = !!npmOpts.get('always-auth')
|
||||
}
|
||||
|
||||
const auth = authMatchScoped ? opts.auth[nerfDart] : opts.auth
|
||||
if (key === '_authToken') {
|
||||
auth.token = val
|
||||
} else if (key.match(/password$/i)) {
|
||||
auth.password =
|
||||
// the config file stores password auth already-encoded. pacote expects
|
||||
// the actual username/password pair.
|
||||
Buffer.from(val, 'base64').toString('utf8')
|
||||
} else if (key === 'always-auth') {
|
||||
auth.alwaysAuth = val === 'false' ? false : !!val
|
||||
} else {
|
||||
auth[key] = val
|
||||
}
|
||||
}
|
||||
|
||||
if (k[0] === '@') {
|
||||
if (!opts.scopeTargets) { opts.scopeTargets = {} }
|
||||
opts.scopeTargets[k.replace(/:registry$/, '')] = npmOpts.get(k)
|
||||
}
|
||||
})
|
||||
|
||||
Object.keys(moreOpts || {}).forEach((k) => {
|
||||
opts[k] = moreOpts[k]
|
||||
})
|
||||
|
||||
return opts
|
||||
}
|
||||
|
||||
function calculateOwner () {
|
||||
if (!effectiveOwner) {
|
||||
effectiveOwner = { uid: 0, gid: 0 }
|
||||
|
||||
// Pretty much only on windows
|
||||
if (!process.getuid) {
|
||||
return effectiveOwner
|
||||
}
|
||||
|
||||
effectiveOwner.uid = +process.getuid()
|
||||
effectiveOwner.gid = +process.getgid()
|
||||
|
||||
if (effectiveOwner.uid === 0) {
|
||||
if (process.env.SUDO_UID) effectiveOwner.uid = +process.env.SUDO_UID
|
||||
if (process.env.SUDO_GID) effectiveOwner.gid = +process.env.SUDO_GID
|
||||
}
|
||||
}
|
||||
|
||||
return effectiveOwner
|
||||
}
|
||||
|
||||
function getProjectScope (pkgName) {
|
||||
const sep = pkgName.indexOf('/')
|
||||
if (sep === -1) {
|
||||
return ''
|
||||
} else {
|
||||
return pkgName.slice(0, sep)
|
||||
}
|
||||
}
|
55
website/node_modules/npm/node_modules/libcipm/lib/extract.js
generated
vendored
Normal file
55
website/node_modules/npm/node_modules/libcipm/lib/extract.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
'use strict'
|
||||
|
||||
const BB = require('bluebird')
|
||||
|
||||
const npa = require('npm-package-arg')
|
||||
const workerFarm = require('worker-farm')
|
||||
|
||||
const extractionWorker = require('./worker.js')
|
||||
const WORKER_PATH = require.resolve('./worker.js')
|
||||
|
||||
module.exports = {
|
||||
startWorkers () {
|
||||
this._workers = workerFarm({
|
||||
maxConcurrentCallsPerWorker: 20,
|
||||
maxRetries: 1
|
||||
}, WORKER_PATH)
|
||||
},
|
||||
|
||||
stopWorkers () {
|
||||
workerFarm.end(this._workers)
|
||||
},
|
||||
|
||||
child (name, child, childPath, config, opts) {
|
||||
const spec = npa.resolve(name, child.version)
|
||||
const additionalToPacoteOpts = {}
|
||||
if (typeof opts.dirPacker !== 'undefined') {
|
||||
additionalToPacoteOpts.dirPacker = opts.dirPacker
|
||||
}
|
||||
const childOpts = config.toPacote(Object.assign({
|
||||
integrity: child.integrity,
|
||||
resolved: child.resolved
|
||||
}, additionalToPacoteOpts))
|
||||
const args = [spec, childPath, childOpts]
|
||||
return BB.fromNode((cb) => {
|
||||
let launcher = extractionWorker
|
||||
let msg = args
|
||||
const spec = typeof args[0] === 'string' ? npa(args[0]) : args[0]
|
||||
childOpts.loglevel = opts.log.level
|
||||
if (spec.registry || spec.type === 'remote') {
|
||||
// We can't serialize these options
|
||||
childOpts.config = null
|
||||
childOpts.log = null
|
||||
childOpts.dirPacker = null
|
||||
// workers will run things in parallel!
|
||||
launcher = this._workers
|
||||
try {
|
||||
msg = JSON.stringify(msg)
|
||||
} catch (e) {
|
||||
return cb(e)
|
||||
}
|
||||
}
|
||||
launcher(msg, cb)
|
||||
})
|
||||
}
|
||||
}
|
13
website/node_modules/npm/node_modules/libcipm/lib/silentlog.js
generated
vendored
Normal file
13
website/node_modules/npm/node_modules/libcipm/lib/silentlog.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict'
|
||||
|
||||
const noop = Function.prototype
|
||||
module.exports = {
|
||||
error: noop,
|
||||
warn: noop,
|
||||
info: noop,
|
||||
verbose: noop,
|
||||
silly: noop,
|
||||
http: noop,
|
||||
pause: noop,
|
||||
resume: noop
|
||||
}
|
16
website/node_modules/npm/node_modules/libcipm/lib/worker.js
generated
vendored
Normal file
16
website/node_modules/npm/node_modules/libcipm/lib/worker.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict'
|
||||
|
||||
const BB = require('bluebird')
|
||||
|
||||
const log = require('npmlog')
|
||||
const pacote = require('pacote')
|
||||
|
||||
module.exports = (args, cb) => {
|
||||
const parsed = typeof args === 'string' ? JSON.parse(args) : args
|
||||
const spec = parsed[0]
|
||||
const extractTo = parsed[1]
|
||||
const opts = parsed[2]
|
||||
opts.log = log
|
||||
log.level = opts.loglevel
|
||||
return BB.resolve(pacote.extract(spec, extractTo, opts)).nodeify(cb)
|
||||
}
|
98
website/node_modules/npm/node_modules/libcipm/package.json
generated
vendored
Normal file
98
website/node_modules/npm/node_modules/libcipm/package.json
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"_from": "libcipm@2.0.2",
|
||||
"_id": "libcipm@2.0.2",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha512-9uZ6/LAflVEijksTRq/RX0e+pGA4mr8tND9Cmk2JMg7j2fFUBrs8PpFX2DOAJR/XoxPzz+5h8bkWmtIYLunKAg==",
|
||||
"_location": "/npm/libcipm",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "libcipm@2.0.2",
|
||||
"name": "libcipm",
|
||||
"escapedName": "libcipm",
|
||||
"rawSpec": "2.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/npm"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-2.0.2.tgz",
|
||||
"_shasum": "4f38c2b37acf2ec156936cef1cbf74636568fc7b",
|
||||
"_spec": "libcipm@2.0.2",
|
||||
"_where": "/Users/zkat/Documents/code/work/npm",
|
||||
"author": {
|
||||
"name": "Kat Marchán",
|
||||
"email": "kzm@sykosomatic.org"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/zkat/cipm/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"config": {
|
||||
"nyc": {
|
||||
"exclude": [
|
||||
"node_modules/**",
|
||||
"test/**"
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"bin-links": "^1.1.2",
|
||||
"bluebird": "^3.5.1",
|
||||
"find-npm-prefix": "^1.0.2",
|
||||
"graceful-fs": "^4.1.11",
|
||||
"lock-verify": "^2.0.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
"npm-lifecycle": "^2.0.3",
|
||||
"npm-logical-tree": "^1.2.1",
|
||||
"npm-package-arg": "^6.1.0",
|
||||
"pacote": "^8.1.6",
|
||||
"protoduck": "^5.0.0",
|
||||
"read-package-json": "^2.0.13",
|
||||
"rimraf": "^2.6.2",
|
||||
"worker-farm": "^1.6.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "programmatic API for cipm: a ci-oriented package installer for npm",
|
||||
"devDependencies": {
|
||||
"npmlog": "^4.1.2",
|
||||
"nyc": "^11.8.0",
|
||||
"require-inject": "^1.4.3",
|
||||
"standard": "^11.0.1",
|
||||
"standard-version": "^4.4.0",
|
||||
"tacks": "^1.2.6",
|
||||
"tap": "^12.0.1",
|
||||
"weallbehave": "^1.2.0",
|
||||
"weallcontribute": "^1.0.8"
|
||||
},
|
||||
"files": [
|
||||
"*.js",
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/zkat/cipm#readme",
|
||||
"keywords": [
|
||||
"npm",
|
||||
"package manager",
|
||||
"caching",
|
||||
"downloader"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "libcipm",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zkat/cipm.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postrelease": "npm publish && git push --follow-tags",
|
||||
"prerelease": "npm t",
|
||||
"pretest": "standard",
|
||||
"release": "standard-version -s",
|
||||
"test": "tap -J --nyc-arg=--all --coverage test/specs",
|
||||
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
|
||||
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
|
||||
},
|
||||
"version": "2.0.2"
|
||||
}
|
Reference in New Issue
Block a user