decord/source/1105__wrappedIsEnabled.js

45 lines
1.7 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1105
// Function ID: 1106
2026-07-20 16:05:17 +00:00
// Name: _wrappedIsEnabled
2026-07-29 08:29:29 +00:00
// Dependencies: [817, 1072]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 1105 (_wrappedIsEnabled)
2026-07-23 10:11:24 +00:00
import registerSpanErrorInstrumentation from "registerSpanErrorInstrumentation";
2026-07-20 16:05:17 +00:00
function _wrappedIsEnabled(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
return function() {
2026-07-29 08:29:29 +00:00
const items = [...arguments];
const first = items[0];
const applyResult = callback.apply(this, items);
2026-08-04 21:03:28 +00:00
if (typeof first === "string") {
if (typeof applyResult === "boolean") {
2026-07-23 10:11:24 +00:00
const result = callback(outer1_1[0])._INTERNAL_insertFlagToScope(first, applyResult);
const obj = callback(outer1_1[0]);
const result1 = callback(outer1_1[0])._INTERNAL_addFeatureFlagToActiveSpan(first, applyResult);
const obj2 = callback(outer1_1[0]);
2026-07-20 16:05:17 +00:00
}
return applyResult;
}
2026-07-23 10:11:24 +00:00
if (callback(outer1_1[1]).DEBUG_BUILD) {
const debug = callback(outer1_1[0]).debug;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
debug.error("[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: " + first + " (" + typeof first + "), result: " + applyResult + " (" + typeof applyResult + ")");
2026-07-20 16:05:17 +00:00
}
};
}
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2026-07-23 10:11:24 +00:00
export const unleashIntegration = registerSpanErrorInstrumentation.defineIntegration((featureFlagClientClass) => {
featureFlagClientClass = featureFlagClientClass.featureFlagClientClass;
2026-07-20 16:05:17 +00:00
return {
name: "Unleash",
setupOnce() {
2026-07-23 10:11:24 +00:00
featureFlagClientClass(outer1_1[0]).fill(featureFlagClientClass.prototype, "isEnabled", outer1_2);
2026-07-20 16:05:17 +00:00
},
processEvent(contexts) {
2026-07-29 08:29:29 +00:00
return featureFlagClientClass(table[0])._INTERNAL_copyFlagsFromScopeToEvent(contexts);
2026-07-20 16:05:17 +00:00
}
};
});