refactor(Cypress): add nodemodules
This commit is contained in:
13
node_modules/shasum-object/.travis.yml
generated
vendored
Normal file
13
node_modules/shasum-object/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- '0.8'
|
||||
- '0.10'
|
||||
- '0.12'
|
||||
- '4'
|
||||
- '6'
|
||||
- '8'
|
||||
- '10'
|
||||
- '12'
|
||||
- 'stable'
|
||||
before_install:
|
||||
- 'nvm install-latest-npm'
|
8
node_modules/shasum-object/CHANGELOG.md
generated
vendored
Normal file
8
node_modules/shasum-object/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# shasum-object change log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 1.0.0
|
||||
* Initial release.
|
74
node_modules/shasum-object/CODE_OF_CONDUCT.md
generated
vendored
Normal file
74
node_modules/shasum-object/CODE_OF_CONDUCT.md
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at renee@kooi.me. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [https://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: https://contributor-covenant.org
|
||||
[version]: https://contributor-covenant.org/version/1/4/
|
15
node_modules/shasum-object/LICENSE.md
generated
vendored
Normal file
15
node_modules/shasum-object/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# [Apache License 2.0](https://spdx.org/licenses/Apache-2.0)
|
||||
|
||||
Copyright 2019 Renée Kooi <renee@kooi.me>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
> http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
48
node_modules/shasum-object/README.md
generated
vendored
Normal file
48
node_modules/shasum-object/README.md
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# shasum-object
|
||||
|
||||
get the shasum of a buffer or object
|
||||
|
||||
[Install](#install) - [Usage](#usage) - [License: Apache-2.0](#license)
|
||||
|
||||
[![npm][npm-image]][npm-url]
|
||||
[![travis][travis-image]][travis-url]
|
||||
[![standard][standard-image]][standard-url]
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/shasum-object.svg?style=flat-square
|
||||
[npm-url]: https://www.npmjs.com/package/shasum-object
|
||||
[travis-image]: https://img.shields.io/travis/com/goto-bus-stop/shasum-object.svg?style=flat-square
|
||||
[travis-url]: https://travis-ci.com/goto-bus-stop/shasum-object
|
||||
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
|
||||
[standard-url]: http://npm.im/standard
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install shasum-object
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var fs = require('fs')
|
||||
var shasum = require('shasum-object')
|
||||
|
||||
shasum('of a string')
|
||||
shasum(fs.readFileSync('of-a-file.txt'))
|
||||
|
||||
shasum({
|
||||
of: ['an', 'object']
|
||||
})
|
||||
```
|
||||
|
||||
## API
|
||||
### `shasum(input, algorithm = 'sha1', encoding = 'hex')`
|
||||
|
||||
Compute the hash for the given input.
|
||||
- `input` - a string, buffer or JSON object. objects are stringified using [`fast-safe-stringify`](https://github.com/davidmarkclements/fast-safe-stringify).
|
||||
- `algorithm` - the hash algorithm to use. see [`crypto.createHash`](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options).
|
||||
- `encoding` - how to encode the hash result. see [`hash.digest`](https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding).
|
||||
|
||||
## License
|
||||
|
||||
[Apache-2.0](LICENSE.md)
|
15
node_modules/shasum-object/bin.js
generated
vendored
Executable file
15
node_modules/shasum-object/bin.js
generated
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var fs = require('fs')
|
||||
var shasum = require('.')
|
||||
|
||||
var input = process.argv[2]
|
||||
if (input && input !== '-') {
|
||||
console.log(shasum(fs.readFileSync(input)))
|
||||
} else {
|
||||
var buffers = []
|
||||
process.stdin.on('data', function (chunk) { buffers.push(chunk) })
|
||||
process.stdin.on('end', function () {
|
||||
console.log(shasum(Buffer.concat(buffers)))
|
||||
})
|
||||
}
|
12
node_modules/shasum-object/index.js
generated
vendored
Normal file
12
node_modules/shasum-object/index.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
var createHash = require('crypto').createHash
|
||||
var stringify = require('fast-safe-stringify')
|
||||
|
||||
module.exports = function shasum (input, hash, digest) {
|
||||
if (!hash) hash = 'sha1'
|
||||
if (!digest) digest = 'hex'
|
||||
if (typeof input !== 'string' && !Buffer.isBuffer(input)) input = stringify.stable(input)
|
||||
|
||||
return createHash(hash)
|
||||
.update(input, typeof input === 'string' ? 'utf8' : undefined)
|
||||
.digest(digest)
|
||||
}
|
62
node_modules/shasum-object/package.json
generated
vendored
Normal file
62
node_modules/shasum-object/package.json
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"_from": "shasum-object@^1.0.0",
|
||||
"_id": "shasum-object@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==",
|
||||
"_location": "/shasum-object",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "shasum-object@^1.0.0",
|
||||
"name": "shasum-object",
|
||||
"escapedName": "shasum-object",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/deps-sort"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz",
|
||||
"_shasum": "0b7b74ff5b66ecf9035475522fa05090ac47e29e",
|
||||
"_spec": "shasum-object@^1.0.0",
|
||||
"_where": "/home/simon/Documents/lifen-autotest/node_modules/deps-sort",
|
||||
"author": {
|
||||
"name": "Renée Kooi",
|
||||
"email": "renee@kooi.me"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/goto-bus-stop/shasum-object/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"fast-safe-stringify": "^2.0.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "get the shasum of a buffer or object",
|
||||
"devDependencies": {
|
||||
"safe-buffer": "^5.2.0",
|
||||
"standard": "^14.3.1",
|
||||
"tape": "^4.10.0"
|
||||
},
|
||||
"homepage": "https://github.com/goto-bus-stop/shasum-object",
|
||||
"keywords": [
|
||||
"buffer",
|
||||
"hash",
|
||||
"object",
|
||||
"sha1",
|
||||
"shasum"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"main": "index.js",
|
||||
"name": "shasum-object",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/goto-bus-stop/shasum-object.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard && node test"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
39
node_modules/shasum-object/test/index.js
generated
vendored
Normal file
39
node_modules/shasum-object/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
var tape = require('tape')
|
||||
var Buffer = require('safe-buffer').Buffer
|
||||
var shasum = require('..')
|
||||
|
||||
tape('strings', function (t) {
|
||||
t.plan(3)
|
||||
t.strictEqual(shasum('abc'), 'a9993e364706816aba3e25717850c26c9cd0d89d')
|
||||
t.strictEqual(shasum('abce'), '0a431a7631cabf6b11b984a943127b5e0aa9d687')
|
||||
t.strictEqual(shasum('ab\xff'), 'ba5142a8207bd61baddf325088732e71cbfe8eb6')
|
||||
})
|
||||
|
||||
tape('json values', function (t) {
|
||||
t.plan(2)
|
||||
t.strictEqual(shasum({}), 'bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f')
|
||||
t.strictEqual(shasum([]), '97d170e1550eee4afc0af065b78cda302a97674c')
|
||||
})
|
||||
|
||||
tape('buffers', function (t) {
|
||||
t.plan(2)
|
||||
t.strictEqual(shasum(Buffer.from('abc')),
|
||||
'a9993e364706816aba3e25717850c26c9cd0d89d')
|
||||
t.strictEqual(shasum(Buffer.from('ab\xff').toString()),
|
||||
'ba5142a8207bd61baddf325088732e71cbfe8eb6')
|
||||
})
|
||||
|
||||
tape('circular json', function (t) {
|
||||
t.plan(1)
|
||||
var a = { b: 1 }
|
||||
a.a = a
|
||||
t.strictEqual(shasum(a), 'a22ca7ba0fe6144501fe50d9c8a9ba889057db3b')
|
||||
})
|
||||
|
||||
tape('stability', function (t) {
|
||||
t.plan(4)
|
||||
t.strictEqual(shasum({ a: 1, b: 2, c: 3 }), shasum({ c: 3, b: 2, a: 1 }))
|
||||
t.strictEqual(shasum({ a: 1, b: 2, c: 3 }), shasum({ c: 3, b: 2, a: 1 }))
|
||||
t.strictEqual(shasum({ a: 1, b: [2, 3], c: 4 }), shasum({ c: 4, b: [2, 3], a: 1 }))
|
||||
t.strictEqual(shasum({ a: 1, b: [2, { c: 3, d: 4 }], e: 5 }), shasum({ e: 5, b: [2, { d: 4, c: 3 }], a: 1 }))
|
||||
})
|
Reference in New Issue
Block a user