@k8slens/lens-platform-extension-sdk
TypeScript icon, indicating that this package has built-in type declarations

5.0.7 • Public • Published

Lens Platform Extension Sdk

This is the branch for @k8slens/lens-platform-extension-sdk.

See branch release/lensapp for @lensapp/lens-platform-extension-sdk.

Lens Platform Extension SDK

Use SDK in Lens extension:

import { LensClient } from "@k8slens/lens-platform-extension-sdk";

const lensClient = new LensClient({
    getAccessToken: () => Promise.resolve("<token>"), // the callback to be called before every request, useful if the access token needs to be renew often.
});

The SDK uses axios internally for HTTP(s) requests.

Type Check

You should enable ts support in you editor with type-checking.

Or type-checking from CLI

npm run check:type

Test

The "all-in-one" test script would run linter, type-checking, and unit tests in parallel.

npm run test

You can also run unit tests only

npm run test:unit [-- --watch]

which is just a shortcut for npx jest [--watch]

Documentation

We use tsdoc https://github.com/microsoft/tsdoc for inline doc comments.

License

Copyright (c) 2022 Mirantis, Inc.

Licensed under the MIT license. https://opensource.org/licenses/MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @k8slens/lens-platform-extension-sdk

Weekly Downloads

1,027

Version

5.0.7

License

MIT

Unpacked Size

167 kB

Total Files

100

Last publish

Collaborators

  • mirantis_it
  • jakolehm
  • k8slens-bot