Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20,387 changes: 0 additions & 20,387 deletions .pnp.cjs

This file was deleted.

2,076 changes: 0 additions & 2,076 deletions .pnp.loader.mjs

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
},
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks"
}
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/bin/eslint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint your application uses
module.exports = absRequire(`eslint`);
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/unsupported-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);
14 changes: 14 additions & 0 deletions .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "eslint",
"version": "8.57.0-sdk",
"main": "./lib/api.js",
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
},
"devDependencies": {
"@daehwahap/eslint-config": "*",
"@types/eslint": "^8",
"eslint": "8.57.0",
"prettier": "^3.2.5",
"turbo": "latest",
"typescript": "^5.4.3"
Expand Down
7 changes: 7 additions & 0 deletions packages/eslint-config/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ module.exports = {
'node_modules/',
],
overrides: [{ files: ['*.js?(x)', '*.ts?(x)'] }],
rules: {
'import/prefer-default-export': 'off',
'react/function-component-definition': [
2,
{ namedComponents: ['arrow-function', 'function-declaration'] },
],
},
}
10 changes: 10 additions & 0 deletions packages/eslint-config/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,14 @@ module.exports = {
// Force ESLint to detect .tsx files
{ files: ['*.js?(x)', '*.ts?(x)'] },
],
rules: {
'import/prefer-default-export': 'off',
rules: {
'import/prefer-default-export': 'off',
'react/function-component-definition': [
2,
{ namedComponents: ['arrow-function', 'function-declaration'] },
],
},
},
}
12 changes: 7 additions & 5 deletions server/daehwahap-server/src/trpc/trpc.router.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { UserController } from './user/user.controller'
import { INestApplication, Injectable } from '@nestjs/common'
import { TrpcService } from './trpc.service'
import * as trpcExpress from '@trpc/server/adapters/express'
import { TrpcService } from './trpc.service'

@Injectable()
export class TrpcRouter {
constructor(
private readonly trpcService: TrpcService,
private readonly userController: UserController,
) {}
private readonly trpcService: TrpcService,
) {
this.mergeRouter = this.trpcService.mergeRouters(this.userController.router)
}

mergeRouter = this.trpcService.mergeRouters(this.userController.router)
mergeRouter

async applyMiddleware(app: INestApplication) {
app.use(
Expand All @@ -22,4 +24,4 @@ export class TrpcRouter {
}
}

export type AppRouter = TrpcRouter[`mergeRouter`]
export type AppRouter = TrpcRouter['mergeRouter']
18 changes: 0 additions & 18 deletions server/daehwahap-server/src/trpc/trpc.service.spec.ts

This file was deleted.

14 changes: 10 additions & 4 deletions server/daehwahap-server/src/trpc/trpc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ import { initTRPC } from '@trpc/server'

@Injectable()
export class TrpcService {
trpc = initTRPC.create()
procedure = this.trpc.procedure
router = this.trpc.router
mergeRouters = this.trpc.mergeRouters
constructor() {
this.trpc = initTRPC.create()
this.procedure = this.trpc.procedure
this.router = this.trpc.router
this.mergeRouters = this.trpc.mergeRouters
}
private trpc
procedure
router
mergeRouters
}
11 changes: 6 additions & 5 deletions server/daehwahap-server/src/trpc/user/user.controller.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { UserService } from './user.service'
import { Injectable } from '@nestjs/common'
import { TrpcService } from '../trpc.service'
import { z } from 'zod'

@Injectable()
export class UserController {
constructor(
private readonly trpcService: TrpcService,
private readonly UserService: UserService,
) {}
) {
this.router = this.trpcService.router({
createUser: this.UserService.createUser,
})
}

router = this.trpcService.router({
createUser: this.UserService.createUser,
})
router
}
2 changes: 1 addition & 1 deletion server/daehwahap-server/src/trpc/user/user.repository.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common'
import { PrismaService } from 'src/prisma/prisma.service'
import { PrismaService } from '../../prisma/prisma.service'
import { Prisma } from '@prisma/client'

@Injectable()
Expand Down
18 changes: 0 additions & 18 deletions server/daehwahap-server/src/trpc/user/user.service.spec.ts

This file was deleted.

14 changes: 9 additions & 5 deletions server/daehwahap-server/src/trpc/user/user.service.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import { UserRepository } from './user.repository'
import { Injectable } from '@nestjs/common'
import { TrpcService } from '../trpc.service'
import { UserCreateInputSchema } from 'prisma/dto/zod'
import { UserCreateInputSchema } from '../../../prisma/dto/zod'

@Injectable()
export class UserService {
constructor(
private readonly trpcService: TrpcService,
private readonly userRepository: UserRepository,
) {}
) {
this.createUser = this.trpcService.procedure
.input(UserCreateInputSchema)
.mutation(({ input }) => {
this.userRepository.createUser(input)
})
}

createUser = this.trpcService.procedure.input(UserCreateInputSchema).mutation(({ input }) => {
this.userRepository.createUser(input)
})
createUser
}
3 changes: 1 addition & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"composite": true,
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"incremental": true,
"noEmitOnError": true,
"skipLibCheck": true,
Expand All @@ -17,6 +16,6 @@
"isolatedModules": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"resolveJsonModule": true
}
}
1 change: 1 addition & 0 deletions web/daehwahap-webview/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
16 changes: 8 additions & 8 deletions web/daehwahap-webview/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
<h2 className="mb-3 text-2xl font-semibold">
Docs{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
<p className="m-0 max-w-[30ch] text-sm opacity-50">
Find in-depth information about Next.js features and API.
</p>
</a>
Expand All @@ -63,13 +63,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
<h2 className="mb-3 text-2xl font-semibold">
Learn{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
<p className="m-0 max-w-[30ch] text-sm opacity-50">
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>
Expand All @@ -80,13 +80,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
<h2 className="mb-3 text-2xl font-semibold">
Templates{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
<p className="m-0 max-w-[30ch] text-sm opacity-50">
Explore starter templates for Next.js.
</p>
</a>
Expand All @@ -97,13 +97,13 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
<h2 className="mb-3 text-2xl font-semibold">
Deploy{' '}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
<p className="m-0 max-w-[30ch] text-sm opacity-50 text-balance">
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
Expand Down
5 changes: 3 additions & 2 deletions web/daehwahap-webview/src/app/trpc/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { trpc } from '../../trpc'

const TrpcPage = async () => {
const { greeting } = await trpc.createUser.mutate({ greeting: 'aa' })
await trpc.createUser.mutate({ email: 'aa', name: 'aa', password: 'aa' })

return <div>{greeting}</div>
// return <div>{greeting}</div>
return null
}

export default TrpcPage
5 changes: 4 additions & 1 deletion web/daehwahap-webview/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"name": "next"
}
],
"jsx": "preserve"
"jsx": "preserve",
"noEmit": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
"include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
Expand Down
2 changes: 2 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ __metadata:
dependencies:
"@daehwahap/daehwahap-server": "workspace:^"
"@daehwahap/eslint-config": "npm:*"
"@types/eslint": "npm:^8"
eslint: "npm:8.57.0"
prettier: "npm:^3.2.5"
turbo: "npm:latest"
typescript: "npm:^5.4.3"
Expand Down