Skip to content

Commit bcd8d28

Browse files
committed
Upgrade Web to v0.0.28
1 parent e5a59b6 commit bcd8d28

File tree

7 files changed

+199
-32
lines changed

7 files changed

+199
-32
lines changed

web/dist/bundle.js

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"use strict";
7474
/* WEBPACK VAR INJECTION */(function(Buffer) {
7575
Object.defineProperty(exports, "__esModule", { value: true });
76-
__webpack_require__(6);
76+
__webpack_require__(4);
7777
var ResponseStatus = (function () {
7878
function ResponseStatus() {
7979
}
@@ -202,7 +202,7 @@ var ServerEventsClient = (function () {
202202
headers.set("Content-Type", "text/plain");
203203
if (op === "cmd") {
204204
if (cmd === "onConnect") {
205-
this.connectionInfo = body;
205+
this.connectionInfo = mergedBody;
206206
if (typeof body.heartbeatIntervalMs == "string")
207207
this.connectionInfo.heartbeatIntervalMs = parseInt(body.heartbeatIntervalMs);
208208
if (typeof body.idleTimeoutMs == "string")
@@ -582,6 +582,9 @@ var JsonServiceClient = (function () {
582582
this.userName = userName;
583583
this.password = password;
584584
};
585+
JsonServiceClient.prototype.setBearerToken = function (token) {
586+
this.headers.set("Authorization", "Bearer " + token);
587+
};
585588
JsonServiceClient.prototype.get = function (request, args) {
586589
return this.send(HttpMethods.Get, request, args);
587590
};
@@ -701,7 +704,7 @@ exports.JsonServiceClient = JsonServiceClient;
701704
var createErrorResponse = function (errorCode, message) {
702705
var error = new ErrorResponse();
703706
error.responseStatus = new ResponseStatus();
704-
error.responseStatus.errorCode = errorCode;
707+
error.responseStatus.errorCode = errorCode && errorCode.toString();
705708
error.responseStatus.message = message;
706709
return error;
707710
};
@@ -1198,8 +1201,8 @@ function fromByteArray (uint8) {
11981201

11991202

12001203
var base64 = __webpack_require__(2)
1201-
var ieee754 = __webpack_require__(4)
1202-
var isArray = __webpack_require__(5)
1204+
var ieee754 = __webpack_require__(5)
1205+
var isArray = __webpack_require__(6)
12031206

12041207
exports.Buffer = Buffer
12051208
exports.SlowBuffer = SlowBuffer
@@ -2981,6 +2984,19 @@ function isnan (val) {
29812984

29822985
/***/ }),
29832986
/* 4 */
2987+
/***/ (function(module, exports, __webpack_require__) {
2988+
2989+
// the whatwg-fetch polyfill installs the fetch() function
2990+
// on the global object (window or self)
2991+
//
2992+
// Return that as the export for use in Webpack, Browserify etc.
2993+
__webpack_require__(8);
2994+
var globalObj = typeof self !== 'undefined' && self || this;
2995+
module.exports = globalObj.fetch.bind(globalObj);
2996+
2997+
2998+
/***/ }),
2999+
/* 5 */
29843000
/***/ (function(module, exports) {
29853001

29863002
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
@@ -3070,7 +3086,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
30703086

30713087

30723088
/***/ }),
3073-
/* 5 */
3089+
/* 6 */
30743090
/***/ (function(module, exports) {
30753091

30763092
var toString = {}.toString;
@@ -3080,18 +3096,6 @@ module.exports = Array.isArray || function (arr) {
30803096
};
30813097

30823098

3083-
/***/ }),
3084-
/* 6 */
3085-
/***/ (function(module, exports, __webpack_require__) {
3086-
3087-
// the whatwg-fetch polyfill installs the fetch() function
3088-
// on the global object (window or self)
3089-
//
3090-
// Return that as the export for use in Webpack, Browserify etc.
3091-
__webpack_require__(8);
3092-
module.exports = self.fetch.bind(self);
3093-
3094-
30953099
/***/ }),
30963100
/* 7 */
30973101
/***/ (function(module, exports) {
@@ -3681,10 +3685,7 @@ var startListening = function () {
36813685
client = new servicestack_client_1.ServerEventsClient(BASEURL, [CHANNEL], {
36823686
handlers: {
36833687
onConnect: function (e) {
3684-
sub = e;
3685-
e.selector = "onConnect";
3686-
e.json = JSON.stringify(e);
3687-
refresh(e);
3688+
refresh(sub = e);
36883689
},
36893690
onJoin: refresh,
36903691
onLeave: refresh,

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"webpack": "^2.2.1"
1515
},
1616
"dependencies": {
17-
"servicestack-client": "^0.0.27"
17+
"servicestack-client": "0.0.28"
1818
}
1919
}

web/src/app.js

Lines changed: 29 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/src/app.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/src/app.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ const startListening = () => {
5151
client = new ServerEventsClient(BASEURL, [CHANNEL], {
5252
handlers: {
5353
onConnect: (e:ServerEventConnect) => {
54-
sub = e;
55-
e.selector = "onConnect";
56-
e.json = JSON.stringify(e);
57-
refresh(e);
54+
refresh(sub = e);
5855
},
5956
onJoin: refresh,
6057
onLeave: refresh,

web/src/dtos.js

Lines changed: 143 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)