File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/implementation/Client Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { Settings } from "../../../utils/Settings.util";
19
19
import { Logger } from "../../../logger/Logger" ;
20
20
import GRPCClientSidecar from "./sidecar" ;
21
21
import DaprClient from "../DaprClient" ;
22
- import pkg from "../../../../package.json " ;
22
+ import { SDK_VERSION } from "../../../version " ;
23
23
import communicationProtocolEnum from "../../../enum/CommunicationProtocol.enum" ;
24
24
import { GrpcEndpoint } from "../../../network/GrpcEndpoint" ;
25
25
@@ -116,7 +116,7 @@ export default class GRPCClient implements IClient {
116
116
options [ "grpc-node.max_session_memory" ] = Number . MAX_SAFE_INTEGER ;
117
117
118
118
// Add user agent
119
- options [ "grpc.primary_user_agent" ] = "dapr-sdk-js/v" + pkg . version ;
119
+ options [ "grpc.primary_user_agent" ] = "dapr-sdk-js/v" + SDK_VERSION ;
120
120
121
121
// Add interceptors if we have an API token
122
122
if ( this . options . daprApiToken !== "" ) {
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ export default class HTTPClient implements IClient {
155
155
clientOptions . headers [ "dapr-api-token" ] = this . options . daprApiToken ;
156
156
}
157
157
158
- clientOptions . headers [ "user-agent" ] = `dapr-sdk-js/v${ pkg . version } http/1` ;
158
+ clientOptions . headers [ "user-agent" ] = `dapr-sdk-js/v${ SDK_VERSION } http/1` ;
159
159
160
160
// Set Body and Content-Type Header
161
161
if ( params ?. body ) {
You can’t perform that action at this time.
0 commit comments