@builder.io/sdk-vue 2.0.14-4 → 2.0.14-6

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.
@@ -0,0 +1,14 @@
1
+ import type { IsolateOptions } from 'isolated-vm';
2
+ /**
3
+ * This function initializes the SDK on a Node server. It handles importing the
4
+ * `isolated-vm` package which is needed for dynamic bindings.
5
+ *
6
+ * NOTE: this function cannot be called on the client. You must call this function
7
+ * from a server-only location, such as:
8
+ * - The NextJS Pages router's `_document.tsx`
9
+ * - Your Remix route's `loader`
10
+ * - Qwik's `entry.ssr.tsx` file
11
+ */
12
+ export declare const initializeNodeRuntime: (args?: {
13
+ ivmIsolateOptions?: IsolateOptions;
14
+ }) => void;
@@ -0,0 +1,14 @@
1
+ import type { IsolateOptions } from 'isolated-vm';
2
+ /**
3
+ * This function initializes the SDK on a Node server. It handles importing the
4
+ * `isolated-vm` package which is needed for dynamic bindings.
5
+ *
6
+ * NOTE: this function cannot be called on the client. You must call this function
7
+ * from a server-only location, such as:
8
+ * - The NextJS Pages router's `_document.tsx`
9
+ * - Your Remix route's `loader`
10
+ * - Qwik's `entry.ssr.tsx` file
11
+ */
12
+ export declare const initializeNodeRuntime: (args?: {
13
+ ivmIsolateOptions?: IsolateOptions;
14
+ }) => void;
@@ -0,0 +1,14 @@
1
+ import type { IsolateOptions } from 'isolated-vm';
2
+ /**
3
+ * This function initializes the SDK on a Node server. It handles importing the
4
+ * `isolated-vm` package which is needed for dynamic bindings.
5
+ *
6
+ * NOTE: this function cannot be called on the client. You must call this function
7
+ * from a server-only location, such as:
8
+ * - The NextJS Pages router's `_document.tsx`
9
+ * - Your Remix route's `loader`
10
+ * - Qwik's `entry.ssr.tsx` file
11
+ */
12
+ export declare const initializeNodeRuntime: (args?: {
13
+ ivmIsolateOptions?: IsolateOptions;
14
+ }) => void;
@@ -0,0 +1,14 @@
1
+ import type { IsolateOptions } from 'isolated-vm';
2
+ /**
3
+ * This function initializes the SDK on a Node server. It handles importing the
4
+ * `isolated-vm` package which is needed for dynamic bindings.
5
+ *
6
+ * NOTE: this function cannot be called on the client. You must call this function
7
+ * from a server-only location, such as:
8
+ * - The NextJS Pages router's `_document.tsx`
9
+ * - Your Remix route's `loader`
10
+ * - Qwik's `entry.ssr.tsx` file
11
+ */
12
+ export declare const initializeNodeRuntime: (args?: {
13
+ ivmIsolateOptions?: IsolateOptions;
14
+ }) => void;
@@ -0,0 +1,14 @@
1
+ import type { IsolateOptions } from 'isolated-vm';
2
+ /**
3
+ * This function initializes the SDK on a Node server. It handles importing the
4
+ * `isolated-vm` package which is needed for dynamic bindings.
5
+ *
6
+ * NOTE: this function cannot be called on the client. You must call this function
7
+ * from a server-only location, such as:
8
+ * - The NextJS Pages router's `_document.tsx`
9
+ * - Your Remix route's `loader`
10
+ * - Qwik's `entry.ssr.tsx` file
11
+ */
12
+ export declare const initializeNodeRuntime: (args?: {
13
+ ivmIsolateOptions?: IsolateOptions;
14
+ }) => void;
@@ -0,0 +1,14 @@
1
+ import type { IsolateOptions } from 'isolated-vm';
2
+ /**
3
+ * This function initializes the SDK on a Node server. It handles importing the
4
+ * `isolated-vm` package which is needed for dynamic bindings.
5
+ *
6
+ * NOTE: this function cannot be called on the client. You must call this function
7
+ * from a server-only location, such as:
8
+ * - The NextJS Pages router's `_document.tsx`
9
+ * - Your Remix route's `loader`
10
+ * - Qwik's `entry.ssr.tsx` file
11
+ */
12
+ export declare const initializeNodeRuntime: (args?: {
13
+ ivmIsolateOptions?: IsolateOptions;
14
+ }) => void;
package/nuxt.js CHANGED
@@ -1,14 +1,23 @@
1
1
  import { defineNuxtModule } from '@nuxt/kit';
2
2
 
3
3
  export default defineNuxtModule({
4
- async setup(options, nuxt) {
4
+ setup(options, nuxt) {
5
5
  /**
6
6
  * Add the compiled Builder.io CSS to the Nuxt CSS array.
7
7
  */
8
8
  nuxt.options.css.push('@builder.io/sdk-vue/css');
9
- if (process.server) {
10
- const { initializeNodeRuntime } = await import("./lib/node/functions/evaluate/node-runtime/init");
11
- initializeNodeRuntime();
9
+ if (nuxt.options.vite?.optimizeDeps?.exclude) {
10
+ nuxt.options.vite.optimizeDeps.exclude.push(
11
+ "@builder.io/sdk-vue/node/init"
12
+ );
13
+ } else {
14
+ nuxt.options.vite = {
15
+ ...nuxt.options.vite,
16
+ optimizeDeps: {
17
+ ...nuxt.options.vite?.optimizeDeps,
18
+ exclude: ["@builder.io/sdk-vue/node/init"],
19
+ },
20
+ };
12
21
  }
13
22
  },
14
23
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-vue",
3
3
  "description": "Builder.io SDK for Vue",
4
- "version": "2.0.14-4",
4
+ "version": "2.0.14-6",
5
5
  "main": "./lib/node/index.cjs",
6
6
  "module": "./lib/node/index.mjs",
7
7
  "type": "module",
@@ -85,8 +85,7 @@
85
85
  },
86
86
  "./node/init": {
87
87
  "import": "./lib/node/init.mjs",
88
- "require": "./lib/node/init.cjs",
89
- "types": "./lib/node/functions/evaluate/node-runtime/init.d.ts"
88
+ "require": "./lib/node/init.cjs"
90
89
  }
91
90
  },
92
91
  "scripts": {