// AUTO-COPIED FROM scripts/static-lib-index.ts // DO NOT EDIT GENERATED lib/index.ts DIRECTLY // scripts/static-lib-index.ts // Source of truth for protobuf barrel exports (copied to lib/index.ts after generation) // Update when adding new testsystem packages. // // NOTE: Import paths in this file are relative to lib/ and won't resolve from scripts/ // This is intentional - the file is copied to lib/index.ts during generation where paths work correctly. // // This file provides a clean, organized export structure for the generated protobuf code: // - Individual module exports (common, testCase, testSuite, events, observer, google) // - Unified testsystem namespace combining all modules // - Proper TypeScript types without complex runtime merging // // See NAMESPACE_ORGANIZATION.md for detailed usage documentation. // Re-export all generated modules with clean namespace structure export * as google from './google/protobuf/timestamp'; export { testsystem as common } from './testsystem/v1/common/common'; export { testsystem as testCase } from './testsystem/v1/entities/test_case'; export { testsystem as testSuite } from './testsystem/v1/entities/test_suite'; export { testsystem as events } from './testsystem/v1/events/events'; export { testsystem as observer } from './testsystem/v1/observer/observer'; // Import all namespace modules import { testsystem as commonNS } from './testsystem/v1/common/common'; import { testsystem as testCaseNS } from './testsystem/v1/entities/test_case'; import { testsystem as testSuiteNS } from './testsystem/v1/entities/test_suite'; import { testsystem as eventsNS } from './testsystem/v1/events/events'; import { testsystem as observerNS } from './testsystem/v1/observer/observer'; // Deep merge helper for nested namespaces function isPlainObject(value: unknown): value is Record { if (value === null || typeof value !== 'object') { return false; } const proto = Object.getPrototypeOf(value); return proto === Object.prototype || proto === null; } function deepMerge( target: Record, ...sources: Record[] ): Record { for (const source of sources) { for (const key of Object.keys(source)) { const sourceValue = source[key]; if (isPlainObject(sourceValue)) { const targetValue = target[key]; if (!isPlainObject(targetValue)) { target[key] = {}; } deepMerge( target[key] as Record, sourceValue as Record ); } else { // For non-plain objects (including functions, class instances, arrays, etc.), // copy the value by reference instead of deep merging. target[key] = sourceValue; } } } return target; } // Runtime merged namespace with proper deep merging for nested v1.entities, v1.events, etc. export const testsystem = deepMerge({}, commonNS, testCaseNS, testSuiteNS, eventsNS, observerNS); // Export type for the merged namespace export type testsystem = typeof testsystem;