fix update build

This commit is contained in:
2026-07-14 10:40:44 +05:30
parent d8083177ce
commit 3917d58464
1441 changed files with 360224 additions and 66332 deletions

174
build/node_modules/next/dist/telemetry/events/build.js generated vendored Normal file
View File

@@ -0,0 +1,174 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ERROR_THROWN_EVENT: null,
EVENT_BUILD_FEATURE_USAGE: null,
EVENT_MCP_TOOL_USAGE: null,
EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS: null,
eventAnalyzeCompleted: null,
eventBuildCompleted: null,
eventBuildFailed: null,
eventBuildFeatureUsage: null,
eventBuildOptimize: null,
eventErrorThrown: null,
eventLintCheckCompleted: null,
eventMcpToolUsage: null,
eventPackageUsedInGetServerSideProps: null,
eventTypeCheckCompleted: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ERROR_THROWN_EVENT: function() {
return ERROR_THROWN_EVENT;
},
EVENT_BUILD_FEATURE_USAGE: function() {
return EVENT_BUILD_FEATURE_USAGE;
},
EVENT_MCP_TOOL_USAGE: function() {
return EVENT_MCP_TOOL_USAGE;
},
EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS: function() {
return EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS;
},
eventAnalyzeCompleted: function() {
return eventAnalyzeCompleted;
},
eventBuildCompleted: function() {
return eventBuildCompleted;
},
eventBuildFailed: function() {
return eventBuildFailed;
},
eventBuildFeatureUsage: function() {
return eventBuildFeatureUsage;
},
eventBuildOptimize: function() {
return eventBuildOptimize;
},
eventErrorThrown: function() {
return eventErrorThrown;
},
eventLintCheckCompleted: function() {
return eventLintCheckCompleted;
},
eventMcpToolUsage: function() {
return eventMcpToolUsage;
},
eventPackageUsedInGetServerSideProps: function() {
return eventPackageUsedInGetServerSideProps;
},
eventTypeCheckCompleted: function() {
return eventTypeCheckCompleted;
}
});
const _errortelemetryutils = require("../../lib/error-telemetry-utils");
const REGEXP_DIRECTORY_DUNDER = /[\\/]__[^\\/]+(?<![\\/]__(?:tests|mocks))__[\\/]/i;
const REGEXP_DIRECTORY_TESTS = /[\\/]__(tests|mocks)__[\\/]/i;
const REGEXP_FILE_TEST = /\.(?:spec|test)\.[^.]+$/i;
const EVENT_TYPE_CHECK_COMPLETED = 'NEXT_TYPE_CHECK_COMPLETED';
function eventTypeCheckCompleted(event) {
return {
eventName: EVENT_TYPE_CHECK_COMPLETED,
payload: event
};
}
const EVENT_LINT_CHECK_COMPLETED = 'NEXT_LINT_CHECK_COMPLETED';
function eventLintCheckCompleted(event) {
return {
eventName: EVENT_LINT_CHECK_COMPLETED,
payload: event
};
}
const EVENT_ANALYZE_COMPLETED = 'NEXT_ANALYZE_COMPLETED';
function eventAnalyzeCompleted(event) {
return {
eventName: EVENT_ANALYZE_COMPLETED,
payload: event
};
}
const EVENT_BUILD_COMPLETED = 'NEXT_BUILD_COMPLETED';
function eventBuildCompleted(pagePaths, event) {
return {
eventName: EVENT_BUILD_COMPLETED,
payload: {
...event,
totalPageCount: pagePaths.length,
hasDunderPages: pagePaths.some((path)=>REGEXP_DIRECTORY_DUNDER.test(path)),
hasTestPages: pagePaths.some((path)=>REGEXP_DIRECTORY_TESTS.test(path) || REGEXP_FILE_TEST.test(path)),
totalAppPagesCount: event.totalAppPagesCount
}
};
}
const EVENT_BUILD_FAILED = 'NEXT_BUILD_FAILED';
function eventBuildFailed(event) {
return {
eventName: EVENT_BUILD_FAILED,
payload: event
};
}
const EVENT_BUILD_OPTIMIZED = 'NEXT_BUILD_OPTIMIZED';
function eventBuildOptimize(pagePaths, event) {
return {
eventName: EVENT_BUILD_OPTIMIZED,
payload: {
...event,
totalPageCount: pagePaths.length,
hasDunderPages: pagePaths.some((path)=>REGEXP_DIRECTORY_DUNDER.test(path)),
hasTestPages: pagePaths.some((path)=>REGEXP_DIRECTORY_TESTS.test(path) || REGEXP_FILE_TEST.test(path)),
totalAppPagesCount: event.totalAppPagesCount,
staticAppPagesCount: event.staticAppPagesCount,
serverAppPagesCount: event.serverAppPagesCount,
edgeRuntimeAppCount: event.edgeRuntimeAppCount,
edgeRuntimePagesCount: event.edgeRuntimePagesCount,
isRspack: process.env.NEXT_RSPACK !== undefined
}
};
}
const EVENT_BUILD_FEATURE_USAGE = 'NEXT_BUILD_FEATURE_USAGE';
function eventBuildFeatureUsage(usages) {
return usages.map(({ featureName, invocationCount })=>({
eventName: EVENT_BUILD_FEATURE_USAGE,
payload: {
featureName,
invocationCount
}
}));
}
const EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS = 'NEXT_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS';
function eventPackageUsedInGetServerSideProps(packagesUsedInServerSideProps) {
return packagesUsedInServerSideProps.map((packageName)=>({
eventName: EVENT_NAME_PACKAGE_USED_IN_GET_SERVER_SIDE_PROPS,
payload: {
package: packageName
}
}));
}
const EVENT_MCP_TOOL_USAGE = 'NEXT_MCP_TOOL_USAGE';
function eventMcpToolUsage(usages) {
return usages.map(({ featureName, invocationCount })=>({
eventName: EVENT_MCP_TOOL_USAGE,
payload: {
toolName: featureName,
invocationCount
}
}));
}
const ERROR_THROWN_EVENT = 'NEXT_ERROR_THROWN';
function eventErrorThrown(error, anonymizedLocation) {
return {
eventName: ERROR_THROWN_EVENT,
payload: {
errorCode: (0, _errortelemetryutils.extractNextErrorCode)(error) || 'Unknown',
location: anonymizedLocation
}
};
}
//# sourceMappingURL=build.js.map

41
build/node_modules/next/dist/telemetry/events/index.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
EVENT_MCP_TOOL_USAGE: null,
eventMcpToolUsage: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
EVENT_MCP_TOOL_USAGE: function() {
return _build.EVENT_MCP_TOOL_USAGE;
},
eventMcpToolUsage: function() {
return _build.eventMcpToolUsage;
}
});
0 && __export(require("./version")) && __export(require("./build")) && __export(require("./plugins"));
_export_star(require("./version"), exports);
const _build = _export_star(require("./build"), exports);
_export_star(require("./plugins"), exports);
function _export_star(from, to) {
Object.keys(from).forEach(function(k) {
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
Object.defineProperty(to, k, {
enumerable: true,
get: function() {
return from[k];
}
});
}
});
return from;
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "eventNextPlugins", {
enumerable: true,
get: function() {
return eventNextPlugins;
}
});
const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
const EVENT_PLUGIN_PRESENT = 'NEXT_PACKAGE_DETECTED';
async function eventNextPlugins(dir) {
try {
const packageJsonPath = await (0, _findup.default)('package.json', {
cwd: dir
});
if (!packageJsonPath) {
return [];
}
const { dependencies = {}, devDependencies = {} } = require(packageJsonPath);
const deps = {
...devDependencies,
...dependencies
};
return Object.keys(deps).reduce((events, plugin)=>{
const version = deps[plugin];
// Don't add deps without a version set
if (!version) {
return events;
}
events.push({
eventName: EVENT_PLUGIN_PRESENT,
payload: {
packageName: plugin,
packageVersion: version
}
});
return events;
}, []);
} catch (_) {
return [];
}
}
//# sourceMappingURL=plugins.js.map

View File

@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "eventSwcLoadFailure", {
enumerable: true,
get: function() {
return eventSwcLoadFailure;
}
});
const _shared = require("../../trace/shared");
const _packagejson = require("next/package.json");
const EVENT_PLUGIN_PRESENT = 'NEXT_SWC_LOAD_FAILURE';
async function eventSwcLoadFailure(event) {
const telemetry = _shared.traceGlobals.get('telemetry');
// can't continue if telemetry isn't set
if (!telemetry) return;
let glibcVersion;
let installedSwcPackages;
try {
var _process_report;
// @ts-ignore
glibcVersion = (_process_report = process.report) == null ? void 0 : _process_report.getReport().header.glibcVersionRuntime;
} catch {}
try {
const pkgNames = Object.keys(_packagejson.optionalDependencies || {}).filter((pkg)=>pkg.startsWith('@next/swc'));
const installedPkgs = [];
for (const pkg of pkgNames){
try {
const { version } = require(`${pkg}/package.json`);
installedPkgs.push(`${pkg}@${version}`);
} catch {}
}
if (installedPkgs.length > 0) {
installedSwcPackages = installedPkgs.sort().join(',');
}
} catch {}
telemetry.record({
eventName: EVENT_PLUGIN_PRESENT,
payload: {
nextVersion: "16.2.6",
glibcVersion,
installedSwcPackages,
arch: process.arch,
platform: process.platform,
nodeVersion: process.versions.node,
wasm: event == null ? void 0 : event.wasm,
nativeBindingsErrorCode: event == null ? void 0 : event.nativeBindingsErrorCode
}
});
// ensure this event is flushed before process exits
await telemetry.flush();
}
//# sourceMappingURL=swc-load-failure.js.map

View File

@@ -0,0 +1,66 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "eventCliSession", {
enumerable: true,
get: function() {
return eventCliSession;
}
});
const EVENT_VERSION = 'NEXT_CLI_SESSION_STARTED';
function eventCliSession(nextConfig, event) {
var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_reactCompiler, _nextConfig_reactCompiler1;
// This should be an invariant, if it fails our build tooling is broken.
if (typeof "16.2.6" !== 'string') {
return [];
}
const { images, i18n } = nextConfig || {};
const payload = {
nextVersion: "16.2.6",
nodeVersion: process.version,
cliCommand: event.cliCommand,
isSrcDir: event.isSrcDir,
hasNowJson: event.hasNowJson,
isCustomServer: event.isCustomServer,
hasNextConfig: nextConfig.configOrigin !== 'default',
buildTarget: 'default',
hasWebpackConfig: typeof (nextConfig == null ? void 0 : nextConfig.webpack) === 'function',
hasBabelConfig: false,
imageEnabled: !!images,
imageFutureEnabled: !!images,
basePathEnabled: !!(nextConfig == null ? void 0 : nextConfig.basePath),
i18nEnabled: !!i18n,
locales: (i18n == null ? void 0 : i18n.locales) ? i18n.locales.join(',') : null,
localeDomainsCount: (i18n == null ? void 0 : i18n.domains) ? i18n.domains.length : null,
localeDetectionEnabled: !i18n ? null : i18n.localeDetection !== false,
imageDomainsCount: (images == null ? void 0 : images.domains) ? images.domains.length : null,
imageRemotePatternsCount: (images == null ? void 0 : images.remotePatterns) ? images.remotePatterns.length : null,
imageLocalPatternsCount: (images == null ? void 0 : images.localPatterns) ? images.localPatterns.length : null,
imageSizes: (images == null ? void 0 : images.imageSizes) ? images.imageSizes.join(',') : null,
imageQualities: (images == null ? void 0 : images.qualities) ? images.qualities.join(',') : null,
imageLoader: images == null ? void 0 : images.loader,
imageFormats: (images == null ? void 0 : images.formats) ? images.formats.join(',') : null,
nextConfigOutput: (nextConfig == null ? void 0 : nextConfig.output) || null,
trailingSlashEnabled: !!(nextConfig == null ? void 0 : nextConfig.trailingSlash),
reactStrictMode: !!(nextConfig == null ? void 0 : nextConfig.reactStrictMode),
webpackVersion: event.webpackVersion || null,
turboFlag: event.turboFlag || false,
isRspack: process.env.NEXT_RSPACK !== undefined,
appDir: event.appDir,
pagesDir: event.pagesDir,
staticStaleTime: ((_nextConfig_experimental_staleTimes = nextConfig.experimental.staleTimes) == null ? void 0 : _nextConfig_experimental_staleTimes.static) ?? null,
dynamicStaleTime: ((_nextConfig_experimental_staleTimes1 = nextConfig.experimental.staleTimes) == null ? void 0 : _nextConfig_experimental_staleTimes1.dynamic) ?? null,
reactCompiler: Boolean(nextConfig.reactCompiler),
reactCompilerCompilationMode: typeof nextConfig.reactCompiler !== 'boolean' ? ((_nextConfig_reactCompiler = nextConfig.reactCompiler) == null ? void 0 : _nextConfig_reactCompiler.compilationMode) ?? null : null,
reactCompilerPanicThreshold: typeof nextConfig.reactCompiler !== 'boolean' ? ((_nextConfig_reactCompiler1 = nextConfig.reactCompiler) == null ? void 0 : _nextConfig_reactCompiler1.panicThreshold) ?? null : null
};
return [
{
eventName: EVENT_VERSION,
payload
}
];
}
//# sourceMappingURL=version.js.map