Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7e54a16
-
Ehesp Jun 11, 2024
f69d5b0
-
Ehesp Jun 12, 2024
2a4062c
wire up preview page
Ehesp Jun 12, 2024
d59690a
fix preview routing
Ehesp Jun 13, 2024
f63ed66
-
Ehesp Jun 13, 2024
477f185
-
Ehesp Jun 14, 2024
3ed8b1a
respect default theme
Ehesp Jun 14, 2024
4052610
-
Ehesp Jun 14, 2024
c94f734
-
Ehesp Jun 17, 2024
8ab2ed8
simplify themes
Ehesp Jun 17, 2024
6b6bc64
-
Ehesp Jun 17, 2024
1b5f398
prose
Ehesp Jun 17, 2024
acab47c
-
Ehesp Jun 17, 2024
aef95ad
-
Ehesp Jun 17, 2024
8cfe090
-
Ehesp Jun 17, 2024
8ee15c9
-
Ehesp Jun 17, 2024
7b5e69c
scripts
Ehesp Jun 17, 2024
fbd3d5f
meta
Ehesp Jun 17, 2024
1164913
-
Ehesp Jun 18, 2024
ff302d2
-
Ehesp Jun 18, 2024
bd4e3cf
search
Ehesp Jun 18, 2024
e00ec9a
-
Ehesp Jun 18, 2024
393d228
-
Ehesp Jun 18, 2024
38fb14a
favicon
Ehesp Jun 18, 2024
e210026
-
Ehesp Jun 19, 2024
cccc9cf
-
Ehesp Jun 19, 2024
3f50504
-
Ehesp Jun 20, 2024
fd19b26
-
Ehesp Jun 20, 2024
c8c1f12
-
Ehesp Jun 20, 2024
4eea2a2
- code block
Ehesp Jun 21, 2024
778ad57
feat: Tabs
Ehesp Jul 2, 2024
9a7a005
-
Ehesp Jul 3, 2024
6945f93
-
Ehesp Jul 3, 2024
ae99676
delete website dir
Ehesp Jul 3, 2024
3ef801e
migrate website-remix -> website
Ehesp Jul 3, 2024
7e4ec09
biome
Ehesp Jul 3, 2024
e5dd313
add biome check
Ehesp Jul 3, 2024
e47aa04
error page
Ehesp Jul 4, 2024
3ef1649
hide edit on private repos
Ehesp Jul 4, 2024
7a82ed3
ref badge
Ehesp Jul 4, 2024
3894e3e
-
Ehesp Jul 4, 2024
f1f0229
-
Ehesp Jul 4, 2024
088aef9
bump bun version
Ehesp Jul 4, 2024
d5be3b4
pull request comment
Ehesp Jul 4, 2024
4977f74
Merge branch 'next' into rework
Ehesp Jul 15, 2024
866d704
Merge branch 'rework' of https://github.com/invertase/docs.page into …
Ehesp Jul 16, 2024
ca5a8fb
formatting
Ehesp Jul 16, 2024
a465748
biome check
Ehesp Jul 16, 2024
9feb882
-
Ehesp Jul 16, 2024
4eb426c
-
Ehesp Jul 16, 2024
b70b177
-
Ehesp Jul 16, 2024
f0bd7c1
handle preview files removed
Ehesp Jul 17, 2024
5838db2
cleanup client
Ehesp Jul 17, 2024
ad8c9ae
lint
Ehesp Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

40 changes: 0 additions & 40 deletions .eslintrc

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Code quality

on:
pull_request:

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .
22 changes: 0 additions & 22 deletions .github/workflows/website.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierignore

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM oven/bun:1.0.29
FROM oven/bun:1.1.3

ARG BUILD_SHA=default_value
ENV __BUILD_SHA=$BUILD_SHA
Expand Down
Binary file modified api/bun.lockb
Binary file not shown.
111 changes: 56 additions & 55 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
{
"type": "module",
"private": true,
"name": "docs-page-api",
"version": "1.0.0",
"main": "src/app.ts",
"author": "Invertase <[email protected]>",
"license": "MIT",
"dependencies": {
"@code-hike/mdx": "0.7.2",
"@mdx-js/mdx": "2.2.1",
"@octokit/graphql": "5.0.0",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@types/morgan": "^1.9.3",
"@types/node": "^18.0.0",
"a2a": "^0.2.0",
"camelcase": "7.0.0",
"cors": "2.8.5",
"dotenv": "16.0.1",
"esbuild": "0.14.47",
"express": "4.18.1",
"express-basic-auth": "^1.2.1",
"gray-matter": "4.0.3",
"hast-util-heading-rank": "2.1.1",
"hast-util-parse-selector": "3.1.0",
"is-badge": "^2.1.0",
"js-yaml": "4.1.0",
"mdx-bundler": "9.0.1",
"morgan": "1.10.0",
"node-fetch": "3.2.6",
"pm2": "5.3.0",
"probot": "12.2.8",
"rehype-accessible-emojis": "0.3.2",
"rehype-katex": "6.0.2",
"rehype-slug": "5.0.1",
"remark-comment": "1.0.0",
"remark-gfm": "3.0.1",
"remark-math": "5.1.1",
"remark-parse": "10.0.1",
"shiki": "1.1.7",
"unist-util-visit": "4.1.0",
"zod": "3.22.4",
"zod-validation-error": "0.2.2"
},
"scripts": {
"dev": "bun run src/app.ts --hot",
"start": "bun run src/app.ts"
},
"devDependencies": {
"@octokit/webhooks-types": "^6.2.4",
"@types/js-yaml": "^4.0.5",
"rollup": "3.9.1",
"ts-node": "^10.8.1",
"typescript": "4.7.4"
}
"type": "module",
"private": true,
"name": "docs-page-api",
"version": "1.0.0",
"main": "src/app.ts",
"author": "Invertase <[email protected]>",
"license": "MIT",
"dependencies": {
"@code-hike/mdx": "0.7.2",
"@mdx-js/mdx": "2.2.1",
"@octokit/graphql": "5.0.0",
"@octokit/webhooks": "^13.2.7",
"@types/express": "^4.17.13",
"@types/morgan": "^1.9.3",
"@types/node": "^18.0.0",
"a2a": "^0.2.0",
"camelcase": "7.0.0",
"dotenv": "16.0.1",
"esbuild": "0.14.47",
"express": "4.18.1",
"express-basic-auth": "^1.2.1",
"gray-matter": "4.0.3",
"hast-util-heading-rank": "2.1.1",
"hast-util-parse-selector": "3.1.0",
"is-badge": "^2.1.0",
"js-yaml": "4.1.0",
"lodash.get": "^4.4.2",
"mdx-bundler": "9.0.1",
"morgan": "1.10.0",
"node-fetch": "3.2.6",
"octokit": "^4.0.2",
"rehype-accessible-emojis": "0.3.2",
"rehype-katex": "6.0.2",
"rehype-slug": "5.0.1",
"remark-comment": "1.0.0",
"remark-gfm": "3.0.1",
"remark-math": "5.1.1",
"remark-parse": "10.0.1",
"shiki": "1.1.7",
"unist-util-visit": "4.1.0",
"zod": "3.22.4",
"zod-to-json-schema": "^3.23.1",
"zod-validation-error": "0.2.2"
},
"scripts": {
"dev": "bun run src/app.ts --hot",
"start": "bun run src/app.ts"
},
"devDependencies": {
"@octokit/webhooks-types": "^6.2.4",
"@types/js-yaml": "^4.0.5",
"@types/lodash.get": "^4.4.9",
"rollup": "3.9.1",
"ts-node": "^10.8.1",
"typescript": "5.5.2"
}
}
40 changes: 19 additions & 21 deletions api/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
import express, { Router, text } from 'express';
import morgan from 'morgan';
import cors from 'cors';
import { config } from 'dotenv';
import { config } from "dotenv";
import express, { Router, text } from "express";
import morgan from "morgan";

import bundle from './routes/bundle';
import preview from './routes/preview';
import mdx from './routes/mdx';
import probot from './probot';
import { notFound } from './res';
import { notFound } from "./res";
import bundle from "./routes/bundle";
import preview from "./routes/preview";
import schema from "./routes/schema";
import githubWebhook from "./routes/webhooks.github";

config();

const PORT = process.env.PORT || 8080;
const app = express();
app.use(text());
app.use(cors());
app.use(morgan('dev'));
app.use(morgan("dev"));
app.use(express.json());
app.use(
express.urlencoded({
extended: true,
}),
express.urlencoded({
extended: true,
}),
);
app.use(probot);

const router = Router();
router.get('/status', (_, res) => res.status(200).send('OK'));
router.post('/preview', preview);
router.get('/bundle', bundle);
router.post('/mdx', mdx);
router.all('*', (_, res) => notFound(res));
router.get("/status", (_, res) => res.status(200).send("OK"));
router.get("/schema.json", schema);
router.post("/preview", preview);
router.get("/bundle", bundle);
router.post("/webhooks/github", githubWebhook);
router.all("*", (_, res) => notFound(res));
app.use(router);

app.listen(PORT, () => {
console.log(`docs.page api server is running at http://localhost:${PORT}`);
console.log(`docs.page api server is running at http://localhost:${PORT}`);
});
23 changes: 23 additions & 0 deletions api/src/bundler/error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export class BundlerError extends Error {
code: number;
name: string;
source?: string;

constructor({
code,
name,
message,
source,
}: {
code: number;
name: string;
message: string;
source?: string;
}) {
super(message);
this.code = code;
this.name = name;
this.message = message;
this.source = source;
}
}
Loading