Skip to content

Commit

Permalink
fixed console logs to print pending
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSurana committed Dec 27, 2023
1 parent fd5a5d7 commit 31a9d1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/firepad-monaco-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const init = function (): void {
trimAutoWhitespace: false,
});

const firepad = Firepad.fromMonacoWithFirestore(firestoreRef, editor, {
const firepad = Firepad.fromMonacoWithFirebase(firebaseRef, editor, {
userName: `Anonymous ${Math.floor(Math.random() * 100)}`,
defaultText: `// typescript Editing with Firepad!
function go() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hackerrank/firepad",
"description": "Collaborative text editing powered by Firebase",
"version": "0.8.4-dev-4",
"version": "0.8.4-dev-5",
"author": {
"email": "bprogyan@gmail.com",
"name": "Progyan Bhattacharya",
Expand Down
9 changes: 5 additions & 4 deletions src/firebase-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ export class FirebaseAdapter implements IDatabaseAdapter {
* @param revision - Intial revision to start monitoring from.
*/
protected _monitorHistoryStartingAt(revision: number): void {
console.log(`[firepad] _monitorHistoryStartingAt ${revision}`, {
console.log(`[firepad] _monitorHistoryStartingAt`, {
revision,
timestamp: Date.now(),
});

Expand Down Expand Up @@ -360,7 +361,7 @@ export class FirebaseAdapter implements IDatabaseAdapter {

console.log(`[firepad] _handleInitialRevisions pending`, {
revisionId,
pending,
pending: Object.assign({}, pending),
timestamp: Date.now(),
});

Expand Down Expand Up @@ -411,7 +412,7 @@ export class FirebaseAdapter implements IDatabaseAdapter {

console.log(`[firepad] _handlePendingReceivedRevisions`, {
revisionId,
pending,
pending: Object.assign({}, pending),
timestamp: Date.now(),
});

Expand Down Expand Up @@ -472,7 +473,7 @@ export class FirebaseAdapter implements IDatabaseAdapter {

console.log(`[firepad] _handlePendingReceivedRevisions complete`, {
revision: this._revision,
pending: this._pendingReceivedRevisions,
pending: Object.assign({}, this._pendingReceivedRevisions),
timestamp: Date.now(),
});

Expand Down

0 comments on commit 31a9d1e

Please sign in to comment.