next 14.1.2-canary.0 → 14.1.2-canary.2

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.
Files changed (114) hide show
  1. package/dist/bin/next +81 -140
  2. package/dist/bin/next.map +1 -1
  3. package/dist/build/index.d.ts +1 -1
  4. package/dist/build/index.js +5 -5
  5. package/dist/build/index.js.map +1 -1
  6. package/dist/build/swc/index.js +1 -1
  7. package/dist/build/webpack-config.js +2 -2
  8. package/dist/cli/next-build.d.ts +10 -2
  9. package/dist/cli/next-build.js +15 -70
  10. package/dist/cli/next-build.js.map +1 -1
  11. package/dist/cli/next-dev.d.ts +12 -2
  12. package/dist/cli/next-dev.js +17 -41
  13. package/dist/cli/next-dev.js.map +1 -1
  14. package/dist/cli/next-export.d.ts +1 -3
  15. package/dist/cli/next-export.js +3 -43
  16. package/dist/cli/next-export.js.map +1 -1
  17. package/dist/cli/next-info.d.ts +4 -2
  18. package/dist/cli/next-info.js +12 -31
  19. package/dist/cli/next-info.js.map +1 -1
  20. package/dist/cli/next-lint.d.ts +24 -2
  21. package/dist/cli/next-lint.js +34 -97
  22. package/dist/cli/next-lint.js.map +1 -1
  23. package/dist/cli/next-start.d.ts +7 -2
  24. package/dist/cli/next-start.js +6 -30
  25. package/dist/cli/next-start.js.map +1 -1
  26. package/dist/cli/next-telemetry.d.ts +5 -2
  27. package/dist/cli/next-telemetry.js +12 -37
  28. package/dist/cli/next-telemetry.js.map +1 -1
  29. package/dist/client/app-bootstrap.js +1 -1
  30. package/dist/client/components/react-dev-overlay/server/middleware-turbopack.d.ts +10 -0
  31. package/dist/client/components/react-dev-overlay/server/middleware-turbopack.js +4 -0
  32. package/dist/client/components/react-dev-overlay/server/middleware-turbopack.js.map +1 -1
  33. package/dist/client/index.js +1 -1
  34. package/dist/compiled/commander/LICENSE +22 -0
  35. package/dist/compiled/commander/index.js +1 -0
  36. package/dist/compiled/commander/package.json +1 -0
  37. package/dist/esm/build/index.js +5 -5
  38. package/dist/esm/build/index.js.map +1 -1
  39. package/dist/esm/build/swc/index.js +1 -1
  40. package/dist/esm/build/webpack-config.js +2 -2
  41. package/dist/esm/client/app-bootstrap.js +1 -1
  42. package/dist/esm/client/components/react-dev-overlay/server/middleware-turbopack.js +1 -1
  43. package/dist/esm/client/components/react-dev-overlay/server/middleware-turbopack.js.map +1 -1
  44. package/dist/esm/client/index.js +1 -1
  45. package/dist/esm/lib/format-cli-help-output.js +75 -0
  46. package/dist/esm/lib/format-cli-help-output.js.map +1 -0
  47. package/dist/esm/lib/get-project-dir.js +12 -6
  48. package/dist/esm/lib/get-project-dir.js.map +1 -1
  49. package/dist/esm/lib/is-error.js.map +1 -1
  50. package/dist/esm/server/config.js +1 -1
  51. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  52. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  53. package/dist/esm/server/lib/app-info-log.js +1 -1
  54. package/dist/esm/server/lib/router-utils/setup-dev-bundler.js +54 -6
  55. package/dist/esm/server/lib/router-utils/setup-dev-bundler.js.map +1 -1
  56. package/dist/esm/server/lib/utils.js +7 -8
  57. package/dist/esm/server/lib/utils.js.map +1 -1
  58. package/dist/lib/format-cli-help-output.d.ts +3 -0
  59. package/dist/lib/format-cli-help-output.js +84 -0
  60. package/dist/lib/format-cli-help-output.js.map +1 -0
  61. package/dist/lib/get-project-dir.js +12 -45
  62. package/dist/lib/get-project-dir.js.map +1 -1
  63. package/dist/lib/is-error.d.ts +1 -0
  64. package/dist/lib/is-error.js.map +1 -1
  65. package/dist/server/config.js +1 -1
  66. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  67. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  68. package/dist/server/lib/app-info-log.js +1 -1
  69. package/dist/server/lib/router-utils/setup-dev-bundler.js +53 -5
  70. package/dist/server/lib/router-utils/setup-dev-bundler.js.map +1 -1
  71. package/dist/server/lib/start-server.d.ts +2 -2
  72. package/dist/server/lib/utils.d.ts +1 -2
  73. package/dist/server/lib/utils.js +10 -11
  74. package/dist/server/lib/utils.js.map +1 -1
  75. package/dist/telemetry/anonymous-meta.js +1 -1
  76. package/dist/telemetry/events/session-stopped.js +2 -2
  77. package/dist/telemetry/events/version.js +2 -2
  78. package/package.json +16 -15
  79. package/dist/cli/next-build-args.d.ts +0 -2
  80. package/dist/cli/next-build-args.js +0 -27
  81. package/dist/cli/next-build-args.js.map +0 -1
  82. package/dist/cli/next-dev-args.d.ts +0 -2
  83. package/dist/cli/next-dev-args.js +0 -33
  84. package/dist/cli/next-dev-args.js.map +0 -1
  85. package/dist/cli/next-export-args.d.ts +0 -2
  86. package/dist/cli/next-export-args.js +0 -23
  87. package/dist/cli/next-export-args.js.map +0 -1
  88. package/dist/cli/next-info-args.d.ts +0 -5
  89. package/dist/cli/next-info-args.js +0 -20
  90. package/dist/cli/next-info-args.js.map +0 -1
  91. package/dist/cli/next-lint-args.d.ts +0 -2
  92. package/dist/cli/next-lint-args.js +0 -61
  93. package/dist/cli/next-lint-args.js.map +0 -1
  94. package/dist/cli/next-start-args.d.ts +0 -2
  95. package/dist/cli/next-start-args.js +0 -24
  96. package/dist/cli/next-start-args.js.map +0 -1
  97. package/dist/cli/next-telemetry-args.d.ts +0 -2
  98. package/dist/cli/next-telemetry-args.js +0 -20
  99. package/dist/cli/next-telemetry-args.js.map +0 -1
  100. package/dist/esm/lib/command-args.js +0 -13
  101. package/dist/esm/lib/command-args.js.map +0 -1
  102. package/dist/esm/lib/commands.js +0 -13
  103. package/dist/esm/lib/commands.js.map +0 -1
  104. package/dist/esm/lib/get-validated-args.js +0 -19
  105. package/dist/esm/lib/get-validated-args.js.map +0 -1
  106. package/dist/lib/command-args.d.ts +0 -5
  107. package/dist/lib/command-args.js +0 -23
  108. package/dist/lib/command-args.js.map +0 -1
  109. package/dist/lib/commands.d.ts +0 -5
  110. package/dist/lib/commands.js +0 -23
  111. package/dist/lib/commands.js.map +0 -1
  112. package/dist/lib/get-validated-args.d.ts +0 -2
  113. package/dist/lib/get-validated-args.js +0 -34
  114. package/dist/lib/get-validated-args.js.map +0 -1
package/dist/bin/next CHANGED
@@ -4,162 +4,103 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  require("../server/require-hook");
7
- const _log = /*#__PURE__*/ _interop_require_wildcard(require("../build/output/log"));
8
- const _index = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/arg/index.js"));
7
+ const _commander = require("next/dist/compiled/commander");
8
+ const _log = require("../build/output/log");
9
9
  const _semver = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/semver"));
10
+ const _picocolors = require("../lib/picocolors");
11
+ const _formatclihelpoutput = require("../lib/format-cli-help-output");
10
12
  const _constants = require("../lib/constants");
11
- const _commands = require("../lib/commands");
12
- const _commandargs = require("../lib/command-args");
13
- const _getvalidatedargs = require("../lib/get-validated-args");
13
+ const _utils = require("../server/lib/utils");
14
14
  function _interop_require_default(obj) {
15
15
  return obj && obj.__esModule ? obj : {
16
16
  default: obj
17
17
  };
18
18
  }
19
- function _getRequireWildcardCache(nodeInterop) {
20
- if (typeof WeakMap !== "function") return null;
21
- var cacheBabelInterop = new WeakMap();
22
- var cacheNodeInterop = new WeakMap();
23
- return (_getRequireWildcardCache = function(nodeInterop) {
24
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
25
- })(nodeInterop);
26
- }
27
- function _interop_require_wildcard(obj, nodeInterop) {
28
- if (!nodeInterop && obj && obj.__esModule) {
29
- return obj;
30
- }
31
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
32
- return {
33
- default: obj
34
- };
35
- }
36
- var cache = _getRequireWildcardCache(nodeInterop);
37
- if (cache && cache.has(obj)) {
38
- return cache.get(obj);
39
- }
40
- var newObj = {};
41
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
42
- for(var key in obj){
43
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
44
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
45
- if (desc && (desc.get || desc.set)) {
46
- Object.defineProperty(newObj, key, desc);
47
- } else {
48
- newObj[key] = obj[key];
49
- }
50
- }
51
- }
52
- newObj.default = obj;
53
- if (cache) {
54
- cache.set(obj, newObj);
55
- }
56
- return newObj;
57
- }
58
- const args = (0, _index.default)({
59
- // Types
60
- "--version": Boolean,
61
- "--help": Boolean,
62
- "--inspect": Boolean,
63
- // Aliases
64
- "-v": "--version",
65
- "-h": "--help"
66
- }, {
67
- permissive: true
68
- });
69
- // Version is inlined into the file using taskr build pipeline
70
- if (args["--version"]) {
71
- console.log(`Next.js v${"14.1.2-canary.0"}`);
72
- process.exit(0);
73
- }
74
- // Check if we are running `next <subcommand>` or `next`
75
- const foundCommand = Boolean(_commands.commands[args._[0]]);
76
- // Makes sure the `next --help` case is covered
77
- // This help message is only showed for `next --help`
78
- // `next <subcommand> --help` falls through to be handled later
79
- if (!foundCommand && args["--help"]) {
80
- console.log(`
81
- Usage
82
- $ next <command>
83
-
84
- Available commands
85
- ${Object.keys(_commands.commands).join(", ")}
86
-
87
- Options
88
- --version, -v Version number
89
- --help, -h Displays this message
90
-
91
- For more information run a command with the --help flag
92
- $ next build --help
93
- `);
94
- process.exit(0);
95
- }
96
- // Check supported Node.js version first
97
19
  if (_semver.default.lt(process.versions.node, "18.17.0")) {
98
20
  console.error(`You are using Node.js ${process.versions.node}. For Next.js, Node.js version >= v${"18.17.0"} is required.`);
99
21
  process.exit(1);
100
22
  }
101
23
  // Start performance profiling after Node.js version is checked
102
24
  performance.mark("next-start");
103
- const defaultCommand = "dev";
104
- const command = foundCommand ? args._[0] : defaultCommand;
105
- if ([
106
- "experimental-compile",
107
- "experimental-generate"
108
- ].includes(command)) {
109
- args._.push("--build-mode", command);
110
- }
111
- const forwardedArgs = foundCommand ? args._.slice(1) : args._;
112
- if (args["--inspect"]) throw new Error(`--inspect flag is deprecated. Use env variable NODE_OPTIONS instead: NODE_OPTIONS='--inspect' next ${command}`);
113
- // Make sure the `next <subcommand> --help` case is covered
114
- if (args["--help"]) {
115
- forwardedArgs.push("--help");
116
- }
117
- const defaultEnv = command === "dev" ? "development" : "production";
118
- const standardEnv = [
119
- "production",
120
- "development",
121
- "test"
122
- ];
123
- if (process.env.NODE_ENV) {
124
- const isNotStandard = !standardEnv.includes(process.env.NODE_ENV);
125
- const shouldWarnCommands = process.env.NODE_ENV === "development" ? [
126
- "start",
127
- "build"
128
- ] : process.env.NODE_ENV === "production" ? [
129
- "dev"
130
- ] : [];
131
- if (isNotStandard || shouldWarnCommands.includes(command)) {
132
- _log.warn(_constants.NON_STANDARD_NODE_ENV);
25
+ for (const dependency of [
26
+ "react",
27
+ "react-dom"
28
+ ]){
29
+ try {
30
+ // When 'npm link' is used it checks the clone location. Not the project.
31
+ require.resolve(dependency);
32
+ } catch (err) {
33
+ console.warn(`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}'`);
133
34
  }
134
35
  }
135
- process.env.NODE_ENV = process.env.NODE_ENV || defaultEnv;
136
- process.env.NEXT_RUNTIME = "nodejs";
137
- if (command === "build") {
138
- process.on("SIGTERM", ()=>process.exit(0));
139
- process.on("SIGINT", ()=>process.exit(0));
140
- }
141
- async function main() {
142
- const currentArgsSpec = _commandargs.commandArgs[command]();
143
- const validatedArgs = (0, _getvalidatedargs.getValidatedArgs)(currentArgsSpec, forwardedArgs);
144
- for (const dependency of [
145
- "react",
146
- "react-dom"
147
- ]){
148
- try {
149
- // When 'npm link' is used it checks the clone location. Not the project.
150
- require.resolve(dependency);
151
- } catch (err) {
152
- console.warn(`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}'`);
153
- }
36
+ class MyRootCommand extends _commander.Command {
37
+ createCommand(name) {
38
+ const cmd = new _commander.Command(name);
39
+ cmd.addOption(new _commander.Option("--inspect").hideHelp());
40
+ cmd.hook("preAction", (thisCommand)=>{
41
+ const cmdName = thisCommand.name();
42
+ const defaultEnv = cmdName === "dev" ? "development" : "production";
43
+ const standardEnv = [
44
+ "production",
45
+ "development",
46
+ "test"
47
+ ];
48
+ if (process.env.NODE_ENV) {
49
+ const isNotStandard = !standardEnv.includes(process.env.NODE_ENV);
50
+ const shouldWarnCommands = process.env.NODE_ENV === "development" ? [
51
+ "start",
52
+ "build"
53
+ ] : process.env.NODE_ENV === "production" ? [
54
+ "dev"
55
+ ] : [];
56
+ if (isNotStandard || shouldWarnCommands.includes(cmdName)) {
57
+ (0, _log.warn)(_constants.NON_STANDARD_NODE_ENV);
58
+ }
59
+ }
60
+ process.env.NODE_ENV = process.env.NODE_ENV || defaultEnv;
61
+ process.env.NEXT_RUNTIME = "nodejs";
62
+ if (thisCommand.getOptionValue("inspect") === true) {
63
+ console.error(`\`--inspect\` flag is deprecated. Use env variable NODE_OPTIONS instead: NODE_OPTIONS='--inspect' next ${cmdName}`);
64
+ process.exit(1);
65
+ }
66
+ });
67
+ return cmd;
154
68
  }
155
- await _commands.commands[command]().then((exec)=>exec(validatedArgs)).then(()=>{
156
- if (command === "build" || command === "experimental-compile") {
157
- // ensure process exits after build completes so open handles/connections
158
- // don't cause process to hang
159
- process.exit(0);
160
- }
161
- });
162
69
  }
163
- main();
70
+ const program = new MyRootCommand();
71
+ program.name("next").description("The Next.js CLI allows you to develop, build, start your application, and more.").configureHelp({
72
+ formatHelp: (cmd, helper)=>(0, _formatclihelpoutput.formatCliHelpOutput)(cmd, helper),
73
+ subcommandTerm: (cmd)=>`${cmd.name()} ${cmd.usage()}`
74
+ }).helpCommand(false).helpOption("-h, --help", "Displays this message.").version(`Next.js v${"14.1.2-canary.2"}`, "-v, --version", "Outputs the Next.js version.");
75
+ program.command("build").description("Creates an optimized production build of your application. The output displays information about each route.").argument("[directory]", `A directory on which to build the application. ${(0, _picocolors.italic)("If no directory is provided, the current directory will be used.")}`).option("-d, --debug", "Enables a more verbose build output.").option("--profile", "Enables production profiling for React.").option("--no-lint", "Disables linting.").option("--no-mangling", "Disables mangling.").option("--experimental-app-only", "Builds only App Router routes.").addOption(new _commander.Option("--experimental-turbo").hideHelp()).addOption(new _commander.Option("--experimental-build-mode [mode]", "Uses an experimental build mode.").choices([
76
+ "compile",
77
+ "generate"
78
+ ]).default("default")).action((directory, options)=>// ensure process exits after build completes so open handles/connections
79
+ // don't cause process to hang
80
+ import("../cli/next-build.js").then((mod)=>mod.nextBuild(options, directory).then(()=>process.exit(0)))).usage("[directory] [options]");
81
+ program.command("dev", {
82
+ isDefault: true
83
+ }).description("Starts Next.js in development mode with hot-code reloading, error reporting, and more.").argument("[directory]", `A directory on which to build the application. ${(0, _picocolors.italic)("If no directory is provided, the current directory will be used.")}`).option("--turbo", "Starts development mode using Turbopack (beta).").addOption(new _commander.Option("-p, --port <port>", "Specify a port number on which to start the application.").argParser(_utils.myParseInt).default(3000).env("PORT")).option("-H, --hostname <hostname>", "Specify a hostname on which to start the application (default: 0.0.0.0).").option("--experimental-https", "Starts the server with HTTPS and generates a self-signed certificate.").option("--experimental-https-key, <path>", "Path to a HTTPS key file.").option("--experimental-https-cert, <path>", "Path to a HTTPS certificate file.").option("--experimental-https-ca, <path>", "Path to a HTTPS certificate authority file.").option("--experimental-upload-trace, <traceUrl>", "Reports a subset of the debugging trace to a remote HTTP URL. Includes sensitive data.").addOption(new _commander.Option("--experimental-test-proxy").hideHelp()).action((directory, options)=>import("../cli/next-dev.js").then((mod)=>mod.nextDev(options, directory))).usage("[directory] [options]");
84
+ program.command("export", {
85
+ hidden: true
86
+ }).action(()=>import("../cli/next-export.js").then((mod)=>mod.nextExport())).helpOption(false);
87
+ program.command("info").description("Prints relevant details about the current system which can be used to report Next.js bugs.").addHelpText("after", `\nLearn more: ${(0, _picocolors.cyan)("https://nextjs.org/docs/api-reference/cli#info")}`).option("--verbose", "Collects additional information for debugging.").action((options)=>import("../cli/next-info.js").then((mod)=>mod.nextInfo(options)));
88
+ program.command("lint").description("Runs ESLint for all files in the `/src`, `/app`, `/pages`, `/components`, and `/lib` directories. It also provides a guided setup to install any required dependencies if ESLint is not already configured in your application.").argument("[directory]", `A base directory on which to lint the application. ${(0, _picocolors.italic)("If no directory is provided, the current directory will be used.")}`).option("-d, --dir, <dirs...>", "Include directory, or directories, to run ESLint.").option("--file, <files...>", "Include file, or files, to run ESLint.").addOption(new _commander.Option("--ext, [exts...]", "Specify JavaScript file extensions.").default([
89
+ ".js",
90
+ ".mjs",
91
+ ".cjs",
92
+ ".jsx",
93
+ ".ts",
94
+ ".mts",
95
+ ".cts",
96
+ ".tsx"
97
+ ])).option("-c, --config, <config>", "Uses this configuration file, overriding all other configuration options.").option("--resolve-plugins-relative-to, <rprt>", "Specify a directory where plugins should be resolved from.").option("--strict", "Creates a `.eslintrc.json` file using the Next.js strict configuration.").option("--rulesdir, <rulesdir...>", "Uses additional rules from this directory(s).").option("--fix", "Automatically fix linting issues.").option("--fix-type <fixType>", "Specify the types of fixes to apply (e.g., problem, suggestion, layout).").option("--ignore-path <path>", "Specify a file to ignore.").option("--no-ignore", "Disables the `--ignore-path` option.").option("--quiet", "Reports errors only.").addOption(new _commander.Option("--max-warnings [maxWarnings]", "Specify the number of warnings before triggering a non-zero exit code.").argParser(_utils.myParseInt).default(-1)).option("-o, --output-file, <outputFile>", "Specify a file to write report to.").option("-f, --format, <format>", "Uses a specific output format.").option("--no-inline-config", "Prevents comments from changing config or rules.").option("--report-unused-disable-directives", "Adds reported errors for unused eslint-disable directives.").option("--no-cache", "Disables caching.").option("--cache-location, <cacheLocation>", "Specify a location for cache.").addOption(new _commander.Option("--cache-strategy, [cacheStrategy]", "Specify a strategy to use for detecting changed files in the cache.").default("metadata")).option("--error-on-unmatched-pattern", "Reports errors when any file patterns are unmatched.").action((directory, options)=>import("../cli/next-lint.js").then((mod)=>mod.nextLint(options, directory))).usage("[directory] [options]");
98
+ program.command("start").description("Starts Next.js in production mode. The application should be compiled with `next build` first.").argument("[directory]", `A directory on which to start the application. ${(0, _picocolors.italic)("If no directory is provided, the current directory will be used.")}`).addOption(new _commander.Option("-p, --port <port>", "Specify a port number on which to start the application.").argParser(_utils.myParseInt).default(3000).env("PORT")).option("-H, --hostname <hostname>", "Specify a hostname on which to start the application (default: 0.0.0.0).").addOption(new _commander.Option("--keepAliveTimeout <keepAliveTimeout>", "Specify the maximum amount of milliseconds to wait before closing inactive connections.").argParser(_utils.myParseInt)).addOption(new _commander.Option("--experimental-test-proxy").hideHelp()).action((directory, options)=>import("../cli/next-start.js").then((mod)=>mod.nextStart(options, directory))).usage("[directory] [options]");
99
+ program.command("telemetry").description(`Allows you to enable or disable Next.js' ${(0, _picocolors.bold)("completely anonymous")} telemetry collection.`).addArgument(new _commander.Argument("[arg]").choices([
100
+ "disable",
101
+ "enable",
102
+ "status"
103
+ ])).addHelpText("after", `\nLearn more: ${(0, _picocolors.cyan)("https://nextjs.org/telemetry")}`).addOption(new _commander.Option("--enable", `Enables Next.js' telemetry collection.`).conflicts("disable")).option("--disable", `Disables Next.js' telemetry collection.`).action((arg, options)=>import("../cli/next-telemetry.js").then((mod)=>mod.nextTelemetry(options, arg))).usage("[options]");
104
+ program.parse(process.argv);
164
105
 
165
106
  //# sourceMappingURL=next.map
package/dist/bin/next.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/bin/next.ts"],"names":["args","arg","Boolean","permissive","console","log","process","env","__NEXT_VERSION","exit","foundCommand","commands","_","Object","keys","join","semver","lt","versions","node","__NEXT_REQUIRED_NODE_VERSION","error","performance","mark","defaultCommand","command","includes","push","forwardedArgs","slice","Error","defaultEnv","standardEnv","NODE_ENV","isNotStandard","shouldWarnCommands","warn","NON_STANDARD_NODE_ENV","NEXT_RUNTIME","on","main","currentArgsSpec","commandArgs","validatedArgs","getValidatedArgs","dependency","require","resolve","err","then","exec"],"mappings":";;;;;QAEO;6DACc;8DACL;+DACG;2BACmB;0BACb;6BACG;kCACK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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QgC,IAAI,CACV,CAAC,YAAY,EAAES,WAAW,4HAA4H,EAAEA,WAAW,CAAC,CAAC;QAEzK;IACF;IAEA,MAAMlC,kBAAQ,CAACc,QAAQ,GACpBwB,IAAI,CAAC,CAACC,OAASA,KAAKP,gBACpBM,IAAI,CAAC;QACJ,IAAIxB,YAAY,WAAWA,YAAY,wBAAwB;YAC7D,yEAAyE;YACzE,8BAA8B;YAC9BnB,QAAQG,IAAI,CAAC;QACf;IACF;AACJ;AAEA+B"}
1
+ {"version":3,"sources":["../../src/bin/next.ts"],"names":["semver","lt","process","versions","node","env","__NEXT_REQUIRED_NODE_VERSION","console","error","exit","performance","mark","dependency","require","resolve","err","warn","MyRootCommand","Command","createCommand","name","cmd","addOption","Option","hideHelp","hook","thisCommand","cmdName","defaultEnv","standardEnv","NODE_ENV","isNotStandard","includes","shouldWarnCommands","NON_STANDARD_NODE_ENV","NEXT_RUNTIME","getOptionValue","program","description","configureHelp","formatHelp","helper","formatCliHelpOutput","subcommandTerm","usage","helpCommand","helpOption","version","__NEXT_VERSION","command","argument","italic","option","choices","default","action","directory","options","then","mod","nextBuild","isDefault","argParser","myParseInt","nextDev","hidden","nextExport","addHelpText","cyan","nextInfo","nextLint","nextStart","bold","addArgument","Argument","conflicts","arg","nextTelemetry","parse","argv"],"mappings":";;;;;QAEO;2BAEmC;qBAErB;+DACF;4BACgB;qCACC;2BACE;uBACX;;;;;;AAE3B,IACEA,eAAM,CAACC,EAAE,CAACC,QAAQC,QAAQ,CAACC,IAAI,EAAEF,QAAQG,GAAG,CAACC,4BAA4B,GACzE;IACAC,QAAQC,KAAK,CACX,CAAC,sBAAsB,EAAEN,QAAQC,QAAQ,CAACC,IAAI,CAAC,mCAAmC,EAAEF,QAAQG,GAAG,CAACC,4BAA4B,CAAC,aAAa,CAAC;IAE7IJ,QAAQO,IAAI,CAAC;AACf;AAEA,+DAA+D;AAC/DC,YAAYC,IAAI,CAAC;AAEjB,KAAK,MAAMC,cAAc;IAAC;IAAS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CAAC,IAAIC,mBAAQ,CAAC,SAASrB,OAAO,CAAC;IAAC;IAAW;IAAU;CAAS,GACzEc,WAAW,CAAC,SAAS,CAAC,cAAc,EAAEC,IAAAA,gBAAI,EAAC,gCAAgC,CAAC,EAC5E9C,SAAS,CACR,IAAIC,iBAAM,CAAC,YAAY,CAAC,sCAAsC,CAAC,EAAEoD,SAAS,CACxE,YAGHvB,MAAM,CAAC,aAAa,CAAC,uCAAuC,CAAC,EAC7DG,MAAM,CAAC,CAACqB,KAAKnB,UACZ,MAAM,CAAC,4BAA4BC,IAAI,CAAC,CAACC,MACvCA,IAAIkB,aAAa,CAACpB,SAASmB,OAG9BhC,KAAK,CAAC;AAETP,QAAQyC,KAAK,CAAC5E,QAAQ6E,IAAI"}
@@ -97,5 +97,5 @@ export type RoutesManifest = {
97
97
  skipMiddlewareUrlNormalize?: boolean;
98
98
  caseSensitive?: boolean;
99
99
  };
100
- export default function build(dir: string, reactProductionProfiling: boolean | undefined, debugOutput: boolean | undefined, runLint: boolean | undefined, noMangling: boolean | undefined, appDirOnly: boolean | undefined, turboNextBuild: boolean | undefined, buildMode: 'default' | 'experimental-compile' | 'experimental-generate'): Promise<void>;
100
+ export default function build(dir: string, reactProductionProfiling: boolean | undefined, debugOutput: boolean | undefined, runLint: boolean | undefined, noMangling: boolean | undefined, appDirOnly: boolean | undefined, turboNextBuild: boolean | undefined, experimentalBuildMode: 'default' | 'compile' | 'generate'): Promise<void>;
101
101
  export {};
@@ -331,14 +331,14 @@ async function getBuildId(isGenerateMode, distDir, nextBuildSpan, config) {
331
331
  return await nextBuildSpan.traceChild("generate-buildid").traceAsyncFn(()=>(0, _generatebuildid.generateBuildId)(config.generateBuildId, _indexcjs.nanoid));
332
332
  }
333
333
  const IS_TURBOPACK_BUILD = process.env.TURBOPACK && process.env.TURBOPACK_BUILD;
334
- async function build(dir, reactProductionProfiling = false, debugOutput = false, runLint = true, noMangling = false, appDirOnly = false, turboNextBuild = false, buildMode) {
335
- const isCompileMode = buildMode === "experimental-compile";
336
- const isGenerateMode = buildMode === "experimental-generate";
334
+ async function build(dir, reactProductionProfiling = false, debugOutput = false, runLint = true, noMangling = false, appDirOnly = false, turboNextBuild = false, experimentalBuildMode) {
335
+ const isCompileMode = experimentalBuildMode === "compile";
336
+ const isGenerateMode = experimentalBuildMode === "generate";
337
337
  try {
338
338
  const nextBuildSpan = (0, _trace.trace)("next-build", undefined, {
339
- buildMode: buildMode,
339
+ buildMode: experimentalBuildMode,
340
340
  isTurboBuild: String(turboNextBuild),
341
- version: "14.1.2-canary.0"
341
+ version: "14.1.2-canary.2"
342
342
  });
343
343
  _buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
344
344
  _buildcontext.NextBuildContext.dir = dir;