Skip to content

Commit 4faaa7d

Browse files
author
fern
committed
SDK Generation
1 parent d1c5a00 commit 4faaa7d

38 files changed

+2318
-3945
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,40 @@ name: ci
33
on: [push]
44

55
jobs:
6-
compile:
7-
runs-on: ubuntu-latest
8-
9-
steps:
10-
- name: Checkout repo
11-
uses: actions/checkout@v4
12-
13-
- name: Set up node
14-
uses: actions/setup-node@v3
15-
16-
- name: Compile
17-
run: yarn && yarn build
18-
19-
test:
20-
runs-on: ubuntu-latest
21-
22-
steps:
23-
- name: Checkout repo
24-
uses: actions/checkout@v4
25-
26-
- name: Set up node
27-
uses: actions/setup-node@v3
28-
29-
- name: Compile
30-
run: yarn && yarn test
31-
32-
publish:
33-
needs: [ compile, test ]
34-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
35-
runs-on: ubuntu-latest
36-
steps:
37-
- name: Checkout repo
38-
uses: actions/checkout@v4
39-
- name: Set up node
40-
uses: actions/setup-node@v3
41-
- name: Install dependencies
42-
run: yarn install
43-
- name: Build
44-
run: yarn build
45-
46-
- name: Publish to npm
47-
run: |
48-
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
49-
if [[ ${GITHUB_REF} == *alpha* ]]; then
50-
npm publish --access public --tag alpha
51-
elif [[ ${GITHUB_REF} == *beta* ]]; then
52-
npm publish --access public --tag beta
53-
else
54-
npm publish --access public
55-
fi
56-
env:
57-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6+
compile:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v4
12+
13+
- name: Set up node
14+
uses: actions/setup-node@v3
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
19+
- name: Install dependencies
20+
run: pnpm install
21+
22+
- name: Compile
23+
run: pnpm build
24+
25+
test:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout repo
30+
uses: actions/checkout@v4
31+
32+
- name: Set up node
33+
uses: actions/setup-node@v3
34+
35+
- name: Install pnpm
36+
uses: pnpm/action-setup@v4
37+
38+
- name: Install dependencies
39+
run: pnpm install
40+
41+
- name: Test
42+
run: pnpm test

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dist
2+
*.tsbuildinfo
3+
_tmp_*
4+
*.tmp
5+
.tmp/
6+
*.log
7+
.DS_Store
8+
Thumbs.db
9+

LICENSE

Lines changed: 0 additions & 189 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,30 @@
22

33
![](https://www.anduril.com/lattice-sdk/)
44

5-
[![npm shield](https://img.shields.io/npm/v/@anduril-industries/lattice-sdk)](https://www.npmjs.com/package/@anduril-industries/lattice-sdk)
5+
[![npm shield](https://img.shields.io/npm/v/)](https://www.npmjs.com/package/)
66

77
The Lattice SDK TypeScript library provides convenient access to the Lattice SDK APIs from TypeScript.
88

99
## Documentation
1010

1111
API reference documentation is available [here](https://developer.anduril.com/).
1212

13-
## Requirements
14-
15-
To use the SDK please ensure you have the following installed:
16-
17-
- [NodeJS](https://nodejs.org/en/download/package-manager)
18-
1913
## Installation
2014

2115
```sh
22-
npm i -s @anduril-industries/lattice-sdk
16+
npm i -s
2317
```
2418

25-
## Support
26-
27-
For support with this library, please reach out to your Anduril representative.
28-
2919
## Reference
3020

31-
A full reference for this library is available [here](https://github.com/anduril/lattice-sdk-javascript/blob/HEAD/./reference.md).
21+
A full reference for this library is available [here](./reference.md).
3222

3323
## Usage
3424

3525
Instantiate and use the client with the following:
3626

3727
```typescript
38-
import { LatticeClient } from "@anduril-industries/lattice-sdk";
28+
import { LatticeClient } from "";
3929

4030
const client = new LatticeClient({ token: "YOUR_TOKEN" });
4131
await client.entities.longPollEntityEvents({
@@ -49,7 +39,7 @@ The SDK exports all request and response types as TypeScript interfaces. Simply
4939
following namespace:
5040

5141
```typescript
52-
import { Lattice } from "@anduril-industries/lattice-sdk";
42+
import { Lattice } from "Lattice";
5343

5444
const request: Lattice.EntityOverride = {
5545
...
@@ -62,7 +52,7 @@ When the API returns a non-success status code (4xx or 5xx response), a subclass
6252
will be thrown.
6353

6454
```typescript
65-
import { LatticeError } from "@anduril-industries/lattice-sdk";
55+
import { LatticeError } from "Lattice";
6656

6757
try {
6858
await client.entities.longPollEntityEvents(...);
@@ -519,7 +509,7 @@ const text = new TextDecoder().decode(bytes);
519509
List endpoints are paginated. The SDK provides an iterator so that you can simply loop over the items:
520510

521511
```typescript
522-
import { LatticeClient } from "@anduril-industries/lattice-sdk";
512+
import { LatticeClient } from "";
523513

524514
const client = new LatticeClient({ token: "YOUR_TOKEN" });
525515
const response = await client.objects.listObjects({
@@ -641,7 +631,7 @@ The SDK provides a way for you to customize the underlying HTTP client / Fetch f
641631
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
642632

643633
```typescript
644-
import { LatticeClient } from "@anduril-industries/lattice-sdk";
634+
import { LatticeClient } from "Lattice";
645635

646636
const client = new LatticeClient({
647637
...

jest.config.mjs

Lines changed: 0 additions & 42 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"name": "@anduril-industries/lattice-sdk",
3-
"version": "2.3.0",
2+
"name": "",
3+
"version": "0.0.1",
44
"private": false,
5-
"repository": "github:anduril/lattice-sdk-javascript",
6-
"license": "See LICENSE",
5+
"repository": "git+fern-api/lattice-sdk-javascript.git",
76
"type": "commonjs",
87
"main": "./dist/cjs/index.js",
98
"module": "./dist/esm/index.mjs",
@@ -31,23 +30,18 @@
3130
],
3231
"scripts": {
3332
"format": "prettier . --write --ignore-unknown",
34-
"build": "yarn build:cjs && yarn build:esm",
33+
"build": "pnpm build:cjs && pnpm build:esm",
3534
"build:cjs": "tsc --project ./tsconfig.cjs.json",
3635
"build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm",
37-
"test": "jest --config jest.config.mjs",
38-
"test:unit": "jest --selectProjects unit",
39-
"test:browser": "jest --selectProjects browser",
40-
"test:wire": "jest --selectProjects wire"
36+
"test": "vitest",
37+
"test:unit": "vitest --project unit",
38+
"test:wire": "vitest --project wire"
4139
},
4240
"devDependencies": {
4341
"webpack": "^5.97.1",
4442
"ts-loader": "^9.5.1",
45-
"jest": "^29.7.0",
46-
"@jest/globals": "^29.7.0",
47-
"@types/jest": "^29.5.14",
48-
"ts-jest": "^29.3.4",
49-
"jest-environment-jsdom": "^29.7.0",
50-
"msw": "^2.8.4",
43+
"vitest": "^3.2.4",
44+
"msw": "2.11.2",
5145
"@types/node": "^18.19.70",
5246
"prettier": "^3.4.2",
5347
"typescript": "~5.7.2"
@@ -58,7 +52,7 @@
5852
"path": false,
5953
"stream": false
6054
},
61-
"packageManager": "[email protected]",
55+
"packageManager": "[email protected]",
6256
"engines": {
6357
"node": ">=18.0.0"
6458
},

0 commit comments

Comments
 (0)