Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 18.117.251.240
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : run_command.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunAdminCommandOperation = exports.RunCommandOperation = void 0;
const utils_1 = require("../utils");
const operation_1 = require("./operation");
/** @internal */
class RunCommandOperation extends operation_1.AbstractOperation {
    constructor(parent, command, options) {
        super(options);
        this.command = command;
        this.options = options;
        this.ns = parent.s.namespace.withCollection('$cmd');
    }
    get commandName() {
        return 'runCommand';
    }
    async execute(server, session) {
        this.server = server;
        const res = await server.command(this.ns, this.command, {
            ...this.options,
            readPreference: this.readPreference,
            session
        }, this.options.responseType);
        return res;
    }
}
exports.RunCommandOperation = RunCommandOperation;
class RunAdminCommandOperation extends operation_1.AbstractOperation {
    constructor(command, options) {
        super(options);
        this.command = command;
        this.options = options;
        this.ns = new utils_1.MongoDBNamespace('admin', '$cmd');
    }
    get commandName() {
        return 'runCommand';
    }
    async execute(server, session) {
        this.server = server;
        const res = await server.command(this.ns, this.command, {
            ...this.options,
            readPreference: this.readPreference,
            session
        });
        return res;
    }
}
exports.RunAdminCommandOperation = RunAdminCommandOperation;
//# sourceMappingURL=run_command.js.map
© 2025 GrazzMean-Shell