nitro-nightly 3.0.1-20251210-091123-c1787f75 → 3.0.1-20251210-103926-22a293c5

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.
@@ -6,7 +6,7 @@ import "../_libs/acorn.mjs";
6
6
  import "../_libs/unimport.mjs";
7
7
  import "../_libs/@rollup/plugin-commonjs.mjs";
8
8
  import { i as a } from "../_libs/std-env.mjs";
9
- import "../_chunks/vCTaGRPD.mjs";
9
+ import "../_chunks/C0jn5-Q_.mjs";
10
10
  import "../_libs/tsconfck.mjs";
11
11
  import "../_chunks/Df3_4Pam.mjs";
12
12
  import "../_chunks/CycPUgTQ.mjs";
@@ -3,7 +3,7 @@ import { t as assetsPlugin } from "../_libs/@pi0/vite-plugin-fullstack.mjs";
3
3
  import { d as sanitizeFilePath } from "../_libs/local-pkg.mjs";
4
4
  import { t as formatCompatibilityDate } from "../_libs/compatx.mjs";
5
5
  import { i as a, r as T } from "../_libs/std-env.mjs";
6
- import { a as copyPublicAssets, i as prepare, s as createNitro } from "../_chunks/vCTaGRPD.mjs";
6
+ import { a as copyPublicAssets, i as prepare, s as createNitro } from "../_chunks/C0jn5-Q_.mjs";
7
7
  import { n as prettyPath } from "../_chunks/Df3_4Pam.mjs";
8
8
  import { i as scanHandlers } from "../_chunks/CycPUgTQ.mjs";
9
9
  import { n as writeBuildInfo, t as getBuildInfo } from "./common.mjs";
@@ -818,7 +818,12 @@ var Router = class {
818
818
  compileToString(opts) {
819
819
  if (this._compiled) return this._compiled;
820
820
  this._compiled = compileRouterToString(this._router, void 0, opts);
821
- if (this.routes.length === 1 && this.routes[0].route === "/**" && this.routes[0].method === "") this._compiled = `/* @__PURE__ */ (() => {const data=${(opts?.serialize || JSON.stringify)(this.routes[0].data)};return ((_m, p)=>{return {data,params:{"_":p.slice(1)}};})})()`;
821
+ if (this.routes.length === 1 && this.routes[0].route === "/**" && this.routes[0].method === "") {
822
+ const data = (opts?.serialize || JSON.stringify)(this.routes[0].data);
823
+ let retCode = `{data,params:{"_":p.slice(1)}}`;
824
+ if (opts?.matchAll) retCode = `[${retCode}]`;
825
+ this._compiled = `/* @__PURE__ */ (() => {const data=${data};return ((_m, p)=>{return ${retCode};})})()`;
826
+ }
822
827
  return this._compiled;
823
828
  }
824
829
  match(method, path) {
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/rou3@0.7.10/node_modules/rou3/dist/index.mjs
1
+ //#region node_modules/.pnpm/rou3@0.7.11/node_modules/rou3/dist/index.mjs
2
2
  const NullProtoObj = /* @__PURE__ */ (() => {
3
3
  const e = function() {};
4
4
  return e.prototype = Object.create(null), Object.freeze(e.prototype), e;
@@ -19,7 +19,7 @@ function splitPath(path) {
19
19
  function getMatchParams(segments, paramsMap) {
20
20
  const params = new NullProtoObj();
21
21
  for (const [index, name] of paramsMap) {
22
- const segment = index < 0 ? segments.slice(-1 * index).join("/") : segments[index];
22
+ const segment = index < 0 ? segments.slice(-(index + 1)).join("/") : segments[index];
23
23
  if (typeof name === "string") params[name] = segment;
24
24
  else {
25
25
  const match = segment.match(name);
@@ -45,7 +45,7 @@ function addRoute(ctx, method = "", path, data) {
45
45
  if (!node.wildcard) node.wildcard = { key: "**" };
46
46
  node = node.wildcard;
47
47
  paramsMap.push([
48
- -i,
48
+ -(i + 1),
49
49
  segment.split(":")[1] || "_",
50
50
  segment.length === 2
51
51
  ]);
@@ -200,7 +200,7 @@ function _findAll(ctx, node, method, segments, index, matches = []) {
200
200
  }
201
201
 
202
202
  //#endregion
203
- //#region node_modules/.pnpm/rou3@0.7.10/node_modules/rou3/dist/compiler.mjs
203
+ //#region node_modules/.pnpm/rou3@0.7.11/node_modules/rou3/dist/compiler.mjs
204
204
  /**
205
205
  * Compile the router instance into a compact runnable code.
206
206
  *
package/dist/builder.mjs CHANGED
@@ -5,7 +5,7 @@ import "./_libs/@pi0/vite-plugin-fullstack.mjs";
5
5
  import "./_libs/acorn.mjs";
6
6
  import "./_libs/unimport.mjs";
7
7
  import "./_libs/@rollup/plugin-commonjs.mjs";
8
- import { a as copyPublicAssets, c as loadOptions, i as prepare, n as runTask, o as build, r as prerender, s as createNitro, t as listTasks } from "./_chunks/vCTaGRPD.mjs";
8
+ import { a as copyPublicAssets, c as loadOptions, i as prepare, n as runTask, o as build, r as prerender, s as createNitro, t as listTasks } from "./_chunks/C0jn5-Q_.mjs";
9
9
  import "./_libs/tsconfck.mjs";
10
10
  import "./_chunks/Df3_4Pam.mjs";
11
11
  import { n as writeTypes } from "./_chunks/CycPUgTQ.mjs";
package/dist/vite.mjs CHANGED
@@ -5,7 +5,7 @@ import "./_libs/@pi0/vite-plugin-fullstack.mjs";
5
5
  import "./_libs/acorn.mjs";
6
6
  import "./_libs/unimport.mjs";
7
7
  import "./_libs/@rollup/plugin-commonjs.mjs";
8
- import "./_chunks/vCTaGRPD.mjs";
8
+ import "./_chunks/C0jn5-Q_.mjs";
9
9
  import "./_libs/tsconfck.mjs";
10
10
  import "./_chunks/Df3_4Pam.mjs";
11
11
  import "./_chunks/CycPUgTQ.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitro-nightly",
3
- "version": "3.0.1-20251210-091123-c1787f75",
3
+ "version": "3.0.1-20251210-103926-22a293c5",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "homepage": "https://nitro.build",
6
6
  "repository": "nitrojs/nitro",
@@ -141,7 +141,7 @@
141
141
  "rolldown": "1.0.0-beta.53",
142
142
  "rolldown-vite": "^7.2.10",
143
143
  "rollup": "^4.53.3",
144
- "rou3": "^0.7.10",
144
+ "rou3": "^0.7.11",
145
145
  "scule": "^1.3.0",
146
146
  "semver": "^7.7.3",
147
147
  "serve-placeholder": "^2.0.2",