create-nextly-app 0.0.2-alpha.74 → 0.0.2-alpha.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42566,15 +42566,27 @@ const REQUIRE_IMPORT = "import { createRequire } from \"node:module\";";
42566
42566
  const requireDeclaration = (createRequireName) => `// Resolves Nextly's cache handlers from this app's node_modules.
42567
42567
  const require = ${createRequireName}(import.meta.url);`;
42568
42568
  const REQUIRE_DECLARATION = requireDeclaration("createRequire");
42569
+ /** Where a new app's config takes the crawlers that wait for the whole head. */
42570
+ const HTML_LIMITED_BOTS_IMPORT = "import { nextlyHtmlLimitedBots } from \"nextly/next\";";
42571
+ /**
42572
+ * The crawlers answered with each page's whole head in the first HTML rather
42573
+ * than streamed it: Next.js's own list, the main Googlebot and the AI
42574
+ * crawlers (`nextlyHtmlLimitedBots`).
42575
+ */
42576
+ const HTML_LIMITED_BOTS_LINE = ` // Search engines and AI crawlers read each page's whole head in the first
42577
+ // HTML, rather than metadata streamed in after it.
42578
+ htmlLimitedBots: nextlyHtmlLimitedBots,`;
42569
42579
  /**
42570
42580
  * Render a complete next.config.ts file for the selected database.
42571
42581
  */
42572
42582
  function buildNextConfigTemplate(database) {
42573
42583
  return `import type { NextConfig } from "next";
42584
+ ${HTML_LIMITED_BOTS_IMPORT}
42574
42585
 
42575
42586
  const nextConfig: NextConfig = {
42576
42587
  ${CACHE_COMPONENTS_ON}
42577
42588
  serverExternalPackages: ${packageListLiteral(database)},
42589
+ ${HTML_LIMITED_BOTS_LINE}
42578
42590
  };
42579
42591
 
42580
42592
  export default nextConfig;
@@ -42583,6 +42595,7 @@ export default nextConfig;
42583
42595
  /** The same config as a JavaScript module, for an app without TypeScript. */
42584
42596
  function buildNextConfigModule(database) {
42585
42597
  return `${REQUIRE_IMPORT}
42598
+ ${HTML_LIMITED_BOTS_IMPORT}
42586
42599
 
42587
42600
  ${REQUIRE_DECLARATION}
42588
42601
 
@@ -42590,6 +42603,7 @@ ${REQUIRE_DECLARATION}
42590
42603
  const nextConfig = {
42591
42604
  ${CACHE_COMPONENTS_ON}
42592
42605
  serverExternalPackages: ${packageListLiteral(database)},
42606
+ ${HTML_LIMITED_BOTS_LINE}
42593
42607
  };
42594
42608
 
42595
42609
  export default nextConfig;
@@ -48121,9 +48135,12 @@ function startNextly(configImport) {
48121
48135
  // Next.js writes its Cache Components setting into this file as it builds
48122
48136
  // it. Nextly, loaded from node_modules, cannot read that for itself. With
48123
48137
  // it off, Nextly warns at start; with it on, a cached read that finds no
48124
- // "use cache" read function says so.
48138
+ // "use cache" read function says so. The same holds for the build's newest
48139
+ // migration, which withNextly sets: a production start compares it with
48140
+ // the database's schema version and warns when the database is behind.
48125
48141
  await createRegister(config, {
48126
48142
  cacheComponents: process.env.__NEXT_CACHE_COMPONENTS,
48143
+ buildSchemaVersion: process.env.NEXTLY_BUILD_SCHEMA_VERSION,
48127
48144
  })();`;
48128
48145
  }
48129
48146
  /** The whole hook, as the blank template ships it. */
@@ -53072,4 +53089,4 @@ async function createNextly(options = {}) {
53072
53089
  }
53073
53090
  export { getAvailableTemplateNames as a, init as c, __require as d, __toESM$1 as f, validateTemplateName as i, shutdown as l, resolveProjectArg as n, packageVersion as o, validateProjectName as r, capture as s, createNextly as t, __commonJSMin$1 as u };
53074
53091
 
53075
- //# sourceMappingURL=create-nextly-ChHdzG83.mjs.map
53092
+ //# sourceMappingURL=create-nextly-N_COehCu.mjs.map