Skip to content

Commit 356c165

Browse files
updated readme
ISSUE: CLDSRVCLT-1
1 parent 0b04ec2 commit 356c165

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
# cloudserverclient
2-
Client for custom cloudserver routes
2+
3+
This directory 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.
4+
5+
If you need to work on it, install Smithy first : https://smithy.io/2.0/guides/smithy-cli/cli_installation.html
6+
7+
## Architecture
8+
9+
Each .smithy file defines one api, and we have the Cloudserver service defined in models/cloudserver.smithy uses these apis.
10+
11+
The client generation is performed this way :
12+
13+
```bash
14+
# Generate TypeScript from .smithy model files
15+
yarn run generate-smithy-client
16+
17+
# Compile TypeScript to JavaScript and create npm package
18+
yarn run build-smithy-client
19+
```
20+
21+
### Local testing
22+
23+
1. Install test dependencies: `cd localTests && bun install`
24+
2. Start CloudServer: `S3VAULT=mem S3METADATA=mem S3DATA=mem REMOTE_MANAGEMENT_DISABLE=true yarn start`
25+
3. Initialize test data: `bun initBucketForTests.ts`
26+
4. Run tests: `bun testsApis.ts` (or other test files)

0 commit comments

Comments
 (0)