diff --git a/grpc/src/main/java/edu/cooper/ece366/restaurantReservation/grpc/Auth/AuthManager.java b/grpc/src/main/java/edu/cooper/ece366/restaurantReservation/grpc/Auth/AuthManager.java index 8873fa9..351f83b 100644 --- a/grpc/src/main/java/edu/cooper/ece366/restaurantReservation/grpc/Auth/AuthManager.java +++ b/grpc/src/main/java/edu/cooper/ece366/restaurantReservation/grpc/Auth/AuthManager.java @@ -87,7 +87,7 @@ public List genTokens(int userID, String userAgent){ User user = db.withExtension(UserDao.class, d->d.getUser(userID)); Date issueDate = new Date(); - Date expDate = Date.from(issueDate.toInstant().plus(Duration.ofHours(1))); + Date expDate = Date.from(issueDate.toInstant().plus(Duration.ofSeconds(10))); Date refreshExp = Date.from(issueDate.toInstant().plus(Duration.ofDays(1))); Date notBefore = Date.from(issueDate.toInstant().minus(Duration.ofMinutes(5))); String authToken = Jwts.builder() diff --git a/spring/src/main/js/reservdjs/grpc-web/externs.js b/spring/src/main/js/reservdjs/grpc-web/externs.js index 3528372..ffcaa70 100644 --- a/spring/src/main/js/reservdjs/grpc-web/externs.js +++ b/spring/src/main/js/reservdjs/grpc-web/externs.js @@ -1 +1,26 @@ var module; + +/** + * List of functions we want to preserve when running the closure compiler + * with --compilation_level=ADVANCED_OPTIMIZATIONS. + */ +module.ClientReadableStream = function() {}; +module.ClientReadableStream.prototype.on = function(eventType, callback) {}; +module.ClientReadableStream.prototype.cancel = function() {}; + +module.GenericClient = function() {}; +module.GenericClient.prototype.unaryCall = function(request) {}; +module.GenericClient.prototype.call = function(requestMessage, + methodDescriptor) {}; + +module.UnaryInterceptor = function() {}; +module.UnaryInterceptor.prototype.intercept = function(request, invoker) {}; + +module.StreamInterceptor = function() {}; +module.StreamInterceptor.prototype.intercept = function(request, invoker) {}; + +module.Request = function() {}; +module.Request.prototype.getRequestMessage = function() {}; +module.Request.prototype.getMethodDescriptor = function() {}; +module.Request.prototype.getMetadata = function() {}; +module.Request.prototype.getCallOptions = function() {}; diff --git a/spring/src/main/js/reservdjs/grpc-web/index.js b/spring/src/main/js/reservdjs/grpc-web/index.js index 467fdad..65eecf4 100644 --- a/spring/src/main/js/reservdjs/grpc-web/index.js +++ b/spring/src/main/js/reservdjs/grpc-web/index.js @@ -1,51 +1,54 @@ -var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ba(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b>>0),ia=0;function ja(a,b,c){return a.call.apply(a.bind,arguments)} -function ka(a,b,c){if(!a)throw Error();if(2b?null:q(a)?a.charAt(b):a[b]};function xa(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function ya(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}var za="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Aa(a,b){for(var c,d,e=1;eb?1:0};var C;a:{var Da=p.navigator;if(Da){var Ea=Da.userAgent;if(Ea){C=Ea;break a}}C=""};function Fa(a){var b=1;a=a.split(":");for(var c=[];0parseFloat(Ra)){Qa=String(Ta);break a}}Qa=Ra}var Ka={}; -function Ua(a){return Ja(a,function(){for(var b=0,c=Ba(String(Qa)).split("."),d=Ba(String(a)).split("."),e=Math.max(c.length,d.length),g=0;0==b&&gc&&(c=Math.max(c+f,0));c>>0),ja=0;function ka(a,b,c){return a.call.apply(a.bind,arguments)} +function la(a,b,c){if(!a)throw Error();if(2b?null:r(a)?a.charAt(b):a[b]};function Ca(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Da(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}var Ea="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Fa(a,b){for(var c,d,f=1;fb?1:0};var D;a:{var Ia=q.navigator;if(Ia){var Ja=Ia.userAgent;if(Ja){D=Ja;break a}}D=""};function Ka(a){var b=1;a=a.split(":");for(var c=[];0parseFloat(Wa)){Va=String(Ya);break a}}Va=Wa}var Pa={}; +function Za(a){return Oa(a,function(){for(var b=0,c=Ga(String(Va)).split("."),d=Ga(String(a)).split("."),f=Math.max(c.length,d.length),g=0;0==b&&g=a.keyCode)a.keyCode=-1}catch(b){}};var G="closure_listenable_"+(1E6*Math.random()|0),bb=0;function cb(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.B=e;this.key=++bb;this.s=this.w=!1}function db(a){a.s=!0;a.listener=null;a.proxy=null;a.src=null;a.B=null};function H(a){this.src=a;this.a={};this.b=0}H.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.a[g];a||(a=this.a[g]=[],this.b++);var f=eb(a,b,d,e);-1c.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(f){e=!0}if(e||void 0==c.returnValue)c.returnValue=!0}c=[];for(e=b.a;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;0<=e;e--){b.a=c[e];var g=sb(c[e],a,!0,b);d=d&&g}for(e=0;e>>0);function lb(a){if("function"==v(a))return a;a[ub]||(a[ub]=function(b){return a.handleEvent(b)});return a[ub]};function J(){Ga.call(this);this.f=new H(this);this.P=this}y(J,Ga);J.prototype[G]=!0;J.prototype.removeEventListener=function(a,b,c,d){qb(this,a,b,c,d)};function K(a,b){a=a.P;var c=b.type||b;if(q(b))b=new E(b,a);else if(b instanceof E)b.target=b.target||a;else{var d=b;b=new E(c,a);Aa(b,d)}a=b.a=a;vb(a,c,!0,b);vb(a,c,!1,b)} -function vb(a,b,c,d){if(b=a.f.a[String(b)]){b=b.concat();for(var e=!0,g=0;g=Db(this).value)for("function"==v(b)&&(b=b()),a=new xb(a,String(b),this.f),c&&(a.a=c),c=this;c;)c=c.a};var Eb={},M=null; -function Fb(a){M||(M=new zb(""),Eb[""]=M,M.c=Bb);var b;if(!(b=Eb[a])){b=new zb(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=Fb(a.substr(0,c));c.b||(c.b={});c.b[d]=b;b.a=c;Eb[a]=b}return b};function N(a,b){a&&a.log(Cb,b,void 0)};function Gb(){}Gb.prototype.a=null;function Hb(a){var b;(b=a.a)||(b={},Ib(a)&&(b[0]=!0,b[1]=!0),b=a.a=b);return b};var Jb;function Kb(){}y(Kb,Gb);function Lb(a){return(a=Ib(a))?new ActiveXObject(a):new XMLHttpRequest}function Ib(a){if(!a.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c>2;e=(e&3)<<4|f>>4;f=(f&15)<<2|k>>6;k&=63;h||(k=64,g||(f=64));c.push(b[l],b[e],b[f]||"",b[k]||"")}return c.join("")}function ic(a){var b=a.length,c=3*b/4;c%3?c=Math.floor(c):B("=.",a[b-1])&&(c=B("=.",a[b-2])?c-2:c-1);var d=new Uint8Array(c),e=0;jc(a,function(g){d[e++]=g});return d.subarray(0,e)} -function jc(a,b){function c(k){for(;d>4);64!=f&&(b(g<<4&240|f>>2),64!=h&&b(f<<6&192|h))}} -function hc(){if(!U){U={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));fc[c]=d;for(var e=0;ec&&(c=a.length);var d=a.indexOf("?");if(0>d||d>c){d=c;var e=""}else e=a.substring(d+1,c);a=[a.substr(0,d),e,a.substr(c)];c=a[1];a[1]=b?c?c+"&"+b:b:c;a=a[0]+(a[1]?"?"+a[1]:"")+a[2]}return a}a.a("$httpHeaders",c);return a};function Z(a){this.a=r("format",a)||"text";this.c=r("suppressCorsPreflight",a)||!1;this.b=r("withCredentials",a)||!1} -Z.prototype.N=function(a,b,c,d,e){var g=new Q;g.m=this.b;var f=new V({O:g});f.h=d.b;f.C("data",function(h){e(null,h)});f.C("status",function(h){0!=h.code&&e({code:h.code,message:h.details,metadata:h.metadata},null)});f.C("error",function(h){0!=h.code&&e({code:h.code,message:h.message,metadata:h.metadata},null)});Mb(g.headers,c);mc(this,g);this.c&&(c=Pb(g.headers),Ob(g.headers),a=lc(a,c));b=d.a(b);b=nc(b);"text"==this.a?b=gc(b):"binary"==this.a&&(g.h="arraybuffer");Wb(g,a,b);return f}; -Z.prototype.rpcCall=Z.prototype.N;Z.prototype.U=function(a,b,c,d){var e=this;return new Promise(function(g,f){e.N(a,b,c,d,function(h,k){h?f(h):g(k)})})};Z.prototype.unaryCall=Z.prototype.U;Z.prototype.S=function(a,b,c,d){var e=new Q;e.m=this.b;var g=new V({O:e});g.h=d.b;Mb(e.headers,c);mc(this,e);this.c&&(c=Pb(e.headers),Ob(e.headers),a=lc(a,c));b=d.a(b);b=nc(b);"text"==this.a?b=gc(b):"binary"==this.a&&(e.h="arraybuffer");Wb(e,a,b);return g};Z.prototype.serverStreaming=Z.prototype.S; -function nc(a){for(var b=a.length,c=[0,0,0,0],d=new Uint8Array(5+b),e=3;0<=e;e--)c[e]=b%256,b>>>=8;d.set(new Uint8Array(c),1);d.set(a,5);return d} -function mc(a,b){"text"==a.a?(b.headers.set("Content-Type","application/grpc-web-text"),b.headers.set("Accept","application/grpc-web-text")):b.headers.set("Content-Type","application/grpc-web+proto");b.headers.set("X-User-Agent","grpc-web-javascript/0.1");b.headers.set("X-Grpc-Web","1");if(P(b.headers.b,"deadline")){a=b.headers.get("deadline");a=Math.round(a-(new Date).getTime());var c=b.headers;P(c.b,"deadline")&&(delete c.b.deadline,c.c--,c.a.length>2*c.c&&Nb(c));Infinity===a&&(a=0);0=a.keyCode)a.keyCode=-1}catch(b){}};var I="closure_listenable_"+(1E6*Math.random()|0),gb=0;function hb(a,b,c,d,f){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.A=f;this.key=++gb;this.s=this.v=!1}function ib(a){a.s=!0;a.listener=null;a.proxy=null;a.src=null;a.A=null};function J(a){this.src=a;this.a={};this.b=0}J.prototype.add=function(a,b,c,d,f){var g=a.toString();a=this.a[g];a||(a=this.a[g]=[],this.b++);var e=jb(a,b,d,f);-1c.keyCode||void 0!=c.returnValue)){a:{var f=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(e){f=!0}if(f||void 0==c.returnValue)c.returnValue=!0}c=[];for(f=b.a;f;f=f.parentNode)c.push(f);a=a.type;for(f=c.length-1;0<=f;f--){b.a=c[f];var g=xb(c[f],a,!0,b);d=d&&g}for(f=0;f>>0);function qb(a){if("function"==w(a))return a;a[zb]||(a[zb]=function(b){return a.handleEvent(b)});return a[zb]};function L(){La.call(this);this.f=new J(this);this.M=this}z(L,La);L.prototype[I]=!0;L.prototype.removeEventListener=function(a,b,c,d){vb(this,a,b,c,d)};function N(a,b){a=a.M;var c=b.type||b;if(r(b))b=new G(b,a);else if(b instanceof G)b.target=b.target||a;else{var d=b;b=new G(c,a);Fa(b,d)}a=b.a=a;Ab(a,c,!0,b);Ab(a,c,!1,b)} +function Ab(a,b,c,d){if(b=a.f.a[String(b)]){b=b.concat();for(var f=!0,g=0;g=Ib(this).value)for("function"==w(b)&&(b=b()),a=new Cb(a,String(b),this.f),c&&(a.a=c),c=this;c;)c=c.a};var Jb={},P=null; +function Kb(a){P||(P=new Eb(""),Jb[""]=P,P.c=Gb);var b;if(!(b=Jb[a])){b=new Eb(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=Kb(a.substr(0,c));c.b||(c.b={});c.b[d]=b;b.a=c;Jb[a]=b}return b};function Q(a,b){a&&a.log(Hb,b,void 0)};function Lb(){}Lb.prototype.a=null;function Mb(a){var b;(b=a.a)||(b={},Nb(a)&&(b[0]=!0,b[1]=!0),b=a.a=b);return b};var Ob;function Pb(){}z(Pb,Lb);function Qb(a){return(a=Nb(a))?new ActiveXObject(a):new XMLHttpRequest}function Nb(a){if(!a.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c>4);64!=e&&(b(g<<4&240|e>>2),64!=h&&b(e<<6&192|h))}} +function lc(){if(!X){X={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));ic[c]=d;for(var f=0;f2*h.c&&Sb(h));Infinity===e&&(e=0);0e&&(e=f.length),h=f.indexOf("?"),0>h||h>e?(h=e,k=""):k=f.substring(h+ +1,e),f=[f.substr(0,h),k,f.substr(e)],e=f[1],f[1]=m?e?e+"&"+m:m:e,f=f[0]+(f[1]?"?"+f[1]:"")+f[2]}else f.a("$httpHeaders",e)}b=d.a(b.getRequestMessage());d=b.length;m=[0,0,0,0];e=new Uint8Array(5+d);for(h=3;0<=h;h--)m[h]=d%256,d>>>=8;e.set(new Uint8Array(m),1);e.set(b,5);b=e;if("text"==a.a){a=b;var p;void 0===p&&(p=0);lc();p=ic[p];b=[];for(d=0;d>2;l=(l&3)<<4|n>>4;n=(n&15)<<2|k>>6;k&=63;e||(k=64,m||(n=64));b.push(p[h], +p[l],p[n]||"",p[k]||"")}b=b.join("")}else"binary"==a.a&&(c.j="arraybuffer");Zb(c,f,b);return g}function rc(a,b,c){a.on("data",function(d){b(null,d)});a.on("error",function(d){0!=d.code&&b(d,null)});a.on("status",function(d){0!=d.code?b({code:d.code,message:d.details,metadata:d.metadata},null):c&&b(null,null,d)});c&&(a.on("metadata",function(d){b(null,null,null,d)}),a.on("end",function(){b(null,null)}))} +function pc(a,b){var c=a;b.forEach(function(d){var f=c;c=function(g){return d.intercept(g,f)}});return c};module.exports.AbstractClientBase={MethodInfo:function(a,b,c,d,f){this.name=d;this.b=f;this.f=a;this.a=b;this.c=c}};module.exports.GrpcWebClientBase=Z;module.exports.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15};module.exports.MethodDescriptor=oa; +module.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"}; diff --git a/spring/src/main/js/reservdjs/grpc-web/package.json b/spring/src/main/js/reservdjs/grpc-web/package.json index 47a53f9..6b39cc6 100644 --- a/spring/src/main/js/reservdjs/grpc-web/package.json +++ b/spring/src/main/js/reservdjs/grpc-web/package.json @@ -1,6 +1,6 @@ { "name": "grpc-web", - "version": "1.0.8", + "version": "1.1.0-rc.1", "author": "Google Inc.", "description": "gRPC-Web Client Runtime Library", "homepage": "https://grpc.io/", diff --git a/spring/src/main/js/reservdjs/grpc-web/test/generated_code_test.js b/spring/src/main/js/reservdjs/grpc-web/test/generated_code_test.js index 8c28f79..2a551c6 100644 --- a/spring/src/main/js/reservdjs/grpc-web/test/generated_code_test.js +++ b/spring/src/main/js/reservdjs/grpc-web/test/generated_code_test.js @@ -202,10 +202,11 @@ describe('grpc-web generated code (commonjs+grpcwebtext)', function() { var request = new EchoRequest(); request.setMessage('aaa'); MockXMLHttpRequest.onSend = function(xhr) { - xhr.respond(200, {'Content-Type': 'application/grpc-web-text'}, - // a single data frame with an 'aaa' message, followed by, - // a trailer frame with content 'grpc-status:0' - 'AAAAAAUKA2FhYYAAAAAPZ3JwYy1zdGF0dXM6MA0K'); + xhr.respond( + 200, {'Content-Type': 'application/grpc-web-text'}, + // a single data frame with an 'aaa' message, followed by, + // a trailer frame with content 'grpc-status: 0\d\ax-custom-1: ababab' + 'AAAAAAUKA2FhYYAAAAAkZ3JwYy1zdGF0dXM6IDANCngtY3VzdG9tLTE6IGFiYWJhYg0K'); }; var call = echoService.echo(request, {'custom-header-1':'value1'}, function(err, response) { @@ -213,8 +214,9 @@ describe('grpc-web generated code (commonjs+grpcwebtext)', function() { }); call.on('status', function(status) { assert.equal('object', typeof status.metadata); - assert.equal(true, 'grpc-status' in status.metadata); - assert.equal(0, parseInt(status.metadata['grpc-status'])); + assert.equal(false, 'grpc-status' in status.metadata); + assert.equal(true, 'x-custom-1' in status.metadata); + assert.equal('ababab', status.metadata['x-custom-1']); done(); }); }); diff --git a/spring/src/main/js/reservdjs/node_modules/grpc-web/externs.js b/spring/src/main/js/reservdjs/node_modules/grpc-web/externs.js index 3528372..ffcaa70 100644 --- a/spring/src/main/js/reservdjs/node_modules/grpc-web/externs.js +++ b/spring/src/main/js/reservdjs/node_modules/grpc-web/externs.js @@ -1 +1,26 @@ var module; + +/** + * List of functions we want to preserve when running the closure compiler + * with --compilation_level=ADVANCED_OPTIMIZATIONS. + */ +module.ClientReadableStream = function() {}; +module.ClientReadableStream.prototype.on = function(eventType, callback) {}; +module.ClientReadableStream.prototype.cancel = function() {}; + +module.GenericClient = function() {}; +module.GenericClient.prototype.unaryCall = function(request) {}; +module.GenericClient.prototype.call = function(requestMessage, + methodDescriptor) {}; + +module.UnaryInterceptor = function() {}; +module.UnaryInterceptor.prototype.intercept = function(request, invoker) {}; + +module.StreamInterceptor = function() {}; +module.StreamInterceptor.prototype.intercept = function(request, invoker) {}; + +module.Request = function() {}; +module.Request.prototype.getRequestMessage = function() {}; +module.Request.prototype.getMethodDescriptor = function() {}; +module.Request.prototype.getMetadata = function() {}; +module.Request.prototype.getCallOptions = function() {}; diff --git a/spring/src/main/js/reservdjs/node_modules/grpc-web/index.js b/spring/src/main/js/reservdjs/node_modules/grpc-web/index.js index 467fdad..65eecf4 100644 --- a/spring/src/main/js/reservdjs/node_modules/grpc-web/index.js +++ b/spring/src/main/js/reservdjs/node_modules/grpc-web/index.js @@ -1,51 +1,54 @@ -var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ba(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b>>0),ia=0;function ja(a,b,c){return a.call.apply(a.bind,arguments)} -function ka(a,b,c){if(!a)throw Error();if(2b?null:q(a)?a.charAt(b):a[b]};function xa(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function ya(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}var za="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Aa(a,b){for(var c,d,e=1;eb?1:0};var C;a:{var Da=p.navigator;if(Da){var Ea=Da.userAgent;if(Ea){C=Ea;break a}}C=""};function Fa(a){var b=1;a=a.split(":");for(var c=[];0parseFloat(Ra)){Qa=String(Ta);break a}}Qa=Ra}var Ka={}; -function Ua(a){return Ja(a,function(){for(var b=0,c=Ba(String(Qa)).split("."),d=Ba(String(a)).split("."),e=Math.max(c.length,d.length),g=0;0==b&&gc&&(c=Math.max(c+f,0));c>>0),ja=0;function ka(a,b,c){return a.call.apply(a.bind,arguments)} +function la(a,b,c){if(!a)throw Error();if(2b?null:r(a)?a.charAt(b):a[b]};function Ca(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Da(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}var Ea="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Fa(a,b){for(var c,d,f=1;fb?1:0};var D;a:{var Ia=q.navigator;if(Ia){var Ja=Ia.userAgent;if(Ja){D=Ja;break a}}D=""};function Ka(a){var b=1;a=a.split(":");for(var c=[];0parseFloat(Wa)){Va=String(Ya);break a}}Va=Wa}var Pa={}; +function Za(a){return Oa(a,function(){for(var b=0,c=Ga(String(Va)).split("."),d=Ga(String(a)).split("."),f=Math.max(c.length,d.length),g=0;0==b&&g=a.keyCode)a.keyCode=-1}catch(b){}};var G="closure_listenable_"+(1E6*Math.random()|0),bb=0;function cb(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.B=e;this.key=++bb;this.s=this.w=!1}function db(a){a.s=!0;a.listener=null;a.proxy=null;a.src=null;a.B=null};function H(a){this.src=a;this.a={};this.b=0}H.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.a[g];a||(a=this.a[g]=[],this.b++);var f=eb(a,b,d,e);-1c.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(f){e=!0}if(e||void 0==c.returnValue)c.returnValue=!0}c=[];for(e=b.a;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;0<=e;e--){b.a=c[e];var g=sb(c[e],a,!0,b);d=d&&g}for(e=0;e>>0);function lb(a){if("function"==v(a))return a;a[ub]||(a[ub]=function(b){return a.handleEvent(b)});return a[ub]};function J(){Ga.call(this);this.f=new H(this);this.P=this}y(J,Ga);J.prototype[G]=!0;J.prototype.removeEventListener=function(a,b,c,d){qb(this,a,b,c,d)};function K(a,b){a=a.P;var c=b.type||b;if(q(b))b=new E(b,a);else if(b instanceof E)b.target=b.target||a;else{var d=b;b=new E(c,a);Aa(b,d)}a=b.a=a;vb(a,c,!0,b);vb(a,c,!1,b)} -function vb(a,b,c,d){if(b=a.f.a[String(b)]){b=b.concat();for(var e=!0,g=0;g=Db(this).value)for("function"==v(b)&&(b=b()),a=new xb(a,String(b),this.f),c&&(a.a=c),c=this;c;)c=c.a};var Eb={},M=null; -function Fb(a){M||(M=new zb(""),Eb[""]=M,M.c=Bb);var b;if(!(b=Eb[a])){b=new zb(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=Fb(a.substr(0,c));c.b||(c.b={});c.b[d]=b;b.a=c;Eb[a]=b}return b};function N(a,b){a&&a.log(Cb,b,void 0)};function Gb(){}Gb.prototype.a=null;function Hb(a){var b;(b=a.a)||(b={},Ib(a)&&(b[0]=!0,b[1]=!0),b=a.a=b);return b};var Jb;function Kb(){}y(Kb,Gb);function Lb(a){return(a=Ib(a))?new ActiveXObject(a):new XMLHttpRequest}function Ib(a){if(!a.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c>2;e=(e&3)<<4|f>>4;f=(f&15)<<2|k>>6;k&=63;h||(k=64,g||(f=64));c.push(b[l],b[e],b[f]||"",b[k]||"")}return c.join("")}function ic(a){var b=a.length,c=3*b/4;c%3?c=Math.floor(c):B("=.",a[b-1])&&(c=B("=.",a[b-2])?c-2:c-1);var d=new Uint8Array(c),e=0;jc(a,function(g){d[e++]=g});return d.subarray(0,e)} -function jc(a,b){function c(k){for(;d>4);64!=f&&(b(g<<4&240|f>>2),64!=h&&b(f<<6&192|h))}} -function hc(){if(!U){U={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));fc[c]=d;for(var e=0;ec&&(c=a.length);var d=a.indexOf("?");if(0>d||d>c){d=c;var e=""}else e=a.substring(d+1,c);a=[a.substr(0,d),e,a.substr(c)];c=a[1];a[1]=b?c?c+"&"+b:b:c;a=a[0]+(a[1]?"?"+a[1]:"")+a[2]}return a}a.a("$httpHeaders",c);return a};function Z(a){this.a=r("format",a)||"text";this.c=r("suppressCorsPreflight",a)||!1;this.b=r("withCredentials",a)||!1} -Z.prototype.N=function(a,b,c,d,e){var g=new Q;g.m=this.b;var f=new V({O:g});f.h=d.b;f.C("data",function(h){e(null,h)});f.C("status",function(h){0!=h.code&&e({code:h.code,message:h.details,metadata:h.metadata},null)});f.C("error",function(h){0!=h.code&&e({code:h.code,message:h.message,metadata:h.metadata},null)});Mb(g.headers,c);mc(this,g);this.c&&(c=Pb(g.headers),Ob(g.headers),a=lc(a,c));b=d.a(b);b=nc(b);"text"==this.a?b=gc(b):"binary"==this.a&&(g.h="arraybuffer");Wb(g,a,b);return f}; -Z.prototype.rpcCall=Z.prototype.N;Z.prototype.U=function(a,b,c,d){var e=this;return new Promise(function(g,f){e.N(a,b,c,d,function(h,k){h?f(h):g(k)})})};Z.prototype.unaryCall=Z.prototype.U;Z.prototype.S=function(a,b,c,d){var e=new Q;e.m=this.b;var g=new V({O:e});g.h=d.b;Mb(e.headers,c);mc(this,e);this.c&&(c=Pb(e.headers),Ob(e.headers),a=lc(a,c));b=d.a(b);b=nc(b);"text"==this.a?b=gc(b):"binary"==this.a&&(e.h="arraybuffer");Wb(e,a,b);return g};Z.prototype.serverStreaming=Z.prototype.S; -function nc(a){for(var b=a.length,c=[0,0,0,0],d=new Uint8Array(5+b),e=3;0<=e;e--)c[e]=b%256,b>>>=8;d.set(new Uint8Array(c),1);d.set(a,5);return d} -function mc(a,b){"text"==a.a?(b.headers.set("Content-Type","application/grpc-web-text"),b.headers.set("Accept","application/grpc-web-text")):b.headers.set("Content-Type","application/grpc-web+proto");b.headers.set("X-User-Agent","grpc-web-javascript/0.1");b.headers.set("X-Grpc-Web","1");if(P(b.headers.b,"deadline")){a=b.headers.get("deadline");a=Math.round(a-(new Date).getTime());var c=b.headers;P(c.b,"deadline")&&(delete c.b.deadline,c.c--,c.a.length>2*c.c&&Nb(c));Infinity===a&&(a=0);0=a.keyCode)a.keyCode=-1}catch(b){}};var I="closure_listenable_"+(1E6*Math.random()|0),gb=0;function hb(a,b,c,d,f){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.A=f;this.key=++gb;this.s=this.v=!1}function ib(a){a.s=!0;a.listener=null;a.proxy=null;a.src=null;a.A=null};function J(a){this.src=a;this.a={};this.b=0}J.prototype.add=function(a,b,c,d,f){var g=a.toString();a=this.a[g];a||(a=this.a[g]=[],this.b++);var e=jb(a,b,d,f);-1c.keyCode||void 0!=c.returnValue)){a:{var f=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(e){f=!0}if(f||void 0==c.returnValue)c.returnValue=!0}c=[];for(f=b.a;f;f=f.parentNode)c.push(f);a=a.type;for(f=c.length-1;0<=f;f--){b.a=c[f];var g=xb(c[f],a,!0,b);d=d&&g}for(f=0;f>>0);function qb(a){if("function"==w(a))return a;a[zb]||(a[zb]=function(b){return a.handleEvent(b)});return a[zb]};function L(){La.call(this);this.f=new J(this);this.M=this}z(L,La);L.prototype[I]=!0;L.prototype.removeEventListener=function(a,b,c,d){vb(this,a,b,c,d)};function N(a,b){a=a.M;var c=b.type||b;if(r(b))b=new G(b,a);else if(b instanceof G)b.target=b.target||a;else{var d=b;b=new G(c,a);Fa(b,d)}a=b.a=a;Ab(a,c,!0,b);Ab(a,c,!1,b)} +function Ab(a,b,c,d){if(b=a.f.a[String(b)]){b=b.concat();for(var f=!0,g=0;g=Ib(this).value)for("function"==w(b)&&(b=b()),a=new Cb(a,String(b),this.f),c&&(a.a=c),c=this;c;)c=c.a};var Jb={},P=null; +function Kb(a){P||(P=new Eb(""),Jb[""]=P,P.c=Gb);var b;if(!(b=Jb[a])){b=new Eb(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=Kb(a.substr(0,c));c.b||(c.b={});c.b[d]=b;b.a=c;Jb[a]=b}return b};function Q(a,b){a&&a.log(Hb,b,void 0)};function Lb(){}Lb.prototype.a=null;function Mb(a){var b;(b=a.a)||(b={},Nb(a)&&(b[0]=!0,b[1]=!0),b=a.a=b);return b};var Ob;function Pb(){}z(Pb,Lb);function Qb(a){return(a=Nb(a))?new ActiveXObject(a):new XMLHttpRequest}function Nb(a){if(!a.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c>4);64!=e&&(b(g<<4&240|e>>2),64!=h&&b(e<<6&192|h))}} +function lc(){if(!X){X={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));ic[c]=d;for(var f=0;f2*h.c&&Sb(h));Infinity===e&&(e=0);0e&&(e=f.length),h=f.indexOf("?"),0>h||h>e?(h=e,k=""):k=f.substring(h+ +1,e),f=[f.substr(0,h),k,f.substr(e)],e=f[1],f[1]=m?e?e+"&"+m:m:e,f=f[0]+(f[1]?"?"+f[1]:"")+f[2]}else f.a("$httpHeaders",e)}b=d.a(b.getRequestMessage());d=b.length;m=[0,0,0,0];e=new Uint8Array(5+d);for(h=3;0<=h;h--)m[h]=d%256,d>>>=8;e.set(new Uint8Array(m),1);e.set(b,5);b=e;if("text"==a.a){a=b;var p;void 0===p&&(p=0);lc();p=ic[p];b=[];for(d=0;d>2;l=(l&3)<<4|n>>4;n=(n&15)<<2|k>>6;k&=63;e||(k=64,m||(n=64));b.push(p[h], +p[l],p[n]||"",p[k]||"")}b=b.join("")}else"binary"==a.a&&(c.j="arraybuffer");Zb(c,f,b);return g}function rc(a,b,c){a.on("data",function(d){b(null,d)});a.on("error",function(d){0!=d.code&&b(d,null)});a.on("status",function(d){0!=d.code?b({code:d.code,message:d.details,metadata:d.metadata},null):c&&b(null,null,d)});c&&(a.on("metadata",function(d){b(null,null,null,d)}),a.on("end",function(){b(null,null)}))} +function pc(a,b){var c=a;b.forEach(function(d){var f=c;c=function(g){return d.intercept(g,f)}});return c};module.exports.AbstractClientBase={MethodInfo:function(a,b,c,d,f){this.name=d;this.b=f;this.f=a;this.a=b;this.c=c}};module.exports.GrpcWebClientBase=Z;module.exports.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15};module.exports.MethodDescriptor=oa; +module.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"}; diff --git a/spring/src/main/js/reservdjs/node_modules/grpc-web/package-lock.json b/spring/src/main/js/reservdjs/node_modules/grpc-web/package-lock.json index 1dc77d5..8af2fed 100644 --- a/spring/src/main/js/reservdjs/node_modules/grpc-web/package-lock.json +++ b/spring/src/main/js/reservdjs/node_modules/grpc-web/package-lock.json @@ -1,6 +1,6 @@ { "name": "grpc-web", - "version": "1.0.8", + "version": "1.1.0-rc.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/spring/src/main/js/reservdjs/node_modules/grpc-web/package.json b/spring/src/main/js/reservdjs/node_modules/grpc-web/package.json index 47a53f9..6b39cc6 100644 --- a/spring/src/main/js/reservdjs/node_modules/grpc-web/package.json +++ b/spring/src/main/js/reservdjs/node_modules/grpc-web/package.json @@ -1,6 +1,6 @@ { "name": "grpc-web", - "version": "1.0.8", + "version": "1.1.0-rc.1", "author": "Google Inc.", "description": "gRPC-Web Client Runtime Library", "homepage": "https://grpc.io/", diff --git a/spring/src/main/js/reservdjs/src/App.vue b/spring/src/main/js/reservdjs/src/App.vue index bc0b387..1899dc1 100644 --- a/spring/src/main/js/reservdjs/src/App.vue +++ b/spring/src/main/js/reservdjs/src/App.vue @@ -22,18 +22,95 @@