Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
A package for managing integration with bost.co a courier with cash collection provider
A Package for managing integration with the bosta.co courier and cash on delivery provided by bost.co for lack of an official one.
npm install bosta.co
Include your paymob accept credentials in a gitingnored .env
or configuration file
// config.js
module.exports = {
API_KEY: process.env.BOSTA_API_KEY || "-----------------"
}
Import the bosta.co instance and configure it
import Bosta, { DELIVERY_STATES, DELIVERY_TYPES, CITIES } from "bosta.co"
// or in node < 10 you can
// const { Bosta } = require("bosta.co")
// const Bosta = require("bosta.co").default
//... later in your code
/**
requestDelivery({
* apiKey: String, // don't need to include if process.env.BOSTA_API_KEY is set
* amount: Number, // the amount to be picked up (includes bosta's fee) optional in case of package delivery
* city: String, // Bosta enum for suported cities required if using address as string
* address: String | Address, // string of addressline or address object of the form { firstLine: String, city: String, geoLocation?: { lat: Number, lng: Number}, secondLine?: String, floor?: Number, appartment?: Number, zone?: String, District?: String } with firstLine being
* pickupAddress?: Address, // where the package is to be picked up from or cash to be collected from depending on delivery type
* deliveryAddress?: Address, // where package is to be delivered
* receiver: receiver, // who the delivery is ment for, object of the form { firstName: String, lastName: String, phone: String, email?: String } optional if name, phone is set
* name: String, // reciever first and last name required in case reciever object not set
* phone: String, // reciever phone required in case reciever object not set
* notes?: String, // A note for the courrier
* businessReference?: String, // an id for your personal use in your system
* webhookUrl?: String, // a url that will recieve a wehookStateUpdate post request
* })
*
*/
await Bosta.requestDelivery({
apiKey: process.env.BOSTA_API_KEY, // this is the default
type: DELIVERY_TYPES.CASH_COLLECTION.code,
address: "7 Almaza square, Heliopolis, Cairo",
amount: 40,
city: CITIES.CAIRO.code,
name: "Amr Draz",
phone: "+200201020202",
})
await Bosta.collect({...}) // same as requestDelivery but sets type to CASH_COLLECTION,
await Bosta.deliver({...}) // same as requestDelivery but sets type to PACAKGE_DELIVERY,
See tests for the rest of the available functions.
This package has partial coverage of the bosta API requesting cash on delivery and cash collection.
The package is maintianed by DREIDEV and is not an offical bosta.co package
Licence MIT
FAQs
A package for managing integration with bost.co a courier with cash collection provider
The npm package bosta.co receives a total of 4 weekly downloads. As such, bosta.co popularity was classified as not popular.
We found that bosta.co demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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 researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.