feature: emit events

This commit is contained in:
Andy Burke 2025-07-01 19:14:18 -07:00
parent 0d0f399cc2
commit 3214d17b80
7 changed files with 460 additions and 18 deletions

8
cli.ts
View file

@ -91,7 +91,7 @@ switch (command) {
Deno.exit(1);
}
console.log(JSON.stringify(item, null, 4));
console.log(JSON.stringify(item, null, '\t'));
break;
}
case 'create': {
@ -109,7 +109,7 @@ switch (command) {
const item: any = JSON.parse(item_json);
const created_item: any = await collection.create(item);
console.log('created: ' + JSON.stringify(created_item, null, 4));
console.log('created: ' + JSON.stringify(created_item, null, '\t'));
break;
}
case 'update': {
@ -127,7 +127,7 @@ switch (command) {
const item: any = JSON.parse(item_json);
const updated_item: any = await collection.update(item);
console.log('updated: ' + JSON.stringify(updated_item, null, 4));
console.log('updated: ' + JSON.stringify(updated_item, null, '\t'));
break;
}
case 'delete': {
@ -145,7 +145,7 @@ switch (command) {
const item: any = JSON.parse(item_json);
const deleted_item: any = await collection.delete(item);
console.log('deleted: ' + JSON.stringify(deleted_item, null, 4));
console.log('deleted: ' + JSON.stringify(deleted_item, null, '\t'));
break;
}
case 'find':