Package cleanup and upgrades.

This commit is contained in:
Patrick Fic
2023-01-17 11:41:45 -08:00
parent 6682a98770
commit 8fd9614f69
10 changed files with 4706 additions and 15182 deletions

View File

@@ -6,8 +6,7 @@
"dependencies": { "dependencies": {
"@apollo/client": "^3.6.9", "@apollo/client": "^3.6.9",
"@asseinfo/react-kanban": "^2.2.0", "@asseinfo/react-kanban": "^2.2.0",
"@craco/craco": "^6.4.5", "@craco/craco": "^7.0.0",
"@fingerprintjs/fingerprintjs": "^3.3.3",
"@jsreport/browser-client": "^3.1.0", "@jsreport/browser-client": "^3.1.0",
"@sentry/react": "^7.28.1", "@sentry/react": "^7.28.1",
"@sentry/tracing": "^7.28.1", "@sentry/tracing": "^7.28.1",
@@ -15,10 +14,9 @@
"@tanem/react-nprogress": "^5.0.8", "@tanem/react-nprogress": "^5.0.8",
"antd": "^4.22.3", "antd": "^4.22.3",
"apollo-link-logger": "^2.0.0", "apollo-link-logger": "^2.0.0",
"axios": "^0.27.2", "axios": "^1.2.2",
"craco-less": "^1.20.0", "craco-less": "^2.0.0",
"dinero.js": "^1.9.1", "dinero.js": "^1.9.1",
"dotenv": "^16.0.1",
"enquire-js": "^0.2.1", "enquire-js": "^0.2.1",
"env-cmd": "^10.1.0", "env-cmd": "^10.1.0",
"exifr": "^7.1.3", "exifr": "^7.1.3",
@@ -26,7 +24,6 @@
"graphql": "^16.5.0", "graphql": "^16.5.0",
"i18next": "^22.4.6", "i18next": "^22.4.6",
"i18next-browser-languagedetector": "^7.0.1", "i18next-browser-languagedetector": "^7.0.1",
"jsoneditor": "^9.9.0",
"jsreport-browser-client-dist": "^1.3.0", "jsreport-browser-client-dist": "^1.3.0",
"libphonenumber-js": "^1.10.9", "libphonenumber-js": "^1.10.9",
"logrocket": "^3.0.1", "logrocket": "^3.0.1",
@@ -43,10 +40,9 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-big-calendar": "^1.5.2", "react-big-calendar": "^1.5.2",
"react-color": "^2.19.3", "react-color": "^2.19.3",
"react-cookie": "^4.1.1",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-drag-listview": "^0.2.1", "react-drag-listview": "^2.0.0",
"react-grid-gallery": "^0.5.5", "react-grid-gallery": "^1.0.0",
"react-grid-layout": "^1.3.4", "react-grid-layout": "^1.3.4",
"react-i18next": "^12.1.1", "react-i18next": "^12.1.1",
"react-icons": "^4.7.1", "react-icons": "^4.7.1",
@@ -56,7 +52,6 @@
"react-router-dom": "^5.3.0", "react-router-dom": "^5.3.0",
"react-scripts": "^5.0.1", "react-scripts": "^5.0.1",
"react-sticky": "^6.0.3", "react-sticky": "^6.0.3",
"react-sublime-video": "^0.2.5",
"react-virtualized": "^9.22.3", "react-virtualized": "^9.22.3",
"recharts": "^2.1.12", "recharts": "^2.1.12",
"redux": "^4.2.0", "redux": "^4.2.0",
@@ -80,8 +75,7 @@
"workbox-range-requests": "^6.5.3", "workbox-range-requests": "^6.5.3",
"workbox-routing": "^6.5.3", "workbox-routing": "^6.5.3",
"workbox-strategies": "^6.5.3", "workbox-strategies": "^6.5.3",
"workbox-streams": "^6.5.3", "workbox-streams": "^6.5.3"
"yauzl": "^2.10.0"
}, },
"scripts": { "scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'", "analyze": "source-map-explorer 'build/static/js/*.js'",
@@ -119,8 +113,8 @@
}, },
"devDependencies": { "devDependencies": {
"@sentry/webpack-plugin": "^1.20.0", "@sentry/webpack-plugin": "^1.20.0",
"@testing-library/cypress": "^8.0.3", "@testing-library/cypress": "^9.0.0",
"cypress": "^10.3.1", "cypress": "^12.3.0",
"eslint-plugin-cypress": "^2.12.1", "eslint-plugin-cypress": "^2.12.1",
"react-error-overlay": "6.0.11", "react-error-overlay": "6.0.11",
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",

View File

@@ -2,14 +2,13 @@ import { Space } from "antd";
import Axios from "axios"; import Axios from "axios";
import queryString from "query-string"; import queryString from "query-string";
import React, { useEffect } from "react"; import React, { useEffect } from "react";
import { useCookies } from "react-cookie";
import { useHistory, useLocation } from "react-router-dom"; import { useHistory, useLocation } from "react-router-dom";
import QboSignIn from "../../assets/qbo/C2QB_green_btn_med_default.svg"; import QboSignIn from "../../assets/qbo/C2QB_green_btn_med_default.svg";
export default function QboAuthorizeComponent() { export default function QboAuthorizeComponent() {
const location = useLocation(); const location = useLocation();
const history = useHistory(); const history = useHistory();
const [, setCookie] = useCookies(["access_token", "refresh_token"]);
const handleQbSignIn = async () => { const handleQbSignIn = async () => {
const result = await Axios.post("/qbo/authorize"); const result = await Axios.post("/qbo/authorize");
@@ -42,7 +41,7 @@ export default function QboAuthorizeComponent() {
history.push({ pathname: `/manage/accounting/receivables` }); history.push({ pathname: `/manage/accounting/receivables` });
} }
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [qs, location, setCookie]); }, [qs, location]);
return ( return (
<Space> <Space>

View File

@@ -1,6 +1,6 @@
import { Button } from "antd"; import { Button } from "antd";
import { JsonEditor as Editor } from "jsoneditor-react"; //import { JsonEditor as Editor } from "jsoneditor-react";
import "jsoneditor-react/es/editor.min.css"; //import "jsoneditor-react/es/editor.min.css";
import React, { useState } from "react"; import React, { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
@@ -61,9 +61,7 @@ export function ShopTemplateTestRender({
return ( return (
<div style={{ ...style, margin: "1rem", display: "flex" }}> <div style={{ ...style, margin: "1rem", display: "flex" }}>
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}></div>
<Editor value={variables} onChange={(e) => setVariables(e)} />
</div>
<Button loading={loading} type="ghost" onClick={handleTestRender}> <Button loading={loading} type="ghost" onClick={handleTestRender}>
{t("bodyshop.actions.testrender")} {t("bodyshop.actions.testrender")}
</Button> </Button>

View File

@@ -1,8 +1,8 @@
import React from 'react'; import React from "react";
import TweenOne from 'rc-tween-one'; import TweenOne from "rc-tween-one";
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack'; import OverPack from "rc-scroll-anim/lib/ScrollOverPack";
import VideoPlay from 'react-sublime-video'; //import VideoPlay from 'react-sublime-video';
import { getChildrenToRender } from './utils'; import { getChildrenToRender } from "./utils";
function Content4(props) { function Content4(props) {
const { ...tagProps } = props; const { ...tagProps } = props;
@@ -10,13 +10,13 @@ function Content4(props) {
delete tagProps.dataSource; delete tagProps.dataSource;
delete tagProps.isMobile; delete tagProps.isMobile;
const animation = { const animation = {
y: '+=30', y: "+=30",
opacity: 0, opacity: 0,
type: 'from', type: "from",
ease: 'easeOutQuad', ease: "easeOutQuad",
}; };
const videoChildren = dataSource.video.children.video; const videoChildren = dataSource.video.children.video;
const videoNameArray = videoChildren.split('.'); const videoNameArray = videoChildren.split(".");
const type = videoNameArray[videoNameArray.length - 1]; const type = videoNameArray[videoNameArray.length - 1];
return ( return (
<div {...tagProps} {...dataSource.wrapper}> <div {...tagProps} {...dataSource.wrapper}>
@@ -40,15 +40,15 @@ function Content4(props) {
<source src={videoChildren} type={`video/${type}`} /> <source src={videoChildren} type={`video/${type}`} />
<track kind="captions" /> <track kind="captions" />
</video> </video>
) : ( ) : null
<VideoPlay // <VideoPlay
loop // loop
width="100%" // width="100%"
poster={dataSource.video.children.image} // poster={dataSource.video.children.image}
> // >
<source src={videoChildren} type={`video/${type}`} /> // <source src={videoChildren} type={`video/${type}`} />
</VideoPlay> // </VideoPlay>
)} }
</TweenOne> </TweenOne>
</OverPack> </OverPack>
</div> </div>

View File

@@ -1,4 +1,4 @@
import Fingerprint2 from "@fingerprintjs/fingerprintjs"; //import Fingerprint2 from "@fingerprintjs/fingerprintjs";
import * as Sentry from "@sentry/browser"; import * as Sentry from "@sentry/browser";
import { notification } from "antd"; import { notification } from "antd";
import { setUserId, setUserProperties } from "firebase/analytics"; import { setUserId, setUserProperties } from "firebase/analytics";
@@ -148,10 +148,11 @@ export function* setInstanceIdSaga({ payload: uid }) {
try { try {
const userInstanceRef = doc(firestore, `userInstance/${uid}`); const userInstanceRef = doc(firestore, `userInstance/${uid}`);
const fingerprint = Fingerprint2.x64hash128( const fingerprint = null;
(yield Fingerprint2.getPromise({})).map((c) => c.value).join(""), // Fingerprint2.x64hash128(
31 // (yield Fingerprint2.getPromise({})).map((c) => c.value).join(""),
); // 31
// );
yield userInstanceRef.set({ yield userInstanceRef.set({
timestamp: new Date(), timestamp: new Date(),

File diff suppressed because it is too large Load Diff

11000
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -17,8 +17,8 @@
"start": "node server.js" "start": "node server.js"
}, },
"dependencies": { "dependencies": {
"aws-sdk": "^2.1281.0", "aws-sdk": "^2.1295.0",
"axios": "^1.2.1", "axios": "^1.2.2",
"bluebird": "^3.7.2", "bluebird": "^3.7.2",
"body-parser": "^1.20.1", "body-parser": "^1.20.1",
"cloudinary": "^1.33.0", "cloudinary": "^1.33.0",
@@ -29,7 +29,7 @@
"dinero.js": "^1.9.1", "dinero.js": "^1.9.1",
"dotenv": "16.0.3", "dotenv": "16.0.3",
"express": "^4.18.2", "express": "^4.18.2",
"firebase-admin": "^11.4.0", "firebase-admin": "^11.4.1",
"graphql": "^16.6.0", "graphql": "^16.6.0",
"graphql-request": "^5.1.0", "graphql-request": "^5.1.0",
"graylog2": "^0.2.1", "graylog2": "^0.2.1",
@@ -40,17 +40,15 @@
"moment": "^2.29.4", "moment": "^2.29.4",
"moment-timezone": "^0.5.40", "moment-timezone": "^0.5.40",
"multer": "^1.4.5-lts.1", "multer": "^1.4.5-lts.1",
"node-mailjet": "^5.1.1", "node-mailjet": "^6.0.1",
"node-persist": "^3.1.0", "node-persist": "^3.1.0",
"node-quickbooks": "^2.0.39", "nodemailer": "^6.9.0",
"nodemailer": "^6.8.0",
"phone": "^3.1.32", "phone": "^3.1.32",
"query-string": "^7.1.1", "query-string": "^7.1.1",
"soap": "^1.0.0", "soap": "^1.0.0",
"socket.io": "^4.5.4", "socket.io": "^4.5.4",
"ssh2-sftp-client": "^9.0.4", "ssh2-sftp-client": "^9.0.4",
"stripe": "^11.5.0", "twilio": "^2.5.2",
"twilio": "^3.84.0",
"uuid": "^9.0.0", "uuid": "^9.0.0",
"xml2js": "^0.4.23", "xml2js": "^0.4.23",
"xmlbuilder2": "^3.0.2" "xmlbuilder2": "^3.0.2"
@@ -58,5 +56,10 @@
"devDependencies": { "devDependencies": {
"concurrently": "^7.6.0", "concurrently": "^7.6.0",
"source-map-explorer": "^2.5.3" "source-map-explorer": "^2.5.3"
},
"overrides": {
"soap": {
"axios": "^1.2.0"
}
} }
} }

View File

@@ -9,39 +9,40 @@ require("dotenv").config({
`.env.${process.env.NODE_ENV || "development"}` `.env.${process.env.NODE_ENV || "development"}`
), ),
}); });
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY); //const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
exports.payment = async (req, res) => { exports.payment = async (req, res) => {
const { amount, stripe_acct_id } = req.body; res.sendStatus(404);
// const { amount, stripe_acct_id } = req.body;
try { // try {
await stripe.paymentIntents // await stripe.paymentIntents
.create( // .create(
{ // {
payment_method_types: ["card"], // payment_method_types: ["card"],
amount: amount, // amount: amount,
currency: "cad", // currency: "cad",
application_fee_amount: 50, // application_fee_amount: 50,
}, // },
{ // {
stripeAccount: stripe_acct_id, // stripeAccount: stripe_acct_id,
} // }
) // )
.then(function (paymentIntent) { // .then(function (paymentIntent) {
try { // try {
return res.send({ // return res.send({
clientSecret: paymentIntent.client_secret, // clientSecret: paymentIntent.client_secret,
}); // });
} catch (err) { // } catch (err) {
return res.status(500).send({ // return res.status(500).send({
error: err.message, // error: err.message,
}); // });
} // }
}); // });
} catch (error) { // } catch (error) {
console.log("error", error); // console.log("error", error);
res.status(400).send(error); // res.status(400).send(error);
} // }
}; };
exports.mobile_payment = async (req, res) => { exports.mobile_payment = async (req, res) => {

4430
yarn.lock

File diff suppressed because it is too large Load Diff