New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@rocket.chat/apps-engine

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rocket.chat/apps-engine - npm Package Compare versions

Comparing version

to
1.8.0-alpha.1595

import { IApiExtend } from './IApiExtend';
import { IExternalComponentExtend } from './IExternalComponentsExtend';
import { IHttpExtend } from './IHttp';

@@ -17,2 +18,3 @@ import { ISettingsExtend } from './ISettingsExtend';

readonly api: IApiExtend;
readonly externalComponent: IExternalComponentExtend;
}

@@ -7,2 +7,3 @@ import { IApiExtend } from './IApiExtend';

import { IEnvironmentRead } from './IEnvironmentRead';
import { IExternalComponentExtend } from './IExternalComponentsExtend';
import { HttpStatusCode, IHttp, IHttpExtend, IHttpPreRequestHandler, IHttpPreResponseHandler, IHttpRequest, IHttpResponse, RequestMethod } from './IHttp';

@@ -37,2 +38,2 @@ import { ILivechatCreator } from './ILivechatCreator';

import { IUserRead } from './IUserRead';
export { HttpStatusCode, IAppAccessors, IConfigurationExtend, IConfigurationModify, IEnvironmentalVariableRead, IEnvironmentRead, IHttp, IHttpExtend, IHttpPreRequestHandler, IHttpPreResponseHandler, IHttpRequest, IHttpResponse, ILivechatCreator, ILivechatMessageBuilder, ILivechatRead, ILivechatUpdater, ILogEntry, ILogger, IMessageBuilder, IMessageExtender, IMessageRead, IModify, IModifyCreator, IModifyExtender, IModifyUpdater, INotifier, IPersistence, IPersistenceRead, IRead, IRoomBuilder, IRoomExtender, IRoomRead, IServerSettingRead, IServerSettingsModify, ISettingRead, ISettingsExtend, ISlashCommandsExtend, ISlashCommandsModify, IUploadRead, IUserRead, LogMessageSeverity, RequestMethod, IApiExtend, };
export { HttpStatusCode, IAppAccessors, IConfigurationExtend, IConfigurationModify, IEnvironmentalVariableRead, IEnvironmentRead, IExternalComponentExtend, IHttp, IHttpExtend, IHttpPreRequestHandler, IHttpPreResponseHandler, IHttpRequest, IHttpResponse, ILivechatCreator, ILivechatMessageBuilder, ILivechatRead, ILivechatUpdater, ILogEntry, ILogger, IMessageBuilder, IMessageExtender, IMessageRead, IModify, IModifyCreator, IModifyExtender, IModifyUpdater, INotifier, IPersistence, IPersistenceRead, IRead, IRoomBuilder, IRoomExtender, IRoomRead, IServerSettingRead, IServerSettingsModify, ISettingRead, ISettingsExtend, ISlashCommandsExtend, ISlashCommandsModify, IUploadRead, IUserRead, LogMessageSeverity, RequestMethod, IApiExtend, };
{
"name": "@rocket.chat/apps-engine",
"version": "1.7.0",
"version": "1.8.0-alpha.1595",
"description": "The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.",

@@ -13,3 +13,2 @@ "main": "index",

"go-publish": "gulp publish",
"go-publish-beta": "gulp publish-beta",
"go-publish-alpha": "gulp publish-alpha",

@@ -16,0 +15,0 @@ "unit-tests": "ts-node ./tests/runner.ts",

@@ -1,2 +0,2 @@

import { IApiExtend, IConfigurationExtend, IHttpExtend, ISettingsExtend, ISlashCommandsExtend } from '../../definition/accessors';
import { IApiExtend, IConfigurationExtend, IExternalComponentExtend, IHttpExtend, ISettingsExtend, ISlashCommandsExtend } from '../../definition/accessors';
export declare class ConfigurationExtend implements IConfigurationExtend {

@@ -7,3 +7,4 @@ readonly http: IHttpExtend;

readonly api: IApiExtend;
constructor(https: IHttpExtend, sets: ISettingsExtend, cmds: ISlashCommandsExtend, api: IApiExtend);
readonly externalComponent: IExternalComponentExtend;
constructor(https: IHttpExtend, sets: ISettingsExtend, cmds: ISlashCommandsExtend, api: IApiExtend, externalComponent: IExternalComponentExtend);
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ConfigurationExtend {
constructor(https, sets, cmds, api) {
constructor(https, sets, cmds, api, externalComponent) {
this.http = https;

@@ -9,2 +9,3 @@ this.settings = sets;

this.api = api;
this.externalComponent = externalComponent;
}

@@ -11,0 +12,0 @@ }

@@ -6,2 +6,3 @@ import { AppAccessors } from './AppAccessors';

import { EnvironmentRead } from './EnvironmentRead';
import { ExternalComponentExtend } from './ExternalComponentExtend';
import { Http } from './Http';

@@ -32,2 +33,2 @@ import { HttpExtend } from './HttpExtend';

import { UserRead } from './UserRead';
export { AppAccessors, ConfigurationExtend, ConfigurationModify, EnvironmentalVariableRead, EnvironmentRead, Http, HttpExtend, LivechatRead, MessageBuilder, MessageExtender, MessageRead, Modify, ModifyCreator, ModifyExtender, ModifyUpdater, Notifier, Persistence, PersistenceRead, Reader, RoomBuilder, RoomExtender, RoomRead, ServerSettingRead, ServerSettingsModify, SettingRead, SettingsExtend, SlashCommandsExtend, SlashCommandsModify, UploadRead, UserRead, };
export { AppAccessors, ConfigurationExtend, ConfigurationModify, EnvironmentalVariableRead, EnvironmentRead, ExternalComponentExtend, Http, HttpExtend, LivechatRead, MessageBuilder, MessageExtender, MessageRead, Modify, ModifyCreator, ModifyExtender, ModifyUpdater, Notifier, Persistence, PersistenceRead, Reader, RoomBuilder, RoomExtender, RoomRead, ServerSettingRead, ServerSettingsModify, SettingRead, SettingsExtend, SlashCommandsExtend, SlashCommandsModify, UploadRead, UserRead, };

@@ -13,2 +13,4 @@ "use strict";

exports.EnvironmentRead = EnvironmentRead_1.EnvironmentRead;
const ExternalComponentExtend_1 = require("./ExternalComponentExtend");
exports.ExternalComponentExtend = ExternalComponentExtend_1.ExternalComponentExtend;
const Http_1 = require("./Http");

@@ -15,0 +17,0 @@ exports.Http = Http_1.Http;

import { AppBridges } from './bridges';
import { AppCompiler, AppFabricationFulfillment, AppPackageParser } from './compiler';
import { IGetAppsFilter } from './IGetAppsFilter';
import { AppAccessorManager, AppApiManager, AppLicenseManager, AppListenerManager, AppSettingsManager, AppSlashCommandManager } from './managers';
import { AppAccessorManager, AppApiManager, AppExternalComponentManager, AppLicenseManager, AppListenerManager, AppSettingsManager, AppSlashCommandManager } from './managers';
import { ProxiedApp } from './ProxiedApp';

@@ -21,2 +21,3 @@ import { AppLogStorage, AppStorage } from './storage';

private readonly apiManager;
private readonly externalComponentManager;
private readonly settingsManager;

@@ -45,2 +46,4 @@ private readonly licenseManager;

getApiManager(): AppApiManager;
/** Gets the external component manager's instance. */
getExternalComponentManager(): AppExternalComponentManager;
/** Gets the manager of the settings, updates and getting. */

@@ -47,0 +50,0 @@ getSettingsManager(): AppSettingsManager;

@@ -51,2 +51,3 @@ "use strict";

this.apiManager = new managers_1.AppApiManager(this);
this.externalComponentManager = new managers_1.AppExternalComponentManager();
this.settingsManager = new managers_1.AppSettingsManager(this);

@@ -96,2 +97,6 @@ this.licenseManager = new managers_1.AppLicenseManager(this);

}
/** Gets the external component manager's instance. */
getExternalComponentManager() {
return this.externalComponentManager;
}
/** Gets the manager of the settings, updates and getting. */

@@ -190,2 +195,3 @@ getSettingsManager() {

this.commandManager.unregisterCommands(rl.getID());
this.externalComponentManager.unregisterComponent(rl.getID());
this.apiManager.unregisterApis(rl.getID());

@@ -285,2 +291,3 @@ this.accessorManager.purifyApp(rl.getID());

this.commandManager.unregisterCommands(rl.getID());
this.externalComponentManager.unregisterComponent(rl.getID());
this.apiManager.unregisterApis(rl.getID());

@@ -353,2 +360,3 @@ this.accessorManager.purifyApp(rl.getID());

this.commandManager.unregisterCommands(app.getID());
this.externalComponentManager.purgeComponent(app.getID());
this.apiManager.unregisterApis(app.getID());

@@ -477,2 +485,3 @@ this.accessorManager.purifyApp(app.getID());

this.commandManager.unregisterCommands(app.getID());
this.externalComponentManager.unregisterComponent(app.getID());
this.apiManager.unregisterApis(app.getID());

@@ -554,2 +563,3 @@ return app.setStatus(AppStatus_1.AppStatus.INVALID_LICENSE_DISABLED);

this.commandManager.unregisterCommands(storageItem.id);
this.externalComponentManager.unregisterComponent(storageItem.id);
this.apiManager.unregisterApis(storageItem.id);

@@ -608,3 +618,5 @@ result = false;

if (enable) {
const externalComponent = this.externalComponentManager.getExternalComponent(app.getID());
this.commandManager.registerCommands(app.getID());
this.externalComponentManager.registerComponent(app.getID(), externalComponent, true);
this.apiManager.registerApis(app.getID());

@@ -615,2 +627,3 @@ this.listenerManager.registerListeners(app);

this.commandManager.unregisterCommands(app.getID());
this.externalComponentManager.unregisterComponent(app.getID());
this.apiManager.unregisterApis(app.getID());

@@ -617,0 +630,0 @@ }

@@ -43,3 +43,4 @@ "use strict";

const sets = new accessors_1.SettingsExtend(rl);
this.configExtenders.set(appId, new accessors_1.ConfigurationExtend(htt, sets, cmds, apis));
const excs = new accessors_1.ExternalComponentExtend(this.manager.getExternalComponentManager(), appId);
this.configExtenders.set(appId, new accessors_1.ConfigurationExtend(htt, sets, cmds, apis, excs));
}

@@ -46,0 +47,0 @@ return this.configExtenders.get(appId);

@@ -16,5 +16,22 @@ import { ISlashCommand, ISlashCommandPreview, ISlashCommandPreviewItem, SlashCommandContext } from '../../definition/slashcommands';

private readonly accessors;
/**
* Variable that contains the commands which have been provided by apps.
* The key of the top map is app id and the key of the inner map is the command
*/
private providedCommands;
/**
* Contains the commands which have modified the system commands
*/
private modifiedCommands;
/**
* Contains the commands as keys and appId that touched it.
* Doesn't matter whether the app provided, modified, disabled, or enabled.
* As long as an app touched the command (besides to see if it exists), then it is listed here.
*/
private touchedCommandsToApps;
/**
* Contains the apps and the commands they have touched. The key is the appId and value is the commands.
* Doesn't matter whether the app provided, modified, disabled, or enabled.
* As long as an app touched the command (besides to see if it exists), then it is listed here.
*/
private appsTouchedCommands;

@@ -21,0 +38,0 @@ constructor(manager: AppManager);

import { AppAccessorManager } from './AppAccessorManager';
import { AppApiManager } from './AppApiManager';
import { AppExternalComponentManager } from './AppExternalComponentManager';
import { AppLicenseManager } from './AppLicenseManager';

@@ -7,2 +8,2 @@ import { AppListenerManager } from './AppListenerManager';

import { AppSlashCommandManager } from './AppSlashCommandManager';
export { AppAccessorManager, AppLicenseManager, AppListenerManager, AppSettingsManager, AppSlashCommandManager, AppApiManager, };
export { AppAccessorManager, AppLicenseManager, AppListenerManager, AppExternalComponentManager, AppSettingsManager, AppSlashCommandManager, AppApiManager, };

@@ -7,2 +7,4 @@ "use strict";

exports.AppApiManager = AppApiManager_1.AppApiManager;
const AppExternalComponentManager_1 = require("./AppExternalComponentManager");
exports.AppExternalComponentManager = AppExternalComponentManager_1.AppExternalComponentManager;
const AppLicenseManager_1 = require("./AppLicenseManager");

@@ -9,0 +11,0 @@ exports.AppLicenseManager = AppLicenseManager_1.AppLicenseManager;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet