[go: up one dir, main page]

Skip to content

Commit

Permalink
feat: Expose spinnaker/kayenta to the plugin framework to allow us to…
Browse files Browse the repository at this point in the history
… create kayenta plugins in Deck (#10072)
  • Loading branch information
ovidiupopa07 committed Dec 7, 2023
1 parent 3064f85 commit dbf0574
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/plugins/sharedLibraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import * as reactDOM from 'react-dom';
import * as rxjs from 'rxjs';

import * as spinnakerCore from '../index';

export const sharedLibraries = {
// This is the global (window) variable that the shared libs will be exposed on
globalVariablePrefix: 'spinnaker.plugins.sharedLibraries',
Expand All @@ -30,14 +29,19 @@ export const sharedLibraries = {
if (destinationObject) {
// Temporarily expose @spinnaker/core.
// This should be removed at some point and replaced with a much smaller spinnaker/ui module which doesn't yet exist
exposeSharedLibrary('ajv', require('ajv'));
exposeSharedLibrary('@spinnaker/core', spinnakerCore);
exposeSharedLibrary('@spinnaker/kayenta', require('@spinnaker/kayenta'));
exposeSharedLibrary('@uirouter/core', uiRouterCore);
exposeSharedLibrary('@uirouter/react', uiRouterReact);
exposeSharedLibrary('@uirouter/rx', uiRouterRx);
exposeSharedLibrary('lodash', lodash);
exposeSharedLibrary('prop-types', propTypes);
exposeSharedLibrary('react', react);
exposeSharedLibrary('react-dom', reactDOM);
exposeSharedLibrary('react-redux', require('react-redux'));
exposeSharedLibrary('redux-actions', require('redux-actions'));
exposeSharedLibrary('reselect', require('reselect'));
exposeSharedLibrary('rxjs', rxjs);
exposeSharedLibrary('rxjs/Observable', { Observable: rxjs.Observable });
}
Expand Down
5 changes: 5 additions & 0 deletions packages/scripts/config/rollup.config.base.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ module.exports = {
function spinnakerSharedLibraries() {
// Updates here should also be added in core/src/plugins/sharedLibraries.ts
const libraries = [
'ajv',
'@spinnaker/core',
'@spinnaker/kayenta',
'@uirouter/core',
'@uirouter/react',
'@uirouter/rx',
'lodash',
'prop-types',
'react',
'react-dom',
'react-redux',
'redux-actions',
'reselect',
'rxjs',
'rxjs/Observable',
];
Expand Down

0 comments on commit dbf0574

Please sign in to comment.