@equinor/fusion-framework-cli 10.0.0-widget-acdcb9b2 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +642 -39
- package/README.md +31 -9
- package/dist/bin/build-application.js +23 -3
- package/dist/bin/build-application.js.map +1 -1
- package/dist/bin/bundle-application.js +9 -12
- package/dist/bin/bundle-application.js.map +1 -1
- package/dist/bin/create-dev-serve.js +89 -123
- package/dist/bin/create-dev-serve.js.map +1 -1
- package/dist/bin/create-export-config.js +5 -6
- package/dist/bin/create-export-config.js.map +1 -1
- package/dist/bin/create-export-manifest.js +44 -27
- package/dist/bin/create-export-manifest.js.map +1 -1
- package/dist/bin/dev-portal/AppLoader.js +26 -4
- package/dist/bin/dev-portal/AppLoader.js.map +1 -1
- package/dist/bin/dev-portal/ContextSelector/ContextSelector.js +41 -0
- package/dist/bin/dev-portal/ContextSelector/ContextSelector.js.map +1 -0
- package/dist/bin/dev-portal/ContextSelector/index.js +2 -0
- package/dist/bin/dev-portal/ContextSelector/index.js.map +1 -0
- package/dist/bin/dev-portal/ContextSelector/useContextResolver.js +171 -0
- package/dist/bin/dev-portal/ContextSelector/useContextResolver.js.map +1 -0
- package/dist/bin/dev-portal/Header.js +3 -2
- package/dist/bin/dev-portal/Header.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/index.js +7 -2
- package/dist/bin/dev-portal/PersonSideSheet/index.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js +4 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js.map +1 -1
- package/dist/bin/dev-portal/Router.js +17 -1
- package/dist/bin/dev-portal/Router.js.map +1 -1
- package/dist/bin/dev-portal/config.js +7 -4
- package/dist/bin/dev-portal/config.js.map +1 -1
- package/dist/bin/dev-portal/main.js +1 -2
- package/dist/bin/dev-portal/main.js.map +1 -1
- package/dist/bin/dev-portal/useAppContextNavigation.js +68 -0
- package/dist/bin/dev-portal/useAppContextNavigation.js.map +1 -0
- package/dist/bin/main.app.js +92 -14
- package/dist/bin/main.app.js.map +1 -1
- package/dist/bin/main.js +5 -5
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/public/assets/index-D0eBBcR8.js +5235 -0
- package/dist/bin/public/index.html +1 -5
- package/dist/bin/publish-application.js +104 -0
- package/dist/bin/publish-application.js.map +1 -0
- package/dist/bin/tag-application.js +82 -0
- package/dist/bin/tag-application.js.map +1 -0
- package/dist/bin/upload-application.js +72 -0
- package/dist/bin/upload-application.js.map +1 -0
- package/dist/bin/upload-export-config.js +87 -0
- package/dist/bin/upload-export-config.js.map +1 -0
- package/dist/bin/utils/{execute-commant.js → execute-command.js} +5 -2
- package/dist/bin/utils/execute-command.js.map +1 -0
- package/dist/bin/utils/format.js +1 -1
- package/dist/bin/utils/format.js.map +1 -1
- package/dist/bin/utils/getEndpointUrl.js +49 -0
- package/dist/bin/utils/getEndpointUrl.js.map +1 -0
- package/dist/bin/utils/index.js +14 -0
- package/dist/bin/utils/index.js.map +1 -0
- package/dist/bin/utils/isAppRegistered.js +35 -0
- package/dist/bin/utils/isAppRegistered.js.map +1 -0
- package/dist/bin/utils/load-app-config.js +3 -2
- package/dist/bin/utils/load-app-config.js.map +1 -1
- package/dist/bin/utils/load-manifest.js +9 -4
- package/dist/bin/utils/load-manifest.js.map +1 -1
- package/dist/bin/utils/load-vite-config.js.map +1 -1
- package/dist/bin/utils/proxy-request-logger.js +34 -0
- package/dist/bin/utils/proxy-request-logger.js.map +1 -0
- package/dist/bin/utils/publishAppConfig.js +36 -0
- package/dist/bin/utils/publishAppConfig.js.map +1 -0
- package/dist/bin/utils/requireToken.js +10 -0
- package/dist/bin/utils/requireToken.js.map +1 -0
- package/dist/bin/utils/spinner.js +10 -0
- package/dist/bin/utils/spinner.js.map +1 -1
- package/dist/bin/utils/tagAppBundle.js +35 -0
- package/dist/bin/utils/tagAppBundle.js.map +1 -0
- package/dist/bin/utils/uploadAppBundle.js +54 -0
- package/dist/bin/utils/uploadAppBundle.js.map +1 -0
- package/dist/lib/app-config.js +5 -17
- package/dist/lib/app-config.js.map +1 -1
- package/dist/lib/app-manifest.js +97 -15
- package/dist/lib/app-manifest.js.map +1 -1
- package/dist/lib/app-package.js +52 -5
- package/dist/lib/app-package.js.map +1 -1
- package/dist/lib/index.js +2 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/plugins/app-assets/app-asset-plugin.js +102 -0
- package/dist/lib/plugins/app-assets/app-asset-plugin.js.map +1 -0
- package/dist/lib/plugins/app-assets/emit-asset.js +41 -0
- package/dist/lib/plugins/app-assets/emit-asset.js.map +1 -0
- package/dist/lib/plugins/app-assets/extension-filter-pattern.js +20 -0
- package/dist/lib/plugins/app-assets/extension-filter-pattern.js.map +1 -0
- package/dist/lib/plugins/app-assets/index.js +4 -0
- package/dist/lib/plugins/app-assets/index.js.map +1 -0
- package/dist/lib/plugins/app-assets/read-asset-content.js +34 -0
- package/dist/lib/plugins/app-assets/read-asset-content.js.map +1 -0
- package/dist/lib/plugins/app-assets/resolve-asset-id.js +63 -0
- package/dist/lib/plugins/app-assets/resolve-asset-id.js.map +1 -0
- package/dist/lib/plugins/app-assets/static.js +15 -0
- package/dist/lib/plugins/app-assets/static.js.map +1 -0
- package/dist/lib/plugins/app-proxy/app-proxy-plugin.js +127 -0
- package/dist/lib/plugins/app-proxy/app-proxy-plugin.js.map +1 -0
- package/dist/lib/plugins/app-proxy/index.js +2 -0
- package/dist/lib/plugins/app-proxy/index.js.map +1 -0
- package/dist/lib/plugins/external-public/external-public-plugin.js +103 -0
- package/dist/lib/plugins/external-public/external-public-plugin.js.map +1 -0
- package/dist/lib/plugins/external-public/index.js +2 -0
- package/dist/lib/plugins/external-public/index.js.map +1 -0
- package/dist/lib/utils/assert.js +2 -1
- package/dist/lib/utils/assert.js.map +1 -1
- package/dist/lib/utils/config.js +5 -0
- package/dist/lib/utils/config.js.map +1 -1
- package/dist/lib/utils/file-exists.js.map +1 -1
- package/dist/lib/utils/ts-transpile.js.map +1 -1
- package/dist/lib/vite-config.js +7 -8
- package/dist/lib/vite-config.js.map +1 -1
- package/dist/lib/vite-logger.js +2 -0
- package/dist/lib/vite-logger.js.map +1 -1
- package/dist/schemas.js +14 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types/bin/build-application.d.ts +3 -3
- package/dist/types/bin/bundle-application.d.ts +0 -1
- package/dist/types/bin/create-dev-serve.d.ts +1 -4
- package/dist/types/bin/create-export-config.d.ts +9 -3
- package/dist/types/bin/create-export-manifest.d.ts +7 -11
- package/dist/types/bin/dev-portal/AppLoader.d.ts +7 -0
- package/dist/types/bin/dev-portal/ContextSelector/ContextSelector.d.ts +8 -0
- package/dist/types/bin/dev-portal/ContextSelector/index.d.ts +1 -0
- package/dist/types/bin/dev-portal/ContextSelector/useContextResolver.d.ts +15 -0
- package/dist/types/bin/dev-portal/FusionLogo.d.ts +0 -1
- package/dist/types/bin/dev-portal/PersonSideSheet/index.d.ts +4 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.d.ts +4 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/Styled.d.ts +4 -1088
- package/dist/types/bin/dev-portal/useAppContextNavigation.d.ts +5 -0
- package/dist/types/bin/publish-application.d.ts +6 -0
- package/dist/types/bin/tag-application.d.ts +12 -0
- package/dist/types/bin/upload-application.d.ts +6 -0
- package/dist/types/bin/upload-export-config.d.ts +10 -0
- package/dist/types/bin/utils/execute-command.d.ts +8 -0
- package/dist/types/bin/utils/format.d.ts +0 -1
- package/dist/types/bin/utils/getEndpointUrl.d.ts +10 -0
- package/dist/types/bin/utils/index.d.ts +14 -0
- package/dist/types/bin/utils/isAppRegistered.d.ts +5 -0
- package/dist/types/bin/utils/load-app-config.d.ts +3 -2
- package/dist/types/bin/utils/load-manifest.d.ts +3 -2
- package/dist/types/bin/utils/proxy-request-logger.d.ts +15 -0
- package/dist/types/bin/utils/publishAppConfig.d.ts +9 -0
- package/dist/types/bin/utils/requireToken.d.ts +4 -0
- package/dist/types/bin/utils/spinner.d.ts +1 -0
- package/dist/types/bin/utils/tagAppBundle.d.ts +7 -0
- package/dist/types/bin/utils/uploadAppBundle.d.ts +7 -0
- package/dist/types/lib/app-config.d.ts +14 -14
- package/dist/types/lib/app-manifest.d.ts +30 -14
- package/dist/types/lib/app-package.d.ts +35 -4
- package/dist/types/lib/index.d.ts +2 -5
- package/dist/types/lib/plugins/app-assets/app-asset-plugin.d.ts +36 -0
- package/dist/types/lib/plugins/app-assets/emit-asset.d.ts +18 -0
- package/dist/types/lib/plugins/app-assets/extension-filter-pattern.d.ts +14 -0
- package/dist/types/lib/plugins/app-assets/index.d.ts +3 -0
- package/dist/types/lib/plugins/app-assets/read-asset-content.d.ts +14 -0
- package/dist/types/lib/plugins/app-assets/resolve-asset-id.d.ts +16 -0
- package/dist/types/lib/plugins/app-assets/static.d.ts +5 -0
- package/dist/types/lib/plugins/app-proxy/app-proxy-plugin.d.ts +71 -0
- package/dist/types/lib/plugins/app-proxy/index.d.ts +1 -0
- package/dist/types/lib/plugins/external-public/external-public-plugin.d.ts +30 -0
- package/dist/types/lib/plugins/external-public/index.d.ts +1 -0
- package/dist/types/lib/utils/assert.d.ts +2 -1
- package/dist/types/lib/utils/config.d.ts +9 -6
- package/dist/types/lib/utils/expect.d.ts +1 -1
- package/dist/types/lib/vite-config.d.ts +1 -1
- package/dist/types/schemas.d.ts +30 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +2 -1
- package/dist/version.js.map +1 -1
- package/package.json +52 -42
- package/dist/bin/bundle-widget.js +0 -61
- package/dist/bin/bundle-widget.js.map +0 -1
- package/dist/bin/create-export-manifest-widget.js +0 -68
- package/dist/bin/create-export-manifest-widget.js.map +0 -1
- package/dist/bin/dev-portal/ContextSelector.js +0 -107
- package/dist/bin/dev-portal/ContextSelector.js.map +0 -1
- package/dist/bin/dev-portal/usePersonResolver.js +0 -40
- package/dist/bin/dev-portal/usePersonResolver.js.map +0 -1
- package/dist/bin/dev-proxy.js +0 -90
- package/dist/bin/dev-proxy.js.map +0 -1
- package/dist/bin/main.widget.js +0 -78
- package/dist/bin/main.widget.js.map +0 -1
- package/dist/bin/public/assets/index-UrNngCGF.js +0 -4083
- package/dist/bin/utils/execute-commant.js.map +0 -1
- package/dist/bin/utils/load-dev-proxy.js +0 -56
- package/dist/bin/utils/load-dev-proxy.js.map +0 -1
- package/dist/bin/utils/load-widget-manifest.js +0 -35
- package/dist/bin/utils/load-widget-manifest.js.map +0 -1
- package/dist/bin/utils/load-widget-package.js +0 -24
- package/dist/bin/utils/load-widget-package.js.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
- package/dist/lib/dev-config.js +0 -9
- package/dist/lib/dev-config.js.map +0 -1
- package/dist/lib/widget-config.js +0 -57
- package/dist/lib/widget-config.js.map +0 -1
- package/dist/lib/widget-manifest.js +0 -73
- package/dist/lib/widget-manifest.js.map +0 -1
- package/dist/lib/widget-package.js +0 -33
- package/dist/lib/widget-package.js.map +0 -1
- package/dist/types/bin/bundle-widget.d.ts +0 -5
- package/dist/types/bin/create-export-manifest-widget.d.ts +0 -20
- package/dist/types/bin/dev-portal/ContextSelector.d.ts +0 -2
- package/dist/types/bin/dev-portal/usePersonResolver.d.ts +0 -1
- package/dist/types/bin/dev-proxy.d.ts +0 -39
- package/dist/types/bin/main.widget.d.ts +0 -3
- package/dist/types/bin/utils/execute-commant.d.ts +0 -8
- package/dist/types/bin/utils/load-dev-proxy.d.ts +0 -6
- package/dist/types/bin/utils/load-widget-manifest.d.ts +0 -8
- package/dist/types/bin/utils/load-widget-package.d.ts +0 -5
- package/dist/types/index.d.ts +0 -4
- package/dist/types/lib/dev-config.d.ts +0 -13
- package/dist/types/lib/widget-config.d.ts +0 -26
- package/dist/types/lib/widget-manifest.d.ts +0 -53
- package/dist/types/lib/widget-package.d.ts +0 -23
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import ReactDOM from 'react-dom/client';
|
|
4
3
|
import { Framework } from '@equinor/fusion-framework-react';
|
|
5
4
|
import { ThemeProvider, theme } from '@equinor/fusion-react-styles';
|
|
@@ -10,5 +9,5 @@ import { PeopleResolverProvider } from '@equinor/fusion-framework-react-componen
|
|
|
10
9
|
const target = document.getElementById('root');
|
|
11
10
|
import fallbackSvg from './resources/fallback-photo.svg';
|
|
12
11
|
const fallbackImage = new Blob([fallbackSvg], { type: 'image/svg+xml' });
|
|
13
|
-
ReactDOM.createRoot(target).render(_jsx(
|
|
12
|
+
ReactDOM.createRoot(target).render(_jsx(ThemeProvider, { theme: theme, children: _jsx(Framework, { configure: configure, fallback: _jsx(EquinorLoader, { text: "Loading framework" }), children: _jsx(PeopleResolverProvider, { options: { fallbackImage }, children: _jsx(Router, {}) }) }) }));
|
|
14
13
|
//# sourceMappingURL=main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/bin/dev-portal/main.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/bin/dev-portal/main.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AAEpG,MAAM,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAgB,CAAC;AAE9D,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAEzD,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;AAEzE,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAC9B,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,YACvB,KAAC,SAAS,IAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAC,aAAa,IAAC,IAAI,EAAC,mBAAmB,GAAG,YACjF,KAAC,sBAAsB,IAAC,OAAO,EAAE,EAAE,aAAa,EAAE,YAC9C,KAAC,MAAM,KAAG,GACW,GACjB,GACA,CACnB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import { useCurrentAppModules } from '@equinor/fusion-framework-react/app';
|
|
3
|
+
import { extractContextIdFromPath } from '@equinor/fusion-framework-module-context/utils';
|
|
4
|
+
import { useObservableSubscription } from '@equinor/fusion-observable/react';
|
|
5
|
+
import { EMPTY } from 'rxjs';
|
|
6
|
+
import { useFrameworkModule } from '@equinor/fusion-framework-react';
|
|
7
|
+
/**
|
|
8
|
+
* when current application changes, this hook will observe the application module instances.
|
|
9
|
+
* If the module has Context and Navigation, this hook will navigate when the context changes
|
|
10
|
+
*/
|
|
11
|
+
export const useAppContextNavigation = () => {
|
|
12
|
+
var _a;
|
|
13
|
+
// use the framework navigation instance
|
|
14
|
+
const navigation = useFrameworkModule('navigation');
|
|
15
|
+
// use the current application modules
|
|
16
|
+
const { modules } = useCurrentAppModules();
|
|
17
|
+
// use the application context and navigation from the current application modules
|
|
18
|
+
const { context, navigation: appNavigation } = modules !== null && modules !== void 0 ? modules : {};
|
|
19
|
+
// subscribe to the context changes
|
|
20
|
+
useObservableSubscription(
|
|
21
|
+
// if the context is not available, use an empty observable
|
|
22
|
+
(_a = context === null || context === void 0 ? void 0 : context.currentContext$) !== null && _a !== void 0 ? _a : EMPTY,
|
|
23
|
+
// when the context changes, navigate to the new context
|
|
24
|
+
useCallback((item) => {
|
|
25
|
+
// sanity check, if the item or navigation is undefined, early return
|
|
26
|
+
if (item === undefined || navigation === undefined) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
// resolve the app base path (application base fragment of url)
|
|
30
|
+
const currentPathname = appNavigation
|
|
31
|
+
? // if the app has its own navigation, use it to resolve the app base path
|
|
32
|
+
appNavigation.path.pathname
|
|
33
|
+
: // if the app does not have its own navigation, use the portal navigation to resolve the app base path
|
|
34
|
+
navigation.path.pathname;
|
|
35
|
+
console.debug('🌍 Portal:', appNavigation
|
|
36
|
+
? 'App has its own navigation, using it to navigate.'
|
|
37
|
+
: 'App does not have its own navigation, using portal navigation.');
|
|
38
|
+
// extract the context id from the current path
|
|
39
|
+
const pathContextId = extractContextIdFromPath(currentPathname);
|
|
40
|
+
// generate path to the selected context
|
|
41
|
+
const pathname = pathContextId
|
|
42
|
+
? item
|
|
43
|
+
? // context id exists in the url, replace it with the new context id
|
|
44
|
+
currentPathname.replace(pathContextId, item.id)
|
|
45
|
+
: // context was cleared, set the path to the root
|
|
46
|
+
'/'
|
|
47
|
+
: // could not find context id in the url, set the path to the new context id
|
|
48
|
+
`/${item === null || item === void 0 ? void 0 : item.id}`;
|
|
49
|
+
console.debug('🌍 Portal:', "context changed, navigating to app's context url:", pathContextId
|
|
50
|
+
? `found context id [${pathContextId}] in url, ${item ? `replacing with [${item.id}]` : 'context was cleared, navigating to root'}`
|
|
51
|
+
: `could not find context id in url, navigating to context id [${item ? item.id : 'root'}]`);
|
|
52
|
+
// if app has its own navigation, use it to navigate
|
|
53
|
+
if (appNavigation) {
|
|
54
|
+
// update the path of the app navigation, preserving search and hash
|
|
55
|
+
appNavigation.replace(Object.assign(Object.assign({}, appNavigation.path), { pathname }));
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
// update the path of the portal navigation, preserving search and hash
|
|
59
|
+
navigation.replace(Object.assign(Object.assign({}, navigation.path), { pathname }));
|
|
60
|
+
}
|
|
61
|
+
}, [
|
|
62
|
+
// framework navigation instance, should not change
|
|
63
|
+
navigation,
|
|
64
|
+
// application navigation instance, may change when the application changes
|
|
65
|
+
appNavigation,
|
|
66
|
+
]));
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=useAppContextNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppContextNavigation.js","sourceRoot":"","sources":["../../../src/bin/dev-portal/useAppContextNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAI1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAIrE;;;G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BAAJ,IAAI,CAAE,EAAE,EAAE,CAAC;QAErB,OAAO,CAAC,KAAK,CACT,YAAY,EACZ,mDAAmD,EACnD,aAAa;YACT,CAAC,CAAC,qBAAqB,aAAa,aAAa,IAAI,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,yCAAyC,EAAE;YACnI,CAAC,CAAC,+DAA+D,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAClG,CAAC;QAEF,oDAAoD;QACpD,IAAI,aAAa,EAAE,CAAC;YAChB,oEAAoE;YACpE,aAAa,CAAC,OAAO,iCAAM,aAAa,CAAC,IAAI,KAAE,QAAQ,IAAG,CAAC;QAC/D,CAAC;aAAM,CAAC;YACJ,uEAAuE;YACvE,UAAU,CAAC,OAAO,iCAAM,UAAU,CAAC,IAAI,KAAE,QAAQ,IAAG,CAAC;QACzD,CAAC;IACL,CAAC,EACD;QACI,mDAAmD;QACnD,UAAU;QACV,2EAA2E;QAC3E,aAAa;KAChB,CACJ,CACJ,CAAC;AACN,CAAC,CAAC"}
|
package/dist/bin/main.app.js
CHANGED
|
@@ -9,10 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { createDevServer } from './create-dev-serve.js';
|
|
11
11
|
import { buildApplication } from './build-application.js';
|
|
12
|
+
import { publishApplication } from './publish-application.js';
|
|
13
|
+
import { uploadApplication } from './upload-application.js';
|
|
14
|
+
import { tagApplication } from './tag-application.js';
|
|
12
15
|
import { formatPath, chalk } from './utils/format.js';
|
|
13
|
-
import
|
|
16
|
+
import { createAppManifest, createBuildManifest } from './create-export-manifest.js';
|
|
14
17
|
import { bundleApplication } from './bundle-application.js';
|
|
15
18
|
import { createExportConfig } from './create-export-config.js';
|
|
19
|
+
import { uploadExportConfig } from './upload-export-config.js';
|
|
16
20
|
import { fileURLToPath } from 'node:url';
|
|
17
21
|
import { resolve, join } from 'node:path';
|
|
18
22
|
export default (program) => {
|
|
@@ -20,7 +24,7 @@ export default (program) => {
|
|
|
20
24
|
.command('app')
|
|
21
25
|
.description('Tooling for developing applications build on Fusion Framework');
|
|
22
26
|
app.command('dev')
|
|
23
|
-
.description('
|
|
27
|
+
.description('Start development server for application')
|
|
24
28
|
.option('-p, --port <number>', 'dev-server port')
|
|
25
29
|
.option('-P, --portal <string>', 'fusion portal host')
|
|
26
30
|
.option('-c, --config <file>', `use specified application config, by default search for ${formatPath('app.config.{ts,js,json}')}`)
|
|
@@ -28,7 +32,6 @@ export default (program) => {
|
|
|
28
32
|
.option(' --vite <file>', `use specified Vite config file, by default search for ${formatPath('app.vite.config.{ts,js,json}')}`)
|
|
29
33
|
.option('-F, --framework <string>', `application framework to build the application on, supported: [${chalk.yellowBright('react')}]`, 'react')
|
|
30
34
|
.option('-d, --dev-portal <string>', 'Location of dev-portal you want to use')
|
|
31
|
-
.option('-n, --outputFileName, <string>', 'output file name of package, default app-bundle', 'app-bundle')
|
|
32
35
|
.action((opt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
36
|
var _a;
|
|
34
37
|
const devPortalPath = opt.devPortal
|
|
@@ -40,17 +43,25 @@ export default (program) => {
|
|
|
40
43
|
app: opt.config,
|
|
41
44
|
manifest: opt.manifest,
|
|
42
45
|
vite: opt.vite,
|
|
43
|
-
widgetPath: opt.widgetPath,
|
|
44
46
|
},
|
|
45
|
-
outputFileName: opt.outputFileName,
|
|
46
47
|
library: opt.framework,
|
|
47
48
|
port: opt.port,
|
|
48
49
|
devPortalPath: devPortalPath,
|
|
49
50
|
});
|
|
50
51
|
}));
|
|
52
|
+
app.command('manifest')
|
|
53
|
+
.description('Generate manifest')
|
|
54
|
+
.option('-o, --output <string>', 'output file')
|
|
55
|
+
.option('-c, --config <string>', 'manifest config file')
|
|
56
|
+
.action((opt) => {
|
|
57
|
+
createAppManifest({
|
|
58
|
+
outputFile: opt.output,
|
|
59
|
+
configFile: opt.config,
|
|
60
|
+
});
|
|
61
|
+
});
|
|
51
62
|
app.command('build')
|
|
63
|
+
.description('Builds application')
|
|
52
64
|
.option('-o, --outDir, <string>', 'output directory of package', 'dist')
|
|
53
|
-
.option('-n, --outputFileName, <string>', 'output file name of package, default app-bundle', 'app-bundle')
|
|
54
65
|
.option('-c, --config <string>', 'Use specified config file, see https://vitejs.dev/guide/cli.html#build')
|
|
55
66
|
.option(' --vite <string>', `use specified Vite config file, by default search for ${formatPath('app.config.vite.{ts,js,json}')}`)
|
|
56
67
|
.option('-F, --framework <string>', `application framework to build the application on, supported: [${chalk.yellowBright('react')}]`, 'react')
|
|
@@ -59,35 +70,102 @@ export default (program) => {
|
|
|
59
70
|
configSourceFiles: {
|
|
60
71
|
vite: opt.vite,
|
|
61
72
|
},
|
|
62
|
-
outputFileName: opt.outputFileName,
|
|
63
73
|
outDir: opt.outDir,
|
|
64
74
|
});
|
|
65
75
|
}));
|
|
66
|
-
app.command('config')
|
|
76
|
+
app.command('build-config')
|
|
77
|
+
.description('Generate config')
|
|
67
78
|
.option('-o, --output <string>', 'output file')
|
|
68
79
|
.option('-c, --config <string>', 'application config file')
|
|
80
|
+
.option('-p, --publish', 'Publish config to app api')
|
|
81
|
+
.option('-v, --version <string>', `Publish app config to version [${chalk.yellowBright('(semver | current | latest | preview)')}]`, 'current')
|
|
82
|
+
.option('-e, --env, <ci | fqa | tr | fprd>', 'Fusion environment to build api urls from. used when publishing config.')
|
|
83
|
+
.option('-s, --service, <string>', 'Define uri to custom app service. You can also define the env variable CUSTOM_APPAPI to be used on all publish commands. the --env parameter is ignored when set')
|
|
69
84
|
.action((opt) => {
|
|
85
|
+
var _a;
|
|
86
|
+
if (opt.publish) {
|
|
87
|
+
opt.output = (_a = opt.output) !== null && _a !== void 0 ? _a : 'app.config.json';
|
|
88
|
+
if (!opt.env) {
|
|
89
|
+
console.error(chalk.redBright('Missing required option --env when publishing, see --help for usage'));
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
createExportConfig({
|
|
93
|
+
outputFile: opt.output,
|
|
94
|
+
configFile: opt.config,
|
|
95
|
+
}).then(() => {
|
|
96
|
+
uploadExportConfig({
|
|
97
|
+
configFile: opt.output,
|
|
98
|
+
version: opt.version,
|
|
99
|
+
env: opt.env,
|
|
100
|
+
service: opt.service,
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
70
105
|
createExportConfig({
|
|
71
106
|
outputFile: opt.output,
|
|
72
107
|
configFile: opt.config,
|
|
73
108
|
});
|
|
74
109
|
});
|
|
75
|
-
app.command('
|
|
110
|
+
app.command('upload-config')
|
|
111
|
+
.description('Upload config file to app api')
|
|
112
|
+
.requiredOption('-c, --config <string>', 'Generated application config json file')
|
|
113
|
+
.option('-v, --version <string>', `Publish app config to version [${chalk.yellowBright('(semver | current | latest | preview)')}]`, 'current')
|
|
114
|
+
.requiredOption('-e, --env, <ci | fqa | tr | fprd>', 'Fusion environment to build api urls from. used when publishing config.')
|
|
115
|
+
.option('-s, --service, <string>', 'Define uri to custom app service. You can also define the env variable CUSTOM_APPAPI to be used on all publish commands. the --env parameter is ignored when set')
|
|
116
|
+
.action((opt) => {
|
|
117
|
+
uploadExportConfig({
|
|
118
|
+
configFile: opt.config,
|
|
119
|
+
version: opt.version,
|
|
120
|
+
env: opt.env,
|
|
121
|
+
service: opt.service,
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
app.command('build-manifest')
|
|
125
|
+
.description('Generate manifest')
|
|
76
126
|
.option('-o, --output <string>', 'output file')
|
|
77
127
|
.option('-c, --config <string>', 'manifest config file')
|
|
78
128
|
.action((opt) => {
|
|
79
|
-
|
|
129
|
+
createBuildManifest({
|
|
80
130
|
outputFile: opt.output,
|
|
81
131
|
configFile: opt.config,
|
|
82
132
|
});
|
|
83
133
|
});
|
|
84
|
-
app.command('pack')
|
|
134
|
+
app.command('build-pack')
|
|
135
|
+
.description('Create distributable app bundle of the application')
|
|
85
136
|
.option('-o, --outDir, <string>', 'output directory of package', 'dist')
|
|
86
137
|
.option('-a, --archive, <string>', 'output filename', 'app-bundle.zip')
|
|
87
|
-
.option('-n, --outputFileName, <string>', 'output file name of package, default app-bundle', 'app-bundle')
|
|
88
138
|
.action((opt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
89
|
-
const { outDir, archive
|
|
90
|
-
bundleApplication({ archive, outDir
|
|
139
|
+
const { outDir, archive } = opt;
|
|
140
|
+
bundleApplication({ archive, outDir });
|
|
141
|
+
}));
|
|
142
|
+
app.command('build-publish')
|
|
143
|
+
.description('Publish application to app api')
|
|
144
|
+
.option('-t, --tag, <string>', `Tagname to publish this build as [${chalk.yellowBright('(latest | preview)')}]`, 'latest')
|
|
145
|
+
.requiredOption('-e, --env, <ci | fqa | tr | fprd>', 'Fusion environment to build api urls from')
|
|
146
|
+
.option('-s, --service, <string>', 'Define uri to custom app service. You can also define the env variable CUSTOM_APPAPI to be used on all publish commands. the --env parameter is ignored when set')
|
|
147
|
+
.action((opt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
148
|
+
const { tag, env, service } = opt;
|
|
149
|
+
publishApplication({ tag, env, service });
|
|
150
|
+
}));
|
|
151
|
+
app.command('build-upload')
|
|
152
|
+
.description('Upload packaged app bundle to app api')
|
|
153
|
+
.option('-b, --bundle, <string>', 'The packaged app bundle file to upload', 'app-bundle.zip')
|
|
154
|
+
.requiredOption('-e, --env, <ci | fqa | tr | fprd>', 'Fusion environment to build api urls from')
|
|
155
|
+
.option('-s, --service, <string>', 'Define uri to custom app service. You can also define the env variable CUSTOM_APPAPI to be used on all publish commands. the --env parameter is ignored when set')
|
|
156
|
+
.action((opt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
157
|
+
const { bundle, env, service } = opt;
|
|
158
|
+
uploadApplication({ bundle, env, service });
|
|
159
|
+
}));
|
|
160
|
+
app.command('build-tag')
|
|
161
|
+
.description('Tag a published version')
|
|
162
|
+
.option('-t, --tag, <string>', `Tag the published version with tagname [${chalk.yellowBright('(latest | preview)')}]`, 'latest')
|
|
163
|
+
.requiredOption('-v, --version, <string>', 'Version number to tag, must be a published version number')
|
|
164
|
+
.requiredOption('-e, --env, <ci | fqa | tr | fprd>', 'Fusion environment to build api urls from')
|
|
165
|
+
.option('-s, --service, <string>', 'Define uri to custom app service. You can also define the env variable CUSTOM_APPAPI to be used on all publish commands. the --env parameter is ignored when set')
|
|
166
|
+
.action((opt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
167
|
+
const { tag, version, env, service } = opt;
|
|
168
|
+
tagApplication({ tag, version, env, service });
|
|
91
169
|
}));
|
|
92
170
|
};
|
|
93
171
|
//# sourceMappingURL=main.app.js.map
|
package/dist/bin/main.app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.app.js","sourceRoot":"","sources":["../../src/bin/main.app.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.app.js","sourceRoot":"","sources":["../../src/bin/main.app.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,O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A2C,CAC9C;SACA,MAAM,CACH,yBAAyB,EACzB,kKAAkK,CACrK;SACA,MAAM,CAAC,CAAO,GAAG,EAAE,EAAE;QAClB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;QAC3C,cAAc,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACnD,CAAC,CAAA,CAAC,CAAC;AACX,CAAC,CAAC"}
|
package/dist/bin/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var _a;
|
|
2
1
|
import { fileURLToPath } from 'node:url';
|
|
3
2
|
import { dirname, resolve } from 'node:path';
|
|
3
|
+
/** find cli package.json */
|
|
4
4
|
import { readPackageUpSync } from 'read-package-up';
|
|
5
5
|
const pkg = readPackageUpSync({ cwd: fileURLToPath(import.meta.url) });
|
|
6
6
|
if (!pkg) {
|
|
@@ -10,11 +10,11 @@ process.env.CLI_BIN = resolve(dirname(pkg.path), String(pkg.packageJson.bin['fus
|
|
|
10
10
|
import { Command } from 'commander';
|
|
11
11
|
const program = new Command();
|
|
12
12
|
program.name(pkg.packageJson.name);
|
|
13
|
-
program.description(
|
|
14
|
-
program.version(pkg.packageJson.version);
|
|
13
|
+
program.description(`fusion-framework-cli@${pkg.packageJson.version}.\nCLI for the Fusion Framework`);
|
|
14
|
+
program.version(pkg.packageJson.version, '-V, --vers', 'CLI version');
|
|
15
|
+
/** add app commands */
|
|
15
16
|
import app from './main.app.js';
|
|
16
17
|
app(program);
|
|
17
|
-
|
|
18
|
-
widget(program);
|
|
18
|
+
/** read action and options and start programs */
|
|
19
19
|
program.parse();
|
|
20
20
|
//# sourceMappingURL=main.js.map
|
package/dist/bin/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/bin/main.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/bin/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,4BAA4B;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,MAAM,GAAG,GAAG,iBAAiB,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACvE,IAAI,CAAC,GAAG,EAAE,CAAC;IACP,MAAM,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC;AACD,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EACjB,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,GAAI,CAAC,sBAAsB,CAAC,CAAC,CACvD,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACnC,OAAO,CAAC,WAAW,CACf,wBAAwB,GAAG,CAAC,WAAW,CAAC,OAAO,iCAAiC,CACnF,CAAC;AACF,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AAEtE,uBAAuB;AACvB,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,GAAG,CAAC,OAAO,CAAC,CAAC;AAEb,iDAAiD;AACjD,OAAO,CAAC,KAAK,EAAE,CAAC"}
|