63 Commits

Author SHA1 Message Date
Fanis Tharropoulos
adc80532b4
feat(process): make peering address optional for typesense process
- make `ipAddress` optional in `TypesenseProcessManager`
- remove default ip address fallback
- conditionally add peering address arguments to process startup
- restructure argument building for better readability
2025-01-14 16:50:43 +02:00
Fanis Tharropoulos
196efe8645
feat(client): sync typesense client log level with application
- add dynamic log level setting based on application's logger level
- use `debug` level when application is in debug mode
- fallback to `info` level for all other cases
2025-01-14 16:49:19 +02:00
Fanis Tharropoulos
fc26511bcb
feat(ci): add dynamic ip detection for integration tests
- add `networkInterfaces` detection for CI environments
- make `ip` parameter optional in test command
- add fallback to default ip for non-CI environments
- introduce `isInCi` flag to control ip detection behavior
- handle null ip case in `writeToNodesFile`
2025-01-14 16:45:28 +02:00
Fanis Tharropoulos
0f52828ac3
fix(fs): auto-create missing directory is passed in yes 2025-01-14 16:30:37 +02:00
Fanis Tharropoulos
b9d33234cc
docs: update README 2025-01-13 17:16:24 +02:00
Fanis Tharropoulos
9cff0be6ad
chore(tsconfig): update tsconfig to include importing by file extension 2025-01-13 17:12:44 +02:00
Fanis Tharropoulos
26b7811bb6
feat(cli): add benchmark command for performance testing
- Add benchmark command to compare performance between commits
- Add time-based metrics for search and indexing operations
- Add result formatting with percentage change calculations
- Add configurable failure threshold for performance regression
- Add container and process management for test execution
2025-01-13 17:12:30 +02:00
Fanis Tharropoulos
8793f1b0a1
feat(benchmark): add k6 search benchmark scenarios
- Add multiple search test scenarios (filter, sort, facet, group)
- Add instant search simulation with character-by-character queries
- Add processing time and timeout metrics collection
- Add dynamic VU (Virtual User) scaling support
- Add search phrase generation with stop words filtering
2025-01-13 17:12:12 +02:00
Fanis Tharropoulos
04d4931f39
feat(benchmark): add k6 indexing benchmark script
- Add document import benchmark with k6 metrics tracking
- Add environment validation for benchmark configuration
- Add success checks for import operations
- Add import duration trend tracking
- Add batch size parameter support
2025-01-13 17:11:53 +02:00
Fanis Tharropoulos
c6f9cda8e2
feat(benchmark): add k6 environment validation
- Add `validateK6Environment` function for env var validation
- Add type-safe validation for required k6 environment variables
- Add specific validation rules for numeric, string, and duration values
- Add error reporting for invalid environment configurations
2025-01-13 17:11:35 +02:00
Fanis Tharropoulos
3cec7a2cd8
feat(benchmark): add k6 benchmarking service
- Add `K6Benchmarks` class for managing performance tests
- Implement search and indexing benchmark methods
- Add environment variable configuration for k6 tests
- Add collection schema for benchmark dataset
- Add logging and error handling for benchmark execution
2025-01-13 17:11:12 +02:00
Fanis Tharropoulos
7df0d5b7a4
feat(process): improve typesense node configuration and startup
- Add `NodeConfig` interface for typesense node configuration
- Add `initNode` method to validate node configuration
- Make `snapshotPath` optional with default value
- Add option to disable multi-node mode in `startProcess`
- Simplify process error handling and cleanup
2025-01-13 17:09:31 +02:00
Fanis Tharropoulos
40c971dc6c
refactor(logger): refactor logging logic for process management 2025-01-13 17:08:23 +02:00
Fanis Tharropoulos
064fd1badb
feat(types): add album type for benchmark and utility type helpers
- Add `Album` interface for music data structure
- Add `NumericIndices` type helper for array index types
- Add `EnsureExhaustive` type for record validation
- Add `EnvVariableKey` generic type for environment variables
2025-01-13 17:07:43 +02:00
Fanis Tharropoulos
56116fde3b
build(benchmark): add configs for docker dependencies 2025-01-13 17:07:04 +02:00
Fanis Tharropoulos
85b549f758
chore: add k6 and influxdb deps 2025-01-13 17:06:40 +02:00
Fanis Tharropoulos
22acfaee02
docs: add README 2025-01-08 12:48:34 +02:00
Fanis Tharropoulos
f68c8689ff
feat(tests): add openai embedding tests to the integration suite
- add `openAIEmbeddingTest` method to test custom dimension embeddings
- add `getCollection` method to `TypesenseProcessManager` for validation
- add node config tracking to `IntegrationTests` class for process management
- update test chain to include openai embedding test step
2025-01-08 12:41:34 +02:00
Fanis Tharropoulos
004043e2ec
feat(tests): add snapshot test and related methods
- add `snapshotTest` method to run snapshot test
- add private `verifySnapshot` method to check if snapshot file exists
- add private `saveSnapshot` method to take a snapshot of the Typesense process
- update `test` command to run `snapshotTest` after `conversationTest`
- add `snapshotPath` option to `integrationTestOptionsSchema` and `test` command
- pass `snapshotPath` to `IntegrationTests` constructor
- add `getSnapshotPath` getter to `TypesenseProcessManager`
- add `snapshot` method to `TypesenseProcessManager` to take a snapshot of a Typesense process
2025-01-08 12:41:34 +02:00
Fanis Tharropoulos
cb1d85bea7
feat(tests): extract process setup into separate method
- extract `writeToNodesFile`, `createDataDirectories`, `mapNodesToDirectories` and `startAndVerifyProcesses` into a new `setupProcesses` method
- make extracted methods private
- update `test` command to use `setupProcesses` method
- simplify `test` command by removing unnecessary variable assignments
2025-01-08 12:41:34 +02:00
Fanis Tharropoulos
1bf68e335f
feat(commands): add integration tests for conversation functionality
- Add `tests` command to run typesense integration tests
- Implement conversation model and collection creation
- Add base collection with text embedding support
- Add health check verification for cluster nodes
- Support multiple node configuration with data directories
2025-01-07 13:15:35 +02:00
Fanis Tharropoulos
96f647b993
feat(services): add typesense client operations to process manager
- Create typesense client instance with connection configuration
- Add methods for collection operations (create, query, index)
- Add conversation model creation support
- Add health check capability via `callOutToProcess`
- Make processes map public for external access
2025-01-07 13:14:49 +02:00
Fanis Tharropoulos
10824c49cc
feat(services): return build destination path from save operation
- Update `buildAndSave` method to return the full destination path
- Modify `save` method to return the build destination for downstream use
- Chain results using `map` to propagate the destination path
2025-01-07 13:14:29 +02:00
Fanis Tharropoulos
483bb57c5b
chore: add typesense npm package 2025-01-07 13:14:12 +02:00
Fanis Tharropoulos
fbf19161ee
fix(utils): update package directory resolution
- Export `dirName` constant using `fileURLToPath` for ESM compatibility
- Replace hardcoded `__dirname` with `dirName` in `install.ts` command
- Fix imports ordering in `install.ts` for better readability
2025-01-07 13:13:26 +02:00
Fanis Tharropoulos
1e179b7c36
feat(process): add typesense process management
- Add process controller with cleanup and event handling
- Add process manager with process lifecycle methods
- Add port mapping for multiple nodes
- Add executable validation and process spawning
2025-01-03 19:26:12 +02:00
Fanis Tharropoulos
cfe03123cd
feat(fs): add directory management utilities
- Add createDirectory method with option to empty existing dir
- Add yesToAll flag to skip prompts
- Extract directory validation logic into reusable methods
- Add readdir check for empty directories
- Improve error handling and feedback
2025-01-03 19:25:56 +02:00
Fanis Tharropoulos
66b621a435
feat(fs): add mode parameter to exists method
- Add mode parameter for access permission checking
- Remove unneeded spinner message on exists check
2025-01-03 19:24:22 +02:00
Fanis Tharropoulos
2d9f4e40ec
refactor(services): rename typesense to typesense-dir
- rename `typesense.ts` to `typesense-dir.ts` to better reflect its purpose
- update imports in `container.ts` and `git.ts`
2025-01-03 19:22:37 +02:00
Fanis Tharropoulos
fd149fd7af
feat(utils): add isStringifiable type guard function
- Add type guard to check if value has `toString` method
- Add tests for strings, numbers, booleans and objects
- Add type narrowing validation test
2025-01-03 18:31:30 +02:00
Fanis Tharropoulos
0b9850d75d
fix(logger): fix tests for logger after adding blank line 2025-01-03 18:30:20 +02:00
Fanis Tharropoulos
e7b59437f9
feat(cli): add install command for typesense builds
- Add `install` command to handle typesense installation flow
- Add command-line options parsing with zod schema validation
- Add service orchestration for build process
- Add error handling and progress reporting
- Add verbose logging support and yes-to-all flag
2025-01-03 15:26:18 +02:00
Fanis Tharropoulos
c4f45b7255
feat(container): add service container for dependency management
- Add `ServiceContainer` class to manage service dependencies
- Add initialization logic for filesystem, docker, and git services
- Add support for both host and container git operations
- Add typesense manager integration
- Add service retrieval with type safety
2025-01-03 15:25:55 +02:00
Fanis Tharropoulos
0539b95ecb
feat(dir-manager): add directory manager for build automation
- Add `TypesenseDirectoryManager` class for build environment setup
- Add methods for directory validation and repository management
- Add build orchestration with bazel integration
- Add interactive prompts for directory handling
- Add build artifact extraction and cleanup
2025-01-03 15:25:18 +02:00
Fanis Tharropoulos
60bace16fd
feat(git): add git service with repository management
- Add `GitService` class to handle repository operations
- Add methods for cloning, checkout, and commit handling
- Add support for container-based git operations
- Add safe directory configuration management
- Add detailed logging and progress indicators
2025-01-03 15:24:59 +02:00
Fanis Tharropoulos
491186fa88
feat(docker): add docker service for container management
- Add `DockerService` class to handle container lifecycle operations
- Add methods for container validation, execution, and file copying
- Add support for building images with platform-specific configuration
- Add container start/stop operations with parallel processing
- Add logging and progress indicators using `ora` spinners
2025-01-03 15:24:31 +02:00
Fanis Tharropoulos
39b75968ee
feat(fs): add filesystem service for directory management
- Add `FilesystemService` class to handle directory operations
- Implement methods for existence checks, path resolution and cleanup
- Add platform detection utility for cross-platform support
- Add interactive prompt for directory creation using `inquirer`
2025-01-03 15:24:08 +02:00
Fanis Tharropoulos
3a5bcac56b
chore(bench): add inquirer 2025-01-03 15:13:17 +02:00
Fanis Tharropoulos
03cb41f38a
feat(bench): add a blank line before logger statements 2025-01-03 15:12:58 +02:00
Fanis Tharropoulos
b55c3d287f
feat(bench): add stdout type for execa 2025-01-03 15:12:39 +02:00
Fanis Tharropoulos
9d990cab8d
fix(bench): remove unused eslint ignore comments 2024-12-30 17:10:25 +02:00
Fanis Tharropoulos
bc1f26b4e7
feat(utils): add parseOptions utility for option validation
- add `parseOptions` function that validates options against zod schema
- return validated data using `neverthrow` result type
- handle validation errors with detailed messages
2024-12-30 13:27:15 +02:00
Fanis Tharropoulos
603e2f12c0
chore(bench): add ora 2024-12-30 12:47:12 +02:00
Fanis Tharropoulos
33a5e05428
feat(utils): add utility for wrapping execa with result type 2024-12-30 12:39:48 +02:00
Fanis Tharropoulos
ef023c6069
chore(bench): add neverthrow 2024-12-30 12:24:30 +02:00
Fanis Tharropoulos
2075c3bac9
chore(bench): add execa 2024-12-30 12:21:47 +02:00
Fanis Tharropoulos
62004f0ea0
feat(utils): implement error handling utilities
- add `error.ts` with type-safe error handling functions
- add `handleError` for general and `zod` validation errors
- add tests covering various error scenarios and edge cases
2024-12-30 12:19:27 +02:00
Fanis Tharropoulos
ec84e066cd
chore(bench): add zod 2024-12-30 12:17:48 +02:00
Fanis Tharropoulos
c26b3cb8f2
feat(utils): add colored logger with log levels
- implement singleton logger with multiple log levels (ERROR, WARN, INFO, DEBUG)
- support colored output using chalk for different log types
- add message formatting for errors and objects
- include tests for logger behavior, levels and color output
- implement break method for line spacing
2024-12-30 11:59:36 +02:00
Fanis Tharropoulos
8edd829bb4
chore(bench): add chalk 2024-12-30 11:37:47 +02:00