@nuxt/bridge-edge 3.0.0-28200790.d820607 → 3.0.0-28232126.5c5bc70

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.2026cf91.mjs';
10
+ import { h as hashId, u as uniq, g as generateDevSSRManifest, i as isCSS } from '../shared/bridge-edge.7d084326.mjs';
11
11
  import { c as createIsExternal } from './vite.mjs';
12
12
  import 'h3';
13
13
  import 'node-fetch';
@@ -2,7 +2,7 @@ import { normalize, isAbsolute, resolve as resolve$1, join } from 'pathe';
2
2
  import { logger, useNuxt, isIgnored } from '@nuxt/kit';
3
3
  import { resolve, findExports, sanitizeFilePath } from 'mlly';
4
4
  import { joinURL, withoutLeadingSlash, withTrailingSlash } from 'ufo';
5
- import { d as distDir, i as isCSS, p as prepareManifests, a as pkgDir } from '../shared/bridge-edge.2026cf91.mjs';
5
+ import { d as distDir, i as isCSS, p as prepareManifests, a as pkgDir } from '../shared/bridge-edge.7d084326.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';
@@ -626,6 +626,12 @@ function resolveCSSOptions(nuxt) {
626
626
  return css;
627
627
  }
628
628
 
629
+ var __defProp = Object.defineProperty;
630
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
631
+ var __publicField = (obj, key, value) => {
632
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
633
+ return value;
634
+ };
629
635
  async function bundle(nuxt, builder) {
630
636
  for (const p of builder.plugins) {
631
637
  p.src = nuxt.resolver.resolvePath(resolve$1(nuxt.options.buildDir, p.src));
@@ -745,6 +751,8 @@ async function bundle(nuxt, builder) {
745
751
  }
746
752
  class ViteBuilder {
747
753
  constructor(builder) {
754
+ __publicField(this, "builder");
755
+ __publicField(this, "nuxt");
748
756
  this.builder = builder;
749
757
  this.nuxt = builder.nuxt;
750
758
  }
@@ -0,0 +1,44 @@
1
+ /// <reference types="nitropack" />
2
+ import { NuxtModule } from '@nuxt/schema';
3
+
4
+ interface BridgeConfig {
5
+ nitro: boolean
6
+ nitroGenerator: boolean
7
+ vite: boolean
8
+ app: boolean | {}
9
+ capi: boolean | {
10
+ legacy?: boolean
11
+ }
12
+ /**
13
+ * @deprecated use `imports.autoImport` instead to disable auto-importing.
14
+ * @see {@link https://nuxt.com/docs/guide/concepts/auto-imports#disabling-auto-imports}
15
+ */
16
+ imports: boolean
17
+ /** @deprecated */
18
+ autoImports?: boolean
19
+ transpile: boolean
20
+ compatibility: boolean
21
+ postcss8: boolean
22
+ resolve: boolean
23
+ typescript: boolean
24
+ meta: boolean | null
25
+ }
26
+
27
+ declare module '@nuxt/bridge-schema' {
28
+ interface Nuxt2Config {
29
+ bridge?: Partial<BridgeConfig> | false
30
+ }
31
+ }
32
+
33
+ declare module 'nitropack' {
34
+ interface NitroRouteConfig {
35
+ ssr?: boolean
36
+ }
37
+ interface NitroRouteOptions {
38
+ ssr?: boolean
39
+ }
40
+ }
41
+
42
+ declare const _default: NuxtModule<BridgeConfig>;
43
+
44
+ export { _default as default };
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.2026cf91.mjs';
3
+ export { m as default } from './shared/bridge-edge.7d084326.mjs';
4
4
  import 'fs';
5
5
  import 'url';
6
6
  import 'node-fetch';
@@ -32,7 +32,7 @@ export interface NavigateToOptions {
32
32
  export declare const navigateTo: (to: RawLocation | undefined | null, options?: NavigateToOptions) => Promise<void | Route | NavigationFailure> | RawLocation | Route;
33
33
  /** This will abort navigation within a Nuxt route middleware handler. */
34
34
  export declare const abortNavigation: (err?: string | Partial<NuxtError>) => boolean;
35
- type RouteMiddlewareReturn = void | Error | string | Location | boolean;
35
+ type RouteMiddlewareReturn = void | Error | string | Location | boolean | Route;
36
36
  export interface RouteMiddleware {
37
37
  (to: Route, from: Route): RouteMiddlewareReturn | Promise<RouteMiddlewareReturn>;
38
38
  }
@@ -1,2 +1,2 @@
1
1
  export const viteNodeOptions: any;
2
- export const viteNodeFetch: import("ofetch/dist/error-d5becc6e").$;
2
+ export const viteNodeFetch: import("ofetch/dist/shared/ofetch.441891d5").$;
@@ -1,4 +1,4 @@
1
- import { useNuxt, addPluginTemplate, tryImportModule, resolvePath, addTemplate, resolveAlias, addWebpackPlugin, addVitePlugin, addPlugin, extendWebpackConfig, resolveFiles, defineNuxtModule, logger, addComponent, addImportsSources, installModule, checkNuxtCompatibility } from '@nuxt/kit';
1
+ import { useNuxt, addPluginTemplate, tryImportModule, resolvePath, addTemplate, resolveAlias, addWebpackPlugin, addVitePlugin, addPlugin, extendWebpackConfig, resolveFiles, defineNuxtModule, logger, addComponent, addImportsSources, installModule, writeTypes as writeTypes$1, checkNuxtCompatibility } from '@nuxt/kit';
2
2
  import { dynamicEventHandler, fromNodeMiddleware } from 'h3';
3
3
  import fs, { existsSync, readdirSync, statSync, promises } from 'fs';
4
4
  import { fileURLToPath, pathToFileURL } from 'url';
@@ -25,8 +25,16 @@ import { defineUnimportPreset, createUnimport, toImports } from 'unimport';
25
25
  import { camelCase } from 'scule';
26
26
  import escapeRE from 'escape-string-regexp';
27
27
 
28
+ var __defProp$1 = Object.defineProperty;
29
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
30
+ var __publicField$1 = (obj, key, value) => {
31
+ __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
32
+ return value;
33
+ };
28
34
  class AsyncLoadingPlugin {
29
35
  constructor(opts) {
36
+ __publicField$1(this, "opts");
37
+ __publicField$1(this, "Template");
30
38
  this.opts = opts;
31
39
  const _require = createRequire(import.meta.url);
32
40
  const TemplatePath = _require.resolve("webpack/lib/Template", { paths: [...this.opts.modulesDir] });
@@ -861,6 +869,12 @@ function setupCAPIBridge(options) {
861
869
  addWebpackPlugin(KeyPlugin.webpack());
862
870
  }
863
871
 
872
+ var __defProp = Object.defineProperty;
873
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
874
+ var __publicField = (obj, key, value) => {
875
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
876
+ return value;
877
+ };
864
878
  const DEFAULTS = {
865
879
  fileSystem: new enhancedResolve.CachedInputFileSystem(fs, 4e3),
866
880
  extensions: [".ts", ".tsx", ".mjs", ".cjs", ".js", ".jsx", ".json", ".vue"]
@@ -875,6 +889,7 @@ const createResolver = (resolveOptions) => {
875
889
  };
876
890
  class EnhancedResolverPlugin {
877
891
  constructor(options) {
892
+ __publicField(this, "resolver");
878
893
  this.resolver = createResolver(options);
879
894
  }
880
895
  apply(defaultResolver) {
@@ -1308,7 +1323,6 @@ const metaModule = defineNuxtModule({
1308
1323
  "useServerHeadSafe"
1309
1324
  ]
1310
1325
  });
1311
- addPlugin({ src: resolve(runtimeDir, "plugin") });
1312
1326
  addPlugin({ src: resolve(runtimeDir, "plugins/unhead") });
1313
1327
  }
1314
1328
  });
@@ -1584,6 +1598,11 @@ const module = defineNuxtModule({
1584
1598
  }
1585
1599
  if (opts.typescript) {
1586
1600
  await setupTypescript();
1601
+ if (!opts.nitro) {
1602
+ nuxt.hook("modules:done", async () => {
1603
+ await writeTypes$1(nuxt);
1604
+ });
1605
+ }
1587
1606
  }
1588
1607
  if (opts.resolve) {
1589
1608
  setupBetterResolve();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/bridge-edge",
3
- "version": "3.0.0-28200790.d820607",
3
+ "version": "3.0.0-28232126.5c5bc70",
4
4
  "repository": "nuxt/bridge",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,74 +18,74 @@
18
18
  "dependencies": {
19
19
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
20
20
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
21
- "@babel/plugin-transform-typescript": "^7.22.9",
22
- "@nuxt/bridge-schema": "npm:@nuxt/bridge-schema-edge@3.0.0-28200790.d820607",
21
+ "@babel/plugin-transform-typescript": "^7.22.15",
22
+ "@nuxt/bridge-schema": "npm:@nuxt/bridge-schema-edge@3.0.0-28232126.5c5bc70",
23
23
  "@nuxt/devalue": "^2.0.2",
24
- "@nuxt/kit": "3.6.5",
24
+ "@nuxt/kit": "3.7.0",
25
25
  "@nuxt/postcss8": "^1.1.3",
26
- "@nuxt/schema": "3.6.5",
27
- "@nuxt/ui-templates": "^1.2.0",
28
- "@unhead/ssr": "^1.1.32",
29
- "@unhead/vue": "^1.1.32",
26
+ "@nuxt/schema": "3.7.0",
27
+ "@nuxt/ui-templates": "^1.3.1",
28
+ "@unhead/ssr": "^1.5.2",
29
+ "@unhead/vue": "^1.5.2",
30
30
  "@vitejs/plugin-legacy": "^4.1.1",
31
31
  "@vitejs/plugin-vue2": "^2.2.0",
32
32
  "acorn": "^8.10.0",
33
33
  "cookie-es": "^1.0.0",
34
34
  "defu": "^6.1.2",
35
- "destr": "^2.0.0",
35
+ "destr": "^2.0.1",
36
36
  "enhanced-resolve": "^5.15.0",
37
37
  "escape-string-regexp": "^5.0.0",
38
38
  "estree-walker": "^3.0.3",
39
39
  "externality": "^1.0.2",
40
40
  "fs-extra": "^10.1.0",
41
- "get-port-please": "^3.0.1",
41
+ "get-port-please": "^3.0.2",
42
42
  "globby": "^13.2.2",
43
- "h3": "^1.7.1",
43
+ "h3": "^1.8.1",
44
44
  "hash-sum": "^2.0.0",
45
45
  "knitwork": "^1.0.0",
46
- "magic-string": "^0.30.1",
47
- "mlly": "^1.4.0",
48
- "nitropack": "^2.5.2",
49
- "node-fetch": "^3.3.1",
50
- "nuxi": "3.6.5",
51
- "ofetch": "^1.1.1",
52
- "ohash": "^1.1.2",
46
+ "magic-string": "^0.30.3",
47
+ "mlly": "^1.4.2",
48
+ "nitropack": "^2.6.2",
49
+ "node-fetch": "^3.3.2",
50
+ "nuxi": "3.7.3",
51
+ "ofetch": "^1.3.3",
52
+ "ohash": "^1.1.3",
53
53
  "pathe": "^1.1.1",
54
54
  "perfect-debounce": "^1.0.0",
55
- "postcss": "^8.4.26",
55
+ "postcss": "^8.4.29",
56
56
  "postcss-import": "^15.1.0",
57
57
  "postcss-import-resolver": "^2.0.0",
58
- "postcss-preset-env": "^9.0.0",
58
+ "postcss-preset-env": "^9.1.3",
59
59
  "postcss-url": "^10.1.3",
60
60
  "scule": "^1.0.0",
61
61
  "semver": "^7.5.4",
62
- "std-env": "^3.3.3",
63
- "terser": "^5.19.1",
64
- "ufo": "^1.1.2",
62
+ "std-env": "^3.4.3",
63
+ "terser": "^5.19.4",
64
+ "ufo": "^1.3.0",
65
65
  "unctx": "^2.3.1",
66
- "unimport": "^3.1.0",
66
+ "unimport": "^3.3.0",
67
67
  "unplugin": "^1.4.0",
68
- "untyped": "^1.3.2",
69
- "vite": "~4.4.6",
70
- "vite-node": "^0.33.0",
71
- "vue-bundle-renderer": "^1.0.3"
68
+ "untyped": "^1.4.0",
69
+ "vite": "~4.4.9",
70
+ "vite-node": "^0.34.3",
71
+ "vue-bundle-renderer": "^2.0.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@nuxt/types": "^2.17.1",
75
75
  "@nuxtjs/eslint-config": "^12.0.0",
76
- "@nuxtjs/eslint-config-typescript": "^12.0.0",
76
+ "@nuxtjs/eslint-config-typescript": "^12.1.0",
77
77
  "@types/fs-extra": "^9.0.13",
78
78
  "@types/hash-sum": "^1.0.0",
79
79
  "@types/node-fetch": "^3.0.2",
80
80
  "nuxt": "^2.17.1",
81
- "unbuild": "1.2.1",
81
+ "unbuild": "2.0.0",
82
82
  "vue": "^2.7.14",
83
83
  "vue-router": "^3.6.5"
84
84
  },
85
85
  "engines": {
86
86
  "node": "^14.16.0 || ^16.11.0 || >=17.0.0"
87
87
  },
88
- "packageManager": "pnpm@8.6.9",
88
+ "packageManager": "pnpm@8.7.1",
89
89
  "_name": "@nuxt/bridge",
90
90
  "scripts": {
91
91
  "build": "pnpm prepack"
@@ -1,2 +0,0 @@
1
- declare const _default: (ctx: import("../app").Context, inject: (id: string, value: any) => void) => void;
2
- export default _default;
@@ -1,5 +0,0 @@
1
- import { VueHeadMixin } from "@unhead/vue";
2
- import { defineNuxtPlugin } from "../app.mjs";
3
- export default defineNuxtPlugin((nuxtApp) => {
4
- nuxtApp.vueApp.mixin(VueHeadMixin);
5
- });