Files
formipay/node_modules/@sentry/node/esm/integrations/console.js
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00

62 lines
1.9 KiB
JavaScript

import { __read, __spread, __values } from "tslib";
import { getCurrentHub } from '@sentry/core';
import { fill, severityFromString } from '@sentry/utils';
import * as util from 'util';
/** Console module integration */
var Console = /** @class */ (function () {
function Console() {
/**
* @inheritDoc
*/
this.name = Console.id;
}
/**
* @inheritDoc
*/
Console.prototype.setupOnce = function () {
var e_1, _a;
try {
for (var _b = __values(['debug', 'info', 'warn', 'error', 'log']), _c = _b.next(); !_c.done; _c = _b.next()) {
var level = _c.value;
fill(console, level, createConsoleWrapper(level));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
};
/**
* @inheritDoc
*/
Console.id = 'Console';
return Console;
}());
export { Console };
/**
* Wrapper function that'll be used for every console level
*/
function createConsoleWrapper(level) {
return function consoleWrapper(originalConsoleMethod) {
var sentryLevel = severityFromString(level);
/* eslint-disable prefer-rest-params */
return function () {
if (getCurrentHub().getIntegration(Console)) {
getCurrentHub().addBreadcrumb({
category: 'console',
level: sentryLevel,
message: util.format.apply(undefined, arguments),
}, {
input: __spread(arguments),
level: level,
});
}
originalConsoleMethod.apply(this, arguments);
};
/* eslint-enable prefer-rest-params */
};
}
//# sourceMappingURL=console.js.map