/opt/canhelp/node_modules/next/dist/esm/lib
NameSizeModeActions
eslint/-0755rm
framework/-0755rm
fs/-0755rm
helpers/-0755rm
memory/-0755rm
metadata/-0755rm
typescript/-0755rm
batcher.js20580644editdlrm
batcher.js.map42230644editdlrm
build-custom-route.js9030644editdlrm
build-custom-route.js.map24250644editdlrm
client-and-server-references.js6940644editdlrm
client-and-server-references.js.map16700644editdlrm
coalesced-function.js8680644editdlrm
coalesced-function.js.map20030644editdlrm
compile-error.js860644editdlrm
compile-error.js.map2160644editdlrm
constants.js83860644editdlrm
constants.js.map135700644editdlrm
create-client-router-filter.js21660644editdlrm
create-client-router-filter.js.map40100644editdlrm
default-transpiled-packages.json100644editdlrm
detached-promise.js6790644editdlrm
detached-promise.js.map12830644editdlrm
detect-typo.js13190644editdlrm
detect-typo.js.map27740644editdlrm
download-swc.js48300644editdlrm
download-swc.js.map82020644editdlrm
error-telemetry-utils.js13910644editdlrm
error-telemetry-utils.js.map23800644editdlrm
fallback.js29330644editdlrm
fallback.js.map38460644editdlrm
fatal-error.js820644editdlrm
fatal-error.js.map2100644editdlrm
file-exists.js8140644editdlrm
file-exists.js.map14470644editdlrm
find-config.js29380644editdlrm
find-config.js.map50320644editdlrm
find-pages-dir.js8810644editdlrm
find-pages-dir.js.map15600644editdlrm
find-root.js25100644editdlrm
find-root.js.map42820644editdlrm
format-cli-help-output.js25780644editdlrm
format-cli-help-output.js.map49000644editdlrm
format-dynamic-import-path.js7060644editdlrm
format-dynamic-import-path.js.map11890644editdlrm
format-server-error.js24070644editdlrm
format-server-error.js.map37500644editdlrm
generate-interception-routes-rewrites.js26510644editdlrm
generate-interception-routes-rewrites.js.map43580644editdlrm
get-files-in-dir.js5100644editdlrm
get-files-in-dir.js.map11780644editdlrm
get-network-host.js10440644editdlrm
get-network-host.js.map19160644editdlrm
get-package-version.js15470644editdlrm
get-package-version.js.map31930644editdlrm
get-project-dir.js14650644editdlrm
get-project-dir.js.map23940644editdlrm
has-necessary-dependencies.js13570644editdlrm
has-necessary-dependencies.js.map37320644editdlrm
import-next-warning.js3220644editdlrm
import-next-warning.js.map5060644editdlrm
inline-static-env.js39780644editdlrm
inline-static-env.js.map71300644editdlrm
install-dependencies.js8860644editdlrm
install-dependencies.js.map19680644editdlrm
interop-default.js1150644editdlrm
interop-default.js.map2930644editdlrm
is-api-route.js1710644editdlrm
is-api-route.js.map3630644editdlrm
is-app-page-route.js1240644editdlrm
is-app-page-route.js.map3160644editdlrm
is-app-route-route.js1270644editdlrm
is-app-route-route.js.map3220644editdlrm
is-edge-runtime.js2180644editdlrm
is-edge-runtime.js.map5710644editdlrm
is-error.js19320644editdlrm
is-error.js.map28310644editdlrm
is-internal-component.js3870644editdlrm
is-internal-component.js.map6980644editdlrm
is-serializable-props.js41650644editdlrm
is-serializable-props.js.map64740644editdlrm
known-edge-safe-packages.json180644editdlrm
load-custom-routes.js221900644editdlrm
load-custom-routes.js.map386290644editdlrm
mime-type.js2240644editdlrm
mime-type.js.map4480644editdlrm
mkcert.js60370644editdlrm
mkcert.js.map96840644editdlrm
multi-file-writer.js24190644editdlrm
multi-file-writer.js.map42030644editdlrm
needs-experimental-react.js2580644editdlrm
needs-experimental-react.js.map6800644editdlrm
non-nullable.js1300644editdlrm
non-nullable.js.map3350644editdlrm
normalize-path.js1720644editdlrm
normalize-path.js.map4260644editdlrm
oxford-comma-list.js2330644editdlrm
oxford-comma-list.js.map7010644editdlrm
page-types.js2290644editdlrm
page-types.js.map2620644editdlrm
patch-incorrect-lockfile.js53600644editdlrm
patch-incorrect-lockfile.js.map92290644editdlrm
pick.js1780644editdlrm
pick.js.map4960644editdlrm
picocolors.js33720644editdlrm
picocolors.js.map60240644editdlrm
pretty-bytes.js28640644editdlrm
pretty-bytes.js.map41280644editdlrm
realpath.js5090644editdlrm
realpath.js.map8370644editdlrm
recursive-copy.js23780644editdlrm
recursive-copy.js.map44830644editdlrm
recursive-delete.js22260644editdlrm
recursive-delete.js.map41960644editdlrm
recursive-readdir.js52300644editdlrm
recursive-readdir.js.map84950644editdlrm
redirect-status.js8340644editdlrm
redirect-status.js.map17850644editdlrm
require-instrumentation-client.js12780644editdlrm
require-instrumentation-client.js.map19470644editdlrm
resolve-from.js16890644editdlrm
resolve-from.js.map26450644editdlrm
route-pattern-normalizer.js44320644editdlrm
route-pattern-normalizer.js.map65670644editdlrm
scheduler.js23320644editdlrm
scheduler.js.map34640644editdlrm
semver-noop.js2710644editdlrm
semver-noop.js.map4360644editdlrm
server-external-packages.json12810644editdlrm
setup-exception-listeners.js2780644editdlrm
setup-exception-listeners.js.map5900644editdlrm
static-env.js21120644editdlrm
static-env.js.map37930644editdlrm
try-to-parse-path.js24520644editdlrm
try-to-parse-path.js.map44780644editdlrm
turbopack-warning.js69480644editdlrm
turbopack-warning.js.map116590644editdlrm
url.js13220644editdlrm
url.js.map28840644editdlrm
verify-partytown-setup.js28420644editdlrm
verify-partytown-setup.js.map50880644editdlrm
verify-root-layout.js37940644editdlrm
verify-root-layout.js.map66280644editdlrm
verify-typescript-setup.js52820644editdlrm
verify-typescript-setup.js.map90110644editdlrm
verifyAndLint.js26940644editdlrm
verifyAndLint.js.map47470644editdlrm
wait.js2480644editdlrm
wait.js.map4780644editdlrm
with-promise-cache.js3800644editdlrm
with-promise-cache.js.map13790644editdlrm
worker.js79810644editdlrm
worker.js.map131850644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/lib/batcher.js.map (4223B)
{"version":3,"sources":["../../src/lib/batcher.ts"],"sourcesContent":["import type { SchedulerFn } from './scheduler'\n\nimport { DetachedPromise } from './detached-promise'\n\ntype CacheKeyFn = (\n key: K\n) => PromiseLike | C\n\ntype BatcherOptions = {\n cacheKeyFn?: CacheKeyFn\n schedulerFn?: SchedulerFn\n}\n\ntype WorkFn = (\n key: C,\n resolve: (value: V | PromiseLike) => void\n) => Promise\n\n/**\n * A wrapper for a function that will only allow one call to the function to\n * execute at a time.\n */\nexport class Batcher {\n private readonly pending = new Map>()\n\n protected constructor(\n private readonly cacheKeyFn?: CacheKeyFn,\n /**\n * A function that will be called to schedule the wrapped function to be\n * executed. This defaults to a function that will execute the function\n * immediately.\n */\n private readonly schedulerFn: SchedulerFn = (fn) => fn()\n ) {}\n\n /**\n * Creates a new instance of PendingWrapper. If the key extends a string or\n * number, the key will be used as the cache key. If the key is an object, a\n * cache key function must be provided.\n */\n public static create(\n options?: BatcherOptions\n ): Batcher\n public static create(\n options: BatcherOptions &\n Required, 'cacheKeyFn'>>\n ): Batcher\n public static create(\n options?: BatcherOptions\n ): Batcher {\n return new Batcher(options?.cacheKeyFn, options?.schedulerFn)\n }\n\n /**\n * Wraps a function in a promise that will be resolved or rejected only once\n * for a given key. This will allow multiple calls to the function to be\n * made, but only one will be executed at a time. The result of the first\n * call will be returned to all callers.\n *\n * @param key the key to use for the cache\n * @param fn the function to wrap\n * @returns a promise that resolves to the result of the function\n */\n public async batch(key: K, fn: WorkFn): Promise {\n const cacheKey = (this.cacheKeyFn ? await this.cacheKeyFn(key) : key) as C\n if (cacheKey === null) {\n return fn(cacheKey, Promise.resolve)\n }\n\n const pending = this.pending.get(cacheKey)\n if (pending) return pending\n\n const { promise, resolve, reject } = new DetachedPromise()\n this.pending.set(cacheKey, promise)\n\n this.schedulerFn(async () => {\n try {\n const result = await fn(cacheKey, resolve)\n\n // Resolving a promise multiple times is a no-op, so we can safely\n // resolve all pending promises with the same result.\n resolve(result)\n } catch (err) {\n reject(err)\n } finally {\n this.pending.delete(cacheKey)\n }\n })\n\n return promise\n }\n}\n"],"names":["DetachedPromise","Batcher","cacheKeyFn","schedulerFn","fn","pending","Map","create","options","batch","key","cacheKey","Promise","resolve","get","promise","reject","set","result","err","delete"],"mappings":"AAEA,SAASA,eAAe,QAAQ,qBAAoB;AAgBpD;;;CAGC,GACD,OAAO,MAAMC;IAGX,YACE,AAAiBC,UAA6B,EAC9C;;;;KAIC,GACD,AAAiBC,cAAiC,CAACC,KAAOA,IAAI,CAC9D;aAPiBF,aAAAA;aAMAC,cAAAA;aATFE,UAAU,IAAIC;IAU5B;IAcH,OAAcC,OACZC,OAA8B,EACZ;QAClB,OAAO,IAAIP,QAAiBO,2BAAAA,QAASN,UAAU,EAAEM,2BAAAA,QAASL,WAAW;IACvE;IAEA;;;;;;;;;GASC,GACD,MAAaM,MAAMC,GAAM,EAAEN,EAAgB,EAAc;QACvD,MAAMO,WAAY,IAAI,CAACT,UAAU,GAAG,MAAM,IAAI,CAACA,UAAU,CAACQ,OAAOA;QACjE,IAAIC,aAAa,MAAM;YACrB,OAAOP,GAAGO,UAAUC,QAAQC,OAAO;QACrC;QAEA,MAAMR,UAAU,IAAI,CAACA,OAAO,CAACS,GAAG,CAACH;QACjC,IAAIN,SAAS,OAAOA;QAEpB,MAAM,EAAEU,OAAO,EAAEF,OAAO,EAAEG,MAAM,EAAE,GAAG,IAAIhB;QACzC,IAAI,CAACK,OAAO,CAACY,GAAG,CAACN,UAAUI;QAE3B,IAAI,CAACZ,WAAW,CAAC;YACf,IAAI;gBACF,MAAMe,SAAS,MAAMd,GAAGO,UAAUE;gBAElC,kEAAkE;gBAClE,qDAAqD;gBACrDA,QAAQK;YACV,EAAE,OAAOC,KAAK;gBACZH,OAAOG;YACT,SAAU;gBACR,IAAI,CAACd,OAAO,CAACe,MAAM,CAACT;YACtB;QACF;QAEA,OAAOI;IACT;AACF","ignoreList":[0]}