diff --git a/.env.example b/.env.example
index 62e9618..5390950 100644
--- a/.env.example
+++ b/.env.example
@@ -17,7 +17,7 @@ REFRESH_SLASH_COMMAND_API_DATA=true
CLEAR_SLASH_COMMAND_API_DATA=false
# ------------------------- API / Server ------------------------- #
-CLIENT_URL=djs.mirasaki.dev
+USE_API=false
PORT=3000
# ------------------------- File Paths ------------------------- #
diff --git a/.gitignore b/.gitignore
index 6ed3639..8ebe390 100755
--- a/.gitignore
+++ b/.gitignore
@@ -115,9 +115,6 @@ src/commands/testing
# Documentation: JSDoc
/docs
-# Our generated command table
-/public/html/commands.html
-
# Personal TODO file
TODO.md
diff --git a/README.md b/README.md
index 81c7b53..6c32518 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,6 @@ Come try the template yourself in our official [support server](https://discord.
- The API is documented at [djs.mirasaki.dev/api-docs](https://djs.mirasaki.dev/api-docs "Backend/API Documentation")
- Source code is well documented with comments, explaining what's going on
- With the use of JSDoc for client documentation, enjoy code-completion (IntelliSense) in your favorite code editor
-- This template generates a static HTML page with detailed command information ([example](https://djs.mirasaki.dev/html/commands.html "Example of generated HTML command table"))
Features
@@ -79,7 +78,7 @@ Every file in [the `listeners` folder](/src/listeners/) will be registered as an
RESTful API
-This template comes with a REST API (OpenAPI spec 3.0.0). By default, this only serves the client's command data, which can be used to easily fetch your command data and build a dynamic command table/overview on your personal website. As this project is meant to be newbie-friendly, I thought I would include a **very** basic API template, so new developers are free to play around with it without having to set-up anything themselves. But, of course, you can just remove the `/backend` folder, `npm remove` unused dependencies and just use `npm run client` as the bot/client is completely standalone from the API. It's optional.
+This template comes with a REST API (OpenAPI spec 3.0.0). By default, this only serves the client's command data, which can be used to easily fetch your command data and build a dynamic command table/overview on your personal website. As this project is meant to be newbie-friendly, I thought I would include a **very** basic API template, so new developers are free to play around with it without having to set-up anything themselves. Change `USE_API` to `true` in the [env file](/.env.example) to enable this feature.
Others
@@ -95,7 +94,7 @@ This template comes with a REST API (OpenAPI spec 3.0.0). By default, this only
- Don't like the folder structure? Jump into the [environmental file](/.env.example) and configure where your commands and components are loaded from
- Every embed color code and emoji are grabbed from their respective [configuration file](/src/config/), meaning you can personalize the bot without having to go over a plethora of files
- Comes with a [constants file](/src/constants.js) to manage your unique ids and previously hard-coded values
-- Comes with example scripts for `pm2`, `docker` and `concurrently`
+- Comes with example scripts for `pm2` and `docker`
- And lastly...
You don't **have** to use the built-in component command (buttons, modals, etc) handler. Alternatively, you can use the following (vanilla `discord.js`) code to achieve the same, but within a ChatInput/UserContextMenu/MessageContextMenu command file:
diff --git a/backend/docs/commands.yaml b/backend/docs/commands.yaml
deleted file mode 100644
index b290264..0000000
--- a/backend/docs/commands.yaml
+++ /dev/null
@@ -1,304 +0,0 @@
-paths:
- # Application Chat Input Commands
- /api/commands:
- get:
- summary: Retrieves a list of chat input commands
- description: Retrieves a list of chat input commands, sorted by category.. Holds valuable information like cooldown configuration, permission levels, and Discord API data.
- parameters:
- - in: path
- name: category
- required: false
- description: Only show commands belonging to a specific category
- schema:
- type: string
- - in: path
- name: limit
- required: false
- description: Only show the first {limit} results
- schema:
- type: number
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/APICommand'
- /api/commands/{name}:
- get:
- summary: Find a command by name
- description: Find a specific command in the command collection by name
- responses:
- '200':
- description: OK, the command was found
- content:
- application/json:
- schema:
- $ref: '#components/schemas/APICommand'
- '404':
- description: Not found, couldn't find a command with the provided name
-
- # Application Context Menu Commands
- /api/commands/context-menus:
- get:
- summary: Retrieves a list of context menu commands
- description: Retrieves a list of context menu commands, sorted by category.. Holds valuable information like cooldown configuration, permission levels, and Discord API data.
- parameters:
- - in: path
- name: category
- required: false
- description: Only show commands belonging to a specific category
- schema:
- type: string
- - in: path
- name: limit
- required: false
- description: Only show the first {limit} results
- schema:
- type: number
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/APICommand'
- /api/commands/context-menus/{name}:
- get:
- summary: Find a context menu command by name
- description: Find a specific context menu command in the command collection by name
- responses:
- '200':
- description: OK, the command was found
- content:
- application/json:
- schema:
- $ref: '#components/schemas/APICommand'
- '404':
- description: Not found, couldn't find a command with the provided name
-
- # Application Auto Complete Commands
- /api/commands/auto-complete:
- get:
- summary: Retrieves a list of auto complete commands
- description: Retrieves a list of auto complete commands, sorted by category.. Holds valuable information like cooldown configuration, permission levels, and Discord API data.
- parameters:
- - in: path
- name: category
- required: false
- description: Only show commands belonging to a specific category
- schema:
- type: string
- - in: path
- name: limit
- required: false
- description: Only show the first {limit} results
- schema:
- type: number
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/BaseCommand'
- /api/commands/auto-complete/{name}:
- get:
- summary: Find an auto complete command by name
- description: Find a specific auto complete command in the command collection by name
- responses:
- '200':
- description: OK, the command was found
- content:
- application/json:
- schema:
- $ref: '#components/schemas/BaseCommand'
- '404':
- description: Not found, couldn't find a command with the provided name
-
- # Application Button Commands
- /api/commands/buttons:
- get:
- summary: Retrieves a list of button commands
- description: Retrieves a list of button commands, sorted by category.. Holds valuable information like cooldown configuration, permission levels, and Discord API data.
- parameters:
- - in: path
- name: category
- required: false
- description: Only show commands belonging to a specific category
- schema:
- type: string
- - in: path
- name: limit
- required: false
- description: Only show the first {limit} results
- schema:
- type: number
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/BaseCommand'
- /api/commands/buttons/{name}:
- get:
- summary: Find a button command by name
- description: Find a specific button command in the command collection by name
- responses:
- '200':
- description: OK, the command was found
- content:
- application/json:
- schema:
- $ref: '#components/schemas/BaseCommand'
- '404':
- description: Not found, couldn't find a command with the provided name
-
-# Application Modal Commands
- /api/commands/modals:
- get:
- summary: Retrieves a list of modal commands
- description: Retrieves a list of modal commands, sorted by category.. Holds valuable information like cooldown configuration, permission levels, and Discord API data.
- parameters:
- - in: path
- name: category
- required: false
- description: Only show commands belonging to a specific category
- schema:
- type: string
- - in: path
- name: limit
- required: false
- description: Only show the first {limit} results
- schema:
- type: number
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/BaseCommand'
- /api/commands/modals/{name}:
- get:
- summary: Find a modal command by name
- description: Find a specific modal command in the command collection by name
- responses:
- '200':
- description: OK, the command was found
- content:
- application/json:
- schema:
- $ref: '#components/schemas/BaseCommand'
- '404':
- description: Not found, couldn't find a command with the provided name
-
-# Application Select Menu Commands
- /api/commands/select-menus:
- get:
- summary: Retrieves a list of select menu commands
- description: Retrieves a list of select menu commands, sorted by category.. Holds valuable information like cooldown configuration, permission levels, and Discord API data.
- parameters:
- - in: path
- name: category
- required: false
- description: Only show commands belonging to a specific category
- schema:
- type: string
- - in: path
- name: limit
- required: false
- description: Only show the first {limit} results
- schema:
- type: number
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/BaseCommand'
- /api/commands/select-menus/{name}:
- get:
- summary: Find a select menu command by name
- description: Find a specific select menu command in the command collection by name
- responses:
- '200':
- description: OK, the command was found
- content:
- application/json:
- schema:
- $ref: '#components/schemas/BaseCommand'
- '404':
- description: Not found, couldn't find a command with the provided name
-
-
-# Command Components
-components:
- schemas:
- BaseCommand:
- type: object
- properties:
- permLevel:
- type: integer
- description: The permission level required to execute the command
- clientPerms:
- type: array
- description: Additional Discord permissions required by the client to execute the command
- items:
- type: string
- userPerms:
- type: array
- description: Additional Discord permissions required by the user (command-invoker) to execute the command
- items:
- type: string
- enabled:
- description: Is the command currently enabled
- type: boolean
- nsfw:
- description: Is the command NSFW, or SFW
- type: boolean
- category:
- description: The category this command belongs to
- type: string
- cooldown:
- type: object
- description: Cooldown configuration for this command
- properties:
- type:
- type: string
- usages:
- type: number
- duration:
- type: number
- data:
- type: object
- description: Discord API Application Command data
- properties:
- type:
- type: number
- name:
- type: string
- description:
- type: string
- APICommand:
- allOf:
- - type: object
- properties:
- global:
- type: boolean
- description: Is the command enabled globally, or only in the testing server
- - $ref: '#/components/schemas/BaseCommand'
\ No newline at end of file
diff --git a/backend/middleware/cors.js b/backend/middleware/cors.js
deleted file mode 100644
index 9d459d6..0000000
--- a/backend/middleware/cors.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const { CLIENT_URL } = process.env;
-
-const addCORSHeader = (req, res, next) => {
- res.header('Access-Control-Allow-Origin', CLIENT_URL);
- res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
- next();
-};
-
-module.exports = { addCORSHeader };
diff --git a/backend/middleware/errorMiddleware.js b/backend/middleware/errorMiddleware.js
deleted file mode 100644
index d078a29..0000000
--- a/backend/middleware/errorMiddleware.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const notFound = (req, res, next) => {
- const error = new Error(`Not Found - ${ req.originalUrl }`);
-
- res.status(404);
- next(error);
-};
-
-const errorHandler = (err, req, res, next) => {
- const statusCode = res.statusCode === 200 ? 500 : res.statusCode;
-
- res.status(statusCode);
- res.json({
- message: err.message,
- stack: process.env.NODE_ENV === 'production' ? null : err.stack
- });
-};
-
-module.exports = {
- notFound,
- errorHandler
-};
diff --git a/backend/server.js b/backend/server.js
deleted file mode 100644
index 74bb885..0000000
--- a/backend/server.js
+++ /dev/null
@@ -1,114 +0,0 @@
-// Require our shared environmental file as early as possible
-require('dotenv').config();
-
-// Importing from packages
-const express = require('express');
-const morgan = require('morgan');
-const chalk = require('chalk');
-const logger = require('@mirasaki/logger');
-const bodyParser = require('body-parser');
-
-// Importing local files
-const pkg = require('../package.json');
-const { notFound, errorHandler } = require('./middleware/errorMiddleware.js');
-const { addCORSHeader } = require('./middleware/cors');
-
-// Importing our routes
-const commandRoutes = require('./routes/commandRoutes.js');
-
-// Destructure from our environmental file
-// Set our default port to 3000 if it's missing from environmental file
-const { NODE_ENV, PORT = 3000 } = process.env;
-
-/*** JSDoc: Ignored
- * API Documentation
- * Reference: https://swagger.io/specification/#openapi-object
- */
-const swaggerJsDoc = require('swagger-jsdoc');
-const swaggerUi = require('swagger-ui-express');
-const swaggerDefinition = {
- openapi: '3.0.0',
- info: {
- title: `RESTful Express API for ${ pkg.name }`,
- version: pkg.version,
- description: `This is a REST API application made with Express. It serves ${ pkg.name } command data.`,
- license: {
- name: 'MIT License',
- url: 'https://spdx.org/licenses/MIT.html'
- },
- contact: {
- name: 'Mirasaki',
- url: 'https://mirasaki.dev'
- }
- },
- servers: [
- {
- url: 'https://djs.mirasaki.dev/',
- description: 'Live Server'
- },
- {
- url: `http://localhost:${ PORT }`,
- description: 'Development Server'
- }
- ]
-};
-const options = {
- swaggerDefinition,
- // Fail on parsing error in development mode
- failOnErrors: !!(NODE_ENV === 'production'),
- // Paths to files containing OpenAPI definitions
- apis: [ 'backend/docs/*.yaml' ]
-};
-const openAPISpecification = swaggerJsDoc(options);
-
-/***
- * Initialize our express app
- */
-const app = express();
-
-// Applying our Morgan logger middleware
-app.use(
- // Use development mode in non-production environments
- morgan(NODE_ENV === 'production' ? 'combined' : 'dev')
-);
-
-/*** Applying our body-parser middleware
- * As req.body's shape is based on user-controlled input,
- * all properties and values in this object are untrusted and
- * should be validated before trusting. For example, req.body.foo.toString()
- * may fail in multiple ways, for example the foo property may not be
- * there or may not be a string, and toString may not be a function and instead
- * a string or other user input.
- */
-app.use(bodyParser.urlencoded({ extended: false }));
-app.use(bodyParser.json());
-
-// Routes Middleware
-app.use('/api/commands', commandRoutes);
-
-// Serving our generated client documentation as root
-app.use(
- '/',
- express.static('docs', { extensions: [ 'html' ] })
-);
-
-
-// Serving our generated API documentation
-app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(openAPISpecification));
-
-// Serving our static public files
-app.use(express.static('public'));
-
-
-// Apply our local middleware
-app.use(notFound);
-app.use(errorHandler);
-app.use(addCORSHeader);
-
-// Actively listen for requests to our API/backend
-app.listen(
- PORT,
- logger.success(chalk.yellow.bold(`API running in ${ NODE_ENV }-mode on port ${ PORT }`))
-);
-
-
diff --git a/backend/util/files.js b/backend/util/files.js
deleted file mode 100644
index e098567..0000000
--- a/backend/util/files.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const path = require('path');
-const { readdirSync, statSync } = require('fs');
-
-/**
- * Get an array of (resolved) absolute file paths in the target directory,
- * Ignores files that start with a "." character
- * @param {string} requestedPath Absolute path to the directory
- * @param {Array} [allowedExtensions=['.js', '.mjs', '.cjs']] Array of file extensions
- * @returns {Array} Array of (resolved) absolute file paths
- */
-const getFiles = (
- requestedPath,
- allowedExtensions = [
- '.js',
- '.mjs',
- '.cjs'
- ]
-) => {
- if (typeof allowedExtensions === 'string') allowedExtensions = [ allowedExtensions ];
- requestedPath ??= path.resolve(requestedPath);
- let res = [];
-
- for (let itemInDir of readdirSync(requestedPath)) {
- itemInDir = path.resolve(requestedPath, itemInDir);
- const stat = statSync(itemInDir);
-
- if (stat.isDirectory()) res = res.concat(getFiles(itemInDir, allowedExtensions));
- if (
- stat.isFile()
- && allowedExtensions.find((ext) => itemInDir.endsWith(ext))
- && !itemInDir.slice(
- itemInDir.lastIndexOf(path.sep) + 1, itemInDir.length
- ).startsWith('.')
- ) res.push(itemInDir);
- }
- return res;
-};
-
-module.exports = { getFiles };
diff --git a/jsdoc.json b/jsdoc.json
index e1d5460..d30fdb5 100644
--- a/jsdoc.json
+++ b/jsdoc.json
@@ -49,11 +49,6 @@
"class": "menu-item",
"id": "api-documentation"
},
- "Commands": {
- "href": "/html/commands.html",
- "class": "menu-item",
- "id": "commands"
- },
"Contact": {
"href": "https://mirasaki.dev",
"class": "menu-item",
diff --git a/package-lock.json b/package-lock.json
index c43233f..391f224 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,15 +11,10 @@
"dependencies": {
"@discordjs/rest": "^1.5.0",
"@mirasaki/logger": "^1.0.5",
- "body-parser": "^1.20.0",
"common-tags": "^1.8.2",
- "concurrently": "^7.6.0",
"discord.js": "^14.7.1",
"dotenv": "^16.0.3",
- "express": "^4.18.2",
- "morgan": "^1.10.0",
- "swagger-jsdoc": "^6.2.8",
- "swagger-ui-express": "^4.6.0"
+ "express": "^4.18.2"
},
"devDependencies": {
"docdash": "^2.0.1",
@@ -33,46 +28,6 @@
"node": ">=18"
}
},
- "node_modules/@apidevtools/json-schema-ref-parser": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.0.tgz",
- "integrity": "sha512-teB30tFooE3iQs2HQIKJ02D8UZA1Xy1zaczzhUjJs0CymYxeC0g+y5rCY2p8NHBM6DBUVoR8rSM4kHLj1WE9mQ==",
- "dependencies": {
- "@jsdevtools/ono": "^7.1.3",
- "@types/json-schema": "^7.0.6",
- "call-me-maybe": "^1.0.1",
- "js-yaml": "^4.1.0"
- }
- },
- "node_modules/@apidevtools/openapi-schemas": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz",
- "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@apidevtools/swagger-methods": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz",
- "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg=="
- },
- "node_modules/@apidevtools/swagger-parser": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz",
- "integrity": "sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g==",
- "dependencies": {
- "@apidevtools/json-schema-ref-parser": "^9.0.6",
- "@apidevtools/openapi-schemas": "^2.0.4",
- "@apidevtools/swagger-methods": "^3.0.2",
- "@jsdevtools/ono": "^7.1.3",
- "call-me-maybe": "^1.0.1",
- "z-schema": "^5.0.1"
- },
- "peerDependencies": {
- "openapi-types": ">=7"
- }
- },
"node_modules/@babel/parser": {
"version": "7.18.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz",
@@ -191,11 +146,6 @@
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
"dev": true
},
- "node_modules/@jsdevtools/ono": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz",
- "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg=="
- },
"node_modules/@jsdoc/salty": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.1.tgz",
@@ -287,11 +237,6 @@
"resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
"integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="
},
- "node_modules/@types/json-schema": {
- "version": "7.0.11",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
- "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
- },
"node_modules/@types/linkify-it": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz",
@@ -402,6 +347,7 @@
},
"node_modules/ansi-regex": {
"version": "5.0.1",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
@@ -435,7 +381,8 @@
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
},
"node_modules/array-back": {
"version": "6.2.2",
@@ -453,24 +400,9 @@
},
"node_modules/balanced-match": {
"version": "1.0.2",
+ "dev": true,
"license": "MIT"
},
- "node_modules/basic-auth": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
- "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
- "dependencies": {
- "safe-buffer": "5.1.2"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/basic-auth/node_modules/safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
- },
"node_modules/binary-extensions": {
"version": "2.2.0",
"dev": true,
@@ -523,6 +455,7 @@
},
"node_modules/brace-expansion": {
"version": "1.1.11",
+ "dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
@@ -594,11 +527,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/call-me-maybe": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz",
- "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ=="
- },
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -671,16 +599,6 @@
"node": ">= 6"
}
},
- "node_modules/cliui": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
- "dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^7.0.0"
- }
- },
"node_modules/collect-all": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.4.tgz",
@@ -796,14 +714,6 @@
"node": ">=4"
}
},
- "node_modules/commander": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz",
- "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==",
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/common-sequence": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/common-sequence/-/common-sequence-2.0.2.tgz",
@@ -822,48 +732,9 @@
},
"node_modules/concat-map": {
"version": "0.0.1",
+ "dev": true,
"license": "MIT"
},
- "node_modules/concurrently": {
- "version": "7.6.0",
- "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-7.6.0.tgz",
- "integrity": "sha512-BKtRgvcJGeZ4XttiDiNcFiRlxoAeZOseqUvyYRUp/Vtd+9p1ULmeoSqGsDA+2ivdeDFpqrJvGvmI+StKfKl5hw==",
- "dependencies": {
- "chalk": "^4.1.0",
- "date-fns": "^2.29.1",
- "lodash": "^4.17.21",
- "rxjs": "^7.0.0",
- "shell-quote": "^1.7.3",
- "spawn-command": "^0.0.2-1",
- "supports-color": "^8.1.0",
- "tree-kill": "^1.2.2",
- "yargs": "^17.3.1"
- },
- "bin": {
- "conc": "dist/bin/concurrently.js",
- "concurrently": "dist/bin/concurrently.js"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
- }
- },
- "node_modules/concurrently/node_modules/supports-color": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
- "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/supports-color?sponsor=1"
- }
- },
"node_modules/config-master": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/config-master/-/config-master-3.1.0.tgz",
@@ -894,9 +765,9 @@
}
},
"node_modules/content-type": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
- "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
"engines": {
"node": ">= 0.6"
}
@@ -927,18 +798,6 @@
"node": ">= 8"
}
},
- "node_modules/date-fns": {
- "version": "2.29.2",
- "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.2.tgz",
- "integrity": "sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==",
- "engines": {
- "node": ">=0.11"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/date-fns"
- }
- },
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -1048,6 +907,7 @@
},
"node_modules/doctrine": {
"version": "3.0.0",
+ "dev": true,
"license": "Apache-2.0",
"dependencies": {
"esutils": "^2.0.2"
@@ -1069,11 +929,6 @@
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
},
- "node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
- },
"node_modules/encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -1091,14 +946,6 @@
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
- "node_modules/escalade": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
@@ -1278,6 +1125,7 @@
},
"node_modules/esutils": {
"version": "2.0.3",
+ "dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.10.0"
@@ -1540,6 +1388,7 @@
},
"node_modules/fs.realpath": {
"version": "1.0.0",
+ "dev": true,
"license": "ISC"
},
"node_modules/function-bind": {
@@ -1547,18 +1396,10 @@
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
- "node_modules/get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "engines": {
- "node": "6.* || 8.* || >= 10.*"
- }
- },
"node_modules/get-intrinsic": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
- "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
+ "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
"dependencies": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
@@ -1760,6 +1601,7 @@
},
"node_modules/inflight": {
"version": "1.0.6",
+ "dev": true,
"license": "ISC",
"dependencies": {
"once": "^1.3.0",
@@ -1797,14 +1639,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/is-glob": {
"version": "4.0.3",
"dev": true,
@@ -1848,6 +1682,7 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
"dependencies": {
"argparse": "^2.0.1"
},
@@ -2027,26 +1862,11 @@
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"dev": true
},
- "node_modules/lodash.get": {
- "version": "4.4.2",
- "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
- "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ=="
- },
- "node_modules/lodash.isequal": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
- "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="
- },
"node_modules/lodash.merge": {
"version": "4.6.2",
"dev": true,
"license": "MIT"
},
- "node_modules/lodash.mergewith": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz",
- "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ=="
- },
"node_modules/lodash.omit": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
@@ -2166,6 +1986,7 @@
},
"node_modules/minimatch": {
"version": "3.1.2",
+ "dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^1.1.7"
@@ -2209,45 +2030,6 @@
"node": "*"
}
},
- "node_modules/morgan": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz",
- "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==",
- "dependencies": {
- "basic-auth": "~2.0.1",
- "debug": "2.6.9",
- "depd": "~2.0.0",
- "on-finished": "~2.3.0",
- "on-headers": "~1.0.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/morgan/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/morgan/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
- },
- "node_modules/morgan/node_modules/on-finished": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
- "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/ms": {
"version": "2.1.2",
"dev": true,
@@ -2353,9 +2135,9 @@
"dev": true
},
"node_modules/object-inspect": {
- "version": "1.12.2",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
- "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
+ "version": "1.12.3",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
+ "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -2380,27 +2162,14 @@
"node": ">= 0.8"
}
},
- "node_modules/on-headers": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
- "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/once": {
"version": "1.4.0",
+ "dev": true,
"license": "ISC",
"dependencies": {
"wrappy": "1"
}
},
- "node_modules/openapi-types": {
- "version": "12.1.0",
- "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.0.tgz",
- "integrity": "sha512-XpeCy01X6L5EpP+6Hc3jWN7rMZJ+/k1lwki/kTmWzbVhdPie3jd5O2ZtedEx8Yp58icJ0osVldLMrTB/zslQXA==",
- "peer": true
- },
"node_modules/optionator": {
"version": "0.9.1",
"dev": true,
@@ -2478,6 +2247,7 @@
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
+ "dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -2751,14 +2521,6 @@
"url": "https://github.com/sponsors/mysticatea"
}
},
- "node_modules/require-directory": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/requizzle": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz",
@@ -2824,14 +2586,6 @@
"queue-microtask": "^1.2.2"
}
},
- "node_modules/rxjs": {
- "version": "7.5.6",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz",
- "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==",
- "dependencies": {
- "tslib": "^2.1.0"
- }
- },
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -2943,11 +2697,6 @@
"node": ">=8"
}
},
- "node_modules/shell-quote": {
- "version": "1.7.3",
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz",
- "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw=="
- },
"node_modules/side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
@@ -3022,11 +2771,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/spawn-command": {
- "version": "0.0.2-1",
- "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
- "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg=="
- },
"node_modules/statuses": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
@@ -3084,21 +2828,9 @@
"safe-buffer": "~5.2.0"
}
},
- "node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/strip-ansi": {
"version": "6.0.1",
+ "dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
@@ -3145,74 +2877,6 @@
"node": ">=8"
}
},
- "node_modules/swagger-jsdoc": {
- "version": "6.2.8",
- "resolved": "https://registry.npmjs.org/swagger-jsdoc/-/swagger-jsdoc-6.2.8.tgz",
- "integrity": "sha512-VPvil1+JRpmJ55CgAtn8DIcpBs0bL5L3q5bVQvF4tAW/k/9JYSj7dCpaYCAv5rufe0vcCbBRQXGvzpkWjvLklQ==",
- "dependencies": {
- "commander": "6.2.0",
- "doctrine": "3.0.0",
- "glob": "7.1.6",
- "lodash.mergewith": "^4.6.2",
- "swagger-parser": "^10.0.3",
- "yaml": "2.0.0-1"
- },
- "bin": {
- "swagger-jsdoc": "bin/swagger-jsdoc.js"
- },
- "engines": {
- "node": ">=12.0.0"
- }
- },
- "node_modules/swagger-jsdoc/node_modules/glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/swagger-parser": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-10.0.3.tgz",
- "integrity": "sha512-nF7oMeL4KypldrQhac8RyHerJeGPD1p2xDh900GPvc+Nk7nWP6jX2FcC7WmkinMoAmoO774+AFXcWsW8gMWEIg==",
- "dependencies": {
- "@apidevtools/swagger-parser": "10.0.3"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/swagger-ui-dist": {
- "version": "4.14.0",
- "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.14.0.tgz",
- "integrity": "sha512-TBzhheU15s+o54Cgk9qxuYcZMiqSm/SkvKnapoGHOF66kz0Y5aGjpzj5BT/vpBbn6rTPJ9tUYXQxuDWfsjiGMw=="
- },
- "node_modules/swagger-ui-express": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.6.0.tgz",
- "integrity": "sha512-ZxpQFp1JR2RF8Ar++CyJzEDdvufa08ujNUJgMVTMWPi86CuQeVdBtvaeO/ysrz6dJAYXf9kbVNhWD7JWocwqsA==",
- "dependencies": {
- "swagger-ui-dist": ">=4.11.0"
- },
- "engines": {
- "node": ">= v0.10.32"
- },
- "peerDependencies": {
- "express": ">=4.0.0"
- }
- },
"node_modules/table-layout": {
"version": "0.4.5",
"resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz",
@@ -3323,14 +2987,6 @@
"nodetouch": "bin/nodetouch.js"
}
},
- "node_modules/tree-kill": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
- "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
- "bin": {
- "tree-kill": "cli.js"
- }
- },
"node_modules/ts-mixer": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.2.tgz",
@@ -3413,9 +3069,9 @@
"dev": true
},
"node_modules/undici": {
- "version": "5.19.1",
- "resolved": "https://registry.npmjs.org/undici/-/undici-5.19.1.tgz",
- "integrity": "sha512-YiZ61LPIgY73E7syxCDxxa3LV2yl3sN8spnIuTct60boiiRaE1J8mNWHO8Im2Zi/sFrPusjLlmRPrsyraSqX6A==",
+ "version": "5.20.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz",
+ "integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==",
"dependencies": {
"busboy": "^1.6.0"
},
@@ -3453,14 +3109,6 @@
"node": ">= 0.4.0"
}
},
- "node_modules/validator": {
- "version": "13.7.0",
- "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz",
- "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==",
- "engines": {
- "node": ">= 0.10"
- }
- },
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -3528,24 +3176,9 @@
"node": ">=0.10.0"
}
},
- "node_modules/wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
"node_modules/wrappy": {
"version": "1.0.2",
+ "dev": true,
"license": "ISC"
},
"node_modules/ws": {
@@ -3574,47 +3207,6 @@
"integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==",
"dev": true
},
- "node_modules/y18n": {
- "version": "5.0.8",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/yaml": {
- "version": "2.0.0-1",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.0-1.tgz",
- "integrity": "sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ==",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/yargs": {
- "version": "17.5.1",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz",
- "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==",
- "dependencies": {
- "cliui": "^7.0.2",
- "escalade": "^3.1.1",
- "get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.3",
- "y18n": "^5.0.5",
- "yargs-parser": "^21.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/yargs-parser": {
- "version": "21.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
- "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
@@ -3626,68 +3218,9 @@
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
- },
- "node_modules/z-schema": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.4.tgz",
- "integrity": "sha512-gm/lx3hDzJNcLwseIeQVm1UcwhWIKpSB4NqH89pTBtFns4k/HDHudsICtvG05Bvw/Mv3jMyk700y5dadueLHdA==",
- "dependencies": {
- "lodash.get": "^4.4.2",
- "lodash.isequal": "^4.5.0",
- "validator": "^13.7.0"
- },
- "bin": {
- "z-schema": "bin/z-schema"
- },
- "engines": {
- "node": ">=8.0.0"
- },
- "optionalDependencies": {
- "commander": "^2.20.3"
- }
- },
- "node_modules/z-schema/node_modules/commander": {
- "version": "2.20.3",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
- "optional": true
}
},
"dependencies": {
- "@apidevtools/json-schema-ref-parser": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.0.tgz",
- "integrity": "sha512-teB30tFooE3iQs2HQIKJ02D8UZA1Xy1zaczzhUjJs0CymYxeC0g+y5rCY2p8NHBM6DBUVoR8rSM4kHLj1WE9mQ==",
- "requires": {
- "@jsdevtools/ono": "^7.1.3",
- "@types/json-schema": "^7.0.6",
- "call-me-maybe": "^1.0.1",
- "js-yaml": "^4.1.0"
- }
- },
- "@apidevtools/openapi-schemas": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz",
- "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ=="
- },
- "@apidevtools/swagger-methods": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz",
- "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg=="
- },
- "@apidevtools/swagger-parser": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz",
- "integrity": "sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g==",
- "requires": {
- "@apidevtools/json-schema-ref-parser": "^9.0.6",
- "@apidevtools/openapi-schemas": "^2.0.4",
- "@apidevtools/swagger-methods": "^3.0.2",
- "@jsdevtools/ono": "^7.1.3",
- "call-me-maybe": "^1.0.1",
- "z-schema": "^5.0.1"
- }
- },
"@babel/parser": {
"version": "7.18.11",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz",
@@ -3772,11 +3305,6 @@
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
"dev": true
},
- "@jsdevtools/ono": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz",
- "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg=="
- },
"@jsdoc/salty": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.1.tgz",
@@ -3843,11 +3371,6 @@
"resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
"integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="
},
- "@types/json-schema": {
- "version": "7.0.11",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
- "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
- },
"@types/linkify-it": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz",
@@ -3935,7 +3458,8 @@
}
},
"ansi-regex": {
- "version": "5.0.1"
+ "version": "5.0.1",
+ "dev": true
},
"ansi-styles": {
"version": "4.3.0",
@@ -3954,7 +3478,8 @@
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
},
"array-back": {
"version": "6.2.2",
@@ -3968,22 +3493,8 @@
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
},
"balanced-match": {
- "version": "1.0.2"
- },
- "basic-auth": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
- "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
- "requires": {
- "safe-buffer": "5.1.2"
- },
- "dependencies": {
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
- }
- }
+ "version": "1.0.2",
+ "dev": true
},
"binary-extensions": {
"version": "2.2.0",
@@ -4031,6 +3542,7 @@
},
"brace-expansion": {
"version": "1.1.11",
+ "dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -4084,11 +3596,6 @@
"get-intrinsic": "^1.0.2"
}
},
- "call-me-maybe": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz",
- "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ=="
- },
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -4134,16 +3641,6 @@
}
}
},
- "cliui": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
- "requires": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^7.0.0"
- }
- },
"collect-all": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.4.tgz",
@@ -4236,11 +3733,6 @@
}
}
},
- "commander": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz",
- "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q=="
- },
"common-sequence": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/common-sequence/-/common-sequence-2.0.2.tgz",
@@ -4251,33 +3743,8 @@
"version": "1.8.2"
},
"concat-map": {
- "version": "0.0.1"
- },
- "concurrently": {
- "version": "7.6.0",
- "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-7.6.0.tgz",
- "integrity": "sha512-BKtRgvcJGeZ4XttiDiNcFiRlxoAeZOseqUvyYRUp/Vtd+9p1ULmeoSqGsDA+2ivdeDFpqrJvGvmI+StKfKl5hw==",
- "requires": {
- "chalk": "^4.1.0",
- "date-fns": "^2.29.1",
- "lodash": "^4.17.21",
- "rxjs": "^7.0.0",
- "shell-quote": "^1.7.3",
- "spawn-command": "^0.0.2-1",
- "supports-color": "^8.1.0",
- "tree-kill": "^1.2.2",
- "yargs": "^17.3.1"
- },
- "dependencies": {
- "supports-color": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
- "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
- }
+ "version": "0.0.1",
+ "dev": true
},
"config-master": {
"version": "3.1.0",
@@ -4305,9 +3772,9 @@
}
},
"content-type": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
- "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="
},
"cookie": {
"version": "0.5.0",
@@ -4328,11 +3795,6 @@
"which": "^2.0.1"
}
},
- "date-fns": {
- "version": "2.29.2",
- "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.2.tgz",
- "integrity": "sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA=="
- },
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -4417,6 +3879,7 @@
},
"doctrine": {
"version": "3.0.0",
+ "dev": true,
"requires": {
"esutils": "^2.0.2"
}
@@ -4431,11 +3894,6 @@
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
},
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
- },
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -4447,11 +3905,6 @@
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==",
"dev": true
},
- "escalade": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
- },
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
@@ -4572,7 +4025,8 @@
"dev": true
},
"esutils": {
- "version": "2.0.3"
+ "version": "2.0.3",
+ "dev": true
},
"etag": {
"version": "1.8.1",
@@ -4781,22 +4235,18 @@
"dev": true
},
"fs.realpath": {
- "version": "1.0.0"
+ "version": "1.0.0",
+ "dev": true
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
- "get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
- },
"get-intrinsic": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
- "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
+ "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
@@ -4923,6 +4373,7 @@
},
"inflight": {
"version": "1.0.6",
+ "dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
@@ -4947,11 +4398,6 @@
"version": "2.1.1",
"dev": true
},
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
- },
"is-glob": {
"version": "4.0.3",
"dev": true,
@@ -4983,6 +4429,7 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
"requires": {
"argparse": "^2.0.1"
}
@@ -5129,25 +4576,10 @@
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"dev": true
},
- "lodash.get": {
- "version": "4.4.2",
- "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
- "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ=="
- },
- "lodash.isequal": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
- "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="
- },
"lodash.merge": {
"version": "4.6.2",
"dev": true
},
- "lodash.mergewith": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz",
- "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ=="
- },
"lodash.omit": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
@@ -5236,6 +4668,7 @@
},
"minimatch": {
"version": "3.1.2",
+ "dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -5263,41 +4696,6 @@
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
},
- "morgan": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz",
- "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==",
- "requires": {
- "basic-auth": "~2.0.1",
- "debug": "2.6.9",
- "depd": "~2.0.0",
- "on-finished": "~2.3.0",
- "on-headers": "~1.0.2"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
- },
- "on-finished": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
- "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
- "requires": {
- "ee-first": "1.1.1"
- }
- }
- }
- },
"ms": {
"version": "2.1.2",
"dev": true
@@ -5373,9 +4771,9 @@
"dev": true
},
"object-inspect": {
- "version": "1.12.2",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
- "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ=="
+ "version": "1.12.3",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
+ "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g=="
},
"object-to-spawn-args": {
"version": "2.0.1",
@@ -5391,23 +4789,13 @@
"ee-first": "1.1.1"
}
},
- "on-headers": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
- "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA=="
- },
"once": {
"version": "1.4.0",
+ "dev": true,
"requires": {
"wrappy": "1"
}
},
- "openapi-types": {
- "version": "12.1.0",
- "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.0.tgz",
- "integrity": "sha512-XpeCy01X6L5EpP+6Hc3jWN7rMZJ+/k1lwki/kTmWzbVhdPie3jd5O2ZtedEx8Yp58icJ0osVldLMrTB/zslQXA==",
- "peer": true
- },
"optionator": {
"version": "0.9.1",
"dev": true,
@@ -5459,7 +4847,8 @@
"dev": true
},
"path-is-absolute": {
- "version": "1.0.1"
+ "version": "1.0.1",
+ "dev": true
},
"path-key": {
"version": "3.1.1",
@@ -5633,11 +5022,6 @@
"version": "3.2.0",
"dev": true
},
- "require-directory": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="
- },
"requizzle": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz",
@@ -5675,14 +5059,6 @@
"queue-microtask": "^1.2.2"
}
},
- "rxjs": {
- "version": "7.5.6",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz",
- "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==",
- "requires": {
- "tslib": "^2.1.0"
- }
- },
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -5766,11 +5142,6 @@
"version": "3.0.0",
"dev": true
},
- "shell-quote": {
- "version": "1.7.3",
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz",
- "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw=="
- },
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
@@ -5828,11 +5199,6 @@
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
- "spawn-command": {
- "version": "0.0.2-1",
- "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
- "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg=="
- },
"statuses": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
@@ -5877,18 +5243,9 @@
"safe-buffer": "~5.2.0"
}
},
- "string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- }
- },
"strip-ansi": {
"version": "6.0.1",
+ "dev": true,
"requires": {
"ansi-regex": "^5.0.1"
}
@@ -5914,55 +5271,6 @@
"has-flag": "^4.0.0"
}
},
- "swagger-jsdoc": {
- "version": "6.2.8",
- "resolved": "https://registry.npmjs.org/swagger-jsdoc/-/swagger-jsdoc-6.2.8.tgz",
- "integrity": "sha512-VPvil1+JRpmJ55CgAtn8DIcpBs0bL5L3q5bVQvF4tAW/k/9JYSj7dCpaYCAv5rufe0vcCbBRQXGvzpkWjvLklQ==",
- "requires": {
- "commander": "6.2.0",
- "doctrine": "3.0.0",
- "glob": "7.1.6",
- "lodash.mergewith": "^4.6.2",
- "swagger-parser": "^10.0.3",
- "yaml": "2.0.0-1"
- },
- "dependencies": {
- "glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- }
- }
- },
- "swagger-parser": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-10.0.3.tgz",
- "integrity": "sha512-nF7oMeL4KypldrQhac8RyHerJeGPD1p2xDh900GPvc+Nk7nWP6jX2FcC7WmkinMoAmoO774+AFXcWsW8gMWEIg==",
- "requires": {
- "@apidevtools/swagger-parser": "10.0.3"
- }
- },
- "swagger-ui-dist": {
- "version": "4.14.0",
- "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.14.0.tgz",
- "integrity": "sha512-TBzhheU15s+o54Cgk9qxuYcZMiqSm/SkvKnapoGHOF66kz0Y5aGjpzj5BT/vpBbn6rTPJ9tUYXQxuDWfsjiGMw=="
- },
- "swagger-ui-express": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.6.0.tgz",
- "integrity": "sha512-ZxpQFp1JR2RF8Ar++CyJzEDdvufa08ujNUJgMVTMWPi86CuQeVdBtvaeO/ysrz6dJAYXf9kbVNhWD7JWocwqsA==",
- "requires": {
- "swagger-ui-dist": ">=4.11.0"
- }
- },
"table-layout": {
"version": "0.4.5",
"resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz",
@@ -6046,11 +5354,6 @@
"nopt": "~1.0.10"
}
},
- "tree-kill": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
- "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="
- },
"ts-mixer": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.2.tgz",
@@ -6113,9 +5416,9 @@
"dev": true
},
"undici": {
- "version": "5.19.1",
- "resolved": "https://registry.npmjs.org/undici/-/undici-5.19.1.tgz",
- "integrity": "sha512-YiZ61LPIgY73E7syxCDxxa3LV2yl3sN8spnIuTct60boiiRaE1J8mNWHO8Im2Zi/sFrPusjLlmRPrsyraSqX6A==",
+ "version": "5.20.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz",
+ "integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==",
"requires": {
"busboy": "^1.6.0"
}
@@ -6144,11 +5447,6 @@
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="
},
- "validator": {
- "version": "13.7.0",
- "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz",
- "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw=="
- },
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -6195,18 +5493,9 @@
}
}
},
- "wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "requires": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- }
- },
"wrappy": {
- "version": "1.0.2"
+ "version": "1.0.2",
+ "dev": true
},
"ws": {
"version": "8.11.0",
@@ -6220,59 +5509,11 @@
"integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==",
"dev": true
},
- "y18n": {
- "version": "5.0.8",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
- },
- "yaml": {
- "version": "2.0.0-1",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.0.0-1.tgz",
- "integrity": "sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ=="
- },
- "yargs": {
- "version": "17.5.1",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz",
- "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==",
- "requires": {
- "cliui": "^7.0.2",
- "escalade": "^3.1.1",
- "get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.3",
- "y18n": "^5.0.5",
- "yargs-parser": "^21.0.0"
- }
- },
- "yargs-parser": {
- "version": "21.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
- "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="
- },
"yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
"dev": true
- },
- "z-schema": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.4.tgz",
- "integrity": "sha512-gm/lx3hDzJNcLwseIeQVm1UcwhWIKpSB4NqH89pTBtFns4k/HDHudsICtvG05Bvw/Mv3jMyk700y5dadueLHdA==",
- "requires": {
- "commander": "^2.20.3",
- "lodash.get": "^4.4.2",
- "lodash.isequal": "^4.5.0",
- "validator": "^13.7.0"
- },
- "dependencies": {
- "commander": {
- "version": "2.20.3",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
- "optional": true
- }
- }
}
}
}
diff --git a/package.json b/package.json
index 83f0ea8..e0bd5fc 100644
--- a/package.json
+++ b/package.json
@@ -4,12 +4,8 @@
"version": "2.0.0",
"main": "src/index.js",
"scripts": {
- "start": "concurrently \"npm run client\" \"npm run server\"",
- "start:dev": "concurrently \"npm run client:dev\" \"npm run server:dev\"",
- "client": "node .",
- "client:dev": "nodemon run node --trace-warnings .",
- "server": "node backend/server",
- "server:dev": "nodemon --trace-warnings backend/server",
+ "start": "node .",
+ "start:dev": "nodemon run node --trace-warnings .",
"test": "echo \"Error: no test specified\" && exit 1",
"docker:build": "docker build --tag discord-bot-template .",
"docker:start": "docker run -v $(pwd):/app -v /app/node_modules -p 3000:3000 --env-file ./.env -d --name discord-bot-template discord-bot-template",
@@ -32,15 +28,10 @@
"dependencies": {
"@discordjs/rest": "^1.5.0",
"@mirasaki/logger": "^1.0.5",
- "body-parser": "^1.20.0",
"common-tags": "^1.8.2",
- "concurrently": "^7.6.0",
"discord.js": "^14.7.1",
"dotenv": "^16.0.3",
- "express": "^4.18.2",
- "morgan": "^1.10.0",
- "swagger-jsdoc": "^6.2.8",
- "swagger-ui-express": "^4.6.0"
+ "express": "^4.18.2"
},
"devDependencies": {
"docdash": "^2.0.1",
diff --git a/public/css/.gitkeep b/public/css/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/public/html/.gitkeep b/public/html/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/public/js/.gitkeep b/public/js/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/src/handlers/html.js b/src/handlers/html.js
deleted file mode 100644
index 698d00c..0000000
--- a/src/handlers/html.js
+++ /dev/null
@@ -1,220 +0,0 @@
-/*** @module HTML */
-
-const fs = require('fs');
-const { getPermLevelName } = require('./permissions');
-const { titleCase } = require('../util');
-
-/*** JSDoc: IGNORED */
-
-/*** Defining our array of properties that should be ignored
- * @member {Array} ignoredCommandProperties Array of ignored properties belonging to our @see {CommandBase} classes
- */
-const ignoredCommandProperties = [
- 'run',
- 'validateConfig',
- 'filePath',
- 'setPermLevel',
- 'setFilePathDetails',
- 'load',
- 'unload',
- 'reload',
- 'data',
- 'category',
- 'enabled',
- 'global',
- 'loadAliases',
- 'isAlias',
- 'aliasFor'
-];
-
-// Defining our styles
-const styles = ``;
-
-// How the property name should be displayed to the user
-const formatPropertyKey = (key) => {
- switch (key) {
- case 'permLevel': return 'Permission Level';
- case 'clientPerms': return 'BotPermissions';
- case 'userPerms': return 'UserPermissions';
- case 'nsfw': return 'NSFW';
- default: return titleCase(key);
- }
-};
-
-// How the properties value should be displayed to the user
-const getValueOutput = (key, value) => {
- switch (key) {
- // Booleans
- case 'nsfw':
- case 'global': return value === true ? '✅' : '🚫';
-
- // Cooldown
- case 'cooldown': return `
- Uses: ${ value.usages }
-
Duration: ${ value.duration } seconds
- Type: ${ value.type }
- `;
-
- // PermLevel
- case 'permLevel': return getPermLevelName(value);
-
- // Permission Arrays
- case 'userPerms':
- case 'clientPerms': {
- return value.join('');
- }
- default: return value;
- }
-};
-
-const baseHTMLStart = `
-
-
-
-
-
-
- Commands
-
- ${ styles }
-
-
-
-
-
-
-
-`;
-
-const baseHTMLEnd = `
-
-
-
-
-
-`;
-
-const generateCommandHTML = (commands) => {
- // Initial html
- let html = baseHTMLStart;
-
- // Adding command name as the first table head column
- html += 'Name | ';
- html += 'Description | ';
-
- // Building our table head
- for (const key in commands.first()) {
- // Continue if we don't want to display this property
- if (ignoredCommandProperties.includes(key)) continue;
- html += '' + formatPropertyKey(key) + ' | ';
- }
-
- // Closing the first row and opening the table body tag
- html += '';
-
- // Looping over our command collection
- let currCat = undefined;
-
- commands.forEach((cmd) => {
- // Skip if the command is not enabled
- if (!cmd.enabled || cmd.isAlias) return;
-
- // Adding an empty line after category change,
- // Ignore first category so we don't start with an empty line
- if (
- cmd.category !== currCat
- && cmd.category !== commands.first().category
- ) {
- html += `
- ${ ' | '.repeat(9) }
-
`;
- }
- currCat = cmd.category;
-
- // Adding a table row containing the command property values
- html += '';
-
- // Adding the name first, and description afterwards
- html += `${ cmd.data.name } | `;
- html += `${ cmd.data.description } | `;
-
- // Looping over additional properties
- for (const [ key, value ] of Object.entries(cmd)) {
- // Continue if we don't want to display this property
- if (ignoredCommandProperties.includes(key)) continue;
- html += `${ getValueOutput(key, value) } | `;
- }
-
- html += '
';
- });
-
- // Closing our open tags
- html += baseHTMLEnd;
-
- // Saving the file
- fs.writeFileSync('public/html/commands.html', html);
-};
-
-module.exports = { generateCommandHTML };
diff --git a/src/index.js b/src/index.js
index 6f9130f..f0a16d0 100644
--- a/src/index.js
+++ b/src/index.js
@@ -15,7 +15,6 @@ const {
} = require('./util');
const path = require('path');
const clientExtensions = require('./client');
-const { generateCommandHTML } = require('./handlers/html');
// Clear the console in non-production modes & print vanity
process.env.NODE_ENV !== 'production' && console.clear();
@@ -46,6 +45,7 @@ const {
DISCORD_BOT_TOKEN,
DEBUG_ENABLED,
CLEAR_SLASH_COMMAND_API_DATA,
+ USE_API,
// Project directory structure
CHAT_INPUT_COMMAND_DIR,
@@ -237,11 +237,6 @@ refreshSlashCommandData(client);
// Registering our listeners
registerListeners();
-// All our command and listeners are active
-// We can now re-generate and overwrite
-// our `html/commands.html` file
-generateCommandHTML(commands);
-
/**
* Finished initializing
* Performance logging and logging in to our client
@@ -250,5 +245,8 @@ generateCommandHTML(commands);
// Execution time logging
logger.success(`Finished initializing after ${ getRuntime(initTimerStart).ms } ms`);
+// Require our server index file if requested
+if (USE_API) require('./server/');
+
// Logging in to our client
client.login(DISCORD_BOT_TOKEN);
diff --git a/backend/routes/commandRoutes.js b/src/server/commands.routes.js
similarity index 99%
rename from backend/routes/commandRoutes.js
rename to src/server/commands.routes.js
index e881f41..b9f17c3 100644
--- a/backend/routes/commandRoutes.js
+++ b/src/server/commands.routes.js
@@ -1,6 +1,6 @@
const { Collection } = require('discord.js');
const express = require('express');
-const { getFiles } = require('../util/files');
+const { getFiles } = require('../util');
const router = express.Router();
// Destructuring from env
diff --git a/src/server/index.js b/src/server/index.js
new file mode 100644
index 0000000..86aa05c
--- /dev/null
+++ b/src/server/index.js
@@ -0,0 +1,46 @@
+// Require our shared environmental file as early as possible
+require('dotenv').config();
+
+// Importing from packages
+const chalk = require('chalk');
+const logger = require('@mirasaki/logger');
+let express;
+
+// Try to import express
+try {
+ express = require('express');
+}
+catch (err) {
+ logger.syserr('You have enabled "USE_API" in the .env file, but missing the "express" dependency, to address this - run the "npm install express" command. This is done to minimize dependencies as most users don\'t require the command API');
+ process.exit(1);
+}
+
+// Importing our routes
+const commandRoutes = require('./commands.routes');
+
+// Destructure from our environmental file
+// Set our default port to 3000 if it's missing from environmental file
+const { NODE_ENV, PORT = 3000 } = process.env;
+
+/***
+ * Initialize our express app
+ */
+const app = express();
+
+// Routes Middleware
+app.use('/api/commands', commandRoutes);
+
+// Serving our generated client documentation as root
+app.use(
+ '/',
+ express.static('docs', { extensions: [ 'html' ] })
+);
+
+// Serving our static public files
+app.use(express.static('public'));
+
+// Actively listen for requests to our API/backend
+app.listen(
+ PORT,
+ logger.success(chalk.yellow.bold(`API running in ${ NODE_ENV }-mode on port ${ PORT }`))
+);
diff --git a/tutorials/adding-commands.md b/tutorials/adding-commands.md
index 8252dba..65c2cf5 100644
--- a/tutorials/adding-commands.md
+++ b/tutorials/adding-commands.md
@@ -32,7 +32,7 @@ The **only** thing we will have to provide, is the `run` parameter, which is the
```javascript
module.exports = new ChatInputCommand({
- run: async ({ client, interaction }) => {
+ run: async (client, interaction) => {
// Code to run when the command is invoked.
}
});
@@ -43,7 +43,7 @@ When you're done developing your command, you should make it available to every
```javascript
module.exports = new ChatInputCommand({
global: true,
- run: async ({ client, interaction }) => {
+ run: async (client, interaction) => {
// Code to run when the command is invoked.
}
});
@@ -59,7 +59,7 @@ module.exports = new ChatInputCommand({
usages: 2, // Command can be used twice
duration: 10 // in 10 seconds
},
- run: async ({ client, interaction }) => {
+ run: async (client, interaction) => {
// Code to run when the command is invoked.
}
});