Skip to content

Commit 0a2a9b4

Browse files
authored
release 0.5.0 (#143)
2 parents 158c6de + cba4036 commit 0a2a9b4

File tree

136 files changed

+18016
-1344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+18016
-1344
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dist
33
.vercel
44
.DS_Store
55
.vscode/settings.json
6+
.env.local

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# 0.5.0 (2022-12-15)
2+
3+
### Features
4+
5+
- Serialization between client (hooks) and server now uses [superjson](https://github.com/blitz-js/superjson), [[#139](https://github.com/zenstackhq/zenstack/issues/139)]
6+
7+
### Fixes and improvements
8+
9+
- Fixed goto definition issue in VSCode extension, [[#69](https://github.com/zenstackhq/zenstack/issues/69)]
10+
11+
### Breaking changes
12+
13+
- Next-auth adapter and helper are moved to a separate package `@zenstackhq/next-auth`.
14+
115
# 0.4.0 (2022-12-01)
216

317
### Features

SECURITY.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| >=0.4.0 | :white_check_mark: |
8+
9+
## Reporting a Vulnerability
10+
11+
Please [create an issue](https://github.com/zenstackhq/zenstack/issues) and add a "security" label. We'll actively watch, verify and fix them with high priority.
12+
Alternatively, you can also reach out to us at [email protected].
13+
14+
Thank you for helping us make a better project!

doc-serve/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

doc-serve/.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

doc-serve/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
```
12+
13+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14+
15+
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
16+
17+
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
18+
19+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
20+
21+
## Learn More
22+
23+
To learn more about Next.js, take a look at the following resources:
24+
25+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27+
28+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29+
30+
## Deploy on Vercel
31+
32+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
33+
34+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

doc-serve/middleware.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { NextRequest, NextResponse } from 'next/server';
2+
3+
export const config = {
4+
matcher: '/:path*',
5+
};
6+
7+
const botUAPattern = /.*(Googlebot|bingbot).*/i;
8+
9+
export default async function middleware(req: NextRequest) {
10+
const url = req.nextUrl;
11+
12+
if (url.pathname.includes('.')) {
13+
return NextResponse.next();
14+
}
15+
16+
const ua = req.headers.get('user-agent');
17+
18+
if (ua && botUAPattern.test(ua)) {
19+
const trimmed = url.pathname.replace(/^\//, '');
20+
if (trimmed === '' || trimmed === '/') {
21+
url.pathname = '/static/index.html';
22+
} else {
23+
url.pathname = `/static/${trimmed}.html`;
24+
}
25+
console.log(`REWRITE: ua - ${ua}, url - ${url.pathname}`);
26+
return NextResponse.rewrite(url);
27+
} else {
28+
url.pathname = '/index.html';
29+
return NextResponse.rewrite(url);
30+
}
31+
}

doc-serve/next.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
reactStrictMode: true,
4+
swcMinify: true,
5+
}
6+
7+
module.exports = nextConfig

0 commit comments

Comments
 (0)