Commit Graph

24 Commits

Author SHA1 Message Date
KernelDeimos
5caa2c0e3a fix: logging in AppConnection 2024-11-07 14:26:30 -05:00
KernelDeimos
ba2eb716f5 dev: add prefix logger 2024-11-05 15:57:55 -05:00
KernelDeimos
e71fe11e32 dev: add toggle logging, and fix issues in logger 2024-11-05 15:31:17 -05:00
KernelDeimos
b0cbcdf743 dev: add logger to putility 2024-11-05 15:03:21 -05:00
KernelDeimos
84989367a7 dev: hook extensions into service event bus 2024-11-01 17:42:12 -04:00
KernelDeimos
14d45a27ed feat: add extension API for modules
Allows modules to register a listener to the 'install' event without
creating a Module class. This changes how external modules are
installed.

External modules are now referred to as "extensions"; this commit does
not update the term but does use 'extension' as the name of the global.
2024-10-31 18:08:27 -04:00
KernelDeimos
0fb4f73d76 chore: remove noisy logs 2024-10-19 17:31:46 -04:00
KernelDeimos
480d996279 dev: proof-of-concept for fs postMessage relay
Adds a filesystem relay service to GUI-side which currently reports an
exmaple fsentry for /stat and /readdir. Added filesystem services for
both sides. Moved filesystem implementations from src/modules to src/lib
since they're being called by services now rather than modules.

This functionality is effectively disabled unless
src/puter-js/src/services/Filesystem.js is updated to use init_app_fs_()
when the environment is 'app'.
2024-10-19 03:46:47 -04:00
KernelDeimos
6e5d5c2021 dev: clone property descriptors in Context 2024-10-19 03:45:41 -04:00
KernelDeimos
bc5d09fe31 dev: hooks and sequencing functions for ServiceManager 2024-10-18 23:10:19 -04:00
KernelDeimos
94e15dbfa8 test: fix topics test and ServiceManager 2024-10-18 19:13:06 -04:00
KernelDeimos
3c5d2af8c8 fix: small issue in Service.js 2024-10-18 15:53:40 -04:00
KernelDeimos
7922314840 dev: add generic pub/sub system for use anywhere
Dispatching and listening to events is non-trivial. The apparent
triviality is in implementing a list of listeners and calling them. The
non-triviality is in the nature of what happens to a system when it has
multiple different interfaces to register listeners and publish events.

This commit adds TopicsFeature, which allows any class extending
AdvancedBase to declare topics. A topic is a simple pub/sub channel.
TopicsFeature will manage the state of listeners so the class doesn't
need to. A GC-friendly mechanism for detaching listeners is also provided.
2024-10-17 22:56:00 -04:00
KernelDeimos
9b1f1817f5 dev: move service interface to trait 2024-10-17 22:56:00 -04:00
KernelDeimos
273a51fc53 dev: add ServiceManager
The ServiceManager will replace manual management of services within
initgui, and will also be used within puter.js. Eventually Puter's
backend might use this instead of the existing Container class, although
this will be a large change that needs to be done incrementally.

The difference between ServiceManager and Container is the logic behind
when initialization occurs. Rather than have all services initialized at
once when Container's init() method is called, services are initialized
as soon as their dependencies have been initialized.
2024-10-17 22:56:00 -04:00
KernelDeimos
fd7bd339ca dev: add Context to putility 2024-10-15 16:17:37 -04:00
KernelDeimos
9e88096e7e clean: remove a console.log 2024-10-14 15:19:52 -04:00
KernelDeimos
fc9a371e09 dev: add more to NariMethodsFeature 2024-10-11 18:39:58 -04:00
KernelDeimos
43c5402b7c feat(putility): trait method override support
Support for trait method overrides will make it possible to use putility
traits with the decorator pattern while using a proxy class to avoid
redundant re-implementation of proxy methods.

Use of the pattern described above will occur in the implementation of
client-side filesystem caching.
2024-10-11 18:39:58 -04:00
KernelDeimos
c12ae2a923 dev: prepare puter.js fs for decorator pattern
- de-coupled xhr callback passing from the interface of the underlying
  filesystem implementation.
- This makes the interface to delegate calls more suitable for use with
  the decorator pattern.
- The decorator pattern will be used to manage the complexity of the
  caching layer by separating the concerns of different caching methods.
2024-10-11 18:39:58 -04:00
KernelDeimos
d4b96a17c8 dev: add RWLock to putility 2024-10-10 18:47:07 -04:00
KernelDeimos
e2cb6194bb dev: add startup apps, start emulator by default 2024-09-18 16:21:07 -04:00
KernelDeimos
18a24f614f dev: update ipc ready and app launched events 2024-09-02 17:37:38 -04:00
KernelDeimos
a4e9c7bdd7 rename folder 2024-08-29 22:24:55 -04:00