Skip to content

Commit ac430ef

Browse files
committed
feat: Add vitnode package to organization
1 parent bcf2a8e commit ac430ef

Some content is hidden

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

80 files changed

+152
-160
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/apps/web/src/app/[locale]/(main)/(plugins)
2+
/apps/web/src/app/[locale]/admin/(auth)/(plugins)

apps/docs/content/docs/dev/debugging.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Want to know exactly what's happening with your API calls? Next.js has your back
3838

3939
```ts title="next.config.ts"
4040
import type { NextConfig } from 'next';
41-
import { vitNodeNextConfig } from 'vitnode/config/next.config';
41+
import { vitNodeNextConfig } from '@vitnode/core/config/next.config';
4242

4343
const nextConfig: NextConfig = {
4444
// [!code ++]

apps/docs/content/docs/dev/fetcher.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ The VitNode fetcher provides a type-safe RPC (Remote Procedure Call) style inter
1515
First, import the required dependencies:
1616

1717
```ts
18-
import { fetcher } from 'vitnode/lib/fetcher';
19-
import { usersModule } from 'vitnode/api/modules/users/users.module';
18+
import { fetcher } from '@vitnode/core/lib/fetcher';
19+
import { usersModule } from '@vitnode/core/api/modules/users/users.module';
2020
```
2121

2222
Make your first API call:

apps/docs/content/docs/dev/i18n/namespaces.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To translate your content, select the plugin in `frontend` folder, go to `langs`
4949
To get access to the translation strings in other namespaces you need to use the `TranslationsProvider` component.
5050

5151
```tsx title="apps/frontend/src/app/[locale]/(main)/{your_plugin}/layout.tsx"
52-
import { I18nProvider } from 'vitnode/components/i18n-provider';
52+
import { I18nProvider } from '@vitnode/core/components/i18n-provider';
5353

5454
export default function Layout({ children }: { children: React.ReactNode }) {
5555
return <I18nProvider namespaces={['welcome.home']}>{children}</I18nProvider>;

apps/docs/content/docs/dev/pagination.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ import { middlewareModule } from '@/api/modules/middleware/middleware.module';
167167
import {
168168
DataTable,
169169
SearchParamsDataTable,
170-
} from 'vitnode/components/table/data-table';
171-
import { fetcher } from 'vitnode/lib/fetcher';
170+
} from '@vitnode/core/components/table/data-table';
171+
import { fetcher } from '@vitnode/core/lib/fetcher';
172172

173173
export const UsersAdminView = async ({
174174
searchParams,

apps/docs/content/docs/dev/sso.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Callout } from 'fumadocs-ui/components/callout';
1717
Let's start with the basics. Create a new file for your SSO provider:
1818

1919
```ts title="src/utils/sso/discord_api.ts"
20-
import { SSOApiPlugin, getRedirectUri } from 'vitnode/api/models/sso';
20+
import { SSOApiPlugin, getRedirectUri } from '@vitnode/core/api/models/sso';
2121

2222
export const DiscordSSOApiPlugin = ({
2323
clientId,
@@ -43,7 +43,7 @@ This is like creating a blueprint for your SSO provider. The `id` will be used i
4343
Now let's add the magic that sends users to Discord for login:
4444

4545
```ts title="src/utils/sso/discord_api.ts"
46-
import { SSOApiPlugin, getRedirectUri } from 'vitnode/api/models/sso';
46+
import { SSOApiPlugin, getRedirectUri } from '@vitnode/core/api/models/sso';
4747

4848
export const DiscordSSOApiPlugin = ({
4949
clientId,
@@ -94,7 +94,7 @@ export const DiscordSSOApiPlugin = ({
9494
After the user approves access, Discord sends us a code. Let's exchange it for an access token:
9595

9696
```ts title="src/utils/sso/discord_api.ts"
97-
import { SSOApiPlugin, getRedirectUri } from 'vitnode/api/models/sso';
97+
import { SSOApiPlugin, getRedirectUri } from '@vitnode/core/api/models/sso';
9898
import { HTTPException } from 'hono/http-exception';
9999
import { ContentfulStatusCode } from 'hono/utils/http-status';
100100
import { z } from 'zod';
@@ -205,7 +205,7 @@ export const DiscordSSOApiPlugin = ({
205205
Finally, let's get the user's profile data using our shiny new access token:
206206

207207
```ts title="src/utils/sso/discord_api.ts"
208-
import { SSOApiPlugin, getRedirectUri } from 'vitnode/api/models/sso';
208+
import { SSOApiPlugin, getRedirectUri } from '@vitnode/core/api/models/sso';
209209
import { HTTPException } from 'hono/http-exception';
210210
import { ContentfulStatusCode } from 'hono/utils/http-status';
211211
import { z } from 'zod';
@@ -324,7 +324,7 @@ Last step! Let's plug your new SSO provider into your app:
324324
```ts title="src/app/api/[...route]/route.ts"
325325
import { OpenAPIHono } from '@hono/zod-openapi';
326326
import { handle } from 'hono/vercel';
327-
import { VitNodeAPI } from 'vitnode/api/config';
327+
import { VitNodeAPI } from '@vitnode/core/api/config';
328328
import { DiscordSSOApiPlugin } from '@/utils/sso/discord_api';
329329

330330
const app = new OpenAPIHono().basePath('/api');

apps/docs/content/docs/guides/sso/discord.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Add the Discord SSO plugin to your API routes.
6060

6161
```ts title="src/app/api/[...route]/route.ts"
6262
// [!code ++]
63-
import { DiscordSSOApiPlugin } from 'vitnode/api/plugins/sso/discord';
63+
import { DiscordSSOApiPlugin } from '@vitnode/core/api/plugins/sso/discord';
6464

6565
VitNodeAPI({
6666
app,

apps/docs/content/docs/guides/sso/facebook.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Add the Facebook SSO plugin to your API routes.
5454

5555
```ts title="src/app/api/[...route]/route.ts"
5656
// [!code ++]
57-
import { FacebookSSOApiPlugin } from 'vitnode/api/plugins/sso/facebook';
57+
import { FacebookSSOApiPlugin } from '@vitnode/core/api/plugins/sso/facebook';
5858

5959
VitNodeAPI({
6060
app,

apps/docs/content/docs/guides/sso/google.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Add the Discord SSO plugin to your API routes.
115115

116116
```ts title="src/app/api/[...route]/route.ts"
117117
// [!code ++]
118-
import { GoogleSSOApiPlugin } from 'vitnode/api/plugins/sso/google';
118+
import { GoogleSSOApiPlugin } from '@vitnode/core/api/plugins/sso/google';
119119

120120
VitNodeAPI({
121121
app,

apps/docs/content/docs/ui/auto-form.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ description: Component creates form based on Zod schemas & react-hook-form with
77

88
```tsx
99
import { z } from 'zod';
10-
import { AutoForm } from 'vitnode/components/form/auto-form';
11-
import { AutoFormInput } from 'vitnode/components/form/fields/input';
10+
import { AutoForm } from '@vitnode/core/components/form/auto-form';
11+
import { AutoFormInput } from '@vitnode/core/components/form/fields/input';
1212
```
1313

1414
```ts

0 commit comments

Comments
 (0)