mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Upgrade Server Deps (#12328)
* upgrade uuid * upgrade gulp-imagemin * upgrade bcrypt * upgrade validator.js * fix uuid import * upgrade got * upgrade sinon * upgrade passport-google-oauth2 * fix unit test
This commit is contained in:
1053
package-lock.json
generated
1053
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@@ -15,7 +15,7 @@
|
|||||||
"apidoc": "^0.17.5",
|
"apidoc": "^0.17.5",
|
||||||
"apn": "^2.2.0",
|
"apn": "^2.2.0",
|
||||||
"apple-auth": "^1.0.6",
|
"apple-auth": "^1.0.6",
|
||||||
"bcrypt": "^3.0.8",
|
"bcrypt": "^5.0.0",
|
||||||
"body-parser": "^1.18.3",
|
"body-parser": "^1.18.3",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"cookie-session": "^1.4.0",
|
"cookie-session": "^1.4.0",
|
||||||
@@ -30,10 +30,10 @@
|
|||||||
"express-basic-auth": "^1.1.5",
|
"express-basic-auth": "^1.1.5",
|
||||||
"express-validator": "^5.2.0",
|
"express-validator": "^5.2.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"got": "^10.7.0",
|
"got": "^11.3.0",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-babel": "^8.0.0",
|
"gulp-babel": "^8.0.0",
|
||||||
"gulp-imagemin": "^6.2.0",
|
"gulp-imagemin": "^7.1.0",
|
||||||
"gulp-nodemon": "^2.5.0",
|
"gulp-nodemon": "^2.5.0",
|
||||||
"gulp.spritesmith": "^6.9.0",
|
"gulp.spritesmith": "^6.9.0",
|
||||||
"habitica-markdown": "^2.0.2",
|
"habitica-markdown": "^2.0.2",
|
||||||
@@ -55,6 +55,7 @@
|
|||||||
"on-headers": "^1.0.2",
|
"on-headers": "^1.0.2",
|
||||||
"passport": "^0.4.1",
|
"passport": "^0.4.1",
|
||||||
"passport-facebook": "^3.0.0",
|
"passport-facebook": "^3.0.0",
|
||||||
|
"passport-google-oauth2": "^0.2.0",
|
||||||
"passport-google-oauth20": "1.0.0",
|
"passport-google-oauth20": "1.0.0",
|
||||||
"paypal-ipn": "3.0.0",
|
"paypal-ipn": "3.0.0",
|
||||||
"paypal-rest-sdk": "^1.8.1",
|
"paypal-rest-sdk": "^1.8.1",
|
||||||
@@ -67,8 +68,8 @@
|
|||||||
"superagent": "^5.2.2",
|
"superagent": "^5.2.2",
|
||||||
"universal-analytics": "^0.4.17",
|
"universal-analytics": "^0.4.17",
|
||||||
"useragent": "^2.1.9",
|
"useragent": "^2.1.9",
|
||||||
"uuid": "^3.4.0",
|
"uuid": "^8.1.0",
|
||||||
"validator": "^11.0.0",
|
"validator": "^13.1.1",
|
||||||
"vinyl-buffer": "^1.0.1",
|
"vinyl-buffer": "^1.0.1",
|
||||||
"winston": "^3.3.0",
|
"winston": "^3.3.0",
|
||||||
"winston-loggly-bulk": "^3.1.0",
|
"winston-loggly-bulk": "^3.1.0",
|
||||||
@@ -108,13 +109,13 @@
|
|||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"chai-as-promised": "^7.1.1",
|
"chai-as-promised": "^7.1.1",
|
||||||
"chalk": "^3.0.0",
|
"chalk": "^4.1.0",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"istanbul": "^1.1.0-alpha.1",
|
"istanbul": "^1.1.0-alpha.1",
|
||||||
"mocha": "^5.1.1",
|
"mocha": "^5.1.1",
|
||||||
"monk": "^7.3.0",
|
"monk": "^7.3.0",
|
||||||
"require-again": "^2.0.0",
|
"require-again": "^2.0.0",
|
||||||
"sinon": "^7.2.4",
|
"sinon": "^9.0.2",
|
||||||
"sinon-chai": "^3.5.0",
|
"sinon-chai": "^3.5.0",
|
||||||
"sinon-stub-promise": "^4.0.0"
|
"sinon-stub-promise": "^4.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import uuid from 'uuid';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
generateGroup,
|
generateGroup,
|
||||||
} from '../../../../../helpers/api-unit.helper';
|
} from '../../../../../helpers/api-unit.helper';
|
||||||
@@ -7,6 +5,8 @@ import { model as User } from '../../../../../../website/server/models/user';
|
|||||||
import { model as Group } from '../../../../../../website/server/models/group';
|
import { model as Group } from '../../../../../../website/server/models/group';
|
||||||
import amzLib from '../../../../../../website/server/libs/payments/amazon';
|
import amzLib from '../../../../../../website/server/libs/payments/amazon';
|
||||||
import payments from '../../../../../../website/server/libs/payments/payments';
|
import payments from '../../../../../../website/server/libs/payments/payments';
|
||||||
|
import common from '../../../../../../website/common';
|
||||||
|
|
||||||
|
|
||||||
describe('#upgradeGroupPlan', () => {
|
describe('#upgradeGroupPlan', () => {
|
||||||
let spy; let data; let user; let group; let
|
let spy; let data; let user; let group; let
|
||||||
@@ -41,7 +41,7 @@ describe('#upgradeGroupPlan', () => {
|
|||||||
spy.resolves([]);
|
spy.resolves([]);
|
||||||
|
|
||||||
uuidString = 'uuid-v4';
|
uuidString = 'uuid-v4';
|
||||||
sinon.stub(uuid, 'v4').returns(uuidString);
|
sinon.stub(common, 'uuid').returns(uuidString);
|
||||||
|
|
||||||
data.groupId = group._id;
|
data.groupId = group._id;
|
||||||
data.sub.quantity = 3;
|
data.sub.quantity = 3;
|
||||||
@@ -49,7 +49,7 @@ describe('#upgradeGroupPlan', () => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
amzLib.authorizeOnBillingAgreement.restore();
|
amzLib.authorizeOnBillingAgreement.restore();
|
||||||
uuid.v4.restore();
|
common.uuid.restore();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('charges for a new member', async () => {
|
it('charges for a new member', async () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import express from 'express';
|
import express from 'express';
|
||||||
import uuid from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import bodyParser from 'body-parser';
|
import bodyParser from 'body-parser';
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
@@ -30,7 +30,7 @@ app.post('/webhooks/:id', (req, res) => {
|
|||||||
// See http://stackoverflow.com/a/37054753/2601552
|
// See http://stackoverflow.com/a/37054753/2601552
|
||||||
const sockets = {};
|
const sockets = {};
|
||||||
server.on('connection', socket => {
|
server.on('connection', socket => {
|
||||||
const id = uuid.v4();
|
const id = uuid();
|
||||||
sockets[id] = socket;
|
sockets[id] = socket;
|
||||||
|
|
||||||
socket.once('close', () => {
|
socket.once('close', () => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import uuid from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
|
||||||
// TODO remove this file completely
|
// TODO remove this file completely
|
||||||
export default uuid.v4;
|
export default uuid;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Currently this holds helpers for challenge api,
|
// Currently this holds helpers for challenge api,
|
||||||
// but we should break this up into submodules as it expands
|
// but we should break this up into submodules as it expands
|
||||||
import omit from 'lodash/omit';
|
import omit from 'lodash/omit';
|
||||||
import uuid from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import { model as Challenge } from '../../models/challenge';
|
import { model as Challenge } from '../../models/challenge';
|
||||||
import {
|
import {
|
||||||
model as Group,
|
model as Group,
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import amazonPayments from 'amazon-payments';
|
|||||||
import nconf from 'nconf';
|
import nconf from 'nconf';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import cc from 'coupon-code';
|
import cc from 'coupon-code';
|
||||||
import uuid from 'uuid';
|
|
||||||
import util from 'util';
|
import util from 'util';
|
||||||
|
|
||||||
import common from '../../../common';
|
import common from '../../../common';
|
||||||
@@ -356,7 +355,7 @@ api.chargeForAdditionalGroupMember = async function chargeForAdditionalGroupMemb
|
|||||||
|
|
||||||
return this.authorizeOnBillingAgreement({
|
return this.authorizeOnBillingAgreement({
|
||||||
AmazonBillingAgreementId: group.purchased.plan.customerId,
|
AmazonBillingAgreementId: group.purchased.plan.customerId,
|
||||||
AuthorizationReferenceId: uuid.v4().substring(0, 32),
|
AuthorizationReferenceId: common.uuid().substring(0, 32),
|
||||||
AuthorizationAmount: {
|
AuthorizationAmount: {
|
||||||
CurrencyCode: this.constants.CURRENCY_CODE,
|
CurrencyCode: this.constants.CURRENCY_CODE,
|
||||||
Amount: priceForNewMember,
|
Amount: priceForNewMember,
|
||||||
@@ -366,7 +365,7 @@ api.chargeForAdditionalGroupMember = async function chargeForAdditionalGroupMemb
|
|||||||
CaptureNow: true,
|
CaptureNow: true,
|
||||||
SellerNote: this.constants.SELLER_NOTE_GROUP_NEW_MEMBER,
|
SellerNote: this.constants.SELLER_NOTE_GROUP_NEW_MEMBER,
|
||||||
SellerOrderAttributes: {
|
SellerOrderAttributes: {
|
||||||
SellerOrderId: uuid.v4(),
|
SellerOrderId: common.uuid(),
|
||||||
StoreName: this.constants.STORE_NAME,
|
StoreName: this.constants.STORE_NAME,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user