Removed unnecessary folders from git
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
{
|
||||
"pages": {
|
||||
"/user/register/page": [
|
||||
"static/chunks/webpack.js",
|
||||
"static/chunks/main-app.js",
|
||||
"static/chunks/app/user/register/page.js"
|
||||
],
|
||||
"/layout": [
|
||||
"static/chunks/webpack.js",
|
||||
"static/chunks/main-app.js",
|
||||
"static/css/app/layout.css",
|
||||
"static/chunks/app/layout.js"
|
||||
],
|
||||
"/page": [
|
||||
"static/chunks/webpack.js",
|
||||
"static/chunks/main-app.js",
|
||||
"static/chunks/app/page.js"
|
||||
],
|
||||
"/user/login/page": [
|
||||
"static/chunks/webpack.js",
|
||||
"static/chunks/main-app.js",
|
||||
|
||||
BIN
.next/cache/webpack/client-development/0.pack.gz
vendored
BIN
.next/cache/webpack/client-development/0.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/10.pack.gz
vendored
BIN
.next/cache/webpack/client-development/10.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/2.pack.gz
vendored
BIN
.next/cache/webpack/client-development/2.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/3.pack.gz
vendored
BIN
.next/cache/webpack/client-development/3.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/4.pack.gz
vendored
BIN
.next/cache/webpack/client-development/4.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/5.pack.gz
vendored
BIN
.next/cache/webpack/client-development/5.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/6.pack.gz
vendored
BIN
.next/cache/webpack/client-development/6.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/7.pack.gz
vendored
BIN
.next/cache/webpack/client-development/7.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/8.pack.gz
vendored
BIN
.next/cache/webpack/client-development/8.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/9.pack.gz
vendored
BIN
.next/cache/webpack/client-development/9.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/client-development/index.pack.gz
vendored
BIN
.next/cache/webpack/client-development/index.pack.gz
vendored
Binary file not shown.
Binary file not shown.
BIN
.next/cache/webpack/server-development/0.pack.gz
vendored
BIN
.next/cache/webpack/server-development/0.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/1.pack.gz
vendored
BIN
.next/cache/webpack/server-development/1.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/2.pack.gz
vendored
BIN
.next/cache/webpack/server-development/2.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/3.pack.gz
vendored
BIN
.next/cache/webpack/server-development/3.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/5.pack.gz
vendored
BIN
.next/cache/webpack/server-development/5.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/6.pack.gz
vendored
BIN
.next/cache/webpack/server-development/6.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/7.pack.gz
vendored
BIN
.next/cache/webpack/server-development/7.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/8.pack.gz
vendored
BIN
.next/cache/webpack/server-development/8.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/9.pack.gz
vendored
BIN
.next/cache/webpack/server-development/9.pack.gz
vendored
Binary file not shown.
BIN
.next/cache/webpack/server-development/index.pack.gz
vendored
BIN
.next/cache/webpack/server-development/index.pack.gz
vendored
Binary file not shown.
Binary file not shown.
@ -1,7 +1,6 @@
|
||||
{
|
||||
"/_not-found/page": "app/_not-found/page.js",
|
||||
"/api/login/route": "app/api/login/route.js",
|
||||
"/page": "app/page.js",
|
||||
"/user/login/page": "app/user/login/page.js",
|
||||
"/favicon.ico/route": "app/favicon.ico/route.js"
|
||||
"/api/register/route": "app/api/register/route.js",
|
||||
"/user/register/page": "app/user/register/page.js",
|
||||
"/user/login/page": "app/user/login/page.js"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
{
|
||||
"node": {},
|
||||
"edge": {},
|
||||
"encryptionKey": "sUggF2DLy+5UgTZYgoXKDk9scwy/JruxMKRQimFG28Q="
|
||||
"encryptionKey": "zUki+v7waAQYcCxT42hwSMWBQgxGqn+peHBF5svpzts="
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
75
.next/server/vendor-chunks/react-icons.js
vendored
75
.next/server/vendor-chunks/react-icons.js
vendored
File diff suppressed because one or more lines are too long
@ -130,7 +130,7 @@
|
||||
/******/
|
||||
/******/ /* webpack/runtime/getFullHash */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.h = () => ("df5c3896f86fac9d")
|
||||
/******/ __webpack_require__.h = () => ("a3b9052f3336e3f8")
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,28 +0,0 @@
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([["app/page"],{
|
||||
|
||||
/***/ "(app-pages-browser)/./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?server=false!":
|
||||
/*!*******************************************************************************************************!*\
|
||||
!*** ./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?server=false! ***!
|
||||
\*******************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
||||
/******/ __webpack_require__.O(0, ["main-app"], function() { return __webpack_exec__("(app-pages-browser)/./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?server=false!"); });
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O();
|
||||
/******/ _N_E = __webpack_exports__;
|
||||
/******/ }
|
||||
]);
|
||||
File diff suppressed because one or more lines are too long
@ -192,7 +192,7 @@
|
||||
/******/
|
||||
/******/ /* webpack/runtime/getFullHash */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.h = function() { return "0c2f6d85439902ef"; }
|
||||
/******/ __webpack_require__.h = function() { return "f6873382f746d9dc"; }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/global */
|
||||
|
||||
@ -1 +0,0 @@
|
||||
{"c":["app/layout","webpack"],"r":[],"m":[]}
|
||||
@ -1 +0,0 @@
|
||||
{"c":["app/layout","webpack"],"r":["app/_not-found/page"],"m":["(app-pages-browser)/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2Fhome%2Fnextjs%2Fscrap%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fnot-found-error.js&page=%2F_not-found%2Fpage!","(app-pages-browser)/./node_modules/next/dist/client/components/not-found-error.js"]}
|
||||
@ -1 +0,0 @@
|
||||
{"c":["webpack"],"r":[],"m":[]}
|
||||
@ -1 +0,0 @@
|
||||
{"c":["webpack"],"r":[],"m":[]}
|
||||
@ -1,22 +0,0 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
self["webpackHotUpdate_N_E"]("app/layout",{
|
||||
|
||||
/***/ "(app-pages-browser)/./src/app/globals.css":
|
||||
/*!*****************************!*\
|
||||
!*** ./src/app/globals.css ***!
|
||||
\*****************************/
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"98f12e89e093\");\nif (true) { module.hot.accept() }\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1wYWdlcy1icm93c2VyKS8uL3NyYy9hcHAvZ2xvYmFscy5jc3MiLCJtYXBwaW5ncyI6IjtBQUFBLCtEQUFlLGNBQWM7QUFDN0IsSUFBSSxJQUFVLElBQUksaUJBQWlCIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL3NyYy9hcHAvZ2xvYmFscy5jc3M/M2NhOSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBcIjk4ZjEyZTg5ZTA5M1wiXG5pZiAobW9kdWxlLmhvdCkgeyBtb2R1bGUuaG90LmFjY2VwdCgpIH1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-pages-browser)/./src/app/globals.css\n"));
|
||||
|
||||
/***/ })
|
||||
|
||||
});
|
||||
@ -1,22 +0,0 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
self["webpackHotUpdate_N_E"]("app/layout",{
|
||||
|
||||
/***/ "(app-pages-browser)/./src/app/globals.css":
|
||||
/*!*****************************!*\
|
||||
!*** ./src/app/globals.css ***!
|
||||
\*****************************/
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"4666e09fcc48\");\nif (true) { module.hot.accept() }\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFwcC1wYWdlcy1icm93c2VyKS8uL3NyYy9hcHAvZ2xvYmFscy5jc3MiLCJtYXBwaW5ncyI6IjtBQUFBLCtEQUFlLGNBQWM7QUFDN0IsSUFBSSxJQUFVLElBQUksaUJBQWlCIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL3NyYy9hcHAvZ2xvYmFscy5jc3M/M2NhOSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBcIjQ2NjZlMDlmY2M0OFwiXG5pZiAobW9kdWxlLmhvdCkgeyBtb2R1bGUuaG90LmFjY2VwdCgpIH1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(app-pages-browser)/./src/app/globals.css\n"));
|
||||
|
||||
/***/ })
|
||||
|
||||
});
|
||||
@ -1 +0,0 @@
|
||||
{"c":["webpack"],"r":[],"m":[]}
|
||||
@ -1 +0,0 @@
|
||||
{"c":["webpack"],"r":[],"m":[]}
|
||||
@ -1,18 +0,0 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
self["webpackHotUpdate_N_E"]("webpack",{},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ /* webpack/runtime/getFullHash */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.h = function() { return "54731c7f3d79ae78"; }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ }
|
||||
);
|
||||
@ -1,18 +0,0 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
self["webpackHotUpdate_N_E"]("webpack",{},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ /* webpack/runtime/getFullHash */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.h = function() { return "e3afe877bbd6d342"; }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ }
|
||||
);
|
||||
@ -1,30 +0,0 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
self["webpackHotUpdate_N_E"]("webpack",{},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ !function() {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function() { return module['default']; } :
|
||||
/******/ function() { return module; };
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/getFullHash */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.h = function() { return "d816c3d3e48f3cf3"; }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ }
|
||||
);
|
||||
@ -1,48 +0,0 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
self["webpackHotUpdate_N_E"]("webpack",{},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ /* webpack/runtime/create fake namespace object */
|
||||
/******/ !function() {
|
||||
/******/ var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };
|
||||
/******/ var leafPrototypes;
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 16: return value when it's Promise-like
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = this(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if(typeof value === 'object' && value) {
|
||||
/******/ if((mode & 4) && value.__esModule) return value;
|
||||
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
||||
/******/ }
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ var def = {};
|
||||
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
||||
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
||||
/******/ Object.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });
|
||||
/******/ }
|
||||
/******/ def['default'] = function() { return value; };
|
||||
/******/ __webpack_require__.d(ns, def);
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/getFullHash */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.h = function() { return "1db3935217c69e2e"; }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ }
|
||||
);
|
||||
@ -1,18 +0,0 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
self["webpackHotUpdate_N_E"]("webpack",{},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ /* webpack/runtime/getFullHash */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.h = function() { return "0c2f6d85439902ef"; }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ }
|
||||
);
|
||||
@ -1,18 +0,0 @@
|
||||
"use strict";
|
||||
/*
|
||||
* ATTENTION: An "eval-source-map" devtool has been used.
|
||||
* This devtool is neither made for production nor for readable output files.
|
||||
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||||
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||||
* or disable the default devtool with "devtool: false".
|
||||
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||||
*/
|
||||
self["webpackHotUpdate_N_E"]("webpack",{},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ /* webpack/runtime/getFullHash */
|
||||
/******/ !function() {
|
||||
/******/ __webpack_require__.h = function() { return "7c4e02af7e461b92"; }
|
||||
/******/ }();
|
||||
/******/
|
||||
/******/ }
|
||||
);
|
||||
18
.next/trace
18
.next/trace
File diff suppressed because one or more lines are too long
@ -1,343 +0,0 @@
|
||||
// File: /home/nextjs/scrap/src/app/api/login/route.ts
|
||||
import * as entry from '../../../../../src/app/api/login/route.js'
|
||||
import type { NextRequest } from 'next/server.js'
|
||||
|
||||
type TEntry = typeof import('../../../../../src/app/api/login/route.js')
|
||||
|
||||
// Check that the entry is a valid entry
|
||||
checkFields<Diff<{
|
||||
GET?: Function
|
||||
HEAD?: Function
|
||||
OPTIONS?: Function
|
||||
POST?: Function
|
||||
PUT?: Function
|
||||
DELETE?: Function
|
||||
PATCH?: Function
|
||||
config?: {}
|
||||
generateStaticParams?: Function
|
||||
revalidate?: RevalidateRange<TEntry> | false
|
||||
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
||||
dynamicParams?: boolean
|
||||
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
||||
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
||||
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
||||
maxDuration?: number
|
||||
|
||||
}, TEntry, ''>>()
|
||||
|
||||
// Check the prop type of the entry function
|
||||
if ('GET' in entry) {
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<Request | NextRequest>,
|
||||
{
|
||||
__tag__: 'GET'
|
||||
__param_position__: 'first'
|
||||
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
||||
},
|
||||
'GET'
|
||||
>
|
||||
>()
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<PageParams>,
|
||||
{
|
||||
__tag__: 'GET'
|
||||
__param_position__: 'second'
|
||||
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
||||
},
|
||||
'GET'
|
||||
>
|
||||
>()
|
||||
|
||||
checkFields<
|
||||
Diff<
|
||||
{
|
||||
__tag__: 'GET',
|
||||
__return_type__: Response | void | never | Promise<Response | void | never>
|
||||
},
|
||||
{
|
||||
__tag__: 'GET',
|
||||
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
||||
},
|
||||
'GET'
|
||||
>
|
||||
>()
|
||||
}
|
||||
// Check the prop type of the entry function
|
||||
if ('HEAD' in entry) {
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<Request | NextRequest>,
|
||||
{
|
||||
__tag__: 'HEAD'
|
||||
__param_position__: 'first'
|
||||
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
||||
},
|
||||
'HEAD'
|
||||
>
|
||||
>()
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<PageParams>,
|
||||
{
|
||||
__tag__: 'HEAD'
|
||||
__param_position__: 'second'
|
||||
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
||||
},
|
||||
'HEAD'
|
||||
>
|
||||
>()
|
||||
|
||||
checkFields<
|
||||
Diff<
|
||||
{
|
||||
__tag__: 'HEAD',
|
||||
__return_type__: Response | void | never | Promise<Response | void | never>
|
||||
},
|
||||
{
|
||||
__tag__: 'HEAD',
|
||||
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
||||
},
|
||||
'HEAD'
|
||||
>
|
||||
>()
|
||||
}
|
||||
// Check the prop type of the entry function
|
||||
if ('OPTIONS' in entry) {
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<Request | NextRequest>,
|
||||
{
|
||||
__tag__: 'OPTIONS'
|
||||
__param_position__: 'first'
|
||||
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
||||
},
|
||||
'OPTIONS'
|
||||
>
|
||||
>()
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<PageParams>,
|
||||
{
|
||||
__tag__: 'OPTIONS'
|
||||
__param_position__: 'second'
|
||||
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
||||
},
|
||||
'OPTIONS'
|
||||
>
|
||||
>()
|
||||
|
||||
checkFields<
|
||||
Diff<
|
||||
{
|
||||
__tag__: 'OPTIONS',
|
||||
__return_type__: Response | void | never | Promise<Response | void | never>
|
||||
},
|
||||
{
|
||||
__tag__: 'OPTIONS',
|
||||
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
||||
},
|
||||
'OPTIONS'
|
||||
>
|
||||
>()
|
||||
}
|
||||
// Check the prop type of the entry function
|
||||
if ('POST' in entry) {
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<Request | NextRequest>,
|
||||
{
|
||||
__tag__: 'POST'
|
||||
__param_position__: 'first'
|
||||
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
||||
},
|
||||
'POST'
|
||||
>
|
||||
>()
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<PageParams>,
|
||||
{
|
||||
__tag__: 'POST'
|
||||
__param_position__: 'second'
|
||||
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
||||
},
|
||||
'POST'
|
||||
>
|
||||
>()
|
||||
|
||||
checkFields<
|
||||
Diff<
|
||||
{
|
||||
__tag__: 'POST',
|
||||
__return_type__: Response | void | never | Promise<Response | void | never>
|
||||
},
|
||||
{
|
||||
__tag__: 'POST',
|
||||
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
||||
},
|
||||
'POST'
|
||||
>
|
||||
>()
|
||||
}
|
||||
// Check the prop type of the entry function
|
||||
if ('PUT' in entry) {
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<Request | NextRequest>,
|
||||
{
|
||||
__tag__: 'PUT'
|
||||
__param_position__: 'first'
|
||||
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
||||
},
|
||||
'PUT'
|
||||
>
|
||||
>()
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<PageParams>,
|
||||
{
|
||||
__tag__: 'PUT'
|
||||
__param_position__: 'second'
|
||||
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
||||
},
|
||||
'PUT'
|
||||
>
|
||||
>()
|
||||
|
||||
checkFields<
|
||||
Diff<
|
||||
{
|
||||
__tag__: 'PUT',
|
||||
__return_type__: Response | void | never | Promise<Response | void | never>
|
||||
},
|
||||
{
|
||||
__tag__: 'PUT',
|
||||
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
||||
},
|
||||
'PUT'
|
||||
>
|
||||
>()
|
||||
}
|
||||
// Check the prop type of the entry function
|
||||
if ('DELETE' in entry) {
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<Request | NextRequest>,
|
||||
{
|
||||
__tag__: 'DELETE'
|
||||
__param_position__: 'first'
|
||||
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
||||
},
|
||||
'DELETE'
|
||||
>
|
||||
>()
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<PageParams>,
|
||||
{
|
||||
__tag__: 'DELETE'
|
||||
__param_position__: 'second'
|
||||
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
||||
},
|
||||
'DELETE'
|
||||
>
|
||||
>()
|
||||
|
||||
checkFields<
|
||||
Diff<
|
||||
{
|
||||
__tag__: 'DELETE',
|
||||
__return_type__: Response | void | never | Promise<Response | void | never>
|
||||
},
|
||||
{
|
||||
__tag__: 'DELETE',
|
||||
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
||||
},
|
||||
'DELETE'
|
||||
>
|
||||
>()
|
||||
}
|
||||
// Check the prop type of the entry function
|
||||
if ('PATCH' in entry) {
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<Request | NextRequest>,
|
||||
{
|
||||
__tag__: 'PATCH'
|
||||
__param_position__: 'first'
|
||||
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
||||
},
|
||||
'PATCH'
|
||||
>
|
||||
>()
|
||||
checkFields<
|
||||
Diff<
|
||||
ParamCheck<PageParams>,
|
||||
{
|
||||
__tag__: 'PATCH'
|
||||
__param_position__: 'second'
|
||||
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
||||
},
|
||||
'PATCH'
|
||||
>
|
||||
>()
|
||||
|
||||
checkFields<
|
||||
Diff<
|
||||
{
|
||||
__tag__: 'PATCH',
|
||||
__return_type__: Response | void | never | Promise<Response | void | never>
|
||||
},
|
||||
{
|
||||
__tag__: 'PATCH',
|
||||
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
||||
},
|
||||
'PATCH'
|
||||
>
|
||||
>()
|
||||
}
|
||||
|
||||
// Check the arguments and return type of the generateStaticParams function
|
||||
if ('generateStaticParams' in entry) {
|
||||
checkFields<Diff<{ params: PageParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
||||
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
||||
}
|
||||
|
||||
type PageParams = any
|
||||
export interface PageProps {
|
||||
params?: any
|
||||
searchParams?: any
|
||||
}
|
||||
export interface LayoutProps {
|
||||
children?: React.ReactNode
|
||||
|
||||
params?: any
|
||||
}
|
||||
|
||||
// =============
|
||||
// Utility types
|
||||
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
||||
|
||||
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
||||
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
||||
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
||||
|
||||
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
||||
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
||||
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
||||
|
||||
type ParamCheck<T> = {
|
||||
__tag__: string
|
||||
__param_position__: string
|
||||
__param_type__: T
|
||||
}
|
||||
|
||||
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
||||
|
||||
// https://github.com/sindresorhus/type-fest
|
||||
type Numeric = number | bigint
|
||||
type Zero = 0 | 0n
|
||||
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
||||
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
||||
@ -1,79 +0,0 @@
|
||||
// File: /home/nextjs/scrap/src/app/page.tsx
|
||||
import * as entry from '../../../src/app/page.js'
|
||||
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
||||
|
||||
type TEntry = typeof import('../../../src/app/page.js')
|
||||
|
||||
// Check that the entry is a valid entry
|
||||
checkFields<Diff<{
|
||||
default: Function
|
||||
config?: {}
|
||||
generateStaticParams?: Function
|
||||
revalidate?: RevalidateRange<TEntry> | false
|
||||
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
||||
dynamicParams?: boolean
|
||||
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
||||
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
||||
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
||||
maxDuration?: number
|
||||
|
||||
metadata?: any
|
||||
generateMetadata?: Function
|
||||
viewport?: any
|
||||
generateViewport?: Function
|
||||
|
||||
}, TEntry, ''>>()
|
||||
|
||||
// Check the prop type of the entry function
|
||||
checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
|
||||
|
||||
// Check the arguments and return type of the generateMetadata function
|
||||
if ('generateMetadata' in entry) {
|
||||
checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
|
||||
checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
|
||||
}
|
||||
|
||||
// Check the arguments and return type of the generateViewport function
|
||||
if ('generateViewport' in entry) {
|
||||
checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
|
||||
checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
|
||||
}
|
||||
|
||||
// Check the arguments and return type of the generateStaticParams function
|
||||
if ('generateStaticParams' in entry) {
|
||||
checkFields<Diff<{ params: PageParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
||||
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
||||
}
|
||||
|
||||
type PageParams = any
|
||||
export interface PageProps {
|
||||
params?: any
|
||||
searchParams?: any
|
||||
}
|
||||
export interface LayoutProps {
|
||||
children?: React.ReactNode
|
||||
|
||||
params?: any
|
||||
}
|
||||
|
||||
// =============
|
||||
// Utility types
|
||||
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
||||
|
||||
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
||||
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
||||
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
||||
|
||||
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
||||
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
||||
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
||||
|
||||
|
||||
|
||||
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
||||
|
||||
// https://github.com/sindresorhus/type-fest
|
||||
type Numeric = number | bigint
|
||||
type Zero = 0 | 0n
|
||||
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
||||
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
||||
Reference in New Issue
Block a user