/*
 * Copyright (c) 2018, 2025, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const PRE_COMPILER=require("./sublib/precomp/Precompiler");const UTILS=require("./sublib/precomp/Utils");const TsUtils=function(jafUtils,fsUtils,msgCtx,semVer,nd){this._jafUtils=jafUtils;this._fsUtils=fsUtils;this._utils=null;this._msgCtx=msgCtx;this._semVer=semVer;this._nd=nd;this._isDebug=msgCtx.isDebug;this._isVerbose=msgCtx.isVerbose;this._ojetCfg=null;this._preComp=null};TsUtils.prototype.getUtils=function(){if(!this._utils){this._utils=new UTILS(this._ojetCfg,this._jafUtils,this._fsUtils,this._msgCtx,this._nd)}return this._utils};TsUtils.prototype.getPreCompiler=function(){if(!this._preComp){if(this._isDebug){this.msgCtx.debug("Loading precompiler lib...")}this._preComp=new PRE_COMPILER(this.getUtils(),this._jafUtils,this._fsUtils,this._msgCtx,this._semVer,this._nd)}return this._preComp};TsUtils.prototype.setOjetConfig=function(cfg){this._ojetCfg=cfg};module.exports=TsUtils;