Skip to content

Commit

Permalink
dependencies: Upgrade dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
timabbott committed Oct 17, 2024
1 parent e6791d7 commit b4e205a
Show file tree
Hide file tree
Showing 19 changed files with 5,673 additions and 4,207 deletions.
2 changes: 1 addition & 1 deletion examples/call_endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ const config = {
type: 'stream',
subject: 'Testing zulip-js',
content: 'Something is horribly wrong....',
})
}),
);
})();
2 changes: 1 addition & 1 deletion examples/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const config = {
queue_id: process.env.ZULIP_QUEUE_ID,
last_event_id: -1,
dont_block: false,
})
}),
);
// Prints
// { msg: '',
Expand Down
4 changes: 2 additions & 2 deletions examples/interactive_call_endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const zulip = require('../lib');
if (process.argv[2] === 'help') {
console.log('This is a helper script to test Zulip APIs.');
console.log(
'Call with: npm run call <method> <endpoint> <json_params> <zuliprc path>.'
'Call with: npm run call <method> <endpoint> <json_params> <zuliprc path>.',
);
console.log(
'Put your zuliprc file in ~/.zuliprc or specify the 4th argument above.'
'Put your zuliprc file in ~/.zuliprc or specify the 4th argument above.',
);
process.exit(0);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const config = {
await z.messages.update({
message_id: res.id,
content: 'New content',
})
}),
);

const readParams = {
Expand Down
2 changes: 1 addition & 1 deletion examples/private-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const config = {
],
num_before: 1,
num_after: 1,
})
}),
);
// Fetch the most recent message
const mostRecentParams = {
Expand Down
2 changes: 1 addition & 1 deletion examples/subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ const zulip = require('../lib');
console.log(
await z.users.me.subscriptions.add({
subscriptions: JSON.stringify([{ name: 'off topic' }]),
})
}),
);
})();
17 changes: 5 additions & 12 deletions examples/typing-notifications/send-and-recieve.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@ const zulip = require('../../lib');

if (process.argv.length < 7) {
console.log(
'Usage: $node examples/typing-notifications/send-and-recieve.js realm-url sender-username sender-API-key recipient-username recipient-API-key'
'Usage: $node examples/typing-notifications/send-and-recieve.js realm-url sender-username sender-API-key recipient-username recipient-API-key',
);
process.exit(1);
}

const [
,
,
realm,
sender,
senderAPIKey,
recipient,
recipientAPIKey,
] = process.argv;
const [, , realm, sender, senderAPIKey, recipient, recipientAPIKey] =
process.argv;

(async () => {
const senderClient = await zulip({
Expand All @@ -41,12 +34,12 @@ const [
await senderClient.typing.send({
to: [recipientId],
op: 'start',
})
}),
);
console.log(
await recipientClient.events.retrieve({
queue_id: queueID,
last_event_id: -1,
})
}),
);
})();
2 changes: 1 addition & 1 deletion examples/typing-notifications/send-often.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const zulip = require('../../lib');

if (process.argv.length < 6) {
console.log(
'Usage: $node examples/typing-notifications/send-often.js realm-url sender-username sender-API-key recipient-user-ID'
'Usage: $node examples/typing-notifications/send-often.js realm-url sender-username sender-API-key recipient-user-ID',
);
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/typing-notifications/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ const config = {
queue_id: queueID,
last_event_id: -1,
dont_block: false,
})
}),
);
})();
4 changes: 2 additions & 2 deletions examples/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const config = {
password: 'temp',
full_name: 'New User',
short_name: 'newbie',
})
}),
);

// Get user profile
Expand All @@ -52,7 +52,7 @@ const config = {
console.log(
await z.users.me.subscriptions.remove({
subscriptions: JSON.stringify(['Verona']),
})
}),
);

// Get pointer for user
Expand Down
Loading

0 comments on commit b4e205a

Please sign in to comment.