ledat-code

@ledat-code/core (0.1.2)

Published 2026-09-30 02:20:54 +00:00 by ledat

Installation

@ledat-code:registry=https://git.ledat96.synology.me/api/packages/ledat-code/npm/
npm install @ledat-code/core@0.1.2
"@ledat-code/core": "0.1.2"

About this package

@ledat-code/core

Shared GraphQL transport and reusable React/MUI UI primitives for Client and Admin libraries.

Root exports stay framework-neutral GraphQL APIs. UI primitives use @ledat-code/core/ui subpath.

No React Admin, auth policy, RBAC, or domain operations.

Install

npm install @ledat-code/core

Configure GraphQL per request:

import { graphqlRequest } from "@ledat-code/core";

const result = await graphqlRequest({
  apiUrl: import.meta.env.VITE_API_URL,
  query,
  variables,
  accessToken,
});

apiUrl must be absolute HTTP(S) URL without embedded credentials. Token is optional and must be supplied by consumer auth code. Core never reads environment variables or browser storage.

Root GraphQL APIs require no React/MUI/Emotion installation. UI peers are optional at package level because npm cannot require peers per subpath.

To use @ledat-code/core/ui, explicitly install compatible React, React DOM, MUI material/icons, and Emotion react/styled peers listed in package.json. These are required when using UI components.

UI imports:

import { AppButton } from "@ledat-code/core/ui";

Development and release

Build inside Docker from repository root:

docker compose -f microservice/projects/admin-shell/dockers/dev/docker-compose.yml run --rm admin-shell sh -lc 'cd /workspace/libs/core && npm install --legacy-peer-deps --ignore-scripts && npm run type-check && npm run build'

Published package contains dist only. Release all dependent packages after changing core.

Dependencies

Peer Dependencies

ID Version
@emotion/react ^11.14.0
@emotion/styled ^11.14.1
@mui/icons-material ^9.2.0
@mui/material ^9.2.0
react ^19.0.0
react-dom ^19.0.0
Details
npm
2026-09-30 02:20:54 +00:00
9
6.0 KiB
Assets (1)
core-0.1.2.tgz 6.0 KiB
Versions (7) View all
0.2.3 2026-10-11
0.2.2 2026-10-01
0.2.1 2026-10-01
0.2.0 2026-10-01
0.1.2 2026-09-30