51 lines
1.6 KiB
Markdown
51 lines
1.6 KiB
Markdown
# tasks — drive-transport-https-v1
|
|
|
|
## 1. Package scaffolding
|
|
|
|
- [x] 1.1 `package.json` with subpath exports for root, types,
|
|
schemas, errors.
|
|
- [x] 1.2 `vite.config.ts` with the standard externals list.
|
|
- [x] 1.3 `tsconfig.lib.json` extending the base config.
|
|
- [x] 1.4 `vitest.config.ts` via `createTestConfig()`.
|
|
|
|
## 2. Error registry
|
|
|
|
- [x] 2.1 Define the nine `HTTPS_TRANSPORT_CODES` and `HttpsTransportError`.
|
|
- [x] 2.2 Co-located `error-codes.md` (≥200-word doc).
|
|
|
|
## 3. Public types
|
|
|
|
- [x] 3.1 `HttpsTransportOptions`, `FetchFn`, `RecvResponse`,
|
|
`SendBody`, `SendResponse`, `Unsubscribe` in `types/transport.types.ts`.
|
|
- [x] 3.2 Co-located `transport.types.md`.
|
|
|
|
## 4. Boundary schemas
|
|
|
|
- [x] 4.1 Zod schemas: `HttpsTransportOptionsSchema`,
|
|
`SendBodySchema`, `SendResponseSchema`, `RecvResponseSchema`.
|
|
- [x] 4.2 Co-located `transport.schema.md`.
|
|
|
|
## 5. Transport runtime
|
|
|
|
- [x] 5.1 `HttpsTransport` class implementing `TransportLike`.
|
|
- [x] 5.2 Long-poll receive loop with backoff + jitter.
|
|
- [x] 5.3 `lastAuthError` diagnostic getter for the auth-fail
|
|
termination path.
|
|
- [x] 5.4 `defaults.ts` constants module.
|
|
- [x] 5.5 Co-located `https-transport.md` and `defaults.md`.
|
|
|
|
## 6. Tests
|
|
|
|
- [x] 6.1 `error-codes.spec-conformance.test.ts`.
|
|
- [x] 6.2 `schemas.test.ts`.
|
|
- [x] 6.3 `lifecycle.test.ts`.
|
|
- [x] 6.4 `send.test.ts`.
|
|
- [x] 6.5 `recv.test.ts`.
|
|
- [x] 6.6 `default-fetch.test.ts` (isolated globalThis.fetch tests).
|
|
|
|
## 7. Gates
|
|
|
|
- [x] 7.1 `bunx turbo lint typecheck test --filter=...` green.
|
|
- [x] 7.2 `bunx turbo test:coverage --filter=...` at 100/100/100/100.
|
|
- [x] 7.3 `bun run docs:check` reports 5/5 files.
|