Skip to content

Commit

Permalink
Added script changes
Browse files Browse the repository at this point in the history
Signed-off-by: Prateek Kumar <[email protected]>
  • Loading branch information
prateek-kumar-improving committed Sep 18, 2024
1 parent 673f61f commit 31731e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function sendPingToRandomNodeInCluster() {
clientName: "test_cluster_client",
});
// The empty array signifies that there are no additional arguments.
const pong = await client.customCommand(["PING"], "randomNode");
const pong = await client.customCommand(["PING"], { route: "randomNode" });
console.log(pong);
await send_set_and_get(client);
client.close();
Expand Down
12 changes: 12 additions & 0 deletions node/npm/glide/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ function initialize() {
createLeakedMap,
createLeakedString,
parseInfoResponse,
Script,
ObjectType,
ClusterScanCursor,
BaseClientConfiguration,
GlideClusterClientConfiguration,
LevelOptions,
} = nativeBinding;

module.exports = {
Expand Down Expand Up @@ -305,6 +311,12 @@ function initialize() {
createLeakedMap,
createLeakedString,
parseInfoResponse,
Script,
ObjectType,
ClusterScanCursor,
BaseClientConfiguration,
GlideClusterClientConfiguration,
LevelOptions,
};

globalObject = Object.assign(global, nativeBinding);
Expand Down
2 changes: 1 addition & 1 deletion node/src/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const LEVEL = new Map<LevelOptions | undefined, Level | undefined>([
["trace", Level.Trace],
[undefined, undefined],
]);
type LevelOptions = "error" | "warn" | "info" | "debug" | "trace";
export type LevelOptions = "error" | "warn" | "info" | "debug" | "trace";

/*
* A singleton class that allows logging which is consistent with logs from the internal rust core.
Expand Down

0 comments on commit 31731e8

Please sign in to comment.