New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@openshift-console/dynamic-plugin-sdk

Package Overview
Dependencies
Maintainers
5
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openshift-console/dynamic-plugin-sdk - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

upgrade-PatternFly.md

9

docs/api.md

@@ -566,3 +566,3 @@ # OpenShift Console API

// Important: the kebab menu cell should include the id and className prop values below
<TableData id='' className='pf-c-table__action' activeColumnIDs={activeColumnIDs}>
<TableData id='' className='pf-v5-c-table__action' activeColumnIDs={activeColumnIDs}>
<MockKebabMenu obj={obj} />

@@ -844,3 +844,3 @@ </TableData>

data,
rowFilters,
[...rowFilters, ...searchFilters],
staticFilters,

@@ -851,5 +851,5 @@ );

<>
<ListPageHeader .../>
<ListPageHeader />
<ListPagBody>
<ListPageFilter data={staticData} onFilterChange={onFilterChange} />
<ListPageFilter data={staticData} onFilterChange={onFilterChange} rowFilters={rowFilters} rowSearchFilters={searchFilters} />
<List data={filteredData} />

@@ -883,2 +883,3 @@ </ListPageBody>

| `nameFilter` | (optional) a unique name key for name filter. This may be useful if there are multiple `ListPageFilter` components rendered at once. |
| `rowSearchFilters` | (optional) An array of RowSearchFilters elements that define search text filters added on top of Name and Label filters |

@@ -885,0 +886,0 @@

@@ -89,3 +89,3 @@ import * as React from 'react';

* // Important: the kebab menu cell should include the id and className prop values below
* <TableData id='' className='pf-c-table__action' activeColumnIDs={activeColumnIDs}>
* <TableData id='' className='pf-v5-c-table__action' activeColumnIDs={activeColumnIDs}>
* <MockKebabMenu obj={obj} />

@@ -229,2 +229,3 @@ * </TableData>

* @param {string} [nameFilter] - (optional) a unique name key for name filter. This may be useful if there are multiple `ListPageFilter` components rendered at once.
* @param {RowSearchFilter[]} [rowSearchFilters] - (optional) An array of RowSearchFilters elements that define search text filters added on top of Name and Label filters
* @example

@@ -235,3 +236,3 @@ * ```tsx

* data,
* rowFilters,
* [...rowFilters, ...searchFilters],
* staticFilters,

@@ -242,5 +243,5 @@ * );

* <>
* <ListPageHeader .../>
* <ListPageHeader />
* <ListPagBody>
* <ListPageFilter data={staticData} onFilterChange={onFilterChange} />
* <ListPageFilter data={staticData} onFilterChange={onFilterChange} rowFilters={rowFilters} rowSearchFilters={searchFilters} />
* <List data={filteredData} />

@@ -247,0 +248,0 @@ * </ListPageBody>

@@ -88,3 +88,3 @@ export * from '../app/components';

* // Important: the kebab menu cell should include the id and className prop values below
* <TableData id='' className='pf-c-table__action' activeColumnIDs={activeColumnIDs}>
* <TableData id='' className='pf-v5-c-table__action' activeColumnIDs={activeColumnIDs}>
* <MockKebabMenu obj={obj} />

@@ -235,2 +235,3 @@ * </TableData>

* @param {string} [nameFilter] - (optional) a unique name key for name filter. This may be useful if there are multiple `ListPageFilter` components rendered at once.
* @param {RowSearchFilter[]} [rowSearchFilters] - (optional) An array of RowSearchFilters elements that define search text filters added on top of Name and Label filters
* @example

@@ -241,3 +242,3 @@ * ```tsx

* data,
* rowFilters,
* [...rowFilters, ...searchFilters],
* staticFilters,

@@ -248,5 +249,5 @@ * );

* <>
* <ListPageHeader .../>
* <ListPageHeader />
* <ListPagBody>
* <ListPageFilter data={staticData} onFilterChange={onFilterChange} />
* <ListPageFilter data={staticData} onFilterChange={onFilterChange} rowFilters={rowFilters} rowSearchFilters={searchFilters} />
* <List data={filteredData} />

@@ -253,0 +254,0 @@ * </ListPageBody>

import * as React from 'react';
import { Icon } from '@patternfly/react-core';
import { CheckCircleIcon } from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
import { InfoCircleIcon } from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
import { CheckCircleIcon, ExclamationCircleIcon, ExclamationTriangleIcon, InfoCircleIcon, } from '@patternfly/react-icons';
import * as classNames from 'classnames';

@@ -8,0 +5,0 @@ import './icons.scss';

import * as React from 'react';
import { BanIcon } from '@patternfly/react-icons/dist/esm/icons/ban-icon';
import { ClipboardListIcon } from '@patternfly/react-icons/dist/esm/icons/clipboard-list-icon';
import { HourglassHalfIcon } from '@patternfly/react-icons/dist/esm/icons/hourglass-half-icon';
import { HourglassStartIcon } from '@patternfly/react-icons/dist/esm/icons/hourglass-start-icon';
import { NotStartedIcon } from '@patternfly/react-icons/dist/esm/icons/not-started-icon';
import { SyncAltIcon } from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon';
import { UnknownIcon } from '@patternfly/react-icons/dist/esm/icons/unknown-icon';
import { BanIcon, ClipboardListIcon, HourglassHalfIcon, HourglassStartIcon, NotStartedIcon, SyncAltIcon, UnknownIcon, } from '@patternfly/react-icons';
import { DASH } from '../../constants';

@@ -10,0 +4,0 @@ import { YellowExclamationTriangleIcon } from './icons';

import * as React from 'react';
import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon';
import { InProgressIcon } from '@patternfly/react-icons';
import GenericStatus from './GenericStatus';

@@ -4,0 +4,0 @@ import { RedExclamationCircleIcon, GreenCheckCircleIcon, BlueInfoCircleIcon } from './icons';

import { ActionType as Action } from 'typesafe-actions';
import { UserKind } from '../../redux-types';
import { UserInfo } from '../../../extensions';
export declare enum ActionType {

@@ -9,6 +9,6 @@ SetUser = "setUser",

}
export declare const setUser: (user: UserKind) => {
export declare const setUser: (userInfo: UserInfo) => {
type: ActionType.SetUser;
payload: {
user: UserKind;
userInfo: UserInfo;
};

@@ -28,6 +28,6 @@ };

declare const coreActions: {
setUser: (user: UserKind) => {
setUser: (userInfo: UserInfo) => {
type: ActionType.SetUser;
payload: {
user: UserKind;
userInfo: UserInfo;
};

@@ -34,0 +34,0 @@ };

@@ -9,3 +9,3 @@ import { action } from 'typesafe-actions';

})(ActionType || (ActionType = {}));
export const setUser = (user) => action(ActionType.SetUser, { user });
export const setUser = (userInfo) => action(ActionType.SetUser, { userInfo });
export const beginImpersonate = (kind, name, subprotocols) => action(ActionType.BeginImpersonate, { kind, name, subprotocols });

@@ -12,0 +12,0 @@ export const endImpersonate = () => action(ActionType.EndImpersonate);

@@ -11,3 +11,3 @@ import { ActionType } from '../actions/core';

*/
export const coreReducer = (state = { user: { identities: [] } }, action) => {
export const coreReducer = (state = { user: {} }, action) => {
switch (action.type) {

@@ -30,3 +30,3 @@ case ActionType.BeginImpersonate:

case ActionType.SetUser:
return Object.assign(Object.assign({}, state), { user: action.payload.user });
return Object.assign(Object.assign({}, state), { user: action.payload.userInfo });
default:

@@ -33,0 +33,0 @@ return state;

@@ -1,4 +0,5 @@

import { ImpersonateKind, SDKStoreState, UserKind } from '../../redux-types';
import { UserInfo } from '../../../extensions';
import { ImpersonateKind, SDKStoreState } from '../../redux-types';
declare type GetImpersonate = (state: SDKStoreState) => ImpersonateKind;
declare type GetUser = (state: SDKStoreState) => UserKind;
declare type GetUser = (state: SDKStoreState) => UserInfo;
/**

@@ -5,0 +6,0 @@ * It provides impersonation details from the redux store.

import { Map as ImmutableMap } from 'immutable';
import { K8sResourceCommon } from '../extensions/console-types';
import { UserInfo } from '../extensions/console-types';
export declare type K8sState = ImmutableMap<string, any>;
export declare type UserKind = {
fullName?: string;
identities: string[];
} & K8sResourceCommon;
export declare type ImpersonateKind = {

@@ -14,3 +10,3 @@ kind: string;

export declare type CoreState = {
user?: UserKind;
user?: UserInfo;
impersonate?: ImpersonateKind;

@@ -17,0 +13,0 @@ };

@@ -322,2 +322,6 @@ import * as React from 'react';

export declare type RowFilter<R = any> = RowMatchFilter<R> | RowReducerFilter<R>;
export declare type RowSearchFilter<R = any> = Omit<RowFilterBase<R>, 'items' | 'defaultSelected'> & {
placeholder?: string;
};
export declare type AnyRowFilter<R = any> = RowFilter<R> | RowSearchFilter<R>;
export declare type ColumnLayout = {

@@ -339,3 +343,3 @@ id: string;

loaded: boolean;
rowFilters?: RowFilter[];
rowFilters?: RowFilter<D>[];
labelFilter?: string;

@@ -352,4 +356,5 @@ labelPath?: string;

nameFilter?: string;
rowSearchFilters?: RowSearchFilter<D>[];
};
export declare type UseListPageFilter = <D, R>(data: D[], rowFilters?: RowFilter<R>[], staticFilters?: {
export declare type UseListPageFilter = <D, R>(data: D[], rowFilters?: AnyRowFilter<R>[], staticFilters?: {
[key: string]: FilterValue;

@@ -495,2 +500,16 @@ }) => [D[], D[], OnFilterChange];

};
export declare type SelfSubjectReviewKind = {
apiVersion: string;
kind: string;
metadata?: ObjectMetadata;
status?: {
userInfo?: UserInfo;
};
};
export declare type UserInfo = {
uid?: string;
username?: string;
groups?: string[];
extra?: object;
};
export declare type CodeEditorProps = {

@@ -497,0 +516,0 @@ value?: string;

{
"name": "@openshift-console/dynamic-plugin-sdk",
"version": "1.0.0",
"version": "1.1.0",
"main": "lib/lib-core.js",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -50,4 +50,6 @@ # OpenShift Console Dynamic Plugins

| ----------------- | ----------------------------------------------- | -------------------- |
| 4.15.x | `@openshift-console/dynamic-plugin-sdk` | Latest |
| 4.16.x | `@openshift-console/dynamic-plugin-sdk` | Latest |
| | `@openshift-console/dynamic-plugin-sdk-webpack` | Latest |
| 4.15.x | `@openshift-console/dynamic-plugin-sdk` | 1.0.0 |
| | `@openshift-console/dynamic-plugin-sdk-webpack` | 1.0.0 |
| 4.14.x | `@openshift-console/dynamic-plugin-sdk` | 0.0.21 |

@@ -59,13 +61,22 @@ | | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.11 |

| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.9 |
| 4.11.x | `@openshift-console/dynamic-plugin-sdk` | 0.0.12 |
| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.7 |
| 4.10.x **[Tech]** | `@openshift-console/dynamic-plugin-sdk` | 0.0.3 |
| | `@openshift-console/dynamic-plugin-sdk-webpack` | 0.0.6 |
| 4.9.x **[Dev]** | `@openshift-console/dynamic-plugin-sdk` | 0.0.0-alpha18 |
Notes:
Note: this table includes Console versions which currently receive technical support, as per
[Red Hat OpenShift Container Platform Life Cycle Policy](https://access.redhat.com/support/policy/updates/openshift).
- **[Tech]** - Release 4.10 was Tech Preview for the SDK packages
- **[Dev]** - Release 4.9 was Dev Preview for the SDK packages
## OpenShift Console Versions vs PatternFly Versions
Each Console version supports specific version(s) of [PatternFly](https://www.patternfly.org/) in terms
of CSS styling. This table will help align compatible versions of PatternFly to versions of the OpenShift
Console.
| Console Version | PatternFly Versions | Notes |
| ----------------- | ------------------- | ------------------------------------- |
| 4.16.x | 5.x + 4.x | New dynamic plugins should use PF 5.x |
| 4.15.x | 5.x + 4.x | New dynamic plugins should use PF 5.x |
| 4.14.x | 4.x | |
| 4.13.x | 4.x | |
| 4.12.x | 4.x | |
Refer to [PatternFly Upgrade Notes](./upgrade-PatternFly.md) containing links to PatternFly documentation.
## Shared modules

@@ -94,2 +105,7 @@

Any shared modules provided by Console without plugin provided fallback are listed as `dependencies`
in the `package.json` manifest of `@openshift-console/dynamic-plugin-sdk` package.
### PatternFly dynamic modules
Newer versions of `@openshift-console/dynamic-plugin-sdk-webpack` package (1.0.0 and higher) include

@@ -258,2 +274,17 @@ support for automatic detection and sharing of individual PatternFly 5.x dynamic modules.

Plugins may also include other assets, such as JSON localization files that follow the general pattern
`locales/<lang>/plugin__<plugin-name>.json` or static images referenced from the plugin code.
## Serving plugin assets
Dynamic plugins are deployed as workloads on the cluster. Each plugin deployment should include a web
server that hosts the [generated assets](#generated-assets) of the given plugin.
Console Bridge server adds `X-Content-Type-Options: nosniff` HTTP response header to all plugin asset
requests for added security. Web browsers that comply with this security header will block `<script>`
initiated requests when the MIME type of requested asset is not valid.
**Important!** Make sure to provide valid JavaScript MIME type via the `Content-Type` response header
for all assets served by your plugin web server.
## Plugin development

@@ -260,0 +291,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc