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

Method #createScriptCommand

packages/client/lib/client/index.ts:343–354  ·  view source on GitHub ↗
(script: RedisScript, resp: RespVersions)

Source from the content-addressed store, hash-verified

341 }
342
343 static #createScriptCommand(script: RedisScript, resp: RespVersions) {
344 const prefix = scriptArgumentsPrefix(script);
345 const transformReply = getTransformReply(script, resp);
346
347 return async function (this: ProxyClient, ...args: Array<unknown>) {
348 const parser = new BasicCommandParser(this._self._keyPrefix);
349 parser.push(...prefix);
350 script.parseCommand(parser, ...args)
351
352 return this._executeScript(script, parser, this._commandOptions, transformReply);
353 }
354 }
355
356 // eslint-disable-next-line @typescript-eslint/no-explicit-any
357 static #SingleEntryCache = new SingleEntryCache<any, any>()

Callers

nothing calls this directly

Calls 4

pushMethod · 0.95
_executeScriptMethod · 0.95
scriptArgumentsPrefixFunction · 0.90
getTransformReplyFunction · 0.90

Tested by

no test coverage detected