decord/source/__helpers/00xxx/970__wrappedIsEnabled.js
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

44 lines
1.7 KiB
JavaScript

// Module ID: 970
// Function ID: 971
// Name: _wrappedIsEnabled
// Dependencies: [682, 937]
// Module 970 (_wrappedIsEnabled)
import registerSpanErrorInstrumentation from "registerSpanErrorInstrumentation" /* 682 */;
function _wrappedIsEnabled(arg0) {
closure_0 = arg0;
return function() {
const items = [...arguments];
const first = items[0];
const applyResult = callback.apply(this, items);
if (typeof first === "string") {
if (typeof applyResult === "boolean") {
const result = callback(closure_1_1[0])._INTERNAL_insertFlagToScope(first, applyResult);
const obj = callback(closure_1_1[0]);
const result1 = callback(closure_1_1[0])._INTERNAL_addFeatureFlagToActiveSpan(first, applyResult);
const obj2 = callback(closure_1_1[0]);
}
return applyResult;
}
if (callback(closure_1_1[1]).DEBUG_BUILD) {
const debug = callback(closure_1_1[0]).debug;
const _HermesInternal = HermesInternal;
debug.error("[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: " + first + " (" + typeof first + "), result: " + applyResult + " (" + typeof applyResult + ")");
}
};
}
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
export const unleashIntegration = registerSpanErrorInstrumentation.defineIntegration((featureFlagClientClass) => {
featureFlagClientClass = featureFlagClientClass.featureFlagClientClass;
return {
name: "Unleash",
setupOnce() {
featureFlagClientClass(closure_1_1[0]).fill(featureFlagClientClass.prototype, "isEnabled", closure_1_2);
},
processEvent(contexts) {
return featureFlagClientClass(table[0])._INTERNAL_copyFlagsFromScopeToEvent(contexts);
}
};
});