mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
more formatting
This commit is contained in:
1 parent
046447b0fb
commit
f552c1212c
157 files changed
+635
-1579
No files matched your search
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": true
|
||||
}
|
||||
@@ -7,7 +7,7 @@ onNet(events.BANK_SEND_TRANSFERS, (transfer: any) => {
|
||||
app: 'BANK',
|
||||
method: 'setTransaction',
|
||||
data: transfer,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ onNet(events.BANK_SEND_CREDENTIALS, (credentials: any) => {
|
||||
app: 'BANK',
|
||||
method: 'setCredentials',
|
||||
data: credentials,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -37,7 +37,7 @@ onNet(events.BANK_TRANSACTION_ALERT, (result: IAlertProps) => {
|
||||
app: 'BANK',
|
||||
method: 'setAlert',
|
||||
data: result,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -47,6 +47,6 @@ onNet(events.BANK_TRANSACTION_NOTIFICATION, (transfer: any) => {
|
||||
app: 'BANK',
|
||||
method: 'setNotification',
|
||||
data: transfer,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -27,9 +27,9 @@ onNet(
|
||||
isTransmitter: isTransmitter,
|
||||
accepted: false,
|
||||
},
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
RegisterNuiCallbackType(events.PHONE_ACCEPT_CALL); // Fires when the TARGET accepts.
|
||||
@@ -54,9 +54,9 @@ onNet(
|
||||
isTransmitter: isTransmitter,
|
||||
accepted: true,
|
||||
},
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
RegisterNuiCallbackType(events.PHONE_CALL_REJECTED); // Fires when cancelling and rejecting a call.
|
||||
@@ -79,7 +79,7 @@ onNet(events.PHONE_CALL_WAS_REJECTED, () => {
|
||||
accepted: false,
|
||||
active: false,
|
||||
},
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -109,7 +109,7 @@ onNet(events.PHONE_CALL_WAS_ENDED, () => {
|
||||
accepted: false,
|
||||
active: false,
|
||||
},
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -119,7 +119,7 @@ function openCallModal(show: boolean) {
|
||||
app: 'CALL',
|
||||
method: 'callModal',
|
||||
data: show,
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -129,6 +129,6 @@ onNet(events.PHONE_CALL_SEND_HISTORY, (calls: ICall) => {
|
||||
app: 'DAILER',
|
||||
method: 'setHistory',
|
||||
data: calls,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -6,7 +6,7 @@ onNet(events.CONTACTS_SEND_CONTACTS, (contacts: any) => {
|
||||
app: 'CONTACTS',
|
||||
method: 'setContacts',
|
||||
data: contacts,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -46,6 +46,6 @@ onNet(events.CONTACTS_ACTION_RESULT, (alert: any) => {
|
||||
app: 'CONTACTS',
|
||||
method: 'setAlert',
|
||||
data: alert,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -22,7 +22,7 @@ const showPhone = async (): Promise<void> => {
|
||||
app: 'PHONE',
|
||||
method: 'setVisibility',
|
||||
data: true,
|
||||
})
|
||||
}),
|
||||
);
|
||||
SetNuiFocus(true, true);
|
||||
};
|
||||
@@ -35,7 +35,7 @@ const hidePhone = async (): Promise<void> => {
|
||||
app: 'PHONE',
|
||||
method: 'setVisibility',
|
||||
data: false,
|
||||
})
|
||||
}),
|
||||
);
|
||||
await phoneCloseAnim();
|
||||
SetNuiFocus(false, false);
|
||||
@@ -52,7 +52,7 @@ RegisterCommand(
|
||||
async () => {
|
||||
await hidePhone();
|
||||
},
|
||||
false
|
||||
false,
|
||||
);
|
||||
|
||||
RegisterCommand(
|
||||
@@ -61,7 +61,7 @@ RegisterCommand(
|
||||
//-- Toggles Phone
|
||||
await Phone();
|
||||
},
|
||||
false
|
||||
false,
|
||||
);
|
||||
|
||||
RegisterCommand(
|
||||
@@ -69,7 +69,7 @@ RegisterCommand(
|
||||
async () => {
|
||||
await showPhone();
|
||||
},
|
||||
false
|
||||
false,
|
||||
);
|
||||
|
||||
/* * * * * * * * * * * * *
|
||||
@@ -99,7 +99,7 @@ AddEventHandler('onResourceStop', function (resource: string) {
|
||||
app: 'PHONE',
|
||||
method: 'setVisibility',
|
||||
data: false,
|
||||
})
|
||||
}),
|
||||
);
|
||||
SetNuiFocus(false, false);
|
||||
removePhoneProp(); //Deletes the phone incase it was attached.
|
||||
@@ -113,7 +113,7 @@ onNet('phone:sendCredentials', (number: string) => {
|
||||
app: 'SIMCARD',
|
||||
method: 'setNumber',
|
||||
data: number,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -13,12 +13,9 @@ on(`__cfx_nui:${events.MESSAGES_FETCH_MESSAGE_GROUPS}`, (): void => {
|
||||
onNet(
|
||||
events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS,
|
||||
(messageGroups: MessageGroup[]): void => {
|
||||
sendMessageEvent(
|
||||
events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS,
|
||||
messageGroups
|
||||
);
|
||||
sendMessageEvent(events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS, messageGroups);
|
||||
emitNet(events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
onNet(events.MESSAGES_FETCH_MESSAGE_GROUPS_FAILED, () => {
|
||||
@@ -34,7 +31,7 @@ on(
|
||||
({ phoneNumbers, label }: any, cb: Function): void => {
|
||||
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP, phoneNumbers, label);
|
||||
cb();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
onNet(events.MESSAGES_CREATE_MESSAGE_GROUP_SUCCESS, (result: any): void => {
|
||||
@@ -55,7 +52,7 @@ on(
|
||||
({ groupId }: any, cb: Function): void => {
|
||||
emitNet(events.MESSAGES_FETCH_MESSAGES, groupId);
|
||||
cb();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
onNet(events.MESSAGES_FETCH_MESSAGES_SUCCESS, (messages: Message[]): void => {
|
||||
|
||||
@@ -14,7 +14,7 @@ function closePhoneTemp() {
|
||||
app: 'PHONE',
|
||||
method: 'setVisibility',
|
||||
data: false,
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ function openPhoneTemp() {
|
||||
app: 'PHONE',
|
||||
method: 'setVisibility',
|
||||
data: true,
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -95,16 +95,14 @@ onNet(events.CAMERA_SEND_PHOTOS, (photos: string[]) => {
|
||||
app: 'CAMERA',
|
||||
method: 'setPhotos',
|
||||
data: photos,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
function takePhoto() {
|
||||
// Return and log error if screenshot basic token not found
|
||||
if (SCREENSHOT_BASIC_TOKEN === 'none') {
|
||||
return console.error(
|
||||
'Screenshot basic token not found. Please set in server.cfg'
|
||||
);
|
||||
return console.error('Screenshot basic token not found. Please set in server.cfg');
|
||||
}
|
||||
exp['screenshot-basic'].requestScreenshotUpload(
|
||||
'https://api.imgur.com/3/image',
|
||||
@@ -118,7 +116,7 @@ function takePhoto() {
|
||||
(data: string) => {
|
||||
const imageLink = JSON.parse(data).data.link;
|
||||
emitNet(events.CAMERA_UPLOAD_PHOTO, imageLink);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ onNet(events.SELLOUT_SEND_LISTING, (listing: MarketplaceListing) => {
|
||||
app: 'SELLOUT',
|
||||
method: 'setListings',
|
||||
data: listing,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -30,6 +30,6 @@ onNet(events.SELLOUT_ACTION_RESULT, (alert: IAlertProps) => {
|
||||
app: 'SELLOUT',
|
||||
method: 'setAlert',
|
||||
data: alert,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -52,12 +52,9 @@ onNet(events.TWITTER_FETCH_TWEETS_FAILURE, () => {
|
||||
* Twitter fetch filtered tweets
|
||||
*/
|
||||
RegisterNuiCallbackType(events.TWITTER_FETCH_TWEETS_FILTERED);
|
||||
on(
|
||||
`__cfx_nui:${events.TWITTER_FETCH_TWEETS_FILTERED}`,
|
||||
(searchValue: string) => {
|
||||
emitNet(events.TWITTER_FETCH_TWEETS_FILTERED, searchValue);
|
||||
}
|
||||
);
|
||||
on(`__cfx_nui:${events.TWITTER_FETCH_TWEETS_FILTERED}`, (searchValue: string) => {
|
||||
emitNet(events.TWITTER_FETCH_TWEETS_FILTERED, searchValue);
|
||||
});
|
||||
|
||||
onNet(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, (tweets: any) => {
|
||||
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, tweets);
|
||||
|
||||
@@ -25,18 +25,13 @@ export default class ClientUtils {
|
||||
};
|
||||
}
|
||||
|
||||
public emitNetPromise<T = any>(
|
||||
eventName: string,
|
||||
...args: any[]
|
||||
): Promise<T> {
|
||||
public emitNetPromise<T = any>(eventName: string, ...args: any[]): Promise<T> {
|
||||
return new Promise((resolve, reject) => {
|
||||
let hasTimedOut = false;
|
||||
|
||||
setTimeout(() => {
|
||||
hasTimedOut = true;
|
||||
reject(
|
||||
`${eventName} has timed out after ${this._settings.promiseTimeout} ms`
|
||||
);
|
||||
reject(`${eventName} has timed out after ${this._settings.promiseTimeout} ms`);
|
||||
}, this._settings.promiseTimeout);
|
||||
|
||||
// Have to use this as the regular uuid refused to work here for some
|
||||
|
||||
@@ -21,15 +21,7 @@ const newPhoneProp = async () => {
|
||||
|
||||
const playerPed = PlayerPedId();
|
||||
const [x, y, z] = GetEntityCoords(playerPed, true);
|
||||
prop = CreateObject(
|
||||
GetHashKey(phoneModel),
|
||||
x,
|
||||
y,
|
||||
z + 0.2,
|
||||
true,
|
||||
true,
|
||||
true
|
||||
);
|
||||
prop = CreateObject(GetHashKey(phoneModel), x, y, z + 0.2, true, true, true);
|
||||
//prop = CreateObject(GetHashKey(phoneModel), 1.0, 1.0, 1.0, 1, 1, 0)
|
||||
const boneIndex = GetPedBoneIndex(playerPed, 28422);
|
||||
AttachEntityToEntity(
|
||||
@@ -47,7 +39,7 @@ const newPhoneProp = async () => {
|
||||
false,
|
||||
true,
|
||||
1.0,
|
||||
true
|
||||
true,
|
||||
); //-- Attaches the phone to the player.
|
||||
propCreated = true;
|
||||
} else if (propCreated) {
|
||||
@@ -96,7 +88,7 @@ const handleOpenVehicleAnim = async (playerPed: number): Promise<void> => {
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
false,
|
||||
);
|
||||
await Delay(300);
|
||||
await newPhoneProp();
|
||||
@@ -120,7 +112,7 @@ const handleOpenNormalAnim = async (playerPed: number): Promise<void> => {
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
false,
|
||||
);
|
||||
await Delay(300);
|
||||
await newPhoneProp();
|
||||
@@ -174,28 +166,9 @@ const handleCallEndNormalAnim = async (playerPed: number): Promise<void> => {
|
||||
const DICT = 'cellphone@';
|
||||
const ANIM = 'cellphone_call_to_text';
|
||||
|
||||
if (
|
||||
IsEntityPlayingAnim(
|
||||
playerPed,
|
||||
'cellphone@',
|
||||
'cellphone_call_listen_base',
|
||||
49
|
||||
)
|
||||
) {
|
||||
if (IsEntityPlayingAnim(playerPed, 'cellphone@', 'cellphone_call_listen_base', 49)) {
|
||||
await loadAnimDict(DICT);
|
||||
TaskPlayAnim(
|
||||
playerPed,
|
||||
DICT,
|
||||
ANIM,
|
||||
2.5,
|
||||
8.0,
|
||||
-1,
|
||||
50,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
);
|
||||
TaskPlayAnim(playerPed, DICT, ANIM, 2.5, 8.0, -1, 50, 0, false, false, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"repository": "https://github.com/project-error/new-phone-who-dis",
|
||||
"scripts": {
|
||||
"build": "webpack --mode production",
|
||||
"format": "prettier --write \"./**/*.ts\"",
|
||||
"watch": "webpack --mode development --watch",
|
||||
"test": "jest"
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@ import { mainLogger } from './sv_logger';
|
||||
const mysqlConnectionString = GetConvar(CONNECTION_STRING, 'none');
|
||||
if (mysqlConnectionString === 'none') {
|
||||
const error = new Error(
|
||||
`No connection string provided. make sure "${CONNECTION_STRING}" is set in your config.`
|
||||
`No connection string provided. make sure "${CONNECTION_STRING}" is set in your config.`,
|
||||
);
|
||||
mainLogger.error(error.message);
|
||||
throw error;
|
||||
@@ -51,9 +51,7 @@ export function generateConnectionPool() {
|
||||
scheme: 'mysql',
|
||||
hosts: [],
|
||||
});
|
||||
const connectionOjbect = connectionStringParser.parse(
|
||||
mysqlConnectionString
|
||||
);
|
||||
const connectionOjbect = connectionStringParser.parse(mysqlConnectionString);
|
||||
|
||||
return mysql.createPool({
|
||||
host: connectionOjbect.hosts[0].host,
|
||||
@@ -84,9 +82,7 @@ export async function withTransaction(queries: Promise<any>[]): Promise<any[]> {
|
||||
await connection.release();
|
||||
return results;
|
||||
} catch (err) {
|
||||
mainLogger.warn(
|
||||
`Error when submitting queries in transaction, ${err.message}`
|
||||
);
|
||||
mainLogger.warn(`Error when submitting queries in transaction, ${err.message}`);
|
||||
await connection.rollback();
|
||||
await connection.release();
|
||||
return Promise.reject(err);
|
||||
|
||||
@@ -15,7 +15,7 @@ export function parseSemiColonFormat(connectionString: string): Map {
|
||||
const parts = connectionString.split(';');
|
||||
if (parts.length === 1) {
|
||||
throw new Error(
|
||||
`Connection string ${connectionString} is in the incorrect format. Please follow the README.`
|
||||
`Connection string ${connectionString} is in the incorrect format. Please follow the README.`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ const POST_CHANNEL_URL = `${BASE_URL}/channels/${DISCORD_CHANNEL_ID}/messages`;
|
||||
|
||||
export async function reportTweetToDiscord(
|
||||
tweet: Tweet,
|
||||
reportingProfile: Profile
|
||||
reportingProfile: Profile,
|
||||
): Promise<any> {
|
||||
if (!DISCORD_TOKEN || !DISCORD_CHANNEL_ID) {
|
||||
discordLogger.warn(`Got a request to report a tweet but discord is not
|
||||
@@ -26,9 +26,7 @@ export async function reportTweetToDiscord(
|
||||
}
|
||||
const content = `**REPORTED TWEET**
|
||||
----------------------------------------------------------------------
|
||||
**Reporting User**: ${reportingProfile.profile_name} (${
|
||||
reportingProfile.id
|
||||
})
|
||||
**Reporting User**: ${reportingProfile.profile_name} (${reportingProfile.id})
|
||||
**Reported User**: ${tweet.profile_name} (${tweet.profile_id})
|
||||
**Reported Tweet timestamp**: ${tweet.createdAt}
|
||||
----------------------------------------------------------------------
|
||||
@@ -40,9 +38,5 @@ export async function reportTweetToDiscord(
|
||||
${tweet.images.split(IMAGE_DELIMITER).join('\n')}
|
||||
`;
|
||||
|
||||
return await axios.post(
|
||||
POST_CHANNEL_URL,
|
||||
{ content },
|
||||
{ headers: DISCORD_HEADERS }
|
||||
);
|
||||
return await axios.post(POST_CHANNEL_URL, { content }, { headers: DISCORD_HEADERS });
|
||||
}
|
||||
@@ -22,9 +22,7 @@ export function getIdentifier(source: number): string {
|
||||
return ESX.GetPlayerFromId(source).getIdentifier();
|
||||
}
|
||||
|
||||
export async function getIdentifierByPhoneNumber(
|
||||
phoneNumber: string
|
||||
): Promise<string> {
|
||||
export async function getIdentifierByPhoneNumber(phoneNumber: string): Promise<string> {
|
||||
const query = 'SELECT identifier FROM users WHERE phone_number = ?';
|
||||
const [results] = await pool.query(query, [phoneNumber]);
|
||||
const identifier = <Identifier[]>results;
|
||||
|
||||
@@ -2,23 +2,19 @@ import events from '../utils/events';
|
||||
import { ESX } from './server';
|
||||
import { getSource } from './functions';
|
||||
import { pool } from './db';
|
||||
import {
|
||||
Transfer,
|
||||
IBankCredentials,
|
||||
} from '../../phone/src/common/typings/bank';
|
||||
import { Transfer, IBankCredentials } from '../../phone/src/common/typings/bank';
|
||||
import { getIdentifier } from './functions';
|
||||
import { mainLogger } from './sv_logger';
|
||||
|
||||
const bankLogger = mainLogger.child({ module: 'bank' });
|
||||
|
||||
async function fetchAllTransactions(identifier: string): Promise<Transfer[]> {
|
||||
const query =
|
||||
'SELECT * FROM npwd_bank_transfers WHERE identifier = ? ORDER BY id DESC';
|
||||
const query = 'SELECT * FROM npwd_bank_transfers WHERE identifier = ? ORDER BY id DESC';
|
||||
const [results] = await pool.query(query, [identifier]);
|
||||
const transactions = <Transfer[]>results;
|
||||
|
||||
bankLogger.verbose(
|
||||
`Fetched all transactions (${identifier}) - ${JSON.stringify(transactions)}`
|
||||
`Fetched all transactions (${identifier}) - ${JSON.stringify(transactions)}`,
|
||||
);
|
||||
|
||||
return transactions;
|
||||
@@ -38,10 +34,7 @@ function fetchCredentials(): IBankCredentials {
|
||||
return result;
|
||||
}
|
||||
|
||||
async function addTransfer(
|
||||
identifier: string,
|
||||
transfer: Transfer
|
||||
): Promise<any> {
|
||||
async function addTransfer(identifier: string, transfer: Transfer): Promise<any> {
|
||||
const xPlayer = ESX.GetPlayerFromId(getSource());
|
||||
const bankBalance = xPlayer.getAccount('bank').money;
|
||||
const sourceName = xPlayer.getName();
|
||||
|
||||
+60
-92
@@ -25,10 +25,7 @@ async function getPlayerFromIdentifier(identifier: string): Promise<XPlayer> {
|
||||
|
||||
for (const player of xPlayers) {
|
||||
const xPlayer = ESX.GetPlayerFromId(player);
|
||||
if (
|
||||
xPlayer.getIdentifier() != null &&
|
||||
xPlayer.getIdentifier() == identifier
|
||||
) {
|
||||
if (xPlayer.getIdentifier() != null && xPlayer.getIdentifier() == identifier) {
|
||||
res(xPlayer);
|
||||
}
|
||||
}
|
||||
@@ -40,17 +37,11 @@ async function getPlayerFromIdentifier(identifier: string): Promise<XPlayer> {
|
||||
async function saveCall(call: ICall) {
|
||||
const query =
|
||||
'INSERT INTO npwd_calls (identifier, transmitter, receiver, start) VALUES (?, ?, ?, ?)';
|
||||
await pool.query(query, [
|
||||
call.identifier,
|
||||
call.transmitter,
|
||||
call.receiver,
|
||||
call.start,
|
||||
]);
|
||||
await pool.query(query, [call.identifier, call.transmitter, call.receiver, call.start]);
|
||||
}
|
||||
|
||||
async function updateCall(call: ICall, isAccepted: boolean, end: number) {
|
||||
const query =
|
||||
'UPDATE npwd_calls SET is_accepted=?, end=? WHERE identifier = ?';
|
||||
const query = 'UPDATE npwd_calls SET is_accepted=?, end=? WHERE identifier = ?';
|
||||
await pool.query(query, [isAccepted, end, call.identifier]);
|
||||
}
|
||||
|
||||
@@ -64,57 +55,46 @@ async function fetchCalls(phoneNumber: string): Promise<ICall[]> {
|
||||
|
||||
let calls: Map<string, ICall> = new Map();
|
||||
|
||||
onNet(
|
||||
events.PHONE_INITIALIZE_CALL,
|
||||
async (phoneNumber: string, timestamp: number) => {
|
||||
const _source = getSource();
|
||||
onNet(events.PHONE_INITIALIZE_CALL, async (phoneNumber: string, timestamp: number) => {
|
||||
const _source = getSource();
|
||||
|
||||
const callIdentifier = uuidv4();
|
||||
const callIdentifier = uuidv4();
|
||||
|
||||
// the client that is calling
|
||||
const xTransmitter = ESX.GetPlayerFromId(_source);
|
||||
const transmitterNumber = await usePhoneNumber(
|
||||
xTransmitter.getIdentifier()
|
||||
);
|
||||
// the client that is calling
|
||||
const xTransmitter = ESX.GetPlayerFromId(_source);
|
||||
const transmitterNumber = await usePhoneNumber(xTransmitter.getIdentifier());
|
||||
|
||||
// player who is being called
|
||||
const receiverIdentifier = await getIdentifierByPhoneNumber(phoneNumber);
|
||||
const xReceiver = await getPlayerFromIdentifier(receiverIdentifier);
|
||||
const receiverNumber = phoneNumber;
|
||||
// player who is being called
|
||||
const receiverIdentifier = await getIdentifierByPhoneNumber(phoneNumber);
|
||||
const xReceiver = await getPlayerFromIdentifier(receiverIdentifier);
|
||||
const receiverNumber = phoneNumber;
|
||||
|
||||
calls.set(transmitterNumber, {
|
||||
identifier: callIdentifier,
|
||||
transmitter: transmitterNumber,
|
||||
transmitterSource: _source,
|
||||
receiver: receiverNumber,
|
||||
receiverSource: xReceiver.source,
|
||||
start: timestamp / 1000,
|
||||
accepted: false,
|
||||
});
|
||||
calls.set(transmitterNumber, {
|
||||
identifier: callIdentifier,
|
||||
transmitter: transmitterNumber,
|
||||
transmitterSource: _source,
|
||||
receiver: receiverNumber,
|
||||
receiverSource: xReceiver.source,
|
||||
start: timestamp / 1000,
|
||||
accepted: false,
|
||||
});
|
||||
|
||||
const currentCall = calls.get(transmitterNumber);
|
||||
await saveCall(currentCall);
|
||||
const currentCall = calls.get(transmitterNumber);
|
||||
await saveCall(currentCall);
|
||||
|
||||
// events
|
||||
// client that is calling
|
||||
emitNet(
|
||||
events.PHONE_START_CALL,
|
||||
_source,
|
||||
transmitterNumber,
|
||||
receiverNumber,
|
||||
true
|
||||
);
|
||||
// events
|
||||
// client that is calling
|
||||
emitNet(events.PHONE_START_CALL, _source, transmitterNumber, receiverNumber, true);
|
||||
|
||||
// client that is being called
|
||||
emitNet(
|
||||
events.PHONE_START_CALL,
|
||||
xReceiver.source,
|
||||
transmitterNumber,
|
||||
receiverNumber,
|
||||
false
|
||||
);
|
||||
}
|
||||
);
|
||||
// client that is being called
|
||||
emitNet(
|
||||
events.PHONE_START_CALL,
|
||||
xReceiver.source,
|
||||
transmitterNumber,
|
||||
receiverNumber,
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => {
|
||||
const pSource = getSource();
|
||||
@@ -125,13 +105,7 @@ onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => {
|
||||
await updateCall(currentCall, true, null);
|
||||
|
||||
// player who is being called
|
||||
emitNet(
|
||||
events.PHONE_CALL_WAS_ACCEPTED,
|
||||
pSource,
|
||||
channelId,
|
||||
currentCall,
|
||||
false
|
||||
);
|
||||
emitNet(events.PHONE_CALL_WAS_ACCEPTED, pSource, channelId, currentCall, false);
|
||||
|
||||
// player who is calling
|
||||
emitNet(
|
||||
@@ -139,7 +113,7 @@ onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => {
|
||||
currentCall.transmitterSource,
|
||||
channelId,
|
||||
currentCall,
|
||||
true
|
||||
true,
|
||||
);
|
||||
|
||||
currentCall.accepted = true;
|
||||
@@ -167,39 +141,33 @@ onNet(
|
||||
source: pSource,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
onNet(
|
||||
events.PHONE_END_CALL,
|
||||
async (transmitterNumber: string, timestamp: number) => {
|
||||
const pSource = getSource();
|
||||
try {
|
||||
const currentCall = calls.get(transmitterNumber);
|
||||
const endTime = timestamp / 1000;
|
||||
await updateCall(currentCall, false, endTime);
|
||||
const accepted = calls.get(pSource);
|
||||
onNet(events.PHONE_END_CALL, async (transmitterNumber: string, timestamp: number) => {
|
||||
const pSource = getSource();
|
||||
try {
|
||||
const currentCall = calls.get(transmitterNumber);
|
||||
const endTime = timestamp / 1000;
|
||||
await updateCall(currentCall, false, endTime);
|
||||
const accepted = calls.get(pSource);
|
||||
|
||||
// player who is being called
|
||||
emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.receiverSource);
|
||||
// player who is calling
|
||||
emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.transmitterSource);
|
||||
// ends animations if call is active
|
||||
if (currentCall.accepted) {
|
||||
emitNet(events.PHONE_CALL_SEND_HANGUP_ANIM, currentCall.receiverSource);
|
||||
emitNet(
|
||||
events.PHONE_CALL_SEND_HANGUP_ANIM,
|
||||
currentCall.transmitterSource
|
||||
);
|
||||
}
|
||||
calls.delete(transmitterNumber);
|
||||
} catch (e) {
|
||||
callLogger.error(`Error ending Phone Call, ${e.message}`, {
|
||||
source: pSource,
|
||||
});
|
||||
// player who is being called
|
||||
emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.receiverSource);
|
||||
// player who is calling
|
||||
emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.transmitterSource);
|
||||
// ends animations if call is active
|
||||
if (currentCall.accepted) {
|
||||
emitNet(events.PHONE_CALL_SEND_HANGUP_ANIM, currentCall.receiverSource);
|
||||
emitNet(events.PHONE_CALL_SEND_HANGUP_ANIM, currentCall.transmitterSource);
|
||||
}
|
||||
calls.delete(transmitterNumber);
|
||||
} catch (e) {
|
||||
callLogger.error(`Error ending Phone Call, ${e.message}`, {
|
||||
source: pSource,
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
onNet(events.PHONE_CALL_FETCH_CALLS, async () => {
|
||||
const _source = getSource();
|
||||
|
||||
@@ -29,23 +29,15 @@ async function addContact(
|
||||
identifier: string,
|
||||
number: string,
|
||||
display: string,
|
||||
avatar: string
|
||||
avatar: string,
|
||||
): Promise<any> {
|
||||
const query =
|
||||
'INSERT INTO npwd_phone_contacts (identifier, number, display, avatar) VALUES (?, ?, ?, ?)';
|
||||
|
||||
const [result] = await pool.query(query, [
|
||||
identifier,
|
||||
number,
|
||||
display,
|
||||
avatar,
|
||||
]);
|
||||
const [result] = await pool.query(query, [identifier, number, display, avatar]);
|
||||
}
|
||||
|
||||
async function updateContact(
|
||||
contact: Contacts,
|
||||
identifier: string
|
||||
): Promise<any> {
|
||||
async function updateContact(contact: Contacts, identifier: string): Promise<any> {
|
||||
const query =
|
||||
'UPDATE npwd_phone_contacts SET number = ?, display = ?, avatar = ? WHERE id = ? AND identifier = ?';
|
||||
await pool.query(query, [
|
||||
@@ -57,12 +49,8 @@ async function updateContact(
|
||||
]);
|
||||
}
|
||||
|
||||
async function deleteContact(
|
||||
contact: ContactId,
|
||||
identifier: string
|
||||
): Promise<any> {
|
||||
const query =
|
||||
'DELETE FROM npwd_phone_contacts WHERE id = ? AND identifier = ?';
|
||||
async function deleteContact(contact: ContactId, identifier: string): Promise<any> {
|
||||
const query = 'DELETE FROM npwd_phone_contacts WHERE id = ? AND identifier = ?';
|
||||
await pool.query(query, [contact.id, identifier]);
|
||||
}
|
||||
|
||||
@@ -99,7 +87,7 @@ onNet(
|
||||
source: _source,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
onNet(events.CONTACTS_UPDATE_CONTACT, async (contact: Contacts) => {
|
||||
|
||||
@@ -3,15 +3,12 @@ import config from '../utils/config';
|
||||
import path from 'path';
|
||||
|
||||
// Needed to manually apply a color to componenent property of log
|
||||
const manualColorize = (strToColor: string): string =>
|
||||
`[\x1b[35m${strToColor}\x1b[0m]`;
|
||||
const manualColorize = (strToColor: string): string => `[\x1b[35m${strToColor}\x1b[0m]`;
|
||||
|
||||
// Format handler passed to winston
|
||||
const formatLogs = (log: winston.Logform.TransformableInfo): string => {
|
||||
if (log.module)
|
||||
return `${log.label} ${manualColorize(log.module)} [${log.level}]: ${
|
||||
log.message
|
||||
}`;
|
||||
return `${log.label} ${manualColorize(log.module)} [${log.level}]: ${log.message}`;
|
||||
|
||||
return `${log.label} [${log.level}]: ${log.message}`;
|
||||
};
|
||||
@@ -28,14 +25,14 @@ export const mainLogger = winston.createLogger({
|
||||
format: winston.format.combine(
|
||||
winston.format.errors({ stack: true }),
|
||||
winston.format.timestamp(),
|
||||
winston.format.json()
|
||||
winston.format.json(),
|
||||
),
|
||||
}),
|
||||
new winston.transports.Console({
|
||||
format: winston.format.combine(
|
||||
winston.format.label({ label: '[NPWD]' }),
|
||||
winston.format.colorize({ all: true }),
|
||||
winston.format.printf(formatLogs)
|
||||
winston.format.printf(formatLogs),
|
||||
),
|
||||
}),
|
||||
],
|
||||
|
||||
@@ -49,7 +49,7 @@ interface MessageGroupMapping {
|
||||
async function createMessage(
|
||||
userIdentifier: string,
|
||||
groupId: string,
|
||||
message: string
|
||||
message: string,
|
||||
): Promise<any> {
|
||||
const query = `
|
||||
INSERT INTO npwd_messages
|
||||
@@ -66,7 +66,7 @@ async function createMessage(
|
||||
* @param userIdentifier - identifier of the user to get message groups for
|
||||
*/
|
||||
async function getMessageGroups(
|
||||
userIdentifier: string
|
||||
userIdentifier: string,
|
||||
): Promise<UnformattedMessageGroup[]> {
|
||||
const query = `
|
||||
SELECT
|
||||
@@ -104,10 +104,7 @@ async function getMessageGroups(
|
||||
* @param userIdentifier - user to get messages for
|
||||
* @param groupId - the group to get messages from
|
||||
*/
|
||||
async function getMessages(
|
||||
userIdentifier: string,
|
||||
groupId: string
|
||||
): Promise<Message[]> {
|
||||
async function getMessages(userIdentifier: string, groupId: string): Promise<Message[]> {
|
||||
const query = `
|
||||
SELECT
|
||||
npwd_messages.id,
|
||||
@@ -142,7 +139,7 @@ async function getMessages(
|
||||
async function createLabel(
|
||||
userIdentifier: string,
|
||||
groupId: string,
|
||||
label: string
|
||||
label: string,
|
||||
): Promise<any> {
|
||||
const query = `
|
||||
INSERT INTO npwd_messages_labels
|
||||
@@ -162,7 +159,7 @@ async function createLabel(
|
||||
async function createMessageGroup(
|
||||
userIdentifier: string,
|
||||
groupId: string,
|
||||
participantIdentifier: string
|
||||
participantIdentifier: string,
|
||||
): Promise<any> {
|
||||
const query = `
|
||||
INSERT INTO npwd_messages_groups
|
||||
@@ -180,9 +177,7 @@ async function createMessageGroup(
|
||||
* Find a players identifier from their phone number
|
||||
* @param phoneNumber - the phone number to search for
|
||||
*/
|
||||
async function getIdentifierFromPhoneNumber(
|
||||
phoneNumber: string
|
||||
): Promise<string> {
|
||||
async function getIdentifierFromPhoneNumber(phoneNumber: string): Promise<string> {
|
||||
const query = `
|
||||
SELECT identifier
|
||||
FROM users
|
||||
@@ -231,39 +226,34 @@ async function getMessageCountByGroup(groupId: string): Promise<number> {
|
||||
* @param userIdentifier - the user identifier to get message groups for
|
||||
*/
|
||||
async function getConsolidatedMessageGroups(
|
||||
userIdentifier: string
|
||||
userIdentifier: string,
|
||||
): Promise<MessageGroupMapping> {
|
||||
const messageGroups = await getMessageGroups(userIdentifier);
|
||||
return messageGroups.reduce(
|
||||
(mapping: MessageGroupMapping, messageGroup: UnformattedMessageGroup) => {
|
||||
const groupId = messageGroup.group_id;
|
||||
const displayTerm =
|
||||
messageGroup.display || messageGroup.phone_number || '???';
|
||||
const displayTerm = messageGroup.display || messageGroup.phone_number || '???';
|
||||
|
||||
if (groupId in mapping) {
|
||||
mapping[groupId].participants = mapping[groupId].participants.concat(
|
||||
displayTerm
|
||||
);
|
||||
mapping[groupId].participants = mapping[groupId].participants.concat(displayTerm);
|
||||
} else {
|
||||
mapping[groupId] = {
|
||||
user_identifier: messageGroup.user_identifier,
|
||||
avatar: messageGroup.avatar,
|
||||
label: messageGroup.label,
|
||||
participants: [displayTerm],
|
||||
updatedAt: messageGroup.updatedAt
|
||||
? messageGroup.updatedAt.toString()
|
||||
: null,
|
||||
updatedAt: messageGroup.updatedAt ? messageGroup.updatedAt.toString() : null,
|
||||
};
|
||||
}
|
||||
return mapping;
|
||||
},
|
||||
{}
|
||||
{},
|
||||
);
|
||||
}
|
||||
|
||||
async function getGroupIds(
|
||||
userIdentifier: string,
|
||||
groupMapping: MessageGroupMapping
|
||||
groupMapping: MessageGroupMapping,
|
||||
): Promise<string[]> {
|
||||
const groupIds: string[] = [];
|
||||
for (const groupId of Object.keys(groupMapping)) {
|
||||
@@ -281,7 +271,7 @@ async function getGroupIds(
|
||||
* @param userIdentifier - user to generate the MessageGroups for
|
||||
*/
|
||||
async function getFormattedMessageGroups(
|
||||
userIdentifier: string
|
||||
userIdentifier: string,
|
||||
): Promise<MessageGroup[]> {
|
||||
const groupMapping = await getConsolidatedMessageGroups(userIdentifier);
|
||||
const groupIds = await getGroupIds(userIdentifier, groupMapping);
|
||||
@@ -335,7 +325,7 @@ function createGroupHashID(identifiers: string[]) {
|
||||
async function createMessageGroupsFromPhoneNumbers(
|
||||
userIdentifier: string,
|
||||
phoneNumbers: string[],
|
||||
groupLabel: string
|
||||
groupLabel: string,
|
||||
): Promise<CreateMessageGroupResult> {
|
||||
// we check that each phoneNumber exists before we create the group
|
||||
const identifiers: string[] = [];
|
||||
@@ -363,7 +353,7 @@ async function createMessageGroupsFromPhoneNumbers(
|
||||
// other players works as expected
|
||||
createMessageGroup(userIdentifier, groupId, userIdentifier),
|
||||
...identifiers.map((identifier) =>
|
||||
createMessageGroup(userIdentifier, groupId, identifier)
|
||||
createMessageGroup(userIdentifier, groupId, identifier),
|
||||
),
|
||||
];
|
||||
|
||||
@@ -389,11 +379,7 @@ onNet(events.MESSAGES_FETCH_MESSAGE_GROUPS, async () => {
|
||||
try {
|
||||
const identifier = getIdentifier(_source);
|
||||
const messageGroups = await getFormattedMessageGroups(identifier);
|
||||
emitNet(
|
||||
events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS,
|
||||
_source,
|
||||
messageGroups
|
||||
);
|
||||
emitNet(events.MESSAGES_FETCH_MESSAGE_GROUPS_SUCCESS, _source, messageGroups);
|
||||
} catch (e) {
|
||||
emitNet(events.MESSAGES_FETCH_MESSAGE_GROUPS_FAILED, _source);
|
||||
messageLogger.error(`Failed to fetch messages groups, ${e.message}`);
|
||||
@@ -409,7 +395,7 @@ onNet(
|
||||
const result = await createMessageGroupsFromPhoneNumbers(
|
||||
_identifier,
|
||||
phoneNumbers,
|
||||
label
|
||||
label,
|
||||
);
|
||||
|
||||
if (result.error && result.duplicate) {
|
||||
@@ -452,7 +438,7 @@ onNet(
|
||||
source: _source,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
onNet(events.MESSAGES_FETCH_MESSAGES, async (groupId: string) => {
|
||||
@@ -469,28 +455,25 @@ onNet(events.MESSAGES_FETCH_MESSAGES, async (groupId: string) => {
|
||||
}
|
||||
});
|
||||
|
||||
onNet(
|
||||
events.MESSAGES_SEND_MESSAGE,
|
||||
async (groupId: string, message: string) => {
|
||||
const _source = getSource();
|
||||
try {
|
||||
const _identifier = getIdentifier(_source);
|
||||
await createMessage(_identifier, groupId, message);
|
||||
emitNet(events.MESSAGES_SEND_MESSAGE_SUCCESS, _source, groupId);
|
||||
} catch (e) {
|
||||
// Not really sure what this does? As I cant find any reference
|
||||
// of this in the ui part.
|
||||
emitNet(events.MESSAGES_SEND_MESSAGE_FAILED, _source);
|
||||
// sending a new alert
|
||||
// The message property is always using the locale strings without
|
||||
// the APPS_ prefix.
|
||||
emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
||||
message: 'MESSAGES_NEW_MESSAGE_FAILED',
|
||||
type: 'error',
|
||||
});
|
||||
messageLogger.error(`Failed to send message, ${e.message}`, {
|
||||
source: _source,
|
||||
});
|
||||
}
|
||||
onNet(events.MESSAGES_SEND_MESSAGE, async (groupId: string, message: string) => {
|
||||
const _source = getSource();
|
||||
try {
|
||||
const _identifier = getIdentifier(_source);
|
||||
await createMessage(_identifier, groupId, message);
|
||||
emitNet(events.MESSAGES_SEND_MESSAGE_SUCCESS, _source, groupId);
|
||||
} catch (e) {
|
||||
// Not really sure what this does? As I cant find any reference
|
||||
// of this in the ui part.
|
||||
emitNet(events.MESSAGES_SEND_MESSAGE_FAILED, _source);
|
||||
// sending a new alert
|
||||
// The message property is always using the locale strings without
|
||||
// the APPS_ prefix.
|
||||
emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
||||
message: 'MESSAGES_NEW_MESSAGE_FAILED',
|
||||
type: 'error',
|
||||
});
|
||||
messageLogger.error(`Failed to send message, ${e.message}`, {
|
||||
source: _source,
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -7,14 +7,12 @@ import { mainLogger } from './sv_logger';
|
||||
const notesLogger = mainLogger.child({ module: 'notes' });
|
||||
|
||||
async function addNote(identifier: string, note: Note): Promise<any> {
|
||||
const query =
|
||||
'INSERT INTO npwd_notes (identifier, title, content) VALUES (?, ?, ?)';
|
||||
const query = 'INSERT INTO npwd_notes (identifier, title, content) VALUES (?, ?, ?)';
|
||||
await pool.query(query, [identifier, note.title, note.content]);
|
||||
}
|
||||
|
||||
async function fetchAllNotes(identifier: string): Promise<Note[]> {
|
||||
const query =
|
||||
'SELECT * FROM npwd_notes WHERE identifier = ? ORDER BY id DESC';
|
||||
const query = 'SELECT * FROM npwd_notes WHERE identifier = ? ORDER BY id DESC';
|
||||
const [result] = await pool.query(query, [identifier]);
|
||||
return <Note[]>result;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,7 @@ import { mainLogger } from './sv_logger';
|
||||
const photoLogger = mainLogger.child({ module: 'photo' });
|
||||
|
||||
async function uploadPhoto(identifier: string, image: string) {
|
||||
const query =
|
||||
'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)';
|
||||
const query = 'INSERT INTO npwd_phone_gallery (identifier, image) VALUES (?, ?)';
|
||||
await pool.query(query, [identifier, image]);
|
||||
}
|
||||
|
||||
@@ -21,8 +20,7 @@ async function getPhotosByIdentifier(identifier: string): Promise<IPhoto[]> {
|
||||
}
|
||||
|
||||
async function deletePhoto(photo: IPhoto, identifier: string) {
|
||||
const query =
|
||||
'DELETE FROM npwd_phone_gallery WHERE image = ? AND identifier = ?';
|
||||
const query = 'DELETE FROM npwd_phone_gallery WHERE image = ? AND identifier = ?';
|
||||
await pool.query(query, [photo.image, identifier]);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ async function addListing(
|
||||
identifier: string,
|
||||
name: string,
|
||||
number: any,
|
||||
listing: MarketplaceListing
|
||||
listing: MarketplaceListing,
|
||||
): Promise<void> {
|
||||
const query =
|
||||
'INSERT INTO npwd_sellout_listings (identifier, name, number, title, url, description) VALUES (?, ?, ?, ?, ?, ?)';
|
||||
|
||||
@@ -51,7 +51,7 @@ async function fetchAllTweets(profileId: number): Promise<Tweet[]> {
|
||||
*/
|
||||
async function fetchTweetsFiltered(
|
||||
profileId: number,
|
||||
searchValue: string
|
||||
searchValue: string,
|
||||
): Promise<Tweet[]> {
|
||||
const parameterizedSearchValue = `%${searchValue}%`;
|
||||
const query = `
|
||||
@@ -116,19 +116,12 @@ async function createTweet(identifier: string, tweet: Tweet): Promise<Tweet> {
|
||||
INSERT INTO npwd_twitter_tweets (identifier, message, images)
|
||||
VALUES (?, ?, ?)
|
||||
`;
|
||||
const [results] = await pool.query(query, [
|
||||
identifier,
|
||||
tweet.message,
|
||||
tweet.images,
|
||||
]);
|
||||
const [results] = await pool.query(query, [identifier, tweet.message, tweet.images]);
|
||||
const insertData = <any>results;
|
||||
return await getTweet(profile.id, insertData.insertId);
|
||||
}
|
||||
|
||||
async function createTweetReport(
|
||||
tweetId: number,
|
||||
profileId: number
|
||||
): Promise<void> {
|
||||
async function createTweetReport(tweetId: number, profileId: number): Promise<void> {
|
||||
const query = `
|
||||
INSERT INTO npwd_twitter_reports (tweet_id, profile_id)
|
||||
VALUES (?, ?)
|
||||
@@ -203,14 +196,7 @@ async function updateProfile(identifier: string, profile: Profile) {
|
||||
SET avatar_url = ?, profile_name = ?, bio = ?, location = ?, job = ?
|
||||
WHERE identifier = ?
|
||||
`;
|
||||
await pool.execute(query, [
|
||||
avatar_url,
|
||||
profile_name,
|
||||
bio,
|
||||
location,
|
||||
job,
|
||||
identifier,
|
||||
]);
|
||||
await pool.execute(query, [avatar_url, profile_name, bio, location, job, identifier]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -259,10 +245,7 @@ async function deleteTweet(identifier: string, tweetId: number): Promise<void> {
|
||||
* @param profileId - primary key of the profile to check
|
||||
* @param tweetId - primary key of the tweet to check
|
||||
*/
|
||||
async function doesLikeExist(
|
||||
profileId: number,
|
||||
tweetId: number
|
||||
): Promise<boolean> {
|
||||
async function doesLikeExist(profileId: number, tweetId: number): Promise<boolean> {
|
||||
const query = `
|
||||
SELECT * FROM npwd_twitter_likes
|
||||
WHERE profile_id = ? AND tweet_id = ?
|
||||
@@ -278,10 +261,7 @@ async function doesLikeExist(
|
||||
* @param tweetId - primary key of the tweet to check
|
||||
* @param profileId - primary key of the profile to check
|
||||
*/
|
||||
async function doesReportExist(
|
||||
tweetId: number,
|
||||
profileId: number
|
||||
): Promise<boolean> {
|
||||
async function doesReportExist(tweetId: number, profileId: number): Promise<boolean> {
|
||||
const query = `
|
||||
SELECT * FROM npwd_twitter_reports
|
||||
WHERE tweet_id = ? AND profile_id = ?
|
||||
|
||||
@@ -6,7 +6,7 @@ function sendMessage(app: string, method: string, data: any) {
|
||||
app,
|
||||
method,
|
||||
data,
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+3
-269
@@ -1450,11 +1450,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
|
||||
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
|
||||
|
||||
"@types/parse-json@^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
|
||||
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
|
||||
|
||||
"@types/prettier@^2.0.0":
|
||||
version "2.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.5.tgz#b6ab3bba29e16b821d84e09ecfaded462b816b00"
|
||||
@@ -1845,7 +1840,7 @@ ansi-colors@^4.1.1:
|
||||
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
|
||||
integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
|
||||
|
||||
ansi-escapes@^4.2.1, ansi-escapes@^4.3.0:
|
||||
ansi-escapes@^4.2.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61"
|
||||
integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
|
||||
@@ -1981,11 +1976,6 @@ astral-regex@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
|
||||
integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
|
||||
|
||||
astral-regex@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
|
||||
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
|
||||
|
||||
async-each@^1.0.1:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf"
|
||||
@@ -2392,7 +2382,7 @@ chalk@^3.0.0:
|
||||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
chalk@^4.0.0, chalk@^4.1.0:
|
||||
chalk@^4.0.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
|
||||
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
|
||||
@@ -2484,21 +2474,6 @@ clean-stack@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
|
||||
integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
|
||||
|
||||
cli-cursor@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
|
||||
integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
|
||||
dependencies:
|
||||
restore-cursor "^3.1.0"
|
||||
|
||||
cli-truncate@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7"
|
||||
integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==
|
||||
dependencies:
|
||||
slice-ansi "^3.0.0"
|
||||
string-width "^4.2.0"
|
||||
|
||||
cliui@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
|
||||
@@ -2600,21 +2575,11 @@ commander@^2.20.0:
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
||||
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
|
||||
|
||||
commander@^6.2.0:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
|
||||
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
|
||||
|
||||
commondir@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
|
||||
integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=
|
||||
|
||||
compare-versions@^3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62"
|
||||
integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==
|
||||
|
||||
component-emitter@^1.2.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
|
||||
@@ -2689,17 +2654,6 @@ [email protected], core-util-is@~1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
|
||||
|
||||
cosmiconfig@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3"
|
||||
integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==
|
||||
dependencies:
|
||||
"@types/parse-json" "^4.0.0"
|
||||
import-fresh "^3.2.1"
|
||||
parse-json "^5.0.0"
|
||||
path-type "^4.0.0"
|
||||
yaml "^1.10.0"
|
||||
|
||||
cp-file@^6.1.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-6.2.0.tgz#40d5ea4a1def2a9acdd07ba5c0b0246ef73dc10d"
|
||||
@@ -2849,13 +2803,6 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
debug@^4.2.0:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
|
||||
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
decamelize@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
|
||||
@@ -2871,11 +2818,6 @@ decode-uri-component@^0.2.0:
|
||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
||||
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
|
||||
|
||||
dedent@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
|
||||
integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=
|
||||
|
||||
deep-is@^0.1.3, deep-is@~0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
|
||||
@@ -3072,7 +3014,7 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.1, enhanced-resolve@^4.3.0:
|
||||
memory-fs "^0.5.0"
|
||||
tapable "^1.0.0"
|
||||
|
||||
enquirer@^2.3.5, enquirer@^2.3.6:
|
||||
enquirer@^2.3.5:
|
||||
version "2.3.6"
|
||||
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
|
||||
integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
|
||||
@@ -3363,21 +3305,6 @@ execa@^4.0.0:
|
||||
signal-exit "^3.0.2"
|
||||
strip-final-newline "^2.0.0"
|
||||
|
||||
execa@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a"
|
||||
integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
|
||||
dependencies:
|
||||
cross-spawn "^7.0.0"
|
||||
get-stream "^5.0.0"
|
||||
human-signals "^1.1.1"
|
||||
is-stream "^2.0.0"
|
||||
merge-stream "^2.0.0"
|
||||
npm-run-path "^4.0.0"
|
||||
onetime "^5.1.0"
|
||||
signal-exit "^3.0.2"
|
||||
strip-final-newline "^2.0.0"
|
||||
|
||||
exit@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
|
||||
@@ -3515,13 +3442,6 @@ figgy-pudding@^3.5.1:
|
||||
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
|
||||
integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==
|
||||
|
||||
figures@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
|
||||
integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.5"
|
||||
|
||||
file-entry-cache@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
|
||||
@@ -3584,13 +3504,6 @@ find-up@^4.0.0, find-up@^4.1.0:
|
||||
locate-path "^5.0.0"
|
||||
path-exists "^4.0.0"
|
||||
|
||||
find-versions@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e"
|
||||
integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==
|
||||
dependencies:
|
||||
semver-regex "^2.0.0"
|
||||
|
||||
findup-sync@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1"
|
||||
@@ -3746,11 +3659,6 @@ get-caller-file@^2.0.1:
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
get-own-enumerable-property-symbols@^3.0.0:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664"
|
||||
integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==
|
||||
|
||||
get-package-type@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
|
||||
@@ -4031,22 +3939,6 @@ human-signals@^1.1.1:
|
||||
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
|
||||
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
|
||||
|
||||
husky@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.0.tgz#0b2ec1d66424e9219d359e26a51c58ec5278f0de"
|
||||
integrity sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA==
|
||||
dependencies:
|
||||
chalk "^4.0.0"
|
||||
ci-info "^2.0.0"
|
||||
compare-versions "^3.6.0"
|
||||
cosmiconfig "^7.0.0"
|
||||
find-versions "^3.2.0"
|
||||
opencollective-postinstall "^2.0.2"
|
||||
pkg-dir "^4.2.0"
|
||||
please-upgrade-node "^3.2.0"
|
||||
slash "^3.0.0"
|
||||
which-pm-runs "^1.0.0"
|
||||
|
||||
[email protected]:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
@@ -4323,11 +4215,6 @@ is-number@^7.0.0:
|
||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
||||
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
||||
|
||||
is-obj@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
|
||||
integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
|
||||
|
||||
is-path-inside@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017"
|
||||
@@ -4357,11 +4244,6 @@ is-regex@^1.1.1:
|
||||
dependencies:
|
||||
has-symbols "^1.0.1"
|
||||
|
||||
is-regexp@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069"
|
||||
integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk=
|
||||
|
||||
is-stream@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
|
||||
@@ -5036,41 +4918,6 @@ lines-and-columns@^1.1.6:
|
||||
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
|
||||
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
|
||||
|
||||
lint-staged@^10.5.3:
|
||||
version "10.5.3"
|
||||
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.3.tgz#c682838b3eadd4c864d1022da05daa0912fb1da5"
|
||||
integrity sha512-TanwFfuqUBLufxCc3RUtFEkFraSPNR3WzWcGF39R3f2J7S9+iF9W0KTVLfSy09lYGmZS5NDCxjNvhGMSJyFCWg==
|
||||
dependencies:
|
||||
chalk "^4.1.0"
|
||||
cli-truncate "^2.1.0"
|
||||
commander "^6.2.0"
|
||||
cosmiconfig "^7.0.0"
|
||||
debug "^4.2.0"
|
||||
dedent "^0.7.0"
|
||||
enquirer "^2.3.6"
|
||||
execa "^4.1.0"
|
||||
listr2 "^3.2.2"
|
||||
log-symbols "^4.0.0"
|
||||
micromatch "^4.0.2"
|
||||
normalize-path "^3.0.0"
|
||||
please-upgrade-node "^3.2.0"
|
||||
string-argv "0.3.1"
|
||||
stringify-object "^3.3.0"
|
||||
|
||||
listr2@^3.2.2:
|
||||
version "3.2.3"
|
||||
resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.2.3.tgz#ef9e0d790862f038dde8a9837be552b1adfd1c07"
|
||||
integrity sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w==
|
||||
dependencies:
|
||||
chalk "^4.1.0"
|
||||
cli-truncate "^2.1.0"
|
||||
figures "^3.2.0"
|
||||
indent-string "^4.0.0"
|
||||
log-update "^4.0.0"
|
||||
p-map "^4.0.0"
|
||||
rxjs "^6.6.3"
|
||||
through "^2.3.8"
|
||||
|
||||
loader-runner@^2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357"
|
||||
@@ -5124,23 +4971,6 @@ lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19:
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
||||
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
|
||||
|
||||
log-symbols@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920"
|
||||
integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==
|
||||
dependencies:
|
||||
chalk "^4.0.0"
|
||||
|
||||
log-update@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1"
|
||||
integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==
|
||||
dependencies:
|
||||
ansi-escapes "^4.3.0"
|
||||
cli-cursor "^3.1.0"
|
||||
slice-ansi "^4.0.0"
|
||||
wrap-ansi "^6.2.0"
|
||||
|
||||
logform@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/logform/-/logform-2.2.0.tgz#40f036d19161fc76b68ab50fdc7fe495544492f2"
|
||||
@@ -5663,11 +5493,6 @@ onetime@^5.1.0:
|
||||
dependencies:
|
||||
mimic-fn "^2.1.0"
|
||||
|
||||
opencollective-postinstall@^2.0.2:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
|
||||
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
|
||||
|
||||
optionator@^0.8.1:
|
||||
version "0.8.3"
|
||||
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
|
||||
@@ -5740,13 +5565,6 @@ p-map@^3.0.0:
|
||||
dependencies:
|
||||
aggregate-error "^3.0.0"
|
||||
|
||||
p-map@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b"
|
||||
integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==
|
||||
dependencies:
|
||||
aggregate-error "^3.0.0"
|
||||
|
||||
p-try@^2.0.0, p-try@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
|
||||
@@ -5935,13 +5753,6 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0:
|
||||
dependencies:
|
||||
find-up "^4.0.0"
|
||||
|
||||
please-upgrade-node@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
|
||||
integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
|
||||
dependencies:
|
||||
semver-compare "^1.0.0"
|
||||
|
||||
posix-character-classes@^0.1.0:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
|
||||
@@ -5957,11 +5768,6 @@ prelude-ls@~1.1.2:
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
|
||||
|
||||
prettier@^2.0.5:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
|
||||
integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
|
||||
|
||||
pretty-format@^25.2.1, pretty-format@^25.5.0:
|
||||
version "25.5.0"
|
||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a"
|
||||
@@ -6354,14 +6160,6 @@ resolve@^1.10.0, resolve@^1.17.0, resolve@^1.3.2:
|
||||
dependencies:
|
||||
path-parse "^1.0.6"
|
||||
|
||||
restore-cursor@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
|
||||
integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
|
||||
dependencies:
|
||||
onetime "^5.1.0"
|
||||
signal-exit "^3.0.2"
|
||||
|
||||
ret@~0.1.10:
|
||||
version "0.1.15"
|
||||
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
||||
@@ -6418,13 +6216,6 @@ run-queue@^1.0.0, run-queue@^1.0.3:
|
||||
dependencies:
|
||||
aproba "^1.1.1"
|
||||
|
||||
rxjs@^6.6.3:
|
||||
version "6.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
|
||||
integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0:
|
||||
version "5.2.1"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||
@@ -6487,16 +6278,6 @@ schema-utils@^2.6.5:
|
||||
ajv "^6.12.4"
|
||||
ajv-keywords "^3.5.2"
|
||||
|
||||
semver-compare@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
|
||||
|
||||
semver-regex@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338"
|
||||
integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==
|
||||
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||
@@ -6624,24 +6405,6 @@ slice-ansi@^2.1.0:
|
||||
astral-regex "^1.0.0"
|
||||
is-fullwidth-code-point "^2.0.0"
|
||||
|
||||
slice-ansi@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787"
|
||||
integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
astral-regex "^2.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
|
||||
slice-ansi@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
|
||||
integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
astral-regex "^2.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
|
||||
snapdragon-node@^2.0.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
|
||||
@@ -6838,11 +6601,6 @@ stream-shift@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d"
|
||||
integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==
|
||||
|
||||
[email protected]:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da"
|
||||
integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==
|
||||
|
||||
string-length@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.1.tgz#4a973bf31ef77c4edbceadd6af2611996985f8a1"
|
||||
@@ -6899,15 +6657,6 @@ string_decoder@~1.1.1:
|
||||
dependencies:
|
||||
safe-buffer "~5.1.0"
|
||||
|
||||
stringify-object@^3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629"
|
||||
integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==
|
||||
dependencies:
|
||||
get-own-enumerable-property-symbols "^3.0.0"
|
||||
is-obj "^1.0.1"
|
||||
is-regexp "^1.0.0"
|
||||
|
||||
strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
|
||||
@@ -7055,11 +6804,6 @@ through2@^2.0.0:
|
||||
readable-stream "~2.3.6"
|
||||
xtend "~4.0.1"
|
||||
|
||||
through@^2.3.8:
|
||||
version "2.3.8"
|
||||
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
|
||||
integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
|
||||
|
||||
timers-browserify@^2.0.4:
|
||||
version "2.0.11"
|
||||
resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f"
|
||||
@@ -7562,11 +7306,6 @@ which-module@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
|
||||
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
|
||||
|
||||
which-pm-runs@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
|
||||
integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
|
||||
|
||||
which@^1.2.14, which@^1.2.8, which@^1.2.9, which@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
||||
@@ -7714,11 +7453,6 @@ yallist@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||
|
||||
yaml@^1.10.0:
|
||||
version "1.10.0"
|
||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
|
||||
integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
|
||||
|
||||
[email protected]:
|
||||
version "20.2.3"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.3.tgz#92419ba867b858c868acf8bae9bf74af0dd0ce26"
|
||||
|
||||
Reference in new issue
Block a user