- fix: resizing image uploaded
- add: mybachecas
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
"pug": "^3.0.2",
|
||||
"rate-limiter-flexible": "^2.2.4",
|
||||
"save": "^2.4.0",
|
||||
"sharp": "^0.30.1",
|
||||
"superagent": "^6.1.0",
|
||||
"url-parse": "^1.5.3",
|
||||
"validator": "^13.6.0",
|
||||
|
||||
469
src/server/models/mybacheca.js
Executable file
469
src/server/models/mybacheca.js
Executable file
@@ -0,0 +1,469 @@
|
||||
const mongoose = require('mongoose').set('debug', false);
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
mongoose.Promise = global.Promise;
|
||||
mongoose.level = 'F';
|
||||
|
||||
const tools = require('../tools/general');
|
||||
|
||||
const {ObjectID} = require('mongodb');
|
||||
|
||||
// Resolving error Unknown modifier: $pushAll
|
||||
mongoose.plugin(schema => {
|
||||
schema.options.usePushEach = true;
|
||||
});
|
||||
|
||||
const MyBachecaSchema = new Schema({
|
||||
_id: {
|
||||
type: Number,
|
||||
},
|
||||
idapp: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
userId: {type: Schema.Types.ObjectId, ref: 'User'},
|
||||
idSector: {
|
||||
type: Number,
|
||||
},
|
||||
idSkill: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
idSubSkill: [
|
||||
{
|
||||
type: Number,
|
||||
default: 0,
|
||||
}],
|
||||
idStatusSkill: [
|
||||
{
|
||||
type: Number,
|
||||
}],
|
||||
idContribType: [
|
||||
{
|
||||
type: String,
|
||||
}],
|
||||
idCity: [
|
||||
{
|
||||
type: Number,
|
||||
}],
|
||||
numLevel: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
adType: {
|
||||
type: Number,
|
||||
},
|
||||
photos: [
|
||||
{
|
||||
imagefile: {
|
||||
type: String,
|
||||
},
|
||||
alt: {
|
||||
type: String,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
},
|
||||
}],
|
||||
note: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
descr: {
|
||||
type: String,
|
||||
},
|
||||
date_created: {
|
||||
type: Date,
|
||||
default: Date.now,
|
||||
},
|
||||
date_updated: {
|
||||
type: Date,
|
||||
default: Date.now,
|
||||
},
|
||||
});
|
||||
|
||||
MyBachecaSchema.pre('save', async function(next) {
|
||||
if (this.isNew) {
|
||||
const myrec = await MyBacheca.findOne().limit(1).sort({_id: -1});
|
||||
if (!!myrec) {
|
||||
if (myrec._doc._id === 0)
|
||||
this._id = 1;
|
||||
else
|
||||
this._id = myrec._doc._id + 1;
|
||||
|
||||
} else {
|
||||
this._id = 1;
|
||||
}
|
||||
|
||||
this.date_created = new Date();
|
||||
}
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
MyBachecaSchema.statics.findAllIdApp = async function(idapp) {
|
||||
const MyBacheca = this;
|
||||
|
||||
const query = [
|
||||
{$match: {idapp}},
|
||||
{$sort: {descr: 1}},
|
||||
];
|
||||
|
||||
return MyBacheca.aggregate(query).then((arrrec) => {
|
||||
return arrrec;
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
MyBachecaSchema.statics.getFieldsForSearch = function() {
|
||||
return [];
|
||||
};
|
||||
|
||||
MyBachecaSchema.statics.getFieldsLastForSearch = function() {
|
||||
return [
|
||||
{field: 'note', type: tools.FieldType.string},
|
||||
{field: 'descr', type: tools.FieldType.string},
|
||||
{field: 'recSkill.descr', type: tools.FieldType.string},
|
||||
{field: 'MyBacheca.descr', type: tools.FieldType.string},
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
MyBachecaSchema.statics.executeQueryTable = function(idapp, params) {
|
||||
params.fieldsearch = this.getFieldsForSearch();
|
||||
params.fieldsearch_last = this.getFieldsLastForSearch();
|
||||
|
||||
const otherparams = {
|
||||
lookup1: {
|
||||
lk_tab: 'users',
|
||||
lk_LF: 'userId',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'user',
|
||||
af_objId_tab: 'myId',
|
||||
lk_proj: {
|
||||
idSkill: 1,
|
||||
idSubSkill: 1,
|
||||
MyBacheca: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
idCity: 1,
|
||||
numLevel: 1,
|
||||
adType: 1,
|
||||
photos: 1,
|
||||
note: 1,
|
||||
descr: 1,
|
||||
date_created: 1,
|
||||
date_updated: 1,
|
||||
userId: 1,
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
params = {...params, ...otherparams};
|
||||
|
||||
return tools.executeQueryTable(this, idapp, params);
|
||||
};
|
||||
|
||||
MyBachecaSchema.statics.getMyRecById = function(idapp, id) {
|
||||
const MyBacheca = this;
|
||||
|
||||
const query = [
|
||||
{
|
||||
'$match': {
|
||||
'$and': [
|
||||
{
|
||||
'_id': parseInt(id),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
'$match': {
|
||||
'idapp': idapp,
|
||||
},
|
||||
},
|
||||
{
|
||||
'$sort': {
|
||||
'desc': 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
'$addFields': {
|
||||
'myId1': {
|
||||
'$toObjectId': '$userId',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'$lookup': {
|
||||
'from': 'users',
|
||||
'localField': 'myId1',
|
||||
'foreignField': '_id',
|
||||
'as': 'user',
|
||||
},
|
||||
},
|
||||
{
|
||||
'$replaceRoot': {
|
||||
'newRoot': {
|
||||
'$mergeObjects': [
|
||||
{
|
||||
'$arrayElemAt': [
|
||||
'$user',
|
||||
0,
|
||||
],
|
||||
},
|
||||
'$$ROOT',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'$project': {
|
||||
'recSkill': 1,
|
||||
'sector': 1,
|
||||
'idSector': 1,
|
||||
'idSkill': 1,
|
||||
'idSubSkill': 1,
|
||||
'idStatusSkill': 1,
|
||||
'idContribType': 1,
|
||||
'idCity': 1,
|
||||
'numLevel': 1,
|
||||
adType: 1,
|
||||
'photos': 1,
|
||||
'note': 1,
|
||||
'descr': 1,
|
||||
'date_created': 1,
|
||||
'date_updated': 1,
|
||||
'userId': 1,
|
||||
'username': 1,
|
||||
'name': 1,
|
||||
'surname': 1,
|
||||
'comune': 1,
|
||||
'mycities': 1,
|
||||
'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
'$lookup': {
|
||||
'from': 'skills',
|
||||
'localField': 'idSkill',
|
||||
'foreignField': '_id',
|
||||
'as': 'recSkill',
|
||||
},
|
||||
},
|
||||
{
|
||||
'$replaceRoot': {
|
||||
'newRoot': {
|
||||
'$mergeObjects': [
|
||||
{
|
||||
'$arrayElemAt': [
|
||||
'$recSkill',
|
||||
0,
|
||||
],
|
||||
},
|
||||
'$$ROOT',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'$project': {
|
||||
'recSkill': 1,
|
||||
'sector': 1,
|
||||
'idSector': 1,
|
||||
'idSkill': 1,
|
||||
'idSubSkill': 1,
|
||||
'idStatusSkill': 1,
|
||||
'idContribType': 1,
|
||||
'idCity': 1,
|
||||
'numLevel': 1,
|
||||
adType: 1,
|
||||
'photos': 1,
|
||||
'note': 1,
|
||||
'descr': 1,
|
||||
'date_created': 1,
|
||||
'date_updated': 1,
|
||||
'userId': 1,
|
||||
'username': 1,
|
||||
'name': 1,
|
||||
'surname': 1,
|
||||
'comune': 1,
|
||||
'mycities': 1,
|
||||
'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
'$lookup': {
|
||||
'from': 'sectors',
|
||||
'localField': 'recSkill.idSector',
|
||||
'foreignField': '_id',
|
||||
'as': 'sector',
|
||||
},
|
||||
},
|
||||
{
|
||||
'$replaceRoot': {
|
||||
'newRoot': {
|
||||
'$mergeObjects': [
|
||||
{
|
||||
'$arrayElemAt': [
|
||||
'$sector',
|
||||
0,
|
||||
],
|
||||
},
|
||||
'$$ROOT',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'$project': {
|
||||
'recSkill': 1,
|
||||
'sector': 1,
|
||||
'idSector': 1,
|
||||
'idSkill': 1,
|
||||
'idSubSkill': 1,
|
||||
'idStatusSkill': 1,
|
||||
'idContribType': 1,
|
||||
'idCity': 1,
|
||||
'numLevel': 1,
|
||||
adType: 1,
|
||||
'photos': 1,
|
||||
'note': 1,
|
||||
'descr': 1,
|
||||
'date_created': 1,
|
||||
'date_updated': 1,
|
||||
'userId': 1,
|
||||
'username': 1,
|
||||
'name': 1,
|
||||
'surname': 1,
|
||||
'comune': 1,
|
||||
'mycities': 1,
|
||||
'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
'$lookup': {
|
||||
'from': 'subskills',
|
||||
'localField': 'idSubSkill',
|
||||
'foreignField': '_id',
|
||||
'as': 'MyBacheca',
|
||||
},
|
||||
},
|
||||
{
|
||||
'$replaceRoot': {
|
||||
'newRoot': {
|
||||
'$mergeObjects': [
|
||||
{
|
||||
'$arrayElemAt': [
|
||||
'$MyBacheca',
|
||||
0,
|
||||
],
|
||||
},
|
||||
'$$ROOT',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'$project': {
|
||||
'recSkill': 1,
|
||||
'sector': 1,
|
||||
'idSector': 1,
|
||||
'idSkill': 1,
|
||||
'idSubSkill': 1,
|
||||
'idStatusSkill': 1,
|
||||
'idContribType': 1,
|
||||
'idCity': 1,
|
||||
'numLevel': 1,
|
||||
adType: 1,
|
||||
'photos': 1,
|
||||
'note': 1,
|
||||
'descr': 1,
|
||||
'date_created': 1,
|
||||
'date_updated': 1,
|
||||
'userId': 1,
|
||||
'username': 1,
|
||||
'name': 1,
|
||||
'surname': 1,
|
||||
'comune': 1,
|
||||
'mycities': 1,
|
||||
'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
'$lookup': {
|
||||
'from': 'cities',
|
||||
'localField': 'idCity',
|
||||
'foreignField': '_id',
|
||||
'as': 'mycities',
|
||||
},
|
||||
},
|
||||
{
|
||||
'$replaceRoot': {
|
||||
'newRoot': {
|
||||
'$mergeObjects': [
|
||||
{
|
||||
'$arrayElemAt': [
|
||||
'$mycities',
|
||||
0,
|
||||
],
|
||||
},
|
||||
'$$ROOT',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'$project': {
|
||||
'recSkill': 1,
|
||||
'sector': 1,
|
||||
'idSector': 1,
|
||||
'idSkill': 1,
|
||||
'idSubSkill': 1,
|
||||
'idStatusSkill': 1,
|
||||
'idContribType': 1,
|
||||
'idCity': 1,
|
||||
'numLevel': 1,
|
||||
adType: 1,
|
||||
'photos': 1,
|
||||
'note': 1,
|
||||
'descr': 1,
|
||||
'date_created': 1,
|
||||
'date_updated': 1,
|
||||
'userId': 1,
|
||||
'username': 1,
|
||||
'name': 1,
|
||||
'surname': 1,
|
||||
'comune': 1,
|
||||
'mycities': 1,
|
||||
'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
return MyBacheca.aggregate(query).then((rec) => {
|
||||
return rec ? rec[0] : null;
|
||||
});
|
||||
};
|
||||
|
||||
MyBachecaSchema.statics.getCompleteRecord = function(idapp, id) {
|
||||
const MyBacheca = this;
|
||||
|
||||
return MyBacheca.getMyRecById(idapp, id);
|
||||
|
||||
};
|
||||
|
||||
|
||||
const MyBacheca = mongoose.model('MyBacheca', MyBachecaSchema);
|
||||
|
||||
module.exports = {MyBacheca};
|
||||
@@ -2558,6 +2558,7 @@ UserSchema.statics.calculateStat = async function(idapp, username) {
|
||||
const User = this;
|
||||
|
||||
const {MySkill} = require('../models/myskill');
|
||||
const {MyBacheca} = require('../models/mybacheca');
|
||||
const {MyGroup} = require('../models/mygroup');
|
||||
|
||||
const numUsersReg = await User.countDocuments(
|
||||
@@ -2570,9 +2571,11 @@ UserSchema.statics.calculateStat = async function(idapp, username) {
|
||||
|
||||
const numMySkills = await MySkill.countDocuments({idapp});
|
||||
|
||||
const numMyBachecas = await MyBacheca.countDocuments({idapp});
|
||||
|
||||
const numGroups = await MyGroup.countDocuments({idapp});
|
||||
|
||||
return {numMySkills, numUsersReg, numGroups};
|
||||
return {numMySkills, numMyBachecas, numUsersReg, numGroups};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -129,8 +129,6 @@ module.exports = {
|
||||
let ris = null;
|
||||
try {
|
||||
|
||||
const {City} = require('../models/city');
|
||||
const {Province} = require('../models/province');
|
||||
|
||||
console.log('INIZIO - popolaTabelleNuove')
|
||||
|
||||
@@ -159,11 +157,12 @@ module.exports = {
|
||||
await this.insertIntoDb_NoDuplicate(abilita, 'statusskills', StatusSkill, 'descr')
|
||||
|
||||
// Cities
|
||||
const {City} = require('../models/city');
|
||||
await this.insertIntoDb_NoDuplicate(scrivi_citta, 'cities', City, 'comune')
|
||||
|
||||
// Province
|
||||
const {Province} = require('../models/province');
|
||||
await this.insertIntoDb_NoDuplicate(scrivi_citta, 'provinces', Province, 'descr')
|
||||
console.log('FINE - Scrivo le Città')
|
||||
|
||||
// Contribtypes
|
||||
const {Contribtype} = require('../models/contribtype');
|
||||
|
||||
@@ -11,6 +11,8 @@ const sendemail = require('../sendemail');
|
||||
|
||||
const resizer = require('node-image-resizer');
|
||||
|
||||
const sharp = require('sharp');
|
||||
|
||||
const {authenticate, authenticate_noerror} = require(
|
||||
'../middleware/authenticate');
|
||||
|
||||
@@ -90,6 +92,8 @@ const actions = require('./api/actions');
|
||||
|
||||
const shared_consts = require('../tools/shared_nodejs');
|
||||
|
||||
const globalTables = require('../tools/globalTables');
|
||||
|
||||
const UserCost = {
|
||||
FIELDS_REQUISITI: [
|
||||
'verified_email',
|
||||
@@ -216,124 +220,22 @@ router.post(process.env.LINK_UPDATE_PWD, (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
function getTableByTableName(tablename) {
|
||||
router.post('/testServer', (req, res) => {
|
||||
|
||||
let mytable = '';
|
||||
if (tablename === 'users')
|
||||
mytable = User;
|
||||
else if (tablename === 'mygroups')
|
||||
mytable = MyGroup;
|
||||
else if (tablename === 'tessitura')
|
||||
mytable = Tessitura;
|
||||
// else if (tablename === 'extralist')
|
||||
// mytable = ExtraList;
|
||||
else if (tablename === 'bookings')
|
||||
mytable = Booking;
|
||||
else if (tablename === 'operators')
|
||||
mytable = Operator;
|
||||
else if (tablename === 'products')
|
||||
mytable = Product;
|
||||
else if (tablename === 'storehouses')
|
||||
mytable = Storehouse;
|
||||
else if (tablename === 'departments')
|
||||
mytable = Department;
|
||||
else if (tablename === 'sharewithus')
|
||||
mytable = ShareWithUs;
|
||||
else if (tablename === 'sites')
|
||||
mytable = Site;
|
||||
else if (tablename === 'iscritticonacreis')
|
||||
mytable = IscrittiConacreis;
|
||||
else if (tablename === 'groups')
|
||||
mytable = Group;
|
||||
else if (tablename === 'todos')
|
||||
mytable = Todo;
|
||||
else if (tablename === 'hours')
|
||||
mytable = Hours;
|
||||
else if (tablename === 'orders')
|
||||
mytable = Order;
|
||||
else if (tablename === 'cashs')
|
||||
mytable = Cash;
|
||||
else if (tablename === 'cashCategorys')
|
||||
mytable = CashCategory;
|
||||
else if (tablename === 'cashSubCategorys')
|
||||
mytable = CashSubCategory;
|
||||
else if (tablename === 'producers')
|
||||
mytable = Producer;
|
||||
else if (tablename === 'carts')
|
||||
mytable = Cart;
|
||||
else if (tablename === 'orderscart')
|
||||
mytable = OrdersCart;
|
||||
else if (tablename === 'sendmsgs')
|
||||
mytable = SendMsg;
|
||||
else if (tablename === 'wheres')
|
||||
mytable = Where;
|
||||
else if (tablename === 'myevents')
|
||||
mytable = MyEvent;
|
||||
else if (tablename === 'contribtypes')
|
||||
mytable = Contribtype;
|
||||
else if (tablename === 'contribtype')
|
||||
mytable = Contribtype;
|
||||
else if (tablename === 'paymenttypes')
|
||||
mytable = PaymentType;
|
||||
else if (tablename === 'disciplines')
|
||||
mytable = Discipline;
|
||||
else if (tablename === 'newstosent')
|
||||
mytable = Newstosent;
|
||||
else if (tablename === 'gallery')
|
||||
mytable = Gallery;
|
||||
else if (tablename === 'mypage')
|
||||
mytable = MyPage;
|
||||
else if (tablename === 'mybots')
|
||||
mytable = MyBot;
|
||||
else if (tablename === 'calzoom')
|
||||
mytable = CalZoom;
|
||||
else if (tablename === 'templemail')
|
||||
mytable = TemplEmail;
|
||||
else if (tablename === 'opzemail')
|
||||
mytable = OpzEmail;
|
||||
else if (tablename === 'settings')
|
||||
mytable = Settings;
|
||||
else if (tablename === 'permissions')
|
||||
mytable = Permission;
|
||||
else if (tablename === 'mailinglist')
|
||||
mytable = MailingList;
|
||||
else if (tablename === 'msg_templates')
|
||||
mytable = MsgTemplate;
|
||||
else if (tablename === 'navepersistente')
|
||||
mytable = NavePersistente;
|
||||
// else if (tablename === 'listaingressos')
|
||||
// mytable = ListaIngresso;
|
||||
else if (tablename === 'graduatorias')
|
||||
mytable = Graduatoria;
|
||||
else if (tablename === 'skills')
|
||||
mytable = Skill;
|
||||
else if (tablename === 'subskills')
|
||||
mytable = SubSkill;
|
||||
else if (tablename === 'myskills')
|
||||
mytable = MySkill;
|
||||
else if (tablename === 'statusSkills')
|
||||
mytable = StatusSkill;
|
||||
else if (tablename === 'cities')
|
||||
mytable = City;
|
||||
else if (tablename === 'provinces')
|
||||
mytable = Province;
|
||||
else if (tablename === 'sectors')
|
||||
mytable = Sector;
|
||||
else if (tablename === 'catgrps')
|
||||
mytable = CatGrp;
|
||||
else if (tablename === 'levels')
|
||||
mytable = Level;
|
||||
else if (shared_consts.TablePickup.includes(tablename))
|
||||
mytable = Pickup;
|
||||
//else if (shared_consts.TableCities.includes(tablename))
|
||||
// mytable = City;
|
||||
try {
|
||||
const test = req.body.test;
|
||||
let ris = {test};
|
||||
|
||||
return mytable;
|
||||
}
|
||||
return res.send(ris);
|
||||
} catch (e) {
|
||||
return res.status(400).send(e);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
router.post('/settable', authenticate, (req, res) => {
|
||||
const params = req.body;
|
||||
const mytable = getTableByTableName(params.table);
|
||||
const mytable = globalTables.getTableByTableName(params.table);
|
||||
const mydata = req.body.data;
|
||||
|
||||
const fieldsvalue = {'ALL': 1};
|
||||
@@ -404,7 +306,7 @@ router.post('/settable', authenticate, (req, res) => {
|
||||
let mytablerec = new mytable(mydata);
|
||||
// console.log('mytablerec', mytablerec);
|
||||
|
||||
const mytablestrutt = getTableByTableName(params.table);
|
||||
const mytablestrutt = globalTables.getTableByTableName(params.table);
|
||||
|
||||
if (mydata['_id'] !== undefined && mydata['_id'] !== 0) {
|
||||
mytablerec.isNew = false;
|
||||
@@ -461,7 +363,7 @@ router.post('/settable', authenticate, (req, res) => {
|
||||
|
||||
router.post('/setsubrec', authenticate, (req, res) => {
|
||||
const params = req.body;
|
||||
const mytable = getTableByTableName(params.table);
|
||||
const mytable = globalTables.getTableByTableName(params.table);
|
||||
const mydata = req.body.data;
|
||||
|
||||
mydata.idapp = req.user.idapp;
|
||||
@@ -469,7 +371,7 @@ router.post('/setsubrec', authenticate, (req, res) => {
|
||||
let mytablerec = new mytable(mydata);
|
||||
// console.log('mytablerec', mytablerec);
|
||||
|
||||
const mytablestrutt = getTableByTableName(params.table);
|
||||
const mytablestrutt = globalTables.getTableByTableName(params.table);
|
||||
|
||||
const rec = mytablestrutt.createNewSubRecord(mydata.idapp, req).then(rec => {
|
||||
// tools.mylog('rec', rec);
|
||||
@@ -510,7 +412,7 @@ router.post('/setsubrec', authenticate, (req, res) => {
|
||||
|
||||
router.post('/gettable', authenticate, (req, res) => {
|
||||
const params = req.body;
|
||||
const mytable = getTableByTableName(params.table);
|
||||
const mytable = globalTables.getTableByTableName(params.table);
|
||||
// console.log('mytable', mytable);
|
||||
if (!mytable) {
|
||||
console.log(`Table ${params.table} not found`);
|
||||
@@ -529,7 +431,7 @@ router.post('/gettable', authenticate, (req, res) => {
|
||||
|
||||
router.post('/pickup', authenticate, (req, res) => {
|
||||
const params = req.body;
|
||||
let mytable = getTableByTableName(params.table);
|
||||
let mytable = globalTables.getTableByTableName(params.table);
|
||||
// console.log('mytable', mytable);
|
||||
if (!mytable) {
|
||||
console.log(`Table ${params.table} not found`);
|
||||
@@ -592,7 +494,7 @@ router.patch('/chval', authenticate, async (req, res) => {
|
||||
const idapp = req.body.idapp;
|
||||
const mydata = req.body.data;
|
||||
|
||||
const mytable = getTableByTableName(mydata.table);
|
||||
const mytable = globalTables.getTableByTableName(mydata.table);
|
||||
const fieldsvalue = mydata.fieldsvalue;
|
||||
const unset = mydata.unset;
|
||||
|
||||
@@ -802,7 +704,7 @@ router.patch('/askfunz', authenticate, async (req, res) => {
|
||||
if (!!userfree)
|
||||
return res.send({code: server_constants.RIS_CODE_OK, out: userfree});
|
||||
/*} else if (mydata.myfunc === shared_consts.CallFunz.GET_VALBYTABLE) {
|
||||
const mytable = getTableByTableName(mydata.table);
|
||||
const mytable = globalTables.getTableByTableName(mydata.table);
|
||||
const coltoshow = {
|
||||
[mydata.coltoshow]: 1
|
||||
};
|
||||
@@ -811,7 +713,7 @@ router.patch('/askfunz', authenticate, async (req, res) => {
|
||||
|
||||
return ris;
|
||||
} else if (mydata.myfunc === shared_consts.CallFunz.SET_VALBYTABLE) {
|
||||
const mytable = getTableByTableName(mydata.table);
|
||||
const mytable = globalTables.getTableByTableName(mydata.table);
|
||||
const value = mydata.value;
|
||||
const coltoset = {
|
||||
[mydata.coltoshow]: value
|
||||
@@ -892,7 +794,7 @@ router.get('/copyfromapptoapp/:idapporig/:idappdest', async (req, res) => {
|
||||
// try {
|
||||
// let numrectot = 0;
|
||||
// for (const table of mytablesstr) {
|
||||
// const mytable = getTableByTableName(table);
|
||||
// const mytable = globalTables.getTableByTableName(table);
|
||||
//
|
||||
// tools.mylogshow('copyfromapptoapp: ', table, mytable);
|
||||
//
|
||||
@@ -919,7 +821,7 @@ router.delete('/delrec/:table/:id', authenticate, async (req, res) => {
|
||||
|
||||
console.log('id', id, 'table', tablename);
|
||||
|
||||
const mytable = getTableByTableName(tablename);
|
||||
const mytable = globalTables.getTableByTableName(tablename);
|
||||
|
||||
const fields = {'ALL': 1};
|
||||
|
||||
@@ -991,7 +893,7 @@ router.post('/duprec/:table/:id', authenticate, (req, res) => {
|
||||
|
||||
console.log('id', id, 'table', tablename);
|
||||
|
||||
const mytable = getTableByTableName(tablename);
|
||||
const mytable = globalTables.getTableByTableName(tablename);
|
||||
|
||||
if (!req.user) {
|
||||
return res.status(404).
|
||||
@@ -1439,44 +1341,42 @@ function uploadFile(req, res, version) {
|
||||
|
||||
// Move in the folder application !
|
||||
// tools.move(oldpath, newname, (err) => {
|
||||
tools.move(oldpath, newname, async (err) => {
|
||||
tools.move(oldpath, newname, (err) => {
|
||||
if (err)
|
||||
console.log('err:', err);
|
||||
|
||||
const setup_image_compress = {
|
||||
all: {
|
||||
path: mydir + '/',
|
||||
quality: 80,
|
||||
},
|
||||
versions: [
|
||||
{
|
||||
prefix: server_constants.PREFIX_IMG,
|
||||
width: 512,
|
||||
height: 512,
|
||||
}, {
|
||||
quality: 100,
|
||||
prefix: server_constants.PREFIX_IMG_SMALL,
|
||||
width: 64,
|
||||
height: 64,
|
||||
}],
|
||||
};
|
||||
|
||||
// Salva le immagini in formato compresso
|
||||
try {
|
||||
const ris = await resizer(newname, setup_image_compress);
|
||||
console.log('resizer', newname);
|
||||
if (ris) {
|
||||
if (tools.isFileExists(resized_img)) {
|
||||
tools.delete(newname, false, () => {});
|
||||
let resized_img_small = tools.extractFilePath(newname) + '/' +
|
||||
server_constants.PREFIX_IMG_SMALL +
|
||||
tools.extractFileName(newname);
|
||||
// SMALL
|
||||
sharp(newname).
|
||||
resize(64, 64).
|
||||
toFile(resized_img_small);
|
||||
|
||||
tools.move(resized_img, newname, (err) => {
|
||||
if (err)
|
||||
console.error('err', err);
|
||||
else
|
||||
console.log('move', newname);
|
||||
// MEDIUM
|
||||
let resized_img = tools.extractFilePath(newname) + '/' +
|
||||
server_constants.PREFIX_IMG + tools.extractFileName(newname);
|
||||
sharp(newname).
|
||||
resize(512, 512).
|
||||
toFile(resized_img, function(err) {
|
||||
|
||||
if (tools.isFileExists(resized_img)) {
|
||||
// DELETE THE ORIGINAL BIG
|
||||
tools.delete(newname, false, () => {});
|
||||
|
||||
// RENAME THE MEDIUM IN THE ORIGINAL NAME
|
||||
tools.move(resized_img, newname, (err) => {
|
||||
if (err)
|
||||
console.error('err', err);
|
||||
else
|
||||
console.log('move', newname);
|
||||
});
|
||||
}
|
||||
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('newname', e);
|
||||
}
|
||||
|
||||
63
src/server/router/mygen_router.js
Executable file
63
src/server/router/mygen_router.js
Executable file
@@ -0,0 +1,63 @@
|
||||
const shared_consts = require('../tools/shared_nodejs');
|
||||
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
|
||||
const tools = require('../tools/general');
|
||||
|
||||
var server_constants = require('../tools/server_constants');
|
||||
|
||||
var {authenticate, auth_default} = require('../middleware/authenticate');
|
||||
|
||||
var mongoose = require('mongoose').set('debug', false);
|
||||
const Subscription = mongoose.model('subscribers');
|
||||
|
||||
const _ = require('lodash');
|
||||
const {MyBacheca} = require('../models/mybacheca');
|
||||
var {User} = require('../models/user');
|
||||
|
||||
const globalTables = require('../tools/globalTables');
|
||||
|
||||
const {ObjectID} = require('mongodb');
|
||||
|
||||
//GET orders
|
||||
router.post('/page', authenticate, function(req, res, next) {
|
||||
|
||||
//++TODO: PERMESSI ???
|
||||
|
||||
try {
|
||||
let table = req.body.table;
|
||||
let id = req.body.id;
|
||||
let idapp = req.body.idapp;
|
||||
|
||||
let mytable = null;
|
||||
if (shared_consts.TABLES_ENABLE_GETREC_BYID.includes(table)) {
|
||||
mytable = globalTables.getTableByTableName(table);
|
||||
}
|
||||
|
||||
if (mytable) {
|
||||
|
||||
return mytable.getMyRecById(idapp, id).
|
||||
then((ris) => {
|
||||
|
||||
if (ris) {
|
||||
res.send(ris);
|
||||
|
||||
} else {
|
||||
res.status(400).send();
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.error('Err', e);
|
||||
res.status(400).send(e);
|
||||
})
|
||||
|
||||
}
|
||||
}catch (e) {
|
||||
console.error('/page', e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
@@ -104,6 +104,7 @@ myLoad().then(ris => {
|
||||
const cart_router = require('./router/cart_router');
|
||||
const orders_router = require('./router/orders_router');
|
||||
const myskills_router = require('./router/myskills_router');
|
||||
const mygen_router = require('./router/mygen_router');
|
||||
|
||||
const { MyEvent } = require('./models/myevent');
|
||||
|
||||
@@ -158,6 +159,7 @@ myLoad().then(ris => {
|
||||
app.use('/cart', cart_router);
|
||||
app.use('/orders', orders_router);
|
||||
app.use('/myskills', myskills_router);
|
||||
app.use('/mygen', mygen_router);
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
// app.use(function (req, res, next) {
|
||||
|
||||
@@ -22,6 +22,7 @@ const {Discipline} = require('../models/discipline');
|
||||
const {Skill} = require('../models/skill');
|
||||
const {SubSkill} = require('../models/subskill');
|
||||
const {MySkill} = require('../models/myskill');
|
||||
const {MyBacheca} = require('../models/mybacheca');
|
||||
const {StatusSkill} = require('../models/statusSkill');
|
||||
const {City} = require('../models/city');
|
||||
const {Province} = require('../models/province');
|
||||
@@ -61,6 +62,8 @@ const CashSubCategory = require('../models/cashSubCategory');
|
||||
|
||||
const tools = require('./general');
|
||||
|
||||
const shared_consts = require('./shared_nodejs');
|
||||
|
||||
module.exports = {
|
||||
|
||||
getTableByTableName(tablename) {
|
||||
@@ -154,8 +157,10 @@ module.exports = {
|
||||
mytable = Skill;
|
||||
else if (tablename === 'subskills')
|
||||
mytable = SubSkill;
|
||||
else if (tablename === 'myskills')
|
||||
else if (tablename === shared_consts.TABLES_MYSKILLS)
|
||||
mytable = MySkill;
|
||||
else if (tablename === shared_consts.TABLES_MYBACHECAS)
|
||||
mytable = MyBacheca;
|
||||
else if (tablename === 'statusSkills')
|
||||
mytable = StatusSkill;
|
||||
else if (tablename === 'cities')
|
||||
|
||||
@@ -85,15 +85,25 @@ module.exports = {
|
||||
|
||||
PARAM_SHOW_PROVINCE: 1,
|
||||
|
||||
TABLES_ID_NUMBER: ['permissions', 'levels', 'statusSkills', 'sectors', 'skills', 'subskills', 'cities', 'myskills'],
|
||||
TABLES_USER_ID: ['myskills', 'mygroups'],
|
||||
TABLES_USER_INCLUDE_MY: ['mygroups'],
|
||||
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybots', 'mygroups'],
|
||||
TABLES_GETCOMPLETEREC: ['myskills'],
|
||||
TABLES_MYSKILLS: 'myskills',
|
||||
TABLES_MYBACHECAS: 'mybachecas',
|
||||
|
||||
TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mygroups'],
|
||||
TABLES_ENABLE_GETREC_BYID: ['mybachecas'],
|
||||
|
||||
TABLES_USER_INCLUDE_MY: ['mygroups'],
|
||||
TABLES_GETCOMPLETEREC: ['myskills', 'mybachecas'],
|
||||
TABLES_PERM_NEWREC: ['skills', 'subskills', 'mygroups'],
|
||||
|
||||
TABLES_ID_NUMBER: ['permissions', 'levels', 'adtypes', 'statusSkills', 'sectors', 'catgrps', 'skills', 'subskills', 'cities', 'provinces', 'myskills', 'mybachecas', 'mygroups'],
|
||||
TABLES_USER_ID: ['myskills', 'mybachecas'],
|
||||
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybachecas', 'mybots'],
|
||||
TABLES_FINDER: ['myskills', 'mybachecas', 'mygroups'],
|
||||
|
||||
TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas'],
|
||||
TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'users'],
|
||||
TABLES_NOT_SHOW_IF_USERNAME: ['myskills', 'mybachecas'],
|
||||
|
||||
|
||||
VISIB_ALL: 0,
|
||||
VISIB_ONLYIF_VERIFIED: 1,
|
||||
VISIB_ONLY_MANAGER: 2,
|
||||
|
||||
175
yarn.lock
175
yarn.lock
@@ -1724,6 +1724,15 @@ bl@^3.0.0:
|
||||
dependencies:
|
||||
readable-stream "^3.0.1"
|
||||
|
||||
bl@^4.0.3:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
|
||||
integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==
|
||||
dependencies:
|
||||
buffer "^5.5.0"
|
||||
inherits "^2.0.4"
|
||||
readable-stream "^3.4.0"
|
||||
|
||||
blob@0.0.5:
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683"
|
||||
@@ -1959,7 +1968,7 @@ buffer-from@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
||||
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
|
||||
|
||||
buffer@^5.6.0:
|
||||
buffer@^5.5.0, buffer@^5.6.0:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
|
||||
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
|
||||
@@ -2388,16 +2397,32 @@ color-name@1.1.3:
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
|
||||
|
||||
color-name@~1.1.4:
|
||||
color-name@^1.0.0, color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
color-string@^1.9.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.0.tgz#63b6ebd1bec11999d1df3a79a7569451ac2be8aa"
|
||||
integrity sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==
|
||||
dependencies:
|
||||
color-name "^1.0.0"
|
||||
simple-swizzle "^0.2.2"
|
||||
|
||||
color-support@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
|
||||
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
|
||||
|
||||
color@^4.2.0:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/color/-/color-4.2.1.tgz#498aee5fce7fc982606c8875cab080ac0547c884"
|
||||
integrity sha512-MFJr0uY4RvTQUKvPq7dh9grVOTYSFeXja2mBXioCGjnjJoXrAp9jJ1NQTDR73c9nwBSAQiNKloKl5zq9WB9UPw==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
color-string "^1.9.0"
|
||||
|
||||
colorette@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94"
|
||||
@@ -2818,6 +2843,13 @@ decompress-response@^3.3.0:
|
||||
dependencies:
|
||||
mimic-response "^1.0.0"
|
||||
|
||||
decompress-response@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
|
||||
integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==
|
||||
dependencies:
|
||||
mimic-response "^3.1.0"
|
||||
|
||||
dedent@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
|
||||
@@ -2933,6 +2965,11 @@ detect-libc@^1.0.2:
|
||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
|
||||
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
|
||||
|
||||
detect-libc@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd"
|
||||
integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==
|
||||
|
||||
detect-newline@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
||||
@@ -3206,7 +3243,7 @@ encoding-japanese@1.0.30:
|
||||
resolved "https://registry.yarnpkg.com/encoding-japanese/-/encoding-japanese-1.0.30.tgz#537c4d62881767925d601acb4c79fb14db81703a"
|
||||
integrity sha512-bd/DFLAoJetvv7ar/KIpE3CNO8wEuyrt9Xuw6nSMiZ+Vrz/Q21BPsMHvARL2Wz6IKHKXgb+DWZqtRg1vql9cBg==
|
||||
|
||||
end-of-stream@^1.0.0, end-of-stream@^1.1.0:
|
||||
end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1:
|
||||
version "1.4.4"
|
||||
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
|
||||
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
|
||||
@@ -3482,6 +3519,11 @@ expand-brackets@^2.1.4:
|
||||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.1"
|
||||
|
||||
expand-template@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
|
||||
integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==
|
||||
|
||||
expand-tilde@^2.0.0, expand-tilde@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
|
||||
@@ -3850,6 +3892,11 @@ from@^0.1.7:
|
||||
resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
|
||||
integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=
|
||||
|
||||
fs-constants@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
||||
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
|
||||
|
||||
fs-extra@3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291"
|
||||
@@ -4012,6 +4059,11 @@ getpass@^0.1.1:
|
||||
dependencies:
|
||||
assert-plus "^1.0.0"
|
||||
|
||||
github-from-package@0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
|
||||
integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=
|
||||
|
||||
glob-parent@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
|
||||
@@ -4652,7 +4704,7 @@ inflight@^1.0.4:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
|
||||
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
@@ -4737,6 +4789,11 @@ is-arrayish@^0.2.1:
|
||||
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
||||
integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
|
||||
|
||||
is-arrayish@^0.3.1:
|
||||
version "0.3.2"
|
||||
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
|
||||
integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
|
||||
|
||||
is-binary-path@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
|
||||
@@ -6366,6 +6423,11 @@ mimic-response@^1.0.0, mimic-response@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
|
||||
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
|
||||
|
||||
mimic-response@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9"
|
||||
integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==
|
||||
|
||||
min-document@^2.19.0:
|
||||
version "2.19.0"
|
||||
resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
|
||||
@@ -6400,7 +6462,7 @@ minimist@^1.2.0:
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
|
||||
|
||||
minimist@^1.2.5:
|
||||
minimist@^1.2.3, minimist@^1.2.5:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||
@@ -6433,6 +6495,11 @@ mixin-deep@^1.2.0:
|
||||
for-in "^1.0.2"
|
||||
is-extendable "^1.0.1"
|
||||
|
||||
mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3:
|
||||
version "0.5.3"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
|
||||
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==
|
||||
|
||||
mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
@@ -6639,6 +6706,11 @@ nanomatch@^1.2.9:
|
||||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.1"
|
||||
|
||||
napi-build-utils@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
|
||||
integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==
|
||||
|
||||
natural-compare@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||
@@ -6678,6 +6750,18 @@ next-tick@~1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
|
||||
integrity sha1-yobR/ogoFpsBICCOPchCS524NCw=
|
||||
|
||||
node-abi@^3.3.0:
|
||||
version "3.8.0"
|
||||
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.8.0.tgz#679957dc8e7aa47b0a02589dbfde4f77b29ccb32"
|
||||
integrity sha512-tzua9qWWi7iW4I42vUPKM+SfaF0vQSLAm4yO5J83mSwB7GeoWrDKC/K+8YCnYNwqP5duwazbw2X9l4m8SC2cUw==
|
||||
dependencies:
|
||||
semver "^7.3.5"
|
||||
|
||||
node-addon-api@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f"
|
||||
integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==
|
||||
|
||||
node-cron@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/node-cron/-/node-cron-3.0.0.tgz#b33252803e430f9cd8590cf85738efa1497a9522"
|
||||
@@ -6855,7 +6939,7 @@ npm-run-path@^4.0.1:
|
||||
dependencies:
|
||||
path-key "^3.0.0"
|
||||
|
||||
npmlog@^4.0.2:
|
||||
npmlog@^4.0.1, npmlog@^4.0.2:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
|
||||
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
|
||||
@@ -7406,6 +7490,25 @@ posix-character-classes@^0.1.0:
|
||||
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
|
||||
integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
|
||||
|
||||
prebuild-install@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.0.1.tgz#c10075727c318efe72412f333e0ef625beaf3870"
|
||||
integrity sha512-QBSab31WqkyxpnMWQxubYAHR5S9B2+r81ucocew34Fkl98FhvKIF50jIJnNOBmAZfyNV7vE5T6gd3hTVWgY6tg==
|
||||
dependencies:
|
||||
detect-libc "^2.0.0"
|
||||
expand-template "^2.0.3"
|
||||
github-from-package "0.0.0"
|
||||
minimist "^1.2.3"
|
||||
mkdirp-classic "^0.5.3"
|
||||
napi-build-utils "^1.0.1"
|
||||
node-abi "^3.3.0"
|
||||
npmlog "^4.0.1"
|
||||
pump "^3.0.0"
|
||||
rc "^1.2.7"
|
||||
simple-get "^4.0.0"
|
||||
tar-fs "^2.0.0"
|
||||
tunnel-agent "^0.6.0"
|
||||
|
||||
prelude-ls@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||
@@ -7817,7 +7920,7 @@ readable-stream@2.3.7, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-
|
||||
string_decoder "~1.1.1"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readable-stream@3, readable-stream@^3.0.1, readable-stream@^3.3.0, readable-stream@^3.6.0:
|
||||
readable-stream@3, readable-stream@^3.0.1, readable-stream@^3.3.0, readable-stream@^3.4.0, readable-stream@^3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
|
||||
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
|
||||
@@ -8254,7 +8357,7 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||
|
||||
semver@^7.3.2:
|
||||
semver@^7.3.2, semver@^7.3.5:
|
||||
version "7.3.5"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
|
||||
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
|
||||
@@ -8369,6 +8472,20 @@ setprototypeof@1.1.1:
|
||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
|
||||
integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
|
||||
|
||||
sharp@^0.30.1:
|
||||
version "0.30.1"
|
||||
resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.30.1.tgz#203efaf9acfc5c15c8a343800254621e56011c12"
|
||||
integrity sha512-ycpz81q8AeVjz1pGvvirQBeJcYE2sXAjcLXR/69LWOe/oxavBLOrenZcTzvTXn83jqAGqY+OuwF+2kFXzbKtDA==
|
||||
dependencies:
|
||||
color "^4.2.0"
|
||||
detect-libc "^2.0.0"
|
||||
node-addon-api "^4.3.0"
|
||||
prebuild-install "^7.0.1"
|
||||
semver "^7.3.5"
|
||||
simple-get "^4.0.1"
|
||||
tar-fs "^2.1.1"
|
||||
tunnel-agent "^0.6.0"
|
||||
|
||||
shebang-command@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
|
||||
@@ -8405,6 +8522,27 @@ signal-exit@^3.0.3:
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.4.tgz#366a4684d175b9cab2081e3681fda3747b6c51d7"
|
||||
integrity sha512-rqYhcAnZ6d/vTPGghdrw7iumdcbXpsk1b8IG/rz+VWV51DM0p7XCtMoJ3qhPLIbp3tvyt3pKRbaaEMZYpHto8Q==
|
||||
|
||||
simple-concat@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f"
|
||||
integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==
|
||||
|
||||
simple-get@^4.0.0, simple-get@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543"
|
||||
integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==
|
||||
dependencies:
|
||||
decompress-response "^6.0.0"
|
||||
once "^1.3.1"
|
||||
simple-concat "^1.0.0"
|
||||
|
||||
simple-swizzle@^0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
|
||||
integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=
|
||||
dependencies:
|
||||
is-arrayish "^0.3.1"
|
||||
|
||||
sisteransi@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3"
|
||||
@@ -8974,6 +9112,27 @@ symbol-tree@^3.2.4:
|
||||
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
|
||||
integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
|
||||
|
||||
tar-fs@^2.0.0, tar-fs@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784"
|
||||
integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==
|
||||
dependencies:
|
||||
chownr "^1.1.1"
|
||||
mkdirp-classic "^0.5.2"
|
||||
pump "^3.0.0"
|
||||
tar-stream "^2.1.4"
|
||||
|
||||
tar-stream@^2.1.4:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287"
|
||||
integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==
|
||||
dependencies:
|
||||
bl "^4.0.3"
|
||||
end-of-stream "^1.4.1"
|
||||
fs-constants "^1.0.0"
|
||||
inherits "^2.0.3"
|
||||
readable-stream "^3.1.1"
|
||||
|
||||
tar@^4.4.2:
|
||||
version "4.4.13"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
|
||||
|
||||
Reference in New Issue
Block a user