console-common npm package
Console Common Components and Utilities
Local development
Building
yarn build
- uses rollup
to build the library, see rollup.config.js
yarn push
- uses yalc
to push the library to the local registry
Consuming
yalc link @aserto/console-common
in the client application
import { Directory } from '@aserto/console-common'
Requirements
You will need to pass the configuration:
<InternalConfigProvider config={config}>{children}</InternalConfigProvider>
You will need to pass the identity:
<GenericIdentityProvider
identity={{
getAccessToken: getAccessToken || (() => Promise.resolve('')),
logout: logout || (() => {}),
}}
>
{children}
</GenericIdentityProvider>
You can pass an optional profile:
<InternalProfileProvider profile={{ tenantId: tenant?.id }}>
Testing
This lib uses jest
for testing, see jest.config.js
yarn test