updating node packages
This commit is contained in:
parent
eb4ca5919e
commit
69da49f2b3
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins":[
|
|
||||||
"@babel/plugin-proposal-class-properties",
|
|
||||||
"@babel/plugin-proposal-private-methods"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
46
.eslintrc.js
46
.eslintrc.js
@ -1,33 +1,29 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
"env": {
|
'env': {
|
||||||
"browser": false,
|
'browser': false,
|
||||||
"es6": true,
|
'es2024': true,
|
||||||
"webextensions": false,
|
'webextensions': false,
|
||||||
"node": true,
|
'node': true,
|
||||||
"mocha": true
|
'mocha': true
|
||||||
},
|
},
|
||||||
"parser": "babel-eslint",
|
'extends': 'eslint:recommended',
|
||||||
"parserOptions": {
|
'rules': {
|
||||||
"ecmaVersion": 11 // or 2019
|
'indent': [
|
||||||
},
|
'error',
|
||||||
"extends": "eslint:recommended",
|
'tab'
|
||||||
"rules": {
|
|
||||||
"indent": [
|
|
||||||
"error",
|
|
||||||
"tab"
|
|
||||||
],
|
],
|
||||||
"linebreak-style": [
|
'linebreak-style': [
|
||||||
"error",
|
'error',
|
||||||
"unix"
|
'unix'
|
||||||
],
|
],
|
||||||
"quotes": [
|
'quotes': [
|
||||||
"error",
|
'error',
|
||||||
"single"
|
'single'
|
||||||
],
|
],
|
||||||
"semi": [
|
'semi': [
|
||||||
"error",
|
'error',
|
||||||
"always"
|
'always'
|
||||||
],
|
],
|
||||||
"no-console": 0
|
'no-console': 0
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
const fetch = require('node-fetch');
|
|
||||||
const Vehicle = require('../models/vehicle');
|
const Vehicle = require('../models/vehicle');
|
||||||
const DebugInfo = require('../models/DebugInfo');
|
const DebugInfo = require('../models/DebugInfo');
|
||||||
const { Centrifuge } = require('centrifuge');
|
const { Centrifuge } = require('centrifuge');
|
||||||
const SockJS = require('sockjs-client');
|
|
||||||
const WebSocket = require('ws');
|
const WebSocket = require('ws');
|
||||||
|
|
||||||
const baseUrl = 'https://avtocod.ru/api/v3';
|
const baseUrl = 'https://avtocod.ru/api/v3';
|
||||||
@ -14,10 +12,10 @@ let deviceToken = crypto.createHash('sha256').update(Date.now().toString()).dige
|
|||||||
const myWs = function (options) {
|
const myWs = function (options) {
|
||||||
return class wsClass extends WebSocket {
|
return class wsClass extends WebSocket {
|
||||||
constructor(...args) {
|
constructor(...args) {
|
||||||
super(...[...args, ...[options]])
|
super(...[...args, ...[options]]);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
function fromBase64(data) {
|
function fromBase64(data) {
|
||||||
return Buffer.from(data, 'base64').toString('binary');
|
return Buffer.from(data, 'base64').toString('binary');
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
const fetch = require('node-fetch');
|
|
||||||
const Utils = require('../utils/utils');
|
const Utils = require('../utils/utils');
|
||||||
const utf8 = require('utf8');
|
const utf8 = require('utf8');
|
||||||
const DebugInfo = require('../models/DebugInfo');
|
const DebugInfo = require('../models/DebugInfo');
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
const fetch = require('node-fetch');
|
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const parser = require('node-html-parser');
|
const parser = require('node-html-parser');
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
const fetch = require('node-fetch');
|
|
||||||
const AbortController = require('abort-controller');
|
const AbortController = require('abort-controller');
|
||||||
const DebugInfo = require('../models/DebugInfo');
|
const DebugInfo = require('../models/DebugInfo');
|
||||||
const Vehicle = require('../models/vehicle');
|
const Vehicle = require('../models/vehicle');
|
||||||
|
|||||||
@ -9,7 +9,7 @@ module.exports = function (uri) {
|
|||||||
|
|
||||||
return function expressMongoDb(req, res, next) {
|
return function expressMongoDb(req, res, next) {
|
||||||
if (!connection) {
|
if (!connection) {
|
||||||
connection = MongoClient.connect(uri, { useUnifiedTopology: true });
|
connection = MongoClient.connect(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
connection
|
connection
|
||||||
|
|||||||
@ -6,7 +6,7 @@ let dotenvConf = dotenv.config();
|
|||||||
dotenvExpand(dotenvConf);
|
dotenvExpand(dotenvConf);
|
||||||
|
|
||||||
async function addUpdatedDate() {
|
async function addUpdatedDate() {
|
||||||
let client = await MongoClient.connect(process.env.MONGO_CONNECTION_STRING, { useUnifiedTopology: true });
|
let client = await MongoClient.connect(process.env.MONGO_CONNECTION_STRING);
|
||||||
let db = client.db('autocatdev');
|
let db = client.db('autocatdev');
|
||||||
let collection = db.collection('vehicles');
|
let collection = db.collection('vehicles');
|
||||||
let vehicles = await collection.find().toArray();
|
let vehicles = await collection.find().toArray();
|
||||||
@ -22,7 +22,7 @@ async function addUpdatedDate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function addDebugInfoStatus() {
|
async function addDebugInfoStatus() {
|
||||||
let client = await MongoClient.connect(process.env.MONGO_CONNECTION_STRING, { useUnifiedTopology: true });
|
let client = await MongoClient.connect(process.env.MONGO_CONNECTION_STRING);
|
||||||
let db = client.db('autocatdev');
|
let db = client.db('autocatdev');
|
||||||
let collection = db.collection('vehicles');
|
let collection = db.collection('vehicles');
|
||||||
let vehicles = await collection.find().toArray();
|
let vehicles = await collection.find().toArray();
|
||||||
@ -39,7 +39,7 @@ async function addDebugInfoStatus() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function fixNullEvents() {
|
async function fixNullEvents() {
|
||||||
let client = await MongoClient.connect(process.env.MONGO_CONNECTION_STRING, { useUnifiedTopology: true });
|
let client = await MongoClient.connect(process.env.MONGO_CONNECTION_STRING);
|
||||||
let db = client.db('autocatdev');
|
let db = client.db('autocatdev');
|
||||||
let collection = db.collection('vehicles');
|
let collection = db.collection('vehicles');
|
||||||
let vehicles = await collection.find().toArray();
|
let vehicles = await collection.find().toArray();
|
||||||
@ -52,7 +52,7 @@ async function fixNullEvents() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function fixNullNotes() {
|
async function fixNullNotes() {
|
||||||
let client = await MongoClient.connect(process.env.MONGO_CONNECTION_STRING, { useUnifiedTopology: true });
|
let client = await MongoClient.connect(process.env.MONGO_CONNECTION_STRING);
|
||||||
let db = client.db('autocatdev');
|
let db = client.db('autocatdev');
|
||||||
let collection = db.collection('vehicles');
|
let collection = db.collection('vehicles');
|
||||||
let vehicles = await collection.find().toArray();
|
let vehicles = await collection.find().toArray();
|
||||||
|
|||||||
6312
package-lock.json
generated
6312
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -21,18 +21,15 @@
|
|||||||
"dotenv-expand": "^5.1.0",
|
"dotenv-expand": "^5.1.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-bearer-token": "^2.4.0",
|
"express-bearer-token": "^2.4.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"mongodb": "^4.13.0",
|
"mongodb": "^6.3.0",
|
||||||
"node-fetch": "^2.6.1",
|
|
||||||
"node-html-parser": "^2.0.0",
|
"node-html-parser": "^2.0.0",
|
||||||
"response-time": "^2.3.2",
|
"response-time": "^2.3.2",
|
||||||
"sockjs-client": "^1.5.2",
|
|
||||||
"utf8": "^3.0.0",
|
"utf8": "^3.0.0",
|
||||||
"uuid": "^8.3.0",
|
"uuid": "^8.3.0",
|
||||||
"ws": "^8.12.0"
|
"ws": "^8.12.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^10.1.0",
|
"eslint": "^8.56.0"
|
||||||
"eslint": "^7.8.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user