@equinor/fusion-framework-app 13.0.3-next.0 → 13.0.3-next.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.
@@ -1 +1 @@
1
- export declare const version = "13.0.3-next.0";
1
+ export declare const version = "13.0.3-next.1";
@@ -30,6 +30,56 @@ const client = framework.modules.http.createClient('schedule');
30
30
  const data = await client.json('/items');
31
31
  ```
32
32
 
33
+ ### Mock an application-config endpoint locally
34
+
35
+ Use a direct-only executable service when an app-owned endpoint needs a local OpenAPI mock but
36
+ must not appear in service discovery:
37
+
38
+ ```ts
39
+ // mocks/my-api.mock.ts
40
+ import schema from './my-api.openapi.json' with { type: 'json' };
41
+ import { defineService } from '@equinor/fusion-openapi-mock-server/discovery';
42
+
43
+ export default defineService({
44
+ key: 'my-api',
45
+ serviceDiscovery: false,
46
+ schema,
47
+ });
48
+ ```
49
+
50
+ Point the development environment at the service's `<key>.localhost` origin:
51
+
52
+ ```ts
53
+ // app.config.local.ts
54
+ import { defineAppConfig } from '@equinor/fusion-framework-cli/app';
55
+
56
+ export default defineAppConfig(() => ({
57
+ endpoints: {
58
+ 'my-api': {
59
+ url: 'http://my-api.localhost:4010',
60
+ },
61
+ },
62
+ }));
63
+ ```
64
+
65
+ Start both foreground processes:
66
+
67
+ ```sh
68
+ ffc mock-server
69
+ ffc app dev
70
+ ```
71
+
72
+ `serviceDiscovery: false` keeps `my-api` out of discovery while the mock server continues serving
73
+ it directly. The mock server handles browser CORS for these per-service origins, so this workflow
74
+ does not require an `/@fusion-api` proxy route or handwritten `dev-server.config.ts` middleware.
75
+ Restart `ffc app dev` after changing `app.config.<env>.ts`; application config files are resolved at
76
+ startup rather than watched for changes.
77
+
78
+ The `--mock` flag is optional here. It changes where service discovery comes from, but the
79
+ app-owned `endpoints` entry remains explicit in application config. See
80
+ [Develop with mock services](../../dev-server/docs/mocking.md) for discovery modes and isolated
81
+ mock development.
82
+
33
83
  ## Via Service Discovery
34
84
 
35
85
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-app",
3
- "version": "13.0.3-next.0",
3
+ "version": "13.0.3-next.1",
4
4
  "description": "",
5
5
  "main": "dist/esm/index.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -61,13 +61,13 @@
61
61
  "dependencies": {
62
62
  "lodash.clonedeep": "^4.5.0",
63
63
  "rxjs": "^7.8.1",
64
- "@equinor/fusion-framework": "8.1.0-next.1",
65
64
  "@equinor/fusion-framework-module": "6.1.3-next.0",
65
+ "@equinor/fusion-framework": "8.1.0-next.2",
66
66
  "@equinor/fusion-framework-module-app": "8.0.6-next.0",
67
- "@equinor/fusion-framework-module-event": "6.1.0-next.0",
68
67
  "@equinor/fusion-framework-module-http": "8.1.0-next.0",
69
- "@equinor/fusion-framework-module-msal": "11.0.0-next.0",
70
- "@equinor/fusion-framework-module-telemetry": "8.0.0-next.1"
68
+ "@equinor/fusion-framework-module-event": "6.1.0-next.0",
69
+ "@equinor/fusion-framework-module-telemetry": "8.0.0-next.1",
70
+ "@equinor/fusion-framework-module-msal": "11.0.0-next.1"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/lodash.clonedeep": "^4.5.9",
@@ -77,8 +77,8 @@
77
77
  "@equinor/fusion-framework-module-state": "^2.0.2-next.0"
78
78
  },
79
79
  "peerDependencies": {
80
- "@equinor/fusion-framework-module-bookmark": "^4.1.0-next.0",
81
- "@equinor/fusion-framework-module-state": "^2.0.2-next.0"
80
+ "@equinor/fusion-framework-module-state": "^2.0.2-next.0",
81
+ "@equinor/fusion-framework-module-bookmark": "^4.1.0-next.0"
82
82
  },
83
83
  "peerDependenciesMeta": {
84
84
  "@equinor/fusion-framework-module-bookmark": {
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '13.0.3-next.0';
2
+ export const version = '13.0.3-next.1';