From 373094bd069c2989f219a6d5a266f5387b5dc029 Mon Sep 17 00:00:00 2001 From: Yash Ajgaonkar <31548778+yash2189@users.noreply.github.com> Date: Fri, 23 Oct 2020 12:48:44 +0530 Subject: [PATCH] refactor(sdk): renamed sdk package to api client Signed-off-by: yash2189 --- .../{cactus-sdk => cactus-api-client}/.gitignore | 0 packages/{cactus-sdk => cactus-api-client}/README.md | 2 +- .../package-lock.json | 2 +- .../{cactus-sdk => cactus-api-client}/package.json | 12 ++++++------ .../src/main/typescript/api-client.ts | 0 .../generated/openapi/typescript-axios/.gitignore | 0 .../typescript-axios/.openapi-generator-ignore | 0 .../typescript-axios/.openapi-generator/FILES | 0 .../typescript-axios/.openapi-generator/VERSION | 0 .../generated/openapi/typescript-axios/api.ts | 0 .../generated/openapi/typescript-axios/base.ts | 0 .../openapi/typescript-axios/configuration.ts | 0 .../generated/openapi/typescript-axios/index.ts | 0 .../src/main/typescript/index.ts | 0 .../src/main/typescript/index.web.ts | 0 .../src/main/typescript/public-api.ts | 0 .../src/test/typescript/integration/api-surface.ts | 0 .../src/test/typescript/unit/api-surface.ts | 0 .../{cactus-sdk => cactus-api-client}/tsconfig.json | 0 packages/cactus-cockpit/package.json | 2 +- packages/cactus-cockpit/src/app/app.component.ts | 2 +- .../consortium-inspector.page.ts | 2 +- .../cactus-plugin-consortium-manual/package.json | 2 +- .../consortium/get-consortium-jws-endpoint-v1.ts | 2 +- .../package.json | 2 +- .../get-consortium-jws-endpoint.test.ts | 2 +- .../security-isolation-via-api-server-ports.ts | 2 +- .../package.json | 2 +- .../deploy-contract-via-web-service.ts | 2 +- .../cactus-test-plugin-validator-besu/package.json | 2 +- .../sign-transaction-endpoint.test.ts | 2 +- 31 files changed, 20 insertions(+), 20 deletions(-) rename packages/{cactus-sdk => cactus-api-client}/.gitignore (100%) rename packages/{cactus-sdk => cactus-api-client}/README.md (65%) rename packages/{cactus-sdk => cactus-api-client}/package-lock.json (98%) rename packages/{cactus-sdk => cactus-api-client}/package.json (88%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/api-client.ts (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/generated/openapi/typescript-axios/.gitignore (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/generated/openapi/typescript-axios/api.ts (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/generated/openapi/typescript-axios/base.ts (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/generated/openapi/typescript-axios/configuration.ts (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/generated/openapi/typescript-axios/index.ts (100%) rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/index.ts (100%) mode change 100755 => 100644 rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/index.web.ts (100%) mode change 100755 => 100644 rename packages/{cactus-sdk => cactus-api-client}/src/main/typescript/public-api.ts (100%) mode change 100755 => 100644 rename packages/{cactus-sdk => cactus-api-client}/src/test/typescript/integration/api-surface.ts (100%) rename packages/{cactus-sdk => cactus-api-client}/src/test/typescript/unit/api-surface.ts (100%) rename packages/{cactus-sdk => cactus-api-client}/tsconfig.json (100%) diff --git a/packages/cactus-sdk/.gitignore b/packages/cactus-api-client/.gitignore similarity index 100% rename from packages/cactus-sdk/.gitignore rename to packages/cactus-api-client/.gitignore diff --git a/packages/cactus-sdk/README.md b/packages/cactus-api-client/README.md similarity index 65% rename from packages/cactus-sdk/README.md rename to packages/cactus-api-client/README.md index 20820996e2..83b22075e6 100644 --- a/packages/cactus-sdk/README.md +++ b/packages/cactus-api-client/README.md @@ -1,4 +1,4 @@ -# `@hyperledger/cactus-sdk` +# `@hyperledger/cactus-api-client` > TODO: description diff --git a/packages/cactus-sdk/package-lock.json b/packages/cactus-api-client/package-lock.json similarity index 98% rename from packages/cactus-sdk/package-lock.json rename to packages/cactus-api-client/package-lock.json index 880942cb36..a5ee66992a 100644 --- a/packages/cactus-sdk/package-lock.json +++ b/packages/cactus-api-client/package-lock.json @@ -1,5 +1,5 @@ { - "name": "@hyperledger/cactus-sdk", + "name": "@hyperledger/cactus-api-client", "version": "0.2.0", "lockfileVersion": 1, "requires": true, diff --git a/packages/cactus-sdk/package.json b/packages/cactus-api-client/package.json similarity index 88% rename from packages/cactus-sdk/package.json rename to packages/cactus-api-client/package.json index 964963a702..87a255d267 100644 --- a/packages/cactus-sdk/package.json +++ b/packages/cactus-api-client/package.json @@ -1,11 +1,11 @@ { - "name": "@hyperledger/cactus-sdk", + "name": "@hyperledger/cactus-api-client", "version": "0.2.0", "description": "Universal library used by both front end and back end components of Cactus. Aims to be a developer swiss army knife.", - "main": "dist/cactus-sdk.node.umd.js", - "mainMinified": "dist/cactus-sdk.node.umd.min.js", - "browser": "dist/cactus-sdk.web.umd.js", - "browserMinified": "dist/cactus-sdk.web.umd.min.js", + "main": "dist/cactus-api-client.node.umd.js", + "mainMinified": "dist/cactus-api-client.node.umd.min.js", + "browser": "dist/cactus-api-client.web.umd.js", + "browserMinified": "dist/cactus-api-client.web.umd.min.js", "module": "dist/lib/main/typescript/index.js", "types": "dist/types/main/typescript/index.d.ts", "files": [ @@ -70,4 +70,4 @@ "devDependencies": { "@types/joi": "14.3.4" } -} \ No newline at end of file +} diff --git a/packages/cactus-sdk/src/main/typescript/api-client.ts b/packages/cactus-api-client/src/main/typescript/api-client.ts similarity index 100% rename from packages/cactus-sdk/src/main/typescript/api-client.ts rename to packages/cactus-api-client/src/main/typescript/api-client.ts diff --git a/packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/.gitignore b/packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/.gitignore similarity index 100% rename from packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/.gitignore rename to packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/.gitignore diff --git a/packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore b/packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore similarity index 100% rename from packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore rename to packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore diff --git a/packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES b/packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES similarity index 100% rename from packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES rename to packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES diff --git a/packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION b/packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION similarity index 100% rename from packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION rename to packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION diff --git a/packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/api.ts similarity index 100% rename from packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/api.ts rename to packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/api.ts diff --git a/packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/base.ts b/packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/base.ts similarity index 100% rename from packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/base.ts rename to packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/base.ts diff --git a/packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/configuration.ts b/packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/configuration.ts similarity index 100% rename from packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/configuration.ts rename to packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/configuration.ts diff --git a/packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/index.ts b/packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/index.ts similarity index 100% rename from packages/cactus-sdk/src/main/typescript/generated/openapi/typescript-axios/index.ts rename to packages/cactus-api-client/src/main/typescript/generated/openapi/typescript-axios/index.ts diff --git a/packages/cactus-sdk/src/main/typescript/index.ts b/packages/cactus-api-client/src/main/typescript/index.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/cactus-sdk/src/main/typescript/index.ts rename to packages/cactus-api-client/src/main/typescript/index.ts diff --git a/packages/cactus-sdk/src/main/typescript/index.web.ts b/packages/cactus-api-client/src/main/typescript/index.web.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/cactus-sdk/src/main/typescript/index.web.ts rename to packages/cactus-api-client/src/main/typescript/index.web.ts diff --git a/packages/cactus-sdk/src/main/typescript/public-api.ts b/packages/cactus-api-client/src/main/typescript/public-api.ts old mode 100755 new mode 100644 similarity index 100% rename from packages/cactus-sdk/src/main/typescript/public-api.ts rename to packages/cactus-api-client/src/main/typescript/public-api.ts diff --git a/packages/cactus-sdk/src/test/typescript/integration/api-surface.ts b/packages/cactus-api-client/src/test/typescript/integration/api-surface.ts similarity index 100% rename from packages/cactus-sdk/src/test/typescript/integration/api-surface.ts rename to packages/cactus-api-client/src/test/typescript/integration/api-surface.ts diff --git a/packages/cactus-sdk/src/test/typescript/unit/api-surface.ts b/packages/cactus-api-client/src/test/typescript/unit/api-surface.ts similarity index 100% rename from packages/cactus-sdk/src/test/typescript/unit/api-surface.ts rename to packages/cactus-api-client/src/test/typescript/unit/api-surface.ts diff --git a/packages/cactus-sdk/tsconfig.json b/packages/cactus-api-client/tsconfig.json similarity index 100% rename from packages/cactus-sdk/tsconfig.json rename to packages/cactus-api-client/tsconfig.json diff --git a/packages/cactus-cockpit/package.json b/packages/cactus-cockpit/package.json index af2c2f3ad6..ac602cc81c 100644 --- a/packages/cactus-cockpit/package.json +++ b/packages/cactus-cockpit/package.json @@ -26,7 +26,7 @@ "@capacitor/core": "1.5.1", "@hyperledger/cactus-common": "0.2.0", "@hyperledger/cactus-plugin-consortium-manual": "0.2.0", - "@hyperledger/cactus-sdk": "0.2.0", + "@hyperledger/cactus-api-client": "0.2.0", "@ionic-native/core": "5.0.0", "@ionic-native/splash-screen": "5.0.0", "@ionic-native/status-bar": "5.0.0", diff --git a/packages/cactus-cockpit/src/app/app.component.ts b/packages/cactus-cockpit/src/app/app.component.ts index ecd181f20a..5f5093e723 100644 --- a/packages/cactus-cockpit/src/app/app.component.ts +++ b/packages/cactus-cockpit/src/app/app.component.ts @@ -6,7 +6,7 @@ import { StatusBar } from "@ionic-native/status-bar/ngx"; import { LoggerProvider, Logger } from "@hyperledger/cactus-common"; import { DefaultApi as DefaultApiConsortium } from "@hyperledger/cactus-plugin-consortium-manual"; -import { ApiClient, Configuration } from "@hyperledger/cactus-sdk"; +import { ApiClient, Configuration } from "@hyperledger/cactus-api-client"; import { CACTUS_API_URL } from "src/constants"; @Component({ diff --git a/packages/cactus-cockpit/src/app/consortium-inspector/consortium-inspector.page.ts b/packages/cactus-cockpit/src/app/consortium-inspector/consortium-inspector.page.ts index fdacffa7d8..2266de1ec9 100644 --- a/packages/cactus-cockpit/src/app/consortium-inspector/consortium-inspector.page.ts +++ b/packages/cactus-cockpit/src/app/consortium-inspector/consortium-inspector.page.ts @@ -5,7 +5,7 @@ import { LoggerProvider, ILoggerOptions, } from "@hyperledger/cactus-common"; -import { Configuration, ApiClient } from "@hyperledger/cactus-sdk"; +import { Configuration, ApiClient } from "@hyperledger/cactus-api-client"; import { DefaultApi as PluginConsortiumManualApi, JWSGeneral, diff --git a/packages/cactus-plugin-consortium-manual/package.json b/packages/cactus-plugin-consortium-manual/package.json index bad878278b..b0a9a47fca 100644 --- a/packages/cactus-plugin-consortium-manual/package.json +++ b/packages/cactus-plugin-consortium-manual/package.json @@ -79,7 +79,7 @@ }, "devDependencies": { "@hyperledger/cactus-plugin-kv-storage-memory": "0.2.0", - "@hyperledger/cactus-sdk": "0.2.0", + "@hyperledger/cactus-api-client": "0.2.0", "@types/express": "4.17.6", "@types/joi": "14.3.4", "@types/json-stable-stringify": "1.0.32", diff --git a/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts b/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts index 607dfa7963..ce4bca56a1 100644 --- a/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts +++ b/packages/cactus-plugin-consortium-manual/src/main/typescript/consortium/get-consortium-jws-endpoint-v1.ts @@ -2,7 +2,7 @@ import { Request, Response, NextFunction } from "express"; import { JWS, JWK } from "jose"; import flatten from "lodash/flatten"; -import { ApiClient } from "@hyperledger/cactus-sdk"; +import { ApiClient } from "@hyperledger/cactus-api-client"; import { IWebServiceEndpoint, IExpressRequestHandler, diff --git a/packages/cactus-test-plugin-consortium-manual/package.json b/packages/cactus-test-plugin-consortium-manual/package.json index 94d053d53d..17619e3501 100644 --- a/packages/cactus-test-plugin-consortium-manual/package.json +++ b/packages/cactus-test-plugin-consortium-manual/package.json @@ -68,7 +68,7 @@ "@hyperledger/cactus-plugin-consortium-manual": "^0.2.0", "@hyperledger/cactus-plugin-kv-storage-memory": "0.2.0", "@hyperledger/cactus-plugin-ledger-connector-quorum": "^0.2.0", - "@hyperledger/cactus-sdk": "0.2.0", + "@hyperledger/cactus-api-client": "0.2.0", "axios": "0.19.2", "joi": "14.3.1", "jose": "1.27.2", diff --git a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts b/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts index 55aaf74c1a..99a73cfffa 100644 --- a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts +++ b/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts @@ -6,7 +6,7 @@ import { JWK, JWS } from "jose"; import { v4 as uuidV4 } from "uuid"; import { ApiServer, ConfigService } from "@hyperledger/cactus-cmd-api-server"; -import { Configuration, ApiClient } from "@hyperledger/cactus-sdk"; +import { Configuration, ApiClient } from "@hyperledger/cactus-api-client"; import { IPluginConsortiumManualOptions, PluginConsortiumManual, diff --git a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/security-isolation-via-api-server-ports.ts b/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/security-isolation-via-api-server-ports.ts index c120cdb5cb..2ca58a22fc 100644 --- a/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/security-isolation-via-api-server-ports.ts +++ b/packages/cactus-test-plugin-consortium-manual/src/test/typescript/integration/plugin-consortium-manual/security-isolation-via-api-server-ports.ts @@ -12,7 +12,7 @@ import { DefaultApi, Configuration, HealthCheckResponse, -} from "@hyperledger/cactus-sdk"; +} from "@hyperledger/cactus-api-client"; import { DefaultApi as DefaultApiPlugin, Configuration as ConfigurationPlugin, diff --git a/packages/cactus-test-plugin-ledger-connector-quorum/package.json b/packages/cactus-test-plugin-ledger-connector-quorum/package.json index f4899afa5d..4db9bf4768 100644 --- a/packages/cactus-test-plugin-ledger-connector-quorum/package.json +++ b/packages/cactus-test-plugin-ledger-connector-quorum/package.json @@ -67,7 +67,7 @@ "@hyperledger/cactus-core-api": "^0.2.0", "@hyperledger/cactus-plugin-kv-storage-memory": "0.2.0", "@hyperledger/cactus-plugin-ledger-connector-quorum": "^0.2.0", - "@hyperledger/cactus-sdk": "0.2.0", + "@hyperledger/cactus-api-client": "0.2.0", "axios": "0.19.2", "joi": "14.3.1", "typescript-optional": "2.0.1", diff --git a/packages/cactus-test-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/deploy-contract-via-web-service.ts b/packages/cactus-test-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/deploy-contract-via-web-service.ts index 28637a6948..46da807351 100644 --- a/packages/cactus-test-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/deploy-contract-via-web-service.ts +++ b/packages/cactus-test-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/deploy-contract-via-web-service.ts @@ -20,7 +20,7 @@ import { DefaultApi, Configuration, HealthCheckResponse, -} from "@hyperledger/cactus-sdk"; +} from "@hyperledger/cactus-api-client"; const log: Logger = LoggerProvider.getOrCreate({ label: "test-deploy-contract-via-web-service", diff --git a/packages/cactus-test-plugin-validator-besu/package.json b/packages/cactus-test-plugin-validator-besu/package.json index 4bbafcec8b..d47463e1b3 100644 --- a/packages/cactus-test-plugin-validator-besu/package.json +++ b/packages/cactus-test-plugin-validator-besu/package.json @@ -66,7 +66,7 @@ "@hyperledger/cactus-common": "0.2.0", "@hyperledger/cactus-core-api": "0.2.0", "@hyperledger/cactus-plugin-validator-besu": "0.2.0", - "@hyperledger/cactus-sdk": "0.2.0", + "@hyperledger/cactus-api-client": "0.2.0", "@hyperledger/cactus-test-tooling": "0.2.0", "key-encoder": "2.0.3", "web3": "1.2.11", diff --git a/packages/cactus-test-plugin-validator-besu/src/test/typescript/integration/plugin-validator-besu/sign-transaction-endpoint.test.ts b/packages/cactus-test-plugin-validator-besu/src/test/typescript/integration/plugin-validator-besu/sign-transaction-endpoint.test.ts index 10ef8517b0..03a02d83ef 100644 --- a/packages/cactus-test-plugin-validator-besu/src/test/typescript/integration/plugin-validator-besu/sign-transaction-endpoint.test.ts +++ b/packages/cactus-test-plugin-validator-besu/src/test/typescript/integration/plugin-validator-besu/sign-transaction-endpoint.test.ts @@ -13,7 +13,7 @@ import { JsObjectSigner, IJsObjectSignerOptions, } from "@hyperledger/cactus-common"; -import { Configuration, ApiClient } from "@hyperledger/cactus-sdk"; +import { Configuration, ApiClient } from "@hyperledger/cactus-api-client"; import { BesuTestLedger } from "@hyperledger/cactus-test-tooling"; import { IPluginValidatorBesuOptions,