next 15.4.0-canary.58 → 15.4.0-canary.59

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 (46) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/collect-build-traces.js +6 -2
  3. package/dist/build/collect-build-traces.js.map +1 -1
  4. package/dist/build/index.js +7 -8
  5. package/dist/build/index.js.map +1 -1
  6. package/dist/build/preview-key-utils.d.ts +5 -0
  7. package/dist/build/preview-key-utils.js +91 -0
  8. package/dist/build/preview-key-utils.js.map +1 -0
  9. package/dist/build/swc/generated-native.d.ts +0 -1
  10. package/dist/build/swc/index.js +1 -1
  11. package/dist/build/swc/types.d.ts +0 -1
  12. package/dist/build/webpack-config.js +2 -2
  13. package/dist/client/app-bootstrap.js +1 -1
  14. package/dist/client/index.js +1 -1
  15. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js +2 -2
  16. package/dist/compiled/next-server/app-page-experimental.runtime.dev.js.map +1 -1
  17. package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js +1 -1
  18. package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js.map +1 -1
  19. package/dist/compiled/next-server/pages-turbo.runtime.prod.js +2 -2
  20. package/dist/compiled/next-server/pages-turbo.runtime.prod.js.map +1 -1
  21. package/dist/esm/build/collect-build-traces.js +6 -2
  22. package/dist/esm/build/collect-build-traces.js.map +1 -1
  23. package/dist/esm/build/index.js +7 -8
  24. package/dist/esm/build/index.js.map +1 -1
  25. package/dist/esm/build/preview-key-utils.js +81 -0
  26. package/dist/esm/build/preview-key-utils.js.map +1 -0
  27. package/dist/esm/build/swc/generated-native.d.ts +0 -1
  28. package/dist/esm/build/swc/index.js +1 -1
  29. package/dist/esm/build/swc/types.js.map +1 -1
  30. package/dist/esm/build/webpack-config.js +2 -2
  31. package/dist/esm/client/app-bootstrap.js +1 -1
  32. package/dist/esm/client/index.js +1 -1
  33. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  34. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  35. package/dist/esm/server/lib/app-info-log.js +1 -1
  36. package/dist/esm/server/lib/start-server.js +1 -1
  37. package/dist/esm/shared/lib/canary-only.js +1 -1
  38. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  39. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  40. package/dist/server/lib/app-info-log.js +1 -1
  41. package/dist/server/lib/start-server.js +1 -1
  42. package/dist/shared/lib/canary-only.js +1 -1
  43. package/dist/telemetry/anonymous-meta.js +1 -1
  44. package/dist/telemetry/events/session-stopped.js +2 -2
  45. package/dist/telemetry/events/version.js +2 -2
  46. package/package.json +15 -15
@@ -0,0 +1,81 @@
1
+ import path from 'path';
2
+ import fs from 'fs';
3
+ import crypto from 'crypto';
4
+ import { getStorageDirectory } from '../server/cache-dir';
5
+ const CONFIG_FILE = '.previewinfo';
6
+ const PREVIEW_ID = 'previewModeId';
7
+ const PREVIEW_SIGNING_KEY = 'previewModeSigningKey';
8
+ const PREVIEW_ENCRYPTION_KEY = 'previewModeEncryptionKey';
9
+ const PREVIEW_EXPIRE_AT = 'expireAt';
10
+ const EXPIRATION = 1000 * 60 * 60 * 24 * 14 // 14 days
11
+ ;
12
+ async function writeCache(distDir, config) {
13
+ const cacheBaseDir = getStorageDirectory(distDir);
14
+ if (!cacheBaseDir) return;
15
+ const configPath = path.join(cacheBaseDir, CONFIG_FILE);
16
+ if (!fs.existsSync(cacheBaseDir)) {
17
+ await fs.promises.mkdir(cacheBaseDir, {
18
+ recursive: true
19
+ });
20
+ }
21
+ await fs.promises.writeFile(configPath, JSON.stringify({
22
+ [PREVIEW_ID]: config.previewModeId,
23
+ [PREVIEW_SIGNING_KEY]: config.previewModeSigningKey,
24
+ [PREVIEW_ENCRYPTION_KEY]: config.previewModeEncryptionKey,
25
+ [PREVIEW_EXPIRE_AT]: Date.now() + EXPIRATION
26
+ }));
27
+ }
28
+ function generateConfig() {
29
+ return {
30
+ previewModeId: crypto.randomBytes(16).toString('hex'),
31
+ previewModeSigningKey: crypto.randomBytes(32).toString('hex'),
32
+ previewModeEncryptionKey: crypto.randomBytes(32).toString('hex')
33
+ };
34
+ }
35
+ // This utility is used to get a key for the cache directory. If the
36
+ // key is not present, it will generate a new one and store it in the
37
+ // cache directory inside dist.
38
+ // The key will also expire after a certain amount of time. Once it
39
+ // expires, a new one will be generated.
40
+ export async function generatePreviewKeys({ distDir, isBuild }) {
41
+ const cacheBaseDir = getStorageDirectory(distDir);
42
+ if (!cacheBaseDir) {
43
+ // There's no persistent storage available. We generate a new config.
44
+ // This also covers development time.
45
+ return generateConfig();
46
+ }
47
+ const configPath = path.join(cacheBaseDir, CONFIG_FILE);
48
+ async function tryReadCachedConfig() {
49
+ if (!fs.existsSync(configPath)) return false;
50
+ try {
51
+ const config = JSON.parse(await fs.promises.readFile(configPath, 'utf8'));
52
+ if (!config) return false;
53
+ if (typeof config[PREVIEW_ID] !== 'string' || typeof config[PREVIEW_ENCRYPTION_KEY] !== 'string' || typeof config[PREVIEW_SIGNING_KEY] !== 'string' || typeof config[PREVIEW_EXPIRE_AT] !== 'number') {
54
+ return false;
55
+ }
56
+ // For build time, we need to rotate the key if it's expired. Otherwise
57
+ // (next start) we have to keep the key as it is so the runtime key matches
58
+ // the build time key.
59
+ if (isBuild && config[PREVIEW_EXPIRE_AT] < Date.now()) {
60
+ return false;
61
+ }
62
+ return {
63
+ previewModeId: config[PREVIEW_ID],
64
+ previewModeSigningKey: config[PREVIEW_SIGNING_KEY],
65
+ previewModeEncryptionKey: config[PREVIEW_ENCRYPTION_KEY]
66
+ };
67
+ } catch (e) {
68
+ // Broken config file. We should generate a new key and overwrite it.
69
+ return false;
70
+ }
71
+ }
72
+ const maybeValidConfig = await tryReadCachedConfig();
73
+ if (maybeValidConfig !== false) {
74
+ return maybeValidConfig;
75
+ }
76
+ const config = generateConfig();
77
+ await writeCache(distDir, config);
78
+ return config;
79
+ }
80
+
81
+ //# sourceMappingURL=preview-key-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/build/preview-key-utils.ts"],"sourcesContent":["import path from 'path'\nimport fs from 'fs'\nimport crypto from 'crypto'\nimport type { __ApiPreviewProps } from '../server/api-utils'\nimport { getStorageDirectory } from '../server/cache-dir'\n\nconst CONFIG_FILE = '.previewinfo'\nconst PREVIEW_ID = 'previewModeId'\nconst PREVIEW_SIGNING_KEY = 'previewModeSigningKey'\nconst PREVIEW_ENCRYPTION_KEY = 'previewModeEncryptionKey'\nconst PREVIEW_EXPIRE_AT = 'expireAt'\nconst EXPIRATION = 1000 * 60 * 60 * 24 * 14 // 14 days\n\nasync function writeCache(distDir: string, config: __ApiPreviewProps) {\n const cacheBaseDir = getStorageDirectory(distDir)\n if (!cacheBaseDir) return\n\n const configPath = path.join(cacheBaseDir, CONFIG_FILE)\n if (!fs.existsSync(cacheBaseDir)) {\n await fs.promises.mkdir(cacheBaseDir, { recursive: true })\n }\n await fs.promises.writeFile(\n configPath,\n JSON.stringify({\n [PREVIEW_ID]: config.previewModeId,\n [PREVIEW_SIGNING_KEY]: config.previewModeSigningKey,\n [PREVIEW_ENCRYPTION_KEY]: config.previewModeEncryptionKey,\n [PREVIEW_EXPIRE_AT]: Date.now() + EXPIRATION,\n })\n )\n}\n\nfunction generateConfig() {\n return {\n previewModeId: crypto.randomBytes(16).toString('hex'),\n previewModeSigningKey: crypto.randomBytes(32).toString('hex'),\n previewModeEncryptionKey: crypto.randomBytes(32).toString('hex'),\n }\n}\n\n// This utility is used to get a key for the cache directory. If the\n// key is not present, it will generate a new one and store it in the\n// cache directory inside dist.\n// The key will also expire after a certain amount of time. Once it\n// expires, a new one will be generated.\nexport async function generatePreviewKeys({\n distDir,\n isBuild,\n}: {\n distDir: string\n isBuild: boolean\n}): Promise<__ApiPreviewProps> {\n const cacheBaseDir = getStorageDirectory(distDir)\n\n if (!cacheBaseDir) {\n // There's no persistent storage available. We generate a new config.\n // This also covers development time.\n return generateConfig()\n }\n\n const configPath = path.join(cacheBaseDir, CONFIG_FILE)\n async function tryReadCachedConfig(): Promise<false | __ApiPreviewProps> {\n if (!fs.existsSync(configPath)) return false\n try {\n const config = JSON.parse(await fs.promises.readFile(configPath, 'utf8'))\n if (!config) return false\n if (\n typeof config[PREVIEW_ID] !== 'string' ||\n typeof config[PREVIEW_ENCRYPTION_KEY] !== 'string' ||\n typeof config[PREVIEW_SIGNING_KEY] !== 'string' ||\n typeof config[PREVIEW_EXPIRE_AT] !== 'number'\n ) {\n return false\n }\n // For build time, we need to rotate the key if it's expired. Otherwise\n // (next start) we have to keep the key as it is so the runtime key matches\n // the build time key.\n if (isBuild && config[PREVIEW_EXPIRE_AT] < Date.now()) {\n return false\n }\n\n return {\n previewModeId: config[PREVIEW_ID],\n previewModeSigningKey: config[PREVIEW_SIGNING_KEY],\n previewModeEncryptionKey: config[PREVIEW_ENCRYPTION_KEY],\n }\n } catch (e) {\n // Broken config file. We should generate a new key and overwrite it.\n return false\n }\n }\n const maybeValidConfig = await tryReadCachedConfig()\n if (maybeValidConfig !== false) {\n return maybeValidConfig\n }\n const config = generateConfig()\n await writeCache(distDir, config)\n\n return config\n}\n"],"names":["path","fs","crypto","getStorageDirectory","CONFIG_FILE","PREVIEW_ID","PREVIEW_SIGNING_KEY","PREVIEW_ENCRYPTION_KEY","PREVIEW_EXPIRE_AT","EXPIRATION","writeCache","distDir","config","cacheBaseDir","configPath","join","existsSync","promises","mkdir","recursive","writeFile","JSON","stringify","previewModeId","previewModeSigningKey","previewModeEncryptionKey","Date","now","generateConfig","randomBytes","toString","generatePreviewKeys","isBuild","tryReadCachedConfig","parse","readFile","e","maybeValidConfig"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AACvB,OAAOC,QAAQ,KAAI;AACnB,OAAOC,YAAY,SAAQ;AAE3B,SAASC,mBAAmB,QAAQ,sBAAqB;AAEzD,MAAMC,cAAc;AACpB,MAAMC,aAAa;AACnB,MAAMC,sBAAsB;AAC5B,MAAMC,yBAAyB;AAC/B,MAAMC,oBAAoB;AAC1B,MAAMC,aAAa,OAAO,KAAK,KAAK,KAAK,GAAG,UAAU;;AAEtD,eAAeC,WAAWC,OAAe,EAAEC,MAAyB;IAClE,MAAMC,eAAeV,oBAAoBQ;IACzC,IAAI,CAACE,cAAc;IAEnB,MAAMC,aAAad,KAAKe,IAAI,CAACF,cAAcT;IAC3C,IAAI,CAACH,GAAGe,UAAU,CAACH,eAAe;QAChC,MAAMZ,GAAGgB,QAAQ,CAACC,KAAK,CAACL,cAAc;YAAEM,WAAW;QAAK;IAC1D;IACA,MAAMlB,GAAGgB,QAAQ,CAACG,SAAS,CACzBN,YACAO,KAAKC,SAAS,CAAC;QACb,CAACjB,WAAW,EAAEO,OAAOW,aAAa;QAClC,CAACjB,oBAAoB,EAAEM,OAAOY,qBAAqB;QACnD,CAACjB,uBAAuB,EAAEK,OAAOa,wBAAwB;QACzD,CAACjB,kBAAkB,EAAEkB,KAAKC,GAAG,KAAKlB;IACpC;AAEJ;AAEA,SAASmB;IACP,OAAO;QACLL,eAAerB,OAAO2B,WAAW,CAAC,IAAIC,QAAQ,CAAC;QAC/CN,uBAAuBtB,OAAO2B,WAAW,CAAC,IAAIC,QAAQ,CAAC;QACvDL,0BAA0BvB,OAAO2B,WAAW,CAAC,IAAIC,QAAQ,CAAC;IAC5D;AACF;AAEA,oEAAoE;AACpE,qEAAqE;AACrE,+BAA+B;AAC/B,mEAAmE;AACnE,wCAAwC;AACxC,OAAO,eAAeC,oBAAoB,EACxCpB,OAAO,EACPqB,OAAO,EAIR;IACC,MAAMnB,eAAeV,oBAAoBQ;IAEzC,IAAI,CAACE,cAAc;QACjB,qEAAqE;QACrE,qCAAqC;QACrC,OAAOe;IACT;IAEA,MAAMd,aAAad,KAAKe,IAAI,CAACF,cAAcT;IAC3C,eAAe6B;QACb,IAAI,CAAChC,GAAGe,UAAU,CAACF,aAAa,OAAO;QACvC,IAAI;YACF,MAAMF,SAASS,KAAKa,KAAK,CAAC,MAAMjC,GAAGgB,QAAQ,CAACkB,QAAQ,CAACrB,YAAY;YACjE,IAAI,CAACF,QAAQ,OAAO;YACpB,IACE,OAAOA,MAAM,CAACP,WAAW,KAAK,YAC9B,OAAOO,MAAM,CAACL,uBAAuB,KAAK,YAC1C,OAAOK,MAAM,CAACN,oBAAoB,KAAK,YACvC,OAAOM,MAAM,CAACJ,kBAAkB,KAAK,UACrC;gBACA,OAAO;YACT;YACA,uEAAuE;YACvE,2EAA2E;YAC3E,sBAAsB;YACtB,IAAIwB,WAAWpB,MAAM,CAACJ,kBAAkB,GAAGkB,KAAKC,GAAG,IAAI;gBACrD,OAAO;YACT;YAEA,OAAO;gBACLJ,eAAeX,MAAM,CAACP,WAAW;gBACjCmB,uBAAuBZ,MAAM,CAACN,oBAAoB;gBAClDmB,0BAA0Bb,MAAM,CAACL,uBAAuB;YAC1D;QACF,EAAE,OAAO6B,GAAG;YACV,qEAAqE;YACrE,OAAO;QACT;IACF;IACA,MAAMC,mBAAmB,MAAMJ;IAC/B,IAAII,qBAAqB,OAAO;QAC9B,OAAOA;IACT;IACA,MAAMzB,SAASgB;IACf,MAAMlB,WAAWC,SAASC;IAE1B,OAAOA;AACT","ignoreList":[0]}
@@ -347,7 +347,6 @@ export interface NapiIssue {
347
347
  detail?: any
348
348
  source?: NapiIssueSource
349
349
  documentationLink: string
350
- subIssues: Array<NapiIssue>
351
350
  }
352
351
  export interface NapiIssueSource {
353
352
  source: NapiSource
@@ -11,7 +11,7 @@ import { isDeepStrictEqual } from 'util';
11
11
  import { getDefineEnv } from '../define-env';
12
12
  import { getReactCompilerLoader } from '../get-babel-loader-config';
13
13
  import { TurbopackInternalError } from '../../shared/lib/turbopack/utils';
14
- const nextVersion = "15.4.0-canary.58";
14
+ const nextVersion = "15.4.0-canary.59";
15
15
  const ArchName = arch();
16
16
  const PlatformName = platform();
17
17
  function infoLog(...args) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/build/swc/types.ts"],"sourcesContent":["import type { NextConfigComplete } from '../../server/config-shared'\nimport type { __ApiPreviewProps } from '../../server/api-utils'\nimport type {\n ExternalObject,\n RefCell,\n NapiTurboEngineOptions,\n} from './generated-native'\n\nexport type { NapiTurboEngineOptions as TurboEngineOptions }\n\nexport interface Binding {\n isWasm: boolean\n turbo: {\n createProject(\n options: ProjectOptions,\n turboEngineOptions?: NapiTurboEngineOptions\n ): Promise<Project>\n startTurbopackTraceServer(traceFilePath: string): void\n\n nextBuild?: any\n }\n mdx: {\n compile(src: string, options: any): any\n compileSync(src: string, options: any): any\n }\n minify(src: string, options: any): Promise<any>\n minifySync(src: string, options: any): any\n transform(src: string, options: any): Promise<any>\n transformSync(src: string, options: any): any\n parse(src: string, options: any): Promise<string>\n\n getTargetTriple(): string | undefined\n\n initCustomTraceSubscriber?(traceOutFilePath?: string): ExternalObject<RefCell>\n teardownTraceSubscriber?(guardExternal: ExternalObject<RefCell>): void\n css: {\n lightning: {\n transform(transformOptions: any): Promise<any>\n transformStyleAttr(transformAttrOptions: any): Promise<any>\n }\n }\n\n reactCompiler: {\n isReactCompilerRequired(filename: string): Promise<boolean>\n }\n}\n\nexport type StyledString =\n | {\n type: 'text'\n value: string\n }\n | {\n type: 'code'\n value: string\n }\n | {\n type: 'strong'\n value: string\n }\n | {\n type: 'stack'\n value: StyledString[]\n }\n | {\n type: 'line'\n value: StyledString[]\n }\n\nexport interface Issue {\n severity: string\n stage: string\n filePath: string\n title: StyledString\n description?: StyledString\n detail?: StyledString\n source?: {\n source: {\n ident: string\n content?: string\n }\n range?: {\n start: {\n // 0-indexed\n line: number\n // 0-indexed\n column: number\n }\n end: {\n // 0-indexed\n line: number\n // 0-indexed\n column: number\n }\n }\n }\n documentationLink: string\n subIssues: Issue[]\n}\n\nexport interface Diagnostics {\n category: string\n name: string\n payload: unknown\n}\n\nexport type TurbopackResult<T = {}> = T & {\n issues: Issue[]\n diagnostics: Diagnostics[]\n}\n\nexport interface Middleware {\n endpoint: Endpoint\n}\n\nexport interface Instrumentation {\n nodeJs: Endpoint\n edge: Endpoint\n}\n\nexport interface RawEntrypoints {\n routes: Map<string, Route>\n middleware?: Middleware\n instrumentation?: Instrumentation\n pagesDocumentEndpoint: Endpoint\n pagesAppEndpoint: Endpoint\n pagesErrorEndpoint: Endpoint\n}\n\ninterface BaseUpdate {\n resource: {\n headers: unknown\n path: string\n }\n diagnostics: unknown[]\n issues: Issue[]\n}\n\ninterface IssuesUpdate extends BaseUpdate {\n type: 'issues'\n}\n\ninterface EcmascriptMergedUpdate {\n type: 'EcmascriptMergedUpdate'\n chunks: { [moduleName: string]: { type: 'partial' } }\n entries: { [moduleName: string]: { code: string; map: string; url: string } }\n}\n\ninterface PartialUpdate extends BaseUpdate {\n type: 'partial'\n instruction: {\n type: 'ChunkListUpdate'\n merged: EcmascriptMergedUpdate[] | undefined\n }\n}\n\nexport type Update = IssuesUpdate | PartialUpdate\n\nexport interface HmrIdentifiers {\n identifiers: string[]\n}\n\n/** @see https://github.com/vercel/next.js/blob/415cd74b9a220b6f50da64da68c13043e9b02995/packages/next-swc/crates/napi/src/next_api/project.rs#L824-L833 */\nexport interface TurbopackStackFrame {\n isServer: boolean\n isInternal?: boolean\n file: string\n originalFile?: string\n /** 1-indexed, unlike source map tokens */\n line?: number\n /** 1-indexed, unlike source map tokens */\n column?: number\n methodName?: string\n}\n\nexport type UpdateMessage =\n | {\n updateType: 'start'\n }\n | {\n updateType: 'end'\n value: UpdateInfo\n }\n\nexport type CompilationEvent = {\n typeName: string\n message: string\n severity: string\n eventData: any\n}\n\nexport interface UpdateInfo {\n duration: number\n tasks: number\n}\n\nexport interface Project {\n update(options: Partial<ProjectOptions>): Promise<void>\n\n writeAllEntrypointsToDisk(\n appDirOnly: boolean\n ): Promise<TurbopackResult<RawEntrypoints>>\n\n entrypointsSubscribe(): AsyncIterableIterator<TurbopackResult<RawEntrypoints>>\n\n hmrEvents(identifier: string): AsyncIterableIterator<TurbopackResult<Update>>\n\n hmrIdentifiersSubscribe(): AsyncIterableIterator<\n TurbopackResult<HmrIdentifiers>\n >\n\n getSourceForAsset(filePath: string): Promise<string | null>\n\n getSourceMap(filePath: string): Promise<string | null>\n getSourceMapSync(filePath: string): string | null\n\n traceSource(\n stackFrame: TurbopackStackFrame,\n currentDirectoryFileUrl: string\n ): Promise<TurbopackStackFrame | null>\n\n updateInfoSubscribe(\n aggregationMs: number\n ): AsyncIterableIterator<TurbopackResult<UpdateMessage>>\n\n compilationEventsSubscribe(): AsyncIterableIterator<\n TurbopackResult<CompilationEvent>\n >\n\n shutdown(): Promise<void>\n\n onExit(): Promise<void>\n}\n\nexport type Route =\n | {\n type: 'conflict'\n }\n | {\n type: 'app-page'\n pages: {\n originalName: string\n htmlEndpoint: Endpoint\n rscEndpoint: Endpoint\n }[]\n }\n | {\n type: 'app-route'\n originalName: string\n endpoint: Endpoint\n }\n | {\n type: 'page'\n htmlEndpoint: Endpoint\n dataEndpoint: Endpoint\n }\n | {\n type: 'page-api'\n endpoint: Endpoint\n }\n\nexport interface Endpoint {\n /** Write files for the endpoint to disk. */\n writeToDisk(): Promise<TurbopackResult<WrittenEndpoint>>\n\n /**\n * Listen to client-side changes to the endpoint.\n * After clientChanged() has been awaited it will listen to changes.\n * The async iterator will yield for each change.\n */\n clientChanged(): Promise<AsyncIterableIterator<TurbopackResult>>\n\n /**\n * Listen to server-side changes to the endpoint.\n * After serverChanged() has been awaited it will listen to changes.\n * The async iterator will yield for each change.\n */\n serverChanged(\n includeIssues: boolean\n ): Promise<AsyncIterableIterator<TurbopackResult>>\n}\n\ninterface EndpointConfig {\n dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'\n dynamicParams?: boolean\n revalidate?: 'never' | 'force-cache' | number\n fetchCache?:\n | 'auto'\n | 'default-cache'\n | 'only-cache'\n | 'force-cache'\n | 'default-no-store'\n | 'only-no-store'\n | 'force-no-store'\n runtime?: 'nodejs' | 'edge'\n preferredRegion?: string\n}\n\nexport type ServerPath = {\n path: string\n contentHash: string\n}\n\nexport type WrittenEndpoint =\n | {\n type: 'nodejs'\n /** The entry path for the endpoint. */\n entryPath: string\n /** All client paths that have been written for the endpoint. */\n clientPaths: string[]\n /** All server paths that have been written for the endpoint. */\n serverPaths: ServerPath[]\n config: EndpointConfig\n }\n | {\n type: 'edge'\n /** All client paths that have been written for the endpoint. */\n clientPaths: string[]\n /** All server paths that have been written for the endpoint. */\n serverPaths: ServerPath[]\n config: EndpointConfig\n }\n | {\n type: 'none'\n clientPaths: []\n serverPaths: []\n config: EndpointConfig\n }\n\nexport interface ProjectOptions {\n /**\n * A root path from which all files must be nested under. Trying to access\n * a file outside this root will fail. Think of this as a chroot.\n */\n rootPath: string\n\n /**\n * A path inside the root_path which contains the app/pages directories.\n */\n projectPath: string\n\n /**\n * The path to the .next directory.\n */\n distDir: string\n\n /**\n * The next.config.js contents.\n */\n nextConfig: NextConfigComplete\n\n /**\n * Jsconfig, or tsconfig contents.\n *\n * Next.js implicitly requires to read it to support few options\n * https://nextjs.org/docs/architecture/nextjs-compiler#legacy-decorators\n * https://nextjs.org/docs/architecture/nextjs-compiler#importsource\n */\n jsConfig: {\n compilerOptions: object\n }\n\n /**\n * A map of environment variables to use when compiling code.\n */\n env: Record<string, string>\n\n defineEnv: DefineEnv\n\n /**\n * Whether to watch the filesystem for file changes.\n */\n watch: {\n enable: boolean\n pollIntervalMs?: number\n }\n\n /**\n * The mode in which Next.js is running.\n */\n dev: boolean\n\n /**\n * The server actions encryption key.\n */\n encryptionKey: string\n\n /**\n * The build id.\n */\n buildId: string\n\n /**\n * Options for draft mode.\n */\n previewProps: __ApiPreviewProps\n\n /**\n * The browserslist query to use for targeting browsers.\n */\n browserslistQuery: string\n\n /**\n * When the code is minified, this opts out of the default mangling of local\n * names for variables, functions etc., which can be useful for\n * debugging/profiling purposes.\n */\n noMangling: boolean\n}\n\nexport interface DefineEnv {\n client: RustifiedEnv\n edge: RustifiedEnv\n nodejs: RustifiedEnv\n}\n\nexport type RustifiedEnv = { name: string; value: string }[]\n\nexport interface GlobalEntrypoints {\n app: Endpoint | undefined\n document: Endpoint | undefined\n error: Endpoint | undefined\n middleware: Middleware | undefined\n instrumentation: Instrumentation | undefined\n}\n\nexport type PageRoute =\n | {\n type: 'page'\n htmlEndpoint: Endpoint\n dataEndpoint: Endpoint\n }\n | {\n type: 'page-api'\n endpoint: Endpoint\n }\n\nexport type AppRoute =\n | {\n type: 'app-page'\n htmlEndpoint: Endpoint\n rscEndpoint: Endpoint\n }\n | {\n type: 'app-route'\n endpoint: Endpoint\n }\n\n// pathname -> route\nexport type PageEntrypoints = Map<string, PageRoute>\n\n// originalName / page -> route\nexport type AppEntrypoints = Map<string, AppRoute>\n\nexport type Entrypoints = {\n global: GlobalEntrypoints\n page: PageEntrypoints\n app: AppEntrypoints\n}\n"],"names":[],"mappings":"AAscA,WAIC","ignoreList":[0]}
1
+ {"version":3,"sources":["../../../src/build/swc/types.ts"],"sourcesContent":["import type { NextConfigComplete } from '../../server/config-shared'\nimport type { __ApiPreviewProps } from '../../server/api-utils'\nimport type {\n ExternalObject,\n RefCell,\n NapiTurboEngineOptions,\n} from './generated-native'\n\nexport type { NapiTurboEngineOptions as TurboEngineOptions }\n\nexport interface Binding {\n isWasm: boolean\n turbo: {\n createProject(\n options: ProjectOptions,\n turboEngineOptions?: NapiTurboEngineOptions\n ): Promise<Project>\n startTurbopackTraceServer(traceFilePath: string): void\n\n nextBuild?: any\n }\n mdx: {\n compile(src: string, options: any): any\n compileSync(src: string, options: any): any\n }\n minify(src: string, options: any): Promise<any>\n minifySync(src: string, options: any): any\n transform(src: string, options: any): Promise<any>\n transformSync(src: string, options: any): any\n parse(src: string, options: any): Promise<string>\n\n getTargetTriple(): string | undefined\n\n initCustomTraceSubscriber?(traceOutFilePath?: string): ExternalObject<RefCell>\n teardownTraceSubscriber?(guardExternal: ExternalObject<RefCell>): void\n css: {\n lightning: {\n transform(transformOptions: any): Promise<any>\n transformStyleAttr(transformAttrOptions: any): Promise<any>\n }\n }\n\n reactCompiler: {\n isReactCompilerRequired(filename: string): Promise<boolean>\n }\n}\n\nexport type StyledString =\n | {\n type: 'text'\n value: string\n }\n | {\n type: 'code'\n value: string\n }\n | {\n type: 'strong'\n value: string\n }\n | {\n type: 'stack'\n value: StyledString[]\n }\n | {\n type: 'line'\n value: StyledString[]\n }\n\nexport interface Issue {\n severity: string\n stage: string\n filePath: string\n title: StyledString\n description?: StyledString\n detail?: StyledString\n source?: {\n source: {\n ident: string\n content?: string\n }\n range?: {\n start: {\n // 0-indexed\n line: number\n // 0-indexed\n column: number\n }\n end: {\n // 0-indexed\n line: number\n // 0-indexed\n column: number\n }\n }\n }\n documentationLink: string\n}\n\nexport interface Diagnostics {\n category: string\n name: string\n payload: unknown\n}\n\nexport type TurbopackResult<T = {}> = T & {\n issues: Issue[]\n diagnostics: Diagnostics[]\n}\n\nexport interface Middleware {\n endpoint: Endpoint\n}\n\nexport interface Instrumentation {\n nodeJs: Endpoint\n edge: Endpoint\n}\n\nexport interface RawEntrypoints {\n routes: Map<string, Route>\n middleware?: Middleware\n instrumentation?: Instrumentation\n pagesDocumentEndpoint: Endpoint\n pagesAppEndpoint: Endpoint\n pagesErrorEndpoint: Endpoint\n}\n\ninterface BaseUpdate {\n resource: {\n headers: unknown\n path: string\n }\n diagnostics: unknown[]\n issues: Issue[]\n}\n\ninterface IssuesUpdate extends BaseUpdate {\n type: 'issues'\n}\n\ninterface EcmascriptMergedUpdate {\n type: 'EcmascriptMergedUpdate'\n chunks: { [moduleName: string]: { type: 'partial' } }\n entries: { [moduleName: string]: { code: string; map: string; url: string } }\n}\n\ninterface PartialUpdate extends BaseUpdate {\n type: 'partial'\n instruction: {\n type: 'ChunkListUpdate'\n merged: EcmascriptMergedUpdate[] | undefined\n }\n}\n\nexport type Update = IssuesUpdate | PartialUpdate\n\nexport interface HmrIdentifiers {\n identifiers: string[]\n}\n\n/** @see https://github.com/vercel/next.js/blob/415cd74b9a220b6f50da64da68c13043e9b02995/packages/next-swc/crates/napi/src/next_api/project.rs#L824-L833 */\nexport interface TurbopackStackFrame {\n isServer: boolean\n isInternal?: boolean\n file: string\n originalFile?: string\n /** 1-indexed, unlike source map tokens */\n line?: number\n /** 1-indexed, unlike source map tokens */\n column?: number\n methodName?: string\n}\n\nexport type UpdateMessage =\n | {\n updateType: 'start'\n }\n | {\n updateType: 'end'\n value: UpdateInfo\n }\n\nexport type CompilationEvent = {\n typeName: string\n message: string\n severity: string\n eventData: any\n}\n\nexport interface UpdateInfo {\n duration: number\n tasks: number\n}\n\nexport interface Project {\n update(options: Partial<ProjectOptions>): Promise<void>\n\n writeAllEntrypointsToDisk(\n appDirOnly: boolean\n ): Promise<TurbopackResult<RawEntrypoints>>\n\n entrypointsSubscribe(): AsyncIterableIterator<TurbopackResult<RawEntrypoints>>\n\n hmrEvents(identifier: string): AsyncIterableIterator<TurbopackResult<Update>>\n\n hmrIdentifiersSubscribe(): AsyncIterableIterator<\n TurbopackResult<HmrIdentifiers>\n >\n\n getSourceForAsset(filePath: string): Promise<string | null>\n\n getSourceMap(filePath: string): Promise<string | null>\n getSourceMapSync(filePath: string): string | null\n\n traceSource(\n stackFrame: TurbopackStackFrame,\n currentDirectoryFileUrl: string\n ): Promise<TurbopackStackFrame | null>\n\n updateInfoSubscribe(\n aggregationMs: number\n ): AsyncIterableIterator<TurbopackResult<UpdateMessage>>\n\n compilationEventsSubscribe(): AsyncIterableIterator<\n TurbopackResult<CompilationEvent>\n >\n\n shutdown(): Promise<void>\n\n onExit(): Promise<void>\n}\n\nexport type Route =\n | {\n type: 'conflict'\n }\n | {\n type: 'app-page'\n pages: {\n originalName: string\n htmlEndpoint: Endpoint\n rscEndpoint: Endpoint\n }[]\n }\n | {\n type: 'app-route'\n originalName: string\n endpoint: Endpoint\n }\n | {\n type: 'page'\n htmlEndpoint: Endpoint\n dataEndpoint: Endpoint\n }\n | {\n type: 'page-api'\n endpoint: Endpoint\n }\n\nexport interface Endpoint {\n /** Write files for the endpoint to disk. */\n writeToDisk(): Promise<TurbopackResult<WrittenEndpoint>>\n\n /**\n * Listen to client-side changes to the endpoint.\n * After clientChanged() has been awaited it will listen to changes.\n * The async iterator will yield for each change.\n */\n clientChanged(): Promise<AsyncIterableIterator<TurbopackResult>>\n\n /**\n * Listen to server-side changes to the endpoint.\n * After serverChanged() has been awaited it will listen to changes.\n * The async iterator will yield for each change.\n */\n serverChanged(\n includeIssues: boolean\n ): Promise<AsyncIterableIterator<TurbopackResult>>\n}\n\ninterface EndpointConfig {\n dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'\n dynamicParams?: boolean\n revalidate?: 'never' | 'force-cache' | number\n fetchCache?:\n | 'auto'\n | 'default-cache'\n | 'only-cache'\n | 'force-cache'\n | 'default-no-store'\n | 'only-no-store'\n | 'force-no-store'\n runtime?: 'nodejs' | 'edge'\n preferredRegion?: string\n}\n\nexport type ServerPath = {\n path: string\n contentHash: string\n}\n\nexport type WrittenEndpoint =\n | {\n type: 'nodejs'\n /** The entry path for the endpoint. */\n entryPath: string\n /** All client paths that have been written for the endpoint. */\n clientPaths: string[]\n /** All server paths that have been written for the endpoint. */\n serverPaths: ServerPath[]\n config: EndpointConfig\n }\n | {\n type: 'edge'\n /** All client paths that have been written for the endpoint. */\n clientPaths: string[]\n /** All server paths that have been written for the endpoint. */\n serverPaths: ServerPath[]\n config: EndpointConfig\n }\n | {\n type: 'none'\n clientPaths: []\n serverPaths: []\n config: EndpointConfig\n }\n\nexport interface ProjectOptions {\n /**\n * A root path from which all files must be nested under. Trying to access\n * a file outside this root will fail. Think of this as a chroot.\n */\n rootPath: string\n\n /**\n * A path inside the root_path which contains the app/pages directories.\n */\n projectPath: string\n\n /**\n * The path to the .next directory.\n */\n distDir: string\n\n /**\n * The next.config.js contents.\n */\n nextConfig: NextConfigComplete\n\n /**\n * Jsconfig, or tsconfig contents.\n *\n * Next.js implicitly requires to read it to support few options\n * https://nextjs.org/docs/architecture/nextjs-compiler#legacy-decorators\n * https://nextjs.org/docs/architecture/nextjs-compiler#importsource\n */\n jsConfig: {\n compilerOptions: object\n }\n\n /**\n * A map of environment variables to use when compiling code.\n */\n env: Record<string, string>\n\n defineEnv: DefineEnv\n\n /**\n * Whether to watch the filesystem for file changes.\n */\n watch: {\n enable: boolean\n pollIntervalMs?: number\n }\n\n /**\n * The mode in which Next.js is running.\n */\n dev: boolean\n\n /**\n * The server actions encryption key.\n */\n encryptionKey: string\n\n /**\n * The build id.\n */\n buildId: string\n\n /**\n * Options for draft mode.\n */\n previewProps: __ApiPreviewProps\n\n /**\n * The browserslist query to use for targeting browsers.\n */\n browserslistQuery: string\n\n /**\n * When the code is minified, this opts out of the default mangling of local\n * names for variables, functions etc., which can be useful for\n * debugging/profiling purposes.\n */\n noMangling: boolean\n}\n\nexport interface DefineEnv {\n client: RustifiedEnv\n edge: RustifiedEnv\n nodejs: RustifiedEnv\n}\n\nexport type RustifiedEnv = { name: string; value: string }[]\n\nexport interface GlobalEntrypoints {\n app: Endpoint | undefined\n document: Endpoint | undefined\n error: Endpoint | undefined\n middleware: Middleware | undefined\n instrumentation: Instrumentation | undefined\n}\n\nexport type PageRoute =\n | {\n type: 'page'\n htmlEndpoint: Endpoint\n dataEndpoint: Endpoint\n }\n | {\n type: 'page-api'\n endpoint: Endpoint\n }\n\nexport type AppRoute =\n | {\n type: 'app-page'\n htmlEndpoint: Endpoint\n rscEndpoint: Endpoint\n }\n | {\n type: 'app-route'\n endpoint: Endpoint\n }\n\n// pathname -> route\nexport type PageEntrypoints = Map<string, PageRoute>\n\n// originalName / page -> route\nexport type AppEntrypoints = Map<string, AppRoute>\n\nexport type Entrypoints = {\n global: GlobalEntrypoints\n page: PageEntrypoints\n app: AppEntrypoints\n}\n"],"names":[],"mappings":"AAqcA,WAIC","ignoreList":[0]}
@@ -1576,7 +1576,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
1576
1576
  isClient && new CopyFilePlugin({
1577
1577
  // file path to build output of `@next/polyfill-nomodule`
1578
1578
  filePath: require.resolve('./polyfills/polyfill-nomodule'),
1579
- cacheKey: "15.4.0-canary.58",
1579
+ cacheKey: "15.4.0-canary.59",
1580
1580
  name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
1581
1581
  minimize: false,
1582
1582
  info: {
@@ -1756,7 +1756,7 @@ export default async function getBaseWebpackConfig(dir, { buildId, encryptionKey
1756
1756
  // - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
1757
1757
  // - Next.js version
1758
1758
  // - next.config.js keys that affect compilation
1759
- version: `${__dirname}|${"15.4.0-canary.58"}|${configVars}`,
1759
+ version: `${__dirname}|${"15.4.0-canary.59"}|${configVars}`,
1760
1760
  cacheDirectory: path.join(distDir, 'cache', 'webpack'),
1761
1761
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
1762
1762
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -3,7 +3,7 @@
3
3
  * sure the following scripts are executed in the correct order:
4
4
  * - Polyfills
5
5
  * - next/script with `beforeInteractive` strategy
6
- */ const version = "15.4.0-canary.58";
6
+ */ const version = "15.4.0-canary.59";
7
7
  window.next = {
8
8
  version,
9
9
  appDir: true
@@ -26,7 +26,7 @@ import { SearchParamsContext, PathParamsContext } from '../shared/lib/hooks-clie
26
26
  import { onRecoverableError } from './react-client-callbacks/on-recoverable-error';
27
27
  import tracer from './tracing/tracer';
28
28
  import { isNextRouterError } from './components/is-next-router-error';
29
- export const version = "15.4.0-canary.58";
29
+ export const version = "15.4.0-canary.59";
30
30
  export let router;
31
31
  export const emitter = mitt();
32
32
  const looseToArray = (input)=>[].slice.call(input);
@@ -84,7 +84,7 @@ export async function createHotReloaderTurbopack(opts, serverFields, distDir, re
84
84
  }
85
85
  const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
86
86
  const hotReloaderSpan = trace('hot-reloader', undefined, {
87
- version: "15.4.0-canary.58"
87
+ version: "15.4.0-canary.59"
88
88
  });
89
89
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
90
90
  // of the current `next dev` invocation.
@@ -182,7 +182,7 @@ export default class HotReloaderWebpack {
182
182
  this.previewProps = previewProps;
183
183
  this.rewrites = rewrites;
184
184
  this.hotReloaderSpan = trace('hot-reloader', undefined, {
185
- version: "15.4.0-canary.58"
185
+ version: "15.4.0-canary.59"
186
186
  });
187
187
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
188
188
  // of the current `next dev` invocation.
@@ -12,7 +12,7 @@ export function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures
12
12
  } else {
13
13
  bundlerSuffix = '';
14
14
  }
15
- Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"15.4.0-canary.58"}`))}${bundlerSuffix}`);
15
+ Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"15.4.0-canary.59"}`))}${bundlerSuffix}`);
16
16
  if (appUrl) {
17
17
  Log.bootstrap(`- Local: ${appUrl}`);
18
18
  }
@@ -42,7 +42,7 @@ export async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup,
42
42
  export async function startServer(serverOptions) {
43
43
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
44
44
  let { port } = serverOptions;
45
- process.title = `next-server (v${"15.4.0-canary.58"})`;
45
+ process.title = `next-server (v${"15.4.0-canary.59"})`;
46
46
  let handlersReady = ()=>{};
47
47
  let handlersError = ()=>{};
48
48
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -1,6 +1,6 @@
1
1
  export function isStableBuild() {
2
2
  var _process_env___NEXT_VERSION;
3
- return !((_process_env___NEXT_VERSION = "15.4.0-canary.58") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
3
+ return !((_process_env___NEXT_VERSION = "15.4.0-canary.59") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
4
4
  }
5
5
  export class CanaryOnlyError extends Error {
6
6
  constructor(arg){
@@ -140,7 +140,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
140
140
  }
141
141
  const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
142
142
  const hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
143
- version: "15.4.0-canary.58"
143
+ version: "15.4.0-canary.59"
144
144
  });
145
145
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
146
146
  // of the current `next dev` invocation.
@@ -258,7 +258,7 @@ class HotReloaderWebpack {
258
258
  this.previewProps = previewProps;
259
259
  this.rewrites = rewrites;
260
260
  this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
261
- version: "15.4.0-canary.58"
261
+ version: "15.4.0-canary.59"
262
262
  });
263
263
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
264
264
  // of the current `next dev` invocation.
@@ -75,7 +75,7 @@ function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures, maxEx
75
75
  } else {
76
76
  bundlerSuffix = '';
77
77
  }
78
- _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"15.4.0-canary.58"}`))}${bundlerSuffix}`);
78
+ _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"15.4.0-canary.59"}`))}${bundlerSuffix}`);
79
79
  if (appUrl) {
80
80
  _log.bootstrap(`- Local: ${appUrl}`);
81
81
  }
@@ -110,7 +110,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
110
110
  async function startServer(serverOptions) {
111
111
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
112
112
  let { port } = serverOptions;
113
- process.title = `next-server (v${"15.4.0-canary.58"})`;
113
+ process.title = `next-server (v${"15.4.0-canary.59"})`;
114
114
  let handlersReady = ()=>{};
115
115
  let handlersError = ()=>{};
116
116
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -22,7 +22,7 @@ _export(exports, {
22
22
  });
23
23
  function isStableBuild() {
24
24
  var _process_env___NEXT_VERSION;
25
- return !((_process_env___NEXT_VERSION = "15.4.0-canary.58") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
25
+ return !((_process_env___NEXT_VERSION = "15.4.0-canary.59") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
26
26
  }
27
27
  class CanaryOnlyError extends Error {
28
28
  constructor(arg){
@@ -81,7 +81,7 @@ function getAnonymousMeta() {
81
81
  isWsl: _iswsl.default,
82
82
  isCI: _ciinfo.isCI,
83
83
  ciName: _ciinfo.isCI && _ciinfo.name || null,
84
- nextVersion: "15.4.0-canary.58"
84
+ nextVersion: "15.4.0-canary.59"
85
85
  };
86
86
  return traits;
87
87
  }
@@ -11,11 +11,11 @@ Object.defineProperty(exports, "eventCliSessionStopped", {
11
11
  const EVENT_VERSION = 'NEXT_CLI_SESSION_STOPPED';
12
12
  function eventCliSessionStopped(event) {
13
13
  // This should be an invariant, if it fails our build tooling is broken.
14
- if (typeof "15.4.0-canary.58" !== 'string') {
14
+ if (typeof "15.4.0-canary.59" !== 'string') {
15
15
  return [];
16
16
  }
17
17
  const payload = {
18
- nextVersion: "15.4.0-canary.58",
18
+ nextVersion: "15.4.0-canary.59",
19
19
  nodeVersion: process.version,
20
20
  cliCommand: event.cliCommand,
21
21
  durationMilliseconds: event.durationMilliseconds,
@@ -36,12 +36,12 @@ function hasBabelConfig(dir) {
36
36
  function eventCliSession(dir, nextConfig, event) {
37
37
  var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_experimental_reactCompiler, _nextConfig_experimental_reactCompiler1;
38
38
  // This should be an invariant, if it fails our build tooling is broken.
39
- if (typeof "15.4.0-canary.58" !== 'string') {
39
+ if (typeof "15.4.0-canary.59" !== 'string') {
40
40
  return [];
41
41
  }
42
42
  const { images, i18n } = nextConfig || {};
43
43
  const payload = {
44
- nextVersion: "15.4.0-canary.58",
44
+ nextVersion: "15.4.0-canary.59",
45
45
  nodeVersion: process.version,
46
46
  cliCommand: event.cliCommand,
47
47
  isSrcDir: event.isSrcDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next",
3
- "version": "15.4.0-canary.58",
3
+ "version": "15.4.0-canary.59",
4
4
  "description": "The React Framework",
5
5
  "main": "./dist/server/next.js",
6
6
  "license": "MIT",
@@ -100,7 +100,7 @@
100
100
  ]
101
101
  },
102
102
  "dependencies": {
103
- "@next/env": "15.4.0-canary.57",
103
+ "@next/env": "15.4.0-canary.59",
104
104
  "@swc/helpers": "0.5.15",
105
105
  "caniuse-lite": "^1.0.30001579",
106
106
  "postcss": "8.4.31",
@@ -130,14 +130,14 @@
130
130
  },
131
131
  "optionalDependencies": {
132
132
  "sharp": "^0.34.1",
133
- "@next/swc-darwin-arm64": "15.4.0-canary.58",
134
- "@next/swc-darwin-x64": "15.4.0-canary.58",
135
- "@next/swc-linux-arm64-gnu": "15.4.0-canary.58",
136
- "@next/swc-linux-arm64-musl": "15.4.0-canary.58",
137
- "@next/swc-linux-x64-gnu": "15.4.0-canary.58",
138
- "@next/swc-linux-x64-musl": "15.4.0-canary.58",
139
- "@next/swc-win32-arm64-msvc": "15.4.0-canary.58",
140
- "@next/swc-win32-x64-msvc": "15.4.0-canary.58"
133
+ "@next/swc-darwin-arm64": "15.4.0-canary.59",
134
+ "@next/swc-darwin-x64": "15.4.0-canary.59",
135
+ "@next/swc-linux-arm64-gnu": "15.4.0-canary.59",
136
+ "@next/swc-linux-arm64-musl": "15.4.0-canary.59",
137
+ "@next/swc-linux-x64-gnu": "15.4.0-canary.59",
138
+ "@next/swc-linux-x64-musl": "15.4.0-canary.59",
139
+ "@next/swc-win32-arm64-msvc": "15.4.0-canary.59",
140
+ "@next/swc-win32-x64-msvc": "15.4.0-canary.59"
141
141
  },
142
142
  "devDependencies": {
143
143
  "@ampproject/toolbox-optimizer": "2.8.3",
@@ -170,11 +170,11 @@
170
170
  "@jest/types": "29.5.0",
171
171
  "@mswjs/interceptors": "0.23.0",
172
172
  "@napi-rs/triples": "1.2.0",
173
- "@next/font": "15.4.0-canary.57",
174
- "@next/polyfill-module": "15.4.0-canary.57",
175
- "@next/polyfill-nomodule": "15.4.0-canary.57",
176
- "@next/react-refresh-utils": "15.4.0-canary.57",
177
- "@next/swc": "15.4.0-canary.58",
173
+ "@next/font": "15.4.0-canary.59",
174
+ "@next/polyfill-module": "15.4.0-canary.59",
175
+ "@next/polyfill-nomodule": "15.4.0-canary.59",
176
+ "@next/react-refresh-utils": "15.4.0-canary.59",
177
+ "@next/swc": "15.4.0-canary.59",
178
178
  "@opentelemetry/api": "1.6.0",
179
179
  "@playwright/test": "1.41.2",
180
180
  "@rspack/core": "1.3.12",