nitro-nightly 3.0.1-20251219-124228-00598a8a → 3.0.1-20251222-095805-9a930b28

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.
@@ -1,5 +1,5 @@
1
1
  import { C as isAbsolute$1, O as relative$1, b as basename$1, h as resolveModulePath, k as resolve$1, o as debounce, w as join$1, x as dirname$1 } from "../_libs/c12.mjs";
2
- import { t as assetsPlugin } from "../_libs/@hiogawa/vite-plugin-fullstack.mjs";
2
+ import { n as assetsPlugin } from "../_libs/@hiogawa/vite-plugin-fullstack.mjs";
3
3
  import { t as formatCompatibilityDate } from "../_libs/compatx.mjs";
4
4
  import { i as a, r as T } from "../_libs/std-env.mjs";
5
5
  import { a as copyPublicAssets, i as prepare, s as createNitro } from "../_nitro.mjs";
@@ -3,7 +3,6 @@ import path from "node:path";
3
3
  import fs from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import assert from "node:assert";
6
- import "srvx/node";
7
6
  import { createHash } from "node:crypto";
8
7
  import { isCSSRequest, normalizePath } from "vite";
9
8
  import assert$1 from "node:assert/strict";
@@ -1536,7 +1535,37 @@ function stripLiteral(code, options) {
1536
1535
  }
1537
1536
 
1538
1537
  //#endregion
1539
- //#region node_modules/.pnpm/@hiogawa+vite-plugin-fullstack@0.0.8_patch_hash=aef5693ec569067da78c3402c9b2884429e322a_ccdea5f53e47d0c803c48383e7777859/node_modules/@hiogawa/vite-plugin-fullstack/dist/index.js
1538
+ //#region node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.55/node_modules/@rolldown/pluginutils/dist/simple-filters.js
1539
+ /**
1540
+ * Constructs a RegExp that matches the exact string specified.
1541
+ *
1542
+ * This is useful for plugin hook filters.
1543
+ *
1544
+ * @param str the string to match.
1545
+ * @param flags flags for the RegExp.
1546
+ *
1547
+ * @example
1548
+ * ```ts
1549
+ * import { exactRegex } from '@rolldown/pluginutils';
1550
+ * const plugin = {
1551
+ * name: 'plugin',
1552
+ * resolveId: {
1553
+ * filter: { id: exactRegex('foo') },
1554
+ * handler(id) {} // will only be called for `foo`
1555
+ * }
1556
+ * }
1557
+ * ```
1558
+ */
1559
+ function exactRegex(str, flags) {
1560
+ return new RegExp(`^${escapeRegex(str)}$`, flags);
1561
+ }
1562
+ const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
1563
+ function escapeRegex(str) {
1564
+ return str.replace(escapeRegexRE, "\\$&");
1565
+ }
1566
+
1567
+ //#endregion
1568
+ //#region node_modules/.pnpm/@hiogawa+vite-plugin-fullstack@0.0.11_vite@8.0.0-beta.2_@types+node@25.0.3_jiti@2.6.1_tsx@4.21.0_yaml@2.8.2_/node_modules/@hiogawa/vite-plugin-fullstack/dist/plugin-B4MlD0Bd.js
1540
1569
  function parseIdQuery(id) {
1541
1570
  if (!id.includes("?")) return {
1542
1571
  filename: id,
@@ -1554,23 +1583,20 @@ function toAssetsVirtual(options) {
1554
1583
  function parseAssetsVirtual(id) {
1555
1584
  if (id.startsWith("\0virtual:fullstack/assets?")) return parseIdQuery(id).query;
1556
1585
  }
1557
- function escapeRegExp(string) {
1558
- return string.replace(/[-\\^$*+?.()|[\]{}]/g, String.raw`\$&`);
1559
- }
1560
1586
  function createVirtualPlugin(name, load) {
1561
1587
  name = "virtual:" + name;
1562
1588
  return {
1563
- name: `rsc:virtual-${name}`,
1589
+ name: `fullstack:virtual-${name}`,
1564
1590
  resolveId: {
1565
- filter: { id: /* @__PURE__ */ new RegExp("^" + escapeRegExp(name) + "$") },
1591
+ filter: { id: exactRegex(name) },
1566
1592
  handler(source, _importer, _options) {
1567
1593
  return source === name ? "\0" + name : void 0;
1568
1594
  }
1569
1595
  },
1570
1596
  load: {
1571
- filter: { id: /* @__PURE__ */ new RegExp("^\\0" + escapeRegExp(name) + "$") },
1597
+ filter: { id: exactRegex("\0" + name) },
1572
1598
  handler(id, options) {
1573
- if (id === "\0" + name) return load.apply(this, [id, options]);
1599
+ return load.apply(this, [id, options]);
1574
1600
  }
1575
1601
  }
1576
1602
  };
@@ -1799,33 +1825,7 @@ function assetsPlugin(pluginOpts) {
1799
1825
  load: {
1800
1826
  filter: { id: /^\0virtual:fullstack\// },
1801
1827
  async handler(id) {
1802
- if (id === "\0virtual:fullstack/runtime") return `//#region src/runtime.ts
1803
- function mergeAssets(...args) {
1804
- const js = uniqBy(args.flatMap((h) => h.js), (a) => a.href);
1805
- const css = uniqBy(args.flatMap((h) => h.css), (a) => a.href);
1806
- const entry = args.filter((arg) => arg.entry)?.[0]?.entry;
1807
- const raw = {
1808
- entry,
1809
- js,
1810
- css
1811
- };
1812
- return {
1813
- ...raw,
1814
- merge: (...args$1) => mergeAssets(raw, ...args$1)
1815
- };
1816
- }
1817
- function uniqBy(array, key) {
1818
- const seen = /* @__PURE__ */ new Set();
1819
- return array.filter((item) => {
1820
- const k = key(item);
1821
- if (seen.has(k)) return false;
1822
- seen.add(k);
1823
- return true;
1824
- });
1825
- }
1826
-
1827
- //#endregion
1828
- export { mergeAssets };`;
1828
+ if (id === "\0virtual:fullstack/runtime") return `export const mergeAssets = ${(await import("../../cli/_chunks/runtime.mjs")).mergeAssets.toString()};`;
1829
1829
  const parsed = parseAssetsVirtual(id);
1830
1830
  if (!parsed) return;
1831
1831
  assert$1.notEqual(this.environment.name, "client");
@@ -2051,7 +2051,7 @@ function patchViteClientPlugin() {
2051
2051
  return {
2052
2052
  name: "fullstack:patch-vite-client",
2053
2053
  transform: {
2054
- filter: { id: /* @__PURE__ */ new RegExp("^" + escapeRegExp(viteClientPath) + "$") },
2054
+ filter: { id: exactRegex(viteClientPath) },
2055
2055
  handler(code, id) {
2056
2056
  if (id === viteClientPath) {
2057
2057
  if (code.includes("linkSheetsMap")) return;
@@ -2150,4 +2150,29 @@ function assetsURLDev(url, config) {
2150
2150
  }
2151
2151
 
2152
2152
  //#endregion
2153
- export { encode as a, decode as i, stripLiteral as n, MagicString as r, assetsPlugin as t };
2153
+ //#region node_modules/.pnpm/@hiogawa+vite-plugin-fullstack@0.0.11_vite@8.0.0-beta.2_@types+node@25.0.3_jiti@2.6.1_tsx@4.21.0_yaml@2.8.2_/node_modules/@hiogawa/vite-plugin-fullstack/dist/runtime.js
2154
+ function mergeAssets(...args) {
2155
+ const js = uniqBy(args.flatMap((h) => h.js), (a) => a.href);
2156
+ const css = uniqBy(args.flatMap((h) => h.css), (a) => a.href);
2157
+ const raw = {
2158
+ entry: args.filter((arg) => arg.entry)?.[0]?.entry,
2159
+ js,
2160
+ css
2161
+ };
2162
+ return {
2163
+ ...raw,
2164
+ merge: (...args$1) => mergeAssets(raw, ...args$1)
2165
+ };
2166
+ function uniqBy(array, key) {
2167
+ const seen = /* @__PURE__ */ new Set();
2168
+ return array.filter((item) => {
2169
+ const k = key(item);
2170
+ if (seen.has(k)) return false;
2171
+ seen.add(k);
2172
+ return true;
2173
+ });
2174
+ }
2175
+ }
2176
+
2177
+ //#endregion
2178
+ export { decode as a, MagicString as i, assetsPlugin as n, encode as o, stripLiteral as r, mergeAssets as t };
@@ -1,4 +1,4 @@
1
- import { a as encode, i as decode } from "../@hiogawa/vite-plugin-fullstack.mjs";
1
+ import { a as decode, o as encode } from "../@hiogawa/vite-plugin-fullstack.mjs";
2
2
 
3
3
  //#region node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
4
4
  const schemeRegex = /^[\w+.-]+:\/\//;
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM, n as __require$1, t as __commonJSMin } from "../../_rolldown.mjs";
2
- import { r as MagicString } from "../@hiogawa/vite-plugin-fullstack.mjs";
2
+ import { i as MagicString } from "../@hiogawa/vite-plugin-fullstack.mjs";
3
3
  import * as nativeFs$1 from "fs";
4
4
  import { existsSync, readFileSync, statSync } from "fs";
5
5
  import { basename, dirname, extname, isAbsolute, join, normalize, posix, relative, resolve, sep, win32 } from "path";
@@ -1,4 +1,4 @@
1
- import { r as MagicString } from "../@hiogawa/vite-plugin-fullstack.mjs";
1
+ import { i as MagicString } from "../@hiogawa/vite-plugin-fullstack.mjs";
2
2
  import { a as makeLegalIdentifier, n as attachScopes, o as walk, r as createFilter } from "./plugin-commonjs.mjs";
3
3
  import { sep } from "path";
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as MagicString } from "../@hiogawa/vite-plugin-fullstack.mjs";
1
+ import { i as MagicString } from "../@hiogawa/vite-plugin-fullstack.mjs";
2
2
  import { r as createFilter } from "./plugin-commonjs.mjs";
3
3
 
4
4
  //#region node_modules/.pnpm/@rollup+plugin-replace@6.0.3_rollup@4.53.5/node_modules/@rollup/plugin-replace/dist/es/index.js
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM, n as __require, t as __commonJSMin } from "../_rolldown.mjs";
2
2
  import { C as isAbsolute$2, D as parse$1, O as relative$1, T as normalize$2, b as basename$1, f as readPackageJSON, k as resolve$1, m as resolvePackageJSON, w as join$1, x as dirname$1 } from "./c12.mjs";
3
- import { n as stripLiteral, r as MagicString } from "./@hiogawa/vite-plugin-fullstack.mjs";
3
+ import { i as MagicString, r as stripLiteral } from "./@hiogawa/vite-plugin-fullstack.mjs";
4
4
  import { n as parse$2, t as Parser } from "./acorn.mjs";
5
5
  import { a as findTypeExports, c as parseStaticImport, i as findStaticImports, l as resolve$2, n as detectSyntax, r as findExports, t as resolveModule, u as resolveModuleExportNames } from "./local-pkg.mjs";
6
6
  import { c as require_picomatch } from "./@rollup/plugin-commonjs.mjs";
@@ -1,5 +1,5 @@
1
1
  import { b as basename, h as resolveModulePath } from "./c12.mjs";
2
- import { r as MagicString } from "./@hiogawa/vite-plugin-fullstack.mjs";
2
+ import { i as MagicString } from "./@hiogawa/vite-plugin-fullstack.mjs";
3
3
  import { a as genString, i as genSafeVariableName, n as genObjectFromRaw, t as genImport } from "./knitwork.mjs";
4
4
  import { existsSync, promises } from "node:fs";
5
5
  import { fileURLToPath } from "node:url";
@@ -0,0 +1,3 @@
1
+ import { t as mergeAssets } from "../../_libs/@hiogawa/vite-plugin-fullstack.mjs";
2
+
3
+ export { mergeAssets };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitro-nightly",
3
- "version": "3.0.1-20251219-124228-00598a8a",
3
+ "version": "3.0.1-20251222-095805-9a930b28",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "homepage": "https://nitro.build",
6
6
  "repository": "nitrojs/nitro",
@@ -79,7 +79,7 @@
79
79
  "@azure/static-web-apps-cli": "^2.0.7",
80
80
  "@cloudflare/workers-types": "^4.20251217.0",
81
81
  "@deno/types": "^0.0.1",
82
- "@hiogawa/vite-plugin-fullstack": "^0.0.8",
82
+ "@hiogawa/vite-plugin-fullstack": "^0.0.11",
83
83
  "@netlify/edge-functions": "^3.0.3",
84
84
  "@netlify/functions": "^5.1.1",
85
85
  "@rollup/plugin-alias": "^6.0.0",