discord.js/patches/next@14.0.2-canary.20.patch
Qjuh da455bceea
feat: mainlib docs on new website (#9930)
* fix(ExceptText): don't display import("d..-types/v10"). in return type

* Squashed 'packages/api-extractor-model/' content from commit 39ecb196c

git-subtree-dir: packages/api-extractor-model
git-subtree-split: 39ecb196ca210bdf84ba6c9cadb1bb93571849d7

* Squashed 'packages/api-extractor/' content from commit 341ad6c51

git-subtree-dir: packages/api-extractor
git-subtree-split: 341ad6c51b01656d4f73b74ad4bdb3095f9262c4

* feat(api-extractor): add api-extractor and -model

* fix: package.json docs script

* fix(SourcLink): use <> instead of function syntax

* fix: make packages private

* fix: rest params showing in docs, added labels

* fix: missed two files

* feat: merge docs.json from docgen and docs.api.json

* fix: cpy-cli & pnpm-lock

* fix: increase icon size

* fix: icon size again

* feat: run both docs on mainlib

* chore: website fixes

* fix: more website fixes

* fix: tests and dev database script

* chore: comment out old docs

* fix: increase max fetch cache

* fix: env should always be a string

* fix: try to reapply patches

* fix: remove prepare for docgen

* fix: temporary cosmetic fixes

* fix: horizontal scroll

* feat: generate index for new docs

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
2023-11-08 10:16:54 +01:00

36 lines
2 KiB
Diff

diff --git a/dist/esm/server/lib/incremental-cache/index.js b/dist/esm/server/lib/incremental-cache/index.js
index 93519fc1e45361f153edd1f4496ca4a006745e8f..8d603be638c297db9593ae9fa92ec5359d38f823 100644
--- a/dist/esm/server/lib/incremental-cache/index.js
+++ b/dist/esm/server/lib/incremental-cache/index.js
@@ -348,10 +348,11 @@ export class IncrementalCache {
});
}
if (this.dev && !ctx.fetchCache) return;
+ const max_fetch_size = Number(process.env.MAX_FETCH_SIZE) || 5 // gets value set in next.config
// fetchCache has upper limit of 2MB per-entry currently
- if (ctx.fetchCache && JSON.stringify(data).length > 2 * 1024 * 1024) {
+ if (ctx.fetchCache && JSON.stringify(data).length > max_fetch_size * 1024 * 1024) {
if (this.dev) {
- throw new Error(`fetch for over 2MB of data can not be cached`);
+ throw new Error(`fetch for over ${max_fetch_size}MB of data can not be cached`);
}
return;
}
diff --git a/dist/server/lib/incremental-cache/index.js b/dist/server/lib/incremental-cache/index.js
index 83e061e5a072d253c2db7ea5e796307070cb1f81..5f9a462e3e12965a49ab6419b19ef2fa0aae7fe6 100644
--- a/dist/server/lib/incremental-cache/index.js
+++ b/dist/server/lib/incremental-cache/index.js
@@ -375,10 +375,11 @@ class IncrementalCache {
});
}
if (this.dev && !ctx.fetchCache) return;
+ const max_fetch_size = Number(process.env.MAX_FETCH_SIZE) || 5 //gets value set in next.config
// fetchCache has upper limit of 2MB per-entry currently
- if (ctx.fetchCache && JSON.stringify(data).length > 2 * 1024 * 1024) {
+ if (ctx.fetchCache && JSON.stringify(data).length > max_fetch_size * 1024 * 1024) {
if (this.dev) {
- throw new Error(`fetch for over 2MB of data can not be cached`);
+ throw new Error(`fetch for over ${max_fetch_size}MB of data can not be cached`);
}
return;
}