next
Version:
The React Framework
1 lines • 28.5 kB
Source Map (JSON)
{"version":3,"sources":["../../src/bin/next.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport '../server/require-hook'\n\nimport {\n Argument,\n Command,\n InvalidArgumentError,\n Option,\n} from 'next/dist/compiled/commander'\n\nimport { warn } from '../build/output/log'\nimport semver from 'next/dist/compiled/semver'\nimport { bold, cyan, italic } from '../lib/picocolors'\nimport { formatCliHelpOutput } from '../lib/format-cli-help-output'\nimport { NON_STANDARD_NODE_ENV } from '../lib/constants'\nimport {\n getParsedDebugAddress,\n parseValidPositiveInteger,\n type DebugAddress,\n} from '../server/lib/utils'\nimport {\n SUPPORTED_TEST_RUNNERS_LIST,\n type NextTestOptions,\n} from '../cli/next-test.js'\nimport type { NextTelemetryOptions } from '../cli/next-telemetry.js'\nimport type { NextStartOptions } from '../cli/next-start.js'\nimport type { NextInfoOptions } from '../cli/next-info.js'\nimport type { NextDevOptions } from '../cli/next-dev.js'\nimport type { NextAnalyzeOptions } from '../cli/next-analyze.js'\nimport type { NextBuildOptions } from '../cli/next-build.js'\nimport type { NextTypegenOptions } from '../cli/next-typegen.js'\n\nif (process.env.NEXT_RSPACK) {\n // silent rspack's schema check\n process.env.RSPACK_CONFIG_VALIDATE = 'loose-silent'\n}\n\nif (\n !semver.satisfies(\n process.versions.node,\n process.env.__NEXT_REQUIRED_NODE_VERSION_RANGE!,\n { includePrerelease: true }\n )\n) {\n console.error(\n `You are using Node.js ${process.versions.node}. For Next.js, Node.js version \"${process.env.__NEXT_REQUIRED_NODE_VERSION_RANGE}\" is required.`\n )\n process.exit(1)\n}\n\nprocess.env.NEXT_PRIVATE_START_TIME = Date.now().toString()\n\nfor (const dependency of ['react', 'react-dom']) {\n try {\n // When 'npm link' is used it checks the clone location. Not the project.\n require.resolve(dependency)\n } catch (err) {\n console.warn(\n `The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install ${dependency}'`\n )\n }\n}\n\nclass NextRootCommand extends Command {\n createCommand(name: string) {\n const command = new Command(name)\n\n command.hook('preAction', (event) => {\n const commandName = event.name()\n const defaultEnv = commandName === 'dev' ? 'development' : 'production'\n const standardEnv = ['production', 'development', 'test']\n\n if (process.env.NODE_ENV) {\n const isNotStandard = !standardEnv.includes(process.env.NODE_ENV)\n const shouldWarnCommands =\n process.env.NODE_ENV === 'development'\n ? ['start', 'build']\n : process.env.NODE_ENV === 'production'\n ? ['dev']\n : []\n\n if (isNotStandard || shouldWarnCommands.includes(commandName)) {\n warn(NON_STANDARD_NODE_ENV)\n }\n }\n\n ;(process.env as any).NODE_ENV = process.env.NODE_ENV || defaultEnv\n ;(process.env as any).NEXT_RUNTIME = 'nodejs'\n\n if (\n commandName !== 'dev' &&\n commandName !== 'start' &&\n event.getOptionValue('inspect') === true\n ) {\n console.error(\n `\\`--inspect\\` flag is deprecated. Use env variable NODE_OPTIONS instead: NODE_OPTIONS='--inspect' next ${commandName}`\n )\n process.exit(1)\n }\n })\n\n return command\n }\n}\n\nfunction parseValidInspectAddress(value: string): DebugAddress {\n const address = getParsedDebugAddress(value)\n\n if (Number.isNaN(address.port)) {\n throw new InvalidArgumentError(\n 'The given value is not a valid inspect address. ' +\n 'Did you mean to pass an app path?\\n' +\n `Try switching the order of the arguments or set the default address explicitly e.g.\\n` +\n `next dev ${value} --inspect\\n` +\n `next dev --inspect= ${value}`\n )\n }\n\n return address\n}\n\nconst program = new NextRootCommand()\n\nprogram\n .name('next')\n .description(\n 'The Next.js CLI allows you to develop, build, start your application, and more.'\n )\n .configureHelp({\n formatHelp: (cmd, helper) => formatCliHelpOutput(cmd, helper),\n subcommandTerm: (cmd) => `${cmd.name()} ${cmd.usage()}`,\n })\n .helpCommand(false)\n .helpOption('-h, --help', 'Displays this message.')\n .version(\n `Next.js v${process.env.__NEXT_VERSION}`,\n '-v, --version',\n 'Outputs the Next.js version.'\n )\n\nprogram\n .command('build')\n .description(\n 'Creates an optimized production build of your application. The output displays information about each route.'\n )\n .argument(\n '[directory]',\n `A directory on which to build the application. ${italic(\n 'If no directory is provided, the current directory will be used.'\n )}`\n )\n .option(\n '--experimental-analyze',\n 'Analyze bundle output. Only compatible with Turbopack.'\n )\n .option('-d, --debug', 'Enables a more verbose build output.')\n .option(\n '--debug-prerender',\n 'Enables debug mode for prerendering. Not for production use!'\n )\n .option('--no-mangling', 'Disables mangling.')\n .option('--profile', 'Enables production profiling for React.')\n .option('--experimental-app-only', 'Builds only App Router routes.')\n .option('--turbo', 'Builds using Turbopack.')\n .option('--turbopack', 'Builds using Turbopack.')\n .option('--webpack', 'Builds using webpack.')\n .addOption(\n new Option(\n '--experimental-build-mode [mode]',\n 'Uses an experimental build mode.'\n )\n .choices(['compile', 'generate', 'generate-env'])\n .default('default')\n )\n .option(\n '--experimental-debug-memory-usage',\n 'Enables memory profiling features to debug memory consumption.'\n )\n .option(\n '--experimental-upload-trace, <traceUrl>',\n 'Reports a subset of the debugging trace to a remote HTTP URL. Includes sensitive data.'\n )\n .option(\n '--experimental-next-config-strip-types',\n 'Use Node.js native TypeScript resolution for next.config.(ts|mts)'\n )\n .option(\n '--debug-build-paths <patterns>',\n 'Comma-separated glob patterns or explicit paths for selective builds. Use \"!\" prefix to exclude. Examples: \"app/*\", \"app/page.tsx\", \"app/**/page.tsx\", \"app/**,!app/[slug]/**\"'\n )\n .option(\n '--experimental-cpu-prof',\n 'Enable CPU profiling. Profile is saved to .next/cpu-profiles/ on completion.'\n )\n .action((directory: string, options: NextBuildOptions) => {\n if (options.debugPrerender) {\n // @ts-expect-error not readonly\n process.env.NODE_ENV = 'development'\n }\n if (options.experimentalNextConfigStripTypes) {\n process.env.__NEXT_NODE_NATIVE_TS_LOADER_ENABLED = 'true'\n }\n if (options.experimentalCpuProf) {\n process.env.NEXT_CPU_PROF = '1'\n process.env.__NEXT_PRIVATE_CPU_PROFILE = 'build-main'\n const { join } = require('path') as typeof import('path')\n const dir = directory || process.cwd()\n process.env.NEXT_CPU_PROF_DIR = join(dir, '.next', 'cpu-profiles')\n }\n\n // ensure process exits after build completes so open handles/connections\n // don't cause process to hang\n return import('../cli/next-build.js').then((mod) =>\n mod.nextBuild(options, directory).then(async () => {\n // Save CPU profile before exiting if enabled\n if (options.experimentalCpuProf) {\n await mod.saveCpuProfile()\n }\n process.exit(0)\n })\n )\n })\n .usage('[directory] [options]')\n\nprogram\n .command('experimental-analyze')\n .description(\n 'Analyze production bundle output with an interactive web ui. Does not produce an application build. Only compatible with Turbopack.'\n )\n .argument(\n '[directory]',\n `A directory on which to analyze the application. ${italic(\n 'If no directory is provided, the current directory will be used.'\n )}`\n )\n .option('--no-mangling', 'Disables mangling.')\n .option('--profile', 'Enables production profiling for React.')\n .option(\n '-o, --output',\n 'Only write analysis files to disk. Does not start the server.'\n )\n .addOption(\n new Option(\n '--port <port>',\n 'Specify a port number to serve the analyzer on.'\n )\n .implies({ serve: true })\n .argParser(parseValidPositiveInteger)\n .default(4000)\n .env('PORT')\n )\n .action((directory: string, options: NextAnalyzeOptions) => {\n return import('../cli/next-analyze.js')\n .then((mod) => mod.nextAnalyze(options, directory))\n .then(() => {\n if (options.output) {\n // The Next.js process is held open by something on the event loop. Exit manually like the `build` command does.\n // TODO: Fix the underlying issue so this is not necessary.\n process.exit(0)\n }\n })\n })\n\nprogram\n .command('dev', { isDefault: true })\n .description(\n 'Starts Next.js in development mode with hot-code reloading, error reporting, and more.'\n )\n .argument(\n '[directory]',\n `A directory on which to build the application. ${italic(\n 'If no directory is provided, the current directory will be used.'\n )}`\n )\n .addOption(\n new Option(\n '--inspect [[host:]port]',\n 'Allows inspecting server-side code. See https://nextjs.org/docs/app/guides/debugging#server-side-code'\n ).argParser(parseValidInspectAddress)\n )\n .option('--turbo', 'Starts development mode using Turbopack.')\n .option('--turbopack', 'Starts development mode using Turbopack.')\n .option('--webpack', 'Starts development mode using webpack.')\n .addOption(\n new Option(\n '-p, --port <port>',\n 'Specify a port number on which to start the application.'\n )\n .argParser(parseValidPositiveInteger)\n .default(3000)\n .env('PORT')\n )\n .option(\n '-H, --hostname <hostname>',\n 'Specify a hostname on which to start the application (default: 0.0.0.0).'\n )\n .option(\n '--disable-source-maps',\n \"Don't start the Dev server with `--enable-source-maps`.\",\n false\n )\n .option(\n '--experimental-https',\n 'Starts the server with HTTPS and generates a self-signed certificate.'\n )\n .option('--experimental-https-key, <path>', 'Path to a HTTPS key file.')\n .option(\n '--experimental-https-cert, <path>',\n 'Path to a HTTPS certificate file.'\n )\n .option(\n '--experimental-https-ca, <path>',\n 'Path to a HTTPS certificate authority file.'\n )\n .option('--no-server-fast-refresh', 'Disable server-side Fast Refresh')\n .option(\n '--experimental-upload-trace, <traceUrl>',\n 'Reports a subset of the debugging trace to a remote HTTP URL. Includes sensitive data.'\n )\n .option(\n '--experimental-next-config-strip-types',\n 'Use Node.js native TypeScript resolution for next.config.(ts|mts)'\n )\n .option(\n '--experimental-cpu-prof',\n 'Enable CPU profiling. Profiles are saved to .next/cpu-profiles/ on exit.'\n )\n .action(\n (directory: string, options: NextDevOptions, { _optionValueSources }) => {\n if (options.experimentalNextConfigStripTypes) {\n process.env.__NEXT_NODE_NATIVE_TS_LOADER_ENABLED = 'true'\n }\n if (options.experimentalCpuProf) {\n process.env.NEXT_CPU_PROF = '1'\n process.env.__NEXT_PRIVATE_CPU_PROFILE = 'dev-main'\n const { join } = require('path') as typeof import('path')\n const dir = directory || process.cwd()\n process.env.NEXT_CPU_PROF_DIR = join(dir, '.next', 'cpu-profiles')\n }\n const portSource = _optionValueSources.port\n import('../cli/next-dev.js').then((mod) =>\n mod.nextDev(options, portSource, directory)\n )\n }\n )\n .usage('[directory] [options]')\n\nprogram\n .command('export', { hidden: true })\n .action(() => import('../cli/next-export.js').then((mod) => mod.nextExport()))\n .helpOption(false)\n\nprogram\n .command('info')\n .description(\n 'Prints relevant details about the current system which can be used to report Next.js bugs.'\n )\n .addHelpText(\n 'after',\n `\\nLearn more: ${cyan('https://nextjs.org/docs/api-reference/cli#info')}`\n )\n .option('--verbose', 'Collects additional information for debugging.')\n .action((options: NextInfoOptions) =>\n import('../cli/next-info.js').then((mod) => mod.nextInfo(options))\n )\n\nprogram\n .command('start')\n .description(\n 'Starts Next.js in production mode. The application should be compiled with `next build` first.'\n )\n .argument(\n '[directory]',\n `A directory on which to start the application. ${italic(\n 'If no directory is provided, the current directory will be used.'\n )}`\n )\n .addOption(\n new Option(\n '-p, --port <port>',\n 'Specify a port number on which to start the application.'\n )\n .argParser(parseValidPositiveInteger)\n .default(3000)\n .env('PORT')\n )\n .option(\n '-H, --hostname <hostname>',\n 'Specify a hostname on which to start the application (default: 0.0.0.0).'\n )\n .addOption(\n new Option(\n '--inspect [[host:]port]',\n 'Allows inspecting server-side code. See https://nextjs.org/docs/app/guides/debugging#server-side-code'\n ).argParser(parseValidInspectAddress)\n )\n .addOption(\n new Option(\n '--keepAliveTimeout <keepAliveTimeout>',\n 'Specify the maximum amount of milliseconds to wait before closing inactive connections.'\n ).argParser(parseValidPositiveInteger)\n )\n .option(\n '--experimental-next-config-strip-types',\n 'Use Node.js native TypeScript resolution for next.config.(ts|mts)'\n )\n .option(\n '--experimental-cpu-prof',\n 'Enable CPU profiling. Profiles are saved to .next/cpu-profiles/ on exit.'\n )\n .action((directory: string, options: NextStartOptions) => {\n if (options.experimentalNextConfigStripTypes) {\n process.env.__NEXT_NODE_NATIVE_TS_LOADER_ENABLED = 'true'\n }\n if (options.experimentalCpuProf) {\n process.env.NEXT_CPU_PROF = '1'\n process.env.__NEXT_PRIVATE_CPU_PROFILE = 'start-main'\n const { join } = require('path') as typeof import('path')\n const dir = directory || process.cwd()\n process.env.NEXT_CPU_PROF_DIR = join(dir, '.next', 'cpu-profiles')\n }\n return import('../cli/next-start.js').then((mod) =>\n mod.nextStart(options, directory)\n )\n })\n .usage('[directory] [options]')\n\nprogram\n .command('telemetry')\n .description(\n `Allows you to enable or disable Next.js' ${bold(\n 'completely anonymous'\n )} telemetry collection.`\n )\n .addArgument(new Argument('[arg]').choices(['disable', 'enable', 'status']))\n .addHelpText('after', `\\nLearn more: ${cyan('https://nextjs.org/telemetry')}`)\n .addOption(\n new Option('--enable', `Enables Next.js' telemetry collection.`).conflicts(\n 'disable'\n )\n )\n .option('--disable', `Disables Next.js' telemetry collection.`)\n .action((arg: string, options: NextTelemetryOptions) =>\n import('../cli/next-telemetry.js').then((mod) =>\n mod.nextTelemetry(options, arg)\n )\n )\n\nprogram\n .command('typegen')\n .description(\n 'Generate TypeScript definitions for routes, pages, and layouts without running a full build.'\n )\n .argument(\n '[directory]',\n `A directory on which to generate types. ${italic(\n 'If no directory is provided, the current directory will be used.'\n )}`\n )\n .action((directory: string, options: NextTypegenOptions) =>\n // ensure process exits after typegen completes so open handles/connections\n // don't cause process to hang\n import('../cli/next-typegen.js').then((mod) =>\n mod.nextTypegen(options, directory).then(() => process.exit(0))\n )\n )\n .usage('[directory] [options]')\n\nconst nextVersion = process.env.__NEXT_VERSION || 'unknown'\nprogram\n .command('upgrade')\n .description(\n 'Upgrade Next.js apps to desired versions with a single command.'\n )\n .argument(\n '[directory]',\n `A Next.js project directory to upgrade. ${italic(\n 'If no directory is provided, the current directory will be used.'\n )}`\n )\n .usage('[directory] [options]')\n .option(\n '--revision <revision>',\n 'Specify the target Next.js version using an NPM dist tag (e.g. \"latest\", \"canary\", \"rc\", \"beta\") or an exact version number (e.g. \"15.0.0\").',\n nextVersion.includes('-canary.')\n ? 'canary'\n : nextVersion.includes('-rc.')\n ? 'rc'\n : nextVersion.includes('-beta.')\n ? 'beta'\n : 'latest'\n )\n .option('--verbose', 'Verbose output', false)\n .action(async (directory, options) => {\n const mod = await import('../cli/next-upgrade.js')\n mod.spawnNextUpgrade(directory, options)\n })\n\nprogram\n .command('experimental-test')\n .description(\n `Execute \\`next/experimental/testmode\\` tests using a specified test runner. The test runner defaults to 'playwright' if the \\`experimental.defaultTestRunner\\` configuration option or the \\`--test-runner\\` option are not set.`\n )\n .argument(\n '[directory]',\n `A Next.js project directory to execute the test runner on. ${italic(\n 'If no directory is provided, the current directory will be used.'\n )}`\n )\n .argument(\n '[test-runner-args...]',\n 'Any additional arguments or options to pass down to the test runner `test` command.'\n )\n .option(\n '--test-runner [test-runner]',\n `Any supported test runner. Options: ${bold(\n SUPPORTED_TEST_RUNNERS_LIST.join(', ')\n )}. ${italic(\n \"If no test runner is provided, the Next.js config option `experimental.defaultTestRunner`, or 'playwright' will be used.\"\n )}`\n )\n .allowUnknownOption()\n .action(\n (directory: string, testRunnerArgs: string[], options: NextTestOptions) => {\n return import('../cli/next-test.js').then((mod) => {\n mod.nextTest(directory, testRunnerArgs, options)\n })\n }\n )\n .usage('[directory] [options]')\n\nconst internal = program\n .command('internal')\n .description(\n 'Internal debugging commands. Use with caution. Not covered by semver.'\n )\n\ninternal\n .command('trace')\n .alias('turbo-trace-server')\n .argument('file', 'Trace file to serve.')\n .addOption(\n new Option('-p, --port <port>', 'Override the port.').argParser(\n parseValidPositiveInteger\n )\n )\n .action((file: string, options: { port: number | undefined }) => {\n return import('../cli/internal/turbo-trace-server.js').then((mod) =>\n mod.startTurboTraceServerCli(file, options.port)\n )\n })\n\nprogram.parse(process.argv)\n"],"names":["process","env","NEXT_RSPACK","RSPACK_CONFIG_VALIDATE","semver","satisfies","versions","node","__NEXT_REQUIRED_NODE_VERSION_RANGE","includePrerelease","console","error","exit","NEXT_PRIVATE_START_TIME","Date","now","toString","dependency","require","resolve","err","warn","NextRootCommand","Command","createCommand","name","command","hook","event","commandName","defaultEnv","standardEnv","NODE_ENV","isNotStandard","includes","shouldWarnCommands","NON_STANDARD_NODE_ENV","NEXT_RUNTIME","getOptionValue","parseValidInspectAddress","value","address","getParsedDebugAddress","Number","isNaN","port","InvalidArgumentError","program","description","configureHelp","formatHelp","cmd","helper","formatCliHelpOutput","subcommandTerm","usage","helpCommand","helpOption","version","__NEXT_VERSION","argument","italic","option","addOption","Option","choices","default","action","directory","options","debugPrerender","experimentalNextConfigStripTypes","__NEXT_NODE_NATIVE_TS_LOADER_ENABLED","experimentalCpuProf","NEXT_CPU_PROF","__NEXT_PRIVATE_CPU_PROFILE","join","dir","cwd","NEXT_CPU_PROF_DIR","then","mod","nextBuild","saveCpuProfile","implies","serve","argParser","parseValidPositiveInteger","nextAnalyze","output","isDefault","_optionValueSources","portSource","nextDev","hidden","nextExport","addHelpText","cyan","nextInfo","nextStart","bold","addArgument","Argument","conflicts","arg","nextTelemetry","nextTypegen","nextVersion","spawnNextUpgrade","SUPPORTED_TEST_RUNNERS_LIST","allowUnknownOption","testRunnerArgs","nextTest","internal","alias","file","startTurboTraceServerCli","parse","argv"],"mappings":";;;;;QAEO;2BAOA;qBAEc;+DACF;4BACgB;qCACC;2BACE;uBAK/B;0BAIA;;;;;;AASP,IAAIA,QAAQC,GAAG,CAACC,WAAW,EAAE;IAC3B,+BAA+B;IAC/BF,QAAQC,GAAG,CAACE,sBAAsB,GAAG;AACvC;AAEA,IACE,CAACC,eAAM,CAACC,SAAS,CACfL,QAAQM,QAAQ,CAACC,IAAI,EACrBP,QAAQC,GAAG,CAACO,kCAAkC,EAC9C;IAAEC,mBAAmB;AAAK,IAE5B;IACAC,QAAQC,KAAK,CACX,CAAC,sBAAsB,EAAEX,QAAQM,QAAQ,CAACC,IAAI,CAAC,gCAAgC,EAAEP,QAAQC,GAAG,CAACO,kCAAkC,CAAC,cAAc,CAAC;IAEjJR,QAAQY,IAAI,CAAC;AACf;AAEAZ,QAAQC,GAAG,CAACY,uBAAuB,GAAGC,KAAKC,GAAG,GAAGC,QAAQ;AAEzD,KAAK,MAAMC,cAAc;IAAC;IAAS;CAAY,CAAE;IAC/C,IAAI;QACF,yEAAyE;QACzEC,QAAQC,OAAO,CAACF;IAClB,EAAE,OAAOG,KAAK;QACZV,QAAQW,IAAI,CACV,CAAC,YAAY,EAAEJ,WAAW,4HAA4H,EAAEA,WAAW,CAAC,CAAC;IAEzK;AACF;AAEA,MAAMK,wBAAwBC,kBAAO;IACnCC,cAAcC,IAAY,EAAE;QAC1B,MAAMC,UAAU,IAAIH,kB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