@equinor/fusion-framework-cli 14.1.0 → 14.2.0
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 +43 -0
- package/bin/build/bin.mjs +1 -1
- package/bin/build/cli.mjs +3 -3
- package/dist/esm/version.js +1 -1
- package/dist/types/bin/index.d.ts +1 -0
- package/dist/types/bin/portal-serve.d.ts +48 -0
- package/dist/types/cli/commands/portal/serve.d.ts +33 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -5
package/dist/esm/version.js
CHANGED
|
@@ -19,6 +19,7 @@ export { loadAppManifest } from './app-manifest.js';
|
|
|
19
19
|
export { uploadApplication } from './app-upload.js';
|
|
20
20
|
export { tagApplication } from './app-tag.js';
|
|
21
21
|
export { startPortalDevServer } from './portal-dev.js';
|
|
22
|
+
export { servePortal, type ServePortalOptions } from './portal-serve.js';
|
|
22
23
|
export { buildPortal } from './portal-build.js';
|
|
23
24
|
export { bundlePortal } from './portal-pack.js';
|
|
24
25
|
export { loadPortalManifest } from './portal-manifest.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ConsoleLogger } from './utils/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Options for serving a built portal.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface ServePortalOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Path to the portal manifest file.
|
|
9
|
+
*/
|
|
10
|
+
manifest?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Path to the portal config file.
|
|
13
|
+
*/
|
|
14
|
+
config?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Directory to serve (optional, will detect from build config if not provided).
|
|
17
|
+
*/
|
|
18
|
+
dir?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Port for the preview server (optional, defaults to 4173).
|
|
21
|
+
*/
|
|
22
|
+
port?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Host for the preview server (optional, defaults to 'localhost').
|
|
25
|
+
*/
|
|
26
|
+
host?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Logger instance for outputting progress and debug information (optional).
|
|
29
|
+
*/
|
|
30
|
+
log?: ConsoleLogger | null;
|
|
31
|
+
/**
|
|
32
|
+
* Enable debug mode for verbose logging.
|
|
33
|
+
*/
|
|
34
|
+
debug?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Serves a built portal using the dev server in preview mode.
|
|
38
|
+
*
|
|
39
|
+
* This function loads the portal manifest and Vite configuration to determine
|
|
40
|
+
* the build output directory, then starts a dev server to serve the built
|
|
41
|
+
* portal files in a production-like environment.
|
|
42
|
+
*
|
|
43
|
+
* @param options - Options for serving the portal including port, host, and logger.
|
|
44
|
+
* @returns A promise that resolves with the dev server instance.
|
|
45
|
+
* @throws Will throw if the build directory doesn't exist or if serving fails.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export declare const servePortal: (options?: ServePortalOptions) => Promise<import("vite").ViteDevServer>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command: `serve`
|
|
3
|
+
*
|
|
4
|
+
* Serves a built portal template using the dev server in preview mode.
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Serves the built portal through the dev server.
|
|
8
|
+
* - Automatically detects the build directory from Vite configuration.
|
|
9
|
+
* - Supports custom port, host, directory, manifest, and config options.
|
|
10
|
+
* - Provides a debug mode for verbose logging.
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* $ ffc portal serve
|
|
14
|
+
* $ ffc portal serve --port 5000
|
|
15
|
+
* $ ffc portal serve --dir ./dist --host 0.0.0.0
|
|
16
|
+
*
|
|
17
|
+
* Options:
|
|
18
|
+
* --port <port> Port for the preview server (default: 4173)
|
|
19
|
+
* --host <host> Host for the preview server (default: localhost)
|
|
20
|
+
* --dir <directory> Directory to serve (default: detected from build config)
|
|
21
|
+
* --manifest <path> Path to the portal manifest file
|
|
22
|
+
* --config <path> Path to the portal config file
|
|
23
|
+
* -d, --debug Enable debug mode for verbose logging
|
|
24
|
+
*
|
|
25
|
+
* Example:
|
|
26
|
+
* $ ffc portal serve
|
|
27
|
+
* $ ffc portal serve --port 5000 --host 0.0.0.0
|
|
28
|
+
* $ ffc portal serve --dir ./dist
|
|
29
|
+
*
|
|
30
|
+
* @see servePortal for implementation details
|
|
31
|
+
*/
|
|
32
|
+
export declare const command: import("commander").Command;
|
|
33
|
+
export default command;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "14.
|
|
1
|
+
export declare const version = "14.2.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
"vite": "^8.0.0",
|
|
112
112
|
"vite-tsconfig-paths": "^6.0.4",
|
|
113
113
|
"zod": "^4.3.6",
|
|
114
|
-
"@equinor/fusion-framework-dev-portal": "5.1.
|
|
114
|
+
"@equinor/fusion-framework-dev-portal": "5.1.2",
|
|
115
|
+
"@equinor/fusion-framework-dev-server": "2.0.1",
|
|
116
|
+
"@equinor/fusion-framework-module-msal-node": "4.0.1",
|
|
115
117
|
"@equinor/fusion-framework-vite-plugin-raw-imports": "2.0.0",
|
|
116
|
-
"@equinor/fusion-framework-dev-server": "2.0.0",
|
|
117
|
-
"@equinor/fusion-framework-module-msal-node": "4.0.0",
|
|
118
118
|
"@equinor/fusion-imports": "2.0.0"
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"@equinor/fusion-framework-module-app": "8.0.0",
|
|
143
143
|
"@equinor/fusion-framework-module-http": "8.0.0",
|
|
144
144
|
"@equinor/fusion-framework-module-service-discovery": "10.0.0",
|
|
145
|
-
"@equinor/fusion-framework-react-router": "1.
|
|
145
|
+
"@equinor/fusion-framework-react-router": "1.2.1"
|
|
146
146
|
},
|
|
147
147
|
"peerDependenciesMeta": {
|
|
148
148
|
"typescript": {
|