New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →
Socket
Sign inDemoInstall
Socket

libzap

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libzap - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

lib/workspace/protocol.d.ts

2

lib/ot/client.js

@@ -38,2 +38,3 @@ "use strict";

}
console.log(`Client=${process.env.ZAP_E2E_NAME} ACK @${this.rev}, wait=${JSON.stringify(this.wait)} buf=${JSON.stringify(this.buf)}`);
if (this.buf) {

@@ -65,2 +66,3 @@ if (this.send) {

}
console.log(`Client=${process.env.ZAP_E2E_NAME} >>> RECV @${this.rev}, transformed-op=${JSON.stringify(op)} wait=${JSON.stringify(this.wait)} buf=${JSON.stringify(this.buf)}`);
this.rev++;

@@ -67,0 +69,0 @@ if (!workspace_1.noop(op)) {

2

lib/ot/textDoc.js

@@ -105,3 +105,3 @@ "use strict";

if (reta + ins !== retb + del) {
throw new Error(`compose requires consecutive ops (${reta + ins} != ${retb + del})`);
throw new Error(`compose requires consecutive ops (${reta + ins} != ${retb + del}, a: ${JSON.stringify(a)}, b: ${JSON.stringify(b)} #js)`);
}

@@ -108,0 +108,0 @@ let { i: ia, o: oa } = geteditop(0, a);

@@ -84,2 +84,3 @@ "use strict";

}
console.log(`Client=${process.env.ZAP_E2E_NAME} SEND:${this.refID.ref} @${rev} ${JSON.stringify(op)}`);
this.remoteClient.sendRequest(protocol_1.RefUpdateUpstreamRequest.type, {

@@ -152,3 +153,2 @@ repo: this.refID.repo,

return __awaiter(this, void 0, void 0, function* () {
console.log(`client= ${process.env.ZAP_E2E_NAME}: UPDATE: ${JSON.stringify(params)} `);
if (params.ack) {

@@ -167,2 +167,3 @@ if (params.op) {

else if (params.op) {
console.log(`Client=${process.env.ZAP_E2E_NAME} RECV:${this.refID.ref} @${this.ot.rev} ${JSON.stringify(params.op)}`);
yield this.ot.recv(params.op);

@@ -169,0 +170,0 @@ }

@@ -63,3 +63,7 @@ "use strict";

this.refState = params.state;
throw new Error(`reset not yet implemented: ${JSON.stringify(params)}`);
if (params.state.history) {
for (const op of params.state.history) {
this.otClient.recv(op);
}
}
}

@@ -66,0 +70,0 @@ else if (params.op) {

{
"name": "libzap",
"version": "0.0.15",
"version": "0.0.16",
"description": "JavaScript library for Zap",

@@ -5,0 +5,0 @@ "license": "none",

@@ -59,2 +59,3 @@ import { WorkspaceOp, compose, noop, transform } from "./workspace";

console.log(`Client=${process.env.ZAP_E2E_NAME} ACK @${this.rev}, wait=${JSON.stringify(this.wait)} buf=${JSON.stringify(this.buf)}`);
if (this.buf) {

@@ -85,2 +86,3 @@ if (this.send) { this.send(this.rev + 1, this.buf); }

}
console.log(`Client=${process.env.ZAP_E2E_NAME} >>> RECV @${this.rev}, transformed-op=${JSON.stringify(op)} wait=${JSON.stringify(this.wait)} buf=${JSON.stringify(this.buf)}`);
this.rev++;

@@ -87,0 +89,0 @@ if (!noop(op)) {

@@ -93,3 +93,3 @@ export type EditOp = number | string; // number is retain/delete, string is insert

if (reta + ins !== retb + del) {
throw new Error(`compose requires consecutive ops (${reta + ins} != ${retb + del})`);
throw new Error(`compose requires consecutive ops (${reta + ins} != ${retb + del}, a: ${JSON.stringify(a)}, b: ${JSON.stringify(b)} #js)`);
}

@@ -96,0 +96,0 @@ let {i: ia, o: oa} = geteditop(0, a);

@@ -113,2 +113,3 @@ import { Client as OTClient } from "../ot/client";

}
console.log(`Client=${process.env.ZAP_E2E_NAME} SEND:${this.refID.ref} @${rev} ${JSON.stringify(op)}`);
this.remoteClient.sendRequest(RefUpdateUpstreamRequest.type, {

@@ -188,3 +189,2 @@ repo: this.refID.repo,

public async onUpdateFromUpstream(params: RefUpdateDownstreamParams): Promise<any> {
console.log(`client= ${process.env.ZAP_E2E_NAME}: UPDATE: ${JSON.stringify(params)} `);
if (params.ack) {

@@ -201,2 +201,3 @@ if (params.op) {

} else if (params.op) {
console.log(`Client=${process.env.ZAP_E2E_NAME} RECV:${this.refID.ref} @${this.ot.rev} ${JSON.stringify(params.op)}`);
await this.ot.recv(params.op);

@@ -203,0 +204,0 @@ } else if (params.delete) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc