@equinor/fusion-framework-cli 12.2.0 → 12.3.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 +89 -0
- package/bin/build/bin.mjs +1 -1
- package/bin/build/cli.mjs +5 -5
- package/dist/esm/lib/index.js +1 -1
- package/dist/esm/lib/index.js.map +1 -1
- package/dist/esm/lib/utils/resolve-annotations.js +11 -2
- package/dist/esm/lib/utils/resolve-annotations.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/bin/app-check.d.ts +1 -1
- package/dist/types/bin/app-dev.d.ts +4 -0
- package/dist/types/bin/app-upload.d.ts +1 -1
- package/dist/types/bin/utils/create-dev-server.d.ts +5 -1
- package/dist/types/bin/utils/defaultHeaders.d.ts +13 -0
- package/dist/types/bin/utils/index.d.ts +1 -0
- package/dist/types/cli/commands/app/dev.d.ts +8 -0
- package/dist/types/cli/commands/portal/dev.d.ts +6 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/utils/resolve-annotations.d.ts +3 -1
- package/dist/types/version.d.ts +1 -1
- package/docs/application.md +55 -3
- package/docs/dev-server-config.md +26 -1
- package/docs/dev-server.md +4 -0
- package/package.json +4 -4
package/dist/esm/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { resolvePackage } from './utils/resolve-package.js';
|
|
2
2
|
export { resolveEntryPoint } from './utils/resolve-source-entry-point.js';
|
|
3
|
-
export { loadDevServerConfig } from './load-dev-server-config.js';
|
|
3
|
+
export { loadDevServerConfig, defineDevServerConfig, } from './load-dev-server-config.js';
|
|
4
4
|
// Legacy imports - these will be removed in the next major version
|
|
5
5
|
// @todo - remove these imports, introduced in v11
|
|
6
6
|
export { defineAppConfig, defineAppManifest } from './legacy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAwB,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAwB,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,6BAA6B,CAAC;AAErC,mEAAmE;AACnE,kDAAkD;AAClD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolveGithubAnnotations } from './resolve-github-annotations.js';
|
|
2
2
|
import { resolveDevopsAnnotations } from './resolve-devops-annotations.js';
|
|
3
|
+
import { version } from '../../version.js';
|
|
3
4
|
/**
|
|
4
5
|
* Resolves CI/CD environment-specific annotation variables.
|
|
5
6
|
*
|
|
@@ -11,11 +12,18 @@ import { resolveDevopsAnnotations } from './resolve-devops-annotations.js';
|
|
|
11
12
|
* If no known environment is detected, returns an empty object.
|
|
12
13
|
*/
|
|
13
14
|
export const resolveAnnotations = () => {
|
|
15
|
+
// Required annotations for manifest
|
|
16
|
+
const requiredAnnotations = {
|
|
17
|
+
cliVersion: version,
|
|
18
|
+
source: 'local',
|
|
19
|
+
reason: 'manual',
|
|
20
|
+
};
|
|
14
21
|
// Check if running in GitHub Actions environment
|
|
15
22
|
// If so, delegate to the GitHub-specific annotation resolver
|
|
16
23
|
if (process.env.GITHUB_ACTIONS) {
|
|
17
24
|
const annotation = resolveGithubAnnotations();
|
|
18
25
|
const baseAnnotations = {
|
|
26
|
+
...requiredAnnotations,
|
|
19
27
|
source: 'github',
|
|
20
28
|
reason: annotation.eventName,
|
|
21
29
|
workflow: annotation.workflow,
|
|
@@ -53,6 +61,7 @@ export const resolveAnnotations = () => {
|
|
|
53
61
|
if (process.env.SYSTEM_TEAMPROJECT) {
|
|
54
62
|
const annotations = resolveDevopsAnnotations();
|
|
55
63
|
return {
|
|
64
|
+
...requiredAnnotations,
|
|
56
65
|
source: 'azure_devops',
|
|
57
66
|
reason: annotations.reason,
|
|
58
67
|
repository: annotations.repository,
|
|
@@ -65,7 +74,7 @@ export const resolveAnnotations = () => {
|
|
|
65
74
|
};
|
|
66
75
|
}
|
|
67
76
|
// Fallback: No known CI/CD environment detected
|
|
68
|
-
// Return
|
|
69
|
-
return
|
|
77
|
+
// Return required annotations indicating local build
|
|
78
|
+
return requiredAnnotations;
|
|
70
79
|
};
|
|
71
80
|
//# sourceMappingURL=resolve-annotations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-annotations.js","sourceRoot":"","sources":["../../../../src/lib/utils/resolve-annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-annotations.js","sourceRoot":"","sources":["../../../../src/lib/utils/resolve-annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAuC3C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAuB,EAAE;IACzD,oCAAoC;IACpC,MAAM,mBAAmB,GAAG;QAC1B,UAAU,EAAE,OAAO;QACnB,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,QAAQ;KACjB,CAAC;IAEF,iDAAiD;IACjD,6DAA6D;IAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,wBAAwB,EAAE,CAAC;QAC9C,MAAM,eAAe,GAAG;YACtB,GAAG,mBAAmB;YACtB,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,UAAU,CAAC,SAAS;YAC5B,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,QAAQ,EAAE,UAAU,CAAC,WAAW,EAAE,EAAE;YACpC,UAAU,EAAE,UAAU,CAAC,UAAU,EAAE,IAAI;YACvC,mBAAmB,EAAE,UAAU,CAAC,UAAU,EAAE,QAAQ;YACpD,kBAAkB,EAAE,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI;YACxD,gBAAgB,EAAE,UAAU,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK;YACrD,2BAA2B,EAAE,UAAU,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU;YACrE,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,YAAY,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK;YACtC,iBAAiB,EAAE,UAAU,CAAC,MAAM,EAAE,UAAU;SACpB,CAAC;QAE/B,IAAI,UAAU,CAAC,YAAY,EAAE,CAAC;YAC5B,OAAO;gBACL,GAAG,eAAe;gBAClB,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG;gBACzC,QAAQ,EAAE,UAAU,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG;gBAC3C,OAAO,EAAE,UAAU,CAAC,YAAY,CAAC,QAAQ;aACb,CAAC;QACjC,CAAC;QAED,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;YACvB,OAAO;gBACL,GAAG,eAAe;gBAClB,GAAG,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ;gBAChC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ;aACR,CAAC;QACjC,CAAC;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,+CAA+C;IAC/C,mEAAmE;IACnE,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC;QACnC,MAAM,WAAW,GAAG,wBAAwB,EAAE,CAAC;QAC/C,OAAO;YACL,GAAG,mBAAmB;YACtB,MAAM,EAAE,cAAc;YACtB,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,UAAU,EAAE,WAAW,CAAC,UAAU;YAClC,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,QAAQ,EAAE,WAAW,CAAC,YAAY;SACN,CAAC;IACjC,CAAC;IAED,gDAAgD;IAChD,qDAAqD;IACrD,OAAO,mBAAmB,CAAC;AAC7B,CAAC,CAAC"}
|
package/dist/esm/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FusionEnv, type FusionFrameworkSettings } from './framework.node.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type ConsoleLogger } from './utils/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Options for checking application registration in the app store.
|
|
5
5
|
* @public
|
|
@@ -30,6 +30,10 @@ export interface StartAppDevServerOptions {
|
|
|
30
30
|
* Port for the development server (optional, defaults to 3000).
|
|
31
31
|
*/
|
|
32
32
|
port?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Host for the development server (optional, defaults to 'localhost').
|
|
35
|
+
*/
|
|
36
|
+
host?: string;
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
35
39
|
* Starts the application development server for local development.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import AdmZip from 'adm-zip';
|
|
2
2
|
import type { FusionFramework } from './framework.node.js';
|
|
3
|
-
import type
|
|
3
|
+
import { type ConsoleLogger } from './utils/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Options for uploading an application bundle to the app service.
|
|
6
6
|
*
|
|
@@ -2,6 +2,7 @@ import type { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
|
2
2
|
import type { ApiAppConfig } from '@equinor/fusion-framework-module-app/schemas.js';
|
|
3
3
|
import { type RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
|
|
4
4
|
import { type UserConfig, type DevServerOptions, type FusionTemplateEnv } from '@equinor/fusion-framework-dev-server';
|
|
5
|
+
import type { ConsoleLogger } from './ConsoleLogger.js';
|
|
5
6
|
/**
|
|
6
7
|
* PortalManifest describes the minimal structure required for a portal manifest.
|
|
7
8
|
* Used for dev server portal routing and config.
|
|
@@ -45,5 +46,8 @@ export type CreateDevServerOptions = {
|
|
|
45
46
|
* @returns The complete dev server options object.
|
|
46
47
|
*/
|
|
47
48
|
export declare const createDevServerConfig: (options: CreateDevServerOptions) => DevServerOptions;
|
|
48
|
-
export declare const createDevServer: (env: RuntimeEnv, options: CreateDevServerOptions,
|
|
49
|
+
export declare const createDevServer: (env: RuntimeEnv, options: CreateDevServerOptions, args?: {
|
|
50
|
+
overrides?: UserConfig;
|
|
51
|
+
log?: ConsoleLogger | null;
|
|
52
|
+
}) => Promise<import("vite").ViteDevServer>;
|
|
49
53
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default headers for Fusion Framework CLI requests.
|
|
3
|
+
* @type {Object}
|
|
4
|
+
* @property {string} 'X-Fusion-CLI-Name' - The name of the Fusion Framework CLI.
|
|
5
|
+
* @property {string} 'X-Fusion-CLI-Version' - The version of the Fusion Framework CLI.
|
|
6
|
+
* @property {string} 'User-Agent' - The user agent for the Fusion Framework CLI and its current version.
|
|
7
|
+
*/
|
|
8
|
+
export declare const defaultHeaders: {
|
|
9
|
+
'X-Fusion-CLI-Name': string;
|
|
10
|
+
'X-Fusion-CLI-Version': string;
|
|
11
|
+
'User-Agent': string;
|
|
12
|
+
};
|
|
13
|
+
export default defaultHeaders;
|
|
@@ -2,3 +2,4 @@ export { formatPath, formatByteSize, chalk } from './format.js';
|
|
|
2
2
|
export { Spinner } from './spinner.js';
|
|
3
3
|
export { ConsoleLogger } from './ConsoleLogger.js';
|
|
4
4
|
export { createDevServerConfig, createDevServer, type CreateDevServerOptions, } from './create-dev-server.js';
|
|
5
|
+
export { defaultHeaders } from './defaultHeaders.js';
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* - Launches the development server for your application.
|
|
8
8
|
* - Supports custom manifest/config files, runtime environment, and port selection.
|
|
9
9
|
* - Debug mode available for verbose logging.
|
|
10
|
+
* - Automatic loading of dev-server.config.ts for API mocking and customization.
|
|
10
11
|
*
|
|
11
12
|
* Usage:
|
|
12
13
|
* $ ffc app dev [options]
|
|
@@ -17,13 +18,20 @@
|
|
|
17
18
|
* --config <path> Path to the app config file (app.config[.env]?.[ts,js,json])
|
|
18
19
|
* --env <environment> Runtime environment for the dev server (default: local)
|
|
19
20
|
* --port <port> Port for the development server (default: 3000)
|
|
21
|
+
* --host <host> Host for the development server (default: localhost)
|
|
22
|
+
*
|
|
23
|
+
* Configuration:
|
|
24
|
+
* dev-server.config.ts Optional configuration file for API mocking, service discovery,
|
|
25
|
+
* and development environment customization
|
|
20
26
|
*
|
|
21
27
|
* Example:
|
|
22
28
|
* $ ffc app dev
|
|
23
29
|
* $ ffc app dev --port 4000
|
|
24
30
|
* $ ffc app dev --manifest ./app.manifest.local.ts --config ./app.config.ts
|
|
31
|
+
* $ ffc app dev --host 0.0.0.0
|
|
25
32
|
*
|
|
26
33
|
* @see startAppDevServer for implementation details
|
|
34
|
+
* @see dev-server-config.md for configuration options
|
|
27
35
|
*/
|
|
28
36
|
export declare const command: import("commander").Command;
|
|
29
37
|
export default command;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* - Launches the development server for your portal.
|
|
8
8
|
* - Supports custom runtime environment and port selection.
|
|
9
9
|
* - Debug mode available for verbose logging.
|
|
10
|
+
* - Automatic loading of dev-server.config.ts for API mocking and customization.
|
|
10
11
|
*
|
|
11
12
|
* Usage:
|
|
12
13
|
* $ ffc portal dev [options]
|
|
@@ -16,12 +17,17 @@
|
|
|
16
17
|
* --env <environment> Runtime environment for the dev server (default: local)
|
|
17
18
|
* --port <port> Port for the development server (default: 3000)
|
|
18
19
|
*
|
|
20
|
+
* Configuration:
|
|
21
|
+
* dev-server.config.ts Optional configuration file for API mocking, service discovery,
|
|
22
|
+
* and development environment customization
|
|
23
|
+
*
|
|
19
24
|
* Example:
|
|
20
25
|
* $ ffc portal dev
|
|
21
26
|
* $ ffc portal dev --port 4000
|
|
22
27
|
* $ ffc portal dev --debug
|
|
23
28
|
*
|
|
24
29
|
* @see startPortalDevServer for implementation details
|
|
30
|
+
* @see dev-server-config.md for configuration options
|
|
25
31
|
*/
|
|
26
32
|
export declare const command: import("commander").Command;
|
|
27
33
|
export default command;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { RuntimeEnv } from './types.js';
|
|
2
2
|
export { resolvePackage, type ResolvedPackage } from './utils/resolve-package.js';
|
|
3
3
|
export { resolveEntryPoint } from './utils/resolve-source-entry-point.js';
|
|
4
|
-
export { loadDevServerConfig } from './load-dev-server-config.js';
|
|
4
|
+
export { loadDevServerConfig, defineDevServerConfig, type DevServerConfigExport, type DevServerConfigFn, } from './load-dev-server-config.js';
|
|
5
5
|
export { defineAppConfig, defineAppManifest } from './legacy.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents metadata annotations related to a release process.
|
|
3
3
|
*
|
|
4
|
+
* @property cliVersion - The version of the CLI that triggered the release.
|
|
4
5
|
* @property source - The origin or system that triggered the release.
|
|
5
6
|
* @property reason - The reason or context for the release.
|
|
6
7
|
* @property [repository] - The repository associated with the release, if applicable.
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
* @property [tag] - The tag name associated with the release.
|
|
15
16
|
*/
|
|
16
17
|
export type ReleaseAnnotations = {
|
|
18
|
+
cliVersion: string;
|
|
17
19
|
source: string;
|
|
18
20
|
reason: string;
|
|
19
21
|
actor?: string;
|
|
@@ -42,4 +44,4 @@ export type ReleaseAnnotations = {
|
|
|
42
44
|
* @returns {Record<string, string>} An object containing annotation variables for the detected environment.
|
|
43
45
|
* If no known environment is detected, returns an empty object.
|
|
44
46
|
*/
|
|
45
|
-
export declare const resolveAnnotations: () => ReleaseAnnotations
|
|
47
|
+
export declare const resolveAnnotations: () => ReleaseAnnotations;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "12.
|
|
1
|
+
export declare const version = "12.3.1";
|
package/docs/application.md
CHANGED
|
@@ -107,7 +107,7 @@ pnpm fusion-framework-cli publish --env <environment>
|
|
|
107
107
|
pnpm fusion-framework-cli app config --publish --env <environment>
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
> **Tip:** For CI/CD and automation, set the `FUSION_TOKEN` environment variable. See [Authentication](
|
|
110
|
+
> **Tip:** For CI/CD and automation, set the `FUSION_TOKEN` environment variable. See [Authentication](auth.md) for details.
|
|
111
111
|
|
|
112
112
|
---
|
|
113
113
|
|
|
@@ -131,7 +131,7 @@ pnpm fusion-framework-cli app config --publish --env <environment>
|
|
|
131
131
|
- **Missing manifest/config:** Ensure `app.manifest.ts` and `app.config.ts` exist in your project root.
|
|
132
132
|
- **Environment variables:** Use `.env` files or your CI/CD system to inject secrets and config values.
|
|
133
133
|
- **Command help:** Run any command with `--help` for detailed usage and options.
|
|
134
|
-
- **Still stuck?** See [Troubleshooting](#troubleshooting--faq) or [Authentication](
|
|
134
|
+
- **Still stuck?** See [Troubleshooting](#troubleshooting--faq) or [Authentication](auth.md).
|
|
135
135
|
|
|
136
136
|
---
|
|
137
137
|
|
|
@@ -295,6 +295,7 @@ export default defineAppConfig((env, args) => {
|
|
|
295
295
|
|
|
296
296
|
The Fusion Framework CLI provides a suite of commands to support the full application lifecycle, from development to deployment. Below is an overview of all available commands with quick links to their detailed usage:
|
|
297
297
|
|
|
298
|
+
- [Create](#create) — Create new Fusion applications from templates.
|
|
298
299
|
- [Dev](#dev) — Start the development server with hot reloading.
|
|
299
300
|
- [Publish](#publish) — Build, upload, and tag your app for deployment.
|
|
300
301
|
- [Config](#config) — Generate or upload your app configuration.
|
|
@@ -304,10 +305,61 @@ The Fusion Framework CLI provides a suite of commands to support the full applic
|
|
|
304
305
|
- [Tag](#tag) — Tag a published app version for release management.
|
|
305
306
|
- [Manifest](#manifest) — Generate your app manifest file.
|
|
306
307
|
- [Check](#check) — Verify your app's registration status.
|
|
308
|
+
- [Disco](#disco) — Service discovery operations.
|
|
307
309
|
- [Aliases](#aliases) — Deprecated commands and their replacements.
|
|
308
310
|
|
|
309
311
|
Refer to each section below for detailed options, usage, and examples.
|
|
310
312
|
|
|
313
|
+
### Create
|
|
314
|
+
|
|
315
|
+
Create new Fusion applications from predefined templates. This command provides an interactive way to scaffold new projects with proper structure and configuration.
|
|
316
|
+
|
|
317
|
+
```sh
|
|
318
|
+
# Create a new app with interactive template selection
|
|
319
|
+
pnpm fusion-framework-cli create app my-app
|
|
320
|
+
|
|
321
|
+
# Create with a specific template
|
|
322
|
+
pnpm fusion-framework-cli create app my-app --template react-app
|
|
323
|
+
|
|
324
|
+
# Create in a specific directory
|
|
325
|
+
pnpm fusion-framework-cli create app my-app --directory ./projects
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Options:**
|
|
329
|
+
- `-t, --template <type>` - Template type to use (will prompt if not specified)
|
|
330
|
+
- `-d, --directory <path>` - Directory to create the app in (default: current directory)
|
|
331
|
+
|
|
332
|
+
For detailed information about creating applications, see [Creating Apps](creating-apps.md).
|
|
333
|
+
|
|
334
|
+
### Disco
|
|
335
|
+
|
|
336
|
+
Service discovery operations for resolving and inspecting Fusion services.
|
|
337
|
+
|
|
338
|
+
#### Resolve
|
|
339
|
+
|
|
340
|
+
Resolve and display information about a service registered in Fusion service discovery.
|
|
341
|
+
|
|
342
|
+
```sh
|
|
343
|
+
# Resolve a service in the current environment
|
|
344
|
+
pnpm fusion-framework-cli disco resolve my-service
|
|
345
|
+
|
|
346
|
+
# Resolve in a specific environment
|
|
347
|
+
pnpm fusion-framework-cli disco resolve my-service --env prod
|
|
348
|
+
|
|
349
|
+
# Silent mode for scripting
|
|
350
|
+
pnpm fusion-framework-cli disco resolve my-service --silent
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Options:**
|
|
354
|
+
- `--env <environment>` - Environment to use (prod, test, etc.)
|
|
355
|
+
- `--silent` - Silent mode, outputs only JSON for scripting
|
|
356
|
+
- Authentication options: `--token`, `--tenantId`, `--clientId`
|
|
357
|
+
|
|
358
|
+
**Useful for:**
|
|
359
|
+
- Finding service endpoints for API calls
|
|
360
|
+
- Debugging service connectivity issues
|
|
361
|
+
- Getting service metadata and configuration
|
|
362
|
+
|
|
311
363
|
### Dev
|
|
312
364
|
|
|
313
365
|
Start your application in development mode with hot reloading and environment-specific configuration.
|
|
@@ -609,7 +661,7 @@ pnpm fusion-framework-cli app check --env prod --debug
|
|
|
609
661
|
> - This change aligns with industry standards and prepares for future CLI enhancements.
|
|
610
662
|
> - Deprecated commands will be removed in future versions—update your scripts and workflows now to avoid breaking changes.
|
|
611
663
|
>
|
|
612
|
-
> For a full migration guide, see [Migration v10 to v11](
|
|
664
|
+
> For a full migration guide, see [Migration v10 to v11](migration-v10-to-v11.md).
|
|
613
665
|
|
|
614
666
|
The CLI will warn you and redirect to the new command when you use a deprecated alias, applying any necessary options automatically. See the table below for mappings:
|
|
615
667
|
|
|
@@ -259,7 +259,6 @@ export default defineDevServerConfig(() => ({
|
|
|
259
259
|
// Override portal configuration
|
|
260
260
|
portal: {
|
|
261
261
|
id: 'my-custom-portal',
|
|
262
|
-
tag: 'development'
|
|
263
262
|
},
|
|
264
263
|
|
|
265
264
|
// Modify service discovery
|
|
@@ -294,6 +293,32 @@ export default defineDevServerConfig(() => ({
|
|
|
294
293
|
- `3`: Error (shows only errors and critical messages)
|
|
295
294
|
- `4`: Critical (shows only critical messages - least verbose)
|
|
296
295
|
|
|
296
|
+
### Portal Proxy Configuration
|
|
297
|
+
|
|
298
|
+
**When you need it**: You want to control how portal assets are loaded during development - either from the Fusion portal service or from locally installed portal packages.
|
|
299
|
+
|
|
300
|
+
**How it works**:
|
|
301
|
+
- **`proxy: true`**: Routes portal assets through the dev-server's `/portal-proxy` endpoint, which fetches content from the Fusion portal service
|
|
302
|
+
- **`proxy: false`** (default): Loads portal assets directly from `node_modules` (typically `@equinor/fusion-dev-server` or another portal package installed locally)
|
|
303
|
+
|
|
304
|
+
```typescript
|
|
305
|
+
export default defineDevServerConfig(() => ({
|
|
306
|
+
spa: {
|
|
307
|
+
templateEnv: {
|
|
308
|
+
portal: {
|
|
309
|
+
id: 'fusion',
|
|
310
|
+
tag: 'latest',
|
|
311
|
+
proxy: true // Load portal from Fusion portal service via /portal-proxy
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}));
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**Benefits**:
|
|
319
|
+
- **`proxy: true`**: Access production portal templates or custom portal deployments via the Fusion portal service
|
|
320
|
+
- **`proxy: false`**: Use locally installed portal packages for offline development or custom portal development
|
|
321
|
+
|
|
297
322
|
### CLI Logging
|
|
298
323
|
|
|
299
324
|
**When you need it**: You want to control the verbosity of dev-server output in your terminal/console.
|
package/docs/dev-server.md
CHANGED
|
@@ -12,6 +12,8 @@ The Fusion Framework dev-server is your complete local development solution for
|
|
|
12
12
|
|
|
13
13
|
🛠️ **Flexible Configuration** - Easy setup for both applications and portals with environment-specific overrides
|
|
14
14
|
|
|
15
|
+
📝 **Configurable Development** - Optional `dev-server.config.ts` file for API mocking, service discovery customization, and environment variable overrides
|
|
16
|
+
|
|
15
17
|
## Quick Start
|
|
16
18
|
|
|
17
19
|
```bash
|
|
@@ -28,6 +30,8 @@ The dev-server automatically detects your project type, loads configuration file
|
|
|
28
30
|
|
|
29
31
|
For detailed information about configuring the dev-server, see [Dev Server Configuration](dev-server-config.md).
|
|
30
32
|
|
|
33
|
+
The dev-server automatically loads configuration from a `dev-server.config.ts` file in your project root, allowing you to customize API mocking, service discovery, and development environment settings without modifying your application code.
|
|
34
|
+
|
|
31
35
|
## Key Features
|
|
32
36
|
|
|
33
37
|
- **Service Discovery Integration** - Automatically connects to Fusion service discovery and enables local API mocking
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -106,10 +106,10 @@
|
|
|
106
106
|
"vite": "^7.1.9",
|
|
107
107
|
"vite-tsconfig-paths": "^5.1.4",
|
|
108
108
|
"zod": "^4.1.8",
|
|
109
|
-
"@equinor/fusion-framework-dev-
|
|
109
|
+
"@equinor/fusion-framework-dev-portal": "1.2.2",
|
|
110
|
+
"@equinor/fusion-framework-dev-server": "1.1.5",
|
|
110
111
|
"@equinor/fusion-framework-module-msal-node": "1.0.7",
|
|
111
|
-
"@equinor/fusion-imports": "1.1.4"
|
|
112
|
-
"@equinor/fusion-framework-dev-portal": "1.2.0"
|
|
112
|
+
"@equinor/fusion-imports": "1.1.4"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@rollup/plugin-commonjs": "^28.0.3",
|