import { availableParallelism } from 'poolifier'
import { httpClientPool } from './pool.js'
-import { type WorkerResponse } from './types.js'
+import type { WorkerResponse } from './types.js'
const parallelism = availableParallelism() * 2
const requestUrl = 'http://localhost:8080/'
import { fileURLToPath } from 'node:url'
import { dirname, extname, join } from 'node:path'
import { DynamicThreadPool, availableParallelism } from 'poolifier'
-import { type WorkerData, type WorkerResponse } from './types.js'
+import type { WorkerData, WorkerResponse } from './types.js'
const workerFile = join(
dirname(fileURLToPath(import.meta.url)),
-import { type URL } from 'node:url'
+import type { URL } from 'node:url'
import {
type RequestInfo as NodeFetchRequestInfo,
type RequestInit as NodeFetchRequestInit
} from 'node-fetch'
-import { type AxiosRequestConfig } from 'axios'
+import type { AxiosRequestConfig } from 'axios'
export interface WorkerData {
input: URL | RequestInfo | NodeFetchRequestInfo
type ResponseInit as NodeFetchRequestInit
} from 'node-fetch'
import axios from 'axios'
-import { type WorkerData, type WorkerResponse } from './types.js'
+import type { WorkerData, WorkerResponse } from './types.js'
class HttpClientWorker extends ThreadWorker<WorkerData, WorkerResponse> {
public constructor () {
import type { AddressInfo } from 'node:net'
import { ClusterWorker } from 'poolifier'
import express, { type Express, type Request, type Response } from 'express'
-import { type WorkerData, type WorkerResponse } from './types.js'
+import type { WorkerData, WorkerResponse } from './types.js'
const factorial: (n: number) => number = n => {
if (n === 0) {
import type { TransferListItem } from 'node:worker_threads'
import type * as fastify from 'fastify'
-import { type DynamicThreadPool } from 'poolifier'
+import type { DynamicThreadPool } from 'poolifier'
import {
type ThreadWorkerData,
type ThreadWorkerResponse
import type { TransferListItem } from 'node:worker_threads'
import { DynamicThreadPool, availableParallelism } from 'poolifier'
-import { type FastifyPluginCallback } from 'fastify'
+import type { FastifyPluginCallback } from 'fastify'
import fp from 'fastify-plugin'
import {
type FastifyPoolifierOptions,
import type { TransferListItem } from 'node:worker_threads'
import type * as fastify from 'fastify'
-import { type DynamicThreadPool } from 'poolifier'
-import { type WorkerData, type WorkerResponse } from '../../src/types.ts'
+import type { DynamicThreadPool } from 'poolifier'
+import type { WorkerData, WorkerResponse } from '../../src/types.ts'
declare module 'fastify' {
export interface FastifyInstance extends fastify.FastifyInstance {
import type { TransferListItem } from 'node:worker_threads'
import { DynamicThreadPool, availableParallelism } from 'poolifier'
-import { type FastifyPluginCallback } from 'fastify'
+import type { FastifyPluginCallback } from 'fastify'
import fp from 'fastify-plugin'
import {
type FastifyPoolifierOptions,
-import { type ThreadPoolOptions } from 'poolifier'
+import type { ThreadPoolOptions } from 'poolifier'
export interface BodyPayload {
number?: number
import { dirname, extname, join } from 'node:path'
import { DynamicThreadPool, availableParallelism } from 'poolifier'
import type SMTPTransport from 'nodemailer/lib/smtp-transport/index.js'
-import { type WorkerData } from './types.js'
+import type { WorkerData } from './types.js'
const workerFile = join(
dirname(fileURLToPath(import.meta.url)),
import { createTransport } from 'nodemailer'
import type Mail from 'nodemailer/lib/mailer/index.js'
import type SMTPTransport from 'nodemailer/lib/smtp-transport/index.js'
-import { type WorkerData } from './types.js'
+import type { WorkerData } from './types.js'
class SmtpClientWorker extends ThreadWorker<
WorkerData,
import { dirname, extname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { FixedClusterPool, availableParallelism } from 'poolifier'
-import { type WorkerData, type WorkerResponse } from './types.js'
+import type { WorkerData, WorkerResponse } from './types.js'
const workerFile = join(
dirname(fileURLToPath(import.meta.url)),
import { dirname, extname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { FixedClusterPool, availableParallelism } from 'poolifier'
-import { type ClusterWorkerData, type ClusterWorkerResponse } from './types.js'
+import type { ClusterWorkerData, ClusterWorkerResponse } from './types.js'
const webSocketServerWorkerFile = join(
dirname(fileURLToPath(import.meta.url)),
import { randomUUID } from 'node:crypto'
import { performance } from 'node:perf_hooks'
-import { type TransferListItem } from 'node:worker_threads'
+import type { TransferListItem } from 'node:worker_threads'
import type {
MessageValue,
PromiseResponseWrapper,
import { EventEmitter } from 'node:events'
-import { type TransferListItem } from 'node:worker_threads'
+import type { TransferListItem } from 'node:worker_threads'
import type { TaskFunction } from '../worker/task-functions'
import type {
ErrorHandler,