nitro-nightly 3.0.1-20251106-175629-e46f1ce8 → 3.0.1-20251106-212413-8b396123
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.
- package/dist/_build/rolldown.mjs +1 -1
- package/dist/_build/vite.build.mjs +1 -1
- package/dist/_build/vite.plugin.mjs +1 -1
- package/dist/_chunks/{BX5q0aQR.mjs → B45B0YMI.mjs} +5 -10
- package/dist/_presets.mjs +1 -1
- package/dist/builder.mjs +1 -1
- package/dist/runtime/internal/task.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/lib/tsconfig.json +27 -0
- package/package.json +4 -3
package/dist/_build/rolldown.mjs
CHANGED
|
@@ -71,7 +71,7 @@ const getRolldownConfig = (nitro) => {
|
|
|
71
71
|
transform: {
|
|
72
72
|
inject: base.env.inject,
|
|
73
73
|
jsx: {
|
|
74
|
-
runtime: "classic",
|
|
74
|
+
runtime: nitro.options.esbuild?.options?.jsx === "automatic" ? "automatic" : "classic",
|
|
75
75
|
pragma: nitro.options.esbuild?.options?.jsxFactory,
|
|
76
76
|
pragmaFrag: nitro.options.esbuild?.options?.jsxFragment,
|
|
77
77
|
development: nitro.options.dev
|
|
@@ -13,7 +13,7 @@ import "../_libs/tinyglobby.mjs";
|
|
|
13
13
|
import "../_libs/compatx.mjs";
|
|
14
14
|
import "../_libs/klona.mjs";
|
|
15
15
|
import { r as a } from "../_libs/std-env.mjs";
|
|
16
|
-
import "../_chunks/
|
|
16
|
+
import "../_chunks/B45B0YMI.mjs";
|
|
17
17
|
import "../_libs/escape-string-regexp.mjs";
|
|
18
18
|
import "../_libs/dot-prop.mjs";
|
|
19
19
|
import "../_chunks/zV3n76Yk.mjs";
|
|
@@ -2,7 +2,7 @@ import { C as join$1, D as relative$1, O as resolve$1, S as isAbsolute$1, b as d
|
|
|
2
2
|
import { f as sanitizeFilePath } from "../_libs/local-pkg.mjs";
|
|
3
3
|
import { t as formatCompatibilityDate } from "../_libs/compatx.mjs";
|
|
4
4
|
import { n as T, r as a } from "../_libs/std-env.mjs";
|
|
5
|
-
import { a as createNitro, n as prepare, r as copyPublicAssets } from "../_chunks/
|
|
5
|
+
import { a as createNitro, n as prepare, r as copyPublicAssets } from "../_chunks/B45B0YMI.mjs";
|
|
6
6
|
import { a as prettyPath, n as writeBuildInfo, t as getBuildInfo } from "../_chunks/zV3n76Yk.mjs";
|
|
7
7
|
import { i as scanHandlers } from "../_chunks/thLbatgM.mjs";
|
|
8
8
|
import { i as NodeDevWorker, r as NitroDevApp } from "../_dev.mjs";
|
|
@@ -1105,7 +1105,7 @@ async function prepareDir(dir) {
|
|
|
1105
1105
|
//#endregion
|
|
1106
1106
|
//#region src/prerender/utils.ts
|
|
1107
1107
|
const allowedExtensions = new Set(["", ".json"]);
|
|
1108
|
-
const linkParents
|
|
1108
|
+
const linkParents = /* @__PURE__ */ new Map();
|
|
1109
1109
|
const HTML_ENTITIES = {
|
|
1110
1110
|
"<": "<",
|
|
1111
1111
|
">": ">",
|
|
@@ -1136,9 +1136,9 @@ async function extractLinks(html, from, res, crawlLinks) {
|
|
|
1136
1136
|
links.push(_link.pathname + _link.search);
|
|
1137
1137
|
}
|
|
1138
1138
|
for (const link of links) {
|
|
1139
|
-
const _parents = linkParents
|
|
1139
|
+
const _parents = linkParents.get(link);
|
|
1140
1140
|
if (_parents) _parents.add(from);
|
|
1141
|
-
else linkParents
|
|
1141
|
+
else linkParents.set(link, new Set([from]));
|
|
1142
1142
|
}
|
|
1143
1143
|
return links;
|
|
1144
1144
|
}
|
|
@@ -1149,7 +1149,7 @@ function getExtension(link) {
|
|
|
1149
1149
|
function formatPrerenderRoute(route) {
|
|
1150
1150
|
let str = ` ├─ ${route.route} (${route.generateTimeMS}ms)`;
|
|
1151
1151
|
if (route.error) {
|
|
1152
|
-
const parents = linkParents
|
|
1152
|
+
const parents = linkParents.get(route.route);
|
|
1153
1153
|
const errorColor = colors[route.error.status === 404 ? "yellow" : "red"];
|
|
1154
1154
|
const errorLead = parents?.size ? "├──" : "└──";
|
|
1155
1155
|
str += `\n │ ${errorLead} ${errorColor(route.error.message)}`;
|
|
@@ -1168,7 +1168,6 @@ function matchesIgnorePattern(path, pattern) {
|
|
|
1168
1168
|
//#endregion
|
|
1169
1169
|
//#region src/prerender/prerender.ts
|
|
1170
1170
|
const JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
|
|
1171
|
-
const linkParents = /* @__PURE__ */ new Map();
|
|
1172
1171
|
async function prerender(nitro) {
|
|
1173
1172
|
if (nitro.options.noPublicDir) {
|
|
1174
1173
|
nitro.logger.warn("Skipping prerender since `noPublicDir` option is enabled.");
|
|
@@ -1323,11 +1322,7 @@ async function prerender(nitro) {
|
|
|
1323
1322
|
});
|
|
1324
1323
|
if (nitro.options.prerender.failOnError && failedRoutes.size > 0) {
|
|
1325
1324
|
nitro.logger.log("\nErrors prerendering:");
|
|
1326
|
-
for (const route of failedRoutes)
|
|
1327
|
-
const parents = linkParents.get(route.route);
|
|
1328
|
-
parents?.size && `${[...parents.values()].map((link) => colors.gray(` │ └── Linked from ${link}`)).join("\n")}`;
|
|
1329
|
-
nitro.logger.log(formatPrerenderRoute(route));
|
|
1330
|
-
}
|
|
1325
|
+
for (const route of failedRoutes) nitro.logger.log(formatPrerenderRoute(route));
|
|
1331
1326
|
nitro.logger.log("");
|
|
1332
1327
|
throw new Error("Exiting due to prerender errors.");
|
|
1333
1328
|
}
|
package/dist/_presets.mjs
CHANGED
|
@@ -1443,7 +1443,7 @@ function generateBuildConfig(nitro, o11Routes) {
|
|
|
1443
1443
|
function deprecateSWR(nitro) {
|
|
1444
1444
|
if (nitro.options.future.nativeSWR) return;
|
|
1445
1445
|
let hasLegacyOptions = false;
|
|
1446
|
-
for (const [
|
|
1446
|
+
for (const [_key, value] of Object.entries(nitro.options.routeRules)) {
|
|
1447
1447
|
if (_hasProp(value, "isr")) continue;
|
|
1448
1448
|
if (value.cache === false) value.isr = false;
|
|
1449
1449
|
if (_hasProp(value, "static")) {
|
package/dist/builder.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import "./_libs/tinyglobby.mjs";
|
|
|
13
13
|
import "./_libs/compatx.mjs";
|
|
14
14
|
import "./_libs/klona.mjs";
|
|
15
15
|
import "./_libs/std-env.mjs";
|
|
16
|
-
import { a as createNitro, c as loadOptions, i as build, n as prepare, o as listTasks, r as copyPublicAssets, s as runTask, t as prerender } from "./_chunks/
|
|
16
|
+
import { a as createNitro, c as loadOptions, i as build, n as prepare, o as listTasks, r as copyPublicAssets, s as runTask, t as prerender } from "./_chunks/B45B0YMI.mjs";
|
|
17
17
|
import "./_libs/escape-string-regexp.mjs";
|
|
18
18
|
import "./_libs/dot-prop.mjs";
|
|
19
19
|
import { t as getBuildInfo } from "./_chunks/zV3n76Yk.mjs";
|
|
@@ -49,7 +49,7 @@ export function startScheduleRunner() {
|
|
|
49
49
|
}
|
|
50
50
|
const payload = { scheduledTime: Date.now() };
|
|
51
51
|
for (const schedule of scheduledTasks) {
|
|
52
|
-
|
|
52
|
+
new Cron(schedule.cron, async () => {
|
|
53
53
|
await Promise.all(schedule.tasks.map((name) => runTask(name, {
|
|
54
54
|
payload,
|
|
55
55
|
context: {}
|
package/dist/vite.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import "./_libs/tinyglobby.mjs";
|
|
|
13
13
|
import "./_libs/compatx.mjs";
|
|
14
14
|
import "./_libs/klona.mjs";
|
|
15
15
|
import "./_libs/std-env.mjs";
|
|
16
|
-
import "./_chunks/
|
|
16
|
+
import "./_chunks/B45B0YMI.mjs";
|
|
17
17
|
import "./_libs/escape-string-regexp.mjs";
|
|
18
18
|
import "./_libs/dot-prop.mjs";
|
|
19
19
|
import "./_chunks/zV3n76Yk.mjs";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"moduleDetection": "force",
|
|
7
|
+
"isolatedModules": true,
|
|
8
|
+
"verbatimModuleSyntax": true,
|
|
9
|
+
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
"allowSyntheticDefaultImports": true,
|
|
18
|
+
"noUncheckedIndexedAccess": true,
|
|
19
|
+
"noImplicitOverride": true,
|
|
20
|
+
|
|
21
|
+
"forceConsistentCasingInFileNames": true,
|
|
22
|
+
"noImplicitReturns": true,
|
|
23
|
+
"noFallthroughCasesInSwitch": true,
|
|
24
|
+
"useUnknownInCatchVariables": true,
|
|
25
|
+
"noUnusedLocals": true
|
|
26
|
+
}
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-nightly",
|
|
3
|
-
"version": "3.0.1-20251106-
|
|
3
|
+
"version": "3.0.1-20251106-212413-8b396123",
|
|
4
4
|
"description": "Build and Deploy Universal JavaScript Servers",
|
|
5
5
|
"homepage": "https://nitro.build",
|
|
6
6
|
"repository": "nitrojs/nitro",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"./vite": "./dist/vite.mjs",
|
|
21
21
|
"./h3": "./lib/deps/h3.mjs",
|
|
22
22
|
"./deps/h3": "./lib/deps/h3.mjs",
|
|
23
|
-
"./deps/ofetch": "./lib/deps/ofetch.mjs"
|
|
23
|
+
"./deps/ofetch": "./lib/deps/ofetch.mjs",
|
|
24
|
+
"./tsconfig": "./lib/tsconfig.json"
|
|
24
25
|
},
|
|
25
26
|
"types": "./lib/index.d.mts",
|
|
26
27
|
"bin": {
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"test:fixture:types": "pnpm stub && node ./test/scripts/gen-fixture-types.ts && cd test/fixture && tsc --noEmit",
|
|
47
48
|
"test:rolldown": "NITRO_BUILDER=rolldown pnpm vitest",
|
|
48
49
|
"test:rollup": "NITRO_BUILDER=rollup pnpm vitest",
|
|
49
|
-
"test:types": "tsc --noEmit
|
|
50
|
+
"test:types": "tsc --noEmit"
|
|
50
51
|
},
|
|
51
52
|
"resolutions": {
|
|
52
53
|
"nitro": "link:.",
|