├── .env.example ├── .eslintrc.json ├── .github └── dependabot.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── app.yml ├── jest.config.js ├── next-env.d.ts ├── package.json ├── src ├── bot │ └── index.ts └── pages │ ├── api │ └── webhooks.ts │ └── index.tsx ├── test ├── app.test.ts └── fixtures │ ├── issues.opened.json │ └── mock-cert.pem ├── tsconfig.json ├── vercel.json └── yarn.lock /.env.example: -------------------------------------------------------------------------------- 1 | # GitHub App Details 2 | APP_ID= 3 | GITHUB_CLIENT_ID= 4 | GITHUB_CLIENT_SECRET= 5 | 6 | # Use `trace` to get verbose logging or `info` to show less 7 | LOG_LEVEL=debug 8 | 9 | # Go to https://smee.io/new set this to the URL that you are redirected to. 10 | WEBHOOK_PROXY_URL= 11 | WEBHOOK_SECRET=development 12 | 13 | # Private key for the GitHub App 14 | PRIVATE_KEY= 15 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: 'npm' 4 | directory: '/' 5 | schedule: 6 | interval: 'monthly' 7 | commit-message: 8 | prefix: 'chore' 9 | prefix-development: 'chore' 10 | include: 'scope' 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | *.pem 4 | !mock-cert.pem 5 | .env 6 | coverage 7 | build 8 | .next 9 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | education, socio-economic status, nationality, personal appearance, race, 10 | religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | - Using welcoming and inclusive language 18 | - Being respectful of differing viewpoints and experiences 19 | - Gracefully accepting constructive criticism 20 | - Focusing on what is best for the community 21 | - Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | - The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | - Trolling, insulting/derogatory comments, and personal or political attacks 28 | - Public or private harassment 29 | - Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | - Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at maximousblk@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | [fork]: /fork 4 | [pr]: /compare 5 | [code-of-conduct]: CODE_OF_CONDUCT.md 6 | 7 | Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. 8 | 9 | Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. 10 | 11 | ## Issues and PRs 12 | 13 | If you have suggestions for how this project could be improved, or want to report a bug, open an issue! We'd love all and any contributions. If you have questions, too, we'd love to hear them. 14 | 15 | We'd also love PRs. If you're thinking of a large PR, we advise opening up an issue first to talk about it, though! Look at the links below if you're not sure how to open a PR. 16 | 17 | ## Submitting a pull request 18 | 19 | 1. [Fork][fork] and clone the repository. 20 | 1. Configure and install the dependencies: `npm install`. 21 | 1. Make sure the tests pass on your machine: `npm test`, note: these tests also apply the linter, so there's no need to lint separately. 22 | 1. Create a new branch: `git checkout -b my-branch-name`. 23 | 1. Make your change, add tests, and make sure the tests still pass. 24 | 1. Push to your fork and [submit a pull request][pr]. 25 | 1. Pat your self on the back and wait for your pull request to be reviewed and merged. 26 | 27 | Here are a few things you can do that will increase the likelihood of your pull request being accepted: 28 | 29 | - Write and update tests. 30 | - Keep your changes as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. 31 | - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 32 | 33 | Work in Progress pull requests are also welcome to get feedback early on, or if there is something blocked you. 34 | 35 | ## Resources 36 | 37 | - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) 38 | - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) 39 | - [GitHub Help](https://help.github.com) 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Maximous Black 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # probot-nextjs-starter 2 | 3 | Starter template to build GitHub Apps with with [Probot](https://github.com/probot/probot) and [NextJS](https://nextjs.org/). 4 | 5 | ## Features 6 | 7 | - Typescript 8 | - NextJS 9 | - Serverless 10 | - Deploy to Vercel 11 | 12 | ## Getting Started 13 | 14 | #### Use the template 15 | 16 | ```sh 17 | gh repo create --template maximousblk/probot-nextjs-starter # use the generate button 18 | cd 19 | ``` 20 | 21 | #### Install dependencies 22 | ```sh 23 | yarn install 24 | ``` 25 | 26 | #### Build the app 27 | ```sh 28 | yarn bot:build 29 | ``` 30 | 31 | #### Start the app 32 | ```sh 33 | yarn bot:build 34 | ``` 35 | 36 | ## Contributing 37 | 38 | If you have suggestions for how probot-nextjs-starter could be improved, or want to report a bug, open an issue! We'd love all and any contributions. 39 | 40 | For more, check out the [Contributing Guide](CONTRIBUTING.md). 41 | 42 | ## License 43 | 44 | [The MIT License](LICENSE) © 2021 Maximous Black 45 | -------------------------------------------------------------------------------- /app.yml: -------------------------------------------------------------------------------- 1 | # This is a GitHub App Manifest. These settings will be used by default when 2 | # initially configuring your GitHub App. 3 | # 4 | # NOTE: changing this file will not update your GitHub App settings. 5 | # You must visit github.com/settings/apps/your-app-name to edit them. 6 | # 7 | # Read more about configuring your GitHub App: 8 | # https://probot.github.io/docs/development/#configuring-a-github-app 9 | # 10 | # Read more about GitHub App Manifests: 11 | # https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/ 12 | 13 | # The list of events the GitHub App subscribes to. 14 | # Uncomment the event names below to enable them. 15 | default_events: 16 | - issues 17 | 18 | # The set of permissions needed by the GitHub App. The format of the object uses 19 | # the permission name for the key (for example, issues) and the access type for 20 | # the value (for example, write). 21 | # Valid values are `read`, `write`, and `none` 22 | default_permissions: 23 | # Issues and related comments, assignees, labels, and milestones. 24 | # https://developer.github.com/v3/apps/permissions/#permission-on-issues 25 | issues: write 26 | 27 | # Search repositories, list collaborators, and access repository metadata. 28 | # https://developer.github.com/v3/apps/permissions/#metadata-permissions 29 | metadata: read 30 | 31 | # The name of the GitHub App. Defaults to the name specified in package.json 32 | name: probot-nextjs-starter 33 | 34 | # The homepage of your GitHub App. 35 | url: https://probot-nextjs-starter.vercel.app/ 36 | 37 | # A description of the GitHub App. 38 | description: A GitHub App built with [Probot](https://github.com/probot/probot) and [NextJS](https://nextjs.org/). 39 | 40 | # Set to true when your GitHub App is available to the public or false when it is only accessible to the owner of the app. Default: true 41 | public: false 42 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | roots: ["/src/", "/test/"], 3 | transform: { 4 | "^.+\\.tsx?$": "ts-jest", 5 | }, 6 | testRegex: "(/__tests__/.*|\\.(test|spec))\\.[tj]sx?$", 7 | moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], 8 | testEnvironment: "node", 9 | }; 10 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | 5 | // NOTE: This file should not be edited 6 | // see https://nextjs.org/docs/basic-features/typescript for more information. 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "probot-nextjs-starter", 3 | "version": "1.0.0", 4 | "private": true, 5 | "description": "A Probot app using NextJS", 6 | "author": "Maximous Black ", 7 | "license": "MIT", 8 | "homepage": "https://github.com/maximousblk/probot-nextjs-starter", 9 | "scripts": { 10 | "dev": "next dev", 11 | "build": "next build", 12 | "start": "next start", 13 | "lint": "next lint", 14 | "bot:build": "tsc ./src/bot/index.ts --noEmit false --esModuleInterop --outDir ./build", 15 | "bot:start": "probot run ./build/index.js", 16 | "test": "jest" 17 | }, 18 | "dependencies": { 19 | "next": "^13.2.3", 20 | "probot": "^12.3.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0" 23 | }, 24 | "devDependencies": { 25 | "@types/jest": "^27.4.1", 26 | "@types/node": "^18.14.2", 27 | "@types/react": "^18.0.28", 28 | "eslint": "8.31.0", 29 | "eslint-config-next": "13.2.3", 30 | "jest": "^27.5.1", 31 | "nock": "^13.3.0", 32 | "smee-client": "^1.2.3", 33 | "ts-jest": "^27.1.4", 34 | "typescript": "^4.9.5" 35 | }, 36 | "engines": { 37 | "node": ">= 14" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/bot/index.ts: -------------------------------------------------------------------------------- 1 | import { Probot } from 'probot'; 2 | 3 | function bot(app: Probot) { 4 | app.on('issues.opened', async (context) => { 5 | const issueComment = context.issue({ 6 | body: 'Thanks for opening this issue!', 7 | }); 8 | await context.octokit.issues.createComment(issueComment); 9 | }); 10 | // For more information on building apps: 11 | // https://probot.github.io/docs/ 12 | 13 | // To get your app running against GitHub, see: 14 | // https://probot.github.io/docs/development/ 15 | } 16 | 17 | export default bot; 18 | -------------------------------------------------------------------------------- /src/pages/api/webhooks.ts: -------------------------------------------------------------------------------- 1 | import { createNodeMiddleware, createProbot } from 'probot'; 2 | import app from '@/bot'; 3 | 4 | export default createNodeMiddleware(app, { probot: createProbot(), webhooksPath: '/api/webhooks' }); 5 | -------------------------------------------------------------------------------- /src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | function HomePage() { 2 | return <>Welcome to probot-nextjs-starter!; 3 | } 4 | 5 | export default HomePage; 6 | -------------------------------------------------------------------------------- /test/app.test.ts: -------------------------------------------------------------------------------- 1 | import nock from "nock"; 2 | 3 | // Requiring our app implementation 4 | import app from "@/bot"; 5 | import { Probot, ProbotOctokit } from "probot"; 6 | 7 | // Requiring our fixtures 8 | import payload from "./fixtures/issues.opened.json"; 9 | const issueCreatedBody = { body: "Thanks for opening this issue!" }; 10 | import fs from "fs"; 11 | import path from "path"; 12 | 13 | const privateKey = fs.readFileSync( 14 | path.join(__dirname, "fixtures/mock-cert.pem"), 15 | "utf-8" 16 | ); 17 | 18 | describe("My Probot app", () => { 19 | let probot: any; 20 | 21 | beforeEach(() => { 22 | nock.disableNetConnect(); 23 | probot = new Probot({ 24 | appId: 123, 25 | privateKey, 26 | // disable request throttling and retries for testing 27 | Octokit: ProbotOctokit.defaults({ 28 | retry: { enabled: false }, 29 | throttle: { enabled: false }, 30 | }), 31 | }); 32 | // Load our app into probot 33 | probot.load(app); 34 | }); 35 | 36 | test("creates a comment when an issue is opened", async (done) => { 37 | const mock = nock("https://api.github.com") 38 | // Test that we correctly return a test token 39 | .post("/app/installations/2/access_tokens") 40 | .reply(200, { 41 | token: "test", 42 | permissions: { 43 | issues: "write", 44 | }, 45 | }) 46 | 47 | // Test that a comment is posted 48 | .post("/repos/hiimbex/testing-things/issues/1/comments", (body: any) => { 49 | done(expect(body).toMatchObject(issueCreatedBody)); 50 | return true; 51 | }) 52 | .reply(200); 53 | 54 | // Receive a webhook event 55 | await probot.receive({ name: "issues", payload }); 56 | 57 | expect(mock.pendingMocks()).toStrictEqual([]); 58 | }); 59 | 60 | afterEach(() => { 61 | nock.cleanAll(); 62 | nock.enableNetConnect(); 63 | }); 64 | }); 65 | 66 | // For more information about testing with Jest see: 67 | // https://facebook.github.io/jest/ 68 | 69 | // For more information about using TypeScript in your tests, Jest recommends: 70 | // https://github.com/kulshekhar/ts-jest 71 | 72 | // For more information about testing with Nock see: 73 | // https://github.com/nock/nock 74 | -------------------------------------------------------------------------------- /test/fixtures/issues.opened.json: -------------------------------------------------------------------------------- 1 | { 2 | "action": "opened", 3 | "issue": { 4 | "number": 1, 5 | "user": { 6 | "login": "hiimbex" 7 | } 8 | }, 9 | "repository": { 10 | "name": "testing-things", 11 | "owner": { 12 | "login": "hiimbex" 13 | } 14 | }, 15 | "installation": { 16 | "id": 2 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/fixtures/mock-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEAli7V49NdZe+XYC1pLaHM0te8kiDmZBJ1u2HJHN8GdbROB6NO 3 | VpC3xK7NxQn6xpvZ9ux20NvcDvGle+DOptZztBH+np6h2jZQ1/kD1yG1eQvVH4th 4 | /9oqHuIjmIfO8lIe4Hyd5Fw5xHkGqVETTGR+0c7kdZIlHmkOregUGtMYZRUi4YG+ 5 | q0w+uFemiHpGKXbeCIAvkq7aIkisEzvPWfSyYdA6WJHpxFk7tD7D8VkzABLVRHCq 6 | AuyqPG39BhGZcGLXx5rGK56kDBJkyTR1t3DkHpwX+JKNG5UYNwOG4LcQj1fteeta 7 | TdkYUMjIyWbanlMYyC+dq7B5fe7el99jXQ1gXwIDAQABAoIBADKfiPOpzKLOtzzx 8 | MbHzB0LO+75aHq7+1faayJrVxqyoYWELuB1P3NIMhknzyjdmU3t7S7WtVqkm5Twz 9 | lBUC1q+NHUHEgRQ4GNokExpSP4SU63sdlaQTmv0cBxmkNarS6ZuMBgDy4XoLvaYX 10 | MSUf/uukDLhg0ehFS3BteVFtdJyllhDdTenF1Nb1rAeN4egt8XLsE5NQDr1szFEG 11 | xH5lb+8EDtzgsGpeIddWR64xP0lDIKSZWst/toYKWiwjaY9uZCfAhvYQ1RsO7L/t 12 | sERmpYgh+rAZUh/Lr98EI8BPSPhzFcSHmtqzzejvC5zrZPHcUimz0CGA3YBiLoJX 13 | V1OrxmECgYEAxkd8gpmVP+LEWB3lqpSvJaXcGkbzcDb9m0OPzHUAJDZtiIIf0UmO 14 | nvL68/mzbCHSj+yFjZeG1rsrAVrOzrfDCuXjAv+JkEtEx0DIevU1u60lGnevOeky 15 | r8Be7pmymFB9/gzQAd5ezIlTv/COgoO986a3h1yfhzrrzbqSiivw308CgYEAwecI 16 | aZZwqH3GifR+0+Z1B48cezA5tC8LZt5yObGzUfxKTWy30d7lxe9N59t0KUVt/QL5 17 | qVkd7mqGzsUMyxUN2U2HVnFTWfUFMhkn/OnCnayhILs8UlCTD2Xxoy1KbQH/9FIr 18 | xf0pbMNJLXeGfyRt/8H+BzSZKBw9opJBWE4gqfECgYBp9FdvvryHuBkt8UQCRJPX 19 | rWsRy6pY47nf11mnazpZH5Cmqspv3zvMapF6AIxFk0leyYiQolFWvAv+HFV5F6+t 20 | Si1mM8GCDwbA5zh6pEBDewHhw+UqMBh63HSeUhmi1RiOwrAA36CO8i+D2Pt+eQHv 21 | ir52IiPJcs4BUNrv5Q1BdwKBgBHgVNw3LGe8QMOTMOYkRwHNZdjNl2RPOgPf2jQL 22 | d/bFBayhq0jD/fcDmvEXQFxVtFAxKAc+2g2S8J67d/R5Gm/AQAvuIrsWZcY6n38n 23 | pfOXaLt1x5fnKcevpFlg4Y2vM4O416RHNLx8PJDehh3Oo/2CSwMrDDuwbtZAGZok 24 | icphAoGBAI74Tisfn+aeCZMrO8KxaWS5r2CD1KVzddEMRKlJvSKTY+dOCtJ+XKj1 25 | OsZdcDvDC5GtgcywHsYeOWHldgDWY1S8Z/PUo4eK9qBXYBXp3JEZQ1dqzFdz+Txi 26 | rBn2WsFLsxV9j2/ugm0PqWVBcU2bPUCwvaRu3SOms2teaLwGCkhr 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | // "incremental": true /* Enable incremental compilation */, 5 | "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, 6 | "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, 7 | "lib": ["es2015", "es2017"] /* Specify library files to be included in the compilation. */, 8 | "allowJs": true /* Allow javascript files to be compiled. */, 9 | "checkJs": true /* Report errors in .js files. */, 10 | "jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, 11 | // "declaration": true /* Generates corresponding '.d.ts' file. */, 12 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 13 | // "sourceMap": true /* Generates corresponding '.map' file. */, 14 | // "outFile": "./", /* Concatenate and emit output to single file. */ 15 | "outDir": "./build" /* Redirect output structure to the directory. */, 16 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 17 | // "composite": true, /* Enable project compilation */ 18 | // "tsBuildInfoFile": "./" /* Specify file to store incremental compilation information */, 19 | "removeComments": true /* Do not emit comments to output. */, 20 | "noEmit": true /* Do not emit outputs. */, 21 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 22 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 23 | "isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */, 24 | 25 | /* Strict Type-Checking Options */ 26 | "strict": true /* Enable all strict type-checking options. */, 27 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 28 | // "strictNullChecks": true, /* Enable strict null checks. */ 29 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 30 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 31 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 32 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 33 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 34 | 35 | /* Additional Checks */ 36 | "noUnusedLocals": true /* Report errors on unused locals. */, 37 | "noUnusedParameters": true /* Report errors on unused parameters. */, 38 | "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, 39 | "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, 40 | 41 | /* Module Resolution Options */ 42 | "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, 43 | "baseUrl": "src" /* Base directory to resolve non-absolute module names. */, 44 | "paths": { 45 | /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 46 | "@/bot": ["bot"], 47 | "@/utils": ["utils"] 48 | }, 49 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 50 | // "typeRoots": [], /* List of folders to include type definitions from. */ 51 | // "types": [], /* Type declaration files to be included in compilation. */ 52 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 53 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, 54 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 55 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 56 | 57 | /* Source Map Options */ 58 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 59 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 60 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 61 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 62 | 63 | /* Experimental Options */ 64 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 65 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 66 | 67 | /* Advanced Options */ 68 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, 69 | "resolveJsonModule": true, 70 | "pretty": false, 71 | "skipLibCheck": true 72 | }, 73 | "include": ["src/", "test/"], 74 | "exclude": ["node_modules"], 75 | "compileOnSave": false 76 | } 77 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "github": { "silent": true } 3 | } 4 | --------------------------------------------------------------------------------