Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Releases: spheronFdn/sdk

storage:v1.0.16

02 Jun 17:01
2a72f89
Compare
Choose a tag to compare

Added

  • Added CID to the response of the upload.
  • Added method to pin a CID.
  • Added method to get the pin status of CID.

core: v1.0.6

02 Jun 16:58
2a72f89
Compare
Choose a tag to compare

Added

  • Added new methods for pinning a CID, and getting the pin status of the cid.

browser-upload:v1.0.3

02 Jun 17:00
2a72f89
Compare
Choose a tag to compare

Added

  • Added CID to the response of the upload

site:v1.0.0

30 May 11:46
e432b9c
Compare
Choose a tag to compare

Spheron

Site SDK

This package provides support for working with Spheron Web-App organization.

Usage

The package exports SpheronClient class, which includes methods for working with organizations, projects, deployments and their configurations. The constructor of SpheronClient takes in one parameter token. Check the Access Token section for information on how to create a token.

import { SpheronClient } from "@spheron/site";

...

const spheron = new SpheronClient({ token });

await spheron.deployments.deploy({
  gitUrl, // the url of the repository
  projectName, // if the project for the repository does not exists, a new project will be created with this name
  environmentVariables: {
    KEY_1: "value1",
  },
  provider: ProviderEnum.GITHUB, // the provider of the git url
  branch: "main", // the branch name that should be deployed
  protocol: ProtocolEnum.IPFS, // the protocol on which the deployment should be uploaded
  configuration: {
    framework: FrameworkEnum.REACT,
    workspace: "",
    installCommand: "yarn install",
    buildCommand: "yarn build",
    publishDir: "build",
    nodeVersion: NodeVersionEnum.V_16,
  },
});

For more information about the Site methods, check out the DOCS

Access Token

To create the token that is used with the SpheronClient, follow the instructions in the DOCS. When you are creating the tokens, please choose web app type in the dashboard.

Learn More

You can learn more about Spheron and Storage SDK here:

core: v1.0.5

02 Jun 16:59
e432b9c
Compare
Choose a tag to compare

Added

  • Added methods for working with web-app organizations.

cli: v1.0.10

29 May 09:35
eb78a37
Compare
Choose a tag to compare
  • Updated help options on get resources command
  • Updated log when doing upload of files to print update ID instead of deployment ID.

core:v1.0.4

25 May 15:07
ee0ed67
Compare
Choose a tag to compare

Added

  • Added support for working with Spheron Compute organization.

compute:v1.0.1

25 May 15:18
97d4a25
Compare
Choose a tag to compare

Spheron

Compute SDK

This package provides support for working with Spheron Compute organization.

Usage

The package exports SpheronClient class, which includes methods for working with clusters, marketplace apps, cluster instances and their configurations. The constructor of SpheronClient takes in one parameter token. Check the Access Token section for information on how to create a token.

import SpheronClient from "@spheron/compute";
...
const client = new SpheronClient({ token });
await client.instance.create(
    configuration: {
      image: dockerImage,
      tag: dockerImageTag,
      ports: [{ containerPort: containerPort, exposedPort: exposedPort }],
      environmentVariables: [{ key:"key", value: "value"}],
      secretEnvironmentVariables: [{ key:"key", value: "secretValue"}],
      commands: [],
      args: [],
      region: deployRegion,
      machineImageId: computeMachineId,
    },
    healthCheckConfig: {
      path: healthCheckPath,
      port: healthCheckPort,
    },
  }
);

For more information about the Compute methods, check out the DOCS

Access Token

To create the token that is used with the SpheronClient, follow the instructions in the DOCS. When you are creating the tokens, please choose compute type in the dashboard.

Learn More

You can learn more about Spheron and Compute SDK here:

browser-upload:v1.0.2

24 May 12:08
1458b97
Compare
Choose a tag to compare

Added

  • Added support for uploading FileList object.

storage:v1.0.15

19 May 13:19
cb49de0
Compare
Choose a tag to compare

Updated

  • Updated the UsageWithLimits interface.
interface UsageWithLimits {
  used: {
    bandwidth: number; // Bytes
    storageArweave: number; // Bytes
    storageIPFS: number; // Bytes
    domains: number;
    numberOfRequests: number;
    parallelUploads: number;
  };
  limit: {
    bandwidth: number; // Bytes
    storageArweave: number; // Bytes
    storageIPFS: number; // Bytes
    domains: number;
    parallelUploads: number;
  };
}