@builder.io/sdk-react-nextjs 0.16.12 → 0.16.13
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.
- package/lib/browser/constants/sdk-version.cjs +1 -1
- package/lib/browser/constants/sdk-version.mjs +1 -1
- package/lib/browser/functions/evaluate/choose-eval.cjs +1 -1
- package/lib/browser/functions/evaluate/choose-eval.mjs +5 -3
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.cjs +1 -1
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.mjs +8 -6
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +11 -6
- package/lib/edge/constants/sdk-version.cjs +1 -1
- package/lib/edge/constants/sdk-version.mjs +1 -1
- package/lib/edge/functions/evaluate/choose-eval.cjs +1 -1
- package/lib/edge/functions/evaluate/choose-eval.mjs +4 -2
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.cjs +1 -1
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.mjs +8 -6
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +11 -6
- package/lib/node/constants/sdk-version.cjs +1 -1
- package/lib/node/constants/sdk-version.mjs +1 -1
- package/lib/node/functions/evaluate/choose-eval.cjs +1 -1
- package/lib/node/functions/evaluate/choose-eval.mjs +4 -2
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.cjs +1 -1
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.mjs +8 -6
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +11 -6
- package/package.json +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.13";exports.SDK_VERSION=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../is-browser.cjs"),e=require("./browser-runtime/browser.cjs"),s=require("./should-force-browser-runtime-in-node.cjs"),n=r=>(o.isBrowser()||s.shouldForceBrowserRuntimeInNode(),e.runInBrowser(r));exports.chooseBrowserOrServerEval=n;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../is-browser.cjs"),e=require("./browser-runtime/browser.cjs"),s=require("./should-force-browser-runtime-in-node.cjs"),n=r=>(o.isBrowser()||s.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0}),e.runInBrowser(r));exports.chooseBrowserOrServerEval=n;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { isBrowser as e } from "../is-browser.mjs";
|
|
2
2
|
import { runInBrowser as o } from "./browser-runtime/browser.mjs";
|
|
3
|
-
import { shouldForceBrowserRuntimeInNode as
|
|
4
|
-
const
|
|
3
|
+
import { shouldForceBrowserRuntimeInNode as s } from "./should-force-browser-runtime-in-node.mjs";
|
|
4
|
+
const i = (r) => e() || s({
|
|
5
|
+
shouldLogWarning: !0
|
|
6
|
+
}) ? o(r) : o(r);
|
|
5
7
|
export {
|
|
6
|
-
|
|
8
|
+
i as chooseBrowserOrServerEval
|
|
7
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../helpers/logger.cjs"),t=require("../is-node-runtime.cjs"),a=({shouldLogWarning:o})=>{var e;if(!t.isNodeRuntime())return!1;const s=process.arch==="arm64",r=process.version.startsWith("v20"),n=(e=process.env.NODE_OPTIONS)==null?void 0:e.includes("--no-node-snapshot");return s&&r&&!n?(o&&i.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1};exports.shouldForceBrowserRuntimeInNode=a;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { logger as n } from "../../helpers/logger.mjs";
|
|
2
|
-
import { isNodeRuntime as
|
|
3
|
-
const
|
|
2
|
+
import { isNodeRuntime as t } from "../is-node-runtime.mjs";
|
|
3
|
+
const d = ({
|
|
4
|
+
shouldLogWarning: e
|
|
5
|
+
}) => {
|
|
4
6
|
var o;
|
|
5
|
-
if (!
|
|
7
|
+
if (!t())
|
|
6
8
|
return !1;
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
+
const s = process.arch === "arm64", r = process.version.startsWith("v20"), i = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
10
|
+
return s && r && !i ? (e && n.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
9
11
|
};
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
d as shouldForceBrowserRuntimeInNode
|
|
12
14
|
};
|
package/lib/browser/init.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("isolated-vm"),n=require("./functions/evaluate/node-runtime/node-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./functions/evaluate/should-force-browser-runtime-in-node.cjs"),t=require("isolated-vm"),n=require("./functions/evaluate/node-runtime/node-runtime.cjs"),r=e=>{if(o.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0}))return;const{ivmIsolateOptions:i}=e||{};n.setIvm(t,i)};exports.initializeNodeRuntime=r;
|
package/lib/browser/init.mjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { shouldForceBrowserRuntimeInNode as r } from "./functions/evaluate/should-force-browser-runtime-in-node.mjs";
|
|
1
2
|
import t from "isolated-vm";
|
|
2
|
-
import { setIvm as
|
|
3
|
-
const
|
|
3
|
+
import { setIvm as e } from "./functions/evaluate/node-runtime/node-runtime.mjs";
|
|
4
|
+
const u = (o) => {
|
|
5
|
+
if (r({
|
|
6
|
+
shouldLogWarning: !0
|
|
7
|
+
}))
|
|
8
|
+
return;
|
|
4
9
|
const {
|
|
5
|
-
ivmIsolateOptions:
|
|
6
|
-
} =
|
|
7
|
-
|
|
10
|
+
ivmIsolateOptions: i
|
|
11
|
+
} = o || {};
|
|
12
|
+
e(t, i);
|
|
8
13
|
};
|
|
9
14
|
export {
|
|
10
|
-
|
|
15
|
+
u as initializeNodeRuntime
|
|
11
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.13";exports.SDK_VERSION=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../is-browser.cjs"),o=require("./browser-runtime/browser.cjs"),s=require("./edge-runtime/edge-runtime.cjs"),n=require("./should-force-browser-runtime-in-node.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../is-browser.cjs"),o=require("./browser-runtime/browser.cjs"),s=require("./edge-runtime/edge-runtime.cjs"),n=require("./should-force-browser-runtime-in-node.cjs"),u=e=>r.isBrowser()||n.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0})?o.runInBrowser(e):s.runInEdge(e);exports.chooseBrowserOrServerEval=u;
|
|
@@ -2,7 +2,9 @@ import { isBrowser as o } from "../is-browser.mjs";
|
|
|
2
2
|
import { runInBrowser as e } from "./browser-runtime/browser.mjs";
|
|
3
3
|
import { runInEdge as m } from "./edge-runtime/edge-runtime.mjs";
|
|
4
4
|
import { shouldForceBrowserRuntimeInNode as n } from "./should-force-browser-runtime-in-node.mjs";
|
|
5
|
-
const
|
|
5
|
+
const p = (r) => o() || n({
|
|
6
|
+
shouldLogWarning: !0
|
|
7
|
+
}) ? e(r) : m(r);
|
|
6
8
|
export {
|
|
7
|
-
|
|
9
|
+
p as chooseBrowserOrServerEval
|
|
8
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../helpers/logger.cjs"),t=require("../is-node-runtime.cjs"),a=({shouldLogWarning:o})=>{var e;if(!t.isNodeRuntime())return!1;const s=process.arch==="arm64",r=process.version.startsWith("v20"),n=(e=process.env.NODE_OPTIONS)==null?void 0:e.includes("--no-node-snapshot");return s&&r&&!n?(o&&i.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1};exports.shouldForceBrowserRuntimeInNode=a;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { logger as n } from "../../helpers/logger.mjs";
|
|
2
|
-
import { isNodeRuntime as
|
|
3
|
-
const
|
|
2
|
+
import { isNodeRuntime as t } from "../is-node-runtime.mjs";
|
|
3
|
+
const d = ({
|
|
4
|
+
shouldLogWarning: e
|
|
5
|
+
}) => {
|
|
4
6
|
var o;
|
|
5
|
-
if (!
|
|
7
|
+
if (!t())
|
|
6
8
|
return !1;
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
+
const s = process.arch === "arm64", r = process.version.startsWith("v20"), i = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
10
|
+
return s && r && !i ? (e && n.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
9
11
|
};
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
d as shouldForceBrowserRuntimeInNode
|
|
12
14
|
};
|
package/lib/edge/init.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("isolated-vm"),n=require("./functions/evaluate/node-runtime/node-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./functions/evaluate/should-force-browser-runtime-in-node.cjs"),t=require("isolated-vm"),n=require("./functions/evaluate/node-runtime/node-runtime.cjs"),r=e=>{if(o.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0}))return;const{ivmIsolateOptions:i}=e||{};n.setIvm(t,i)};exports.initializeNodeRuntime=r;
|
package/lib/edge/init.mjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { shouldForceBrowserRuntimeInNode as r } from "./functions/evaluate/should-force-browser-runtime-in-node.mjs";
|
|
1
2
|
import t from "isolated-vm";
|
|
2
|
-
import { setIvm as
|
|
3
|
-
const
|
|
3
|
+
import { setIvm as e } from "./functions/evaluate/node-runtime/node-runtime.mjs";
|
|
4
|
+
const u = (o) => {
|
|
5
|
+
if (r({
|
|
6
|
+
shouldLogWarning: !0
|
|
7
|
+
}))
|
|
8
|
+
return;
|
|
4
9
|
const {
|
|
5
|
-
ivmIsolateOptions:
|
|
6
|
-
} =
|
|
7
|
-
|
|
10
|
+
ivmIsolateOptions: i
|
|
11
|
+
} = o || {};
|
|
12
|
+
e(t, i);
|
|
8
13
|
};
|
|
9
14
|
export {
|
|
10
|
-
|
|
15
|
+
u as initializeNodeRuntime
|
|
11
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.16.13";exports.SDK_VERSION=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../is-browser.cjs"),o=require("./browser-runtime/browser.cjs"),s=require("./node-runtime/node-runtime.cjs"),n=require("./should-force-browser-runtime-in-node.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../is-browser.cjs"),o=require("./browser-runtime/browser.cjs"),s=require("./node-runtime/node-runtime.cjs"),n=require("./should-force-browser-runtime-in-node.cjs"),u=e=>r.isBrowser()||n.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0})?o.runInBrowser(e):s.runInNode(e);exports.chooseBrowserOrServerEval=u;
|
|
@@ -2,7 +2,9 @@ import { isBrowser as o } from "../is-browser.mjs";
|
|
|
2
2
|
import { runInBrowser as e } from "./browser-runtime/browser.mjs";
|
|
3
3
|
import { runInNode as m } from "./node-runtime/node-runtime.mjs";
|
|
4
4
|
import { shouldForceBrowserRuntimeInNode as n } from "./should-force-browser-runtime-in-node.mjs";
|
|
5
|
-
const
|
|
5
|
+
const p = (r) => o() || n({
|
|
6
|
+
shouldLogWarning: !0
|
|
7
|
+
}) ? e(r) : m(r);
|
|
6
8
|
export {
|
|
7
|
-
|
|
9
|
+
p as chooseBrowserOrServerEval
|
|
8
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../helpers/logger.cjs"),t=require("../is-node-runtime.cjs"),a=({shouldLogWarning:o})=>{var e;if(!t.isNodeRuntime())return!1;const s=process.arch==="arm64",r=process.version.startsWith("v20"),n=(e=process.env.NODE_OPTIONS)==null?void 0:e.includes("--no-node-snapshot");return s&&r&&!n?(o&&i.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1};exports.shouldForceBrowserRuntimeInNode=a;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { logger as n } from "../../helpers/logger.mjs";
|
|
2
|
-
import { isNodeRuntime as
|
|
3
|
-
const
|
|
2
|
+
import { isNodeRuntime as t } from "../is-node-runtime.mjs";
|
|
3
|
+
const d = ({
|
|
4
|
+
shouldLogWarning: e
|
|
5
|
+
}) => {
|
|
4
6
|
var o;
|
|
5
|
-
if (!
|
|
7
|
+
if (!t())
|
|
6
8
|
return !1;
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
+
const s = process.arch === "arm64", r = process.version.startsWith("v20"), i = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
10
|
+
return s && r && !i ? (e && n.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
9
11
|
};
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
d as shouldForceBrowserRuntimeInNode
|
|
12
14
|
};
|
package/lib/node/init.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("isolated-vm"),n=require("./functions/evaluate/node-runtime/node-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./functions/evaluate/should-force-browser-runtime-in-node.cjs"),t=require("isolated-vm"),n=require("./functions/evaluate/node-runtime/node-runtime.cjs"),r=e=>{if(o.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0}))return;const{ivmIsolateOptions:i}=e||{};n.setIvm(t,i)};exports.initializeNodeRuntime=r;
|
package/lib/node/init.mjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { shouldForceBrowserRuntimeInNode as r } from "./functions/evaluate/should-force-browser-runtime-in-node.mjs";
|
|
1
2
|
import t from "isolated-vm";
|
|
2
|
-
import { setIvm as
|
|
3
|
-
const
|
|
3
|
+
import { setIvm as e } from "./functions/evaluate/node-runtime/node-runtime.mjs";
|
|
4
|
+
const u = (o) => {
|
|
5
|
+
if (r({
|
|
6
|
+
shouldLogWarning: !0
|
|
7
|
+
}))
|
|
8
|
+
return;
|
|
4
9
|
const {
|
|
5
|
-
ivmIsolateOptions:
|
|
6
|
-
} =
|
|
7
|
-
|
|
10
|
+
ivmIsolateOptions: i
|
|
11
|
+
} = o || {};
|
|
12
|
+
e(t, i);
|
|
8
13
|
};
|
|
9
14
|
export {
|
|
10
|
-
|
|
15
|
+
u as initializeNodeRuntime
|
|
11
16
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react-nextjs",
|
|
3
3
|
"description": "Builder.io RSC SDK for NextJS App Directory",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.13",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.16.
|
|
1
|
+
export declare const SDK_VERSION = "0.16.13";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.16.
|
|
1
|
+
export declare const SDK_VERSION = "0.16.13";
|