Skip to content

Monorepo for object storage abstraction packages.

License

Notifications You must be signed in to change notification settings

iTwin/object-storage

Repository files navigation

Cloud Agnostic Object Storage Libraries

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

About this Repository

This repository contains packages that expose a unified cloud-agnostic object storage interface.

This repository also contains packages that are relevant only for development:

Build Instructions

Local development workflows mostly utilize rush commands which run a specific npm script for each package. For exact script definitions in each package see the corresponding package.json files.

  1. Clone repository (first time) with git clone or pull updates to the repository (subsequent times) with git pull
  2. Install dependencies: rush install
  3. Clean: rush clean
  4. Rebuild source: rush rebuild

Running Tests

  • rush test:unit command runs unit tests for all packages that have unit tests. The tests should pass with no additional setup.
  • rush test:integration:backend and rush test:integration:frontend commands run integration tests for packages that have them. Please see the IntegrationTests.md files for instructions specific to each package.

Usage examples

There are two main ways how to consume the storage packages in applications:

  1. Using the provided classes/interfaces directly and managing their creation manually.
  2. Loading them using the provided dependency injection configuration utilities. This option utilizes inversify framework and allows injecting configured storage classes into other application components.

There are two samples of minimal applications that achieve the same thing (download a file using ClientStorage) and each demonstrate a different method for managing application components:

  1. Without inversify - App.ts, Run.ts (launch using "Client file download with DI sample" VS Code configuration). The application constructs classes directly.
  2. With inversify - App.ts, Run.ts (launch using "Client file download without DI sample" VS Code configuration). The application uses inversify`s Container to manage component lifetime. Note that the advantages of dependency injection become more apparent when working with larger applications. This method is also used in integration test setup.

About

Monorepo for object storage abstraction packages.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published