npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ibm-aspera/connect-sdk-js

v5.0.3

Published

Official IBM Aspera Connect SDK for Javascript

Downloads

16,778

Readme

CII Best Practices npm

Official Aspera Connect SDK for JavaScript

Enables web applications to utilize Aspera file-transfer capabilities.

Check out GitHub Pages for documentation.

Installation

Install from npm:

$ npm install --save @ibm-aspera/connect-sdk-js

Install from source:

$ git clone https://github.com/IBM/aspera-connect-sdk-js.git
$ cd aspera-connect-sdk-js
$ npm install

Load from the CDN:

<script src="https://d3gcli72yxqn2z.cloudfront.net/@ibm-aspera/connect-sdk-js/latest/connect-sdk.js"></script>

It's highly recommended if you embed the Connect SDK via CDN that you use a specific version instead of using the latest. The latest Connect SDK is subject to change at any time with breaking changes, which could potentially affect your website.

Usage

Launch and establish a connection to the Connect desktop application:

import { Connect } from '@ibm-aspera/connect-sdk-js';

const connectClient = new Connect();
connectClient.initSession();

Start a download:

try {
  const transferSpec = {
    authentication: 'token',
    paths: [
      {
        source: 'my_awesome_movie.drp'
      }
    ],
    remote_host: 'example.com',
    remote_user: 'foo',
    token: 'ATV7_HtfhDa-JwWfc6RkTwhkDUqjHeLQePiOHjIS254_LJ14_7VTA',
    direction: 'receive'
  };

  const response = await connectClient.startTransferPromise(transferSpec);
  console.log(`Transfer started: ${response}`);
} catch(err) {
  throw new Error(`Could not start transfer: ${err}`);
}

Check out the provided Examples for more code samples.

Migration from 3.x/4.x to 5.0.0

Refer to MIGRATION to see the required changes when updating your code to v5.0.0.

Development

Prerequisites

  • Node.js v12+
    • If you are on macOS, we recommend installing Node.js via a package manager such as nvm.
  • Git

Build

$ git clone https://github.com/IBM/aspera-connect-sdk-js.git
$ cd aspera-connect-sdk-js
$ npm install
$ npm run build

Locally hosting the Connect desktop installers

Rather than having users download Connect from Cloudfront, it is possible to host the installers locally. This is particularly useful if your server is running in an offline environment (i.e. users will not have access to Cloudfront) or if you would simply prefer users download Connect from your server.

To download the connect-deployer Docker image:

$ docker pull icr.io/ibmaspera/connect-deployer:latest

Version tags are also available starting from Connect 4.2.2 (ex: docker pull icr.io/ibmaspera/connect-deployer:4.2.2).

To host the installers on a basic web server:

$ docker run -it --rm -d -p 8080:80 icr.io/ibmaspera/connect-deployer:latest

With the above command, the Connect installers will be available over http://127.0.0.1:8080/aspera/connect. To configure the Connect SDK to serve the Connect installers from this URL you must update sdkLocation to the above URL.

To host the installers over a secure web server:

$ docker run -it --rm -d -p 8443:443  -v /path/to/your/ssl/certs:/etc/ssl/certs icr.io/ibmaspera/connect-deployer:latest

Note: The server certificate and private key must be named cert.pem and key.pem, respectively.

Contributing

We're always looking for contributors to help us fix bugs, build new features, or help us improve the project documentation. If you're interested, definitely check out our Contributing Guide.

Troubleshooting

In the browser, run AW4.Logger.setLevel(2) in the Developer Console to enable trace logging.

For help regarding the Connect desktop application, please visit IBM Support.