
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@superset-ui/connection
Advanced tools
Connection modules for Superset:
SupersetClient requests and authenticationi18n locales and translationThe SupersetClient handles all client-side requests to the Superset backend. It can be configured
for use within the Superset application, or used to issue CORS requests in other applications. At
a high-level it supports:
CSRF token authentication
GET and POST requests (no PUT or DELETE)AbortController APIGET requests using If-None-Match and ETag headers// appSetup.js
import { SupersetClient } from `@superset-ui/connection`;
// or import SupersetClient from `@superset-ui/connection/lib|esm/SupersetClient`;
SupersetClient.configure(...clientConfig);
SupersetClient.init(); // CSRF auth, can also chain `.configure().init();
// anotherFile.js
import { SupersetClient } from `@superset-ui/connection`;
SupersetClient.post(...requestConfig)
.then(({ request, json }) => ...)
.catch((error) => ...);
The following flags can be passed in the client config call
SupersetClient.configure(...clientConfig);
protocol = 'http:'hostheaderscredentials = 'same-origin' (set to include for non-Superset apps)mode = 'same-origin' (set to cors for non-Superset apps)timeoutcsrfToken you can configure the client with a CSRF token at configuration time, else the client
will attempt to fetch this before any other requests are issuedThe following flags can be passed on a per-request call SupersetClient.get/post(...requestConfig);
url or endpointheadersbodytimeoutsignal (for aborting, from const { signal } = (new AbortController()))POST requests
postPayload (key values are added to a new FormData())stringify whether to call JSON.stringify on postPayload valuesPer-request aborting is implemented through the AbortController API:
import { SupersetClient } from '@superset-ui/connection';
import AbortController from 'abortcontroller-polyfill';
const controller = new AbortController();
const { signal } = controller;
SupersetClient.get({ ..., signal }).then(...).catch(...);
if (IWantToCancelForSomeReason) {
signal.abort(); // Promise is rejected, request `catch` is invoked
}
@data-ui/build-config is used to manage the build configuration for this package including babel
builds, jest testing, eslint, and prettier.
FAQs
Superset UI connection
The npm package @superset-ui/connection receives a total of 39 weekly downloads. As such, @superset-ui/connection popularity was classified as not popular.
We found that @superset-ui/connection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.