@itwin/presentation-backend
Version:
Backend of iTwin.js Presentation library
50 lines • 3.18 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.PresentationBackendNativeLoggerCategory = exports.PresentationBackendLoggerCategory = exports.RulesetEmbedder = exports.PresentationManager = exports.HierarchyCacheMode = exports.Presentation = void 0;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/**
* @module Core
*
* @docs-group-description Core
* Common types used for retrieving presentation data from iModels.
*/
var Presentation_js_1 = require("./presentation-backend/Presentation.js");
Object.defineProperty(exports, "Presentation", { enumerable: true, get: function () { return Presentation_js_1.Presentation; } });
var PresentationManager_js_1 = require("./presentation-backend/PresentationManager.js");
Object.defineProperty(exports, "HierarchyCacheMode", { enumerable: true, get: function () { return PresentationManager_js_1.HierarchyCacheMode; } });
Object.defineProperty(exports, "PresentationManager", { enumerable: true, get: function () { return PresentationManager_js_1.PresentationManager; } });
var RulesetEmbedder_js_1 = require("./presentation-backend/RulesetEmbedder.js");
Object.defineProperty(exports, "RulesetEmbedder", { enumerable: true, get: function () { return RulesetEmbedder_js_1.RulesetEmbedder; } });
/**
* @module Logging
*
* @docs-group-description Logging
* Types related to logging in this package.
*/
var BackendLoggerCategory_js_1 = require("./presentation-backend/BackendLoggerCategory.js");
Object.defineProperty(exports, "PresentationBackendLoggerCategory", { enumerable: true, get: function () { return BackendLoggerCategory_js_1.PresentationBackendLoggerCategory; } });
Object.defineProperty(exports, "PresentationBackendNativeLoggerCategory", { enumerable: true, get: function () { return BackendLoggerCategory_js_1.PresentationBackendNativeLoggerCategory; } });
const globalSymbolPresentationBackend = Symbol.for("itwin.presentation.backend.globals");
if (globalThis[globalSymbolPresentationBackend]) {
// Get the stack trace from when the module was first loaded
const firstLoadStack = globalThis[globalSymbolPresentationBackend].stack;
const error = new Error("Multiple @itwin/presentation-backend imports detected! This may happen if:\n" +
"- You have multiple versions of the package installed\n" +
"- Your bundling configuration is incorrect\n" +
"- You're importing from both ESM and CommonJS versions");
/* eslint-disable no-console */
console.error("Duplicate @itwin/presentation-backend import:", error);
console.error("First import occurred at:", firstLoadStack);
console.error("Current import occurred at:", error.stack);
/* eslint-enable no-console */
throw error;
}
else {
globalThis[globalSymbolPresentationBackend] = {
stack: new Error().stack,
};
}
//# sourceMappingURL=presentation-backend.js.map
;