Load up stuff from Autocode

Code sync will be next to be enabled through GitLab CI.

Signed-off-by: Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com>
This commit is contained in:
Andrei Jiroh Halili 2022-04-21 06:49:16 +00:00
parent 5c1b3112b2
commit 90811ff782
31 changed files with 1924 additions and 0 deletions

127
.gitignore vendored Normal file
View File

@ -0,0 +1,127 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# Secrets and payloads
env.json
# payloads.json

19
README.md Executable file
View File

@ -0,0 +1,19 @@
# verify.rtapp.io backend
This is the backend code the Recap Time Squad is using on our. This project is helpful on those who maintain their own fork of
the repo in both GitHub and GitLab repos. It's still an work in progress througn, but if you like to contribute, ask @ajhalili2006
over Discord (check the links below)
## Getting help
* Discord: For Autocode users who are in the official Autocode Discord sevrer, just ping Andrei Jiroh (`Andrei Jiroh#`).
You can also optionally join
## Related Projects
* [Main rtapp-verify repo](https://gitlab.com/RecapTime/verify) ([GitHub mirror](https://github.com/RecapTime/verify) is available
through we use issue forms) - where all the
## Credits
* [Hakiki](https://discord.gg/hakiki) for the landing page guide: <https://hakiki.api.stdlib.com/blog@dev/landingpage.html>

View File

@ -0,0 +1,3 @@
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
return lib.discord.commands['@0.1.0'].list();

View File

@ -0,0 +1,12 @@
const {loadEnvFromFile} = require("../../lib/secrets")
loadEnvFromFile()
const lib = require("lib")({ token: process.env.STDLIB_SECRET_TOKEN })
module.exports = async(secret) => {
return {
headers: {
"Content-Type": "application/json; charset=utf-8"
},
body: Buffer.from(JSON.stringify(process.env))
}
}

View File

@ -0,0 +1,27 @@
/**
* Any changes in this file will cause additional API calls to the Slash Commands API on Discord side.
* To propagate changes now, press the Run button. By default, they'll be propagated when somebody installs the app
* into their server. If you want to add new commandshere, use https://autocode.com/tools/discord/command-builder/
* to easily generate the code needed.
*/
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const slashCommandsConfig = require("../../../../lib/slashCommands")
/** Internal commands go here **/
status = await lib.discord.commands['@0.0.0'].create(slashCommandsConfig.status);
/** After all of these, public commands go here **/
gitConnect = await lib.discord.commands['@0.0.0'].create(slashCommandsConfig.connectGit);
verify = await lib.discord.commands['@0.0.0'].create(slashCommandsConfig.verify);
userLookup = await lib.discord.commands['@0.0.0'].create(slashCommandsConfig.userinfo);
updateCommands = await lib.discord.commands['@0.0.0'].create(slashCommandsConfig.updateCommands);
return {
results: [
status,
gitConnect,
verify,
userLookup,
updateCommands
]
}

View File

@ -0,0 +1,32 @@
// authenticates you with the API standard library
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let messageResponse = await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: [
`Hey <@!${context.params.event.author.id}>! I'm a bot powered by Autocode, with love by the Recap Time Squad.`,
`Currently, most of the commands are only available via slash commands to simplify our workflow.`
].join('\n'),
embed: {
title: 'About the bot',
type: 'rich',
color: 0x00AA00, // Green color
description: 'We built this bot for Discord, among other bots elsewhere, to compliment our verification process for both creators and communities on our platforms in an open-source way.',
fields: [{
name: 'Where is the source code?',
value: [
'We\'re working on to make it open-source outside Autocode pretty soon. You could ask us to give you access to the project',
'and also help us bring even more features to the bot.'
].join(' ')
}, {
name: 'Link your Discord to GitHub/GitLab SaaS username',
value: [
'Check out the documentation on how you can',
'https://autocode.com/app/discord/basic-discord-example/'
].join('\n')
}]
},
tts: false
});
return messageResponse;

View File

@ -0,0 +1,17 @@
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let userData = context.params.event.user
let urlEncodedData = {
user: encodeURIComponent(userData.username),
tag: userData.discriminator
}
let discordUserMinced = `${userData.username}#${userData.discriminator}`
let updateDiscordAccountLink = `https://community.fandom.com/wiki/Special:VerifyUser?user=${urlEncodedData.user}&tag=${urlEncodedData.tag}&ch=verify-${userData.id}`
function requestUserId(user) {
const result = todo
if (true) {
} else {
}
}

View File

@ -0,0 +1,70 @@
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
// our admin role ID and the guild ID for perm checks.
let role = `${process.env.DISCORD_ROLE_ID}`;
let serverInfo = await lib.discord.guilds['@0.2.3'].retrieve({
guild_id: `${process.env.DISCORD_GUILD_ID}`,
with_counts: false
});
let serverOwner = serverInfo.owner_id
// if they have admin perms and sent from an guild we specified earlier
// or if they're the server owner themselves.
if (context.params.event.member.roles.includes(role) || context.params.event.member.user.id === serverOwner) {
/* fetch options from the payload */
let status = context.params.event.data.options[0].value;
let type = context.params.event.data.options[1].value;
let name = context.params.event.data.options[2].value;
let url = context.params.event.data.options[3];
// Converting variable from URL option
if (!url) {
url = '';
} else {
url = url.value;
}
await lib.discord.users['@0.1.5'].me.status.update({
activity_name: name,
activity_type: type,
status: status,
url: url,
});
// TODO: Make this message invokation visible to sender only.
return await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
"tts": false,
"embeds": [
{
"type": "rich",
"title": `✅ Status message successfully updated`,
"description": `Your client should shown the changes immediately. Otherwise, please restart your Discord client.`,
"color": 0x00ff4c
}
],
response_type: 'CHANNEL_MESSAGE_WITH_SOURCE'
});
}
else {
// send a error message about missing perms and also pinging people with that role
let deny = await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
tts: false,
embeds: [
{
"type": "rich",
"title": `❌ You don't have enough permissions to do this!`,
"description": `<@${context.params.event.member.user.id}>, please ask a <@&${process.env.DISCORD_ROLE_ID}> to update te bot's status.`,
"color": 0xff0000
}
],
response_type: 'CHANNEL_MESSAGE_WITH_SOURCE'
});
}

View File

@ -0,0 +1,10 @@
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.member.permission_names.includes("MANAGE_GUILD")) {
return lib.discord.interactions['@1.0.1'].followups.ephemeral.create({
token: `${context.params.event.token}`,
content: `<@${context.params.event.member.user.id}>, we're updated the slash commands for this server. If you still seeing old data, wait for up to an hour before retrying.\n\nIn case that didn't work, join the support server at https://discord.gg/5dURUcM under \`recaptime-support\` channel and let us know.`
});
}

View File

@ -0,0 +1,95 @@
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let ghFormTemplateLink = `https://github.com/${process.env.GH_NAMESPACE}/${process.env.GH_REPO_SLUG}/issues/new?assignees=ajhalili2006%2CRecapTimeSquad&labels=request-forms%3Anew-entries%2Cenhancement&template=verify-an-entry.yml&title=Request+to+verify+Entry+Name+Here`
const { getEmbedTemplate } = require('../../../../lib/embeds/verify')
msgTemplate = {
"content": `The embed below contains the instructions you needed to follow an the button links you need. When prompted for your Discord ID for verification, your ID can be copied from the account settings OR your profile when you enable \n\n⚠️**IMPORTANT: Never share your personal data, including your goernment IDs in the issue tracker.** An maintainer may ask you to provide these for the second stage of the verification process after getting the semi-verified status in a private setting.`,
"tts": false,
"components": [
{
"type": 1,
"components": [
{
"style": 5,
"label": `Submit new request`,
"url": `https://github.com/${process.env.GH_NAMESPACE}/${process.env.GH_REPO_SLUG}/issues/new?assignees=ajhalili2006%2CRecapTimeSquad&labels=request-forms%3Anew-entries%2Cenhancement&template=verify-an-entry.yml&title=Request+to+verify+Entry+Name+Here`,
"disabled": false,
"type": 2
},
{
"style": 5,
"label": `Recommended: Find existing issues first`,
"url": `https://gitlab.com/RecapTime/verify/issues`,
"disabled": false,
"type": 2
},
{
"style": 5,
"label": `Learn more in project's README`,
"url": `https://gitlab.com/RecapTime/veriy`,
"disabled": false,
"type": 2
}
]
}
],
"embeds": [
{
"type": "rich",
"title": `Instructions on how do you get Verified role in Recap Time Squad's server + services`,
"description": "",
"color": 0x00ff73,
"fields": [
{
"name": `1. Press the button below to get the GitHub issue form.`,
"value": `In case GitHub is down or our GitHub app is having some hicupps on copying issues, you can directly [submit on GitLab here](https://gitlab.com/RecapTime/verify/issues/new) and select \`Add new entry\` issue template.`
},
{
"name": `2. Read instructions as prompted. Any incomplete issue will be then closed without notice by any of the maintainers.`,
"value": `In GitLab, instructions are written as HTML comments, so please read them carefully. We're working on an webapp to simplify this workflow pretty soon.`
},
{
"name": `3. Once you're satisified, you can hit the \"Create issue\" button`,
"value": `**REMEMBER TO CHECK IF THERE ARE ANY EXISTING OPEN ISSUES!** If there are any, even close one, make sure to stay in the loop. You can also submit an merge request then. (We require each MRs to have its own issue for tracking purposes.)`
}
]
}
]
}
if (!context.params.event.user) {
await lib.discord.interactions['@1.0.0'].responses.ephemeral.create({ // we send an ephemeral message to the user confirming that the responses have been logged
token: `${context.params.event.token}`,
content: `<@!${context.params.event.member.user.id}>`,
"tts": false,
embeds: [
{
"type": "rich",
"title": `Check your DMs for instructions!`,
"description": `If you don't allow server members to DMs you, including bots, please adjust your privacy settings for this server.`,
"color": 0x9900ff,
"image": {
"url": `https://i.imgur.com/vbPYlw1.png`,
"height": 0,
"width": 0
}
}
],
response_type: 'CHANNEL_MESSAGE_WITH_SOURCE',
});
await lib.discord.users['@0.2.0'].dms.create({
recipient_id: `${context.params.event.member.user.id}`,
content: msgTemplate.content,
embeds: msgTemplate.embeds,
components: msgTemplate.components
});
} else {
await lib.discord.channels['@0.3.1'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: msgTemplate.content,
embeds: msgTemplate.embeds,
components: msgTemplate.components
});
}

View File

@ -0,0 +1,45 @@
/**
* An HTTP endpoint that acts as a webhook for GitHub issues event
* @param {object} event
* @returns {any} result
*/
module.exports = async (event, context) => {
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.repository.owner.login == process.env.GH_NAMESPACE && context.params.event.repo == process.env.GH_REPO_SLUG) {
const issueMetadata = lib.github.issues['@0.3.5'].retrieve({
owner: `${event.repository.owner.login}`,
repo: `${event.repository.name}`,
issue_number: Number(`${event.issue.id}`)
});
const issueBody = issueMetadata.body
let glApiResponse = lib.http.request['@1.1.6'].post({
url: `https://${process.env.GITLAB_HOST}/api/v3/projects/${process.env.GITLAB_PROJECT_ID}/issues`,
authorization: `${process.env.GITLAB_TOKEN}`,
params: {
'title': `todo`,
'body': `todo`
}
});
let closeThis = lib.github.issues['@0.3.5'].update({
owner: `${event.repository.owner.login}`,
repo: `${event.repository.name}`,
issue_number: Number(`${event.issue.number}`),
state: 'closed'
});
return {
github: closeThis,
gitlab: glApiResponse
}
} else {
return {
ok: false,
error: "Repo name and owner login mismatch found!"
}
}
};

9
functions/lookup.js Executable file
View File

@ -0,0 +1,9 @@
/**
* An example typed API that generates a hello world message
* Read more about typing at: https://github.com/acode/functionscript
* @param {string} username The username you want to lookup against our dataset
* @param {string} type What index we should
*/
module.exports = async (username, type = "content_creator") => {
return "todo"
};

View File

@ -0,0 +1,17 @@
const { getRedirectUrl } = require('../../../lib/oauth/mw.js')
module.exports = async (state = "abc123") => {
if (context.params.state) {
return {
headers: {"Location": getRedirectUrl(context.params.state)},
statusCode: 302,
body: Buffer.from('')
}
} else {
return {
headers: {"Location": "https://recaptime.miraheze.org/wiki/Portal:NoStateCodeDetected"},
statusCode: 302,
body: Buffer.from('')
}
}
}

View File

@ -0,0 +1,16 @@
const { getToken, getMe } = require('../../../lib/oauth/mw.js')
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
module.exports = async (state, code) => {
if (state) {
if (state == "abc123") {
return getToken(code, state)
}
} else {
return {
headers: {"Location": "https://recaptime.miraheze.org/wiki/Portal:NoStateCodeDetected"},
statusCode: 302,
body: Buffer.from('')
}
}
}

9
functions/response.js Executable file
View File

@ -0,0 +1,9 @@
return {
statusCode: 404,
headers: {'Content-Type': 'application/json'},
body: {
ok: false,
error: "Endpoint not found"
}
};

47
functions/updateCommands.js Executable file
View File

@ -0,0 +1,47 @@
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const slashCommandsConfig = require("../lib/slashCommands")
try {
/** After all of these, public commands go here **/
gitConnect = await lib.discord.commands['@0.0.0'].create({
name: slashCommandsConfig.connectGit.name,
description: slashCommandsConfig.connectGit.description,
options: slashCommandsConfig.connectGit.options
});
verify = await lib.discord.commands['@0.0.0'].create({
name: slashCommandsConfig.verify.name,
description: slashCommandsConfig.verify.description}
);
userLookup = await lib.discord.commands['@0.0.0'].create({
name: slashCommandsConfig.userinfo.name,
description: slashCommandsConfig.userinfo.description,
options: slashCommandsConfig.userinfo.options
});
updateCommands = await lib.discord.commands['@0.0.0'].create({
name: slashCommandsConfig.updateCommands.name,
description: slashCommandsConfig.updateCommands.description
});
return {
statusCode: 200,
body: {
ok: true,
results: [
gitConnect,
verify,
userLookup,
updateCommands
]
}
}
} catch (err) {
console.warn(err);
return {
statusCode: 500,
body: {
ok: false,
error: "Something went wrong.",
traceback: err
}
}
}

0
lib/.empty Executable file
View File

11
lib/embeds/verify.js Executable file
View File

@ -0,0 +1,11 @@
function getEmbedTemplate(userId, serverId, submissionType) {
if (submissionType == "content_creator") {
return {
}
}
}
module.exports = {
getEmbedTemplate
}

12
lib/models/lookupIndex.js Executable file
View File

@ -0,0 +1,12 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const contentCreator = new Schema({
name: String,
type: "content_creator",
annonations: Object
})
module.exports = {
contentCreator
}

46
lib/oauth/mw.js Executable file
View File

@ -0,0 +1,46 @@
const { loadEnvFromFile } = require("../secrets")
loadEnvFromFile()
const authroot = process.env.MW_OAUTH_ROOT;
const authorize = `${authroot}/oauth2/authorize`
const token = `${authroot}/oauth2/access_token`
const profileurl = `${authroot}/oauth2/resource/profile`
const axios = require('axios');
function getRedirectUrl (oauthState) {
let callback = encodeURIComponent(process.env.MW_OAUTH_CALLBACK)
let str = `client_id=${process.env.MW_OAUTH_CLIENT_ID}&response_type=code&request_url=${callback}&state=${oauthState}`
return `${authorize}?${str}`
}
/**
* Gets an OAuth2 access token from specific server
* @param {"string"} respCode
* @param {"string"} oauthState
* @returns
*/
function getToken (respCode, oauthState) {
const oauthResult = axios(token, {
method: "post",
params: {
grant_type: "authorization_code",
client_id: process.env.MW_OAUTH_CLIENT_ID,
client_secret: process.env.MW_OAUTH_CLIENT_SECRET,
redirect_url: process.env.MW_OAUTH_CALLBACK,
code: respCode,
state: oauthState
}
})
console.log(oauthResult);
return oauthResult
}
function getMe (token) {
//
}
module.exports = {
getRedirectUrl,
getToken,
getMe
}

26
lib/secrets.js Normal file
View File

@ -0,0 +1,26 @@
/**
* Environment variable loader from our env.json file (omitted from GitLab code export due to potential leakage
* of secrets). It is usually loaded when
*/
function loadEnvFromFile() {
const fs = require('fs');
fs.access("/opt/node_modules/autocode-common/configs", (err) => {
if (err) {
fs.access('env.json', (err) => {
const env = require("../env.json")
if (!err) {
process.env["MONGO_DATABASE"] = env.dev.MONGO_DATABASE
process.env["DISCORD_GUILD_ID"] = env.dev.DISCORD_GUILD_ID,
process.env["DISCORD_ROLE_ID"] = env.dev.DISCORD_GUILD_ID
} else {
require("dotenv").config()
}
})
}
});
}
module.exports = {
loadEnvFromFile
}

119
lib/slashCommands.js Executable file
View File

@ -0,0 +1,119 @@
module.exports = {
verify: {
name: 'verify',
description:
"Get you, your community or your company verified across Recap Time Squad's apps and through the API.",
options: [],
},
connectGit: {
name: 'connect-git',
description:
'Connect your Discord account to your GitHub/GitLab SaaS username. Rerun this when you change them.',
options: [
{
type: 3,
name: 'host',
description:
"Git host we'll use to associate your CLA signature to your Discord account, among other things.",
choices: [
{
name: 'GitHub',
value: 'github.com',
},
{
name: 'GitLab SaaS',
value: 'gitlab.com',
},
],
required: true,
},
],
},
userinfo: {
name: 'userinfo',
description: 'Query Discord user against the API for any associations.',
options: [
{
type: 6,
name: 'target_user',
description:
'Looks up either the mentioned Discord user or you against the API for any connected entries.',
},
],
},
status: {
name: "status",
guild_id: `${process.env.DISCORD_GUILD_ID}`,
description: "Set's your bot's status",
options: [
{
type: 3,
"name": "status",
"description": "Set the bot's status on Discord",
"choices": [
{
"name": "Online",
"value": "ONLINE"
},
{
"name": "Idle",
"value": "IDLE"
},
{
"name": "Do Not Disturb",
"value": "DND"
},
{
"name": "Offline",
"value": "INVISIBLE"
}
],
"required": true
},
{
"type": 3,
"name": "type",
"description": "Set the bot's activity type.",
"choices": [
{
"name": "Playing",
"value": "GAME"
},
{
"name": "Watching",
"value": "WATCHING"
},
{
"name": "Listening to",
"value": "LISTENING"
},
{
"name": "Competing in",
"value": "COMPETING"
},
{
"name": "Streaming",
"value": "STREAMING"
}
],
"required": true
},
{
"type": 3,
"name": "name",
"description": "Set the name of your activity",
"required": true
},
{
"type": 3,
"name": "url",
"description": "The URL your streaming status will link to. (Works on Streaming status only)"
}
]
},
updateCommands: {
name: "update-commands",
description: "Refreshes slash commands for this guild. Requires Manage Server perm to do this.",
options: [],
}
};

635
package-lock.json generated Normal file
View File

@ -0,0 +1,635 @@
{
"name": "@recaptime/rtapp-verify-backend",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@recaptime/rtapp-verify-backend",
"dependencies": {
"axios": "^0.26.1",
"dotenv": "^16.0.0",
"lib": "latest",
"mongoose": "^6.2.6",
"path": "^0.12.7"
}
},
"node_modules/@types/node": {
"version": "17.0.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz",
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w=="
},
"node_modules/@types/webidl-conversions": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
"integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"node_modules/@types/whatwg-url": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
"integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
"dependencies": {
"@types/node": "*",
"@types/webidl-conversions": "*"
}
},
"node_modules/axios": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"dependencies": {
"follow-redirects": "^1.14.8"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/bson": {
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.6.3.tgz",
"integrity": "sha512-rAqP5hcUVJhXP2MCSNVsf0oM2OGU1So6A9pVRDYayvJ5+hygXHQApf87wd5NlhPM1J9RJnbqxIG/f8QTzRoQ4A==",
"dependencies": {
"buffer": "^5.6.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/debug/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/denque": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
"engines": {
"node": ">=0.10"
}
},
"node_modules/dotenv": {
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz",
"integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==",
"engines": {
"node": ">=12"
}
},
"node_modules/follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"node_modules/ip": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
"integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
},
"node_modules/kareem": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.5.tgz",
"integrity": "sha512-qxCyQtp3ioawkiRNQr/v8xw9KIviMSSNmy+63Wubj7KmMn3g7noRXIZB4vPCAP+ETi2SR8eH6CvmlKZuGpoHOg=="
},
"node_modules/lib": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/lib/-/lib-4.3.3.tgz",
"integrity": "sha512-5ZIjwJvbfVJjbu0BTpfkqJrQ2ykXzo+XRFkHkTPHGpAPNS9vWwhLn1caQsedTKXmQ2U9gKYFSAlfjAXdXuWBjA==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"node_modules/mongodb": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz",
"integrity": "sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA==",
"dependencies": {
"bson": "^4.6.2",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.5.2",
"socks": "^2.6.2"
},
"engines": {
"node": ">=12.9.0"
},
"optionalDependencies": {
"saslprep": "^1.0.3"
}
},
"node_modules/mongodb-connection-string-url": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz",
"integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==",
"dependencies": {
"@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0"
}
},
"node_modules/mongoose": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.0.tgz",
"integrity": "sha512-3x2pEGlZ5SorqcL0/hmUIAzzHIh6a/VIAEv3zAmc93qDtSz3WBbF8PwYYHcXm6Awfck9/zFOV9KIUEE+HjVepA==",
"dependencies": {
"bson": "^4.2.2",
"kareem": "2.3.5",
"mongodb": "4.5.0",
"mpath": "0.8.4",
"mquery": "4.0.2",
"ms": "2.1.3",
"sift": "16.0.0"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mongoose"
}
},
"node_modules/mpath": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
"integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.2.tgz",
"integrity": "sha512-oAVF0Nil1mT3rxty6Zln4YiD6x6QsUWYz927jZzjMxOK2aqmhEz5JQ7xmrKK7xRFA2dwV+YaOpKU/S+vfNqKxA==",
"dependencies": {
"debug": "4.x"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/path": {
"version": "0.12.7",
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
"dependencies": {
"process": "^0.11.1",
"util": "^0.10.3"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"engines": {
"node": ">=6"
}
},
"node_modules/saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"dependencies": {
"sparse-bitfield": "^3.0.3"
},
"engines": {
"node": ">=6"
}
},
"node_modules/sift": {
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz",
"integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ=="
},
"node_modules/smart-buffer": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
}
},
"node_modules/socks": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz",
"integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==",
"dependencies": {
"ip": "^1.1.5",
"smart-buffer": "^4.2.0"
},
"engines": {
"node": ">= 10.13.0",
"npm": ">= 3.0.0"
}
},
"node_modules/sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"dependencies": {
"memory-pager": "^1.0.2"
}
},
"node_modules/tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"dependencies": {
"punycode": "^2.1.1"
},
"engines": {
"node": ">=12"
}
},
"node_modules/util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"dependencies": {
"inherits": "2.0.3"
}
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
"engines": {
"node": ">=12"
}
},
"node_modules/whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"dependencies": {
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=12"
}
}
},
"dependencies": {
"@types/node": {
"version": "17.0.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz",
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w=="
},
"@types/webidl-conversions": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
"integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"@types/whatwg-url": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
"integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
"requires": {
"@types/node": "*",
"@types/webidl-conversions": "*"
}
},
"axios": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"requires": {
"follow-redirects": "^1.14.8"
}
},
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"bson": {
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.6.3.tgz",
"integrity": "sha512-rAqP5hcUVJhXP2MCSNVsf0oM2OGU1So6A9pVRDYayvJ5+hygXHQApf87wd5NlhPM1J9RJnbqxIG/f8QTzRoQ4A==",
"requires": {
"buffer": "^5.6.0"
}
},
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
},
"dependencies": {
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"denque": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
},
"dotenv": {
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz",
"integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q=="
},
"follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
},
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ip": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
"integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
},
"kareem": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.5.tgz",
"integrity": "sha512-qxCyQtp3ioawkiRNQr/v8xw9KIviMSSNmy+63Wubj7KmMn3g7noRXIZB4vPCAP+ETi2SR8eH6CvmlKZuGpoHOg=="
},
"lib": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/lib/-/lib-4.3.3.tgz",
"integrity": "sha512-5ZIjwJvbfVJjbu0BTpfkqJrQ2ykXzo+XRFkHkTPHGpAPNS9vWwhLn1caQsedTKXmQ2U9gKYFSAlfjAXdXuWBjA=="
},
"memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"mongodb": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz",
"integrity": "sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA==",
"requires": {
"bson": "^4.6.2",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.5.2",
"saslprep": "^1.0.3",
"socks": "^2.6.2"
}
},
"mongodb-connection-string-url": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz",
"integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==",
"requires": {
"@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0"
}
},
"mongoose": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.3.0.tgz",
"integrity": "sha512-3x2pEGlZ5SorqcL0/hmUIAzzHIh6a/VIAEv3zAmc93qDtSz3WBbF8PwYYHcXm6Awfck9/zFOV9KIUEE+HjVepA==",
"requires": {
"bson": "^4.2.2",
"kareem": "2.3.5",
"mongodb": "4.5.0",
"mpath": "0.8.4",
"mquery": "4.0.2",
"ms": "2.1.3",
"sift": "16.0.0"
}
},
"mpath": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
"integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g=="
},
"mquery": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.2.tgz",
"integrity": "sha512-oAVF0Nil1mT3rxty6Zln4YiD6x6QsUWYz927jZzjMxOK2aqmhEz5JQ7xmrKK7xRFA2dwV+YaOpKU/S+vfNqKxA==",
"requires": {
"debug": "4.x"
}
},
"ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"path": {
"version": "0.12.7",
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
"requires": {
"process": "^0.11.1",
"util": "^0.10.3"
}
},
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"requires": {
"sparse-bitfield": "^3.0.3"
}
},
"sift": {
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz",
"integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ=="
},
"smart-buffer": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="
},
"socks": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz",
"integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==",
"requires": {
"ip": "^1.1.5",
"smart-buffer": "^4.2.0"
}
},
"sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"requires": {
"memory-pager": "^1.0.2"
}
},
"tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"requires": {
"punycode": "^2.1.1"
}
},
"util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"requires": {
"inherits": "2.0.3"
}
},
"webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
},
"whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"requires": {
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
}
}
}
}

12
package.json Executable file
View File

@ -0,0 +1,12 @@
{
"name": "@recaptime/rtapp-verify-backend",
"author": "Andrei Jiroh Halili <ajhlili2006@gmail.com>",
"publish": false,
"dependencies": {
"axios": "^0.26.1",
"dotenv": "^16.0.0",
"lib": "latest",
"mongoose": "^6.2.6",
"path": "^0.12.7"
}
}

186
payloads.json Executable file
View File

@ -0,0 +1,186 @@
{
"functions/events/autocode/self/deployed.js": {
"event": {
"service_name": "recaptime/rtapp-verify-backend",
"environment": "dev",
"author": {
"username": "ajhalili2006",
"formatted_name": "ajhalili2006",
"full_image_url": "https://polybit-apps.s3.amazonaws.com/stdlib/users/ajhalili2006/profile/image.png?1647350340012"
},
"user": {
"username": "recaptime",
"formatted_name": "Recap Time Squad",
"full_image_url": "https://utils.api.stdlib.com/automicon/recaptime.png"
}
}
},
"functions/events/discord/command/status.js": {
"event": {
"version": 1,
"type": 2,
"token": "aW50ZXJhY3Rpb246OTU2MTk2NzM5OTgxOTMwNTU4OlpQdlBjamdXV09WSWh0MjUxZ2w4SXNTTlJZQjI4THlRTDl1Tld4MkNLa3Q5Z2k4Uk5OcmJUbnFaTjdNQk02TnNOWkd2R2NTdHNMaHpwMTBQWTRoRm1LeUVGRWQweEFCc3ZUNElmazhxdEJhd2Z0c1U5ZXJOZ3JHVjh1ZGdaWHdX",
"member": {
"user": {
"username": "Andrei Jiroh",
"public_flags": 64,
"id": "437044173825114113",
"discriminator": "7159",
"avatar": "de10959471350d53a0906fa7b2923091"
},
"roles": [
"953610409502449734"
],
"premium_since": null,
"permissions": "1090921164531",
"pending": false,
"nick": null,
"mute": false,
"joined_at": "2022-03-16T10:56:08.830000+00:00",
"is_pending": false,
"deaf": false,
"communication_disabled_until": null,
"avatar": null,
"permission_names": [
"CREATE_INSTANT_INVITE",
"KICK_MEMBERS",
"MANAGE_CHANNELS",
"MANAGE_GUILD",
"ADD_REACTIONS",
"VIEW_AUDIT_LOG",
"STREAM",
"VIEW_CHANNEL",
"SEND_MESSAGES",
"MANAGE_MESSAGES",
"EMBED_LINKS",
"ATTACH_FILES",
"READ_MESSAGE_HISTORY",
"MENTION_EVERYONE",
"USE_EXTERNAL_EMOJIS",
"CONNECT",
"SPEAK",
"MUTE_MEMBERS",
"DEAFEN_MEMBERS",
"MOVE_MEMBERS",
"USE_VAD",
"CHANGE_NICKNAME",
"MANAGE_NICKNAMES",
"MANAGE_ROLES",
"MANAGE_WEBHOOKS",
"MANAGE_EMOJIS",
"USE_SLASH_COMMANDS",
"REQUEST_TO_SPEAK",
"MANAGE_THREADS",
"USE_EXTERNAL_STICKERS",
"SEND_MESSAGES_IN_THREADS",
"START_EMBEDDED_ACTIVITIES",
"MODERATE_MEMBERS"
]
},
"locale": "en-US",
"id": "956196739981930558",
"guild_locale": "en-US",
"guild_id": "953603786625146921",
"data": {
"type": 1,
"options": [
{
"value": "ONLINE",
"type": 3,
"name": "status"
},
{
"value": "STREAMING",
"type": 3,
"name": "type"
},
{
"value": "requests from Autocode events and Git hooks",
"type": 3,
"name": "name"
},
{
"value": "https://gitlab.com/RecapTime/verify",
"type": 3,
"name": "url"
}
],
"name": "status",
"id": "953638638141456404",
"guild_id": "953603786625146921"
},
"channel_id": "953603786625146924",
"application_id": "953608285146202132",
"received_at": "2022-03-23T14:24:28.154Z"
}
},
"functions/events/discord/command/verify.js": {
"event": {
"version": 1,
"user": {
"username": "Andrei Jiroh",
"public_flags": 64,
"id": "437044173825114113",
"discriminator": "7159",
"avatar": "de10959471350d53a0906fa7b2923091"
},
"type": 2,
"token": "aW50ZXJhY3Rpb246OTYwMzkxMzQzMzU0NTY0NjI5OlpBQWl5SlRyVWJwT05JM3E4aTIxSXZtamRyN3BJdGxpd0VWS1N6YUx6ODVWNFlCVlBzZGxWc0c0NVA5cTB4VUdVOGlYSkdqWHdzQmxSeUFTS3BZQlZFN21GS28yNGUxUm9teTQzbUk4a3ptcE5JSkROQzVHN1FBY0tScThCUEJU",
"locale": "en-US",
"id": "960391343354564629",
"data": {
"type": 1,
"options": [
{
"value": "content_creator",
"type": 3,
"name": "type"
}
],
"name": "verify",
"id": "953653016634990592"
},
"channel_id": "954342644962721792",
"application_id": "953608285146202132",
"received_at": "2022-04-04T04:12:19.547Z"
}
},
"functions/updateCommands.js": {
"id": "953603786625146921"
},
"functions/events/discord/command/link-fandom.js": {
"event": {
"version": 1,
"user": {
"username": "Andrei Jiroh",
"public_flags": 64,
"id": "437044173825114113",
"discriminator": "7159",
"avatar": "de10959471350d53a0906fa7b2923091"
},
"type": 2,
"token": "aW50ZXJhY3Rpb246OTYwMzkxMzQzMzU0NTY0NjI5OlpBQWl5SlRyVWJwT05JM3E4aTIxSXZtamRyN3BJdGxpd0VWS1N6YUx6ODVWNFlCVlBzZGxWc0c0NVA5cTB4VUdVOGlYSkdqWHdzQmxSeUFTS3BZQlZFN21GS28yNGUxUm9teTQzbUk4a3ptcE5JSkROQzVHN1FBY0tScThCUEJU",
"locale": "en-US",
"id": "960391343354564629",
"data": {
"type": 1,
"options": [
{
"value": "content_creator",
"type": 3,
"name": "type"
}
],
"name": "verify",
"id": "953653016634990592"
},
"channel_id": "954342644962721792",
"application_id": "953608285146202132",
"received_at": "2022-04-04T04:12:19.547Z"
}
},
"functions/oauth/mediawiki/__main__.js": {
"code": "def50200915af675663f84fdf4df32348291b8592dd0ec798d87df788bb413f0235a7a2ed9193a7fc46abf5b3ba627a7e42a5dc4c54f496b64aaf8054ffb7bbdc529a77b17562e1e7d896915e854c549dd53762c37101b339af5b7f0fec439318ae3800feeb85135a27bb492402fbc93d28fbcad50a710088032e8f5659b6f52f646760d5f3b2318ecb8d5d06fd0a48661efab7c300bba25d541276afe8db2bf59563f7c9b2dd95e2e718a68bf00120a0369e3148216ac6fa26bee754b31ecdfe96e1aa56581c5a8da7e9e1a4e9a24c3743cd5531a3da54c5be944bc1861a9c49e781f79c67f3990a164df0bd0f55d99bedfabf39cc69ab590978b6cca050a61b3fa8ac138d26dad0a0db34c1dcfd267a26763a4b8be691b3ec34f41e13001fb4f36848c68779989330de3f83acc57660826743a7faefe302ce3c6cd5462ab31d8a4226f1c0f2285f94cc97c6907ac5995a521b9f62fb2165439feebe35861e76367cef3c860e2fcde4e2a20f8cf89e48a3a3c81a1c9fc68a60d77",
"state": "abc123"
}
}

91
stdlib.json Executable file
View File

@ -0,0 +1,91 @@
{
"name": "recaptime/rtapp-verify-backend",
"timeout": 10000,
"connector": false,
"events": {
"functions/events/discord/bot_mention.js": {
"name": "discord.bot_mention"
},
"functions/events/discord/command/verify.js": {
"name": "discord.command",
"subtype": {
"command": "verify"
}
},
"functions/events/github/issues.js": {
"name": "github.issues",
"subtype": {
"action": "opened"
}
},
"functions/events/discord/command/status.js": {
"name": "discord.command",
"subtype": {
"command": "status"
}
},
"functions/events/autocode/self/deployed.js": {
"name": "autocode.self.deployed"
},
"functions/events/discord/message/button/interaction.js": {
"name": "discord.message.button.interaction",
"subtype": {
"custom_id": "confirm_github_connection"
}
},
"functions/events/discord/command/update-commands.js": {
"name": "discord.command",
"subtype": {
"command": "update-commands"
}
},
"functions/events/discord/command/link-fandom.js": {
"name": "discord.command",
"subtype": {
"command": "link-fandom"
}
}
},
"env": [
{
"name": "MONGO_DATABASE",
"description": "MongoDB database connection string"
},
{
"name": "GH_NAMESPACE",
"description": "GitHub repository owner's username. Note that this will be also used in your GitLab fork mirror."
},
{
"name": "GH_REPO_SLUG",
"description": "GitHub repository slug. Note that this will be also used in your GitLab fork mirror."
},
{
"name": "DISCORD_GUILD_ID",
"description": "Discord server ID to run some bot management commands."
},
{
"name": "DISCORD_ROLE_ID",
"description": "Discord role ID to allow run some bot management commands."
},
{
"name": "MW_OAUTH_ROOT",
"description": "Root REST API endpoint for OAuth-related calls.without trailing slash at end."
},
{
"name": "MW_OAUTH_CLIENT_ID",
"description": "MediaWiki OAuth consumer key"
},
{
"name": "MW_OAUTH_CLIENT_SECRET",
"description": "MediaWiki OAuth consumer secret key"
},
{
"name": "MW_OAUTH_CALLBACK",
"description": "MediaWiki OAuth callback URL"
},
{
"name": "TRIGGER_DEPLOY",
"description": "Trigger an manual deploy"
}
]
}

View File

@ -0,0 +1,102 @@
{
"event": {
"version": 1,
"type": 2,
"token": "aW50ZXJhY3Rpb246OTUzNjM4ODAxMDA2Mjg4OTY2OjlueWwyVlc2WFVsN3lyenBZU0RSYTQ5emJjOFpJV0x3djJ4MTVSblJDSjk4MzVRWWdIV1R2N2tuUTd5ZzcxcGFZZklLTFg4WEpOSHc0cHQ4ZzFYZXVuNnFGZ2RmYVVqYlZtMVNOVmtOdXlSanZuVEEzOHFaUWw5ZGt3azZwbFR0",
"member": {
"user": {
"username": "Recap Time Squad",
"public_flags": 0,
"id": "604246611257851904",
"discriminator": "6529",
"avatar": "88578254f6289fab81527a5ccb7a20b6"
},
"roles": [
"953610282285035531",
"953610409502449734"
],
"premium_since": null,
"permissions": "2199023255551",
"pending": false,
"nick": null,
"mute": false,
"joined_at": "2022-03-16T10:40:59.904000+00:00",
"is_pending": false,
"deaf": false,
"communication_disabled_until": null,
"avatar": null,
"permission_names": [
"CREATE_INSTANT_INVITE",
"KICK_MEMBERS",
"BAN_MEMBERS",
"ADMINISTRATOR",
"MANAGE_CHANNELS",
"MANAGE_GUILD",
"ADD_REACTIONS",
"VIEW_AUDIT_LOG",
"PRIORITY_SPEAKER",
"STREAM",
"VIEW_CHANNEL",
"SEND_MESSAGES",
"SEND_TTS_MESSAGES",
"MANAGE_MESSAGES",
"EMBED_LINKS",
"ATTACH_FILES",
"READ_MESSAGE_HISTORY",
"MENTION_EVERYONE",
"USE_EXTERNAL_EMOJIS",
"VIEW_GUILD_INSIGHTS",
"CONNECT",
"SPEAK",
"MUTE_MEMBERS",
"DEAFEN_MEMBERS",
"MOVE_MEMBERS",
"USE_VAD",
"CHANGE_NICKNAME",
"MANAGE_NICKNAMES",
"MANAGE_ROLES",
"MANAGE_WEBHOOKS",
"MANAGE_EMOJIS",
"USE_SLASH_COMMANDS",
"REQUEST_TO_SPEAK",
"MANAGE_THREADS",
"USE_PUBLIC_THREADS",
"USE_PRIVATE_THREADS",
"USE_EXTERNAL_STICKERS",
"SEND_MESSAGES_IN_THREADS",
"START_EMBEDDED_ACTIVITIES",
"MODERATE_MEMBERS"
]
},
"locale": "en-US",
"id": "953638801006288966",
"guild_locale": "en-US",
"guild_id": "953603786625146921",
"data": {
"type": 1,
"options": [
{
"value": "DND",
"type": 3,
"name": "status"
},
{
"value": "WATCHING",
"type": 3,
"name": "type"
},
{
"value": "the production server burn",
"type": 3,
"name": "name"
}
],
"name": "status",
"id": "953638638141456404",
"guild_id": "953603786625146921"
},
"channel_id": "953603786625146924",
"application_id": "953608285146202132",
"received_at": "2022-03-16T13:00:08.003Z"
}
}

View File

@ -0,0 +1,76 @@
{
"event": {
"version": 1,
"type": 2,
"token": "aW50ZXJhY3Rpb246OTUzNjQ0OTA0Mzc3MTE0NzA1OlRRd3FVSHJMWkRIQ1RPUWtOZjJzd3N0S04zS09OckVuRW1nRkd2RkMyUWVlTTlyUVdwOFRPT3pJa21UVEo4QjVvNDUyUmlNQXRyNEsxTUFjdmJUTHhGV0RMOG5Vb0l2UmN4SnVkblhKTnNEeHB5Z1VCWHF2N0dkU3JSMG1xTmV2",
"member": {
"user": {
"username": "Andrei Jiroh",
"public_flags": 64,
"id": "437044173825114113",
"discriminator": "7159",
"avatar": "de10959471350d53a0906fa7b2923091"
},
"roles": [],
"premium_since": null,
"permissions": "1071698660929",
"pending": false,
"nick": null,
"mute": false,
"joined_at": "2022-03-16T10:56:08.830000+00:00",
"is_pending": false,
"deaf": false,
"communication_disabled_until": null,
"avatar": null,
"permission_names": [
"CREATE_INSTANT_INVITE",
"ADD_REACTIONS",
"STREAM",
"VIEW_CHANNEL",
"SEND_MESSAGES",
"EMBED_LINKS",
"ATTACH_FILES",
"READ_MESSAGE_HISTORY",
"MENTION_EVERYONE",
"USE_EXTERNAL_EMOJIS",
"CONNECT",
"SPEAK",
"USE_VAD",
"CHANGE_NICKNAME",
"USE_SLASH_COMMANDS",
"REQUEST_TO_SPEAK",
"START_EMBEDDED_ACTIVITIES"
]
},
"locale": "en-US",
"id": "953644904377114705",
"guild_locale": "en-US",
"guild_id": "953603786625146921",
"data": {
"type": 1,
"options": [
{
"value": "INVISIBLE",
"type": 3,
"name": "status"
},
{
"value": "GAME",
"type": 3,
"name": "type"
},
{
"value": "Under maintenance mode",
"type": 3,
"name": "name"
}
],
"name": "status",
"id": "953638638141456404",
"guild_id": "953603786625146921"
},
"channel_id": "953603786625146924",
"application_id": "953608285146202132",
"received_at": "2022-03-16T13:24:23.179Z"
}
}

38
www/index.html Executable file
View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="The landing page for my bot">
<link href="https://hakiki.api.stdlib.com/blog@dev/landing/bot-icon.png" rel="icon">
<title>My Bot - Landing Page</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>
</div>
</div>
</nav>
</body>
</html>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="script.js"></script>

15
www/style.css Executable file
View File

@ -0,0 +1,15 @@
.container {
height: 80%;
width: 90%;
background-color: #57f287;
margin: 5% auto;
border-radius: 1rem;
box-shadow: 0 2px 5px 2px rgba(0, 0, 0, 0.3);
padding: 20px;
}
@font-face {
font-family: "gintoNord";
src: url("https://cdn.rtapp.tk/fonts/ABCGintoNord-Black.woff")
format("woff");
}