Skip to content

Commit f1596c3

Browse files
committed
Merge branch 'ep-support-stable-remote-pattern' of github.com:netlify/next-runtime into ep-support-stable-remote-pattern
2 parents bea0c10 + 6f2b12a commit f1596c3

Some content is hidden

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

42 files changed

+7160
-30
lines changed

.github/workflows/fossa.yml

+5-26
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,11 @@ on:
66
- main
77
- chore/fossa-workflow # convenience branch for future fossa tweaks
88

9-
defaults:
10-
run:
11-
shell: bash
12-
139
jobs:
14-
fossa:
10+
fossa-scan:
1511
runs-on: ubuntu-latest
1612
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v2
19-
- name: Download fossa cli
20-
run: |-
21-
curl -L https://github.com/fossas/fossa-cli/releases/download/v1.1.2/fossa-cli_1.1.2_linux_amd64.tar.gz > fossa-cli.tar.gz
22-
tar -xvzf fossa-cli.tar.gz
23-
mkdir -p $HOME/.local/bin
24-
echo "$HOME/.local/bin" >> $GITHUB_PATH
25-
mv fossa $HOME/.local/bin/fossa
26-
- name: Fossa init
27-
run: fossa init
28-
- name: Set env
29-
run: echo "line_number=$(grep -n "project" .fossa.yml | cut -f1 -d:)" >> $GITHUB_ENV
30-
- name: Configuration
31-
run: |-
32-
sed -i "${line_number}s|.*| project: [email protected]:${GITHUB_REPOSITORY}.git|" .fossa.yml
33-
cat .fossa.yml
34-
- name: Upload dependencies
35-
run: fossa analyze --debug
36-
env:
37-
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
13+
- uses: actions/checkout@v3
14+
- uses: fossas/fossa-action@main # Use a specific version if locking is preferred
15+
with:
16+
api-key: ${{secrets.FOSSA_API_KEY}}

.release-please-manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"packages/runtime": "4.21.2",
3-
"packages/next": "1.1.1"
2+
"packages/runtime": "4.21.3",
3+
"packages/next": "1.2.0"
44
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: ["custom"],
4+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Getting Started
2+
3+
First, run the development server:
4+
5+
```bash
6+
yarn dev
7+
```
8+
9+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
10+
11+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
12+
13+
[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.js`.
14+
15+
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.
16+
17+
## Learn More
18+
19+
To learn more about Next.js, take a look at the following resources:
20+
21+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
22+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
23+
24+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
25+
26+
## Deploy on Vercel
27+
28+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
29+
30+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const withTM = require("next-transpile-modules")(["ui"]);
2+
3+
module.exports = withTM({
4+
reactStrictMode: true,
5+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "docs",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev --port 3001",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint"
10+
},
11+
"dependencies": {
12+
"next": "12.2.4",
13+
"react": "17.0.2",
14+
"react-dom": "17.0.2",
15+
"ui": "*"
16+
},
17+
"devDependencies": {
18+
"@babel/core": "^7.0.0",
19+
"eslint": "7.32.0",
20+
"eslint-config-custom": "*",
21+
"next-transpile-modules": "9.0.0",
22+
"tsconfig": "*",
23+
"@types/node": "^17.0.12",
24+
"@types/react": "17.0.48",
25+
"typescript": "^4.5.3"
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Button } from "ui";
2+
3+
export default function Docs() {
4+
return (
5+
<div>
6+
<h1>Docs</h1>
7+
<Button />
8+
</div>
9+
);
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "tsconfig/nextjs.json",
3+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
4+
"exclude": ["node_modules"]
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: ["custom"],
4+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Getting Started
2+
3+
First, run the development server:
4+
5+
```bash
6+
yarn dev
7+
```
8+
9+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
10+
11+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
12+
13+
[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.js`.
14+
15+
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.
16+
17+
## Learn More
18+
19+
To learn more about Next.js, take a look at the following resources:
20+
21+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
22+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
23+
24+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
25+
26+
## Deploy on Vercel
27+
28+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
29+
30+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const withTM = require("next-transpile-modules")(["ui"]);
2+
3+
module.exports = withTM({
4+
reactStrictMode: true,
5+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "web",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint"
10+
},
11+
"dependencies": {
12+
"next": "12.2.4",
13+
"react": "17.0.2",
14+
"react-dom": "17.0.2",
15+
"ui": "*"
16+
},
17+
"devDependencies": {
18+
"@babel/core": "^7.0.0",
19+
"eslint": "7.32.0",
20+
"eslint-config-custom": "*",
21+
"next-transpile-modules": "9.0.0",
22+
"tsconfig": "*",
23+
"@types/node": "^17.0.12",
24+
"@types/react": "17.0.48",
25+
"typescript": "^4.5.3"
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2+
3+
export default function handler(req, res) {
4+
res.status(200).json({
5+
body: 'This should not be returned',
6+
});
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2+
3+
export default function handler(req, res) {
4+
res.status(200).json({
5+
body: 'Hello world',
6+
});
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Button } from "ui";
2+
3+
export default function Web() {
4+
return (
5+
<div>
6+
<h1>Web</h1>
7+
<Button />
8+
</div>
9+
);
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "tsconfig/nextjs.json",
3+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
4+
"exclude": ["node_modules"]
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[build]
2+
command = "npm run build"
3+
# If we wanted to publish `docs` as well as `web`, we'd need to have netlify.toml
4+
# files in each project folder.
5+
# See https://docs.netlify.com/configure-builds/monorepos/#build-multiple-sites-from-a-monorepo
6+
publish = "apps/web/.next"
7+
8+
[dev]
9+
command = "npm run dev"
10+
11+
[[plugins]]
12+
package = "./packages/local-plugin"
13+
14+
[[plugins]]
15+
package = "@netlify/plugin-local-install-core"
16+
17+
[[edge_functions]]
18+
path = "/edge"
19+
function = "edge"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default (req: any, context:any) => context.json({hello: "world", message: "this is coming to you live from the edge"})

0 commit comments

Comments
 (0)