generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ubiquity/miniflare
Miniflare
- Loading branch information
Showing
23 changed files
with
635,114 additions
and
877 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
WEBHOOK_PROXY_URL=https://smee.io/new | ||
WEBHOOK_SECRET=xxxxxx |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.yarn/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
{ | ||
"recommendations": [ | ||
"arcanis.vscode-zipfs", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
] | ||
"recommendations": ["arcanis.vscode-zipfs", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# @ubiquity/ubiquibot-kernel | ||
|
||
This is a research project to set up the bot without Probot as a dependency. This way we can deploy to Cloudflare Workers, and have it handle instant tasks/responses. | ||
This is a research project to set up the bot without Probot as a dependency. This way we can deploy to Cloudflare Workers, and have it handle instant tasks/responses. | ||
|
||
The kernel is designed to interface with plugins (GitHub Actions) for longer running processes. | ||
The kernel is designed to interface with plugins (GitHub Actions) for longer running processes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const Ajv = require("ajv"); | ||
const standaloneCode = require("ajv/dist/standalone").default; | ||
const SCHEMA = require("@octokit/webhooks-schemas"); | ||
const addFormats = require("ajv-formats"); | ||
|
||
const ajv = new Ajv({ code: { source: true, esm: true } }); | ||
addFormats(ajv); | ||
ajv.addKeyword("tsAdditionalProperties"); | ||
const validate = ajv.compile(SCHEMA); | ||
let moduleCode = standaloneCode(ajv, validate); | ||
|
||
// Now you can write the module code to file | ||
fs.writeFileSync(path.join(__dirname, "./src/github-event-validator.mjs"), moduleCode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,73 @@ | ||
{ | ||
"name": "ubiquibot-worker", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "Template repository with TypeScript support.", | ||
"main": "build/index.ts", | ||
"author": "Ubiquity DAO", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=20.10.0" | ||
}, | ||
"scripts": { | ||
"start": "tsx build/esbuild-server.ts", | ||
"build": "tsx build/esbuild-build.ts", | ||
"format": "run-s format:prettier format:lint", | ||
"format:lint": "eslint --fix .", | ||
"format:prettier": "prettier --write .", | ||
"prepare": "husky install", | ||
"deploy": "wrangler deploy", | ||
"dev": "wrangler dev" | ||
}, | ||
"keywords": [ | ||
"typescript", | ||
"template", | ||
"dao", | ||
"ubiquity", | ||
"open-source" | ||
], | ||
"dependencies": { | ||
"@octokit/webhooks": "^12.0.10", | ||
"create-cloudflare": "^2.8.3", | ||
"dotenv": "^16.3.1", | ||
"smee-client": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@cloudflare/workers-types": "^4.20231121.0", | ||
"@commitlint/cli": "^18.4.3", | ||
"@commitlint/config-conventional": "^18.4.3", | ||
"@types/node": "^20.10.5", | ||
"@typescript-eslint/eslint-plugin": "^6.13.1", | ||
"@typescript-eslint/parser": "^6.13.1", | ||
"esbuild": "^0.19.10", | ||
"eslint": "^8.54.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"husky": "^8.0.3", | ||
"knip": "^3.3.0", | ||
"lint-staged": "^15.1.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^3.1.0", | ||
"tsx": "^4.6.2", | ||
"typescript": "^5.0.4", | ||
"wrangler": "^3.0.0" | ||
}, | ||
"lint-staged": { | ||
"*.ts": [ | ||
"prettier --write", | ||
"eslint --fix" | ||
] | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"packageManager": "yarn@4.0.2" | ||
"name": "ubiquibot-worker", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "Template repository with TypeScript support.", | ||
"main": "build/index.ts", | ||
"author": "Ubiquity DAO", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=20.10.0" | ||
}, | ||
"scripts": { | ||
"format": "run-s format:prettier format:lint", | ||
"format:lint": "eslint --fix .", | ||
"format:prettier": "prettier --write .", | ||
"prepare": "husky install", | ||
"deploy": "wrangler deploy", | ||
"dev": "wrangler dev --port 8787", | ||
"proxy": "tsx src/proxy.ts", | ||
"generate": "node ./generate-ajv-validation-function.js" | ||
}, | ||
"keywords": [ | ||
"typescript", | ||
"template", | ||
"dao", | ||
"ubiquity", | ||
"open-source" | ||
], | ||
"dependencies": { | ||
"@octokit/webhooks": "^12.0.10", | ||
"@octokit/webhooks-schemas": "^7.3.1", | ||
"@octokit/webhooks-types": "^7.3.1", | ||
"@sinclair/typebox": "^0.32.5", | ||
"ajv": "^8.12.0", | ||
"ajv-formats": "^2.1.1", | ||
"create-cloudflare": "^2.8.3", | ||
"octokit": "^3.1.2", | ||
"smee-client": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@cloudflare/workers-types": "^4.20231121.0", | ||
"@commitlint/cli": "^18.4.3", | ||
"@commitlint/config-conventional": "^18.4.3", | ||
"@types/node": "^20.11.1", | ||
"@typescript-eslint/eslint-plugin": "^6.13.1", | ||
"@typescript-eslint/parser": "^6.13.1", | ||
"dotenv": "^16.3.1", | ||
"esbuild": "^0.19.10", | ||
"eslint": "^8.54.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"husky": "^8.0.3", | ||
"knip": "^3.3.0", | ||
"lint-staged": "^15.1.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^3.1.0", | ||
"tsx": "^4.6.2", | ||
"typescript": "^5.0.4", | ||
"wrangler": "^3.22.3" | ||
}, | ||
"lint-staged": { | ||
"*.ts": [ | ||
"prettier --write", | ||
"eslint --fix" | ||
] | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"packageManager": "yarn@4.0.2" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.