//#region imports
import { crossPlatformPath, path, dotTaonFolder, Helpers__NS__filesFrom, UtilsJson__NS__readJsonWithComments, UtilsOs__NS__getRealHomeDir } from 'tnp-core/lib-prod';
import { BaseCliWorkerConfig } from './base-cli-worker-config';
//#endregion
//namespace BaseCliWorkerUtils
export const BaseCliWorkerUtils__NS__getPathToProcessLocalInfoJson = (serviceID) => {
    //#region @backendFunc
    // console.log('os.userInfo()', os.userInfo());
    return crossPlatformPath([
        UtilsOs__NS__getRealHomeDir(),
        dotTaonFolder,
        '__workers-service-process-info__',
        `${serviceID}.json`,
    ]);
    //#endregion
};
export const BaseCliWorkerUtils__NS__getAllServicesFromOS = () => {
    //#region @backendFunc
    const dir = crossPlatformPath(path.dirname(BaseCliWorkerUtils__NS__getPathToProcessLocalInfoJson('dummy')));
    return Helpers__NS__filesFrom(dir)
        .filter(f => f.endsWith('.json'))
        .map(f => BaseCliWorkerConfig.from(UtilsJson__NS__readJsonWithComments(f)));
    //#endregion
};
//end of namespace BaseCliWorkerUtils
//# sourceMappingURL=c:/Users/darek/projects/npm/taon-dev/tnp-helpers/dist-nocutsrc-prod/lib/base/classes/base-cli-worker/base-cli-worker.utils.js.map