@snyxex/pipex 1.0.2 → 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/LICENSE +1 -1
- package/README.md +238 -139
- 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 +87 -550
- package/dist/index.mjs +1 -3
- 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 +120 -23
- package/SECURITY.md +0 -41
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/docs/architecture.md +0 -124
- package/docs/encryption-v4-migration.md +0 -45
- package/docs/enterprise.md +0 -280
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Duplex, Writable } from "node:stream";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/core/types.d.ts
|
|
5
|
+
interface Logger {
|
|
6
|
+
info(message: string, context?: Record<string, unknown>): void;
|
|
7
|
+
warn(message: string, context?: Record<string, unknown>): void;
|
|
8
|
+
error(message: string, context?: Record<string, unknown>): void;
|
|
9
|
+
debug(message: string, context?: Record<string, unknown>): void;
|
|
10
|
+
}
|
|
11
|
+
interface Span {
|
|
12
|
+
setAttribute(key: string, value: unknown): this;
|
|
13
|
+
addEvent(name: string, attributes?: Record<string, unknown>): this;
|
|
14
|
+
end(): void;
|
|
15
|
+
}
|
|
16
|
+
interface Tracer {
|
|
17
|
+
startSpan(name: string, context?: ProcessorContext): Span;
|
|
18
|
+
}
|
|
19
|
+
interface RetryOptions {
|
|
20
|
+
attempts: number;
|
|
21
|
+
backoff: 'exponential' | 'fixed';
|
|
22
|
+
delayMs: number;
|
|
23
|
+
}
|
|
24
|
+
interface EngineLimits {
|
|
25
|
+
maxInputBytes: number;
|
|
26
|
+
maxOutputBytes: number;
|
|
27
|
+
maxFrameBytes: number;
|
|
28
|
+
maxFrames: number;
|
|
29
|
+
maxConcurrentOperations: number;
|
|
30
|
+
operationTimeoutMs: number;
|
|
31
|
+
maxRetryAttempts: number;
|
|
32
|
+
maxRetryDelayMs: number;
|
|
33
|
+
/** Maximum provider-wrapped data-key bytes accepted in a KMS envelope. */
|
|
34
|
+
maxKmsEncryptedKeyBytes: number;
|
|
35
|
+
/** Maximum UTF-8 bytes accepted for a provider key identifier. */
|
|
36
|
+
maxKmsKeyIdBytes: number;
|
|
37
|
+
}
|
|
38
|
+
interface OperationOptions {
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
timeoutMs?: number;
|
|
41
|
+
}
|
|
42
|
+
/** expectedType must come from trusted application configuration, never the received result. */
|
|
43
|
+
interface BinaryUndoOptions extends OperationOptions {
|
|
44
|
+
expectedType?: string;
|
|
45
|
+
}
|
|
46
|
+
interface StreamPluginContext {
|
|
47
|
+
/** Engine-owned accounting for work that continues after cancellation. */
|
|
48
|
+
readonly track?: (pending: Promise<unknown>) => void;
|
|
49
|
+
readonly requestId: string;
|
|
50
|
+
readonly signal: AbortSignal;
|
|
51
|
+
readonly limits: Readonly<EngineLimits>;
|
|
52
|
+
readonly logger?: Logger;
|
|
53
|
+
readonly tracer?: Tracer;
|
|
54
|
+
}
|
|
55
|
+
interface AuditRecord {
|
|
56
|
+
requestId: string;
|
|
57
|
+
operation: 'pack' | 'unpack' | 'process' | 'reverse';
|
|
58
|
+
pluginChain: string[];
|
|
59
|
+
timestamp: number;
|
|
60
|
+
metadata: Record<string, unknown>;
|
|
61
|
+
}
|
|
62
|
+
interface AuditLogger {
|
|
63
|
+
log(record: AuditRecord): void | Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
type KmsOperation = 'encrypt' | 'decrypt' | 'generateDataKey';
|
|
66
|
+
interface KmsProviderCapabilities {
|
|
67
|
+
readonly encrypt: boolean;
|
|
68
|
+
readonly decrypt: boolean;
|
|
69
|
+
readonly generateDataKey: boolean;
|
|
70
|
+
}
|
|
71
|
+
interface KmsProvider {
|
|
72
|
+
/** Explicit false disables an operation even when a compatibility stub exists. */
|
|
73
|
+
readonly capabilities?: Partial<KmsProviderCapabilities>;
|
|
74
|
+
encrypt?(data: Buffer, keyId: string, options?: KmsRequestOptions): Promise<Buffer>;
|
|
75
|
+
decrypt?(data: Buffer, keyId: string, options?: KmsRequestOptions): Promise<Buffer>;
|
|
76
|
+
generateDataKey?(keyId: string, options?: KmsRequestOptions): Promise<{
|
|
77
|
+
plaintext: Buffer;
|
|
78
|
+
ciphertext: Buffer;
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
81
|
+
interface KmsRequestOptions {
|
|
82
|
+
signal?: AbortSignal;
|
|
83
|
+
}
|
|
84
|
+
interface SchemaRegistry {
|
|
85
|
+
getSchema(subject: string, version?: number): Promise<z.ZodType<any>>;
|
|
86
|
+
}
|
|
87
|
+
interface EngineConfig {
|
|
88
|
+
plugins?: {
|
|
89
|
+
name: string;
|
|
90
|
+
options?: unknown;
|
|
91
|
+
}[];
|
|
92
|
+
limits?: Partial<EngineLimits>;
|
|
93
|
+
logger?: Logger;
|
|
94
|
+
tracer?: Tracer;
|
|
95
|
+
auditLogger?: AuditLogger;
|
|
96
|
+
/** Optional caller-owned failure sink; `dlq` is retained for compatibility. */
|
|
97
|
+
dlq?: Writable;
|
|
98
|
+
schema?: z.ZodType<any>;
|
|
99
|
+
schemaRegistry?: SchemaRegistry;
|
|
100
|
+
}
|
|
101
|
+
interface ProcessorContext {
|
|
102
|
+
readonly requestId: string;
|
|
103
|
+
readonly timestamp: number;
|
|
104
|
+
readonly signal?: AbortSignal;
|
|
105
|
+
readonly limits?: Readonly<EngineLimits>;
|
|
106
|
+
metadata: Record<string, unknown>;
|
|
107
|
+
logger?: Logger;
|
|
108
|
+
span?: Span;
|
|
109
|
+
}
|
|
110
|
+
interface ProcessorPlugin {
|
|
111
|
+
readonly name: string;
|
|
112
|
+
readonly version: string;
|
|
113
|
+
readonly reversible?: boolean;
|
|
114
|
+
readonly streaming?: boolean;
|
|
115
|
+
process(data: Buffer, ctx: ProcessorContext): Promise<Buffer> | Buffer;
|
|
116
|
+
reverse?(data: Buffer, ctx: ProcessorContext): Promise<Buffer> | Buffer;
|
|
117
|
+
createStream?(mode: 'compress' | 'decompress', context?: StreamPluginContext): Duplex;
|
|
118
|
+
retryOptions?: RetryOptions;
|
|
119
|
+
}
|
|
120
|
+
type PluginOperation = 'process' | 'reverse' | 'stream';
|
|
121
|
+
/** Normalized, runtime-validated operations exposed by a plugin. */
|
|
122
|
+
interface PluginCapabilities {
|
|
123
|
+
readonly process: true;
|
|
124
|
+
readonly reverse: boolean;
|
|
125
|
+
readonly streaming: boolean;
|
|
126
|
+
readonly streamMode: 'native' | 'fallback' | 'none';
|
|
127
|
+
}
|
|
128
|
+
/** Capability view for a plugin registered with a DataEngine. */
|
|
129
|
+
interface RegisteredPluginCapabilities extends PluginCapabilities {
|
|
130
|
+
readonly plugin: string;
|
|
131
|
+
}
|
|
132
|
+
interface EngineResult {
|
|
133
|
+
readonly data: Buffer;
|
|
134
|
+
readonly originalType: string;
|
|
135
|
+
readonly pipeline: string[];
|
|
136
|
+
readonly metrics: {
|
|
137
|
+
durationMs: number;
|
|
138
|
+
steps: Record<string, number>;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
interface PipeXManifest {
|
|
142
|
+
readonly __pipex_v: 1;
|
|
143
|
+
readonly plugins: string[];
|
|
144
|
+
readonly ts: number;
|
|
145
|
+
}
|
|
146
|
+
declare function isManifest(value: unknown): value is PipeXManifest;
|
|
147
|
+
interface EngineEvents {
|
|
148
|
+
start: [requestId: string];
|
|
149
|
+
'plugin:after': [name: string, durationMs: number];
|
|
150
|
+
progress: [bytes: number, requestId: string];
|
|
151
|
+
error: [err: Error, requestId: string];
|
|
152
|
+
end: [requestId: string, durationMs: number];
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
export { StreamPluginContext as C, Span as S, isManifest as T, ProcessorContext as _, EngineEvents as a, RetryOptions as b, KmsOperation as c, KmsRequestOptions as d, Logger as f, PluginOperation as g, PluginCapabilities as h, EngineConfig as i, KmsProvider as l, PipeXManifest as m, AuditRecord as n, EngineLimits as o, OperationOptions as p, BinaryUndoOptions as r, EngineResult as s, AuditLogger as t, KmsProviderCapabilities as u, ProcessorPlugin as v, Tracer as w, SchemaRegistry as x, RegisteredPluginCapabilities as y };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { C as StreamPluginContext, _ as ProcessorContext } from "./types-ia4x-Dvp.cjs";
|
|
2
|
+
import { t as BasePlugin } from "./plugin-C9Kd9coY.cjs";
|
|
3
|
+
import { Transform } from "node:stream";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
6
|
+
//#region src/core/validation.d.ts
|
|
7
|
+
interface ValidationOptions {
|
|
8
|
+
schema: z.ZodType<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to validate during the reverse (decompress) phase.
|
|
11
|
+
* Useful if you want to ensure the restored data still matches the schema.
|
|
12
|
+
*/
|
|
13
|
+
validateOnReverse?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* ValidationPlugin — Core plugin for schema-based data validation.
|
|
17
|
+
* Uses Zod to verify the structure of the data passing through the engine.
|
|
18
|
+
*
|
|
19
|
+
* Note: This plugin assumes the data is MsgPack-encoded (default PipeX behavior).
|
|
20
|
+
*/
|
|
21
|
+
declare class ValidationPlugin extends BasePlugin {
|
|
22
|
+
protected options: ValidationOptions;
|
|
23
|
+
readonly name = "validation";
|
|
24
|
+
readonly version = "1.0.0";
|
|
25
|
+
constructor(options: ValidationOptions);
|
|
26
|
+
process(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
27
|
+
reverse(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
28
|
+
private validate;
|
|
29
|
+
createStream(mode?: 'compress' | 'decompress', context?: StreamPluginContext): Transform;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { ValidationPlugin as n, ValidationOptions as t };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { C as StreamPluginContext, _ as ProcessorContext } from "./types-Bytga6zd.mjs";
|
|
2
|
+
import { t as BasePlugin } from "./plugin-CE94-p8P.mjs";
|
|
3
|
+
import { Transform } from "node:stream";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
6
|
+
//#region src/core/validation.d.ts
|
|
7
|
+
interface ValidationOptions {
|
|
8
|
+
schema: z.ZodType<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to validate during the reverse (decompress) phase.
|
|
11
|
+
* Useful if you want to ensure the restored data still matches the schema.
|
|
12
|
+
*/
|
|
13
|
+
validateOnReverse?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* ValidationPlugin — Core plugin for schema-based data validation.
|
|
17
|
+
* Uses Zod to verify the structure of the data passing through the engine.
|
|
18
|
+
*
|
|
19
|
+
* Note: This plugin assumes the data is MsgPack-encoded (default PipeX behavior).
|
|
20
|
+
*/
|
|
21
|
+
declare class ValidationPlugin extends BasePlugin {
|
|
22
|
+
protected options: ValidationOptions;
|
|
23
|
+
readonly name = "validation";
|
|
24
|
+
readonly version = "1.0.0";
|
|
25
|
+
constructor(options: ValidationOptions);
|
|
26
|
+
process(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
27
|
+
reverse(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
28
|
+
private validate;
|
|
29
|
+
createStream(mode?: 'compress' | 'decompress', context?: StreamPluginContext): Transform;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { ValidationPlugin as n, ValidationOptions as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{V as e,s as t}from"./core-BOdvxKBq.mjs";import{i as n,n as r,r as i,t as a,w as o}from"./resourceLimits-C1HHDwXQ.mjs";import{Transform as s}from"node:stream";import"zod";var c=class extends n{name=`validation`;version=`1.0.0`;constructor(e){super(e),this.options=e}async process(e,t){return this.validate(e,Math.min(r(t),i(t)),t.limits?.maxFrameBytes),e}async reverse(e,t){let n=Math.min(r(t),i(t));if(e.length>n)throw new o({transformName:`validation`});return this.options.validateOnReverse&&this.validate(e,n,t.limits?.maxFrameBytes),e}validate(n,r,i=a.maxFrameBytes){if(n.length>r)throw new o({transformName:`validation`});e(n,i,1);let s;try{s=t.unpack(n)}catch{throw new o({transformName:`validation`})}if(!this.options.schema.safeParse(s).success)throw new o({transformName:`validation`})}createStream(e=`compress`,t){let n=[],a=0,c=Math.min(r(t),i(t));return new s({transform(e,t,r){if(e.length>c-a)return r(new o({transformName:`validation`}));a+=e.length,n.push(e),r()},flush:r=>{try{let i=Buffer.concat(n,a);(e!==`decompress`||this.options.validateOnReverse)&&this.validate(i,c,t?.limits?.maxFrameBytes),r(null,i)}catch(e){r(e)}}})}};export{c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./core-B_z1gN5W.cjs`),t=require(`./resourceLimits-CI0Qrqdf.cjs`);let n=require(`node:stream`);require(`zod`);var r=class extends t.i{name=`validation`;version=`1.0.0`;constructor(e){super(e),this.options=e}async process(e,n){return this.validate(e,Math.min(t.n(n),t.r(n)),n.limits?.maxFrameBytes),e}async reverse(e,n){let r=Math.min(t.n(n),t.r(n));if(e.length>r)throw new t.w({transformName:`validation`});return this.options.validateOnReverse&&this.validate(e,r,n.limits?.maxFrameBytes),e}validate(n,r,i=t.t.maxFrameBytes){if(n.length>r)throw new t.w({transformName:`validation`});e.V(n,i,1);let a;try{a=e.s.unpack(n)}catch{throw new t.w({transformName:`validation`})}if(!this.options.schema.safeParse(a).success)throw new t.w({transformName:`validation`})}createStream(e=`compress`,r){let i=[],a=0,o=Math.min(t.n(r),t.r(r));return new n.Transform({transform(e,n,r){if(e.length>o-a)return r(new t.w({transformName:`validation`}));a+=e.length,i.push(e),r()},flush:t=>{try{let n=Buffer.concat(i,a);(e!==`decompress`||this.options.validateOnReverse)&&this.validate(n,o,r?.limits?.maxFrameBytes),t(null,n)}catch(e){t(e)}}})}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./validation-pEeJmCad.cjs`);exports.ValidationPlugin=e.t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./validation-P5WRSAUK.mjs";export{e as ValidationPlugin};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { C as StreamPluginContext, _ as ProcessorContext } from "./types-ia4x-Dvp.cjs";
|
|
2
|
+
import { t as BasePlugin } from "./plugin-C9Kd9coY.cjs";
|
|
3
|
+
import { Transform } from "node:stream";
|
|
4
|
+
|
|
5
|
+
//#region src/plugin/worker.d.ts
|
|
6
|
+
interface WorkerPoolOptions {
|
|
7
|
+
/** Absolute path or file URL to a caller-owned ESM/CJS worker module. */
|
|
8
|
+
filename: string | URL;
|
|
9
|
+
/** Export used for forward processing. Omit to use the worker's default export. */
|
|
10
|
+
processName?: string;
|
|
11
|
+
/** Export used for reverse processing. When omitted, reverse is unsupported. */
|
|
12
|
+
reverseName?: string;
|
|
13
|
+
maxThreads?: number;
|
|
14
|
+
/** Maximum queued tasks. Defaults to 64. */
|
|
15
|
+
maxQueue?: number;
|
|
16
|
+
/** Per-task timeout in milliseconds. Zero disables the plugin-level timeout. */
|
|
17
|
+
taskTimeoutMs?: number;
|
|
18
|
+
/** Grace period used by Piscina when closing the pool. Defaults to 30 seconds. */
|
|
19
|
+
closeTimeoutMs?: number;
|
|
20
|
+
}
|
|
21
|
+
/** Runs caller-owned CPU transforms in a bounded, persistent Piscina pool. */
|
|
22
|
+
declare class WorkerPoolPlugin extends BasePlugin {
|
|
23
|
+
#private;
|
|
24
|
+
readonly name = "worker-pool";
|
|
25
|
+
readonly version = "5.0.0";
|
|
26
|
+
constructor(options: WorkerPoolOptions);
|
|
27
|
+
get reversible(): boolean;
|
|
28
|
+
process(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
29
|
+
reverse(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
30
|
+
createStream(mode: 'compress' | 'decompress', context?: StreamPluginContext): Transform;
|
|
31
|
+
/** Rejects new tasks and waits for queued/running work unless force is true. */
|
|
32
|
+
close(options?: {
|
|
33
|
+
force?: boolean;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { WorkerPoolPlugin as n, WorkerPoolOptions as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { C as StreamPluginContext, _ as ProcessorContext } from "./types-Bytga6zd.mjs";
|
|
2
|
+
import { t as BasePlugin } from "./plugin-CE94-p8P.mjs";
|
|
3
|
+
import { Transform } from "node:stream";
|
|
4
|
+
|
|
5
|
+
//#region src/plugin/worker.d.ts
|
|
6
|
+
interface WorkerPoolOptions {
|
|
7
|
+
/** Absolute path or file URL to a caller-owned ESM/CJS worker module. */
|
|
8
|
+
filename: string | URL;
|
|
9
|
+
/** Export used for forward processing. Omit to use the worker's default export. */
|
|
10
|
+
processName?: string;
|
|
11
|
+
/** Export used for reverse processing. When omitted, reverse is unsupported. */
|
|
12
|
+
reverseName?: string;
|
|
13
|
+
maxThreads?: number;
|
|
14
|
+
/** Maximum queued tasks. Defaults to 64. */
|
|
15
|
+
maxQueue?: number;
|
|
16
|
+
/** Per-task timeout in milliseconds. Zero disables the plugin-level timeout. */
|
|
17
|
+
taskTimeoutMs?: number;
|
|
18
|
+
/** Grace period used by Piscina when closing the pool. Defaults to 30 seconds. */
|
|
19
|
+
closeTimeoutMs?: number;
|
|
20
|
+
}
|
|
21
|
+
/** Runs caller-owned CPU transforms in a bounded, persistent Piscina pool. */
|
|
22
|
+
declare class WorkerPoolPlugin extends BasePlugin {
|
|
23
|
+
#private;
|
|
24
|
+
readonly name = "worker-pool";
|
|
25
|
+
readonly version = "5.0.0";
|
|
26
|
+
constructor(options: WorkerPoolOptions);
|
|
27
|
+
get reversible(): boolean;
|
|
28
|
+
process(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
29
|
+
reverse(data: Buffer, ctx: ProcessorContext): Promise<Buffer>;
|
|
30
|
+
createStream(mode: 'compress' | 'decompress', context?: StreamPluginContext): Transform;
|
|
31
|
+
/** Rejects new tasks and waits for queued/running work unless force is true. */
|
|
32
|
+
close(options?: {
|
|
33
|
+
force?: boolean;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { WorkerPoolPlugin as n, WorkerPoolOptions as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./core-B_z1gN5W.cjs`);const e=require(`./resourceLimits-CI0Qrqdf.cjs`);let t=require(`node:stream`),n=require(`node:url`),r=require(`node:os`),i=require(`piscina`);const a=2147483647,o=1e5,s=Math.max(1,Math.min(4,(0,r.availableParallelism)()));function c(e,t,n=!1){if(e!==void 0&&(!Number.isSafeInteger(e)||e<+!n))throw Error(`[PipeX] Worker pool ${t} must be ${n?`a non-negative`:`a positive`} integer`)}function l(t,n){let r=n??t.limits?.operationTimeoutMs??e.t.operationTimeoutMs;if(!Number.isSafeInteger(r)||r<0||r>a)throw Error(`[PipeX] Invalid worker task timeout`);if(r===0)return{signal:t.signal,cleanup(){}};let i=new AbortController,o=setTimeout(()=>{i.abort(new DOMException(`Worker task timed out`,`TimeoutError`))},r);return o.unref(),{signal:t.signal?AbortSignal.any([t.signal,i.signal]):i.signal,cleanup(){clearTimeout(o)}}}function u(t){return t.reason instanceof Error&&t.reason.name===`TimeoutError`?new e._({cause:t.reason}):new e.g({cause:t.reason})}var d=class extends e.i{name=`worker-pool`;version=`5.0.0`;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=!0;#u=0;#d;#f;#p=new Set;#m;constructor(t){if(super(t),!t||!(typeof t.filename==`string`||t.filename instanceof URL))throw Error(`[PipeX] Worker pool requires a worker filename`);if(c(t.maxThreads,`maxThreads`),c(t.maxQueue,`maxQueue`),c(t.taskTimeoutMs,`taskTimeoutMs`,!0),c(t.closeTimeoutMs,`closeTimeoutMs`,!0),t.maxThreads!==void 0&&t.maxThreads>128)throw Error(`[PipeX] Worker pool maxThreads cannot exceed 128`);if(t.maxQueue!==void 0&&t.maxQueue>o)throw Error(`[PipeX] Worker pool maxQueue cannot exceed ${o}`);if(t.taskTimeoutMs!==void 0&&t.taskTimeoutMs>a)throw Error(`[PipeX] Worker pool taskTimeoutMs exceeds the supported timer range`);if(t.closeTimeoutMs!==void 0&&t.closeTimeoutMs>a)throw Error(`[PipeX] Worker pool closeTimeoutMs exceeds the supported timer range`);for(let[e,n]of[[`processName`,t.processName],[`reverseName`,t.reverseName]])if(n!==void 0&&(typeof n!=`string`||n.length===0||n.length>128))throw Error(`[PipeX] Worker pool ${e} must be a non-empty export name`);let r=t.filename instanceof URL?(0,n.fileURLToPath)(t.filename):t.filename;this.#t=t.processName,this.#n=t.reverseName,this.#r=t.taskTimeoutMs,this.#i=t.maxThreads??s,this.#a=t.maxQueue??64,this.#o=this.#i+this.#a,this.#s=t.closeTimeoutMs??3e4,this.#c=!!t.reverseName,this.#e=new i.Piscina({filename:r,minThreads:0,maxThreads:this.#i,maxQueue:this.#a,closeTimeout:this.#s}),this.#m=t=>{this.#f||(this.#f=new e.O(`worker-thread`,{cause:t}),this.#l=!1,this.#e.destroy().catch(()=>void 0))},this.#e.on(`error`,this.#m)}get reversible(){return this.#c}async#h(t,n,r){if(this.#f)throw this.#f;if(!this.#l)throw new e.E;let i=e.n(n);if(t.length>i)throw Error(`[PipeX] Worker input exceeds ${i} bytes`);if(this.#u>=this.#o)throw new e.D(this.#a);let a=l(n,this.#r);this.#u++;try{a.signal?.throwIfAborted();let i=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength),o=await this.#e.run(i,{transferList:[i],signal:a.signal,name:r});if(!(o instanceof ArrayBuffer)&&!ArrayBuffer.isView(o))throw Error(`worker returned a non-binary value`);let s=o instanceof ArrayBuffer?Buffer.from(o):Buffer.from(o.buffer,o.byteOffset,o.byteLength),c=e.r(n);if(s.length>c)throw Error(`[PipeX] Worker output exceeds ${c} bytes`);return s}catch(t){throw a.signal?.aborted?u(a.signal):t instanceof e.E||t instanceof e.D?t:t instanceof Error&&(t.message===`Task queue is at limit`||t.message===`No task queue available and all Workers are busy`)?new e.D(this.#a):new e.O(r??`default`,{cause:t})}finally{if(a.cleanup(),this.#u--,this.#u===0){for(let e of this.#p)e();this.#p.clear()}}}process(e,t){return this.#h(e,t,this.#t)}reverse(t,n){if(!this.#n)throw new e.S(`${this.name}@${this.version}`);return this.#h(t,n,this.#n)}createStream(n,r){if(n===`decompress`&&!this.#n)throw new e.S(this.name);let i=new AbortController,a=r?.signal?AbortSignal.any([r.signal,i.signal]):i.signal,o=r?.limits??e.t,s=Math.min(o.maxFrameBytes,4294967294),c=Buffer.from([80,88,87,75,1]),l=Buffer.from([255,255,255,255]),u=0,d=0,f=0,p=!1,m=!1,h=Buffer.alloc(c.length),g=0,_,v=0,y=this,b=(e,t)=>{if(t.length>o.maxOutputBytes-d)throw Error(`[PipeX] Worker stream output exceeds configured limit`);d+=t.length,e.push(t)},x=async e=>{if(++f>o.maxFrames)throw Error(`[PipeX] Worker frame count exceeds configured limit`);let t={requestId:r?.requestId??`worker-stream`,timestamp:Date.now(),signal:a,limits:o,logger:r?.logger,metadata:{}},i=n===`decompress`?y.reverse(e,t):y.process(e,t);r?.track?.(i);let c=await i;if(a.throwIfAborted(),c.length>s)throw Error(`[PipeX] Worker frame exceeds configured limit`);return c};return new t.Transform({transform(t,i,o){let l=this;(async()=>{if(a.throwIfAborted(),t.length>e.n(r)-u)throw Error(`[PipeX] Worker stream input exceeds configured limit`);if(u+=t.length,n===`compress`){p||=(b(l,c),!0);for(let e=0;e<t.length;e+=s){let n=await x(t.subarray(e,e+s)),r=Buffer.alloc(4);r.writeUInt32BE(n.length),b(l,r),b(l,n)}return}let i=0;for(;i<t.length;){if(m)throw Error(`[PipeX] Worker stream has trailing bytes`);if(!_){let e=Math.min(h.length-g,t.length-i);if(t.copy(h,g,i,i+e),g+=e,i+=e,g!==h.length)continue;if(!p){if(!h.equals(c))throw Error(`[PipeX] Invalid worker stream format`);p=!0,h=Buffer.alloc(4),g=0;continue}let n=h.readUInt32BE();if(g=0,n===4294967295){m=!0;continue}if(n>s)throw Error(`[PipeX] Worker frame exceeds configured limit`);_=Buffer.alloc(n),v=0}let e=Math.min(_.length-v,t.length-i);t.copy(_,v,i,i+e),v+=e,i+=e,v===_.length&&(b(l,await x(_)),_=void 0,v=0)}})().then(()=>o(),e=>o(e))},flush(e){try{if(a.throwIfAborted(),n===`compress`)p||b(this,c),b(this,l);else if(!m||_||g)throw Error(`[PipeX] Incomplete worker stream`);e()}catch(t){e(t)}},destroy(e,t){a.aborted||i.abort(e??new DOMException(`Worker stream destroyed`,`AbortError`)),_=void 0,t(e)}})}async close(t={}){if(!t||t.force!==void 0&&typeof t.force!=`boolean`)throw TypeError(`[PipeX] Worker pool close force must be a boolean`);return this.#d?this.#d:(this.#l=!1,this.#d=(async()=>{try{if(this.#f)await this.#e.destroy();else if(t.force)await this.#e.destroy();else if(this.#u>0&&await new Promise((t,n)=>{let r=()=>{clearTimeout(i),t()},i=setTimeout(()=>{this.#p.delete(r),n(new e.T)},this.#s);this.#p.add(r)}),await this.#e.close({force:!1}),this.#f)throw this.#f}catch(t){throw await this.#e.destroy().catch(()=>void 0),t instanceof e.T?t:new e.T({cause:t})}finally{this.#e.removeListener(`error`,this.#m)}})(),this.#d)}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,E as t,O as n,S as r,T as i,_ as a,g as o,i as s,n as c,r as l,t as u}from"./resourceLimits-C1HHDwXQ.mjs";import{Transform as d}from"node:stream";import{fileURLToPath as f}from"node:url";import{availableParallelism as p}from"node:os";import{Piscina as m}from"piscina";const h=2147483647,g=1e5,_=Math.max(1,Math.min(4,p()));function v(e,t,n=!1){if(e!==void 0&&(!Number.isSafeInteger(e)||e<+!n))throw Error(`[PipeX] Worker pool ${t} must be ${n?`a non-negative`:`a positive`} integer`)}function y(e,t){let n=t??e.limits?.operationTimeoutMs??u.operationTimeoutMs;if(!Number.isSafeInteger(n)||n<0||n>h)throw Error(`[PipeX] Invalid worker task timeout`);if(n===0)return{signal:e.signal,cleanup(){}};let r=new AbortController,i=setTimeout(()=>{r.abort(new DOMException(`Worker task timed out`,`TimeoutError`))},n);return i.unref(),{signal:e.signal?AbortSignal.any([e.signal,r.signal]):r.signal,cleanup(){clearTimeout(i)}}}function b(e){return e.reason instanceof Error&&e.reason.name===`TimeoutError`?new a({cause:e.reason}):new o({cause:e.reason})}var x=class extends s{name=`worker-pool`;version=`5.0.0`;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=!0;#u=0;#d;#f;#p=new Set;#m;constructor(e){if(super(e),!e||!(typeof e.filename==`string`||e.filename instanceof URL))throw Error(`[PipeX] Worker pool requires a worker filename`);if(v(e.maxThreads,`maxThreads`),v(e.maxQueue,`maxQueue`),v(e.taskTimeoutMs,`taskTimeoutMs`,!0),v(e.closeTimeoutMs,`closeTimeoutMs`,!0),e.maxThreads!==void 0&&e.maxThreads>128)throw Error(`[PipeX] Worker pool maxThreads cannot exceed 128`);if(e.maxQueue!==void 0&&e.maxQueue>g)throw Error(`[PipeX] Worker pool maxQueue cannot exceed ${g}`);if(e.taskTimeoutMs!==void 0&&e.taskTimeoutMs>h)throw Error(`[PipeX] Worker pool taskTimeoutMs exceeds the supported timer range`);if(e.closeTimeoutMs!==void 0&&e.closeTimeoutMs>h)throw Error(`[PipeX] Worker pool closeTimeoutMs exceeds the supported timer range`);for(let[t,n]of[[`processName`,e.processName],[`reverseName`,e.reverseName]])if(n!==void 0&&(typeof n!=`string`||n.length===0||n.length>128))throw Error(`[PipeX] Worker pool ${t} must be a non-empty export name`);let t=e.filename instanceof URL?f(e.filename):e.filename;this.#t=e.processName,this.#n=e.reverseName,this.#r=e.taskTimeoutMs,this.#i=e.maxThreads??_,this.#a=e.maxQueue??64,this.#o=this.#i+this.#a,this.#s=e.closeTimeoutMs??3e4,this.#c=!!e.reverseName,this.#e=new m({filename:t,minThreads:0,maxThreads:this.#i,maxQueue:this.#a,closeTimeout:this.#s}),this.#m=e=>{this.#f||(this.#f=new n(`worker-thread`,{cause:e}),this.#l=!1,this.#e.destroy().catch(()=>void 0))},this.#e.on(`error`,this.#m)}get reversible(){return this.#c}async#h(r,i,a){if(this.#f)throw this.#f;if(!this.#l)throw new t;let o=c(i);if(r.length>o)throw Error(`[PipeX] Worker input exceeds ${o} bytes`);if(this.#u>=this.#o)throw new e(this.#a);let s=y(i,this.#r);this.#u++;try{s.signal?.throwIfAborted();let e=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),t=await this.#e.run(e,{transferList:[e],signal:s.signal,name:a});if(!(t instanceof ArrayBuffer)&&!ArrayBuffer.isView(t))throw Error(`worker returned a non-binary value`);let n=t instanceof ArrayBuffer?Buffer.from(t):Buffer.from(t.buffer,t.byteOffset,t.byteLength),o=l(i);if(n.length>o)throw Error(`[PipeX] Worker output exceeds ${o} bytes`);return n}catch(r){throw s.signal?.aborted?b(s.signal):r instanceof t||r instanceof e?r:r instanceof Error&&(r.message===`Task queue is at limit`||r.message===`No task queue available and all Workers are busy`)?new e(this.#a):new n(a??`default`,{cause:r})}finally{if(s.cleanup(),this.#u--,this.#u===0){for(let e of this.#p)e();this.#p.clear()}}}process(e,t){return this.#h(e,t,this.#t)}reverse(e,t){if(!this.#n)throw new r(`${this.name}@${this.version}`);return this.#h(e,t,this.#n)}createStream(e,t){if(e===`decompress`&&!this.#n)throw new r(this.name);let n=new AbortController,i=t?.signal?AbortSignal.any([t.signal,n.signal]):n.signal,a=t?.limits??u,o=Math.min(a.maxFrameBytes,4294967294),s=Buffer.from([80,88,87,75,1]),l=Buffer.from([255,255,255,255]),f=0,p=0,m=0,h=!1,g=!1,_=Buffer.alloc(s.length),v=0,y,b=0,x=this,S=(e,t)=>{if(t.length>a.maxOutputBytes-p)throw Error(`[PipeX] Worker stream output exceeds configured limit`);p+=t.length,e.push(t)},C=async n=>{if(++m>a.maxFrames)throw Error(`[PipeX] Worker frame count exceeds configured limit`);let r={requestId:t?.requestId??`worker-stream`,timestamp:Date.now(),signal:i,limits:a,logger:t?.logger,metadata:{}},s=e===`decompress`?x.reverse(n,r):x.process(n,r);t?.track?.(s);let c=await s;if(i.throwIfAborted(),c.length>o)throw Error(`[PipeX] Worker frame exceeds configured limit`);return c};return new d({transform(n,r,a){let l=this;(async()=>{if(i.throwIfAborted(),n.length>c(t)-f)throw Error(`[PipeX] Worker stream input exceeds configured limit`);if(f+=n.length,e===`compress`){h||=(S(l,s),!0);for(let e=0;e<n.length;e+=o){let t=await C(n.subarray(e,e+o)),r=Buffer.alloc(4);r.writeUInt32BE(t.length),S(l,r),S(l,t)}return}let r=0;for(;r<n.length;){if(g)throw Error(`[PipeX] Worker stream has trailing bytes`);if(!y){let e=Math.min(_.length-v,n.length-r);if(n.copy(_,v,r,r+e),v+=e,r+=e,v!==_.length)continue;if(!h){if(!_.equals(s))throw Error(`[PipeX] Invalid worker stream format`);h=!0,_=Buffer.alloc(4),v=0;continue}let t=_.readUInt32BE();if(v=0,t===4294967295){g=!0;continue}if(t>o)throw Error(`[PipeX] Worker frame exceeds configured limit`);y=Buffer.alloc(t),b=0}let e=Math.min(y.length-b,n.length-r);n.copy(y,b,r,r+e),b+=e,r+=e,b===y.length&&(S(l,await C(y)),y=void 0,b=0)}})().then(()=>a(),e=>a(e))},flush(t){try{if(i.throwIfAborted(),e===`compress`)h||S(this,s),S(this,l);else if(!g||y||v)throw Error(`[PipeX] Incomplete worker stream`);t()}catch(e){t(e)}},destroy(e,t){i.aborted||n.abort(e??new DOMException(`Worker stream destroyed`,`AbortError`)),y=void 0,t(e)}})}async close(e={}){if(!e||e.force!==void 0&&typeof e.force!=`boolean`)throw TypeError(`[PipeX] Worker pool close force must be a boolean`);return this.#d?this.#d:(this.#l=!1,this.#d=(async()=>{try{if(this.#f)await this.#e.destroy();else if(e.force)await this.#e.destroy();else if(this.#u>0&&await new Promise((e,t)=>{let n=()=>{clearTimeout(r),e()},r=setTimeout(()=>{this.#p.delete(n),t(new i)},this.#s);this.#p.add(n)}),await this.#e.close({force:!1}),this.#f)throw this.#f}catch(e){throw await this.#e.destroy().catch(()=>void 0),e instanceof i?e:new i({cause:e})}finally{this.#e.removeListener(`error`,this.#m)}})(),this.#d)}};export{x as t};
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snyxex/pipex",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "./dist/index.
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Composable compression, authenticated encryption, and HMAC transformation pipelines for Node.js buffers, files, and streams.",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"sideEffects":
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"./dist/index.mjs",
|
|
10
|
+
"./dist/index.cjs"
|
|
11
|
+
],
|
|
9
12
|
"scripts": {
|
|
10
13
|
"test": "npm run typecheck && npm run build && npm run test:tooling && npm run test:unit && npm run test:integration && npm run test:security && npm run test:package:built && npm run test:consumer:built",
|
|
11
14
|
"test:tooling": "node scripts/run-test-suite.mjs --timeout=10000 test/tooling",
|
|
@@ -20,23 +23,37 @@
|
|
|
20
23
|
"test:hardening": "npm run test:security",
|
|
21
24
|
"test:performance": "npm run build && npm run test:performance:built",
|
|
22
25
|
"test:performance:built": "node scripts/run-test-suite.mjs --timeout=15000 test/performance",
|
|
23
|
-
"quality:ci": "npm run typecheck && npm run build && npm run test:tooling && npm run test:unit && npm run test:integration && npm run test:security && npm run test:package:built && npm run test:consumer:built && npm run test:performance:built",
|
|
26
|
+
"quality:ci": "npm run typecheck && npm run build && npm run test:tooling && npm run test:unit && npm run test:integration && npm run test:security && npm run test:package:built && npm run test:consumer:built && npm run test:performance:built && npm run test:dual-package",
|
|
24
27
|
"benchmark:large": "npm run build && node scripts/run-test-suite.mjs --suffix=.benchmark.mjs --timeout=600000 benchmarks",
|
|
25
|
-
"typecheck": "npm run typecheck:prod",
|
|
28
|
+
"typecheck": "npm run typecheck:prod && npm run typecheck:types",
|
|
26
29
|
"typecheck:prod": "tsc -p tsconfig.prod.json --noEmit",
|
|
27
30
|
"build": "tsdown --minify",
|
|
28
31
|
"prepare": "npm run build",
|
|
29
32
|
"prepublishOnly": "npm test",
|
|
30
|
-
"release:preflight": "node scripts/release-preflight.mjs"
|
|
33
|
+
"release:preflight": "node scripts/release-preflight.mjs",
|
|
34
|
+
"test:dual-package": "node scripts/verify-dual-package.mjs",
|
|
35
|
+
"lint:ci": "node scripts/lint-ci.mjs",
|
|
36
|
+
"typecheck:ci": "tsc -p tsconfig.ci-types.json --noEmit",
|
|
37
|
+
"test:vitest": "vitest run",
|
|
38
|
+
"coverage:vitest": "vitest run --coverage",
|
|
39
|
+
"test:examples": "node scripts/verify-examples.mjs",
|
|
40
|
+
"report:bundle-size": "node scripts/report-bundle-size.mjs",
|
|
41
|
+
"typecheck:types": "tsc -p tsconfig.types.json --noEmit"
|
|
31
42
|
},
|
|
32
43
|
"keywords": [
|
|
33
|
-
"data",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
44
|
+
"data-transformation",
|
|
45
|
+
"nodejs",
|
|
46
|
+
"typescript",
|
|
47
|
+
"streams",
|
|
36
48
|
"compression",
|
|
49
|
+
"gzip",
|
|
50
|
+
"brotli",
|
|
37
51
|
"encryption",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
52
|
+
"aes-256-gcm",
|
|
53
|
+
"chacha20-poly1305",
|
|
54
|
+
"hmac",
|
|
55
|
+
"messagepack",
|
|
56
|
+
"pipeline"
|
|
40
57
|
],
|
|
41
58
|
"author": "Snyxex",
|
|
42
59
|
"license": "MIT",
|
|
@@ -58,22 +75,101 @@
|
|
|
58
75
|
"exports": {
|
|
59
76
|
".": {
|
|
60
77
|
"types": "./dist/index.d.mts",
|
|
61
|
-
"import":
|
|
78
|
+
"import": {
|
|
79
|
+
"types": "./dist/index.d.mts",
|
|
80
|
+
"default": "./dist/index.mjs"
|
|
81
|
+
},
|
|
82
|
+
"require": {
|
|
83
|
+
"types": "./dist/index.d.cts",
|
|
84
|
+
"default": "./dist/index.cjs"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"./compression": {
|
|
88
|
+
"types": "./dist/compression.d.mts",
|
|
89
|
+
"import": {
|
|
90
|
+
"types": "./dist/compression.d.mts",
|
|
91
|
+
"default": "./dist/compression.mjs"
|
|
92
|
+
},
|
|
93
|
+
"require": {
|
|
94
|
+
"types": "./dist/compression.d.cts",
|
|
95
|
+
"default": "./dist/compression.cjs"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"./encryption": {
|
|
99
|
+
"types": "./dist/encryption.d.mts",
|
|
100
|
+
"import": {
|
|
101
|
+
"types": "./dist/encryption.d.mts",
|
|
102
|
+
"default": "./dist/encryption.mjs"
|
|
103
|
+
},
|
|
104
|
+
"require": {
|
|
105
|
+
"types": "./dist/encryption.d.cts",
|
|
106
|
+
"default": "./dist/encryption.cjs"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"./hashing": {
|
|
110
|
+
"types": "./dist/hashing.d.mts",
|
|
111
|
+
"import": {
|
|
112
|
+
"types": "./dist/hashing.d.mts",
|
|
113
|
+
"default": "./dist/hashing.mjs"
|
|
114
|
+
},
|
|
115
|
+
"require": {
|
|
116
|
+
"types": "./dist/hashing.d.cts",
|
|
117
|
+
"default": "./dist/hashing.cjs"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"./validation": {
|
|
121
|
+
"types": "./dist/validation.d.mts",
|
|
122
|
+
"import": {
|
|
123
|
+
"types": "./dist/validation.d.mts",
|
|
124
|
+
"default": "./dist/validation.mjs"
|
|
125
|
+
},
|
|
126
|
+
"require": {
|
|
127
|
+
"types": "./dist/validation.d.cts",
|
|
128
|
+
"default": "./dist/validation.cjs"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"./parallel": {
|
|
132
|
+
"types": "./dist/parallel.d.mts",
|
|
133
|
+
"import": {
|
|
134
|
+
"types": "./dist/parallel.d.mts",
|
|
135
|
+
"default": "./dist/parallel.mjs"
|
|
136
|
+
},
|
|
137
|
+
"require": {
|
|
138
|
+
"types": "./dist/parallel.d.cts",
|
|
139
|
+
"default": "./dist/parallel.cjs"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"./native": {
|
|
143
|
+
"types": "./dist/native.d.mts",
|
|
144
|
+
"import": {
|
|
145
|
+
"types": "./dist/native.d.mts",
|
|
146
|
+
"default": "./dist/native.mjs"
|
|
147
|
+
},
|
|
148
|
+
"require": {
|
|
149
|
+
"types": "./dist/native.d.cts",
|
|
150
|
+
"default": "./dist/native.cjs"
|
|
151
|
+
}
|
|
62
152
|
},
|
|
63
153
|
"./plugins/kms": {
|
|
64
|
-
"types": "./dist/
|
|
65
|
-
"import":
|
|
154
|
+
"types": "./dist/kms.d.mts",
|
|
155
|
+
"import": {
|
|
156
|
+
"types": "./dist/kms.d.mts",
|
|
157
|
+
"default": "./dist/kms.mjs"
|
|
158
|
+
},
|
|
159
|
+
"require": {
|
|
160
|
+
"types": "./dist/kms.d.cts",
|
|
161
|
+
"default": "./dist/kms.cjs"
|
|
162
|
+
}
|
|
66
163
|
}
|
|
67
164
|
},
|
|
68
165
|
"files": [
|
|
69
|
-
"dist",
|
|
70
|
-
"
|
|
166
|
+
"dist/*.mjs",
|
|
167
|
+
"dist/*.cjs",
|
|
168
|
+
"dist/*.d.mts",
|
|
169
|
+
"dist/*.d.cts",
|
|
71
170
|
"README.md",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"docs/architecture.md",
|
|
75
|
-
"docs/encryption-v4-migration.md",
|
|
76
|
-
"docs/enterprise.md"
|
|
171
|
+
"LICENSE",
|
|
172
|
+
"CHANGELOG.md"
|
|
77
173
|
],
|
|
78
174
|
"allowScripts": {
|
|
79
175
|
"msgpackr-extract@3.0.4": true
|
|
@@ -89,5 +185,6 @@
|
|
|
89
185
|
"publishConfig": {
|
|
90
186
|
"access": "public",
|
|
91
187
|
"registry": "https://registry.npmjs.org/"
|
|
92
|
-
}
|
|
188
|
+
},
|
|
189
|
+
"module": "./dist/index.mjs"
|
|
93
190
|
}
|
package/SECURITY.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
PipeX handles potentially sensitive application data and includes cryptographic, file-system, and streaming operations. Security reports are taken seriously.
|
|
4
|
-
|
|
5
|
-
## Supported versions
|
|
6
|
-
|
|
7
|
-
| Version | Security fixes |
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| `main` | Active development and security fixes |
|
|
10
|
-
| Latest stable 1.0.x release | Best-effort fixes for verified vulnerabilities |
|
|
11
|
-
| Older releases | No guaranteed backports |
|
|
12
|
-
|
|
13
|
-
Use the latest maintained version. Supported Node.js major versions are 22, 24, and 26; the minimum declared runtime version is Node.js 22.
|
|
14
|
-
|
|
15
|
-
## Report a vulnerability privately
|
|
16
|
-
|
|
17
|
-
**Do not create a public issue, discussion, or pull request containing an undisclosed vulnerability, exploit, credential, or personal information.**
|
|
18
|
-
|
|
19
|
-
Use [GitHub's private vulnerability reporting for PipeX](https://github.com/Snyxex/PipeX/security/advisories/new), **if the repository has private reporting enabled**. If that form is unavailable, open a public issue requesting a private reporting channel **without including technical vulnerability details**, and wait for a secure route before submitting the report.
|
|
20
|
-
|
|
21
|
-
A useful report includes the affected versions and environment, impact, concise reproduction steps or a proof of concept, and mitigations if known. Do not submit real user data, production secrets, or live credentials.
|
|
22
|
-
|
|
23
|
-
Maintainers will triage reports on a best-effort basis, coordinate remediation and disclosure with reporters, and publish a GitHub Security Advisory when appropriate. No guaranteed response or patch SLA is offered. Please allow time for a fix before public disclosure.
|
|
24
|
-
|
|
25
|
-
If you discover exposed credentials, treat them as compromised: revoke or rotate them at their provider immediately. Removing a file in a new commit does not remove it from Git history.
|
|
26
|
-
|
|
27
|
-
## Security boundaries
|
|
28
|
-
|
|
29
|
-
- `binary.pack()`, `binary.unpack()`, and the stream/file pack/unpack APIs are serialization, **not encryption**.
|
|
30
|
-
- Encrypted data should use authenticated encryption with properly generated, managed keys; never commit keys.
|
|
31
|
-
- Treat data and metadata received from another system as untrusted. Supply the expected result type from trusted application logic when undoing remotely sourced binary results.
|
|
32
|
-
- File operations require an application-controlled `allowedRoot`. Keep allowed roots writable only by trusted principals.
|
|
33
|
-
- Set appropriate size, concurrency, timeout, and framing limits; handle cancellation and stream backpressure.
|
|
34
|
-
- `dlq` / `setDlq()` are caller-owned failure sinks, not persistent replay or a queue.
|
|
35
|
-
- Consult [enterprise security guidance](docs/enterprise.md) and [encryption migration guidance](docs/encryption-v4-migration.md).
|
|
36
|
-
|
|
37
|
-
## Supply-chain practices
|
|
38
|
-
|
|
39
|
-
Jenkins is the only project CI system; no GitHub Actions workflow is used. Pull requests with untrusted code must not receive credentials or privileged shared-host access. Release credentials must be isolated from ordinary CI builds.
|
|
40
|
-
|
|
41
|
-
The history review and its limitations are recorded in [docs/security-history-review.md](docs/security-history-review.md). A regex review does **not** certify the repository or its full Git object database as secret-free.
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/core/types.ts","../src/core/frameLimits.ts","../src/core/resourceLimits.ts","../src/core/core.ts","../src/core/controllers/FileController.ts","../src/core/controllers/BinaryController.ts","../src/core/controllers/StreamController.ts","../src/core/dataEngine.ts","../src/core/plugin.ts","../src/core/errors.ts","../src/core/kmsCapabilities.ts","../src/plugin/hashing.ts","../src/plugin/encryptionFormat.ts","../src/plugin/encryption.ts","../src/plugin/compression.ts","../src/plugin/performance.ts","../src/plugin/worker.ts","../src/core/validation.ts","../src/plugin/kms_encryption.ts","../src/index.ts"],"mappings":";;;;;;UAKiB,MAAA;EACf,IAAA,CAAK,OAAA,UAAiB,OAAA,GAAU,MAAA;EAChC,IAAA,CAAK,OAAA,UAAiB,OAAA,GAAU,MAAA;EAChC,KAAA,CAAM,OAAA,UAAiB,OAAA,GAAU,MAAA;EACjC,KAAA,CAAM,OAAA,UAAiB,OAAA,GAAU,MAAA;AAAA;AAAA,UAGlB,IAAA;EACf,YAAA,CAAa,GAAA,UAAa,KAAA;EAC1B,QAAA,CAAS,IAAA,UAAc,UAAA,GAAa,MAAA;EACpC,GAAA;AAAA;AAAA,UAGe,MAAA;EACf,SAAA,CAAU,IAAA,UAAc,OAAA,GAAU,gBAAA,GAAmB,IAAA;AAAA;AAAA,UAKtC,YAAA;EACf,QAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,UAGe,YAAA;EACf,aAAA;EACA,cAAA;EACA,aAAA;EACA,SAAA;EACA,uBAAA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