🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@appsensorlike/appsensorlike

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appsensorlike/appsensorlike - npm Package Compare versions

Comparing version
0.20.1
to
0.20.2
+2
-2
dist/configuration...nt/tests/JSONClientConfigurationTest.js
import { ServerConnection } from "../../../../core/configuration/client/client_configuration.js";
import { JSONClientConfiguration, JSONClientConfigurationReader } from "../JSONClientConfig.js";
import { JSONConfigReadValidate } from "../../../../utils/Utils.js";
import { Utils } from "../../../../utils/Utils.js";
import assert from "assert";

@@ -17,3 +17,3 @@ class JSONClientConfigurationTest {

configExpected.setServerConnection(serverConnection);
const testConfigFile = JSONConfigReadValidate.resolvePath(import.meta.url, 'appsensor-client-config.json');
const testConfigFile = Utils.resolvePath(import.meta.url, 'appsensor-client-config.json');
const configActual = new JSONClientConfigurationReader().read(testConfigFile);

@@ -20,0 +20,0 @@ assert.deepStrictEqual(configActual, configExpected);

@@ -7,5 +7,5 @@ import { JSONServerConfiguration, JSONServerConfigurationReader } from "../JSONServerConfig.js";

import { Clause, Expression, MonitorPoint, Rule } from "../../../../core/rule/rule.js";
import { Utils } from "../../../../utils/Utils.js";
import assert from "assert";
import fs from 'fs';
import { JSONConfigReadValidate } from "../../../../utils/Utils.js";
class JSONServerConfigurationTest {

@@ -133,3 +133,3 @@ testConfigurationReadOfAllElements() {

}
const configFilePath = JSONConfigReadValidate.resolvePath(import.meta.url, JSONServerConfigurationTest.TEST_CONFIG_LOCATION);
const configFilePath = Utils.resolvePath(import.meta.url, JSONServerConfigurationTest.TEST_CONFIG_LOCATION);
configExpected.configurationFile = fs.realpathSync(configFilePath);

@@ -136,0 +136,0 @@ const configActual = new JSONServerConfigurationReader().read(configFilePath);

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

import { JSONConfigReadValidate } from '../../../utils/Utils.js';
import { Utils } from '../../../utils/Utils.js';
import { runTests as test } from '../../tests/tests.js';

@@ -6,3 +6,3 @@ import { AppSensorLocal } from '../appsensor_local.js';

const configLocation = "../execution-modes/tests/analysis/appsensor-analysis-tests-server-config.json";
const configAbsolutPath = JSONConfigReadValidate.resolvePath(import.meta.url, configLocation);
const configAbsolutPath = Utils.resolvePath(import.meta.url, configLocation);
const appSensorLocal = new AppSensorLocal(configAbsolutPath);

@@ -9,0 +9,0 @@ await test(appSensorLocal.getAppSensorServer(), appSensorLocal.getAppSensorClient(), configLocation, readInf);

@@ -46,3 +46,2 @@ import { AppSensorEvent, Attack, DetectionPoint, IPAddress, Response, IValidateInitialize } from '../core/core.js';

protected validateConfig(config: any, validatorLocation: string, reload: boolean): boolean;
static resolvePath(relativeToFileURL: string, fileLocation: string): string;
}

@@ -56,2 +55,3 @@ declare class Utils {

static responsePrototypeSample: Response;
static resolvePath(relativeToFileURL: string, fileLocation: string): string;
static sleep(timeOutInMilis: number): Promise<null>;

@@ -58,0 +58,0 @@ static setPrototypeInDepth(target: Object, source: Object): void;

@@ -86,4 +86,4 @@ import fs from 'fs';

constructor(defaultRelativeTo, defaultConfigFile, defaultConfigSchemaFile = null, prototypeOfConfigObj) {
this.defaultConfigFile = JSONConfigReadValidate.resolvePath(defaultRelativeTo, defaultConfigFile);
this.defaultConfigSchemaFile = defaultConfigSchemaFile ? JSONConfigReadValidate.resolvePath(defaultRelativeTo, defaultConfigSchemaFile) : null;
this.defaultConfigFile = Utils.resolvePath(defaultRelativeTo, defaultConfigFile);
this.defaultConfigSchemaFile = defaultConfigSchemaFile ? Utils.resolvePath(defaultRelativeTo, defaultConfigSchemaFile) : null;
this.prototypeOfConfigObj = prototypeOfConfigObj;

@@ -219,2 +219,4 @@ }

}
}
class Utils {
static resolvePath(relativeToFileURL, fileLocation) {

@@ -230,4 +232,2 @@ let __dirname = process.cwd();

}
}
class Utils {
static sleep(timeOutInMilis) {

@@ -234,0 +234,0 @@ return new Promise((resolve, reject) => {

{
"name": "@appsensorlike/appsensorlike",
"version": "0.20.1",
"version": "0.20.2",
"description": "A port of OWASP AppSensor reference implementation",

@@ -5,0 +5,0 @@ "main": "",