MCPcopy
hub / github.com/redis/node-redis / #createScriptCommand

Method #createScriptCommand

packages/client/lib/client/pool.ts:152–163  ·  view source on GitHub ↗
(script: RedisScript, resp: RespVersions)

Source from the content-addressed store, hash-verified

150 }
151
152 static #createScriptCommand(script: RedisScript, resp: RespVersions) {
153 const prefix = scriptArgumentsPrefix(script);
154 const transformReply = getTransformReply(script, resp);
155
156 return async function (this: ProxyPool, ...args: Array<unknown>) {
157 const parser = new BasicCommandParser(this._self._keyPrefix);
158 parser.pushVariadic(prefix);
159 script.parseCommand(parser, ...args);
160
161 return this.execute(client => client._executeScript(script, parser, this._commandOptions, transformReply))
162 };
163 }
164
165 // eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic cache, keys/values vary per call site
166 static #SingleEntryCache = new SingleEntryCache<any, any>();

Callers

nothing calls this directly

Calls 5

pushVariadicMethod · 0.95
executeMethod · 0.95
scriptArgumentsPrefixFunction · 0.90
getTransformReplyFunction · 0.90
_executeScriptMethod · 0.80

Tested by

no test coverage detected