🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@carforyou/whitelabel-widget

Package Overview
Dependencies
Maintainers
2
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@carforyou/whitelabel-widget

CAR FOR YOU whitelabel widget

latest
Source
npmnpm
Version
1.4.80
Version published
Maintainers
2
Created
Source

CAR FOR YOU Whitelabel widget

semantic-release

Usage

This package provides:

  • bundled version of whitelabel preact app for production and preprod environments
  • a generator for the code snippet that needs to be included

If you want to display the snippet on your page you can:

import { whitelabelSnippet } from "@carforyou/whitelabel-widget"

This function takes following parameters:

  • association
  • dealerId
  • language
  • widgetUrl and generates a snippet that needs to be put on widget consumer's page

The widget itself is deployed to a S3 bucket and served from there.

Note: If both dealer and association are passed, and the dealer is part of the association, it's preselected and already filtered by that dealer (if not, the result is empty.

Development

Between assets, translations, legacyIdMapping (needed to support old whitelabel integration) there's quite a bunch of generated code that's needed for the preact app to run. Make sure to:

npm run build:generated

to ensure that all required files are built.

From then on you can:

npm run dev

to start a dev server.

You can pass dealerId, association (either one or both) and locale properties via .env parameters.

Release a new version

New versions are released on the ci using semantic-release as soon as you merge into master. Please make sure your merge commit message adheres to the corresponding conventions.

Deployments to s3

There following S3 buckets are available:

carforyou-dev-whitelabel-widget:

carforyou-preprod-whitelabel-widget:

carforyou-prod-whitelabel-widget:

On merge to master bundled javascript is written to prod and preprod buckets. Dev bucket is written to from every PR, with a file containing branch name. This allows testing branches.

FAQs

Package last updated on 14 Nov 2023

Did you know?

Socket

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.

Install

Related posts