@openuiai/next 16.0.11 → 16.0.13
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/dist/bin/next +1 -1
- package/dist/build/index.js +3 -3
- package/dist/build/swc/index.js +3 -1
- package/dist/build/swc/index.js.map +1 -1
- package/dist/build/webpack-config.js +2 -2
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/esm/build/index.js +3 -3
- package/dist/esm/build/swc/index.js +3 -1
- package/dist/esm/build/swc/index.js.map +1 -1
- package/dist/esm/build/webpack-config.js +2 -2
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/lib/has-necessary-dependencies.js +37 -1
- package/dist/esm/lib/has-necessary-dependencies.js.map +1 -1
- package/dist/esm/lib/verify-typescript-setup.js +8 -0
- package/dist/esm/lib/verify-typescript-setup.js.map +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
- package/dist/lib/has-necessary-dependencies.js +37 -1
- package/dist/lib/has-necessary-dependencies.js.map +1 -1
- package/dist/lib/verify-typescript-setup.js +8 -0
- package/dist/lib/verify-typescript-setup.js.map +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function isStableBuild() {
|
|
2
|
-
return !"16.0.
|
|
2
|
+
return !"16.0.13"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
|
3
3
|
}
|
|
4
4
|
export class CanaryOnlyConfigError extends Error {
|
|
5
5
|
constructor(arg){
|
|
@@ -11,12 +11,48 @@ Object.defineProperty(exports, "hasNecessaryDependencies", {
|
|
|
11
11
|
const _fs = require("fs");
|
|
12
12
|
const _resolvefrom = require("./resolve-from");
|
|
13
13
|
const _path = require("path");
|
|
14
|
+
// Detect Bun runtime
|
|
15
|
+
const isBun = typeof globalThis.Bun !== 'undefined';
|
|
16
|
+
/**
|
|
17
|
+
* Try to resolve a package using require.resolve as a fallback for Bun
|
|
18
|
+
*/ function tryRequireResolve(baseDir, moduleId) {
|
|
19
|
+
try {
|
|
20
|
+
// Try standard require.resolve with paths option
|
|
21
|
+
return require.resolve(moduleId, {
|
|
22
|
+
paths: [
|
|
23
|
+
baseDir
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
} catch {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
14
30
|
function hasNecessaryDependencies(baseDir, requiredPackages) {
|
|
15
31
|
let resolutions = new Map();
|
|
16
32
|
const missingPackages = [];
|
|
17
33
|
for (const p of requiredPackages){
|
|
18
34
|
try {
|
|
19
|
-
|
|
35
|
+
let pkgPath;
|
|
36
|
+
// Try resolveFrom first
|
|
37
|
+
try {
|
|
38
|
+
pkgPath = (0, _fs.realpathSync)((0, _resolvefrom.resolveFrom)(baseDir, `${p.pkg}/package.json`));
|
|
39
|
+
} catch {
|
|
40
|
+
// Bun fallback: try require.resolve directly
|
|
41
|
+
if (isBun) {
|
|
42
|
+
const resolved = tryRequireResolve(baseDir, `${p.pkg}/package.json`);
|
|
43
|
+
if (resolved) {
|
|
44
|
+
pkgPath = (0, _fs.realpathSync)(resolved);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// If still not found, throw to trigger missing package handling
|
|
49
|
+
if (!pkgPath) {
|
|
50
|
+
throw Object.defineProperty(new Error(`Could not resolve ${p.pkg}/package.json`), "__NEXT_ERROR_CODE", {
|
|
51
|
+
value: "E916",
|
|
52
|
+
enumerable: false,
|
|
53
|
+
configurable: true
|
|
54
|
+
});
|
|
55
|
+
}
|
|
20
56
|
const pkgDir = (0, _path.dirname)(pkgPath);
|
|
21
57
|
resolutions.set((0, _path.join)(p.pkg, 'package.json'), pkgPath);
|
|
22
58
|
if (p.exportsRestrict) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/has-necessary-dependencies.ts"],"sourcesContent":["import { existsSync, realpathSync } from 'fs'\nimport { resolveFrom } from './resolve-from'\nimport { dirname, join, relative } from 'path'\n\nexport interface MissingDependency {\n file: string\n /**\n * The package's package.json (e.g. require(`${pkg}/package.json`)) MUST resolve.\n * If `exportsRestrict` is false, `${file}` MUST also resolve.\n */\n pkg: string\n /**\n * If true, the pkg's package.json needs to be resolvable.\n * If true, will resolve `file` relative to the real path of the package.json.\n *\n * For example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve '@types/react/package.json' first and then assume `@types/react/index.d.ts`\n * resolves to `path.join(dirname(resolvedPackageJsonPath), 'index.d.ts')`.\n *\n * If false, will resolve `file` relative to the baseDir.\n * ForFor example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve `@types/react/index.d.ts` directly.\n */\n exportsRestrict: boolean\n}\n\nexport type NecessaryDependencies = {\n resolved: Map<string, string>\n missing: MissingDependency[]\n}\n\nexport function hasNecessaryDependencies(\n baseDir: string,\n requiredPackages: MissingDependency[]\n): NecessaryDependencies {\n let resolutions = new Map<string, string>()\n const missingPackages: MissingDependency[] = []\n\n for (const p of requiredPackages) {\n try {\n
|
|
1
|
+
{"version":3,"sources":["../../src/lib/has-necessary-dependencies.ts"],"sourcesContent":["import { existsSync, realpathSync } from 'fs'\nimport { resolveFrom } from './resolve-from'\nimport { dirname, join, relative } from 'path'\n\n// Detect Bun runtime\nconst isBun = typeof globalThis.Bun !== 'undefined'\n\nexport interface MissingDependency {\n file: string\n /**\n * The package's package.json (e.g. require(`${pkg}/package.json`)) MUST resolve.\n * If `exportsRestrict` is false, `${file}` MUST also resolve.\n */\n pkg: string\n /**\n * If true, the pkg's package.json needs to be resolvable.\n * If true, will resolve `file` relative to the real path of the package.json.\n *\n * For example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve '@types/react/package.json' first and then assume `@types/react/index.d.ts`\n * resolves to `path.join(dirname(resolvedPackageJsonPath), 'index.d.ts')`.\n *\n * If false, will resolve `file` relative to the baseDir.\n * ForFor example, `{ file: '@types/react/index.d.ts', pkg: '@types/react', exportsRestrict: true }`\n * will try to resolve `@types/react/index.d.ts` directly.\n */\n exportsRestrict: boolean\n}\n\nexport type NecessaryDependencies = {\n resolved: Map<string, string>\n missing: MissingDependency[]\n}\n\n/**\n * Try to resolve a package using require.resolve as a fallback for Bun\n */\nfunction tryRequireResolve(\n baseDir: string,\n moduleId: string\n): string | undefined {\n try {\n // Try standard require.resolve with paths option\n return require.resolve(moduleId, { paths: [baseDir] })\n } catch {\n return undefined\n }\n}\n\nexport function hasNecessaryDependencies(\n baseDir: string,\n requiredPackages: MissingDependency[]\n): NecessaryDependencies {\n let resolutions = new Map<string, string>()\n const missingPackages: MissingDependency[] = []\n\n for (const p of requiredPackages) {\n try {\n let pkgPath: string | undefined\n\n // Try resolveFrom first\n try {\n pkgPath = realpathSync(\n resolveFrom(baseDir, `${p.pkg}/package.json`)\n )\n } catch {\n // Bun fallback: try require.resolve directly\n if (isBun) {\n const resolved = tryRequireResolve(baseDir, `${p.pkg}/package.json`)\n if (resolved) {\n pkgPath = realpathSync(resolved)\n }\n }\n }\n\n // If still not found, throw to trigger missing package handling\n if (!pkgPath) {\n throw new Error(`Could not resolve ${p.pkg}/package.json`)\n }\n\n const pkgDir = dirname(pkgPath)\n\n resolutions.set(join(p.pkg, 'package.json'), pkgPath)\n\n if (p.exportsRestrict) {\n const fileNameToVerify = relative(p.pkg, p.file)\n if (fileNameToVerify) {\n const fileToVerify = join(pkgDir, fileNameToVerify)\n if (existsSync(fileToVerify)) {\n resolutions.set(p.pkg, fileToVerify)\n } else {\n missingPackages.push(p)\n continue\n }\n } else {\n resolutions.set(p.pkg, pkgPath)\n }\n } else {\n resolutions.set(p.pkg, resolveFrom(baseDir, p.file))\n }\n } catch (_) {\n missingPackages.push(p)\n continue\n }\n }\n\n return {\n resolved: resolutions,\n missing: missingPackages,\n }\n}\n"],"names":["hasNecessaryDependencies","isBun","globalThis","Bun","tryRequireResolve","baseDir","moduleId","require","resolve","paths","undefined","requiredPackages","resolutions","Map","missingPackages","p","pkgPath","realpathSync","resolveFrom","pkg","resolved","Error","pkgDir","dirname","set","join","exportsRestrict","fileNameToVerify","relative","file","fileToVerify","existsSync","push","_","missing"],"mappings":";;;;+BAiDgBA;;;eAAAA;;;oBAjDyB;6BACb;sBACY;AAExC,qBAAqB;AACrB,MAAMC,QAAQ,OAAOC,WAAWC,GAAG,KAAK;AA6BxC;;CAEC,GACD,SAASC,kBACPC,OAAe,EACfC,QAAgB;IAEhB,IAAI;QACF,iDAAiD;QACjD,OAAOC,QAAQC,OAAO,CAACF,UAAU;YAAEG,OAAO;gBAACJ;aAAQ;QAAC;IACtD,EAAE,OAAM;QACN,OAAOK;IACT;AACF;AAEO,SAASV,yBACdK,OAAe,EACfM,gBAAqC;IAErC,IAAIC,cAAc,IAAIC;IACtB,MAAMC,kBAAuC,EAAE;IAE/C,KAAK,MAAMC,KAAKJ,iBAAkB;QAChC,IAAI;YACF,IAAIK;YAEJ,wBAAwB;YACxB,IAAI;gBACFA,UAAUC,IAAAA,gBAAY,EACpBC,IAAAA,wBAAW,EAACb,SAAS,GAAGU,EAAEI,GAAG,CAAC,aAAa,CAAC;YAEhD,EAAE,OAAM;gBACN,6CAA6C;gBAC7C,IAAIlB,OAAO;oBACT,MAAMmB,WAAWhB,kBAAkBC,SAAS,GAAGU,EAAEI,GAAG,CAAC,aAAa,CAAC;oBACnE,IAAIC,UAAU;wBACZJ,UAAUC,IAAAA,gBAAY,EAACG;oBACzB;gBACF;YACF;YAEA,gEAAgE;YAChE,IAAI,CAACJ,SAAS;gBACZ,MAAM,qBAAoD,CAApD,IAAIK,MAAM,CAAC,kBAAkB,EAAEN,EAAEI,GAAG,CAAC,aAAa,CAAC,GAAnD,qBAAA;2BAAA;gCAAA;kCAAA;gBAAmD;YAC3D;YAEA,MAAMG,SAASC,IAAAA,aAAO,EAACP;YAEvBJ,YAAYY,GAAG,CAACC,IAAAA,UAAI,EAACV,EAAEI,GAAG,EAAE,iBAAiBH;YAE7C,IAAID,EAAEW,eAAe,EAAE;gBACrB,MAAMC,mBAAmBC,IAAAA,cAAQ,EAACb,EAAEI,GAAG,EAAEJ,EAAEc,IAAI;gBAC/C,IAAIF,kBAAkB;oBACpB,MAAMG,eAAeL,IAAAA,UAAI,EAACH,QAAQK;oBAClC,IAAII,IAAAA,cAAU,EAACD,eAAe;wBAC5BlB,YAAYY,GAAG,CAACT,EAAEI,GAAG,EAAEW;oBACzB,OAAO;wBACLhB,gBAAgBkB,IAAI,CAACjB;wBACrB;oBACF;gBACF,OAAO;oBACLH,YAAYY,GAAG,CAACT,EAAEI,GAAG,EAAEH;gBACzB;YACF,OAAO;gBACLJ,YAAYY,GAAG,CAACT,EAAEI,GAAG,EAAED,IAAAA,wBAAW,EAACb,SAASU,EAAEc,IAAI;YACpD;QACF,EAAE,OAAOI,GAAG;YACVnB,gBAAgBkB,IAAI,CAACjB;YACrB;QACF;IACF;IAEA,OAAO;QACLK,UAAUR;QACVsB,SAASpB;IACX;AACF","ignoreList":[0]}
|
|
@@ -114,6 +114,14 @@ async function verifyTypeScriptSetup({ dir, distDir, cacheDir, intentDirs, tscon
|
|
|
114
114
|
}
|
|
115
115
|
// Load TypeScript after we're sure it exists:
|
|
116
116
|
const tsPackageJsonPath = deps.resolved.get((0, _path.join)('typescript', 'package.json'));
|
|
117
|
+
// Bun compatibility: handle undefined path
|
|
118
|
+
if (!tsPackageJsonPath) {
|
|
119
|
+
throw Object.defineProperty(new Error('TypeScript package.json not found in resolved dependencies'), "__NEXT_ERROR_CODE", {
|
|
120
|
+
value: "E915",
|
|
121
|
+
enumerable: false,
|
|
122
|
+
configurable: true
|
|
123
|
+
});
|
|
124
|
+
}
|
|
117
125
|
const typescriptPackageJson = require(tsPackageJsonPath);
|
|
118
126
|
const typescriptVersion = typescriptPackageJson.version;
|
|
119
127
|
if (_semver.default.lt(typescriptVersion, '5.1.0')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/verify-typescript-setup.ts"],"sourcesContent":["import { bold, cyan, red, yellow } from './picocolors'\nimport path, { join } from 'path'\n\nimport { hasNecessaryDependencies } from './has-necessary-dependencies'\nimport type { NecessaryDependencies } from './has-necessary-dependencies'\nimport semver from 'next/dist/compiled/semver'\nimport { CompileError } from './compile-error'\nimport * as log from '../build/output/log'\n\nimport { getTypeScriptIntent } from './typescript/getTypeScriptIntent'\nimport type { TypeCheckResult } from './typescript/runTypeCheck'\nimport { writeAppTypeDeclarations } from './typescript/writeAppTypeDeclarations'\nimport { writeConfigurationDefaults } from './typescript/writeConfigurationDefaults'\nimport { installDependencies } from './install-dependencies'\nimport { isCI } from '../server/ci-info'\nimport { missingDepsError } from './typescript/missingDependencyError'\n\nconst requiredPackages = [\n {\n file: 'typescript/lib/typescript.js',\n pkg: 'typescript',\n exportsRestrict: true,\n },\n {\n file: '@types/react/index.d.ts',\n pkg: '@types/react',\n exportsRestrict: true,\n },\n {\n file: '@types/node/index.d.ts',\n pkg: '@types/node',\n exportsRestrict: true,\n },\n]\n\nexport async function verifyTypeScriptSetup({\n dir,\n distDir,\n cacheDir,\n intentDirs,\n tsconfigPath,\n typeCheckPreflight,\n disableStaticImages,\n hasAppDir,\n hasPagesDir,\n isolatedDevBuild,\n}: {\n dir: string\n distDir: string\n cacheDir?: string\n tsconfigPath: string | undefined\n intentDirs: string[]\n typeCheckPreflight: boolean\n disableStaticImages: boolean\n hasAppDir: boolean\n hasPagesDir: boolean\n isolatedDevBuild: boolean | undefined\n}): Promise<{ result?: TypeCheckResult; version: string | null }> {\n const tsConfigFileName = tsconfigPath || 'tsconfig.json'\n const resolvedTsConfigPath = path.join(dir, tsConfigFileName)\n\n try {\n // Check if the project uses TypeScript:\n const intent = await getTypeScriptIntent(dir, intentDirs, tsConfigFileName)\n if (!intent) {\n return { version: null }\n }\n\n // Ensure TypeScript and necessary `@types/*` are installed:\n let deps: NecessaryDependencies = hasNecessaryDependencies(\n dir,\n requiredPackages\n )\n\n if (deps.missing?.length > 0) {\n if (isCI) {\n // we don't attempt auto install in CI to avoid side-effects\n // and instead log the error for installing needed packages\n missingDepsError(dir, deps.missing)\n }\n console.log(\n bold(\n yellow(\n `It looks like you're trying to use TypeScript but do not have the required package(s) installed.`\n )\n ) +\n '\\n' +\n 'Installing dependencies' +\n '\\n\\n' +\n bold(\n 'If you are not trying to use TypeScript, please remove the ' +\n cyan('tsconfig.json') +\n ' file from your package root (and any TypeScript files in your app and pages directories).'\n ) +\n '\\n'\n )\n await installDependencies(dir, deps.missing, true).catch((err) => {\n if (err && typeof err === 'object' && 'command' in err) {\n console.error(\n `Failed to install required TypeScript dependencies, please install them manually to continue:\\n` +\n (err as any).command +\n '\\n'\n )\n }\n throw err\n })\n deps = hasNecessaryDependencies(dir, requiredPackages)\n }\n\n // Load TypeScript after we're sure it exists:\n const tsPackageJsonPath = deps.resolved.get(\n join('typescript', 'package.json')\n )
|
|
1
|
+
{"version":3,"sources":["../../src/lib/verify-typescript-setup.ts"],"sourcesContent":["import { bold, cyan, red, yellow } from './picocolors'\nimport path, { join } from 'path'\n\nimport { hasNecessaryDependencies } from './has-necessary-dependencies'\nimport type { NecessaryDependencies } from './has-necessary-dependencies'\nimport semver from 'next/dist/compiled/semver'\nimport { CompileError } from './compile-error'\nimport * as log from '../build/output/log'\n\nimport { getTypeScriptIntent } from './typescript/getTypeScriptIntent'\nimport type { TypeCheckResult } from './typescript/runTypeCheck'\nimport { writeAppTypeDeclarations } from './typescript/writeAppTypeDeclarations'\nimport { writeConfigurationDefaults } from './typescript/writeConfigurationDefaults'\nimport { installDependencies } from './install-dependencies'\nimport { isCI } from '../server/ci-info'\nimport { missingDepsError } from './typescript/missingDependencyError'\n\nconst requiredPackages = [\n {\n file: 'typescript/lib/typescript.js',\n pkg: 'typescript',\n exportsRestrict: true,\n },\n {\n file: '@types/react/index.d.ts',\n pkg: '@types/react',\n exportsRestrict: true,\n },\n {\n file: '@types/node/index.d.ts',\n pkg: '@types/node',\n exportsRestrict: true,\n },\n]\n\nexport async function verifyTypeScriptSetup({\n dir,\n distDir,\n cacheDir,\n intentDirs,\n tsconfigPath,\n typeCheckPreflight,\n disableStaticImages,\n hasAppDir,\n hasPagesDir,\n isolatedDevBuild,\n}: {\n dir: string\n distDir: string\n cacheDir?: string\n tsconfigPath: string | undefined\n intentDirs: string[]\n typeCheckPreflight: boolean\n disableStaticImages: boolean\n hasAppDir: boolean\n hasPagesDir: boolean\n isolatedDevBuild: boolean | undefined\n}): Promise<{ result?: TypeCheckResult; version: string | null }> {\n const tsConfigFileName = tsconfigPath || 'tsconfig.json'\n const resolvedTsConfigPath = path.join(dir, tsConfigFileName)\n\n try {\n // Check if the project uses TypeScript:\n const intent = await getTypeScriptIntent(dir, intentDirs, tsConfigFileName)\n if (!intent) {\n return { version: null }\n }\n\n // Ensure TypeScript and necessary `@types/*` are installed:\n let deps: NecessaryDependencies = hasNecessaryDependencies(\n dir,\n requiredPackages\n )\n\n if (deps.missing?.length > 0) {\n if (isCI) {\n // we don't attempt auto install in CI to avoid side-effects\n // and instead log the error for installing needed packages\n missingDepsError(dir, deps.missing)\n }\n console.log(\n bold(\n yellow(\n `It looks like you're trying to use TypeScript but do not have the required package(s) installed.`\n )\n ) +\n '\\n' +\n 'Installing dependencies' +\n '\\n\\n' +\n bold(\n 'If you are not trying to use TypeScript, please remove the ' +\n cyan('tsconfig.json') +\n ' file from your package root (and any TypeScript files in your app and pages directories).'\n ) +\n '\\n'\n )\n await installDependencies(dir, deps.missing, true).catch((err) => {\n if (err && typeof err === 'object' && 'command' in err) {\n console.error(\n `Failed to install required TypeScript dependencies, please install them manually to continue:\\n` +\n (err as any).command +\n '\\n'\n )\n }\n throw err\n })\n deps = hasNecessaryDependencies(dir, requiredPackages)\n }\n\n // Load TypeScript after we're sure it exists:\n const tsPackageJsonPath = deps.resolved.get(\n join('typescript', 'package.json')\n )\n // Bun compatibility: handle undefined path\n if (!tsPackageJsonPath) {\n throw new Error(\n 'TypeScript package.json not found in resolved dependencies'\n )\n }\n const typescriptPackageJson = require(tsPackageJsonPath)\n\n const typescriptVersion = typescriptPackageJson.version\n\n if (semver.lt(typescriptVersion, '5.1.0')) {\n log.warn(\n `Minimum recommended TypeScript version is v5.1.0, older versions can potentially be incompatible with Next.js. Detected: ${typescriptVersion}`\n )\n }\n\n // Reconfigure (or create) the user's `tsconfig.json` for them:\n await writeConfigurationDefaults(\n typescriptVersion,\n resolvedTsConfigPath,\n intent.firstTimeSetup,\n hasAppDir,\n distDir,\n hasPagesDir,\n isolatedDevBuild\n )\n // Write out the necessary `next-env.d.ts` file to correctly register\n // Next.js' types:\n await writeAppTypeDeclarations({\n baseDir: dir,\n distDir,\n imageImportsEnabled: !disableStaticImages,\n hasPagesDir,\n hasAppDir,\n })\n\n let result\n if (typeCheckPreflight) {\n const { runTypeCheck } =\n require('./typescript/runTypeCheck') as typeof import('./typescript/runTypeCheck')\n\n const tsPath = deps.resolved.get('typescript')!\n const typescript = (await Promise.resolve(\n require(tsPath)\n )) as typeof import('typescript')\n\n // Verify the project passes type-checking before we go to webpack phase:\n result = await runTypeCheck(\n typescript,\n dir,\n distDir,\n resolvedTsConfigPath,\n cacheDir,\n hasAppDir\n )\n }\n return { result, version: typescriptVersion }\n } catch (err) {\n // These are special errors that should not show a stack trace:\n if (err instanceof CompileError) {\n console.error(red('Failed to compile.\\n'))\n console.error(err.message)\n process.exit(1)\n }\n\n /**\n * verifyTypeScriptSetup can be either invoked directly in the main thread (during next dev / next lint)\n * or run in a worker (during next build). In the latter case, we need to print the error message, as the\n * parent process will only receive an `Jest worker encountered 1 child process exceptions, exceeding retry limit`.\n */\n\n // we are in a worker, print the error message and exit the process\n if (process.env.IS_NEXT_WORKER) {\n if (err instanceof Error) {\n console.error(err.message)\n } else {\n console.error(err)\n }\n process.exit(1)\n }\n // we are in the main thread, throw the error and it will be handled by the caller\n throw err\n }\n}\n"],"names":["verifyTypeScriptSetup","requiredPackages","file","pkg","exportsRestrict","dir","distDir","cacheDir","intentDirs","tsconfigPath","typeCheckPreflight","disableStaticImages","hasAppDir","hasPagesDir","isolatedDevBuild","tsConfigFileName","resolvedTsConfigPath","path","join","deps","intent","getTypeScriptIntent","version","hasNecessaryDependencies","missing","length","isCI","missingDepsError","console","log","bold","yellow","cyan","installDependencies","catch","err","error","command","tsPackageJsonPath","resolved","get","Error","typescriptPackageJson","require","typescriptVersion","semver","lt","warn","writeConfigurationDefaults","firstTimeSetup","writeAppTypeDeclarations","baseDir","imageImportsEnabled","result","runTypeCheck","tsPath","typescript","Promise","resolve","CompileError","red","message","process","exit","env","IS_NEXT_WORKER"],"mappings":";;;;+BAmCsBA;;;eAAAA;;;4BAnCkB;8DACb;0CAEc;+DAEtB;8BACU;6DACR;qCAEe;0CAEK;4CACE;qCACP;wBACf;wCACY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjC,MAAMC,mBAAmB;IACvB;QACEC,MAAM;QACNC,KAAK;QACLC,iBAAiB;IACnB;IACA;QACEF,MAAM;QACNC,KAAK;QACLC,iBAAiB;IACnB;IACA;QACEF,MAAM;QACNC,KAAK;QACLC,iBAAiB;IACnB;CACD;AAEM,eAAeJ,sBAAsB,EAC1CK,GAAG,EACHC,OAAO,EACPC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,kBAAkB,EAClBC,mBAA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R;AACF","ignoreList":[0]}
|
|
@@ -231,7 +231,7 @@ class HotReloaderWebpack {
|
|
|
231
231
|
this.previewProps = previewProps;
|
|
232
232
|
this.rewrites = rewrites;
|
|
233
233
|
this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
|
234
|
-
version: "16.0.
|
|
234
|
+
version: "16.0.13"
|
|
235
235
|
});
|
|
236
236
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
237
237
|
// of the current `next dev` invocation.
|
|
@@ -88,7 +88,7 @@ function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures, logBu
|
|
|
88
88
|
if (parts.length > 0) {
|
|
89
89
|
versionSuffix = ` (${parts.join(', ')})`;
|
|
90
90
|
}
|
|
91
|
-
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.0.
|
|
91
|
+
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.0.13"}`))}${versionSuffix}`);
|
|
92
92
|
if (appUrl) {
|
|
93
93
|
_log.bootstrap(`- Local: ${appUrl}`);
|
|
94
94
|
}
|
|
@@ -178,7 +178,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
|
|
|
178
178
|
async function startServer(serverOptions) {
|
|
179
179
|
const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
|
|
180
180
|
let { port } = serverOptions;
|
|
181
|
-
process.title = `next-server (v${"16.0.
|
|
181
|
+
process.title = `next-server (v${"16.0.13"})`;
|
|
182
182
|
let handlersReady = ()=>{};
|
|
183
183
|
let handlersError = ()=>{};
|
|
184
184
|
let handlersPromise = new Promise((resolve, reject)=>{
|
|
@@ -21,7 +21,7 @@ _export(exports, {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
function isStableBuild() {
|
|
24
|
-
return !"16.0.
|
|
24
|
+
return !"16.0.13"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
|
25
25
|
}
|
|
26
26
|
class CanaryOnlyConfigError extends Error {
|
|
27
27
|
constructor(arg){
|
|
@@ -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 "16.0.
|
|
14
|
+
if (typeof "16.0.13" !== 'string') {
|
|
15
15
|
return [];
|
|
16
16
|
}
|
|
17
17
|
const payload = {
|
|
18
|
-
nextVersion: "16.0.
|
|
18
|
+
nextVersion: "16.0.13",
|
|
19
19
|
nodeVersion: process.version,
|
|
20
20
|
cliCommand: event.cliCommand,
|
|
21
21
|
durationMilliseconds: event.durationMilliseconds,
|
|
@@ -12,12 +12,12 @@ const EVENT_VERSION = 'NEXT_CLI_SESSION_STARTED';
|
|
|
12
12
|
function eventCliSession(nextConfig, event) {
|
|
13
13
|
var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_reactCompiler, _nextConfig_reactCompiler1;
|
|
14
14
|
// This should be an invariant, if it fails our build tooling is broken.
|
|
15
|
-
if (typeof "16.0.
|
|
15
|
+
if (typeof "16.0.13" !== 'string') {
|
|
16
16
|
return [];
|
|
17
17
|
}
|
|
18
18
|
const { images, i18n } = nextConfig || {};
|
|
19
19
|
const payload = {
|
|
20
|
-
nextVersion: "16.0.
|
|
20
|
+
nextVersion: "16.0.13",
|
|
21
21
|
nodeVersion: process.version,
|
|
22
22
|
cliCommand: event.cliCommand,
|
|
23
23
|
isSrcDir: event.isSrcDir,
|