Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@businessoptics/frontend-library
Advanced tools
This library consists of modern and useful reusable components for React based BusinessOptics apps. It works best with apps that have been built using create-react-app version 2+. It consists of three primary sections:
This library consists of modern and useful reusable components for React based BusinessOptics apps. It works best with apps that have been built using create-react-app version 2+. It consists of three primary sections:
All modern BusinessOptics apps should use it, and abstract any common functionality to it. The library is a little disorganised right now, but we will strive to keep the external interfaces reasonably stable.
the library can be installed with npm
straight off Github assuming you have the correct permissions, via:
npm install @businessoptics/frontend-library
Use npm link to make devlopment usage easier (this is probably mandatory for now). This allows changes you make to automatically be picked up by projects using it on your local development machine.
git clone the library
Navigate to the root folder
Run npm link
(you may have to sudo)
Run npm run build:watch
(this will automatically build the library when you make changes)
Navigate to a project that is using the library (and already has it installed)
Run npm link @businessoptics/frontend-library
Run npm start
Now if you make a change in this library, the application using it should automatically update, making for a great development cycle.
You will have to rerun the second part of the steps when you run npm install
in an application.
These can be imported directly form the root module. They include a small set of helpers particularly useful for dealing with redux stores, without heavy weight dependencies like immutable.js.
Immutability helpers
These all work off iupdate
root
is a nested objectpath
is an array of strings/numbers, or a single itemupdateFn
is a function that takes a single value and returns the value to replace it with/* Given a nested data structure this will follow the path, and replace
* the item at the end of the path with the result of calling the updateFn on it.
* */
export const iupdate = (root, path, updateFn) => ..
/* Given a nested data structure this will follow the path, and replace
* the item at the end of the path with the value.
*/
export const iset = (root, path, value) => iupdate(root, path, () => value);
/* Given a nested data structure this will follow the path, and add the
* given value to the end of the array at that path.
*/
export const ipush = (root, path, value) =>
iupdate(root, path, list => list.concat([value]));
/* Given a nested data structure this will follow the path, and remove the
* given idex in the array at that path
*/
export const iremove = (root, path, index) =>
iupdate(root, path, list => [
...list.slice(0, index),
...list.slice(index + 1)
]);
Other useful helpers can be found in utilities.js.
The <Input/>
component is a generalised input component that deals with many edge cases around the traditional inputs and has a unified styling system. Primarily it accepts a type
prop which defines the data type (and default widget), and an optional widget
prop which customises what widget is used. These are meant to be used as controlled components. The options are
Obviously only some types can support some widgets, use common sense. Null is correctly supported and the value is always of the correct type.
The input takes an onChange(value)
event handler which is given the value of the control of the correct type.
Other props include:
Additionally there is a list widget which takes a list of objects as it's value, and required a list of field definitions, which are props for the various columns field types.
These assume a create-react-app v2+ is using the library. The scss can be included through:
@import "~@businessoptics/frontend-library/css/mixins.scss";
The following mixins are available.
// Only style the <Input/> component from this library
@include businessoptics-input-components($primaryColor, $secondaryColor);
//Applies styling to standard input components (to teh degree possible)
@include standard-input-components($primaryColor, $secondaryColor);
//Decent stying for tables with className="data-table"
@include data-tables($primaryColor, $secondaryColor);
//Some decent typography defaults
@include businessoptics-typography;
//A set of utility classes, this includes the whole of basscss, a small but useful library
//See utitily mixins for additional utility classes
@include utility-classes($primaryColor, $secondaryColor);
FAQs
This library consists of modern and useful reusable components for React based BusinessOptics apps. It works best with apps that have been built using create-react-app version 2+. It consists of three primary sections:
We found that @businessoptics/frontend-library demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.