diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..46c13ba5d6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +**/*_pb.js linguist-generated=true diff --git a/pkg/app/helloworld/service/service.pb.go b/pkg/app/helloworld/service/service.pb.go index eb231157b7..3975fa6078 100644 --- a/pkg/app/helloworld/service/service.pb.go +++ b/pkg/app/helloworld/service/service.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/app/helloworld/service/service.proto package service diff --git a/pkg/app/helloworld/service/service_grpc.pb.go b/pkg/app/helloworld/service/service_grpc.pb.go index c3c44b7b6f..ae42e3b779 100644 --- a/pkg/app/helloworld/service/service_grpc.pb.go +++ b/pkg/app/helloworld/service/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.18.1 +// - protoc v3.21.12 // source: pkg/app/helloworld/service/service.proto package service diff --git a/pkg/app/pipedv1/cmd/piped/service/service.pb.go b/pkg/app/pipedv1/cmd/piped/service/service.pb.go index ac726c08f6..def4a8efc0 100644 --- a/pkg/app/pipedv1/cmd/piped/service/service.pb.go +++ b/pkg/app/pipedv1/cmd/piped/service/service.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/app/pipedv1/cmd/piped/service/service.proto package service diff --git a/pkg/app/pipedv1/cmd/piped/service/service_grpc.pb.go b/pkg/app/pipedv1/cmd/piped/service/service_grpc.pb.go index 5c566bbf26..e33867e06e 100644 --- a/pkg/app/pipedv1/cmd/piped/service/service_grpc.pb.go +++ b/pkg/app/pipedv1/cmd/piped/service/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.18.1 +// - protoc v3.21.12 // source: pkg/app/pipedv1/cmd/piped/service/service.proto package service diff --git a/pkg/app/server/service/apiservice/service.pb.go b/pkg/app/server/service/apiservice/service.pb.go index fda08800a7..481ea247db 100644 --- a/pkg/app/server/service/apiservice/service.pb.go +++ b/pkg/app/server/service/apiservice/service.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/app/server/service/apiservice/service.proto package apiservice diff --git a/pkg/app/server/service/apiservice/service_grpc.pb.go b/pkg/app/server/service/apiservice/service_grpc.pb.go index 078617e217..a7e5c77134 100644 --- a/pkg/app/server/service/apiservice/service_grpc.pb.go +++ b/pkg/app/server/service/apiservice/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.18.1 +// - protoc v3.21.12 // source: pkg/app/server/service/apiservice/service.proto package apiservice diff --git a/pkg/app/server/service/pipedservice/service.pb.go b/pkg/app/server/service/pipedservice/service.pb.go index 5578e3ba91..c89413e19e 100644 --- a/pkg/app/server/service/pipedservice/service.pb.go +++ b/pkg/app/server/service/pipedservice/service.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/app/server/service/pipedservice/service.proto package pipedservice diff --git a/pkg/app/server/service/pipedservice/service_grpc.pb.go b/pkg/app/server/service/pipedservice/service_grpc.pb.go index a10b54a270..4544d40495 100644 --- a/pkg/app/server/service/pipedservice/service_grpc.pb.go +++ b/pkg/app/server/service/pipedservice/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.18.1 +// - protoc v3.21.12 // source: pkg/app/server/service/pipedservice/service.proto package pipedservice diff --git a/pkg/app/server/service/webservice/service.pb.auth.go b/pkg/app/server/service/webservice/service.pb.auth.go index 74ca7162e8..2768288664 100644 --- a/pkg/app/server/service/webservice/service.pb.auth.go +++ b/pkg/app/server/service/webservice/service.pb.auth.go @@ -1,17 +1,3 @@ -// Copyright 2023 The PipeCD Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - // Code generated by protoc-gen-auth. DO NOT EDIT. // source: pkg/app/server/service/webservice/service.proto diff --git a/pkg/app/server/service/webservice/service.pb.go b/pkg/app/server/service/webservice/service.pb.go index 82f1ac2f70..017571535e 100644 --- a/pkg/app/server/service/webservice/service.pb.go +++ b/pkg/app/server/service/webservice/service.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/app/server/service/webservice/service.proto package webservice diff --git a/pkg/app/server/service/webservice/service_grpc.pb.go b/pkg/app/server/service/webservice/service_grpc.pb.go index 95cf0d34e7..e2ee4bf3ea 100644 --- a/pkg/app/server/service/webservice/service_grpc.pb.go +++ b/pkg/app/server/service/webservice/service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.18.1 +// - protoc v3.21.12 // source: pkg/app/server/service/webservice/service.proto package webservice diff --git a/pkg/model/analysis_result.pb.go b/pkg/model/analysis_result.pb.go index 73452925aa..6c243805b7 100644 --- a/pkg/model/analysis_result.pb.go +++ b/pkg/model/analysis_result.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/analysis_result.proto package model diff --git a/pkg/model/apikey.pb.go b/pkg/model/apikey.pb.go index 2917807f7d..08c0af46d7 100644 --- a/pkg/model/apikey.pb.go +++ b/pkg/model/apikey.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/apikey.proto package model diff --git a/pkg/model/application.pb.go b/pkg/model/application.pb.go index 175c40e342..c3d02ccd41 100644 --- a/pkg/model/application.pb.go +++ b/pkg/model/application.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/application.proto package model diff --git a/pkg/model/application_live_state.pb.go b/pkg/model/application_live_state.pb.go index 8f5c6c2d24..26a0df37c4 100644 --- a/pkg/model/application_live_state.pb.go +++ b/pkg/model/application_live_state.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/application_live_state.proto package model diff --git a/pkg/model/command.pb.go b/pkg/model/command.pb.go index e26ac80c0b..ce5d5b4c53 100644 --- a/pkg/model/command.pb.go +++ b/pkg/model/command.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/command.proto package model diff --git a/pkg/model/common.pb.go b/pkg/model/common.pb.go index e44e673bb6..bd76f7836a 100644 --- a/pkg/model/common.pb.go +++ b/pkg/model/common.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/common.proto package model diff --git a/pkg/model/deployment.pb.go b/pkg/model/deployment.pb.go index 81c5a3efb6..b58edb4356 100644 --- a/pkg/model/deployment.pb.go +++ b/pkg/model/deployment.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/deployment.proto package model diff --git a/pkg/model/deployment_chain.pb.go b/pkg/model/deployment_chain.pb.go index e97689c73f..3e5630488a 100644 --- a/pkg/model/deployment_chain.pb.go +++ b/pkg/model/deployment_chain.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/deployment_chain.proto package model diff --git a/pkg/model/event.pb.go b/pkg/model/event.pb.go index 597190c9b6..1f38d094e0 100644 --- a/pkg/model/event.pb.go +++ b/pkg/model/event.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/event.proto package model diff --git a/pkg/model/insight.pb.go b/pkg/model/insight.pb.go index 01d77fc793..d695aedcad 100644 --- a/pkg/model/insight.pb.go +++ b/pkg/model/insight.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/insight.proto package model diff --git a/pkg/model/logblock.pb.go b/pkg/model/logblock.pb.go index 1feb8ac729..0e9649867f 100644 --- a/pkg/model/logblock.pb.go +++ b/pkg/model/logblock.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/logblock.proto package model diff --git a/pkg/model/notificationevent.pb.go b/pkg/model/notificationevent.pb.go index e710035e6c..eafc778548 100644 --- a/pkg/model/notificationevent.pb.go +++ b/pkg/model/notificationevent.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/notificationevent.proto package model diff --git a/pkg/model/piped.pb.go b/pkg/model/piped.pb.go index 51a04523b3..0a5f07684a 100644 --- a/pkg/model/piped.pb.go +++ b/pkg/model/piped.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/piped.proto package model diff --git a/pkg/model/piped_stat.pb.go b/pkg/model/piped_stat.pb.go index bd44b550d0..f80a449ff7 100644 --- a/pkg/model/piped_stat.pb.go +++ b/pkg/model/piped_stat.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/piped_stat.proto package model diff --git a/pkg/model/planpreview.pb.go b/pkg/model/planpreview.pb.go index f1e590e421..b5ff26182c 100644 --- a/pkg/model/planpreview.pb.go +++ b/pkg/model/planpreview.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/planpreview.proto package model diff --git a/pkg/model/project.pb.go b/pkg/model/project.pb.go index 4d14dcc92d..ee386699c7 100644 --- a/pkg/model/project.pb.go +++ b/pkg/model/project.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/project.proto package model diff --git a/pkg/model/rbac.pb.go b/pkg/model/rbac.pb.go index f91d3b73a1..049708fc04 100644 --- a/pkg/model/rbac.pb.go +++ b/pkg/model/rbac.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/rbac.proto package model diff --git a/pkg/model/role.pb.go b/pkg/model/role.pb.go index 50c9c5599e..d8528d2e16 100644 --- a/pkg/model/role.pb.go +++ b/pkg/model/role.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/role.proto package model diff --git a/pkg/model/user.pb.go b/pkg/model/user.pb.go index 9fd23ec20e..4229732fe7 100644 --- a/pkg/model/user.pb.go +++ b/pkg/model/user.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/model/user.proto package model diff --git a/pkg/plugin/api/v1alpha1/platform/api.pb.go b/pkg/plugin/api/v1alpha1/platform/api.pb.go index 86e93c7e60..419cb927ab 100644 --- a/pkg/plugin/api/v1alpha1/platform/api.pb.go +++ b/pkg/plugin/api/v1alpha1/platform/api.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.18.1 +// protoc v3.21.12 // source: pkg/plugin/api/v1alpha1/platform/api.proto package platform diff --git a/pkg/plugin/api/v1alpha1/platform/api_grpc.pb.go b/pkg/plugin/api/v1alpha1/platform/api_grpc.pb.go index 92208fba14..4894db2c29 100644 --- a/pkg/plugin/api/v1alpha1/platform/api_grpc.pb.go +++ b/pkg/plugin/api/v1alpha1/platform/api_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.18.1 +// - protoc v3.21.12 // source: pkg/plugin/api/v1alpha1/platform/api.proto package platform diff --git a/tool/codegen/Dockerfile b/tool/codegen/Dockerfile index 6f6459a575..5a57f482e2 100644 --- a/tool/codegen/Dockerfile +++ b/tool/codegen/Dockerfile @@ -1,5 +1,5 @@ # Builder image to build go program. -FROM golang:1.20.4-alpine3.16 as BUILDER +FROM golang:1.22.4 as BUILDER COPY protoc-gen-auth /protoc-gen-auth RUN cd /protoc-gen-auth \ @@ -7,12 +7,12 @@ RUN cd /protoc-gen-auth \ && chmod +x /usr/local/bin/protoc-gen-auth # Codegen image which is actually being used. -FROM golang:1.20.4-alpine3.16 +FROM golang:1.22.4 # This is version of protobuf installed in the image. # See https://pkgs.alpinelinux.org/packages?name=protobuf&branch=v3.16 # NOTE: Start from protobuf v3.20.1, the protoc-gen-js is not included in protobuf package. -ENV PROTOC_VER=3.18.1 +ENV PROTOC_GEN_JS_VER=3.21.2 ENV PROTOC_GEN_GO_VER=1.27.1 ENV PROTOC_GEN_GRPC_WEB_VER=1.3.1 ENV PROTOC_GEN_GO_GRPC_VER=1.2.0 @@ -20,7 +20,7 @@ ENV PROTOC_GEN_VALIDATE_VER=0.6.6 ENV GOMOCK_VER=1.6.0 # dependecies and protoc -RUN apk --no-cache add wget bash protobuf-dev protobuf +RUN apt update && apt install -y protobuf-compiler # protoc-gen-go RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOC_GEN_GO_VER} @@ -41,6 +41,17 @@ RUN go install github.com/envoyproxy/protoc-gen-validate@v${PROTOC_GEN_VALIDATE_ && rm protoc-gen-validate.tar.gz \ && mv /go/src/github.com/envoyproxy/protoc-gen-validate-${PROTOC_GEN_VALIDATE_VER} /go/src/github.com/envoyproxy/protoc-gen-validate +# protoc-gen-js +# This is a workaround to use it https://github.com/protocolbuffers/protobuf-javascript/issues/127#issuecomment-1361047597 +RUN for target in x86_64 aarch_64; do \ + mkdir /protoc-gen-js-${target} && cd /protoc-gen-js-${target} \ + && wget https://github.com/protocolbuffers/protobuf-javascript/releases/download/v${PROTOC_GEN_JS_VER}/protobuf-javascript-${PROTOC_GEN_JS_VER}-linux-${target}.tar.gz \ + && tar xvfz protobuf-javascript-${PROTOC_GEN_JS_VER}-linux-${target}.tar.gz \ + && chmod +x bin/protoc-gen-js \ + && rm -rf protobuf-javascript-${PROTOC_GEN_JS_VER}-linux-${target}.tar.gz; \ + done && \ + mv /protoc-gen-js-aarch_64/ /protoc-gen-js-aarch64/ + # protoc-gen-auth COPY --from=BUILDER /usr/local/bin/protoc-gen-auth /usr/local/bin/ diff --git a/tool/codegen/codegen.sh b/tool/codegen/codegen.sh index c59d1ae0a8..714fef3b46 100755 --- a/tool/codegen/codegen.sh +++ b/tool/codegen/codegen.sh @@ -56,6 +56,17 @@ jsOutDirs=( "web/api_client" ) +# Check the arch for protc-gen-js +arch=$(uname -m); +protocGenJsSupportArch=("x86_64" "aarch64") +if [[ ! " ${protocGenJsSupportArch[@]} " =~ " ${arch} " ]]; then + echo "Unsupported architecture: $arch" + exit 1 +fi + +protocGenJsIncludePath="/protoc-gen-js-${arch}" +protocGenJsPath="/protoc-gen-js-${arch}/bin/protoc-gen-js" + i=0 while [ $i -lt ${#jsProtoDirs[*]} ]; do inDir=${jsProtoDirs[$i]} @@ -72,7 +83,9 @@ while [ $i -lt ${#jsProtoDirs[*]} ]; do echo "generating new JS files..." protoc \ -I . \ + -I ${protocGenJsIncludePath} \ -I /go/src/github.com/envoyproxy/protoc-gen-validate \ + --plugin=protoc-gen-js=${protocGenJsPath} \ --js_out=import_style=commonjs:. \ --grpc-web_out=import_style=commonjs+dts,mode=grpcweb:. \ ${inDir}/*.proto diff --git a/web/api_client/service_pb.js b/web/api_client/service_pb.js index 54627a669f..991415d512 100644 --- a/web/api_client/service_pb.js +++ b/web/api_client/service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -5807,7 +5813,8 @@ proto.grpc.service.webservice.AddApplicationRequest.prototype.getLabelsMap = fun */ proto.grpc.service.webservice.AddApplicationRequest.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; @@ -7460,7 +7467,8 @@ proto.grpc.service.webservice.ListApplicationsRequest.Options.prototype.getLabel */ proto.grpc.service.webservice.ListApplicationsRequest.Options.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** @@ -9298,7 +9306,8 @@ proto.grpc.service.webservice.ListDeploymentsRequest.Options.prototype.getLabels */ proto.grpc.service.webservice.ListDeploymentsRequest.Options.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** @@ -16015,7 +16024,8 @@ proto.grpc.service.webservice.GetInsightDataRequest.prototype.getLabelsMap = fun */ proto.grpc.service.webservice.GetInsightDataRequest.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; @@ -17763,7 +17773,8 @@ proto.grpc.service.webservice.ListEventsRequest.Options.prototype.getLabelsMap = */ proto.grpc.service.webservice.ListEventsRequest.Options.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** diff --git a/web/model/analysis_result_pb.js b/web/model/analysis_result_pb.js index d6d9a97152..bbfe5055cc 100644 --- a/web/model/analysis_result_pb.js +++ b/web/model/analysis_result_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); diff --git a/web/model/apikey_pb.js b/web/model/apikey_pb.js index 9fd5a546fc..6f94f39e68 100644 --- a/web/model/apikey_pb.js +++ b/web/model/apikey_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); diff --git a/web/model/application_live_state_pb.js b/web/model/application_live_state_pb.js index bbbee1ff92..1ae106e2a5 100644 --- a/web/model/application_live_state_pb.js +++ b/web/model/application_live_state_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); diff --git a/web/model/application_pb.js b/web/model/application_pb.js index 74f5c141c7..11af3091d4 100644 --- a/web/model/application_pb.js +++ b/web/model/application_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -623,7 +629,8 @@ proto.model.Application.prototype.getLabelsMap = function(opt_noLazyCreate) { */ proto.model.Application.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** diff --git a/web/model/command_pb.js b/web/model/command_pb.js index efad6d1880..7ce12f3f1b 100644 --- a/web/model/command_pb.js +++ b/web/model/command_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -2223,7 +2229,8 @@ proto.model.Command.prototype.getMetadataMap = function(opt_noLazyCreate) { */ proto.model.Command.prototype.clearMetadataMap = function() { this.getMetadataMap().clear(); - return this;}; + return this; +}; /** diff --git a/web/model/common_pb.js b/web/model/common_pb.js index da9df25ff9..7e1fbcc06d 100644 --- a/web/model/common_pb.js +++ b/web/model/common_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -821,7 +827,8 @@ proto.model.ApplicationInfo.prototype.getLabelsMap = function(opt_noLazyCreate) */ proto.model.ApplicationInfo.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** diff --git a/web/model/deployment_chain_pb.js b/web/model/deployment_chain_pb.js index 41862068e6..23f1501dea 100644 --- a/web/model/deployment_chain_pb.js +++ b/web/model/deployment_chain_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); diff --git a/web/model/deployment_pb.js b/web/model/deployment_pb.js index 025aa90dce..3ac416b413 100644 --- a/web/model/deployment_pb.js +++ b/web/model/deployment_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -725,7 +731,8 @@ proto.model.Deployment.prototype.getLabelsMap = function(opt_noLazyCreate) { */ proto.model.Deployment.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** @@ -968,7 +975,8 @@ proto.model.Deployment.prototype.getMetadataMap = function(opt_noLazyCreate) { */ proto.model.Deployment.prototype.clearMetadataMap = function() { this.getMetadataMap().clear(); - return this;}; + return this; +}; /** @@ -1806,7 +1814,8 @@ proto.model.PipelineStage.prototype.getMetadataMap = function(opt_noLazyCreate) */ proto.model.PipelineStage.prototype.clearMetadataMap = function() { this.getMetadataMap().clear(); - return this;}; + return this; +}; /** diff --git a/web/model/event_pb.js b/web/model/event_pb.js index 34c5e6202e..9dc60336d3 100644 --- a/web/model/event_pb.js +++ b/web/model/event_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -362,7 +368,8 @@ proto.model.Event.prototype.getLabelsMap = function(opt_noLazyCreate) { */ proto.model.Event.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** diff --git a/web/model/insight_pb.js b/web/model/insight_pb.js index 570420f78e..5b78371c38 100644 --- a/web/model/insight_pb.js +++ b/web/model/insight_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -413,7 +419,8 @@ proto.model.InsightSample.prototype.getLabelsMap = function(opt_noLazyCreate) { */ proto.model.InsightSample.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** @@ -605,7 +612,8 @@ proto.model.InsightSampleStream.prototype.getLabelsMap = function(opt_noLazyCrea */ proto.model.InsightSampleStream.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** @@ -788,7 +796,8 @@ proto.model.InsightApplicationCount.prototype.getLabelsMap = function(opt_noLazy */ proto.model.InsightApplicationCount.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** diff --git a/web/model/logblock_pb.js b/web/model/logblock_pb.js index 58a839f646..e9d2952b31 100644 --- a/web/model/logblock_pb.js +++ b/web/model/logblock_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); diff --git a/web/model/notificationevent_pb.js b/web/model/notificationevent_pb.js index a7d89c96e5..57e1457402 100644 --- a/web/model/notificationevent_pb.js +++ b/web/model/notificationevent_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); diff --git a/web/model/piped_pb.js b/web/model/piped_pb.js index 485ddd37d0..94a0f45fe9 100644 --- a/web/model/piped_pb.js +++ b/web/model/piped_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); diff --git a/web/model/piped_stat_pb.js b/web/model/piped_stat_pb.js index 8ecc015b1b..f94cec8936 100644 --- a/web/model/piped_stat_pb.js +++ b/web/model/piped_stat_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); diff --git a/web/model/planpreview_pb.js b/web/model/planpreview_pb.js index e06a78dc3a..162159179c 100644 --- a/web/model/planpreview_pb.js +++ b/web/model/planpreview_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -809,7 +815,8 @@ proto.model.ApplicationPlanPreviewResult.prototype.getLabelsMap = function(opt_n */ proto.model.ApplicationPlanPreviewResult.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; /** diff --git a/web/model/project_pb.js b/web/model/project_pb.js index 7f9a31ab2c..42d79d5061 100644 --- a/web/model/project_pb.js +++ b/web/model/project_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); @@ -2403,7 +2409,8 @@ proto.model.ProjectRBACResource.prototype.getLabelsMap = function(opt_noLazyCrea */ proto.model.ProjectRBACResource.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); - return this;}; + return this; +}; diff --git a/web/model/rbac_pb.js b/web/model/rbac_pb.js index 09e3dbe635..c38e0f3c32 100644 --- a/web/model/rbac_pb.js +++ b/web/model/rbac_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); goog.object.extend(proto, google_protobuf_descriptor_pb); diff --git a/web/model/role_pb.js b/web/model/role_pb.js index bbf8592df5..0e5c909e2d 100644 --- a/web/model/role_pb.js +++ b/web/model/role_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); goog.object.extend(proto, google_protobuf_descriptor_pb); diff --git a/web/model/user_pb.js b/web/model/user_pb.js index c35da233f2..88e08baaf5 100644 --- a/web/model/user_pb.js +++ b/web/model/user_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')();