From 51b2952cba39fc0ad2ce9c82d0f3b02b24c4ade7 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Sun, 7 Apr 2024 16:10:33 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20missed=20renames=20(api=E2=86=92rpc,?= =?UTF-8?q?=20.io=E2=86=92.tech)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/ipfs/kubo/issues/8959 https://github.com/protocol/bifrost-infra/issues/178 --- README.md | 12 +++++------ public/locales/en/app.json | 4 ++-- public/locales/en/settings.json | 6 +++--- public/locales/en/welcome.json | 2 +- src/components/about-ipfs/AboutIpfs.js | 4 ++-- .../is-not-connected/IsNotConnected.js | 4 ++-- .../PinningManagerServiceModal.js | 2 +- src/lib/tours.js | 6 +++--- src/settings/SettingsPage.js | 8 ++++---- ...ote-api.test.js => remote-rpc-api.test.js} | 20 +++++++++---------- 10 files changed, 34 insertions(+), 34 deletions(-) rename test/e2e/{remote-api.test.js => remote-rpc-api.test.js} (93%) diff --git a/README.md b/README.md index e36f642c7..490d77cf8 100644 --- a/README.md +++ b/README.md @@ -62,9 +62,9 @@ In separate shells run the following: > npm run storybook ``` -### Configure IPFS API CORS headers +### Configure Kubo RPC API CORS headers -You must configure your IPFS API at http://127.0.0.1:5001 to allow [cross-origin (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests from your dev server at http://localhost:3000 +You must configure your Kubo RPC endpoint at http://127.0.0.1:5001 to allow [cross-origin (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests from your dev server at http://localhost:3000 Similarly if you want to try out pre-release versions at https://dev.webui.ipfs.io you need to add that as an allowed domain too. @@ -117,7 +117,7 @@ To create an optimized static build of the app, output to the `build` directory: ## Test -The following command will run all tests: unit one for React and E2E against real HTTP API: +The following command will run all tests: unit one for React and E2E against real Kubo RPC: ```sh > npm test @@ -135,7 +135,7 @@ The WebUI uses Jest to run the isolated unit tests. Unit test files are located ## E2E tests -The end-to-end tests (E2E) test the full app in a headless Chromium browser. They spawn real IPFS node for HTTP API and a static HTTP server to serve the app. +The end-to-end tests (E2E) test the full app in a headless Chromium browser. They spawn real Kubo node for HTTP RPC and a static HTTP server to serve the app. The purpose of those tests is not being comprehensible, but act as a quick regression and integration suite. Test files are located in `test/e2e/`. @@ -162,13 +162,13 @@ One can also override the binary used in e2e tests by providing a path to an alt #### `E2E_API_URL` -Instead of spawning a disposable node and repo for tests, one can point the E2E test suite at arbitrary HTTP API running on localhost: +Instead of spawning a disposable node and repo for tests, one can point the E2E test suite at arbitrary Kubo-compatible RPC API running on localhost: ```sh > E2E_API_URL=http://127.0.0.1:5001 npm run test:e2e ``` -**Caveat 1:** HTTP API used in tests needs to run on the local machine for Peers screen to pass (they test manual swarm connect to ephemeral `/ip4/120.0.0.1/..` multiaddr) +**Caveat 1:** HTTP RPC API used in tests needs to run on the local machine for Peers screen to pass (they test manual swarm connect to ephemeral `/ip4/120.0.0.1/..` multiaddr) **Caveat 2:** CORS requests from `http://localhost:3001` (static server hosting dev version of webui) need to be added to `Access-Control-Allow-Origin` whitelist array in node's config: diff --git a/public/locales/en/app.json b/public/locales/en/app.json index 142c477b2..ada9dbf7b 100644 --- a/public/locales/en/app.json +++ b/public/locales/en/app.json @@ -56,8 +56,8 @@ "addresses": "Addresses", "advanced": "Advanced", "agent": "Agent", - "api": "API", - "apiAddress": "API address", + "api": "Kubo RPC", + "apiAddress": "RPC API address", "blocks": "Blocks", "connection": "Connection", "downSpeed": "Incoming", diff --git a/public/locales/en/settings.json b/public/locales/en/settings.json index b879cb417..713361a27 100644 --- a/public/locales/en/settings.json +++ b/public/locales/en/settings.json @@ -22,7 +22,7 @@ "translationProjectIntro": "Add or improve translations and make IPFS better for everyone!", "translationProjectLink": "Join the IPFS Translation Project" }, - "apiDescription": "<0>If your node is configured with a <1>custom API address, including a port other than the default 5001, enter it here.", + "apiDescription": "<0>If your node is configured with a <1>custom Kubo RPC API address, including a port other than the default 5001, enter it here.", "publicGatewayDescription": "<0>Choose which <1>public gateway you want to use when generating shareable links.", "cliDescription": "<0>Enable this option to display a \"view code\" <1> icon next to common IPFS commands. Clicking it opens a modal with that command's CLI code, so you can paste it into the IPFS command-line interface in your terminal.", "cliModal": { @@ -132,8 +132,8 @@ "paragraph2": "If you're running IPFS Desktop you'll have some specific settings for it too." }, "step2": { - "title": "Custom API address", - "paragraph1": "If you've configured your IPFS node with a custom API address, you can update your config file right here instead of editing the JSON by hand." + "title": "Custom Kubo RPC API address", + "paragraph1": "If you've configured your Kubo-compatible IPFS node with a custom RPC API address, you can update your config file right here instead of editing the JSON by hand." }, "step3": { "title": "Pinning services", diff --git a/public/locales/en/welcome.json b/public/locales/en/welcome.json index 297838ea6..59b3ffbb8 100644 --- a/public/locales/en/welcome.json +++ b/public/locales/en/welcome.json @@ -14,7 +14,7 @@ "header": "What is IPFS?", "paragraph1": "<0><0>A hypermedia distribution protocol that incorporates ideas from Kademlia, BitTorrent, Git, and more", "paragraph2": "<0><0>A peer-to-peer file transfer network with a completely decentralized architecture and no central point of failure, censorship, or control", - "paragraph3": "<0><0>An on-ramp to tomorrow's web — traditional browsers can access IPFS files through gateways like <2>https://ipfs.io or directly using the <4>IPFS Companion extension", + "paragraph3": "<0><0>An on-ramp to tomorrow's web — traditional browsers can access IPFS files through gateways like <2>https://dweb.link or directly using the <4>IPFS Companion extension", "paragraph4": "<0><0>A next-gen CDN — just add a file to your node to make it available to the world with cache-friendly content-hash addressing and BitTorrent-style bandwidth distribution", "paragraph5": "<0><0>A developer toolset for building <2>completely distributed apps and services, backed by a robust open-source community" }, diff --git a/src/components/about-ipfs/AboutIpfs.js b/src/components/about-ipfs/AboutIpfs.js index 623718378..db7e8b9c8 100644 --- a/src/components/about-ipfs/AboutIpfs.js +++ b/src/components/about-ipfs/AboutIpfs.js @@ -14,13 +14,13 @@ export const AboutIpfs = ({ t }) => {
  • A peer-to-peer file transfer network with a completely decentralized architecture and no central point of failure, censorship, or control
  • -
  • An on-ramp to tomorrow's web — traditional browsers can access IPFS files through gateways like https://ipfs.io or directly using the IFPS Companion extension
  • +
  • An on-ramp to tomorrow's web — traditional browsers can access IPFS files through gateways like https://dweb.link or directly using the IFPS Companion extension
  • A next-gen CDN — just add a file to your node to make it available to the world with cache-friendly content-hash addressing and BitTorrent-style bandwidth distribution
  • -
  • A developer toolset for building completely distributed apps and services, backed by a robust open-source community
  • +
  • A developer toolset for building completely distributed apps and services, backed by a robust open-source community
  • diff --git a/src/components/is-not-connected/IsNotConnected.js b/src/components/is-not-connected/IsNotConnected.js index cdc6f41cc..442cebcc2 100644 --- a/src/components/is-not-connected/IsNotConnected.js +++ b/src/components/is-not-connected/IsNotConnected.js @@ -25,7 +25,7 @@ const IsNotConnected = ({ t, apiUrl, connected, sameOrigin, ipfsApiAddress, doUp

    {t('app:status.couldNotConnect')}

    -

    Check out the installation guide in the IPFS Docs, or try these common fixes:

    +

    Check out the installation guide in the IPFS Docs, or try these common fixes:

      @@ -39,7 +39,7 @@ const IsNotConnected = ({ t, apiUrl, connected, sameOrigin, ipfsApiAddress, doUp { !sameOrigin && (
      -
    1. Is your IPFS API configured to allow cross-origin (CORS) requests? If not, run these commands and then start your daemon from the terminal:
    2. +
    3. Is your IPFS API configured to allow cross-origin (CORS) requests? If not, run these commands and then start your daemon from the terminal:
    4. diff --git a/src/components/pinning-manager/pinning-manager-service-modal/PinningManagerServiceModal.js b/src/components/pinning-manager/pinning-manager-service-modal/PinningManagerServiceModal.js index bf1ea77fd..413988ece 100644 --- a/src/components/pinning-manager/pinning-manager-service-modal/PinningManagerServiceModal.js +++ b/src/components/pinning-manager/pinning-manager-service-modal/PinningManagerServiceModal.js @@ -107,7 +107,7 @@ const PinningManagerServiceModal = ({ t, onLeave, onSuccess, className, service,

      Want to make your custom pinning service available to others? - Learn how. + Learn how.

      diff --git a/src/lib/tours.js b/src/lib/tours.js index 0f7b8d4b3..a72c7aa35 100644 --- a/src/lib/tours.js +++ b/src/lib/tours.js @@ -112,7 +112,7 @@ export const filesTour = {

      {t('tour.step1.title')}

      - This is where the files on your + This is where the files on your Mutable File System (MFS) live. You can add files or folders and manage them from this page.

      @@ -141,7 +141,7 @@ export const filesTour = {

      {t('tour.step3.paragraph2')}

      - If you want to add something that is already on IPFS, you can import it to your MFS by passing its Content + If you want to add something that is already on IPFS, you can import it to your MFS by passing its Content Identifier (CID).

      @@ -233,7 +233,7 @@ export const settingsTour = { content:

      {t('tour.step3.title')}

      -

      If you have accounts with third-party remote pinning services, add them here so you can pin/unpin items to those services directly from the Files screen. You can learn more about third-party pinning services in the IPFS Docs. +

      If you have accounts with third-party remote pinning services, add them here so you can pin/unpin items to those services directly from the Files screen. You can learn more about third-party pinning services in the IPFS Docs.

      , diff --git a/src/settings/SettingsPage.js b/src/settings/SettingsPage.js index b1ccab602..374f6c13b 100644 --- a/src/settings/SettingsPage.js +++ b/src/settings/SettingsPage.js @@ -56,7 +56,7 @@ export const SettingsPage = ({
      {t('app:terms.apiAddress')} -

      If your node is configured with a custom API address, including a port other than the default 5001, enter it here.

      +

      If your node is configured with a custom Kubo RPC API address, including a port other than the default 5001, enter it here.

      @@ -66,7 +66,7 @@ export const SettingsPage = ({
      {t('app:terms.publicGateway')} -

      Choose which public gateway you want to use to open your files.

      +

      Choose which public gateway you want to use to open your files.

      @@ -75,7 +75,7 @@ export const SettingsPage = ({ {t('ipnsPublishingKeys.title')}

      - {t('ipnsPublishingKeys.description')} {t('learnMoreLink')} + {t('ipnsPublishingKeys.description')} {t('learnMoreLink')}

      @@ -86,7 +86,7 @@ export const SettingsPage = ({ { arePinningServicesSupported ? t('pinningServices.description') : t('pinningServices.noPinRemoteDescription') - } {t('learnMoreLink')} + } {t('learnMoreLink')}

      diff --git a/test/e2e/remote-api.test.js b/test/e2e/remote-rpc-api.test.js similarity index 93% rename from test/e2e/remote-api.test.js rename to test/e2e/remote-rpc-api.test.js index af25e0174..c7b688a13 100644 --- a/test/e2e/remote-api.test.js +++ b/test/e2e/remote-rpc-api.test.js @@ -9,14 +9,14 @@ import { path as getGoIpfsPath } from 'kubo' import * as kuboRpcModule from 'kubo-rpc-client' const { createProxyServer } = httpProxy -test.describe('Remote API tests', () => { +test.describe('Remote RPC API tests', () => { // Basic Auth Proxy Setup // ----------------------------------- // Why do we support and test Basic Auth? // Some users choose to access remote API. // It requires setting up reverse proxy with correct CORS and Basic Auth headers, // but when done properly, should work. This test sets up a proxy which - // acts as properly protected and configured remote API to ensure there are no + // acts as properly protected and configured remote RPC API to ensure there are no // regressions for this difficult to test use case. let ipfsd let proxyd @@ -41,7 +41,7 @@ test.describe('Remote API tests', () => { const { id } = await ipfsd.api.id() rpcId = id - // set up proxy in front of remote API to provide CORS and Basic Auth + // set up proxy in front of remote RPC API to provide CORS and Basic Auth user = 'user' password = 'pass' @@ -88,7 +88,7 @@ test.describe('Remote API tests', () => { }) test.beforeEach(async ({ page }) => { - // Swap API port for each test, ensure we don't get false-positives + // Swap RPC API port for each test, ensure we don't get false-positives proxyPort = await getPort() await proxyd.listen(proxyPort) // remove default api port set in test/e2e/setup/global-setup.js @@ -147,13 +147,13 @@ test.describe('Remote API tests', () => { } const basicAuthConnectionConfirmation = async (user, password, proxyPort, page, peerId) => { - // (1) confirm API section on Status page includes expected PeerID and API description + // (1) confirm RPC API section on Status page includes expected PeerID and RPC API description // account for JSON config, which we hide from status page await expectHttpApiAddressOnStatusPage('Custom JSON configuration', page) // confirm webui is actually connected to expected node :^) await expectPeerIdOnStatusPage(peerId, page) - // (2) go to Settings and confirm API string includes expected JSON config + // (2) go to Settings and confirm RPC API string includes expected JSON config const apiOptions = JSON.stringify({ url: `http://127.0.0.1:${proxyPort}/`, headers: { @@ -184,7 +184,7 @@ test.describe('Remote API tests', () => { await page.reload() // instant addr update for faster CI await page.waitForSelector('input[id="api-address"]') const apiAddrValue = await page.inputValue('#api-address') - // if API address is defined as JSON, match objects + // if RPC API address is defined as JSON, match objects try { const json = JSON.parse(apiAddrValue) const expectedJson = JSON.parse(value) @@ -201,7 +201,7 @@ test.describe('Remote API tests', () => { // having that out of the way, tests begin below ;^) // ---------------------------------------------------------------------------- - test.describe('API @ multiaddr', () => { + test.describe('RPC @ multiaddr', () => { test('should be possible to set via Settings page', async ({ page }) => { await switchIpfsApiEndpointViaSettings(rpcMaddr, page) await expectPeerIdOnStatusPage(rpcId, page) @@ -219,7 +219,7 @@ test.describe('Remote API tests', () => { }) }) - test.describe('API @ URL', () => { + test.describe('RPC @ URL', () => { test('should be possible to set via Settings page', async ({ page }) => { await switchIpfsApiEndpointViaSettings(rpcUrl, page) await expectPeerIdOnStatusPage(rpcId, page) @@ -237,7 +237,7 @@ test.describe('Remote API tests', () => { }) }) - test.describe('API with CORS and Basic Auth', () => { + test.describe('RPC with CORS and Basic Auth', () => { test.afterEach(async ({ page }) => { await switchIpfsApiEndpointViaLocalStorage(null, page) })