Skip to content

Commit

Permalink
refactor(core-api): move PluginRegistry to core package
Browse files Browse the repository at this point in the history
Fixes #380

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Dec 2, 2020
1 parent fae85ab commit 6c88f64
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
LogLevelDesc,
LoggerProvider,
} from "@hyperledger/cactus-common";
import { PluginRegistry } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";
import { PluginLedgerConnectorBesu } from "@hyperledger/cactus-plugin-ledger-connector-besu";
import {
PluginLedgerConnectorQuorum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import {
Consortium,
ConsortiumMember,
LedgerType,
PluginRegistry,
} from "@hyperledger/cactus-core-api";

import { PluginRegistry } from "@hyperledger/cactus-core";

import {
LogLevelDesc,
Logger,
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-cmd-api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"dependencies": {
"@hyperledger/cactus-cockpit": "0.2.0",
"@hyperledger/cactus-common": "0.2.0",
"@hyperledger/cactus-core": "0.2.0",
"@hyperledger/cactus-core-api": "0.2.0",
"@hyperledger/cactus-plugin-keychain-memory": "0.2.0",
"@hyperledger/cactus-plugin-kv-storage-memory": "0.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import {
ICactusPlugin,
isIPluginWebService,
IPluginWebService,
PluginRegistry,
} from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";
import { ICactusApiServerOptions } from "./config/config-service";
import { CACTUS_OPEN_API_JSON } from "./openapi-spec";
import { Logger, LoggerProvider, Servers } from "@hyperledger/cactus-common";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import test, { Test } from "tape-promise/tape";
import { v4 as uuidv4 } from "uuid";

import { LogLevelDesc } from "@hyperledger/cactus-common";
import { PluginRegistry } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";

import { ApiServer, ConfigService } from "../../../main/typescript/public-api";
import { IPluginKeychainMemoryOptions } from "../../../../../cactus-plugin-keychain-memory/dist/types/main/typescript";
Expand Down
1 change: 0 additions & 1 deletion packages/cactus-core-api/src/main/typescript/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ export {
isICactusPlugin,
} from "./plugin/i-cactus-plugin";
export { PluginAspect } from "./plugin/plugin-aspect";
export { PluginRegistry } from "./plugin/plugin-registry";
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Optional } from "typescript-optional";
import { ICactusPlugin, isICactusPlugin } from "../plugin/i-cactus-plugin";
import { PluginAspect } from "../plugin/plugin-aspect";
import {
ICactusPlugin,
isICactusPlugin,
} from "@hyperledger/cactus-core-api/src/main/typescript/plugin/i-cactus-plugin";
import { PluginAspect } from "@hyperledger/cactus-core-api/src/main/typescript/plugin/plugin-aspect";

/**
* This interface describes the constructor options object that can be used to provide configuration parameters to
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-core/src/main/typescript/public-api.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { registerWebServiceEndpoint } from "./web-services/register-web-service-endpoint";
export { IPluginRegistryOptions, PluginRegistry } from "./plugin-registry";
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ import {
Consortium,
IPluginWebService,
PluginAspect,
PluginRegistry,
IWebServiceEndpoint,
ICactusPlugin,
ICactusPluginOptions,
} from "@hyperledger/cactus-core-api";

import { PluginRegistry } from "@hyperledger/cactus-core";

import {
Checks,
Logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ import {
PluginAspect,
ICactusPlugin,
ICactusPluginOptions,
PluginRegistry,
IPluginKeychain,
} from "@hyperledger/cactus-core-api";

import { PluginRegistry } from "@hyperledger/cactus-core";

import {
Checks,
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test, { Test } from "tape";
import { v4 as uuidv4 } from "uuid";
import { PluginRegistry } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";
import {
EthContractInvocationType,
Web3SigningCredentialType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ import {
PluginAspect,
ICactusPlugin,
ICactusPluginOptions,
PluginRegistry,
IPluginKeychain,
} from "@hyperledger/cactus-core-api";

import { PluginRegistry } from "@hyperledger/cactus-core";

import {
Checks,
Logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
IQuorumGenesisOptions,
IAccount,
} from "@hyperledger/cactus-test-tooling";
import { PluginRegistry } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";

const logLevel: LogLevelDesc = "INFO";
const log: Logger = LoggerProvider.getOrCreate({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import bodyParser from "body-parser";
import {
IPluginWebService,
PluginAspect,
PluginRegistry,
IWebServiceEndpoint,
ICactusPlugin,
ICactusPluginOptions,
} from "@hyperledger/cactus-core-api";

import { PluginRegistry } from "@hyperledger/cactus-core";

import {
LogLevelDesc,
Logger,
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-test-api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"dependencies": {
"@hyperledger/cactus-cmd-api-server": "^0.2.0",
"@hyperledger/cactus-common": "0.2.0",
"@hyperledger/cactus-core": "^0.2.0",
"@hyperledger/cactus-core-api": "^0.2.0",
"@hyperledger/cactus-plugin-consortium-manual": "^0.2.0",
"@hyperledger/cactus-plugin-ledger-connector-besu": "^0.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ import Web3 from "web3";

import { ApiClient } from "@hyperledger/cactus-api-client";
import { ApiServer, ConfigService } from "@hyperledger/cactus-cmd-api-server";
import {
PluginRegistry,
Consortium,
Ledger,
LedgerType,
} from "@hyperledger/cactus-core-api";
import { Consortium, Ledger, LedgerType } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";
import {
DefaultApi as QuorumApi,
PluginLedgerConnectorQuorum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import test, { Test } from "tape-promise/tape";
import { v4 as uuidv4 } from "uuid";

import { LogLevelDesc } from "@hyperledger/cactus-common";
import { PluginRegistry } from "@hyperledger/cactus-core-api";

import { ApiServer, ConfigService } from "@hyperledger/cactus-cmd-api-server";
import { IPluginKeychainMemoryOptions } from "@hyperledger/cactus-plugin-keychain-memory";
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-test-plugin-consortium-manual/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"dependencies": {
"@hyperledger/cactus-cmd-api-server": "^0.2.0",
"@hyperledger/cactus-common": "0.2.0",
"@hyperledger/cactus-core": "^0.2.0",
"@hyperledger/cactus-core-api": "^0.2.0",
"@hyperledger/cactus-plugin-consortium-manual": "^0.2.0",
"@hyperledger/cactus-plugin-kv-storage-memory": "0.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
DefaultApi,
Configuration,
} from "@hyperledger/cactus-plugin-consortium-manual";
import { Consortium, PluginRegistry } from "@hyperledger/cactus-core-api";
import { Consortium } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";

test("member node public keys and hosts are pre-shared", async (t: Test) => {
const consortiumId = uuidV4();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import {
CactusNode,
ConsortiumMember,
Consortium,
PluginRegistry,
} from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";

import { PluginKVStorageMemory } from "@hyperledger/cactus-plugin-kv-storage-memory";
import {
DefaultApi as DefaultApiPlugin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"dependencies": {
"@hyperledger/cactus-cmd-api-server": "^0.2.0",
"@hyperledger/cactus-common": "0.2.0",
"@hyperledger/cactus-core": "^0.2.0",
"@hyperledger/cactus-core-api": "^0.2.0",
"@hyperledger/cactus-plugin-consortium-manual": "^0.2.0",
"@hyperledger/cactus-plugin-kv-storage-memory": "0.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import {
ICactusApiServerOptions,
} from "@hyperledger/cactus-cmd-api-server";

import { ICactusPlugin, PluginRegistry } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";
import { ICactusPlugin } from "@hyperledger/cactus-core-api";
import { PluginKVStorageMemory } from "@hyperledger/cactus-plugin-kv-storage-memory";

const log: Logger = LoggerProvider.getOrCreate({
Expand Down
1 change: 1 addition & 0 deletions packages/cactus-test-plugin-validator-besu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"dependencies": {
"@hyperledger/cactus-cmd-api-server": "0.2.0",
"@hyperledger/cactus-common": "0.2.0",
"@hyperledger/cactus-core": "0.2.0",
"@hyperledger/cactus-core-api": "0.2.0",
"@hyperledger/cactus-plugin-validator-besu": "0.2.0",
"@hyperledger/cactus-test-tooling": "0.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
SignTransactionRequest,
Configuration,
} from "@hyperledger/cactus-plugin-validator-besu";
import { PluginRegistry } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";

test("Test sign transaction endpoint", async (t: Test) => {
const httpServer1 = createServer();
Expand Down

0 comments on commit 6c88f64

Please sign in to comment.