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

@kizahasi/flocon-core

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kizahasi/flocon-core - npm Package Compare versions

Comparing version 0.18.0-beta.7 to 0.18.0

dist/cjs/internal/ot/util/isValidKey.js

30

dist/cjs/internal/ot/boardLocation/v1.js

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

const result_1 = require("@kizahasi/result");
const util_1 = require("@kizahasi/util");
const t = __importStar(require("io-ts"));

@@ -45,2 +46,3 @@ const v1_1 = require("../compositeKey/v1");

exports.downOperation = (0, createOperation_1.createOperation)(1, {
boardKey: t.type({ oldValue: v1_1.compositeKey }),
h: numberDownOperation,

@@ -53,2 +55,3 @@ isPrivate: booleanDownOperation,

exports.upOperation = (0, createOperation_1.createOperation)(1, {
boardKey: t.type({ newValue: v1_1.compositeKey }),
h: numberUpOperation,

@@ -74,2 +77,5 @@ isPrivate: booleanUpOperation,

const result = { ...state };
if (operation.boardKey != null) {
result.boardKey = operation.boardKey.newValue;
}
if (operation.h != null) {

@@ -95,2 +101,5 @@ result.h = operation.h.newValue;

const result = { ...state };
if (operation.boardKey != null) {
result.boardKey = operation.boardKey.oldValue;
}
if (operation.h !== undefined) {

@@ -117,2 +126,3 @@ result.h = operation.h.oldValue;

$v: 1,
boardKey: ReplaceOperation.composeDownOperation(first.boardKey, second.boardKey),
h: ReplaceOperation.composeDownOperation(first.h, second.h),

@@ -133,2 +143,6 @@ isPrivate: ReplaceOperation.composeDownOperation(first.isPrivate, second.isPrivate),

const twoWayOperation = { $v: 1 };
if (downOperation.boardKey !== undefined) {
prevState.boardKey = downOperation.boardKey.oldValue;
twoWayOperation.boardKey = { ...downOperation.boardKey, newValue: nextState.boardKey };
}
if (downOperation.h !== undefined) {

@@ -162,2 +176,5 @@ prevState.h = downOperation.h.oldValue;

const resultType = { $v: 1 };
if (!(0, util_1.compositeKeyEquals)(prevState.boardKey, nextState.boardKey)) {
resultType.boardKey = { oldValue: prevState.boardKey, newValue: nextState.boardKey };
}
if (prevState.h !== nextState.h) {

@@ -189,2 +206,7 @@ resultType.h = { oldValue: prevState.h, newValue: nextState.h };

const twoWayOperation = { $v: 1 };
twoWayOperation.boardKey = ReplaceOperation.serverTransform({
first: serverOperation === null || serverOperation === void 0 ? void 0 : serverOperation.boardKey,
second: clientOperation.boardKey,
prevState: prevState.boardKey,
});
twoWayOperation.h = ReplaceOperation.serverTransform({

@@ -222,2 +244,6 @@ first: serverOperation === null || serverOperation === void 0 ? void 0 : serverOperation.h,

const clientTransform = ({ first, second }) => {
const boardKey = ReplaceOperation.clientTransform({
first: first.boardKey,
second: second.boardKey,
});
const h = ReplaceOperation.clientTransform({

@@ -245,2 +271,3 @@ first: first.h,

$v: 1,
boardKey: boardKey.firstPrime,
h: h.firstPrime,

@@ -254,2 +281,3 @@ isPrivate: isPrivate.firstPrime,

$v: 1,
boardKey: boardKey.secondPrime,
h: h.secondPrime,

@@ -267,2 +295,2 @@ isPrivate: isPrivate.secondPrime,

exports.clientTransform = clientTransform;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidjEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvaW50ZXJuYWwvb3QvYm9hcmRMb2NhdGlvbi92MS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsNkNBQTBDO0FBQzFDLHlDQUEyQjtBQUMzQiwyQ0FBa0Q7QUFDbEQsNkRBQTBEO0FBQzFELDJDQUE0QztBQUM1QywyRUFBNkQ7QUFHN0QsTUFBTSxtQkFBbUIsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsUUFBUSxFQUFFLENBQUMsQ0FBQyxNQUFNLEVBQUUsQ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U6IGlzUHJpdmF0ZS5maXJzdFByaW1lLFxuICAgICAgICB3OiB3LmZpcnN0UHJpbWUsXG4gICAgICAgIHg6IHguZmlyc3RQcmltZSxcbiAgICAgICAgeTogeS5maXJzdFByaW1lLFxuICAgIH07XG5cbiAgICBjb25zdCBzZWNvbmRQcmltZTogVXBPcGVyYXRpb24gPSB7XG4gICAgICAgICR2OiAxLFxuICAgICAgICBib2FyZEtleTogYm9hcmRLZXkuc2Vjb25kUHJpbWUsXG4gICAgICAgIGg6IGguc2Vjb25kUHJpbWUsXG4gICAgICAgIGlzUHJpdmF0ZTogaXNQcml2YXRlLnNlY29uZFByaW1lLFxuICAgICAgICB3OiB3LnNlY29uZFByaW1lLFxuICAgICAgICB4OiB4LnNlY29uZFByaW1lLFxuICAgICAgICB5OiB5LnNlY29uZFByaW1lLFxuICAgIH07XG5cbiAgICByZXR1cm4gUmVzdWx0Lm9rKHtcbiAgICAgICAgZmlyc3RQcmltZTogaXNJZFJlY29yZChmaXJzdFByaW1lKSA/IHVuZGVmaW5lZCA6IGZpcnN0UHJpbWUsXG4gICAgICAgIHNlY29uZFByaW1lOiBpc0lkUmVjb3JkKHNlY29uZFByaW1lKSA/IHVuZGVmaW5lZCA6IHNlY29uZFByaW1lLFxuICAgIH0pO1xufTtcbiJdfQ==

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

const result_1 = require("@kizahasi/result");
const util_1 = require("@kizahasi/util");
const t = __importStar(require("io-ts"));

@@ -52,2 +53,3 @@ const createOperation_1 = require("../util/createOperation");

exports.downOperation = (0, createOperation_1.createOperation)(1, {
boardKey: t.type({ oldValue: v1_1.compositeKey }),
cellH: numberDownOperation,

@@ -65,2 +67,3 @@ cellW: numberDownOperation,

exports.upOperation = (0, createOperation_1.createOperation)(1, {
boardKey: t.type({ newValue: v1_1.compositeKey }),
cellH: numberUpOperation,

@@ -101,2 +104,5 @@ cellW: numberUpOperation,

const result = { ...state };
if (operation.boardKey != null) {
result.boardKey = operation.boardKey.newValue;
}
if (operation.cellH != null) {

@@ -137,2 +143,5 @@ result.cellH = operation.cellH.newValue;

const result = { ...state };
if (operation.boardKey != null) {
result.boardKey = operation.boardKey.oldValue;
}
if (operation.cellH !== undefined) {

@@ -174,2 +183,3 @@ result.cellH = operation.cellH.oldValue;

$v: 1,
boardKey: ReplaceOperation.composeDownOperation(first.boardKey, second.boardKey),
cellH: ReplaceOperation.composeDownOperation(first.cellH, second.cellH),

@@ -197,2 +207,6 @@ cellW: ReplaceOperation.composeDownOperation(first.cellW, second.cellW),

const twoWayOperation = { $v: 1 };
if (downOperation.boardKey !== undefined) {
prevState.boardKey = downOperation.boardKey.oldValue;
twoWayOperation.boardKey = { ...downOperation.boardKey, newValue: nextState.boardKey };
}
if (downOperation.cellH !== undefined) {

@@ -261,2 +275,5 @@ prevState.cellH = downOperation.cellH.oldValue;

const resultType = { $v: 1 };
if (!(0, util_1.compositeKeyEquals)(prevState.boardKey, nextState.boardKey)) {
resultType.boardKey = { oldValue: prevState.boardKey, newValue: nextState.boardKey };
}
if (prevState.cellH !== nextState.cellH) {

@@ -318,2 +335,7 @@ resultType.cellH = {

const twoWayOperation = { $v: 1 };
twoWayOperation.boardKey = ReplaceOperation.serverTransform({
first: serverOperation === null || serverOperation === void 0 ? void 0 : serverOperation.boardKey,
second: clientOperation.boardKey,
prevState: prevState.boardKey,
});
twoWayOperation.cellH = ReplaceOperation.serverTransform({

@@ -376,2 +398,6 @@ first: serverOperation === null || serverOperation === void 0 ? void 0 : serverOperation.cellH,

const clientTransform = ({ first, second }) => {
const boardKey = ReplaceOperation.clientTransform({
first: first.boardKey,
second: second.boardKey,
});
const cellH = ReplaceOperation.clientTransform({

@@ -419,2 +445,3 @@ first: first.cellH,

$v: 1,
boardKey: boardKey.firstPrime,
cellH: cellH.firstPrime,

@@ -433,2 +460,3 @@ cellW: cellW.firstPrime,

$v: 1,
boardKey: boardKey.secondPrime,
cellH: cellH.secondPrime,

@@ -451,2 +479,2 @@ cellW: cellW.secondPrime,

exports.cl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ge1xuICAgICAgICAkdjogMSxcbiAgICAgICAgYm9hcmRLZXk6IGJvYXJkS2V5LnNlY29uZFByaW1lLFxuICAgICAgICBjZWxsSDogY2VsbEguc2Vjb25kUHJpbWUsXG4gICAgICAgIGNlbGxXOiBjZWxsVy5zZWNvbmRQcmltZSxcbiAgICAgICAgY2VsbFg6IGNlbGxYLnNlY29uZFByaW1lLFxuICAgICAgICBjZWxsWTogY2VsbFkuc2Vjb25kUHJpbWUsXG4gICAgICAgIGg6IGguc2Vjb25kUHJpbWUsXG4gICAgICAgIGlzQ2VsbE1vZGU6IGlzQ2VsbE1vZGUuc2Vjb25kUHJpbWUsXG4gICAgICAgIGlzUHJpdmF0ZTogaXNQcml2YXRlLnNlY29uZFByaW1lLFxuICAgICAgICB3OiB3LnNlY29uZFByaW1lLFxuICAgICAgICB4OiB4LnNlY29uZFByaW1lLFxuICAgICAgICB5OiB5LnNlY29uZFByaW1lLFxuICAgIH07XG5cbiAgICByZXR1cm4gUmVzdWx0Lm9rKHtcbiAgICAgICAgZmlyc3RQcmltZTogaXNJZFJlY29yZChmaXJzdFByaW1lKSA/IHVuZGVmaW5lZCA6IGZpcnN0UHJpbWUsXG4gICAgICAgIHNlY29uZFByaW1lOiBpc0lkUmVjb3JkKHNlY29uZFByaW1lKSA/IHVuZGVmaW5lZCA6IHNlY29uZFByaW1lLFxuICAgIH0pO1xufTtcbiJdfQ==

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

const util_1 = require("@kizahasi/util");
const isValidKey_1 = require("./isValidKey");
const restore = ({ nextState: unsafeNextState, downOperation: unsafeDownOperation, innerRestore, }) => {

@@ -135,2 +136,5 @@ const nextState = (0, util_1.recordToMap)(unsafeNextState);

for (const [key, operation] of (0, util_1.recordToMap)(unsafeSecond)) {
if (!(0, isValidKey_1.isValidKey)(key)) {
return result_1.Result.error(`${key} is not a valid key.`);
}
const innerPrevState = (_a = prevState.get(key)) !== null && _a !== void 0 ? _a : defaultState;

@@ -240,2 +244,2 @@ const innerNextState = (_b = nextState.get(key)) !== null && _b !== void 0 ? _b : defaultState;

exports.diff = diff;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1SZWNvcmRPcGVyYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvaW50ZXJuYWwvb3QvdXRpbC9wYXJhbVJlY29yZE9wZXJhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2Q0FBMEM7QUFDMUMseUNBQTJGO0FBZXBGLE1BQU0sT0FBTyxHQUFHLENBQWtFLEVBQ3JGLFNBQVMsRUFBRSxlQUFlLEVBQzFCLGFBQWEsRUFBRSxtQkFBbUIsRUFDbEMsWUFBWSxHQVNmLEVBR0MsRUFBRTtJQUNBLE1BQU0sU0FBUyxHQUFHLElBQUEsa0JBQVcsRUFBQyxlQUFlLENBQUMsQ0FBQztJQUUvQyxJQUFJLG1CQUFtQixJQUFJLElBQUksRUFBRTtRQUM3QixPQUFPLGVBQU0sQ0FBQyxFQUFFLENBQUM7WUFDYixTQUFTLEVBQUUsSUFBQSxrQkFBVyxFQUFDLFNBQVMsQ0FBQztZQUNqQyxlQUFlLEVBQUUsU0FBUztTQUM3QixDQUFDLENBQUM7S0FDTjtJQUVELE1BQU0sU0FBUyxHQUFHLElBQUksR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFDO0lBQ3JDLE1BQU0sZUFBZSxHQUFHLElBQUksR0FBRyxFQUE0QixDQUFDO0lBRTVELEtBQUssTUFBTSxDQUFDLEdBQUcsRUFBRSxLQUFLLENBQUMsSUFBSSxJQUFBLGtCQUFXLEVBQUMsbUJBQW1CLENBQUMsRUFBRTtRQUN6RCxNQUFNLGdCQUFnQixHQUFHLFNBQVMsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDNUMsSUFBSSxnQkFBZ0IsS0FBSyxTQUFTLE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XQoa2V5LCBncm91cEpvaW5lZC5sZWZ0KTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGNhc2UgcmlnaHQ6XG4gICAgICAgICAgICAgICAgcmVzdWx0LnNldChrZXksIGdyb3VwSm9pbmVkLnJpZ2h0KTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGNhc2UgYm90aDoge1xuICAgICAgICAgICAgICAgIGNvbnN0IHVwZGF0ZSA9IGlubmVyQ29tcG9zZSh7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0OiBncm91cEpvaW5lZC5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICBzZWNvbmQ6IGdyb3VwSm9pbmVkLnJpZ2h0LFxuICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZS5pc0Vycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1cGRhdGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh1cGRhdGUudmFsdWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQuc2V0KGtleSwgdXBkYXRlLnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIFJlc3VsdC5vayhtYXBUb1JlY29yZChyZXN1bHQpKTtcbn07XG5cbi8vIE1ha2Ugc3VyZSB0aGVzZTpcbi8vIC0gYXBwbHkocHJldlN0YXRlLCBmaXJzdCkgPSBuZXh0U3RhdGVcbmV4cG9ydCBjb25zdCBzZXJ2ZXJUcmFuc2Zvcm0gPSA8XG4gICAgVFNlcnZlclN0YXRlLFxuICAgIFRGaXJzdE9wZXJhdGlvbixcbiAgICBUU2Vjb25kT3BlcmF0aW9uLFxuIC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iAgICAgICAgICAgIGNhc2UgYm90aDoge1xuICAgICAgICAgICAgICAgIGNvbnN0IHhmb3JtID0gaW5uZXJUcmFuc2Zvcm0oe1xuICAgICAgICAgICAgICAgICAgICBmaXJzdDogZ3JvdXAubGVmdCxcbiAgICAgICAgICAgICAgICAgICAgc2Vjb25kOiBncm91cC5yaWdodCxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAoeGZvcm0uaXNFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHsgZXJyb3I6IHhmb3JtLmVycm9yIH07XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHhmb3JtLnZhbHVlLmZpcnN0UHJpbWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBmaXJzdFByaW1lLnNldChrZXksIHhmb3JtLnZhbHVlLmZpcnN0UHJpbWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoeGZvcm0udmFsdWUuc2Vjb25kUHJpbWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBzZWNvbmRQcmltZS5zZXQoa2V5LCB4Zm9ybS52YWx1ZS5zZWNvbmRQcmltZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuICAgIGlmIChlcnJvciAhPSBudWxsKSB7XG4gICAgICAgIHJldHVybiBSZXN1bHQuZXJyb3IoZXJyb3IuZXJyb3IpO1xuICAgIH1cbiAgICByZXR1cm4gUmVzdWx0Lm9rKHtcbiAgICAgICAgZmlyc3RQcmltZTogZmlyc3RQcmltZS5zaXplID09PSAwID8gdW5kZWZpbmVkIDogbWFwVG9SZWNvcmQoZmlyc3RQcmltZSksXG4gICAgICAgIHNlY29uZFByaW1lOiBzZW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DtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgcmlnaHQ6IHtcbiAgICAgICAgICAgICAgICBuZXh0U3RhdGUgPSB2YWx1ZS5yaWdodDtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgYm90aDoge1xuICAgICAgICAgICAgICAgIHByZXZTdGF0ZSA9IHZhbHVlLmxlZnQ7XG4gICAgICAgICAgICAgICAgbmV4dFN0YXRlID0gdmFsdWUucmlnaHQ7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgZGlmZlJlc3VsdCA9IGlubmVyRGlmZih7IHByZXZTdGF0ZSwgbmV4dFN0YXRlLCBrZXkgfSk7XG4gICAgICAgIGlmIChkaWZmUmVzdWx0ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIHJlc3VsdC5zZXQoa2V5LCBkaWZmUmVzdWx0KTtcbiAgICAgICAgY29udGludWU7XG4gICAgfVxuICAgIGlmIChyZXN1bHQuc2l6ZSA9PT0gMCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cbiAgICByZXR1cm4gbWFwVG9SZWNvcmQocmVzdWx0KTtcbn07XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1SZWNvcmRPcGVyYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvaW50ZXJuYWwvb3QvdXRpbC9wYXJhbVJlY29yZE9wZXJhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2Q0FBMEM7QUFDMUMseUNBQTJGO0FBRTNGLDZDQUEwQztBQWNuQyxNQUFNLE9BQU8sR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wgdmFsdWVdIG9mIHJlY29yZFRvTWFwKHVuc2FmZURvd25PcGVyYXRpb24pKSB7XG4gICAgICAgIGNvbnN0IG5leHRTdGF0ZUVsZW1lbnQgPSBuZXh0U3RhdGUuZ2V0KGtleSk7XG4gICAgICAgIGlmIChuZXh0U3RhdGVFbGVtZW50ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHJldHVybiBSZXN1bHQuZXJyb3IoYHRyaWVkIHRvIHVwZGF0ZSBcIiR7a2V5fVwiLCBidXQgbmV4dFN0YXRlIGRvZXMgbm90IGhhdmUgc3VjaCBhIGtleWApO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHJlc3RvcmVkID0gaW5uZXJSZXN0b3JlKHtcbiAgICAgICAgICAgIGRvd25PcGVyYXRpb246IHZhbHVlLFxuICAgICAgICAgICAgbmV4dFN0YXRlOiBuZXh0U3RhdGVFbGVtZW50LFxuICAgICAgICAgICAga2V5LFxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKHJlc3RvcmVkLmlzRXJyb3IpIHtcbiAgICAgICAgICAgIHJldHVybiByZXN0b3JlZDtcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzdG9yZWQudmFsdWUgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgcHJldlN0YXRlLnNldChrZXksIHJlc3RvcmVkLnZhbHVlLnByZXZTdGF0ZSk7XG4gICAgICAgIGlmIChyZXN0b3JlZC52YWx1ZS50d29XYXlPcGVyYXRpb24gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdHdvV2F5T3BlcmF0aW9uLnNldChrZXksIHJlc3RvcmVkLnZhbHVlLnR3b1dheU9wZXJhdGlvbik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gUmVzdWx0Lm9rKHtcbiAgICAgICAgcHJldlN0YXRlOiBtYXBUb1JlY29yZChwcmV2U3RhdGUpLFxuICAgICAg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lnaHQpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgY2FzZSBib3RoOiB7XG4gICAgICAgICAgICAgICAgY29uc3QgdXBkYXRlID0gaW5uZXJDb21wb3NlKHtcbiAgICAgICAgICAgICAgICAgICAgZmlyc3Q6IGdyb3VwSm9pbmVkLmxlZnQsXG4gICAgICAgICAgICAgICAgICAgIHNlY29uZDogZ3JvdXBKb2luZWQucmlnaHQsXG4gICAgICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAodXBkYXRlLmlzRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVwZGF0ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5zZXQoa2V5LCB1cGRhdGUudmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gUmVzdWx0Lm9rKG1hcFRvUmVjb3JkKHJlc3VsdCkpO1xufTtcblxuLy8gTWFrZSBzdXJlIHRoZXNlOlxuLy8gLSBhcHBseShwcmV2U3RhdGUsIGZpcnN0KSA9IG5leHRTdGF0ZVxuZXhwb3J0IGNvbnN0IHNlcnZlclRyYW5zZm9ybSA9IDxcbiAgICBUU2VydmVyU3RhdGUsXG4gICAgVEZpcnN0T3BlcmF0aW9uLFxuICAgIFRTZWNvbmRPcGVyYXRpb24sXG4gICAgVEN1c3RvbUVycm9yID0gc3RyaW5nXG4+KHtcbiAgICBmaXJzdDogdW5zYWZlRmlyc3QsXG4gICAgc2Vjb25kOiB1bnNhZmVTZWNvbmQsXG4gICAgcHJldlN0YXRlOiB1bnNhZmVQcmV2U3RhdG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uZGVmaW5lZDtcbiAgICB9LFxuICAgIFRFcnJvclxuPiA9PiB7XG4gICAgaWYgKGZpcnN0ID09PSB1bmRlZmluZWQgfHwgc2Vjb25kID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5vayh7XG4gICAgICAgICAgICBmaXJzdFByaW1lOiBmaXJzdCxcbiAgICAgICAgICAgIHNlY29uZFByaW1lOiBzZWNvbmQsXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGNvbnN0IGZpcnN0UHJpbWUgPSBuZXcgTWFwPHN0cmluZywgVE9wZXJhdGlvbj4oKTtcbiAgICBjb25zdCBzZWNvbmRQcmltZSA9IG5ldyBNYXA8c3RyaW5nLCBUT3BlcmF0aW9uPigpO1xuICAgIGxldCBlcnJvciA9IHVuZGVmaW5lZCBhcyB7IGVycm9yOiBURXJyb3IgfSB8IHVuZGVmaW5lZDtcblxuICAgIGdyb3VwSm9pbk1hcChyZWNvcmRUb01hcChmaXJzdCksIHJlY29yZFRvTWFwKHNlY29uZCkpLmZvckVhY2goKGdyb3VwLCBrZXkpID0+IHtcbiAgICAgICAgaWYgKGVycm9yICE9IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKGdyb3VwLnR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgbGVmdDoge1xuICAgICAgICAgICAgICAgIGZpcnN0UHJpbWUuc2V0KGtleSwgZ3JvdXAubGVmdCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSByaWdodDoge1xuICAgICAgICAgICAgICAgIHNlY29uZFByaW1lLnNldChrZXksIGdyb3VwLnJpZ2h0KTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIGJvdGg6IHtcbiAgICAgICAgICAgICAgICBjb25zdCB4Zm9ybSA9IGlubmVyVHJhbnNmb3JtKHtcbiAgICAgICAgICAgICAgICAgICAgZmlyc3Q6IGdyb3VwLmxlZnQsXG4gICAgICAgICAgICAgICAgICAgIHNlY29uZDogZ3JvdXAucmlnaHQsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKHhmb3JtLmlzRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSB7IGVycm9yOiB4Zm9ybS5lcnJvciB9O1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh4Zm9ybS52YWx1ZS5maXJzdFByaW1lICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RQcmltZS5zZXQoa2V5LCB4Zm9ybS52YWx1ZS5maXJzdFByaW1lKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHhmb3JtLnZhbHVlLnNlY29uZFByaW1lICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgc2Vjb25kUHJpbWUuc2V0KGtleSwgeGZvcm0udmFsdWUuc2Vjb25kUHJpbWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBpZiAoZXJyb3IgIT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gUmVzdWx0LmVycm9yKGVycm9yLmVycm9yKTtcbiAgICB9XG4gICAgcmV0dXJuIFJlc3VsdC5vayh7XG4gICAgICAgIGZpcnN0UHJpbWU6IGZpcnN0UHJpbWUuc2l6ZSA9PT0gMCA/IHVuZGVmaW5lZCA6IG1hcFRvUmVjb3JkKGZpcnN0UHJpbWUpLFxuICAgICAgICBzZWNvbmRQcmltZTogc2Vjb25kUHJpbWUuc2l6ZSA9PT0gMCA/IHVuZGVmaW5lZCA6IG1hcFRvU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AgICAgICBjYXNlIHJpZ2h0OiB7XG4gICAgICAgICAgICAgICAgbmV4dFN0YXRlID0gdmFsdWUucmlnaHQ7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIGJvdGg6IHtcbiAgICAgICAgICAgICAgICBwcmV2U3RhdGUgPSB2YWx1ZS5sZWZ0O1xuICAgICAgICAgICAgICAgIG5leHRTdGF0ZSA9IHZhbHVlLnJpZ2h0O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGRpZmZSZXN1bHQgPSBpbm5lckRpZmYoeyBwcmV2U3RhdGUsIG5leHRTdGF0ZSwga2V5IH0pO1xuICAgICAgICBpZiAoZGlmZlJlc3VsdCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQuc2V0KGtleSwgZGlmZlJlc3VsdCk7XG4gICAgICAgIGNvbnRpbnVlO1xuICAgIH1cbiAgICBpZiAocmVzdWx0LnNpemUgPT09IDApIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG4gICAgcmV0dXJuIG1hcFRvUmVjb3JkKHJlc3VsdCk7XG59O1xuIl19

58

dist/cjs/internal/ot/util/recordOperation.js

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

exports.upOperationFactory = upOperationFactory;
const dummyKey = '';
const fakeKey = 'FAKE-KEY';
// Make sure this:

@@ -40,6 +40,6 @@ // - apply(prevState, source) = nextState

return ((_a = DualKeyRecordOperation.toClientState({
serverState: { [dummyKey]: serverState },
serverState: { [fakeKey]: serverState },
isPrivate: (state, key) => isPrivate(state, key.second),
toClientState: ({ state, key }) => toClientState({ state, key: key.second }),
})[dummyKey]) !== null && _a !== void 0 ? _a : {});
})[fakeKey]) !== null && _a !== void 0 ? _a : {});
};

@@ -57,4 +57,4 @@ exports.toClientState = toClientState;

const result = DualKeyRecordOperation.restore({
nextState: { [dummyKey]: nextState },
downOperation: { [dummyKey]: downOperation },
nextState: { [fakeKey]: nextState },
downOperation: { [fakeKey]: downOperation },
innerRestore: ({ key, ...params }) => innerRestore({ ...params, key: key.second }),

@@ -67,6 +67,6 @@ innerDiff: ({ key, ...params }) => innerDiff({ ...params, key: key.second }),

return result_1.Result.ok({
prevState: (_a = result.value.prevState[dummyKey]) !== null && _a !== void 0 ? _a : {},
prevState: (_a = result.value.prevState[fakeKey]) !== null && _a !== void 0 ? _a : {},
twoWayOperation: result.value.twoWayOperation === undefined
? undefined
: result.value.twoWayOperation[dummyKey],
: result.value.twoWayOperation[fakeKey],
});

@@ -81,4 +81,4 @@ };

const result = DualKeyRecordOperation.apply({
prevState: { [dummyKey]: prevState },
operation: { [dummyKey]: operation },
prevState: { [fakeKey]: prevState },
operation: { [fakeKey]: operation },
innerApply: ({ key, ...params }) => innerApply({ ...params, key: key.second }),

@@ -89,3 +89,3 @@ });

}
return result_1.Result.ok((_a = result.value[dummyKey]) !== null && _a !== void 0 ? _a : {});
return result_1.Result.ok((_a = result.value[fakeKey]) !== null && _a !== void 0 ? _a : {});
};

@@ -99,4 +99,4 @@ exports.apply = apply;

const result = DualKeyRecordOperation.applyBack({
nextState: { [dummyKey]: nextState },
operation: { [dummyKey]: operation },
nextState: { [fakeKey]: nextState },
operation: { [fakeKey]: operation },
innerApplyBack: ({ key, ...params }) => innerApplyBack({ ...params, key: key.second }),

@@ -107,3 +107,3 @@ });

}
return result_1.Result.ok((_a = result.value[dummyKey]) !== null && _a !== void 0 ? _a : {});
return result_1.Result.ok((_a = result.value[fakeKey]) !== null && _a !== void 0 ? _a : {});
};

@@ -120,4 +120,4 @@ exports.applyBack = applyBack;

const result = DualKeyRecordOperation.composeDownOperation({
first: { [dummyKey]: first },
second: { [dummyKey]: second },
first: { [fakeKey]: first },
second: { [fakeKey]: second },
innerApplyBack: ({ key, ...params }) => innerApplyBack({ ...params, key: key.second }),

@@ -129,3 +129,3 @@ innerCompose: ({ key, ...params }) => innerCompose({ ...params, key: key.second }),

}
return result_1.Result.ok(result.value === undefined ? undefined : result.value[dummyKey]);
return result_1.Result.ok(result.value === undefined ? undefined : result.value[fakeKey]);
};

@@ -140,6 +140,6 @@ exports.composeDownOperation = composeDownOperation;

const result = DualKeyRecordOperation.serverTransform({
first: first === undefined ? undefined : { [dummyKey]: first },
second: second === undefined ? undefined : { [dummyKey]: second },
prevState: { [dummyKey]: prevState },
nextState: { [dummyKey]: nextState },
first: first === undefined ? undefined : { [fakeKey]: first },
second: second === undefined ? undefined : { [fakeKey]: second },
prevState: { [fakeKey]: prevState },
nextState: { [fakeKey]: nextState },
innerTransform: ({ key, ...params }) => innerTransform({ ...params, key: key.second }),

@@ -162,3 +162,3 @@ toServerState: (state, key) => toServerState(state, key.second),

}
return result_1.Result.ok(result.value === undefined ? undefined : result.value[dummyKey]);
return result_1.Result.ok(result.value === undefined ? undefined : result.value[fakeKey]);
};

@@ -168,4 +168,4 @@ exports.serverTransform = serverTransform;

const result = DualKeyRecordOperation.clientTransform({
first: first == null ? undefined : { [dummyKey]: first },
second: second == null ? undefined : { [dummyKey]: second },
first: first == null ? undefined : { [fakeKey]: first },
second: second == null ? undefined : { [fakeKey]: second },
innerTransform: params => innerTransform(params),

@@ -178,4 +178,4 @@ innerDiff: params => innerDiff(params),

return result_1.Result.ok({
firstPrime: result.value.firstPrime == null ? undefined : result.value.firstPrime[dummyKey],
secondPrime: result.value.secondPrime == null ? undefined : result.value.secondPrime[dummyKey],
firstPrime: result.value.firstPrime == null ? undefined : result.value.firstPrime[fakeKey],
secondPrime: result.value.secondPrime == null ? undefined : result.value.secondPrime[fakeKey],
});

@@ -186,4 +186,4 @@ };

const dualKeyResult = DualKeyRecordOperation.diff({
prevState: { [dummyKey]: prevState },
nextState: { [dummyKey]: nextState },
prevState: { [fakeKey]: prevState },
nextState: { [fakeKey]: nextState },
innerDiff: ({ key, ...params }) => innerDiff({ ...params, key: key.second }),

@@ -194,5 +194,5 @@ });

}
return dualKeyResult[dummyKey];
return dualKeyResult[fakeKey];
};
exports.diff = diff;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb3JkT3BlcmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2ludGVybmFsL290L3V0aWwvcmVjb3JkT3BlcmF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSw2Q0FBMEM7QUFFMUMsaUZBQW1FO0FBQ25FLHFDQUFtRDtBQUNuRCxxRUFNa0M7QUFZM0IsTUFBTSxZQUFZLEdBQUcsQ0FDeEIsR0FBUyxFQUNULEtBQWEsRUFDZixFQUFFLENBQUMsSUFBQSxlQUFNLEVBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBSFgsUUFBQSxZQUFZLGdCQUdEO0FBRWpCLE1BQU0sb0JBQW9CLEdBQUcsQ0FLaEMsR0FBUyxFQUNULEtBQWEsRUFDYixTQUFxQixFQUN2QixFQUFFLENBQUMsSUFBQSxlQUFNLEVBQUMsR0FBRyxFQUFFLElBQUEsMERBQWlDLEVBQUMsS0FBSyxFQUFFLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFSekQsUUFBQSxvQkFBb0Isd0JBUXFDO0FBRS9ELE1BQU0sa0JBQWtCLEdBQUcsQ0FLOUIsR0FBUyxFQUNULEtBQWEsRUFDYixTQUFxQixFQUN2QixFQUFFLENBQUMsSUFBQSxlQUFNLEVBQUMsR0FBRyxFQUFFLElBQUEsd0RBQStCLEVBQUMsS0FBSyxFQUFFLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFSdkQsUUFBQSxrQkFBa0Isc0JBUXFDO0FBbUJwRSxNQUFNLFFBQVEsR0FBRyxFQUFFLENBQUM7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Rpb25Qb2xpY3k6IHtcbiAgICAgICAgICAgIGNhbmNlbENyZWF0ZTpcbiAgICAgICAgICAgICAgICBjYW5jZWxDcmVhdGUgPT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA/IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICA6ICh7IGtleSwgLi4ucGFyYW1zIH0pID0+IGNhbmNlbENyZWF0ZSh7IC4uLnBhcmFtcywga2V5OiBrZXkuc2Vjb25kIH0pLFxuICAgICAgICAgICAgY2FuY2VsVXBkYXRlOlxuICAgICAgICAgICAgICAgIGNhbmNlbFVwZGF0ZSA9PT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgID8gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgIDogKHsga2V5LCAuLi5wYXJhbXMgfSkgPT4gY2FuY2VsVXBkYXRlKHsgLi4ucGFyYW1zLCBrZXk6IGtleS5zZWNvbmQgfSksXG4gICAgICAgICAgICBjYW5jZWxSZW1vdmU6XG4gICAgICAgICAgICAgICAgY2FuY2VsUmVtb3ZlID09PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgPyB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgOiAoeyBrZXksIC4uLnBhcmFtcyB9KSA9PiBjYW5jZWxSZW1vdmUoeyAuLi5wYXJhbXMsIGtleToga2V5LnNlY29uZCB9KSxcbiAgICAgICAgfSxcbiAgICB9KTtcblxuICAgIGlmIChyZXN1bHQuaXNFcnJvcikge1xuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIHJldHVybiBSZXN1bHQub2socmVzdWx0LnZhbHVlID09PSB1bmRlZmluZWQgPyB1bmRlZmluZWQgOiByZXN1bHQudmFsdWVbZmFrZUtleV0pO1xufTtcblxudHlwZSBJbm5lckNsaWVudFRyYW5zZm9ybTxURmlyc3RPcGVyYXRpb24sIFRTZWNvbmRPcGVyYXRpb24sIFRFcnJvciA9IHN0cmlu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Q8VFN0YXRlPjtcbiAgICBpbm5lckRpZmY6IChwYXJhbXM6IHtcbiAgICAgICAga2V5OiBzdHJpbmc7XG4gICAgICAgIHByZXZTdGF0ZTogVFN0YXRlO1xuICAgICAgICBuZXh0U3RhdGU6IFRTdGF0ZTtcbiAgICB9KSA9PiBUT3BlcmF0aW9uIHwgdW5kZWZpbmVkO1xufSkgPT4ge1xuICAgIGNvbnN0IGR1YWxLZXlSZXN1bHQgPSBEdWFsS2V5UmVjb3JkT3BlcmF0aW9uLmRpZmYoe1xuICAgICAgICBwcmV2U3RhdGU6IHsgW2Zha2VLZXldOiBwcmV2U3RhdGUgfSxcbiAgICAgICAgbmV4dFN0YXRlOiB7IFtmYWtlS2V5XTogbmV4dFN0YXRlIH0sXG4gICAgICAgIGlubmVyRGlmZjogKHsga2V5LCAuLi5wYXJhbXMgfSkgPT4gaW5uZXJEaWZmKHsgLi4ucGFyYW1zLCBrZXk6IGtleS5zZWNvbmQgfSksXG4gICAgfSk7XG4gICAgaWYgKGR1YWxLZXlSZXN1bHQgPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cbiAgICByZXR1cm4gZHVhbEtleVJlc3VsdFtmYWtlS2V5XTtcbn07XG4iXX0=
import { Result } from '@kizahasi/result';
import { compositeKeyEquals } from '@kizahasi/util';
import * as t from 'io-ts';

@@ -22,2 +23,3 @@ import { compositeKey } from '../compositeKey/v1';

export const downOperation = createOperation(1, {
boardKey: t.type({ oldValue: compositeKey }),
h: numberDownOperation,

@@ -30,2 +32,3 @@ isPrivate: booleanDownOperation,

export const upOperation = createOperation(1, {
boardKey: t.type({ newValue: compositeKey }),
h: numberUpOperation,

@@ -48,2 +51,5 @@ isPrivate: booleanUpOperation,

const result = { ...state };
if (operation.boardKey != null) {
result.boardKey = operation.boardKey.newValue;
}
if (operation.h != null) {

@@ -68,2 +74,5 @@ result.h = operation.h.newValue;

const result = { ...state };
if (operation.boardKey != null) {
result.boardKey = operation.boardKey.oldValue;
}
if (operation.h !== undefined) {

@@ -89,2 +98,3 @@ result.h = operation.h.oldValue;

$v: 1,
boardKey: ReplaceOperation.composeDownOperation(first.boardKey, second.boardKey),
h: ReplaceOperation.composeDownOperation(first.h, second.h),

@@ -104,2 +114,6 @@ isPrivate: ReplaceOperation.composeDownOperation(first.isPrivate, second.isPrivate),

const twoWayOperation = { $v: 1 };
if (downOperation.boardKey !== undefined) {
prevState.boardKey = downOperation.boardKey.oldValue;
twoWayOperation.boardKey = { ...downOperation.boardKey, newValue: nextState.boardKey };
}
if (downOperation.h !== undefined) {

@@ -132,2 +146,5 @@ prevState.h = downOperation.h.oldValue;

const resultType = { $v: 1 };
if (!compositeKeyEquals(prevState.boardKey, nextState.boardKey)) {
resultType.boardKey = { oldValue: prevState.boardKey, newValue: nextState.boardKey };
}
if (prevState.h !== nextState.h) {

@@ -158,2 +175,7 @@ resultType.h = { oldValue: prevState.h, newValue: nextState.h };

const twoWayOperation = { $v: 1 };
twoWayOperation.boardKey = ReplaceOperation.serverTransform({
first: serverOperation === null || serverOperation === void 0 ? void 0 : serverOperation.boardKey,
second: clientOperation.boardKey,
prevState: prevState.boardKey,
});
twoWayOperation.h = ReplaceOperation.serverTransform({

@@ -190,2 +212,6 @@ first: serverOperation === null || serverOperation === void 0 ? void 0 : serverOperation.h,

export const clientTransform = ({ first, second }) => {
const boardKey = ReplaceOperation.clientTransform({
first: first.boardKey,
second: second.boardKey,
});
const h = ReplaceOperation.clientTransform({

@@ -213,2 +239,3 @@ first: first.h,

$v: 1,
boardKey: boardKey.firstPrime,
h: h.firstPrime,

@@ -222,2 +249,3 @@ isPrivate: isPrivate.firstPrime,

$v: 1,
boardKey: boardKey.secondPrime,
h: h.secondPrime,

@@ -234,2 +262,2 @@ isPrivate: isPrivate.secondPrime,

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidjEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL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pcnN0UHJpbWUpID8gdW5kZWZpbmVkIDogZmlyc3RQcmltZSxcbiAgICAgICAgc2Vjb25kUHJpbWU6IGlzSWRSZWNvcmQoc2Vjb25kUHJpbWUpID8gdW5kZWZpbmVkIDogc2Vjb25kUHJpbWUsXG4gICAgfSk7XG59O1xuIl19
import { Result } from '@kizahasi/result';
import { compositeKeyEquals } from '@kizahasi/util';
import * as t from 'io-ts';

@@ -29,2 +30,3 @@ import { createOperation } from '../util/createOperation';

export const downOperation = createOperation(1, {
boardKey: t.type({ oldValue: compositeKey }),
cellH: numberDownOperation,

@@ -42,2 +44,3 @@ cellW: numberDownOperation,

export const upOperation = createOperation(1, {
boardKey: t.type({ newValue: compositeKey }),
cellH: numberUpOperation,

@@ -75,2 +78,5 @@ cellW: numberUpOperation,

const result = { ...state };
if (operation.boardKey != null) {
result.boardKey = operation.boardKey.newValue;
}
if (operation.cellH != null) {

@@ -110,2 +116,5 @@ result.cellH = operation.cellH.newValue;

const result = { ...state };
if (operation.boardKey != null) {
result.boardKey = operation.boardKey.oldValue;
}
if (operation.cellH !== undefined) {

@@ -146,2 +155,3 @@ result.cellH = operation.cellH.oldValue;

$v: 1,
boardKey: ReplaceOperation.composeDownOperation(first.boardKey, second.boardKey),
cellH: ReplaceOperation.composeDownOperation(first.cellH, second.cellH),

@@ -168,2 +178,6 @@ cellW: ReplaceOperation.composeDownOperation(first.cellW, second.cellW),

const twoWayOperation = { $v: 1 };
if (downOperation.boardKey !== undefined) {
prevState.boardKey = downOperation.boardKey.oldValue;
twoWayOperation.boardKey = { ...downOperation.boardKey, newValue: nextState.boardKey };
}
if (downOperation.cellH !== undefined) {

@@ -231,2 +245,5 @@ prevState.cellH = downOperation.cellH.oldValue;

const resultType = { $v: 1 };
if (!compositeKeyEquals(prevState.boardKey, nextState.boardKey)) {
resultType.boardKey = { oldValue: prevState.boardKey, newValue: nextState.boardKey };
}
if (prevState.cellH !== nextState.cellH) {

@@ -287,2 +304,7 @@ resultType.cellH = {

const twoWayOperation = { $v: 1 };
twoWayOperation.boardKey = ReplaceOperation.serverTransform({
first: serverOperation === null || serverOperation === void 0 ? void 0 : serverOperation.boardKey,
second: clientOperation.boardKey,
prevState: prevState.boardKey,
});
twoWayOperation.cellH = ReplaceOperation.serverTransform({

@@ -344,2 +366,6 @@ first: serverOperation === null || serverOperation === void 0 ? void 0 : serverOperation.cellH,

export const clientTransform = ({ first, second }) => {
const boardKey = ReplaceOperation.clientTransform({
first: first.boardKey,
second: second.boardKey,
});
const cellH = ReplaceOperation.clientTransform({

@@ -387,2 +413,3 @@ first: first.cellH,

$v: 1,
boardKey: boardKey.firstPrime,
cellH: cellH.firstPrime,

@@ -401,2 +428,3 @@ cellW: cellW.firstPrime,

$v: 1,
boardKey: boardKey.secondPrime,
cellH: cellH.secondPrime,

@@ -418,2 +446,2 @@ cellW: cellW.secondPrime,

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidjEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvaW50ZXJuYWwvb3QvcGllY2UvdjEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRTFDLE9BQU8sS0FBSyxDQUFDLE1BQU0sT0FBTyxDQUFDO0FBQzNCLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUMxRCxPQUFPLEVBQXVCLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ2pFLE9BQU8sS0FBSyxnQkFBZ0IsTUFBTSwwQkFBMEIsQ0FBQztBQUM3RCxPQUFPLEtBQUssc0JBQXNCLE1BQU0sZ0NBQWdDLENBQUM7QUFVekUsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ2xELE9BQU8sRUFBRSx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UsXG4gICAgICAgIHg6IHguZmlyc3RQcmltZSxcbiAgICAgICAgeTogeS5maXJzdFByaW1lLFxuICAgIH07XG5cbiAgICBjb25zdCBzZWNvbmRQcmltZTogVXBPcGVyYXRpb24gPSB7XG4gICAgICAgICR2OiAxLFxuICAgICAgICBjZWxsSDogY2VsbEguc2Vjb25kUHJpbWUsXG4gICAgICAgIGNlbGxXOiBjZWxsVy5zZWNvbmRQcmltZSxcbiAgICAgICAgY2VsbFg6IGNlbGxYLnNlY29uZFByaW1lLFxuICAgICAgICBjZWxsWTogY2VsbFkuc2Vjb25kUHJpbWUsXG4gICAgICAgIGg6IGguc2Vjb25kUHJpbWUsXG4gICAgICAgIGlzQ2VsbE1vZGU6IGlzQ2VsbE1vZGUuc2Vjb25kUHJpbWUsXG4gICAgICAgIGlzUHJpdmF0ZTogaXNQcml2YXRlLnNlY29uZFByaW1lLFxuICAgICAgICB3OiB3LnNlY29uZFByaW1lLFxuICAgICAgICB4OiB4LnNlY29uZFByaW1lLFxuICAgICAgICB5OiB5LnNlY29uZFByaW1lLFxuICAgIH07XG5cbiAgICByZXR1cm4gUmVzdWx0Lm9rKHtcbiAgICAgICAgZmlyc3RQcmltZTogaXNJZFJlY29yZChmaXJzdFByaW1lKSA/IHVuZGVmaW5lZCA6IGZpcnN0UHJpbWUsXG4gICAgICAgIHNlY29uZFByaW1lOiBpc0lkUmVjb3JkKHNlY29uZFByaW1lKSA/IHVuZGVmaW5lZCA6IHNlY29uZFByaW1lLFxuICAgIH0pO1xufTtcbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidjEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvaW50ZXJuYWwvb3QvcGllY2UvdjEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDO0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Sh7XG4gICAgICAgIGZpcnN0OiBmaXJzdC55LFxuICAgICAgICBzZWNvbmQ6IHNlY29uZC55LFxuICAgIH0pO1xuXG4gICAgY29uc3QgZmlyc3RQcmltZTogVXBPcGVyYXRpb24gPSB7XG4gICAgICAgICR2OiAxLFxuICAgICAgICBib2FyZEtleTogYm9hcmRLZXkuZmlyc3RQcmltZSxcbiAgICAgICAgY2VsbEg6IGNlbGxILmZpcnN0UHJpbWUsXG4gICAgICAgIGNlbGxXOiBjZWxsVy5maXJzdFByaW1lLFxuICAgICAgICBjZWxsWDogY2VsbFguZmlyc3RQcmltZSxcbiAgICAgICAgY2VsbFk6IGNlbGxZLmZpcnN0UHJpbWUsXG4gICAgICAgIGg6IGguZmlyc3RQcmltZSxcbiAgICAgICAgaXNDZWxsTW9kZTogaXNDZWxsTW9kZS5maXJzdFByaW1lLFxuICAgICAgICBpc1ByaXZhdGU6IGlzUHJpdmF0ZS5maXJzdFByaW1lLFxuICAgICAgICB3OiB3LmZpcnN0UHJpbWUsXG4gICAgICAgIHg6IHguZmlyc3RQcmltZSxcbiAgICAgICAgeTogeS5maXJzdFByaW1lLFxuICAgIH07XG5cbiAgICBjb25zdCBzZWNvbmRQcmltZTogVXBPcGVyYXRpb24gPSB7XG4gICAgICAgICR2OiAxLFxuICAgICAgICBib2FyZEtleTogYm9hcmRLZXkuc2Vjb25kUHJpbWUsXG4gICAgICAgIGNlbGxIOiBjZWxsSC5zZWNvbmRQcmltZSxcbiAgICAgICAgY2VsbFc6IGNlbGxXLnNlY29uZFByaW1lLFxuICAgICAgICBjZWxsWDogY2VsbFguc2Vjb25kUHJpbWUsXG4gICAgICAgIGNlbGxZOiBjZWxsWS5zZWNvbmRQcmltZSxcbiAgICAgICAgaDogaC5zZWNvbmRQcmltZSxcbiAgICAgICAgaXNDZWxsTW9kZTogaXNDZWxsTW9kZS5zZWNvbmRQcmltZSxcbiAgICAgICAgaXNQcml2YXRlOiBpc1ByaXZhdGUuc2Vjb25kUHJpbWUsXG4gICAgICAgIHc6IHcuc2Vjb25kUHJpbWUsXG4gICAgICAgIHg6IHguc2Vjb25kUHJpbWUsXG4gICAgICAgIHk6IHkuc2Vjb25kUHJpbWUsXG4gICAgfTtcblxuICAgIHJldHVybiBSZXN1bHQub2soe1xuICAgICAgICBmaXJzdFByaW1lOiBpc0lkUmVjb3JkKGZpcnN0UHJpbWUpID8gdW5kZWZpbmVkIDogZmlyc3RQcmltZSxcbiAgICAgICAgc2Vjb25kUHJpbWU6IGlzSWRSZWNvcmQoc2Vjb25kUHJpbWUpID8gdW5kZWZpbmVkIDogc2Vjb25kUHJpbWUsXG4gICAgfSk7XG59O1xuIl19
import { Result } from '@kizahasi/result';
import { both, groupJoinMap, left, mapToRecord, recordToMap, right } from '@kizahasi/util';
import { isValidKey } from './isValidKey';
export const restore = ({ nextState: unsafeNextState, downOperation: unsafeDownOperation, innerRestore, }) => {

@@ -127,2 +128,5 @@ const nextState = recordToMap(unsafeNextState);

for (const [key, operation] of recordToMap(unsafeSecond)) {
if (!isValidKey(key)) {
return Result.error(`${key} is not a valid key.`);
}
const innerPrevState = (_a = prevState.get(key)) !== null && _a !== void 0 ? _a : defaultState;

@@ -229,2 +233,2 @@ const innerNextState = (_b = nextState.get(key)) !== null && _b !== void 0 ? _b : defaultState;

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1SZWNvcmRPcGVyYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvaW50ZXJuYWwvb3QvdXRpbC9wYXJhbVJlY29yZE9wZXJhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDMUMsT0FBTyxFQUFFLElBQUksRUFBRSxZQUFZLEVBQUUsSUFBSSxFQUFFLFdBQVcsRUFBRSxXQUFXL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AoZmlyc3QgPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gUmVzdWx0Lm9rKHNlY29uZCk7XG4gICAgfVxuICAgIGlmIChzZWNvbmQgPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gUmVzdWx0Lm9rKGZpcnN0KTtcbiAgICB9XG5cbiAgICBjb25zdCByZXN1bHQgPSBuZXcgTWFwPHN0cmluZywgVE9wZXJhdGlvbj4oKTtcblxuICAgIGZvciAoY29uc3QgW2tleSwgZ3JvdXBKb2luZWRdIG9mIGdyb3VwSm9pbk1hcChyZWNvcmRUb01hcChmaXJzdCksIHJlY29yZFRvTWFwKHNlY29uZCkpKSB7XG4gICAgICAgIHN3aXRjaCAoZ3JvdXBKb2luZWQudHlwZSkge1xuICAgICAgICAgICAgY2FzZSBsZWZ0OlxuICAgICAgICAgICAgICAgIHJlc3VsdC5zZXQoa2V5LCBncm91cEpvaW5lZC5sZWZ0KTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGNhc2UgcmlnaHQ6XG4gICAgICAgICAgICAgICAgcmVzdWx0LnNldChrZXksIGdyb3VwSm9pbmVkLnJpZ2h0KTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGNhc2UgYm90aDoge1xuICAgICAgICAgICAgICAgIGNvbnN0IHVwZGF0ZSA9IGlubmVyQ29tcG9zZSh7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0OiBncm91cEpvaW5lZC5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICBzZWNvbmQ6IGdyb3VwSm9pbmVkLnJpZ2h0LFxuICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZS5pc0Vycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1cGRhdGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh1cGRhdGUudm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mVjb3JkVG9NYXAoc2Vjb25kKSkuZm9yRWFjaCgoZ3JvdXAsIGtleSkgPT4ge1xuICAgICAgICBpZiAoZXJyb3IgIT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoZ3JvdXAudHlwZSkge1xuICAgICAgICAgICAgY2FzZSBsZWZ0OiB7XG4gICAgICAgICAgICAgICAgZmlyc3RQcmltZS5zZXQoa2V5LCBncm91cC5sZWZ0KTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIHJpZ2h0OiB7XG4gICAgICAgICAgICAgICAgc2Vjb25kUHJpbWUuc2V0KGtleSwgZ3JvdXAucmlnaHQpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgYm90aDoge1xuICAgICAgICAgICAgICAgIGNvbnN0IHhmb3JtID0gaW5uZXJUcmFuc2Zvcm0oe1xuICAgICAgICAgICAgICAgICAgICBmaXJzdDogZ3JvdXAubGVmdCxcbiAgICAgICAgICAgICAgICAgICAgc2Vjb25kOiBncm91cC5yaWdodCxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAoeGZvcm0uaXNFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHsgZXJyb3I6IHhmb3JtLmVycm9yIH07XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHhmb3JtLnZhbHVlLmZpcnN0UHJpbWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBmaXJzdFByaW1lLnNldChrZXksIHhmb3JtLnZhbHVlLmZpcnN0UHJpbWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoeGZvcm0udmFsdWUuc2Vjb25kUH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kID0+IHtcbiAgICBjb25zdCByZXN1bHQgPSBuZXcgTWFwPHN0cmluZywgVE9wZXJhdGlvbj4oKTtcbiAgICBmb3IgKGNvbnN0IFtrZXksIHZhbHVlXSBvZiBncm91cEpvaW5NYXAocmVjb3JkVG9NYXAocHJldlN0YXRlKSwgcmVjb3JkVG9NYXAobmV4dFN0YXRlKSkpIHtcbiAgICAgICAgbGV0IHByZXZTdGF0ZTogVFN0YXRlIHwgdW5kZWZpbmVkID0gdW5kZWZpbmVkO1xuICAgICAgICBsZXQgbmV4dFN0YXRlOiBUU3RhdGUgfCB1bmRlZmluZWQgPSB1bmRlZmluZWQ7XG5cbiAgICAgICAgc3dpdGNoICh2YWx1ZS50eXBlKSB7XG4gICAgICAgICAgICBjYXNlIGxlZnQ6XG4gICAgICAgICAgICAgICAgcHJldlN0YXRlID0gdmFsdWUubGVmdDtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgcmlnaHQ6IHtcbiAgICAgICAgICAgICAgICBuZXh0U3RhdGUgPSB2YWx1ZS5yaWdodDtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgYm90aDoge1xuICAgICAgICAgICAgICAgIHByZXZTdGF0ZSA9IHZhbHVlLmxlZnQ7XG4gICAgICAgICAgICAgICAgbmV4dFN0YXRlID0gdmFsdWUucmlnaHQ7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgZGlmZlJlc3VsdCA9IGlubmVyRGlmZih7IHByZXZTdGF0ZSwgbmV4dFN0YXRlLCBrZXkgfSk7XG4gICAgICAgIGlmIChkaWZmUmVzdWx0ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIHJlc3VsdC5zZXQoa2V5LCBkaWZmUmVzdWx0KTtcbiAgICAgICAgY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JvdXBKb2luZWRdIG9mIGdyb3VwSm9pbk1hcChyZWNvcmRUb01hcChmaXJzdCksIHJlY29yZFRvTWFwKHNlY29uZCkpKSB7XG4gICAgICAgIHN3aXRjaCAoZ3JvdXBKb2luZWQudHlwZSkge1xuICAgICAgICAgICAgY2FzZSBsZWZ0OlxuICAgICAgICAgICAgICAgIHJlc3VsdC5zZXQoa2V5LCBncm91cEpvaW5lZC5sZWZ0KTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGNhc2UgcmlnaHQ6XG4gICAgICAgICAgICAgICAgcmVzdWx0LnNldChrZXksIGdyb3VwSm9pbmVkLnJpZ2h0KTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGNhc2UgYm90aDoge1xuICAgICAgICAgICAgICAgIGNvbnN0IHVwZGF0ZSA9IGlubmVyQ29tcG9zZSh7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0OiBncm91cEpvaW5lZC5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICBzZWNvbmQ6IGdyb3VwSm9pbmVkLnJpZ2h0LFxuICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZS5pc0Vycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1cGRhdGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh1cGRhdGUudmFsdWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQuc2V0KGtleSwgdXBkYXRlLnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIFJlc3VsdC5vayhtYXBUb1JlY29yZChyZXN1bHQpKTtcbn07XG5cbi8vIE1ha2Ugc3VyZSB0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gICAgICAgc3dpdGNoIChncm91cC50eXBlKSB7XG4gICAgICAgICAgICBjYXNlIGxlZnQ6IHtcbiAgICAgICAgICAgICAgICBmaXJzdFByaW1lLnNldChrZXksIGdyb3VwLmxlZnQpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgcmlnaHQ6IHtcbiAgICAgICAgICAgICAgICBzZWNvbmRQcmltZS5zZXQoa2V5LCBncm91cC5yaWdodCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBib3RoOiB7XG4gICAgICAgICAgICAgICAgY29uc3QgeGZvcm0gPSBpbm5lclRyYW5zZm9ybSh7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0OiBncm91cC5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICBzZWNvbmQ6IGdyb3VwLnJpZ2h0LFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGlmICh4Zm9ybS5pc0Vycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yID0geyBlcnJvcjogeGZvcm0uZXJyb3IgfTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoeGZvcm0udmFsdWUuZmlyc3RQcmltZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0UHJpbWUuc2V0KGtleSwgeGZvcm0udmFsdWUuZmlyc3RQcmltZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh4Zm9ybS52YWx1ZS5zZWNvbmRQcmltZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlY29uZFByaW1lLnNldChrZXksIHhmb3JtLnZhbHVlLnNlY29uZFByaW1lKTtcbiAgICAgICAgICAgICAgICB9XG4gICAg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vcmRUb01hcChwcmV2U3RhdGUpLCByZWNvcmRUb01hcChuZXh0U3RhdGUpKSkge1xuICAgICAgICBsZXQgcHJldlN0YXRlOiBUU3RhdGUgfCB1bmRlZmluZWQgPSB1bmRlZmluZWQ7XG4gICAgICAgIGxldCBuZXh0U3RhdGU6IFRTdGF0ZSB8IHVuZGVmaW5lZCA9IHVuZGVmaW5lZDtcblxuICAgICAgICBzd2l0Y2ggKHZhbHVlLnR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgbGVmdDpcbiAgICAgICAgICAgICAgICBwcmV2U3RhdGUgPSB2YWx1ZS5sZWZ0O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSByaWdodDoge1xuICAgICAgICAgICAgICAgIG5leHRTdGF0ZSA9IHZhbHVlLnJpZ2h0O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBib3RoOiB7XG4gICAgICAgICAgICAgICAgcHJldlN0YXRlID0gdmFsdWUubGVmdDtcbiAgICAgICAgICAgICAgICBuZXh0U3RhdGUgPSB2YWx1ZS5yaWdodDtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjb25zdCBkaWZmUmVzdWx0ID0gaW5uZXJEaWZmKHsgcHJldlN0YXRlLCBuZXh0U3RhdGUsIGtleSB9KTtcbiAgICAgICAgaWYgKGRpZmZSZXN1bHQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgcmVzdWx0LnNldChrZXksIGRpZmZSZXN1bHQpO1xuICAgICAgICBjb250aW51ZTtcbiAgICB9XG4gICAgaWYgKHJlc3VsdC5zaXplID09PSAwKSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuICAgIHJldHVybiBtYXBUb1JlY29yZChyZXN1bHQpO1xufTtcbiJdfQ==

@@ -8,3 +8,3 @@ import { Result } from '@kizahasi/result';

export const upOperationFactory = (key, state, operation) => record(key, recordUpOperationElementFactory(state, operation));
const dummyKey = '';
const fakeKey = 'FAKE-KEY';
// Make sure this:

@@ -15,6 +15,6 @@ // - apply(prevState, source) = nextState

return ((_a = DualKeyRecordOperation.toClientState({
serverState: { [dummyKey]: serverState },
serverState: { [fakeKey]: serverState },
isPrivate: (state, key) => isPrivate(state, key.second),
toClientState: ({ state, key }) => toClientState({ state, key: key.second }),
})[dummyKey]) !== null && _a !== void 0 ? _a : {});
})[fakeKey]) !== null && _a !== void 0 ? _a : {});
};

@@ -31,4 +31,4 @@ // downOperationは、composeDownOperationLooseによって作成されたものでも構わない。その代わり、innerDiffはdownでなくtwoWayである必要がある。

const result = DualKeyRecordOperation.restore({
nextState: { [dummyKey]: nextState },
downOperation: { [dummyKey]: downOperation },
nextState: { [fakeKey]: nextState },
downOperation: { [fakeKey]: downOperation },
innerRestore: ({ key, ...params }) => innerRestore({ ...params, key: key.second }),

@@ -41,6 +41,6 @@ innerDiff: ({ key, ...params }) => innerDiff({ ...params, key: key.second }),

return Result.ok({
prevState: (_a = result.value.prevState[dummyKey]) !== null && _a !== void 0 ? _a : {},
prevState: (_a = result.value.prevState[fakeKey]) !== null && _a !== void 0 ? _a : {},
twoWayOperation: result.value.twoWayOperation === undefined
? undefined
: result.value.twoWayOperation[dummyKey],
: result.value.twoWayOperation[fakeKey],
});

@@ -54,4 +54,4 @@ };

const result = DualKeyRecordOperation.apply({
prevState: { [dummyKey]: prevState },
operation: { [dummyKey]: operation },
prevState: { [fakeKey]: prevState },
operation: { [fakeKey]: operation },
innerApply: ({ key, ...params }) => innerApply({ ...params, key: key.second }),

@@ -62,3 +62,3 @@ });

}
return Result.ok((_a = result.value[dummyKey]) !== null && _a !== void 0 ? _a : {});
return Result.ok((_a = result.value[fakeKey]) !== null && _a !== void 0 ? _a : {});
};

@@ -71,4 +71,4 @@ export const applyBack = ({ nextState, operation, innerApplyBack, }) => {

const result = DualKeyRecordOperation.applyBack({
nextState: { [dummyKey]: nextState },
operation: { [dummyKey]: operation },
nextState: { [fakeKey]: nextState },
operation: { [fakeKey]: operation },
innerApplyBack: ({ key, ...params }) => innerApplyBack({ ...params, key: key.second }),

@@ -79,3 +79,3 @@ });

}
return Result.ok((_a = result.value[dummyKey]) !== null && _a !== void 0 ? _a : {});
return Result.ok((_a = result.value[fakeKey]) !== null && _a !== void 0 ? _a : {});
};

@@ -91,4 +91,4 @@ // stateが必要ないため処理を高速化&簡略化できるが、その代わり戻り値のreplaceにおいて oldValue === undefined && newValue === undefined もしくは oldValue !== undefined && newValue !== undefinedになるケースがある。

const result = DualKeyRecordOperation.composeDownOperation({
first: { [dummyKey]: first },
second: { [dummyKey]: second },
first: { [fakeKey]: first },
second: { [fakeKey]: second },
innerApplyBack: ({ key, ...params }) => innerApplyBack({ ...params, key: key.second }),

@@ -100,3 +100,3 @@ innerCompose: ({ key, ...params }) => innerCompose({ ...params, key: key.second }),

}
return Result.ok(result.value === undefined ? undefined : result.value[dummyKey]);
return Result.ok(result.value === undefined ? undefined : result.value[fakeKey]);
};

@@ -110,6 +110,6 @@ // Make sure these:

const result = DualKeyRecordOperation.serverTransform({
first: first === undefined ? undefined : { [dummyKey]: first },
second: second === undefined ? undefined : { [dummyKey]: second },
prevState: { [dummyKey]: prevState },
nextState: { [dummyKey]: nextState },
first: first === undefined ? undefined : { [fakeKey]: first },
second: second === undefined ? undefined : { [fakeKey]: second },
prevState: { [fakeKey]: prevState },
nextState: { [fakeKey]: nextState },
innerTransform: ({ key, ...params }) => innerTransform({ ...params, key: key.second }),

@@ -132,8 +132,8 @@ toServerState: (state, key) => toServerState(state, key.second),

}
return Result.ok(result.value === undefined ? undefined : result.value[dummyKey]);
return Result.ok(result.value === undefined ? undefined : result.value[fakeKey]);
};
export const clientTransform = ({ first, second, innerTransform, innerDiff, }) => {
const result = DualKeyRecordOperation.clientTransform({
first: first == null ? undefined : { [dummyKey]: first },
second: second == null ? undefined : { [dummyKey]: second },
first: first == null ? undefined : { [fakeKey]: first },
second: second == null ? undefined : { [fakeKey]: second },
innerTransform: params => innerTransform(params),

@@ -146,4 +146,4 @@ innerDiff: params => innerDiff(params),

return Result.ok({
firstPrime: result.value.firstPrime == null ? undefined : result.value.firstPrime[dummyKey],
secondPrime: result.value.secondPrime == null ? undefined : result.value.secondPrime[dummyKey],
firstPrime: result.value.firstPrime == null ? undefined : result.value.firstPrime[fakeKey],
secondPrime: result.value.secondPrime == null ? undefined : result.value.secondPrime[fakeKey],
});

@@ -153,4 +153,4 @@ };

const dualKeyResult = DualKeyRecordOperation.diff({
prevState: { [dummyKey]: prevState },
nextState: { [dummyKey]: nextState },
prevState: { [fakeKey]: prevState },
nextState: { [fakeKey]: nextState },
innerDiff: ({ key, ...params }) => innerDiff({ ...params, key: key.second }),

@@ -161,4 +161,4 @@ });

}
return dualKeyResult[dummyKey];
return dualKeyResult[fakeKey];
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb3JkT3BlcmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2ludGVybmFsL290L3V0aWwvcmVjb3JkT3BlcmF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUUxQyxPQUFPLEtBQUssc0JBQXNCLE1BQU0sMEJBQTBCLENBQUM7QUFDbkUsT0FBTyxFQUFFLE1BQU0sRUFBbUIsTUFBTSxVQUFVLENBQUM7QUFDbkQsT0FBTyxFQUNILGlDQUFpQyxFQUdqQywrQkFBK0IsR0FFbEMsTUFBTSwwQkFBMEIsQ0FBQztBQVlsQyxNQUFNLENBQUMsTUFBTSxZQUFZLEdBQUcsQ0FDeEIsR0FBUyxFQUNULEtBQWEsRUFDZixFQU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nIHwgVEN1c3RvbUVycm9yPjtcbiAgICBpbm5lckNvbXBvc2U6IChwYXJhbXM6IHtcbiAgICAgICAga2V5OiBzdHJpbmc7XG4gICAgICAgIGZpcnN0OiBURG93bk9wZXJhdGlvbjtcbiAgICAgICAgc2Vjb25kOiBURG93bk9wZXJhdGlvbjtcbiAgICB9KSA9PiBSZXN1bHQ8VERvd25PcGVyYXRpb24gfCB1bmRlZmluZWQsIHN0cmluZyB8IFRDdXN0b21FcnJvcj47XG59KTogUmVzdWx0PFJlY29yZERvd25PcGVyYXRpb248VFN0YXRlLCBURG93bk9wZXJhdGlvbj4gfCB1bmRlZmluZWQsIHN0cmluZyB8IFRDdXN0b21FcnJvcj4gPT4ge1xuICAgIGlmIChmaXJzdCA9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiBSZXN1bHQub2soc2Vjb25kKTtcbiAgICB9XG4gICAgaWYgKHNlY29uZCA9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiBSZXN1bHQub2soZmlyc3QpO1xuICAgIH1cblxuICAgIGNvbnN0IHJlc3VsdCA9IER1YWxLZXlSZWNvcmRPcGVyYXRpb24uY29tcG9zZURvd25PcGVyYXRpb24oe1xuICAgICAgICBmaXJzdDogeyBbZmFrZUtleV06IGZpcnN0IH0sXG4gICAgICAgIHNlY29uZDogeyBbZmFrZUtleV06IHNlY29uZCB9LFxuICAgICAgICBpbm5lckFwcGx5QmFjazogKHsga2V5LCAuLi5wYXJhbXMgfSkgPT4gaW5uZXJBcHBseUJhY2soeyAuLi5wYXJhbXMsIGtleToga2V5LnNlY29uZCB9KSxcbiAgICAgICAgaW5uZXJDb21wb3NlOiAoeyBrZXksIC4uLnBhcmFtcyB9KSA9PiBpbm5lckNvbXBvc2UoeyAuLi5wYXJhbXMsIGtleToga2V5LnNlY29uZCB9KSxcbiAgICB9KTtcbiAgICBpZiAocmVzdWx0LmlzRXJyb3IpIHtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG4gICA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UtleV0sXG4gICAgfSk7XG59O1xuXG5leHBvcnQgY29uc3QgZGlmZiA9IDxUU3RhdGUsIFRPcGVyYXRpb24+KHtcbiAgICBwcmV2U3RhdGUsXG4gICAgbmV4dFN0YXRlLFxuICAgIGlubmVyRGlmZixcbn06IHtcbiAgICBwcmV2U3RhdGU6IFN0cmluZ0tleVJlY29yZDxUU3RhdGU+O1xuICAgIG5leHRTdGF0ZTogU3RyaW5nS2V5UmVjb3JkPFRTdGF0ZT47XG4gICAgaW5uZXJEaWZmOiAocGFyYW1zOiB7XG4gICAgICAgIGtleTogc3RyaW5nO1xuICAgICAgICBwcmV2U3RhdGU6IFRTdGF0ZTtcbiAgICAgICAgbmV4dFN0YXRlOiBUU3RhdGU7XG4gICAgfSkgPT4gVE9wZXJhdGlvbiB8IHVuZGVmaW5lZDtcbn0pID0+IHtcbiAgICBjb25zdCBkdWFsS2V5UmVzdWx0ID0gRHVhbEtleVJlY29yZE9wZXJhdGlvbi5kaWZmKHtcbiAgICAgICAgcHJldlN0YXRlOiB7IFtmYWtlS2V5XTogcHJldlN0YXRlIH0sXG4gICAgICAgIG5leHRTdGF0ZTogeyBbZmFrZUtleV06IG5leHRTdGF0ZSB9LFxuICAgICAgICBpbm5lckRpZmY6ICh7IGtleSwgLi4ucGFyYW1zIH0pID0+IGlubmVyRGlmZih7IC4uLnBhcmFtcywga2V5OiBrZXkuc2Vjb25kIH0pLFxuICAgIH0pO1xuICAgIGlmIChkdWFsS2V5UmVzdWx0ID09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG4gICAgcmV0dXJuIGR1YWxLZXlSZXN1bHRbZmFrZUtleV07XG59O1xuIl19

@@ -0,1 +1,2 @@

import { CompositeKey } from '@kizahasi/util';
import * as t from 'io-ts';

@@ -20,2 +21,8 @@ import * as ReplaceOperation from '../util/replaceOperation';

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
h: t.TypeC<{

@@ -41,2 +48,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
h: t.TypeC<{

@@ -61,2 +74,3 @@ newValue: t.NumberC;

$v: 1;
boardKey?: ReplaceOperation.ReplaceValueTwoWayOperation<CompositeKey>;
h?: ReplaceOperation.ReplaceValueTwoWayOperation<number>;

@@ -63,0 +77,0 @@ isPrivate?: ReplaceOperation.ReplaceValueTwoWayOperation<boolean>;

@@ -27,2 +27,8 @@ import { CompositeKey } from '@kizahasi/util';

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -63,2 +69,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -98,2 +110,3 @@ newValue: t.NumberC;

$v: 1;
boardKey?: ReplaceOperation.ReplaceValueTwoWayOperation<CompositeKey>;
cellH?: ReplaceOperation.ReplaceValueTwoWayOperation<number>;

@@ -100,0 +113,0 @@ cellW?: ReplaceOperation.ReplaceValueTwoWayOperation<number>;

@@ -115,2 +115,8 @@ import * as t from 'io-ts';

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -261,2 +267,8 @@ newValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -263,0 +275,0 @@ newValue: t.NumberC;

@@ -91,2 +91,8 @@ import * as t from 'io-ts';

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -181,2 +187,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -183,0 +195,0 @@ newValue: t.NumberC;

@@ -87,2 +87,8 @@ import * as t from 'io-ts';

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -205,2 +211,8 @@ newValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -207,0 +219,0 @@ newValue: t.NumberC;

@@ -65,2 +65,8 @@ import * as t from 'io-ts';

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -135,2 +141,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -137,0 +149,0 @@ newValue: t.NumberC;

@@ -278,2 +278,8 @@ import * as t from 'io-ts';

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -361,2 +367,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
h: t.TypeC<{

@@ -466,2 +478,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -564,2 +582,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -737,2 +761,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -820,2 +850,8 @@ newValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
h: t.TypeC<{

@@ -925,2 +961,8 @@ newValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -1023,2 +1065,8 @@ newValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -1025,0 +1073,0 @@ newValue: t.NumberC;

@@ -91,2 +91,8 @@ import * as t from 'io-ts';

}>, t.PartialC<{
boardKey: t.TypeC<{
oldValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -178,2 +184,8 @@ oldValue: t.NumberC;

}>, t.PartialC<{
boardKey: t.TypeC<{
newValue: t.TypeC<{
createdBy: t.StringC;
id: t.StringC;
}>;
}>;
cellH: t.TypeC<{

@@ -180,0 +192,0 @@ newValue: t.NumberC;

{
"version": "0.18.0-beta.7",
"version": "0.18.0",
"license": "MIT",

@@ -37,7 +37,7 @@ "main": "dist/cjs/index.js",

"devDependencies": {
"@types/ioredis": "4.27.1",
"@types/jest": "27.0.1",
"@types/ioredis": "4.27.4",
"@types/jest": "27.0.2",
"@types/lodash.clonedeep": "4.5.6",
"@typescript-eslint/eslint-plugin": "4.30.0",
"@typescript-eslint/parser": "4.30.0",
"@typescript-eslint/eslint-plugin": "4.31.2",
"@typescript-eslint/parser": "4.31.2",
"eslint": "7.32.0",

@@ -48,7 +48,7 @@ "eslint-config-prettier": "8.3.0",

"husky": "7.0.2",
"jest": "27.1.0",
"prettier": "2.3.2",
"jest": "27.2.1",
"prettier": "2.4.1",
"rimraf": "3.0.2",
"ts-jest": "27.0.5",
"typescript": "4.4.2"
"typescript": "4.4.3"
},

@@ -55,0 +55,0 @@ "dependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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