Skip to content

Commit d060e24

Browse files
committed
Update author and name information for publishing to npm
1 parent 9298de0 commit d060e24

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+235
-230
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: jlalmes
1+
github: lilyrose2798

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ updates:
55
schedule:
66
interval: 'daily'
77
reviewers:
8-
- 'jlalmes'
8+
- 'lilyrose2798'

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sign-git-tag=false
2-
message="trpc-openapi v%s"
2+
message="@lilyrose2798/trpc-openapi v%s"

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch via NPM",
9+
"request": "launch",
10+
"runtimeArgs": ["run-script", "test"],
11+
"runtimeExecutable": "npm",
12+
"skipFiles": ["<node_internals>/**"],
13+
"type": "node"
14+
}
15+
]
16+
}

.vscode/settings.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
"editor.codeActionsOnSave": {
66
"source.fixAll.eslint": true
77
},
8-
"workbench.colorCustomizations": {
9-
"titleBar.activeBackground": "#8FCE0B",
10-
"titleBar.inactiveBackground": "#4B5A30"
11-
},
8+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
129
"[javascript]": {
1310
"editor.defaultFormatter": "esbenp.prettier-vscode"
1411
},

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 James Berry <[email protected]>
3+
Copyright (c) 2021 LilyRose2798 <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
![trpc-openapi](assets/trpc-openapi-readme.png)
1+
![@lilyrose2798/trpc-openapi](assets/trpc-openapi-readme.png)
22

33
<div align="center">
4-
<h1>trpc-openapi</h1>
5-
<a href="https://www.npmjs.com/package/trpc-openapi"><img src="https://img.shields.io/npm/v/trpc-openapi.svg?style=flat&color=brightgreen" target="_blank" /></a>
4+
<h1>@lilyrose2798/trpc-openapi</h1>
5+
<a href="https://www.npmjs.com/package/@lilyrose2798/trpc-openapi"><img src="https://img.shields.io/npm/v/@lilyrose2798/trpc-openapi.svg?style=flat&color=brightgreen" target="_blank" /></a>
66
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-black" /></a>
7-
<a href="https://trpc.io/discord" target="_blank"><img src="https://img.shields.io/badge/chat-discord-blue.svg" /></a>
87
<br />
98
<hr />
109
</div>
1110

12-
#### `trpc-openapi` is maintained by ProsePilot - simple, fast and free online [writing tools](https://www.prosepilot.com/tools).
13-
1411
---
1512

1613
## **[OpenAPI](https://swagger.io/specification/) support for [tRPC](https://trpc.io/)** 🧩
@@ -21,20 +18,20 @@
2118

2219
## Usage
2320

24-
**1. Install `trpc-openapi`.**
21+
**1. Install `@lilyrose2798/trpc-openapi`.**
2522

2623
```bash
2724
# npm
28-
npm install trpc-openapi
25+
npm install @lilyrose2798/trpc-openapi
2926
# yarn
30-
yarn add trpc-openapi
27+
yarn add @lilyrose2798/trpc-openapi
3128
```
3229

3330
**2. Add `OpenApiMeta` to your tRPC instance.**
3431

3532
```typescript
3633
import { initTRPC } from '@trpc/server';
37-
import { OpenApiMeta } from 'trpc-openapi';
34+
import { OpenApiMeta } from '@lilyrose2798/trpc-openapi';
3835

3936
const t = initTRPC.meta<OpenApiMeta>().create(); /* 👈 */
4037
```
@@ -56,7 +53,7 @@ export const appRouter = t.router({
5653
**4. Generate an OpenAPI document.**
5754

5855
```typescript
59-
import { generateOpenApiDocument } from 'trpc-openapi';
56+
import { generateOpenApiDocument } from '@lilyrose2798/trpc-openapi';
6057

6158
import { appRouter } from '../appRouter';
6259

@@ -68,15 +65,15 @@ export const openApiDocument = generateOpenApiDocument(appRouter, {
6865
});
6966
```
7067

71-
**5. Add an `trpc-openapi` handler to your app.**
68+
**5. Add an `@lilyrose2798/trpc-openapi` handler to your app.**
7269

7370
We currently support adapters for [`Express`](http://expressjs.com/), [`Next.js`](https://nextjs.org/), [`Serverless`](https://www.serverless.com/), [`Fastify`](https://www.fastify.io/), [`Nuxt`](https://nuxtjs.org/) & [`Node:HTTP`](https://nodejs.org/api/http.html).
7471

7572
[`Fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), [`Cloudflare Workers`](https://workers.cloudflare.com/) & more soon™, PRs are welcomed 🙌.
7673

7774
```typescript
7875
import http from 'http';
79-
import { createOpenApiHttpHandler } from 'trpc-openapi';
76+
import { createOpenApiHttpHandler } from '@lilyrose2798/trpc-openapi';
8077

8178
import { appRouter } from '../appRouter';
8279

@@ -89,8 +86,8 @@ server.listen(3000);
8986

9087
```typescript
9188
// client.ts
92-
const res = await fetch('http://localhost:3000/say-hello?name=James', { method: 'GET' });
93-
const body = await res.json(); /* { greeting: 'Hello James!' } */
89+
const res = await fetch('http://localhost:3000/say-hello?name=Lily', { method: 'GET' });
90+
const body = await res.json(); /* { greeting: 'Hello Lily!' } */
9491
```
9592

9693
## Requirements
@@ -140,10 +137,10 @@ export const appRouter = t.router({
140137
});
141138

142139
// Client
143-
const res = await fetch('http://localhost:3000/say-hello/James?greeting=Hello' /* 👈 */, {
140+
const res = await fetch('http://localhost:3000/say-hello/Lily?greeting=Hello' /* 👈 */, {
144141
method: 'GET',
145142
});
146-
const body = await res.json(); /* { greeting: 'Hello James!' } */
143+
const body = await res.json(); /* { greeting: 'Hello Lily!' } */
147144
```
148145

149146
### Request body
@@ -161,12 +158,12 @@ export const appRouter = t.router({
161158
});
162159

163160
// Client
164-
const res = await fetch('http://localhost:3000/say-hello/James' /* 👈 */, {
161+
const res = await fetch('http://localhost:3000/say-hello/Lily' /* 👈 */, {
165162
method: 'POST',
166163
headers: { 'Content-Type': 'application/json' },
167164
body: JSON.stringify({ greeting: 'Hello' }),
168165
});
169-
const body = await res.json(); /* { greeting: 'Hello James!' } */
166+
const body = await res.json(); /* { greeting: 'Hello Lily!' } */
170167
```
171168

172169
### Custom headers
@@ -191,14 +188,14 @@ Explore a [complete example here](examples/with-nextjs/src/server/router.ts).
191188

192189
```typescript
193190
import { TRPCError, initTRPC } from '@trpc/server';
194-
import { OpenApiMeta } from 'trpc-openapi';
191+
import { OpenApiMeta } from '@lilyrose2798/trpc-openapi';
195192

196193
type User = { id: string; name: string };
197194

198195
const users: User[] = [
199196
{
200197
id: 'usr_123',
201-
name: 'James',
198+
name: 'Lily',
202199
},
203200
];
204201

@@ -236,7 +233,7 @@ const res = await fetch('http://localhost:3000/say-hello', {
236233
method: 'GET',
237234
headers: { Authorization: 'Bearer usr_123' } /* 👈 */,
238235
});
239-
const body = await res.json(); /* { greeting: 'Hello James!' } */
236+
const body = await res.json(); /* { greeting: 'Hello Lily!' } */
240237
```
241238

242239
## Examples
@@ -250,7 +247,7 @@ Please see [full example here](examples/with-express).
250247
```typescript
251248
import { createExpressMiddleware } from '@trpc/server/adapters/express';
252249
import express from 'express';
253-
import { createOpenApiExpressMiddleware } from 'trpc-openapi';
250+
import { createOpenApiExpressMiddleware } from '@lilyrose2798/trpc-openapi';
254251

255252
import { appRouter } from '../appRouter';
256253

@@ -268,7 +265,7 @@ Please see [full example here](examples/with-nextjs).
268265

269266
```typescript
270267
// pages/api/[...trpc].ts
271-
import { createOpenApiNextHandler } from 'trpc-openapi';
268+
import { createOpenApiNextHandler } from '@lilyrose2798/trpc-openapi';
272269

273270
import { appRouter } from '../../server/appRouter';
274271

@@ -280,7 +277,7 @@ export default createOpenApiNextHandler({ router: appRouter });
280277
Please see [full example here](examples/with-serverless).
281278

282279
```typescript
283-
import { createOpenApiAwsLambdaHandler } from 'trpc-openapi';
280+
import { createOpenApiAwsLambdaHandler } from '@lilyrose2798/trpc-openapi';
284281

285282
import { appRouter } from './appRouter';
286283

@@ -294,7 +291,7 @@ Please see [full example here](examples/with-fastify).
294291
```typescript
295292
import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify';
296293
import Fastify from 'fastify';
297-
import { fastifyTRPCOpenApiPlugin } from 'trpc-openapi';
294+
import { fastifyTRPCOpenApiPlugin } from '@lilyrose2798/trpc-openapi';
298295

299296
import { appRouter } from './router';
300297

@@ -365,7 +362,3 @@ _Still using tRPC v9? See our [`.interop()`](examples/with-interop) example._
365362
## License
366363

367364
Distributed under the MIT License. See LICENSE for more information.
368-
369-
## Contact
370-
371-
James Berry - Follow me on Twitter [@jlalmes](https://twitter.com/jlalmes) 💚

examples/with-express/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [**`trpc-openapi`**](../../README.md) (with-express)
1+
# [**`@lilyrose2798/trpc-openapi`**](../../README.md) (with-express)
22

33
### Getting started
44

examples/with-express/src/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export const database: { users: User[]; posts: Post[] } = {
1515
users: [
1616
{
1717
id: '3dcb4a1f-0c91-42c5-834f-26d227c532e2',
18-
18+
1919
passcode: 1234,
20-
name: 'James',
20+
name: 'Lily',
2121
},
2222
{
2323
id: 'ea120573-2eb4-495e-be48-1b2debac2640',

examples/with-express/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable @typescript-eslint/no-misused-promises */
2+
import { createOpenApiExpressMiddleware } from '@lilyrose2798/trpc-openapi';
23
import { createExpressMiddleware } from '@trpc/server/adapters/express';
34
import cors from 'cors';
45
import express from 'express';
56
import swaggerUi from 'swagger-ui-express';
6-
import { createOpenApiExpressMiddleware } from 'trpc-openapi';
77

88
import { openApiDocument } from './openapi';
99
import { appRouter, createContext } from './router';

examples/with-express/src/openapi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { generateOpenApiDocument } from 'trpc-openapi';
1+
import { generateOpenApiDocument } from '@lilyrose2798/trpc-openapi';
22

33
import { appRouter } from './router';
44

@@ -8,6 +8,6 @@ export const openApiDocument = generateOpenApiDocument(appRouter, {
88
description: 'OpenAPI compliant REST API built using tRPC with Express',
99
version: '1.0.0',
1010
baseUrl: 'http://localhost:3000/api',
11-
docsUrl: 'https://github.com/jlalmes/trpc-openapi',
11+
docsUrl: 'https://github.com/lilyrose2798/trpc-openapi',
1212
tags: ['auth', 'users', 'posts'],
1313
});

examples/with-express/src/router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { OpenApiMeta } from '@lilyrose2798/trpc-openapi';
12
import { TRPCError, initTRPC } from '@trpc/server';
23
import { CreateExpressContextOptions } from '@trpc/server/adapters/express';
34
import jwt from 'jsonwebtoken';
4-
import { OpenApiMeta } from 'trpc-openapi';
55
import { v4 as uuid } from 'uuid';
66
import { z } from 'zod';
77

examples/with-fastify/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [**`trpc-openapi`**](../../README.md) (with-fastify)
1+
# [**`@lilyrose2798/trpc-openapi`**](../../README.md) (with-fastify)
22

33
### Getting started
44

examples/with-fastify/src/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export const database: { users: User[]; posts: Post[] } = {
1515
users: [
1616
{
1717
id: '3dcb4a1f-0c91-42c5-834f-26d227c532e2',
18-
18+
1919
passcode: '1234',
20-
name: 'James',
20+
name: 'Lily',
2121
},
2222
{
2323
id: 'ea120573-2eb4-495e-be48-1b2debac2640',

examples/with-fastify/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88
import cors from '@fastify/cors';
99
import fastifySwagger from '@fastify/swagger';
10+
import { fastifyTRPCOpenApiPlugin } from '@lilyrose2798/trpc-openapi';
1011
import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify';
1112
import Fastify from 'fastify';
12-
import { fastifyTRPCOpenApiPlugin } from 'trpc-openapi';
1313

1414
import { openApiDocument } from './openapi';
1515
import { appRouter, createContext } from './router';

examples/with-fastify/src/openapi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { generateOpenApiDocument } from 'trpc-openapi';
1+
import { generateOpenApiDocument } from '@lilyrose2798/trpc-openapi';
22

33
import { appRouter } from './router';
44

@@ -8,6 +8,6 @@ export const openApiDocument = generateOpenApiDocument(appRouter, {
88
description: 'OpenAPI compliant REST API built using tRPC with Fastify',
99
version: '1.0.0',
1010
baseUrl: 'http://localhost:3000/api',
11-
docsUrl: 'https://github.com/jlalmes/trpc-openapi',
11+
docsUrl: 'https://github.com/lilyrose2798/trpc-openapi',
1212
tags: ['auth', 'users', 'posts'],
1313
});

examples/with-fastify/src/router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable @typescript-eslint/no-unsafe-call, @typescript-eslint/no-floating-promises, @typescript-eslint/ban-ts-comment */
2+
import { OpenApiMeta } from '@lilyrose2798/trpc-openapi';
23
import { TRPCError, initTRPC } from '@trpc/server';
34
import { CreateFastifyContextOptions } from '@trpc/server/adapters/fastify';
45
import { type FastifyReply, type FastifyRequest } from 'fastify';
56
import jwt from 'jsonwebtoken';
6-
import { OpenApiMeta } from 'trpc-openapi';
77
import { v4 as uuid } from 'uuid';
88
import { z } from 'zod';
99

examples/with-interop/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# [**`trpc-openapi`**](../../README.md) (with-interop)
1+
# [**`@lilyrose2798/trpc-openapi`**](../../README.md) (with-interop)
22

33
### Getting started
44

5-
This example shows the pattern to use a tRPC v10 `.interop()` router whilst also supporting `trpc-openapi`.
5+
This example shows the pattern to use a tRPC v10 `.interop()` router whilst also supporting `@lilyrose2798/trpc-openapi`.
66

77
```bash
88
npm install @trpc/server@next
9-
npm install trpc-openapi@0 --force
9+
npm install @lilyrose2798/trpc-openapi@0 --force
1010
```

examples/with-interop/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { OpenApiMeta } from '@lilyrose2798/trpc-openapi';
12
import * as trpc from '@trpc/server';
2-
import { OpenApiMeta } from 'trpc-openapi';
33
import { z } from 'zod';
44

55
const appRouter = trpc.router<any, OpenApiMeta>().query('echo', {
@@ -14,4 +14,4 @@ export const openApiV0AppRouter = appRouter;
1414

1515
export type AppRouter = typeof trpcV10AppRouter;
1616

17-
// Now add your `@trpc/server` && `trpc-openapi` handlers...
17+
// Now add your `@trpc/server` && `@lilyrose2798/trpc-openapi` handlers...

examples/with-nextjs-appdir/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [**`trpc-openapi`**](../../README.md) (with-nextjs)
1+
# [**`@lilyrose2798/trpc-openapi`**](../../README.md) (with-nextjs)
22

33
### Getting started
44

examples/with-nextjs-appdir/src/app/api/[...trpc]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createOpenApiFetchHandler } from 'trpc-openapi';
1+
import { createOpenApiFetchHandler } from '@lilyrose2798/trpc-openapi';
22

33
import { appRouter, createContext } from '../../../server/router';
44

examples/with-nextjs-appdir/src/server/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export const database: { users: User[]; posts: Post[] } = {
1515
users: [
1616
{
1717
id: '3dcb4a1f-0c91-42c5-834f-26d227c532e2',
18-
18+
1919
passcode: 1234,
20-
name: 'James',
20+
name: 'Lily',
2121
},
2222
{
2323
id: 'ea120573-2eb4-495e-be48-1b2debac2640',

0 commit comments

Comments
 (0)