UNPKG

@azure/monitor-opentelemetry

Version:
30 lines 1.01 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.loadAzureFunctionCore = loadAzureFunctionCore; exports.dirName = dirName; // Provides CommonJS-specific implementation for various functions // As per https://github.com/isaacs/tshy?tab=readme-ov-file#commonjs-dialect-polyfills // Encapsulating the ESM / CommonJS specific implementation as needed. /** * A CommonJS module loader for Azure Function Core. */ function loadAzureFunctionCore() { try { // eslint-disable-next-line @typescript-eslint/no-require-imports return require("@azure/functions-core"); } catch (e) { // Module not found, this is expected in non-Azure Functions environments return undefined; } } /** * A polyfill for __dirname in CommonJS * @returns The directory name of the current module. */ function dirName() { return __dirname; } //# sourceMappingURL=module-cjs.cjs.map