UNPKG

snowflake-sdk

Version:
17 lines 700 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TESTABLE_REQUIRE_REFERENCE = void 0; exports.getApplicationPath = getApplicationPath; // Allows to mock require in tests exports.TESTABLE_REQUIRE_REFERENCE = typeof require !== 'undefined' ? require : undefined; /** * Returns the file path of the main application entry point. * * - Uses require.main.filename (CommonJS) as primary source * - Falls back to process.argv[1] for ESM or worker threads * - Returns null in REPL or bundlers */ function getApplicationPath() { return exports.TESTABLE_REQUIRE_REFERENCE?.main?.filename || process.argv?.[1] || null; } //# sourceMappingURL=application_path.js.map