Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@equinor/fusion-framework

Package Overview
Dependencies
Maintainers
3
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion-framework - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [2.1.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework@2.0.2...@equinor/fusion-framework@2.1.0) (2022-08-19)
### Features
* **framework:** enable event module ([e4734d2](https://github.com/equinor/fusion-framework/commit/e4734d2ab747b327eb074ca330aeac2188860c69))
## 2.0.2 (2022-08-19)

@@ -8,0 +19,0 @@

1

dist/esm/index.js

@@ -8,2 +8,3 @@ import { initializeFusionModules } from './modules';

window.Fusion = fusion;
modules.event.dispatchEvent('onFrameworkLoaded', { detail: fusion });
return fusion;

@@ -10,0 +11,0 @@ };

5

dist/esm/modules.js
import { initializeModules, } from '@equinor/fusion-framework-module';
import event from '@equinor/fusion-framework-module-event';
import http from '@equinor/fusion-framework-module-http';
import auth from '@equinor/fusion-framework-module-msal';
import disco from '@equinor/fusion-framework-module-service-discovery';
export const baseModules = [http, auth, disco];
export const initializeFusionModules = async (configurator, modules) => initializeModules(configurator, [...baseModules, ...modules]);
export const baseModules = [event, http, auth, disco];
export const initializeFusionModules = (configurator, modules) => initializeModules(configurator, baseModules.concat(modules || []));
//# sourceMappingURL=modules.js.map
import { AnyModule } from '@equinor/fusion-framework-module';
import { FrameworkEvent, FrameworkEventInit } from '@equinor/fusion-framework-module-event';
import { FusionConfigurator, FusionModulesInstance } from './modules';

@@ -10,2 +11,7 @@ export type { FusionConfigurator, FusionModules } from './modules';

export declare const initFusion: <TModules extends AnyModule[] = AnyModule[]>(init: FusionConfigurator<TModules>, additionalModules?: TModules | undefined) => Promise<Fusion<TModules>>;
declare module '@equinor/fusion-framework-module-event' {
interface FrameworkEventMap {
onFrameworkLoaded: FrameworkEvent<FrameworkEventInit<Fusion>>;
}
}
declare global {

@@ -12,0 +18,0 @@ interface Window {

import { AnyModule, ModulesInstanceType } from '@equinor/fusion-framework-module';
import type { ModulesConfigurator } from '@equinor/fusion-framework-module';
import { EventModule } from '@equinor/fusion-framework-module-event';
import { HttpModule } from '@equinor/fusion-framework-module-http';
import { MsalModule } from '@equinor/fusion-framework-module-msal';
import { ServiceDiscoveryModule } from '@equinor/fusion-framework-module-service-discovery';
export declare type FusionModules = [HttpModule, MsalModule, ServiceDiscoveryModule];
export declare type FusionModules = [EventModule, HttpModule, MsalModule, ServiceDiscoveryModule];
export declare const baseModules: FusionModules;

@@ -8,0 +9,0 @@ export declare type FusionModulesInstance<TModules extends Array<AnyModule>> = ModulesInstanceType<FusionModules> & ModulesInstanceType<TModules> & {

{
"name": "@equinor/fusion-framework",
"version": "2.0.2",
"version": "2.1.0",
"description": "",

@@ -27,2 +27,3 @@ "main": "dist/esm/index.js",

"@equinor/fusion-framework-module": "^0.4.2",
"@equinor/fusion-framework-module-event": "^0.1.0",
"@equinor/fusion-framework-module-http": "^0.6.2",

@@ -36,3 +37,3 @@ "@equinor/fusion-framework-module-msal": "^0.3.2",

},
"gitHead": "ac0ad3f30905bed1e292c609684db498de0d2435"
"gitHead": "2905265d38a867ef1aa5b9d9f1f888aa68638495"
}
/* eslint-disable @typescript-eslint/no-empty-interface */
import { AnyModule } from '@equinor/fusion-framework-module';
import { FrameworkEvent, FrameworkEventInit } from '@equinor/fusion-framework-module-event';
import { FusionConfigurator, FusionModulesInstance, initializeFusionModules } from './modules';

@@ -32,5 +33,14 @@

window.Fusion = fusion;
modules.event.dispatchEvent('onFrameworkLoaded', { detail: fusion });
return fusion;
};
declare module '@equinor/fusion-framework-module-event' {
interface FrameworkEventMap {
onFrameworkLoaded: FrameworkEvent<FrameworkEventInit<Fusion>>;
}
}
declare global {

@@ -37,0 +47,0 @@ interface Window {

@@ -9,2 +9,3 @@ import {

import event, { EventModule } from '@equinor/fusion-framework-module-event';
import http, { HttpModule } from '@equinor/fusion-framework-module-http';

@@ -14,4 +15,4 @@ import auth, { MsalModule } from '@equinor/fusion-framework-module-msal';

export type FusionModules = [HttpModule, MsalModule, ServiceDiscoveryModule];
export const baseModules: FusionModules = [http, auth, disco];
export type FusionModules = [EventModule, HttpModule, MsalModule, ServiceDiscoveryModule];
export const baseModules: FusionModules = [event, http, auth, disco];

@@ -25,9 +26,10 @@ export type FusionModulesInstance<TModules extends Array<AnyModule>> =

export const initializeFusionModules = async <TModules extends Array<AnyModule> = []>(
export const initializeFusionModules = <TModules extends Array<AnyModule> = []>(
configurator: FusionConfigurator<TModules>,
modules?: TModules
): Promise<FusionModulesInstance<TModules>> =>
// TODO - TS resolve overload, might fix later
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
initializeModules(configurator, [...baseModules, ...modules]);
initializeModules(
configurator,
baseModules.concat(modules || []) as [...FusionModules, ...TModules]
// TODO - fix typing
) as unknown as Promise<FusionModulesInstance<TModules>>;

@@ -14,2 +14,5 @@ {

{
"path": "../module-event"
},
{
"path": "../module-http"

@@ -16,0 +19,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

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