@netlify/plugin-nextjs 4.41.3 → 5.0.0-beta.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/README.md +61 -17
- package/dist/build/cache.js +15 -0
- package/dist/build/content/prerendered.js +16 -0
- package/dist/build/content/server.js +18 -0
- package/dist/build/content/static.js +20 -0
- package/dist/build/functions/edge.js +14 -0
- package/dist/build/functions/server.js +16 -0
- package/dist/build/plugin-context.js +17 -0
- package/dist/esm-chunks/chunk-4AJYXTWN.js +17 -0
- package/dist/esm-chunks/chunk-5N2CWXSJ.js +564 -0
- package/dist/esm-chunks/chunk-A22224GM.js +113 -0
- package/dist/esm-chunks/chunk-AVWFCGVE.js +5536 -0
- package/dist/esm-chunks/chunk-B6QMRLBH.js +255 -0
- package/dist/esm-chunks/chunk-G3GM7JNF.js +92 -0
- package/dist/esm-chunks/chunk-GGHAQM5D.js +28 -0
- package/dist/esm-chunks/chunk-NOX2JUQZ.js +89 -0
- package/dist/esm-chunks/chunk-R4NHZWGU.js +32 -0
- package/dist/esm-chunks/chunk-RSKIKBZH.js +44 -0
- package/dist/esm-chunks/chunk-UXLNY5XK.js +86 -0
- package/dist/esm-chunks/chunk-VP3PT3VV.js +119 -0
- package/dist/esm-chunks/chunk-YZXA5QBC.js +60 -0
- package/dist/esm-chunks/chunk-Z7ZMLVTM.js +78 -0
- package/dist/index.js +66 -0
- package/dist/run/config.js +18 -0
- package/dist/run/constants.js +15 -0
- package/dist/run/handlers/cache.cjs +852 -0
- package/dist/run/handlers/server.js +3297 -0
- package/dist/run/headers.js +19 -0
- package/dist/run/next.cjs +1058 -0
- package/dist/run/revalidate.js +13 -0
- package/dist/run/systemlog.js +15 -0
- package/edge-runtime/README.md +29 -0
- package/edge-runtime/lib/headers.ts +26 -0
- package/edge-runtime/lib/middleware.ts +60 -0
- package/edge-runtime/lib/next-request.ts +59 -0
- package/edge-runtime/lib/response.ts +145 -0
- package/{src/templates/edge-shared/next-utils.ts → edge-runtime/lib/routing.ts} +64 -20
- package/edge-runtime/lib/util.ts +26 -0
- package/edge-runtime/middleware.ts +53 -0
- package/edge-runtime/shim/index.js +11 -0
- package/{src/templates → edge-runtime}/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/index.ts +1 -1
- package/edge-runtime/vendor/import_map.json +13 -0
- package/edge-runtime/vendor.ts +18 -0
- package/manifest.yml +1 -1
- package/package.json +23 -60
- package/index.js +0 -1
- package/lib/constants.js +0 -56
- package/lib/helpers/analysis.js +0 -115
- package/lib/helpers/cache.js +0 -46
- package/lib/helpers/compiler.js +0 -119
- package/lib/helpers/config.js +0 -192
- package/lib/helpers/dev.js +0 -20
- package/lib/helpers/edge.js +0 -328
- package/lib/helpers/files.js +0 -335
- package/lib/helpers/flags.js +0 -46
- package/lib/helpers/functions.js +0 -437
- package/lib/helpers/functionsMetaData.js +0 -46
- package/lib/helpers/matchers.js +0 -41
- package/lib/helpers/middlewareWatcher.js +0 -12
- package/lib/helpers/pack.js +0 -41
- package/lib/helpers/redirects.js +0 -246
- package/lib/helpers/types.js +0 -2
- package/lib/helpers/utils.js +0 -226
- package/lib/helpers/verification.js +0 -182
- package/lib/index.js +0 -194
- package/lib/templates/blobStorage.js +0 -30
- package/lib/templates/getApiHandler.js +0 -120
- package/lib/templates/getHandler.js +0 -201
- package/lib/templates/getPageResolver.js +0 -54
- package/lib/templates/handlerUtils.js +0 -268
- package/lib/templates/ipx.js +0 -13
- package/lib/templates/requireHooks.js +0 -105
- package/lib/templates/server.js +0 -159
- package/lib/templates/vendor.js +0 -20
- package/src/templates/edge/bundle.js +0 -8
- package/src/templates/edge/function-runtime.ts +0 -24
- package/src/templates/edge/imageconfig.json +0 -3
- package/src/templates/edge/ipx.ts +0 -5
- package/src/templates/edge/middleware-runtime.ts +0 -62
- package/src/templates/edge/next-dev.js +0 -104
- package/src/templates/edge/rsc-data.ts +0 -5
- package/src/templates/edge/shims.js +0 -77
- package/src/templates/edge-shared/nextConfig.json +0 -3
- package/src/templates/edge-shared/prerender-manifest.json +0 -7
- package/src/templates/edge-shared/rsc-data.ts +0 -78
- package/src/templates/edge-shared/utils.test.ts +0 -114
- package/src/templates/edge-shared/utils.ts +0 -315
- package/src/templates/vendor/import_map.json +0 -13
- /package/{src/templates/edge → edge-runtime}/matchers.json +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.134.0/fmt/colors.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.134.0/testing/_diff.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.134.0/testing/asserts.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/_util/asserts.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/_util/os.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/abortable.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/deadline.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/debounce.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/deferred.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/delay.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/mod.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/mux_async_iterator.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/pool.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/retry.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/tee.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/bytes/index_of_needle.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/crypto/timing_safe_equal.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/datetime/to_imf.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/encoding/base64.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/encoding/base64url.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/flags/mod.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/fmt/colors.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/fmt/printf.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/http/cookie.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_core.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_events.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_events.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_global.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_next_tick.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_process/exiting.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_process/process.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_process/stdio.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_process/streams.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_stream.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_stream.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_util/_util_callbackify.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_utils.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/assert.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/assertion_error.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/async_hooks.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/buffer.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/events.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/buffer.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/buffer.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/crypto/_keys.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/crypto/constants.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/error_codes.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/errors.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/fixed_queue.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/hide_stack_frames.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/net.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/normalize_encoding.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/options.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/primordials.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/process/per_thread.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/readline/callbacks.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/readline/utils.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/streams/destroy.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/streams/end-of-stream.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/streams/utils.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util/comparisons.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util/debuglog.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util/inspect.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util/types.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/validators.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_libuv_winerror.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_listen.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_node.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_timingSafeEqual.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_utils.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_winerror.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/ares.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/async_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/buffer.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/cares_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/config.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/connection_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/constants.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/contextify.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/credentials.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/crypto.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/errors.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/fs.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/fs_dir.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/fs_event_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/handle_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/heap_utils.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/http_parser.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/icu.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/inspector.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/js_stream.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/messaging.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/mod.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/module_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/native_module.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/natives.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/node_file.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/node_options.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/options.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/os.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/performance.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/pipe_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/process_methods.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/report.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/serdes.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/signal_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/spawn_sync.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/stream_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/string_decoder.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/symbols.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/task_queue.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/tcp_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/timers.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/tls_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/trace_events.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/tty_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/types.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/udp_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/url.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/util.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/uv.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/v8.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/worker.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/zlib.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/process.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/stream.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/string_decoder.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/util/types.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/util.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/_constants.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/_interface.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/_util.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/common.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/glob.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/mod.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/posix.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/separator.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/win32.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/streams/write_all.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/testing/_diff.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/testing/_format.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/testing/asserts.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/types.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/vendor/asyncify.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/vendor/html_rewriter.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/vendor/html_rewriter.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/x/path_to_regexp@v6.2.1/index.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/esm.sh/v91/next@12.2.5/deno/dist/compiled/cookie.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/request.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/response.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/raw.githubusercontent.com/worker-tools/resolvable-promise/master/index.ts +0 -0
package/README.md
CHANGED
|
@@ -1,17 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
# Next.js Runtime
|
|
2
|
+
|
|
3
|
+
Next.js is supported natively on Netlify, and in most cases you will not need to install or
|
|
4
|
+
configure anything. This repo includes the packages used to support Next.js on Netlify.
|
|
5
|
+
|
|
6
|
+
## Testing
|
|
7
|
+
|
|
8
|
+
### Integration testing
|
|
9
|
+
|
|
10
|
+
How to add new integration test scenarios to the application:
|
|
11
|
+
|
|
12
|
+
1. Create a new folder under `tests/fixtures/<your-name>`
|
|
13
|
+
2. Adapt the `next.config.js` to be a standalone application
|
|
14
|
+
3. Create a `postinstall` script that runs the `next build`. It's important to notice that the
|
|
15
|
+
integration tests rely on a already built next.js application in this folder. They rely on the
|
|
16
|
+
`.next` folder.
|
|
17
|
+
4. Add your test
|
|
18
|
+
|
|
19
|
+
> Currently the tests require a built version of the `dist/run/handlers/cache.cjs` so you need to
|
|
20
|
+
> run `npm run build` before executing the integration tests. In addition, the integration tests
|
|
21
|
+
> need to be prepared before first use. You can do this by running `npm run pretest`.
|
|
22
|
+
|
|
23
|
+
### E2E testing
|
|
24
|
+
|
|
25
|
+
> **Prerequisite**
|
|
26
|
+
>
|
|
27
|
+
> Needs the `netlify-cli` installed and being logged in having access to Netlify Testing
|
|
28
|
+
> Organization
|
|
29
|
+
|
|
30
|
+
The e2e tests can be invoked with `npm run e2e` and perform a full e2e test. This means they do the
|
|
31
|
+
following:
|
|
32
|
+
|
|
33
|
+
1. Building the next-runtime (just running `npm run build` in the repository)
|
|
34
|
+
2. Creating a temp directory and copying the provided fixture over to the directory.
|
|
35
|
+
3. Packing the runtime with `npm pack` to the temp directory.
|
|
36
|
+
4. Installing the runtime from the created zip artifact of `npm pack` (this is like installing a
|
|
37
|
+
node_module from the registry)
|
|
38
|
+
5. Creating a `netlify.toml` inside the temp directory of the fixture and adding the runtime as a
|
|
39
|
+
plugin.
|
|
40
|
+
6. Running `netlify deploy --build` invoking the runtime. This will use the
|
|
41
|
+
[next-runtime-testing](https://app.netlify.com/sites/next-runtime-testing/overview) as site to
|
|
42
|
+
deploy to.
|
|
43
|
+
7. Using the `deployId` and `url` of the deployed site to run some
|
|
44
|
+
[playwright](https://playwright.dev/) tests against, asserting the correctness of the runtime.
|
|
45
|
+
8. After the tests where run successfully, it will delete the deployment again and clean everything
|
|
46
|
+
up. In case of a failure, the deploy won't be cleaned up to leave it for troubleshooting
|
|
47
|
+
purposes.
|
|
48
|
+
|
|
49
|
+
> [!TIP] If you'd like to always keep the deployment and the local fixture around for
|
|
50
|
+
> troubleshooting, run `E2E_PERSIST=1 npm run e2e`.
|
|
51
|
+
|
|
52
|
+
#### cleanup old deploys
|
|
53
|
+
|
|
54
|
+
To cleanup old and dangling deploys from failed builds you can run the following script:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx tsx ./tools/e2e/cleanup-deploys.ts
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This will cleanup all created deploys on the
|
|
61
|
+
[next-runtime-testing](https://app.netlify.com/sites/next-runtime-testing/overview) site.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
restoreBuildCache,
|
|
9
|
+
saveBuildCache
|
|
10
|
+
} from "../esm-chunks/chunk-GGHAQM5D.js";
|
|
11
|
+
import "../esm-chunks/chunk-RSKIKBZH.js";
|
|
12
|
+
export {
|
|
13
|
+
restoreBuildCache,
|
|
14
|
+
saveBuildCache
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
copyFetchContent,
|
|
9
|
+
copyPrerenderedContent
|
|
10
|
+
} from "../../esm-chunks/chunk-G3GM7JNF.js";
|
|
11
|
+
import "../../esm-chunks/chunk-AVWFCGVE.js";
|
|
12
|
+
import "../../esm-chunks/chunk-RSKIKBZH.js";
|
|
13
|
+
export {
|
|
14
|
+
copyFetchContent,
|
|
15
|
+
copyPrerenderedContent
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
copyNextDependencies,
|
|
9
|
+
copyNextServerCode,
|
|
10
|
+
writeTagsManifest
|
|
11
|
+
} from "../../esm-chunks/chunk-A22224GM.js";
|
|
12
|
+
import "../../esm-chunks/chunk-AVWFCGVE.js";
|
|
13
|
+
import "../../esm-chunks/chunk-RSKIKBZH.js";
|
|
14
|
+
export {
|
|
15
|
+
copyNextDependencies,
|
|
16
|
+
copyNextServerCode,
|
|
17
|
+
writeTagsManifest
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
copyStaticAssets,
|
|
9
|
+
copyStaticContent,
|
|
10
|
+
publishStaticDir,
|
|
11
|
+
unpublishStaticDir
|
|
12
|
+
} from "../../esm-chunks/chunk-Z7ZMLVTM.js";
|
|
13
|
+
import "../../esm-chunks/chunk-AVWFCGVE.js";
|
|
14
|
+
import "../../esm-chunks/chunk-RSKIKBZH.js";
|
|
15
|
+
export {
|
|
16
|
+
copyStaticAssets,
|
|
17
|
+
copyStaticContent,
|
|
18
|
+
publishStaticDir,
|
|
19
|
+
unpublishStaticDir
|
|
20
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
createEdgeHandlers
|
|
9
|
+
} from "../../esm-chunks/chunk-UXLNY5XK.js";
|
|
10
|
+
import "../../esm-chunks/chunk-VP3PT3VV.js";
|
|
11
|
+
import "../../esm-chunks/chunk-RSKIKBZH.js";
|
|
12
|
+
export {
|
|
13
|
+
createEdgeHandlers
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
createServerHandler
|
|
9
|
+
} from "../../esm-chunks/chunk-NOX2JUQZ.js";
|
|
10
|
+
import "../../esm-chunks/chunk-A22224GM.js";
|
|
11
|
+
import "../../esm-chunks/chunk-AVWFCGVE.js";
|
|
12
|
+
import "../../esm-chunks/chunk-VP3PT3VV.js";
|
|
13
|
+
import "../../esm-chunks/chunk-RSKIKBZH.js";
|
|
14
|
+
export {
|
|
15
|
+
createServerHandler
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
EDGE_HANDLER_NAME,
|
|
9
|
+
PluginContext,
|
|
10
|
+
SERVER_HANDLER_NAME
|
|
11
|
+
} from "../esm-chunks/chunk-VP3PT3VV.js";
|
|
12
|
+
import "../esm-chunks/chunk-RSKIKBZH.js";
|
|
13
|
+
export {
|
|
14
|
+
EDGE_HANDLER_NAME,
|
|
15
|
+
PluginContext,
|
|
16
|
+
SERVER_HANDLER_NAME
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// src/run/constants.ts
|
|
9
|
+
import { resolve } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
var MODULE_DIR = fileURLToPath(new URL(".", import.meta.url));
|
|
12
|
+
var PLUGIN_DIR = resolve(`${MODULE_DIR}../..`);
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
MODULE_DIR,
|
|
16
|
+
PLUGIN_DIR
|
|
17
|
+
};
|