mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
31
node_modules/uid-safe/HISTORY.md
generated
vendored
Normal file
31
node_modules/uid-safe/HISTORY.md
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
2.0.0 / 2015-05-08
|
||||
==================
|
||||
|
||||
* Use global `Promise` when returning a promise
|
||||
|
||||
1.1.0 / 2015-02-01
|
||||
==================
|
||||
|
||||
* Use `crypto.randomBytes`, if available
|
||||
* deps: base64-url@1.2.1
|
||||
|
||||
1.0.3 / 2015-01-31
|
||||
==================
|
||||
|
||||
* Fix error branch that would throw
|
||||
* deps: base64-url@1.2.0
|
||||
|
||||
1.0.2 / 2015-01-08
|
||||
==================
|
||||
|
||||
* Remove dependency on `mz`
|
||||
|
||||
1.0.1 / 2014-06-18
|
||||
==================
|
||||
|
||||
* Remove direct `bluebird` dependency
|
||||
|
||||
1.0.0 / 2014-06-18
|
||||
==================
|
||||
|
||||
* Initial release
|
||||
22
node_modules/uid-safe/LICENSE
generated
vendored
Normal file
22
node_modules/uid-safe/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.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.
|
||||
76
node_modules/uid-safe/README.md
generated
vendored
Normal file
76
node_modules/uid-safe/README.md
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
# uid-safe
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
URL and cookie safe UIDs
|
||||
|
||||
Create cryptographically secure UIDs safe for both cookie and URL usage.
|
||||
This is in contrast to modules such as [rand-token](https://www.npmjs.com/package/rand-token)
|
||||
and [uid2](https://www.npmjs.com/package/uid2) whose UIDs are actually skewed
|
||||
due to the use of `%` and unnecessarily truncate the UID.
|
||||
Use this if you could still use UIDs with `-` and `_` in them.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install uid-safe
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var uid = require('uid-safe')
|
||||
```
|
||||
|
||||
### uid(byteLength, callback)
|
||||
|
||||
Asynchronously create a UID with a specific byte length. Because `base64`
|
||||
encoding is used underneath, this is not the string length. For example,
|
||||
to create a UID of length 24, you want a byte length of 18.
|
||||
|
||||
```js
|
||||
uid(18, function (err, string) {
|
||||
if (err) throw err
|
||||
// do something with the string
|
||||
})
|
||||
```
|
||||
|
||||
### uid(byteLength)
|
||||
|
||||
Asynchronously create a UID with a specific byte length and return a
|
||||
`Promise`.
|
||||
|
||||
**To use promises, you must define a global `Promise` if necessary.**
|
||||
|
||||
```js
|
||||
uid(18).then(function (string) {
|
||||
// do something with the string
|
||||
})
|
||||
```
|
||||
|
||||
### uid.sync(byteLength)
|
||||
|
||||
A synchronous version of above.
|
||||
|
||||
```js
|
||||
var string = uid.sync(18)
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/uid-safe.svg
|
||||
[npm-url]: https://npmjs.org/package/uid-safe
|
||||
[node-version-image]: https://img.shields.io/node/v/uid-safe.svg
|
||||
[node-version-url]: http://nodejs.org/download/
|
||||
[travis-image]: https://img.shields.io/travis/crypto-utils/uid-safe/master.svg
|
||||
[travis-url]: https://travis-ci.org/crypto-utils/uid-safe
|
||||
[coveralls-image]: https://img.shields.io/coveralls/crypto-utils/uid-safe/master.svg
|
||||
[coveralls-url]: https://coveralls.io/r/crypto-utils/uid-safe?branch=master
|
||||
[downloads-image]: https://img.shields.io/npm/dm/uid-safe.svg
|
||||
[downloads-url]: https://npmjs.org/package/uid-safe
|
||||
119
node_modules/uid-safe/index.js
generated
vendored
Normal file
119
node_modules/uid-safe/index.js
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
/*!
|
||||
* uid-safe
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var crypto = require('crypto')
|
||||
var escape = require('base64-url').escape
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @public
|
||||
*/
|
||||
|
||||
module.exports = uid
|
||||
module.exports.sync = uidSync
|
||||
|
||||
/**
|
||||
* Create a unique ID.
|
||||
*
|
||||
* @param {number} length
|
||||
* @param {function} [callback]
|
||||
* @return {Promise}
|
||||
* @public
|
||||
*/
|
||||
|
||||
function uid(length, callback) {
|
||||
// validate callback is a function, if provided
|
||||
if (callback !== undefined && typeof callback !== 'function') {
|
||||
throw new TypeError('argument callback must be a function')
|
||||
}
|
||||
|
||||
// require the callback without promises
|
||||
if (!callback && !global.Promise) {
|
||||
throw new TypeError('argument callback is required')
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
// classic callback style
|
||||
return generateUid(length, callback)
|
||||
}
|
||||
|
||||
return new Promise(function executor(resolve, reject) {
|
||||
generateUid(length, function onUid(err, str) {
|
||||
if (err) return reject(err)
|
||||
resolve(str)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a unique ID sync.
|
||||
*
|
||||
* @param {number} length
|
||||
* @return {string}
|
||||
* @public
|
||||
*/
|
||||
|
||||
function uidSync(length) {
|
||||
try {
|
||||
return toString(crypto.randomBytes(length))
|
||||
} catch (e) {
|
||||
return toString(crypto.pseudoRandomBytes(length))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a unique ID string.
|
||||
*
|
||||
* @param {number} length
|
||||
* @param {function} callback
|
||||
* @private
|
||||
*/
|
||||
|
||||
function generateUid(length, callback) {
|
||||
randomBytes(length, function (err, buf) {
|
||||
if (err) return callback(err)
|
||||
callback(null, toString(buf))
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get some random bytes.
|
||||
*
|
||||
* @param {number} length
|
||||
* @param {function} callback
|
||||
* @return {Buffer}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function randomBytes(length, callback) {
|
||||
crypto.randomBytes(length, function (err, buf) {
|
||||
if (!err) return callback(null, buf)
|
||||
crypto.pseudoRandomBytes(length, function (err, buf) {
|
||||
if (err) return callback(err)
|
||||
callback(null, buf)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Change a Buffer into a string.
|
||||
*
|
||||
* @param {Buffer} buf
|
||||
* @return {string}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function toString(buf) {
|
||||
return escape(buf.toString('base64'))
|
||||
}
|
||||
109
node_modules/uid-safe/package.json
generated
vendored
Normal file
109
node_modules/uid-safe/package.json
generated
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"uid-safe@~2.0.0",
|
||||
"/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/express-session"
|
||||
]
|
||||
],
|
||||
"_from": "uid-safe@>=2.0.0 <2.1.0",
|
||||
"_id": "uid-safe@2.0.0",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/uid-safe",
|
||||
"_npmUser": {
|
||||
"email": "doug@somethingdoug.com",
|
||||
"name": "dougwilson"
|
||||
},
|
||||
"_npmVersion": "1.4.28",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "uid-safe",
|
||||
"raw": "uid-safe@~2.0.0",
|
||||
"rawSpec": "~2.0.0",
|
||||
"scope": null,
|
||||
"spec": ">=2.0.0 <2.1.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/express-session"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.0.0.tgz",
|
||||
"_shasum": "a7f3c6ca64a1f6a5d04ec0ef3e4c3d5367317137",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "uid-safe@~2.0.0",
|
||||
"_where": "/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/express-session",
|
||||
"bugs": {
|
||||
"url": "https://github.com/crypto-utils/uid-safe/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Douglas Christopher Wilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Ong",
|
||||
"email": "me@jongleberry.com",
|
||||
"url": "http://jongleberry.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"base64-url": "1.2.1"
|
||||
},
|
||||
"description": "URL and cookie safe UIDs",
|
||||
"devDependencies": {
|
||||
"bluebird": "2.9.25",
|
||||
"istanbul": "0.3.9",
|
||||
"mocha": "~2.2.4",
|
||||
"proxyquire": "~1.2.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "a7f3c6ca64a1f6a5d04ec0ef3e4c3d5367317137",
|
||||
"tarball": "http://registry.npmjs.org/uid-safe/-/uid-safe-2.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"files": [
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "bf6e105748aec52992efc6da50964378984f49e9",
|
||||
"homepage": "https://github.com/crypto-utils/uid-safe",
|
||||
"keywords": [
|
||||
"generator",
|
||||
"random",
|
||||
"safe",
|
||||
"uid"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jongleberry",
|
||||
"email": "jonathanrichardong@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "dougwilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
{
|
||||
"name": "fishrock123",
|
||||
"email": "fishrock123@rocketmail.com"
|
||||
}
|
||||
],
|
||||
"name": "uid-safe",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/crypto-utils/uid-safe.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/",
|
||||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
||||
Reference in New Issue
Block a user