New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

flyfetch

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flyfetch

Unofficial Fly.io Typescript Client

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

flyfetch

Unofficial Fly.io Typescript Client

Installation

npm install flyfetch

Usage (Bun)

import {AppsApi, MachinesApi, VolumesApi, Configuration} from "flyfetch";
import {$} from "bun";

// get fly token	
let token_bytes = await $`flyctl auth token`
Bun.env.FLY_API_TOKEN = new TextDecoder("utf-8").decode(token_bytes.stdout)

// create a configuration
let config = new Configuration({
	headers : {
		Authorization : `Bearer ${Bun.env.FLY_API_TOKEN}`
	}
});

// root objects
let apps = new AppsApi(config);
let machines = new MachinesApi(config);
let volumes = new VolumesApi(config);

// usage - get apps for an org
console.log(await apps.appsList({
	orgSlug: "personal"
}))

Development

To generate a new flyfetch client:

  • Install openapi-generator-cli with bash .sh/install-openapi-generator-cli.sh
  • Update machines-openapi.json with the spec from [here],(https://docs.machines.dev/#description/introduction)
  • Update package.json with your data
  • To generate, run:
    bash .sh/generate.sh
    
  • To test, run:
    bash .sh/test.sh
    
  • To publish, run:
    bash .sh/publish.sh
    

Keywords

typescript

FAQs

Package last updated on 11 Mar 2024

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