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

@keg-hub/appetite

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keg-hub/appetite

appetize.io api wrapper

Source
npmnpm
Version
0.0.2
Version published
Maintainers
3
Created
Source

Overview

A node-js wrapper around the appetize api

Example

const { upsert } = require('@keg-hub/appetite')

// searches for an app build whose "note" is a json string with a "branch"
// field mapped to a value of "my-branch". If that build is found, it updates it 
// with the new build located at the url. Otherwise, it uploads a new app build.
const response = await upsert({
  noteFields: {
    branch: 'my-branch',
  },
  url: 'some.url.to.simulator.build.com'
  platform: 'ios',
  token: '123456',
  disabled: true
})

Usage

Install

yarn add @keg-hub/appetite

Upload

const { upload } = require('@keg-hub/appetite')

// set either url or filePath, not both
const response = await upload({
  url: <url to your simulator build>
  filePath: <system file path to your simulator build>,
  platform: <ios or android>,
  token: <your appetize developer token>
  ....rest: <any other fields to include in the post form>
})

Update

const { update } = require('@keg-hub/appetite')

// set either url or filePath, not both
const response = await update({
  publicKey: <public key of app build to update>,
  url: <url to your simulator build>
  filePath: <system file path to your simulator build>,
  platform: <ios or android>,
  token: <your appetize developer token>
  ....rest: <any other fields to include in the post form>
})

Upsert

const { upsert } = require('@keg-hub/appetite')

// set either url or filePath, not both
const response = await upsert({
  note: 'note field of an existing app build; if found, this will update that app build',
  noteFields: 'note fields of an existing app build; if matched, this will update that app build. Assumes the note is in json format.',
  url: <url to your simulator build>
  filePath: <system file path to your simulator build>,
  platform: <ios or android>,
  token: <your appetize developer token>
  ....rest: <any other fields to include in the post form>
})

Find

const { find } = require('@keg-hub/appetite')

// set either url or filePath, not both
const response = await find({
  note: 'note field of an existing app build to search by',
  noteFields: 'note fields of an existing app build to search by',
  platform: <ios or android>,
  token: <your appetize developer token>
})

Get

const { get } = require('@keg-hub/appetite')

// set either url or filePath, not both
const response = await get({
  publicKey: <public key of app build to get>,
  token: <your appetize developer token>
})

Remove

const { remove } = require('@keg-hub/appetite')

// set either url or filePath, not both
const response = await remove({
  publicKey: <public key of app build to delete>,
  token: <your appetize developer token>
})

Testing

  • Unit: yarn test
  • Functional: yarn test:e2e
    • this test will require you to set some ENVS
      • it's easiest to create a .env file in the repo's root directory
      • see the example.env file for the expected variables to put there
    • this will test creating, finding, updating, and deleting a single app using your Appetize account, live

FAQs

Package last updated on 23 May 2021

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