edge-functions 1.6.4 → 1.7.0-stage.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +3 -1
- package/.eslintrc.json +20 -63
- package/.github/workflows/release.yml +1 -2
- package/.prettierrc.json +7 -0
- package/.releaserc +52 -25
- package/CHANGELOG.md +37 -0
- package/examples/next/edge-pages-13-4-8/.eslintrc.json +3 -0
- package/examples/next/edge-pages-13-4-8/README.md +10 -0
- package/examples/next/edge-pages-13-4-8/next.config.js +6 -0
- package/examples/next/edge-pages-13-4-8/package.json +25 -0
- package/examples/next/edge-pages-13-4-8/postcss.config.js +6 -0
- package/examples/next/edge-pages-13-4-8/src/middleware.ts +12 -0
- package/examples/next/edge-pages-13-4-8/src/pages/[...catSlug].tsx +66 -0
- package/examples/next/edge-pages-13-4-8/src/pages/[prodSlug]/x.tsx +66 -0
- package/examples/next/edge-pages-13-4-8/src/pages/_app.tsx +6 -0
- package/examples/next/edge-pages-13-4-8/src/pages/_document.tsx +13 -0
- package/examples/next/edge-pages-13-4-8/src/pages/api/hello.ts +21 -0
- package/examples/next/edge-pages-13-4-8/src/pages/index.tsx +135 -0
- package/examples/next/edge-pages-13-4-8/src/pages/ssr.tsx +56 -0
- package/examples/next/edge-pages-13-4-8/src/styles/globals.css +27 -0
- package/examples/next/edge-pages-13-4-8/tailwind.config.js +18 -0
- package/examples/next/edge-pages-13-4-8/tsconfig.json +23 -0
- package/examples/next/next-static/other/app-build-manifest.json +28 -0
- package/examples/next/next-static/other/build-manifest.json +22 -0
- package/examples/next/next-static/other/cache/webpack/client-development/0.pack +0 -0
- package/examples/next/next-static/other/cache/webpack/client-development/1.pack +0 -0
- package/examples/next/next-static/other/cache/webpack/client-development/index.pack +0 -0
- package/examples/next/next-static/other/cache/webpack/client-development/index.pack.old +0 -0
- package/examples/next/next-static/other/cache/webpack/server-development/0.pack +0 -0
- package/examples/next/next-static/other/cache/webpack/server-development/index.pack +0 -0
- package/examples/next/next-static/other/package.json +1 -0
- package/examples/next/next-static/other/react-loadable-manifest.json +1 -0
- package/examples/next/next-static/other/server/app/blog/[slug]/page.js +2396 -0
- package/examples/next/next-static/other/server/app/misty-mountains/moria/page.js +2396 -0
- package/examples/next/next-static/other/server/app/page.js +2539 -0
- package/examples/next/next-static/other/server/app-paths-manifest.json +5 -0
- package/examples/next/next-static/other/server/client-reference-manifest.js +1 -0
- package/examples/next/next-static/other/server/client-reference-manifest.json +1104 -0
- package/examples/next/next-static/other/server/flight-server-css-manifest.js +1 -0
- package/examples/next/next-static/other/server/flight-server-css-manifest.json +34 -0
- package/examples/next/next-static/other/server/middleware-build-manifest.js +1 -0
- package/examples/next/next-static/other/server/middleware-manifest.json +6 -0
- package/examples/next/next-static/other/server/middleware-react-loadable-manifest.js +1 -0
- package/examples/next/next-static/other/server/next-font-manifest.js +1 -0
- package/examples/next/next-static/other/server/next-font-manifest.json +1 -0
- package/examples/next/next-static/other/server/pages-manifest.json +1 -0
- package/examples/next/next-static/other/server/server-reference-manifest.js +1 -0
- package/examples/next/next-static/other/server/server-reference-manifest.json +4 -0
- package/examples/next/next-static/other/server/webpack-runtime.js +215 -0
- package/examples/next/next-static/other/static/chunks/app/blog/[slug]/page.js +257 -0
- package/examples/next/next-static/other/static/chunks/app/layout.js +59 -0
- package/examples/next/next-static/other/static/chunks/app/misty-mountains/moria/page.js +257 -0
- package/examples/next/next-static/other/static/chunks/app/page.js +647 -0
- package/examples/next/next-static/other/static/chunks/app-client-internals.js +116 -0
- package/examples/next/next-static/other/static/chunks/main-app.js +1662 -0
- package/examples/next/next-static/other/static/chunks/polyfills.js +1 -0
- package/examples/next/next-static/other/static/chunks/react-refresh.js +62 -0
- package/examples/next/next-static/other/static/chunks/webpack.js +1399 -0
- package/examples/next/next-static/other/static/css/app/blog/[slug]/page.css +234 -0
- package/examples/next/next-static/other/static/css/app/layout.css +180 -0
- package/examples/next/next-static/other/static/css/app/misty-mountains/moria/page.css +234 -0
- package/examples/next/next-static/other/static/css/app/page.css +234 -0
- package/examples/next/next-static/other/static/development/_buildManifest.js +1 -0
- package/examples/next/next-static/other/static/development/_ssgManifest.js +1 -0
- package/examples/next/next-static/other/static/media/2aaf0723e720e8b9-s.p.woff2 +0 -0
- package/examples/next/next-static/other/static/media/9c4f34569c9b36ca-s.woff2 +0 -0
- package/examples/next/next-static/other/static/media/ae9ae6716d4f8bf8-s.woff2 +0 -0
- package/examples/next/next-static/other/static/media/b1db3e28af9ef94a-s.woff2 +0 -0
- package/examples/next/next-static/other/static/media/b967158bc7d7a9fb-s.woff2 +0 -0
- package/examples/next/next-static/other/static/media/c0f5ec5bbf5913b7-s.woff2 +0 -0
- package/examples/next/next-static/other/static/media/d1d9458b69004127-s.woff2 +0 -0
- package/examples/next/next-static/other/static/webpack/08bbe3671c2a994f.webpack.hot-update.json +1 -0
- package/examples/next/next-static/other/static/webpack/475258c680428a37.webpack.hot-update.json +1 -0
- package/examples/next/next-static/other/static/webpack/app/layout.dff06e6c74291157.hot-update.js +21 -0
- package/examples/next/next-static/other/static/webpack/app/page.dff06e6c74291157.hot-update.js +21 -0
- package/examples/next/next-static/other/static/webpack/app-client-internals.dff06e6c74291157.hot-update.js +21 -0
- package/examples/next/next-static/other/static/webpack/dff06e6c74291157.webpack.hot-update.json +1 -0
- package/examples/next/next-static/other/static/webpack/webpack.08bbe3671c2a994f.hot-update.js +717 -0
- package/examples/next/next-static/other/static/webpack/webpack.475258c680428a37.hot-update.js +18 -0
- package/examples/next/next-static/other/static/webpack/webpack.dff06e6c74291157.hot-update.js +18 -0
- package/examples/next/next-static/other/trace +17 -0
- package/examples/next/next-static/other/types/app/blog/[slug]/page.ts +70 -0
- package/examples/next/next-static/other/types/app/layout.ts +70 -0
- package/examples/next/next-static/other/types/app/misty-mountains/moria/page.ts +70 -0
- package/examples/next/next-static/other/types/app/page.ts +70 -0
- package/examples/next/next-static/other/types/package.json +1 -0
- package/examples/next/next-static/public/next.svg +1 -0
- package/examples/next/next-static/public/vercel.svg +1 -0
- package/examples/next/next-static/src/app/favicon.ico +0 -0
- package/examples/next/node-pages-12-3-1/.eslintrc.json +3 -0
- package/examples/next/node-pages-12-3-1/README.md +10 -0
- package/examples/next/node-pages-12-3-1/next.config.js +10 -0
- package/examples/next/node-pages-12-3-1/package.json +25 -0
- package/examples/next/node-pages-12-3-1/pages/[...catSlug].js +29 -0
- package/examples/next/node-pages-12-3-1/pages/[prodSlug]/x.js +29 -0
- package/examples/next/node-pages-12-3-1/pages/_app.js +7 -0
- package/examples/next/node-pages-12-3-1/pages/api/hello.js +5 -0
- package/examples/next/node-pages-12-3-1/pages/index.js +94 -0
- package/examples/next/node-pages-12-3-1/pages/ssr.js +21 -0
- package/examples/next/node-pages-12-3-1/public/favicon.ico +0 -0
- package/examples/next/node-pages-12-3-1/public/vercel.svg +4 -0
- package/examples/next/node-pages-12-3-1/styles/Home.module.css +139 -0
- package/examples/next/node-pages-12-3-1/styles/globals.css +26 -0
- package/lib/build/dispatcher/dispatcher.js +65 -22
- package/lib/build/polyfills/node/dns.js +150 -0
- package/lib/build/polyfills/node/globals/navigator.js +5 -0
- package/lib/build/polyfills/node/globals/performance.js +43 -0
- package/lib/build/polyfills/node/http2.js +106 -0
- package/lib/commands/presets.commands.js +15 -3
- package/lib/constants/messages/build.messages.js +6 -4
- package/lib/env/polyfills/fetch.polyfills.js +3 -1
- package/lib/env/runtime.env.js +7 -1
- package/lib/env/server.env.js +2 -6
- package/lib/main.js +4 -3
- package/lib/presets/custom/next/compute/config.js +91 -0
- package/lib/presets/custom/next/compute/default/index.js +15 -0
- package/lib/presets/custom/next/compute/handler.js +21 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/index.js +14 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/base-http/compute-js.js +16 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/compute-js.js +47 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/config.js +722 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/load-components.js +70 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/next-compute-js-server.js +1017 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/next.js +84 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/require.js +153 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/response-cache/index.js +113 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/server/serve-static.js +47 -0
- package/lib/presets/custom/next/compute/node/custom-server/12.3.1/util/etag.js +31 -0
- package/lib/presets/custom/next/compute/node/index.js +57 -0
- package/lib/presets/custom/next/compute/node/prebuild/index.js +3 -0
- package/lib/presets/custom/next/compute/node/prebuild/statics/index.js +196 -0
- package/lib/presets/custom/next/compute/prebuild.js +98 -0
- package/lib/utils/generateWebpackBanner/generateWebpackBanner.utils.js +17 -0
- package/lib/utils/generateWebpackBanner/index.js +3 -0
- package/lib/utils/index.js +4 -0
- package/lib/utils/presets/presets.utils.js +47 -4
- package/lib/utils/vercel/index.js +3 -0
- package/lib/utils/vercel/vercel.utils.js +49 -0
- package/package.json +33 -3
- package/examples/next-12-static/package-lock.json +0 -6191
- package/examples/next-static/yarn.lock +0 -199
- /package/examples/{next-static/src/app → next/edge-pages-13-4-8/public}/favicon.ico +0 -0
- /package/examples/{next-static → next/edge-pages-13-4-8}/public/next.svg +0 -0
- /package/examples/{next-static → next/edge-pages-13-4-8}/public/vercel.svg +0 -0
- /package/examples/{next-12-static → next/next-12-static}/.babelrc +0 -0
- /package/examples/{next-12-static → next/next-12-static}/README.md +0 -0
- /package/examples/{next-12-static → next/next-12-static}/components/post.jsx +0 -0
- /package/examples/{next-12-static → next/next-12-static}/package.json +0 -0
- /package/examples/{next-12-static → next/next-12-static}/pages/index.jsx +0 -0
- /package/examples/{next-12-static → next/next-12-static}/pages/post/[id].jsx +0 -0
- /package/examples/{next-static → next/next-static}/README.md +0 -0
- /package/examples/{next-static → next/next-static}/jsconfig.json +0 -0
- /package/examples/{next-static → next/next-static}/next.config.js +0 -0
- /package/examples/{next-static → next/next-static}/package.json +0 -0
- /package/examples/{next-static → next/next-static}/src/app/blog/[slug]/page.js +0 -0
- /package/examples/{next-static → next/next-static}/src/app/globals.css +0 -0
- /package/examples/{next-static → next/next-static}/src/app/layout.js +0 -0
- /package/examples/{next-static → next/next-static}/src/app/misty-mountains/moria/page.js +0 -0
- /package/examples/{next-static → next/next-static}/src/app/page.js +0 -0
- /package/examples/{next-static → next/next-static}/src/app/page.module.css +0 -0
package/.eslintignore
CHANGED
package/.eslintrc.json
CHANGED
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
"es2021": true,
|
|
5
5
|
"jest/globals": true
|
|
6
6
|
},
|
|
7
|
-
"plugins": [
|
|
8
|
-
"jsdoc",
|
|
9
|
-
"jest"
|
|
10
|
-
],
|
|
7
|
+
"plugins": ["jsdoc", "jest", "prettier"],
|
|
11
8
|
"extends": [
|
|
12
9
|
"airbnb-base",
|
|
13
10
|
"plugin:jsdoc/recommended",
|
|
14
|
-
"plugin:jest/recommended"
|
|
11
|
+
"plugin:jest/recommended",
|
|
12
|
+
"plugin:prettier/recommended"
|
|
15
13
|
],
|
|
16
14
|
"overrides": [],
|
|
17
15
|
"parserOptions": {
|
|
@@ -22,70 +20,29 @@
|
|
|
22
20
|
"import/resolver": {
|
|
23
21
|
"alias": {
|
|
24
22
|
"map": [
|
|
25
|
-
[
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
],
|
|
29
|
-
[
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
],
|
|
33
|
-
[
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
]
|
|
37
|
-
[
|
|
38
|
-
"#polyfills",
|
|
39
|
-
"./lib/env/polyfills/index.js"
|
|
40
|
-
],
|
|
41
|
-
[
|
|
42
|
-
"#build",
|
|
43
|
-
"./lib/build/dispatcher/index.js"
|
|
44
|
-
],
|
|
45
|
-
[
|
|
46
|
-
"#bundlers",
|
|
47
|
-
"./lib/build/bundlers/index.js"
|
|
48
|
-
],
|
|
49
|
-
[
|
|
50
|
-
"#notations/*",
|
|
51
|
-
"./lib/notations"
|
|
52
|
-
],
|
|
53
|
-
[
|
|
54
|
-
"#env",
|
|
55
|
-
"./lib/env/index.js"
|
|
56
|
-
],
|
|
57
|
-
[
|
|
58
|
-
"#platform",
|
|
59
|
-
"./lib/platform/index.js"
|
|
60
|
-
],
|
|
61
|
-
[
|
|
62
|
-
"#constants",
|
|
63
|
-
"./lib/constants/index.js"
|
|
64
|
-
],
|
|
65
|
-
[
|
|
66
|
-
"#edge",
|
|
67
|
-
"./lib/platform/edgehooks/index.js"
|
|
68
|
-
],
|
|
69
|
-
[
|
|
70
|
-
"#commands",
|
|
71
|
-
"./lib/commands/index.js"
|
|
72
|
-
]
|
|
23
|
+
["#root/*", "./"],
|
|
24
|
+
["#lib/*", "./lib"],
|
|
25
|
+
["#utils", "./lib/utils/index.js"],
|
|
26
|
+
["#polyfills", "./lib/env/polyfills/index.js"],
|
|
27
|
+
["#build", "./lib/build/dispatcher/index.js"],
|
|
28
|
+
["#bundlers", "./lib/build/bundlers/index.js"],
|
|
29
|
+
["#notations/*", "./lib/notations"],
|
|
30
|
+
["#env", "./lib/env/index.js"],
|
|
31
|
+
["#platform", "./lib/platform/index.js"],
|
|
32
|
+
["#constants", "./lib/constants/index.js"],
|
|
33
|
+
["#edge", "./lib/platform/edgehooks/index.js"],
|
|
34
|
+
["#commands", "./lib/commands/index.js"]
|
|
73
35
|
],
|
|
74
|
-
"extensions": [
|
|
75
|
-
".js",
|
|
76
|
-
".json"
|
|
77
|
-
]
|
|
36
|
+
"extensions": [".js", ".json"]
|
|
78
37
|
}
|
|
79
38
|
}
|
|
80
39
|
},
|
|
81
40
|
"rules": {
|
|
82
|
-
"import/extensions": [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
],
|
|
86
|
-
"no-console": "off"
|
|
41
|
+
"import/extensions": ["error", "always"],
|
|
42
|
+
"no-console": "off",
|
|
43
|
+
"prettier/prettier": "error"
|
|
87
44
|
},
|
|
88
45
|
"globals": {
|
|
89
46
|
"AZION_VERSION_ID": "readonly"
|
|
90
47
|
}
|
|
91
|
-
}
|
|
48
|
+
}
|
package/.prettierrc.json
ADDED
package/.releaserc
CHANGED
|
@@ -7,29 +7,56 @@
|
|
|
7
7
|
"channel": "stage"
|
|
8
8
|
}
|
|
9
9
|
],
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"options": {
|
|
24
|
-
"preset": {
|
|
25
|
-
"name": "conventionalchangelog",
|
|
26
|
-
"issuePrefixes": ["ISSUE-"],
|
|
27
|
-
"issueUrlFormat": "https://github.com/aziontech/vulcan/issues/{id}"
|
|
10
|
+
"plugins": [
|
|
11
|
+
[
|
|
12
|
+
"@semantic-release/commit-analyzer",
|
|
13
|
+
{
|
|
14
|
+
"preset": "conventionalcommits",
|
|
15
|
+
"parserOpts": {
|
|
16
|
+
"headerPattern": "^(\\[ISSUE-.*])?\\s?(\\w+):\\s(.*)$",
|
|
17
|
+
"headerCorrespondence": [
|
|
18
|
+
"scope",
|
|
19
|
+
"type",
|
|
20
|
+
"subject"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
28
23
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"@semantic-release/release-notes-generator",
|
|
27
|
+
{
|
|
28
|
+
"preset": "conventionalcommits",
|
|
29
|
+
"parserOpts": {
|
|
30
|
+
"headerPattern": "^(\\[ISSUE-.*])?\\s?(\\w+):\\s(.*)$",
|
|
31
|
+
"headerCorrespondence": [
|
|
32
|
+
"scope",
|
|
33
|
+
"type",
|
|
34
|
+
"subject"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"options": {
|
|
38
|
+
"preset": {
|
|
39
|
+
"name": "conventionalchangelog",
|
|
40
|
+
"issuePrefixes": [
|
|
41
|
+
"ISSUE-"
|
|
42
|
+
],
|
|
43
|
+
"issueUrlFormat": "https://github.com/aziontech/vulcan/issues/{id}"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"@semantic-release/npm",
|
|
49
|
+
"@semantic-release/changelog",
|
|
50
|
+
[
|
|
51
|
+
"@semantic-release/git",
|
|
52
|
+
{
|
|
53
|
+
"assets": [
|
|
54
|
+
"package.json",
|
|
55
|
+
"CHANGELOG.md"
|
|
56
|
+
],
|
|
57
|
+
"message": "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"@semantic-release/github"
|
|
61
|
+
]
|
|
62
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
## [1.7.0-stage.1](https://github.com/aziontech/vulcan/compare/v1.6.4-stage.2...v1.7.0-stage.1) (2023-09-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add custom server with js files ([#97](https://github.com/aziontech/vulcan/issues/97)) ([f73a31e](https://github.com/aziontech/vulcan/commit/f73a31e19e23c773e379f3cd193262468cf1ba52))
|
|
7
|
+
* Add list preset modes ([4d1b924](https://github.com/aziontech/vulcan/commit/4d1b924f1c3d403683dcd1d0a2245cf9d68cd3a3))
|
|
8
|
+
* Add next webpack polyfills ([#98](https://github.com/aziontech/vulcan/issues/98)) ([5451fa5](https://github.com/aziontech/vulcan/commit/5451fa59c69f4bc148649e2f0b67e7b15012f678))
|
|
9
|
+
* Add Next.js support ([#125](https://github.com/aziontech/vulcan/issues/125)) ([a53c807](https://github.com/aziontech/vulcan/commit/a53c80727673ff209842372eb467d01595f3d15d))
|
|
10
|
+
* added handler and code compile ([#100](https://github.com/aziontech/vulcan/issues/100)) ([2e245fd](https://github.com/aziontech/vulcan/commit/2e245fdf67f5fdb746072950b6e64b14d9273d19))
|
|
11
|
+
* check if dependencies are installed and log vercel cli ([144bc7a](https://github.com/aziontech/vulcan/commit/144bc7ac02b626fa9c1693ebd9a2f39a17244473))
|
|
12
|
+
* Improve vercel build logs ([67ad3bd](https://github.com/aziontech/vulcan/commit/67ad3bd8f918c23d09514ce7acac77a5ac519db5))
|
|
13
|
+
* list presets modes ([df1d71e](https://github.com/aziontech/vulcan/commit/df1d71e43041224a47653e0c9853e18205f92c51))
|
|
14
|
+
* pre build configuration and custom static file server Next ([#96](https://github.com/aziontech/vulcan/issues/96)) ([1d2ab58](https://github.com/aziontech/vulcan/commit/1d2ab58370432b81cfa625a0d9a1c32eaa27cb93))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* change exit code from 0 to 1 in catch ([835bc89](https://github.com/aziontech/vulcan/commit/835bc8920e9228835e87020e8d98b3ba9c366208))
|
|
20
|
+
* custom server code and config file ([#103](https://github.com/aziontech/vulcan/issues/103)) ([340dd11](https://github.com/aziontech/vulcan/commit/340dd11acf0fb5e89e84d83404e0659ffd3f5b42))
|
|
21
|
+
* Next build fix and improvements ([#101](https://github.com/aziontech/vulcan/issues/101)) ([f9100c5](https://github.com/aziontech/vulcan/commit/f9100c5177abae307985257afe471f3538762161))
|
|
22
|
+
* remove local run command message ([2d527b3](https://github.com/aziontech/vulcan/commit/2d527b3bb1b4abe383ce4ca969d70a9f5513c1c9))
|
|
23
|
+
* remove unnecessary Error ([3fdf2d9](https://github.com/aziontech/vulcan/commit/3fdf2d9fa3c4e477296019160d0681e5d7e5408a))
|
|
24
|
+
* response cache and improvements ([#102](https://github.com/aziontech/vulcan/issues/102)) ([ee2da8a](https://github.com/aziontech/vulcan/commit/ee2da8a9ec5ade1b509dfbaf87a01ae8946d6342))
|
|
25
|
+
|
|
26
|
+
### [1.6.4-stage.2](https://github.com/aziontech/vulcan/compare/v1.6.4-stage.1...v1.6.4-stage.2) (2023-09-14)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* Add npm semantic release plugin in plugins list ([703a8ea](https://github.com/aziontech/vulcan/commit/703a8ea0f04f8d1de4489a8dd9f3523566334a4a))
|
|
32
|
+
* Add write permissions in release workflow ([39c1cae](https://github.com/aziontech/vulcan/commit/39c1cae20cc5371a1a7ba49d4754474ee61735d0))
|
|
33
|
+
* permissions in release workflow ([#126](https://github.com/aziontech/vulcan/issues/126)) ([37ebee6](https://github.com/aziontech/vulcan/commit/37ebee608564de0d8903f9b09788c3aaffcd2315))
|
|
34
|
+
* Remove skip ci option in git plugin ([d954fdc](https://github.com/aziontech/vulcan/commit/d954fdc76944c954662e3828054f5b06c854e865))
|
|
35
|
+
* semantic release plugins config ([f7c30a2](https://github.com/aziontech/vulcan/commit/f7c30a26dd7eb0051bf9306be66cbcb78253286a))
|
|
36
|
+
* semantic release plugins config ([#124](https://github.com/aziontech/vulcan/issues/124)) ([89289e0](https://github.com/aziontech/vulcan/commit/89289e066b01880f566d396a2214c528e6db93a3))
|
|
37
|
+
* set correct options in plugins section ([3a0c8f2](https://github.com/aziontech/vulcan/commit/3a0c8f2cf4c70fc70da0c19e6c5172a4bb8aef0a))
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "edge-pages-13-4-8",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build --no-lint",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "next lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@types/node": "20.3.3",
|
|
13
|
+
"@types/react": "18.2.14",
|
|
14
|
+
"@types/react-dom": "18.2.6",
|
|
15
|
+
"autoprefixer": "10.4.14",
|
|
16
|
+
"eslint": "8.44.0",
|
|
17
|
+
"eslint-config-next": "13.4.8",
|
|
18
|
+
"next": "13.4.8",
|
|
19
|
+
"postcss": "8.4.24",
|
|
20
|
+
"react": "18.2.0",
|
|
21
|
+
"react-dom": "18.2.0",
|
|
22
|
+
"tailwindcss": "3.3.2",
|
|
23
|
+
"typescript": "5.1.6"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// middleware.ts
|
|
2
|
+
import { NextResponse } from 'next/server'
|
|
3
|
+
|
|
4
|
+
// This function can be marked `async` if using `await` inside
|
|
5
|
+
export function middleware(request: any) {
|
|
6
|
+
return NextResponse.redirect(new URL('/api/hello', request.url))
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// See "Matching Paths" below to learn more
|
|
10
|
+
export const config = {
|
|
11
|
+
matcher: '/about/:path*',
|
|
12
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Image from 'next/image'
|
|
2
|
+
import { Inter } from 'next/font/google'
|
|
3
|
+
|
|
4
|
+
const inter = Inter({ subsets: ['latin'] })
|
|
5
|
+
|
|
6
|
+
export const config = {
|
|
7
|
+
runtime: "experimental-edge"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const getStaticProps = async ({ params }: any) => {
|
|
11
|
+
const catSlug = params?.catSlug ?? ''
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
props: {
|
|
15
|
+
catSlug
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const getStaticPaths = async () => {
|
|
21
|
+
return {
|
|
22
|
+
paths: [],
|
|
23
|
+
fallback: 'blocking',
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default function Home({ catSlug }: any) {
|
|
28
|
+
return (
|
|
29
|
+
<main
|
|
30
|
+
className={`flex min-h-screen flex-col items-center justify-between p-24 ${inter.className}`}
|
|
31
|
+
>
|
|
32
|
+
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
|
|
33
|
+
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
|
34
|
+
SSR Example
|
|
35
|
+
</p>
|
|
36
|
+
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
|
|
37
|
+
<a
|
|
38
|
+
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
|
|
39
|
+
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
|
|
40
|
+
target="_blank"
|
|
41
|
+
rel="noopener noreferrer"
|
|
42
|
+
>
|
|
43
|
+
By{' '}
|
|
44
|
+
<Image
|
|
45
|
+
src="/vercel.svg"
|
|
46
|
+
alt="Vercel Logo"
|
|
47
|
+
className="dark:invert"
|
|
48
|
+
width={100}
|
|
49
|
+
height={24}
|
|
50
|
+
priority
|
|
51
|
+
/>
|
|
52
|
+
</a>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700/10 after:dark:from-sky-900 after:dark:via-[#0141ff]/40 before:lg:h-[360px]">
|
|
57
|
+
<h3>Slug in /[...catSlug] route: {catSlug}</h3>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left">
|
|
61
|
+
<p></p>
|
|
62
|
+
</div>
|
|
63
|
+
</main>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
1
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Image from 'next/image'
|
|
2
|
+
import { Inter } from 'next/font/google'
|
|
3
|
+
|
|
4
|
+
const inter = Inter({ subsets: ['latin'] })
|
|
5
|
+
|
|
6
|
+
export const config = {
|
|
7
|
+
runtime: "experimental-edge"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const getStaticProps = async ({ params }: any) => {
|
|
11
|
+
const prodSlug = params?.prodSlug ?? ''
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
props: {
|
|
15
|
+
prodSlug
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const getStaticPaths = async () => {
|
|
21
|
+
return {
|
|
22
|
+
paths: [],
|
|
23
|
+
fallback: 'blocking',
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export default function Home({ prodSlug }: any) {
|
|
29
|
+
return (
|
|
30
|
+
<main
|
|
31
|
+
className={`flex min-h-screen flex-col items-center justify-between p-24 ${inter.className}`}
|
|
32
|
+
>
|
|
33
|
+
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
|
|
34
|
+
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
|
35
|
+
SSR Example
|
|
36
|
+
</p>
|
|
37
|
+
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
|
|
38
|
+
<a
|
|
39
|
+
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
|
|
40
|
+
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
|
|
41
|
+
target="_blank"
|
|
42
|
+
rel="noopener noreferrer"
|
|
43
|
+
>
|
|
44
|
+
By{' '}
|
|
45
|
+
<Image
|
|
46
|
+
src="/vercel.svg"
|
|
47
|
+
alt="Vercel Logo"
|
|
48
|
+
className="dark:invert"
|
|
49
|
+
width={100}
|
|
50
|
+
height={24}
|
|
51
|
+
priority
|
|
52
|
+
/>
|
|
53
|
+
</a>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700/10 after:dark:from-sky-900 after:dark:via-[#0141ff]/40 before:lg:h-[360px]">
|
|
58
|
+
<h3>Slug in /[prodSlug]/x route: {prodSlug}</h3>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left">
|
|
62
|
+
<p></p>
|
|
63
|
+
</div>
|
|
64
|
+
</main>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NextApiRequest, NextApiResponse } from 'next'
|
|
2
|
+
|
|
3
|
+
export const config = {
|
|
4
|
+
runtime: "edge"
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type Data = {
|
|
8
|
+
name: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function handler() {
|
|
12
|
+
return new Response(
|
|
13
|
+
JSON.stringify({ name: 'John Doe' }),
|
|
14
|
+
{
|
|
15
|
+
status: 200,
|
|
16
|
+
headers: {
|
|
17
|
+
'Content-Type': 'application/json'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import Image from 'next/image'
|
|
2
|
+
import { Inter } from 'next/font/google'
|
|
3
|
+
|
|
4
|
+
const inter = Inter({ subsets: ['latin'] })
|
|
5
|
+
|
|
6
|
+
export default function Home() {
|
|
7
|
+
return (
|
|
8
|
+
<main
|
|
9
|
+
className={`flex min-h-screen flex-col items-center justify-between p-24 ${inter.className}`}
|
|
10
|
+
>
|
|
11
|
+
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
|
|
12
|
+
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
|
13
|
+
Get started by editing
|
|
14
|
+
<code className="font-mono font-bold">src/pages/index.tsx</code>
|
|
15
|
+
</p>
|
|
16
|
+
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
|
|
17
|
+
<a
|
|
18
|
+
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
|
|
19
|
+
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
|
|
20
|
+
target="_blank"
|
|
21
|
+
rel="noopener noreferrer"
|
|
22
|
+
>
|
|
23
|
+
By{' '}
|
|
24
|
+
<Image
|
|
25
|
+
src="/vercel.svg"
|
|
26
|
+
alt="Vercel Logo"
|
|
27
|
+
className="dark:invert"
|
|
28
|
+
width={100}
|
|
29
|
+
height={24}
|
|
30
|
+
priority
|
|
31
|
+
/>
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700/10 after:dark:from-sky-900 after:dark:via-[#0141ff]/40 before:lg:h-[360px]">
|
|
37
|
+
<Image
|
|
38
|
+
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
|
|
39
|
+
src="/next.svg"
|
|
40
|
+
alt="Next.js Logo"
|
|
41
|
+
width={180}
|
|
42
|
+
height={37}
|
|
43
|
+
priority
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div className="mb-32 grid text-center lg:mb-0 lg:grid-cols-4 lg:text-left">
|
|
48
|
+
<a
|
|
49
|
+
href="/ssr"
|
|
50
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
51
|
+
target="_blank"
|
|
52
|
+
rel="noopener noreferrer"
|
|
53
|
+
>
|
|
54
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
55
|
+
SSR{' '}
|
|
56
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
57
|
+
->
|
|
58
|
+
</span>
|
|
59
|
+
</h2>
|
|
60
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
61
|
+
Edge SSR page example.
|
|
62
|
+
</p>
|
|
63
|
+
</a>
|
|
64
|
+
|
|
65
|
+
<a
|
|
66
|
+
href="/api/hello"
|
|
67
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
68
|
+
target="_blank"
|
|
69
|
+
rel="noopener noreferrer"
|
|
70
|
+
>
|
|
71
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
72
|
+
Edge API Route{' '}
|
|
73
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
74
|
+
->
|
|
75
|
+
</span>
|
|
76
|
+
</h2>
|
|
77
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
78
|
+
Edge API Route example.
|
|
79
|
+
</p>
|
|
80
|
+
</a>
|
|
81
|
+
|
|
82
|
+
<a
|
|
83
|
+
href="/about"
|
|
84
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
85
|
+
target="_blank"
|
|
86
|
+
rel="noopener noreferrer"
|
|
87
|
+
>
|
|
88
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
89
|
+
Middleware{' '}
|
|
90
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
91
|
+
->
|
|
92
|
+
</span>
|
|
93
|
+
</h2>
|
|
94
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
95
|
+
Middleware with redirect example.
|
|
96
|
+
</p>
|
|
97
|
+
</a>
|
|
98
|
+
|
|
99
|
+
<a
|
|
100
|
+
href="/xptz/x"
|
|
101
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
102
|
+
target="_blank"
|
|
103
|
+
rel="noopener noreferrer"
|
|
104
|
+
>
|
|
105
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
106
|
+
Dynamic Route{' '}
|
|
107
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
108
|
+
->
|
|
109
|
+
</span>
|
|
110
|
+
</h2>
|
|
111
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
112
|
+
Dynamic route /[prodSlug]/x.
|
|
113
|
+
</p>
|
|
114
|
+
</a>
|
|
115
|
+
|
|
116
|
+
<a
|
|
117
|
+
href="/abc"
|
|
118
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
119
|
+
target="_blank"
|
|
120
|
+
rel="noopener noreferrer"
|
|
121
|
+
>
|
|
122
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
123
|
+
Dynamic Route{' '}
|
|
124
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
125
|
+
->
|
|
126
|
+
</span>
|
|
127
|
+
</h2>
|
|
128
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
129
|
+
Dynamic route /[...catSlug].
|
|
130
|
+
</p>
|
|
131
|
+
</a>
|
|
132
|
+
</div>
|
|
133
|
+
</main>
|
|
134
|
+
)
|
|
135
|
+
}
|