inital commit

This commit is contained in:
2026-01-01 15:25:19 +05:30
commit f0ae49465a
36361 changed files with 4894111 additions and 0 deletions

3
node_modules/next/dist/build/output/format.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { CacheControl } from '../../server/lib/cache-control';
export declare function formatRevalidate(cacheControl: CacheControl): string;
export declare function formatExpire(cacheControl: CacheControl): string;

84
node_modules/next/dist/build/output/format.js generated vendored Normal file
View File

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
formatExpire: null,
formatRevalidate: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
formatExpire: function() {
return formatExpire;
},
formatRevalidate: function() {
return formatRevalidate;
}
});
const timeUnits = [
{
label: 'y',
seconds: 31536000
},
{
label: 'w',
seconds: 604800
},
{
label: 'd',
seconds: 86400
},
{
label: 'h',
seconds: 3600
},
{
label: 'm',
seconds: 60
},
{
label: 's',
seconds: 1
}
];
function humanReadableTimeRounded(seconds) {
// Find the largest fitting unit.
let candidateIndex = timeUnits.length - 1;
for(let i = 0; i < timeUnits.length; i++){
if (seconds >= timeUnits[i].seconds) {
candidateIndex = i;
break;
}
}
const candidate = timeUnits[candidateIndex];
const value = seconds / candidate.seconds;
const isExact = Number.isInteger(value);
// For days and weeks only, check if using the next smaller unit yields an
// exact result.
if (!isExact && (candidate.label === 'd' || candidate.label === 'w')) {
const nextUnit = timeUnits[candidateIndex + 1];
const nextValue = seconds / nextUnit.seconds;
if (Number.isInteger(nextValue)) {
return `${nextValue}${nextUnit.label}`;
}
}
if (isExact) {
return `${value}${candidate.label}`;
}
return `${Math.round(value)}${candidate.label}`;
}
function formatRevalidate(cacheControl) {
const { revalidate } = cacheControl;
return revalidate ? humanReadableTimeRounded(revalidate) : '';
}
function formatExpire(cacheControl) {
const { expire } = cacheControl;
return expire ? humanReadableTimeRounded(expire) : '';
}
//# sourceMappingURL=format.js.map

1
node_modules/next/dist/build/output/format.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/output/format.ts"],"sourcesContent":["import type { CacheControl } from '../../server/lib/cache-control'\n\nconst timeUnits = [\n { label: 'y', seconds: 31536000 },\n { label: 'w', seconds: 604800 },\n { label: 'd', seconds: 86400 },\n { label: 'h', seconds: 3600 },\n { label: 'm', seconds: 60 },\n { label: 's', seconds: 1 },\n]\n\nfunction humanReadableTimeRounded(seconds: number): string {\n // Find the largest fitting unit.\n let candidateIndex = timeUnits.length - 1\n for (let i = 0; i < timeUnits.length; i++) {\n if (seconds >= timeUnits[i].seconds) {\n candidateIndex = i\n break\n }\n }\n\n const candidate = timeUnits[candidateIndex]\n const value = seconds / candidate.seconds\n const isExact = Number.isInteger(value)\n\n // For days and weeks only, check if using the next smaller unit yields an\n // exact result.\n if (!isExact && (candidate.label === 'd' || candidate.label === 'w')) {\n const nextUnit = timeUnits[candidateIndex + 1]\n const nextValue = seconds / nextUnit.seconds\n\n if (Number.isInteger(nextValue)) {\n return `${nextValue}${nextUnit.label}`\n }\n }\n\n if (isExact) {\n return `${value}${candidate.label}`\n }\n\n return `≈${Math.round(value)}${candidate.label}`\n}\n\nexport function formatRevalidate(cacheControl: CacheControl): string {\n const { revalidate } = cacheControl\n\n return revalidate ? humanReadableTimeRounded(revalidate) : ''\n}\n\nexport function formatExpire(cacheControl: CacheControl): string {\n const { expire } = cacheControl\n\n return expire ? humanReadableTimeRounded(expire) : ''\n}\n"],"names":["formatExpire","formatRevalidate","timeUnits","label","seconds","humanReadableTimeRounded","candidateIndex","length","i","candidate","value","isExact","Number","isInteger","nextUnit","nextValue","Math","round","cacheControl","revalidate","expire"],"mappings":";;;;;;;;;;;;;;;IAiDgBA,YAAY;eAAZA;;IANAC,gBAAgB;eAAhBA;;;AAzChB,MAAMC,YAAY;IAChB;QAAEC,OAAO;QAAKC,SAAS;IAAS;IAChC;QAAED,OAAO;QAAKC,SAAS;IAAO;IAC9B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endored Normal file
View File

@@ -0,0 +1,19 @@
import type { webpack } from 'next/dist/compiled/webpack/webpack';
type AmpStatus = {
message: string;
line: number;
col: number;
specUrl: string | null;
code: string;
};
export type AmpPageStatus = {
[page: string]: {
errors: AmpStatus[];
warnings: AmpStatus[];
};
};
export declare function formatAmpMessages(amp: AmpPageStatus): string;
export declare function ampValidation(page: string, errors: AmpStatus[], warnings: AmpStatus[]): void;
export declare function watchCompilers(client: webpack.Compiler, server: webpack.Compiler, edgeServer: webpack.Compiler): void;
export declare function reportTrigger(trigger: string, url?: string): void;
export {};

285
node_modules/next/dist/build/output/index.js generated vendored Normal file
View File

@@ -0,0 +1,285 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ampValidation: null,
formatAmpMessages: null,
reportTrigger: null,
watchCompilers: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ampValidation: function() {
return ampValidation;
},
formatAmpMessages: function() {
return formatAmpMessages;
},
reportTrigger: function() {
return reportTrigger;
},
watchCompilers: function() {
return watchCompilers;
}
});
const _picocolors = require("../../lib/picocolors");
const _stripansi = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/strip-ansi"));
const _texttable = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/text-table"));
const _unistore = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/unistore"));
const _formatwebpackmessages = /*#__PURE__*/ _interop_require_default(require("../../client/components/react-dev-overlay/utils/format-webpack-messages"));
const _store = require("./store");
const _constants = require("../../shared/lib/constants");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function formatAmpMessages(amp) {
let output = (0, _picocolors.bold)('Amp Validation') + '\n\n';
let messages = [];
const chalkError = (0, _picocolors.red)('error');
function ampError(page, error) {
messages.push([
page,
chalkError,
error.message,
error.specUrl || ''
]);
}
const chalkWarn = (0, _picocolors.yellow)('warn');
function ampWarn(page, warn) {
messages.push([
page,
chalkWarn,
warn.message,
warn.specUrl || ''
]);
}
for(const page in amp){
let { errors, warnings } = amp[page];
const devOnlyFilter = (err)=>err.code !== 'DEV_MODE_ONLY';
errors = errors.filter(devOnlyFilter);
warnings = warnings.filter(devOnlyFilter);
if (!(errors.length || warnings.length)) {
continue;
}
if (errors.length) {
ampError(page, errors[0]);
for(let index = 1; index < errors.length; ++index){
ampError('', errors[index]);
}
}
if (warnings.length) {
ampWarn(errors.length ? '' : page, warnings[0]);
for(let index = 1; index < warnings.length; ++index){
ampWarn('', warnings[index]);
}
}
messages.push([
'',
'',
'',
''
]);
}
if (!messages.length) {
return '';
}
output += (0, _texttable.default)(messages, {
align: [
'l',
'l',
'l',
'l'
],
stringLength (str) {
return (0, _stripansi.default)(str).length;
}
});
return output;
}
const buildStore = (0, _unistore.default)({
// @ts-expect-error initial value
client: {},
// @ts-expect-error initial value
server: {},
// @ts-expect-error initial value
edgeServer: {}
});
let buildWasDone = false;
let clientWasLoading = true;
let serverWasLoading = true;
let edgeServerWasLoading = false;
buildStore.subscribe((state)=>{
const { amp, client, server, edgeServer, trigger, url } = state;
const { appUrl } = _store.store.getState();
if (client.loading || server.loading || (edgeServer == null ? void 0 : edgeServer.loading)) {
_store.store.setState({
bootstrap: false,
appUrl: appUrl,
// If it takes more than 3 seconds to compile, mark it as loading status
loading: true,
trigger,
url
}, true);
clientWasLoading = !buildWasDone && clientWasLoading || client.loading;
serverWasLoading = !buildWasDone && serverWasLoading || server.loading;
edgeServerWasLoading = !buildWasDone && edgeServerWasLoading || edgeServer.loading;
buildWasDone = false;
return;
}
buildWasDone = true;
let partialState = {
bootstrap: false,
appUrl: appUrl,
loading: false,
typeChecking: false,
totalModulesCount: (clientWasLoading ? client.totalModulesCount : 0) + (serverWasLoading ? server.totalModulesCount : 0) + (edgeServerWasLoading ? (edgeServer == null ? void 0 : edgeServer.totalModulesCount) || 0 : 0),
hasEdgeServer: !!edgeServer
};
if (client.errors && clientWasLoading) {
// Show only client errors
_store.store.setState({
...partialState,
errors: client.errors,
warnings: null
}, true);
} else if (server.errors && serverWasLoading) {
_store.store.setState({
...partialState,
errors: server.errors,
warnings: null
}, true);
} else if (edgeServer.errors && edgeServerWasLoading) {
_store.store.setState({
...partialState,
errors: edgeServer.errors,
warnings: null
}, true);
} else {
// Show warnings from all of them
const warnings = [
...client.warnings || [],
...server.warnings || [],
...edgeServer.warnings || []
].concat(formatAmpMessages(amp) || []);
_store.store.setState({
...partialState,
errors: null,
warnings: warnings.length === 0 ? null : warnings
}, true);
}
});
function ampValidation(page, errors, warnings) {
const { amp } = buildStore.getState();
if (!(errors.length || warnings.length)) {
buildStore.setState({
amp: Object.keys(amp).filter((k)=>k !== page).sort()// eslint-disable-next-line no-sequences
.reduce((a, c)=>(a[c] = amp[c], a), {})
});
return;
}
const newAmp = {
...amp,
[page]: {
errors,
warnings
}
};
buildStore.setState({
amp: Object.keys(newAmp).sort()// eslint-disable-next-line no-sequences
.reduce((a, c)=>(a[c] = newAmp[c], a), {})
});
}
function watchCompilers(client, server, edgeServer) {
buildStore.setState({
client: {
loading: true
},
server: {
loading: true
},
edgeServer: {
loading: true
},
trigger: 'initial',
url: undefined
});
function tapCompiler(key, compiler, onEvent) {
compiler.hooks.invalid.tap(`NextJsInvalid-${key}`, ()=>{
onEvent({
loading: true
});
});
compiler.hooks.done.tap(`NextJsDone-${key}`, (stats)=>{
buildStore.setState({
amp: {}
});
const { errors, warnings } = (0, _formatwebpackmessages.default)(stats.toJson({
preset: 'errors-warnings',
moduleTrace: true
}));
const hasErrors = !!(errors == null ? void 0 : errors.length);
const hasWarnings = !!(warnings == null ? void 0 : warnings.length);
onEvent({
loading: false,
totalModulesCount: stats.compilation.modules.size,
errors: hasErrors ? errors : null,
warnings: hasWarnings ? warnings : null
});
});
}
tapCompiler(_constants.COMPILER_NAMES.client, client, (status)=>{
if (!status.loading && !buildStore.getState().server.loading && !buildStore.getState().edgeServer.loading && status.totalModulesCount > 0) {
buildStore.setState({
client: status,
trigger: undefined,
url: undefined
});
} else {
buildStore.setState({
client: status
});
}
});
tapCompiler(_constants.COMPILER_NAMES.server, server, (status)=>{
if (!status.loading && !buildStore.getState().client.loading && !buildStore.getState().edgeServer.loading && status.totalModulesCount > 0) {
buildStore.setState({
server: status,
trigger: undefined,
url: undefined
});
} else {
buildStore.setState({
server: status
});
}
});
tapCompiler(_constants.COMPILER_NAMES.edgeServer, edgeServer, (status)=>{
if (!status.loading && !buildStore.getState().client.loading && !buildStore.getState().server.loading && status.totalModulesCount > 0) {
buildStore.setState({
edgeServer: status,
trigger: undefined,
url: undefined
});
} else {
buildStore.setState({
edgeServer: status
});
}
});
}
function reportTrigger(trigger, url) {
buildStore.setState({
trigger,
url
});
}
//# sourceMappingURL=index.js.map

1
node_modules/next/dist/build/output/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

18
node_modules/next/dist/build/output/log.d.ts generated vendored Normal file
View File

@@ -0,0 +1,18 @@
export declare const prefixes: {
readonly wait: string;
readonly error: string;
readonly warn: string;
readonly ready: "▲";
readonly info: string;
readonly event: string;
readonly trace: string;
};
export declare function bootstrap(...message: string[]): void;
export declare function wait(...message: any[]): void;
export declare function error(...message: any[]): void;
export declare function warn(...message: any[]): void;
export declare function ready(...message: any[]): void;
export declare function info(...message: any[]): void;
export declare function event(...message: any[]): void;
export declare function trace(...message: any[]): void;
export declare function warnOnce(...message: any[]): void;

126
node_modules/next/dist/build/output/log.js generated vendored Normal file
View File

@@ -0,0 +1,126 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
bootstrap: null,
error: null,
event: null,
info: null,
prefixes: null,
ready: null,
trace: null,
wait: null,
warn: null,
warnOnce: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
bootstrap: function() {
return bootstrap;
},
error: function() {
return error;
},
event: function() {
return event;
},
info: function() {
return info;
},
prefixes: function() {
return prefixes;
},
ready: function() {
return ready;
},
trace: function() {
return trace;
},
wait: function() {
return wait;
},
warn: function() {
return warn;
},
warnOnce: function() {
return warnOnce;
}
});
const _picocolors = require("../../lib/picocolors");
const _lrucache = require("../../server/lib/lru-cache");
const prefixes = {
wait: (0, _picocolors.white)((0, _picocolors.bold)('○')),
error: (0, _picocolors.red)((0, _picocolors.bold)('')),
warn: (0, _picocolors.yellow)((0, _picocolors.bold)('⚠')),
ready: '▲',
info: (0, _picocolors.white)((0, _picocolors.bold)(' ')),
event: (0, _picocolors.green)((0, _picocolors.bold)('✓')),
trace: (0, _picocolors.magenta)((0, _picocolors.bold)('»'))
};
const LOGGING_METHOD = {
log: 'log',
warn: 'warn',
error: 'error'
};
function prefixedLog(prefixType, ...message) {
if ((message[0] === '' || message[0] === undefined) && message.length === 1) {
message.shift();
}
const consoleMethod = prefixType in LOGGING_METHOD ? LOGGING_METHOD[prefixType] : 'log';
const prefix = prefixes[prefixType];
// If there's no message, don't print the prefix but a new line
if (message.length === 0) {
console[consoleMethod]('');
} else {
// Ensure if there's ANSI escape codes it's concatenated into one string.
// Chrome DevTool can only handle color if it's in one string.
if (message.length === 1 && typeof message[0] === 'string') {
console[consoleMethod](' ' + prefix + ' ' + message[0]);
} else {
console[consoleMethod](' ' + prefix, ...message);
}
}
}
function bootstrap(...message) {
// logging format: ' <prefix> <message>'
// e.g. ' ✓ Compiled successfully'
// Add spaces to align with the indent of other logs
console.log(' ' + message.join(' '));
}
function wait(...message) {
prefixedLog('wait', ...message);
}
function error(...message) {
prefixedLog('error', ...message);
}
function warn(...message) {
prefixedLog('warn', ...message);
}
function ready(...message) {
prefixedLog('ready', ...message);
}
function info(...message) {
prefixedLog('info', ...message);
}
function event(...message) {
prefixedLog('event', ...message);
}
function trace(...message) {
prefixedLog('trace', ...message);
}
const warnOnceCache = new _lrucache.LRUCache(10000, (value)=>value.length);
function warnOnce(...message) {
const key = message.join(' ');
if (!warnOnceCache.has(key)) {
warnOnceCache.set(key, key);
warn(...message);
}
}
//# sourceMappingURL=log.js.map

1
node_modules/next/dist/build/output/log.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/build/output/log.ts"],"sourcesContent":["import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'\nimport { LRUCache } from '../../server/lib/lru-cache'\n\nexport const prefixes = {\n wait: white(bold('○')),\n error: red(bold('')),\n warn: yellow(bold('⚠')),\n ready: '▲', // no color\n info: white(bold(' ')),\n event: green(bold('✓')),\n trace: magenta(bold('»')),\n} as const\n\nconst LOGGING_METHOD = {\n log: 'log',\n warn: 'warn',\n error: 'error',\n} as const\n\nfunction prefixedLog(prefixType: keyof typeof prefixes, ...message: any[]) {\n if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n message.shift()\n }\n\n const consoleMethod: keyof typeof LOGGING_METHOD =\n prefixType in LOGGING_METHOD\n ? LOGGING_METHOD[prefixType as keyof typeof LOGGING_METHOD]\n : 'log'\n\n const prefix = prefixes[prefixType]\n // If there's no message, don't print the prefix but a new line\n if (message.length === 0) {\n console[consoleMethod]('')\n } else {\n // Ensure if there's ANSI escape codes it's concatenated into one string.\n // Chrome DevTool can only handle color if it's in one string.\n if (message.length === 1 && typeof message[0] === 'string') {\n console[consoleMethod](' ' + prefix + ' ' + message[0])\n } else {\n console[consoleMethod](' ' + prefix, ...message)\n }\n }\n}\n\nexport function bootstrap(...message: string[]) {\n // logging format: ' <prefix> <message>'\n // e.g. ' ✓ Compiled successfully'\n // Add spaces to align with the indent of other logs\n console.log(' ' + message.join(' '))\n}\n\nexport function wait(...message: any[]) {\n prefixedLog('wait', ...message)\n}\n\nexport function error(...message: any[]) {\n prefixedLog('error', ...message)\n}\n\nexport function warn(...message: any[]) {\n prefixedLog('warn', ...message)\n}\n\nexport function ready(...message: any[]) {\n prefixedLog('ready', ...message)\n}\n\nexport function info(...message: any[]) {\n prefixedLog('info', ...message)\n}\n\nexport function event(...message: any[]) {\n prefixedLog('event', ...message)\n}\n\nexport function trace(...message: any[]) {\n prefixedLog('trace', ...message)\n}\n\nconst warnOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function warnOnce(...message: any[]) {\n const key = message.join(' ')\n if (!warnOnceCache.has(key)) {\n warnOnceCache.set(key, key)\n warn(...message)\n }\n}\n"],"names":["bootstrap","error","event","info","prefixes","ready","trace","wait","warn","warnOnce","white","bold","red","yellow","green","magenta","LOGGING_METHOD","log","prefixedLog","prefixType","message","undefined","length","shift","consoleMethod","prefix","console","join","warnOnceCache","LRUCache","value","key","has","set"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;IA4CgBA,SAAS;eAATA;;IAWAC,KAAK;eAALA;;IAgBAC,KAAK;eAALA;;IAJAC,IAAI;eAAJA;;IAhEHC,QAAQ;eAARA;;IA4DGC,KAAK;eAALA;;IAYAC,KAAK;eAALA;;IAxBAC,IAAI;eAAJA;;IAQAC,IAAI;eAAJA;;IAqBAC,QAAQ;eAARA;;;4BAhFyC;0BAChC;AAElB,MAAML,WAAW;IACtBG,MAAMG,IAAAA,iBAAK,EAACC,IAAAA,gBAAI,EAAC;IACjBV,OAAOW,IAAAA,eAAG,EAACD,IAAAA,gBAAI,EAAC;IAChBH,MAAMK,IAAAA,kBAAM,EAACF,IAAAA,gBAAI,EAAC;IAClBN,OAAO;IACPF,MAAMO,IAAAA,iBAAK,EAACC,IAAAA,gBAAI,EAAC;IACjBT,OAAOY,IAAAA,iBAAK,EAACH,IAAAA,gBAAI,EAAC;IAClBL,OAAOS,IAAAA,mBAAO,EAACJ,IAAAA,gBAAI,EAAC;AACtB;AAEA,MAAMK,iBAAiB;IACrBC,KAAK;IACLT,MAAM;IACNP,OAAO;AACT;AAEA,SAASiB,YAAYC,UAAiC,EAAE,GAAGC,OAAc;IACvE,IAAI,AAACA,CAAAA,OAAO,CAAC,EAAE,KAAK,MAAMA,OAAO,CAAC,EAAE,KAAKC,SAAQ,KAAMD,QAAQE,MAAM,KAAK,GAAG;QAC3EF,QAAQG,KAAK;IACf;IAEA,MAAMC,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;IACV;AACF"}

24
node_modules/next/dist/build/output/store.d.ts generated vendored Normal file
View File

@@ -0,0 +1,24 @@
export type OutputState = {
bootstrap: true;
appUrl: string | null;
bindAddr: string | null;
logging: boolean;
} | ({
bootstrap: false;
appUrl: string | null;
bindAddr: string | null;
logging: boolean;
} & ({
loading: true;
trigger: string | undefined;
url: string | undefined;
} | {
loading: false;
typeChecking: boolean;
totalModulesCount: number;
errors: string[] | null;
warnings: string[] | null;
hasEdgeServer: boolean;
}));
export declare function formatTrigger(trigger: string): string;
export declare const store: import("unistore").Store<OutputState>;

218
node_modules/next/dist/build/output/store.js generated vendored Normal file
View File

@@ -0,0 +1,218 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
formatTrigger: null,
store: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
formatTrigger: function() {
return formatTrigger;
},
store: function() {
return store;
}
});
const _unistore = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/unistore"));
const _stripansi = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/strip-ansi"));
const _trace = require("../../trace");
const _swc = require("../swc");
const _log = /*#__PURE__*/ _interop_require_wildcard(require("./log"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = new WeakMap();
var cacheNodeInterop = new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return {
default: obj
};
}
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {
__proto__: null
};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for(var key in obj){
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
const MAX_LOG_SKIP_DURATION = 500 // 500ms
;
function formatTrigger(trigger) {
// Format dynamic sitemap routes to simpler file path
// e.g., /sitemap.xml[] -> /sitemap.xml
if (trigger.includes('[__metadata_id__]')) {
trigger = trigger.replace('/[__metadata_id__]', '/[id]');
}
if (trigger.length > 1 && trigger.endsWith('/')) {
trigger = trigger.slice(0, -1);
}
return trigger;
}
const store = (0, _unistore.default)({
appUrl: null,
bindAddr: null,
bootstrap: true,
logging: true
});
let lastStore = {
appUrl: null,
bindAddr: null,
bootstrap: true,
logging: true
};
function hasStoreChanged(nextStore) {
if ([
...new Set([
...Object.keys(lastStore),
...Object.keys(nextStore)
])
].every((key)=>Object.is(lastStore[key], nextStore[key]))) {
return false;
}
lastStore = nextStore;
return true;
}
let startTime = 0;
let trigger = '' // default, use empty string for trigger
;
let triggerUrl = undefined;
let loadingLogTimer = null;
let traceSpan = null;
let logging = true;
store.subscribe((state)=>{
// Update persisted logging state
if ('logging' in state) {
logging = state.logging;
}
// If logging is disabled, do not log
if (!logging) {
return;
}
if (!hasStoreChanged(state)) {
return;
}
if (state.bootstrap) {
return;
}
if (state.loading) {
if (state.trigger) {
trigger = formatTrigger(state.trigger);
triggerUrl = state.url;
if (trigger !== 'initial') {
traceSpan = (0, _trace.trace)('compile-path', undefined, {
trigger: trigger
});
if (!loadingLogTimer) {
// Only log compiling if compiled is not finished in 3 seconds
loadingLogTimer = setTimeout(()=>{
if (triggerUrl && triggerUrl !== trigger && process.env.NEXT_TRIGGER_URL) {
_log.wait(`Compiling ${trigger} (${triggerUrl}) ...`);
} else {
_log.wait(`Compiling ${trigger} ...`);
}
}, MAX_LOG_SKIP_DURATION);
}
}
}
if (startTime === 0) {
startTime = Date.now();
}
return;
}
if (state.errors) {
// Log compilation errors
_log.error(state.errors[0]);
const cleanError = (0, _stripansi.default)(state.errors[0]);
if (cleanError.indexOf('SyntaxError') > -1) {
const matches = cleanError.match(/\[.*\]=/);
if (matches) {
for (const match of matches){
const prop = (match.split(']').shift() || '').slice(1);
console.log(`AMP bind syntax [${prop}]='' is not supported in JSX, use 'data-amp-bind-${prop}' instead. https://nextjs.org/docs/messages/amp-bind-jsx-alt`);
}
return;
}
}
startTime = 0;
// Ensure traces are flushed after each compile in development mode
(0, _trace.flushAllTraces)();
(0, _swc.teardownTraceSubscriber)();
return;
}
let timeMessage = '';
if (startTime) {
const time = Date.now() - startTime;
startTime = 0;
timeMessage = ' ' + (time > 2000 ? `in ${Math.round(time / 100) / 10}s` : `in ${time}ms`);
}
let modulesMessage = '';
if (state.totalModulesCount) {
modulesMessage = ` (${state.totalModulesCount} modules)`;
}
if (state.warnings) {
_log.warn(state.warnings.join('\n\n'));
// Ensure traces are flushed after each compile in development mode
(0, _trace.flushAllTraces)();
(0, _swc.teardownTraceSubscriber)();
return;
}
if (state.typeChecking) {
_log.info(`bundled ${trigger}${timeMessage}${modulesMessage}, type checking...`);
return;
}
if (trigger === 'initial') {
trigger = '';
} else {
if (loadingLogTimer) {
clearTimeout(loadingLogTimer);
loadingLogTimer = null;
}
if (traceSpan) {
traceSpan.stop();
traceSpan = null;
}
_log.event(`Compiled${trigger ? ' ' + trigger : ''}${timeMessage}${modulesMessage}`);
trigger = '';
}
// Ensure traces are flushed after each compile in development mode
(0, _trace.flushAllTraces)();
(0, _swc.teardownTraceSubscriber)();
});
//# sourceMappingURL=store.js.map

1
node_modules/next/dist/build/output/store.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long