// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.

import { defineConfig } from 'vitest/config';
import path from 'path';

export default defineConfig({
  test: {
    globals: true,
    environment: 'node',
  },
  resolve: {
    alias: {
      '@objectstack/core': path.resolve(__dirname, '../../core/src/index.ts'),
      '@objectstack/spec/ai': path.resolve(__dirname, '../../spec/src/ai/index.ts'),
      '@objectstack/spec/api': path.resolve(__dirname, '../../spec/src/api/index.ts'),
      '@objectstack/spec/contracts': path.resolve(__dirname, '../../spec/src/contracts/index.ts'),
      '@objectstack/spec/data': path.resolve(__dirname, '../../spec/src/data/index.ts'),
      '@objectstack/spec/kernel': path.resolve(__dirname, '../../spec/src/kernel/index.ts'),
      '@objectstack/spec/system': path.resolve(__dirname, '../../spec/src/system/index.ts'),
      '@objectstack/spec/ui': path.resolve(__dirname, '../../spec/src/ui/index.ts'),
      '@objectstack/spec/automation': path.resolve(__dirname, '../../spec/src/automation/index.ts'),
      '@objectstack/spec/security': path.resolve(__dirname, '../../spec/src/security/index.ts'),
      '@objectstack/spec/identity': path.resolve(__dirname, '../../spec/src/identity/index.ts'),
      '@objectstack/spec/integration': path.resolve(__dirname, '../../spec/src/integration/index.ts'),
      '@objectstack/spec/studio': path.resolve(__dirname, '../../spec/src/studio/index.ts'),
      '@objectstack/spec/cloud': path.resolve(__dirname, '../../spec/src/cloud/index.ts'),
      '@objectstack/spec/qa': path.resolve(__dirname, '../../spec/src/qa/index.ts'),
      '@objectstack/spec/shared': path.resolve(__dirname, '../../spec/src/shared/index.ts'),
      '@objectstack/spec': path.resolve(__dirname, '../../spec/src/index.ts'),
    },
  },
});
