Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@automerge/automerge-wasm

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automerge/automerge-wasm - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

126

bundler/bindgen_bg.js

@@ -870,2 +870,40 @@ import * as wasm from './bindgen_bg.wasm';

/**
* @param {any} datatype
* @param {any} _function
*/
registerDatatype(datatype, _function) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.automerge_registerDatatype(retptr, this.ptr, addHeapObject(datatype), addHeapObject(_function));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
if (r1) {
throw takeObject(r0);
}
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* @param {any} object
* @param {any} meta
* @param {any} callback
* @returns {any}
*/
applyPatches(object, meta, callback) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.automerge_applyPatches(retptr, this.ptr, addHeapObject(object), addHeapObject(meta), addHeapObject(callback));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* @returns {Array<any>}

@@ -1135,7 +1173,19 @@ */

/**
* @param {any} meta
* @returns {any}
*/
toJS() {
const ret = wasm.automerge_toJS(this.ptr);
return takeObject(ret);
toJS(meta) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.automerge_toJS(retptr, this.ptr, addHeapObject(meta));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}

@@ -1145,8 +1195,9 @@ /**

* @param {Array<any> | undefined} heads
* @param {any} meta
* @returns {any}
*/
materialize(obj, heads) {
materialize(obj, heads, meta) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.automerge_materialize(retptr, this.ptr, addHeapObject(obj), isLikeNone(heads) ? 0 : addHeapObject(heads));
wasm.automerge_materialize(retptr, this.ptr, addHeapObject(obj), isLikeNone(heads) ? 0 : addHeapObject(heads), addHeapObject(meta));
var r0 = getInt32Memory0()[retptr / 4 + 0];

@@ -1241,2 +1292,7 @@ var r1 = getInt32Memory0()[retptr / 4 + 1];

export function __wbindgen_is_undefined(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
export function __wbindgen_number_get(arg0, arg1) {

@@ -1283,2 +1339,7 @@ const obj = getObject(arg1);

export function __wbindgen_number_new(arg0) {
const ret = arg0;
return addHeapObject(ret);
};
export function __wbindgen_json_serialize(arg0, arg1) {

@@ -1352,7 +1413,2 @@ const obj = getObject(arg1);

export function __wbindgen_number_new(arg0) {
const ret = arg0;
return addHeapObject(ret);
};
export function __wbg_process_0cc2ada8524d6f83(arg0) {

@@ -1469,7 +1525,2 @@ const ret = getObject(arg0).process;

export function __wbindgen_is_undefined(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
export function __wbg_get_5c7997f237e97429(arg0, arg1) {

@@ -1484,2 +1535,7 @@ const ret = getObject(arg0)[arg1 >>> 0];

export function __wbg_from_cfdf43632aee49dc(arg0) {
const ret = Array.from(getObject(arg0));
return addHeapObject(ret);
};
export function __wbg_isArray_8d3ac415a656d809(arg0) {

@@ -1500,2 +1556,7 @@ const ret = Array.isArray(getObject(arg0));

export function __wbg_unshift_00a7fd970d7e1e63(arg0, arg1) {
const ret = getObject(arg0).unshift(getObject(arg1));
return ret;
};
export function __wbg_instanceof_ArrayBuffer_02bbeeb60438c785(arg0) {

@@ -1522,2 +1583,12 @@ let result;

export function __wbg_call_fe4813ad4076f5ef() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
return addHeapObject(ret);
}, arguments) };
export function __wbg_call_15051f75cc194d03() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
return addHeapObject(ret);
}, arguments) };
export function __wbg_next_340569d73e765cd9() { return handleError(function (arg0) {

@@ -1565,2 +1636,12 @@ const ret = getObject(arg0).next();

export function __wbg_assign_a258c7e1b580da02(arg0, arg1) {
const ret = Object.assign(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
};
export function __wbg_defineProperty_9552c9cf2473c7ac(arg0, arg1, arg2) {
const ret = Object.defineProperty(getObject(arg0), getObject(arg1), getObject(arg2));
return addHeapObject(ret);
};
export function __wbg_entries_cd0d36416cbaf078(arg0) {

@@ -1581,2 +1662,7 @@ const ret = Object.entries(getObject(arg0));

export function __wbg_for_ca76df8d65bf1e60(arg0, arg1) {
const ret = Symbol.for(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
export function __wbg_buffer_e8e1791d59230f6e(arg0) {

@@ -1627,2 +1713,12 @@ const ret = getObject(arg0).buffer;

export function __wbg_apply_60d1002f454683e2() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
return addHeapObject(ret);
}, arguments) };
export function __wbg_deleteProperty_5379f04a5056323a() { return handleError(function (arg0, arg1) {
const ret = Reflect.deleteProperty(getObject(arg0), getObject(arg1));
return ret;
}, arguments) };
export function __wbg_get_556a4c57efe02bcd() { return handleError(function (arg0, arg1) {

@@ -1629,0 +1725,0 @@ const ret = Reflect.get(getObject(arg0), getObject(arg1));

@@ -94,11 +94,29 @@ export type Actor = string;

export type Patch = {
obj: ObjID
action: 'assign' | 'insert' | 'delete'
key: Prop
export type Patch = PutPatch | DelPatch | SplicePatch | IncPatch;
export type PutPatch = {
action: 'put'
path: Prop[],
value: Value
datatype: Datatype
conflict: boolean
}
export type IncPatch = {
action: 'put'
path: Prop[],
value: number
}
export type DelPatch = {
action: 'del'
path: Prop[],
length?: number,
}
export type SplicePatch = {
action: 'splice'
path: Prop[],
values: Value[],
}
export function create(actor?: Actor): Automerge;

@@ -161,2 +179,3 @@ export function load(data: Uint8Array, actor?: Actor): Automerge;

enablePatches(enable: boolean): void;
registerDatatype(datatype: string, callback: Function): void;
popPatches(): Patch[];

@@ -190,2 +209,5 @@

dump(): void;
// experimental api can go here
applyPatches<Doc>(obj: Doc, meta?: unknown, callback?: (values: Value[]) => undefined): Doc;
}

@@ -192,0 +214,0 @@

@@ -869,2 +869,40 @@ let imports = {};

/**
* @param {any} datatype
* @param {any} _function
*/
registerDatatype(datatype, _function) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.automerge_registerDatatype(retptr, this.ptr, addHeapObject(datatype), addHeapObject(_function));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
if (r1) {
throw takeObject(r0);
}
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* @param {any} object
* @param {any} meta
* @param {any} callback
* @returns {any}
*/
applyPatches(object, meta, callback) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.automerge_applyPatches(retptr, this.ptr, addHeapObject(object), addHeapObject(meta), addHeapObject(callback));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* @returns {Array<any>}

@@ -1134,7 +1172,19 @@ */

/**
* @param {any} meta
* @returns {any}
*/
toJS() {
const ret = wasm.automerge_toJS(this.ptr);
return takeObject(ret);
toJS(meta) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.automerge_toJS(retptr, this.ptr, addHeapObject(meta));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}

@@ -1144,8 +1194,9 @@ /**

* @param {Array<any> | undefined} heads
* @param {any} meta
* @returns {any}
*/
materialize(obj, heads) {
materialize(obj, heads, meta) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.automerge_materialize(retptr, this.ptr, addHeapObject(obj), isLikeNone(heads) ? 0 : addHeapObject(heads));
wasm.automerge_materialize(retptr, this.ptr, addHeapObject(obj), isLikeNone(heads) ? 0 : addHeapObject(heads), addHeapObject(meta));
var r0 = getInt32Memory0()[retptr / 4 + 0];

@@ -1242,2 +1293,7 @@ var r1 = getInt32Memory0()[retptr / 4 + 1];

module.exports.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
module.exports.__wbindgen_number_get = function(arg0, arg1) {

@@ -1284,2 +1340,7 @@ const obj = getObject(arg1);

module.exports.__wbindgen_number_new = function(arg0) {
const ret = arg0;
return addHeapObject(ret);
};
module.exports.__wbindgen_json_serialize = function(arg0, arg1) {

@@ -1353,7 +1414,2 @@ const obj = getObject(arg1);

module.exports.__wbindgen_number_new = function(arg0) {
const ret = arg0;
return addHeapObject(ret);
};
module.exports.__wbg_process_0cc2ada8524d6f83 = function(arg0) {

@@ -1470,7 +1526,2 @@ const ret = getObject(arg0).process;

module.exports.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
module.exports.__wbg_get_5c7997f237e97429 = function(arg0, arg1) {

@@ -1485,2 +1536,7 @@ const ret = getObject(arg0)[arg1 >>> 0];

module.exports.__wbg_from_cfdf43632aee49dc = function(arg0) {
const ret = Array.from(getObject(arg0));
return addHeapObject(ret);
};
module.exports.__wbg_isArray_8d3ac415a656d809 = function(arg0) {

@@ -1501,2 +1557,7 @@ const ret = Array.isArray(getObject(arg0));

module.exports.__wbg_unshift_00a7fd970d7e1e63 = function(arg0, arg1) {
const ret = getObject(arg0).unshift(getObject(arg1));
return ret;
};
module.exports.__wbg_instanceof_ArrayBuffer_02bbeeb60438c785 = function(arg0) {

@@ -1523,2 +1584,12 @@ let result;

module.exports.__wbg_call_fe4813ad4076f5ef = function() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_call_15051f75cc194d03 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_next_340569d73e765cd9 = function() { return handleError(function (arg0) {

@@ -1566,2 +1637,12 @@ const ret = getObject(arg0).next();

module.exports.__wbg_assign_a258c7e1b580da02 = function(arg0, arg1) {
const ret = Object.assign(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
};
module.exports.__wbg_defineProperty_9552c9cf2473c7ac = function(arg0, arg1, arg2) {
const ret = Object.defineProperty(getObject(arg0), getObject(arg1), getObject(arg2));
return addHeapObject(ret);
};
module.exports.__wbg_entries_cd0d36416cbaf078 = function(arg0) {

@@ -1582,2 +1663,7 @@ const ret = Object.entries(getObject(arg0));

module.exports.__wbg_for_ca76df8d65bf1e60 = function(arg0, arg1) {
const ret = Symbol.for(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
module.exports.__wbg_buffer_e8e1791d59230f6e = function(arg0) {

@@ -1628,2 +1714,12 @@ const ret = getObject(arg0).buffer;

module.exports.__wbg_apply_60d1002f454683e2 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_deleteProperty_5379f04a5056323a = function() { return handleError(function (arg0, arg1) {
const ret = Reflect.deleteProperty(getObject(arg0), getObject(arg1));
return ret;
}, arguments) };
module.exports.__wbg_get_556a4c57efe02bcd = function() { return handleError(function (arg0, arg1) {

@@ -1630,0 +1726,0 @@ const ret = Reflect.get(getObject(arg0), getObject(arg1));

4

package.json

@@ -11,3 +11,3 @@ {

"repository": "github:automerge/automerge-rs",
"version": "0.1.8",
"version": "0.1.9",
"license": "MIT",

@@ -30,3 +30,3 @@ "files": [

"scripts": {
"lint": "eslint test/*.ts",
"lint": "eslint test/*.ts index.d.ts",
"debug": "cross-env PROFILE=dev yarn buildall",

@@ -33,0 +33,0 @@ "build": "cross-env PROFILE=dev FEATURES='' yarn buildall",

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