From 05c4bae65d6b04070ff70ef994bbbc0d6dc4ba37 Mon Sep 17 00:00:00 2001 From: Mari Date: Wed, 30 Nov 2022 19:17:08 -0500 Subject: [PATCH] Steppies project start --- .editorconfig | 9 + .env.example | 6 + .eslintrc.js | 46 + .gitignore | 8 + .idea/codeStyles/Project.xml | 52 + .idea/codeStyles/codeStyleConfig.xml | 5 + .idea/prettier.xml | 7 + .idea/workspace.xml | 116 + .prettierrc | 8 + .vscode/extensions.json | 8 + README.md | 51 + jest.config.js | 6 + package-lock.json | 13516 +++++++++++++++++++++++++ package.json | 41 + patches/slash-create+5.5.2.patch | 13 + slash-up.config.js | 19 + src/commands/hello.ts | 25 + src/commands/index.ts | 1 + src/index.ts | 19 + src/shim/creator.ts | 73 + src/shim/index.ts | 4 + src/shim/servers/cfworker.ts | 63 + src/shim/util/multipartData.ts | 42 + src/shim/util/requestHandler.ts | 61 + src/shim/util/verify.ts | 40 + src/state/gamestate.spec.ts | 62 + src/state/gamestate.ts | 339 + src/types.d.ts | 5 + steppies.md | 37 + tsconfig.json | 24 + webpack.config.js | 32 + wrangler.example.toml | 10 + 32 files changed, 14748 insertions(+) create mode 100644 .editorconfig create mode 100644 .env.example create mode 100644 .eslintrc.js create mode 100644 .gitignore create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/prettier.xml create mode 100644 .idea/workspace.xml create mode 100644 .prettierrc create mode 100644 .vscode/extensions.json create mode 100644 README.md create mode 100644 jest.config.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 patches/slash-create+5.5.2.patch create mode 100644 slash-up.config.js create mode 100644 src/commands/hello.ts create mode 100644 src/commands/index.ts create mode 100644 src/index.ts create mode 100644 src/shim/creator.ts create mode 100644 src/shim/index.ts create mode 100644 src/shim/servers/cfworker.ts create mode 100644 src/shim/util/multipartData.ts create mode 100644 src/shim/util/requestHandler.ts create mode 100644 src/shim/util/verify.ts create mode 100644 src/state/gamestate.spec.ts create mode 100644 src/state/gamestate.ts create mode 100644 src/types.d.ts create mode 100644 steppies.md create mode 100644 tsconfig.json create mode 100644 webpack.config.js create mode 100644 wrangler.example.toml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3c44241 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..62f0b52 --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +DISCORD_APP_ID= +DISCORD_PUBLIC_KEY= +DISCORD_BOT_TOKEN= + +# You can fill this in for development.env +DEVELOPMENT_GUILD_ID= diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..8049cd2 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,46 @@ +module.exports = { + env: { + commonjs: true, + es6: true, + browser: true + }, + extends: ['eslint:recommended', 'plugin:prettier/recommended'], + globals: { + DISCORD_APP_ID: true, + DISCORD_PUBLIC_KEY: true, + DISCORD_BOT_TOKEN: true + }, + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 6, + sourceType: 'module' + }, + plugins: ['@typescript-eslint'], + rules: { + 'prettier/prettier': 'warn', + 'no-cond-assign': [2, 'except-parens'], + 'no-unused-vars': 0, + '@typescript-eslint/no-unused-vars': 1, + 'no-empty': [ + 'error', + { + allowEmptyCatch: true + } + ], + 'prefer-const': [ + 'warn', + { + destructuring: 'all' + } + ], + 'spaced-comment': 'warn' + }, + overrides: [ + { + files: ['slash-up.config.js', 'webpack.config.js'], + env: { + node: true + } + } + ] +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cc9165c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +/coverage +/dist +/node_modules +wrangler.toml +/.vscode/settings.json +*.log +*.env +.dev.vars diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..cb106f8 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 0000000..727b8b5 --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..864d98f --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +