New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dextrose

Package Overview
Dependencies
Maintainers
3
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dextrose

[![Build Status](https://www.bitrise.io/app/6dbd09bf795284e8/status.svg?token=cPPMxR4jerIruWOfSt-_6g&branch=master)](https://www.bitrise.io/app/6dbd09bf795284e8)

  • 1.3.2
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-80.23%
Maintainers
3
Weekly downloads
 
Created
Source

Build Status

Dextrose

Purpose

Dextrose cli aims to provide a simple way to get visual snapshots of specified components across all react native platforms.

Concept

Dextrose extends fructose by creating a new client. This client has the ability to request the loaded components of a react native app wrapped with Fructose. Once it has the components it cycles through each component and creates an image dump.

What you do with those images is up to you!

The CLI

There are three CLI commands:

run, upload and generate-html

The Dextrose run command can be run with the following commands:

dextrose run --config path-to-config

    --config, -c -path-to-config

    --timeout, -T
        appium timeout in milliseconds (not applicable to web)

    --snapshotWait, -t
        the amount of time to wait between loading a component and taking the snap
    
    --loglevel, -l
        default is set to info, able to set level to verbose

The Dextrose upload command can be run with the following commands:

dextrose upload snapshotDir --bucket bucketname --key commit_hash

    --bucket, -b
        the name of the s3 bucket

    --key, -k
        the name of the key in the bucket

    --region, -r
        the aws region

The Dextrose generate-html command can be run with the following commands:

dextrose generate-html --upload --bucket bucketname --key commit-hash

    --upload, -u
        using this will attempt to upload the html file to s3

    --bucket, -b
        the name of the s3 bucket

    --key, -k
        the name of the key in the bucket

    --region, -r
        the aws region
        

Example config

Native

    module.exports = {
        snapPath: path.join(__dirname, '../snaps'),    
        automationName: "XCUITest",
        platformName: "iOS",
        deviceName: "iPhone 7",
        platformVersion: '11.0',
        app: path.join(
            __dirname,
            "../ios/build/Build/Products/Debug-iphonesimulator/snapshots.app"
        ),
        ignoredStories: ["IGNORE"]
    }

Web

    module.exports = {
        snapPath: path.join(__dirname, '../snaps'),
        platformName: "web",
        breakpoints:[500, 1000]
    }

Running the example

To run the the example Pull the repo

  • Run yarn in the Dextrose folder
  • Run yarn in the snapshots folder (the snapshots folder is an example of how you would consume dextrose)
  • Run ./run-(ios | android | web).sh

note: please make sure you have an (emulator | simulator), (appium | selenium) and a packager running.

Future ideas

  • Specify an S3 bucket (or some cloud storage) to dump images
  • Presentation of the images
  • Comparison of images
  • Set web breakpoints

FAQs

Package last updated on 18 Jan 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc