Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
}
},
"dependencies": {
"@jsonjoy.com/base64": "^1.1.1",
"@jsonjoy.com/json-pack": "^1.0.1",
"arg": "^5.0.2",
"hyperdyperid": "^1.2.0",
"multibase": "^4.0.6",
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/msgpack-documents.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {JsonPackExtension, JsonPackValue} from '../json-pack/msgpack';
import {encodeFull} from '../json-pack/msgpack/util';
import {JsonPackExtension, JsonPackValue} from '@jsonjoy.com/json-pack/lib/msgpack';
import {encodeFull} from '@jsonjoy.com/json-pack/lib/msgpack/util';

export interface JsonDocument {
name: string;
Expand Down
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
* ```
*/

export type * from './json-binary/types';
export type * from './json-brand/types';
export type * from '@jsonjoy.com/json-pack/lib/json-binary/types';
export type * from '@jsonjoy.com/json-pack/lib/json-brand/types';
export type * from './json-crdt';
export type * from './json-crdt-patch';
export type * from './json-crdt-extensions';
export type * from './json-expression/types';
export type * from './json-pack/types';
export type * from './json-patch/types';
export type * from './json-pointer/types';
export type * from './json-schema/types';
18 changes: 0 additions & 18 deletions src/json-binary/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions src/json-binary/__tests__/automated.spec.ts

This file was deleted.

24 changes: 0 additions & 24 deletions src/json-binary/__tests__/stringify.spec.ts

This file was deleted.

124 changes: 0 additions & 124 deletions src/json-binary/codec.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/json-binary/constants.ts

This file was deleted.

4 changes: 1 addition & 3 deletions src/json-binary/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export * from './types';
export * from './constants';
export * from './codec';
export * from '@jsonjoy.com/json-pack/lib/json-binary';
20 changes: 0 additions & 20 deletions src/json-binary/types.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/json-brand/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions src/json-brand/global.d.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/json-brand/index.d.ts

This file was deleted.

6 changes: 1 addition & 5 deletions src/json-brand/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
import * as type from './types';

export const JSON = (typeof global !== 'undefined' ? global.JSON : window.JSON) as unknown as type.JSON;

export type {json, json_string} from './types';
export * from '@jsonjoy.com/json-pack/lib/json-brand';
9 changes: 0 additions & 9 deletions src/json-brand/types.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/json-cli/json-pack.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {readFileSync} from 'fs';
import {MsgPackEncoder} from '../json-pack/msgpack';
import {CborEncoder} from '../json-pack/cbor/CborEncoder';
import * as JSONB from '../json-binary';
import {MsgPackEncoder} from '@jsonjoy.com/json-pack/lib/msgpack';
import {CborEncoder} from '@jsonjoy.com/json-pack/lib/cbor/CborEncoder';
import * as JSONB from '@jsonjoy.com/json-pack/lib/json-binary';
import arg from 'arg';

const args = arg(
Expand Down
4 changes: 2 additions & 2 deletions src/json-cli/json-unpack.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {readFileSync} from 'fs';
import {MsgPackDecoderFast} from '../json-pack/msgpack';
import {CborDecoder} from '../json-pack/cbor/CborDecoder';
import {MsgPackDecoderFast} from '@jsonjoy.com/json-pack/lib/msgpack';
import {CborDecoder} from '@jsonjoy.com/json-pack/lib/cbor/CborDecoder';
import * as JSONB from '../json-binary';
import arg from 'arg';

Expand Down
2 changes: 1 addition & 1 deletion src/json-clone/cloneBinary.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isUint8Array} from '../util/buffers/isUint8Array';
import {isUint8Array} from '@jsonjoy.com/json-pack/lib/util/buffers/isUint8Array';

const {isArray} = Array;
const objectKeys = Object.keys;
Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/PatchBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
NopOp,
} from './operations';
import {IClock, ITimestampStruct, ITimespanStruct, ts, Timestamp} from './clock';
import {isUint8Array} from '../util/buffers/isUint8Array';
import {isUint8Array} from '@jsonjoy.com/json-pack/lib/util/buffers/isUint8Array';
import {Patch} from './Patch';
import {ORIGIN} from './constants';
import {VectorDelayedValue} from './builder/Tuple';
Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/__bench__/bench.encoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {PatchBuilder} from '../PatchBuilder';
import {encode as encodeBinary} from '../codec/binary';
import {encode as encodeCompact} from '../codec/compact-binary';
import {encode as encodeJson} from '../codec/verbose';
import {encode as encodeCbor} from '../../json-pack/cbor/shared';
import {encode as encodeCbor} from '@jsonjoy.com/json-pack/lib/cbor/shared';

const createPatch = (json: any) => {
const clock = new LogicalClock(123456, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/__demos__/PatchBuilder-operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {LogicalClock} from '../clock';
import * as verbose from '../codec/verbose';
import * as compact from '../codec/compact';
import * as binary from '../codec/binary';
import * as cbor from '../../json-pack/cbor/shared';
import * as cbor from '@jsonjoy.com/json-pack/lib/cbor/shared';

const clock = new LogicalClock(123, 456);
const builder = new PatchBuilder(clock);
Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/codec/binary/Decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {interval, ITimespanStruct, ITimestampStruct, ClockVector, ServerClockVec
import {Patch} from '../../Patch';
import {PatchBuilder} from '../../PatchBuilder';
import {SESSION} from '../../constants';
import {CborDecoder} from '../../../json-pack/cbor/CborDecoder';
import {CborDecoder} from '@jsonjoy.com/json-pack/lib/cbor/CborDecoder';
import {JsonCrdtPatchOpcode} from '../../constants';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/codec/binary/Encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as operations from '../../operations';
import {JsonCrdtPatchOpcodeOverlay} from '../../constants';
import {CrdtWriter} from '../../util/binary/CrdtWriter';
import {ITimespanStruct, ITimestampStruct, Timestamp} from '../../clock';
import {CborEncoder} from '../../../json-pack/cbor/CborEncoder';
import {CborEncoder} from '@jsonjoy.com/json-pack/lib/cbor/CborEncoder';
import type {JsonCrdtPatchOperation, Patch} from '../../Patch';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/codec/compact-binary/decode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {decode as decodeJson, type CborUint8Array} from '@jsonjoy.com/json-pack/lib/cbor/shared';
import {decode as decodeCompact} from '../compact/decode';
import {decode as decodeJson, type CborUint8Array} from '../../../json-pack/cbor/shared';
import type {Patch} from '../../Patch';
import type {CompactCodecPatch} from '../compact/types';

Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/codec/compact-binary/encode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {encode as encodeJson, type CborUint8Array} from '@jsonjoy.com/json-pack/lib/cbor/shared';
import {encode as encodeCompact} from '../compact/encode';
import {encode as encodeJson, type CborUint8Array} from '../../../json-pack/cbor/shared';
import type {Patch} from '../../Patch';
import type {CompactCodecPatch} from '../compact/types';

Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/codec/compact/decode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {JsonCrdtPatchOpcode} from '../../constants';
import {fromBase64} from '../../../util/base64/fromBase64';
import {fromBase64} from '@jsonjoy.com/base64/lib/fromBase64';
import {ITimespanStruct, ITimestampStruct, ClockVector, ServerClockVector, Timespan, Timestamp} from '../../clock';
import {Patch} from '../../Patch';
import {PatchBuilder} from '../../PatchBuilder';
Expand Down
2 changes: 1 addition & 1 deletion src/json-crdt-patch/codec/compact/encode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as operations from '../../operations';
import {ITimespanStruct, ITimestampStruct, Timestamp} from '../../clock';
import {Patch} from '../../Patch';
import {JsonCrdtPatchOpcode, SESSION} from '../../constants';
import {toBase64} from '../../../util/base64/toBase64';
import {toBase64} from '@jsonjoy.com/base64/lib/toBase64';
import type * as types from './types';

const timestamp = (sid: number, ts: ITimestampStruct): types.CompactCodecTimestamp => {
Expand Down
Loading