Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core-api): move PluginRegistry to core package #402

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-consortium-manual": "^0.2.0",
"@hyperledger/cactus-plugin-keychain-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,7 +1,10 @@
import { Optional } from "typescript-optional";
import { ICactusPlugin, isICactusPlugin } from "../plugin/i-cactus-plugin";
import { PluginAspect } from "../plugin/plugin-aspect";
import { IPluginKeychain } from "./keychain/i-plugin-keychain";
import {
ICactusPlugin,
IPluginKeychain,
isICactusPlugin,
PluginAspect,
} from "@hyperledger/cactus-core-api";

/**
* 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
@@ -1,12 +1,13 @@
import test, { Test } from "tape";
import { v4 as uuidv4 } from "uuid";

import { PluginRegistry } from "../../../main/typescript/public-api";

import {
ICactusPlugin,
IPluginKeychain,
PluginAspect,
PluginRegistry,
} from "../../../main/typescript/public-api";
} from "@hyperledger/cactus-core-api";

test("PluginRegistry", (tMain: Test) => {
test("findOneByKeychainId() finds plugin by keychain ID", (t: Test) => {
Expand Down
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 @@ -16,10 +16,11 @@ import {
PluginAspect,
ICactusPlugin,
ICactusPluginOptions,
PluginRegistry,
IPluginKeychain,
} from "@hyperledger/cactus-core-api";

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

import {
Checks,
CodedError,
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 @@ -22,9 +22,10 @@ import {
IWebServiceEndpoint,
ICactusPlugin,
ICactusPluginOptions,
PluginRegistry,
} from "@hyperledger/cactus-core-api";

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

import {
Logger,
Checks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
LogLevelDesc,
Servers,
} from "@hyperledger/cactus-common";
import { PluginRegistry } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";

import {
PluginLedgerConnectorFabric,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import bodyParser from "body-parser";
import express from "express";

import { FabricTestLedgerV1 } from "@hyperledger/cactus-test-tooling";
import { PluginRegistry } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";

import {
IListenOptions,
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
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 @@ -65,6 +65,7 @@
"@hyperledger/cactus-api-client": "^0.2.0",
"@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-keychain-memory": "^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 @@ -26,7 +26,7 @@ import {
SignTransactionRequest,
} from "@hyperledger/cactus-plugin-ledger-connector-besu";

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

import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory";

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