Code Generator는 Parser가 생성한 Protobuf AST를 받아서 타입 안전한 TypeScript 코드를 생성하는 핵심 컴포넌트입니다. Generator는 gRPC 서비스 스텁, 메시지 타입 정의, React Hook 통합 코드를 생성하며, google-protobuf 라이브러리와 @improbable-eng/grpc-web를 활용한 런타임 직렬화/역직렬화를 지원합니다. 생성된 코드는 Promise API와 React Hook API 두 가지 사용 패턴을 모두 지원합니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "tools": [ | |
| { | |
| "name": "browser_click", | |
| "title": "Click", | |
| "description": "Perform click on a web page", | |
| "inputSchema": { | |
| "type": "object", | |
| "properties": { | |
| "element": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.coroutine | |
| import io.kotest.core.spec.style.DescribeSpec | |
| import io.kotest.matchers.shouldBe | |
| import kotlinx.coroutines.* | |
| import kotlinx.coroutines.reactive.awaitFirstOrNull | |
| import kotlinx.coroutines.reactor.mono | |
| import org.jooq.DSLContext | |
| import org.jooq.impl.DSL | |
| import kotlin.coroutines.CoroutineContext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Alpha Component</key> | |
| <real>1</real> | |
| <key>Blue Component</key> | |
| <real>0.20796161890029907</real> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| EXTERNAL_IP=$(dig +short myip.opendns.com @resolver1.opendns.com) | |
| curl -sfL https://get.k3s.io | sh -s - \ | |
| --disable=traefik \ | |
| --no-deploy=traefik \ | |
| --write-kubeconfig-mode=644 \ | |
| --tls-san=${EXTERNAL_IP} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ApolloClient, ApolloLink, HttpLink, InMemoryCache, split } from '@apollo/client' | |
| import { WebSocketLink } from '@apollo/client/link/ws' | |
| const httpLink = new HttpLink({ | |
| uri: '/graphql', | |
| }) | |
| const wsLink = new WebSocketLink({ | |
| uri: `${getWebsocketURI()}/subscriptions`, | |
| options: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <reference types="react-scripts" /> | |
| declare module 'react-router' { | |
| import type { Location, State } from 'history' | |
| export type * from 'react-router' | |
| export declare function useLocation<S extends State = State>(): Location<S> | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { proxy, useSnapshot } from "valtio"; | |
| class Store { | |
| public counter = 0; | |
| public text = ""; | |
| get double() { | |
| return this.counter * 2; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Query { | |
| post(where: PostWhereUniqueInput!): Post | |
| findFirstPost( | |
| where: PostWhereInput | |
| orderBy: [PostOrderByInput!] | |
| cursor: PostWhereUniqueInput | |
| take: Int | |
| skip: Int | |
| distinct: [PostScalarFieldEnum!] | |
| ): Post |
NewerOlder