@nuxt/bridge-edge 3.3.1-28745713.5493b4e → 3.3.1-28816659.66feedf

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.
@@ -7,7 +7,7 @@ import { genObjectFromRawEntries, genDynamicImport } from 'knitwork';
7
7
  import fse from 'fs-extra';
8
8
  import { debounce } from 'perfect-debounce';
9
9
  import { isIgnored, logger } from '@nuxt/kit';
10
- import { h as hashId, u as uniq, g as generateDevSSRManifest, i as isCSS } from '../shared/bridge-edge.facfe0f1.mjs';
10
+ import { h as hashId, u as uniq, g as generateDevSSRManifest, i as isCSS } from '../shared/bridge-edge.ebbafbc2.mjs';
11
11
  import { c as createIsExternal } from './vite.mjs';
12
12
  import 'h3';
13
13
  import 'node-fetch';
@@ -3,7 +3,7 @@ import hash from 'hash-sum';
3
3
  import { resolve } from 'pathe';
4
4
  import { genImport, genObjectFromRawEntries } from 'knitwork';
5
5
 
6
- const version = "3.3.1-28745713.5493b4e";
6
+ const version = "3.3.1-28816659.66feedf";
7
7
 
8
8
  const middlewareTemplate = {
9
9
  filename: "middleware.js",
@@ -2,7 +2,7 @@ import { normalize, isAbsolute, resolve as resolve$1, join } from 'pathe';
2
2
  import { logger, isIgnored } from '@nuxt/kit';
3
3
  import { resolve, findExports, sanitizeFilePath } from 'mlly';
4
4
  import { joinURL, withoutLeadingSlash, withTrailingSlash } from 'ufo';
5
- import { t as transpile, d as distDir, i as isCSS, p as prepareManifests, a as pkgDir } from '../shared/bridge-edge.facfe0f1.mjs';
5
+ import { t as transpile, d as distDir, i as isCSS, p as prepareManifests, a as pkgDir } from '../shared/bridge-edge.ebbafbc2.mjs';
6
6
  import createVuePlugin from '@vitejs/plugin-vue2';
7
7
  import { getPort } from 'get-port-please';
8
8
  import { toNodeListener, createApp, defineEventHandler, defineLazyEventHandler, eventHandler, createError } from 'h3';
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import '@nuxt/kit';
2
2
  import 'h3';
3
- export { m as default } from './shared/bridge-edge.facfe0f1.mjs';
3
+ export { m as default } from './shared/bridge-edge.ebbafbc2.mjs';
4
4
  import 'fs';
5
5
  import 'url';
6
6
  import 'node-fetch';
@@ -8,7 +8,7 @@ import { useRuntimeConfig, defineRenderHandler, getRouteRules } from "#internal/
8
8
  import { useNitroApp } from "#internal/nitro/app";
9
9
  import { buildAssetsURL } from "#paths";
10
10
  import htmlTemplate from "#build/views/document.template.mjs";
11
- import { renderToString } from "#vue-renderer";
11
+ import { renderToString as _renderToString } from "#vue-renderer";
12
12
  import metaConfig from "#build/meta.config.mjs";
13
13
  const STATIC_ASSETS_BASE = process.env.NUXT_STATIC_BASE + "/" + process.env.NUXT_STATIC_VERSION;
14
14
  const PAYLOAD_JS = "/payload.js";
@@ -23,11 +23,20 @@ const getSSRRenderer = lazyCachedFunction(async () => {
23
23
  if (!createSSRApp) {
24
24
  throw new Error("Server bundle is not available");
25
25
  }
26
- return createRenderer(createSSRApp, {
26
+ const options = {
27
27
  manifest,
28
28
  renderToString,
29
29
  buildAssetsURL
30
- });
30
+ };
31
+ const renderer = createRenderer(createSSRApp, options);
32
+ async function renderToString(input, context) {
33
+ const html = await _renderToString(input, context);
34
+ if (process.dev && process.env.NUXT_VITE_NODE_OPTIONS) {
35
+ renderer.rendererContext.updateManifest(await getClientManifest());
36
+ }
37
+ return html;
38
+ }
39
+ return renderer;
31
40
  });
32
41
  const getSPARenderer = lazyCachedFunction(async () => {
33
42
  const manifest = await getClientManifest();
@@ -39,7 +48,7 @@ const getSPARenderer = lazyCachedFunction(async () => {
39
48
  const renderer = createRenderer(() => () => {
40
49
  }, options);
41
50
  const result = await renderer.renderToString({});
42
- const renderToString2 = (ssrContext) => {
51
+ const renderToString = (ssrContext) => {
43
52
  const config = useRuntimeConfig();
44
53
  ssrContext.nuxt = {
45
54
  serverRendered: false,
@@ -64,7 +73,7 @@ const getSPARenderer = lazyCachedFunction(async () => {
64
73
  });
65
74
  return Promise.resolve(result);
66
75
  };
67
- return { renderToString: renderToString2 };
76
+ return { renderToString };
68
77
  });
69
78
  export default defineRenderHandler(async (event) => {
70
79
  const ssrError = event.node.req.url?.startsWith("/__nuxt_error") ? getQuery(event) : null;
@@ -1,2 +1,2 @@
1
1
  export const viteNodeOptions: any;
2
- export const viteNodeFetch: import("ofetch/dist/shared/ofetch.8459ad38").$;
2
+ export const viteNodeFetch: import("ofetch/dist/shared/ofetch.d0b3d489").$;
@@ -193,6 +193,7 @@ async function setupNitroBridge() {
193
193
  nuxt.options.app.assetsPath = nuxt.options.app.buildAssetsDir;
194
194
  nuxt.options.app.baseURL = nuxt.options.app.baseURL || nuxt.options.app.basePath;
195
195
  nuxt.options.app.cdnURL = nuxt.options.app.cdnURL || "";
196
+ nuxt.options.build.publicPath = nuxt.options.app.cdnURL || nuxt.options.build.publicPath;
196
197
  const publicConfig = nuxt.options.publicRuntimeConfig;
197
198
  const appConfig = { ...publicConfig._app, ...publicConfig.app };
198
199
  delete publicConfig.app;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/bridge-edge",
3
- "version": "3.3.1-28745713.5493b4e",
3
+ "version": "3.3.1-28816659.66feedf",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/bridge.git"
@@ -21,16 +21,16 @@
21
21
  "dependencies": {
22
22
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
23
23
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
24
- "@babel/plugin-transform-typescript": "^7.25.2",
25
- "@nuxt/bridge-schema": "npm:@nuxt/bridge-schema-edge@3.3.1-28745713.5493b4e",
24
+ "@babel/plugin-transform-typescript": "^7.25.7",
25
+ "@nuxt/bridge-schema": "npm:@nuxt/bridge-schema-edge@3.3.1-28816659.66feedf",
26
26
  "@nuxt/devalue": "^2.0.2",
27
- "@nuxt/kit": "3.13.0",
27
+ "@nuxt/kit": "3.13.2",
28
28
  "@nuxt/postcss8": "^1.1.3",
29
- "@nuxt/schema": "3.13.0",
29
+ "@nuxt/schema": "3.13.2",
30
30
  "@nuxt/ui-templates": "^1.3.4",
31
- "@rollup/plugin-replace": "^5.0.7",
32
- "@unhead/ssr": "^1.10.0",
33
- "@unhead/vue": "^1.10.0",
31
+ "@rollup/plugin-replace": "^6.0.1",
32
+ "@unhead/ssr": "^1.11.9",
33
+ "@unhead/vue": "^1.11.9",
34
34
  "@vitejs/plugin-legacy": "^5.4.2",
35
35
  "@vitejs/plugin-vue2": "^2.3.1",
36
36
  "acorn": "^8.12.1",
@@ -45,38 +45,38 @@
45
45
  "fs-extra": "^10.1.0",
46
46
  "get-port-please": "^3.1.2",
47
47
  "globby": "^14.0.2",
48
- "h3": "^1.12.0",
48
+ "h3": "^1.13.0",
49
49
  "hash-sum": "^2.0.0",
50
50
  "hookable": "5.5.3",
51
51
  "klona": "^2.0.6",
52
52
  "knitwork": "^1.1.0",
53
- "magic-string": "^0.30.11",
54
- "mlly": "^1.7.1",
53
+ "magic-string": "^0.30.12",
54
+ "mlly": "^1.7.2",
55
55
  "nitropack": "^2.9.7",
56
56
  "node-fetch": "^3.3.2",
57
- "nypm": "^0.3.11",
58
- "ofetch": "^1.3.4",
59
- "ohash": "^1.1.3",
57
+ "nypm": "^0.3.12",
58
+ "ofetch": "^1.4.1",
59
+ "ohash": "^1.1.4",
60
60
  "pathe": "^1.1.2",
61
61
  "perfect-debounce": "^1.0.0",
62
- "pkg-types": "^1.2.0",
63
- "postcss": "^8.4.41",
62
+ "pkg-types": "^1.2.1",
63
+ "postcss": "^8.4.47",
64
64
  "postcss-import": "^16.1.0",
65
65
  "postcss-import-resolver": "^2.0.0",
66
- "postcss-preset-env": "^10.0.2",
66
+ "postcss-preset-env": "^10.0.7",
67
67
  "postcss-url": "^10.1.3",
68
68
  "scule": "^1.3.0",
69
69
  "semver": "^7.6.3",
70
70
  "std-env": "^3.7.0",
71
- "terser": "^5.31.6",
71
+ "terser": "^5.34.1",
72
72
  "ufo": "^1.5.4",
73
73
  "unctx": "^2.3.1",
74
- "unimport": "^3.11.1",
75
- "unplugin": "^1.12.2",
76
- "untyped": "^1.4.2",
77
- "vite": "~5.4.2",
78
- "vite-node": "^2.0.5",
79
- "vue-bundle-renderer": "^2.1.0"
74
+ "unimport": "^3.13.1",
75
+ "unplugin": "^1.14.1",
76
+ "untyped": "^1.5.1",
77
+ "vite": "~5.4.9",
78
+ "vite-node": "^2.1.3",
79
+ "vue-bundle-renderer": "^2.1.1"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@nuxt/types": "^2.18.1",
@@ -86,7 +86,7 @@
86
86
  "@types/hash-sum": "^1.0.2",
87
87
  "@types/node-fetch": "^3.0.2",
88
88
  "nuxt": "^2.18.1",
89
- "rollup": "^4.21.0",
89
+ "rollup": "^4.24.0",
90
90
  "unbuild": "2.0.0",
91
91
  "vue": "^2.7.15",
92
92
  "vue-router": "^3.6.5"