Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/proxy_server/node_modules/bull-board/dist/ui/components/Highlight/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Highlight = void 0;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const core_1 = __importDefault(require("highlight.js/lib/core"));
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const json_1 = __importDefault(require("highlight.js/lib/languages/json"));
const react_1 = __importDefault(require("react"));
const stacktrace_1 = require("./languages/stacktrace");
core_1.default.registerLanguage('json', json_1.default);
core_1.default.registerLanguage('stacktrace', stacktrace_1.stacktraceJS);
class Highlight extends react_1.default.Component {
constructor() {
super(...arguments);
this.codeRef = react_1.default.createRef();
}
shouldComponentUpdate(nextProps) {
return (nextProps.language !== this.props.language ||
(Array.isArray(this.props.children)
? this.props.children.some((item) => ![].concat(nextProps.children).includes(item))
: nextProps.children !== this.props.children));
}
componentDidMount() {
this.highlightCode();
}
componentDidUpdate() {
this.highlightCode();
}
render() {
const { language } = this.props;
return (react_1.default.createElement("pre", { ref: this.codeRef },
react_1.default.createElement("code", { className: language })));
}
highlightCode() {
var _a;
const node = (_a = this.codeRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('code');
if (node) {
node.textContent = this.props.children;
core_1.default.highlightElement(node);
}
}
}
exports.Highlight = Highlight;
//# sourceMappingURL=Highlight.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0054 ]-- |