Giter VIP home page Giter VIP logo

grpc-web-error-details's Introduction

About Me ๐Ÿ˜Ž

  • A graduate student at University of California, Santa Cruz
  • Working as a part-time web engineer at GNEX
  • My interests are Web Frontend, React, Angular, Vue, TypeScript, Node.js, iOS, Swift, etc.

grpc-web-error-details's People

Contributors

dongjins avatar shumbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grpc-web-error-details's Issues

Function('return this')() does not comply with no-unsafe-eval

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

The global variable Function('return this')(); doesn't comply with CSP no-unsafe-eval rule.
This is the same issue described in these two issues with the protobuf package: protocolbuffers/protobuf#6770 and protocolbuffers/protobuf#5464

We're patching our project with the following diff included from patch-package:

diff --git a/node_modules/grpc-web-error-details/dist/lib/code_pb.js b/node_modules/grpc-web-error-details/dist/lib/code_pb.js
index 0df746f..5c6beaa 100644
--- a/node_modules/grpc-web-error-details/dist/lib/code_pb.js
+++ b/node_modules/grpc-web-error-details/dist/lib/code_pb.js
@@ -13,7 +13,7 @@
 
 var jspb = require('google-protobuf');
 var goog = jspb;
-var global = Function('return this')();
+var global = (function() { return this || window || global || self; }).call(null);
 
 goog.exportSymbol('proto.google.rpc.Code', null, global);
 /**
diff --git a/node_modules/grpc-web-error-details/dist/lib/error_details_pb.js b/node_modules/grpc-web-error-details/dist/lib/error_details_pb.js
index b73688c..85b5ac8 100644
--- a/node_modules/grpc-web-error-details/dist/lib/error_details_pb.js
+++ b/node_modules/grpc-web-error-details/dist/lib/error_details_pb.js
@@ -13,7 +13,7 @@
 
 var jspb = require('google-protobuf');
 var goog = jspb;
-var global = Function('return this')();
+var global = (function() { return this || window || global || self; }).call(null);
 
 var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
 goog.object.extend(proto, google_protobuf_duration_pb);
diff --git a/node_modules/grpc-web-error-details/dist/lib/status_pb.js b/node_modules/grpc-web-error-details/dist/lib/status_pb.js
index 0cc9e12..2144731 100644
--- a/node_modules/grpc-web-error-details/dist/lib/status_pb.js
+++ b/node_modules/grpc-web-error-details/dist/lib/status_pb.js
@@ -13,7 +13,7 @@
 
 var jspb = require('google-protobuf');
 var goog = jspb;
-var global = Function('return this')();
+var global = (function() { return this || window || global || self; }).call(null);
 
 var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
 goog.object.extend(proto, google_protobuf_any_pb);

This issue body was partially generated by patch-package.

README.md has typo

Hi ๐Ÿ‘‹

First of all, I was able to decode grpc-web-error-details-bin using "grpc-web-error-details". Thanks for your work.

While using grpc-web-error-details, I found a typo in README.MD.
v.getDescription โžก๏ธ v.getDescription()
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.