https://github.com/js13kgames/bot
js13kGames automatic submission validation
https://github.com/js13kgames/bot
github-app js13kgames
Last synced: 8 months ago
JSON representation
js13kGames automatic submission validation
- Host: GitHub
- URL: https://github.com/js13kgames/bot
- Owner: js13kGames
- License: mit
- Created: 2019-07-23T09:53:22.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-05T11:36:54.000Z (almost 3 years ago)
- Last Synced: 2025-01-29T16:37:41.632Z (over 1 year ago)
- Topics: github-app, js13kgames
- Language: TypeScript
- Homepage: https://js13kgames.github.io/bot/demo-xhr.html
- Size: 822 KB
- Stars: 9
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# js13kGames bot
[](https://github.com/prettier/prettier) [](https://github.com/microsoft/TypeScript) [](https://github.com/js13kGames/bot/actions/workflows/main.yml)
> js13kGames automatic submission validation
Exposes an endpoint to run checks on a bundle.zip
- valid size
- valid zip file
- contains index.html
- runs without errors
- runs without requesting external resources
- runs without display a blank screen at launch
## Table of Content
- [Usage](#Usage)
- [Endpoint](#Endpoint)
- [Result](#Result)
- [Demo](#Demo)
- [xhr](https://js13kgames.github.io/bot/demo-xhr.html)
- [pure html](https://js13kgames.github.io/bot/demo-pure-html.html)
- [Third party](#Third-party)
- [License](#License)
## Usage
### Endpoint
```sh
curl -X POST \
# upload your bundle.zip
--form bundle=@bundle.zip \
# set the rules for the desktop + mobile categories
--form category=desktop \
--form category=mobile \
# temporary dev endpoint
https://wdbnnia6lj.execute-api.eu-west-1.amazonaws.com/stage/analyze-bundle
```
### Result
```typescript
type Res = {
// list of checks runs
checks: {
id: string;
// description of what is expected for this check to succeed
description: string;
// result of the check
result: "ok" | "failed" | "untested";
// if failed, some details / hint on how to fix
details?: string;
}[];
// url to the deployed game, or null if it did not get that far
deployUrl?: string;
// list of categories found in the request
categories: (
| "desktop"
| "mobile"
| "webxr"
| "server"
| "webmonetization"
| "decentralized"
| "unfinished"
)[];
// rules applying to this combinaison of categories
// or null if no rule could be applied
rules: Rules | null;
};
```
### Demo
[A very simple form](https://js13kgames.github.io/bot/demo-xhr.html)
And an even [simpler one without js](https://js13kgames.github.io/bot/demo-pure-html.html)
There is some bundle.zip samples in [packages/bundle-analyzer/\_\_fixtures\_\_](packages/bundle-analyzer/__fixtures__)
## Third party

Thanks to browserstack for supporting open source projects.
## License
[MIT](./license)