create-partylayer-app 0.7.0 → 0.7.1

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/README.md CHANGED
@@ -69,7 +69,7 @@ Provide directory, template and package manager to skip prompts. For example:
69
69
  npm create partylayer-app@latest my-dapp -- --template next-ssr --pm npm --no-git
70
70
  ```
71
71
 
72
- Node.js 18 is the CLI minimum. Follow the generated framework's Node requirements as well; use a supported Node LTS release for new projects.
72
+ CLI 0.7.0 requires Node.js 20.12.0 or newer. Follow the generated framework's Node requirements as well; use a supported Node LTS release for new projects.
73
73
 
74
74
  ## Recover an installation failure
75
75
 
@@ -100,7 +100,7 @@ MIT
100
100
 
101
101
  ## Diagnose an existing application
102
102
 
103
- **Introduced in CLI 0.7.0** (release candidate until published). CLI 0.6.2 and older do not support `--doctor`.
103
+ **Available in CLI 0.7.0 and newer.** CLI 0.6.2 and older do not support `--doctor`.
104
104
 
105
105
  ```bash
106
106
  npx create-partylayer-app@latest --doctor .
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-partylayer-app",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Create a Canton Network dApp with PartyLayer: React, Next.js, Vue and TypeScript starters with wallet integration and ready-made React Connect Wallet UI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,18 +10,18 @@
10
10
  "lint": "next lint"
11
11
  },
12
12
  "dependencies": {
13
- "@partylayer/react": "^3.1.0",
14
- "@partylayer/sdk": "^0.20.0",
15
- "@partylayer/session": "^1.1.9",
13
+ "@partylayer/react": "^3.2.0",
14
+ "@partylayer/sdk": "^0.21.0",
15
+ "@partylayer/session": "^1.1.10",
16
16
  "@tanstack/react-query": "^5.0.0",
17
- "next": "^14.2.5",
18
- "react": "^18.3.1",
19
- "react-dom": "^18.3.1"
17
+ "next": "^15.5.28",
18
+ "react": "^19.3.1",
19
+ "react-dom": "^19.3.1"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^20.11.0",
23
- "@types/react": "^18.3.3",
24
- "@types/react-dom": "^18.3.0",
23
+ "@types/react": "^19.3.0",
24
+ "@types/react-dom": "^19.3.0",
25
25
  "typescript": "^5.6.2"
26
26
  }
27
27
  }
@@ -4,21 +4,21 @@ import { ConnectButton } from '@/components/ConnectButton';
4
4
  // Reading cookies() opts this route into dynamic (per-request) rendering, which
5
5
  // is exactly what SSR session needs: the server reads the session cookie on
6
6
  // every request and renders the connected state into the initial HTML.
7
- export default function Home() {
8
- const session = getServerSession();
7
+ export default async function Home() {
8
+ const session = await getServerSession();
9
9
  const party = session?.account?.partyId ?? null;
10
10
 
11
11
  return (
12
12
  <main className="app">
13
13
  <h1>{{PROJECT_NAME}}</h1>
14
- <p className="subtitle">A PartyLayer dApp on Canton: connect any verified wallet.</p>
14
+ <p className="subtitle">A PartyLayer dApp on Canton: connect a supported wallet.</p>
15
15
 
16
16
  {/* SERVER-RENDERED connected state (Option A: server owns the display). This
17
17
  appears in the initial HTML from the cookie, before any client JS, so
18
18
  there is no disconnected→connected flash. */}
19
19
  {party ? (
20
20
  <p className="session">
21
- Connected as <code data-testid="server-party">{truncateParty(party)}</code>
21
+ Last connected as <code data-testid="server-party">{truncateParty(party)}</code>
22
22
  </p>
23
23
  ) : (
24
24
  <p className="session" data-testid="server-cta">
@@ -9,8 +9,8 @@ import {
9
9
  // next/headers is imported HERE (the app), never inside @partylayer/session —
10
10
  // the library stays framework-agnostic. This adapter wraps Next's read-only
11
11
  // request cookies into the CookieAdapter shape createCookieStorage expects.
12
- function nextCookieAdapter(): CookieAdapter {
13
- const jar = cookies();
12
+ async function nextCookieAdapter(): Promise<CookieAdapter> {
13
+ const jar = await cookies();
14
14
  return {
15
15
  get: (name) => jar.get(name)?.value ?? null,
16
16
  // Server Components can only READ cookies; writes happen client-side
@@ -25,8 +25,8 @@ function nextCookieAdapter(): CookieAdapter {
25
25
  * snapshot (party, network, …) or null. This is what lets a Server Component
26
26
  * render the connected state in the initial HTML — before any client JS.
27
27
  */
28
- export function getServerSession(): PersistedSessionSnapshot | null {
29
- const storage = createCookieStorage({ adapter: nextCookieAdapter() });
28
+ export async function getServerSession(): Promise<PersistedSessionSnapshot | null> {
29
+ const storage = createCookieStorage({ adapter: await nextCookieAdapter() });
30
30
  // Cookie reads are synchronous; the SessionStorage interface types getItem as
31
31
  // string | null | Promise, so narrow to a string (null/absent → no session).
32
32
  const raw = storage.getItem('pl_session');
@@ -9,8 +9,8 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@partylayer/react": "^3.1.0",
13
- "@partylayer/sdk": "^0.20.0",
12
+ "@partylayer/react": "^3.2.0",
13
+ "@partylayer/sdk": "^0.21.0",
14
14
  "@tanstack/react-query": "^5.0.0",
15
15
  "react": "^18.3.1",
16
16
  "react-dom": "^18.3.1"
@@ -9,8 +9,8 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@partylayer/react": "^3.1.0",
13
- "@partylayer/sdk": "^0.20.0",
12
+ "@partylayer/react": "^3.2.0",
13
+ "@partylayer/sdk": "^0.21.0",
14
14
  "@tanstack/react-query": "^5.0.0",
15
15
  "react": "^18.3.1",
16
16
  "react-dom": "^18.3.1"
@@ -9,8 +9,8 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@partylayer/react": "^3.1.0",
13
- "@partylayer/sdk": "^0.20.0",
12
+ "@partylayer/react": "^3.2.0",
13
+ "@partylayer/sdk": "^0.21.0",
14
14
  "@tanstack/react-query": "^5.0.0",
15
15
  "react": "^18.3.1",
16
16
  "react-dom": "^18.3.1"
@@ -9,7 +9,7 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@partylayer/sdk": "^0.20.0"
12
+ "@partylayer/sdk": "^0.21.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "typescript": "^5.6.2",
@@ -10,9 +10,9 @@
10
10
  "postinstall": "nuxt prepare"
11
11
  },
12
12
  "dependencies": {
13
- "@partylayer/sdk": "^0.20.0",
14
- "@partylayer/session": "^1.1.9",
15
- "@partylayer/vue": "^2.0.1",
13
+ "@partylayer/sdk": "^0.21.0",
14
+ "@partylayer/session": "^1.1.10",
15
+ "@partylayer/vue": "^2.0.2",
16
16
  "@pinia/nuxt": "^0.5.5",
17
17
  "@tanstack/vue-query": "^5.0.0",
18
18
  "pinia": "^2.2.0",