@snyxex/pipex 0.0.0-stage → 1.0.3
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/CHANGELOG.md +30 -0
- package/LICENSE +21 -0
- package/README.md +319 -2
- package/dist/compression-2mm0MhWY.mjs +1 -0
- package/dist/compression-CtrHxa9G.d.mts +38 -0
- package/dist/compression-DnVFu8TM.d.cts +38 -0
- package/dist/compression-DrgzribA.cjs +1 -0
- package/dist/compression.cjs +1 -0
- package/dist/compression.d.cts +2 -0
- package/dist/compression.d.mts +2 -0
- package/dist/compression.mjs +1 -0
- package/dist/core-BOdvxKBq.mjs +2 -0
- package/dist/core-B_z1gN5W.cjs +2 -0
- package/dist/dataEngine-4m6GTOLe.mjs +1 -0
- package/dist/dataEngine-Bvl6amzP.cjs +1 -0
- package/dist/dataEngine-D-fIXgE7.d.cts +232 -0
- package/dist/dataEngine-DUEmWp7a.d.mts +232 -0
- package/dist/encryption-BmmNECIc.d.cts +44 -0
- package/dist/encryption-CnSL1BEY.d.mts +44 -0
- package/dist/encryption-CqxtoqAD.mjs +1 -0
- package/dist/encryption-DdP1zFYl.cjs +1 -0
- package/dist/encryption.cjs +1 -0
- package/dist/encryption.d.cts +2 -0
- package/dist/encryption.d.mts +2 -0
- package/dist/encryption.mjs +1 -0
- package/dist/hashing-B6xGcbQR.d.mts +33 -0
- package/dist/hashing-ChrADfcH.mjs +1 -0
- package/dist/hashing-JtOHPybU.cjs +1 -0
- package/dist/hashing-LY-8x66g.d.cts +33 -0
- package/dist/hashing.cjs +1 -0
- package/dist/hashing.d.cts +2 -0
- package/dist/hashing.d.mts +2 -0
- package/dist/hashing.mjs +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +302 -0
- package/dist/index.d.mts +302 -0
- package/dist/index.mjs +1 -0
- package/dist/kms.cjs +1 -0
- package/dist/kms.d.cts +3 -0
- package/dist/kms.d.mts +3 -0
- package/dist/kms.mjs +1 -0
- package/dist/kms_encryption-Da-KqjKI.d.mts +33 -0
- package/dist/kms_encryption-Dh1LEHhk.d.cts +33 -0
- package/dist/kms_encryption-R9auKGW4.mjs +1 -0
- package/dist/kms_encryption-xyWi65rZ.cjs +1 -0
- package/dist/native.cjs +1 -0
- package/dist/native.d.cts +2 -0
- package/dist/native.d.mts +2 -0
- package/dist/native.mjs +1 -0
- package/dist/parallel.cjs +1 -0
- package/dist/parallel.d.cts +2 -0
- package/dist/parallel.d.mts +2 -0
- package/dist/parallel.mjs +1 -0
- package/dist/plugin-C9Kd9coY.d.cts +16 -0
- package/dist/plugin-CE94-p8P.d.mts +16 -0
- package/dist/resourceLimits-C1HHDwXQ.mjs +1 -0
- package/dist/resourceLimits-CI0Qrqdf.cjs +1 -0
- package/dist/types-Bytga6zd.d.mts +155 -0
- package/dist/types-ia4x-Dvp.d.cts +155 -0
- package/dist/validation-CqmhNHdW.d.cts +32 -0
- package/dist/validation-D17IkoHy.d.mts +32 -0
- package/dist/validation-P5WRSAUK.mjs +1 -0
- package/dist/validation-pEeJmCad.cjs +1 -0
- package/dist/validation.cjs +1 -0
- package/dist/validation.d.cts +2 -0
- package/dist/validation.d.mts +2 -0
- package/dist/validation.mjs +1 -0
- package/dist/worker-CbuCpSNc.d.cts +37 -0
- package/dist/worker-CgCC-BWG.d.mts +37 -0
- package/dist/worker-I_kqxWeK.cjs +1 -0
- package/dist/worker-c0_VZ9c7.mjs +1 -0
- package/package.json +188 -4
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { C as StreamPluginContext, S as Span, T as isManifest, _ as ProcessorContext, a as EngineEvents, b as RetryOptions, c as KmsOperation, d as KmsRequestOptions, f as Logger, g as PluginOperation, h as PluginCapabilities, i as EngineConfig, l as KmsProvider, m as PipeXManifest, n as AuditRecord, o as EngineLimits, p as OperationOptions, r as BinaryUndoOptions, s as EngineResult, t as AuditLogger, u as KmsProviderCapabilities, v as ProcessorPlugin, w as Tracer, x as SchemaRegistry, y as RegisteredPluginCapabilities } from "./types-Bytga6zd.mjs";
|
|
2
|
+
import { t as BasePlugin } from "./plugin-CE94-p8P.mjs";
|
|
3
|
+
import { i as CompressionType, n as CompressionOptions, r as CompressionPlugin } from "./compression-CtrHxa9G.mjs";
|
|
4
|
+
import { a as EncryptionPlugin, i as EncryptionOptions, o as EncryptionAlgorithm } from "./encryption-CnSL1BEY.mjs";
|
|
5
|
+
import { n as HashingOptions, r as HashingPlugin, t as HashAlgorithm } from "./hashing-B6xGcbQR.mjs";
|
|
6
|
+
import { n as KmsEncryptionPlugin, t as KmsEncryptionOptions } from "./kms_encryption-Da-KqjKI.mjs";
|
|
7
|
+
import { n as PluginConstructor, t as DataEngine } from "./dataEngine-DUEmWp7a.mjs";
|
|
8
|
+
import { n as WorkerPoolPlugin, t as WorkerPoolOptions } from "./worker-CgCC-BWG.mjs";
|
|
9
|
+
import { n as ValidationPlugin, t as ValidationOptions } from "./validation-D17IkoHy.mjs";
|
|
10
|
+
import { Duplex, Readable, Transform, TransformCallback, Writable } from "node:stream";
|
|
11
|
+
import { Packr, PackrStream, Unpackr, UnpackrStream } from "msgpackr";
|
|
12
|
+
|
|
13
|
+
//#region src/core/frameLimits.d.ts
|
|
14
|
+
declare function assertMessagePackFrameLimits(input: Buffer | Uint8Array, maxFrameBytes: number, maxFrames?: number): number;
|
|
15
|
+
declare function buildFrameLimitTransform(maxFrameBytes: number, maxFrames: number): Transform;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/core/resourceLimits.d.ts
|
|
18
|
+
declare const DEFAULT_LIMITS: Readonly<EngineLimits>;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/core/core.d.ts
|
|
21
|
+
/**
|
|
22
|
+
* Executes a function with automatic retries and backoff.
|
|
23
|
+
*/
|
|
24
|
+
declare function withRetry<T>(fn: () => Promise<T> | T, options?: RetryOptions, logger?: Logger, control?: {
|
|
25
|
+
signal?: AbortSignal;
|
|
26
|
+
limits?: Pick<EngineLimits, 'maxRetryAttempts' | 'maxRetryDelayMs'>;
|
|
27
|
+
track?: (pending: Promise<unknown>) => void;
|
|
28
|
+
}): Promise<T>;
|
|
29
|
+
declare const PIPEX_MANIFEST_KEY: "__pipex_v";
|
|
30
|
+
declare const PACKR: Packr;
|
|
31
|
+
declare const UNPACKR: Unpackr;
|
|
32
|
+
/** @deprecated Use `DEFAULT_LIMITS.maxFrameBytes` or an engine-specific limit. */
|
|
33
|
+
declare const MAX_FRAME_BYTES: number;
|
|
34
|
+
declare const DEFAULT_HIGH_WATER: number;
|
|
35
|
+
type PluginWithStream = ProcessorPlugin & {
|
|
36
|
+
createStream(mode: 'compress' | 'decompress', context?: StreamPluginContext): Duplex;
|
|
37
|
+
};
|
|
38
|
+
declare function hasStreamSupport(p: ProcessorPlugin): p is PluginWithStream;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the effective capabilities of a plugin after validating declarations.
|
|
41
|
+
* Explicit `false` declarations are authoritative, which supports plugins whose
|
|
42
|
+
* implementation is present but disabled by configuration (for example workers).
|
|
43
|
+
*/
|
|
44
|
+
declare function getPluginCapabilities(plugin: ProcessorPlugin): Readonly<PluginCapabilities>;
|
|
45
|
+
/** Query an operation without attempting to execute it. Invalid declarations fail closed. */
|
|
46
|
+
declare function supportsOperation(plugin: ProcessorPlugin, operation: PluginOperation): boolean;
|
|
47
|
+
declare function supportsReverse(plugin: ProcessorPlugin): plugin is ProcessorPlugin & Required<Pick<ProcessorPlugin, 'reverse'>>;
|
|
48
|
+
declare function assertReversiblePipeline(plugins: readonly ProcessorPlugin[]): void;
|
|
49
|
+
declare function assertStreamingPipeline(plugins: readonly ProcessorPlugin[]): void;
|
|
50
|
+
declare function detectType(input: unknown): string;
|
|
51
|
+
declare function toBuffer(input: unknown): Buffer;
|
|
52
|
+
declare const ORIGINAL_TYPES: readonly ["buffer", "object", "array", "string", "number", "boolean", "null", "undefined", "bigint", "json"];
|
|
53
|
+
declare function assertOriginalType(value: unknown): asserts value is string;
|
|
54
|
+
declare function fromBuffer(buffer: Buffer, targetType: string, maxFrameBytes?: number): unknown;
|
|
55
|
+
declare function makeContext(requestId: string, extra?: Record<string, unknown>, logger?: Logger, span?: Span, signal?: AbortSignal, limits?: Readonly<EngineLimits>): ProcessorContext;
|
|
56
|
+
declare function buildManifest(plugins: readonly ProcessorPlugin[]): PipeXManifest;
|
|
57
|
+
/**
|
|
58
|
+
* A passthrough Transform that prepends a single msgpack-encoded manifest frame
|
|
59
|
+
* to the byte stream before forwarding any data chunks.
|
|
60
|
+
* Inserted between PackrStream output and the file destination.
|
|
61
|
+
*/
|
|
62
|
+
declare function buildManifestHeaderTransform(manifest: PipeXManifest): Transform;
|
|
63
|
+
/**
|
|
64
|
+
* Object-mode Transform that sits after UnpackrStream.
|
|
65
|
+
* Intercepts the first decoded frame: if it is a PipeXManifest, captures it
|
|
66
|
+
* via onManifest() and drops it from the output; all other frames pass through.
|
|
67
|
+
*/
|
|
68
|
+
declare function buildManifestExtractTransform(onManifest: (m: PipeXManifest) => void): Transform;
|
|
69
|
+
/** DoS-safe UnpackrStream subclass — rejects oversized raw chunks before decode. */
|
|
70
|
+
declare class GuardedUnpackrStream extends UnpackrStream {
|
|
71
|
+
#private;
|
|
72
|
+
constructor(options?: Record<string, unknown>, maxInputBytes?: number);
|
|
73
|
+
_transform(chunk: Buffer, enc: BufferEncoding, cb: TransformCallback): void;
|
|
74
|
+
}
|
|
75
|
+
/** PackrStream with useRecords disabled (safe default). */
|
|
76
|
+
declare function createPackrStream(): PackrStream;
|
|
77
|
+
/** GuardedUnpackrStream with useRecords disabled. */
|
|
78
|
+
declare function createUnpackrStream(maxInputBytes?: number): GuardedUnpackrStream;
|
|
79
|
+
declare function buildByteLimitTransform(maxBytes: number, label: string): Transform;
|
|
80
|
+
declare function buildObjectLimitTransform(maxFrames: number): Transform;
|
|
81
|
+
/** Rejects known byte-backed values before MessagePack copies their payload. */
|
|
82
|
+
declare function assertKnownValueByteLimit(value: unknown, maxBytes: number, label: string): void;
|
|
83
|
+
declare function buildKnownValueByteLimitTransform(maxBytes: number, label: string): Transform;
|
|
84
|
+
/**
|
|
85
|
+
* Wraps a plugin's process/reverse call in a Transform.
|
|
86
|
+
* requestId is fixed per stream instance — not per chunk — to avoid
|
|
87
|
+
* 60× randomUUID() overhead on high-throughput paths.
|
|
88
|
+
*/
|
|
89
|
+
declare function buildFallbackTransform(plugin: ProcessorPlugin, reverse: boolean, emitProgress?: (bytes: number) => void, logger?: Logger, tracer?: Tracer, dlq?: Writable, streamContext?: StreamPluginContext): Transform;
|
|
90
|
+
/** Serialises JS objects to NDJSON lines. */
|
|
91
|
+
declare function buildNdjsonTransform(): Transform;
|
|
92
|
+
/**
|
|
93
|
+
* Builds the ordered Transform chain from a plugin list.
|
|
94
|
+
* Uses native createStream() when available; falls back to buildFallbackTransform.
|
|
95
|
+
*/
|
|
96
|
+
declare function buildTransformChain(plugins: readonly ProcessorPlugin[], mode: 'compress' | 'decompress', reverse?: boolean, onProgress?: (bytes: number) => void, logger?: Logger, tracer?: Tracer, dlq?: Writable, streamContext?: StreamPluginContext): (Duplex | Transform | PackrStream | GuardedUnpackrStream)[];
|
|
97
|
+
/**
|
|
98
|
+
* Runs an arbitrary pipeline: Source → [...Transforms] → Destination.
|
|
99
|
+
* The `any` cast is scoped to this single call site — nowhere else.
|
|
100
|
+
*/
|
|
101
|
+
declare function runPipeline(source: Readable, transforms: (Duplex | Transform | PackrStream | GuardedUnpackrStream)[], destination: Writable, options?: {
|
|
102
|
+
signal?: AbortSignal;
|
|
103
|
+
}): Promise<void>;
|
|
104
|
+
declare function assertExists(inputPath: string, allowedRoot?: string): string;
|
|
105
|
+
declare function resolveOutputPath(outputPath: string, allowedRoot?: string): string;
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/core/typedPipeline.d.ts
|
|
108
|
+
/** A synchronous or asynchronous transformation from Input to Output. */
|
|
109
|
+
type TypedTransform<Input, Output> = (input: Input, options: Readonly<OperationOptions>) => Output | Promise<Output>;
|
|
110
|
+
/** Cancellation options for typed application pipelines. */
|
|
111
|
+
type TypedPipelineOptions = Readonly<OperationOptions>;
|
|
112
|
+
/** An immutable pipeline whose input and output types are preserved across steps. */
|
|
113
|
+
declare class TypedPipeline<Input, Output> {
|
|
114
|
+
private readonly transforms;
|
|
115
|
+
private constructor();
|
|
116
|
+
/**
|
|
117
|
+
* Start a pipeline from an initial typed transform.
|
|
118
|
+
* @param transform First transformation; its input type becomes the pipeline input.
|
|
119
|
+
*/
|
|
120
|
+
static from<Input, Output>(transform: TypedTransform<Input, Output>): TypedPipeline<Input, Awaited<Output>>;
|
|
121
|
+
/**
|
|
122
|
+
* Append a transform. Its input must accept this pipeline's current output.
|
|
123
|
+
* The returned pipeline infers the appended asynchronous or synchronous output.
|
|
124
|
+
*/
|
|
125
|
+
pipe<Next>(transform: TypedTransform<Output, Next>): TypedPipeline<Input, Awaited<Next>>;
|
|
126
|
+
/** Execute all transforms in order, honouring cancellation between awaits. */
|
|
127
|
+
run(input: Input, options?: TypedPipelineOptions): Promise<Output>;
|
|
128
|
+
}
|
|
129
|
+
/** Create a typed pipeline with automatic end-to-end transform inference. */
|
|
130
|
+
declare function typedPipeline<Input, Output>(first: TypedTransform<Input, Output>): TypedPipeline<Input, Awaited<Output>>;
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/core/errors.d.ts
|
|
133
|
+
type PipeXErrorCode = 'VALIDATION_FAILED' | 'COMPRESSION_FAILED' | 'HASHING_FAILED' | 'UNSUPPORTED_ALGORITHM' | 'UNSUPPORTED_REVERSE' | 'UNSUPPORTED_STREAMING' | 'INVALID_PLUGIN_CAPABILITY' | 'ENCRYPTION_ERROR' | 'INVALID_ENCRYPTION_KEY' | 'ENCRYPTION_AUTHENTICATION_FAILED' | 'OPERATION_ABORTED' | 'OPERATION_TIMEOUT' | 'KMS_PROVIDER_FAILURE' | 'KMS_AUTHENTICATION_FAILED' | 'KMS_PROVIDER_AUTHENTICATION_FAILED' | 'KMS_PROVIDER_UNAVAILABLE' | 'UNSUPPORTED_KMS_OPERATION' | 'INVALID_KMS_PROVIDER_CAPABILITY' | 'WORKER_POOL_CLOSED' | 'WORKER_QUEUE_FULL' | 'WORKER_POOL_CLOSE_FAILURE' | 'WORKER_TASK_FAILURE';
|
|
134
|
+
declare class PipeXError extends Error {
|
|
135
|
+
readonly code: PipeXErrorCode;
|
|
136
|
+
readonly name: string;
|
|
137
|
+
readonly transformName?: string;
|
|
138
|
+
readonly stage?: string;
|
|
139
|
+
constructor(code: PipeXErrorCode, message: string, options?: ErrorOptions & {
|
|
140
|
+
transformName?: string;
|
|
141
|
+
stage?: string;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/** Domain failures use fixed, non-sensitive messages. Never include input, keys or arbitrary provider errors. */
|
|
145
|
+
declare class ValidationError extends PipeXError {
|
|
146
|
+
readonly name = "ValidationError";
|
|
147
|
+
constructor(options?: ErrorOptions & {
|
|
148
|
+
transformName?: string;
|
|
149
|
+
stage?: string;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
declare class CompressionError extends PipeXError {
|
|
153
|
+
readonly name = "CompressionError";
|
|
154
|
+
constructor(options?: ErrorOptions & {
|
|
155
|
+
transformName?: string;
|
|
156
|
+
stage?: string;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
declare class HashingError extends PipeXError {
|
|
160
|
+
readonly name = "HashingError";
|
|
161
|
+
constructor(options?: ErrorOptions & {
|
|
162
|
+
transformName?: string;
|
|
163
|
+
stage?: string;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
declare class UnsupportedAlgorithmError extends PipeXError {
|
|
167
|
+
readonly name = "UnsupportedAlgorithmError";
|
|
168
|
+
constructor(options?: ErrorOptions & {
|
|
169
|
+
transformName?: string;
|
|
170
|
+
stage?: string;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/** Alias hierarchy: existing OperationAbortedError retains its code and instanceof contract. */
|
|
174
|
+
declare class PipelineAbortedError extends PipeXError {
|
|
175
|
+
readonly name: string;
|
|
176
|
+
constructor(options?: ErrorOptions & {
|
|
177
|
+
transformName?: string;
|
|
178
|
+
stage?: string;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
declare class UnsupportedReverseError extends PipeXError {
|
|
182
|
+
readonly plugin: string;
|
|
183
|
+
readonly name: string;
|
|
184
|
+
constructor(plugin: string);
|
|
185
|
+
}
|
|
186
|
+
declare class UnsupportedStreamingError extends PipeXError {
|
|
187
|
+
readonly plugin: string;
|
|
188
|
+
readonly name: string;
|
|
189
|
+
constructor(plugin: string);
|
|
190
|
+
}
|
|
191
|
+
type InvalidPluginCapabilityIssue = 'MUST_BE_BOOLEAN' | 'MISSING_IMPLEMENTATION' | 'CONFLICTING_IMPLEMENTATION';
|
|
192
|
+
declare class InvalidPluginCapabilityError extends PipeXError {
|
|
193
|
+
readonly plugin: string;
|
|
194
|
+
readonly capability: 'reversible' | 'streaming';
|
|
195
|
+
readonly issue: InvalidPluginCapabilityIssue;
|
|
196
|
+
readonly name: string;
|
|
197
|
+
constructor(plugin: string, capability: 'reversible' | 'streaming', issue: InvalidPluginCapabilityIssue);
|
|
198
|
+
}
|
|
199
|
+
declare class OperationAbortedError extends PipelineAbortedError {
|
|
200
|
+
readonly name: string;
|
|
201
|
+
constructor(options?: ErrorOptions);
|
|
202
|
+
}
|
|
203
|
+
declare class OperationTimeoutError extends PipeXError {
|
|
204
|
+
readonly name: string;
|
|
205
|
+
constructor(options?: ErrorOptions);
|
|
206
|
+
}
|
|
207
|
+
declare class KmsProviderError extends PipeXError {
|
|
208
|
+
readonly operation: 'generateDataKey' | 'decrypt' | 'encrypt';
|
|
209
|
+
readonly name: string;
|
|
210
|
+
constructor(operation: 'generateDataKey' | 'decrypt' | 'encrypt', options?: ErrorOptions);
|
|
211
|
+
}
|
|
212
|
+
declare class KmsAuthenticationError extends PipeXError {
|
|
213
|
+
readonly name: string;
|
|
214
|
+
constructor();
|
|
215
|
+
}
|
|
216
|
+
declare class KmsProviderAuthenticationError extends PipeXError {
|
|
217
|
+
readonly operation: 'generateDataKey' | 'decrypt' | 'encrypt';
|
|
218
|
+
readonly name: string;
|
|
219
|
+
constructor(operation: 'generateDataKey' | 'decrypt' | 'encrypt');
|
|
220
|
+
}
|
|
221
|
+
declare class KmsProviderUnavailableError extends PipeXError {
|
|
222
|
+
readonly operation: 'generateDataKey' | 'decrypt' | 'encrypt';
|
|
223
|
+
readonly name: string;
|
|
224
|
+
constructor(operation: 'generateDataKey' | 'decrypt' | 'encrypt');
|
|
225
|
+
}
|
|
226
|
+
declare class UnsupportedKmsOperationError extends PipeXError {
|
|
227
|
+
readonly operation: 'generateDataKey' | 'decrypt' | 'encrypt';
|
|
228
|
+
readonly name: string;
|
|
229
|
+
constructor(operation: 'generateDataKey' | 'decrypt' | 'encrypt');
|
|
230
|
+
}
|
|
231
|
+
type InvalidKmsProviderCapabilityIssue = 'MUST_BE_BOOLEAN' | 'MISSING_IMPLEMENTATION';
|
|
232
|
+
declare class InvalidKmsProviderCapabilityError extends PipeXError {
|
|
233
|
+
readonly operation: 'generateDataKey' | 'decrypt' | 'encrypt';
|
|
234
|
+
readonly issue: InvalidKmsProviderCapabilityIssue;
|
|
235
|
+
readonly name: string;
|
|
236
|
+
constructor(operation: 'generateDataKey' | 'decrypt' | 'encrypt', issue: InvalidKmsProviderCapabilityIssue);
|
|
237
|
+
}
|
|
238
|
+
declare class WorkerPoolClosedError extends PipeXError {
|
|
239
|
+
readonly name: string;
|
|
240
|
+
constructor();
|
|
241
|
+
}
|
|
242
|
+
declare class WorkerQueueFullError extends PipeXError {
|
|
243
|
+
readonly maxQueue: number;
|
|
244
|
+
readonly name: string;
|
|
245
|
+
constructor(maxQueue: number);
|
|
246
|
+
}
|
|
247
|
+
declare class WorkerPoolCloseError extends PipeXError {
|
|
248
|
+
readonly name: string;
|
|
249
|
+
constructor(options?: ErrorOptions);
|
|
250
|
+
}
|
|
251
|
+
declare class WorkerTaskError extends PipeXError {
|
|
252
|
+
readonly taskName: string;
|
|
253
|
+
readonly name: string;
|
|
254
|
+
constructor(taskName: string, options?: ErrorOptions);
|
|
255
|
+
}
|
|
256
|
+
/** Public cryptographic failure categories; never include keys or ciphertext in messages. */
|
|
257
|
+
declare class EncryptionError extends PipeXError {
|
|
258
|
+
readonly name: string;
|
|
259
|
+
constructor(message?: string);
|
|
260
|
+
}
|
|
261
|
+
declare class InvalidKeyError extends PipeXError {
|
|
262
|
+
readonly name: string;
|
|
263
|
+
constructor();
|
|
264
|
+
}
|
|
265
|
+
declare class AuthenticationError extends PipeXError {
|
|
266
|
+
readonly name: string;
|
|
267
|
+
constructor();
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/core/kmsCapabilities.d.ts
|
|
271
|
+
/**
|
|
272
|
+
* Returns an immutable, runtime-validated view of a generic KMS provider.
|
|
273
|
+
* Explicit false declarations support legacy provider stubs that exist only
|
|
274
|
+
* to throw; such methods are never invoked through PipeX.
|
|
275
|
+
*/
|
|
276
|
+
declare function getKmsProviderCapabilities(provider: KmsProvider): Readonly<KmsProviderCapabilities>;
|
|
277
|
+
declare function supportsKmsOperation(provider: KmsProvider, operation: KmsOperation): boolean;
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region src/plugin/performance.d.ts
|
|
280
|
+
/**
|
|
281
|
+
* BenchmarkPlugin — Standard library plugin for monitoring data throughput.
|
|
282
|
+
* Records input/output byte counts in context metadata.
|
|
283
|
+
*/
|
|
284
|
+
declare class BenchmarkPlugin extends BasePlugin {
|
|
285
|
+
readonly name = "benchmark";
|
|
286
|
+
readonly version = "2.0.0";
|
|
287
|
+
process(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
288
|
+
reverse(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
289
|
+
}
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/index.d.ts
|
|
292
|
+
declare const Plugins: {
|
|
293
|
+
readonly Hashing: typeof HashingPlugin;
|
|
294
|
+
readonly Encryption: typeof EncryptionPlugin;
|
|
295
|
+
readonly Compression: typeof CompressionPlugin;
|
|
296
|
+
readonly Benchmark: typeof BenchmarkPlugin;
|
|
297
|
+
readonly WorkerPool: typeof WorkerPoolPlugin;
|
|
298
|
+
readonly Validation: typeof ValidationPlugin;
|
|
299
|
+
readonly KmsEncryption: typeof KmsEncryptionPlugin;
|
|
300
|
+
};
|
|
301
|
+
//#endregion
|
|
302
|
+
export { type AuditLogger, type AuditRecord, AuthenticationError, BasePlugin, BenchmarkPlugin, type BinaryUndoOptions, CompressionError, type CompressionOptions, CompressionPlugin, type CompressionType, DEFAULT_HIGH_WATER, DEFAULT_LIMITS, DataEngine, type EncryptionAlgorithm, EncryptionError, type EncryptionOptions, EncryptionPlugin, type EngineConfig, type EngineEvents, type EngineLimits, type EngineResult, GuardedUnpackrStream, type HashAlgorithm, HashingError, type HashingOptions, HashingPlugin, InvalidKeyError, InvalidKmsProviderCapabilityError, type InvalidKmsProviderCapabilityIssue, InvalidPluginCapabilityError, type InvalidPluginCapabilityIssue, KmsAuthenticationError, type KmsEncryptionOptions, KmsEncryptionPlugin, type KmsOperation, type KmsProvider, KmsProviderAuthenticationError, type KmsProviderCapabilities, KmsProviderError, KmsProviderUnavailableError, type KmsRequestOptions, type Logger, MAX_FRAME_BYTES, ORIGINAL_TYPES, OperationAbortedError, type OperationOptions, OperationTimeoutError, PACKR, PIPEX_MANIFEST_KEY, PipeXError, type PipeXErrorCode, type PipeXManifest, PipelineAbortedError, type PluginCapabilities, type PluginConstructor, type PluginOperation, Plugins, type ProcessorContext, type ProcessorPlugin, type RegisteredPluginCapabilities, type RetryOptions, type SchemaRegistry, type Span, type StreamPluginContext, type Tracer, TypedPipeline, type TypedPipelineOptions, type TypedTransform, UNPACKR, UnsupportedAlgorithmError, UnsupportedKmsOperationError, UnsupportedReverseError, UnsupportedStreamingError, ValidationError, type ValidationOptions, ValidationPlugin, WorkerPoolCloseError, WorkerPoolClosedError, type WorkerPoolOptions, WorkerPoolPlugin, WorkerQueueFullError, WorkerTaskError, assertExists, assertKnownValueByteLimit, assertMessagePackFrameLimits, assertOriginalType, assertReversiblePipeline, assertStreamingPipeline, buildByteLimitTransform, buildFallbackTransform, buildFrameLimitTransform, buildKnownValueByteLimitTransform, buildManifest, buildManifestExtractTransform, buildManifestHeaderTransform, buildNdjsonTransform, buildObjectLimitTransform, buildTransformChain, createPackrStream, createUnpackrStream, detectType, fromBuffer, getKmsProviderCapabilities, getPluginCapabilities, hasStreamSupport, isManifest, makeContext, resolveOutputPath, runPipeline, supportsKmsOperation, supportsOperation, supportsReverse, toBuffer, typedPipeline, withRetry };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,C as t,D as n,E as r,H as i,M as a,N as ee,O as o,P as s,S as c,T as l,U as te,V as ne,_ as re,a as ie,b as ae,c as oe,d as se,f as ce,g as u,h as d,i as f,j as p,k as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C,v as w,w as T,x as E,y as D}from"./core-BOdvxKBq.mjs";import{C as O,D as k,E as A,O as j,S as M,T as N,_ as P,a as F,b as I,c as le,d as L,f as R,g as z,h as B,i as V,l as H,m as U,o as W,p as ue,s as de,t as fe,u as pe,v as me,w as he,x as ge,y as _e}from"./resourceLimits-C1HHDwXQ.mjs";import{t as G}from"./dataEngine-4m6GTOLe.mjs";import{n as ve,r as ye,t as K}from"./kms_encryption-R9auKGW4.mjs";import{t as q}from"./hashing-ChrADfcH.mjs";import{t as J}from"./encryption-CqxtoqAD.mjs";import{t as Y}from"./compression-2mm0MhWY.mjs";import{t as X}from"./worker-c0_VZ9c7.mjs";import{t as Z}from"./validation-P5WRSAUK.mjs";var Q=class e{constructor(e){this.transforms=e}static from(t){return new e([t])}pipe(t){return new e([...this.transforms,t])}async run(e,t={}){let n=e,r=t.signal,i=()=>{if(r?.aborted)throw new z};i();for(let e of this.transforms){i();let a=Promise.resolve(e(n,t));n=r?await new Promise((e,t)=>{let n=()=>t(new z);r.addEventListener(`abort`,n,{once:!0}),a.then(e,t).finally(()=>r.removeEventListener(`abort`,n)).catch(()=>{}),r.aborted&&n()}):await a}return i(),n}};function be(e){return Q.from(e)}var $=class extends V{name=`benchmark`;version=`2.0.0`;async process(e,t){t.metadata??={};let n=t.metadata[`benchmark:start`]||Date.now();return t.metadata[`benchmark:in_bytes`]=e.length,t.metadata[`benchmark:start`]=n,e}async reverse(e,t){t.metadata??={},t.metadata[`benchmark:out_bytes`]=e.length;let n=t.metadata[`benchmark:start`];return n&&(t.metadata[`benchmark:duration_ms`]=Date.now()-n),e}};const xe={Hashing:q,Encryption:J,Compression:Y,Benchmark:$,WorkerPool:X,Validation:Z,KmsEncryption:K};G.registerPlugin(`hashing`,q),G.registerPlugin(`encryption`,J),G.registerPlugin(`compression`,Y),G.registerPlugin(`benchmark`,$),G.registerPlugin(`worker-pool`,X),G.registerPlugin(`validation`,Z),G.registerPlugin(`kms-encryption`,K);export{F as AuthenticationError,V as BasePlugin,$ as BenchmarkPlugin,W as CompressionError,Y as CompressionPlugin,S as DEFAULT_HIGH_WATER,fe as DEFAULT_LIMITS,G as DataEngine,de as EncryptionError,J as EncryptionPlugin,_ as GuardedUnpackrStream,le as HashingError,q as HashingPlugin,H as InvalidKeyError,pe as InvalidKmsProviderCapabilityError,L as InvalidPluginCapabilityError,R as KmsAuthenticationError,K as KmsEncryptionPlugin,ue as KmsProviderAuthenticationError,U as KmsProviderError,B as KmsProviderUnavailableError,b as MAX_FRAME_BYTES,f as ORIGINAL_TYPES,z as OperationAbortedError,P as OperationTimeoutError,ie as PACKR,v as PIPEX_MANIFEST_KEY,me as PipeXError,_e as PipelineAbortedError,xe as Plugins,Q as TypedPipeline,x as UNPACKR,I as UnsupportedAlgorithmError,ge as UnsupportedKmsOperationError,M as UnsupportedReverseError,O as UnsupportedStreamingError,he as ValidationError,Z as ValidationPlugin,N as WorkerPoolCloseError,A as WorkerPoolClosedError,X as WorkerPoolPlugin,k as WorkerQueueFullError,j as WorkerTaskError,oe as assertExists,h as assertKnownValueByteLimit,ne as assertMessagePackFrameLimits,C as assertOriginalType,se as assertReversiblePipeline,ce as assertStreamingPipeline,y as buildByteLimitTransform,g as buildFallbackTransform,i as buildFrameLimitTransform,d as buildKnownValueByteLimitTransform,u as buildManifest,re as buildManifestExtractTransform,w as buildManifestHeaderTransform,D as buildNdjsonTransform,ae as buildObjectLimitTransform,E as buildTransformChain,c as createPackrStream,t as createUnpackrStream,T as detectType,l as fromBuffer,ve as getKmsProviderCapabilities,r as getPluginCapabilities,n as hasStreamSupport,te as isManifest,o as makeContext,m as resolveOutputPath,e as runPipeline,ye as supportsKmsOperation,p as supportsOperation,a as supportsReverse,ee as toBuffer,be as typedPipeline,s as withRetry};
|
package/dist/kms.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./kms_encryption-xyWi65rZ.cjs`);exports.KmsEncryptionPlugin=e.t;
|
package/dist/kms.d.cts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { c as KmsOperation, d as KmsRequestOptions, l as KmsProvider, u as KmsProviderCapabilities } from "./types-ia4x-Dvp.cjs";
|
|
2
|
+
import { n as KmsEncryptionPlugin, t as KmsEncryptionOptions } from "./kms_encryption-Dh1LEHhk.cjs";
|
|
3
|
+
export { type KmsEncryptionOptions, KmsEncryptionPlugin, type KmsOperation, type KmsProvider, type KmsProviderCapabilities, type KmsRequestOptions };
|
package/dist/kms.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { c as KmsOperation, d as KmsRequestOptions, l as KmsProvider, u as KmsProviderCapabilities } from "./types-Bytga6zd.mjs";
|
|
2
|
+
import { n as KmsEncryptionPlugin, t as KmsEncryptionOptions } from "./kms_encryption-Da-KqjKI.mjs";
|
|
3
|
+
export { type KmsEncryptionOptions, KmsEncryptionPlugin, type KmsOperation, type KmsProvider, type KmsProviderCapabilities, type KmsRequestOptions };
|
package/dist/kms.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./kms_encryption-R9auKGW4.mjs";export{e as KmsEncryptionPlugin};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { _ as ProcessorContext, l as KmsProvider, u as KmsProviderCapabilities } from "./types-Bytga6zd.mjs";
|
|
2
|
+
import { t as BasePlugin } from "./plugin-CE94-p8P.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/kms_encryption.d.ts
|
|
5
|
+
interface KmsEncryptionOptions {
|
|
6
|
+
kms: KmsProvider;
|
|
7
|
+
keyId: string;
|
|
8
|
+
/** Temporarily accept the unversioned v1 envelope while migrating. Defaults to false. */
|
|
9
|
+
allowLegacyDecrypt?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* KmsEncryptionPlugin — Enterprise-grade encryption using Envelope Encryption.
|
|
13
|
+
*
|
|
14
|
+
* 1. Generate a data key via KMS.
|
|
15
|
+
* 2. Encrypt data locally using the plaintext data key.
|
|
16
|
+
* 3. Prepend the encrypted data key (ciphertext) to the payload.
|
|
17
|
+
*
|
|
18
|
+
* Packet format: [PXKM][version][algorithm][flags][key_len][ciphertext_len]
|
|
19
|
+
* [12B IV][Encrypted Data Key][Ciphertext][16B Tag]
|
|
20
|
+
*/
|
|
21
|
+
declare class KmsEncryptionPlugin extends BasePlugin {
|
|
22
|
+
protected options: KmsEncryptionOptions;
|
|
23
|
+
readonly name = "kms-encryption";
|
|
24
|
+
readonly version = "2.1.0";
|
|
25
|
+
readonly streaming = false;
|
|
26
|
+
get providerCapabilities(): Readonly<KmsProviderCapabilities>;
|
|
27
|
+
get reversible(): boolean;
|
|
28
|
+
constructor(options: KmsEncryptionOptions);
|
|
29
|
+
process(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
30
|
+
reverse(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { KmsEncryptionPlugin as n, KmsEncryptionOptions as t };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { _ as ProcessorContext, l as KmsProvider, u as KmsProviderCapabilities } from "./types-ia4x-Dvp.cjs";
|
|
2
|
+
import { t as BasePlugin } from "./plugin-C9Kd9coY.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/kms_encryption.d.ts
|
|
5
|
+
interface KmsEncryptionOptions {
|
|
6
|
+
kms: KmsProvider;
|
|
7
|
+
keyId: string;
|
|
8
|
+
/** Temporarily accept the unversioned v1 envelope while migrating. Defaults to false. */
|
|
9
|
+
allowLegacyDecrypt?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* KmsEncryptionPlugin — Enterprise-grade encryption using Envelope Encryption.
|
|
13
|
+
*
|
|
14
|
+
* 1. Generate a data key via KMS.
|
|
15
|
+
* 2. Encrypt data locally using the plaintext data key.
|
|
16
|
+
* 3. Prepend the encrypted data key (ciphertext) to the payload.
|
|
17
|
+
*
|
|
18
|
+
* Packet format: [PXKM][version][algorithm][flags][key_len][ciphertext_len]
|
|
19
|
+
* [12B IV][Encrypted Data Key][Ciphertext][16B Tag]
|
|
20
|
+
*/
|
|
21
|
+
declare class KmsEncryptionPlugin extends BasePlugin {
|
|
22
|
+
protected options: KmsEncryptionOptions;
|
|
23
|
+
readonly name = "kms-encryption";
|
|
24
|
+
readonly version = "2.1.0";
|
|
25
|
+
readonly streaming = false;
|
|
26
|
+
get providerCapabilities(): Readonly<KmsProviderCapabilities>;
|
|
27
|
+
get reversible(): boolean;
|
|
28
|
+
constructor(options: KmsEncryptionOptions);
|
|
29
|
+
process(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
30
|
+
reverse(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { KmsEncryptionPlugin as n, KmsEncryptionOptions as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,f as t,g as n,h as r,i,m as a,n as o,p as s,r as c,t as l,u,x as d}from"./resourceLimits-C1HHDwXQ.mjs";import{createCipheriv as f,createDecipheriv as p,randomBytes as m}from"node:crypto";const h=[`encrypt`,`decrypt`,`generateDataKey`];function g(e){if(!e||typeof e!=`object`)throw TypeError(`[PipeX] Invalid KMS provider`);if(e.capabilities!==void 0&&(!e.capabilities||typeof e.capabilities!=`object`))throw TypeError(`[PipeX] Invalid KMS provider capabilities`);let t={};for(let n of h){let r=e.capabilities?.[n],i=typeof e[n]==`function`;if(r!==void 0&&typeof r!=`boolean`)throw new u(n,`MUST_BE_BOOLEAN`);if(r===!0&&!i)throw new u(n,`MISSING_IMPLEMENTATION`);t[n]=r??i}return Object.freeze(t)}function _(e,t){if(!h.includes(t))throw TypeError(`[PipeX] Unknown KMS operation`);return g(e)[t]}function v(e,t){if(!_(e,t))throw new d(t)}const y=Buffer.from(`PXKM`);function b(t){let r={cause:t.reason};return t.reason instanceof Error&&t.reason.name===`TimeoutError`?new e(r):new n(r)}async function x(e,t,n){if(!t)return e;if(t.aborted)throw e.then(e=>{try{n?.(e)}catch{}},()=>void 0),b(t);return new Promise((r,i)=>{let a=!1,o=()=>{a=!0,i(b(t))};t.addEventListener(`abort`,o,{once:!0}),e.then(e=>{if(t.removeEventListener(`abort`,o),a)try{n?.(e)}catch{}else r(e)},e=>{t.removeEventListener(`abort`,o),a||i(e)})})}function S(e){let t=e.limits?.operationTimeoutMs??l.operationTimeoutMs;if(!Number.isSafeInteger(t)||t<0||t>2147483647)throw Error(`[PipeX] Invalid KMS provider timeout`);if(t===0)return{signal:e.signal,cleanup(){}};let n=new AbortController,r=setTimeout(()=>{n.abort(new DOMException(`KMS provider operation timed out`,`TimeoutError`))},t);return{signal:e.signal?AbortSignal.any([e.signal,n.signal]):n.signal,cleanup(){clearTimeout(r)}}}function C(t,i){return i instanceof n||i instanceof e?i:i instanceof s?new s(t):i instanceof r?new r(t):new a(t)}async function w(e,t,n,r,i){v(e,t);let a=S(n);try{if(a.signal?.aborted)throw b(a.signal);return await x(r(a.signal),a.signal,i)}catch(e){throw a.signal?.aborted?b(a.signal):C(t,e)}finally{a.cleanup()}}var T=class extends i{name=`kms-encryption`;version=`2.1.0`;streaming=!1;get providerCapabilities(){return g(this.options.kms)}get reversible(){return this.providerCapabilities.decrypt}constructor(e){if(super(e),this.options=e,!e||!e.kms||typeof e.keyId!=`string`||e.keyId.length===0)throw Error(`[PipeX] KMS Encryption: invalid provider or keyId`);if(e.allowLegacyDecrypt!==void 0&&typeof e.allowLegacyDecrypt!=`boolean`)throw Error(`[PipeX] KMS Encryption allowLegacyDecrypt must be a boolean`);g(e.kms),v(e.kms,`generateDataKey`)}async process(e,t){let n=o(t),r=c(t),i=t.limits?.maxKmsEncryptedKeyBytes??l.maxKmsEncryptedKeyBytes,a=t.limits?.maxKmsKeyIdBytes??l.maxKmsKeyIdBytes;if(Buffer.byteLength(this.options.keyId)>a)throw Error(`[PipeX] KMS key identifier exceeds the configured limit`);if(e.length>n)throw Error(`[PipeX] KMS encryption input exceeds ${n} bytes`);if(e.length>4294967295)throw Error(`[PipeX] KMS encryption input exceeds the format limit`);if(e.length>r-45)throw Error(`[PipeX] KMS encryption output exceeds ${r} bytes`);let{kms:s,keyId:u}=this.options,d=await w(s,`generateDataKey`,t,e=>s.generateDataKey(u,{signal:e}),e=>{Buffer.isBuffer(e?.plaintext)&&e.plaintext.fill(0)}),p=d?.plaintext;try{let t=d?.ciphertext;if(!Buffer.isBuffer(p)||p.length!==32)throw Error(`[PipeX] KMS generated an invalid data key`);if(!Buffer.isBuffer(t)||t.length<1||t.length>i)throw Error(`[PipeX] KMS generated an invalid encrypted key`);let n=28+t.length+16;if(e.length>r-n)throw Error(`[PipeX] KMS encryption output exceeds ${r} bytes`);let a=n+e.length,o=m(12),s=f(`aes-256-gcm`,p,o,{authTagLength:16}),c=Buffer.alloc(28);y.copy(c,0),c.writeUInt8(1,4),c.writeUInt8(1,5),c.writeUInt16BE(0,6),c.writeUInt32BE(t.length,8),c.writeUInt32BE(e.length,12),o.copy(c,16),s.setAAD(Buffer.concat([c,t]));let l=Buffer.concat([s.update(e),s.final()]),u=s.getAuthTag();return Buffer.concat([c,t,l,u],a)}finally{Buffer.isBuffer(p)&&p.fill(0)}}async reverse(e,n){let{kms:r,keyId:i}=this.options;v(r,`decrypt`);let a=o(n),s=c(n),u=n.limits?.maxKmsEncryptedKeyBytes??l.maxKmsEncryptedKeyBytes,d=n.limits?.maxKmsKeyIdBytes??l.maxKmsKeyIdBytes;if(Buffer.byteLength(i)>d)throw Error(`[PipeX] KMS key identifier exceeds the configured limit`);if(e.length>a)throw Error(`[PipeX] KMS decryption input exceeds ${a} bytes`);if(e.length===0)throw Error(`[PipeX] KMS Decryption: Packet too short`);let f=e.length>=y.length&&e.subarray(0,y.length).equals(y);if(!f&&e.readUInt8(0)===y.readUInt8(0))throw Error(`[PipeX] KMS Decryption: incomplete framed header`);if(!f&&this.options.allowLegacyDecrypt!==!0)throw Error(`[PipeX] KMS Decryption: legacy format disabled`);let m,h,g,_,b;if(f){if(e.length<45)throw Error(`[PipeX] KMS Decryption: incomplete framed envelope`);if(e.readUInt8(4)!==1)throw Error(`[PipeX] KMS Decryption: unsupported format version`);if(e.readUInt8(5)!==1||e.readUInt16BE(6)!==0)throw Error(`[PipeX] KMS Decryption: invalid framed envelope`);let t=e.readUInt32BE(8),n=e.readUInt32BE(12);if(t<1||t>u)throw Error(`[PipeX] KMS Decryption: invalid key envelope`);if(28+t+n+16!==e.length)throw Error(`[PipeX] KMS Decryption: invalid envelope length`);if(n>s)throw Error(`[PipeX] KMS decryption output exceeds ${s} bytes`);h=e.subarray(16,28),m=e.subarray(28,28+t),_=e.subarray(28+t,e.length-16),g=e.subarray(e.length-16),b=e.subarray(0,28+t)}else{if(e.length<4)throw Error(`[PipeX] KMS Decryption: Packet too short`);let t=e.readUInt32BE(0);if(t<1||t>u||e.length<4+t+12+16)throw Error(`[PipeX] KMS Decryption: invalid key envelope`);m=e.subarray(4,4+t),h=e.subarray(4+t,4+t+12),g=e.subarray(4+t+12,4+t+12+16),_=e.subarray(4+t+12+16)}if(_.length>s)throw Error(`[PipeX] KMS decryption output exceeds ${s} bytes`);let x=await w(r,`decrypt`,n,e=>r.decrypt(m,i,{signal:e}),e=>{Buffer.isBuffer(e)&&e.fill(0)});try{if(!Buffer.isBuffer(x)||x.length!==32)throw Error(`[PipeX] KMS Decryption: invalid data key length`);let e=p(`aes-256-gcm`,x,h,{authTagLength:16});b&&e.setAAD(b),e.setAuthTag(g);let n=e.update(_);try{let t=e.final();return t.length===0?n:Buffer.concat([n,t])}catch{throw n.fill(0),new t}}finally{Buffer.isBuffer(x)&&x.fill(0)}}};export{g as n,_ as r,T as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./core-B_z1gN5W.cjs`);const e=require(`./resourceLimits-CI0Qrqdf.cjs`);let t=require(`node:crypto`);const n=[`encrypt`,`decrypt`,`generateDataKey`];function r(t){if(!t||typeof t!=`object`)throw TypeError(`[PipeX] Invalid KMS provider`);if(t.capabilities!==void 0&&(!t.capabilities||typeof t.capabilities!=`object`))throw TypeError(`[PipeX] Invalid KMS provider capabilities`);let r={};for(let i of n){let n=t.capabilities?.[i],a=typeof t[i]==`function`;if(n!==void 0&&typeof n!=`boolean`)throw new e.u(i,`MUST_BE_BOOLEAN`);if(n===!0&&!a)throw new e.u(i,`MISSING_IMPLEMENTATION`);r[i]=n??a}return Object.freeze(r)}function i(e,t){if(!n.includes(t))throw TypeError(`[PipeX] Unknown KMS operation`);return r(e)[t]}function a(t,n){if(!i(t,n))throw new e.x(n)}const o=Buffer.from(`PXKM`);function s(t){let n={cause:t.reason};return t.reason instanceof Error&&t.reason.name===`TimeoutError`?new e._(n):new e.g(n)}async function c(e,t,n){if(!t)return e;if(t.aborted)throw e.then(e=>{try{n?.(e)}catch{}},()=>void 0),s(t);return new Promise((r,i)=>{let a=!1,o=()=>{a=!0,i(s(t))};t.addEventListener(`abort`,o,{once:!0}),e.then(e=>{if(t.removeEventListener(`abort`,o),a)try{n?.(e)}catch{}else r(e)},e=>{t.removeEventListener(`abort`,o),a||i(e)})})}function l(t){let n=t.limits?.operationTimeoutMs??e.t.operationTimeoutMs;if(!Number.isSafeInteger(n)||n<0||n>2147483647)throw Error(`[PipeX] Invalid KMS provider timeout`);if(n===0)return{signal:t.signal,cleanup(){}};let r=new AbortController,i=setTimeout(()=>{r.abort(new DOMException(`KMS provider operation timed out`,`TimeoutError`))},n);return{signal:t.signal?AbortSignal.any([t.signal,r.signal]):r.signal,cleanup(){clearTimeout(i)}}}function u(t,n){return n instanceof e.g||n instanceof e._?n:n instanceof e.p?new e.p(t):n instanceof e.h?new e.h(t):new e.m(t)}async function d(e,t,n,r,i){a(e,t);let o=l(n);try{if(o.signal?.aborted)throw s(o.signal);return await c(r(o.signal),o.signal,i)}catch(e){throw o.signal?.aborted?s(o.signal):u(t,e)}finally{o.cleanup()}}var f=class extends e.i{name=`kms-encryption`;version=`2.1.0`;streaming=!1;get providerCapabilities(){return r(this.options.kms)}get reversible(){return this.providerCapabilities.decrypt}constructor(e){if(super(e),this.options=e,!e||!e.kms||typeof e.keyId!=`string`||e.keyId.length===0)throw Error(`[PipeX] KMS Encryption: invalid provider or keyId`);if(e.allowLegacyDecrypt!==void 0&&typeof e.allowLegacyDecrypt!=`boolean`)throw Error(`[PipeX] KMS Encryption allowLegacyDecrypt must be a boolean`);r(e.kms),a(e.kms,`generateDataKey`)}async process(n,r){let i=e.n(r),a=e.r(r),s=r.limits?.maxKmsEncryptedKeyBytes??e.t.maxKmsEncryptedKeyBytes,c=r.limits?.maxKmsKeyIdBytes??e.t.maxKmsKeyIdBytes;if(Buffer.byteLength(this.options.keyId)>c)throw Error(`[PipeX] KMS key identifier exceeds the configured limit`);if(n.length>i)throw Error(`[PipeX] KMS encryption input exceeds ${i} bytes`);if(n.length>4294967295)throw Error(`[PipeX] KMS encryption input exceeds the format limit`);if(n.length>a-45)throw Error(`[PipeX] KMS encryption output exceeds ${a} bytes`);let{kms:l,keyId:u}=this.options,f=await d(l,`generateDataKey`,r,e=>l.generateDataKey(u,{signal:e}),e=>{Buffer.isBuffer(e?.plaintext)&&e.plaintext.fill(0)}),p=f?.plaintext;try{let e=f?.ciphertext;if(!Buffer.isBuffer(p)||p.length!==32)throw Error(`[PipeX] KMS generated an invalid data key`);if(!Buffer.isBuffer(e)||e.length<1||e.length>s)throw Error(`[PipeX] KMS generated an invalid encrypted key`);let r=28+e.length+16;if(n.length>a-r)throw Error(`[PipeX] KMS encryption output exceeds ${a} bytes`);let i=r+n.length,c=(0,t.randomBytes)(12),l=(0,t.createCipheriv)(`aes-256-gcm`,p,c,{authTagLength:16}),u=Buffer.alloc(28);o.copy(u,0),u.writeUInt8(1,4),u.writeUInt8(1,5),u.writeUInt16BE(0,6),u.writeUInt32BE(e.length,8),u.writeUInt32BE(n.length,12),c.copy(u,16),l.setAAD(Buffer.concat([u,e]));let d=Buffer.concat([l.update(n),l.final()]),m=l.getAuthTag();return Buffer.concat([u,e,d,m],i)}finally{Buffer.isBuffer(p)&&p.fill(0)}}async reverse(n,r){let{kms:i,keyId:s}=this.options;a(i,`decrypt`);let c=e.n(r),l=e.r(r),u=r.limits?.maxKmsEncryptedKeyBytes??e.t.maxKmsEncryptedKeyBytes,f=r.limits?.maxKmsKeyIdBytes??e.t.maxKmsKeyIdBytes;if(Buffer.byteLength(s)>f)throw Error(`[PipeX] KMS key identifier exceeds the configured limit`);if(n.length>c)throw Error(`[PipeX] KMS decryption input exceeds ${c} bytes`);if(n.length===0)throw Error(`[PipeX] KMS Decryption: Packet too short`);let p=n.length>=o.length&&n.subarray(0,o.length).equals(o);if(!p&&n.readUInt8(0)===o.readUInt8(0))throw Error(`[PipeX] KMS Decryption: incomplete framed header`);if(!p&&this.options.allowLegacyDecrypt!==!0)throw Error(`[PipeX] KMS Decryption: legacy format disabled`);let m,h,g,_,v;if(p){if(n.length<45)throw Error(`[PipeX] KMS Decryption: incomplete framed envelope`);if(n.readUInt8(4)!==1)throw Error(`[PipeX] KMS Decryption: unsupported format version`);if(n.readUInt8(5)!==1||n.readUInt16BE(6)!==0)throw Error(`[PipeX] KMS Decryption: invalid framed envelope`);let e=n.readUInt32BE(8),t=n.readUInt32BE(12);if(e<1||e>u)throw Error(`[PipeX] KMS Decryption: invalid key envelope`);if(28+e+t+16!==n.length)throw Error(`[PipeX] KMS Decryption: invalid envelope length`);if(t>l)throw Error(`[PipeX] KMS decryption output exceeds ${l} bytes`);h=n.subarray(16,28),m=n.subarray(28,28+e),_=n.subarray(28+e,n.length-16),g=n.subarray(n.length-16),v=n.subarray(0,28+e)}else{if(n.length<4)throw Error(`[PipeX] KMS Decryption: Packet too short`);let e=n.readUInt32BE(0);if(e<1||e>u||n.length<4+e+12+16)throw Error(`[PipeX] KMS Decryption: invalid key envelope`);m=n.subarray(4,4+e),h=n.subarray(4+e,4+e+12),g=n.subarray(4+e+12,4+e+12+16),_=n.subarray(4+e+12+16)}if(_.length>l)throw Error(`[PipeX] KMS decryption output exceeds ${l} bytes`);let y=await d(i,`decrypt`,r,e=>i.decrypt(m,s,{signal:e}),e=>{Buffer.isBuffer(e)&&e.fill(0)});try{if(!Buffer.isBuffer(y)||y.length!==32)throw Error(`[PipeX] KMS Decryption: invalid data key length`);let n=(0,t.createDecipheriv)(`aes-256-gcm`,y,h,{authTagLength:16});v&&n.setAAD(v),n.setAuthTag(g);let r=n.update(_);try{let e=n.final();return e.length===0?r:Buffer.concat([r,e])}catch{throw r.fill(0),new e.f}}finally{Buffer.isBuffer(y)&&y.fill(0)}}};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
package/dist/native.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./dataEngine-Bvl6amzP.cjs`);exports.DataEngine=e.t;
|
package/dist/native.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./dataEngine-4m6GTOLe.mjs";export{e as DataEngine};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./worker-I_kqxWeK.cjs`);exports.WorkerPoolPlugin=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./worker-c0_VZ9c7.mjs";export{e as WorkerPoolPlugin};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { _ as ProcessorContext, b as RetryOptions, v as ProcessorPlugin } from "./types-ia4x-Dvp.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/core/plugin.d.ts
|
|
4
|
+
declare abstract class BasePlugin implements ProcessorPlugin {
|
|
5
|
+
protected options: object;
|
|
6
|
+
abstract readonly name: string;
|
|
7
|
+
abstract readonly version: string;
|
|
8
|
+
retryOptions?: RetryOptions;
|
|
9
|
+
get reversible(): boolean;
|
|
10
|
+
constructor(options?: object);
|
|
11
|
+
abstract process(data: Buffer, context: ProcessorContext): Promise<Buffer> | Buffer;
|
|
12
|
+
/** Unsupported by default. Subclasses must implement reverse explicitly. */
|
|
13
|
+
reverse(_data: Buffer, _context: ProcessorContext): Promise<Buffer> | Buffer;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BasePlugin as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { _ as ProcessorContext, b as RetryOptions, v as ProcessorPlugin } from "./types-Bytga6zd.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/core/plugin.d.ts
|
|
4
|
+
declare abstract class BasePlugin implements ProcessorPlugin {
|
|
5
|
+
protected options: object;
|
|
6
|
+
abstract readonly name: string;
|
|
7
|
+
abstract readonly version: string;
|
|
8
|
+
retryOptions?: RetryOptions;
|
|
9
|
+
get reversible(): boolean;
|
|
10
|
+
constructor(options?: object);
|
|
11
|
+
abstract process(data: Buffer, context: ProcessorContext): Promise<Buffer> | Buffer;
|
|
12
|
+
/** Unsupported by default. Subclasses must implement reverse explicitly. */
|
|
13
|
+
reverse(_data: Buffer, _context: ProcessorContext): Promise<Buffer> | Buffer;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BasePlugin as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class extends Error{name=`PipeXError`;transformName;stage;constructor(e,t,n){super(t,n),this.code=e,this.transformName=n?.transformName,this.stage=n?.stage}},t=class extends e{name=`ValidationError`;constructor(e){super(`VALIDATION_FAILED`,`[PipeX] Validation failed`,e)}},n=class extends e{name=`CompressionError`;constructor(e){super(`COMPRESSION_FAILED`,`[PipeX] Compression failed`,e)}},r=class extends e{name=`HashingError`;constructor(e){super(`HASHING_FAILED`,`[PipeX] Hashing failed`,e)}},i=class extends e{name=`UnsupportedAlgorithmError`;constructor(e){super(`UNSUPPORTED_ALGORITHM`,`[PipeX] Unsupported algorithm`,e)}},a=class extends e{name=`PipelineAbortedError`;constructor(e){super(`OPERATION_ABORTED`,`[PipeX] Operation aborted`,e)}},o=class extends e{name=`UnsupportedReverseError`;constructor(e){super(`UNSUPPORTED_REVERSE`,`[PipeX] Plugin ${e} does not support reverse operations`),this.plugin=e}},s=class extends e{name=`UnsupportedStreamingError`;constructor(e){super(`UNSUPPORTED_STREAMING`,`[PipeX] Plugin ${e} does not support stream operations`),this.plugin=e}},c=class extends e{name=`InvalidPluginCapabilityError`;constructor(e,t,n){super(`INVALID_PLUGIN_CAPABILITY`,`[PipeX] Plugin ${e} has an invalid ${t} capability: ${n===`MUST_BE_BOOLEAN`?`must be a boolean when declared`:n===`MISSING_IMPLEMENTATION`?`is declared but its implementation is missing`:`is disabled but its implementation is present`}`),this.plugin=e,this.capability=t,this.issue=n}},l=class extends a{name=`OperationAbortedError`;constructor(e){super(e)}},u=class extends e{name=`OperationTimeoutError`;constructor(e){super(`OPERATION_TIMEOUT`,`[PipeX] Operation timed out`,e)}},d=class extends e{name=`KmsProviderError`;constructor(e,t){super(`KMS_PROVIDER_FAILURE`,`[PipeX] KMS ${e} failed`,t),this.operation=e}},f=class extends e{name=`KmsAuthenticationError`;constructor(){super(`KMS_AUTHENTICATION_FAILED`,`[PipeX] KMS envelope authentication failed`)}},p=class extends e{name=`KmsProviderAuthenticationError`;constructor(e){super(`KMS_PROVIDER_AUTHENTICATION_FAILED`,`[PipeX] KMS ${e} authentication failed`),this.operation=e}},m=class extends e{name=`KmsProviderUnavailableError`;constructor(e){super(`KMS_PROVIDER_UNAVAILABLE`,`[PipeX] KMS ${e} provider unavailable`),this.operation=e}},h=class extends e{name=`UnsupportedKmsOperationError`;constructor(e){super(`UNSUPPORTED_KMS_OPERATION`,`[PipeX] KMS provider does not support ${e}`),this.operation=e}},g=class extends e{name=`InvalidKmsProviderCapabilityError`;constructor(e,t){super(`INVALID_KMS_PROVIDER_CAPABILITY`,`[PipeX] Invalid KMS ${e} capability: ${t===`MUST_BE_BOOLEAN`?`must be a boolean when declared`:`is declared but its implementation is missing`}`),this.operation=e,this.issue=t}},_=class extends e{name=`WorkerPoolClosedError`;constructor(){super(`WORKER_POOL_CLOSED`,`[PipeX] Worker pool is closed`)}},v=class extends e{name=`WorkerQueueFullError`;constructor(e){super(`WORKER_QUEUE_FULL`,`[PipeX] Worker queue is full (maximum ${e} waiting tasks)`),this.maxQueue=e}},y=class extends e{name=`WorkerPoolCloseError`;constructor(e){super(`WORKER_POOL_CLOSE_FAILURE`,`[PipeX] Worker pool failed to close cleanly`,e)}},b=class extends e{name=`WorkerTaskError`;constructor(e,t){super(`WORKER_TASK_FAILURE`,`[PipeX] Worker task ${e} failed`,t),this.taskName=e}},x=class extends e{name=`EncryptionError`;constructor(e=`[PipeX] Encryption operation failed`){super(`ENCRYPTION_ERROR`,e)}},S=class extends e{name=`InvalidKeyError`;constructor(){super(`INVALID_ENCRYPTION_KEY`,`[PipeX] Encryption key must be a 32-byte Buffer`)}},C=class extends e{name=`AuthenticationError`;constructor(){super(`ENCRYPTION_AUTHENTICATION_FAILED`,`[PipeX] Encrypted data authentication failed`)}},w=class e{retryOptions;get reversible(){return this.reverse!==e.prototype.reverse}constructor(e={}){this.options=e}reverse(e,t){throw new o(`${this.name}@${this.version}`)}};const T=Object.freeze({maxInputBytes:64*1024*1024,maxOutputBytes:256*1024*1024,maxFrameBytes:8*1024*1024,maxFrames:1e5,maxConcurrentOperations:32,operationTimeoutMs:5*6e4,maxRetryAttempts:5,maxRetryDelayMs:3e4,maxKmsEncryptedKeyBytes:64*1024,maxKmsKeyIdBytes:512});function E(e){let t=e?.limits??T;return Math.max(t.maxInputBytes,t.maxOutputBytes)}function D(e){return e?.limits?.maxOutputBytes??T.maxOutputBytes}export{s as C,v as D,_ as E,b as O,o as S,y as T,u as _,C as a,i as b,r as c,c as d,f,l as g,m as h,w as i,S as l,d as m,E as n,n as o,p,D as r,x as s,T as t,g as u,e as v,t as w,h as x,a as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class extends Error{name=`PipeXError`;transformName;stage;constructor(e,t,n){super(t,n),this.code=e,this.transformName=n?.transformName,this.stage=n?.stage}},t=class extends e{name=`ValidationError`;constructor(e){super(`VALIDATION_FAILED`,`[PipeX] Validation failed`,e)}},n=class extends e{name=`CompressionError`;constructor(e){super(`COMPRESSION_FAILED`,`[PipeX] Compression failed`,e)}},r=class extends e{name=`HashingError`;constructor(e){super(`HASHING_FAILED`,`[PipeX] Hashing failed`,e)}},i=class extends e{name=`UnsupportedAlgorithmError`;constructor(e){super(`UNSUPPORTED_ALGORITHM`,`[PipeX] Unsupported algorithm`,e)}},a=class extends e{name=`PipelineAbortedError`;constructor(e){super(`OPERATION_ABORTED`,`[PipeX] Operation aborted`,e)}},o=class extends e{name=`UnsupportedReverseError`;constructor(e){super(`UNSUPPORTED_REVERSE`,`[PipeX] Plugin ${e} does not support reverse operations`),this.plugin=e}},s=class extends e{name=`UnsupportedStreamingError`;constructor(e){super(`UNSUPPORTED_STREAMING`,`[PipeX] Plugin ${e} does not support stream operations`),this.plugin=e}},c=class extends e{name=`InvalidPluginCapabilityError`;constructor(e,t,n){super(`INVALID_PLUGIN_CAPABILITY`,`[PipeX] Plugin ${e} has an invalid ${t} capability: ${n===`MUST_BE_BOOLEAN`?`must be a boolean when declared`:n===`MISSING_IMPLEMENTATION`?`is declared but its implementation is missing`:`is disabled but its implementation is present`}`),this.plugin=e,this.capability=t,this.issue=n}},l=class extends a{name=`OperationAbortedError`;constructor(e){super(e)}},u=class extends e{name=`OperationTimeoutError`;constructor(e){super(`OPERATION_TIMEOUT`,`[PipeX] Operation timed out`,e)}},d=class extends e{name=`KmsProviderError`;constructor(e,t){super(`KMS_PROVIDER_FAILURE`,`[PipeX] KMS ${e} failed`,t),this.operation=e}},f=class extends e{name=`KmsAuthenticationError`;constructor(){super(`KMS_AUTHENTICATION_FAILED`,`[PipeX] KMS envelope authentication failed`)}},p=class extends e{name=`KmsProviderAuthenticationError`;constructor(e){super(`KMS_PROVIDER_AUTHENTICATION_FAILED`,`[PipeX] KMS ${e} authentication failed`),this.operation=e}},m=class extends e{name=`KmsProviderUnavailableError`;constructor(e){super(`KMS_PROVIDER_UNAVAILABLE`,`[PipeX] KMS ${e} provider unavailable`),this.operation=e}},h=class extends e{name=`UnsupportedKmsOperationError`;constructor(e){super(`UNSUPPORTED_KMS_OPERATION`,`[PipeX] KMS provider does not support ${e}`),this.operation=e}},g=class extends e{name=`InvalidKmsProviderCapabilityError`;constructor(e,t){super(`INVALID_KMS_PROVIDER_CAPABILITY`,`[PipeX] Invalid KMS ${e} capability: ${t===`MUST_BE_BOOLEAN`?`must be a boolean when declared`:`is declared but its implementation is missing`}`),this.operation=e,this.issue=t}},_=class extends e{name=`WorkerPoolClosedError`;constructor(){super(`WORKER_POOL_CLOSED`,`[PipeX] Worker pool is closed`)}},v=class extends e{name=`WorkerQueueFullError`;constructor(e){super(`WORKER_QUEUE_FULL`,`[PipeX] Worker queue is full (maximum ${e} waiting tasks)`),this.maxQueue=e}},y=class extends e{name=`WorkerPoolCloseError`;constructor(e){super(`WORKER_POOL_CLOSE_FAILURE`,`[PipeX] Worker pool failed to close cleanly`,e)}},b=class extends e{name=`WorkerTaskError`;constructor(e,t){super(`WORKER_TASK_FAILURE`,`[PipeX] Worker task ${e} failed`,t),this.taskName=e}},x=class extends e{name=`EncryptionError`;constructor(e=`[PipeX] Encryption operation failed`){super(`ENCRYPTION_ERROR`,e)}},S=class extends e{name=`InvalidKeyError`;constructor(){super(`INVALID_ENCRYPTION_KEY`,`[PipeX] Encryption key must be a 32-byte Buffer`)}},C=class extends e{name=`AuthenticationError`;constructor(){super(`ENCRYPTION_AUTHENTICATION_FAILED`,`[PipeX] Encrypted data authentication failed`)}},w=class e{retryOptions;get reversible(){return this.reverse!==e.prototype.reverse}constructor(e={}){this.options=e}reverse(e,t){throw new o(`${this.name}@${this.version}`)}};const T=Object.freeze({maxInputBytes:64*1024*1024,maxOutputBytes:256*1024*1024,maxFrameBytes:8*1024*1024,maxFrames:1e5,maxConcurrentOperations:32,operationTimeoutMs:5*6e4,maxRetryAttempts:5,maxRetryDelayMs:3e4,maxKmsEncryptedKeyBytes:64*1024,maxKmsKeyIdBytes:512});function E(e){let t=e?.limits??T;return Math.max(t.maxInputBytes,t.maxOutputBytes)}function D(e){return e?.limits?.maxOutputBytes??T.maxOutputBytes}Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return a}});
|