@uploadista/core 0.1.3-beta.2 → 0.1.3-beta.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/dist/{checksum-COoD-F1l.mjs → checksum-Bhch-SRg.mjs} +2 -2
- package/dist/{checksum-COoD-F1l.mjs.map → checksum-Bhch-SRg.mjs.map} +1 -1
- package/dist/checksum-CrfdHugi.cjs +1 -0
- package/dist/errors/index.cjs +1 -1
- package/dist/errors/index.d.cts +1 -1
- package/dist/errors/index.d.mts +2 -2
- package/dist/errors/index.mjs +1 -1
- package/dist/flow/index.cjs +1 -1
- package/dist/flow/index.d.cts +1 -1
- package/dist/flow/index.d.mts +5 -5
- package/dist/flow/index.mjs +1 -1
- package/dist/flow-CgCcLsPP.cjs +1 -0
- package/dist/flow-DyFRaN5b.mjs +2 -0
- package/dist/flow-DyFRaN5b.mjs.map +1 -0
- package/dist/{index-9gyMMEIB.d.cts → index-D1C_InNb.d.cts} +2 -2
- package/dist/index-D1C_InNb.d.cts.map +1 -0
- package/dist/{index-D8MZ6P3o.d.mts → index-D1xVo0kN.d.mts} +2 -2
- package/dist/index-D1xVo0kN.d.mts.map +1 -0
- package/dist/{index-D6DVyBne.d.mts → index-DKwJFauU.d.cts} +52 -102
- package/dist/index-DKwJFauU.d.cts.map +1 -0
- package/dist/{index-DFbu_-zn.d.cts → index-D_yZmNYw.d.mts} +2 -2
- package/dist/index-D_yZmNYw.d.mts.map +1 -0
- package/dist/{index-DQuMQssI.d.mts → index-trGSFkYe.d.cts} +2 -2
- package/dist/index-trGSFkYe.d.cts.map +1 -0
- package/dist/{index-BcuCr5Gy.d.cts → index-zxscP_nP.d.mts} +52 -102
- package/dist/index-zxscP_nP.d.mts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +1 -1
- package/dist/{stream-limiter-B9nsn2gb.mjs → stream-limiter-CUS1_6KZ.mjs} +2 -2
- package/dist/{stream-limiter-B9nsn2gb.mjs.map → stream-limiter-CUS1_6KZ.mjs.map} +1 -1
- package/dist/stream-limiter-DzdI9yEA.cjs +1 -0
- package/dist/streams/index.cjs +1 -1
- package/dist/streams/index.d.cts +1 -1
- package/dist/streams/index.d.mts +2 -2
- package/dist/streams/index.mjs +1 -1
- package/dist/testing/index.cjs +2 -2
- package/dist/testing/index.d.cts +1 -2
- package/dist/testing/index.d.cts.map +1 -1
- package/dist/testing/index.d.mts +5 -6
- package/dist/testing/index.d.mts.map +1 -1
- package/dist/testing/index.mjs +1 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +5 -5
- package/dist/types/index.mjs +1 -1
- package/dist/{types-4jaEzErd.mjs → types-5ZELMVfM.mjs} +2 -2
- package/dist/{types-4jaEzErd.mjs.map → types-5ZELMVfM.mjs.map} +1 -1
- package/dist/types-BFrsfDaF.cjs +1 -0
- package/dist/upload/index.cjs +1 -1
- package/dist/upload/index.d.cts +1 -1
- package/dist/upload/index.d.mts +5 -5
- package/dist/upload/index.mjs +1 -1
- package/dist/{upload-3cJkyA-H.cjs → upload-GilwoZG7.cjs} +1 -1
- package/dist/{upload-DVkP5Oh3.mjs → upload-QExBZ_3g.mjs} +2 -2
- package/dist/upload-QExBZ_3g.mjs.map +1 -0
- package/dist/{uploadista-error-CkSxSyNo.mjs → uploadista-error-9mF4Z7sn.mjs} +1 -1
- package/dist/{uploadista-error-CkSxSyNo.mjs.map → uploadista-error-9mF4Z7sn.mjs.map} +1 -1
- package/dist/{uploadista-error-B1qbOy9N.d.mts → uploadista-error-B5BIYLR_.d.cts} +2 -3
- package/dist/uploadista-error-B5BIYLR_.d.cts.map +1 -0
- package/dist/{uploadista-error-CYCmAtkZ.d.cts → uploadista-error-BeyPhCWJ.d.mts} +2 -3
- package/dist/uploadista-error-BeyPhCWJ.d.mts.map +1 -0
- package/dist/{uploadista-error-BBFNPVsJ.cjs → uploadista-error-DgO_3oBt.cjs} +2 -2
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/{utils-DVwfrVBJ.mjs → utils-BwUQGiMC.mjs} +2 -2
- package/dist/{utils-DVwfrVBJ.mjs.map → utils-BwUQGiMC.mjs.map} +1 -1
- package/dist/utils-DGK7AhJc.cjs +1 -0
- package/package.json +5 -5
- package/src/flow/flow.ts +142 -2
- package/dist/checksum-CSvd13B0.cjs +0 -1
- package/dist/flow-C3rwHF4L.cjs +0 -1
- package/dist/flow-Dy5RsFdg.mjs +0 -2
- package/dist/flow-Dy5RsFdg.mjs.map +0 -1
- package/dist/index-9gyMMEIB.d.cts.map +0 -1
- package/dist/index-BcuCr5Gy.d.cts.map +0 -1
- package/dist/index-D6DVyBne.d.mts.map +0 -1
- package/dist/index-D8MZ6P3o.d.mts.map +0 -1
- package/dist/index-DFbu_-zn.d.cts.map +0 -1
- package/dist/index-DQuMQssI.d.mts.map +0 -1
- package/dist/stream-limiter-iYpzh7Y6.cjs +0 -1
- package/dist/types-BLxcpPL9.cjs +0 -1
- package/dist/upload-DVkP5Oh3.mjs.map +0 -1
- package/dist/uploadista-error-B1qbOy9N.d.mts.map +0 -1
- package/dist/uploadista-error-CYCmAtkZ.d.cts.map +0 -1
- package/dist/utils-D24b0p1Z.cjs +0 -1
- /package/dist/{errors-CtPUOWNd.mjs → errors-DuxBpAc7.mjs} +0 -0
- /package/dist/{index-DWe68pTi.d.mts → index-9iG2qHLe.d.mts} +0 -0
- /package/dist/{index-_wQ5ClJU.d.cts → index-DDRpa5CJ.d.cts} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as isUploadistaError, i as httpFailure, n as UploadistaError, r as UploadistaErrorCode, t as ERROR_CATALOG } from "./uploadista-error-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { $ as VideoPlugin, $a as AllowRequestResult, $i as FlowConfig, $n as UploadEngineShape, $r as DeadLetterListOptions, $t as ImageAiPluginLayer, A as isImageDescriptionOutput, Aa as FlowEventDlqItemResolved, Ai as DataStore, An as ExtractLayerServices, Ao as CircuitBreakerEvent, Ar as uploadEventEmitter, At as Transformation, B as describeImageParamsSchema, Ba as FlowEventJobStart, Bi as UploadStrategy, Bn as FlowEngineOptions, Br as DeadLetterQueueServiceShape, Bt as rotateTransformSchema, C as createTypeGuard, Ca as calculateExpirationDate, Ci as FlowData, Cn as StreamingTransformResult, Co as CircuitBreakerStateData, Cr as BaseEventEmitterService, Ct as OverlayPosition, D as getSingleOutputByType, Da as FlowEvent, Di as BufferedUploadFileDataStore, Dn as ExtractEffectError, Do as CircuitBreakerStoreService, Dr as UploadEventEmitter, Dt as SharpenTransform, E as getOutputByNodeId, Ea as EventType, Ei as getFlowData, En as createTransformNode, Eo as CircuitBreakerStore, Er as TypedEventEmitter, Et as SepiaTransform, F as isUploadOperation, Fa as FlowEventFlowEnd, Fi as StreamWriteResult, Fn as createInputNode, Fr as UploadEventType, Ft as contrastTransformSchema, G as ZipPlugin, Ga as FlowEventNodeResume, Gi as AutoNamingSuffixGenerator, Gn as WaitUntilCallback, Gr as FlowJobTask, Gt as transformationSchema, H as PluginLayer, Ha as FlowEventNodeError, Hi as isDataStore, Hn as FlowProvider, Hr as deadLetterQueueService, Ht as sharpenTransformSchema, I as isUrlOperation, Ia as FlowEventFlowError, Ii as StreamingConfig, In as inputDataSchema, Ir as uploadEventSchema, It as flipTransformSchema, J as ScanMetadata, Ja as ConditionOperator, Ji as CustomTypedOutput, Jn as NegotiatedStrategy, Jr as DeadLetterCleanupOptions, Jt as resizeParamsSchema, K as ZipPluginLayer, Ka as FlowEventNodeStart, Ki as BuiltInNodeType, Kn as createFlowEngine, Kr as FlowJobTaskStatus, Kt as watermarkTransformSchema, L as RemoveBackgroundParams, La as FlowEventFlowPause, Li as UploadFileDataStore, Ln as inputNodeParamsSchema, Lr as EventBroadcaster, Lt as grayscaleTransformSchema, M as isOcrOutput, Ma as FlowEventDlqRetryStart, Mi as DataStoreConfig, Mn as FlowCondition, Mo as CircuitBreakerFallback, Mr as WebSocketMessage, Mt as WatermarkTransform, N as isStorageOutput, Na as FlowEventDlqRetrySuccess, Ni as DataStoreWriteOptions, Nn as InputData, No as CircuitBreakerState, Nr as webSocketMessageSchema, Nt as blurTransformSchema, O as hasOutputOfType, Oa as FlowEventDlqItemAdded, Oi as DEFAULT_MULTIPART_PART_SIZE, On as ExtractEffectRequirements, Oo as createInitialCircuitBreakerState, Or as eventToMessageSerializer, Ot as TextTransform, P as isUploadFile, Pa as FlowEventFlowCancel, Pi as StreamWriteOptions, Pn as InputNodeParams, Po as DEFAULT_CIRCUIT_BREAKER_CONFIG, Pr as UploadEvent, Pt as brightnessTransformSchema, Q as VirusScanPluginShape, Qa as getNodeData, Qi as FlowCircuitBreakerFallback, Qn as UploadEngineOptions, Qr as DeadLetterItemStatus, Qt as ImageAiPlugin, R as removeBackgroundParamsSchema, Ra as FlowEventFlowStart, Ri as UploadFileDataStores, Rn as FlowEngine, Rr as EventBroadcasterService, Rt as logoTransformSchema, S as NarrowedTypedOutput, Sa as calculateBackoffDelay, Si as Flow, Sn as StreamingTransformFn, So as uploadFileSchema, Sr as BaseEventEmitter, St as LogoTransform, T as getFirstOutputByType, Ta as DlqEvent, Ti as createFlowWithSchema, Tn as TransformNodeConfig, To as CircuitBreakerStats, Tr as FlowEventEmitter, Tt as RotateTransform, U as ZipInput, Ua as FlowEventNodePause, Ui as FlowEdge, Un as FlowProviderShape, Ur as FlowJob, Ut as textTransformSchema, V as Plugin, Va as FlowEventNodeEnd, Vi as createDataStoreLayer, Vn as FlowEngineShape, Vr as createDeadLetterQueueService, Vt as sepiaTransformSchema, W as ZipParams, Wa as FlowEventNodeResponse, Wi as createFlowEdge, Wn as FlowWaitUntil, Wr as FlowJobStatus, Wt as transformImageParamsSchema, X as VirusScanPlugin, Xa as NodeType, Xi as FileNamingFunction, Xn as UploadStrategyOptions, Xr as DeadLetterError, Xt as optimizeParamsSchema, Y as ScanResult, Ya as ConditionValue, Yi as FileNamingConfig, Yn as UploadStrategyNegotiator, Yr as DeadLetterCleanupResult, Yt as OptimizeParams, Z as VirusScanPluginLayer, Za as createFlowNode, Zi as FlowCircuitBreakerConfig, Zn as UploadEngine, Zr as DeadLetterItem, Zt as ImageAiContext, _ as NodeDefinitionsRecord, _a as DEFAULT_RETRY_POLICY, _i as InputTypeDefinition, _n as CredentialProviderLayer, _o as JsonValue, _r as HealthResponse, _t as BlurTransform, a as buildNamingContext, aa as NodeConnectionValidator, ai as ImageDescriptionOutput, an as MergePdfParams, ao as memoryCircuitBreakerStoreLayer, ar as MiddlewareContext, at as trimVideoParamsSchema, b as TypedFlowEdge, ba as ImmediateBackoff, bi as inputTypeRegistry, bn as ParallelScheduler, bo as jsonValueSchema, br as formatHealthAsText, bt as FlipTransform, c as interpolateFileName, ca as TypeCompatibilityChecker, ci as STORAGE_OUTPUT_TYPE_ID, cn as DocumentAiContext, co as DeadLetterQueueKVStore, cr as MiddlewareServiceLive, ct as ResizeVideoParams, d as runArgsSchema, da as completeNodeExecution, di as ocrOutputSchema, dn as DocumentAiPluginShape, do as TypedKvStore, dr as CircuitBreakerHealthSummary, dt as extractFrameVideoParamsSchema, ea as FlowDeadLetterQueueConfig, ei as DeadLetterProcessResult, en as ImageAiPluginShape, eo as DistributedCircuitBreaker, er as createUploadEngine, et as VideoPluginLayer, f as FlowInputMap, fa as createOutputGuard, fi as OutputTypeDefinition, fn as OcrParams, fo as UploadFileKVStore, fr as ComponentHealth, ft as DescribeVideoMetadata, g as NodeDefinition, ga as BackoffStrategy, gi as validateFlowOutput, gn as CredentialProvider, go as uploadFileKvStore, gr as HealthComponents, gt as ImagePluginShape, h as FlowRequirements, ha as waitingNodeExecution, hi as outputTypeRegistry, hn as OcrTaskType, ho as jsonSerializer, hr as HealthCheckConfig, ht as ImagePluginLayer, i as applyFileNaming, ia as NarrowTypedOutput, ii as IMAGE_DESCRIPTION_OUTPUT_TYPE_ID, in as DocumentPluginShape, io as makeMemoryCircuitBreakerStore, ir as Middleware, it as TrimVideoParams, j as isInitOperation, ja as FlowEventDlqRetryFailed, ji as DataStoreCapabilities, jn as ResolveEffect, jo as CircuitBreakerEventHandler, jr as WebSocketConnection, jt as TransformationType, k as isFinalizeOperation, ka as FlowEventDlqItemExhausted, ki as DEFAULT_STREAMING_CONFIG, kn as ExtractLayerService, ko as CircuitBreakerConfig, kr as flowEventEmitter, kt as TransformImageParams, l as validatePattern, la as TypedOutput, li as STREAMING_INPUT_TYPE_ID, ln as DocumentAiPlugin, lo as FlowJobKVStore, lr as InputFile, lt as resizeVideoParamsSchema, m as FlowPluginRequirements, ma as isStreamingInputV1, mi as OutputValidationResult, mn as OcrResult, mo as flowJobKvStore, mr as DlqHealthSummary, mt as ImagePlugin, n as resolveUploadMetadata, na as FlowNodeData, ni as DeadLetterRetryAllResult, nn as DocumentPlugin, no as kvCircuitBreakerStoreLayer, nr as compareMimeTypes, nt as VideoStreamInput, o as getBaseName, oa as NodeExecutionResult, oi as OCR_OUTPUT_TYPE_ID, on as SplitPdfParams, oo as BaseKvStore, or as MiddlewareNext, ot as TranscodeVideoParams, p as FlowOutputMap, pa as isStorageOutputV1, pi as OutputTypeRegistry, pn as OcrResolution, po as deadLetterQueueKvStore, pr as DEFAULT_HEALTH_CHECK_CONFIG, pt as describeVideoMetadataSchema, q as ZipPluginShape, qa as ConditionField, qi as BuiltInTypedOutput, qn as flowEngine, qr as FlowJobTraceContext, qt as ResizeParams, r as AVAILABLE_TEMPLATE_VARIABLES, ra as NamingContext, ri as DeadLetterRetryAttempt, rn as DocumentPluginLayer, ro as makeKvCircuitBreakerStore, rr as detectMimeType, rt as VideoStreamOptions, s as getExtension, sa as NodeTypeMap, si as OcrOutput, sn as SplitPdfResult, so as BaseKvStoreService, sr as MiddlewareService, st as transcodeVideoParamsSchema, t as ResolvedUploadMetadata, ta as FlowNode, ti as DeadLetterQueueStats, tn as DocumentMetadata, to as DistributedCircuitBreakerRegistry, tr as uploadEngine, tt as VideoPluginShape, u as RunArgs, ua as TypedOutputGuard, ui as imageDescriptionOutputSchema, un as DocumentAiPluginLayer, uo as KvStore, ur as inputFileSchema, ut as ExtractFrameVideoParams, v as TypedFlow, va as ExponentialBackoff, vi as InputTypeRegistry, vn as CredentialProviderShape, vo as UploadFile, vr as HealthResponseFormat, vt as BrightnessTransform, w as filterOutputsByType, wa as isErrorRetryable, wi as FlowExecutionResult, wn as TransformMode, wo as CircuitBreakerStateValue, wr as EventEmitter, wt as ResizeTransform, x as createFlow, xa as RetryPolicy, xi as validateFlowInput, xn as ParallelSchedulerConfig, xo as traceContextSchema, xr as getHealthResponseFormat, xt as GrayscaleTransform, y as TypedFlowConfig, ya as FixedBackoff, yi as InputValidationResult, yn as ExecutionLevel, yo as UploadFileTraceContext, yr as HealthStatus, yt as ContrastTransform, z as DescribeImageParams, za as FlowEventJobEnd, zi as UploadFileDataStoresShape, zn as FlowEngineLayer, zr as DeadLetterQueueService, zt as resizeTransformSchema } from "./index-
|
|
4
|
-
import { a as Md5, c as isSupportedAlgorithm, d as GenerateIdRandom, f as GenerateIdService, i as once, l as GenerateId, m as GenerateIdTimestamp, n as throttle, o as ChecksumAlgorithm, p as GenerateIdShape, r as OnceEffect, s as computeChecksum, t as ThrottleEffect, u as GenerateIdLive } from "./index-
|
|
5
|
-
import { n as streamLimiter, t as StreamLimiterEffect } from "./index-
|
|
1
|
+
import { a as isUploadistaError, i as httpFailure, n as UploadistaError, r as UploadistaErrorCode, t as ERROR_CATALOG } from "./uploadista-error-BeyPhCWJ.mjs";
|
|
2
|
+
import "./index-9iG2qHLe.mjs";
|
|
3
|
+
import { $ as VideoPlugin, $a as AllowRequestResult, $i as FlowConfig, $n as UploadEngineShape, $r as DeadLetterListOptions, $t as ImageAiPluginLayer, A as isImageDescriptionOutput, Aa as FlowEventDlqItemResolved, Ai as DataStore, An as ExtractLayerServices, Ao as CircuitBreakerEvent, Ar as uploadEventEmitter, At as Transformation, B as describeImageParamsSchema, Ba as FlowEventJobStart, Bi as UploadStrategy, Bn as FlowEngineOptions, Br as DeadLetterQueueServiceShape, Bt as rotateTransformSchema, C as createTypeGuard, Ca as calculateExpirationDate, Ci as FlowData, Cn as StreamingTransformResult, Co as CircuitBreakerStateData, Cr as BaseEventEmitterService, Ct as OverlayPosition, D as getSingleOutputByType, Da as FlowEvent, Di as BufferedUploadFileDataStore, Dn as ExtractEffectError, Do as CircuitBreakerStoreService, Dr as UploadEventEmitter, Dt as SharpenTransform, E as getOutputByNodeId, Ea as EventType, Ei as getFlowData, En as createTransformNode, Eo as CircuitBreakerStore, Er as TypedEventEmitter, Et as SepiaTransform, F as isUploadOperation, Fa as FlowEventFlowEnd, Fi as StreamWriteResult, Fn as createInputNode, Fr as UploadEventType, Ft as contrastTransformSchema, G as ZipPlugin, Ga as FlowEventNodeResume, Gi as AutoNamingSuffixGenerator, Gn as WaitUntilCallback, Gr as FlowJobTask, Gt as transformationSchema, H as PluginLayer, Ha as FlowEventNodeError, Hi as isDataStore, Hn as FlowProvider, Hr as deadLetterQueueService, Ht as sharpenTransformSchema, I as isUrlOperation, Ia as FlowEventFlowError, Ii as StreamingConfig, In as inputDataSchema, Ir as uploadEventSchema, It as flipTransformSchema, J as ScanMetadata, Ja as ConditionOperator, Ji as CustomTypedOutput, Jn as NegotiatedStrategy, Jr as DeadLetterCleanupOptions, Jt as resizeParamsSchema, K as ZipPluginLayer, Ka as FlowEventNodeStart, Ki as BuiltInNodeType, Kn as createFlowEngine, Kr as FlowJobTaskStatus, Kt as watermarkTransformSchema, L as RemoveBackgroundParams, La as FlowEventFlowPause, Li as UploadFileDataStore, Ln as inputNodeParamsSchema, Lr as EventBroadcaster, Lt as grayscaleTransformSchema, M as isOcrOutput, Ma as FlowEventDlqRetryStart, Mi as DataStoreConfig, Mn as FlowCondition, Mo as CircuitBreakerFallback, Mr as WebSocketMessage, Mt as WatermarkTransform, N as isStorageOutput, Na as FlowEventDlqRetrySuccess, Ni as DataStoreWriteOptions, Nn as InputData, No as CircuitBreakerState, Nr as webSocketMessageSchema, Nt as blurTransformSchema, O as hasOutputOfType, Oa as FlowEventDlqItemAdded, Oi as DEFAULT_MULTIPART_PART_SIZE, On as ExtractEffectRequirements, Oo as createInitialCircuitBreakerState, Or as eventToMessageSerializer, Ot as TextTransform, P as isUploadFile, Pa as FlowEventFlowCancel, Pi as StreamWriteOptions, Pn as InputNodeParams, Po as DEFAULT_CIRCUIT_BREAKER_CONFIG, Pr as UploadEvent, Pt as brightnessTransformSchema, Q as VirusScanPluginShape, Qa as getNodeData, Qi as FlowCircuitBreakerFallback, Qn as UploadEngineOptions, Qr as DeadLetterItemStatus, Qt as ImageAiPlugin, R as removeBackgroundParamsSchema, Ra as FlowEventFlowStart, Ri as UploadFileDataStores, Rn as FlowEngine, Rr as EventBroadcasterService, Rt as logoTransformSchema, S as NarrowedTypedOutput, Sa as calculateBackoffDelay, Si as Flow, Sn as StreamingTransformFn, So as uploadFileSchema, Sr as BaseEventEmitter, St as LogoTransform, T as getFirstOutputByType, Ta as DlqEvent, Ti as createFlowWithSchema, Tn as TransformNodeConfig, To as CircuitBreakerStats, Tr as FlowEventEmitter, Tt as RotateTransform, U as ZipInput, Ua as FlowEventNodePause, Ui as FlowEdge, Un as FlowProviderShape, Ur as FlowJob, Ut as textTransformSchema, V as Plugin, Va as FlowEventNodeEnd, Vi as createDataStoreLayer, Vn as FlowEngineShape, Vr as createDeadLetterQueueService, Vt as sepiaTransformSchema, W as ZipParams, Wa as FlowEventNodeResponse, Wi as createFlowEdge, Wn as FlowWaitUntil, Wr as FlowJobStatus, Wt as transformImageParamsSchema, X as VirusScanPlugin, Xa as NodeType, Xi as FileNamingFunction, Xn as UploadStrategyOptions, Xr as DeadLetterError, Xt as optimizeParamsSchema, Y as ScanResult, Ya as ConditionValue, Yi as FileNamingConfig, Yn as UploadStrategyNegotiator, Yr as DeadLetterCleanupResult, Yt as OptimizeParams, Z as VirusScanPluginLayer, Za as createFlowNode, Zi as FlowCircuitBreakerConfig, Zn as UploadEngine, Zr as DeadLetterItem, Zt as ImageAiContext, _ as NodeDefinitionsRecord, _a as DEFAULT_RETRY_POLICY, _i as InputTypeDefinition, _n as CredentialProviderLayer, _o as JsonValue, _r as HealthResponse, _t as BlurTransform, a as buildNamingContext, aa as NodeConnectionValidator, ai as ImageDescriptionOutput, an as MergePdfParams, ao as memoryCircuitBreakerStoreLayer, ar as MiddlewareContext, at as trimVideoParamsSchema, b as TypedFlowEdge, ba as ImmediateBackoff, bi as inputTypeRegistry, bn as ParallelScheduler, bo as jsonValueSchema, br as formatHealthAsText, bt as FlipTransform, c as interpolateFileName, ca as TypeCompatibilityChecker, ci as STORAGE_OUTPUT_TYPE_ID, cn as DocumentAiContext, co as DeadLetterQueueKVStore, cr as MiddlewareServiceLive, ct as ResizeVideoParams, d as runArgsSchema, da as completeNodeExecution, di as ocrOutputSchema, dn as DocumentAiPluginShape, do as TypedKvStore, dr as CircuitBreakerHealthSummary, dt as extractFrameVideoParamsSchema, ea as FlowDeadLetterQueueConfig, ei as DeadLetterProcessResult, en as ImageAiPluginShape, eo as DistributedCircuitBreaker, er as createUploadEngine, et as VideoPluginLayer, f as FlowInputMap, fa as createOutputGuard, fi as OutputTypeDefinition, fn as OcrParams, fo as UploadFileKVStore, fr as ComponentHealth, ft as DescribeVideoMetadata, g as NodeDefinition, ga as BackoffStrategy, gi as validateFlowOutput, gn as CredentialProvider, go as uploadFileKvStore, gr as HealthComponents, gt as ImagePluginShape, h as FlowRequirements, ha as waitingNodeExecution, hi as outputTypeRegistry, hn as OcrTaskType, ho as jsonSerializer, hr as HealthCheckConfig, ht as ImagePluginLayer, i as applyFileNaming, ia as NarrowTypedOutput, ii as IMAGE_DESCRIPTION_OUTPUT_TYPE_ID, in as DocumentPluginShape, io as makeMemoryCircuitBreakerStore, ir as Middleware, it as TrimVideoParams, j as isInitOperation, ja as FlowEventDlqRetryFailed, ji as DataStoreCapabilities, jn as ResolveEffect, jo as CircuitBreakerEventHandler, jr as WebSocketConnection, jt as TransformationType, k as isFinalizeOperation, ka as FlowEventDlqItemExhausted, ki as DEFAULT_STREAMING_CONFIG, kn as ExtractLayerService, ko as CircuitBreakerConfig, kr as flowEventEmitter, kt as TransformImageParams, l as validatePattern, la as TypedOutput, li as STREAMING_INPUT_TYPE_ID, ln as DocumentAiPlugin, lo as FlowJobKVStore, lr as InputFile, lt as resizeVideoParamsSchema, m as FlowPluginRequirements, ma as isStreamingInputV1, mi as OutputValidationResult, mn as OcrResult, mo as flowJobKvStore, mr as DlqHealthSummary, mt as ImagePlugin, n as resolveUploadMetadata, na as FlowNodeData, ni as DeadLetterRetryAllResult, nn as DocumentPlugin, no as kvCircuitBreakerStoreLayer, nr as compareMimeTypes, nt as VideoStreamInput, o as getBaseName, oa as NodeExecutionResult, oi as OCR_OUTPUT_TYPE_ID, on as SplitPdfParams, oo as BaseKvStore, or as MiddlewareNext, ot as TranscodeVideoParams, p as FlowOutputMap, pa as isStorageOutputV1, pi as OutputTypeRegistry, pn as OcrResolution, po as deadLetterQueueKvStore, pr as DEFAULT_HEALTH_CHECK_CONFIG, pt as describeVideoMetadataSchema, q as ZipPluginShape, qa as ConditionField, qi as BuiltInTypedOutput, qn as flowEngine, qr as FlowJobTraceContext, qt as ResizeParams, r as AVAILABLE_TEMPLATE_VARIABLES, ra as NamingContext, ri as DeadLetterRetryAttempt, rn as DocumentPluginLayer, ro as makeKvCircuitBreakerStore, rr as detectMimeType, rt as VideoStreamOptions, s as getExtension, sa as NodeTypeMap, si as OcrOutput, sn as SplitPdfResult, so as BaseKvStoreService, sr as MiddlewareService, st as transcodeVideoParamsSchema, t as ResolvedUploadMetadata, ta as FlowNode, ti as DeadLetterQueueStats, tn as DocumentMetadata, to as DistributedCircuitBreakerRegistry, tr as uploadEngine, tt as VideoPluginShape, u as RunArgs, ua as TypedOutputGuard, ui as imageDescriptionOutputSchema, un as DocumentAiPluginLayer, uo as KvStore, ur as inputFileSchema, ut as ExtractFrameVideoParams, v as TypedFlow, va as ExponentialBackoff, vi as InputTypeRegistry, vn as CredentialProviderShape, vo as UploadFile, vr as HealthResponseFormat, vt as BrightnessTransform, w as filterOutputsByType, wa as isErrorRetryable, wi as FlowExecutionResult, wn as TransformMode, wo as CircuitBreakerStateValue, wr as EventEmitter, wt as ResizeTransform, x as createFlow, xa as RetryPolicy, xi as validateFlowInput, xn as ParallelSchedulerConfig, xo as traceContextSchema, xr as getHealthResponseFormat, xt as GrayscaleTransform, y as TypedFlowConfig, ya as FixedBackoff, yi as InputValidationResult, yn as ExecutionLevel, yo as UploadFileTraceContext, yr as HealthStatus, yt as ContrastTransform, z as DescribeImageParams, za as FlowEventJobEnd, zi as UploadFileDataStoresShape, zn as FlowEngineLayer, zr as DeadLetterQueueService, zt as resizeTransformSchema } from "./index-zxscP_nP.mjs";
|
|
4
|
+
import { a as Md5, c as isSupportedAlgorithm, d as GenerateIdRandom, f as GenerateIdService, i as once, l as GenerateId, m as GenerateIdTimestamp, n as throttle, o as ChecksumAlgorithm, p as GenerateIdShape, r as OnceEffect, s as computeChecksum, t as ThrottleEffect, u as GenerateIdLive } from "./index-D1xVo0kN.mjs";
|
|
5
|
+
import { n as streamLimiter, t as StreamLimiterEffect } from "./index-D_yZmNYw.mjs";
|
|
6
6
|
export { AVAILABLE_TEMPLATE_VARIABLES, AllowRequestResult, AutoNamingSuffixGenerator, BackoffStrategy, BaseEventEmitter, BaseEventEmitterService, BaseKvStore, BaseKvStoreService, BlurTransform, BrightnessTransform, BufferedUploadFileDataStore, BuiltInNodeType, BuiltInTypedOutput, ChecksumAlgorithm, CircuitBreakerConfig, CircuitBreakerEvent, CircuitBreakerEventHandler, CircuitBreakerFallback, CircuitBreakerHealthSummary, CircuitBreakerState, CircuitBreakerStateData, CircuitBreakerStateValue, CircuitBreakerStats, CircuitBreakerStore, CircuitBreakerStoreService, ComponentHealth, ConditionField, ConditionOperator, ConditionValue, ContrastTransform, CredentialProvider, CredentialProviderLayer, CredentialProviderShape, CustomTypedOutput, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_HEALTH_CHECK_CONFIG, DEFAULT_MULTIPART_PART_SIZE, DEFAULT_RETRY_POLICY, DEFAULT_STREAMING_CONFIG, DataStore, DataStoreCapabilities, DataStoreConfig, DataStoreWriteOptions, DeadLetterCleanupOptions, DeadLetterCleanupResult, DeadLetterError, DeadLetterItem, DeadLetterItemStatus, DeadLetterListOptions, DeadLetterProcessResult, DeadLetterQueueKVStore, DeadLetterQueueService, DeadLetterQueueServiceShape, DeadLetterQueueStats, DeadLetterRetryAllResult, DeadLetterRetryAttempt, DescribeImageParams, DescribeVideoMetadata, DistributedCircuitBreaker, DistributedCircuitBreakerRegistry, DlqEvent, DlqHealthSummary, DocumentAiContext, DocumentAiPlugin, DocumentAiPluginLayer, DocumentAiPluginShape, DocumentMetadata, DocumentPlugin, DocumentPluginLayer, DocumentPluginShape, ERROR_CATALOG as ERRORS, ERROR_CATALOG, EventBroadcaster, EventBroadcasterService, EventEmitter, EventType, ExecutionLevel, ExponentialBackoff, ExtractEffectError, ExtractEffectRequirements, ExtractFrameVideoParams, ExtractLayerService, ExtractLayerServices, FileNamingConfig, FileNamingFunction, FixedBackoff, FlipTransform, Flow, FlowCircuitBreakerConfig, FlowCircuitBreakerFallback, FlowCondition, FlowConfig, FlowData, FlowDeadLetterQueueConfig, FlowEdge, FlowEngine, FlowEngineLayer, FlowEngineOptions, FlowEngineShape, FlowEvent, FlowEventDlqItemAdded, FlowEventDlqItemExhausted, FlowEventDlqItemResolved, FlowEventDlqRetryFailed, FlowEventDlqRetryStart, FlowEventDlqRetrySuccess, FlowEventEmitter, FlowEventFlowCancel, FlowEventFlowEnd, FlowEventFlowError, FlowEventFlowPause, FlowEventFlowStart, FlowEventJobEnd, FlowEventJobStart, FlowEventNodeEnd, FlowEventNodeError, FlowEventNodePause, FlowEventNodeResponse, FlowEventNodeResume, FlowEventNodeStart, FlowExecutionResult, FlowInputMap, FlowJob, FlowJobKVStore, FlowJobStatus, FlowJobTask, FlowJobTaskStatus, FlowJobTraceContext, FlowNode, FlowNodeData, FlowOutputMap, FlowPluginRequirements, FlowProvider, FlowProviderShape, FlowRequirements, FlowWaitUntil, GenerateId, GenerateIdLive, GenerateIdRandom, GenerateIdService, GenerateIdShape, GenerateIdTimestamp, GrayscaleTransform, HealthCheckConfig, HealthComponents, HealthResponse, HealthResponseFormat, HealthStatus, IMAGE_DESCRIPTION_OUTPUT_TYPE_ID, ImageAiContext, ImageAiPlugin, ImageAiPluginLayer, ImageAiPluginShape, ImageDescriptionOutput, ImagePlugin, ImagePluginLayer, ImagePluginShape, ImmediateBackoff, InputData, InputFile, InputNodeParams, InputTypeDefinition, InputTypeRegistry, InputValidationResult, JsonValue, KvStore, LogoTransform, Md5, MergePdfParams, Middleware, MiddlewareContext, MiddlewareNext, MiddlewareService, MiddlewareServiceLive, NamingContext, NarrowTypedOutput, NarrowedTypedOutput, NegotiatedStrategy, NodeConnectionValidator, NodeDefinition, NodeDefinitionsRecord, NodeExecutionResult, NodeType, NodeTypeMap, OCR_OUTPUT_TYPE_ID, OcrOutput, OcrParams, OcrResolution, OcrResult, OcrTaskType, OnceEffect, OptimizeParams, OutputTypeDefinition, OutputTypeRegistry, OutputValidationResult, OverlayPosition, ParallelScheduler, ParallelSchedulerConfig, Plugin, PluginLayer, RemoveBackgroundParams, ResizeParams, ResizeTransform, ResizeVideoParams, ResolveEffect, ResolvedUploadMetadata, RetryPolicy, RotateTransform, RunArgs, STORAGE_OUTPUT_TYPE_ID, STREAMING_INPUT_TYPE_ID, ScanMetadata, ScanResult, SepiaTransform, SharpenTransform, SplitPdfParams, SplitPdfResult, StreamLimiterEffect, StreamWriteOptions, StreamWriteResult, StreamingConfig, StreamingTransformFn, StreamingTransformResult, TextTransform, ThrottleEffect, TranscodeVideoParams, TransformImageParams, TransformMode, TransformNodeConfig, Transformation, TransformationType, TrimVideoParams, TypeCompatibilityChecker, TypedEventEmitter, TypedFlow, TypedFlowConfig, TypedFlowEdge, TypedKvStore, TypedOutput, TypedOutputGuard, UploadEngine, UploadEngineOptions, UploadEngineShape, UploadEvent, UploadEventEmitter, UploadEventType, UploadFile, UploadFileDataStore, UploadFileDataStores, UploadFileDataStoresShape, UploadFileKVStore, UploadFileTraceContext, UploadStrategy, UploadStrategyNegotiator, UploadStrategyOptions, UploadistaError, UploadistaErrorCode, VideoPlugin, VideoPluginLayer, VideoPluginShape, VideoStreamInput, VideoStreamOptions, VirusScanPlugin, VirusScanPluginLayer, VirusScanPluginShape, WaitUntilCallback, WatermarkTransform, WebSocketConnection, WebSocketMessage, ZipInput, ZipParams, ZipPlugin, ZipPluginLayer, ZipPluginShape, applyFileNaming, blurTransformSchema, brightnessTransformSchema, buildNamingContext, calculateBackoffDelay, calculateExpirationDate, compareMimeTypes, completeNodeExecution, computeChecksum, contrastTransformSchema, createDataStoreLayer, createDeadLetterQueueService, createFlow, createFlowEdge, createFlowEngine, createFlowNode, createFlowWithSchema, createInitialCircuitBreakerState, createInputNode, createOutputGuard, createTransformNode, createTypeGuard, createUploadEngine, deadLetterQueueKvStore, deadLetterQueueService, describeImageParamsSchema, describeVideoMetadataSchema, detectMimeType, eventToMessageSerializer, extractFrameVideoParamsSchema, filterOutputsByType, flipTransformSchema, flowEngine, flowEventEmitter, flowJobKvStore, formatHealthAsText, getBaseName, getExtension, getFirstOutputByType, getFlowData, getHealthResponseFormat, getNodeData, getOutputByNodeId, getSingleOutputByType, grayscaleTransformSchema, hasOutputOfType, httpFailure, imageDescriptionOutputSchema, inputDataSchema, inputFileSchema, inputNodeParamsSchema, inputTypeRegistry, interpolateFileName, isDataStore, isErrorRetryable, isFinalizeOperation, isImageDescriptionOutput, isInitOperation, isOcrOutput, isStorageOutput, isStorageOutputV1, isStreamingInputV1, isSupportedAlgorithm, isUploadFile, isUploadOperation, isUploadistaError, isUrlOperation, jsonSerializer, jsonValueSchema, kvCircuitBreakerStoreLayer, logoTransformSchema, makeKvCircuitBreakerStore, makeMemoryCircuitBreakerStore, memoryCircuitBreakerStoreLayer, ocrOutputSchema, once, optimizeParamsSchema, outputTypeRegistry, removeBackgroundParamsSchema, resizeParamsSchema, resizeTransformSchema, resizeVideoParamsSchema, resolveUploadMetadata, rotateTransformSchema, runArgsSchema, sepiaTransformSchema, sharpenTransformSchema, streamLimiter, textTransformSchema, throttle, traceContextSchema, transcodeVideoParamsSchema, transformImageParamsSchema, transformationSchema, trimVideoParamsSchema, uploadEngine, uploadEventEmitter, uploadEventSchema, uploadFileKvStore, uploadFileSchema, validateFlowInput, validateFlowOutput, validatePattern, waitingNodeExecution, watermarkTransformSchema, webSocketMessageSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as ee,n as te,r as e,t}from"./uploadista-error-
|
|
1
|
+
import{i as ee,n as te,r as e,t}from"./uploadista-error-9mF4Z7sn.mjs";import"./errors-DuxBpAc7.mjs";import{$ as n,A as r,At as i,B as a,Bt as o,C as s,Ct as c,D as l,Dt as u,E as d,Et as f,F as p,Ft as m,G as h,Gt as g,H as _,Ht as v,I as y,It as b,J as x,Jt as S,K as C,Kt as w,L as T,Lt as E,M as D,Mt as O,N as k,Nt as A,O as j,Ot as M,P as N,Pt as P,Q as F,R as I,Rt as L,S as R,St as z,T as B,Tt as V,U as H,Ut as U,V as W,Vt as G,W as K,Wt as q,X as J,Y,Yt as X,Z,_ as Q,_t as ne,a as re,at as ie,b as ae,bt as oe,c as se,ct as ce,d as le,dt as ue,et as de,f as fe,ft as pe,g as me,gt as he,h as ge,ht as _e,i as ve,it as ye,j as be,jt as xe,k as Se,kt as Ce,l as we,lt as Te,m as Ee,mt as De,n as Oe,nt as ke,o as Ae,ot as je,p as Me,pt as Ne,q as Pe,qt as $,r as Fe,rt as Ie,s as Le,st as Re,t as ze,tt as Be,u as Ve,ut as He,v as Ue,vt as We,w as Ge,wt as Ke,x as qe,xt as Je,y as Ye,yt as Xe,z as Ze,zt as Qe}from"./flow-DyFRaN5b.mjs";import{A as $e,C as et,D as tt,E as nt,F as rt,I as it,L as at,M as ot,N as st,O as ct,P as lt,R as ut,S as dt,T as ft,_ as pt,a as mt,b as ht,c as gt,d as _t,f as vt,g as yt,h as bt,i as xt,j as St,k as Ct,l as wt,m as Tt,n as Et,o as Dt,p as Ot,r as kt,s as At,t as jt,u as Mt,v as Nt,w as Pt,x as Ft,y as It}from"./types-5ZELMVfM.mjs";import{c as Lt,i as Rt,n as zt,r as Bt,s as Vt,t as Ht}from"./upload-QExBZ_3g.mjs";import{a as Ut,i as Wt,n as Gt,o as Kt,r as qt,s as Jt,t as Yt}from"./checksum-Bhch-SRg.mjs";import{n as Xt,t as Zt}from"./stream-limiter-CUS1_6KZ.mjs";import"./streams/index.mjs";import{a as Qt,i as $t,n as en,r as tn,t as nn}from"./utils-BwUQGiMC.mjs";export{p as AVAILABLE_TEMPLATE_VARIABLES,Mt as BaseEventEmitterService,ct as BaseKvStoreService,Nt as BufferedUploadFileDataStore,at as CircuitBreakerStoreService,k as CredentialProvider,X as DEFAULT_CIRCUIT_BREAKER_CONFIG,At as DEFAULT_HEALTH_CHECK_CONFIG,It as DEFAULT_MULTIPART_PART_SIZE,Ne as DEFAULT_RETRY_POLICY,ht as DEFAULT_STREAMING_CONFIG,Ct as DeadLetterQueueKVStore,He as DeadLetterQueueService,U as DistributedCircuitBreaker,q as DistributedCircuitBreakerRegistry,D as DocumentAiPlugin,be as DocumentPlugin,t as ERRORS,t as ERROR_CATALOG,pt as EventBroadcasterService,G as EventType,_ as FlowEngine,_t as FlowEventEmitter,$e as FlowJobKVStore,H as FlowProvider,K as FlowWaitUntil,qt as GenerateId,Wt as GenerateIdLive,Ut as GenerateIdRandom,Kt as GenerateIdService,Jt as GenerateIdTimestamp,ne as IMAGE_DESCRIPTION_OUTPUT_TYPE_ID,r as ImageAiPlugin,Se as ImagePlugin,L as InputTypeRegistry,Qt as Md5,xt as MiddlewareService,mt as MiddlewareServiceLive,O as NodeType,We as OCR_OUTPUT_TYPE_ID,tn as OnceEffect,m as OutputTypeRegistry,Te as ParallelScheduler,Xe as STORAGE_OUTPUT_TYPE_ID,oe as STREAMING_INPUT_TYPE_ID,Zt as StreamLimiterEffect,nn as ThrottleEffect,vt as TypedEventEmitter,St as TypedKvStore,zt as UploadEngine,Ot as UploadEventEmitter,Et as UploadEventType,Ft as UploadFileDataStore,dt as UploadFileDataStores,ot as UploadFileKVStore,Ht as UploadStrategyNegotiator,te as UploadistaError,re as VideoPlugin,ve as VirusScanPlugin,Fe as ZipPlugin,y as applyFileNaming,Le as blurTransformSchema,se as brightnessTransformSchema,T as buildNamingContext,De as calculateBackoffDelay,_e as calculateExpirationDate,Vt as compareMimeTypes,u as completeNodeExecution,Yt as computeChecksum,we as contrastTransformSchema,et as createDataStoreLayer,ue as createDeadLetterQueueService,Oe as createFlow,v as createFlowEdge,h as createFlowEngine,A as createFlowNode,Pe as createFlowWithSchema,ut as createInitialCircuitBreakerState,c as createInputNode,M as createOutputGuard,N as createTransformNode,Y as createTypeGuard,Bt as createUploadEngine,st as deadLetterQueueKvStore,pe as deadLetterQueueService,j as describeImageParamsSchema,l as describeVideoMetadataSchema,Lt as detectMimeType,Tt as eventToMessageSerializer,d as extractFrameVideoParamsSchema,J as filterOutputsByType,Ve as flipTransformSchema,C as flowEngine,bt as flowEventEmitter,lt as flowJobKvStore,gt as formatHealthAsText,I as getBaseName,Ze as getExtension,Z as getFirstOutputByType,x as getFlowData,wt as getHealthResponseFormat,P as getNodeData,F as getOutputByNodeId,n as getSingleOutputByType,le as grayscaleTransformSchema,de as hasOutputOfType,e as httpFailure,Je as imageDescriptionOutputSchema,Ke as inputDataSchema,Dt as inputFileSchema,V as inputNodeParamsSchema,Qe as inputTypeRegistry,a as interpolateFileName,Pt as isDataStore,he as isErrorRetryable,Be as isFinalizeOperation,ke as isImageDescriptionOutput,Ie as isInitOperation,ye as isOcrOutput,ie as isStorageOutput,Ce as isStorageOutputV1,i as isStreamingInputV1,Gt as isSupportedAlgorithm,je as isUploadFile,Re as isUploadOperation,ee as isUploadistaError,ce as isUrlOperation,rt as jsonSerializer,ft as jsonValueSchema,g as kvCircuitBreakerStoreLayer,fe as logoTransformSchema,w as makeKvCircuitBreakerStore,$ as makeMemoryCircuitBreakerStore,S as memoryCircuitBreakerStoreLayer,z as ocrOutputSchema,$t as once,B as optimizeParamsSchema,b as outputTypeRegistry,Ge as removeBackgroundParamsSchema,s as resizeParamsSchema,Me as resizeTransformSchema,R as resizeVideoParamsSchema,f as resolveUploadMetadata,Ee as rotateTransformSchema,ze as runArgsSchema,ge as sepiaTransformSchema,me as sharpenTransformSchema,Xt as streamLimiter,Q as textTransformSchema,en as throttle,nt as traceContextSchema,qe as transcodeVideoParamsSchema,Ue as transformImageParamsSchema,Ye as transformationSchema,Ae as trimVideoParamsSchema,Rt as uploadEngine,yt as uploadEventEmitter,kt as uploadEventSchema,it as uploadFileKvStore,tt as uploadFileSchema,o as validateFlowInput,E as validateFlowOutput,W as validatePattern,xe as waitingNodeExecution,ae as watermarkTransformSchema,jt as webSocketMessageSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./uploadista-error-
|
|
2
|
-
//# sourceMappingURL=stream-limiter-
|
|
1
|
+
import{n as e}from"./uploadista-error-9mF4Z7sn.mjs";import{Effect as t,Ref as n,Stream as r}from"effect";function i({maxSize:t,onData:n}){let r=0;return new TransformStream({transform(i,a){r+=i.length,n?.(i.byteLength),r>t?a.error(e.fromCode(`ERR_MAX_SIZE_EXCEEDED`)):a.enqueue(i)}})}const a={limit:({maxSize:i,onData:a})=>o=>t.gen(function*(){let s=yield*n.make(0);return o.pipe(r.mapEffect(r=>t.gen(function*(){let t=r instanceof Uint8Array?r.byteLength:0;return yield*n.update(s,e=>e+t),a?.(t),(yield*n.get(s))>i&&(yield*e.fromCode(`ERR_MAX_SIZE_EXCEEDED`).toEffect()),r})))}).pipe(r.unwrap),createTransformStream:e=>i(e)};export{i as n,a as t};
|
|
2
|
+
//# sourceMappingURL=stream-limiter-CUS1_6KZ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-limiter-
|
|
1
|
+
{"version":3,"file":"stream-limiter-CUS1_6KZ.mjs","names":[],"sources":["../src/streams/stream-limiter.ts"],"sourcesContent":["import { Effect, Ref, Stream } from \"effect\";\nimport { UploadistaError } from \"../errors/uploadista-error\";\n\ntype StreamLimiterOptions = {\n maxSize: number;\n onData?: (chunkSize: number) => void;\n};\n\nexport function streamLimiter({\n maxSize,\n onData,\n}: StreamLimiterOptions): TransformStream {\n let currentSize = 0;\n\n return new TransformStream({\n transform(chunk, controller) {\n currentSize += chunk.length;\n\n onData?.(chunk.byteLength);\n\n if (currentSize > maxSize) {\n controller.error(UploadistaError.fromCode(\"ERR_MAX_SIZE_EXCEEDED\"));\n } else {\n controller.enqueue(chunk);\n }\n },\n });\n}\n\n/**\n * Effect-based stream limiter that restricts stream size\n */\nexport const StreamLimiterEffect = {\n /**\n * Creates an Effect-based stream limiter\n * @param maxSize - Maximum allowed stream size in bytes\n * @param onData - Optional callback for data progress tracking\n * @returns Effect stream transformation that enforces size limits\n */\n limit:\n ({ maxSize, onData }: StreamLimiterOptions) =>\n <A>(stream: Stream.Stream<A, UploadistaError>) => {\n return Effect.gen(function* () {\n const currentSize = yield* Ref.make(0);\n\n return stream.pipe(\n Stream.mapEffect((chunk) =>\n Effect.gen(function* () {\n const chunkSize =\n chunk instanceof Uint8Array ? chunk.byteLength : 0;\n yield* Ref.update(currentSize, (size) => size + chunkSize);\n\n onData?.(chunkSize);\n const size = yield* Ref.get(currentSize);\n if (size > maxSize) {\n yield* UploadistaError.fromCode(\n \"ERR_MAX_SIZE_EXCEEDED\",\n ).toEffect();\n }\n\n return chunk;\n }),\n ),\n );\n }).pipe(Stream.unwrap);\n },\n\n /**\n * Creates a legacy TransformStream-based limiter\n * @param options - Stream limiter options\n * @returns TransformStream that enforces size limits\n */\n createTransformStream: (options: StreamLimiterOptions): TransformStream =>\n streamLimiter(options),\n};\n"],"mappings":"yGAQA,SAAgB,EAAc,CAC5B,UACA,UACwC,CACxC,IAAI,EAAc,EAElB,OAAO,IAAI,gBAAgB,CACzB,UAAU,EAAO,EAAY,CAC3B,GAAe,EAAM,OAErB,IAAS,EAAM,WAAW,CAEtB,EAAc,EAChB,EAAW,MAAM,EAAgB,SAAS,wBAAwB,CAAC,CAEnE,EAAW,QAAQ,EAAM,EAG9B,CAAC,CAMJ,MAAa,EAAsB,CAOjC,OACG,CAAE,UAAS,YACR,GACK,EAAO,IAAI,WAAa,CAC7B,IAAM,EAAc,MAAO,EAAI,KAAK,EAAE,CAEtC,OAAO,EAAO,KACZ,EAAO,UAAW,GAChB,EAAO,IAAI,WAAa,CACtB,IAAM,EACJ,aAAiB,WAAa,EAAM,WAAa,EAWnD,OAVA,MAAO,EAAI,OAAO,EAAc,GAAS,EAAO,EAAU,CAE1D,IAAS,EAAU,EACN,MAAO,EAAI,IAAI,EAAY,EAC7B,IACT,MAAO,EAAgB,SACrB,wBACD,CAAC,UAAU,EAGP,GACP,CACH,CACF,EACD,CAAC,KAAK,EAAO,OAAO,CAQ1B,sBAAwB,GACtB,EAAc,EAAQ,CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./types-BFrsfDaF.cjs`);const e=require(`./uploadista-error-DgO_3oBt.cjs`);let t=require(`effect`);function n({maxSize:t,onData:n}){let r=0;return new TransformStream({transform(i,a){r+=i.length,n?.(i.byteLength),r>t?a.error(e.n.fromCode(`ERR_MAX_SIZE_EXCEEDED`)):a.enqueue(i)}})}const r={limit:({maxSize:n,onData:r})=>i=>t.Effect.gen(function*(){let a=yield*t.Ref.make(0);return i.pipe(t.Stream.mapEffect(i=>t.Effect.gen(function*(){let o=i instanceof Uint8Array?i.byteLength:0;return yield*t.Ref.update(a,e=>e+o),r?.(o),(yield*t.Ref.get(a))>n&&(yield*e.n.fromCode(`ERR_MAX_SIZE_EXCEEDED`).toEffect()),i})))}).pipe(t.Stream.unwrap),createTransformStream:e=>n(e)};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
package/dist/streams/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../uploadista-error-
|
|
1
|
+
require(`../uploadista-error-DgO_3oBt.cjs`);const e=require(`../stream-limiter-DzdI9yEA.cjs`);exports.StreamLimiterEffect=e.t,exports.streamLimiter=e.n;
|
package/dist/streams/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as streamLimiter, t as StreamLimiterEffect } from "../index-
|
|
1
|
+
import { n as streamLimiter, t as StreamLimiterEffect } from "../index-trGSFkYe.cjs";
|
|
2
2
|
export { StreamLimiterEffect, streamLimiter };
|
package/dist/streams/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../uploadista-error-
|
|
2
|
-
import { n as streamLimiter, t as StreamLimiterEffect } from "../index-
|
|
1
|
+
import "../uploadista-error-BeyPhCWJ.mjs";
|
|
2
|
+
import { n as streamLimiter, t as StreamLimiterEffect } from "../index-D_yZmNYw.mjs";
|
|
3
3
|
export { StreamLimiterEffect, streamLimiter };
|
package/dist/streams/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../uploadista-error-
|
|
1
|
+
import"../uploadista-error-9mF4Z7sn.mjs";import{n as e,t}from"../stream-limiter-CUS1_6KZ.mjs";export{t as StreamLimiterEffect,e as streamLimiter};
|
package/dist/testing/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../types-
|
|
1
|
+
const e=require(`../types-BFrsfDaF.cjs`);require(`../uploadista-error-DgO_3oBt.cjs`),require(`../errors-CRm1FHHT.cjs`);const t=require(`../flow-CgCcLsPP.cjs`),n=require(`../upload-GilwoZG7.cjs`);require(`../checksum-CrfdHugi.cjs`),require(`../stream-limiter-DzdI9yEA.cjs`);let r=require(`effect`);const i=r.Layer.succeed(t.M,t.M.of({performOCR:(e,t,n)=>r.Effect.sync(()=>({extractedText:t.taskType===`convertToMarkdown`?`# Document Title
|
|
2
2
|
|
|
3
3
|
This is a paragraph with **bold** text.
|
|
4
4
|
|
|
@@ -6,4 +6,4 @@ This is a paragraph with **bold** text.
|
|
|
6
6
|
|
|
7
7
|
- List item 1
|
|
8
8
|
- List item 2`:`Plain text extracted from document without formatting.`,format:t.taskType===`convertToMarkdown`?`markdown`:`plain`,confidence:.95}))})),a=r.Layer.succeed(t.j,t.j.of({extractText:e=>r.Effect.sync(()=>`This is extracted text from a PDF document.
|
|
9
|
-
Page 1 content.`),splitPdf:(e,t)=>r.Effect.sync(()=>t.mode===`range`?{mode:`range`,pdf:new Uint8Array(500).fill(80)}:{mode:`individual`,pdfs:[new Uint8Array(200).fill(81),new Uint8Array(200).fill(82),new Uint8Array(200).fill(83)]}),mergePdfs:e=>r.Effect.sync(()=>{let t=e.pdfs.reduce((e,t)=>e+t.byteLength,0);return new Uint8Array(t).fill(90)}),getMetadata:e=>r.Effect.sync(()=>({pageCount:5,format:`pdf`,author:`Test Author`,title:`Test Document`,subject:`Test Subject`,creator:`Test Creator`,creationDate:`2024-01-01T00:00:00Z`,modifiedDate:`2024-01-02T00:00:00Z`,fileSize:e.byteLength}))})),o=r.Layer.succeed(t.A,t.A.of({removeBackground:(e,t)=>r.Effect.sync(()=>({outputUrl:e.replace(`.jpg`,`-no-bg.png`)})),describeImage:(e,t)=>r.Effect.sync(()=>({description:`A test image from ${e}`}))})),s=r.Layer.succeed(t.k,t.k.of({optimize:(e,t)=>r.Effect.sync(()=>{let n=t.quality/100,r=Math.floor(e.byteLength*n);return new Uint8Array(r).fill(128)}),resize:(e,t)=>r.Effect.sync(()=>{let e=t.width||800,n=t.height||600,r=Math.floor(e*n/10);return new Uint8Array(r).fill(100)}),transform:(e,t)=>r.Effect.sync(()=>t.type===`rotate`&&t.angle===90?new Uint8Array(e.byteLength+10).fill(150):t.type===`blur`?new Uint8Array(e.byteLength).fill(180):t.type===`grayscale`?new Uint8Array(e.byteLength).fill(128):new Uint8Array(e.byteLength).fill(200))})),c
|
|
9
|
+
Page 1 content.`),splitPdf:(e,t)=>r.Effect.sync(()=>t.mode===`range`?{mode:`range`,pdf:new Uint8Array(500).fill(80)}:{mode:`individual`,pdfs:[new Uint8Array(200).fill(81),new Uint8Array(200).fill(82),new Uint8Array(200).fill(83)]}),mergePdfs:e=>r.Effect.sync(()=>{let t=e.pdfs.reduce((e,t)=>e+t.byteLength,0);return new Uint8Array(t).fill(90)}),getMetadata:e=>r.Effect.sync(()=>({pageCount:5,format:`pdf`,author:`Test Author`,title:`Test Document`,subject:`Test Subject`,creator:`Test Creator`,creationDate:`2024-01-01T00:00:00Z`,modifiedDate:`2024-01-02T00:00:00Z`,fileSize:e.byteLength}))})),o=r.Layer.succeed(t.A,t.A.of({removeBackground:(e,t)=>r.Effect.sync(()=>({outputUrl:e.replace(`.jpg`,`-no-bg.png`)})),describeImage:(e,t)=>r.Effect.sync(()=>({description:`A test image from ${e}`}))})),s=r.Layer.succeed(t.k,t.k.of({optimize:(e,t)=>r.Effect.sync(()=>{let n=t.quality/100,r=Math.floor(e.byteLength*n);return new Uint8Array(r).fill(128)}),resize:(e,t)=>r.Effect.sync(()=>{let e=t.width||800,n=t.height||600,r=Math.floor(e*n/10);return new Uint8Array(r).fill(100)}),transform:(e,t)=>r.Effect.sync(()=>t.type===`rotate`&&t.angle===90?new Uint8Array(e.byteLength+10).fill(150):t.type===`blur`?new Uint8Array(e.byteLength).fill(180):t.type===`grayscale`?new Uint8Array(e.byteLength).fill(128):new Uint8Array(e.byteLength).fill(200))})),c=r.Layer.succeed(n.n,n.n.of({read:(e,t)=>r.Effect.sync(()=>{if(e.toLowerCase().includes(`infected`)||e.toLowerCase().includes(`virus`)||e.toLowerCase().includes(`malware`)||e.toLowerCase().includes(`eicar`))return new TextEncoder().encode(`X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*`);let t=`Content of file ${e}`;return new TextEncoder().encode(t)}),readStream:(t,n,i)=>r.Effect.sync(()=>{let n={...e.b,...i},a=`Content of file ${t}`,o=new TextEncoder().encode(a),s=n.chunkSize,c=[];for(let e=0;e<o.length;e+=s)c.push(o.slice(e,e+s));return r.Stream.fromIterable(c)}),uploadStream:(e,t,n)=>r.Effect.gen(function*(){let t=[];yield*r.Stream.runForEach(n,e=>r.Effect.sync(()=>{t.push(e)}));let i=t.reduce((e,t)=>e+t.length,0),a=typeof e.metadata==`string`?JSON.parse(e.metadata):e.metadata||{},o=e.fileName?e.fileName.split(`.`).pop():a.extension,s=`stream-uploaded-${Date.now()}-${Math.random().toString(36).substring(7)}`;return{id:s,offset:i,size:i,storage:{id:e.storageId,type:`memory`},metadata:{...a,mimeType:e.type,type:e.type,"content-type":e.type,fileName:e.fileName,originalName:e.fileName,name:e.fileName,extension:o},url:`http://test-storage/${s}`,creationDate:new Date().toISOString()}}),upload:(e,t,n)=>r.Effect.gen(function*(){let t=n.getReader(),i=0,a=[];for(;;){let{done:e,value:n}=yield*r.Effect.promise(()=>t.read());if(e)break;n&&(a.push(n),i+=n.byteLength)}let o=typeof e.metadata==`string`?JSON.parse(e.metadata):e.metadata||{},s=e.fileName?e.fileName.split(`.`).pop():o.extension;return{id:`uploaded-${Date.now()}-${Math.random().toString(36).substring(7)}`,offset:i,size:i,storage:{id:e.storageId,type:`memory`},metadata:{...o,mimeType:e.type,type:e.type,"content-type":e.type,fileName:e.fileName,originalName:e.fileName,name:e.fileName,extension:s},creationDate:new Date().toISOString()}}),delete:(e,t)=>r.Effect.void,createUpload:(e,t)=>r.Effect.succeed({id:`uploaded-${Date.now()}-${Math.random().toString(36).substring(7)}`,offset:0,size:0,storage:{id:e.storageId,type:`memory`},metadata:typeof e.metadata==`string`?JSON.parse(e.metadata):e.metadata}),uploadChunk:(e,t,n)=>r.Effect.gen(function*(){let t=n.getReader(),i=0,a=[];for(;;){let{done:e,value:n}=yield*r.Effect.promise(()=>t.read());if(e)break;n&&(a.push(n),i+=n.byteLength)}return{id:e,offset:i,size:i,storage:{id:`test-storage`,type:`memory`},metadata:{mimeType:`application/octet-stream`,extension:`bin`},creationDate:new Date().toISOString()}}),getCapabilities:(e,t)=>r.Effect.succeed({supportsParallelUploads:!0,supportsConcatenation:!0,supportsDeferredLength:!0,supportsResumableUploads:!0,supportsTransactionalUploads:!1,supportsStreamingRead:!0,supportsStreamingWrite:!0,maxConcurrentUploads:10,minChunkSize:5*1024*1024,maxChunkSize:100*1024*1024,maxParts:1e4,optimalChunkSize:10*1024*1024,requiresOrderedChunks:!1,requiresMimeTypeValidation:!1}),uploadFromUrl:(e,t,n)=>r.Effect.succeed({id:`uploaded-from-url-${Date.now()}-${Math.random().toString(36).substring(7)}`,offset:0,size:0,storage:{id:e.storageId,type:`memory`},metadata:typeof e.metadata==`string`?JSON.parse(e.metadata):e.metadata,url:n,creationDate:new Date().toISOString()}),getUpload:e=>r.Effect.succeed({id:e,offset:0,size:1024,storage:{id:`test-storage`,type:`memory`},metadata:{mimeType:`text/plain`,originalName:`file-${e}.txt`,extension:`txt`},creationDate:new Date().toISOString()}),subscribeToUploadEvents:(e,t)=>r.Effect.void,unsubscribeFromUploadEvents:e=>r.Effect.void})),l=r.Layer.succeed(t.a,t.a.of({describe:e=>r.Effect.sync(()=>({duration:120,width:1920,height:1080,codec:`h264`,format:`mp4`,bitrate:5e6,frameRate:30,aspectRatio:`16:9`,hasAudio:!0,audioCodec:`aac`,audioBitrate:128e3,size:e.byteLength})),transcode:(e,t)=>r.Effect.sync(()=>{let n=1;t.codec===`vp9`?n=.8:t.codec===`h265`&&(n=.7);let r=Math.floor(e.byteLength*n);return new Uint8Array(r).fill(42)}),resize:(e,t)=>r.Effect.sync(()=>{let e=t.width||1280,n=t.height||720,r=Math.floor(e*n/50);return new Uint8Array(r).fill(84)}),trim:(e,t)=>r.Effect.sync(()=>{let n;n=t.duration===void 0?t.endTime===void 0?120-t.startTime:t.endTime-t.startTime:t.duration;let r=n/120,i=Math.floor(e.byteLength*r);return new Uint8Array(i).fill(63)}),extractFrame:(e,t)=>r.Effect.sync(()=>{let e=(t.format||`jpeg`)===`png`?5e4:3e4;return new Uint8Array(e).fill(255)})})),u=r.Layer.succeed(t.i,t.i.of({scan:e=>r.Effect.sync(()=>new TextDecoder().decode(e).includes(`X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*`)?{isClean:!1,detectedViruses:[`EICAR-Test-File`]}:{isClean:!0,detectedViruses:[]}),getVersion:()=>r.Effect.sync(()=>`TestVirusScanPlugin 1.0.0`)})),d=r.Layer.succeed(t.r,t.r.of({zip:(e,t)=>r.Effect.gen(function*(){let n=e.map(e=>({id:e.id,size:e.data.byteLength})),r=JSON.stringify({zipName:t.zipName,includeMetadata:t.includeMetadata,files:n});return new TextEncoder().encode(r)})}));exports.TestDocumentAiPlugin=i,exports.TestDocumentPlugin=a,exports.TestImageAiPlugin=o,exports.TestImagePlugin=s,exports.TestUploadEngine=c,exports.TestVideoPlugin=l,exports.TestVirusScanPlugin=u,exports.TestZipPlugin=d;
|
package/dist/testing/index.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { $ as VideoPlugin, G as ZipPlugin, Qt as ImageAiPlugin, X as VirusScanPlugin, Zn as UploadEngine, ln as DocumentAiPlugin, mt as ImagePlugin, nn as DocumentPlugin } from "../index-
|
|
1
|
+
import { $ as VideoPlugin, G as ZipPlugin, Qt as ImageAiPlugin, X as VirusScanPlugin, Zn as UploadEngine, ln as DocumentAiPlugin, mt as ImagePlugin, nn as DocumentPlugin } from "../index-DKwJFauU.cjs";
|
|
2
2
|
import { Layer } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/testing/mock-document-ai-plugin.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Mock DocumentAiPlugin implementation for testing.
|
|
8
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/testing/mock-document-ai-plugin.ts","../../src/testing/mock-document-plugin.ts","../../src/testing/mock-image-ai-plugin.ts","../../src/testing/mock-image-plugin.ts","../../src/testing/mock-upload-engine.ts","../../src/testing/mock-video-plugin.ts","../../src/testing/mock-virus-scan-plugin.ts","../../src/testing/mock-zip-plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/testing/mock-document-ai-plugin.ts","../../src/testing/mock-document-plugin.ts","../../src/testing/mock-image-ai-plugin.ts","../../src/testing/mock-image-plugin.ts","../../src/testing/mock-upload-engine.ts","../../src/testing/mock-video-plugin.ts","../../src/testing/mock-virus-scan-plugin.ts","../../src/testing/mock-zip-plugin.ts"],"mappings":";;;;;;AAwBA;;;;;;;;;;;;ACJA;;;;;;cDIa,oBAAA,EAAoB,KAAA,CAAA,KAAA,CAAA,gBAAA;;;;;AAAjC;;;;;;;;;;;;ACJA;;cAAa,kBAAA,EAAkB,KAAA,CAAA,KAAA,CAAA,cAAA;;;;;ADI/B;;;;;;;;;;;;ACJA;;;cCAa,iBAAA,EAAiB,KAAA,CAAA,KAAA,CAAA,aAAA;;;;;AFI9B;;;;;;;;;;;;ACJA;;;cEAa,eAAA,EAAe,KAAA,CAAA,KAAA,CAAA,WAAA;;;;;AHI5B;;;;;;;;;;;;ACJA;;;cGca,gBAAA,EAAgB,KAAA,CAAA,KAAA,CAAA,YAAA;;;;;AJV7B;;;;;;;;;;;;ACJA;;;cICa,eAAA,EAAe,KAAA,CAAA,KAAA,CAAA,WAAA;;;;;ALG5B;;;;;;;;;;;;ACJA;;;;;cKSa,mBAAA,EAAmB,KAAA,CAAA,KAAA,CAAA,eAAA;;;;;ANLhC;;;;;;;;;;;;ACJA;;;cMAa,aAAA,EAAa,KAAA,CAAA,KAAA,CAAA,SAAA"}
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import "../uploadista-error-
|
|
2
|
-
import "../index-
|
|
3
|
-
import { $ as VideoPlugin, G as ZipPlugin, Qt as ImageAiPlugin, X as VirusScanPlugin, Zn as UploadEngine, ln as DocumentAiPlugin, mt as ImagePlugin, nn as DocumentPlugin } from "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../index-
|
|
1
|
+
import "../uploadista-error-BeyPhCWJ.mjs";
|
|
2
|
+
import "../index-9iG2qHLe.mjs";
|
|
3
|
+
import { $ as VideoPlugin, G as ZipPlugin, Qt as ImageAiPlugin, X as VirusScanPlugin, Zn as UploadEngine, ln as DocumentAiPlugin, mt as ImagePlugin, nn as DocumentPlugin } from "../index-zxscP_nP.mjs";
|
|
4
|
+
import "../index-D1xVo0kN.mjs";
|
|
5
|
+
import "../index-D_yZmNYw.mjs";
|
|
6
6
|
import { Layer } from "effect";
|
|
7
7
|
|
|
8
8
|
//#region src/testing/mock-document-ai-plugin.d.ts
|
|
9
|
-
|
|
10
9
|
/**
|
|
11
10
|
* Mock DocumentAiPlugin implementation for testing.
|
|
12
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/testing/mock-document-ai-plugin.ts","../../src/testing/mock-document-plugin.ts","../../src/testing/mock-image-ai-plugin.ts","../../src/testing/mock-image-plugin.ts","../../src/testing/mock-upload-engine.ts","../../src/testing/mock-video-plugin.ts","../../src/testing/mock-virus-scan-plugin.ts","../../src/testing/mock-zip-plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/testing/mock-document-ai-plugin.ts","../../src/testing/mock-document-plugin.ts","../../src/testing/mock-image-ai-plugin.ts","../../src/testing/mock-image-plugin.ts","../../src/testing/mock-upload-engine.ts","../../src/testing/mock-video-plugin.ts","../../src/testing/mock-virus-scan-plugin.ts","../../src/testing/mock-zip-plugin.ts"],"mappings":";;;;;;;;;;;;;;AAwBA;;;;;;;;;;;;ACJA;;cDIa,oBAAA,EAAoB,KAAA,CAAA,KAAA,CAAA,gBAAA;;;;;;;;;AAAjC;;;;;;;;;;cCJa,kBAAA,EAAkB,KAAA,CAAA,KAAA,CAAA,cAAA;;;;;;;;;ADI/B;;;;;;;;;;;cEJa,iBAAA,EAAiB,KAAA,CAAA,KAAA,CAAA,aAAA;;;;;;;;;AFI9B;;;;;;;;;;;cGJa,eAAA,EAAe,KAAA,CAAA,KAAA,CAAA,WAAA;;;;;;;;;AHI5B;;;;;;;;;;;cIUa,gBAAA,EAAgB,KAAA,CAAA,KAAA,CAAA,YAAA;;;;;;;;;AJV7B;;;;;;;;;;;cKHa,eAAA,EAAe,KAAA,CAAA,KAAA,CAAA,WAAA;;;;;;;;;ALG5B;;;;;;;;;;;;ACJA;cKSa,mBAAA,EAAmB,KAAA,CAAA,KAAA,CAAA,eAAA;;;;;;;;;ANLhC;;;;;;;;;;;cOJa,aAAA,EAAa,KAAA,CAAA,KAAA,CAAA,SAAA"}
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../uploadista-error-
|
|
1
|
+
import"../uploadista-error-9mF4Z7sn.mjs";import"../errors-DuxBpAc7.mjs";import{A as e,M as t,a as n,i as r,j as i,k as a,r as o}from"../flow-DyFRaN5b.mjs";import{b as s}from"../types-5ZELMVfM.mjs";import{n as c}from"../upload-QExBZ_3g.mjs";import"../checksum-Bhch-SRg.mjs";import"../stream-limiter-CUS1_6KZ.mjs";import{Effect as l,Layer as u,Stream as d}from"effect";const f=u.succeed(t,t.of({performOCR:(e,t,n)=>l.sync(()=>({extractedText:t.taskType===`convertToMarkdown`?`# Document Title
|
|
2
2
|
|
|
3
3
|
This is a paragraph with **bold** text.
|
|
4
4
|
|
package/dist/types/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../types-
|
|
1
|
+
const e=require(`../types-BFrsfDaF.cjs`);require(`../uploadista-error-DgO_3oBt.cjs`),require(`../errors-CRm1FHHT.cjs`),exports.BaseEventEmitterService=e.u,exports.BaseKvStoreService=e.O,exports.BufferedUploadFileDataStore=e.v,exports.CircuitBreakerStoreService=e.L,exports.DEFAULT_HEALTH_CHECK_CONFIG=e.s,exports.DEFAULT_MULTIPART_PART_SIZE=e.y,exports.DEFAULT_STREAMING_CONFIG=e.b,exports.DeadLetterQueueKVStore=e.k,exports.EventBroadcasterService=e._,exports.FlowEventEmitter=e.d,exports.FlowJobKVStore=e.A,exports.MiddlewareService=e.i,exports.MiddlewareServiceLive=e.a,exports.TypedEventEmitter=e.f,exports.TypedKvStore=e.j,exports.UploadEventEmitter=e.p,exports.UploadEventType=e.n,exports.UploadFileDataStore=e.x,exports.UploadFileDataStores=e.S,exports.UploadFileKVStore=e.M,exports.createDataStoreLayer=e.C,exports.createInitialCircuitBreakerState=e.R,exports.deadLetterQueueKvStore=e.N,exports.eventToMessageSerializer=e.m,exports.flowEventEmitter=e.h,exports.flowJobKvStore=e.P,exports.formatHealthAsText=e.c,exports.getHealthResponseFormat=e.l,exports.inputFileSchema=e.o,exports.isDataStore=e.w,exports.jsonSerializer=e.F,exports.jsonValueSchema=e.T,exports.traceContextSchema=e.E,exports.uploadEventEmitter=e.g,exports.uploadEventSchema=e.r,exports.uploadFileKvStore=e.I,exports.uploadFileSchema=e.D,exports.webSocketMessageSchema=e.t;
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ai as DataStore, Ar as uploadEventEmitter, Bi as UploadStrategy, Co as CircuitBreakerStateData, Cr as BaseEventEmitterService, Di as BufferedUploadFileDataStore, Do as CircuitBreakerStoreService, Dr as UploadEventEmitter, Eo as CircuitBreakerStore, Er as TypedEventEmitter, Fi as StreamWriteResult, Fr as UploadEventType, Hi as isDataStore, Ii as StreamingConfig, Ir as uploadEventSchema, Li as UploadFileDataStore, Lr as EventBroadcaster, Mi as DataStoreConfig, Mr as WebSocketMessage, Ni as DataStoreWriteOptions, Nr as webSocketMessageSchema, Oi as DEFAULT_MULTIPART_PART_SIZE, Oo as createInitialCircuitBreakerState, Or as eventToMessageSerializer, Pi as StreamWriteOptions, Pr as UploadEvent, Ri as UploadFileDataStores, Rr as EventBroadcasterService, So as uploadFileSchema, Sr as BaseEventEmitter, To as CircuitBreakerStats, Tr as FlowEventEmitter, Vi as createDataStoreLayer, _o as JsonValue, _r as HealthResponse, ar as MiddlewareContext, bo as jsonValueSchema, br as formatHealthAsText, co as DeadLetterQueueKVStore, cr as MiddlewareServiceLive, do as TypedKvStore, dr as CircuitBreakerHealthSummary, fo as UploadFileKVStore, fr as ComponentHealth, go as uploadFileKvStore, gr as HealthComponents, ho as jsonSerializer, hr as HealthCheckConfig, ir as Middleware, ji as DataStoreCapabilities, jr as WebSocketConnection, ki as DEFAULT_STREAMING_CONFIG, kr as flowEventEmitter, lo as FlowJobKVStore, lr as InputFile, mo as flowJobKvStore, mr as DlqHealthSummary, oo as BaseKvStore, or as MiddlewareNext, po as deadLetterQueueKvStore, pr as DEFAULT_HEALTH_CHECK_CONFIG, so as BaseKvStoreService, sr as MiddlewareService, uo as KvStore, ur as inputFileSchema, vo as UploadFile, vr as HealthResponseFormat, wo as CircuitBreakerStateValue, wr as EventEmitter, xo as traceContextSchema, xr as getHealthResponseFormat, yo as UploadFileTraceContext, yr as HealthStatus, zi as UploadFileDataStoresShape } from "../index-
|
|
1
|
+
import { Ai as DataStore, Ar as uploadEventEmitter, Bi as UploadStrategy, Co as CircuitBreakerStateData, Cr as BaseEventEmitterService, Di as BufferedUploadFileDataStore, Do as CircuitBreakerStoreService, Dr as UploadEventEmitter, Eo as CircuitBreakerStore, Er as TypedEventEmitter, Fi as StreamWriteResult, Fr as UploadEventType, Hi as isDataStore, Ii as StreamingConfig, Ir as uploadEventSchema, Li as UploadFileDataStore, Lr as EventBroadcaster, Mi as DataStoreConfig, Mr as WebSocketMessage, Ni as DataStoreWriteOptions, Nr as webSocketMessageSchema, Oi as DEFAULT_MULTIPART_PART_SIZE, Oo as createInitialCircuitBreakerState, Or as eventToMessageSerializer, Pi as StreamWriteOptions, Pr as UploadEvent, Ri as UploadFileDataStores, Rr as EventBroadcasterService, So as uploadFileSchema, Sr as BaseEventEmitter, To as CircuitBreakerStats, Tr as FlowEventEmitter, Vi as createDataStoreLayer, _o as JsonValue, _r as HealthResponse, ar as MiddlewareContext, bo as jsonValueSchema, br as formatHealthAsText, co as DeadLetterQueueKVStore, cr as MiddlewareServiceLive, do as TypedKvStore, dr as CircuitBreakerHealthSummary, fo as UploadFileKVStore, fr as ComponentHealth, go as uploadFileKvStore, gr as HealthComponents, ho as jsonSerializer, hr as HealthCheckConfig, ir as Middleware, ji as DataStoreCapabilities, jr as WebSocketConnection, ki as DEFAULT_STREAMING_CONFIG, kr as flowEventEmitter, lo as FlowJobKVStore, lr as InputFile, mo as flowJobKvStore, mr as DlqHealthSummary, oo as BaseKvStore, or as MiddlewareNext, po as deadLetterQueueKvStore, pr as DEFAULT_HEALTH_CHECK_CONFIG, so as BaseKvStoreService, sr as MiddlewareService, uo as KvStore, ur as inputFileSchema, vo as UploadFile, vr as HealthResponseFormat, wo as CircuitBreakerStateValue, wr as EventEmitter, xo as traceContextSchema, xr as getHealthResponseFormat, yo as UploadFileTraceContext, yr as HealthStatus, zi as UploadFileDataStoresShape } from "../index-DKwJFauU.cjs";
|
|
2
2
|
export { BaseEventEmitter, BaseEventEmitterService, BaseKvStore, BaseKvStoreService, BufferedUploadFileDataStore, CircuitBreakerHealthSummary, CircuitBreakerStateData, CircuitBreakerStateValue, CircuitBreakerStats, CircuitBreakerStore, CircuitBreakerStoreService, ComponentHealth, DEFAULT_HEALTH_CHECK_CONFIG, DEFAULT_MULTIPART_PART_SIZE, DEFAULT_STREAMING_CONFIG, DataStore, DataStoreCapabilities, DataStoreConfig, DataStoreWriteOptions, DeadLetterQueueKVStore, DlqHealthSummary, EventBroadcaster, EventBroadcasterService, EventEmitter, FlowEventEmitter, FlowJobKVStore, HealthCheckConfig, HealthComponents, HealthResponse, HealthResponseFormat, HealthStatus, InputFile, JsonValue, KvStore, Middleware, MiddlewareContext, MiddlewareNext, MiddlewareService, MiddlewareServiceLive, StreamWriteOptions, StreamWriteResult, StreamingConfig, TypedEventEmitter, TypedKvStore, UploadEvent, UploadEventEmitter, UploadEventType, UploadFile, UploadFileDataStore, UploadFileDataStores, UploadFileDataStoresShape, UploadFileKVStore, UploadFileTraceContext, UploadStrategy, WebSocketConnection, WebSocketMessage, createDataStoreLayer, createInitialCircuitBreakerState, deadLetterQueueKvStore, eventToMessageSerializer, flowEventEmitter, flowJobKvStore, formatHealthAsText, getHealthResponseFormat, inputFileSchema, isDataStore, jsonSerializer, jsonValueSchema, traceContextSchema, uploadEventEmitter, uploadEventSchema, uploadFileKvStore, uploadFileSchema, webSocketMessageSchema };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../uploadista-error-
|
|
2
|
-
import "../index-
|
|
3
|
-
import { Ai as DataStore, Ar as uploadEventEmitter, Bi as UploadStrategy, Co as CircuitBreakerStateData, Cr as BaseEventEmitterService, Di as BufferedUploadFileDataStore, Do as CircuitBreakerStoreService, Dr as UploadEventEmitter, Eo as CircuitBreakerStore, Er as TypedEventEmitter, Fi as StreamWriteResult, Fr as UploadEventType, Hi as isDataStore, Ii as StreamingConfig, Ir as uploadEventSchema, Li as UploadFileDataStore, Lr as EventBroadcaster, Mi as DataStoreConfig, Mr as WebSocketMessage, Ni as DataStoreWriteOptions, Nr as webSocketMessageSchema, Oi as DEFAULT_MULTIPART_PART_SIZE, Oo as createInitialCircuitBreakerState, Or as eventToMessageSerializer, Pi as StreamWriteOptions, Pr as UploadEvent, Ri as UploadFileDataStores, Rr as EventBroadcasterService, So as uploadFileSchema, Sr as BaseEventEmitter, To as CircuitBreakerStats, Tr as FlowEventEmitter, Vi as createDataStoreLayer, _o as JsonValue, _r as HealthResponse, ar as MiddlewareContext, bo as jsonValueSchema, br as formatHealthAsText, co as DeadLetterQueueKVStore, cr as MiddlewareServiceLive, do as TypedKvStore, dr as CircuitBreakerHealthSummary, fo as UploadFileKVStore, fr as ComponentHealth, go as uploadFileKvStore, gr as HealthComponents, ho as jsonSerializer, hr as HealthCheckConfig, ir as Middleware, ji as DataStoreCapabilities, jr as WebSocketConnection, ki as DEFAULT_STREAMING_CONFIG, kr as flowEventEmitter, lo as FlowJobKVStore, lr as InputFile, mo as flowJobKvStore, mr as DlqHealthSummary, oo as BaseKvStore, or as MiddlewareNext, po as deadLetterQueueKvStore, pr as DEFAULT_HEALTH_CHECK_CONFIG, so as BaseKvStoreService, sr as MiddlewareService, uo as KvStore, ur as inputFileSchema, vo as UploadFile, vr as HealthResponseFormat, wo as CircuitBreakerStateValue, wr as EventEmitter, xo as traceContextSchema, xr as getHealthResponseFormat, yo as UploadFileTraceContext, yr as HealthStatus, zi as UploadFileDataStoresShape } from "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../index-
|
|
1
|
+
import "../uploadista-error-BeyPhCWJ.mjs";
|
|
2
|
+
import "../index-9iG2qHLe.mjs";
|
|
3
|
+
import { Ai as DataStore, Ar as uploadEventEmitter, Bi as UploadStrategy, Co as CircuitBreakerStateData, Cr as BaseEventEmitterService, Di as BufferedUploadFileDataStore, Do as CircuitBreakerStoreService, Dr as UploadEventEmitter, Eo as CircuitBreakerStore, Er as TypedEventEmitter, Fi as StreamWriteResult, Fr as UploadEventType, Hi as isDataStore, Ii as StreamingConfig, Ir as uploadEventSchema, Li as UploadFileDataStore, Lr as EventBroadcaster, Mi as DataStoreConfig, Mr as WebSocketMessage, Ni as DataStoreWriteOptions, Nr as webSocketMessageSchema, Oi as DEFAULT_MULTIPART_PART_SIZE, Oo as createInitialCircuitBreakerState, Or as eventToMessageSerializer, Pi as StreamWriteOptions, Pr as UploadEvent, Ri as UploadFileDataStores, Rr as EventBroadcasterService, So as uploadFileSchema, Sr as BaseEventEmitter, To as CircuitBreakerStats, Tr as FlowEventEmitter, Vi as createDataStoreLayer, _o as JsonValue, _r as HealthResponse, ar as MiddlewareContext, bo as jsonValueSchema, br as formatHealthAsText, co as DeadLetterQueueKVStore, cr as MiddlewareServiceLive, do as TypedKvStore, dr as CircuitBreakerHealthSummary, fo as UploadFileKVStore, fr as ComponentHealth, go as uploadFileKvStore, gr as HealthComponents, ho as jsonSerializer, hr as HealthCheckConfig, ir as Middleware, ji as DataStoreCapabilities, jr as WebSocketConnection, ki as DEFAULT_STREAMING_CONFIG, kr as flowEventEmitter, lo as FlowJobKVStore, lr as InputFile, mo as flowJobKvStore, mr as DlqHealthSummary, oo as BaseKvStore, or as MiddlewareNext, po as deadLetterQueueKvStore, pr as DEFAULT_HEALTH_CHECK_CONFIG, so as BaseKvStoreService, sr as MiddlewareService, uo as KvStore, ur as inputFileSchema, vo as UploadFile, vr as HealthResponseFormat, wo as CircuitBreakerStateValue, wr as EventEmitter, xo as traceContextSchema, xr as getHealthResponseFormat, yo as UploadFileTraceContext, yr as HealthStatus, zi as UploadFileDataStoresShape } from "../index-zxscP_nP.mjs";
|
|
4
|
+
import "../index-D1xVo0kN.mjs";
|
|
5
|
+
import "../index-D_yZmNYw.mjs";
|
|
6
6
|
export { BaseEventEmitter, BaseEventEmitterService, BaseKvStore, BaseKvStoreService, BufferedUploadFileDataStore, CircuitBreakerHealthSummary, CircuitBreakerStateData, CircuitBreakerStateValue, CircuitBreakerStats, CircuitBreakerStore, CircuitBreakerStoreService, ComponentHealth, DEFAULT_HEALTH_CHECK_CONFIG, DEFAULT_MULTIPART_PART_SIZE, DEFAULT_STREAMING_CONFIG, DataStore, DataStoreCapabilities, DataStoreConfig, DataStoreWriteOptions, DeadLetterQueueKVStore, DlqHealthSummary, EventBroadcaster, EventBroadcasterService, EventEmitter, FlowEventEmitter, FlowJobKVStore, HealthCheckConfig, HealthComponents, HealthResponse, HealthResponseFormat, HealthStatus, InputFile, JsonValue, KvStore, Middleware, MiddlewareContext, MiddlewareNext, MiddlewareService, MiddlewareServiceLive, StreamWriteOptions, StreamWriteResult, StreamingConfig, TypedEventEmitter, TypedKvStore, UploadEvent, UploadEventEmitter, UploadEventType, UploadFile, UploadFileDataStore, UploadFileDataStores, UploadFileDataStoresShape, UploadFileKVStore, UploadFileTraceContext, UploadStrategy, WebSocketConnection, WebSocketMessage, createDataStoreLayer, createInitialCircuitBreakerState, deadLetterQueueKvStore, eventToMessageSerializer, flowEventEmitter, flowJobKvStore, formatHealthAsText, getHealthResponseFormat, inputFileSchema, isDataStore, jsonSerializer, jsonValueSchema, traceContextSchema, uploadEventEmitter, uploadEventSchema, uploadFileKvStore, uploadFileSchema, webSocketMessageSchema };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../uploadista-error-
|
|
1
|
+
import"../uploadista-error-9mF4Z7sn.mjs";import"../errors-DuxBpAc7.mjs";import{A as e,C as t,D as n,E as r,F as i,I as a,L as o,M as s,N as c,O as l,P as u,R as d,S as f,T as p,_ as m,a as h,b as g,c as _,d as v,f as y,g as b,h as x,i as S,j as C,k as w,l as T,m as E,n as D,o as O,p as k,r as A,s as j,t as M,u as N,v as P,w as F,x as I,y as L}from"../types-5ZELMVfM.mjs";export{N as BaseEventEmitterService,l as BaseKvStoreService,P as BufferedUploadFileDataStore,o as CircuitBreakerStoreService,j as DEFAULT_HEALTH_CHECK_CONFIG,L as DEFAULT_MULTIPART_PART_SIZE,g as DEFAULT_STREAMING_CONFIG,w as DeadLetterQueueKVStore,m as EventBroadcasterService,v as FlowEventEmitter,e as FlowJobKVStore,S as MiddlewareService,h as MiddlewareServiceLive,y as TypedEventEmitter,C as TypedKvStore,k as UploadEventEmitter,D as UploadEventType,I as UploadFileDataStore,f as UploadFileDataStores,s as UploadFileKVStore,t as createDataStoreLayer,d as createInitialCircuitBreakerState,c as deadLetterQueueKvStore,E as eventToMessageSerializer,x as flowEventEmitter,u as flowJobKvStore,_ as formatHealthAsText,T as getHealthResponseFormat,O as inputFileSchema,F as isDataStore,i as jsonSerializer,p as jsonValueSchema,r as traceContextSchema,b as uploadEventEmitter,A as uploadEventSchema,a as uploadFileKvStore,n as uploadFileSchema,M as webSocketMessageSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./uploadista-error-
|
|
2
|
-
//# sourceMappingURL=types-
|
|
1
|
+
import{n as e}from"./uploadista-error-9mF4Z7sn.mjs";import{Context as t,Effect as n,Layer as r}from"effect";import i,{z as a}from"zod";var o=class extends t.Tag(`CircuitBreakerStoreService`)(){};function s(e){let t=Date.now();return{state:`closed`,failureCount:0,lastStateChange:t,halfOpenSuccesses:0,windowStart:t,config:e}}var c=class{constructor(e,t,n,r){this.baseStore=e,this.keyPrefix=t,this.serialize=n,this.deserialize=r}get=t=>this.baseStore.get(this.keyPrefix+t).pipe(n.flatMap(r=>{if(r===null)return n.fail(e.fromCode(`FILE_NOT_FOUND`,{cause:`Key "${t}" not found`}));try{return n.succeed(this.deserialize(r))}catch(r){return n.fail(new e({code:`VALIDATION_ERROR`,status:400,body:`Failed to deserialize value for key "${t}"`,cause:r}))}}));set=(t,r)=>{try{let e=this.serialize(r);return this.baseStore.set(this.keyPrefix+t,e)}catch(r){return n.fail(new e({code:`VALIDATION_ERROR`,status:400,body:`Failed to serialize value for key "${t}"`,cause:r}))}};delete=e=>this.baseStore.delete(this.keyPrefix+e);list=()=>this.baseStore.list?this.baseStore.list(this.keyPrefix).pipe(n.map(e=>e.map(e=>e.startsWith(this.keyPrefix)?e.slice(this.keyPrefix.length):e))):n.fail(new e({code:`UNKNOWN_ERROR`,status:501,body:`List operation not supported by this store`}))};const l={serialize:e=>JSON.stringify(e),deserialize:e=>JSON.parse(e)};var u=class extends t.Tag(`BaseKvStore`)(){},d=class extends t.Tag(`UploadFileKVStore`)(){};const f=r.effect(d,n.gen(function*(){return new c(yield*u,`uploadista:upload-file:`,l.serialize,l.deserialize)}));var p=class extends t.Tag(`FlowJobKVStore`)(){};const m=r.effect(p,n.gen(function*(){return new c(yield*u,`uploadista:flow-job:`,l.serialize,l.deserialize)}));var h=class extends t.Tag(`DeadLetterQueueKVStore`)(){};const g=r.effect(h,n.gen(function*(){return new c(yield*u,`uploadista:dlq:`,l.serialize,l.deserialize)})),_=a.object({traceId:a.string(),spanId:a.string(),traceFlags:a.number()}),v=a.lazy(()=>a.union([a.string(),a.number(),a.boolean(),a.null(),a.array(v),a.record(a.string(),v)])),y=a.object({id:a.string(),size:a.number().optional(),offset:a.number(),metadata:a.record(a.string(),v).optional(),creationDate:a.string().optional(),url:a.string().optional(),sizeIsDeferred:a.boolean().optional(),checksum:a.string().optional(),checksumAlgorithm:a.string().optional(),storage:a.object({id:a.string(),type:a.string(),path:a.string().optional(),uploadId:a.string().optional(),bucket:a.string().optional(),parts:a.array(a.object({partNumber:a.number(),etag:a.string(),size:a.number()})).optional()}),flow:a.object({flowId:a.string(),nodeId:a.string(),jobId:a.string()}).optional(),traceContext:_.optional()}),b={fileSizeThreshold:1048576,chunkSize:65536},x=5*1024*1024;var S=class extends t.Tag(`UploadFileDataStore`)(){},C=class extends t.Tag(`BufferedUploadFileDataStore`)(){},w=class extends t.Tag(`UploadFileDataStores`)(){};const T=e=>`create`in e&&`write`in e,E=async t=>{if(r.isLayer(t))return t;if(n.isEffect(t))return r.effect(w,n.gen(function*(){let e=yield*t;return{getDataStore:t=>n.succeed(e),bufferedDataStore:n.succeed(void 0)}}));if(T(t)){let e=t;return r.succeed(w,{getDataStore:t=>n.succeed(e),bufferedDataStore:n.succeed(void 0)})}let i=t,a=i.default||Object.keys(i.stores)[0],o={};for(let[e,t]of Object.entries(i.stores))`pipe`in t&&!(`create`in t)?o[e]=await n.runPromise(t):o[e]=t;return r.succeed(w,{getDataStore:t=>{let r=o[t]||(a?o[a]:void 0);return r?n.succeed(r):n.fail(e.fromCode(`FILE_NOT_FOUND`))},bufferedDataStore:n.succeed(void 0)})};var D=class extends t.Tag(`EventBroadcaster`)(){},O=class{constructor(e,t){this.baseEmitter=e,this.eventToMessage=t}subscribe=(e,t)=>this.baseEmitter.subscribe(e,t);unsubscribe=e=>this.baseEmitter.unsubscribe(e);emit=(e,t)=>{let n=this.eventToMessage(t);return this.baseEmitter.emit(e,n)}};const k=e=>({eventToMessage:t=>JSON.stringify({type:e,payload:t,timestamp:new Date().toISOString()})});var A=class extends t.Tag(`BaseEventEmitter`)(){},j=class extends t.Tag(`UploadEventEmitter`)(){};const M=r.effect(j,n.gen(function*(){return new O(yield*A,k(`upload_event`).eventToMessage)}));var N=class extends t.Tag(`FlowEventEmitter`)(){};const P=r.effect(N,n.gen(function*(){return new O(yield*A,k(`flow_event`).eventToMessage)})),F={timeout:5e3,checkStorage:!0,checkKvStore:!0,checkEventBroadcaster:!0};function I(e){return e?.includes(`text/plain`)?`text`:`json`}function L(e){switch(e){case`healthy`:return`OK`;case`degraded`:return`OK`;case`unhealthy`:return`Service Unavailable`}}const R=a.object({uploadLengthDeferred:a.boolean().optional(),storageId:a.string(),size:a.number().optional(),sizeHint:a.number().optional(),type:a.string(),fileName:a.string().optional(),lastModified:a.number().optional(),metadata:a.string().optional(),checksum:a.string().optional(),checksumAlgorithm:a.string().optional(),flow:a.object({flowId:a.string(),nodeId:a.string(),jobId:a.string()}).optional()}).refine(e=>e.uploadLengthDeferred===!0?!0:e.size!==void 0&&e.size>=0,{message:`size is required when uploadLengthDeferred is not true`,path:[`size`]});var z=class extends t.Tag(`MiddlewareService`)(){};const B=r.succeed(z,z.of({execute:(e,t,r)=>n.gen(function*(){if(e.length===0)return yield*n.tryPromise({try:()=>r(),catch:e=>e});let i=e.reduceRight((e,n)=>()=>n(t,e),r);return yield*n.tryPromise({try:()=>i(),catch:e=>e})})}));let V=function(e){return e.UPLOAD_STARTED=`upload-started`,e.UPLOAD_PROGRESS=`upload-progress`,e.UPLOAD_COMPLETE=`upload-complete`,e.UPLOAD_FAILED=`upload-failed`,e.UPLOAD_VALIDATION_SUCCESS=`upload-validation-success`,e.UPLOAD_VALIDATION_FAILED=`upload-validation-failed`,e.UPLOAD_VALIDATION_WARNING=`upload-validation-warning`,e}({});const H=a.object({flowId:a.string(),nodeId:a.string(),jobId:a.string()}).optional(),U=a.union([a.object({type:a.union([a.literal(V.UPLOAD_STARTED),a.literal(V.UPLOAD_COMPLETE)]),data:y,flow:H}),a.object({type:a.literal(V.UPLOAD_PROGRESS),data:a.object({id:a.string(),progress:a.number(),total:a.number()}),flow:H}),a.object({type:a.literal(V.UPLOAD_FAILED),data:a.object({id:a.string(),error:a.string()}),flow:H}),a.object({type:a.literal(V.UPLOAD_VALIDATION_SUCCESS),data:a.object({id:a.string(),validationType:a.enum([`checksum`,`mimetype`]),algorithm:a.string().optional()}),flow:H}),a.object({type:a.literal(V.UPLOAD_VALIDATION_FAILED),data:a.object({id:a.string(),reason:a.string(),expected:a.string(),actual:a.string()}),flow:H}),a.object({type:a.literal(V.UPLOAD_VALIDATION_WARNING),data:a.object({id:a.string(),message:a.string()}),flow:H})]),W=i.union([i.object({type:i.literal(`upload_event`),payload:U,timestamp:i.string().optional()}),i.object({type:i.literal(`flow_event`),payload:i.any(),timestamp:i.string().optional()}),i.object({type:i.literal(`subscribed`),payload:i.object({eventKey:i.string()}),timestamp:i.string().optional()}),i.object({type:i.literal(`error`),message:i.string().optional()}),i.object({type:i.literal(`pong`),timestamp:i.string().optional()}),i.object({type:i.literal(`ping`),timestamp:i.string().optional()}),i.object({type:i.literal(`connection`),message:i.string().optional(),uploadId:i.string().optional(),timestamp:i.string().optional()})]);export{p as A,E as C,y as D,_ as E,l as F,f as I,o as L,d as M,g as N,u as O,m as P,s as R,w as S,v as T,D as _,B as a,b,L as c,N as d,O as f,M as g,P as h,z as i,c as j,h as k,I as l,k as m,V as n,R as o,j as p,U as r,F as s,W as t,A as u,C as v,T as w,S as x,x as y};
|
|
2
|
+
//# sourceMappingURL=types-5ZELMVfM.mjs.map
|