UNPKG

@azure/monitor-opentelemetry

Version:
1 lines 1.12 kB
{"version":3,"file":"module-cjs.cjs","sourceRoot":"","sources":["../../../src/shared/module-cjs.cts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AASlC,sDAGC;AAMD,0BAEC;AAlBD,kEAAkE;AAClE,sFAAsF;AACtF,sEAAsE;AAEtE;;GAEG;AACH,SAAgB,qBAAqB;IACnC,iEAAiE;IACjE,OAAO,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC1C,CAAC;AAED;;;GAGG;AACH,SAAgB,OAAO;IACrB,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Provides CommonJS-specific implementation for various functions\n// As per https://github.com/isaacs/tshy?tab=readme-ov-file#commonjs-dialect-polyfills\n// Encapsulating the ESM / CommonJS specific implementation as needed.\n\n/**\n * A CommonJS module loader for Azure Function Core.\n */\nexport function loadAzureFunctionCore(): ReturnType<typeof require> {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n return require(\"@azure/functions-core\");\n}\n\n/**\n * A polyfill for __dirname in CommonJS\n * @returns The directory name of the current module.\n */\nexport function dirName(): string {\n return __dirname;\n}\n"]}