import path from "path" ; import os from "os" ; import fs from "fs-extra" ; import { getEasyopsConfig } from "@next-core/repo-config" ; const isTesting = process . env . NODE_ENV === "test" ; export const testYamlDir = path . join ( __dirname , "../../yaml" ) ; export const testApiDir = path . join ( testYamlDir , "api" ) ; export const testModelDir = path . join ( testYamlDir , "model" ) ; export const tmpDir = isTesting ? path . join ( os . tmpdir ( ) , "contract" ) : fs . mkdtempSync ( path . join ( os . tmpdir ( ) , "contract-" ) ) ; export const { contractYamlDir } = getEasyopsConfig ( ) ; export const easyopsYamlDir = path . join ( tmpDir , contractYamlDir ) ; export const easyopsApiDir = path . join ( easyopsYamlDir , "api" ) ; export const easyopsModelDir = path . join ( easyopsYamlDir , "model" ) ; export const yamlDir = isTesting ? testYamlDir : easyopsYamlDir ; export const apiDir = isTesting ? testApiDir : easyopsApiDir ; export const modelDir = isTesting ? testModelDir : easyopsModelDir ; export const i18nYamlFile = ".info.yaml" ;