Commit Graph

3 Commits

Author SHA1 Message Date
KernelDeimos
54b8990c70 devex(extensions): simplify kv get and set methods
The basic `.get()` and `.set()` calls should be the same between
persistent key-value store (puter-kvstore) and in-memory cache (kv.js).
This commit wraps these methods to support the "shorthand" usage.
2025-10-02 16:53:59 -04:00
KernelDeimos
d85f5fad5e dev: expose 'kv' as 'cache' from data extension 2025-09-26 17:31:00 -04:00
KernelDeimos
601eb019a2 dev(extensions): [+] data
The data extension adds convenient access to the database and kvstore
via it's 'db' and 'kv' exports.

Example usage:
  const { db, kv } = extensions.import('data');
  await kv.set('some-key', 'some-value');
  await db.write('INSERT INTO something (a, b) VALUES (1, 2)');
2025-09-26 15:28:00 -04:00