Skip to content

Commit 6f646a9

Browse files
author
Dimitar Tachev
authored
Merge pull request #4298 from NativeScript/fatme/merge-release-511
chore: merge release into master
2 parents 57a3f75 + e190110 commit 6f646a9

File tree

5 files changed

+44
-49
lines changed

5 files changed

+44
-49
lines changed

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
NativeScript CLI Changelog
22
================
33

4+
5.1.1 (2019, January 17)
5+
==
6+
7+
### Fixed
8+
* [Fixed #4024](https://github.com/NativeScript/nativescript-cli/issues/4024): LiveSync is not working in Preview app when Angular's lazy loading is used
9+
* [Fixed #4197](https://github.com/NativeScript/nativescript-cli/issues/4197): Not able to change IPHONEOS_DEPLOYMENT_TARGET due to CLI overwriting ARCHS and VALID_ARCHS
10+
* [Fixed #4222](https://github.com/NativeScript/nativescript-cli/issues/4222): Sidekick restarts DevTools during debug when change in .xml/.css/.html file is applied
11+
* [Fixed #4218](https://github.com/NativeScript/nativescript-cli/issues/4218): Cannot run app after debug-brk fail
12+
* [Fixed #4228](https://github.com/NativeScript/nativescript-cli/issues/4228): `tns update` command doesn't work with yarn
13+
* [Fixed #4230](https://github.com/NativeScript/nativescript-cli/issues/4230): Debugging with HMR is not working for iOS
14+
* [Fixed #4234](https://github.com/NativeScript/nativescript-cli/issues/4234): Creating project hangs on Windows when yarn is set as package manager
15+
* [Fixed #4236](https://github.com/NativeScript/nativescript-cli/issues/4236): Chrome DevTools(iOS): Debugger does not attach after reloading the page
16+
* [Fixed #4238](https://github.com/NativeScript/nativescript-cli/issues/4238): Fresh project build error on ios
17+
* [Fixed #4251](https://github.com/NativeScript/nativescript-cli/pull/4251): Unhandled promise rejection error from sidekick when livesync to preview app with bundle
18+
* [Fixed #4260](https://github.com/NativeScript/nativescript-cli/issues/4260): CLI crashes when attaching to a non running iOS app
19+
* [Fixed #4261](https://github.com/NativeScript/nativescript-cli/issues/4261): The CLI requires developer disk image not only in debug
20+
* [Fixed #4272](https://github.com/NativeScript/nativescript-cli/issues/4272): Generation of splash screen fails for new templates
21+
* [Fixed #4273](https://github.com/NativeScript/nativescript-cli/issues/4273): `tns debug ios --hmr` If you have two open tabs and close one, breakpoints stop working
22+
* [Fixed #4291](https://github.com/NativeScript/nativescript-cli/issues/4291): Error during debug on iOS: WebSocket is not open: readyState 2 (CLOSING)
23+
* [Fixed #4292](https://github.com/NativeScript/nativescript-cli/issues/4292): Error during debug on iOS: RangeError: Index out of range
24+
* [Fixed #4293](https://github.com/NativeScript/nativescript-cli/issues/4293): Error during debug on iOS: RangeError [ERR_BUFFER_OUT_OF_BOUNDS]
25+
26+
427
5.1.0 (2018, December 11)
528
==
629

lib/device-sockets/ios/app-debug-socket-proxy-factory.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { EventEmitter } from "events";
22
import { CONNECTION_ERROR_EVENT_NAME } from "../../constants";
3-
import { PacketStream } from "./packet-stream";
43
import * as net from "net";
54
import * as ws from "ws";
65
import temp = require("temp");
6+
import { MessageUnpackStream } from "ios-device-lib";
77

88
export class AppDebugSocketProxyFactory extends EventEmitter implements IAppDebugSocketProxyFactory {
99
private deviceWebServers: IDictionary<ws.Server> = {};
@@ -134,11 +134,16 @@ export class AppDebugSocketProxyFactory extends EventEmitter implements IAppDebu
134134
const encoding = "utf16le";
135135

136136
const appDebugSocket: net.Socket = (<any>req)["__deviceSocket"];
137-
const packets = new PacketStream();
137+
const packets = new MessageUnpackStream();
138138
appDebugSocket.pipe(packets);
139139

140140
packets.on("data", (buffer: Buffer) => {
141-
webSocket.send(buffer.toString(encoding));
141+
const message = buffer.toString(encoding);
142+
if (webSocket.readyState === webSocket.OPEN) {
143+
webSocket.send(message);
144+
} else {
145+
this.$logger.trace(`Received message ${message}, but unable to send it to webSocket as its state is: ${webSocket.readyState}`);
146+
}
142147
});
143148

144149
webSocket.on("error", err => {

lib/device-sockets/ios/packet-stream.ts

-33
This file was deleted.

npm-shrinkwrap.json

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
"gaze": "1.1.0",
4646
"iconv-lite": "0.4.11",
4747
"inquirer": "6.2.0",
48-
"ios-device-lib": "0.4.15",
48+
"ios-device-lib": "0.5.0",
4949
"ios-mobileprovision-finder": "1.0.10",
50-
"ios-sim-portable": "4.0.6",
50+
"ios-sim-portable": "4.0.8",
5151
"istextorbinary": "2.2.1",
5252
"jimp": "0.2.28",
5353
"lockfile": "1.0.3",

0 commit comments

Comments
 (0)