.
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
export declare function isStableBuild(): boolean;
|
||||
export declare class CanaryOnlyConfigError extends Error {
|
||||
constructor(arg: {
|
||||
feature: string;
|
||||
} | string);
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
CanaryOnlyConfigError: null,
|
||||
isStableBuild: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
CanaryOnlyConfigError: function() {
|
||||
return CanaryOnlyConfigError;
|
||||
},
|
||||
isStableBuild: function() {
|
||||
return isStableBuild;
|
||||
}
|
||||
});
|
||||
function isStableBuild() {
|
||||
return !"16.2.0"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
||||
}
|
||||
class CanaryOnlyConfigError extends Error {
|
||||
constructor(arg){
|
||||
if (typeof arg === 'object' && 'feature' in arg) {
|
||||
super(`The experimental feature "${arg.feature}" can only be enabled when using the latest canary version of Next.js.`);
|
||||
} else {
|
||||
super(arg);
|
||||
}
|
||||
// This error is meant to interrupt the server start/build process
|
||||
// but the stack trace isn't meaningful, as it points to internal code.
|
||||
this.stack = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=canary-only-config-error.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/errors/canary-only-config-error.ts"],"sourcesContent":["export function isStableBuild() {\n return (\n !process.env.__NEXT_VERSION?.includes('canary') &&\n !process.env.__NEXT_TEST_MODE &&\n !process.env.NEXT_PRIVATE_LOCAL_DEV\n )\n}\n\nexport class CanaryOnlyConfigError extends Error {\n constructor(arg: { feature: string } | string) {\n if (typeof arg === 'object' && 'feature' in arg) {\n super(\n `The experimental feature \"${arg.feature}\" can only be enabled when using the latest canary version of Next.js.`\n )\n } else {\n super(arg)\n }\n\n // This error is meant to interrupt the server start/build process\n // but the stack trace isn't meaningful, as it points to internal code.\n this.stack = undefined\n }\n}\n"],"names":["CanaryOnlyConfigError","isStableBuild","process","env","__NEXT_VERSION","includes","__NEXT_TEST_MODE","NEXT_PRIVATE_LOCAL_DEV","Error","constructor","arg","feature","stack","undefined"],"mappings":";;;;;;;;;;;;;;;IAQaA,qBAAqB;eAArBA;;IARGC,aAAa;eAAbA;;;AAAT,SAASA;IACd,OACE,CAACC,QAAQC,GAAG,CAACC,cAAc,EAAEC,SAAS,aACtC,CAACH,QAAQC,GAAG,CAACG,gBAAgB,IAC7B,CAACJ,QAAQC,GAAG,CAACI,sBAAsB;AAEvC;AAEO,MAAMP,8BAA8BQ;IACzCC,YAAYC,GAAiC,CAAE;QAC7C,IAAI,OAAOA,QAAQ,YAAY,aAAaA,KAAK;YAC/C,KAAK,CACH,CAAC,0BAA0B,EAAEA,IAAIC,OAAO,CAAC,sEAAsE,CAAC;QAEpH,OAAO;YACL,KAAK,CAACD;QACR;QAEA,kEAAkE;QAClE,uEAAuE;QACvE,IAAI,CAACE,KAAK,GAAGC;IACf;AACF","ignoreList":[0]}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import type { NapiCodeFrameLocation, NapiCodeFrameOptions } from '../../../build/swc/generated-native';
|
||||
/**
|
||||
* Renders a code frame showing the location of an error in source code.
|
||||
* Requires native bindings to be installed — throws otherwise.
|
||||
*/
|
||||
export declare function codeFrameColumns(file: string, location: NapiCodeFrameLocation, options?: NapiCodeFrameOptions): string | undefined;
|
||||
export type { NapiCodeFrameLocation, NapiCodeFrameOptions };
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "codeFrameColumns", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return codeFrameColumns;
|
||||
}
|
||||
});
|
||||
const _swc = require("../../../build/swc");
|
||||
function codeFrameColumns(file, location, options = {}) {
|
||||
// Default to the terminal width
|
||||
if (options.maxWidth === undefined) {
|
||||
options.maxWidth = process.stdout.columns;
|
||||
}
|
||||
return (0, _swc.getBindingsSync)().codeFrameColumns(file, location, options);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=code-frame.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/errors/code-frame.ts"],"sourcesContent":["import { getBindingsSync } from '../../../build/swc'\nimport type {\n NapiCodeFrameLocation,\n NapiCodeFrameOptions,\n} from '../../../build/swc/generated-native'\n\n/**\n * Renders a code frame showing the location of an error in source code.\n * Requires native bindings to be installed — throws otherwise.\n */\nexport function codeFrameColumns(\n file: string,\n location: NapiCodeFrameLocation,\n options: NapiCodeFrameOptions = {}\n): string | undefined {\n // Default to the terminal width\n if (options.maxWidth === undefined) {\n options.maxWidth = process.stdout.columns\n }\n return getBindingsSync().codeFrameColumns(file, location, options)\n}\n\nexport type { NapiCodeFrameLocation, NapiCodeFrameOptions }\n"],"names":["codeFrameColumns","file","location","options","maxWidth","undefined","process","stdout","columns","getBindingsSync"],"mappings":";;;;+BAUgBA;;;eAAAA;;;qBAVgB;AAUzB,SAASA,iBACdC,IAAY,EACZC,QAA+B,EAC/BC,UAAgC,CAAC,CAAC;IAElC,gCAAgC;IAChC,IAAIA,QAAQC,QAAQ,KAAKC,WAAW;QAClCF,QAAQC,QAAQ,GAAGE,QAAQC,MAAM,CAACC,OAAO;IAC3C;IACA,OAAOC,IAAAA,oBAAe,IAAGT,gBAAgB,CAACC,MAAMC,UAAUC;AAC5D","ignoreList":[0]}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export declare const MISSING_ROOT_TAGS_ERROR = "NEXT_MISSING_ROOT_TAGS";
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "MISSING_ROOT_TAGS_ERROR", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return MISSING_ROOT_TAGS_ERROR;
|
||||
}
|
||||
});
|
||||
const MISSING_ROOT_TAGS_ERROR = 'NEXT_MISSING_ROOT_TAGS';
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=constants.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/errors/constants.ts"],"sourcesContent":["export const MISSING_ROOT_TAGS_ERROR = 'NEXT_MISSING_ROOT_TAGS'\n"],"names":["MISSING_ROOT_TAGS_ERROR"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,0BAA0B","ignoreList":[0]}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export declare function throwEmptyGenerateStaticParamsError(): never;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "throwEmptyGenerateStaticParamsError", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return throwEmptyGenerateStaticParamsError;
|
||||
}
|
||||
});
|
||||
function throwEmptyGenerateStaticParamsError() {
|
||||
const error = Object.defineProperty(new Error('When using Cache Components, all `generateStaticParams` functions must return at least one result. ' + 'This is to ensure that we can perform build-time validation that there is no other dynamic accesses that would cause a runtime error.\n\n' + 'Learn more: https://nextjs.org/docs/messages/empty-generate-static-params'), "__NEXT_ERROR_CODE", {
|
||||
value: "E898",
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
error.name = 'EmptyGenerateStaticParamsError';
|
||||
// This error is meant to interrupt the server start/build process
|
||||
// but the stack trace isn't meaningful, as it points to internal code.
|
||||
error.stack = undefined;
|
||||
throw error;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=empty-generate-static-params-error.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/errors/empty-generate-static-params-error.ts"],"sourcesContent":["export function throwEmptyGenerateStaticParamsError(): never {\n const error = new Error(\n 'When using Cache Components, all `generateStaticParams` functions must return at least one result. ' +\n 'This is to ensure that we can perform build-time validation that there is no other dynamic accesses that would cause a runtime error.\\n\\n' +\n 'Learn more: https://nextjs.org/docs/messages/empty-generate-static-params'\n )\n error.name = 'EmptyGenerateStaticParamsError'\n // This error is meant to interrupt the server start/build process\n // but the stack trace isn't meaningful, as it points to internal code.\n error.stack = undefined\n\n throw error\n}\n"],"names":["throwEmptyGenerateStaticParamsError","error","Error","name","stack","undefined"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA;IACd,MAAMC,QAAQ,qBAIb,CAJa,IAAIC,MAChB,wGACE,8IACA,8EAHU,qBAAA;eAAA;oBAAA;sBAAA;IAId;IACAD,MAAME,IAAI,GAAG;IACb,kEAAkE;IAClE,uEAAuE;IACvEF,MAAMG,KAAK,GAAGC;IAEd,MAAMJ;AACR","ignoreList":[0]}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export declare class HardDeprecatedConfigError extends Error {
|
||||
constructor(message: string);
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "HardDeprecatedConfigError", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return HardDeprecatedConfigError;
|
||||
}
|
||||
});
|
||||
class HardDeprecatedConfigError extends Error {
|
||||
constructor(message){
|
||||
super(message);
|
||||
// This error is meant to interrupt the server start/build process
|
||||
// but the stack trace isn't meaningful, as it points to internal code.
|
||||
this.stack = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=hard-deprecated-config-error.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/errors/hard-deprecated-config-error.ts"],"sourcesContent":["export class HardDeprecatedConfigError extends Error {\n constructor(message: string) {\n super(message)\n\n // This error is meant to interrupt the server start/build process\n // but the stack trace isn't meaningful, as it points to internal code.\n this.stack = undefined\n }\n}\n"],"names":["HardDeprecatedConfigError","Error","constructor","message","stack","undefined"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,kCAAkCC;IAC7CC,YAAYC,OAAe,CAAE;QAC3B,KAAK,CAACA;QAEN,kEAAkE;QAClE,uEAAuE;QACvE,IAAI,CAACC,KAAK,GAAGC;IACf;AACF","ignoreList":[0]}
|
||||
Generated
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import { UsageError } from './usage-error';
|
||||
export declare class MissingDefaultParallelRouteError extends UsageError {
|
||||
constructor(fullSegmentPath: string, slotName: string);
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "MissingDefaultParallelRouteError", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return MissingDefaultParallelRouteError;
|
||||
}
|
||||
});
|
||||
const _usageerror = require("./usage-error");
|
||||
class MissingDefaultParallelRouteError extends _usageerror.UsageError {
|
||||
constructor(fullSegmentPath, slotName){
|
||||
super(`Missing required default.js file for parallel route at ${fullSegmentPath}\n` + `The parallel route slot "${slotName}" is missing a default.js file. When using parallel routes, each slot must have a default.js file to serve as a fallback.\n\n` + `Create a default.js file at: ${fullSegmentPath}/default.js`, 'https://nextjs.org/docs/messages/slot-missing-default');
|
||||
this.name = 'MissingDefaultParallelRouteError';
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=missing-default-parallel-route-error.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/errors/missing-default-parallel-route-error.ts"],"sourcesContent":["import { UsageError } from './usage-error'\n\nexport class MissingDefaultParallelRouteError extends UsageError {\n constructor(fullSegmentPath: string, slotName: string) {\n super(\n `Missing required default.js file for parallel route at ${fullSegmentPath}\\n` +\n `The parallel route slot \"${slotName}\" is missing a default.js file. When using parallel routes, each slot must have a default.js file to serve as a fallback.\\n\\n` +\n `Create a default.js file at: ${fullSegmentPath}/default.js`,\n 'https://nextjs.org/docs/messages/slot-missing-default'\n )\n\n this.name = 'MissingDefaultParallelRouteError'\n }\n}\n"],"names":["MissingDefaultParallelRouteError","UsageError","constructor","fullSegmentPath","slotName","name"],"mappings":";;;;+BAEaA;;;eAAAA;;;4BAFc;AAEpB,MAAMA,yCAAyCC,sBAAU;IAC9DC,YAAYC,eAAuB,EAAEC,QAAgB,CAAE;QACrD,KAAK,CACH,CAAC,uDAAuD,EAAED,gBAAgB,EAAE,CAAC,GAC3E,CAAC,yBAAyB,EAAEC,SAAS,6HAA6H,CAAC,GACnK,CAAC,6BAA6B,EAAED,gBAAgB,WAAW,CAAC,EAC9D;QAGF,IAAI,CAACE,IAAI,GAAG;IACd;AACF","ignoreList":[0]}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export declare class UsageError extends Error {
|
||||
constructor(message: string, docUrl: string);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "UsageError", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return UsageError;
|
||||
}
|
||||
});
|
||||
class UsageError extends Error {
|
||||
constructor(message, docUrl){
|
||||
super(`${message}\n\nLearn more: ${docUrl}`);
|
||||
this.name = 'UsageError';
|
||||
// This error is meant to interrupt the server start/build process
|
||||
// but the stack trace isn't meaningful, as it points to internal code.
|
||||
this.stack = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=usage-error.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/shared/lib/errors/usage-error.ts"],"sourcesContent":["export class UsageError extends Error {\n constructor(message: string, docUrl: string) {\n super(`${message}\\n\\nLearn more: ${docUrl}`)\n this.name = 'UsageError'\n\n // This error is meant to interrupt the server start/build process\n // but the stack trace isn't meaningful, as it points to internal code.\n this.stack = undefined\n }\n}\n"],"names":["UsageError","Error","constructor","message","docUrl","name","stack","undefined"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,mBAAmBC;IAC9BC,YAAYC,OAAe,EAAEC,MAAc,CAAE;QAC3C,KAAK,CAAC,GAAGD,QAAQ,gBAAgB,EAAEC,QAAQ;QAC3C,IAAI,CAACC,IAAI,GAAG;QAEZ,kEAAkE;QAClE,uEAAuE;QACvE,IAAI,CAACC,KAAK,GAAGC;IACf;AACF","ignoreList":[0]}
|
||||
Reference in New Issue
Block a user