Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@withonevision/omnihive-core

Package Overview
Dependencies
Maintainers
4
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@withonevision/omnihive-core - npm Package Compare versions

Comparing version 6.3.3 to 6.3.4

119

client/OmniHiveClient.js

@@ -1,9 +0,15 @@

import axios from "axios";
import { HiveWorkerType } from "../enums/HiveWorkerType";
import { QueryCacheType } from "../enums/QueryCacheType";
import { RestMethod } from "../enums/RestMethod";
import { AwaitHelper } from "../helpers/AwaitHelper";
import { IsHelper } from "../helpers/IsHelper";
import { StringBuilder } from "../helpers/StringBuilder";
export class OmniHiveClient {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OmniHiveClient = void 0;
const axios_1 = __importDefault(require("axios"));
const HiveWorkerType_1 = require("../enums/HiveWorkerType");
const QueryCacheType_1 = require("../enums/QueryCacheType");
const RestMethod_1 = require("../enums/RestMethod");
const AwaitHelper_1 = require("../helpers/AwaitHelper");
const IsHelper_1 = require("../helpers/IsHelper");
const StringBuilder_1 = require("../helpers/StringBuilder");
class OmniHiveClient {
constructor() {

@@ -15,7 +21,7 @@ this.accessToken = "";

this.init = async (workers, environmentVariables, serverClient) => {
if (IsHelper.isNullOrUndefined(environmentVariables)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(environmentVariables)) {
environmentVariables = [];
}
this.environmentVariables = environmentVariables;
if (!IsHelper.isNullOrUndefined(serverClient) && serverClient === true) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(serverClient) && serverClient === true) {
this.registeredWorkers = workers;

@@ -34,23 +40,23 @@ return;

const config = {};
if (IsHelper.isNullOrUndefined(headers)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(headers)) {
config.headers = {};
}
else if (!IsHelper.isEmptyObject(headers)) {
else if (!IsHelper_1.IsHelper.isEmptyObject(headers)) {
config.headers = headers;
}
if (!IsHelper.isEmptyStringOrWhitespace(this.accessToken)) {
if (!IsHelper_1.IsHelper.isEmptyStringOrWhitespace(this.accessToken)) {
config.headers["x-omnihive-access"] = this.accessToken;
}
if (!IsHelper.isEmptyStringOrWhitespace(this.authToken)) {
if (!IsHelper_1.IsHelper.isEmptyStringOrWhitespace(this.authToken)) {
config.headers["authorization"] = "BEARER " + this.authToken;
}
if (!IsHelper.isNullOrUndefined(cacheType)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(cacheType)) {
switch (cacheType) {
case QueryCacheType.None:
case QueryCacheType_1.QueryCacheType.None:
config.headers["x-omnihive-cache-type"] = "none";
break;
case QueryCacheType.FromCache:
case QueryCacheType_1.QueryCacheType.FromCache:
config.headers["x-omnihive-cache-type"] = "cache";
break;
case QueryCacheType.FromCacheForceRefresh:
case QueryCacheType_1.QueryCacheType.FromCacheForceRefresh:
config.headers["x-omnihive-cache-type"] = "cacheRefresh";

@@ -63,3 +69,3 @@ break;

}
if (!IsHelper.isNullOrUndefined(cacheExpireInSeconds)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(cacheExpireInSeconds)) {
try {

@@ -78,8 +84,8 @@ const cacheTimeNumber = +cacheExpireInSeconds;

const dataObject = { query };
axios
axios_1.default
.post(graphUrl, JSON.stringify(dataObject), config)
.then((response) => {
if (!IsHelper.isNullOrUndefined(response.data.errors) &&
!IsHelper.isEmptyArray(response.data.errors)) {
const errorString = new StringBuilder();
if (!IsHelper_1.IsHelper.isNullOrUndefined(response.data.errors) &&
!IsHelper_1.IsHelper.isEmptyArray(response.data.errors)) {
const errorString = new StringBuilder_1.StringBuilder();
response.data.errors.forEach((err) => {

@@ -96,4 +102,4 @@ errorString.appendLine(err.message);

.then((newToken) => {
if (IsHelper.isNullOrUndefined(newToken) ||
IsHelper.isEmptyStringOrWhitespace(newToken)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(newToken) ||
IsHelper_1.IsHelper.isEmptyStringOrWhitespace(newToken)) {
throw new Error("[ohAccessError] Could not retrieve token");

@@ -120,39 +126,39 @@ }

const config = { url: url };
if (IsHelper.isNullOrUndefined(headers)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(headers)) {
headers = {};
}
if (!IsHelper.isEmptyStringOrWhitespace(this.accessToken)) {
if (!IsHelper_1.IsHelper.isEmptyStringOrWhitespace(this.accessToken)) {
headers["x-omnihive-access"] = this.accessToken;
}
if (!IsHelper.isEmptyStringOrWhitespace(this.authToken)) {
if (!IsHelper_1.IsHelper.isEmptyStringOrWhitespace(this.authToken)) {
headers["authorization"] = "BEARER " + this.authToken;
}
if (!IsHelper.isEmptyObject(headers)) {
if (!IsHelper_1.IsHelper.isEmptyObject(headers)) {
config.headers = headers;
}
if (!IsHelper.isNullOrUndefined(data)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(data)) {
config.data = data;
}
switch (method) {
case RestMethod.GET:
case RestMethod_1.RestMethod.GET:
config.method = "GET";
break;
case RestMethod.POST:
case RestMethod_1.RestMethod.POST:
config.method = "POST";
break;
case RestMethod.PATCH:
case RestMethod_1.RestMethod.PATCH:
config.method = "PATCH";
break;
case RestMethod.PUT:
case RestMethod_1.RestMethod.PUT:
config.method = "PUT";
break;
case RestMethod.DELETE:
case RestMethod_1.RestMethod.DELETE:
config.method = "DELETE";
break;
}
axios(config)
(0, axios_1.default)(config)
.then((response) => {
if (!IsHelper.isNullOrUndefined(response.data.errors) &&
!IsHelper.isEmptyArray(response.data.errors)) {
const errorString = new StringBuilder();
if (!IsHelper_1.IsHelper.isNullOrUndefined(response.data.errors) &&
!IsHelper_1.IsHelper.isEmptyArray(response.data.errors)) {
const errorString = new StringBuilder_1.StringBuilder();
response.data.errors.forEach((err) => {

@@ -169,4 +175,4 @@ errorString.appendLine(err.message);

.then((newToken) => {
if (IsHelper.isNullOrUndefined(newToken) ||
IsHelper.isEmptyStringOrWhitespace(newToken)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(newToken) ||
IsHelper_1.IsHelper.isEmptyStringOrWhitespace(newToken)) {
throw new Error("[ohAccessError] Could not retrieve token");

@@ -190,4 +196,4 @@ }

this.runCustomSql = async (url, sql) => {
let encryptionWorker = this.getWorker(HiveWorkerType.Encryption);
if (IsHelper.isNullOrUndefined(encryptionWorker)) {
let encryptionWorker = this.getWorker(HiveWorkerType_1.HiveWorkerType.Encryption);
if (IsHelper_1.IsHelper.isNullOrUndefined(encryptionWorker)) {
throw new Error("No encryption worker found. An encryption worker is required for custom SQL");

@@ -206,3 +212,3 @@ }

`;
const results = await AwaitHelper.execute(this.graphClient(url, query));
const results = await AwaitHelper_1.AwaitHelper.execute(this.graphClient(url, query));
return results[target][0].recordset;

@@ -217,14 +223,14 @@ };

this.getNewToken = async () => {
let encryptionWorker = this.getWorker(HiveWorkerType.Encryption);
if (IsHelper.isNullOrUndefined(encryptionWorker)) {
let encryptionWorker = this.getWorker(HiveWorkerType_1.HiveWorkerType.Encryption);
if (IsHelper_1.IsHelper.isNullOrUndefined(encryptionWorker)) {
throw new Error("[ohAccessError] Could not retrieve token");
}
const tokenWorker = this.getWorker(HiveWorkerType.Token);
if (IsHelper.isNullOrUndefined(tokenWorker)) {
const tokenWorker = this.getWorker(HiveWorkerType_1.HiveWorkerType.Token);
if (IsHelper_1.IsHelper.isNullOrUndefined(tokenWorker)) {
throw new Error("[ohAccessError] Could not retrieve token");
}
let newToken = "";
if (!IsHelper.isNullOrUndefined(tokenWorker)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(tokenWorker)) {
try {
newToken = await AwaitHelper.execute(tokenWorker.get());
newToken = await AwaitHelper_1.AwaitHelper.execute(tokenWorker.get());
}

@@ -238,3 +244,3 @@ catch (error) {

this.pushWorker = async (worker) => {
if (IsHelper.isNullOrUndefined(worker.instance)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(worker.instance)) {
throw new Error("Cannot register worker without an instance");

@@ -248,3 +254,3 @@ }

worker.instance.environmentVariables = this.environmentVariables;
await AwaitHelper.execute(worker.instance.init(worker.name, worker.metadata));
await AwaitHelper_1.AwaitHelper.execute(worker.instance.init(worker.name, worker.metadata));
this.registeredWorkers.push(worker);

@@ -254,5 +260,5 @@ };

getWorker(type, name) {
if (!IsHelper.isNullOrUndefined(name)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(name)) {
const namedWorker = this.registeredWorkers.find((value) => value.name === name && value.type === type);
if (!IsHelper.isNullOrUndefined(namedWorker)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(namedWorker)) {
return namedWorker.instance;

@@ -263,3 +269,3 @@ }

const anyWorkers = this.registeredWorkers.filter((value) => value.type === type);
if (!IsHelper.isNullOrUndefined(anyWorkers) && !IsHelper.isEmptyArray(anyWorkers)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(anyWorkers) && !IsHelper_1.IsHelper.isEmptyArray(anyWorkers)) {
return anyWorkers[0].instance;

@@ -270,4 +276,5 @@ }

}
exports.OmniHiveClient = OmniHiveClient;
OmniHiveClient.getSingleton = () => {
if (IsHelper.isNullOrUndefined(OmniHiveClient.singleton)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(OmniHiveClient.singleton)) {
OmniHiveClient.singleton = new OmniHiveClient();

@@ -274,0 +281,0 @@ }

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

export var AdminEventType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdminEventType = void 0;
var AdminEventType;
(function (AdminEventType) {

@@ -26,3 +29,3 @@ AdminEventType["AccessTokenRequest"] = "access-token-request";

AdminEventType["UrlListResponse"] = "url-list-response";
})(AdminEventType || (AdminEventType = {}));
})(AdminEventType = exports.AdminEventType || (exports.AdminEventType = {}));
//# sourceMappingURL=AdminEventType.js.map

@@ -1,6 +0,9 @@

export var AdminRoomType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdminRoomType = void 0;
var AdminRoomType;
(function (AdminRoomType) {
AdminRoomType["Command"] = "command";
AdminRoomType["Log"] = "log";
})(AdminRoomType || (AdminRoomType = {}));
})(AdminRoomType = exports.AdminRoomType || (exports.AdminRoomType = {}));
//# sourceMappingURL=AdminRoomType.js.map

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

export var EnvironmentVariableType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnvironmentVariableType = void 0;
var EnvironmentVariableType;
(function (EnvironmentVariableType) {

@@ -6,3 +9,3 @@ EnvironmentVariableType["String"] = "string";

EnvironmentVariableType["Boolean"] = "boolean";
})(EnvironmentVariableType || (EnvironmentVariableType = {}));
})(EnvironmentVariableType = exports.EnvironmentVariableType || (exports.EnvironmentVariableType = {}));
//# sourceMappingURL=EnvironmentVariableType.js.map

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

export var HiveWorkerType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerType = void 0;
var HiveWorkerType;
(function (HiveWorkerType) {

@@ -25,3 +28,3 @@ HiveWorkerType["Cache"] = "cache";

HiveWorkerType["Unknown"] = "unknown";
})(HiveWorkerType || (HiveWorkerType = {}));
})(HiveWorkerType = exports.HiveWorkerType || (exports.HiveWorkerType = {}));
//# sourceMappingURL=HiveWorkerType.js.map

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

export var LifecycleWorkerAction;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LifecycleWorkerAction = void 0;
var LifecycleWorkerAction;
(function (LifecycleWorkerAction) {

@@ -7,3 +10,3 @@ LifecycleWorkerAction["Insert"] = "insert";

LifecycleWorkerAction["None"] = "";
})(LifecycleWorkerAction || (LifecycleWorkerAction = {}));
})(LifecycleWorkerAction = exports.LifecycleWorkerAction || (exports.LifecycleWorkerAction = {}));
//# sourceMappingURL=LifecycleWorkerAction.js.map

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

export var LifecycleWorkerStage;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LifecycleWorkerStage = void 0;
var LifecycleWorkerStage;
(function (LifecycleWorkerStage) {

@@ -7,3 +10,3 @@ LifecycleWorkerStage["After"] = "after";

LifecycleWorkerStage["None"] = "";
})(LifecycleWorkerStage || (LifecycleWorkerStage = {}));
})(LifecycleWorkerStage = exports.LifecycleWorkerStage || (exports.LifecycleWorkerStage = {}));
//# sourceMappingURL=LifecycleWorkerStage.js.map

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

export var LocalFunctionType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LocalFunctionType = void 0;
var LocalFunctionType;
(function (LocalFunctionType) {

@@ -8,3 +11,3 @@ LocalFunctionType["Graph"] = "graph";

LocalFunctionType["Workflow"] = "workflow";
})(LocalFunctionType || (LocalFunctionType = {}));
})(LocalFunctionType = exports.LocalFunctionType || (exports.LocalFunctionType = {}));
//# sourceMappingURL=LocalFunctionType.js.map

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

export var OmniHiveLogLevel;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OmniHiveLogLevel = void 0;
var OmniHiveLogLevel;
(function (OmniHiveLogLevel) {

@@ -6,3 +9,3 @@ OmniHiveLogLevel["Error"] = "error";

OmniHiveLogLevel["Warn"] = "warn";
})(OmniHiveLogLevel || (OmniHiveLogLevel = {}));
})(OmniHiveLogLevel = exports.OmniHiveLogLevel || (exports.OmniHiveLogLevel = {}));
//# sourceMappingURL=OmniHiveLogLevel.js.map

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

export var QueryCacheType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.QueryCacheType = void 0;
var QueryCacheType;
(function (QueryCacheType) {

@@ -6,3 +9,3 @@ QueryCacheType[QueryCacheType["None"] = 0] = "None";

QueryCacheType[QueryCacheType["FromCacheForceRefresh"] = 2] = "FromCacheForceRefresh";
})(QueryCacheType || (QueryCacheType = {}));
})(QueryCacheType = exports.QueryCacheType || (exports.QueryCacheType = {}));
//# sourceMappingURL=QueryCacheType.js.map

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

export var RegisteredHiveWorkerSection;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegisteredHiveWorkerSection = void 0;
var RegisteredHiveWorkerSection;
(function (RegisteredHiveWorkerSection) {

@@ -8,3 +11,3 @@ RegisteredHiveWorkerSection["Boot"] = "boot";

RegisteredHiveWorkerSection["User"] = "user";
})(RegisteredHiveWorkerSection || (RegisteredHiveWorkerSection = {}));
})(RegisteredHiveWorkerSection = exports.RegisteredHiveWorkerSection || (exports.RegisteredHiveWorkerSection = {}));
//# sourceMappingURL=RegisteredHiveWorkerSection.js.map

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

export var RegisteredUrlType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegisteredUrlType = void 0;
var RegisteredUrlType;
(function (RegisteredUrlType) {

@@ -8,3 +11,3 @@ RegisteredUrlType["GraphDatabase"] = "graphDatabase";

RegisteredUrlType["Swagger"] = "swagger";
})(RegisteredUrlType || (RegisteredUrlType = {}));
})(RegisteredUrlType = exports.RegisteredUrlType || (exports.RegisteredUrlType = {}));
//# sourceMappingURL=RegisteredUrlType.js.map

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

export var RestMethod;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RestMethod = void 0;
var RestMethod;
(function (RestMethod) {

@@ -8,3 +11,3 @@ RestMethod["DELETE"] = "delete";

RestMethod["PUT"] = "put";
})(RestMethod || (RestMethod = {}));
})(RestMethod = exports.RestMethod || (exports.RestMethod = {}));
//# sourceMappingURL=RestMethod.js.map

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

export var ServerStatus;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerStatus = void 0;
var ServerStatus;
(function (ServerStatus) {

@@ -9,3 +12,3 @@ ServerStatus["Admin"] = "admin";

ServerStatus["Unknown"] = "unknown";
})(ServerStatus || (ServerStatus = {}));
})(ServerStatus = exports.ServerStatus || (exports.ServerStatus = {}));
//# sourceMappingURL=ServerStatus.js.map

@@ -0,4 +1,8 @@

"use strict";
var _a;
export class AwaitHelper {
Object.defineProperty(exports, "__esModule", { value: true });
exports.AwaitHelper = void 0;
class AwaitHelper {
}
exports.AwaitHelper = AwaitHelper;
_a = AwaitHelper;

@@ -5,0 +9,0 @@ AwaitHelper.execute = async (promise) => {

@@ -1,3 +0,6 @@

import { IsHelper } from "./IsHelper";
export class GlobalTestHelper {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GlobalTestHelper = void 0;
const IsHelper_1 = require("./IsHelper");
class GlobalTestHelper {
constructor() {

@@ -11,5 +14,5 @@ this.ohDirName = "";

getWorker(type, name) {
if (!IsHelper.isNullOrUndefined(name)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(name)) {
const namedWorker = this.registeredWorkers.find((value) => value.name === name && value.type === type);
if (!IsHelper.isNullOrUndefined(namedWorker)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(namedWorker)) {
return namedWorker.instance;

@@ -20,3 +23,3 @@ }

const anyWorkers = this.registeredWorkers.filter((value) => value.type === type);
if (!IsHelper.isNullOrUndefined(anyWorkers) && !IsHelper.isEmptyArray(anyWorkers)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(anyWorkers) && !IsHelper_1.IsHelper.isEmptyArray(anyWorkers)) {
return anyWorkers[0].instance;

@@ -27,2 +30,3 @@ }

}
exports.GlobalTestHelper = GlobalTestHelper;
//# sourceMappingURL=GlobalTestHelper.js.map

@@ -0,4 +1,8 @@

"use strict";
var _a;
export class IsHelper {
Object.defineProperty(exports, "__esModule", { value: true });
exports.IsHelper = void 0;
class IsHelper {
}
exports.IsHelper = IsHelper;
_a = IsHelper;

@@ -5,0 +9,0 @@ IsHelper.isArray = (value) => {

@@ -1,7 +0,11 @@

import { IsHelper } from "./IsHelper";
export class ObjectHelper {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ObjectHelper = void 0;
const IsHelper_1 = require("./IsHelper");
class ObjectHelper {
}
exports.ObjectHelper = ObjectHelper;
ObjectHelper.create = (type, model) => {
const generic = new type();
if (IsHelper.isNullOrUndefined(model)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(model)) {
return generic;

@@ -18,3 +22,3 @@ }

const generic = new type();
if (IsHelper.isNullOrUndefined(model)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(model)) {
throw new Error(`Model cannot be null or undefined in strict mode.`);

@@ -21,0 +25,0 @@ }

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

export class StringBuilder {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StringBuilder = void 0;
class StringBuilder {
constructor(value = "") {

@@ -19,2 +22,3 @@ this.values = [];

}
exports.StringBuilder = StringBuilder;
//# sourceMappingURL=StringBuilder.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ICacheWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IConfigWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IDatabaseWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IDataLifecycleWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IDateWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IEncryptionWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IErrorWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IFeatureWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IFileSystemWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IGraphBuildWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IGraphEndpointWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IHiveWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ILogWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IPubSubClientWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IPubSubServerWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IRestEndpointWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IServerWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IStorageWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ITaskEndpointWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ITokenWorker.js.map

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

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IUserWorker.js.map

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

export class AdminRequest {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdminRequest = void 0;
class AdminRequest {
constructor() {

@@ -8,2 +11,3 @@ this.adminPassword = "";

}
exports.AdminRequest = AdminRequest;
//# sourceMappingURL=AdminRequest.js.map

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

export class AdminResponse {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdminResponse = void 0;
class AdminResponse {
constructor() {

@@ -9,2 +12,3 @@ this.data = undefined;

}
exports.AdminResponse = AdminResponse;
//# sourceMappingURL=AdminResponse.js.map

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

export class AuthUser {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthUser = void 0;
class AuthUser {
constructor() {

@@ -12,2 +15,3 @@ this.email = "";

}
exports.AuthUser = AuthUser;
//# sourceMappingURL=AuthUser.js.map

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

export class CommandLineArgs {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommandLineArgs = void 0;
class CommandLineArgs {
constructor() {

@@ -9,2 +12,3 @@ this.environmentFile = "";

}
exports.CommandLineArgs = CommandLineArgs;
//# sourceMappingURL=CommandLineArgs.js.map

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

export class ConnectionSchema {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectionSchema = void 0;
class ConnectionSchema {
constructor() {

@@ -8,2 +11,3 @@ this.workerName = "";

}
exports.ConnectionSchema = ConnectionSchema;
//# sourceMappingURL=ConnectionSchema.js.map

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

export class ConverterSqlInfo {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConverterSqlInfo = void 0;
class ConverterSqlInfo {
constructor() {

@@ -8,2 +11,3 @@ this.workerName = "";

}
exports.ConverterSqlInfo = ConverterSqlInfo;
//# sourceMappingURL=ConverterSqlInfo.js.map

@@ -1,9 +0,13 @@

import { EnvironmentVariableType } from "../enums/EnvironmentVariableType";
export class EnvironmentVariable {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnvironmentVariable = void 0;
const EnvironmentVariableType_1 = require("../enums/EnvironmentVariableType");
class EnvironmentVariable {
constructor() {
this.key = "";
this.type = EnvironmentVariableType.String;
this.type = EnvironmentVariableType_1.EnvironmentVariableType.String;
this.isSystem = false;
}
}
exports.EnvironmentVariable = EnvironmentVariable;
//# sourceMappingURL=EnvironmentVariable.js.map

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

export class GraphContext {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphContext = void 0;
class GraphContext {
constructor() {

@@ -9,2 +12,3 @@ this.access = undefined;

}
exports.GraphContext = GraphContext;
//# sourceMappingURL=GraphContext.js.map

@@ -1,4 +0,7 @@

import { GraphQLScalarType } from "graphql";
import { Kind } from "graphql/language";
import { IsHelper } from "../helpers/IsHelper";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLJSONObject = exports.GraphQLJSON = void 0;
const graphql_1 = require("graphql");
const language_1 = require("graphql/language");
const IsHelper_1 = require("../helpers/IsHelper");
function identity(value) {

@@ -8,3 +11,3 @@ return value;

function ensureObject(value) {
if (IsHelper.isNullOrUndefined(value) || !IsHelper.isObject(value)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(value) || !IsHelper_1.IsHelper.isObject(value)) {
throw new Error(`JSONObject cannot represent non-object value: ${value}`);

@@ -16,3 +19,3 @@ }

const value = Object.create(null);
if (IsHelper.isArray(ast)) {
if (IsHelper_1.IsHelper.isArray(ast)) {
ast.forEach((element) => {

@@ -31,15 +34,15 @@ value[element.name] = parseObject(element, variables);

switch (ast.kind) {
case Kind.STRING:
case Kind.BOOLEAN:
case language_1.Kind.STRING:
case language_1.Kind.BOOLEAN:
return ast.value;
case Kind.INT:
case Kind.FLOAT:
case language_1.Kind.INT:
case language_1.Kind.FLOAT:
return parseFloat(ast.value);
case Kind.OBJECT:
case language_1.Kind.OBJECT:
return parseObject(ast, variables);
case Kind.LIST:
case language_1.Kind.LIST:
return ast.values.map((n) => parseLiteral(n, variables));
case Kind.NULL:
case language_1.Kind.NULL:
return null;
case Kind.VARIABLE: {
case language_1.Kind.VARIABLE: {
const name = ast.name.value;

@@ -52,3 +55,3 @@ return variables ? variables[name] : undefined;

}
export const GraphQLJSON = new GraphQLScalarType({
exports.GraphQLJSON = new graphql_1.GraphQLScalarType({
description: "The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).",

@@ -60,3 +63,3 @@ name: "JSON",

});
export const GraphQLJSONObject = new GraphQLScalarType({
exports.GraphQLJSONObject = new graphql_1.GraphQLScalarType({
description: "The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).",

@@ -63,0 +66,0 @@ name: "JSONObject",

@@ -1,5 +0,8 @@

import { EnvironmentVariableType } from "../enums/EnvironmentVariableType";
import { IsHelper } from "../helpers/IsHelper";
import { ObjectHelper } from "../helpers/ObjectHelper";
export class HiveWorkerBase {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerBase = void 0;
const EnvironmentVariableType_1 = require("../enums/EnvironmentVariableType");
const IsHelper_1 = require("../helpers/IsHelper");
const ObjectHelper_1 = require("../helpers/ObjectHelper");
class HiveWorkerBase {
constructor() {

@@ -9,6 +12,6 @@ this.environmentVariables = [];

this.checkObjectStructure = (type, model) => {
const objectData = ObjectHelper.createStrict(type, model);
const objectData = ObjectHelper_1.ObjectHelper.createStrict(type, model);
const objectAny = objectData;
Object.keys(objectData).forEach((key) => {
if (IsHelper.isNullOrUndefined(objectAny[key])) {
if (IsHelper_1.IsHelper.isNullOrUndefined(objectAny[key])) {
throw new Error(`Object key ${key} is null or undefined on hive worker ${this.name}`);

@@ -26,11 +29,11 @@ }

const environmentVariable = this.environmentVariables.find((variable) => variable.key === metaValue);
if (IsHelper.isNullOrUndefined(environmentVariable)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(environmentVariable)) {
throw new Error(`Metadata key ${metaKey} invalid or not set for worker ${this.name}`);
}
switch (environmentVariable.type) {
case EnvironmentVariableType.Boolean:
case EnvironmentVariableType_1.EnvironmentVariableType.Boolean:
this.metadata[metaKey] =
environmentVariable.value === "true" || environmentVariable.value === true;
break;
case EnvironmentVariableType.Number:
case EnvironmentVariableType_1.EnvironmentVariableType.Number:
this.metadata[metaKey] = Number(environmentVariable.value);

@@ -47,3 +50,3 @@ break;

const envVariable = this.environmentVariables.find((variable) => variable.key === name);
if (IsHelper.isNullOrUndefined(envVariable)) {
if (IsHelper_1.IsHelper.isNullOrUndefined(envVariable)) {
return undefined;

@@ -62,3 +65,3 @@ }

this.metadata = metadata;
if (!IsHelper.isNullOrUndefined(metadata)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(metadata)) {
this.checkMetadata(metadata);

@@ -68,5 +71,5 @@ }

getWorker(type, name) {
if (!IsHelper.isNullOrUndefined(name)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(name)) {
const namedWorker = this.registeredWorkers.find((value) => value.name === name && value.type === type);
if (!IsHelper.isNullOrUndefined(namedWorker)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(namedWorker)) {
return namedWorker.instance;

@@ -77,3 +80,3 @@ }

const anyWorkers = this.registeredWorkers.filter((value) => value.type === type);
if (!IsHelper.isNullOrUndefined(anyWorkers) && !IsHelper.isEmptyArray(anyWorkers)) {
if (!IsHelper_1.IsHelper.isNullOrUndefined(anyWorkers) && !IsHelper_1.IsHelper.isEmptyArray(anyWorkers)) {
return anyWorkers[0].instance;

@@ -84,2 +87,3 @@ }

}
exports.HiveWorkerBase = HiveWorkerBase;
//# sourceMappingURL=HiveWorkerBase.js.map

@@ -1,5 +0,8 @@

import { HiveWorkerType } from "../enums/HiveWorkerType";
export class HiveWorkerConfig {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerConfig = void 0;
const HiveWorkerType_1 = require("../enums/HiveWorkerType");
class HiveWorkerConfig {
constructor() {
this.type = HiveWorkerType.Custom;
this.type = HiveWorkerType_1.HiveWorkerType.Custom;
this.name = "";

@@ -14,2 +17,3 @@ this.package = "";

}
exports.HiveWorkerConfig = HiveWorkerConfig;
//# sourceMappingURL=HiveWorkerConfig.js.map

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

export class HiveWorkerMetadataConfigDatabase {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerMetadataConfigDatabase = void 0;
class HiveWorkerMetadataConfigDatabase {
constructor() {

@@ -13,2 +16,3 @@ this.configName = "";

}
exports.HiveWorkerMetadataConfigDatabase = HiveWorkerMetadataConfigDatabase;
//# sourceMappingURL=HiveWorkerMetadataConfigDatabase.js.map

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

export class HiveWorkerMetadataDatabase {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerMetadataDatabase = void 0;
class HiveWorkerMetadataDatabase {
constructor() {

@@ -20,2 +23,3 @@ this.connectionPoolLimit = 25;

}
exports.HiveWorkerMetadataDatabase = HiveWorkerMetadataDatabase;
//# sourceMappingURL=HiveWorkerMetadataDatabase.js.map

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

export class HiveWorkerMetadataGraphBuilder {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerMetadataGraphBuilder = void 0;
class HiveWorkerMetadataGraphBuilder {
constructor() {

@@ -7,2 +10,3 @@ this.dbWorkers = [];

}
exports.HiveWorkerMetadataGraphBuilder = HiveWorkerMetadataGraphBuilder;
//# sourceMappingURL=HiveWorkerMetadataGraphBuilder.js.map

@@ -1,7 +0,10 @@

import { LifecycleWorkerAction } from "../enums/LifecycleWorkerAction";
import { LifecycleWorkerStage } from "../enums/LifecycleWorkerStage";
export class HiveWorkerMetadataLifecycleFunction {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerMetadataLifecycleFunction = void 0;
const LifecycleWorkerAction_1 = require("../enums/LifecycleWorkerAction");
const LifecycleWorkerStage_1 = require("../enums/LifecycleWorkerStage");
class HiveWorkerMetadataLifecycleFunction {
constructor() {
this.action = LifecycleWorkerAction.None;
this.stage = LifecycleWorkerStage.None;
this.action = LifecycleWorkerAction_1.LifecycleWorkerAction.None;
this.stage = LifecycleWorkerStage_1.LifecycleWorkerStage.None;
this.order = 0;

@@ -13,2 +16,3 @@ this.databaseWorker = "";

}
exports.HiveWorkerMetadataLifecycleFunction = HiveWorkerMetadataLifecycleFunction;
//# sourceMappingURL=HiveWorkerMetadataLifecycleFunction.js.map

@@ -1,5 +0,8 @@

import { RestMethod } from "../enums/RestMethod";
export class HiveWorkerMetadataRestFunction {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerMetadataRestFunction = void 0;
const RestMethod_1 = require("../enums/RestMethod");
class HiveWorkerMetadataRestFunction {
constructor() {
this.restMethod = RestMethod.POST;
this.restMethod = RestMethod_1.RestMethod.POST;
this.urlRoute = "";

@@ -9,2 +12,3 @@ this.data = {};

}
exports.HiveWorkerMetadataRestFunction = HiveWorkerMetadataRestFunction;
//# sourceMappingURL=HiveWorkerMetadataRestFunction.js.map

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

export class HiveWorkerMetadataServer {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiveWorkerMetadataServer = void 0;
class HiveWorkerMetadataServer {
constructor() {

@@ -7,2 +10,3 @@ this.buildWorkers = [];

}
exports.HiveWorkerMetadataServer = HiveWorkerMetadataServer;
//# sourceMappingURL=HiveWorkerMetadataServer.js.map

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

export class ProcFunctionSchema {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProcFunctionSchema = void 0;
class ProcFunctionSchema {
constructor() {

@@ -12,2 +15,3 @@ this.schemaName = "";

}
exports.ProcFunctionSchema = ProcFunctionSchema;
//# sourceMappingURL=ProcFunctionSchema.js.map

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

export class PubSubListener {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PubSubListener = void 0;
class PubSubListener {
constructor() {

@@ -8,2 +11,3 @@ this.channelName = "";

}
exports.PubSubListener = PubSubListener;
//# sourceMappingURL=PubSubListener.js.map

@@ -1,10 +0,14 @@

import { HiveWorkerType } from "../enums/HiveWorkerType";
import { RegisteredHiveWorkerSection } from "../enums/RegisteredHiveWorkerSection";
export class RegisteredHiveWorker {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegisteredHiveWorker = void 0;
const HiveWorkerType_1 = require("../enums/HiveWorkerType");
const RegisteredHiveWorkerSection_1 = require("../enums/RegisteredHiveWorkerSection");
class RegisteredHiveWorker {
constructor() {
this.name = "";
this.type = HiveWorkerType.User;
this.section = RegisteredHiveWorkerSection.User;
this.type = HiveWorkerType_1.HiveWorkerType.User;
this.section = RegisteredHiveWorkerSection_1.RegisteredHiveWorkerSection.User;
}
}
exports.RegisteredHiveWorker = RegisteredHiveWorker;
//# sourceMappingURL=RegisteredHiveWorker.js.map

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

export class RegisteredUrl {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RegisteredUrl = void 0;
class RegisteredUrl {
constructor() {

@@ -8,2 +11,3 @@ this.path = "";

}
exports.RegisteredUrl = RegisteredUrl;
//# sourceMappingURL=RegisteredUrl.js.map

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

export class RestEndpointExecuteResponse {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RestEndpointExecuteResponse = void 0;
class RestEndpointExecuteResponse {
constructor() {

@@ -7,2 +10,3 @@ this.response = undefined;

}
exports.RestEndpointExecuteResponse = RestEndpointExecuteResponse;
//# sourceMappingURL=RestEndpointExecuteResponse.js.map

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

export class ServerConfig {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerConfig = void 0;
class ServerConfig {
constructor() {

@@ -7,2 +10,3 @@ this.environmentVariables = [];

}
exports.ServerConfig = ServerConfig;
//# sourceMappingURL=ServerConfig.js.map

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

export class TableSchema {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableSchema = void 0;
class TableSchema {
constructor() {

@@ -22,2 +25,3 @@ this.schemaName = "";

}
exports.TableSchema = TableSchema;
//# sourceMappingURL=TableSchema.js.map
{
"name": "@withonevision/omnihive-core",
"version": "6.3.3",
"version": "6.3.4",
"description": "OmniHive Core",

@@ -5,0 +5,0 @@ "license": "MIT",

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

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

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

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc