examples to new tsrpc-cli
This commit is contained in:
@@ -7,15 +7,15 @@
|
||||
"build": "webpack --mode=production"
|
||||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^9.0.0",
|
||||
"html-webpack-plugin": "^5.3.1",
|
||||
"ts-loader": "^9.2.3",
|
||||
"typescript": "^4.3.4",
|
||||
"webpack": "^5.39.1",
|
||||
"webpack-cli": "^4.7.2",
|
||||
"copy-webpack-plugin": "^9.0.1",
|
||||
"html-webpack-plugin": "^5.3.2",
|
||||
"ts-loader": "^9.2.6",
|
||||
"typescript": "^4.4.3",
|
||||
"webpack": "^5.57.1",
|
||||
"webpack-cli": "^4.9.0",
|
||||
"webpack-dev-server": "^3.11.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"tsrpc-browser": "^3.0.3"
|
||||
"tsrpc-browser": "^3.0.7"
|
||||
}
|
||||
}
|
||||
|
1
examples/file-upload/frontend/src/shared
Symbolic link
1
examples/file-upload/frontend/src/shared
Symbolic link
@@ -0,0 +1 @@
|
||||
../../backend/src/shared
|
@@ -1,8 +0,0 @@
|
||||
export interface ReqUpload {
|
||||
fileName: string,
|
||||
fileData: Uint8Array
|
||||
}
|
||||
|
||||
export interface ResUpload {
|
||||
url: string;
|
||||
}
|
@@ -1,59 +0,0 @@
|
||||
import { ServiceProto } from 'tsrpc-proto';
|
||||
import { ReqUpload, ResUpload } from './PtlUpload';
|
||||
|
||||
export interface ServiceType {
|
||||
api: {
|
||||
"Upload": {
|
||||
req: ReqUpload,
|
||||
res: ResUpload
|
||||
}
|
||||
},
|
||||
msg: {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export const serviceProto: ServiceProto<ServiceType> = {
|
||||
"version": 2,
|
||||
"services": [
|
||||
{
|
||||
"id": 0,
|
||||
"name": "Upload",
|
||||
"type": "api"
|
||||
}
|
||||
],
|
||||
"types": {
|
||||
"PtlUpload/ReqUpload": {
|
||||
"type": "Interface",
|
||||
"properties": [
|
||||
{
|
||||
"id": 0,
|
||||
"name": "fileName",
|
||||
"type": {
|
||||
"type": "String"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "fileData",
|
||||
"type": {
|
||||
"type": "Buffer",
|
||||
"arrayType": "Uint8Array"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"PtlUpload/ResUpload": {
|
||||
"type": "Interface",
|
||||
"properties": [
|
||||
{
|
||||
"id": 2,
|
||||
"name": "url",
|
||||
"type": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user