Skip to content

test(exports): add export-surface parity test for all subpaths (#424) - #555

Merged
David-patrick-chuks-02 merged 10 commits into
Lilly-Protocol:mainfrom
Zhiyilang074811:fix/issue-424-export-parity
Sep 6, 2026
Merged

test(exports): add export-surface parity test for all subpaths (#424)#555
David-patrick-chuks-02 merged 10 commits into
Lilly-Protocol:mainfrom
Zhiyilang074811:fix/issue-424-export-parity

Conversation

@Zhiyilang074811

Copy link
Copy Markdown
Contributor

Adds a parity test that verifies all documented subpath exports (./config, ./errors, ./http, ./models) are present in the built dist output, and that the root bundle exposes all major runtime symbols.

…col#487 Lilly-Protocol#485 — client ID validation, non-2xx JSON errors, shared defaults, baseUrl fallback

- agent/wallet/payment clients: reject empty/whitespace IDs via validateNonEmptyString (Closes Lilly-Protocol#443, bounty Lilly-Protocol#489 )
- fetch-http-client: read body once as text then JSON.parse; throw LilyApiError (not ValidationError) on non-2xx JSON parse failures (Closes Lilly-Protocol#445, bounty Lilly-Protocol#488 )
- src/config/defaults.ts: new file with DEFAULT_TIMEOUT_MS, DEFAULT_RETRY_POLICY, DEFAULT_RETRYABLE_STATUS_CODES (bounty Lilly-Protocol#487 )
- resolve-config.ts: import from defaults; support LILY_BASE_URL env fallback alongside LILY_API_URL (Closes Lilly-Protocol#444, bounty Lilly-Protocol#485 )
- config.ts: export shared defaults
- Add tests: client-id-validation, shared-defaults, updated fetch-non-json tests
…-Protocol#446)

- Add validation block in createFetchHttpClient to reject negative,
  NaN, and Infinity timeoutMs values before the request loop starts
- Import LilyConfigError from sdk-error
- Add 4 test cases: negative, NaN, Infinity rejection + valid value pass
- Fixes Lilly-Protocol#446 (Bounty: )

Wallet: 3rb3NNaU5foZFvVk4faVuMmqMvoxfADW3Xw5Wv5vfZr6
- Add a new 'docs' job that builds typedoc API docs on every PR
- Fails CI if docs/api/ has uncommitted changes
- Closes Lilly-Protocol#435 (Bounty: )

Wallet: 3rb3NNaU5foZFvVk4faVuMmqMvoxfADW3Xw5Wv5vfZr6
…R_CODES (Lilly-Protocol#447)

- Add CANCELLED and RESPONSE_VALIDATION_ERROR entries to LILY_ERROR_CODES
- Replace literal string codes in fetch-http-client.ts with constant references
- Add tests verifying constant usage for abort and JSON parse failures
- Updates error-tojson test to assert new constants exist

Closes Lilly-Protocol#447 (Bounty: )

Wallet: 3rb3NNaU5foZFvVk4faVuMmqMvoxfADW3Xw5Wv5vfZr6
…Protocol#442)

- Pass this.httpClient to new LilySdk instance in withConfig
- Adds test verifying custom HttpClient is shared between parent and child

Closes Lilly-Protocol#442 (Bounty: )

Wallet: 3rb3NNaU5foZFvVk4faVuMmqMvoxfADW3Xw5Wv5vfZr6
…lly-Protocol#403)

- Change fetchPage signature to return CursorPage<T> instead of readonly T[]
- Feed nextCursor from response back through buildPaginationQuery
- Stop when hasMore is false or cursor is null instead of relying on item count
- Add tests for cursor advancement and no-duplicate-pages behavior
- Fix unused vi import in shared-defaults.test.ts

Closes Lilly-Protocol#403
…nt (Lilly-Protocol#439)

- Change slice(0,2) to slice(0,7) to respect Stellar's 7-digit precision
- Update tests to verify sub-cent amounts like 0.0000001 are preserved
- Prevents silent precision loss that could zero out real payment values

Closes Lilly-Protocol#439
…rotocol#441)

- Remove dead if (!baseUrl) throw since DEFAULT_API_URL always provides fallback
- Update JSDoc to document actual precedence: options > LILY_API_URL > LILY_BASE_URL > DEFAULT_API_URL
- Add test verifying create() never throws for missing baseUrl
- Add test for LILY_API_URL precedence over LILY_BASE_URL

Closes Lilly-Protocol#441
…-Protocol#424)

- Test verifies ./config, ./errors, ./http, ./models subpaths export expected symbols
- Test verifies root dist/index.cjs exposes all major runtime symbols
- Requires npm run build first (runs against built dist files)

Closes Lilly-Protocol#424
@David-patrick-chuks-02
David-patrick-chuks-02 merged commit daf8e7e into Lilly-Protocol:main Sep 6, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants