📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP →

@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.6.0-alpha.1

{
"name": "@rocket.chat/apps-engine",
"version": "1.6.0-alpha.0",
"version": "1.6.0-alpha.1",
"description": "The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.",

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

"go-publish": "gulp publish",
"go-publish-alpha": "gulp publish-alpha",
"unit-tests": "ts-node ./tests/runner.ts",

@@ -15,0 +16,0 @@ "test-and-coverage": "nyc npm run unit-tests && nyc report",

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

private allowedIconExts;
private appsTsDefVer;
private appsEngineVersion;
constructor();

@@ -12,3 +12,3 @@ parseZip(compiler: AppCompiler, zipBase64: string): Promise<IParseZipResult>;

private getIconFile;
private getTsDefVersion;
private getEngineVersion;
}

@@ -20,3 +20,3 @@ "use strict";

this.allowedIconExts = ['.png', '.jpg', '.jpeg', '.gif'];
this.appsTsDefVer = this.getTsDefVersion();
this.appsEngineVersion = this.getEngineVersion();
}

@@ -43,4 +43,4 @@ parseZip(compiler, zipBase64) {

}
if (!semver.satisfies(this.appsTsDefVer, info.requiredApiVersion)) {
throw new errors_1.RequiredApiVersionError(info, this.appsTsDefVer);
if (!semver.satisfies(this.appsEngineVersion, info.requiredApiVersion)) {
throw new errors_1.RequiredApiVersionError(info, this.appsEngineVersion);
}

@@ -125,12 +125,11 @@ // Load all of the TypeScript only files

}
getTsDefVersion() {
getEngineVersion() {
const devLocation = path.join(__dirname, '../../../package.json');
const prodLocation = path.join(__dirname, '../../package.json');
let info;
if (fs.existsSync(devLocation)) {
const info = JSON.parse(fs.readFileSync(devLocation, 'utf8'));
return info.version;
info = JSON.parse(fs.readFileSync(devLocation, 'utf8'));
}
else if (fs.existsSync(prodLocation)) {
const info = JSON.parse(fs.readFileSync(prodLocation, 'utf8'));
return info.version;
info = JSON.parse(fs.readFileSync(prodLocation, 'utf8'));
}

@@ -140,2 +139,3 @@ else {

}
return info.version.replace(/^[^0-9]/, '').split('-')[0];
}

@@ -142,0 +142,0 @@ }

Sorry, the diff of this file is not supported yet