@consciousclouds/frontend-sdk-core
v0.2.0
Published
Conscious Clouds frontend SDK core (platform-agnostic)
Downloads
97
Readme
@cc/frontend-sdk-core
Platform-agnostic frontend SDK core for Conscious Clouds applications.
Provides HTTP client, authentication, REST, WebSocket, and GraphQL utilities with zero
ENO-platform dependencies. Consumed by ENO's adapter layer (@eno/frontend-sdk-adapter)
and usable directly in any CC-platform frontend.
Installation
npm install @cc/frontend-sdk-core
# or
bun add @cc/frontend-sdk-coreRequirements: Node ≥18.0.0 or Bun ≥1.0.0
Usage
// Root import — HTTP client, token store, correlation
import { FetchHttpClient, TokenStore } from '@cc/frontend-sdk-core';
// REST module
import { RestClient } from '@cc/frontend-sdk-core/rest';
// WebSocket module
import { WsClient } from '@cc/frontend-sdk-core/ws';
// GraphQL module
import { GraphqlClient } from '@cc/frontend-sdk-core/graphql';
// Auth module
import { AuthClient } from '@cc/frontend-sdk-core/auth';Subpath Exports
| Import path | Entry point | Purpose |
|---|---|---|
| @cc/frontend-sdk-core | dist/index.js | HTTP client, token store, correlation utilities |
| @cc/frontend-sdk-core/rest | dist/rest/index.js | REST API client helpers |
| @cc/frontend-sdk-core/ws | dist/ws/index.js | WebSocket client |
| @cc/frontend-sdk-core/graphql | dist/graphql/index.js | GraphQL client |
| @cc/frontend-sdk-core/auth | dist/auth/index.js | Auth token management |
Design Constraints
- Zero ENO-platform dependencies (
@eno/*imports are forbidden by CI gate) - Platform-agnostic: usable outside the ENO monorepo
- Tree-shakeable: plain tsc output, no bundler-specific format
- ESM-only:
"type": "module", no CommonJS output
License
Apache-2.0
