@withonevision/omnihive-core
Advanced tools
Comparing version 4.0.3-dev.27 to 4.0.3-dev.29
@@ -0,0 +0,0 @@ export declare enum HiveWorkerType { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare enum LifecycleWorkerAction { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare enum LifecycleWorkerStage { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare enum LocalFunctionType { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare enum OmniHiveLogLevel { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare enum RestMethod { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare enum ServerStatus { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { ConfigurationService } from "../services/ConfigurationService"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class AwaitHelper { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class ObjectHelper { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class StringBuilder { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class StringHelper { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=ICacheWorker.js.map |
@@ -0,3 +1,3 @@ | ||
import { ConnectionSchema } from "../models/ConnectionSchema"; | ||
import { StoredProcSchema } from "../models/StoredProcSchema"; | ||
import { TableSchema } from "../models/TableSchema"; | ||
import { IHiveWorker } from "./IHiveWorker"; | ||
@@ -12,7 +12,4 @@ export interface IDatabaseWorker extends IHiveWorker { | ||
}[]) => Promise<any[][]>; | ||
getSchema: () => Promise<{ | ||
tables: TableSchema[]; | ||
storedProcs: StoredProcSchema[]; | ||
}>; | ||
getSchema: () => Promise<ConnectionSchema>; | ||
} | ||
//# sourceMappingURL=IDatabaseWorker.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IDatabaseWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IDateWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IEncryptionWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IErrorWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IFeatureWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IFileSystemWorker.js.map |
@@ -0,0 +0,0 @@ import { ConnectionSchema } from "../models/ConnectionSchema"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IGraphBuildWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IGraphEndpointWorker.js.map |
@@ -0,0 +0,0 @@ import { HiveAccount } from "../models/HiveAccount"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IHiveAccountWorker.js.map |
@@ -0,0 +0,0 @@ import { HiveWorker } from "../models/HiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IHiveWorker.js.map |
@@ -0,0 +0,0 @@ import { OmniHiveLogLevel } from "../enums/OmniHiveLogLevel"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=ILogWorker.js.map |
@@ -0,0 +0,0 @@ import { PubSubListener } from "../models/PubSubListener"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IPubSubClientWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IPubSubServerWorker.js.map |
@@ -0,6 +1,7 @@ | ||
import { RestEndpointExecuteResponse } from "../models/RestEndpointExecuteResponse"; | ||
import { IHiveWorker } from "./IHiveWorker"; | ||
export interface IRestEndpointWorker extends IHiveWorker { | ||
getSwaggerDefinition: () => any | undefined; | ||
execute: (headers: any, url: string, body: any) => Promise<[{} | undefined, number]>; | ||
execute: (headers: any, url: string, body: any) => Promise<RestEndpointExecuteResponse>; | ||
} | ||
//# sourceMappingURL=IRestEndpointWorker.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IRestEndpointWorker.js.map |
import { IHiveWorker } from "./IHiveWorker"; | ||
export interface IServerWorker extends IHiveWorker { | ||
buildServer: () => Promise<void>; | ||
buildServer: (app: any) => Promise<any>; | ||
} | ||
//# sourceMappingURL=IServerWorker.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IServerWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IStorageWorker.js.map |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "./IHiveWorker"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=ITokenWorker.js.map |
@@ -0,0 +0,0 @@ import { AuthUser } from "../models/AuthUser"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=IUserWorker.js.map |
@@ -0,0 +0,0 @@ export declare class AuthUser { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class ClientSettings { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { StoredProcSchema } from "./StoredProcSchema"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class ConverterSqlInfo { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class Customer { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { GraphQLScalarType } from "graphql"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { Customer } from "./Customer"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class HiveAccountType { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -7,2 +7,3 @@ export declare class HiveWorker { | ||
importPath: string; | ||
core: boolean; | ||
default: boolean; | ||
@@ -9,0 +10,0 @@ enabled: boolean; |
@@ -11,2 +11,3 @@ "use strict"; | ||
this.importPath = ""; | ||
this.core = false; | ||
this.default = true; | ||
@@ -13,0 +14,0 @@ this.enabled = true; |
@@ -0,0 +0,0 @@ import { IHiveWorker } from "../interfaces/IHiveWorker"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -5,7 +5,7 @@ export declare class HiveWorkerMetadataDatabase { | ||
databaseName: string; | ||
graphEndpoint: string; | ||
userName: string; | ||
password: string; | ||
rowLimit: number; | ||
urlRoute: string; | ||
} | ||
//# sourceMappingURL=HiveWorkerMetadataDatabase.d.ts.map |
@@ -9,6 +9,6 @@ "use strict"; | ||
this.databaseName = ""; | ||
this.graphEndpoint = ""; | ||
this.userName = ""; | ||
this.password = ""; | ||
this.rowLimit = 0; | ||
this.urlRoute = ""; | ||
} | ||
@@ -15,0 +15,0 @@ } |
export declare class HiveWorkerMetadataGraphBuilder { | ||
graphUrl: string; | ||
dbWorkers: string[]; | ||
urlRoute: string; | ||
} | ||
//# sourceMappingURL=HiveWorkerMetadataGraphBuilder.d.ts.map |
@@ -6,4 +6,4 @@ "use strict"; | ||
constructor() { | ||
this.graphUrl = ""; | ||
this.dbWorkers = []; | ||
this.urlRoute = ""; | ||
} | ||
@@ -10,0 +10,0 @@ } |
@@ -0,0 +0,0 @@ import { LifecycleWorkerAction } from "../enums/LifecycleWorkerAction"; |
@@ -0,0 +0,0 @@ "use strict"; |
import { RestMethod } from "../enums/RestMethod"; | ||
export declare class HiveWorkerMetadataRestFunction { | ||
methodUrl: string; | ||
restMethod: RestMethod; | ||
isSystem: boolean; | ||
urlRoute: string; | ||
} | ||
//# sourceMappingURL=HiveWorkerMetadataRestFunction.d.ts.map |
@@ -7,5 +7,4 @@ "use strict"; | ||
constructor() { | ||
this.methodUrl = ""; | ||
this.restMethod = RestMethod_1.RestMethod.POST; | ||
this.isSystem = false; | ||
this.urlRoute = ""; | ||
} | ||
@@ -12,0 +11,0 @@ } |
export declare class HiveWorkerMetadataServer { | ||
buildWorkers: string[]; | ||
urlRoute: string; | ||
} | ||
//# sourceMappingURL=HiveWorkerMetadataServer.d.ts.map |
@@ -7,2 +7,3 @@ "use strict"; | ||
this.buildWorkers = []; | ||
this.urlRoute = ""; | ||
} | ||
@@ -9,0 +10,0 @@ } |
@@ -0,0 +0,0 @@ export declare class PubSubListener { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class ServerConfigSettings { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { HiveWorker } from "./HiveWorker"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class StoredProcSchema { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class TableSchema { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { HiveWorker } from "./HiveWorker"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { TestConfigSettings } from "./TestConfigSettings"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "@withonevision/omnihive-core", | ||
"version": "4.0.3-dev.27", | ||
"version": "4.0.3-dev.29", | ||
"description": "OmniHive Core", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -0,0 +0,0 @@ import { HiveAccount } from "../models/HiveAccount"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { ConnectionSchema } from "../models/ConnectionSchema"; |
@@ -0,0 +0,0 @@ "use strict"; |
import { IHiveWorker } from "../interfaces/IHiveWorker"; | ||
import { HiveWorker } from "../models/HiveWorker"; | ||
import { RegisteredHiveWorker } from "../models/RegisteredHiveWorker"; | ||
export declare class WorkerService { | ||
@@ -7,8 +8,9 @@ private static singleton; | ||
static getSingleton: () => WorkerService; | ||
registeredWorkers: [HiveWorker, any][]; | ||
registeredWorkers: RegisteredHiveWorker[]; | ||
initWorkers: (configs: HiveWorker[]) => Promise<void>; | ||
clearWorkers: () => void; | ||
getWorker: <T extends IHiveWorker | undefined>(type: string, name?: string | undefined) => Promise<T | undefined>; | ||
getWorkersByType: (type: string) => RegisteredHiveWorker[]; | ||
pushWorker: (hiveWorker: HiveWorker) => Promise<void>; | ||
} | ||
//# sourceMappingURL=WorkerService.d.ts.map |
@@ -48,6 +48,7 @@ "use strict"; | ||
await AwaitHelper_1.AwaitHelper.execute(newWorkerInstance.init(hiveWorker)); | ||
this.registeredWorkers.push([hiveWorker, newWorkerInstance]); | ||
const registeredWorker = { ...hiveWorker, instance: newWorkerInstance }; | ||
this.registeredWorkers.push(registeredWorker); | ||
} | ||
for (const worker of this.registeredWorkers) { | ||
await AwaitHelper_1.AwaitHelper.execute(worker[1].afterInit()); | ||
await AwaitHelper_1.AwaitHelper.execute(worker.instance.afterInit()); | ||
} | ||
@@ -68,3 +69,3 @@ } | ||
if (!name) { | ||
const defaultWorkers = this.registeredWorkers.filter((d) => d[0].type === type && d[0].default === true && d[0].enabled === true); | ||
const defaultWorkers = this.registeredWorkers.filter((rw) => rw.type === type && rw.default === true && rw.enabled === true); | ||
if (defaultWorkers.length > 1) { | ||
@@ -77,3 +78,3 @@ throw new Error("You cannot have multiple default workers of the same type"); | ||
if (!hiveWorker) { | ||
const anyWorkers = this.registeredWorkers.filter((d) => d[0].type === type && d[0].enabled === true); | ||
const anyWorkers = this.registeredWorkers.filter((rw) => rw.type === type && rw.enabled === true); | ||
if (anyWorkers && anyWorkers.length > 0) { | ||
@@ -88,3 +89,3 @@ hiveWorker = anyWorkers[0]; | ||
else { | ||
hiveWorker = this.registeredWorkers.find((d) => d[0].type === type && d[0].name === name && d[0].enabled === true); | ||
hiveWorker = this.registeredWorkers.find((rw) => rw.type === type && rw.name === name && rw.enabled === true); | ||
if (!hiveWorker) { | ||
@@ -94,4 +95,7 @@ return undefined; | ||
} | ||
return hiveWorker[1]; | ||
return hiveWorker.instance; | ||
}; | ||
this.getWorkersByType = (type) => { | ||
return this.registeredWorkers.filter((rw) => rw.type === type && rw.enabled === true); | ||
}; | ||
this.pushWorker = async (hiveWorker) => { | ||
@@ -105,3 +109,4 @@ if (!hiveWorker.importPath || hiveWorker.importPath === "") { | ||
await AwaitHelper_1.AwaitHelper.execute(newWorkerInstance.afterInit()); | ||
this.registeredWorkers.push([hiveWorker, newWorkerInstance]); | ||
const registeredWorker = { ...hiveWorker, instance: newWorkerInstance }; | ||
this.registeredWorkers.push(registeredWorker); | ||
}; | ||
@@ -108,0 +113,0 @@ } |
{ | ||
"extends": "../../../tsconfig.json" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
824884
243
1235