ticket-bridge / hyper-durable Goto Github PK
View Code? Open in Web Editor NEWSimple and useful Durable Object abstraction
License: MIT License
Simple and useful Durable Object abstraction
License: MIT License
if I can use Map or Set. Will there be any problems?
Trying to get a service setup using this lib however im running into some strange issues with persistance.
For some reason, when doing a filter over an array, it breaks with the error "# could not be cloned.". While debugging, it appears that forcing JS to create a new Array using JSON.parse/stringify, it successfully saves. Although i'm not convinced this hotfix will work 100% of the time.
console.log(
this.repeat_queue, // [ { event: 'testEvent.created', object: { }, repeat_count: 0 } ]
this.repeat_queue.isProxy // true
)
this.repeat_queue = this.repeat_queue.filter(e => e.id != event.id)
console.log(
this.repeat_queue, // [ { event: 'testEvent.created', object: { }, repeat_count: 0 } ] - Yes, the array is the same. However its considered dirty due to the Filter (??)
this.repeat_queue.isProxy // true
)
If you wanted to see the code for yourself:
https://github.com/drivly/webhooks.do/blob/main/src/webhook.durable.js#L119
Love the library! Thanks for releasing it :)
I keep getting a type error when I use nested objects:
TypeError: this is not a Date object.
at Proxy.valueOf (<anonymous>)
This occurs when you have a DOI with a nested object:
class MyDo {
my_dates: {
created_at: Date
}
...
}
I've modified the Counter DO and tests to include a property like the above and the tests do cause an exception. Here's my fork and branch where I'm trying to fix this: https://github.com/fisherdarling/hyper-durable/tree/feat/fix-proxy-getters
Any thoughts would be much appreciated! And again, thanks for making such an awesome library :D
please make an example with websockets
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.