@hamim_4444/pulsar 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/dist/cluster/Nebula.d.ts +30 -0
- package/dist/cluster/Nebula.d.ts.map +1 -0
- package/dist/dispatch/ConsumerDispatch.d.ts +9 -0
- package/dist/dispatch/ConsumerDispatch.d.ts.map +1 -0
- package/dist/dispatch/Dispatcher.d.ts +6 -0
- package/dist/dispatch/Dispatcher.d.ts.map +1 -0
- package/dist/dispatch/HandlerDispatcher.d.ts +7 -0
- package/dist/dispatch/HandlerDispatcher.d.ts.map +1 -0
- package/dist/dispatch/HttpDispatcher.d.ts +7 -0
- package/dist/dispatch/HttpDispatcher.d.ts.map +1 -0
- package/dist/dispatch/dispatchTypes.d.ts +12 -0
- package/dist/dispatch/dispatchTypes.d.ts.map +1 -0
- package/dist/helpers/computeConfigDelta.d.ts +18 -0
- package/dist/helpers/computeConfigDelta.d.ts.map +1 -0
- package/dist/helpers/defineQueue.d.ts +13 -0
- package/dist/helpers/defineQueue.d.ts.map +1 -0
- package/dist/helpers/generateShaHash.d.ts +2 -0
- package/dist/helpers/generateShaHash.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +42 -0
- package/dist/integrations/PulsarEventsIntegrations.d.ts +7 -0
- package/dist/integrations/PulsarEventsIntegrations.d.ts.map +1 -0
- package/dist/integrations/PulsarLoggerIntegrations.d.ts +12 -0
- package/dist/integrations/PulsarLoggerIntegrations.d.ts.map +1 -0
- package/dist/integrations/index.d.ts +4 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +3 -0
- package/dist/integrations/index.js.map +15 -0
- package/dist/modules/Queue.module.d.ts +45 -0
- package/dist/modules/Queue.module.d.ts.map +1 -0
- package/dist/modules/Scheduler.module.d.ts +42 -0
- package/dist/modules/Scheduler.module.d.ts.map +1 -0
- package/dist/modules/Tick.module.d.ts +38 -0
- package/dist/modules/Tick.module.d.ts.map +1 -0
- package/dist/modules/TickController.module.d.ts +36 -0
- package/dist/modules/TickController.module.d.ts.map +1 -0
- package/dist/monitoring/PulsarMonitoringStreamProducer.d.ts +2 -0
- package/dist/monitoring/PulsarMonitoringStreamProducer.d.ts.map +1 -0
- package/dist/monitoring/index.d.ts +2 -0
- package/dist/monitoring/index.d.ts.map +1 -0
- package/dist/monitoring/server/PulsarMonitoringStream.d.ts +2 -0
- package/dist/monitoring/server/PulsarMonitoringStream.d.ts.map +1 -0
- package/dist/network/NetworkInterface.d.ts +12 -0
- package/dist/network/NetworkInterface.d.ts.map +1 -0
- package/dist/network/UnifiedTransportManager.d.ts +19 -0
- package/dist/network/UnifiedTransportManager.d.ts.map +1 -0
- package/dist/network/abstract/BaseNetworkDriver.d.ts +18 -0
- package/dist/network/abstract/BaseNetworkDriver.d.ts.map +1 -0
- package/dist/network/auth/Authenticator.d.ts +2 -0
- package/dist/network/auth/Authenticator.d.ts.map +1 -0
- package/dist/network/drivers/HttpNetworkDriver.d.ts +30 -0
- package/dist/network/drivers/HttpNetworkDriver.d.ts.map +1 -0
- package/dist/network/drivers/ServerlessNetworkDriver.d.ts +13 -0
- package/dist/network/drivers/ServerlessNetworkDriver.d.ts.map +1 -0
- package/dist/network/drivers/WebSocketNetworkDriver.d.ts +24 -0
- package/dist/network/drivers/WebSocketNetworkDriver.d.ts.map +1 -0
- package/dist/network/helpers/httpQueueOperations.d.ts +2 -0
- package/dist/network/helpers/httpQueueOperations.d.ts.map +1 -0
- package/dist/network/interfaces/network.types.d.ts +13 -0
- package/dist/network/interfaces/network.types.d.ts.map +1 -0
- package/dist/run/Queues.d.ts +2 -0
- package/dist/run/Queues.d.ts.map +1 -0
- package/dist/run/index.d.ts +2 -0
- package/dist/run/index.d.ts.map +1 -0
- package/dist/run/index2.d.ts +2 -0
- package/dist/run/index2.d.ts.map +1 -0
- package/dist/runtimes/IsolateRuntime.d.ts +17 -0
- package/dist/runtimes/IsolateRuntime.d.ts.map +1 -0
- package/dist/runtimes/PersistentRuntime.d.ts +21 -0
- package/dist/runtimes/PersistentRuntime.d.ts.map +1 -0
- package/dist/runtimes/ServerlessRuntime.d.ts +15 -0
- package/dist/runtimes/ServerlessRuntime.d.ts.map +1 -0
- package/dist/runtimes/runtimeTypes.d.ts +15 -0
- package/dist/runtimes/runtimeTypes.d.ts.map +1 -0
- package/dist/server/PulsarRequestHandler.d.ts +41 -0
- package/dist/server/PulsarRequestHandler.d.ts.map +1 -0
- package/dist/server/helpers/acquireRedisLock.d.ts +14 -0
- package/dist/server/helpers/acquireRedisLock.d.ts.map +1 -0
- package/dist/server/helpers/checkFencingValidity.d.ts +14 -0
- package/dist/server/helpers/checkFencingValidity.d.ts.map +1 -0
- package/dist/server/helpers/performIsolateRestart.d.ts +20 -0
- package/dist/server/helpers/performIsolateRestart.d.ts.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +53 -0
- package/dist/server/index.js.map +20 -0
- package/dist/server/parser/parseRequest.d.ts +10 -0
- package/dist/server/parser/parseRequest.d.ts.map +1 -0
- package/dist/server/utility/extract-headers.d.ts +13 -0
- package/dist/server/utility/extract-headers.d.ts.map +1 -0
- package/dist/service/ConfigurationStore.d.ts +23 -0
- package/dist/service/ConfigurationStore.d.ts.map +1 -0
- package/dist/service/Isolate.service.d.ts +12 -0
- package/dist/service/Isolate.service.d.ts.map +1 -0
- package/dist/service/Pulsar.service.d.ts +40 -0
- package/dist/service/Pulsar.service.d.ts.map +1 -0
- package/dist/service/PulsarBaseService.d.ts +51 -0
- package/dist/service/PulsarBaseService.d.ts.map +1 -0
- package/dist/service/PulsarEventBus.d.ts +33 -0
- package/dist/service/PulsarEventBus.d.ts.map +1 -0
- package/dist/service/SwarmBudgetTracker.d.ts +14 -0
- package/dist/service/SwarmBudgetTracker.d.ts.map +1 -0
- package/dist/service/consumers/PulsarWorker.d.ts +10 -0
- package/dist/service/consumers/PulsarWorker.d.ts.map +1 -0
- package/dist/shared/PulsarRuntimeCore.d.ts +55 -0
- package/dist/shared/PulsarRuntimeCore.d.ts.map +1 -0
- package/dist/static/TimingProfile.d.ts +9 -0
- package/dist/static/TimingProfile.d.ts.map +1 -0
- package/dist/static/static.d.ts +3 -0
- package/dist/static/static.d.ts.map +1 -0
- package/dist/storage/PulsarStorage.d.ts +42 -0
- package/dist/storage/PulsarStorage.d.ts.map +1 -0
- package/dist/storage/drivers/PostgresDriver.d.ts +20 -0
- package/dist/storage/drivers/PostgresDriver.d.ts.map +1 -0
- package/dist/storage/drivers/RedisDriver.d.ts +20 -0
- package/dist/storage/drivers/RedisDriver.d.ts.map +1 -0
- package/dist/storage/drivers/types.d.ts +27 -0
- package/dist/storage/drivers/types.d.ts.map +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +393 -0
- package/dist/storage/index.js.map +25 -0
- package/dist/storage/repositories/PostgresEngineOperationRepository.d.ts +39 -0
- package/dist/storage/repositories/PostgresEngineOperationRepository.d.ts.map +1 -0
- package/dist/storage/repositories/PostgresQueueRepository.d.ts +25 -0
- package/dist/storage/repositories/PostgresQueueRepository.d.ts.map +1 -0
- package/dist/storage/repositories/QueueRepository.d.ts +19 -0
- package/dist/storage/repositories/QueueRepository.d.ts.map +1 -0
- package/dist/storage/repositories/RedisQueueRepository.d.ts +27 -0
- package/dist/storage/repositories/RedisQueueRepository.d.ts.map +1 -0
- package/dist/subsys/DeferredTickEvaluator.d.ts +23 -0
- package/dist/subsys/DeferredTickEvaluator.d.ts.map +1 -0
- package/dist/subsys/EventBus.d.ts +13 -0
- package/dist/subsys/EventBus.d.ts.map +1 -0
- package/dist/subsys/ExecutionProfileSwitcher.d.ts +10 -0
- package/dist/subsys/ExecutionProfileSwitcher.d.ts.map +1 -0
- package/dist/subsys/LoggerService.d.ts +15 -0
- package/dist/subsys/LoggerService.d.ts.map +1 -0
- package/dist/subsys/PulsarClock.d.ts +32 -0
- package/dist/subsys/PulsarClock.d.ts.map +1 -0
- package/dist/subsys/RuntimeCacheStorage.d.ts +18 -0
- package/dist/subsys/RuntimeCacheStorage.d.ts.map +1 -0
- package/dist/subsys/RuntimeEventBridge.d.ts +14 -0
- package/dist/subsys/RuntimeEventBridge.d.ts.map +1 -0
- package/dist/transport/PulsarTransportManager.d.ts +10 -0
- package/dist/transport/PulsarTransportManager.d.ts.map +1 -0
- package/dist/transport/strategies/PollingTransport.d.ts +13 -0
- package/dist/transport/strategies/PollingTransport.d.ts.map +1 -0
- package/dist/transport/strategies/TcpListenTransport.d.ts +11 -0
- package/dist/transport/strategies/TcpListenTransport.d.ts.map +1 -0
- package/dist/transport/strategies/WebhookTransport.d.ts +9 -0
- package/dist/transport/strategies/WebhookTransport.d.ts.map +1 -0
- package/dist/transport/types.d.ts +41 -0
- package/dist/transport/types.d.ts.map +1 -0
- package/dist/types/base.types.d.ts +54 -0
- package/dist/types/base.types.d.ts.map +1 -0
- package/dist/types/config.types.d.ts +54 -0
- package/dist/types/config.types.d.ts.map +1 -0
- package/dist/types/consumer.types.d.ts +36 -0
- package/dist/types/consumer.types.d.ts.map +1 -0
- package/dist/types/engine.types.d.ts +115 -0
- package/dist/types/engine.types.d.ts.map +1 -0
- package/dist/types/eventTriggerStrategry.types.d.ts +34 -0
- package/dist/types/eventTriggerStrategry.types.d.ts.map +1 -0
- package/dist/types/integrations.types.d.ts +16 -0
- package/dist/types/integrations.types.d.ts.map +1 -0
- package/dist/types/nebula.types.d.ts +65 -0
- package/dist/types/nebula.types.d.ts.map +1 -0
- package/dist/types/queue.types.d.ts +95 -0
- package/dist/types/queue.types.d.ts.map +1 -0
- package/dist/types/runtime.types.d.ts +89 -0
- package/dist/types/runtime.types.d.ts.map +1 -0
- package/package.json +72 -5
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export type EnginePoolingMode = 'interval-driven-pooler' | 'event-driven-pooler';
|
|
2
|
+
export type EngineSelfInvocation = {
|
|
3
|
+
selfURL: string;
|
|
4
|
+
selfInvocationMethod?: "auto_using_pgnet";
|
|
5
|
+
} | {
|
|
6
|
+
selfURL: string;
|
|
7
|
+
selfInvocationMethod?: "manual";
|
|
8
|
+
handler: (selfUrl: string) => Promise<void> | void;
|
|
9
|
+
};
|
|
10
|
+
type BaseEngineOptions = {
|
|
11
|
+
/**
|
|
12
|
+
* The global maximum ceiling for total tick executions across ALL queues in a single execution run.
|
|
13
|
+
*
|
|
14
|
+
* Once the cumulative number of ticks executed across all queues reaches this limit,
|
|
15
|
+
* the engine terminates the current execution cycle and triggers a self-invocation restart.
|
|
16
|
+
*
|
|
17
|
+
* ### Execution Flow:
|
|
18
|
+
* ```
|
|
19
|
+
* [ Queue Ticks Executed ] ──(Count reaches cycleTickLimit)──> [ Terminate Cycle & Self-Invoke ]
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* For example, with 10 queues and `cycleTickLimit: 10`, each queue executes 1 tick before
|
|
23
|
+
* the engine reaches the global limit and restarts, ensuring no single queue consumes
|
|
24
|
+
* the entire execution window.
|
|
25
|
+
*
|
|
26
|
+
* @default Infinity
|
|
27
|
+
*/
|
|
28
|
+
cycleTickLimit?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Controls the execution strategy for dispatching tick cycles across target queues.
|
|
31
|
+
*
|
|
32
|
+
* This setting dictates whether the engine evaluates and triggers ticks across multiple
|
|
33
|
+
* configured queues sequentially (one queue at a time) or in parallel (simultaneously).
|
|
34
|
+
*
|
|
35
|
+
* ### Execution Flow Comparison:
|
|
36
|
+
*
|
|
37
|
+
* **`sequential` (Default - CPU & Memory Safe):**
|
|
38
|
+
* ```
|
|
39
|
+
* [ Queue A Tick ] ──(await completion)──> [ Queue B Tick ] ──(await completion)──> [ Queue C Tick ]
|
|
40
|
+
* ```
|
|
41
|
+
* * **Behavior:** Processes queue ticks strictly one after another in serial order.
|
|
42
|
+
* * **Pros:** Keeps CPU usage steady and avoids sudden spike loads on database connections and memory isolates.
|
|
43
|
+
* * **Cons:** Takes longer total clock time to complete a single tick cycle across all queues.
|
|
44
|
+
*
|
|
45
|
+
* **`parallel` (High Throughput - Higher Resource Demand):**
|
|
46
|
+
* ```
|
|
47
|
+
* ┌─> [ Queue A Tick ]
|
|
48
|
+
* ├─> [ Queue B Tick ] ─── (Fired simultaneously via Promise.allSettled)
|
|
49
|
+
* └─> [ Queue C Tick ]
|
|
50
|
+
* ```
|
|
51
|
+
* * **Behavior:** Dispatches tick evaluations for all candidate queues at the exact same moment.
|
|
52
|
+
* * **Pros:** Dramatically lowers cycle latency and maximizes total job processing throughput.
|
|
53
|
+
* * **Cons:** Produces concurrent CPU spikes, higher transient V8 memory allocations, and heavier concurrent database query bursts.
|
|
54
|
+
*
|
|
55
|
+
* > **Performance Note:** Choosing between `sequential` and `parallel` directly impacts engine resource utilization.
|
|
56
|
+
* > In environments with strict CPU time allocations or tight database connection limits, `sequential` prevents resource starvation.
|
|
57
|
+
* > For high-capacity environments prioritizing low dispatch latency across many queues, `parallel` delivers optimal speed.
|
|
58
|
+
*
|
|
59
|
+
* @default "sequential"
|
|
60
|
+
*/
|
|
61
|
+
tickConcurrency?: "parallel" | "sequential";
|
|
62
|
+
/**
|
|
63
|
+
* How often (in seconds) the engine checks its own internal health and runtime state.
|
|
64
|
+
*
|
|
65
|
+
* @default 15
|
|
66
|
+
*/
|
|
67
|
+
healthCheckIntervalSec?: number;
|
|
68
|
+
};
|
|
69
|
+
export type SelfInvokingEngine = BaseEngineOptions & {
|
|
70
|
+
selfURL: string;
|
|
71
|
+
selfInvocationMethod?: "auto_using_pgnet" | {
|
|
72
|
+
method: "manual";
|
|
73
|
+
handler: (selfUrl: string) => Promise<void> | void;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Specifies how often (in seconds) the engine should invoke itself.
|
|
77
|
+
*
|
|
78
|
+
* The minimum value is **1 second**. A higher number increases the delay
|
|
79
|
+
* between self-invocations.
|
|
80
|
+
*
|
|
81
|
+
* ### Recommendations & Workload Pacing
|
|
82
|
+
* * It is generally **recommended to keep the default (1 second)**.
|
|
83
|
+
* * Increasing this value introduces processing latency before jobs are picked up.
|
|
84
|
+
* * **Lower values (e.g., 1s)** process jobs faster and are recommended if you have
|
|
85
|
+
* multiple interval-driven queues with frequent, predictable workloads.
|
|
86
|
+
* * **Higher values (e.g., 5s)** process jobs slower but significantly reduce the
|
|
87
|
+
* total number of engine invocations over time.
|
|
88
|
+
*
|
|
89
|
+
* ### Estimated Monthly Invocations
|
|
90
|
+
* The lower this setting is, the higher the total invocation count will be at the
|
|
91
|
+
* end of the month.
|
|
92
|
+
*
|
|
93
|
+
* **1 Second Interval:**
|
|
94
|
+
* * Formula: `1 second * 60 seconds * 60 minutes * 24 hours * 30 days`
|
|
95
|
+
* * Total: **~2,592,000 invocations / month**
|
|
96
|
+
*
|
|
97
|
+
* **5 Seconds Interval:**
|
|
98
|
+
* * Formula: `(1 second / 5) * 60 seconds * 60 minutes * 24 hours * 30 days`
|
|
99
|
+
* * Total: **~518,400 invocations / month**
|
|
100
|
+
*
|
|
101
|
+
* *(Note: Depending on your hosting platform, actual invocation counts may be slightly
|
|
102
|
+
* higher or lower based on execution overhead).*
|
|
103
|
+
*
|
|
104
|
+
* @default 1
|
|
105
|
+
* @minimum 1
|
|
106
|
+
*/
|
|
107
|
+
selfInvocationIntervalSec?: number;
|
|
108
|
+
selfRestartIntervalSec?: number;
|
|
109
|
+
};
|
|
110
|
+
export type PersistentEngine = BaseEngineOptions & {
|
|
111
|
+
poolingMode?: EnginePoolingMode;
|
|
112
|
+
poolingIntervalMS?: number;
|
|
113
|
+
};
|
|
114
|
+
export {};
|
|
115
|
+
//# sourceMappingURL=engine.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.types.d.ts","sourceRoot":"","sources":["../../src/types/engine.types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,GAAG,qBAAqB,CAAC;AAEjF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,OAAO,EAAG,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAG,kBAAkB,CAAA;CAAE,GAChE;IAAE,OAAO,EAAG,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAG,QAAQ,CAAC;IAAC,OAAO,EAAG,CAAC,OAAO,EAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CAAE,CAAA;AAuGhH,KAAK,iBAAiB,GAAG;IACrB;;;;;;;;;;;;;;;;MAgBE;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,eAAe,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IAC5C;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,kBAAkB,GAAG;QAAE,MAAM,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC;IACrH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BE;IACF,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IAC/C,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare enum EventTriggerStrategy {
|
|
2
|
+
/**
|
|
3
|
+
* Uses PostgreSQL LISTEN/NOTIFY (PG Notify) for real-time event-driven queue triggering.
|
|
4
|
+
*
|
|
5
|
+
* **How it works:** The engine establishes a persistent subscription to a database channel.
|
|
6
|
+
* When an event occurs, Postgres broadcasts an instant notification, triggering the queues
|
|
7
|
+
* immediately with minimal latency and zero polling overhead.
|
|
8
|
+
*
|
|
9
|
+
* **Crucial Infrastructure Requirement:** This strategy **requires a direct, persistent TCP
|
|
10
|
+
* connection URL** provided to the Postgres driver. If your database infrastructure uses serverless
|
|
11
|
+
* proxies, restricted connection pools, or environments that do not support long-lived TCP socket
|
|
12
|
+
* listeners (LISTEN/NOTIFY state), this strategy will fail to receive events.
|
|
13
|
+
*/
|
|
14
|
+
POSTGRES_NOTIFY = "POSTGRES_NOTIFY",
|
|
15
|
+
/**
|
|
16
|
+
* Uses an external HTTP webhook driven directly by the database (`pg_net`).
|
|
17
|
+
*
|
|
18
|
+
* **How it works:** This strategy requires an accessible HTTP endpoint to be exposed on the
|
|
19
|
+
* running container or machine. When an event occurs, Postgres utilizes the built-in `pg_net`
|
|
20
|
+
* extension to fire an outbound HTTP request directly to this endpoint, which in turn invokes
|
|
21
|
+
* and executes the event-driven queues.
|
|
22
|
+
*/
|
|
23
|
+
WEBHOOK = "WEBHOOK",
|
|
24
|
+
/**
|
|
25
|
+
* Uses a database-backed table polling mechanism.
|
|
26
|
+
*
|
|
27
|
+
* **How it works:** Completely independent of persistent TCP notification sockets or HTTP
|
|
28
|
+
* endpoints. Instead, event producers insert new task rows directly into a designated
|
|
29
|
+
* subscription table. The engine periodically polls this table at a configured interval
|
|
30
|
+
* (e.g., every 500ms) to scan for new rows, process them, and trigger the respective queues.
|
|
31
|
+
*/
|
|
32
|
+
POLLING = "POLLING"
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=eventTriggerStrategry.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventTriggerStrategry.types.d.ts","sourceRoot":"","sources":["../../src/types/eventTriggerStrategry.types.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC5B;;;;;;;;;;;OAWG;IACH,eAAe,oBAAoB;IAEnC;;;;;;;OAOG;IACH,OAAO,YAAY;IAEnB;;;;;;;OAOG;IACH,OAAO,YAAY;CACtB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PulsarEventsIntegrations, PulsarLoggerIntegrations } from "../integrations";
|
|
2
|
+
import type { PulsarCore } from "../service/PulsarBaseService";
|
|
3
|
+
export interface IIntegration {
|
|
4
|
+
module: "API" | "EVENTS" | "LOGGER";
|
|
5
|
+
main: (engine: PulsarCore) => Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export interface IntegrationMap {
|
|
8
|
+
LOGGER: PulsarLoggerIntegrations;
|
|
9
|
+
API: any;
|
|
10
|
+
EVENTS: PulsarEventsIntegrations;
|
|
11
|
+
}
|
|
12
|
+
export type IntegrationConstructor = new (access: string) => IIntegration;
|
|
13
|
+
export interface HostOptions {
|
|
14
|
+
integrations?: Array<IntegrationConstructor | IIntegration>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=integrations.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.types.d.ts","sourceRoot":"","sources":["../../src/types/integrations.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,WAAW,YAAY;IACzB,MAAM,EAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACrC,IAAI,EAAE,CAAC,MAAM,EAAG,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAG,wBAAwB,CAAC;IAClC,GAAG,EAAG,GAAG,CAAC;IACV,MAAM,EAAG,wBAAwB,CAAC;CACrC;AAED,MAAM,MAAM,sBAAsB,GAAG,KAAK,MAAM,EAAE,MAAM,KAAK,YAAY,CAAC;AAE1E,MAAM,WAAW,WAAW;IACxB,YAAY,CAAC,EAAG,KAAK,CAAC,sBAAsB,GAAG,YAAY,CAAC,CAAC;CAChE"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operating execution mode for a Pulsar engine instance inside a Nebula cluster.
|
|
3
|
+
* Determines how the node handles global dynamic job spills versus dedicated queues.
|
|
4
|
+
*/
|
|
5
|
+
export type NebulaExecutionMode = 'exclusive' | 'shared' | 'hybrid';
|
|
6
|
+
/**
|
|
7
|
+
* Connection transport strategy to communicate with the Nebula Control Plane.
|
|
8
|
+
* Supports multiple backends for high-availability cluster state synchronization.
|
|
9
|
+
*/
|
|
10
|
+
export interface NebulaConnectionConfig {
|
|
11
|
+
/** Target endpoint for HTTP/REST/RPC handshakes (e.g. VPS URL, Edge worker API) */
|
|
12
|
+
endpoint?: string;
|
|
13
|
+
/** Direct client connection for Redis-backed Nebula cluster state */
|
|
14
|
+
redisUrl?: string;
|
|
15
|
+
/** Direct DB client configuration for Postgres-backed cluster state */
|
|
16
|
+
postgresUrl?: string;
|
|
17
|
+
/** Bearer token or cluster secret key for engine-to-control-plane authentication */
|
|
18
|
+
authToken?: string;
|
|
19
|
+
/** Maximum timeout in milliseconds for control plane handshakes */
|
|
20
|
+
timeoutMs?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Heartbeat, lease management, and health-reporting policy for this engine instance.
|
|
24
|
+
* Ensures orphaned workers are automatically reaped and locks are safely revoked.
|
|
25
|
+
*/
|
|
26
|
+
export interface NebulaHealthConfig {
|
|
27
|
+
/** Interval in milliseconds between heartbeat pings back to Nebula */
|
|
28
|
+
heartbeatIntervalMs: number;
|
|
29
|
+
/** Time-to-live for the instance lease in the central state store (seconds) */
|
|
30
|
+
leaseTtlSec: number;
|
|
31
|
+
/** Enable automatic lease revocation when the V8 isolate nears execution deadline */
|
|
32
|
+
revokeOnIsolateDeath: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Main Nebula configuration interface embedded directly in PulsarEngine setup.
|
|
36
|
+
* Coordinates static worker code registries with Nebula's dynamic control plane routing.
|
|
37
|
+
*/
|
|
38
|
+
export interface NebulaClusterConfig {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
/** Cluster name or prefix namespace to isolate environments (e.g. 'prod-eu-1') */
|
|
41
|
+
clusterId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Defines whether this engine instance operates as an exclusive, shared, or hybrid process
|
|
44
|
+
* within the Nebula cluster, controlling how queues are assigned during handshakes:
|
|
45
|
+
* - **'exclusive'**: Locks the instance strictly to its pre-configured static queues (e.g., `q1`, `q2`).
|
|
46
|
+
* Even during high traffic or load spikes, Nebula will never route any other queues to this instance.
|
|
47
|
+
* - **'shared'**: Allows Nebula to dynamically allocate any queues supported by this instance's
|
|
48
|
+
* partition based on current cluster load, backlogs, and scheduling algorithms.
|
|
49
|
+
* - **'hybrid'**: Maintains primary dedicated queue assignments while permitting the node to absorb
|
|
50
|
+
* fallback spillover capacity and overflow traffic whenever resources are idle.
|
|
51
|
+
*/
|
|
52
|
+
assignmentScope: NebulaExecutionMode;
|
|
53
|
+
/** Transport configuration for communicating with Nebula */
|
|
54
|
+
connection: NebulaConnectionConfig;
|
|
55
|
+
/** Health check, lease TTL, and heartbeat options */
|
|
56
|
+
health: NebulaHealthConfig;
|
|
57
|
+
/**
|
|
58
|
+
* Strict queue allocation safety guard.
|
|
59
|
+
* If true, throws an error if local static queue configuration collides
|
|
60
|
+
* with assigned Nebula remote queues on startup.
|
|
61
|
+
*/
|
|
62
|
+
strictIsolation?: boolean;
|
|
63
|
+
supportedPartitions?: string[];
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=nebula.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nebula.types.d.ts","sourceRoot":"","sources":["../../src/types/nebula.types.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,WAAW,GACX,QAAQ,GACR,QAAQ,CAAC;AAEb;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACnC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B,sEAAsE;IACtE,mBAAmB,EAAE,MAAM,CAAC;IAE5B,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IAEpB,qFAAqF;IACrF,oBAAoB,EAAE,OAAO,CAAC;CACjC;AAGD;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAG,OAAO,CAAC;IAElB,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;;OASG;IACH,eAAe,EAAE,mBAAmB,CAAC;IAErC,4DAA4D;IAC5D,UAAU,EAAE,sBAAsB,CAAC;IAEnC,qDAAqD;IACrD,MAAM,EAAE,kBAAkB,CAAC;IAE3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,mBAAmB,CAAC,EAAG,MAAM,EAAE,CAAC;CACnC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { TimingProfile, TimingProfileType } from "../static/TimingProfile.d.ts";
|
|
2
|
+
import type { EnginePoolingMode } from "./engine.types.d.ts";
|
|
3
|
+
export type EngineQueuesConfig = {
|
|
4
|
+
queue: string;
|
|
5
|
+
/**
|
|
6
|
+
* Configures the execution cadence and polling intervals for this queue.
|
|
7
|
+
*
|
|
8
|
+
* Accepts a predefined preset (`'REALTIME'`, `'STANDARD'`, `'BALANCED'`, `'RELAXED'`, `'ULTRA_EFFICIENT'`)
|
|
9
|
+
* or a custom `TimingProfile` object to fine-tune active, backoff, and idle delays.
|
|
10
|
+
*
|
|
11
|
+
* @default 'STANDARD'
|
|
12
|
+
*/
|
|
13
|
+
profile: TimingProfileType | TimingProfile;
|
|
14
|
+
/**
|
|
15
|
+
* Controls how the queue pulls work from storage.
|
|
16
|
+
*
|
|
17
|
+
* - `'interval-driven-pooler'`: For steady, predictable background workloads that need ongoing processing.
|
|
18
|
+
* - `'event-driven-pooler'`: For instant processing of sporadic or bursty jobs while keeping idle execution costs at zero.
|
|
19
|
+
*
|
|
20
|
+
* @default 'interval-driven-pooler'
|
|
21
|
+
*/
|
|
22
|
+
pooler: EnginePoolingMode;
|
|
23
|
+
/** */
|
|
24
|
+
type: "fifo" | "STANDER";
|
|
25
|
+
/**
|
|
26
|
+
* Maximum concurrent worker instances allowed for this queue.
|
|
27
|
+
*
|
|
28
|
+
* @warning High concurrency increases parallel connections, I/O operations, and resource contention on the database and storage layer.
|
|
29
|
+
*/
|
|
30
|
+
concurrency: number;
|
|
31
|
+
/** Number of jobs assigned per worker batch */
|
|
32
|
+
n: number;
|
|
33
|
+
/**
|
|
34
|
+
* Maximum aggregate jobs the engine can fetch in a single tick loop.
|
|
35
|
+
* If (concurrency * n) > maxJobsPerTick, active workers will be scaled
|
|
36
|
+
* down automatically to satisfy this limit (Backpressure throttling).
|
|
37
|
+
*/
|
|
38
|
+
maxJobsPerTick?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Defines the tick budget (quantum) allocated to this isolate. Once the tick count
|
|
41
|
+
* reaches this threshold, the engine marks the isolate's execution cycle as completed.
|
|
42
|
+
*
|
|
43
|
+
* @default 10
|
|
44
|
+
*
|
|
45
|
+
* @warning Do not set `cycleTickLimit` higher than 20 per queue, especially when running multiple queues.
|
|
46
|
+
* High tick limits keep execution pinned to the same serverless instance, escalating the risk
|
|
47
|
+
* of hitting total execution timeouts (e.g., AWS Lambda, Vercel, or Cloudflare Workers limits).
|
|
48
|
+
*/
|
|
49
|
+
cycleTickLimit?: number;
|
|
50
|
+
sleep?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Rules for automatically switching queue performance modes based on active workload.
|
|
53
|
+
*
|
|
54
|
+
* When a queue experiences sustained inactivity, the engine automatically transitions it
|
|
55
|
+
* into an idle state. This significantly reduces database read operations, lowers API and
|
|
56
|
+
* storage costs, and minimizes unnecessary CPU and network utilization during quiet periods.
|
|
57
|
+
*
|
|
58
|
+
* As soon as new jobs are detected, the engine instantly transitions back and restores
|
|
59
|
+
* the queue's original active timing profile without manual intervention or job delivery latency.
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
stateTransitionPolicy?: {
|
|
63
|
+
/**
|
|
64
|
+
* Whether automatic state switching is active for this queue.
|
|
65
|
+
*
|
|
66
|
+
* @default true
|
|
67
|
+
*/
|
|
68
|
+
enabled?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Number of consecutive empty ticks required before the engine transitions into idle mode for this queue.
|
|
71
|
+
*
|
|
72
|
+
* @default 10
|
|
73
|
+
*/
|
|
74
|
+
idleThresholdTicks?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The timing profile or custom interval object applied when the queue enters idle mode.
|
|
77
|
+
*
|
|
78
|
+
* Accepts a predefined preset (`'RELAXED'`, `'ULTRA_EFFICIENT'`) or a custom `TimingProfile`.
|
|
79
|
+
*
|
|
80
|
+
* maxTimerMs will be ignored
|
|
81
|
+
*
|
|
82
|
+
* @default 'RELAXED'
|
|
83
|
+
*/
|
|
84
|
+
idleTimingProfile?: TimingProfileType | TimingProfile;
|
|
85
|
+
};
|
|
86
|
+
deadLetterQueue?: string;
|
|
87
|
+
};
|
|
88
|
+
export type QueueMessage<T = unknown> = {
|
|
89
|
+
msg_id: number;
|
|
90
|
+
read_ct: number;
|
|
91
|
+
enqueued_at: Date;
|
|
92
|
+
vt: Date;
|
|
93
|
+
message: T;
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=queue.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.types.d.ts","sourceRoot":"","sources":["../../src/types/queue.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,kBAAkB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;MAOE;IACF,OAAO,EAAG,iBAAiB,GAAG,aAAa,CAAC;IAE5C;;;;;;;MAOE;IACF,MAAM,EAAG,iBAAiB,CAAC;IAE3B,OAAO;IACP,IAAI,EAAG,MAAM,GAAG,SAAS,CAAC;IAE1B;;;;MAIE;IACF,WAAW,EAAE,MAAM,CAAC;IAEpB,+CAA+C;IAC/C,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,cAAc,CAAC,EAAG,MAAM,CAAC;IAEzB;;;;;;;;;MASE;IACF,cAAc,CAAC,EAAG,MAAM,CAAC;IAEzB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;OAUG;IACH,qBAAqB,CAAC,EAAG;QACrB;;;;WAIG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB;;;;WAIG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B;;;;;;;;WAQG;QACH,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAAC;KACzD,CAAA;IAED,eAAe,CAAC,EAAG,MAAM,CAAC;CAC7B,CAAA;AAGD,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,IAAI,CAAC;IAClB,EAAE,EAAE,IAAI,CAAC;IACT,OAAO,EAAE,CAAC,CAAC;CACd,CAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { IsolateInstance } from "../service/Isolate.service.d.ts";
|
|
2
|
+
import type { NetworkConfig } from "../network/interfaces/network.types.d.ts";
|
|
3
|
+
import type { BaseEngineConfig } from "./base.types.d.ts";
|
|
4
|
+
import type { PersistentEngine, SelfInvokingEngine } from "./engine.types.d.ts";
|
|
5
|
+
import type { EventTriggerStrategy } from "./eventTriggerStrategry.types.d.ts";
|
|
6
|
+
/**
|
|
7
|
+
* Supported runtime execution environments for Pulsar.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum PulsarRuntime {
|
|
10
|
+
/**
|
|
11
|
+
* Configuration for ephemeral V8 isolate environments (Cloudflare Workers, Supabase Edge, Deno Deploy).
|
|
12
|
+
*
|
|
13
|
+
* In V8 isolate platforms, incoming requests share the same warm memory space until the isolate shuts down.
|
|
14
|
+
* The engine relies on the required `isolate` instance to monitor remaining isolate lifespan, handle dynamic global
|
|
15
|
+
* state, and sync tick schedules before the V8 isolate gets terminated by the cloud provider.
|
|
16
|
+
*/
|
|
17
|
+
V8_ISOLATE = "v8-isolate",
|
|
18
|
+
/**
|
|
19
|
+
* Configuration for containerized or persistent runtime environments (AWS Lambda, GCP Cloud Run, Docker, Node.js VMs).
|
|
20
|
+
*
|
|
21
|
+
* Unlike V8 isolates, these environments operate in dedicated process/container sandboxes with predictable execution limits
|
|
22
|
+
* or persistent process lifetimes. Tracking V8 isolate memory and remaining uptime across HTTP invocations is not strictly required.
|
|
23
|
+
*/
|
|
24
|
+
SERVERLESS_VM = "serverless-vm",
|
|
25
|
+
/**
|
|
26
|
+
* Configuration for traditional, long-running persistent environments (AWS EC2, VPS, Dedicated Servers, local Node.js processes).
|
|
27
|
+
*
|
|
28
|
+
* Unlike ephemeral isolates or serverless containers that spin down between invocations, persistent runtimes maintain an uninterrupted
|
|
29
|
+
* execution context and continuous process lifespan. The engine can rely on background event loops, stateful in-memory caching,
|
|
30
|
+
* and non-ephemeral scheduling without relying on cloud provider lifecycle hooks.
|
|
31
|
+
*/
|
|
32
|
+
PERSISTENT = "persistent"
|
|
33
|
+
}
|
|
34
|
+
export type PulsarRuntimeType = typeof PulsarRuntime[keyof typeof PulsarRuntime];
|
|
35
|
+
export type ConfigForRuntime<T extends PulsarRuntimeType> = T extends typeof PulsarRuntime.V8_ISOLATE ? V8IsolateConfig : T extends typeof PulsarRuntime.SERVERLESS_VM ? ServerlessVMConfig : PersistentConfig;
|
|
36
|
+
export type V8IsolateConfig = BaseEngineConfig & {
|
|
37
|
+
runtime: typeof PulsarRuntime.V8_ISOLATE;
|
|
38
|
+
engine: SelfInvokingEngine;
|
|
39
|
+
/**
|
|
40
|
+
* Active isolate tracking instance.
|
|
41
|
+
*/
|
|
42
|
+
isolate: IsolateInstance;
|
|
43
|
+
};
|
|
44
|
+
export type ServerlessVMConfig = BaseEngineConfig & {
|
|
45
|
+
runtime: typeof PulsarRuntime.SERVERLESS_VM;
|
|
46
|
+
engine: SelfInvokingEngine;
|
|
47
|
+
/**
|
|
48
|
+
* Optional isolate tracking instance if custom lifecycle tracking is desired inside Lambda or containerized workers.
|
|
49
|
+
*/
|
|
50
|
+
isolate?: IsolateInstance;
|
|
51
|
+
};
|
|
52
|
+
export type PersistentConfig = BaseEngineConfig & {
|
|
53
|
+
runtime: typeof PulsarRuntime.PERSISTENT;
|
|
54
|
+
/**
|
|
55
|
+
* Optional isolate tracking instance if custom lifecycle tracking is desired inside Lambda or containerized workers.
|
|
56
|
+
*/
|
|
57
|
+
isolate?: IsolateInstance;
|
|
58
|
+
networkInterface: {
|
|
59
|
+
/**
|
|
60
|
+
* Determines the operational network mode of the server.
|
|
61
|
+
*
|
|
62
|
+
* - `http`: Opens an HTTP server. Crucial for consumers running dependent workers
|
|
63
|
+
* (e.g., when a consumer cannot initialize local storage configuration directly).
|
|
64
|
+
* Dependent workers use this HTTP server for acks, retries, etc.
|
|
65
|
+
* *(Note: This mode introduces latency and throughput limitations).*
|
|
66
|
+
*
|
|
67
|
+
* - `socket`: Opens a WebSocket server. Both the pulsar and consumers connect to
|
|
68
|
+
* this socket to transport and dispatch jobs. Provides near-realtime job dispatch
|
|
69
|
+
* performance for workers.
|
|
70
|
+
*
|
|
71
|
+
* - `hybrid`: Opens both HTTP and WebSocket servers simultaneously. Ideal for
|
|
72
|
+
* multi-runtime deployed consumers where some instances operate in serverless
|
|
73
|
+
* functions and others on a VPS, allowing each consumer to select its optimal
|
|
74
|
+
* server option based on its specific configuration.
|
|
75
|
+
*/
|
|
76
|
+
mode: Exclude<NetworkConfig["mode"], "client">;
|
|
77
|
+
/**
|
|
78
|
+
* The port number on which the server instance will listen for incoming traffic.
|
|
79
|
+
*/
|
|
80
|
+
port: NetworkConfig["port"];
|
|
81
|
+
/**
|
|
82
|
+
* Optional hostname or IP address to bind the server to.
|
|
83
|
+
*/
|
|
84
|
+
host?: NetworkConfig["host"];
|
|
85
|
+
};
|
|
86
|
+
eventTriggerStrategy: typeof EventTriggerStrategy[keyof typeof EventTriggerStrategy];
|
|
87
|
+
engine: PersistentEngine;
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=runtime.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.types.d.ts","sourceRoot":"","sources":["../../src/types/runtime.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E;;GAEG;AACH,oBAAY,aAAa;IACrB;;;;;;OAMG;IACH,UAAU,eAAe;IAEzB;;;;;OAKG;IACH,aAAa,kBAAkB;IAE/B;;;;;;OAMG;IACH,UAAU,eAAe;CAC5B;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAEjF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,IACpD,CAAC,SAAS,OAAO,aAAa,CAAC,UAAU,GAAG,eAAe,GAC3D,CAAC,SAAS,OAAO,aAAa,CAAC,aAAa,GAAG,kBAAkB,GACjE,gBAAgB,CAAC;AAErB,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG;IAC7C,OAAO,EAAG,OAAO,aAAa,CAAC,UAAU,CAAC;IAC1C,MAAM,EAAE,kBAAkB,CAAC;IAC3B;;MAEE;IACF,OAAO,EAAG,eAAe,CAAC;CAC7B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAChD,OAAO,EAAG,OAAO,aAAa,CAAC,aAAa,CAAC;IAC7C,MAAM,EAAE,kBAAkB,CAAC;IAC3B;;MAEE;IACF,OAAO,CAAC,EAAG,eAAe,CAAC;CAC9B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAC9C,OAAO,EAAG,OAAO,aAAa,CAAC,UAAU,CAAC;IAE1C;;MAEE;IACF,OAAO,CAAC,EAAG,eAAe,CAAC;IAE3B,gBAAgB,EAAG;QACf;;;;;;;;;;;;;;;;UAgBE;QACF,IAAI,EAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;QAChD;;UAEE;QACF,IAAI,EAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B;;UAEE;QACF,IAAI,CAAC,EAAG,aAAa,CAAC,MAAM,CAAC,CAAC;KACjC,CAAA;IAED,oBAAoB,EAAG,OAAO,oBAAoB,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;IACtF,MAAM,EAAG,gBAAgB,CAAC;CAC7B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,73 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@hamim_4444/pulsar",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "index.ts",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"private": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./helpers": {
|
|
16
|
+
"types": "./dist/helpers/index.d.ts",
|
|
17
|
+
"import": "./dist/helpers/index.js",
|
|
18
|
+
"default": "./dist/helpers/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./integrations": {
|
|
21
|
+
"types": "./dist/integrations/index.d.ts",
|
|
22
|
+
"import": "./dist/integrations/index.js",
|
|
23
|
+
"default": "./dist/integrations/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./server": {
|
|
26
|
+
"types": "./dist/server/index.d.ts",
|
|
27
|
+
"import": "./dist/server/index.js",
|
|
28
|
+
"default": "./dist/server/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./storage": {
|
|
31
|
+
"types": "./dist/storage/index.d.ts",
|
|
32
|
+
"import": "./dist/storage/index.js",
|
|
33
|
+
"default": "./dist/storage/index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"typesVersions": {
|
|
37
|
+
"*": {
|
|
38
|
+
"storage": [
|
|
39
|
+
"./dist/storage/index.d.ts"
|
|
40
|
+
],
|
|
41
|
+
"server": [
|
|
42
|
+
"./dist/server/index.d.ts"
|
|
43
|
+
],
|
|
44
|
+
"integrations": [
|
|
45
|
+
"./dist/integrations/index.d.ts"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"dist"
|
|
51
|
+
],
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "bun run build.ts; bun pm pack;",
|
|
54
|
+
"dev": "bun --preload ./lua-plugin.ts src/run/index.ts"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/bun": "latest"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"typescript": "^5"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@hono/node-server": "^2.1.3",
|
|
64
|
+
"@upstash/redis": "^1.39.0",
|
|
65
|
+
"crossws": "^0.4.16",
|
|
66
|
+
"eventemitter3": "^5.0.4",
|
|
67
|
+
"hono": "^4.13.12",
|
|
68
|
+
"ioredis": "^6.0.0",
|
|
69
|
+
"js-sha256": "^1.0.0",
|
|
70
|
+
"postgres": "^3.4.9",
|
|
71
|
+
"srvx": "^1.0.7"
|
|
72
|
+
}
|
|
73
|
+
}
|