@context-action/core 0.0.3 → 0.0.5
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/README.md +272 -0
- package/dist/index.cjs +929 -284
- package/dist/index.d.cts +214 -226
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +214 -226
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +926 -275
- package/dist/index.js.map +1 -1
- package/package.json +14 -12
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_typeof","o","_typeof","toPrimitive","toPropertyKey","_defineProperty","level: LogLevel","level: string","message: string","payload: any","context: OtelContext","contextParts: string[]","config?: ActionRegisterConfig","action: K","handler: ActionHandler<T[K]>","config: HandlerConfig","name: string","setter: Function","payload?: T[K]","controller: PipelineController<T[K]>","type: K","payload: T[K]","action: any"],"sources":["../../../node_modules/.pnpm/@oxc-project+runtime@0.77.3/node_modules/@oxc-project/runtime/src/helpers/typeof.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.77.3/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.77.3/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.77.3/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js","../src/logger.ts","../src/ActionRegister.ts","../src/types.ts"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Log levels in order of severity (lowest to highest)\n */\nexport enum LogLevel {\n TRACE = 0,\n DEBUG = 1,\n INFO = 2,\n WARN = 3,\n ERROR = 4,\n FATAL = 5\n}\n\n/**\n * Logger interface for custom logger implementations\n */\nexport interface Logger {\n trace(message: string, ...args: any[]): void;\n debug(message: string, ...args: any[]): void;\n info(message: string, ...args: any[]): void;\n warn(message: string, ...args: any[]): void;\n error(message: string, ...args: any[]): void;\n fatal(message: string, ...args: any[]): void;\n}\n\n/**\n * Default console logger implementation\n */\nexport class ConsoleLogger implements Logger {\n constructor(private level: LogLevel = LogLevel.ERROR) {}\n\n protected shouldLog(level: LogLevel): boolean {\n return level >= this.level;\n }\n\n private formatMessage(level: string, message: string): string {\n return `[${level.toUpperCase()}] ${message}`;\n }\n\n trace(message: string, ...args: any[]): void {\n if (this.shouldLog(LogLevel.TRACE)) {\n console.trace(this.formatMessage('trace', message), ...args);\n }\n }\n\n debug(message: string, ...args: any[]): void {\n if (this.shouldLog(LogLevel.DEBUG)) {\n console.debug(this.formatMessage('debug', message), ...args);\n }\n }\n\n info(message: string, ...args: any[]): void {\n if (this.shouldLog(LogLevel.INFO)) {\n console.info(this.formatMessage('info', message), ...args);\n }\n }\n\n warn(message: string, ...args: any[]): void {\n if (this.shouldLog(LogLevel.WARN)) {\n console.warn(this.formatMessage('warn', message), ...args);\n }\n }\n\n error(message: string, ...args: any[]): void {\n if (this.shouldLog(LogLevel.ERROR)) {\n console.error(this.formatMessage('error', message), ...args);\n }\n }\n\n fatal(message: string, ...args: any[]): void {\n if (this.shouldLog(LogLevel.FATAL)) {\n console.error(this.formatMessage('fatal', message), ...args);\n }\n }\n\n setLevel(level: LogLevel): void {\n this.level = level;\n }\n}\n\n/**\n * Parse log level from string\n */\nexport function parseLogLevel(level: string): LogLevel {\n const upperLevel = level.toUpperCase();\n switch (upperLevel) {\n case 'TRACE':\n return LogLevel.TRACE;\n case 'DEBUG':\n return LogLevel.DEBUG;\n case 'INFO':\n return LogLevel.INFO;\n case 'WARN':\n return LogLevel.WARN;\n case 'ERROR':\n return LogLevel.ERROR;\n case 'FATAL':\n return LogLevel.FATAL;\n default:\n return LogLevel.ERROR;\n }\n}\n\n/**\n * Get log level from environment variable or default to ERROR\n */\nexport function getLogLevelFromEnv(): LogLevel {\n if (typeof process !== 'undefined' && process.env) {\n const envLevel = process.env.LOG_LEVEL || process.env.ACTION_LOG_LEVEL;\n if (envLevel) {\n return parseLogLevel(envLevel);\n }\n }\n return LogLevel.TRACE;\n}\n\n/**\n * Extract trace ID from payload if it exists\n */\nexport function extractTraceIdFromPayload(payload: any): string | undefined {\n if (payload && typeof payload === 'object') {\n return payload._traceId || payload.traceId || payload.trace_id;\n }\n return undefined;\n}\n\n/**\n * Extract session ID from payload if it exists\n */\nexport function extractSessionIdFromPayload(payload: any): string | undefined {\n if (payload && typeof payload === 'object') {\n return payload._sessionId || payload.sessionId || payload.session_id;\n }\n return undefined;\n}\n\n/**\n * Create OTEL context from payload\n */\nexport function createOtelContextFromPayload(payload: any): OtelContext {\n return {\n traceId: extractTraceIdFromPayload(payload),\n sessionId: extractSessionIdFromPayload(payload),\n metadata: payload\n };\n}\n\n/**\n * OpenTelemetry context interface for tracing\n */\nexport interface OtelContext {\n /** Session ID for tracking user sessions */\n sessionId?: string;\n /** Trace ID for distributed tracing */\n traceId?: string;\n /** Span ID for current operation */\n spanId?: string;\n /** Parent span ID for operation hierarchy */\n parentSpanId?: string;\n /** Additional context metadata */\n metadata?: Record<string, any>;\n}\n\n/**\n * Extended logger interface with OpenTelemetry support\n */\nexport interface OtelLogger extends Logger {\n /** Set OpenTelemetry context */\n setContext(context: OtelContext): void;\n /** Get current OpenTelemetry context */\n getContext(): OtelContext;\n /** Clear OpenTelemetry context */\n clearContext(): void;\n /** Log with OpenTelemetry context */\n logWithContext(level: LogLevel, message: string, ...args: any[]): void;\n}\n\n/**\n * OpenTelemetry-aware console logger implementation\n */\nexport class OtelConsoleLogger extends ConsoleLogger implements OtelLogger {\n private context: OtelContext = {};\n\n constructor(level: LogLevel = LogLevel.ERROR) {\n super(level);\n }\n\n setContext(context: OtelContext): void {\n this.context = { ...this.context, ...context };\n }\n\n getContext(): OtelContext {\n return { ...this.context };\n }\n\n clearContext(): void {\n this.context = {};\n }\n\n private formatWithContext(level: string, message: string): string {\n const contextParts: string[] = [];\n \n if (this.context.sessionId) {\n contextParts.push(`session=${this.context.sessionId}`);\n }\n if (this.context.traceId) {\n contextParts.push(`trace=${this.context.traceId}`);\n }\n if (this.context.spanId) {\n contextParts.push(`span=${this.context.spanId}`);\n }\n \n const contextStr = contextParts.length > 0 ? ` [${contextParts.join(', ')}]` : '';\n return `[${level.toUpperCase()}]${contextStr} ${message}`;\n }\n\n logWithContext(level: LogLevel, message: string, ...args: any[]): void {\n const levelName = LogLevel[level].toLowerCase();\n const formattedMessage = this.formatWithContext(levelName, message);\n \n switch (level) {\n case LogLevel.TRACE:\n if (this.shouldLog(LogLevel.TRACE)) {\n console.trace(formattedMessage, ...args);\n }\n break;\n case LogLevel.DEBUG:\n if (this.shouldLog(LogLevel.DEBUG)) {\n console.debug(formattedMessage, ...args);\n }\n break;\n case LogLevel.INFO:\n if (this.shouldLog(LogLevel.INFO)) {\n console.info(formattedMessage, ...args);\n }\n break;\n case LogLevel.WARN:\n if (this.shouldLog(LogLevel.WARN)) {\n console.warn(formattedMessage, ...args);\n }\n break;\n case LogLevel.ERROR:\n if (this.shouldLog(LogLevel.ERROR)) {\n console.error(formattedMessage, ...args);\n }\n break;\n case LogLevel.FATAL:\n if (this.shouldLog(LogLevel.FATAL)) {\n console.error(formattedMessage, ...args);\n }\n break;\n }\n }\n\n // Override base methods to include context\n trace(message: string, ...args: any[]): void {\n this.logWithContext(LogLevel.TRACE, message, ...args);\n }\n\n debug(message: string, ...args: any[]): void {\n this.logWithContext(LogLevel.DEBUG, message, ...args);\n }\n\n info(message: string, ...args: any[]): void {\n this.logWithContext(LogLevel.INFO, message, ...args);\n }\n\n warn(message: string, ...args: any[]): void {\n this.logWithContext(LogLevel.WARN, message, ...args);\n }\n\n error(message: string, ...args: any[]): void {\n this.logWithContext(LogLevel.ERROR, message, ...args);\n }\n\n fatal(message: string, ...args: any[]): void {\n this.logWithContext(LogLevel.FATAL, message, ...args);\n }\n}\n","import { Logger, LogLevel, ConsoleLogger, OtelConsoleLogger, OtelContext, getLogLevelFromEnv, createOtelContextFromPayload } from './logger';\n\n/**\n * Controller object provided to action handlers for pipeline management\n * @template T - The type of the payload being processed\n */\nexport type PipelineController<T = any> = {\n /** Continue to the next handler in the pipeline */\n next: () => void;\n /** Abort the pipeline execution with an optional reason */\n abort: (reason?: string) => void;\n /** Modify the payload that will be passed to subsequent handlers */\n modifyPayload: (modifier: (payload: T) => T) => void;\n};\n\n/**\n * Action handler function that processes actions in the pipeline\n * @template T - The type of the payload\n * @param payload - The data passed to the handler\n * @param controller - Pipeline controller for flow management\n * @returns void or Promise<void> for async handlers\n */\nexport type ActionHandler<T = any> = (\n payload: T,\n controller: PipelineController<T>\n) => void | Promise<void>;\n\n/**\n * Configuration options for action handlers\n */\nexport type HandlerConfig = {\n /** Priority level (higher numbers execute first). Default: 0 */\n priority?: number;\n /** Unique identifier for the handler. Auto-generated if not provided */\n id?: string;\n /** Whether to wait for async handlers to complete. Default: false */\n blocking?: boolean;\n};\n\n/**\n * Base interface for defining action payload mappings\n * @example\n * ```typescript\n * interface MyActions extends ActionPayloadMap {\n * increment: void;\n * setCount: number;\n * updateUser: { id: string; name: string };\n * }\n * ```\n */\nexport interface ActionPayloadMap {\n // Extensible structure for action definitions\n // 'actionName': PayloadType;\n}\n\n/**\n * Configuration options for ActionRegister\n */\nexport interface ActionRegisterConfig {\n /** Custom logger implementation. Defaults to ConsoleLogger */\n logger?: Logger;\n /** Log level for the logger. Defaults to ERROR if not provided */\n logLevel?: LogLevel;\n /** OpenTelemetry context for tracing */\n otelContext?: OtelContext;\n /** Whether to use OTEL-aware logger. Defaults to false */\n useOtel?: boolean;\n}\n\n/**\n * Core action pipeline management system\n * @template T - Action payload map defining available actions and their payload types\n * @example\n * ```typescript\n * interface AppActions extends ActionPayloadMap {\n * increment: void;\n * setCount: number;\n * }\n * \n * const actionRegister = new ActionRegister<AppActions>();\n * \n * // Register handlers\n * actionRegister.register('increment', () => console.log('Incremented'));\n * actionRegister.register('setCount', (count) => console.log(`Count: ${count}`));\n * \n * // Dispatch actions\n * await actionRegister.dispatch('increment');\n * await actionRegister.dispatch('setCount', 42);\n * ```\n */\nexport class ActionRegister<T extends ActionPayloadMap = ActionPayloadMap> {\n private pipelines = new Map<keyof T, Map<string, {\n handler: ActionHandler<any>;\n config: HandlerConfig;\n }>>();\n \n private atomSetters = new Map<string, Function>();\n private handlerCounter = 0;\n public readonly logger: Logger;\n\n constructor(config?: ActionRegisterConfig) {\n // 환경변수에서 로그 레벨 가져오기\n const envLogLevel = getLogLevelFromEnv();\n \n // 설정에서 로그 레벨 가져오기 (환경변수보다 우선)\n const configLogLevel = config?.logLevel ?? envLogLevel;\n \n // 커스텀 로거가 있으면 사용, OTEL 사용 설정이 있으면 OTEL 로거 사용, 없으면 기본 콘솔 로거 사용\n if (config?.logger) {\n this.logger = config.logger;\n } else if (config?.useOtel) {\n this.logger = new OtelConsoleLogger(configLogLevel);\n } else {\n this.logger = new ConsoleLogger(configLogLevel);\n }\n \n // OTEL 컨텍스트 설정\n if (config?.otelContext && this.logger instanceof OtelConsoleLogger) {\n this.logger.setContext(config.otelContext);\n }\n \n this.logger.debug('ActionRegister initialized', { \n logLevel: configLogLevel,\n useOtel: config?.useOtel ?? false,\n hasOtelContext: !!config?.otelContext\n });\n }\n\n /**\n * Register a handler for an action in the pipeline\n * @param action - The action name to handle\n * @param handler - The handler function to execute\n * @param config - Optional configuration for the handler\n * @returns Unregister function to remove the handler\n * @example\n * ```typescript\n * const unregister = actionRegister.register('increment', () => {\n * console.log('Incremented!');\n * }, { priority: 10 });\n * \n * // Later, remove the handler\n * unregister();\n * ```\n */\n register<K extends keyof T>(\n action: K,\n handler: ActionHandler<T[K]>,\n config: HandlerConfig = {}\n ): () => void {\n if (!this.pipelines.has(action)) {\n this.pipelines.set(action, new Map());\n this.logger.debug(`Created new pipeline for action: ${String(action)}`);\n }\n \n const pipeline = this.pipelines.get(action)!;\n const handlerId = config.id || `handler_${++this.handlerCounter}`;\n \n // 중복 등록 방지\n if (pipeline.has(handlerId)) {\n this.logger.warn(`Handler with id ${handlerId} already exists for action: ${String(action)}`);\n return () => {};\n }\n \n pipeline.set(handlerId, { handler, config });\n this.logger.debug(`Registered handler for action: ${String(action)}`, { \n handlerId, \n priority: config.priority ?? 0,\n blocking: config.blocking ?? false \n });\n \n // 우선순위로 정렬\n this.sortPipeline(action);\n \n // unregister 함수 반환\n return () => {\n pipeline.delete(handlerId);\n this.logger.debug(`Unregistered handler: ${handlerId} for action: ${String(action)}`);\n };\n }\n\n // Atom setter 등록\n registerAtomSetter(name: string, setter: Function) {\n this.atomSetters.set(name, setter);\n this.logger.debug(`Registered atom setter: ${name}`);\n }\n\n /**\n * Dispatch an action through the pipeline (for actions without payload)\n * @param action - The action to dispatch\n * @returns Promise that resolves when all handlers complete\n */\n async dispatch<K extends keyof T>(\n action: T[K] extends void ? K : never\n ): Promise<void>;\n /**\n * Dispatch an action through the pipeline (for actions with payload)\n * @param action - The action to dispatch\n * @param payload - The payload data to pass to handlers\n * @returns Promise that resolves when all handlers complete\n */\n async dispatch<K extends keyof T>(\n action: K,\n payload: T[K]\n ): Promise<void>;\n /**\n * Internal dispatch implementation\n * @internal\n */\n async dispatch<K extends keyof T>(\n action: K,\n payload?: T[K]\n ): Promise<void> {\n const pipeline = this.pipelines.get(action);\n \n // OTEL 컨텍스트 자동 감지 및 설정\n if (this.logger instanceof OtelConsoleLogger && payload) {\n const otelContext = createOtelContextFromPayload(payload);\n if (otelContext.traceId || otelContext.sessionId) {\n this.logger.setContext(otelContext);\n }\n }\n \n this.logger.debug(`Dispatching action: ${String(action)}`, { payload });\n \n if (!pipeline || pipeline.size === 0) {\n this.logger.warn(`No handlers registered for action: ${String(action)}`);\n return;\n }\n \n let modifiedPayload = payload as T[K];\n const handlers = Array.from(pipeline.values());\n let shouldContinue = true;\n \n this.logger.trace(`Executing pipeline for action: ${String(action)}`, { \n handlerCount: handlers.length \n });\n \n for (const { handler, config } of handlers) {\n if (!shouldContinue) break;\n \n const controller: PipelineController<T[K]> = {\n next: () => { shouldContinue = true; },\n abort: (reason) => {\n shouldContinue = false;\n this.logger.warn(`Pipeline aborted: ${reason}`);\n },\n modifyPayload: (modifier) => {\n modifiedPayload = modifier(modifiedPayload);\n this.logger.trace(`Payload modified for action: ${String(action)}`);\n }\n };\n \n try {\n if (config.blocking) {\n await handler(modifiedPayload, controller);\n } else {\n handler(modifiedPayload, controller);\n }\n } catch (error) {\n this.logger.error(`Error in pipeline handler for action: ${String(action)}`, error);\n if (config.blocking) throw error;\n }\n }\n \n this.logger.debug(`Completed dispatching action: ${String(action)}`);\n }\n\n private sortPipeline<K extends keyof T>(action: K) {\n const pipeline = this.pipelines.get(action);\n if (!pipeline) return;\n \n const sorted = Array.from(pipeline.entries())\n .sort(([, a], [, b]) => {\n const priorityA = a.config.priority ?? 0;\n const priorityB = b.config.priority ?? 0;\n return priorityB - priorityA; // 높은 우선순위가 먼저\n });\n \n pipeline.clear();\n sorted.forEach(([id, data]) => pipeline.set(id, data));\n \n this.logger.trace(`Sorted pipeline for action: ${String(action)}`, {\n handlerCount: sorted.length,\n priorities: sorted.map(([, data]) => data.config.priority ?? 0)\n });\n }\n}","// 기본 액션 타입 정의\nexport interface BaseActionPayloadMap {\n // 기본 액션들은 여기에 정의\n}\n\n// 액션 타입 추출 헬퍼\nexport type ActionType<T extends Record<string, any>> = keyof T;\nexport type ActionPayload<\n T extends Record<string, any>,\n K extends keyof T\n> = T[K];\n\n// 액션 핸들러 타입\nexport type ActionHandlerMap<T extends Record<string, any>> = {\n [K in keyof T]?: (payload: T[K]) => void | Promise<void>;\n};\n\n// 액션 생성 헬퍼\nexport function createAction<T extends Record<string, any>, K extends keyof T>(\n type: K,\n payload: T[K]\n): { type: K; payload: T[K] } {\n return { type, payload };\n}\n\n// 타입 가드\nexport function isAction<T extends Record<string, any>, K extends keyof T>(\n action: any,\n type: K\n): action is { type: K; payload: T[K] } {\n return action?.type === type;\n}"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,SAASA,UAAQ,GAAG;AAClB;AAEA,SAAO,OAAO,UAAUA,YAAU,cAAc,OAAO,UAAU,YAAY,OAAO,OAAO,WAAW,SAAUC,KAAG;AACjH,UAAO,OAAOA;EACf,IAAG,SAAUA,KAAG;AACf,UAAOA,OAAK,cAAc,OAAO,UAAUA,IAAE,gBAAgB,UAAUA,QAAM,OAAO,YAAY,WAAW,OAAOA;EACnH,GAAE,OAAO,QAAQ,aAAa,MAAM,OAAO,QAAQ,aAAa,OAAO,SAASD,UAAQ,EAAE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ACzB;AAGD,SAAgB,SACdC,QACAF,MACsC;AACtC,QAAO,QAAQ,SAAS;AACzB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["context: PipelineContext<T, R>","createController: (registration: HandlerRegistration<T, R>, index: number) => PipelineController<T, R>","error: any","handlerResult: R | undefined","_typeof","o","_typeof","toPrimitive","toPropertyKey","_defineProperty","actionKey: string","debounceMs: number","throttleMs: number","config: ActionRegisterConfig","action: K","handler: ActionHandler<T[K], R>","config: HandlerConfig","registration: HandlerRegistration<T[K], R>","payload?: T[K]","options?: import('./types.js').DispatchOptions","autoAbortController: AbortController | undefined","abortHandler","throttleMs: number | undefined","debounceMs: number | undefined","context: PipelineContext<T[K], any>","context: PipelineContext<T[K], R>","executionError: Error | undefined","handlerResults: Array<{\n id: string;\n executed: boolean;\n duration?: number;\n result?: R;\n error?: Error;\n metadata?: Record<string, any>;\n }>","errors: Array<{\n handlerId: string;\n error: Error;\n timestamp: number;\n }>","executionResult: ExecutionResult<R>","handlers: HandlerRegistration<T[K], any>[]","filterOptions?: import('./types.js').DispatchOptions['filter']","context: PipelineContext<any, R>","resultOptions?: import('./types.js').DispatchOptions['result']","autoAbortController?: AbortController","autoAbortOptions?: { allowHandlerAbort?: boolean }","_registration: HandlerRegistration<T[K], any>","_index: number","reason?: string","modifier: (payload: T[K]) => T[K]","priority: number","result: any","merger: (previousResults: any[], currentResult: any) => any","executedHandlers: HandlerRegistration<T[K], any>[]","success: boolean","duration: number","tag: string","category: string","mode: ExecutionMode"],"sources":["../src/execution-modes.ts","../../../node_modules/.pnpm/@oxc-project+runtime@0.77.3/node_modules/@oxc-project/runtime/src/helpers/typeof.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.77.3/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.77.3/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js","../../../node_modules/.pnpm/@oxc-project+runtime@0.77.3/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js","../src/action-guard.ts","../src/ActionRegister.ts"],"sourcesContent":["/**\n * @fileoverview Execution mode implementations for ActionRegister\n * Provides different execution strategies for action pipelines\n */\n\nimport type { \n HandlerRegistration, \n PipelineContext, \n PipelineController\n} from './types.js';\n\n/**\n * Execute handlers in sequential mode (one after another)\n */\nexport async function executeSequential<T, R = void>(\n context: PipelineContext<T, R>,\n createController: (registration: HandlerRegistration<T, R>, index: number) => PipelineController<T, R>\n): Promise<void> {\n\n let i = 0;\n \n while (i < context.handlers.length) {\n // Check for abort or termination\n if (context.aborted || context.terminated) {\n break;\n }\n\n const registration = context.handlers[i];\n context.currentIndex = i;\n\n /** Check condition if provided */\n if (registration.config.condition && !registration.config.condition()) {\n i++;\n continue;\n }\n\n /** Check validation if provided */\n if (registration.config.validation && !registration.config.validation(context.payload)) {\n i++;\n continue;\n }\n\n const controller = createController(registration, i);\n\n try {\n // Check for abort before executing handler\n if (context.aborted) {\n break;\n }\n \n const result = registration.handler(context.payload, controller);\n\n /** Wait for async handlers if they're blocking */\n if (registration.config.blocking && result instanceof Promise) {\n const handlerResult = await result;\n \n /** Collect result if handler returned something and wasn't terminated */\n if (handlerResult !== undefined && !context.terminated) {\n context.results.push(handlerResult);\n }\n } else if (result !== undefined && !context.terminated) {\n /** Collect synchronous result */\n if (result instanceof Promise) {\n // Non-blocking async handler - don't wait but collect result when resolved\n result.then(asyncResult => {\n if (asyncResult !== undefined && !context.terminated) {\n context.results.push(asyncResult);\n }\n }).catch(() => {\n // Ignore errors from non-blocking handlers\n });\n } else {\n context.results.push(result);\n }\n }\n\n /** Check if pipeline was terminated by controller.return() */\n if (context.terminated) {\n break;\n }\n\n /** Handle jump to priority AFTER handler execution */\n if (context.jumpToPriority !== undefined) {\n const jumpIndex = context.handlers.findIndex(\n handler => handler.config.priority === context.jumpToPriority\n );\n \n if (jumpIndex !== -1) {\n // Jump to the target index directly (position movement)\n i = jumpIndex;\n context.jumpToPriority = undefined;\n continue; // Continue to execute the handler at jump destination\n } else {\n // Invalid jump target, clear and continue normally\n context.jumpToPriority = undefined;\n i++;\n }\n } else {\n // Normal progression to next handler\n i++;\n }\n\n } catch (error: any) {\n if (registration.config.blocking) {\n throw error;\n }\n // For non-blocking handlers, continue to next handler\n i++;\n }\n }\n}\n\n/**\n * Execute handlers in parallel mode (all at once)\n */\nexport async function executeParallel<T, R = void>(\n context: PipelineContext<T, R>,\n createController: (registration: HandlerRegistration<T, R>, index: number) => PipelineController<T, R>\n): Promise<void> {\n\n /** Filter handlers that should run */\n const runnableHandlers = context.handlers.filter((registration, _index) => {\n /** Check condition */\n if (registration.config.condition && !registration.config.condition()) {\n return false;\n }\n\n /** Check validation */\n if (registration.config.validation && !registration.config.validation(context.payload)) {\n return false;\n }\n\n return true;\n });\n\n /** Create promises for all handlers */\n const handlerPromises = runnableHandlers.map(async (registration, _index) => {\n const controller = createController(registration, _index);\n \n try {\n const result = registration.handler(context.payload, controller);\n \n let handlerResult: R | undefined;\n if (result instanceof Promise) {\n handlerResult = await result;\n } else {\n handlerResult = result;\n }\n \n /** Collect result if handler returned something and pipeline wasn't terminated */\n if (handlerResult !== undefined && !context.terminated) {\n context.results.push(handlerResult);\n }\n \n return { \n success: true, \n handlerId: registration.id, \n result: handlerResult,\n terminated: context.terminated \n };\n \n } catch (error: any) {\n if (registration.config.blocking) {\n throw error;\n }\n \n return { success: false, handlerId: registration.id, error };\n }\n });\n\n /** Wait for all handlers to complete */\n const results = await Promise.allSettled(handlerPromises);\n \n /** Check for any rejected blocking handlers */\n const failures = results.filter((result, index) => {\n if (result.status === 'rejected') {\n const registration = runnableHandlers[index];\n return registration.config.blocking;\n }\n return false;\n });\n\n if (failures.length > 0) {\n const firstFailure = failures[0] as PromiseRejectedResult;\n throw firstFailure.reason;\n }\n\n /** Check if any handler terminated the pipeline */\n const terminatedResults = results.filter(result => \n result.status === 'fulfilled' && result.value.terminated\n );\n \n if (terminatedResults.length > 0) {\n context.terminated = true;\n // In parallel mode, we can't determine which handler's termination result to use,\n // so we use the first one that terminated\n const firstTerminated = terminatedResults[0] as PromiseFulfilledResult<any>;\n context.terminationResult = firstTerminated.value.result;\n }\n}\n\n/**\n * Execute handlers in race mode (first to complete wins)\n */\nexport async function executeRace<T, R = void>(\n context: PipelineContext<T, R>,\n createController: (registration: HandlerRegistration<T, R>, index: number) => PipelineController<T, R>\n): Promise<void> {\n\n /** Filter handlers that should run */\n const runnableHandlers = context.handlers.filter((registration, _index) => {\n /** Check condition */\n if (registration.config.condition && !registration.config.condition()) {\n return false;\n }\n\n /** Check validation */\n if (registration.config.validation && !registration.config.validation(context.payload)) {\n return false;\n }\n\n return true;\n });\n\n if (runnableHandlers.length === 0) {\n return;\n }\n\n /** Create promises for all handlers */\n const handlerPromises = runnableHandlers.map(async (registration, _index) => {\n const controller = createController(registration, _index);\n \n try {\n const result = registration.handler(context.payload, controller);\n \n let handlerResult: R | undefined;\n if (result instanceof Promise) {\n handlerResult = await result;\n } else {\n handlerResult = result;\n }\n \n return { \n success: true, \n handlerId: registration.id, \n registration,\n result: handlerResult,\n terminated: context.terminated\n };\n \n } catch (error: any) {\n return { success: false, handlerId: registration.id, error, registration };\n }\n });\n\n /** Race all handlers */\n const winner = await Promise.race(handlerPromises);\n\n /** If the winner failed and was blocking, throw the error */\n if (!winner.success && winner.registration?.config.blocking) {\n throw winner.error;\n }\n\n /** Collect result from the winning handler */\n if (winner.success && winner.result !== undefined) {\n context.results.push(winner.result);\n }\n\n /** Check if the winning handler terminated the pipeline */\n if (winner.success && winner.terminated) {\n context.terminated = true;\n context.terminationResult = winner.result;\n }\n}","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * @fileoverview Action Guard system for debouncing, throttling and blocking\n * Provides rate limiting and user experience optimization for actions\n */\n\n\n/**\n * Action guard state tracking for debouncing and throttling\n * @memberof core-concepts\n * @internal\n * @since 1.0.0\n * \n * Tracks timing and execution state for action execution control\n */\ninterface GuardState {\n /** Timestamp of last successful execution for throttling calculations */\n lastExecuted: number;\n \n /** Active debounce timer - cleared when new debounce requests arrive */\n debounceTimer?: NodeJS.Timeout;\n \n /** Active throttle timer - tracks when throttle period will end */\n throttleTimer?: NodeJS.Timeout;\n \n /** Flag indicating if action is currently in throttled state */\n isThrottled: boolean;\n}\n\n/**\n * Action Guard system for managing action execution timing\n * @implements action-guard\n * @implements performance-optimization \n * @implements user-experience-optimization\n * @implements class-naming\n * @memberof core-concepts\n * @internal\n * @since 1.0.0\n * \n * Manages action execution timing through debouncing and throttling\n * @implements performance-optimization\n * \n * @example\n * ```typescript\n * const guard = new ActionGuard(logger);\n * \n * // Debounce search input (wait 300ms after typing stops)\n * if (await guard.debounce('search', 300)) {\n * executeSearch(); \n * }\n * \n * // Throttle scroll handler (max once per 100ms)\n * if (guard.throttle('scroll', 100)) {\n * updateScrollPosition();\n * }\n * ```\n */\nexport class ActionGuard {\n private guards = new Map<string, GuardState>();\n\n constructor() {\n // ActionGuard without logger\n }\n\n /**\n * Check if action should be debounced\n * @param actionKey - Unique key for the action\n * @param debounceMs - Debounce delay in milliseconds\n * @returns Promise that resolves when debounce period is complete\n */\n async debounce(actionKey: string, debounceMs: number): Promise<boolean> {\n\n /** Get or create guard state for this action */\n let state = this.guards.get(actionKey);\n if (!state) {\n /** Initialize new guard state with default values */\n state = {\n lastExecuted: 0,\n isThrottled: false\n };\n this.guards.set(actionKey, state);\n }\n\n /** Clear any existing debounce timer to restart the delay period */\n /** This implements the \"debounce\" behavior where rapid calls reset the timer */\n if (state.debounceTimer) {\n clearTimeout(state.debounceTimer);\n }\n\n /** Create new debounce promise that resolves after the delay period */\n /** The promise will only resolve if no new debounce requests arrive */\n return new Promise((resolve) => {\n state!.debounceTimer = setTimeout(() => {\n /** Clean up timer reference to prevent memory leaks */\n state!.debounceTimer = undefined;\n /** Update last execution timestamp for throttling calculations */\n state!.lastExecuted = Date.now();\n resolve(true);\n }, debounceMs);\n \n });\n }\n\n /**\n * Check if action should be throttled\n * @param actionKey - Unique key for the action\n * @param throttleMs - Throttle delay in milliseconds\n * @returns True if action should proceed, false if throttled\n */\n throttle(actionKey: string, throttleMs: number): boolean {\n\n /** Get or create guard state for this action */\n let state = this.guards.get(actionKey);\n if (!state) {\n /** Initialize new guard state with default values */\n state = {\n lastExecuted: 0,\n isThrottled: false\n };\n this.guards.set(actionKey, state);\n }\n\n const now = Date.now();\n const timeSinceLastExecution = now - state.lastExecuted;\n\n /** Check if enough time has passed since last execution */\n /** If throttle period has elapsed, allow immediate execution */\n if (timeSinceLastExecution >= throttleMs) {\n /** Update execution timestamp and clear throttled state */\n state.lastExecuted = now;\n state.isThrottled = false;\n \n \n return true;\n }\n\n /** If already in throttled state, don't create duplicate timers */\n /** This prevents timer accumulation and unnecessary processing */\n if (state.isThrottled) {\n return false;\n }\n\n /** Set throttle timer to automatically clear the throttled state */\n /** Calculate remaining time until throttle period expires */\n state.isThrottled = true;\n const remainingTime = throttleMs - timeSinceLastExecution;\n \n /** Create timer to reset throttled state when period expires */\n state.throttleTimer = setTimeout(() => {\n /** Clear throttled state and timer reference */\n state!.isThrottled = false;\n state!.throttleTimer = undefined;\n }, remainingTime);\n\n\n return false;\n }\n\n /**\n * Clear all guards for an action\n * @param actionKey - Action key to clear\n */\n clearGuards(actionKey: string): void {\n \n const state = this.guards.get(actionKey);\n if (state) {\n /** Clear debounce timer if active to prevent memory leaks */\n if (state.debounceTimer) {\n clearTimeout(state.debounceTimer);\n }\n /** Clear throttle timer if active to prevent memory leaks */\n if (state.throttleTimer) {\n clearTimeout(state.throttleTimer);\n }\n /** Remove guard state from memory */\n this.guards.delete(actionKey);\n \n }\n }\n\n /**\n * Clear all guards\n */\n clearAll(): void {\n \n /** Iterate through all guard states and clear their timers */\n /** This prevents memory leaks when clearing the entire guard system */\n for (const [, state] of this.guards) {\n /** Clear any active debounce timers */\n if (state.debounceTimer) {\n clearTimeout(state.debounceTimer);\n }\n /** Clear any active throttle timers */\n if (state.throttleTimer) {\n clearTimeout(state.throttleTimer);\n }\n }\n \n /** Remove all guard states from memory */\n this.guards.clear();\n }\n\n /**\n * Get current guard state for debugging\n * @param actionKey - Action key to inspect\n */\n getGuardState(actionKey: string): GuardState | undefined {\n return this.guards.get(actionKey);\n }\n\n /**\n * Get all active guards for debugging\n */\n getAllGuardStates(): Map<string, GuardState> {\n return new Map(this.guards);\n }\n}","\nimport {\n ActionPayloadMap,\n ActionHandler,\n HandlerConfig,\n HandlerRegistration,\n PipelineContext,\n PipelineController,\n ActionRegisterConfig,\n UnregisterFunction,\n ExecutionMode,\n ExecutionResult,\n ActionRegistryInfo,\n ActionHandlerStats,\n} from './types.js';\nimport { executeSequential, executeParallel, executeRace } from './execution-modes.js';\nimport { ActionGuard } from './action-guard.js';\n\n/**\n * 중앙화된 액션 등록 및 디스패치 시스템으로, 타입 안전한 액션 파이프라인 관리를 제공하는 핵심 클래스입니다.\n * \n * @implements {ActionRegister}\n * @implements {Action Pipeline System}\n * @memberof core-concepts\n * \n * @example\n * ```typescript\n * interface AppActions extends ActionPayloadMap {\n * updateUser: { id: string; name: string };\n * calculateTotal: void;\n * }\n * \n * const register = new ActionRegister<AppActions>({\n * name: 'AppRegister',\n * logLevel: LogLevel.DEBUG\n * });\n * \n * // 핸들러 등록\n * register.register('updateUser', ({ id, name }, controller) => {\n * userStore.setValue({ id, name });\n * controller.next();\n * }, { priority: 10 });\n * \n * // 액션 디스패치\n * await register.dispatch('updateUser', { id: '1', name: 'John' });\n * ```\n */\nexport class ActionRegister<T extends ActionPayloadMap = ActionPayloadMap> {\n private pipelines = new Map<keyof T, HandlerRegistration<any, any>[]>();\n private handlerCounter = 0;\n private readonly actionGuard: ActionGuard;\n private executionMode: ExecutionMode = 'sequential';\n private actionExecutionModes = new Map<keyof T, ExecutionMode>();\n public readonly name: string;\n private readonly registryConfig: ActionRegisterConfig['registry'];\n private executionStats = new Map<keyof T, {\n totalExecutions: number;\n totalDuration: number;\n successCount: number;\n errorCount: number;\n }>();\n\n constructor(config: ActionRegisterConfig = {}) {\n this.name = config.name || 'ActionRegister';\n this.registryConfig = config.registry;\n this.actionGuard = new ActionGuard();\n \n if (this.registryConfig?.defaultExecutionMode) {\n this.executionMode = this.registryConfig.defaultExecutionMode;\n }\n \n if (this.registryConfig?.debug && process.env.NODE_ENV === 'development') {\n console.log(`🎯 ActionRegister created: ${this.name}`, {\n defaultExecutionMode: this.executionMode,\n maxHandlers: this.registryConfig.maxHandlers,\n autoCleanup: this.registryConfig.autoCleanup ?? true\n });\n }\n }\n\n register<K extends keyof T, R = void>(\n action: K,\n handler: ActionHandler<T[K], R>,\n config: HandlerConfig = {}\n ): UnregisterFunction {\n \n // Generate unique handler ID with security consideration\n // Use counter + random suffix to prevent ID prediction attacks\n const handlerId = config.id || `handler_${++this.handlerCounter}_${Math.random().toString(36).substr(2, 5)}`;\n \n // Create handler registration with defaults\n const registration: HandlerRegistration<T[K], R> = {\n handler,\n config: {\n // Existing fields\n priority: config.priority ?? 0,\n id: handlerId,\n blocking: config.blocking ?? false,\n once: config.once ?? false,\n condition: config.condition || (() => true),\n debounce: config.debounce ?? undefined,\n throttle: config.throttle ?? undefined,\n validation: config.validation ?? undefined,\n middleware: config.middleware ?? false,\n \n // New metadata fields\n tags: config.tags ?? [],\n category: config.category ?? undefined,\n description: config.description ?? undefined,\n version: config.version ?? undefined,\n returnType: config.returnType ?? 'value',\n timeout: config.timeout ?? undefined,\n retries: config.retries ?? 0,\n dependencies: config.dependencies ?? [],\n conflicts: config.conflicts ?? [],\n environment: config.environment ?? undefined,\n feature: config.feature ?? undefined,\n metrics: config.metrics ?? {\n collectTiming: false,\n collectErrors: false,\n customMetrics: {}\n },\n metadata: config.metadata ?? {},\n } as Required<HandlerConfig>,\n id: handlerId,\n };\n \n // Initialize pipeline if it doesn't exist\n if (!this.pipelines.has(action)) {\n this.pipelines.set(action, []);\n }\n\n const pipeline = this.pipelines.get(action)!;\n \n // Check for duplicate handler IDs and prevent duplicate registration\n const existingIndex = pipeline.findIndex(reg => reg.id === handlerId);\n if (existingIndex !== -1) {\n // Return a no-op unregister function for the duplicate\n return () => {};\n }\n \n // Check maximum handlers limit\n if (this.registryConfig?.maxHandlers && pipeline.length >= this.registryConfig.maxHandlers) {\n throw new Error(\n `Maximum number of handlers (${this.registryConfig.maxHandlers}) reached for action '${String(action)}' in registry '${this.name}'`\n );\n }\n\n // Add handler to pipeline\n pipeline.push(registration);\n \n // Sort pipeline by priority (highest first)\n pipeline.sort((a, b) => b.config.priority - a.config.priority);\n \n if (this.registryConfig?.debug && process.env.NODE_ENV === 'development') {\n console.log(`🎯 Handler registered: ${String(action)}`, {\n handlerId,\n priority: config.priority,\n tags: config.tags,\n category: config.category,\n totalHandlers: pipeline.length,\n registry: this.name\n });\n }\n\n // Return unregister function that removes this specific registration\n return () => {\n const index = pipeline.findIndex((reg) => reg.id === handlerId && reg === registration);\n if (index !== -1) {\n pipeline.splice(index, 1);\n \n if (this.registryConfig?.debug && process.env.NODE_ENV === 'development') {\n console.log(`🎯 Handler unregistered: ${String(action)}`, {\n handlerId,\n remainingHandlers: pipeline.length,\n registry: this.name\n });\n }\n }\n };\n }\n\n async dispatch<K extends keyof T>(\n action: K,\n payload?: T[K],\n options?: import('./types.js').DispatchOptions\n ): Promise<void> {\n // Auto-abort: Create AbortController if enabled\n let autoAbortController: AbortController | undefined;\n let effectiveSignal = options?.signal;\n \n if (options?.autoAbort?.enabled) {\n autoAbortController = new AbortController();\n effectiveSignal = autoAbortController.signal;\n \n // Provide access to the created controller\n if (options.autoAbort.onControllerCreated) {\n options.autoAbort.onControllerCreated(autoAbortController);\n }\n \n // If original signal exists, link them together\n if (options?.signal) {\n const originalSignal = options.signal;\n if (originalSignal.aborted) {\n autoAbortController.abort();\n } else {\n const abortHandler = () => autoAbortController!.abort();\n originalSignal.addEventListener('abort', abortHandler, { once: true });\n }\n }\n }\n \n // Check if dispatch is aborted before starting\n if (effectiveSignal?.aborted) {\n return;\n }\n \n const pipeline = this.pipelines.get(action);\n if (!pipeline || pipeline.length === 0) {\n return;\n }\n\n // Apply handler filtering first\n const filteredHandlers = this.filterHandlers([...pipeline], options?.filter);\n\n // Apply ActionGuard controls - check both dispatch options and handler configs\n const actionKey = String(action);\n \n // Get throttle/debounce settings from dispatch options or handler configs\n let throttleMs: number | undefined;\n let debounceMs: number | undefined;\n \n // Priority: dispatch options > handler config\n if (options?.throttle !== undefined) {\n throttleMs = options.throttle;\n } else if (filteredHandlers.length > 0) {\n // Use throttle from the first handler that has it (handlers are sorted by priority)\n for (const handler of filteredHandlers) {\n if (handler.config.throttle !== undefined) {\n throttleMs = handler.config.throttle;\n break;\n }\n }\n }\n \n if (options?.debounce !== undefined) {\n debounceMs = options.debounce;\n } else if (filteredHandlers.length > 0) {\n // Use debounce from the first handler that has it (handlers are sorted by priority)\n for (const handler of filteredHandlers) {\n if (handler.config.debounce !== undefined) {\n debounceMs = handler.config.debounce;\n break;\n }\n }\n }\n \n // Apply debounce if specified\n if (debounceMs !== undefined) {\n const shouldProceed = await this.actionGuard.debounce(actionKey, debounceMs);\n if (!shouldProceed) {\n return; // Debounced - don't execute\n }\n }\n \n // Apply throttle if specified\n if (throttleMs !== undefined) {\n const shouldProceed = this.actionGuard.throttle(actionKey, throttleMs);\n if (!shouldProceed) {\n return; // Throttled - don't execute\n }\n }\n\n // Determine execution mode for this action (with option override)\n const currentExecutionMode = options?.executionMode || \n this.actionExecutionModes.get(action) || \n this.executionMode;\n\n // Create pipeline execution context\n const context: PipelineContext<T[K], any> = {\n action: String(action),\n payload: payload as T[K],\n handlers: filteredHandlers, // Use filtered handlers\n aborted: false,\n abortReason: undefined,\n currentIndex: 0,\n jumpToPriority: undefined,\n executionMode: currentExecutionMode,\n \n // New result collection fields\n results: [],\n terminated: false,\n terminationResult: undefined,\n };\n\n const startTime = Date.now();\n let executionSuccess = true;\n \n // Add abort listener if signal provided (use effectiveSignal for auto-abort)\n const abortHandler = effectiveSignal ? () => {\n context.aborted = true;\n context.abortReason = 'Action dispatch aborted by signal';\n } : undefined;\n \n if (effectiveSignal && abortHandler) {\n effectiveSignal.addEventListener('abort', abortHandler);\n }\n \n try {\n await this.executePipeline(context, autoAbortController, options?.autoAbort);\n } catch (error) {\n executionSuccess = false;\n throw error;\n } finally {\n // Clean up abort listener\n if (effectiveSignal && abortHandler) {\n effectiveSignal.removeEventListener('abort', abortHandler);\n }\n // Track execution statistics\n const duration = Date.now() - startTime;\n this.updateExecutionStats(action, executionSuccess, duration);\n }\n }\n\n async dispatchWithResult<K extends keyof T, R = void>(\n action: K,\n payload?: T[K],\n options?: import('./types.js').DispatchOptions\n ): Promise<ExecutionResult<R>> {\n const startTime = Date.now();\n \n // Auto-abort: Create AbortController if enabled (same as dispatch)\n let autoAbortController: AbortController | undefined;\n let effectiveSignal = options?.signal;\n \n if (options?.autoAbort?.enabled) {\n autoAbortController = new AbortController();\n effectiveSignal = autoAbortController.signal;\n \n // Provide access to the created controller\n if (options.autoAbort.onControllerCreated) {\n options.autoAbort.onControllerCreated(autoAbortController);\n }\n \n // If original signal exists, link them together\n if (options?.signal) {\n const originalSignal = options.signal;\n if (originalSignal.aborted) {\n autoAbortController.abort();\n } else {\n const abortHandler = () => autoAbortController!.abort();\n originalSignal.addEventListener('abort', abortHandler, { once: true });\n }\n }\n }\n \n // Check if dispatch is aborted before starting\n if (effectiveSignal?.aborted) {\n return {\n success: false,\n aborted: true,\n abortReason: 'Action dispatch aborted by signal',\n terminated: false,\n result: undefined,\n results: [],\n execution: {\n duration: 0,\n handlersExecuted: 0,\n handlersSkipped: 0,\n handlersFailed: 0,\n startTime,\n endTime: startTime,\n },\n handlers: [],\n errors: [],\n };\n }\n \n const pipeline = this.pipelines.get(action);\n \n if (!pipeline || pipeline.length === 0) {\n return {\n success: true,\n aborted: false,\n terminated: false,\n result: undefined,\n results: [],\n execution: {\n duration: 0,\n handlersExecuted: 0,\n handlersSkipped: 0,\n handlersFailed: 0,\n startTime,\n endTime: startTime,\n },\n handlers: [],\n errors: [],\n };\n }\n\n // Apply handler filtering first\n const filteredHandlers = this.filterHandlers([...pipeline], options?.filter);\n\n // Apply ActionGuard controls - check both dispatch options and handler configs\n const actionKey = String(action);\n \n // Get throttle/debounce settings from dispatch options or handler configs\n let throttleMs: number | undefined;\n let debounceMs: number | undefined;\n \n // Priority: dispatch options > handler config\n if (options?.throttle !== undefined) {\n throttleMs = options.throttle;\n } else if (filteredHandlers.length > 0) {\n // Use throttle from the first handler that has it (handlers are sorted by priority)\n for (const handler of filteredHandlers) {\n if (handler.config.throttle !== undefined) {\n throttleMs = handler.config.throttle;\n break;\n }\n }\n }\n \n if (options?.debounce !== undefined) {\n debounceMs = options.debounce;\n } else if (filteredHandlers.length > 0) {\n // Use debounce from the first handler that has it (handlers are sorted by priority)\n for (const handler of filteredHandlers) {\n if (handler.config.debounce !== undefined) {\n debounceMs = handler.config.debounce;\n break;\n }\n }\n }\n \n // Apply debounce if specified\n if (debounceMs !== undefined) {\n const shouldProceed = await this.actionGuard.debounce(actionKey, debounceMs);\n if (!shouldProceed) {\n return {\n success: false,\n aborted: true,\n abortReason: 'Debounced execution',\n terminated: false,\n result: undefined,\n results: [],\n execution: {\n duration: Date.now() - startTime,\n handlersExecuted: 0,\n handlersSkipped: pipeline.length,\n handlersFailed: 0,\n startTime,\n endTime: Date.now(),\n },\n handlers: [],\n errors: [],\n };\n }\n }\n \n // Apply throttle if specified\n if (throttleMs !== undefined) {\n const shouldProceed = this.actionGuard.throttle(actionKey, throttleMs);\n if (!shouldProceed) {\n return {\n success: false,\n aborted: true,\n abortReason: 'Throttled execution',\n terminated: false,\n result: undefined,\n results: [],\n execution: {\n duration: Date.now() - startTime,\n handlersExecuted: 0,\n handlersSkipped: pipeline.length,\n handlersFailed: 0,\n startTime,\n endTime: Date.now(),\n },\n handlers: [],\n errors: [],\n };\n }\n }\n\n // Determine execution mode for this action (with option override)\n const currentExecutionMode = options?.executionMode || \n this.actionExecutionModes.get(action) || \n this.executionMode;\n\n // Create pipeline execution context\n const context: PipelineContext<T[K], R> = {\n action: String(action),\n payload: payload as T[K],\n handlers: filteredHandlers,\n aborted: false,\n abortReason: undefined,\n currentIndex: 0,\n jumpToPriority: undefined,\n executionMode: currentExecutionMode,\n \n // Result collection fields\n results: [],\n terminated: false,\n terminationResult: undefined,\n };\n\n let executionError: Error | undefined;\n const handlerResults: Array<{\n id: string;\n executed: boolean;\n duration?: number;\n result?: R;\n error?: Error;\n metadata?: Record<string, any>;\n }> = [];\n\n const errors: Array<{\n handlerId: string;\n error: Error;\n timestamp: number;\n }> = [];\n\n // Add abort listener if signal provided (use effectiveSignal for auto-abort)\n const abortHandler = effectiveSignal ? () => {\n context.aborted = true;\n context.abortReason = 'Action dispatch aborted by signal';\n } : undefined;\n \n if (effectiveSignal && abortHandler) {\n effectiveSignal.addEventListener('abort', abortHandler);\n }\n \n try {\n await this.executePipeline(context, autoAbortController, options?.autoAbort);\n } catch (error) {\n executionError = error instanceof Error ? error : new Error(String(error));\n errors.push({\n handlerId: 'pipeline',\n error: executionError,\n timestamp: Date.now(),\n });\n } finally {\n // Clean up abort listener\n if (effectiveSignal && abortHandler) {\n effectiveSignal.removeEventListener('abort', abortHandler);\n }\n }\n\n const endTime = Date.now();\n const executionSuccess = !executionError && !context.aborted;\n \n // Track execution statistics\n this.updateExecutionStats(action, executionSuccess, endTime - startTime);\n\n // Process results based on options\n const processedResult = this.processResults(context, options?.result);\n\n // Build execution result\n const executionResult: ExecutionResult<R> = {\n success: !executionError && !context.aborted,\n aborted: context.aborted,\n abortReason: context.abortReason,\n terminated: context.terminated,\n result: processedResult,\n results: context.results,\n execution: {\n duration: endTime - startTime,\n handlersExecuted: context.currentIndex + (context.aborted ? 0 : 1),\n handlersSkipped: Math.max(0, filteredHandlers.length - (context.currentIndex + 1)),\n handlersFailed: errors.length,\n startTime,\n endTime,\n },\n handlers: handlerResults,\n errors,\n };\n\n /** Clean up one-time handlers after execution */\n this.cleanupOneTimeHandlers(action, context.handlers);\n\n return executionResult;\n }\n\n private filterHandlers<K extends keyof T>(\n handlers: HandlerRegistration<T[K], any>[],\n filterOptions?: import('./types.js').DispatchOptions['filter']\n ): HandlerRegistration<T[K], any>[] {\n if (!filterOptions) {\n return handlers;\n }\n\n return handlers.filter(registration => {\n const config = registration.config;\n\n // Check include filters\n if (filterOptions.tags && filterOptions.tags.length > 0) {\n const hasMatchingTag = filterOptions.tags.some(tag => config.tags.includes(tag));\n if (!hasMatchingTag) return false;\n }\n\n if (filterOptions.category && config.category !== filterOptions.category) {\n return false;\n }\n\n if (filterOptions.handlerIds && filterOptions.handlerIds.length > 0) {\n if (!filterOptions.handlerIds.includes(config.id)) {\n return false;\n }\n }\n\n if (filterOptions.environment && config.environment !== filterOptions.environment) {\n return false;\n }\n\n if (filterOptions.feature && config.feature !== filterOptions.feature) {\n return false;\n }\n\n // Check exclude filters\n if (filterOptions.excludeTags && filterOptions.excludeTags.length > 0) {\n const hasExcludedTag = filterOptions.excludeTags.some(tag => config.tags.includes(tag));\n if (hasExcludedTag) return false;\n }\n\n if (filterOptions.excludeCategory && config.category === filterOptions.excludeCategory) {\n return false;\n }\n\n if (filterOptions.excludeHandlerIds && filterOptions.excludeHandlerIds.length > 0) {\n if (filterOptions.excludeHandlerIds.includes(config.id)) {\n return false;\n }\n }\n\n // Custom filter\n if (filterOptions.custom && !filterOptions.custom(config)) {\n return false;\n }\n\n return true;\n });\n }\n\n private processResults<R>(\n context: PipelineContext<any, R>,\n resultOptions?: import('./types.js').DispatchOptions['result']\n ): R | undefined {\n if (!resultOptions || !resultOptions.collect) {\n return undefined;\n }\n\n const results = context.results;\n \n // Handle termination result\n if (context.terminated && context.terminationResult !== undefined) {\n return context.terminationResult;\n }\n\n // Apply maxResults limit\n const limitedResults = resultOptions.maxResults \n ? results.slice(0, resultOptions.maxResults)\n : results;\n\n if (limitedResults.length === 0) {\n return undefined;\n }\n\n // Process results based on strategy\n switch (resultOptions.strategy) {\n case 'first':\n return limitedResults[0];\n case 'last':\n return limitedResults[limitedResults.length - 1];\n case 'all':\n return limitedResults as unknown as R;\n case 'merge':\n if (resultOptions.merger) {\n return resultOptions.merger(limitedResults);\n }\n // Default merge: return last result\n return limitedResults[limitedResults.length - 1];\n case 'custom':\n if (resultOptions.merger) {\n return resultOptions.merger(limitedResults);\n }\n throw new Error('Custom result strategy requires a merger function');\n default:\n // Default: return all results\n return limitedResults as unknown as R;\n }\n }\n\n private async executePipeline<K extends keyof T>(\n context: PipelineContext<T[K], any>, \n autoAbortController?: AbortController,\n autoAbortOptions?: { allowHandlerAbort?: boolean }\n ): Promise<void> {\n const createController = (_registration: HandlerRegistration<T[K], any>, _index: number): PipelineController<T[K], any> => {\n return {\n next: () => {},\n abort: (reason?: string) => {\n context.aborted = true;\n context.abortReason = reason;\n \n // Auto-abort: Handler can trigger pipeline abort if enabled\n if (autoAbortController && autoAbortOptions?.allowHandlerAbort) {\n autoAbortController.abort(reason);\n }\n },\n modifyPayload: (modifier: (payload: T[K]) => T[K]) => {\n context.payload = modifier(context.payload);\n },\n getPayload: () => context.payload,\n jumpToPriority: (priority: number) => {\n context.jumpToPriority = priority;\n },\n return: (result: any) => {\n context.terminated = true;\n context.terminationResult = result;\n },\n setResult: (result: any) => {\n context.results.push(result);\n },\n getResults: () => {\n return [...context.results];\n },\n mergeResult: (merger: (previousResults: any[], currentResult: any) => any) => {\n const currentResult = context.results[context.results.length - 1];\n const previousResults = context.results.slice(0, -1);\n const mergedResult = merger(previousResults, currentResult);\n context.results[context.results.length - 1] = mergedResult;\n },\n };\n };\n\n switch (context.executionMode) {\n case 'sequential':\n await executeSequential<T[K], any>(context, createController);\n break;\n case 'parallel':\n await executeParallel<T[K], any>(context, createController);\n break;\n case 'race':\n await executeRace<T[K], any>(context, createController);\n break;\n default:\n throw new Error(`Unknown execution mode: ${context.executionMode}`);\n }\n\n this.cleanupOneTimeHandlers(context.action as K, context.handlers);\n }\n\n private cleanupOneTimeHandlers<K extends keyof T>(action: K, executedHandlers: HandlerRegistration<T[K], any>[]): void {\n const pipeline = this.pipelines.get(action);\n if (!pipeline) return;\n\n const oneTimeHandlers = executedHandlers.filter(reg => reg.config.once);\n if (oneTimeHandlers.length === 0) return;\n\n oneTimeHandlers.forEach(registration => {\n const index = pipeline.findIndex(reg => reg.id === registration.id);\n if (index !== -1) {\n pipeline.splice(index, 1);\n \n if (this.registryConfig?.debug && process.env.NODE_ENV === 'development') {\n console.log(`🎯 One-time handler removed: ${String(action)}`, {\n handlerId: registration.id,\n remainingHandlers: pipeline.length,\n registry: this.name\n });\n }\n }\n });\n }\n\n /**\n * Update execution statistics for an action\n * \n * @param action Action name\n * @param success Whether execution was successful\n * @param duration Execution duration in milliseconds\n */\n private updateExecutionStats<K extends keyof T>(action: K, success: boolean, duration: number): void {\n if (!this.executionStats.has(action)) {\n this.executionStats.set(action, {\n totalExecutions: 0,\n totalDuration: 0,\n successCount: 0,\n errorCount: 0,\n });\n }\n\n const stats = this.executionStats.get(action)!;\n stats.totalExecutions++;\n stats.totalDuration += duration;\n \n if (success) {\n stats.successCount++;\n } else {\n stats.errorCount++;\n }\n }\n\n getHandlerCount<K extends keyof T>(action: K): number {\n const pipeline = this.pipelines.get(action);\n return pipeline ? pipeline.length : 0;\n }\n\n hasHandlers<K extends keyof T>(action: K): boolean {\n return this.getHandlerCount(action) > 0;\n }\n\n getRegisteredActions(): (keyof T)[] {\n return Array.from(this.pipelines.keys());\n }\n\n clearAction<K extends keyof T>(action: K): void {\n this.pipelines.delete(action);\n }\n\n clearAll(): void {\n this.pipelines.clear();\n }\n\n getName(): string {\n return this.name;\n }\n\n /**\n * Get comprehensive registry information (similar to DeclarativeStoreRegistry pattern)\n * \n * @returns Registry information including actions, handlers, and execution modes\n */\n getRegistryInfo(): ActionRegistryInfo<T> {\n const totalHandlers = Array.from(this.pipelines.values()).reduce(\n (total, pipeline) => total + pipeline.length, \n 0\n );\n \n return {\n name: this.name,\n totalActions: this.pipelines.size,\n totalHandlers,\n registeredActions: Array.from(this.pipelines.keys()),\n actionExecutionModes: new Map(this.actionExecutionModes),\n defaultExecutionMode: this.executionMode,\n };\n }\n\n /**\n * Get detailed statistics for a specific action\n * \n * @param action Action name to get statistics for\n * @returns Detailed handler statistics\n */\n getActionStats<K extends keyof T>(action: K): ActionHandlerStats<T> | null {\n const pipeline = this.pipelines.get(action);\n if (!pipeline) {\n return null;\n }\n\n // Group handlers by priority\n const priorityMap = new Map<number, typeof pipeline>();\n pipeline.forEach(handler => {\n if (!priorityMap.has(handler.config.priority)) {\n priorityMap.set(handler.config.priority, []);\n }\n priorityMap.get(handler.config.priority)!.push(handler);\n });\n\n const handlersByPriority = Array.from(priorityMap.entries())\n .sort(([a], [b]) => b - a) // Sort by priority (highest first)\n .map(([priority, handlers]) => ({\n priority,\n handlers: handlers.map(h => ({\n id: h.config.id,\n tags: h.config.tags,\n category: h.config.category,\n description: h.config.description,\n version: h.config.version,\n }))\n }));\n\n // Get execution statistics if available\n const stats = this.executionStats.get(action);\n const executionStats = stats ? {\n totalExecutions: stats.totalExecutions,\n averageDuration: stats.totalExecutions > 0 ? stats.totalDuration / stats.totalExecutions : 0,\n successRate: stats.totalExecutions > 0 ? (stats.successCount / stats.totalExecutions) * 100 : 0,\n errorCount: stats.errorCount,\n } : undefined;\n\n return {\n action,\n handlerCount: pipeline.length,\n handlersByPriority,\n executionStats,\n };\n }\n\n /**\n * Get statistics for all registered actions\n * \n * @returns Array of statistics for all actions\n */\n getAllActionStats(): Array<ActionHandlerStats<T>> {\n return Array.from(this.pipelines.keys())\n .map(action => this.getActionStats(action))\n .filter((stats): stats is ActionHandlerStats<T> => stats !== null);\n }\n\n /**\n * Get handlers by tag across all actions\n * \n * @param tag Tag to filter handlers by\n * @returns Map of actions to handlers with the specified tag\n */\n getHandlersByTag(tag: string): Map<keyof T, HandlerRegistration<any, any>[]> {\n const result = new Map<keyof T, HandlerRegistration<any, any>[]>();\n \n for (const [action, pipeline] of this.pipelines.entries()) {\n const matchingHandlers = pipeline.filter(handler => \n handler.config.tags.includes(tag)\n );\n \n if (matchingHandlers.length > 0) {\n result.set(action, matchingHandlers);\n }\n }\n \n return result;\n }\n\n /**\n * Get handlers by category across all actions\n * \n * @param category Category to filter handlers by\n * @returns Map of actions to handlers with the specified category\n */\n getHandlersByCategory(category: string): Map<keyof T, HandlerRegistration<any, any>[]> {\n const result = new Map<keyof T, HandlerRegistration<any, any>[]>();\n \n for (const [action, pipeline] of this.pipelines.entries()) {\n const matchingHandlers = pipeline.filter(handler => \n handler.config.category === category\n );\n \n if (matchingHandlers.length > 0) {\n result.set(action, matchingHandlers);\n }\n }\n \n return result;\n }\n\n /**\n * Set execution mode for a specific action\n * \n * @param action Action name\n * @param mode Execution mode to set\n */\n setActionExecutionMode<K extends keyof T>(action: K, mode: ExecutionMode): void {\n this.actionExecutionModes.set(action, mode);\n \n if (this.registryConfig?.debug && process.env.NODE_ENV === 'development') {\n console.log(`🎯 Execution mode set for action '${String(action)}': ${mode}`);\n }\n }\n\n /**\n * Get execution mode for a specific action\n * \n * @param action Action name\n * @returns Execution mode for the action, or default if not set\n */\n getActionExecutionMode<K extends keyof T>(action: K): ExecutionMode {\n return this.actionExecutionModes.get(action) || this.executionMode;\n }\n\n /**\n * Remove execution mode override for a specific action\n * \n * @param action Action name\n */\n removeActionExecutionMode<K extends keyof T>(action: K): void {\n this.actionExecutionModes.delete(action);\n \n if (this.registryConfig?.debug && process.env.NODE_ENV === 'development') {\n console.log(`🎯 Execution mode reset for action '${String(action)}' to default: ${this.executionMode}`);\n }\n }\n\n /**\n * Clear execution statistics for all actions\n */\n clearExecutionStats(): void {\n this.executionStats.clear();\n \n if (this.registryConfig?.debug && process.env.NODE_ENV === 'development') {\n console.log(`🎯 Execution statistics cleared for registry: ${this.name}`);\n }\n }\n\n /**\n * Clear execution statistics for a specific action\n * \n * @param action Action name\n */\n clearActionExecutionStats<K extends keyof T>(action: K): void {\n this.executionStats.delete(action);\n \n if (this.registryConfig?.debug && process.env.NODE_ENV === 'development') {\n console.log(`🎯 Execution statistics cleared for action: ${String(action)}`);\n }\n }\n\n /**\n * Get registry configuration (for debugging and inspection)\n * \n * @returns Current registry configuration\n */\n getRegistryConfig(): ActionRegisterConfig['registry'] {\n return this.registryConfig;\n }\n\n /**\n * Check if registry has debug mode enabled\n * \n * @returns Whether debug mode is enabled\n */\n isDebugEnabled(): boolean {\n return Boolean(this.registryConfig?.debug && process.env.NODE_ENV === 'development');\n }\n}"],"x_google_ignoreList":[1,2,3,4],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAiB;EAC5D,KAAK,eAAe,OAAO,OAAO;AAElC,MAAI,KAAK,gBAAgB,SAAS,QAAQ,IAAI,aAAa,eACzD,QAAQ,IAAI,CAAC,4CAA4C,EAAE,OAAO,OAAO,EAAE,CAAC;CAE/E;;;;;;CAOD,oBAAsD;AACpD,SAAO,KAAK;CACb;;;;;;CAOD,iBAA0B;AACxB,SAAO,QAAQ,KAAK,gBAAgB,SAAS,QAAQ,IAAI,aAAa,cAAc;CACrF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@context-action/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Type-safe action pipeline management library for JavaScript/TypeScript",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -24,6 +24,17 @@
|
|
|
24
24
|
"README.ko.md",
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsdown",
|
|
29
|
+
"build:watch": "tsdown --watch",
|
|
30
|
+
"test": "jest --passWithNoTests",
|
|
31
|
+
"test:watch": "jest --watch",
|
|
32
|
+
"lint": "eslint src --ext .ts",
|
|
33
|
+
"lint:fix": "eslint src --ext .ts --fix",
|
|
34
|
+
"type-check": "tsc --noEmit",
|
|
35
|
+
"clean": "rimraf dist",
|
|
36
|
+
"prepublishOnly": "pnpm run build"
|
|
37
|
+
},
|
|
27
38
|
"keywords": [
|
|
28
39
|
"typescript",
|
|
29
40
|
"javascript",
|
|
@@ -58,14 +69,5 @@
|
|
|
58
69
|
"engines": {
|
|
59
70
|
"node": ">=18.0.0"
|
|
60
71
|
},
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
"build:watch": "tsdown --watch",
|
|
64
|
-
"test": "jest --passWithNoTests",
|
|
65
|
-
"test:watch": "jest --watch",
|
|
66
|
-
"lint": "eslint src --ext .ts",
|
|
67
|
-
"lint:fix": "eslint src --ext .ts --fix",
|
|
68
|
-
"type-check": "tsc --noEmit",
|
|
69
|
-
"clean": "rimraf dist"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
+
"gitHead": "19c58ab23f3e3c7f1d7b550fbc7eecdf9a5a6d46"
|
|
73
|
+
}
|