File tree 2 files changed +13
-5
lines changed
src/main/azure-functions-language-worker-protobuf
2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -52,10 +52,19 @@ set OUTDIR=%MSGDIR%\DotNet
52
52
mkdir %OUTDIR%
53
53
%GRPC_TOOLS_PATH%\protoc.exe %PROTO% --csharp_out %OUTDIR% --grpc_out=%OUTDIR% --plugin=protoc-gen-grpc=%GRPC_TOOLS_PATH%\grpc_csharp_plugin.exe --proto_path=%PROTO_PATH% --proto_path=%PROTOBUF_TOOLS%
54
54
```
55
- ## Java
56
- --TODO--
57
-
58
55
## JavaScript
56
+ In package.json, add to the build script the following commands to build .js files and to build .ts files. Use and install npm package ` protobufjs ` .
57
+
58
+ Generate JavaScript files:
59
+ ```
60
+ pbjs -t json-module -w commonjs -o azure-functions-language-worker-protobuf/src/rpc.js azure-functions-language-worker-protobuf/src/proto/FunctionRpc.proto
61
+ ```
62
+ Generate TypeScript files:
63
+ ```
64
+ pbjs -t static-module azure-functions-language-worker-protobuf/src/proto/FunctionRpc.proto -o azure-functions-language-worker-protobuf/src/rpc_static.js && pbts -o azure-functions-language-worker-protobuf/src/rpc.d.ts azure-functions-language-worker-protobuf/src/rpc_static.js
65
+ ```
66
+
67
+ ## Java
59
68
Maven plugin : [ protobuf-maven-plugin] ( https://www.xolstice.org/protobuf-maven-plugin/ )
60
69
In pom.xml add following under configuration for this plugin
61
70
<protoSourceRoot >${basedir}/<path to this repo >/azure-functions-language-worker-protobuf/src/proto</protoSourceRoot >
Original file line number Diff line number Diff line change @@ -4,10 +4,9 @@ syntax = "proto3";
4
4
option java_multiple_files = true ;
5
5
option java_package = "com.microsoft.azure.functions.rpc.messages" ;
6
6
option java_outer_classname = "FunctionProto" ;
7
- option objc_class_prefix = "FunctionRpc" ;
8
7
option csharp_namespace = "Microsoft.Azure.WebJobs.Script.Grpc.Messages" ;
9
8
10
- package FunctionRpc ;
9
+ package AzureFunctionsRpcMessages ;
11
10
12
11
import "google/protobuf/duration.proto" ;
13
12
You can’t perform that action at this time.
0 commit comments