main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
if (process.env.NEXT_RUNTIME === "edge") {
module.exports = require("next/dist/server/future/route-modules/pages-api/module.js");
} else {
if (process.env.NODE_ENV === "development") {
module.exports = require("next/dist/compiled/next-server/pages-api.runtime.dev.js");
} else if (process.env.TURBOPACK) {
module.exports = require("next/dist/compiled/next-server/pages-api-turbo.runtime.prod.js");
} else {
module.exports = require("next/dist/compiled/next-server/pages-api.runtime.prod.js");
}
}
//# sourceMappingURL=module.compiled.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../../src/server/future/route-modules/pages-api/module.compiled.ts"],"names":["process","env","NEXT_RUNTIME","module","exports","require","NODE_ENV","TURBOPACK"],"mappings":"AAAA,IAAIA,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;IACvCC,OAAOC,OAAO,GAAGC,QAAQ;AAC3B,OAAO;IACL,IAAIL,QAAQC,GAAG,CAACK,QAAQ,KAAK,eAAe;QAC1CH,OAAOC,OAAO,GAAGC,QAAQ;IAC3B,OAAO,IAAIL,QAAQC,GAAG,CAACM,SAAS,EAAE;QAChCJ,OAAOC,OAAO,GAAGC,QAAQ;IAC3B,OAAO;QACLF,OAAOC,OAAO,GAAGC,QAAQ;IAC3B;AACF"}

View File

@@ -0,0 +1,27 @@
import { RouteModule } from "../route-module";
import { apiResolver } from "../../../api-utils/node";
export class PagesAPIRouteModule extends RouteModule {
constructor(options){
super(options);
if (typeof options.userland.default !== "function") {
throw new Error(`Page ${options.definition.page} does not export a default function.`);
}
}
/**
*
* @param req the incoming server request
* @param res the outgoing server response
* @param context the context for the render
*/ async render(req, res, context) {
await apiResolver(req, res, context.query, this.userland, {
...context.previewProps,
revalidate: context.revalidate,
trustHostHeader: context.trustHostHeader,
allowedRevalidateHeaderKeys: context.allowedRevalidateHeaderKeys,
hostname: context.hostname
}, context.minimalMode, context.dev, context.page);
}
}
export default PagesAPIRouteModule;
//# sourceMappingURL=module.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../../src/server/future/route-modules/pages-api/module.ts"],"names":["RouteModule","apiResolver","PagesAPIRouteModule","constructor","options","userland","default","Error","definition","page","render","req","res","context","query","previewProps","revalidate","trustHostHeader","allowedRevalidateHeaderKeys","hostname","minimalMode","dev"],"mappings":"AAKA,SACEA,WAAW,QAGN,kBAAiB;AACxB,SAASC,WAAW,QAAQ,0BAAyB;AAwFrD,OAAO,MAAMC,4BAA4BF;IAIvCG,YAAYC,OAAmC,CAAE;QAC/C,KAAK,CAACA;QAEN,IAAI,OAAOA,QAAQC,QAAQ,CAACC,OAAO,KAAK,YAAY;YAClD,MAAM,IAAIC,MACR,CAAC,KAAK,EAAEH,QAAQI,UAAU,CAACC,IAAI,CAAC,oCAAoC,CAAC;QAEzE;IACF;IAEA;;;;;GAKC,GACD,MAAaC,OACXC,GAAoB,EACpBC,GAAmB,EACnBC,OAAoC,EACrB;QACf,MAAMZ,YACJU,KACAC,KACAC,QAAQC,KAAK,EACb,IAAI,CAACT,QAAQ,EACb;YACE,GAAGQ,QAAQE,YAAY;YACvBC,YAAYH,QAAQG,UAAU;YAC9BC,iBAAiBJ,QAAQI,eAAe;YACxCC,6BAA6BL,QAAQK,2BAA2B;YAChEC,UAAUN,QAAQM,QAAQ;QAC5B,GACAN,QAAQO,WAAW,EACnBP,QAAQQ,GAAG,EACXR,QAAQJ,IAAI;IAEhB;AACF;AAEA,eAAeP,oBAAmB"}