From 1291d372b9b53efb75759d1a104eaddfc415ab88 Mon Sep 17 00:00:00 2001 From: gotti Date: Thu, 23 Nov 2023 20:52:13 +0900 Subject: [PATCH] fix path --- .../state-StateManagerService_connectquery.ts | 170 ------------------ frontend/dashboard/package.json | 1 + pnpm-lock.yaml | 3 + proto/buf.gen.yaml | 2 +- 4 files changed, 5 insertions(+), 171 deletions(-) delete mode 100644 backend/dashboard/proto/state/v1/state-StateManagerService_connectquery.ts diff --git a/backend/dashboard/proto/state/v1/state-StateManagerService_connectquery.ts b/backend/dashboard/proto/state/v1/state-StateManagerService_connectquery.ts deleted file mode 100644 index d9922d5..0000000 --- a/backend/dashboard/proto/state/v1/state-StateManagerService_connectquery.ts +++ /dev/null @@ -1,170 +0,0 @@ -// @generated by protoc-gen-connect-query v0.6.0 with parameter "target=ts" -// @generated from file state/v1/state.proto (package state.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { GetBlockStatesRequest, GetBlockStatesResponse, UpdateBlockStateRequest, UpdateBlockStateResponse } from "./block_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; -import { GetPointStatesRequest, GetPointStatesResponse, UpdatePointStateRequest, UpdatePointStateResponse } from "./point_pb.js"; -import { GetStopStatesRequest, GetStopStatesResponse, UpdateStopStateRequest, UpdateStopStateResponse } from "./stop_pb.js"; -import { AddTrainRequest, AddTrainResponse, GetTrainsRequest, GetTrainsResponse, UpdateTrainRequest, UpdateTrainResponse } from "./train_pb.js"; -import { createQueryService, createUnaryHooks, UnaryFunctionsWithHooks } from "@connectrpc/connect-query"; - -export const typeName = "state.v1.StateManagerService"; - -/** - * - * StateManagerが提供するサービス - * AutoOperationとフロントエンド間の通信に利用される - * - * @generated from service state.v1.StateManagerService - */ -export const StateManagerService = { - typeName: "state.v1.StateManagerService", - methods: { - /** - * Block - * - * @generated from rpc state.v1.StateManagerService.GetBlockStates - */ - getBlockStates: { - name: "GetBlockStates", - I: GetBlockStatesRequest, - O: GetBlockStatesResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc state.v1.StateManagerService.UpdateBlockState - */ - updateBlockState: { - name: "UpdateBlockState", - I: UpdateBlockStateRequest, - O: UpdateBlockStateResponse, - kind: MethodKind.Unary, - }, - /** - * Point - * - * @generated from rpc state.v1.StateManagerService.UpdatePointState - */ - updatePointState: { - name: "UpdatePointState", - I: UpdatePointStateRequest, - O: UpdatePointStateResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc state.v1.StateManagerService.GetPointStates - */ - getPointStates: { - name: "GetPointStates", - I: GetPointStatesRequest, - O: GetPointStatesResponse, - kind: MethodKind.Unary, - }, - /** - * Stop - * - * @generated from rpc state.v1.StateManagerService.UpdateStopState - */ - updateStopState: { - name: "UpdateStopState", - I: UpdateStopStateRequest, - O: UpdateStopStateResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc state.v1.StateManagerService.GetStopStates - */ - getStopStates: { - name: "GetStopStates", - I: GetStopStatesRequest, - O: GetStopStatesResponse, - kind: MethodKind.Unary, - }, - /** - * Train - * - * @generated from rpc state.v1.StateManagerService.GetTrains - */ - getTrains: { - name: "GetTrains", - I: GetTrainsRequest, - O: GetTrainsResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc state.v1.StateManagerService.AddTrain - */ - addTrain: { - name: "AddTrain", - I: AddTrainRequest, - O: AddTrainResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc state.v1.StateManagerService.UpdateTrain - */ - updateTrain: { - name: "UpdateTrain", - I: UpdateTrainRequest, - O: UpdateTrainResponse, - kind: MethodKind.Unary, - }, - } -} as const; - -const $queryService = createQueryService({ service: StateManagerService,}); - -/** - * Block - * - * @generated from rpc state.v1.StateManagerService.GetBlockStates - */ -export const getBlockStates: UnaryFunctionsWithHooks = { ...$queryService.getBlockStates, ...createUnaryHooks($queryService.getBlockStates)}; - -/** - * @generated from rpc state.v1.StateManagerService.UpdateBlockState - */ -export const updateBlockState: UnaryFunctionsWithHooks = { ...$queryService.updateBlockState, ...createUnaryHooks($queryService.updateBlockState)}; - -/** - * Point - * - * @generated from rpc state.v1.StateManagerService.UpdatePointState - */ -export const updatePointState: UnaryFunctionsWithHooks = { ...$queryService.updatePointState, ...createUnaryHooks($queryService.updatePointState)}; - -/** - * @generated from rpc state.v1.StateManagerService.GetPointStates - */ -export const getPointStates: UnaryFunctionsWithHooks = { ...$queryService.getPointStates, ...createUnaryHooks($queryService.getPointStates)}; - -/** - * Stop - * - * @generated from rpc state.v1.StateManagerService.UpdateStopState - */ -export const updateStopState: UnaryFunctionsWithHooks = { ...$queryService.updateStopState, ...createUnaryHooks($queryService.updateStopState)}; - -/** - * @generated from rpc state.v1.StateManagerService.GetStopStates - */ -export const getStopStates: UnaryFunctionsWithHooks = { ...$queryService.getStopStates, ...createUnaryHooks($queryService.getStopStates)}; - -/** - * Train - * - * @generated from rpc state.v1.StateManagerService.GetTrains - */ -export const getTrains: UnaryFunctionsWithHooks = { ...$queryService.getTrains, ...createUnaryHooks($queryService.getTrains)}; - -/** - * @generated from rpc state.v1.StateManagerService.AddTrain - */ -export const addTrain: UnaryFunctionsWithHooks = { ...$queryService.addTrain, ...createUnaryHooks($queryService.addTrain)}; - -/** - * @generated from rpc state.v1.StateManagerService.UpdateTrain - */ -export const updateTrain: UnaryFunctionsWithHooks = { ...$queryService.updateTrain, ...createUnaryHooks($queryService.updateTrain)}; diff --git a/frontend/dashboard/package.json b/frontend/dashboard/package.json index 205ddd6..5635044 100644 --- a/frontend/dashboard/package.json +++ b/frontend/dashboard/package.json @@ -14,6 +14,7 @@ "@connectrpc/connect": "^1.1.3", "@connectrpc/connect-query": "^0.6.0", "@connectrpc/connect-web": "^1.1.3", + "@tanstack/react-query": "^5.8.4", "clsx": "^2.0.0", "next": "14.0.3", "react": "18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cfbebb0..2f8946a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ importers: '@connectrpc/connect-web': specifier: ^1.1.3 version: 1.1.3(@bufbuild/protobuf@1.4.2)(@connectrpc/connect@1.1.3) + '@tanstack/react-query': + specifier: ^5.8.4 + version: 5.8.4(react-dom@18.2.0)(react@18.2.0) clsx: specifier: ^2.0.0 version: 2.0.0 diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index 8bace35..955d07c 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -24,7 +24,7 @@ plugins: - target=dts+js - plugin: connect-query path: ../frontend/dashboard/node_modules/.bin/protoc-gen-connect-query - out: ../backend/dashboard/proto + out: ../frontend/dashboard/proto opt: - target=ts - plugin: es