Skip to content

Commit 566fbe9

Browse files
authored
v0.1.0 (#2)
1 parent b99c28a commit 566fbe9

File tree

13 files changed

+757
-890
lines changed

13 files changed

+757
-890
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
node_modules
2+
.DS_Store
23
dist
3-
.DS_Store
4+
adapter/**/*
5+
link/**/*
6+
types/**/*

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
*
2-
!dist/**/*
2+
!adapter/**/*
3+
!link/**/*
4+
!types/**/*
35
!package.json
46
!package-lock.json
57
!LICENSE

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ yarn add trpc-chrome
3737
```typescript
3838
// content.ts
3939
import { createTRPCClient } from '@trpc/client';
40-
import { chromeLink } from 'trpc-chrome';
40+
import { chromeLink } from 'trpc-chrome/link';
4141

4242
import type { AppRouter } from './appRouter';
4343

@@ -52,7 +52,7 @@ export const chromeClient = createTRPCClient<AppRouter>({
5252

5353
```typescript
5454
// background.ts
55-
import { createChromeHandler } from 'trpc-chrome';
55+
import { createChromeHandler } from 'trpc-chrome/adapter';
5656

5757
import { appRouter } from './appRouter';
5858

examples/with-plasmo/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
"build": "plasmo build"
99
},
1010
"dependencies": {
11-
"@trpc/client": "^10.0.0-proxy-beta.13",
12-
"@trpc/server": "^10.0.0-proxy-beta.13",
13-
"plasmo": "0.55.2",
11+
"@trpc/client": "^10.0.0-proxy-beta.18",
12+
"@trpc/server": "^10.0.0-proxy-beta.18",
13+
"plasmo": "0.56.1",
1414
"react": "18.2.0",
1515
"react-dom": "18.2.0",
1616
"zod": "^3.19.1"
1717
},
1818
"devDependencies": {
19-
"@types/chrome": "0.0.196",
20-
"@types/node": "18.7.15",
21-
"@types/react": "18.0.18",
19+
"@types/chrome": "0.0.197",
20+
"@types/node": "18.8.5",
21+
"@types/react": "18.0.21",
2222
"@types/react-dom": "18.0.6",
23-
"typescript": "4.8.2"
23+
"typescript": "4.8.4"
2424
},
2525
"manifest": {
2626
"host_permissions": [

examples/with-plasmo/src/background.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { initTRPC } from '@trpc/server';
2-
import { createChromeHandler } from 'trpc-chrome/dist/adapter';
2+
import { createChromeHandler } from 'trpc-chrome/adapter';
33
import { z } from 'zod';
44

5-
const t = initTRPC.create();
5+
const t = initTRPC.create({
6+
isServer: false,
7+
allowOutsideOfServer: true,
8+
});
69

710
const appRouter = t.router({
811
openNewTab: t.procedure.input(z.object({ url: z.string().url() })).mutation(async ({ input }) => {

examples/with-plasmo/src/popup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createTRPCProxyClient } from '@trpc/client';
22
import { useRef, useState } from 'react';
3-
import { chromeLink } from 'trpc-chrome/dist/link';
3+
import { chromeLink } from 'trpc-chrome/link';
44

55
import type { AppRouter } from './background';
66

0 commit comments

Comments
 (0)