constants.js 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.WEBPACK_LAYERS = exports.SERVER_RUNTIME = exports.ESLINT_PROMPT_VALUES = exports.ESLINT_DEFAULT_DIRS = exports.SSG_FALLBACK_EXPORT_ERROR = exports.NON_STANDARD_NODE_ENV = exports.GSSP_COMPONENT_MEMBER_ERROR = exports.UNSTABLE_REVALIDATE_RENAME_ERROR = exports.GSSP_NO_RETURNED_VALUE = exports.GSP_NO_RETURNED_VALUE = exports.SERVER_PROPS_EXPORT_ERROR = exports.STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = exports.SERVER_PROPS_SSG_CONFLICT = exports.SERVER_PROPS_GET_INIT_PROPS_CONFLICT = exports.SSG_GET_INITIAL_PROPS_CONFLICT = exports.PUBLIC_DIR_MIDDLEWARE_CONFLICT = exports.RSC_MOD_REF_PROXY_ALIAS = exports.APP_DIR_ALIAS = exports.ROOT_DIR_ALIAS = exports.DOT_NEXT_ALIAS = exports.PAGES_DIR_ALIAS = exports.MIDDLEWARE_LOCATION_REGEXP = exports.MIDDLEWARE_FILENAME = exports.API_ROUTE = void 0;
  6. const API_ROUTE = /^\/api(?:\/|$)/;
  7. exports.API_ROUTE = API_ROUTE;
  8. const MIDDLEWARE_FILENAME = "middleware";
  9. exports.MIDDLEWARE_FILENAME = MIDDLEWARE_FILENAME;
  10. const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
  11. exports.MIDDLEWARE_LOCATION_REGEXP = MIDDLEWARE_LOCATION_REGEXP;
  12. const PAGES_DIR_ALIAS = "private-next-pages";
  13. exports.PAGES_DIR_ALIAS = PAGES_DIR_ALIAS;
  14. const DOT_NEXT_ALIAS = "private-dot-next";
  15. exports.DOT_NEXT_ALIAS = DOT_NEXT_ALIAS;
  16. const ROOT_DIR_ALIAS = "private-next-root-dir";
  17. exports.ROOT_DIR_ALIAS = ROOT_DIR_ALIAS;
  18. const APP_DIR_ALIAS = "private-next-app-dir";
  19. exports.APP_DIR_ALIAS = APP_DIR_ALIAS;
  20. const RSC_MOD_REF_PROXY_ALIAS = "private-next-rsc-mod-ref-proxy";
  21. exports.RSC_MOD_REF_PROXY_ALIAS = RSC_MOD_REF_PROXY_ALIAS;
  22. 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`;
  23. exports.PUBLIC_DIR_MIDDLEWARE_CONFLICT = PUBLIC_DIR_MIDDLEWARE_CONFLICT;
  24. const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;
  25. exports.SSG_GET_INITIAL_PROPS_CONFLICT = SSG_GET_INITIAL_PROPS_CONFLICT;
  26. const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;
  27. exports.SERVER_PROPS_GET_INIT_PROPS_CONFLICT = SERVER_PROPS_GET_INIT_PROPS_CONFLICT;
  28. const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;
  29. exports.SERVER_PROPS_SSG_CONFLICT = SERVER_PROPS_SSG_CONFLICT;
  30. const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;
  31. exports.STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;
  32. const SERVER_PROPS_EXPORT_ERROR = `pages with \`getServerSideProps\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;
  33. exports.SERVER_PROPS_EXPORT_ERROR = SERVER_PROPS_EXPORT_ERROR;
  34. const GSP_NO_RETURNED_VALUE = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?";
  35. exports.GSP_NO_RETURNED_VALUE = GSP_NO_RETURNED_VALUE;
  36. const GSSP_NO_RETURNED_VALUE = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?";
  37. exports.GSSP_NO_RETURNED_VALUE = GSSP_NO_RETURNED_VALUE;
  38. const UNSTABLE_REVALIDATE_RENAME_ERROR = "The `unstable_revalidate` property is available for general use.\n" + "Please use `revalidate` instead.";
  39. exports.UNSTABLE_REVALIDATE_RENAME_ERROR = UNSTABLE_REVALIDATE_RENAME_ERROR;
  40. 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`;
  41. exports.GSSP_COMPONENT_MEMBER_ERROR = GSSP_COMPONENT_MEMBER_ERROR;
  42. 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`;
  43. exports.NON_STANDARD_NODE_ENV = NON_STANDARD_NODE_ENV;
  44. 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`;
  45. exports.SSG_FALLBACK_EXPORT_ERROR = SSG_FALLBACK_EXPORT_ERROR;
  46. const ESLINT_DEFAULT_DIRS = [
  47. "pages",
  48. "components",
  49. "lib",
  50. "src"
  51. ];
  52. exports.ESLINT_DEFAULT_DIRS = ESLINT_DEFAULT_DIRS;
  53. const ESLINT_PROMPT_VALUES = [
  54. {
  55. title: "Strict",
  56. recommended: true,
  57. config: {
  58. extends: "next/core-web-vitals"
  59. }
  60. },
  61. {
  62. title: "Base",
  63. config: {
  64. extends: "next"
  65. }
  66. },
  67. {
  68. title: "Cancel",
  69. config: null
  70. },
  71. ];
  72. exports.ESLINT_PROMPT_VALUES = ESLINT_PROMPT_VALUES;
  73. const SERVER_RUNTIME = {
  74. edge: "experimental-edge",
  75. nodejs: "nodejs"
  76. };
  77. exports.SERVER_RUNTIME = SERVER_RUNTIME;
  78. const WEBPACK_LAYERS = {
  79. server: "sc_server",
  80. client: "sc_client",
  81. api: "api",
  82. rscShared: "rsc_shared_deps",
  83. middleware: "middleware",
  84. edgeAsset: "edge-asset"
  85. };
  86. exports.WEBPACK_LAYERS = WEBPACK_LAYERS;
  87. //# sourceMappingURL=constants.js.map