@nosana/kit 2.0.68 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -106
- package/dist/NosanaClient.d.ts +4 -4
- package/dist/NosanaClient.js.map +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1578,121 +1578,20 @@ client.logger.debug('Debug details');
|
|
|
1578
1578
|
|
|
1579
1579
|
## Testing
|
|
1580
1580
|
|
|
1581
|
-
The SDK includes comprehensive test coverage.
|
|
1581
|
+
The SDK includes comprehensive test coverage. From the **repository root**:
|
|
1582
1582
|
|
|
1583
1583
|
```bash
|
|
1584
|
-
# Run tests (all workspace packages; only @nosana/kit has tests for now)
|
|
1585
|
-
pnpm test
|
|
1586
|
-
|
|
1587
|
-
# Kit-only: watch mode or coverage
|
|
1588
|
-
pnpm --filter @nosana/kit run test:watch
|
|
1589
|
-
pnpm --filter @nosana/kit run test:coverage
|
|
1590
|
-
```
|
|
1591
|
-
|
|
1592
|
-
## Development
|
|
1593
|
-
|
|
1594
|
-
This project uses **pnpm workspaces** with a monorepo structure:
|
|
1595
|
-
|
|
1596
|
-
- **Root** – Workspace orchestration (build, dev, test, generate-clients)
|
|
1597
|
-
- **`packages/kit`** (`@nosana/kit`) – Main SDK
|
|
1598
|
-
- **`packages/generated_clients/*`** – Generated Solana program clients (jobs, stake, merkle_distributor)
|
|
1599
|
-
- **`docs`** (`@nosana/docs`) – Documentation site (VitePress)
|
|
1600
|
-
|
|
1601
|
-
All commands below are run from the **repository root** unless stated otherwise.
|
|
1602
|
-
|
|
1603
|
-
### Setup
|
|
1604
|
-
|
|
1605
|
-
```bash
|
|
1606
|
-
# Install dependencies for all workspace packages
|
|
1607
|
-
pnpm install
|
|
1608
|
-
|
|
1609
|
-
# Build all packages (generated clients first, then kit, then docs)
|
|
1610
|
-
pnpm build
|
|
1611
|
-
|
|
1612
|
-
# Run tests
|
|
1613
1584
|
pnpm test
|
|
1614
1585
|
```
|
|
1615
1586
|
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
If you're only working on one package, you can build that package and its workspace dependencies instead of the whole repo:
|
|
1619
|
-
|
|
1620
|
-
```bash
|
|
1621
|
-
# From root: build kit and its deps (generated clients), skip docs
|
|
1622
|
-
pnpm --filter @nosana/kit run build:with-deps
|
|
1623
|
-
|
|
1624
|
-
# Or from the package directory
|
|
1625
|
-
cd packages/kit && pnpm run build:with-deps
|
|
1626
|
-
```
|
|
1627
|
-
|
|
1628
|
-
Same for docs (builds kit first, then docs):
|
|
1629
|
-
|
|
1630
|
-
```bash
|
|
1631
|
-
pnpm --filter @nosana/docs run build:with-deps
|
|
1632
|
-
```
|
|
1633
|
-
|
|
1634
|
-
Use `pnpm build` when you want everything built (e.g. before opening a PR or publishing).
|
|
1635
|
-
|
|
1636
|
-
### Regenerating program clients
|
|
1637
|
-
|
|
1638
|
-
After changing IDLs in `/idl`, regenerate the client packages:
|
|
1587
|
+
Kit-only (watch or coverage):
|
|
1639
1588
|
|
|
1640
1589
|
```bash
|
|
1641
|
-
pnpm run
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
Generated code is written into each package’s **`src/`** directory so `package.json` and `tsconfig.json` at the package root are never overwritten. Then run `pnpm build` so the rest of the workspace picks up the changes.
|
|
1645
|
-
|
|
1646
|
-
### Development mode
|
|
1647
|
-
|
|
1648
|
-
Start all watch processes and the docs dev server in parallel:
|
|
1649
|
-
|
|
1650
|
-
```bash
|
|
1651
|
-
# From root (run `pnpm build` once first so dist/ exist)
|
|
1652
|
-
pnpm dev
|
|
1653
|
-
```
|
|
1654
|
-
|
|
1655
|
-
This runs `tsc --watch` for the generated client packages and kit, and starts the VitePress dev server for docs.
|
|
1656
|
-
|
|
1657
|
-
To work only on kit (no docs server), run watch for kit and its workspace deps:
|
|
1658
|
-
|
|
1659
|
-
```bash
|
|
1660
|
-
pnpm --filter @nosana/kit run dev:with-deps
|
|
1661
|
-
# or from package dir: cd packages/kit && pnpm run dev:with-deps
|
|
1662
|
-
```
|
|
1663
|
-
|
|
1664
|
-
To work on docs (kit + docs dev server):
|
|
1665
|
-
|
|
1666
|
-
```bash
|
|
1667
|
-
pnpm --filter @nosana/docs run dev:with-deps
|
|
1668
|
-
```
|
|
1669
|
-
|
|
1670
|
-
### Lint and format
|
|
1671
|
-
|
|
1672
|
-
From root, lint and format run in all workspace packages (only `@nosana/kit` has real lint/format for now):
|
|
1673
|
-
|
|
1674
|
-
```bash
|
|
1675
|
-
pnpm lint
|
|
1676
|
-
pnpm format
|
|
1677
|
-
pnpm format:fix
|
|
1590
|
+
pnpm --filter @nosana/kit run test:watch
|
|
1591
|
+
pnpm --filter @nosana/kit run test:coverage
|
|
1678
1592
|
```
|
|
1679
1593
|
|
|
1680
|
-
For
|
|
1681
|
-
|
|
1682
|
-
### Documentation
|
|
1683
|
-
|
|
1684
|
-
Run docs scripts via the filter (no root shorthand; use the same pattern for any package-specific script):
|
|
1685
|
-
|
|
1686
|
-
```bash
|
|
1687
|
-
# Start docs dev server
|
|
1688
|
-
pnpm --filter @nosana/docs dev
|
|
1689
|
-
|
|
1690
|
-
# Build docs
|
|
1691
|
-
pnpm --filter @nosana/docs build
|
|
1692
|
-
|
|
1693
|
-
# Preview built docs
|
|
1694
|
-
pnpm --filter @nosana/docs preview
|
|
1695
|
-
```
|
|
1594
|
+
For monorepo setup, build, and development, see the [root README](../../README.md).
|
|
1696
1595
|
|
|
1697
1596
|
## TypeScript Support
|
|
1698
1597
|
|
package/dist/NosanaClient.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NosanaNetwork } from '@nosana/types';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { NosanaApiClient } from '@nosana/api';
|
|
3
|
+
import { NosanaIpfsClient } from '@nosana/ipfs';
|
|
4
4
|
import { type NosanaAuthorization } from '@nosana/authorization';
|
|
5
5
|
import { Logger } from './logger/Logger.js';
|
|
6
6
|
import { ClientConfig, PartialClientConfig } from './config/index.js';
|
|
@@ -22,8 +22,8 @@ export interface NosanaClient {
|
|
|
22
22
|
readonly merkleDistributor: MerkleDistributorProgram;
|
|
23
23
|
readonly solana: SolanaService;
|
|
24
24
|
readonly nos: TokenService;
|
|
25
|
-
readonly api:
|
|
26
|
-
readonly ipfs:
|
|
25
|
+
readonly api: NosanaApiClient;
|
|
26
|
+
readonly ipfs: NosanaIpfsClient;
|
|
27
27
|
readonly authorization: NosanaAuthorization;
|
|
28
28
|
readonly logger: Logger;
|
|
29
29
|
/**
|
package/dist/NosanaClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NosanaClient.js","sourceRoot":"","sources":["../src/NosanaClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"NosanaClient.js","sourceRoot":"","sources":["../src/NosanaClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAoB,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAA4B,MAAM,uBAAuB,CAAC;AAE5F,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAgB,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAoB,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAqB,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EACL,8BAA8B,GAE/B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAsB,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAqB,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAiB,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,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
|
{
|
|
2
2
|
"name": "@nosana/kit",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Nosana KIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"author": "Nosana",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@nosana/api": "
|
|
34
|
-
"@nosana/authorization": "
|
|
35
|
-
"@nosana/endpoints": "
|
|
36
|
-
"@nosana/ipfs": "
|
|
37
|
-
"@nosana/jobs-program": "2.0
|
|
38
|
-
"@nosana/merkle-distributor-program": "2.0
|
|
39
|
-
"@nosana/stake-program": "2.0
|
|
40
|
-
"@nosana/types": "
|
|
33
|
+
"@nosana/api": "2.1.0",
|
|
34
|
+
"@nosana/authorization": "2.1.0",
|
|
35
|
+
"@nosana/endpoints": "2.1.0",
|
|
36
|
+
"@nosana/ipfs": "2.1.0",
|
|
37
|
+
"@nosana/jobs-program": "2.1.0",
|
|
38
|
+
"@nosana/merkle-distributor-program": "2.1.0",
|
|
39
|
+
"@nosana/stake-program": "2.1.0",
|
|
40
|
+
"@nosana/types": "2.1.0",
|
|
41
41
|
"@solana-program/compute-budget": "0.12.0",
|
|
42
42
|
"@solana-program/system": "0.10.0",
|
|
43
43
|
"@solana-program/token": "0.9.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"package.json",
|
|
70
70
|
"README.md"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "3164e4634b654bdc2ba9f3030ccd8891e30940f7"
|
|
73
73
|
}
|