@reboot-dev/reboot 0.19.2 → 0.20.0
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/package.json +2 -2
- package/reboot.d.ts +2 -2
- package/reboot.js +2 -2
- package/reboot_native.cjs +13 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"@bufbuild/protobuf": "1.3.2",
|
|
4
4
|
"@bufbuild/protoplugin": "1.3.2",
|
|
5
5
|
"@bufbuild/protoc-gen-es": "1.3.2",
|
|
6
|
-
"@reboot-dev/reboot-api": "0.
|
|
6
|
+
"@reboot-dev/reboot-api": "0.20.0",
|
|
7
7
|
"chalk": "^4.1.2",
|
|
8
8
|
"node-addon-api": "^7.0.0",
|
|
9
9
|
"node-gyp": ">=10.2.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"type": "module",
|
|
16
16
|
"name": "@reboot-dev/reboot",
|
|
17
|
-
"version": "0.
|
|
17
|
+
"version": "0.20.0",
|
|
18
18
|
"description": "npm package for Reboot",
|
|
19
19
|
"scripts": {
|
|
20
20
|
"postinstall": "rbt || exit 0",
|
package/reboot.d.ts
CHANGED
|
@@ -88,10 +88,10 @@ export type ServicerFactory = {
|
|
|
88
88
|
*/
|
|
89
89
|
export declare class Auth {
|
|
90
90
|
userId?: string;
|
|
91
|
-
properties:
|
|
91
|
+
properties: protobuf_es.JsonValue;
|
|
92
92
|
constructor(options?: {
|
|
93
93
|
userId?: string;
|
|
94
|
-
properties?:
|
|
94
|
+
properties?: protobuf_es.JsonValue;
|
|
95
95
|
});
|
|
96
96
|
toProtoBytes(): Uint8Array;
|
|
97
97
|
static fromProtoBytes(bytes: Uint8Array): Auth;
|
package/reboot.js
CHANGED
|
@@ -95,7 +95,7 @@ export class ExternalContext {
|
|
|
95
95
|
__classPrivateFieldSet(this, _ExternalContext_external, args.external, "f");
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
|
-
if (!args.url.startsWith("http")) {
|
|
98
|
+
if (!args.url || !args.url.startsWith("http")) {
|
|
99
99
|
throw new Error("`ExternalContext` must be constructed with a `url` " +
|
|
100
100
|
"including an explicit 'http' or 'https' protocol");
|
|
101
101
|
}
|
|
@@ -277,7 +277,7 @@ export class Auth {
|
|
|
277
277
|
toProtoBytes() {
|
|
278
278
|
const auth = new auth_pb.Auth({
|
|
279
279
|
userId: this.userId,
|
|
280
|
-
properties: this.properties,
|
|
280
|
+
properties: protobuf_es.Struct.fromJson(this.properties),
|
|
281
281
|
});
|
|
282
282
|
return auth.toBinary();
|
|
283
283
|
}
|
package/reboot_native.cjs
CHANGED
|
@@ -19,12 +19,21 @@ const reboot_native = { exports: {} };
|
|
|
19
19
|
// If we are in a Next.js context, check that serverExternalPackages is
|
|
20
20
|
// correctly set. If not correctly set, Reboot backend TS code will not work
|
|
21
21
|
// with React Server Components inside Next.
|
|
22
|
-
|
|
23
22
|
if (__dirname.includes(".next")) {
|
|
24
23
|
throw new Error(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
`For Next.js to work correctly with Reboot native code, an external
|
|
25
|
+
package must be added to 'next.config.ts':
|
|
26
|
+
|
|
27
|
+
In Next.js 14:
|
|
28
|
+
experimental: {
|
|
29
|
+
serverComponentsExternalPackages: ["@reboot-dev/reboot"],
|
|
30
|
+
},
|
|
31
|
+
...
|
|
32
|
+
|
|
33
|
+
In Next.js 15
|
|
34
|
+
'serverExternalPackages: ['@reboot-dev/reboot']',
|
|
35
|
+
...
|
|
36
|
+
`
|
|
28
37
|
);
|
|
29
38
|
}
|
|
30
39
|
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const REBOOT_VERSION = "0.
|
|
1
|
+
export declare const REBOOT_VERSION = "0.20.0";
|
package/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const REBOOT_VERSION = "0.
|
|
1
|
+
export const REBOOT_VERSION = "0.20.0";
|