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.
@wework/inventory-manager-components
Advanced tools
An embedded Inventory Manager Tool
NPM
You might need npm login
You will need to be logged in to install a dependency. Execute
npm login
and use the username, password, and e-mail found in 1Password under npmjs (dev-team).
npm install @wework/inventory-manager-components
# Yarn
yarn add @wework/inventory-manager-components
import React from 'react'
import { SessionInventoryManager } from '@wework/inventory-manager-components'
const ApplicationComponent = () => {
return (
<SessionInventoryManager
configuration={{
appId: 'appId',
appSecret: 'appSecret',
baseUrl: 'https://occupancy-api.phoenix.dev.wwrk.co/v2',
}}
buildingId="b308b94c-bca6-4318-b906-1c148f7ca183"
/>
)
}
In order to release a new version, first after making PR and merging to master, we pull the latest master version, and run
yarn run publish:v2
This will release a new version on npm of each updated package, and we'll be able to use it to update.
In order to deploy a new version on standalone, we'll have first to release a new version of Inventory manager components on NPM then update according to the new version the package.json located in Inventory-manager-tool repo, After updating and pushing to master it will automatically update both standalone production and staging.
In order to deploy a new version on spacestation, after releasing a new update of inventory-manager-componenets we will go to spacestation's repo package.json and update accordinly the version. After updating, making a PR and pushing to master it will automatically update production of inventory manager. a staging as well as a preproduction will be automatically deployed upon PR.
Sidebars are controlled from the HOC WithSidebars
value={{ isOpen, openSideBar, closeSideBar, sideBarName }}
isOpen: Is to determine wheter the sidebar is open.
openSideBar('name'): Takes name as a parameter and opens the sidebar with the selected option.
sideBarName: The current sidebar name
closeSidebar: Will close the sidebar and set the name to null
If we want to open a sidebar after an action we just call the following:
ex: openSideBar("BuildingInfo")
If we want to close a sidebar after an action we call:
closeSideBar()
Snackbars are also controlled via a HOC , withSnackbar, we can edit the behavior if needed on SnackBarProvider.js
If we want to display an alert we need to attach our component to the HOC, example:
export default withSnackbar(OfficeNoteEditModal)
Then we call snackBars from the props, and we can add an alert:
snackBars.addAlert({
text: `Note has been saved.`,
variant: 'success',
})
There are 3 types of snackbars,
Modals can be called anytime via their components and controlled by the parent,
We usually control if they are open or no via the following props
open
and onClose
We can also customise them depending on the use Case,
Example
<Modal
open={modalData.open}
title={'Confirm Action'}
content={modalData.content}
confirmText={'YES'}
cancelText={'NO'}
onConfirm={modalData.onConfirm}
onClose={() => setModalData({ ...modalData, open: false })}
/>
Or we can create our own Modal and call it directly.
FAQs
Embedded Inventory Manager Components
The npm package @wework/inventory-manager-components receives a total of 4 weekly downloads. As such, @wework/inventory-manager-components popularity was classified as not popular.
We found that @wework/inventory-manager-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 26 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.