mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-27 03:42:34 +00:00
dev: expose Context and ready event to extensions
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
This commit is contained in:
@@ -82,6 +82,7 @@ const install = async ({ services, app, useapi, modapi }) => {
|
||||
def('puter.middlewares.anticsrf', require('./middleware/anticsrf'));
|
||||
|
||||
def('core.APIError', require('./api/APIError'));
|
||||
def('core.Context', Context);
|
||||
|
||||
def('core', require('./services/auth/Actor'), { assign: true });
|
||||
def('core.config', config);
|
||||
|
||||
@@ -61,6 +61,10 @@ class EventService extends BaseService {
|
||||
this.listeners_ = {};
|
||||
this.global_listeners_ = [];
|
||||
}
|
||||
|
||||
async ['__on_boot.ready'] () {
|
||||
this.emit('ready', {}, {});
|
||||
}
|
||||
|
||||
async emit (key, data, meta) {
|
||||
meta = meta ?? {};
|
||||
|
||||
Reference in New Issue
Block a user