main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

2
node_modules/next/dist/lib/chalk.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
declare let chalk: typeof import('next/dist/compiled/chalk');
export default chalk;

19
node_modules/next/dist/lib/chalk.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
let chalk;
if (process.env.NEXT_RUNTIME === "edge" || process.env.NEXT_MINIMAL) {
chalk = require("./web/chalk").default;
} else {
chalk = require("next/dist/compiled/chalk");
}
const _default = chalk;
//# sourceMappingURL=chalk.js.map

1
node_modules/next/dist/lib/chalk.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/chalk.ts"],"names":["chalk","process","env","NEXT_RUNTIME","NEXT_MINIMAL","require","default"],"mappings":";;;;+BAQA;;;eAAA;;;AARA,IAAIA;AAEJ,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,UAAUF,QAAQC,GAAG,CAACE,YAAY,EAAE;IACnEJ,QAAQK,QAAQ,eAAeC,OAAO;AACxC,OAAO;IACLN,QAAQK,QAAQ;AAClB;MAEA,WAAeL"}

1
node_modules/next/dist/lib/client-reference.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function isClientReference(reference: any): boolean;

15
node_modules/next/dist/lib/client-reference.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isClientReference", {
enumerable: true,
get: function() {
return isClientReference;
}
});
function isClientReference(reference) {
return (reference == null ? void 0 : reference.$$typeof) === Symbol.for("react.client.reference");
}
//# sourceMappingURL=client-reference.js.map

1
node_modules/next/dist/lib/client-reference.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/client-reference.ts"],"names":["isClientReference","reference","$$typeof","Symbol","for"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,kBAAkBC,SAAc;IAC9C,OAAOA,CAAAA,6BAAAA,UAAWC,QAAQ,MAAKC,OAAOC,GAAG,CAAC;AAC5C"}

7
node_modules/next/dist/lib/coalesced-function.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
type CoalescedInvoke<T> = {
isOrigin: boolean;
value: T;
};
export type UnwrapPromise<T> = T extends Promise<infer U> ? U : T;
export declare function withCoalescedInvoke<F extends (...args: any) => any>(func: F): (key: string, args: Parameters<F>) => Promise<CoalescedInvoke<UnwrapPromise<ReturnType<F>>>>;
export {};

39
node_modules/next/dist/lib/coalesced-function.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "withCoalescedInvoke", {
enumerable: true,
get: function() {
return withCoalescedInvoke;
}
});
const globalInvokeCache = new Map();
function withCoalescedInvoke(func) {
return async function(key, args) {
const entry = globalInvokeCache.get(key);
if (entry) {
return entry.then((res)=>({
isOrigin: false,
value: res.value
}));
}
async function __wrapper() {
return await func.apply(undefined, args);
}
const future = __wrapper().then((res)=>{
globalInvokeCache.delete(key);
return {
isOrigin: true,
value: res
};
}).catch((err)=>{
globalInvokeCache.delete(key);
return Promise.reject(err);
});
globalInvokeCache.set(key, future);
return future;
};
}
//# sourceMappingURL=coalesced-function.js.map

1
node_modules/next/dist/lib/coalesced-function.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/coalesced-function.ts"],"names":["withCoalescedInvoke","globalInvokeCache","Map","func","key","args","entry","get","then","res","isOrigin","value","__wrapper","apply","undefined","future","delete","catch","err","Promise","reject","set"],"mappings":";;;;+BASgBA;;;eAAAA;;;AAFhB,MAAMC,oBAAoB,IAAIC;AAEvB,SAASF,oBACdG,IAAO;IAKP,OAAO,eAAgBC,GAAW,EAAEC,IAAmB;QACrD,MAAMC,QAAQL,kBAAkBM,GAAG,CAACH;QACpC,IAAIE,OAAO;YACT,OAAOA,MAAME,IAAI,CAAC,CAACC,MAAS,CAAA;oBAC1BC,UAAU;oBACVC,OAAOF,IAAIE,KAAK;gBAClB,CAAA;QACF;QAEA,eAAeC;YACb,OAAO,MAAMT,KAAKU,KAAK,CAACC,WAAWT;QACrC;QAEA,MAAMU,SAASH,YACZJ,IAAI,CAAC,CAACC;YACLR,kBAAkBe,MAAM,CAACZ;YACzB,OAAO;gBAAEM,UAAU;gBAAMC,OAAOF;YAAoC;QACtE,GACCQ,KAAK,CAAC,CAACC;YACNjB,kBAAkBe,MAAM,CAACZ;YACzB,OAAOe,QAAQC,MAAM,CAACF;QACxB;QACFjB,kBAAkBoB,GAAG,CAACjB,KAAKW;QAC3B,OAAOA;IACT;AACF"}

5
node_modules/next/dist/lib/command-args.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { getValidatedArgs } from './get-validated-args';
export type CliCommand = (args: ReturnType<typeof getValidatedArgs>) => void;
export declare const commandArgs: {
[command: string]: () => Parameters<typeof getValidatedArgs>[0];
};

23
node_modules/next/dist/lib/command-args.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "commandArgs", {
enumerable: true,
get: function() {
return commandArgs;
}
});
const commandArgs = {
build: ()=>require("../cli/next-build-args").validArgs,
start: ()=>require("../cli/next-start-args").validArgs,
export: ()=>require("../cli/next-export-args").validArgs,
dev: ()=>require("../cli/next-dev-args").validArgs,
lint: ()=>require("../cli/next-lint-args").validArgs,
telemetry: ()=>require("../cli/next-telemetry-args").validArgs,
info: ()=>require("../cli/next-info-args").validArgs,
"experimental-compile": ()=>require("../cli/next-build-args").validArgs,
"experimental-generate": ()=>require("../cli/next-build-args").validArgs
};
//# sourceMappingURL=command-args.js.map

1
node_modules/next/dist/lib/command-args.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/command-args.ts"],"names":["commandArgs","build","require","validArgs","start","export","dev","lint","telemetry","info"],"mappings":";;;;+BAIaA;;;eAAAA;;;AAAN,MAAMA,cAET;IACFC,OAAO,IAAMC,QAAQ,0BAA0BC,SAAS;IACxDC,OAAO,IAAMF,QAAQ,0BAA0BC,SAAS;IACxDE,QAAQ,IAAMH,QAAQ,2BAA2BC,SAAS;IAC1DG,KAAK,IAAMJ,QAAQ,wBAAwBC,SAAS;IACpDI,MAAM,IAAML,QAAQ,yBAAyBC,SAAS;IACtDK,WAAW,IAAMN,QAAQ,8BAA8BC,SAAS;IAChEM,MAAM,IAAMP,QAAQ,yBAAyBC,SAAS;IACtD,wBAAwB,IAAMD,QAAQ,0BAA0BC,SAAS;IACzE,yBAAyB,IAAMD,QAAQ,0BAA0BC,SAAS;AAC5E"}

5
node_modules/next/dist/lib/commands.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { getValidatedArgs } from './get-validated-args';
export type CliCommand = (args: ReturnType<typeof getValidatedArgs>) => void;
export declare const commands: {
[command: string]: () => Promise<CliCommand>;
};

23
node_modules/next/dist/lib/commands.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "commands", {
enumerable: true,
get: function() {
return commands;
}
});
const commands = {
build: ()=>Promise.resolve(require("../cli/next-build").nextBuild),
start: ()=>Promise.resolve(require("../cli/next-start").nextStart),
export: ()=>Promise.resolve(require("../cli/next-export").nextExport),
dev: ()=>Promise.resolve(require("../cli/next-dev").nextDev),
lint: ()=>Promise.resolve(require("../cli/next-lint").nextLint),
telemetry: ()=>Promise.resolve(require("../cli/next-telemetry").nextTelemetry),
info: ()=>Promise.resolve(require("../cli/next-info").nextInfo),
"experimental-compile": ()=>Promise.resolve(require("../cli/next-build").nextBuild),
"experimental-generate": ()=>Promise.resolve(require("../cli/next-build").nextBuild)
};
//# sourceMappingURL=commands.js.map

1
node_modules/next/dist/lib/commands.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/commands.ts"],"names":["commands","build","Promise","resolve","require","nextBuild","start","nextStart","export","nextExport","dev","nextDev","lint","nextLint","telemetry","nextTelemetry","info","nextInfo"],"mappings":";;;;+BAIaA;;;eAAAA;;;AAAN,MAAMA,WAA6D;IACxEC,OAAO,IAAMC,QAAQC,OAAO,CAACC,QAAQ,qBAAqBC,SAAS;IACnEC,OAAO,IAAMJ,QAAQC,OAAO,CAACC,QAAQ,qBAAqBG,SAAS;IACnEC,QAAQ,IAAMN,QAAQC,OAAO,CAACC,QAAQ,sBAAsBK,UAAU;IACtEC,KAAK,IAAMR,QAAQC,OAAO,CAACC,QAAQ,mBAAmBO,OAAO;IAC7DC,MAAM,IAAMV,QAAQC,OAAO,CAACC,QAAQ,oBAAoBS,QAAQ;IAChEC,WAAW,IACTZ,QAAQC,OAAO,CAACC,QAAQ,yBAAyBW,aAAa;IAChEC,MAAM,IAAMd,QAAQC,OAAO,CAACC,QAAQ,oBAAoBa,QAAQ;IAChE,wBAAwB,IACtBf,QAAQC,OAAO,CAACC,QAAQ,qBAAqBC,SAAS;IACxD,yBAAyB,IACvBH,QAAQC,OAAO,CAACC,QAAQ,qBAAqBC,SAAS;AAC1D"}

2
node_modules/next/dist/lib/compile-error.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare class CompileError extends Error {
}

14
node_modules/next/dist/lib/compile-error.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "CompileError", {
enumerable: true,
get: function() {
return CompileError;
}
});
class CompileError extends Error {
}
//# sourceMappingURL=compile-error.js.map

1
node_modules/next/dist/lib/compile-error.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/compile-error.ts"],"names":["CompileError","Error"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,qBAAqBC;AAAO"}

125
node_modules/next/dist/lib/constants.d.ts generated vendored Normal file
View File

@@ -0,0 +1,125 @@
import type { ServerRuntime } from '../../types';
export declare const NEXT_QUERY_PARAM_PREFIX = "nxtP";
export declare const PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
export declare const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
export declare const NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
export declare const NEXT_CACHE_SOFT_TAGS_HEADER = "x-next-cache-soft-tags";
export declare const NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
export declare const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
export declare const NEXT_CACHE_TAG_MAX_LENGTH = 256;
export declare const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
export declare const NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
export declare const CACHE_ONE_YEAR = 31536000;
export declare const MIDDLEWARE_FILENAME = "middleware";
export declare const MIDDLEWARE_LOCATION_REGEXP = "(?:src/)?middleware";
export declare const INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
export declare const PAGES_DIR_ALIAS = "private-next-pages";
export declare const DOT_NEXT_ALIAS = "private-dot-next";
export declare const ROOT_DIR_ALIAS = "private-next-root-dir";
export declare const APP_DIR_ALIAS = "private-next-app-dir";
export declare const RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
export declare const RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
export declare const RSC_ACTION_PROXY_ALIAS = "private-next-rsc-action-proxy";
export declare const RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
export declare const PUBLIC_DIR_MIDDLEWARE_CONFLICT = "You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict";
export declare const SSG_GET_INITIAL_PROPS_CONFLICT = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps";
export declare const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.";
export declare const SERVER_PROPS_SSG_CONFLICT = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps";
export declare const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props";
export declare const SERVER_PROPS_EXPORT_ERROR = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export";
export declare const GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
export declare const GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
export declare const UNSTABLE_REVALIDATE_RENAME_ERROR: string;
export declare const GSSP_COMPONENT_MEMBER_ERROR = "can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member";
export declare const NON_STANDARD_NODE_ENV = "You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env";
export declare const SSG_FALLBACK_EXPORT_ERROR = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export";
export declare const ESLINT_DEFAULT_DIRS: string[];
export declare const ESLINT_PROMPT_VALUES: ({
title: string;
recommended: boolean;
config: {
extends: string;
};
} | {
title: string;
config: {
extends: string;
};
recommended?: undefined;
} | {
title: string;
config: null;
recommended?: undefined;
})[];
export declare const SERVER_RUNTIME: Record<string, ServerRuntime>;
/**
* The names of the webpack layers. These layers are the primitives for the
* webpack chunks.
*/
declare const WEBPACK_LAYERS_NAMES: {
/**
* The layer for the shared code between the client and server bundles.
*/
readonly shared: "shared";
/**
* React Server Components layer (rsc).
*/
readonly reactServerComponents: "rsc";
/**
* Server Side Rendering layer for app (ssr).
*/
readonly serverSideRendering: "ssr";
/**
* The browser client bundle layer for actions.
*/
readonly actionBrowser: "action-browser";
/**
* The layer for the API routes.
*/
readonly api: "api";
/**
* The layer for the middleware code.
*/
readonly middleware: "middleware";
/**
* The layer for assets on the edge.
*/
readonly edgeAsset: "edge-asset";
/**
* The browser client bundle layer for App directory.
*/
readonly appPagesBrowser: "app-pages-browser";
/**
* The server bundle layer for metadata routes.
*/
readonly appMetadataRoute: "app-metadata-route";
/**
* The layer for the server bundle for App Route handlers.
*/
readonly appRouteHandler: "app-route-handler";
};
export type WebpackLayerName = (typeof WEBPACK_LAYERS_NAMES)[keyof typeof WEBPACK_LAYERS_NAMES];
declare const WEBPACK_LAYERS: {
GROUP: {
server: ("rsc" | "action-browser" | "app-metadata-route" | "app-route-handler")[];
nonClientServerTarget: ("middleware" | "api")[];
app: ("rsc" | "ssr" | "action-browser" | "app-pages-browser" | "app-metadata-route" | "app-route-handler")[];
};
shared: "shared";
reactServerComponents: "rsc";
serverSideRendering: "ssr";
actionBrowser: "action-browser";
api: "api";
middleware: "middleware";
edgeAsset: "edge-asset";
appPagesBrowser: "app-pages-browser";
appMetadataRoute: "app-metadata-route";
appRouteHandler: "app-route-handler";
};
declare const WEBPACK_RESOURCE_QUERIES: {
edgeSSREntry: string;
metadata: string;
metadataRoute: string;
metadataImageMeta: string;
};
export { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES };

302
node_modules/next/dist/lib/constants.js generated vendored Normal file
View File

@@ -0,0 +1,302 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
NEXT_QUERY_PARAM_PREFIX: null,
PRERENDER_REVALIDATE_HEADER: null,
PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: null,
NEXT_CACHE_TAGS_HEADER: null,
NEXT_CACHE_SOFT_TAGS_HEADER: null,
NEXT_CACHE_REVALIDATED_TAGS_HEADER: null,
NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: null,
NEXT_CACHE_TAG_MAX_LENGTH: null,
NEXT_CACHE_SOFT_TAG_MAX_LENGTH: null,
NEXT_CACHE_IMPLICIT_TAG_ID: null,
CACHE_ONE_YEAR: null,
MIDDLEWARE_FILENAME: null,
MIDDLEWARE_LOCATION_REGEXP: null,
INSTRUMENTATION_HOOK_FILENAME: null,
PAGES_DIR_ALIAS: null,
DOT_NEXT_ALIAS: null,
ROOT_DIR_ALIAS: null,
APP_DIR_ALIAS: null,
RSC_MOD_REF_PROXY_ALIAS: null,
RSC_ACTION_VALIDATE_ALIAS: null,
RSC_ACTION_PROXY_ALIAS: null,
RSC_ACTION_CLIENT_WRAPPER_ALIAS: null,
PUBLIC_DIR_MIDDLEWARE_CONFLICT: null,
SSG_GET_INITIAL_PROPS_CONFLICT: null,
SERVER_PROPS_GET_INIT_PROPS_CONFLICT: null,
SERVER_PROPS_SSG_CONFLICT: null,
STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: null,
SERVER_PROPS_EXPORT_ERROR: null,
GSP_NO_RETURNED_VALUE: null,
GSSP_NO_RETURNED_VALUE: null,
UNSTABLE_REVALIDATE_RENAME_ERROR: null,
GSSP_COMPONENT_MEMBER_ERROR: null,
NON_STANDARD_NODE_ENV: null,
SSG_FALLBACK_EXPORT_ERROR: null,
ESLINT_DEFAULT_DIRS: null,
ESLINT_PROMPT_VALUES: null,
SERVER_RUNTIME: null,
WEBPACK_LAYERS: null,
WEBPACK_RESOURCE_QUERIES: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
NEXT_QUERY_PARAM_PREFIX: function() {
return NEXT_QUERY_PARAM_PREFIX;
},
PRERENDER_REVALIDATE_HEADER: function() {
return PRERENDER_REVALIDATE_HEADER;
},
PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;
},
NEXT_CACHE_TAGS_HEADER: function() {
return NEXT_CACHE_TAGS_HEADER;
},
NEXT_CACHE_SOFT_TAGS_HEADER: function() {
return NEXT_CACHE_SOFT_TAGS_HEADER;
},
NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
return NEXT_CACHE_REVALIDATED_TAGS_HEADER;
},
NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
},
NEXT_CACHE_TAG_MAX_LENGTH: function() {
return NEXT_CACHE_TAG_MAX_LENGTH;
},
NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
},
NEXT_CACHE_IMPLICIT_TAG_ID: function() {
return NEXT_CACHE_IMPLICIT_TAG_ID;
},
CACHE_ONE_YEAR: function() {
return CACHE_ONE_YEAR;
},
MIDDLEWARE_FILENAME: function() {
return MIDDLEWARE_FILENAME;
},
MIDDLEWARE_LOCATION_REGEXP: function() {
return MIDDLEWARE_LOCATION_REGEXP;
},
INSTRUMENTATION_HOOK_FILENAME: function() {
return INSTRUMENTATION_HOOK_FILENAME;
},
PAGES_DIR_ALIAS: function() {
return PAGES_DIR_ALIAS;
},
DOT_NEXT_ALIAS: function() {
return DOT_NEXT_ALIAS;
},
ROOT_DIR_ALIAS: function() {
return ROOT_DIR_ALIAS;
},
APP_DIR_ALIAS: function() {
return APP_DIR_ALIAS;
},
RSC_MOD_REF_PROXY_ALIAS: function() {
return RSC_MOD_REF_PROXY_ALIAS;
},
RSC_ACTION_VALIDATE_ALIAS: function() {
return RSC_ACTION_VALIDATE_ALIAS;
},
RSC_ACTION_PROXY_ALIAS: function() {
return RSC_ACTION_PROXY_ALIAS;
},
RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
return RSC_ACTION_CLIENT_WRAPPER_ALIAS;
},
PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
return PUBLIC_DIR_MIDDLEWARE_CONFLICT;
},
SSG_GET_INITIAL_PROPS_CONFLICT: function() {
return SSG_GET_INITIAL_PROPS_CONFLICT;
},
SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
},
SERVER_PROPS_SSG_CONFLICT: function() {
return SERVER_PROPS_SSG_CONFLICT;
},
STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
},
SERVER_PROPS_EXPORT_ERROR: function() {
return SERVER_PROPS_EXPORT_ERROR;
},
GSP_NO_RETURNED_VALUE: function() {
return GSP_NO_RETURNED_VALUE;
},
GSSP_NO_RETURNED_VALUE: function() {
return GSSP_NO_RETURNED_VALUE;
},
UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
return UNSTABLE_REVALIDATE_RENAME_ERROR;
},
GSSP_COMPONENT_MEMBER_ERROR: function() {
return GSSP_COMPONENT_MEMBER_ERROR;
},
NON_STANDARD_NODE_ENV: function() {
return NON_STANDARD_NODE_ENV;
},
SSG_FALLBACK_EXPORT_ERROR: function() {
return SSG_FALLBACK_EXPORT_ERROR;
},
ESLINT_DEFAULT_DIRS: function() {
return ESLINT_DEFAULT_DIRS;
},
ESLINT_PROMPT_VALUES: function() {
return ESLINT_PROMPT_VALUES;
},
SERVER_RUNTIME: function() {
return SERVER_RUNTIME;
},
WEBPACK_LAYERS: function() {
return WEBPACK_LAYERS;
},
WEBPACK_RESOURCE_QUERIES: function() {
return WEBPACK_RESOURCE_QUERIES;
}
});
const NEXT_QUERY_PARAM_PREFIX = "nxtP";
const PRERENDER_REVALIDATE_HEADER = "x-prerender-revalidate";
const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = "x-prerender-revalidate-if-generated";
const NEXT_CACHE_TAGS_HEADER = "x-next-cache-tags";
const NEXT_CACHE_SOFT_TAGS_HEADER = "x-next-cache-soft-tags";
const NEXT_CACHE_REVALIDATED_TAGS_HEADER = "x-next-revalidated-tags";
const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = "x-next-revalidate-tag-token";
const NEXT_CACHE_TAG_MAX_LENGTH = 256;
const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
const NEXT_CACHE_IMPLICIT_TAG_ID = "_N_T_";
const CACHE_ONE_YEAR = 31536000;
const MIDDLEWARE_FILENAME = "middleware";
const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
const INSTRUMENTATION_HOOK_FILENAME = "instrumentation";
const PAGES_DIR_ALIAS = "private-next-pages";
const DOT_NEXT_ALIAS = "private-dot-next";
const ROOT_DIR_ALIAS = "private-next-root-dir";
const APP_DIR_ALIAS = "private-next-app-dir";
const RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
const RSC_ACTION_VALIDATE_ALIAS = "private-next-rsc-action-validate";
const RSC_ACTION_PROXY_ALIAS = "private-next-rsc-action-proxy";
const RSC_ACTION_CLIENT_WRAPPER_ALIAS = "private-next-rsc-action-client-wrapper";
const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;
const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
const SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
const GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
const GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
const UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\n" + "Please use `revalidate` instead.";
const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;
const NON_STANDARD_NODE_ENV = `You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;
const SSG_FALLBACK_EXPORT_ERROR = `Pages with \`fallback\` enabled in \`getStaticPaths\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;
const ESLINT_DEFAULT_DIRS = [
"app",
"pages",
"components",
"lib",
"src"
];
const ESLINT_PROMPT_VALUES = [
{
title: "Strict",
recommended: true,
config: {
extends: "next/core-web-vitals"
}
},
{
title: "Base",
config: {
extends: "next"
}
},
{
title: "Cancel",
config: null
}
];
const SERVER_RUNTIME = {
edge: "edge",
experimentalEdge: "experimental-edge",
nodejs: "nodejs"
};
/**
* The names of the webpack layers. These layers are the primitives for the
* webpack chunks.
*/ const WEBPACK_LAYERS_NAMES = {
/**
* The layer for the shared code between the client and server bundles.
*/ shared: "shared",
/**
* React Server Components layer (rsc).
*/ reactServerComponents: "rsc",
/**
* Server Side Rendering layer for app (ssr).
*/ serverSideRendering: "ssr",
/**
* The browser client bundle layer for actions.
*/ actionBrowser: "action-browser",
/**
* The layer for the API routes.
*/ api: "api",
/**
* The layer for the middleware code.
*/ middleware: "middleware",
/**
* The layer for assets on the edge.
*/ edgeAsset: "edge-asset",
/**
* The browser client bundle layer for App directory.
*/ appPagesBrowser: "app-pages-browser",
/**
* The server bundle layer for metadata routes.
*/ appMetadataRoute: "app-metadata-route",
/**
* The layer for the server bundle for App Route handlers.
*/ appRouteHandler: "app-route-handler"
};
const WEBPACK_LAYERS = {
...WEBPACK_LAYERS_NAMES,
GROUP: {
server: [
WEBPACK_LAYERS_NAMES.reactServerComponents,
WEBPACK_LAYERS_NAMES.actionBrowser,
WEBPACK_LAYERS_NAMES.appMetadataRoute,
WEBPACK_LAYERS_NAMES.appRouteHandler
],
nonClientServerTarget: [
// plus middleware and pages api
WEBPACK_LAYERS_NAMES.middleware,
WEBPACK_LAYERS_NAMES.api
],
app: [
WEBPACK_LAYERS_NAMES.reactServerComponents,
WEBPACK_LAYERS_NAMES.actionBrowser,
WEBPACK_LAYERS_NAMES.appMetadataRoute,
WEBPACK_LAYERS_NAMES.appRouteHandler,
WEBPACK_LAYERS_NAMES.serverSideRendering,
WEBPACK_LAYERS_NAMES.appPagesBrowser
]
}
};
const WEBPACK_RESOURCE_QUERIES = {
edgeSSREntry: "__next_edge_ssr_entry__",
metadata: "__next_metadata__",
metadataRoute: "__next_metadata_route__",
metadataImageMeta: "__next_metadata_image_meta__"
};
//# sourceMappingURL=constants.js.map

1
node_modules/next/dist/lib/constants.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/constants.ts"],"names":["NEXT_QUERY_PARAM_PREFIX","PRERENDER_REVALIDATE_HEADER","PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER","NEXT_CACHE_TAGS_HEADER","NEXT_CACHE_SOFT_TAGS_HEADER","NEXT_CACHE_REVALIDATED_TAGS_HEADER","NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER","NEXT_CACHE_TAG_MAX_LENGTH","NEXT_CACHE_SOFT_TAG_MAX_LENGTH","NEXT_CACHE_IMPLICIT_TAG_ID","CACHE_ONE_YEAR","MIDDLEWARE_FILENAME","MIDDLEWARE_LOCATION_REGEXP","INSTRUMENTATION_HOOK_FILENAME","PAGES_DIR_ALIAS","DOT_NEXT_ALIAS","ROOT_DIR_ALIAS","APP_DIR_ALIAS","RSC_MOD_REF_PROXY_ALIAS","RSC_ACTION_VALIDATE_ALIAS","RSC_ACTION_PROXY_ALIAS","RSC_ACTION_CLIENT_WRAPPER_ALIAS","PUBLIC_DIR_MIDDLEWARE_CONFLICT","SSG_GET_INITIAL_PROPS_CONFLICT","SERVER_PROPS_GET_INIT_PROPS_CONFLICT","SERVER_PROPS_SSG_CONFLICT","STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR","SERVER_PROPS_EXPORT_ERROR","GSP_NO_RETURNED_VALUE","GSSP_NO_RETURNED_VALUE","UNSTABLE_REVALIDATE_RENAME_ERROR","GSSP_COMPONENT_MEMBER_ERROR","NON_STANDARD_NODE_ENV","SSG_FALLBACK_EXPORT_ERROR","ESLINT_DEFAULT_DIRS","ESLINT_PROMPT_VALUES","SERVER_RUNTIME","WEBPACK_LAYERS","WEBPACK_RESOURCE_QUERIES","title","recommended","config","extends","edge","experimentalEdge","nodejs","WEBPACK_LAYERS_NAMES","shared","reactServerComponents","serverSideRendering","actionBrowser","api","middleware","edgeAsset","appPagesBrowser","appMetadataRoute","appRouteHandler","GROUP","server","nonClientServerTarget","app","edgeSSREntry","metadata","metadataRoute","metadataImageMeta"],"mappings":"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"}

View File

@@ -0,0 +1,6 @@
import { BloomFilter } from '../shared/lib/bloom-filter';
import { Redirect } from './load-custom-routes';
export declare function createClientRouterFilter(paths: string[], redirects: Redirect[], allowedErrorRate?: number): {
staticFilter: ReturnType<BloomFilter['export']>;
dynamicFilter: ReturnType<BloomFilter['export']>;
};

View File

@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createClientRouterFilter", {
enumerable: true,
get: function() {
return createClientRouterFilter;
}
});
const _bloomfilter = require("../shared/lib/bloom-filter");
const _utils = require("../shared/lib/router/utils");
const _removetrailingslash = require("../shared/lib/router/utils/remove-trailing-slash");
const _trytoparsepath = require("./try-to-parse-path");
function createClientRouterFilter(paths, redirects, allowedErrorRate) {
const staticPaths = new Set();
const dynamicPaths = new Set();
for (const path of paths){
if ((0, _utils.isDynamicRoute)(path)) {
let subPath = "";
const pathParts = path.split("/");
// start at 1 since we split on '/' and the path starts
// with this so the first entry is an empty string
for(let i = 1; i < pathParts.length + 1; i++){
const curPart = pathParts[i];
if (curPart.startsWith("[")) {
break;
}
subPath = `${subPath}/${curPart}`;
}
if (subPath) {
dynamicPaths.add(subPath);
}
} else {
staticPaths.add(path);
}
}
for (const redirect of redirects){
const { source } = redirect;
const path = (0, _removetrailingslash.removeTrailingSlash)(source);
let tokens = [];
try {
tokens = (0, _trytoparsepath.tryToParsePath)(source).tokens || [];
} catch {}
if (tokens.every((token)=>typeof token === "string")) {
// only include static redirects initially
staticPaths.add(path);
}
}
const staticFilter = _bloomfilter.BloomFilter.from([
...staticPaths
], allowedErrorRate);
const dynamicFilter = _bloomfilter.BloomFilter.from([
...dynamicPaths
], allowedErrorRate);
const data = {
staticFilter: staticFilter.export(),
dynamicFilter: dynamicFilter.export()
};
return data;
}
//# sourceMappingURL=create-client-router-filter.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/create-client-router-filter.ts"],"names":["createClientRouterFilter","paths","redirects","allowedErrorRate","staticPaths","Set","dynamicPaths","path","isDynamicRoute","subPath","pathParts","split","i","length","curPart","startsWith","add","redirect","source","removeTrailingSlash","tokens","tryToParsePath","every","token","staticFilter","BloomFilter","from","dynamicFilter","data","export"],"mappings":";;;;+BAOgBA;;;eAAAA;;;6BANY;uBACG;qCACK;gCAEL;AAExB,SAASA,yBACdC,KAAe,EACfC,SAAqB,EACrBC,gBAAyB;IAKzB,MAAMC,cAAc,IAAIC;IACxB,MAAMC,eAAe,IAAID;IAEzB,KAAK,MAAME,QAAQN,MAAO;QACxB,IAAIO,IAAAA,qBAAc,EAACD,OAAO;YACxB,IAAIE,UAAU;YACd,MAAMC,YAAYH,KAAKI,KAAK,CAAC;YAE7B,uDAAuD;YACvD,kDAAkD;YAClD,IAAK,IAAIC,IAAI,GAAGA,IAAIF,UAAUG,MAAM,GAAG,GAAGD,IAAK;gBAC7C,MAAME,UAAUJ,SAAS,CAACE,EAAE;gBAE5B,IAAIE,QAAQC,UAAU,CAAC,MAAM;oBAC3B;gBACF;gBACAN,UAAU,CAAC,EAAEA,QAAQ,CAAC,EAAEK,QAAQ,CAAC;YACnC;YAEA,IAAIL,SAAS;gBACXH,aAAaU,GAAG,CAACP;YACnB;QACF,OAAO;YACLL,YAAYY,GAAG,CAACT;QAClB;IACF;IAEA,KAAK,MAAMU,YAAYf,UAAW;QAChC,MAAM,EAAEgB,MAAM,EAAE,GAAGD;QACnB,MAAMV,OAAOY,IAAAA,wCAAmB,EAACD;QACjC,IAAIE,SAAkB,EAAE;QAExB,IAAI;YACFA,SAASC,IAAAA,8BAAc,EAACH,QAAQE,MAAM,IAAI,EAAE;QAC9C,EAAE,OAAM,CAAC;QAET,IAAIA,OAAOE,KAAK,CAAC,CAACC,QAAU,OAAOA,UAAU,WAAW;YACtD,0CAA0C;YAC1CnB,YAAYY,GAAG,CAACT;QAClB;IACF;IAEA,MAAMiB,eAAeC,wBAAW,CAACC,IAAI,CAAC;WAAItB;KAAY,EAAED;IAExD,MAAMwB,gBAAgBF,wBAAW,CAACC,IAAI,CAAC;WAAIpB;KAAa,EAAEH;IAC1D,MAAMyB,OAAO;QACXJ,cAAcA,aAAaK,MAAM;QACjCF,eAAeA,cAAcE,MAAM;IACrC;IACA,OAAOD;AACT"}

1
node_modules/next/dist/lib/detect-typo.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function detectTypo(input: string, options: string[], threshold?: number): string | null;

51
node_modules/next/dist/lib/detect-typo.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
// the minimum number of operations required to convert string a to string b.
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "detectTypo", {
enumerable: true,
get: function() {
return detectTypo;
}
});
function minDistance(a, b, threshold) {
const m = a.length;
const n = b.length;
if (m < n) {
return minDistance(b, a, threshold);
}
if (n === 0) {
return m;
}
let previousRow = Array.from({
length: n + 1
}, (_, i)=>i);
for(let i = 0; i < m; i++){
const s1 = a[i];
let currentRow = [
i + 1
];
for(let j = 0; j < n; j++){
const s2 = b[j];
const insertions = previousRow[j + 1] + 1;
const deletions = currentRow[j] + 1;
const substitutions = previousRow[j] + Number(s1 !== s2);
currentRow.push(Math.min(insertions, deletions, substitutions));
}
previousRow = currentRow;
}
return previousRow[previousRow.length - 1];
}
function detectTypo(input, options, threshold = 2) {
const potentialTypos = options.map((o)=>({
option: o,
distance: minDistance(o, input, threshold)
})).filter(({ distance })=>distance <= threshold && distance > 0).sort((a, b)=>a.distance - b.distance);
if (potentialTypos.length) {
return potentialTypos[0].option;
}
return null;
}
//# sourceMappingURL=detect-typo.js.map

1
node_modules/next/dist/lib/detect-typo.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/detect-typo.ts"],"names":["detectTypo","minDistance","a","b","threshold","m","length","n","previousRow","Array","from","_","i","s1","currentRow","j","s2","insertions","deletions","substitutions","Number","push","Math","min","input","options","potentialTypos","map","o","option","distance","filter","sort"],"mappings":"AAAA,6EAA6E;;;;;+BA8B7DA;;;eAAAA;;;AA7BhB,SAASC,YAAYC,CAAS,EAAEC,CAAS,EAAEC,SAAiB;IAC1D,MAAMC,IAAIH,EAAEI,MAAM;IAClB,MAAMC,IAAIJ,EAAEG,MAAM;IAElB,IAAID,IAAIE,GAAG;QACT,OAAON,YAAYE,GAAGD,GAAGE;IAC3B;IAEA,IAAIG,MAAM,GAAG;QACX,OAAOF;IACT;IAEA,IAAIG,cAAcC,MAAMC,IAAI,CAAC;QAAEJ,QAAQC,IAAI;IAAE,GAAG,CAACI,GAAGC,IAAMA;IAE1D,IAAK,IAAIA,IAAI,GAAGA,IAAIP,GAAGO,IAAK;QAC1B,MAAMC,KAAKX,CAAC,CAACU,EAAE;QACf,IAAIE,aAAa;YAACF,IAAI;SAAE;QACxB,IAAK,IAAIG,IAAI,GAAGA,IAAIR,GAAGQ,IAAK;YAC1B,MAAMC,KAAKb,CAAC,CAACY,EAAE;YACf,MAAME,aAAaT,WAAW,CAACO,IAAI,EAAE,GAAG;YACxC,MAAMG,YAAYJ,UAAU,CAACC,EAAE,GAAG;YAClC,MAAMI,gBAAgBX,WAAW,CAACO,EAAE,GAAGK,OAAOP,OAAOG;YACrDF,WAAWO,IAAI,CAACC,KAAKC,GAAG,CAACN,YAAYC,WAAWC;QAClD;QACAX,cAAcM;IAChB;IACA,OAAON,WAAW,CAACA,YAAYF,MAAM,GAAG,EAAE;AAC5C;AAEO,SAASN,WAAWwB,KAAa,EAAEC,OAAiB,EAAErB,YAAY,CAAC;IACxE,MAAMsB,iBAAiBD,QACpBE,GAAG,CAAC,CAACC,IAAO,CAAA;YACXC,QAAQD;YACRE,UAAU7B,YAAY2B,GAAGJ,OAAOpB;QAClC,CAAA,GACC2B,MAAM,CAAC,CAAC,EAAED,QAAQ,EAAE,GAAKA,YAAY1B,aAAa0B,WAAW,GAC7DE,IAAI,CAAC,CAAC9B,GAAGC,IAAMD,EAAE4B,QAAQ,GAAG3B,EAAE2B,QAAQ;IAEzC,IAAIJ,eAAepB,MAAM,EAAE;QACzB,OAAOoB,cAAc,CAAC,EAAE,CAACG,MAAM;IACjC;IACA,OAAO;AACT"}

2
node_modules/next/dist/lib/download-swc.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare function downloadNativeNextSwc(version: string, bindingsDirectory: string, triplesABI: Array<string>): Promise<void>;
export declare function downloadWasmSwc(version: string, wasmDirectory: string, variant?: 'nodejs' | 'web'): Promise<void>;

161
node_modules/next/dist/lib/download-swc.js generated vendored Normal file
View File

@@ -0,0 +1,161 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
downloadNativeNextSwc: null,
downloadWasmSwc: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
downloadNativeNextSwc: function() {
return downloadNativeNextSwc;
},
downloadWasmSwc: function() {
return downloadWasmSwc;
}
});
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../build/output/log"));
const _tar = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/tar"));
const _fileexists = require("./file-exists");
const _getregistry = require("./helpers/get-registry");
const _getcachedirectory = require("./helpers/get-cache-directory");
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 = {};
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 { fetch } = require("next/dist/compiled/undici");
const { WritableStream } = require("node:stream/web");
const MAX_VERSIONS_TO_CACHE = 8;
async function extractBinary(outputDirectory, pkgName, tarFileName) {
const cacheDirectory = await (0, _getcachedirectory.getCacheDirectory)("next-swc", process.env["NEXT_SWC_PATH"]);
const extractFromTar = async ()=>{
await _tar.default.x({
file: _path.default.join(cacheDirectory, tarFileName),
cwd: outputDirectory,
strip: 1
});
};
if (!await (0, _fileexists.fileExists)(_path.default.join(cacheDirectory, tarFileName))) {
_log.info(`Downloading swc package ${pkgName}...`);
await _fs.default.promises.mkdir(cacheDirectory, {
recursive: true
});
const tempFile = _path.default.join(cacheDirectory, `${tarFileName}.temp-${Date.now()}`);
const registry = (0, _getregistry.getRegistry)();
const downloadUrl = `${registry}${pkgName}/-/${tarFileName}`;
await fetch(downloadUrl).then((res)=>{
const { ok, body } = res;
if (!ok || !body) {
_log.error(`Failed to download swc package from ${downloadUrl}`);
}
if (!ok) {
throw new Error(`request failed with status ${res.status}`);
}
if (!body) {
throw new Error("request failed with empty body");
}
const cacheWriteStream = _fs.default.createWriteStream(tempFile);
return body.pipeTo(new WritableStream({
write (chunk) {
cacheWriteStream.write(chunk);
},
close () {
cacheWriteStream.close();
}
}));
});
await _fs.default.promises.rename(tempFile, _path.default.join(cacheDirectory, tarFileName));
}
await extractFromTar();
const cacheFiles = await _fs.default.promises.readdir(cacheDirectory);
if (cacheFiles.length > MAX_VERSIONS_TO_CACHE) {
cacheFiles.sort((a, b)=>{
if (a.length < b.length) return -1;
return a.localeCompare(b);
});
// prune oldest versions in cache
for(let i = 0; i++; i < cacheFiles.length - MAX_VERSIONS_TO_CACHE){
await _fs.default.promises.unlink(_path.default.join(cacheDirectory, cacheFiles[i])).catch(()=>{});
}
}
}
async function downloadNativeNextSwc(version, bindingsDirectory, triplesABI) {
for (const triple of triplesABI){
const pkgName = `@next/swc-${triple}`;
const tarFileName = `${pkgName.substring(6)}-${version}.tgz`;
const outputDirectory = _path.default.join(bindingsDirectory, pkgName);
if (await (0, _fileexists.fileExists)(outputDirectory)) {
// if the package is already downloaded a different
// failure occurred than not being present
return;
}
await _fs.default.promises.mkdir(outputDirectory, {
recursive: true
});
await extractBinary(outputDirectory, pkgName, tarFileName);
}
}
async function downloadWasmSwc(version, wasmDirectory, variant = "nodejs") {
const pkgName = `@next/swc-wasm-${variant}`;
const tarFileName = `${pkgName.substring(6)}-${version}.tgz`;
const outputDirectory = _path.default.join(wasmDirectory, pkgName);
if (await (0, _fileexists.fileExists)(outputDirectory)) {
// if the package is already downloaded a different
// failure occurred than not being present
return;
}
await _fs.default.promises.mkdir(outputDirectory, {
recursive: true
});
await extractBinary(outputDirectory, pkgName, tarFileName);
}
//# sourceMappingURL=download-swc.js.map

1
node_modules/next/dist/lib/download-swc.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/download-swc.ts"],"names":["downloadNativeNextSwc","downloadWasmSwc","fetch","require","WritableStream","MAX_VERSIONS_TO_CACHE","extractBinary","outputDirectory","pkgName","tarFileName","cacheDirectory","getCacheDirectory","process","env","extractFromTar","tar","x","file","path","join","cwd","strip","fileExists","Log","info","fs","promises","mkdir","recursive","tempFile","Date","now","registry","getRegistry","downloadUrl","then","res","ok","body","error","Error","status","cacheWriteStream","createWriteStream","pipeTo","write","chunk","close","rename","cacheFiles","readdir","length","sort","a","b","localeCompare","i","unlink","catch","version","bindingsDirectory","triplesABI","triple","substring","wasmDirectory","variant"],"mappings":"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"}

26
node_modules/next/dist/lib/eslint/customFormatter.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
export declare enum MessageSeverity {
Warning = 1,
Error = 2
}
interface LintMessage {
ruleId: string | null;
severity: 1 | 2;
message: string;
line: number;
column: number;
}
export interface LintResult {
filePath: string;
messages: LintMessage[];
errorCount: number;
warningCount: number;
output?: string;
source?: string;
}
export declare function formatResults(baseDir: string, results: LintResult[], format: (r: LintResult[]) => string): {
output: string;
outputWithMessages: string;
totalNextPluginErrorCount: number;
totalNextPluginWarningCount: number;
};
export {};

97
node_modules/next/dist/lib/eslint/customFormatter.js generated vendored Normal file
View File

@@ -0,0 +1,97 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
MessageSeverity: null,
formatResults: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
MessageSeverity: function() {
return MessageSeverity;
},
formatResults: function() {
return formatResults;
}
});
const _chalk = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/chalk"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var MessageSeverity;
(function(MessageSeverity) {
MessageSeverity[MessageSeverity["Warning"] = 1] = "Warning";
MessageSeverity[MessageSeverity["Error"] = 2] = "Error";
})(MessageSeverity || (MessageSeverity = {}));
function pluginCount(messages) {
let nextPluginWarningCount = 0;
let nextPluginErrorCount = 0;
for(let i = 0; i < messages.length; i++){
const { severity, ruleId } = messages[i];
if (ruleId == null ? void 0 : ruleId.includes("@next/next")) {
if (severity === 1) {
nextPluginWarningCount += 1;
} else {
nextPluginErrorCount += 1;
}
}
}
return {
nextPluginErrorCount,
nextPluginWarningCount
};
}
function formatMessage(dir, messages, filePath) {
let fileName = _path.default.posix.normalize(_path.default.relative(dir, filePath).replace(/\\/g, "/"));
if (!fileName.startsWith(".")) {
fileName = "./" + fileName;
}
let output = "\n" + _chalk.default.cyan(fileName);
for(let i = 0; i < messages.length; i++){
const { message, severity, line, column, ruleId } = messages[i];
output = output + "\n";
if (line && column) {
output = output + _chalk.default.yellow(line.toString()) + ":" + _chalk.default.yellow(column.toString()) + " ";
}
if (severity === 1) {
output += _chalk.default.yellow.bold("Warning") + ": ";
} else {
output += _chalk.default.red.bold("Error") + ": ";
}
output += message;
if (ruleId) {
output += " " + _chalk.default.gray.bold(ruleId);
}
}
return output;
}
function formatResults(baseDir, results, format) {
let totalNextPluginErrorCount = 0;
let totalNextPluginWarningCount = 0;
let resultsWithMessages = results.filter(({ messages })=>messages == null ? void 0 : messages.length);
// Track number of Next.js plugin errors and warnings
resultsWithMessages.forEach(({ messages })=>{
const res = pluginCount(messages);
totalNextPluginErrorCount += res.nextPluginErrorCount;
totalNextPluginWarningCount += res.nextPluginWarningCount;
});
// Use user defined formatter or Next.js's built-in custom formatter
const output = format ? format(resultsWithMessages) : resultsWithMessages.map(({ messages, filePath })=>formatMessage(baseDir, messages, filePath)).join("\n");
return {
output: output,
outputWithMessages: resultsWithMessages.length > 0 ? output + `\n\n${_chalk.default.cyan("info")} - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules` : "",
totalNextPluginErrorCount,
totalNextPluginWarningCount
};
}
//# sourceMappingURL=customFormatter.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/eslint/customFormatter.ts"],"names":["formatResults","MessageSeverity","Warning","Error","pluginCount","messages","nextPluginWarningCount","nextPluginErrorCount","i","length","severity","ruleId","includes","formatMessage","dir","filePath","fileName","path","posix","normalize","relative","replace","startsWith","output","chalk","cyan","message","line","column","yellow","toString","bold","red","gray","baseDir","results","format","totalNextPluginErrorCount","totalNextPluginWarningCount","resultsWithMessages","filter","forEach","res","map","join","outputWithMessages"],"mappings":";;;;;;;;;;;;;;;;;;IAgGgBA,aAAa;eAAbA;;;8DAhGE;6DACD;;;;;;IAGV;UAAKC,eAAe;IAAfA,gBAAAA,gBACVC,aAAU,KAAVA;IADUD,gBAAAA,gBAEVE,WAAQ,KAARA;GAFUF,oBAAAA;AAsBZ,SAASG,YAAYC,QAAuB;IAI1C,IAAIC,yBAAyB;IAC7B,IAAIC,uBAAuB;IAE3B,IAAK,IAAIC,IAAI,GAAGA,IAAIH,SAASI,MAAM,EAAED,IAAK;QACxC,MAAM,EAAEE,QAAQ,EAAEC,MAAM,EAAE,GAAGN,QAAQ,CAACG,EAAE;QAExC,IAAIG,0BAAAA,OAAQC,QAAQ,CAAC,eAAe;YAClC,IAAIF,aAhCE,GAgCoC;gBACxCJ,0BAA0B;YAC5B,OAAO;gBACLC,wBAAwB;YAC1B;QACF;IACF;IAEA,OAAO;QACLA;QACAD;IACF;AACF;AAEA,SAASO,cACPC,GAAW,EACXT,QAAuB,EACvBU,QAAgB;IAEhB,IAAIC,WAAWC,aAAI,CAACC,KAAK,CAACC,SAAS,CACjCF,aAAI,CAACG,QAAQ,CAACN,KAAKC,UAAUM,OAAO,CAAC,OAAO;IAG9C,IAAI,CAACL,SAASM,UAAU,CAAC,MAAM;QAC7BN,WAAW,OAAOA;IACpB;IAEA,IAAIO,SAAS,OAAOC,cAAK,CAACC,IAAI,CAACT;IAE/B,IAAK,IAAIR,IAAI,GAAGA,IAAIH,SAASI,MAAM,EAAED,IAAK;QACxC,MAAM,EAAEkB,OAAO,EAAEhB,QAAQ,EAAEiB,IAAI,EAAEC,MAAM,EAAEjB,MAAM,EAAE,GAAGN,QAAQ,CAACG,EAAE;QAE/De,SAASA,SAAS;QAElB,IAAII,QAAQC,QAAQ;YAClBL,SACEA,SACAC,cAAK,CAACK,MAAM,CAACF,KAAKG,QAAQ,MAC1B,MACAN,cAAK,CAACK,MAAM,CAACD,OAAOE,QAAQ,MAC5B;QACJ;QAEA,IAAIpB,aA3EI,GA2EkC;YACxCa,UAAUC,cAAK,CAACK,MAAM,CAACE,IAAI,CAAC,aAAa;QAC3C,OAAO;YACLR,UAAUC,cAAK,CAACQ,GAAG,CAACD,IAAI,CAAC,WAAW;QACtC;QAEAR,UAAUG;QAEV,IAAIf,QAAQ;YACVY,UAAU,OAAOC,cAAK,CAACS,IAAI,CAACF,IAAI,CAACpB;QACnC;IACF;IAEA,OAAOY;AACT;AAEO,SAASvB,cACdkC,OAAe,EACfC,OAAqB,EACrBC,MAAmC;IAOnC,IAAIC,4BAA4B;IAChC,IAAIC,8BAA8B;IAClC,IAAIC,sBAAsBJ,QAAQK,MAAM,CAAC,CAAC,EAAEnC,QAAQ,EAAE,GAAKA,4BAAAA,SAAUI,MAAM;IAE3E,qDAAqD;IACrD8B,oBAAoBE,OAAO,CAAC,CAAC,EAAEpC,QAAQ,EAAE;QACvC,MAAMqC,MAAMtC,YAAYC;QACxBgC,6BAA6BK,IAAInC,oBAAoB;QACrD+B,+BAA+BI,IAAIpC,sBAAsB;IAC3D;IAEA,oEAAoE;IACpE,MAAMiB,SAASa,SACXA,OAAOG,uBACPA,oBACGI,GAAG,CAAC,CAAC,EAAEtC,QAAQ,EAAEU,QAAQ,EAAE,GAC1BF,cAAcqB,SAAS7B,UAAUU,WAElC6B,IAAI,CAAC;IAEZ,OAAO;QACLrB,QAAQA;QACRsB,oBACEN,oBAAoB9B,MAAM,GAAG,IACzBc,SACA,CAAC,IAAI,EAAEC,cAAK,CAACC,IAAI,CACf,QACA,qHAAqH,CAAC,GACxH;QACNY;QACAC;IACF;AACF"}

View File

@@ -0,0 +1,9 @@
export type ConfigAvailable = {
exists: boolean;
emptyEslintrc?: boolean;
emptyPkgJsonConfig?: boolean;
firstTimeSetup?: true;
};
export declare function hasEslintConfiguration(eslintrcFile: string | null, packageJsonConfig: {
eslintConfig: any;
} | null): Promise<ConfigAvailable>;

View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "hasEslintConfiguration", {
enumerable: true,
get: function() {
return hasEslintConfiguration;
}
});
const _fs = require("fs");
async function hasEslintConfiguration(eslintrcFile, packageJsonConfig) {
const configObject = {
exists: false,
emptyEslintrc: false,
emptyPkgJsonConfig: false
};
if (eslintrcFile) {
const content = await _fs.promises.readFile(eslintrcFile, {
encoding: "utf8"
}).then((txt)=>txt.trim().replace(/\n/g, ""), ()=>null);
if (content === "" || content === "{}" || content === "---" || content === "module.exports = {}") {
configObject.emptyEslintrc = true;
} else {
configObject.exists = true;
}
} else if (packageJsonConfig == null ? void 0 : packageJsonConfig.eslintConfig) {
if (Object.keys(packageJsonConfig.eslintConfig).length) {
configObject.exists = true;
} else {
configObject.emptyPkgJsonConfig = true;
}
}
return configObject;
}
//# sourceMappingURL=hasEslintConfiguration.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/eslint/hasEslintConfiguration.ts"],"names":["hasEslintConfiguration","eslintrcFile","packageJsonConfig","configObject","exists","emptyEslintrc","emptyPkgJsonConfig","content","fs","readFile","encoding","then","txt","trim","replace","eslintConfig","Object","keys","length"],"mappings":";;;;+BASsBA;;;eAAAA;;;oBATS;AASxB,eAAeA,uBACpBC,YAA2B,EAC3BC,iBAA+C;IAE/C,MAAMC,eAAe;QACnBC,QAAQ;QACRC,eAAe;QACfC,oBAAoB;IACtB;IAEA,IAAIL,cAAc;QAChB,MAAMM,UAAU,MAAMC,YAAE,CAACC,QAAQ,CAACR,cAAc;YAAES,UAAU;QAAO,GAAGC,IAAI,CACxE,CAACC,MAAQA,IAAIC,IAAI,GAAGC,OAAO,CAAC,OAAO,KACnC,IAAM;QAGR,IACEP,YAAY,MACZA,YAAY,QACZA,YAAY,SACZA,YAAY,uBACZ;YACAJ,aAAaE,aAAa,GAAG;QAC/B,OAAO;YACLF,aAAaC,MAAM,GAAG;QACxB;IACF,OAAO,IAAIF,qCAAAA,kBAAmBa,YAAY,EAAE;QAC1C,IAAIC,OAAOC,IAAI,CAACf,kBAAkBa,YAAY,EAAEG,MAAM,EAAE;YACtDf,aAAaC,MAAM,GAAG;QACxB,OAAO;YACLD,aAAaG,kBAAkB,GAAG;QACpC;IACF;IACA,OAAOH;AACT"}

23
node_modules/next/dist/lib/eslint/runLintCheck.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
import { EventLintCheckCompleted } from '../../telemetry/events/build';
declare function lint(baseDir: string, lintDirs: string[], eslintrcFile: string | null, pkgJsonPath: string | null, { lintDuringBuild, eslintOptions, reportErrorsOnly, maxWarnings, formatter, outputFile, }: {
lintDuringBuild: boolean;
eslintOptions: any;
reportErrorsOnly: boolean;
maxWarnings: number;
formatter: string | null;
outputFile: string | null;
}): Promise<string | null | {
output: string | null;
isError: boolean;
eventInfo: EventLintCheckCompleted;
}>;
export declare function runLintCheck(baseDir: string, lintDirs: string[], opts: {
lintDuringBuild?: boolean;
eslintOptions?: any;
reportErrorsOnly?: boolean;
maxWarnings?: number;
formatter?: string | null;
outputFile?: string | null;
strict?: boolean;
}): ReturnType<typeof lint>;
export {};

301
node_modules/next/dist/lib/eslint/runLintCheck.js generated vendored Normal file
View File

@@ -0,0 +1,301 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "runLintCheck", {
enumerable: true,
get: function() {
return runLintCheck;
}
});
const _fs = require("fs");
const _chalk = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/chalk"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));
const _semver = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/semver"));
const _commentjson = /*#__PURE__*/ _interop_require_wildcard(require("next/dist/compiled/comment-json"));
const _customFormatter = require("./customFormatter");
const _writeDefaultConfig = require("./writeDefaultConfig");
const _hasEslintConfiguration = require("./hasEslintConfiguration");
const _writeOutputFile = require("./writeOutputFile");
const _constants = require("../constants");
const _findpagesdir = require("../find-pages-dir");
const _installdependencies = require("../install-dependencies");
const _hasnecessarydependencies = require("../has-necessary-dependencies");
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../build/output/log"));
const _iserror = /*#__PURE__*/ _interop_require_wildcard(require("../is-error"));
const _getpkgmanager = require("../helpers/get-pkg-manager");
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 = {};
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;
}
// 0 is off, 1 is warn, 2 is error. See https://eslint.org/docs/user-guide/configuring/rules#configuring-rules
const VALID_SEVERITY = [
"off",
"warn",
"error"
];
function isValidSeverity(severity) {
return VALID_SEVERITY.includes(severity);
}
const requiredPackages = [
{
file: "eslint",
pkg: "eslint",
exportsRestrict: false
},
{
file: "eslint-config-next",
pkg: "eslint-config-next",
exportsRestrict: false
}
];
async function cliPrompt() {
console.log(_chalk.default.bold(`${_chalk.default.cyan("?")} How would you like to configure ESLint? https://nextjs.org/docs/basic-features/eslint`));
try {
const cliSelect = (await Promise.resolve(require("next/dist/compiled/cli-select"))).default;
const { value } = await cliSelect({
values: _constants.ESLINT_PROMPT_VALUES,
valueRenderer: ({ title, recommended }, selected)=>{
const name = selected ? _chalk.default.bold.underline.cyan(title) : title;
return name + (recommended ? _chalk.default.bold.yellow(" (recommended)") : "");
},
selected: _chalk.default.cyan(" "),
unselected: " "
});
return {
config: (value == null ? void 0 : value.config) ?? null
};
} catch {
return {
config: null
};
}
}
async function lint(baseDir, lintDirs, eslintrcFile, pkgJsonPath, { lintDuringBuild = false, eslintOptions = null, reportErrorsOnly = false, maxWarnings = -1, formatter = null, outputFile = null }) {
try {
var _mod_CLIEngine, _ESLint_getErrorResults;
// Load ESLint after we're sure it exists:
const deps = await (0, _hasnecessarydependencies.hasNecessaryDependencies)(baseDir, requiredPackages);
const packageManager = (0, _getpkgmanager.getPkgManager)(baseDir);
if (deps.missing.some((dep)=>dep.pkg === "eslint")) {
_log.error(`ESLint must be installed${lintDuringBuild ? " in order to run during builds:" : ":"} ${_chalk.default.bold.cyan((packageManager === "yarn" ? "yarn add --dev" : packageManager === "pnpm" ? "pnpm install --save-dev" : "npm install --save-dev") + " eslint")}`);
return null;
}
const mod = await Promise.resolve(require(deps.resolved.get("eslint")));
const { ESLint } = mod;
let eslintVersion = (ESLint == null ? void 0 : ESLint.version) ?? ((_mod_CLIEngine = mod.CLIEngine) == null ? void 0 : _mod_CLIEngine.version);
if (!eslintVersion || _semver.default.lt(eslintVersion, "7.0.0")) {
return `${_chalk.default.red("error")} - Your project has an older version of ESLint installed${eslintVersion ? " (" + eslintVersion + ")" : ""}. Please upgrade to ESLint version 7 or above`;
}
let options = {
useEslintrc: true,
baseConfig: {},
errorOnUnmatchedPattern: false,
extensions: [
".js",
".jsx",
".ts",
".tsx"
],
cache: true,
...eslintOptions
};
let eslint = new ESLint(options);
let nextEslintPluginIsEnabled = false;
const nextRulesEnabled = new Map();
for (const configFile of [
eslintrcFile,
pkgJsonPath
]){
var _completeConfig_plugins;
if (!configFile) continue;
const completeConfig = await eslint.calculateConfigForFile(configFile);
if ((_completeConfig_plugins = completeConfig.plugins) == null ? void 0 : _completeConfig_plugins.includes("@next/next")) {
nextEslintPluginIsEnabled = true;
for (const [name, [severity]] of Object.entries(completeConfig.rules)){
if (!name.startsWith("@next/next/")) {
continue;
}
if (typeof severity === "number" && severity >= 0 && severity < VALID_SEVERITY.length) {
nextRulesEnabled.set(name, VALID_SEVERITY[severity]);
} else if (typeof severity === "string" && isValidSeverity(severity)) {
nextRulesEnabled.set(name, severity);
}
}
break;
}
}
const pagesDir = (0, _findpagesdir.findPagesDir)(baseDir).pagesDir;
const pagesDirRules = pagesDir ? [
"@next/next/no-html-link-for-pages"
] : [];
if (nextEslintPluginIsEnabled) {
let updatedPagesDir = false;
for (const rule of pagesDirRules){
var _options_baseConfig_rules, _options_baseConfig_rules1;
if (!((_options_baseConfig_rules = options.baseConfig.rules) == null ? void 0 : _options_baseConfig_rules[rule]) && !((_options_baseConfig_rules1 = options.baseConfig.rules) == null ? void 0 : _options_baseConfig_rules1[rule.replace("@next/next", "@next/babel-plugin-next")])) {
if (!options.baseConfig.rules) {
options.baseConfig.rules = {};
}
options.baseConfig.rules[rule] = [
1,
pagesDir
];
updatedPagesDir = true;
}
}
if (updatedPagesDir) {
eslint = new ESLint(options);
}
} else {
_log.warn("");
_log.warn("The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/basic-features/eslint#migrating-existing-config");
}
const lintStart = process.hrtime();
let results = await eslint.lintFiles(lintDirs);
let selectedFormatter = null;
if (options.fix) await ESLint.outputFixes(results);
if (reportErrorsOnly) results = await ESLint.getErrorResults(results) // Only return errors if --quiet flag is used
;
if (formatter) selectedFormatter = await eslint.loadFormatter(formatter);
const formattedResult = (0, _customFormatter.formatResults)(baseDir, results, selectedFormatter == null ? void 0 : selectedFormatter.format);
const lintEnd = process.hrtime(lintStart);
const totalWarnings = results.reduce((sum, file)=>sum + file.warningCount, 0);
if (outputFile) await (0, _writeOutputFile.writeOutputFile)(outputFile, formattedResult.output);
return {
output: formattedResult.outputWithMessages,
isError: ((_ESLint_getErrorResults = ESLint.getErrorResults(results)) == null ? void 0 : _ESLint_getErrorResults.length) > 0 || maxWarnings >= 0 && totalWarnings > maxWarnings,
eventInfo: {
durationInSeconds: lintEnd[0],
eslintVersion: eslintVersion,
lintedFilesCount: results.length,
lintFix: !!options.fix,
nextEslintPluginVersion: nextEslintPluginIsEnabled && deps.resolved.has("eslint-config-next") ? require(_path.default.join(_path.default.dirname(deps.resolved.get("eslint-config-next")), "package.json")).version : null,
nextEslintPluginErrorsCount: formattedResult.totalNextPluginErrorCount,
nextEslintPluginWarningsCount: formattedResult.totalNextPluginWarningCount,
nextRulesEnabled: Object.fromEntries(nextRulesEnabled)
}
};
} catch (err) {
if (lintDuringBuild) {
_log.error(`ESLint: ${(0, _iserror.default)(err) && err.message ? err.message.replace(/\n/g, " ") : err}`);
return null;
} else {
throw (0, _iserror.getProperError)(err);
}
}
}
async function runLintCheck(baseDir, lintDirs, opts) {
const { lintDuringBuild = false, eslintOptions = null, reportErrorsOnly = false, maxWarnings = -1, formatter = null, outputFile = null, strict = false } = opts;
try {
// Find user's .eslintrc file
// See: https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-file-formats
const eslintrcFile = await (0, _findup.default)([
".eslintrc.js",
".eslintrc.cjs",
".eslintrc.yaml",
".eslintrc.yml",
".eslintrc.json",
".eslintrc"
], {
cwd: baseDir
}) ?? null;
const pkgJsonPath = await (0, _findup.default)("package.json", {
cwd: baseDir
}) ?? null;
let packageJsonConfig = null;
if (pkgJsonPath) {
const pkgJsonContent = await _fs.promises.readFile(pkgJsonPath, {
encoding: "utf8"
});
packageJsonConfig = _commentjson.parse(pkgJsonContent);
}
const config = await (0, _hasEslintConfiguration.hasEslintConfiguration)(eslintrcFile, packageJsonConfig);
let deps;
if (config.exists) {
// Run if ESLint config exists
return await lint(baseDir, lintDirs, eslintrcFile, pkgJsonPath, {
lintDuringBuild,
eslintOptions,
reportErrorsOnly,
maxWarnings,
formatter,
outputFile
});
} else {
// Display warning if no ESLint configuration is present inside
// config file during "next build", no warning is shown when
// no eslintrc file is present
if (lintDuringBuild) {
if (config.emptyPkgJsonConfig || config.emptyEslintrc) {
_log.warn(`No ESLint configuration detected. Run ${_chalk.default.bold.cyan("next lint")} to begin setup`);
}
return null;
} else {
// Ask user what config they would like to start with for first time "next lint" setup
const { config: selectedConfig } = strict ? _constants.ESLINT_PROMPT_VALUES.find((opt)=>opt.title === "Strict") : await cliPrompt();
if (selectedConfig == null) {
// Show a warning if no option is selected in prompt
_log.warn("If you set up ESLint yourself, we recommend adding the Next.js ESLint plugin. See https://nextjs.org/docs/basic-features/eslint#migrating-existing-config");
return null;
} else {
// Check if necessary deps installed, and install any that are missing
deps = await (0, _hasnecessarydependencies.hasNecessaryDependencies)(baseDir, requiredPackages);
if (deps.missing.length > 0) await (0, _installdependencies.installDependencies)(baseDir, deps.missing, true);
// Write default ESLint config.
// Check for /pages and src/pages is to make sure this happens in Next.js folder
if ((0, _findpagesdir.existsSync)(_path.default.join(baseDir, "pages")) || (0, _findpagesdir.existsSync)(_path.default.join(baseDir, "src/pages"))) {
await (0, _writeDefaultConfig.writeDefaultConfig)(baseDir, config, selectedConfig, eslintrcFile, pkgJsonPath, packageJsonConfig);
}
}
_log.ready(`ESLint has successfully been configured. Run ${_chalk.default.bold.cyan("next lint")} again to view warnings and errors.`);
return null;
}
}
} catch (err) {
throw err;
}
}
//# sourceMappingURL=runLintCheck.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
import { ConfigAvailable } from './hasEslintConfiguration';
export declare function writeDefaultConfig(baseDir: string, { exists, emptyEslintrc, emptyPkgJsonConfig }: ConfigAvailable, selectedConfig: any, eslintrcFile: string | null, pkgJsonPath: string | null, packageJsonConfig: {
eslintConfig: any;
} | null): Promise<void>;

View File

@@ -0,0 +1,85 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "writeDefaultConfig", {
enumerable: true,
get: function() {
return writeDefaultConfig;
}
});
const _fs = require("fs");
const _chalk = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/chalk"));
const _os = /*#__PURE__*/ _interop_require_default(require("os"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _commentjson = /*#__PURE__*/ _interop_require_wildcard(require("next/dist/compiled/comment-json"));
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../build/output/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 = {};
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;
}
async function writeDefaultConfig(baseDir, { exists, emptyEslintrc, emptyPkgJsonConfig }, selectedConfig, eslintrcFile, pkgJsonPath, packageJsonConfig) {
if (!exists && emptyEslintrc && eslintrcFile) {
const ext = _path.default.extname(eslintrcFile);
let newFileContent;
if (ext === ".yaml" || ext === ".yml") {
newFileContent = "extends: 'next'";
} else {
newFileContent = _commentjson.stringify(selectedConfig, null, 2);
if (ext === ".js") {
newFileContent = "module.exports = " + newFileContent;
}
}
await _fs.promises.writeFile(eslintrcFile, newFileContent + _os.default.EOL);
_log.info(`We detected an empty ESLint configuration file (${_chalk.default.bold(_path.default.basename(eslintrcFile))}) and updated it for you!`);
} else if (!exists && emptyPkgJsonConfig && packageJsonConfig) {
packageJsonConfig.eslintConfig = selectedConfig;
if (pkgJsonPath) await _fs.promises.writeFile(pkgJsonPath, _commentjson.stringify(packageJsonConfig, null, 2) + _os.default.EOL);
_log.info(`We detected an empty ${_chalk.default.bold("eslintConfig")} field in package.json and updated it for you!`);
} else if (!exists) {
await _fs.promises.writeFile(_path.default.join(baseDir, ".eslintrc.json"), _commentjson.stringify(selectedConfig, null, 2) + _os.default.EOL);
console.log(_chalk.default.green(`We created the ${_chalk.default.bold(".eslintrc.json")} file for you and included your selected configuration.`));
}
}
//# sourceMappingURL=writeDefaultConfig.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/eslint/writeDefaultConfig.ts"],"names":["writeDefaultConfig","baseDir","exists","emptyEslintrc","emptyPkgJsonConfig","selectedConfig","eslintrcFile","pkgJsonPath","packageJsonConfig","ext","path","extname","newFileContent","CommentJson","stringify","fs","writeFile","os","EOL","Log","info","chalk","bold","basename","eslintConfig","join","console","log","green"],"mappings":";;;;+BASsBA;;;eAAAA;;;oBATS;8DACb;2DACH;6DACE;qEACY;6DAGR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,eAAeA,mBACpBC,OAAe,EACf,EAAEC,MAAM,EAAEC,aAAa,EAAEC,kBAAkB,EAAmB,EAC9DC,cAAmB,EACnBC,YAA2B,EAC3BC,WAA0B,EAC1BC,iBAA+C;IAE/C,IAAI,CAACN,UAAUC,iBAAiBG,cAAc;QAC5C,MAAMG,MAAMC,aAAI,CAACC,OAAO,CAACL;QAEzB,IAAIM;QACJ,IAAIH,QAAQ,WAAWA,QAAQ,QAAQ;YACrCG,iBAAiB;QACnB,OAAO;YACLA,iBAAiBC,aAAYC,SAAS,CAACT,gBAAgB,MAAM;YAE7D,IAAII,QAAQ,OAAO;gBACjBG,iBAAiB,sBAAsBA;YACzC;QACF;QAEA,MAAMG,YAAE,CAACC,SAAS,CAACV,cAAcM,iBAAiBK,WAAE,CAACC,GAAG;QAExDC,KAAIC,IAAI,CACN,CAAC,gDAAgD,EAAEC,cAAK,CAACC,IAAI,CAC3DZ,aAAI,CAACa,QAAQ,CAACjB,eACd,yBAAyB,CAAC;IAEhC,OAAO,IAAI,CAACJ,UAAUE,sBAAsBI,mBAAmB;QAC7DA,kBAAkBgB,YAAY,GAAGnB;QAEjC,IAAIE,aACF,MAAMQ,YAAE,CAACC,SAAS,CAChBT,aACAM,aAAYC,SAAS,CAACN,mBAAmB,MAAM,KAAKS,WAAE,CAACC,GAAG;QAG9DC,KAAIC,IAAI,CACN,CAAC,qBAAqB,EAAEC,cAAK,CAACC,IAAI,CAChC,gBACA,8CAA8C,CAAC;IAErD,OAAO,IAAI,CAACpB,QAAQ;QAClB,MAAMa,YAAE,CAACC,SAAS,CAChBN,aAAI,CAACe,IAAI,CAACxB,SAAS,mBACnBY,aAAYC,SAAS,CAACT,gBAAgB,MAAM,KAAKY,WAAE,CAACC,GAAG;QAGzDQ,QAAQC,GAAG,CACTN,cAAK,CAACO,KAAK,CACT,CAAC,eAAe,EAAEP,cAAK,CAACC,IAAI,CAC1B,kBACA,uDAAuD,CAAC;IAGhE;AACF"}

View File

@@ -0,0 +1,8 @@
/**
* Create a file with eslint output data
*/
export declare function writeOutputFile(
/** The name file that needs to be created */
outputFile: string,
/** The data that needs to be inserted into the file */
outputData: string): Promise<void>;

88
node_modules/next/dist/lib/eslint/writeOutputFile.js generated vendored Normal file
View File

@@ -0,0 +1,88 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "writeOutputFile", {
enumerable: true,
get: function() {
return writeOutputFile;
}
});
const _fs = require("fs");
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../build/output/log"));
const _iserror = /*#__PURE__*/ _interop_require_default(require("../../lib/is-error"));
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 = {};
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;
}
/**
* Check if a given file path is a directory or not.
* Returns `true` if the path is a directory.
*/ function isDirectory(/** The path to a file to check. */ filePath) {
return _fs.promises.stat(filePath).then((stat)=>stat.isDirectory()).catch((error)=>{
if ((0, _iserror.default)(error) && (error.code === "ENOENT" || error.code === "ENOTDIR")) {
return false;
}
throw error;
});
}
async function writeOutputFile(/** The name file that needs to be created */ outputFile, /** The data that needs to be inserted into the file */ outputData) {
const filePath = _path.default.resolve(process.cwd(), outputFile);
if (await isDirectory(filePath)) {
_log.error(`Cannot write to output file path, it is a directory: ${filePath}`);
} else {
try {
await _fs.promises.mkdir(_path.default.dirname(filePath), {
recursive: true
});
await _fs.promises.writeFile(filePath, outputData);
_log.info(`The output file has been created: ${filePath}`);
} catch (err) {
_log.error(`There was a problem writing the output file: ${filePath}`);
console.error(err);
}
}
}
//# sourceMappingURL=writeOutputFile.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/eslint/writeOutputFile.ts"],"names":["writeOutputFile","isDirectory","filePath","fs","stat","then","catch","error","isError","code","outputFile","outputData","path","resolve","process","cwd","Log","mkdir","dirname","recursive","writeFile","info","err","console"],"mappings":";;;;+BA6BsBA;;;eAAAA;;;oBA7BS;6DACd;6DACI;gEACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpB;;;CAGC,GACD,SAASC,YACP,kCAAkC,GAClCC,QAAgB;IAEhB,OAAOC,YAAE,CACNC,IAAI,CAACF,UACLG,IAAI,CAAC,CAACD,OAASA,KAAKH,WAAW,IAC/BK,KAAK,CAAC,CAACC;QACN,IACEC,IAAAA,gBAAO,EAACD,UACPA,CAAAA,MAAME,IAAI,KAAK,YAAYF,MAAME,IAAI,KAAK,SAAQ,GACnD;YACA,OAAO;QACT;QACA,MAAMF;IACR;AACJ;AAIO,eAAeP,gBACpB,2CAA2C,GAC3CU,UAAkB,EAClB,qDAAqD,GACrDC,UAAkB;IAElB,MAAMT,WAAWU,aAAI,CAACC,OAAO,CAACC,QAAQC,GAAG,IAAIL;IAE7C,IAAI,MAAMT,YAAYC,WAAW;QAC/Bc,KAAIT,KAAK,CACP,CAAC,qDAAqD,EAAEL,SAAS,CAAC;IAEtE,OAAO;QACL,IAAI;YACF,MAAMC,YAAE,CAACc,KAAK,CAACL,aAAI,CAACM,OAAO,CAAChB,WAAW;gBAAEiB,WAAW;YAAK;YACzD,MAAMhB,YAAE,CAACiB,SAAS,CAAClB,UAAUS;YAC7BK,KAAIK,IAAI,CAAC,CAAC,kCAAkC,EAAEnB,SAAS,CAAC;QAC1D,EAAE,OAAOoB,KAAK;YACZN,KAAIT,KAAK,CAAC,CAAC,6CAA6C,EAAEL,SAAS,CAAC;YACpEqB,QAAQhB,KAAK,CAACe;QAChB;IACF;AACF"}

2
node_modules/next/dist/lib/fatal-error.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare class FatalError extends Error {
}

14
node_modules/next/dist/lib/fatal-error.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "FatalError", {
enumerable: true,
get: function() {
return FatalError;
}
});
class FatalError extends Error {
}
//# sourceMappingURL=fatal-error.js.map

1
node_modules/next/dist/lib/fatal-error.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/fatal-error.ts"],"names":["FatalError","Error"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,mBAAmBC;AAAO"}

5
node_modules/next/dist/lib/file-exists.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export declare enum FileType {
File = "file",
Directory = "directory"
}
export declare function fileExists(fileName: string, type?: FileType): Promise<boolean>;

55
node_modules/next/dist/lib/file-exists.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
FileType: null,
fileExists: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
FileType: function() {
return FileType;
},
fileExists: function() {
return fileExists;
}
});
const _fs = require("fs");
const _iserror = /*#__PURE__*/ _interop_require_default(require("./is-error"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var FileType;
(function(FileType) {
FileType["File"] = "file";
FileType["Directory"] = "directory";
})(FileType || (FileType = {}));
async function fileExists(fileName, type) {
try {
if (type === "file") {
const stats = await _fs.promises.stat(fileName);
return stats.isFile();
} else if (type === "directory") {
const stats = await _fs.promises.stat(fileName);
return stats.isDirectory();
} else {
await _fs.promises.access(fileName, _fs.constants.F_OK);
}
return true;
} catch (err) {
if ((0, _iserror.default)(err) && (err.code === "ENOENT" || err.code === "ENAMETOOLONG")) {
return false;
}
throw err;
}
}
//# sourceMappingURL=file-exists.js.map

1
node_modules/next/dist/lib/file-exists.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/file-exists.ts"],"names":["fileExists","FileType","File","Directory","fileName","type","stats","promises","stat","isFile","isDirectory","access","constants","F_OK","err","isError","code"],"mappings":";;;;;;;;;;;;;;;;;;IAQsBA,UAAU;eAAVA;;;oBARc;gEAChB;;;;;;IAEb;UAAKC,QAAQ;IAARA,SACVC,UAAO;IADGD,SAEVE,eAAY;GAFFF,aAAAA;AAKL,eAAeD,WACpBI,QAAgB,EAChBC,IAAe;IAEf,IAAI;QACF,IAAIA,SATC,QASuB;YAC1B,MAAMC,QAAQ,MAAMC,YAAQ,CAACC,IAAI,CAACJ;YAClC,OAAOE,MAAMG,MAAM;QACrB,OAAO,IAAIJ,SAXD,aAW8B;YACtC,MAAMC,QAAQ,MAAMC,YAAQ,CAACC,IAAI,CAACJ;YAClC,OAAOE,MAAMI,WAAW;QAC1B,OAAO;YACL,MAAMH,YAAQ,CAACI,MAAM,CAACP,UAAUQ,aAAS,CAACC,IAAI;QAChD;QACA,OAAO;IACT,EAAE,OAAOC,KAAK;QACZ,IACEC,IAAAA,gBAAO,EAACD,QACPA,CAAAA,IAAIE,IAAI,KAAK,YAAYF,IAAIE,IAAI,KAAK,cAAa,GACpD;YACA,OAAO;QACT;QACA,MAAMF;IACR;AACF"}

6
node_modules/next/dist/lib/find-config.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
type RecursivePartial<T> = {
[P in keyof T]?: RecursivePartial<T[P]>;
};
export declare function findConfigPath(dir: string, key: string): Promise<string | undefined>;
export declare function findConfig<T>(directory: string, key: string, _returnFile?: boolean): Promise<RecursivePartial<T> | null>;
export {};

68
node_modules/next/dist/lib/find-config.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
findConfigPath: null,
findConfig: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
findConfigPath: function() {
return findConfigPath;
},
findConfig: function() {
return findConfig;
}
});
const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
const _json5 = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/json5"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function findConfigPath(dir, key) {
// If we didn't find the configuration in `package.json`, we should look for
// known filenames.
return (0, _findup.default)([
`.${key}rc.json`,
`${key}.config.json`,
`.${key}rc.js`,
`${key}.config.js`,
`${key}.config.cjs`
], {
cwd: dir
});
}
async function findConfig(directory, key, _returnFile) {
// `package.json` configuration always wins. Let's check that first.
const packageJsonPath = await (0, _findup.default)("package.json", {
cwd: directory
});
if (packageJsonPath) {
const packageJson = require(packageJsonPath);
if (packageJson[key] != null && typeof packageJson[key] === "object") {
return packageJson[key];
}
}
const filePath = await findConfigPath(directory, key);
if (filePath) {
if (filePath.endsWith(".js") || filePath.endsWith(".cjs")) {
return require(filePath);
}
// We load JSON contents with JSON5 to allow users to comment in their
// configuration file. This pattern was popularized by TypeScript.
const fileContents = _fs.default.readFileSync(filePath, "utf8");
return _json5.default.parse(fileContents);
}
return null;
}
//# sourceMappingURL=find-config.js.map

1
node_modules/next/dist/lib/find-config.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/find-config.ts"],"names":["findConfigPath","findConfig","dir","key","findUp","cwd","directory","_returnFile","packageJsonPath","packageJson","require","filePath","endsWith","fileContents","fs","readFileSync","JSON5","parse"],"mappings":";;;;;;;;;;;;;;;IAQgBA,cAAc;eAAdA;;IAuBMC,UAAU;eAAVA;;;+DA/BH;2DACJ;8DACG;;;;;;AAMX,SAASD,eACdE,GAAW,EACXC,GAAW;IAEX,4EAA4E;IAC5E,mBAAmB;IACnB,OAAOC,IAAAA,eAAM,EACX;QACE,CAAC,CAAC,EAAED,IAAI,OAAO,CAAC;QAChB,CAAC,EAAEA,IAAI,YAAY,CAAC;QACpB,CAAC,CAAC,EAAEA,IAAI,KAAK,CAAC;QACd,CAAC,EAAEA,IAAI,UAAU,CAAC;QAClB,CAAC,EAAEA,IAAI,WAAW,CAAC;KACpB,EACD;QACEE,KAAKH;IACP;AAEJ;AAKO,eAAeD,WACpBK,SAAiB,EACjBH,GAAW,EACXI,WAAqB;IAErB,oEAAoE;IACpE,MAAMC,kBAAkB,MAAMJ,IAAAA,eAAM,EAAC,gBAAgB;QAAEC,KAAKC;IAAU;IACtE,IAAIE,iBAAiB;QACnB,MAAMC,cAAcC,QAAQF;QAC5B,IAAIC,WAAW,CAACN,IAAI,IAAI,QAAQ,OAAOM,WAAW,CAACN,IAAI,KAAK,UAAU;YACpE,OAAOM,WAAW,CAACN,IAAI;QACzB;IACF;IAEA,MAAMQ,WAAW,MAAMX,eAAeM,WAAWH;IAEjD,IAAIQ,UAAU;QACZ,IAAIA,SAASC,QAAQ,CAAC,UAAUD,SAASC,QAAQ,CAAC,SAAS;YACzD,OAAOF,QAAQC;QACjB;QAEA,sEAAsE;QACtE,kEAAkE;QAClE,MAAME,eAAeC,WAAE,CAACC,YAAY,CAACJ,UAAU;QAC/C,OAAOK,cAAK,CAACC,KAAK,CAACJ;IACrB;IAEA,OAAO;AACT"}

6
node_modules/next/dist/lib/find-pages-dir.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export declare const existsSync: (f: string) => boolean;
export declare function findDir(dir: string, name: 'pages' | 'app'): string | null;
export declare function findPagesDir(dir: string): {
pagesDir: string | undefined;
appDir: string | undefined;
};

62
node_modules/next/dist/lib/find-pages-dir.js generated vendored Normal file
View File

@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
existsSync: null,
findDir: null,
findPagesDir: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
existsSync: function() {
return existsSync;
},
findDir: function() {
return findDir;
},
findPagesDir: function() {
return findPagesDir;
}
});
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
const existsSync = (f)=>{
try {
_fs.default.accessSync(f, _fs.default.constants.F_OK);
return true;
} catch (_) {
return false;
}
};
function findDir(dir, name) {
// prioritize ./${name} over ./src/${name}
let curDir = _path.default.join(dir, name);
if (existsSync(curDir)) return curDir;
curDir = _path.default.join(dir, "src", name);
if (existsSync(curDir)) return curDir;
return null;
}
function findPagesDir(dir) {
const pagesDir = findDir(dir, "pages") || undefined;
const appDir = findDir(dir, "app") || undefined;
if (appDir == null && pagesDir == null) {
throw new Error("> Couldn't find any `pages` or `app` directory. Please create one under the project root");
}
return {
pagesDir,
appDir
};
}
//# sourceMappingURL=find-pages-dir.js.map

1
node_modules/next/dist/lib/find-pages-dir.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/find-pages-dir.ts"],"names":["existsSync","findDir","findPagesDir","f","fs","accessSync","constants","F_OK","_","dir","name","curDir","path","join","pagesDir","undefined","appDir","Error"],"mappings":";;;;;;;;;;;;;;;;IAGaA,UAAU;eAAVA;;IASGC,OAAO;eAAPA;;IAWAC,YAAY;eAAZA;;;2DAvBD;6DACE;;;;;;AAEV,MAAMF,aAAa,CAACG;IACzB,IAAI;QACFC,WAAE,CAACC,UAAU,CAACF,GAAGC,WAAE,CAACE,SAAS,CAACC,IAAI;QAClC,OAAO;IACT,EAAE,OAAOC,GAAG;QACV,OAAO;IACT;AACF;AAEO,SAASP,QAAQQ,GAAW,EAAEC,IAAqB;IACxD,0CAA0C;IAC1C,IAAIC,SAASC,aAAI,CAACC,IAAI,CAACJ,KAAKC;IAC5B,IAAIV,WAAWW,SAAS,OAAOA;IAE/BA,SAASC,aAAI,CAACC,IAAI,CAACJ,KAAK,OAAOC;IAC/B,IAAIV,WAAWW,SAAS,OAAOA;IAE/B,OAAO;AACT;AAEO,SAAST,aAAaO,GAAW;IAItC,MAAMK,WAAWb,QAAQQ,KAAK,YAAYM;IAC1C,MAAMC,SAASf,QAAQQ,KAAK,UAAUM;IAEtC,IAAIC,UAAU,QAAQF,YAAY,MAAM;QACtC,MAAM,IAAIG,MACR;IAEJ;IAEA,OAAO;QACLH;QACAE;IACF;AACF"}

2
node_modules/next/dist/lib/find-root.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare function findRootLockFile(cwd: string): string | undefined;
export declare function findRootDir(cwd: string): string | undefined;

44
node_modules/next/dist/lib/find-root.js generated vendored Normal file
View File

@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
findRootLockFile: null,
findRootDir: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
findRootLockFile: function() {
return findRootLockFile;
},
findRootDir: function() {
return findRootDir;
}
});
const _path = require("path");
const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function findRootLockFile(cwd) {
return _findup.default.sync([
"pnpm-lock.yaml",
"package-lock.json",
"yarn.lock"
], {
cwd
});
}
function findRootDir(cwd) {
const lockFile = findRootLockFile(cwd);
return lockFile ? (0, _path.dirname)(lockFile) : undefined;
}
//# sourceMappingURL=find-root.js.map

1
node_modules/next/dist/lib/find-root.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/find-root.ts"],"names":["findRootLockFile","findRootDir","cwd","findUp","sync","lockFile","dirname","undefined"],"mappings":";;;;;;;;;;;;;;;IAGgBA,gBAAgB;eAAhBA;;IAMAC,WAAW;eAAXA;;;sBATQ;+DACL;;;;;;AAEZ,SAASD,iBAAiBE,GAAW;IAC1C,OAAOC,eAAM,CAACC,IAAI,CAAC;QAAC;QAAkB;QAAqB;KAAY,EAAE;QACvEF;IACF;AACF;AAEO,SAASD,YAAYC,GAAW;IACrC,MAAMG,WAAWL,iBAAiBE;IAClC,OAAOG,WAAWC,IAAAA,aAAO,EAACD,YAAYE;AACxC"}

1
node_modules/next/dist/lib/flat-readdir.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function flatReaddir(dir: string, includes: RegExp[]): Promise<string[]>;

34
node_modules/next/dist/lib/flat-readdir.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "flatReaddir", {
enumerable: true,
get: function() {
return flatReaddir;
}
});
const _path = require("path");
const _promises = /*#__PURE__*/ _interop_require_default(require("fs/promises"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
async function flatReaddir(dir, includes) {
const dirents = await _promises.default.opendir(dir);
const result = [];
for await (const part of dirents){
let shouldOmit = part.isDirectory() || !includes.some((include)=>include.test(part.name));
if (part.isSymbolicLink()) {
const stats = await _promises.default.stat((0, _path.join)(dir, part.name));
shouldOmit = stats.isDirectory();
}
if (!shouldOmit) {
result.push((0, _path.join)(dir, part.name));
}
}
return result;
}
//# sourceMappingURL=flat-readdir.js.map

1
node_modules/next/dist/lib/flat-readdir.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/flat-readdir.ts"],"names":["flatReaddir","dir","includes","dirents","fs","opendir","result","part","shouldOmit","isDirectory","some","include","test","name","isSymbolicLink","stats","stat","join","push"],"mappings":";;;;+BAGsBA;;;eAAAA;;;sBAHD;iEACN;;;;;;AAER,eAAeA,YAAYC,GAAW,EAAEC,QAAkB;IAC/D,MAAMC,UAAU,MAAMC,iBAAE,CAACC,OAAO,CAACJ;IACjC,MAAMK,SAAS,EAAE;IAEjB,WAAW,MAAMC,QAAQJ,QAAS;QAChC,IAAIK,aACFD,KAAKE,WAAW,MAAM,CAACP,SAASQ,IAAI,CAAC,CAACC,UAAYA,QAAQC,IAAI,CAACL,KAAKM,IAAI;QAE1E,IAAIN,KAAKO,cAAc,IAAI;YACzB,MAAMC,QAAQ,MAAMX,iBAAE,CAACY,IAAI,CAACC,IAAAA,UAAI,EAAChB,KAAKM,KAAKM,IAAI;YAC/CL,aAAaO,MAAMN,WAAW;QAChC;QAEA,IAAI,CAACD,YAAY;YACfF,OAAOY,IAAI,CAACD,IAAAA,UAAI,EAAChB,KAAKM,KAAKM,IAAI;QACjC;IACF;IAEA,OAAOP;AACT"}

1
node_modules/next/dist/lib/format-server-error.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function formatServerError(error: Error): void;

57
node_modules/next/dist/lib/format-server-error.js generated vendored Normal file
View File

@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "formatServerError", {
enumerable: true,
get: function() {
return formatServerError;
}
});
const invalidServerComponentReactHooks = [
"useDeferredValue",
"useEffect",
"useImperativeHandle",
"useInsertionEffect",
"useLayoutEffect",
"useReducer",
"useRef",
"useState",
"useSyncExternalStore",
"useTransition",
"experimental_useOptimistic",
"useOptimistic"
];
function setMessage(error, message) {
error.message = message;
if (error.stack) {
const lines = error.stack.split("\n");
lines[0] = message;
error.stack = lines.join("\n");
}
}
function formatServerError(error) {
if (typeof (error == null ? void 0 : error.message) !== "string") return;
if (error.message.includes("Class extends value undefined is not a constructor or null")) {
const addedMessage = "This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component";
// If this error instance already has the message, don't add it again
if (error.message.includes(addedMessage)) return;
setMessage(error, `${error.message}
${addedMessage}`);
return;
}
if (error.message.includes("createContext is not a function")) {
setMessage(error, 'createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component');
return;
}
for (const clientHook of invalidServerComponentReactHooks){
const regex = new RegExp(`\\b${clientHook}\\b.*is not a function`);
if (regex.test(error.message)) {
setMessage(error, `${clientHook} only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component`);
return;
}
}
}
//# sourceMappingURL=format-server-error.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/format-server-error.ts"],"names":["formatServerError","invalidServerComponentReactHooks","setMessage","error","message","stack","lines","split","join","includes","addedMessage","clientHook","regex","RegExp","test"],"mappings":";;;;+BAwBgBA;;;eAAAA;;;AAxBhB,MAAMC,mCAAmC;IACvC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,SAASC,WAAWC,KAAY,EAAEC,OAAe;IAC/CD,MAAMC,OAAO,GAAGA;IAChB,IAAID,MAAME,KAAK,EAAE;QACf,MAAMC,QAAQH,MAAME,KAAK,CAACE,KAAK,CAAC;QAChCD,KAAK,CAAC,EAAE,GAAGF;QACXD,MAAME,KAAK,GAAGC,MAAME,IAAI,CAAC;IAC3B;AACF;AAEO,SAASR,kBAAkBG,KAAY;IAC5C,IAAI,QAAOA,yBAAAA,MAAOC,OAAO,MAAK,UAAU;IAExC,IACED,MAAMC,OAAO,CAACK,QAAQ,CACpB,+DAEF;QACA,MAAMC,eACJ;QAEF,qEAAqE;QACrE,IAAIP,MAAMC,OAAO,CAACK,QAAQ,CAACC,eAAe;QAE1CR,WACEC,OACA,CAAC,EAAEA,MAAMC,OAAO,CAAC;;AAEvB,EAAEM,aAAa,CAAC;QAEZ;IACF;IAEA,IAAIP,MAAMC,OAAO,CAACK,QAAQ,CAAC,oCAAoC;QAC7DP,WACEC,OACA;QAEF;IACF;IAEA,KAAK,MAAMQ,cAAcV,iCAAkC;QACzD,MAAMW,QAAQ,IAAIC,OAAO,CAAC,GAAG,EAAEF,WAAW,sBAAsB,CAAC;QACjE,IAAIC,MAAME,IAAI,CAACX,MAAMC,OAAO,GAAG;YAC7BF,WACEC,OACA,CAAC,EAAEQ,WAAW,oLAAoL,CAAC;YAErM;QACF;IACF;AACF"}

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,2 @@
import { Rewrite } from './load-custom-routes';
export declare function generateInterceptionRoutesRewrites(appPaths: string[]): Rewrite[];

View File

@@ -0,0 +1,71 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "generateInterceptionRoutesRewrites", {
enumerable: true,
get: function() {
return generateInterceptionRoutesRewrites;
}
});
const _pathtoregexp = require("next/dist/compiled/path-to-regexp");
const _approuterheaders = require("../client/components/app-router-headers");
const _interceptionroutes = require("../server/future/helpers/interception-routes");
// a function that converts normalised paths (e.g. /foo/[bar]/[baz]) to the format expected by pathToRegexp (e.g. /foo/:bar/:baz)
function toPathToRegexpPath(path) {
return path.replace(/\[\[?([^\]]+)\]\]?/g, (_, capture)=>{
// handle catch-all segments (e.g. /foo/bar/[...baz] or /foo/bar/[[...baz]])
if (capture.startsWith("...")) {
return `:${capture.slice(3)}*`;
}
return ":" + capture;
});
}
// for interception routes we don't have access to the dynamic segments from the
// referrer route so we mark them as noop for the app renderer so that it
// can retrieve them from the router state later on. This also allows us to
// compile the route properly with path-to-regexp, otherwise it will throw
function voidParamsBeforeInterceptionMarker(path) {
let newPath = [];
let foundInterceptionMarker = false;
for (const segment of path.split("/")){
if (_interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((marker)=>segment.startsWith(marker))) {
foundInterceptionMarker = true;
}
if (segment.startsWith(":") && !foundInterceptionMarker) {
newPath.push("__NEXT_EMPTY_PARAM__");
} else {
newPath.push(segment);
}
}
return newPath.join("/");
}
function generateInterceptionRoutesRewrites(appPaths) {
const rewrites = [];
for (const appPath of appPaths){
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(appPath)) {
const { interceptingRoute, interceptedRoute } = (0, _interceptionroutes.extractInterceptionRouteInformation)(appPath);
const normalizedInterceptingRoute = `${interceptingRoute !== "/" ? toPathToRegexpPath(interceptingRoute) : ""}/(.*)?`;
const normalizedInterceptedRoute = toPathToRegexpPath(interceptedRoute);
const normalizedAppPath = voidParamsBeforeInterceptionMarker(toPathToRegexpPath(appPath));
// pathToRegexp returns a regex that matches the path, but we need to
// convert it to a string that can be used in a header value
// to the format that Next/the proxy expects
let interceptingRouteRegex = (0, _pathtoregexp.pathToRegexp)(normalizedInterceptingRoute).toString().slice(2, -3);
rewrites.push({
source: normalizedInterceptedRoute,
destination: normalizedAppPath,
has: [
{
type: "header",
key: _approuterheaders.NEXT_URL,
value: interceptingRouteRegex
}
]
});
}
}
return rewrites;
}
//# sourceMappingURL=generate-interception-routes-rewrites.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/generate-interception-routes-rewrites.ts"],"names":["generateInterceptionRoutesRewrites","toPathToRegexpPath","path","replace","_","capture","startsWith","slice","voidParamsBeforeInterceptionMarker","newPath","foundInterceptionMarker","segment","split","INTERCEPTION_ROUTE_MARKERS","find","marker","push","join","appPaths","rewrites","appPath","isInterceptionRouteAppPath","interceptingRoute","interceptedRoute","extractInterceptionRouteInformation","normalizedInterceptingRoute","normalizedInterceptedRoute","normalizedAppPath","interceptingRouteRegex","pathToRegexp","toString","source","destination","has","type","key","NEXT_URL","value"],"mappings":";;;;+BA6CgBA;;;eAAAA;;;8BA7Ca;kCACJ;oCAKlB;AAGP,iIAAiI;AACjI,SAASC,mBAAmBC,IAAY;IACtC,OAAOA,KAAKC,OAAO,CAAC,uBAAuB,CAACC,GAAGC;QAC7C,4EAA4E;QAC5E,IAAIA,QAAQC,UAAU,CAAC,QAAQ;YAC7B,OAAO,CAAC,CAAC,EAAED,QAAQE,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC;QACA,OAAO,MAAMF;IACf;AACF;AAEA,gFAAgF;AAChF,yEAAyE;AACzE,2EAA2E;AAC3E,0EAA0E;AAC1E,SAASG,mCAAmCN,IAAY;IACtD,IAAIO,UAAU,EAAE;IAEhB,IAAIC,0BAA0B;IAC9B,KAAK,MAAMC,WAAWT,KAAKU,KAAK,CAAC,KAAM;QACrC,IACEC,8CAA0B,CAACC,IAAI,CAAC,CAACC,SAAWJ,QAAQL,UAAU,CAACS,UAC/D;YACAL,0BAA0B;QAC5B;QAEA,IAAIC,QAAQL,UAAU,CAAC,QAAQ,CAACI,yBAAyB;YACvDD,QAAQO,IAAI,CAAC;QACf,OAAO;YACLP,QAAQO,IAAI,CAACL;QACf;IACF;IAEA,OAAOF,QAAQQ,IAAI,CAAC;AACtB;AAEO,SAASjB,mCACdkB,QAAkB;IAElB,MAAMC,WAAsB,EAAE;IAE9B,KAAK,MAAMC,WAAWF,SAAU;QAC9B,IAAIG,IAAAA,8CAA0B,EAACD,UAAU;YACvC,MAAM,EAAEE,iBAAiB,EAAEC,gBAAgB,EAAE,GAC3CC,IAAAA,uDAAmC,EAACJ;YAEtC,MAAMK,8BAA8B,CAAC,EACnCH,sBAAsB,MAAMrB,mBAAmBqB,qBAAqB,GACrE,MAAM,CAAC;YAER,MAAMI,6BAA6BzB,mBAAmBsB;YACtD,MAAMI,oBAAoBnB,mCACxBP,mBAAmBmB;YAGrB,qEAAqE;YACrE,4DAA4D;YAC5D,4CAA4C;YAC5C,IAAIQ,yBAAyBC,IAAAA,0BAAY,EAACJ,6BACvCK,QAAQ,GACRvB,KAAK,CAAC,GAAG,CAAC;YAEbY,SAASH,IAAI,CAAC;gBACZe,QAAQL;gBACRM,aAAaL;gBACbM,KAAK;oBACH;wBACEC,MAAM;wBACNC,KAAKC,0BAAQ;wBACbC,OAAOT;oBACT;iBACD;YACH;QACF;IACF;IAEA,OAAOT;AACT"}

12
node_modules/next/dist/lib/get-package-version.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
type PackageJsonDependencies = {
dependencies: Record<string, string>;
devDependencies: Record<string, string>;
};
export declare function getDependencies({ cwd, }: {
cwd: string;
}): Promise<PackageJsonDependencies>;
export declare function getPackageVersion({ cwd, name, }: {
cwd: string;
name: string;
}): Promise<string | null>;
export {};

116
node_modules/next/dist/lib/get-package-version.js generated vendored Normal file
View File

@@ -0,0 +1,116 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getDependencies: null,
getPackageVersion: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getDependencies: function() {
return getDependencies;
},
getPackageVersion: function() {
return getPackageVersion;
}
});
const _fs = require("fs");
const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));
const _json5 = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/json5"));
const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
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 = {};
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;
}
let cachedDeps;
function getDependencies({ cwd }) {
if (cachedDeps) {
return cachedDeps;
}
return cachedDeps = (async ()=>{
const configurationPath = await (0, _findup.default)("package.json", {
cwd
});
if (!configurationPath) {
return {
dependencies: {},
devDependencies: {}
};
}
const content = await _fs.promises.readFile(configurationPath, "utf-8");
const packageJson = _json5.default.parse(content);
const { dependencies = {}, devDependencies = {} } = packageJson || {};
return {
dependencies,
devDependencies
};
})();
}
async function getPackageVersion({ cwd, name }) {
const { dependencies, devDependencies } = await getDependencies({
cwd
});
if (!(dependencies[name] || devDependencies[name])) {
return null;
}
const cwd2 = cwd.endsWith(_path.posix.sep) || cwd.endsWith(_path.win32.sep) ? cwd : `${cwd}/`;
try {
const targetPath = require.resolve(`${name}/package.json`, {
paths: [
cwd2
]
});
const targetContent = await _fs.promises.readFile(targetPath, "utf-8");
return _json5.default.parse(targetContent).version ?? null;
} catch {
return null;
}
}
//# sourceMappingURL=get-package-version.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/get-package-version.ts"],"names":["getDependencies","getPackageVersion","cachedDeps","cwd","configurationPath","findUp","dependencies","devDependencies","content","fs","readFile","packageJson","JSON5","parse","name","cwd2","endsWith","path","posix","sep","win32","targetPath","require","resolve","paths","targetContent","version"],"mappings":";;;;;;;;;;;;;;;IAYgBA,eAAe;eAAfA;;IAyBMC,iBAAiB;eAAjBA;;;oBArCS;+DACZ;8DACD;8DACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOtB,IAAIC;AAEG,SAASF,gBAAgB,EAC9BG,GAAG,EAGJ;IACC,IAAID,YAAY;QACd,OAAOA;IACT;IAEA,OAAQA,aAAa,AAAC,CAAA;QACpB,MAAME,oBAAwC,MAAMC,IAAAA,eAAM,EAAC,gBAAgB;YACzEF;QACF;QACA,IAAI,CAACC,mBAAmB;YACtB,OAAO;gBAAEE,cAAc,CAAC;gBAAGC,iBAAiB,CAAC;YAAE;QACjD;QAEA,MAAMC,UAAU,MAAMC,YAAE,CAACC,QAAQ,CAACN,mBAAmB;QACrD,MAAMO,cAAmBC,cAAK,CAACC,KAAK,CAACL;QAErC,MAAM,EAAEF,eAAe,CAAC,CAAC,EAAEC,kBAAkB,CAAC,CAAC,EAAE,GAAGI,eAAe,CAAC;QACpE,OAAO;YAAEL;YAAcC;QAAgB;IACzC,CAAA;AACF;AAEO,eAAeN,kBAAkB,EACtCE,GAAG,EACHW,IAAI,EAIL;IACC,MAAM,EAAER,YAAY,EAAEC,eAAe,EAAE,GAAG,MAAMP,gBAAgB;QAAEG;IAAI;IACtE,IAAI,CAAEG,CAAAA,YAAY,CAACQ,KAAK,IAAIP,eAAe,CAACO,KAAK,AAAD,GAAI;QAClD,OAAO;IACT;IAEA,MAAMC,OACJZ,IAAIa,QAAQ,CAACC,MAAKC,KAAK,CAACC,GAAG,KAAKhB,IAAIa,QAAQ,CAACC,MAAKG,KAAK,CAACD,GAAG,IACvDhB,MACA,CAAC,EAAEA,IAAI,CAAC,CAAC;IAEf,IAAI;QACF,MAAMkB,aAAaC,QAAQC,OAAO,CAAC,CAAC,EAAET,KAAK,aAAa,CAAC,EAAE;YACzDU,OAAO;gBAACT;aAAK;QACf;QACA,MAAMU,gBAAgB,MAAMhB,YAAE,CAACC,QAAQ,CAACW,YAAY;QACpD,OAAOT,cAAK,CAACC,KAAK,CAACY,eAAeC,OAAO,IAAI;IAC/C,EAAE,OAAM;QACN,OAAO;IACT;AACF"}

1
node_modules/next/dist/lib/get-project-dir.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function getProjectDir(dir?: string): string;

84
node_modules/next/dist/lib/get-project-dir.js generated vendored Normal file
View File

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getProjectDir", {
enumerable: true,
get: function() {
return getProjectDir;
}
});
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _commands = require("./commands");
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../build/output/log"));
const _detecttypo = require("./detect-typo");
const _realpath = require("./realpath");
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 = {};
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;
}
function getProjectDir(dir) {
try {
const resolvedDir = _path.default.resolve(dir || ".");
const realDir = (0, _realpath.realpathSync)(resolvedDir);
if (resolvedDir !== realDir && resolvedDir.toLowerCase() === realDir.toLowerCase()) {
_log.warn(`Invalid casing detected for project dir, received ${resolvedDir} actual path ${realDir}, see more info here https://nextjs.org/docs/messages/invalid-project-dir-casing`);
}
return realDir;
} catch (err) {
if (err.code === "ENOENT") {
if (typeof dir === "string") {
const detectedTypo = (0, _detecttypo.detectTypo)(dir, Object.keys(_commands.commands));
if (detectedTypo) {
_log.error(`"next ${dir}" does not exist. Did you mean "next ${detectedTypo}"?`);
process.exit(1);
}
}
_log.error(`Invalid project directory provided, no such directory: ${_path.default.resolve(dir || ".")}`);
process.exit(1);
}
throw err;
}
}
//# sourceMappingURL=get-project-dir.js.map

1
node_modules/next/dist/lib/get-project-dir.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/get-project-dir.ts"],"names":["getProjectDir","dir","resolvedDir","path","resolve","realDir","realpathSync","toLowerCase","Log","warn","err","code","detectedTypo","detectTypo","Object","keys","commands","error","process","exit"],"mappings":";;;;+BAMgBA;;;eAAAA;;;6DANC;0BACQ;6DACJ;4BACM;0BACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtB,SAASA,cAAcC,GAAY;IACxC,IAAI;QACF,MAAMC,cAAcC,aAAI,CAACC,OAAO,CAACH,OAAO;QACxC,MAAMI,UAAUC,IAAAA,sBAAY,EAACJ;QAE7B,IACEA,gBAAgBG,WAChBH,YAAYK,WAAW,OAAOF,QAAQE,WAAW,IACjD;YACAC,KAAIC,IAAI,CACN,CAAC,kDAAkD,EAAEP,YAAY,aAAa,EAAEG,QAAQ,gFAAgF,CAAC;QAE7K;QAEA,OAAOA;IACT,EAAE,OAAOK,KAAU;QACjB,IAAIA,IAAIC,IAAI,KAAK,UAAU;YACzB,IAAI,OAAOV,QAAQ,UAAU;gBAC3B,MAAMW,eAAeC,IAAAA,sBAAU,EAACZ,KAAKa,OAAOC,IAAI,CAACC,kBAAQ;gBAEzD,IAAIJ,cAAc;oBAChBJ,KAAIS,KAAK,CACP,CAAC,MAAM,EAAEhB,IAAI,qCAAqC,EAAEW,aAAa,EAAE,CAAC;oBAEtEM,QAAQC,IAAI,CAAC;gBACf;YACF;YAEAX,KAAIS,KAAK,CACP,CAAC,uDAAuD,EAAEd,aAAI,CAACC,OAAO,CACpEH,OAAO,KACP,CAAC;YAELiB,QAAQC,IAAI,CAAC;QACf;QACA,MAAMT;IACR;AACF"}

2
node_modules/next/dist/lib/get-validated-args.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import arg from 'next/dist/compiled/arg/index.js';
export declare function getValidatedArgs(validArgs: arg.Spec, argv?: string[]): arg.Result<arg.Spec>;

34
node_modules/next/dist/lib/get-validated-args.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getValidatedArgs", {
enumerable: true,
get: function() {
return getValidatedArgs;
}
});
const _index = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/arg/index.js"));
const _utils = require("../server/lib/utils");
const _iserror = /*#__PURE__*/ _interop_require_default(require("./is-error"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function getValidatedArgs(validArgs, argv) {
let args;
try {
args = (0, _index.default)(validArgs, {
argv
});
} catch (error) {
if ((0, _iserror.default)(error) && error.code === "ARG_UNKNOWN_OPTION") {
(0, _utils.printAndExit)(error.message, 1);
}
throw error;
}
return args;
}
//# sourceMappingURL=get-validated-args.js.map

1
node_modules/next/dist/lib/get-validated-args.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/get-validated-args.ts"],"names":["getValidatedArgs","validArgs","argv","args","arg","error","isError","code","printAndExit","message"],"mappings":";;;;+BAIgBA;;;eAAAA;;;8DAJA;uBACa;gEACT;;;;;;AAEb,SAASA,iBAAiBC,SAAmB,EAAEC,IAAe;IACnE,IAAIC;IACJ,IAAI;QACFA,OAAOC,IAAAA,cAAG,EAACH,WAAW;YAAEC;QAAK;IAC/B,EAAE,OAAOG,OAAO;QACd,IAAIC,IAAAA,gBAAO,EAACD,UAAUA,MAAME,IAAI,KAAK,sBAAsB;YACzDC,IAAAA,mBAAY,EAACH,MAAMI,OAAO,EAAE;QAC9B;QACA,MAAMJ;IACR;IACA,OAAOF;AACT"}

View File

@@ -0,0 +1,10 @@
export interface MissingDependency {
file: string;
pkg: string;
exportsRestrict: boolean;
}
export type NecessaryDependencies = {
resolved: Map<string, string>;
missing: MissingDependency[];
};
export declare function hasNecessaryDependencies(baseDir: string, requiredPackages: MissingDependency[]): Promise<NecessaryDependencies>;

View File

@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "hasNecessaryDependencies", {
enumerable: true,
get: function() {
return hasNecessaryDependencies;
}
});
const _fs = require("fs");
const _fileexists = require("./file-exists");
const _resolvefrom = require("./resolve-from");
const _path = require("path");
async function hasNecessaryDependencies(baseDir, requiredPackages) {
let resolutions = new Map();
const missingPackages = [];
await Promise.all(requiredPackages.map(async (p)=>{
try {
const pkgPath = await _fs.promises.realpath((0, _resolvefrom.resolveFrom)(baseDir, `${p.pkg}/package.json`));
const pkgDir = (0, _path.dirname)(pkgPath);
if (p.exportsRestrict) {
const fileNameToVerify = (0, _path.relative)(p.pkg, p.file);
if (fileNameToVerify) {
const fileToVerify = (0, _path.join)(pkgDir, fileNameToVerify);
if (await (0, _fileexists.fileExists)(fileToVerify)) {
resolutions.set(p.pkg, fileToVerify);
} else {
return missingPackages.push(p);
}
} else {
resolutions.set(p.pkg, pkgPath);
}
} else {
resolutions.set(p.pkg, (0, _resolvefrom.resolveFrom)(baseDir, p.file));
}
} catch (_) {
return missingPackages.push(p);
}
}));
return {
resolved: resolutions,
missing: missingPackages
};
}
//# sourceMappingURL=has-necessary-dependencies.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/lib/has-necessary-dependencies.ts"],"names":["hasNecessaryDependencies","baseDir","requiredPackages","resolutions","Map","missingPackages","Promise","all","map","p","pkgPath","fs","realpath","resolveFrom","pkg","pkgDir","dirname","exportsRestrict","fileNameToVerify","relative","file","fileToVerify","join","fileExists","set","push","_","resolved","missing"],"mappings":";;;;+BAgBsBA;;;eAAAA;;;oBAhBS;4BACJ;6BACC;sBACY;AAajC,eAAeA,yBACpBC,OAAe,EACfC,gBAAqC;IAErC,IAAIC,cAAc,IAAIC;IACtB,MAAMC,kBAAuC,EAAE;IAE/C,MAAMC,QAAQC,GAAG,CACfL,iBAAiBM,GAAG,CAAC,OAAOC;QAC1B,IAAI;YACF,MAAMC,UAAU,MAAMC,YAAE,CAACC,QAAQ,CAC/BC,IAAAA,wBAAW,EAACZ,SAAS,CAAC,EAAEQ,EAAEK,GAAG,CAAC,aAAa,CAAC;YAE9C,MAAMC,SAASC,IAAAA,aAAO,EAACN;YAEvB,IAAID,EAAEQ,eAAe,EAAE;gBACrB,MAAMC,mBAAmBC,IAAAA,cAAQ,EAACV,EAAEK,GAAG,EAAEL,EAAEW,IAAI;gBAC/C,IAAIF,kBAAkB;oBACpB,MAAMG,eAAeC,IAAAA,UAAI,EAACP,QAAQG;oBAClC,IAAI,MAAMK,IAAAA,sBAAU,EAACF,eAAe;wBAClClB,YAAYqB,GAAG,CAACf,EAAEK,GAAG,EAAEO;oBACzB,OAAO;wBACL,OAAOhB,gBAAgBoB,IAAI,CAAChB;oBAC9B;gBACF,OAAO;oBACLN,YAAYqB,GAAG,CAACf,EAAEK,GAAG,EAAEJ;gBACzB;YACF,OAAO;gBACLP,YAAYqB,GAAG,CAACf,EAAEK,GAAG,EAAED,IAAAA,wBAAW,EAACZ,SAASQ,EAAEW,IAAI;YACpD;QACF,EAAE,OAAOM,GAAG;YACV,OAAOrB,gBAAgBoB,IAAI,CAAChB;QAC9B;IACF;IAGF,OAAO;QACLkB,UAAUxB;QACVyB,SAASvB;IACX;AACF"}

View File

@@ -0,0 +1 @@
export declare function getCacheDirectory(fileDirectory: string, envPath?: string): Promise<string>;

View File

@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getCacheDirectory", {
enumerable: true,
get: function() {
return getCacheDirectory;
}
});
const _os = /*#__PURE__*/ _interop_require_default(require("os"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _fileexists = require("../file-exists");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
async function getCacheDirectory(fileDirectory, envPath) {
let result;
if (envPath) {
result = envPath;
} else {
let systemCacheDirectory;
if (process.platform === "linux") {
systemCacheDirectory = process.env.XDG_CACHE_HOME || _path.default.join(_os.default.homedir(), ".cache");
} else if (process.platform === "darwin") {
systemCacheDirectory = _path.default.join(_os.default.homedir(), "Library", "Caches");
} else if (process.platform === "win32") {
systemCacheDirectory = process.env.LOCALAPPDATA || _path.default.join(_os.default.homedir(), "AppData", "Local");
} else {
/// Attempt to use generic tmp location for un-handled platform
if (!systemCacheDirectory) {
for (const dir of [
_path.default.join(_os.default.homedir(), ".cache"),
_path.default.join(_os.default.tmpdir())
]){
if (await (0, _fileexists.fileExists)(dir)) {
systemCacheDirectory = dir;
break;
}
}
}
if (!systemCacheDirectory) {
console.error(new Error("Unsupported platform: " + process.platform));
process.exit(0);
}
}
result = _path.default.join(systemCacheDirectory, fileDirectory);
}
if (!_path.default.isAbsolute(result)) {
// It is important to resolve to the absolute path:
// - for unzipping to work correctly;
// - so that registry directory matches between installation and execution.
// INIT_CWD points to the root of `npm/yarn install` and is probably what
// the user meant when typing the relative path.
result = _path.default.resolve(process.env["INIT_CWD"] || process.cwd(), result);
}
return result;
}
//# sourceMappingURL=get-cache-directory.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/helpers/get-cache-directory.ts"],"names":["getCacheDirectory","fileDirectory","envPath","result","systemCacheDirectory","process","platform","env","XDG_CACHE_HOME","path","join","os","homedir","LOCALAPPDATA","dir","tmpdir","fileExists","console","error","Error","exit","isAbsolute","resolve","cwd"],"mappings":";;;;+BAMsBA;;;eAAAA;;;2DANP;6DACE;4BACU;;;;;;AAIpB,eAAeA,kBACpBC,aAAqB,EACrBC,OAAgB;IAEhB,IAAIC;IAEJ,IAAID,SAAS;QACXC,SAASD;IACX,OAAO;QACL,IAAIE;QACJ,IAAIC,QAAQC,QAAQ,KAAK,SAAS;YAChCF,uBACEC,QAAQE,GAAG,CAACC,cAAc,IAAIC,aAAI,CAACC,IAAI,CAACC,WAAE,CAACC,OAAO,IAAI;QAC1D,OAAO,IAAIP,QAAQC,QAAQ,KAAK,UAAU;YACxCF,uBAAuBK,aAAI,CAACC,IAAI,CAACC,WAAE,CAACC,OAAO,IAAI,WAAW;QAC5D,OAAO,IAAIP,QAAQC,QAAQ,KAAK,SAAS;YACvCF,uBACEC,QAAQE,GAAG,CAACM,YAAY,IAAIJ,aAAI,CAACC,IAAI,CAACC,WAAE,CAACC,OAAO,IAAI,WAAW;QACnE,OAAO;YACL,+DAA+D;YAC/D,IAAI,CAACR,sBAAsB;gBACzB,KAAK,MAAMU,OAAO;oBAChBL,aAAI,CAACC,IAAI,CAACC,WAAE,CAACC,OAAO,IAAI;oBACxBH,aAAI,CAACC,IAAI,CAACC,WAAE,CAACI,MAAM;iBACpB,CAAE;oBACD,IAAI,MAAMC,IAAAA,sBAAU,EAACF,MAAM;wBACzBV,uBAAuBU;wBACvB;oBACF;gBACF;YACF;YAEA,IAAI,CAACV,sBAAsB;gBACzBa,QAAQC,KAAK,CAAC,IAAIC,MAAM,2BAA2Bd,QAAQC,QAAQ;gBACnED,QAAQe,IAAI,CAAC;YACf;QACF;QACAjB,SAASM,aAAI,CAACC,IAAI,CAACN,sBAAsBH;IAC3C;IAEA,IAAI,CAACQ,aAAI,CAACY,UAAU,CAAClB,SAAS;QAC5B,mDAAmD;QACnD,uCAAuC;QACvC,6EAA6E;QAC7E,yEAAyE;QACzE,gDAAgD;QAChDA,SAASM,aAAI,CAACa,OAAO,CAACjB,QAAQE,GAAG,CAAC,WAAW,IAAIF,QAAQkB,GAAG,IAAIpB;IAClE;IACA,OAAOA;AACT"}

View File

@@ -0,0 +1 @@
export declare function getNpxCommand(baseDir: string): string;

29
node_modules/next/dist/lib/helpers/get-npx-command.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getNpxCommand", {
enumerable: true,
get: function() {
return getNpxCommand;
}
});
const _child_process = require("child_process");
const _getpkgmanager = require("./get-pkg-manager");
function getNpxCommand(baseDir) {
const pkgManager = (0, _getpkgmanager.getPkgManager)(baseDir);
let command = "npx";
if (pkgManager === "pnpm") {
command = "pnpm dlx";
} else if (pkgManager === "yarn") {
try {
(0, _child_process.execSync)("yarn dlx --help", {
stdio: "ignore"
});
command = "yarn dlx";
} catch {}
}
return command;
}
//# sourceMappingURL=get-npx-command.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/helpers/get-npx-command.ts"],"names":["getNpxCommand","baseDir","pkgManager","getPkgManager","command","execSync","stdio"],"mappings":";;;;+BAGgBA;;;eAAAA;;;+BAHS;+BACK;AAEvB,SAASA,cAAcC,OAAe;IAC3C,MAAMC,aAAaC,IAAAA,4BAAa,EAACF;IACjC,IAAIG,UAAU;IACd,IAAIF,eAAe,QAAQ;QACzBE,UAAU;IACZ,OAAO,IAAIF,eAAe,QAAQ;QAChC,IAAI;YACFG,IAAAA,uBAAQ,EAAC,mBAAmB;gBAAEC,OAAO;YAAS;YAC9CF,UAAU;QACZ,EAAE,OAAM,CAAC;IACX;IAEA,OAAOA;AACT"}

1
node_modules/next/dist/lib/helpers/get-online.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function getOnline(): Promise<boolean>;

51
node_modules/next/dist/lib/helpers/get-online.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getOnline", {
enumerable: true,
get: function() {
return getOnline;
}
});
const _child_process = require("child_process");
const _dns = /*#__PURE__*/ _interop_require_default(require("dns"));
const _url = /*#__PURE__*/ _interop_require_default(require("url"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function getProxy() {
if (process.env.https_proxy) {
return process.env.https_proxy;
}
try {
const httpsProxy = (0, _child_process.execSync)("npm config get https-proxy").toString().trim();
return httpsProxy !== "null" ? httpsProxy : undefined;
} catch (e) {
return;
}
}
function getOnline() {
return new Promise((resolve)=>{
_dns.default.lookup("registry.yarnpkg.com", (registryErr)=>{
if (!registryErr) {
return resolve(true);
}
const proxy = getProxy();
if (!proxy) {
return resolve(false);
}
const { hostname } = _url.default.parse(proxy);
if (!hostname) {
return resolve(false);
}
_dns.default.lookup(hostname, (proxyErr)=>{
resolve(proxyErr == null);
});
});
});
}
//# sourceMappingURL=get-online.js.map

1
node_modules/next/dist/lib/helpers/get-online.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/helpers/get-online.ts"],"names":["getOnline","getProxy","process","env","https_proxy","httpsProxy","execSync","toString","trim","undefined","e","Promise","resolve","dns","lookup","registryErr","proxy","hostname","url","parse","proxyErr"],"mappings":";;;;+BAiBgBA;;;eAAAA;;;+BAjBS;4DACT;4DACA;;;;;;AAEhB,SAASC;IACP,IAAIC,QAAQC,GAAG,CAACC,WAAW,EAAE;QAC3B,OAAOF,QAAQC,GAAG,CAACC,WAAW;IAChC;IAEA,IAAI;QACF,MAAMC,aAAaC,IAAAA,uBAAQ,EAAC,8BAA8BC,QAAQ,GAAGC,IAAI;QACzE,OAAOH,eAAe,SAASA,aAAaI;IAC9C,EAAE,OAAOC,GAAG;QACV;IACF;AACF;AAEO,SAASV;IACd,OAAO,IAAIW,QAAQ,CAACC;QAClBC,YAAG,CAACC,MAAM,CAAC,wBAAwB,CAACC;YAClC,IAAI,CAACA,aAAa;gBAChB,OAAOH,QAAQ;YACjB;YAEA,MAAMI,QAAQf;YACd,IAAI,CAACe,OAAO;gBACV,OAAOJ,QAAQ;YACjB;YAEA,MAAM,EAAEK,QAAQ,EAAE,GAAGC,YAAG,CAACC,KAAK,CAACH;YAC/B,IAAI,CAACC,UAAU;gBACb,OAAOL,QAAQ;YACjB;YAEAC,YAAG,CAACC,MAAM,CAACG,UAAU,CAACG;gBACpBR,QAAQQ,YAAY;YACtB;QACF;IACF;AACF"}

View File

@@ -0,0 +1,2 @@
export type PackageManager = 'npm' | 'pnpm' | 'yarn';
export declare function getPkgManager(baseDir: string): PackageManager;

63
node_modules/next/dist/lib/helpers/get-pkg-manager.js generated vendored Normal file
View File

@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getPkgManager", {
enumerable: true,
get: function() {
return getPkgManager;
}
});
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _child_process = require("child_process");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function getPkgManager(baseDir) {
try {
for (const { lockFile, packageManager } of [
{
lockFile: "yarn.lock",
packageManager: "yarn"
},
{
lockFile: "pnpm-lock.yaml",
packageManager: "pnpm"
},
{
lockFile: "package-lock.json",
packageManager: "npm"
}
]){
if (_fs.default.existsSync(_path.default.join(baseDir, lockFile))) {
return packageManager;
}
}
const userAgent = process.env.npm_config_user_agent;
if (userAgent) {
if (userAgent.startsWith("yarn")) {
return "yarn";
} else if (userAgent.startsWith("pnpm")) {
return "pnpm";
}
}
try {
(0, _child_process.execSync)("yarn --version", {
stdio: "ignore"
});
return "yarn";
} catch {
(0, _child_process.execSync)("pnpm --version", {
stdio: "ignore"
});
return "pnpm";
}
} catch {
return "npm";
}
}
//# sourceMappingURL=get-pkg-manager.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/helpers/get-pkg-manager.ts"],"names":["getPkgManager","baseDir","lockFile","packageManager","fs","existsSync","path","join","userAgent","process","env","npm_config_user_agent","startsWith","execSync","stdio"],"mappings":";;;;+BAMgBA;;;eAAAA;;;2DAND;6DACE;+BACQ;;;;;;AAIlB,SAASA,cAAcC,OAAe;IAC3C,IAAI;QACF,KAAK,MAAM,EAAEC,QAAQ,EAAEC,cAAc,EAAE,IAAI;YACzC;gBAAED,UAAU;gBAAaC,gBAAgB;YAAO;YAChD;gBAAED,UAAU;gBAAkBC,gBAAgB;YAAO;YACrD;gBAAED,UAAU;gBAAqBC,gBAAgB;YAAM;SACxD,CAAE;YACD,IAAIC,WAAE,CAACC,UAAU,CAACC,aAAI,CAACC,IAAI,CAACN,SAASC,YAAY;gBAC/C,OAAOC;YACT;QACF;QACA,MAAMK,YAAYC,QAAQC,GAAG,CAACC,qBAAqB;QACnD,IAAIH,WAAW;YACb,IAAIA,UAAUI,UAAU,CAAC,SAAS;gBAChC,OAAO;YACT,OAAO,IAAIJ,UAAUI,UAAU,CAAC,SAAS;gBACvC,OAAO;YACT;QACF;QACA,IAAI;YACFC,IAAAA,uBAAQ,EAAC,kBAAkB;gBAAEC,OAAO;YAAS;YAC7C,OAAO;QACT,EAAE,OAAM;YACND,IAAAA,uBAAQ,EAAC,kBAAkB;gBAAEC,OAAO;YAAS;YAC7C,OAAO;QACT;IACF,EAAE,OAAM;QACN,OAAO;IACT;AACF"}

6
node_modules/next/dist/lib/helpers/get-registry.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
/**
* Returns the package registry using the user's package manager.
* The URL will have a trailing slash.
* @default https://registry.npmjs.org/
*/
export declare function getRegistry(baseDir?: string): string;

26
node_modules/next/dist/lib/helpers/get-registry.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getRegistry", {
enumerable: true,
get: function() {
return getRegistry;
}
});
const _child_process = require("child_process");
const _getpkgmanager = require("./get-pkg-manager");
function getRegistry(baseDir = process.cwd()) {
let registry = `https://registry.npmjs.org/`;
try {
const pkgManager = (0, _getpkgmanager.getPkgManager)(baseDir);
const output = (0, _child_process.execSync)(`${pkgManager} config get registry`).toString().trim();
if (output.startsWith("http")) {
registry = output.endsWith("/") ? output : `${output}/`;
}
} finally{
return registry;
}
}
//# sourceMappingURL=get-registry.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/helpers/get-registry.ts"],"names":["getRegistry","baseDir","process","cwd","registry","pkgManager","getPkgManager","output","execSync","toString","trim","startsWith","endsWith"],"mappings":";;;;+BAQgBA;;;eAAAA;;;+BARS;+BACK;AAOvB,SAASA,YAAYC,UAAkBC,QAAQC,GAAG,EAAE;IACzD,IAAIC,WAAW,CAAC,2BAA2B,CAAC;IAC5C,IAAI;QACF,MAAMC,aAAaC,IAAAA,4BAAa,EAACL;QACjC,MAAMM,SAASC,IAAAA,uBAAQ,EAAC,CAAC,EAAEH,WAAW,oBAAoB,CAAC,EACxDI,QAAQ,GACRC,IAAI;QAEP,IAAIH,OAAOI,UAAU,CAAC,SAAS;YAC7BP,WAAWG,OAAOK,QAAQ,CAAC,OAAOL,SAAS,CAAC,EAAEA,OAAO,CAAC,CAAC;QACzD;IACF,SAAU;QACR,OAAOH;IACT;AACF"}

View File

@@ -0,0 +1,87 @@
/** https://fetch.spec.whatwg.org/#port-blocking */
export declare const KNOWN_RESERVED_PORTS: {
readonly 1: "tcpmux";
readonly 7: "echo";
readonly 9: "discard";
readonly 11: "systat";
readonly 13: "daytime";
readonly 15: "netstat";
readonly 17: "qotd";
readonly 19: "chargen";
readonly 20: "ftp-data";
readonly 21: "ftp";
readonly 22: "ssh";
readonly 23: "telnet";
readonly 25: "smtp";
readonly 37: "time";
readonly 42: "name";
readonly 43: "nicname";
readonly 53: "domain";
readonly 69: "tftp";
readonly 77: "rje";
readonly 79: "finger";
readonly 87: "link";
readonly 95: "supdup";
readonly 101: "hostname";
readonly 102: "iso-tsap";
readonly 103: "gppitnp";
readonly 104: "acr-nema";
readonly 109: "pop2";
readonly 110: "pop3";
readonly 111: "sunrpc";
readonly 113: "auth";
readonly 115: "sftp";
readonly 117: "uucp-path";
readonly 119: "nntp";
readonly 123: "ntp";
readonly 135: "epmap";
readonly 137: "netbios-ns";
readonly 139: "netbios-ssn";
readonly 143: "imap";
readonly 161: "snmp";
readonly 179: "bgp";
readonly 389: "ldap";
readonly 427: "svrloc";
readonly 465: "submissions";
readonly 512: "exec";
readonly 513: "login";
readonly 514: "shell";
readonly 515: "printer";
readonly 526: "tempo";
readonly 530: "courier";
readonly 531: "chat";
readonly 532: "netnews";
readonly 540: "uucp";
readonly 548: "afp";
readonly 554: "rtsp";
readonly 556: "remotefs";
readonly 563: "nntps";
readonly 587: "submission";
readonly 601: "syslog-conn";
readonly 636: "ldaps";
readonly 989: "ftps-data";
readonly 990: "ftps";
readonly 993: "imaps";
readonly 995: "pop3s";
readonly 1719: "h323gatestat";
readonly 1720: "h323hostcall";
readonly 1723: "pptp";
readonly 2049: "nfs";
readonly 3659: "apple-sasl";
readonly 4045: "npp";
readonly 5060: "sip";
readonly 5061: "sips";
readonly 6000: "x11";
readonly 6566: "sane-port";
readonly 6665: "ircu";
readonly 6666: "ircu";
readonly 6667: "ircu";
readonly 6668: "ircu";
readonly 6669: "ircu";
readonly 6697: "ircs-u";
readonly 10080: "amanda";
};
type ReservedPort = keyof typeof KNOWN_RESERVED_PORTS;
export declare function isPortIsReserved(port: number): port is ReservedPort;
export declare function getReservedPortExplanation(port: ReservedPort): string;
export {};

116
node_modules/next/dist/lib/helpers/get-reserved-port.js generated vendored Normal file
View File

@@ -0,0 +1,116 @@
/** https://fetch.spec.whatwg.org/#port-blocking */ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
KNOWN_RESERVED_PORTS: null,
isPortIsReserved: null,
getReservedPortExplanation: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
KNOWN_RESERVED_PORTS: function() {
return KNOWN_RESERVED_PORTS;
},
isPortIsReserved: function() {
return isPortIsReserved;
},
getReservedPortExplanation: function() {
return getReservedPortExplanation;
}
});
const KNOWN_RESERVED_PORTS = {
1: "tcpmux",
7: "echo",
9: "discard",
11: "systat",
13: "daytime",
15: "netstat",
17: "qotd",
19: "chargen",
20: "ftp-data",
21: "ftp",
22: "ssh",
23: "telnet",
25: "smtp",
37: "time",
42: "name",
43: "nicname",
53: "domain",
69: "tftp",
77: "rje",
79: "finger",
87: "link",
95: "supdup",
101: "hostname",
102: "iso-tsap",
103: "gppitnp",
104: "acr-nema",
109: "pop2",
110: "pop3",
111: "sunrpc",
113: "auth",
115: "sftp",
117: "uucp-path",
119: "nntp",
123: "ntp",
135: "epmap",
137: "netbios-ns",
139: "netbios-ssn",
143: "imap",
161: "snmp",
179: "bgp",
389: "ldap",
427: "svrloc",
465: "submissions",
512: "exec",
513: "login",
514: "shell",
515: "printer",
526: "tempo",
530: "courier",
531: "chat",
532: "netnews",
540: "uucp",
548: "afp",
554: "rtsp",
556: "remotefs",
563: "nntps",
587: "submission",
601: "syslog-conn",
636: "ldaps",
989: "ftps-data",
990: "ftps",
993: "imaps",
995: "pop3s",
1719: "h323gatestat",
1720: "h323hostcall",
1723: "pptp",
2049: "nfs",
3659: "apple-sasl",
4045: "npp",
5060: "sip",
5061: "sips",
6000: "x11",
6566: "sane-port",
6665: "ircu",
6666: "ircu",
6667: "ircu",
6668: "ircu",
6669: "ircu",
6697: "ircs-u",
10080: "amanda"
};
function isPortIsReserved(port) {
return port in KNOWN_RESERVED_PORTS;
}
function getReservedPortExplanation(port) {
return `Bad port: "${port}" is reserved for ${KNOWN_RESERVED_PORTS[port]}\n` + "Read more: https://nextjs.org/docs/messages/reserved-port";
}
//# sourceMappingURL=get-reserved-port.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/lib/helpers/get-reserved-port.ts"],"names":["KNOWN_RESERVED_PORTS","isPortIsReserved","getReservedPortExplanation","port"],"mappings":"AAAA,iDAAiD;;;;;;;;;;;;;;;;IACpCA,oBAAoB;eAApBA;;IAqFGC,gBAAgB;eAAhBA;;IAIAC,0BAA0B;eAA1BA;;;AAzFT,MAAMF,uBAAuB;IAClC,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;AACT;AAIO,SAASC,iBAAiBE,IAAY;IAC3C,OAAOA,QAAQH;AACjB;AAEO,SAASE,2BAA2BC,IAAkB;IAC3D,OACE,CAAC,WAAW,EAAEA,KAAK,kBAAkB,EAAEH,oBAAoB,CAACG,KAAK,CAAC,EAAE,CAAC,GACrE;AAEJ"}

Some files were not shown because too many files have changed in this diff Show More