Initial commit

This commit is contained in:
Brian McGonagill 2026-03-18 09:02:21 -05:00
commit b3a51a4115
10336 changed files with 2381973 additions and 0 deletions

View file

@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDepthContextFor = getDepthContextFor;
exports.createDepthIdentifier = createDepthIdentifier;
const globals_1 = require("../../../utils/globals");
const depthContextCache = new Map();
function getDepthContextFor(contextMeta) {
if (contextMeta === undefined) {
return { depth: 0 };
}
if (typeof contextMeta !== 'string') {
return contextMeta;
}
const cachedContext = (0, globals_1.safeMapGet)(depthContextCache, contextMeta);
if (cachedContext !== undefined) {
return cachedContext;
}
const context = { depth: 0 };
(0, globals_1.safeMapSet)(depthContextCache, contextMeta, context);
return context;
}
function createDepthIdentifier() {
const identifier = { depth: 0 };
return identifier;
}