3.0.0-Cake #5

Merged
migan merged 33 commits from release/3.0.0 into main 2024-08-14 14:16:30 +00:00
91 changed files with 2018 additions and 19 deletions
Showing only changes of commit 3b7aff314e - Show all commits

1065
.pnp.cjs generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
{ {
"recommendations": [ "recommendations": [
"arcanis.vscode-zipfs", "arcanis.vscode-zipfs",
"esbenp.prettier-vscode" "esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
] ]
} }

View file

@ -5,5 +5,6 @@
}, },
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs", "prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.tsdk": ".yarn/sdks/typescript/lib", "typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true "typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks"
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

27
.yarn/sdks/eslint/bin/eslint.js vendored Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}
// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);

27
.yarn/sdks/eslint/lib/api.js vendored Normal file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}
// Defer to the real eslint your application uses
module.exports = absRequire(`eslint`);

View file

@ -0,0 +1,27 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}
// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);

14
.yarn/sdks/eslint/package.json vendored Normal file
View file

@ -0,0 +1,14 @@
{
"name": "eslint",
"version": "9.5.0-sdk",
"main": "./lib/api.js",
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
}

60
eslint.config.mjs Normal file
View file

@ -0,0 +1,60 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import prettier from 'eslint-plugin-prettier'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})
export default [
{
ignores: [
'**/.yarn/',
'**/.pnp.*',
'**/dist/',
'**/.vscode/',
'**/.idea/',
'**/tsup.config.ts',
],
},
...compat.extends('plugin:@typescript-eslint/recommended', 'prettier'),
{
plugins: {
'@typescript-eslint': typescriptEslint,
prettier,
},
languageOptions: {
globals: {
...globals.node,
},
parser: tsParser,
ecmaVersion: 2022,
sourceType: 'commonjs',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.js'],
},
'import/resolver': {
typescript: './tsconfig.json',
},
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
]

View file

@ -16,10 +16,18 @@
"ws": "^8.17.1" "ws": "^8.17.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.5.0",
"@migan/prettier-config": "^1.0.0", "@migan/prettier-config": "^1.0.0",
"@types/node": "^20.14.8", "@types/node": "^20.14.8",
"@types/ws": "^8", "@types/ws": "^8",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^9.5.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"globals": "^15.6.0",
"prettier": "^3.3.2", "prettier": "^3.3.2",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"tsup": "^8.1.0", "tsup": "^8.1.0",

View file

@ -1,6 +1,6 @@
import { LearnTable, NSFWContentTable, StatementTable } from './model' import { LearnTable, NSFWContentTable, StatementTable } from './model'
import { createPool, type QueryResult } from 'mysql2/promise'
import { container } from '@sapphire/framework' import { container } from '@sapphire/framework'
import { createPool } from 'mysql2/promise'
export class MaaDatabase { export class MaaDatabase {
public readonly database = createPool({ public readonly database = createPool({

801
yarn.lock

File diff suppressed because it is too large Load diff