@squadbase/nextjs 0.2.1 → 0.2.2-beta.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/dist/index.cjs +12 -0
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +13 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
var index_exports = {};
|
|
23
23
|
__export(index_exports, {
|
|
24
|
+
createConnectionClient: () => createConnectionClient,
|
|
24
25
|
createNextjsServerClient: () => createNextjsServerClient
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -35,10 +36,21 @@ function createNextjsServerClient(options) {
|
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
38
|
|
|
39
|
+
// src/connection-client.ts
|
|
40
|
+
var import_server2 = require("@squadbase/server");
|
|
41
|
+
var import_headers2 = require("next/headers");
|
|
42
|
+
function createConnectionClient(options) {
|
|
43
|
+
return (0, import_server2.createConnectionClient)({
|
|
44
|
+
...options,
|
|
45
|
+
cookieOptions: { getCookie: async () => (await (0, import_headers2.cookies)()).toString() }
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
38
49
|
// src/index.ts
|
|
39
50
|
__reExport(index_exports, require("@squadbase/server"), module.exports);
|
|
40
51
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
52
|
0 && (module.exports = {
|
|
53
|
+
createConnectionClient,
|
|
42
54
|
createNextjsServerClient,
|
|
43
55
|
...require("@squadbase/server")
|
|
44
56
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as _squadbase_server from '@squadbase/server';
|
|
2
|
-
import { ServerClientOptions } from '@squadbase/server';
|
|
2
|
+
import { ServerClientOptions, ConnectionClientOptions } from '@squadbase/server';
|
|
3
3
|
export * from '@squadbase/server';
|
|
4
4
|
|
|
5
5
|
type NextjsServerClientOptions = Omit<ServerClientOptions, "cookieOptions">;
|
|
6
6
|
declare function createNextjsServerClient(options?: NextjsServerClientOptions): _squadbase_server.ServerClient;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
type NextjsConnectionClientOptions = Omit<ConnectionClientOptions, "cookieOptions">;
|
|
9
|
+
declare function createConnectionClient(options: NextjsConnectionClientOptions): _squadbase_server.ConnectionClient;
|
|
10
|
+
|
|
11
|
+
export { createConnectionClient, createNextjsServerClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as _squadbase_server from '@squadbase/server';
|
|
2
|
-
import { ServerClientOptions } from '@squadbase/server';
|
|
2
|
+
import { ServerClientOptions, ConnectionClientOptions } from '@squadbase/server';
|
|
3
3
|
export * from '@squadbase/server';
|
|
4
4
|
|
|
5
5
|
type NextjsServerClientOptions = Omit<ServerClientOptions, "cookieOptions">;
|
|
6
6
|
declare function createNextjsServerClient(options?: NextjsServerClientOptions): _squadbase_server.ServerClient;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
type NextjsConnectionClientOptions = Omit<ConnectionClientOptions, "cookieOptions">;
|
|
9
|
+
declare function createConnectionClient(options: NextjsConnectionClientOptions): _squadbase_server.ConnectionClient;
|
|
10
|
+
|
|
11
|
+
export { createConnectionClient, createNextjsServerClient };
|
package/dist/index.js
CHANGED
|
@@ -8,8 +8,21 @@ function createNextjsServerClient(options) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
// src/connection-client.ts
|
|
12
|
+
import {
|
|
13
|
+
createConnectionClient as createBaseConnectionClient
|
|
14
|
+
} from "@squadbase/server";
|
|
15
|
+
import { cookies as cookies2 } from "next/headers";
|
|
16
|
+
function createConnectionClient(options) {
|
|
17
|
+
return createBaseConnectionClient({
|
|
18
|
+
...options,
|
|
19
|
+
cookieOptions: { getCookie: async () => (await cookies2()).toString() }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
11
23
|
// src/index.ts
|
|
12
24
|
export * from "@squadbase/server";
|
|
13
25
|
export {
|
|
26
|
+
createConnectionClient,
|
|
14
27
|
createNextjsServerClient
|
|
15
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squadbase/nextjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"author": "Squadbase",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@squadbase/server": "0.2.
|
|
28
|
+
"@squadbase/server": "0.2.2-beta.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.14.1",
|