Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@oceanprotocol/dbs-ui-lib
Advanced tools
Table of Contents
The lib uses React + TypeScript + CSS modules and will connect to Ocean remote components by default.
Prerequisites:
To start local development:
git clone git@github.com:oceanprotocol/dbs-ui-lib.git
cd dbs-ui-lib
# when using nvm to manage Node.js versions
nvm use
npm install
# in case of dependency errors, rather use:
# npm install --legacy-peer-deps
npm run build:watch
# to build the library and watch for changes.
Run npm run build
from the root folder to build the library. This creates dist
folder which contains everything that
would be published to npm.
Run export NODE_OPTIONS=--openssl-legacy-provider
before building.
Import and use the DBS UI components in your app:
import { DBSUploader } from '@oceanprotocol/dbs-ui-lib';
<DBSUploader
dbs_url={process.env.DBS_URL}
dbs_account={process.env.DBS_ACCOUNT}
infuraId={process.env.PUBLIC_INFURA_PROJECT_ID}
walletConnectProjectId={process.env.PUBLIC_WALLETCONNECT_PROJECT_ID}
/>
To enable the functionality of the DBSUploader, the following setting variables need to be set:
Variable | Description |
---|---|
dbs_url | URL for DBS service communication |
dbs_account | Account info for DBS authentication |
infuraId | Project ID for Ethereum access via Infura |
walletConnectProjectId | Project ID for WalletConnect integration |
These variables are needed to interact with the DBS service, provide authentication credentials, access the Ethereum network through Infura, and enable integration with WalletConnect.
Storybook helps us build UI components in isolation from our app's business logic, data, and context. That makes it easy to develop hard-to-reach states and save these UI states as stories to revisit during development, testing, or QA.
To start adding stories, create a index.stories.tsx
inside the component's folder:
src └─── components │ └─── │ │ index.tsx │ │ index.module.css │ │ index.stories.tsx │ │ index.test.tsx
Starting up the Storybook server with this command will make it accessible under http://localhost:6006
:
npm run storybook
If you want to build a portable static version under storybook-static/
:
npm run storybook:build
Test runs utilize Jest as test runner and Testing Library for writing tests.
Executing a full test run:
npm test
During local development you can continuously get coverage report feedback in your console by running Jest in watch mode:
npm test:watch
Code style is automatically enforced through ESLint & Prettier rules:
For running linting and auto-formatting, you can use from the root of the project:
# linting check
npm run lint
# auto format all files in the project with prettier, taking all configs into account
npm run format
To create a production build, run from the root of the project:
npm run build
TBD
We welcome contributions in form of bug reports, feature requests, code changes, or documentation improvements. Have a look at our contribution documentation for instructions and workflows:
Copyright 2023 Ocean Protocol Foundation Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
Ocean Protocol DBS component library
The npm package @oceanprotocol/dbs-ui-lib receives a total of 0 weekly downloads. As such, @oceanprotocol/dbs-ui-lib popularity was classified as not popular.
We found that @oceanprotocol/dbs-ui-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.