diff --git a/backend/ats/package.json b/backend/ats/package.json index 8de38735..231fb432 100644 --- a/backend/ats/package.json +++ b/backend/ats/package.json @@ -8,7 +8,7 @@ "@types/jest": "^29.2.0", "@types/js-yaml": "^4.0.5", "google-protobuf": "3.21.2", - "grpc-tools": "1.11.3", + "grpc-tools": "1.12.0", "jest": "^29.2.2", "protoc-gen-ts": "0.8.5", "ts-jest": "^29.0.3", diff --git a/backend/ats/spec/ats_pb.js b/backend/ats/spec/ats_pb.js index 3cc12aee..f396debb 100644 --- a/backend/ats/spec/ats_pb.js +++ b/backend/ats/spec/ats_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); goog.exportSymbol('proto.SendStatusRequest', null, global); goog.exportSymbol('proto.SendStatusRequest.SensorName', null, global); diff --git a/backend/ats/spec/block_pb.js b/backend/ats/spec/block_pb.js index 86d12774..d9bbd993 100644 --- a/backend/ats/spec/block_pb.js +++ b/backend/ats/spec/block_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); goog.exportSymbol('proto.BlockAndState', null, global); goog.exportSymbol('proto.BlockId', null, global); diff --git a/backend/ats/spec/speedControl_pb.js b/backend/ats/spec/speedControl_pb.js index 702c4fc2..7ae7cf37 100644 --- a/backend/ats/spec/speedControl_pb.js +++ b/backend/ats/spec/speedControl_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); goog.exportSymbol('proto.SendSpeed', null, global); goog.exportSymbol('proto.SendSpeed.Train', null, global); diff --git a/backend/ats/spec/statesync_pb.js b/backend/ats/spec/statesync_pb.js index d42618bb..afd64fe0 100644 --- a/backend/ats/spec/statesync_pb.js +++ b/backend/ats/spec/statesync_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); goog.exportSymbol('proto.NotifyPointStateRequest', null, global); goog.exportSymbol('proto.NotifyPointStateResponse', null, global); diff --git a/backend/ats/yarn.lock b/backend/ats/yarn.lock index eb447448..70182b6e 100644 --- a/backend/ats/yarn.lock +++ b/backend/ats/yarn.lock @@ -1364,10 +1364,10 @@ graceful-fs@^4.2.9: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -grpc-tools@1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/grpc-tools/-/grpc-tools-1.11.3.tgz#8218a86ef994e58bd06330b74033de8d7719ea0d" - integrity sha512-cRSK2uhDKHtZ9hLRM35HxaMAMxyh/L7C96Ojt58DhQBdwTOQlV1VIJHSK6X/pDeSQKhaQqWMFfebt8tIcvRfjQ== +grpc-tools@1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/grpc-tools/-/grpc-tools-1.12.0.tgz#9620c6c4566a18ada68a1a87158e1754ef42752a" + integrity sha512-OMF6ZR0rLQsCvPrXNGXR/iWZItKm6W2q/uO56WWYRzqZztETaFX82cRDiVCX3JEJeN5+TTKJbXzovb3KZ2HMDA== dependencies: "@mapbox/node-pre-gyp" "^1.0.5"