/**
 * Centralized dependency imports for Onebox
 *
 * This file serves as the single source of truth for all external dependencies.
 * All modules should import from this file using: import * as plugins from './onebox.plugins.ts'
 */

// Deno Standard Library
import * as path from '@std/path';
import * as fs from '@std/fs';
import * as http from '@std/http';
import * as encoding from '@std/encoding';

export { path, fs, http, encoding };

// Database
import { Database } from '@db/sqlite';
export const sqlite = { DB: Database };

// Docker API Client
import { DockerHost } from '@apiclient.xyz/docker';
export const docker = { Docker: DockerHost };

// Cloudflare DNS Management (API Client)
import * as cloudflare from '@apiclient.xyz/cloudflare';
export { cloudflare };

// Let's Encrypt / ACME
import * as smartacme from '@push.rocks/smartacme';
export { smartacme };

// Docker Registry (OCI Distribution Specification)
import * as smartregistry from '@push.rocks/smartregistry';
export { smartregistry };

// S3-compatible storage server
import * as smartstorage from '@push.rocks/smartstorage';
export { smartstorage };

// AWS S3 client for S3-compatible object operations
import {
  S3Client,
  ListObjectsV2Command,
  GetObjectCommand,
  PutObjectCommand,
} from 'npm:@aws-sdk/client-s3@3.1009.0';
export const awsS3 = {
  S3Client,
  ListObjectsV2Command,
  GetObjectCommand,
  PutObjectCommand,
};

// Task scheduling and cron jobs
import * as taskbuffer from '@push.rocks/taskbuffer';
export { taskbuffer };

// JWT for authentication
import * as jwt from 'https://deno.land/x/djwt@v3.0.2/mod.ts';
export { jwt};

// Crypto key management
import { crypto } from 'https://deno.land/std@0.208.0/crypto/mod.ts';
export { crypto };

// Node.js compatibility layer for HTTPS with SNI support
import * as nodeHttps from 'node:https';
import * as nodeHttp from 'node:http';
export { nodeHttps, nodeHttp };

// TypedRequest/TypedServer infrastructure
import * as typedrequest from '@api.global/typedrequest';
import * as typedserver from '@api.global/typedserver';
export { typedrequest, typedserver };

// Auth & Guards
import * as smartguard from '@push.rocks/smartguard';
import * as smartjwt from '@push.rocks/smartjwt';
export { smartguard, smartjwt };

// Backup archive (content-addressed dedup storage)
import { ContainerArchive } from '@serve.zone/containerarchive';
export { ContainerArchive };

// serve.zone App Store contracts and resolver
import * as servezoneInterfaces from '@serve.zone/interfaces';
import * as servezoneAppstore from '@serve.zone/appstore';
export { servezoneInterfaces, servezoneAppstore };

// Node.js compat for streaming
import * as nodeFs from 'node:fs';
import * as nodeStream from 'node:stream';
export { nodeFs, nodeStream };
