seroval 1.7.9 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/index.cjs +58 -3804
- package/dist/dev/index.d.cts +5 -834
- package/dist/dev/index.d.ts +5 -834
- package/dist/dev/index.js +4 -3758
- package/dist/dev/read-Bn_ffmiS.d.ts +14 -0
- package/dist/dev/read-CfSVIjp6.js +455 -0
- package/dist/dev/read-CgzYPh_Q.d.cts +14 -0
- package/dist/dev/read-DvIuZ2yx.cjs +478 -0
- package/dist/dev/read.cjs +45 -0
- package/dist/dev/read.d.cts +17 -0
- package/dist/dev/read.d.ts +17 -0
- package/dist/dev/read.js +3 -0
- package/dist/dev/shared-Cf-Bmoy-.js +1010 -0
- package/dist/dev/shared-DTMVoS-y.d.ts +749 -0
- package/dist/dev/shared-DWx3Bwb6.cjs +1410 -0
- package/dist/dev/shared-Dju99SLx.d.cts +749 -0
- package/dist/dev/shared.cjs +40 -0
- package/dist/dev/shared.d.cts +2 -0
- package/dist/dev/shared.d.ts +2 -0
- package/dist/dev/shared.js +1 -0
- package/dist/dev/typed-array-C3haUQv_.js +72 -0
- package/dist/dev/typed-array-DUH_YsNc.cjs +101 -0
- package/dist/dev/validator-CxDhXc0k.d.cts +28 -0
- package/dist/dev/validator-CxDhXc0k.d.ts +28 -0
- package/dist/dev/validator.cjs +54 -0
- package/dist/dev/validator.d.cts +2 -0
- package/dist/dev/validator.d.ts +2 -0
- package/dist/dev/validator.js +45 -0
- package/dist/dev/write-BKJsV31u.js +2354 -0
- package/dist/dev/write-C0KqlAXN.d.ts +86 -0
- package/dist/dev/write-DGOp2jqo.cjs +2425 -0
- package/dist/dev/write-KxJKA4_p.d.cts +86 -0
- package/dist/dev/write.cjs +54 -0
- package/dist/dev/write.d.cts +4 -0
- package/dist/dev/write.d.ts +4 -0
- package/dist/dev/write.js +3 -0
- package/dist/index.cjs +58 -3788
- package/dist/index.d.cts +5 -834
- package/dist/index.d.ts +5 -834
- package/dist/index.js +4 -3742
- package/dist/read-Bn_ffmiS.d.ts +14 -0
- package/dist/read-CD88YElZ.cjs +478 -0
- package/dist/read-CSKXLr9t.js +455 -0
- package/dist/read-CgzYPh_Q.d.cts +14 -0
- package/dist/read.cjs +45 -0
- package/dist/read.d.cts +17 -0
- package/dist/read.d.ts +17 -0
- package/dist/read.js +3 -0
- package/dist/shared-DJIVyqa9.js +994 -0
- package/dist/shared-DTMVoS-y.d.ts +749 -0
- package/dist/shared-Dju99SLx.d.cts +749 -0
- package/dist/shared-u-KYXAax.cjs +1394 -0
- package/dist/shared.cjs +40 -0
- package/dist/shared.d.cts +2 -0
- package/dist/shared.d.ts +2 -0
- package/dist/shared.js +1 -0
- package/dist/typed-array-BWH0IKxT.js +72 -0
- package/dist/typed-array-BkSwWNFI.cjs +101 -0
- package/dist/validator-CxDhXc0k.d.cts +28 -0
- package/dist/validator-CxDhXc0k.d.ts +28 -0
- package/dist/validator.cjs +54 -0
- package/dist/validator.d.cts +2 -0
- package/dist/validator.d.ts +2 -0
- package/dist/validator.js +45 -0
- package/dist/write-B_hZaAwC.js +2354 -0
- package/dist/write-C0KqlAXN.d.ts +86 -0
- package/dist/write-CMi0CxOu.cjs +2425 -0
- package/dist/write-KxJKA4_p.d.cts +86 -0
- package/dist/write.cjs +54 -0
- package/dist/write.d.cts +4 -0
- package/dist/write.d.ts +4 -0
- package/dist/write.js +3 -0
- package/package.json +97 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { A as PluginAccessOptions, B as SyncParserContextOptions, R as StreamParserContextOptions, at as AsyncParserContextOptions, et as CrossContextOptions, ot as BaseParserContextOptions, st as SerovalNode } from "./shared-Dju99SLx.cjs";
|
|
2
|
+
import { n as SerovalJSON } from "./read-CgzYPh_Q.cjs";
|
|
3
|
+
//#region src/core/cross/write.d.ts
|
|
4
|
+
interface CrossAssignmentOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Only assign `$R[n]` for values that the output reads more than once,
|
|
7
|
+
* such as shared references and cycles. The output is shorter, but later
|
|
8
|
+
* scripts cannot read the other values from `$R`. Only use it when no
|
|
9
|
+
* later output that shares the same references refers back to this one.
|
|
10
|
+
*/
|
|
11
|
+
assignSharedRefsOnly?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface CrossSerializeOptions extends SyncParserContextOptions, CrossContextOptions, CrossAssignmentOptions {}
|
|
14
|
+
declare function crossSerialize<T>(source: T, options?: CrossSerializeOptions): string;
|
|
15
|
+
interface CrossSerializeAsyncOptions extends AsyncParserContextOptions, CrossContextOptions, CrossAssignmentOptions {}
|
|
16
|
+
declare function crossSerializeAsync<T>(source: T, options?: CrossSerializeAsyncOptions): Promise<string>;
|
|
17
|
+
type ToCrossJSONOptions = SyncParserContextOptions;
|
|
18
|
+
declare function toCrossJSON<T>(source: T, options?: ToCrossJSONOptions): SerovalNode;
|
|
19
|
+
type ToCrossJSONAsyncOptions = AsyncParserContextOptions;
|
|
20
|
+
declare function toCrossJSONAsync<T>(source: T, options?: ToCrossJSONAsyncOptions): Promise<SerovalNode>;
|
|
21
|
+
interface CrossSerializeStreamOptions extends Omit<StreamParserContextOptions, 'onParse'>, CrossContextOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Receives each serialized record. Returning a promise defers the next
|
|
24
|
+
* record, and the acceptance of the live stream event behind this one,
|
|
25
|
+
* until the promise settles.
|
|
26
|
+
*/
|
|
27
|
+
onSerialize: (data: string, initial: boolean) => void | PromiseLike<void>;
|
|
28
|
+
}
|
|
29
|
+
declare function crossSerializeStream<T>(source: T, options: CrossSerializeStreamOptions): (reason?: unknown) => void;
|
|
30
|
+
type ToCrossJSONStreamOptions = StreamParserContextOptions;
|
|
31
|
+
declare function toCrossJSONStream<T>(source: T, options: ToCrossJSONStreamOptions): (reason?: unknown) => void;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/core/keys.d.ts
|
|
34
|
+
declare function getCrossReferenceHeader(id?: string): string;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/core/Serializer.d.ts
|
|
37
|
+
interface SerializerOptions extends PluginAccessOptions {
|
|
38
|
+
globalIdentifier: string;
|
|
39
|
+
scopeId?: string;
|
|
40
|
+
disabledFeatures?: number;
|
|
41
|
+
compactArrayBufferViews?: boolean;
|
|
42
|
+
depthLimit?: number;
|
|
43
|
+
onData: (result: string) => void;
|
|
44
|
+
onError: (error: unknown) => void;
|
|
45
|
+
onDone?: () => void;
|
|
46
|
+
}
|
|
47
|
+
declare class Serializer {
|
|
48
|
+
private alive;
|
|
49
|
+
private flushed;
|
|
50
|
+
private done;
|
|
51
|
+
private pending;
|
|
52
|
+
private cleanups;
|
|
53
|
+
private readonly refs;
|
|
54
|
+
private plugins?;
|
|
55
|
+
private options;
|
|
56
|
+
constructor(options: SerializerOptions);
|
|
57
|
+
keys: Set<string>;
|
|
58
|
+
write(key: string, value: unknown): void;
|
|
59
|
+
private finishWrite;
|
|
60
|
+
ids: number;
|
|
61
|
+
private getNextID;
|
|
62
|
+
push(value: unknown): string;
|
|
63
|
+
flush(): void;
|
|
64
|
+
close(): void;
|
|
65
|
+
private finish;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/core/tree/write.d.ts
|
|
69
|
+
/**
|
|
70
|
+
* Options for `serialize`. The same as the parser options, without `refs`:
|
|
71
|
+
* the output is self-contained, so there is nothing to share between calls.
|
|
72
|
+
*/
|
|
73
|
+
type SerializeOptions = Omit<BaseParserContextOptions, 'refs'>;
|
|
74
|
+
/** Options for `serializeAsync`. */
|
|
75
|
+
type SerializeAsyncOptions = Omit<BaseParserContextOptions, 'refs'>;
|
|
76
|
+
/** Options for `toJSON`. */
|
|
77
|
+
type ToJSONOptions = SerializeOptions;
|
|
78
|
+
/** Options for `toJSONAsync`. */
|
|
79
|
+
type ToJSONAsyncOptions = SerializeAsyncOptions;
|
|
80
|
+
declare function serialize<T>(source: T, options?: SerializeOptions): string;
|
|
81
|
+
declare function serializeAsync<T>(source: T, options?: SerializeAsyncOptions): Promise<string>;
|
|
82
|
+
declare function toJSON<T>(source: T, options?: ToJSONOptions): SerovalJSON;
|
|
83
|
+
declare function toJSONAsync<T>(source: T, options?: ToJSONAsyncOptions): Promise<SerovalJSON>;
|
|
84
|
+
declare function compileJSON(source: SerovalJSON, options?: PluginAccessOptions): string;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { toCrossJSONAsync as C, toCrossJSON as S, ToCrossJSONOptions as _, compileJSON as a, crossSerializeAsync as b, toJSON as c, getCrossReferenceHeader as d, CrossAssignmentOptions as f, ToCrossJSONAsyncOptions as g, CrossSerializeStreamOptions as h, ToJSONOptions as i, toJSONAsync as l, CrossSerializeOptions as m, SerializeOptions as n, serialize as o, CrossSerializeAsyncOptions as p, ToJSONAsyncOptions as r, serializeAsync as s, SerializeAsyncOptions as t, Serializer as u, ToCrossJSONStreamOptions as v, toCrossJSONStream as w, crossSerializeStream as x, crossSerialize as y };
|
package/dist/write.cjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_shared = require("./shared-u-KYXAax.cjs");
|
|
3
|
+
const require_write = require("./write-CMi0CxOu.cjs");
|
|
4
|
+
let src_core_validator = require("./validator.cjs");
|
|
5
|
+
exports.Feature = require_shared.Feature;
|
|
6
|
+
exports.LiveStream = require_shared.LiveStream;
|
|
7
|
+
exports.OpaqueReference = require_shared.OpaqueReference;
|
|
8
|
+
exports.Sequence = require_shared.Sequence;
|
|
9
|
+
exports.Serializer = require_write.Serializer;
|
|
10
|
+
exports.SerovalAbortedError = require_shared.SerovalAbortedError;
|
|
11
|
+
exports.SerovalConflictedNodeIdError = require_shared.SerovalConflictedNodeIdError;
|
|
12
|
+
exports.SerovalDepthLimitError = require_shared.SerovalDepthLimitError;
|
|
13
|
+
exports.SerovalDeserializationError = require_shared.SerovalDeserializationError;
|
|
14
|
+
exports.SerovalError = require_shared.SerovalError;
|
|
15
|
+
exports.SerovalLiveStreamError = require_shared.SerovalLiveStreamError;
|
|
16
|
+
exports.SerovalMalformedNodeError = require_shared.SerovalMalformedNodeError;
|
|
17
|
+
exports.SerovalMissingInstanceError = require_shared.SerovalMissingInstanceError;
|
|
18
|
+
exports.SerovalMissingPluginError = require_shared.SerovalMissingPluginError;
|
|
19
|
+
exports.SerovalMissingReferenceError = require_shared.SerovalMissingReferenceError;
|
|
20
|
+
exports.SerovalMissingReferenceForIdError = require_shared.SerovalMissingReferenceForIdError;
|
|
21
|
+
exports.SerovalMode = require_shared.SerovalMode;
|
|
22
|
+
exports.SerovalParserError = require_shared.SerovalParserError;
|
|
23
|
+
exports.SerovalPluginValidationError = require_shared.SerovalPluginValidationError;
|
|
24
|
+
exports.SerovalSerializationError = require_shared.SerovalSerializationError;
|
|
25
|
+
exports.SerovalUnknownTypedArrayError = require_shared.SerovalUnknownTypedArrayError;
|
|
26
|
+
exports.SerovalUnsupportedNodeError = require_shared.SerovalUnsupportedNodeError;
|
|
27
|
+
exports.SerovalUnsupportedTypeError = require_shared.SerovalUnsupportedTypeError;
|
|
28
|
+
exports.Stream = require_shared.Stream;
|
|
29
|
+
exports.compileJSON = require_write.compileJSON;
|
|
30
|
+
exports.createLiveStream = require_shared.createLiveStream;
|
|
31
|
+
exports.createPlugin = require_shared.createPlugin;
|
|
32
|
+
exports.createReference = require_shared.createReference;
|
|
33
|
+
exports.createStream = require_shared.createStream;
|
|
34
|
+
exports.crossSerialize = require_write.crossSerialize;
|
|
35
|
+
exports.crossSerializeAsync = require_write.crossSerializeAsync;
|
|
36
|
+
exports.crossSerializeStream = require_write.crossSerializeStream;
|
|
37
|
+
exports.getCrossReferenceHeader = require_shared.getCrossReferenceHeader;
|
|
38
|
+
exports.getPlainObjectPlugins = require_shared.getPlainObjectPlugins;
|
|
39
|
+
exports.isLiveStream = require_shared.isLiveStream;
|
|
40
|
+
exports.isStream = require_shared.isStream;
|
|
41
|
+
exports.resolvePlugins = require_shared.resolvePlugins;
|
|
42
|
+
exports.serialize = require_write.serialize;
|
|
43
|
+
exports.serializeAsync = require_write.serializeAsync;
|
|
44
|
+
exports.toCrossJSON = require_write.toCrossJSON;
|
|
45
|
+
exports.toCrossJSONAsync = require_write.toCrossJSONAsync;
|
|
46
|
+
exports.toCrossJSONStream = require_write.toCrossJSONStream;
|
|
47
|
+
exports.toJSON = require_write.toJSON;
|
|
48
|
+
exports.toJSONAsync = require_write.toJSONAsync;
|
|
49
|
+
Object.defineProperty(exports, "v", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function() {
|
|
52
|
+
return src_core_validator;
|
|
53
|
+
}
|
|
54
|
+
});
|
package/dist/write.d.cts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { $ as BaseSerializerContextOptions, A as PluginAccessOptions, B as SyncParserContextOptions, C as SerovalUnsupportedTypeError, D as DeserializePluginContext, F as getPlainObjectPlugins, G as LiveStreamOptions, H as LiveStreamConsumer, I as resolvePlugins, J as isLiveStream, K as LiveStreamProducer, L as StreamParsePluginContext, M as PluginInfo, N as SerovalMode, P as createPlugin, Q as isStream, R as StreamParserContextOptions, S as SerovalUnsupportedNodeError, U as LiveStreamDelivery, V as LiveStream, W as LiveStreamEvent, X as StreamListener, Y as Stream, Z as createStream, _ as SerovalMissingReferenceForIdError, a as OpaqueReference, at as AsyncParserContextOptions, b as SerovalSerializationError, c as SerovalConflictedNodeIdError, d as SerovalError, et as CrossContextOptions, f as SerovalLiveStreamError, g as SerovalMissingReferenceError, h as SerovalMissingPluginError, i as createReference, it as AsyncParsePluginContext, j as PluginData, k as Plugin, l as SerovalDepthLimitError, m as SerovalMissingInstanceError, n as v, nt as SerializePluginContext, o as LiveStreamErrorReason, ot as BaseParserContextOptions, p as SerovalMalformedNodeError, q as createLiveStream, r as Sequence, rt as VanillaSerializerContextOptions, s as SerovalAbortedError, st as SerovalNode, t as Validator, tt as CrossSerializerContextOptions, u as SerovalDeserializationError, v as SerovalParserError, w as Feature, x as SerovalUnknownTypedArrayError, y as SerovalPluginValidationError, z as SyncParsePluginContext } from "./shared-Dju99SLx.cjs";
|
|
2
|
+
import { n as SerovalJSON } from "./read-CgzYPh_Q.cjs";
|
|
3
|
+
import { C as toCrossJSONAsync, S as toCrossJSON, _ as ToCrossJSONOptions, a as compileJSON, b as crossSerializeAsync, c as toJSON, d as getCrossReferenceHeader, f as CrossAssignmentOptions, g as ToCrossJSONAsyncOptions, h as CrossSerializeStreamOptions, i as ToJSONOptions, l as toJSONAsync, m as CrossSerializeOptions, n as SerializeOptions, o as serialize, p as CrossSerializeAsyncOptions, r as ToJSONAsyncOptions, s as serializeAsync, t as SerializeAsyncOptions, u as Serializer, v as ToCrossJSONStreamOptions, w as toCrossJSONStream, x as crossSerializeStream, y as crossSerialize } from "./write-KxJKA4_p.cjs";
|
|
4
|
+
export { type AsyncParsePluginContext, type AsyncParserContextOptions, type BaseParserContextOptions, type BaseSerializerContextOptions, CrossAssignmentOptions, type CrossContextOptions, CrossSerializeAsyncOptions, CrossSerializeOptions, CrossSerializeStreamOptions, type CrossSerializerContextOptions, type DeserializePluginContext, Feature, LiveStream, type LiveStreamConsumer, type LiveStreamDelivery, LiveStreamErrorReason, type LiveStreamEvent, type LiveStreamOptions, type LiveStreamProducer, OpaqueReference, Plugin, PluginAccessOptions, PluginData, PluginInfo, Sequence, SerializeAsyncOptions, SerializeOptions, type SerializePluginContext, Serializer, SerovalAbortedError, SerovalConflictedNodeIdError, SerovalDepthLimitError, SerovalDeserializationError, SerovalError, type SerovalJSON, SerovalLiveStreamError, SerovalMalformedNodeError, SerovalMissingInstanceError, SerovalMissingPluginError, SerovalMissingReferenceError, SerovalMissingReferenceForIdError, SerovalMode, type SerovalNode, SerovalParserError, SerovalPluginValidationError, SerovalSerializationError, SerovalUnknownTypedArrayError, SerovalUnsupportedNodeError, SerovalUnsupportedTypeError, Stream, type StreamListener, type StreamParsePluginContext, type StreamParserContextOptions, type SyncParsePluginContext, type SyncParserContextOptions, ToCrossJSONAsyncOptions, ToCrossJSONOptions, ToCrossJSONStreamOptions, ToJSONAsyncOptions, ToJSONOptions, type Validator, type VanillaSerializerContextOptions, compileJSON, createLiveStream, createPlugin, createReference, createStream, crossSerialize, crossSerializeAsync, crossSerializeStream, getCrossReferenceHeader, getPlainObjectPlugins, isLiveStream, isStream, resolvePlugins, serialize, serializeAsync, toCrossJSON, toCrossJSONAsync, toCrossJSONStream, toJSON, toJSONAsync, v };
|
package/dist/write.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { $ as BaseSerializerContextOptions, A as PluginAccessOptions, B as SyncParserContextOptions, C as SerovalUnsupportedTypeError, D as DeserializePluginContext, F as getPlainObjectPlugins, G as LiveStreamOptions, H as LiveStreamConsumer, I as resolvePlugins, J as isLiveStream, K as LiveStreamProducer, L as StreamParsePluginContext, M as PluginInfo, N as SerovalMode, P as createPlugin, Q as isStream, R as StreamParserContextOptions, S as SerovalUnsupportedNodeError, U as LiveStreamDelivery, V as LiveStream, W as LiveStreamEvent, X as StreamListener, Y as Stream, Z as createStream, _ as SerovalMissingReferenceForIdError, a as OpaqueReference, at as AsyncParserContextOptions, b as SerovalSerializationError, c as SerovalConflictedNodeIdError, d as SerovalError, et as CrossContextOptions, f as SerovalLiveStreamError, g as SerovalMissingReferenceError, h as SerovalMissingPluginError, i as createReference, it as AsyncParsePluginContext, j as PluginData, k as Plugin, l as SerovalDepthLimitError, m as SerovalMissingInstanceError, n as v, nt as SerializePluginContext, o as LiveStreamErrorReason, ot as BaseParserContextOptions, p as SerovalMalformedNodeError, q as createLiveStream, r as Sequence, rt as VanillaSerializerContextOptions, s as SerovalAbortedError, st as SerovalNode, t as Validator, tt as CrossSerializerContextOptions, u as SerovalDeserializationError, v as SerovalParserError, w as Feature, x as SerovalUnknownTypedArrayError, y as SerovalPluginValidationError, z as SyncParsePluginContext } from "./shared-DTMVoS-y.js";
|
|
2
|
+
import { n as SerovalJSON } from "./read-Bn_ffmiS.js";
|
|
3
|
+
import { C as toCrossJSONAsync, S as toCrossJSON, _ as ToCrossJSONOptions, a as compileJSON, b as crossSerializeAsync, c as toJSON, d as getCrossReferenceHeader, f as CrossAssignmentOptions, g as ToCrossJSONAsyncOptions, h as CrossSerializeStreamOptions, i as ToJSONOptions, l as toJSONAsync, m as CrossSerializeOptions, n as SerializeOptions, o as serialize, p as CrossSerializeAsyncOptions, r as ToJSONAsyncOptions, s as serializeAsync, t as SerializeAsyncOptions, u as Serializer, v as ToCrossJSONStreamOptions, w as toCrossJSONStream, x as crossSerializeStream, y as crossSerialize } from "./write-C0KqlAXN.js";
|
|
4
|
+
export { type AsyncParsePluginContext, type AsyncParserContextOptions, type BaseParserContextOptions, type BaseSerializerContextOptions, CrossAssignmentOptions, type CrossContextOptions, CrossSerializeAsyncOptions, CrossSerializeOptions, CrossSerializeStreamOptions, type CrossSerializerContextOptions, type DeserializePluginContext, Feature, LiveStream, type LiveStreamConsumer, type LiveStreamDelivery, LiveStreamErrorReason, type LiveStreamEvent, type LiveStreamOptions, type LiveStreamProducer, OpaqueReference, Plugin, PluginAccessOptions, PluginData, PluginInfo, Sequence, SerializeAsyncOptions, SerializeOptions, type SerializePluginContext, Serializer, SerovalAbortedError, SerovalConflictedNodeIdError, SerovalDepthLimitError, SerovalDeserializationError, SerovalError, type SerovalJSON, SerovalLiveStreamError, SerovalMalformedNodeError, SerovalMissingInstanceError, SerovalMissingPluginError, SerovalMissingReferenceError, SerovalMissingReferenceForIdError, SerovalMode, type SerovalNode, SerovalParserError, SerovalPluginValidationError, SerovalSerializationError, SerovalUnknownTypedArrayError, SerovalUnsupportedNodeError, SerovalUnsupportedTypeError, Stream, type StreamListener, type StreamParsePluginContext, type StreamParserContextOptions, type SyncParsePluginContext, type SyncParserContextOptions, ToCrossJSONAsyncOptions, ToCrossJSONOptions, ToCrossJSONStreamOptions, ToJSONAsyncOptions, ToJSONOptions, type Validator, type VanillaSerializerContextOptions, compileJSON, createLiveStream, createPlugin, createReference, createStream, crossSerialize, crossSerializeAsync, crossSerializeStream, getCrossReferenceHeader, getPlainObjectPlugins, isLiveStream, isStream, resolvePlugins, serialize, serializeAsync, toCrossJSON, toCrossJSONAsync, toCrossJSONStream, toJSON, toJSONAsync, v };
|
package/dist/write.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { A as SerovalMalformedNodeError, B as SerovalUnsupportedTypeError, C as getCrossReferenceHeader, D as SerovalDeserializationError, E as SerovalDepthLimitError, F as SerovalParserError, I as SerovalPluginValidationError, L as SerovalSerializationError, M as SerovalMissingPluginError, N as SerovalMissingReferenceError, O as SerovalError, P as SerovalMissingReferenceForIdError, R as SerovalUnknownTypedArrayError, T as SerovalConflictedNodeIdError, a as getPlainObjectPlugins, c as createStream, d as LiveStream, f as createLiveStream, i as createPlugin, j as SerovalMissingInstanceError, k as SerovalLiveStreamError, l as isStream, m as Sequence, n as OpaqueReference, o as resolvePlugins, p as isLiveStream, r as SerovalMode, s as Stream, t as v, tt as Feature, w as SerovalAbortedError, y as createReference, z as SerovalUnsupportedNodeError } from "./shared-DJIVyqa9.js";
|
|
2
|
+
import { a as toJSONAsync, c as crossSerializeAsync, d as toCrossJSONAsync, f as toCrossJSONStream, i as toJSON, l as crossSerializeStream, n as serialize, o as Serializer, r as serializeAsync, s as crossSerialize, t as compileJSON, u as toCrossJSON } from "./write-B_hZaAwC.js";
|
|
3
|
+
export { Feature, LiveStream, OpaqueReference, Sequence, Serializer, SerovalAbortedError, SerovalConflictedNodeIdError, SerovalDepthLimitError, SerovalDeserializationError, SerovalError, SerovalLiveStreamError, SerovalMalformedNodeError, SerovalMissingInstanceError, SerovalMissingPluginError, SerovalMissingReferenceError, SerovalMissingReferenceForIdError, SerovalMode, SerovalParserError, SerovalPluginValidationError, SerovalSerializationError, SerovalUnknownTypedArrayError, SerovalUnsupportedNodeError, SerovalUnsupportedTypeError, Stream, compileJSON, createLiveStream, createPlugin, createReference, createStream, crossSerialize, crossSerializeAsync, crossSerializeStream, getCrossReferenceHeader, getPlainObjectPlugins, isLiveStream, isStream, resolvePlugins, serialize, serializeAsync, toCrossJSON, toCrossJSONAsync, toCrossJSONStream, toJSON, toJSONAsync, v };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "seroval",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.8.0",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
@@ -43,6 +43,22 @@
|
|
|
43
43
|
},
|
|
44
44
|
"author": "Alexis Munsayac",
|
|
45
45
|
"types": "./dist/index.d.cts",
|
|
46
|
+
"typesVersions": {
|
|
47
|
+
"*": {
|
|
48
|
+
"read": [
|
|
49
|
+
"./dist/read.d.cts"
|
|
50
|
+
],
|
|
51
|
+
"write": [
|
|
52
|
+
"./dist/write.d.cts"
|
|
53
|
+
],
|
|
54
|
+
"shared": [
|
|
55
|
+
"./dist/shared.d.cts"
|
|
56
|
+
],
|
|
57
|
+
"validator": [
|
|
58
|
+
"./dist/validator.d.cts"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
46
62
|
"exports": {
|
|
47
63
|
".": {
|
|
48
64
|
"development": {
|
|
@@ -64,6 +80,86 @@
|
|
|
64
80
|
"require": "./dist/index.cjs",
|
|
65
81
|
"default": "./dist/index.js"
|
|
66
82
|
},
|
|
83
|
+
"./read": {
|
|
84
|
+
"development": {
|
|
85
|
+
"browser": {
|
|
86
|
+
"import": "./dist/dev/read.js",
|
|
87
|
+
"require": "./dist/dev/read.cjs",
|
|
88
|
+
"default": "./dist/dev/read.js"
|
|
89
|
+
},
|
|
90
|
+
"import": "./dist/dev/read.js",
|
|
91
|
+
"require": "./dist/dev/read.cjs",
|
|
92
|
+
"default": "./dist/dev/read.js"
|
|
93
|
+
},
|
|
94
|
+
"browser": {
|
|
95
|
+
"import": "./dist/read.js",
|
|
96
|
+
"require": "./dist/read.cjs",
|
|
97
|
+
"default": "./dist/read.js"
|
|
98
|
+
},
|
|
99
|
+
"import": "./dist/read.js",
|
|
100
|
+
"require": "./dist/read.cjs",
|
|
101
|
+
"default": "./dist/read.js"
|
|
102
|
+
},
|
|
103
|
+
"./write": {
|
|
104
|
+
"development": {
|
|
105
|
+
"browser": {
|
|
106
|
+
"import": "./dist/dev/write.js",
|
|
107
|
+
"require": "./dist/dev/write.cjs",
|
|
108
|
+
"default": "./dist/dev/write.js"
|
|
109
|
+
},
|
|
110
|
+
"import": "./dist/dev/write.js",
|
|
111
|
+
"require": "./dist/dev/write.cjs",
|
|
112
|
+
"default": "./dist/dev/write.js"
|
|
113
|
+
},
|
|
114
|
+
"browser": {
|
|
115
|
+
"import": "./dist/write.js",
|
|
116
|
+
"require": "./dist/write.cjs",
|
|
117
|
+
"default": "./dist/write.js"
|
|
118
|
+
},
|
|
119
|
+
"import": "./dist/write.js",
|
|
120
|
+
"require": "./dist/write.cjs",
|
|
121
|
+
"default": "./dist/write.js"
|
|
122
|
+
},
|
|
123
|
+
"./shared": {
|
|
124
|
+
"development": {
|
|
125
|
+
"browser": {
|
|
126
|
+
"import": "./dist/dev/shared.js",
|
|
127
|
+
"require": "./dist/dev/shared.cjs",
|
|
128
|
+
"default": "./dist/dev/shared.js"
|
|
129
|
+
},
|
|
130
|
+
"import": "./dist/dev/shared.js",
|
|
131
|
+
"require": "./dist/dev/shared.cjs",
|
|
132
|
+
"default": "./dist/dev/shared.js"
|
|
133
|
+
},
|
|
134
|
+
"browser": {
|
|
135
|
+
"import": "./dist/shared.js",
|
|
136
|
+
"require": "./dist/shared.cjs",
|
|
137
|
+
"default": "./dist/shared.js"
|
|
138
|
+
},
|
|
139
|
+
"import": "./dist/shared.js",
|
|
140
|
+
"require": "./dist/shared.cjs",
|
|
141
|
+
"default": "./dist/shared.js"
|
|
142
|
+
},
|
|
143
|
+
"./validator": {
|
|
144
|
+
"development": {
|
|
145
|
+
"browser": {
|
|
146
|
+
"import": "./dist/dev/validator.js",
|
|
147
|
+
"require": "./dist/dev/validator.cjs",
|
|
148
|
+
"default": "./dist/dev/validator.js"
|
|
149
|
+
},
|
|
150
|
+
"import": "./dist/dev/validator.js",
|
|
151
|
+
"require": "./dist/dev/validator.cjs",
|
|
152
|
+
"default": "./dist/dev/validator.js"
|
|
153
|
+
},
|
|
154
|
+
"browser": {
|
|
155
|
+
"import": "./dist/validator.js",
|
|
156
|
+
"require": "./dist/validator.cjs",
|
|
157
|
+
"default": "./dist/validator.js"
|
|
158
|
+
},
|
|
159
|
+
"import": "./dist/validator.js",
|
|
160
|
+
"require": "./dist/validator.cjs",
|
|
161
|
+
"default": "./dist/validator.js"
|
|
162
|
+
},
|
|
67
163
|
"./package.json": "./package.json"
|
|
68
164
|
},
|
|
69
165
|
"main": "./dist/index.cjs",
|