{"version":3,"file":"getMachineId-darwin.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-darwin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;;oBAEf,qBAAM,SAAS,CAAC,wCAAwC,CAAC,EAAA;;oBAAlE,MAAM,GAAG,SAAyD;oBAElE,MAAM,GAAG,MAAM,CAAC,MAAM;yBACzB,KAAK,CAAC,IAAI,CAAC;yBACX,IAAI,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAA/B,CAA+B,CAAC,CAAC;oBAEjD,IAAI,CAAC,MAAM,EAAE;wBACX,sBAAO,EAAE,EAAC;qBACX;oBAEK,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;wBACtB,sBAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC;qBAC9B;;;;oBAED,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;wBAG/C,sBAAO,EAAE,EAAC;;;;CACX","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return '';\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}