Skip to content

cloudserverclient 1.0.0

Install from the command line:
Learn more about npm packages
$ npm install @scality/cloudserverclient@1.0.0
Install via package.json:
"@scality/cloudserverclient": "1.0.0"

About this version

cloudserverclient

This repository contains the Smithy-based TypeScript/JavaScript client for Cloudserver's custom internal APIs. The client is generated from the .smithy model files that we defined in the /models folder.

If you need to work on it, install Smithy first : https://smithy.io/2.0/guides/smithy-cli/cli_installation.html

Architecture

Each .smithy file in /models defines one api, and we have the Cloudserver service defined in service/cloudserver.smithy using these apis. The client generation is performed this way :

# Generate TypeScript from .smithy model files, and compile TypeScript to JavaScript
yarn build

Local testing

  1. Install dependencies & build the smithy client: yarn build

    If you want to try a release build in another project, you can also push your branch after adding this push condition in release.yml:

    # Uncomment to test your work as a release before it's merged
    push:
      branches:
        - improvement/CLDSRVCLT-X
  2. Start CloudServer: S3VAULT=mem S3METADATA=mem S3DATA=mem REMOTE_MANAGEMENT_DISABLE=true yarn start Some tests require different cloudserver setup : For example : tests/testIndexesApis.test.ts : S3METADATA=mongodb You may change the credentials and endpoint in tests.testSetup.ts to target your Artesca lab. Others (Raft apis) need Metadata to run : In cloudserver, you can start metadata-standalone from .github/docker/docker-compose.sse.yaml : docker compose -f docker-compose.sse.yaml up metadata-standalone. In that case, Cloudserver should be run with S3METADATA=scality

  3. Run :

  • All tests: yarn test
  • From a specific file yarn test testLifecycleApis
  • A specific test yarn test testLifecycleApis -t "should test ListLifecycleCurrents"

Details


Assets

  • cloudserverclient-1.0.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all