Skip to content

Commit

Permalink
v0.1.0 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlalmes authored Oct 13, 2022
1 parent b99c28a commit 566fbe9
Show file tree
Hide file tree
Showing 13 changed files with 757 additions and 890 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
.DS_Store
dist
.DS_Store
adapter/**/*
link/**/*
types/**/*
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*
!dist/**/*
!adapter/**/*
!link/**/*
!types/**/*
!package.json
!package-lock.json
!LICENSE
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ yarn add trpc-chrome
```typescript
// content.ts
import { createTRPCClient } from '@trpc/client';
import { chromeLink } from 'trpc-chrome';
import { chromeLink } from 'trpc-chrome/link';

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

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

```typescript
// background.ts
import { createChromeHandler } from 'trpc-chrome';
import { createChromeHandler } from 'trpc-chrome/adapter';

import { appRouter } from './appRouter';

Expand Down
14 changes: 7 additions & 7 deletions examples/with-plasmo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
"build": "plasmo build"
},
"dependencies": {
"@trpc/client": "^10.0.0-proxy-beta.13",
"@trpc/server": "^10.0.0-proxy-beta.13",
"plasmo": "0.55.2",
"@trpc/client": "^10.0.0-proxy-beta.18",
"@trpc/server": "^10.0.0-proxy-beta.18",
"plasmo": "0.56.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"zod": "^3.19.1"
},
"devDependencies": {
"@types/chrome": "0.0.196",
"@types/node": "18.7.15",
"@types/react": "18.0.18",
"@types/chrome": "0.0.197",
"@types/node": "18.8.5",
"@types/react": "18.0.21",
"@types/react-dom": "18.0.6",
"typescript": "4.8.2"
"typescript": "4.8.4"
},
"manifest": {
"host_permissions": [
Expand Down
7 changes: 5 additions & 2 deletions examples/with-plasmo/src/background.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { initTRPC } from '@trpc/server';
import { createChromeHandler } from 'trpc-chrome/dist/adapter';
import { createChromeHandler } from 'trpc-chrome/adapter';
import { z } from 'zod';

const t = initTRPC.create();
const t = initTRPC.create({
isServer: false,
allowOutsideOfServer: true,
});

const appRouter = t.router({
openNewTab: t.procedure.input(z.object({ url: z.string().url() })).mutation(async ({ input }) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-plasmo/src/popup.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createTRPCProxyClient } from '@trpc/client';
import { useRef, useState } from 'react';
import { chromeLink } from 'trpc-chrome/dist/link';
import { chromeLink } from 'trpc-chrome/link';

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

Expand Down
Loading

0 comments on commit 566fbe9

Please sign in to comment.