@equinor/fusion-framework-cli 15.2.11-next.0 → 15.3.0-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.
- package/CHANGELOG.md +39 -0
- package/README.md +9 -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/serve-application.d.ts +4 -0
- package/dist/types/bin/start-app-dev-server.d.ts +6 -1
- package/dist/types/bin/utils/__tests__/fixtures/dev-mocks/foo.mock.d.ts +6 -0
- package/dist/types/bin/utils/__tests__/fixtures/dev-mocks/service.mock.d.ts +6 -0
- package/dist/types/bin/utils/apply-dev-server-mocks.d.ts +12 -0
- package/dist/types/bin/utils/apply-dev-server-mocks.test.d.ts +1 -0
- package/dist/types/bin/utils/create-dev-server-config.d.ts +3 -1
- package/dist/types/bin/utils/create-dev-server-config.test.d.ts +1 -0
- package/dist/types/bin/utils/discover-dev-server-mocks.d.ts +20 -0
- package/dist/types/bin/utils/discover-dev-server-mocks.test.d.ts +1 -0
- package/dist/types/bin/utils/normalize-dev-server-config.d.ts +2 -0
- package/dist/types/cli/commands/app/dev.command.d.ts +4 -1
- package/dist/types/cli/commands/app/dev.command.test.d.ts +1 -0
- package/dist/types/cli/commands/app/serve.command.d.ts +1 -0
- package/dist/types/cli/commands/index.d.ts +5 -3
- package/dist/types/cli/commands/portal/dev.command.d.ts +1 -1
- package/dist/types/cli/commands/register-optional-mock-server-command.d.ts +13 -0
- package/dist/types/cli/commands/register-optional-mock-server-command.test.d.ts +1 -0
- package/dist/types/cli/plugins/is-module-not-found-error.d.ts +8 -0
- package/dist/types/cli/plugins/is-module-not-found-error.test.d.ts +1 -0
- package/dist/types/cli/plugins/resolve-optional-plugin.d.ts +14 -0
- package/dist/types/cli/plugins/resolve-optional-plugin.test.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/docs/application.md +17 -1
- package/docs/dev-server-config.md +132 -112
- package/docs/dev-server.md +39 -50
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 15.3.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 09a9bcc: Add a built-in `ffc mock-server` command and a `--mock [endpoint]` flag to `ffc app dev` and
|
|
8
|
+
`ffc app serve`.
|
|
9
|
+
|
|
10
|
+
`ffc mock-server` delegates to `@equinor/fusion-framework-cli-plugin-mock-server` when installed
|
|
11
|
+
and otherwise prints an installation hint. Explicit `mockServerPlugin()` configuration remains
|
|
12
|
+
supported for app-specific defaults without registering the command twice.
|
|
13
|
+
|
|
14
|
+
The `--mock` flag points API service discovery at a local
|
|
15
|
+
mock server (e.g. one started with `ffc mock-server`) without needing a `dev-server.config.ts`
|
|
16
|
+
override — `ffc app dev --mock` defaults to `http://localhost:4010`, or pass an explicit origin
|
|
17
|
+
with `ffc app dev --mock http://localhost:5010`. An existing `dev-server.config.ts` override for
|
|
18
|
+
`api.serviceDiscoveryUrl` still takes precedence.
|
|
19
|
+
|
|
20
|
+
`ffc app serve --mock` applies the same isolated discovery and mock authentication to a built
|
|
21
|
+
application preview. The application must be built first and resolves the `local` environment.
|
|
22
|
+
`ffc app dev --mock` preserves `--env`, which defaults to `local`; explicit `--manifest` and
|
|
23
|
+
`--config` paths remain supported.
|
|
24
|
+
|
|
25
|
+
Normal `ffc app dev` discovers local `<name>.mock.ts` modules and overlays discovery-visible
|
|
26
|
+
definitions onto remote service discovery. In `--mock` mode, discovery comes exclusively from the
|
|
27
|
+
manually started mock server. Local endpoint overrides can be supplied through
|
|
28
|
+
`app.config.local.ts`.
|
|
29
|
+
|
|
30
|
+
`--mock` also enables the in-process MSAL mock (`spa.templateEnv.msal.mock`), so a mocked API
|
|
31
|
+
is usable end-to-end without a real Entra ID sign-in.
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [09a9bcc]
|
|
36
|
+
- Updated dependencies [09a9bcc]
|
|
37
|
+
- Updated dependencies [09a9bcc]
|
|
38
|
+
- @equinor/fusion-framework-dev-server@2.1.0-next.2
|
|
39
|
+
- @equinor/fusion-imports@2.0.3-next.1
|
|
40
|
+
- @equinor/fusion-framework-dev-portal@11.0.3-next.1
|
|
41
|
+
|
|
3
42
|
## 15.2.11-next.0
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -180,6 +180,15 @@ export default defineDevServerConfig((env, { base }) => ({
|
|
|
180
180
|
}));
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
+
### Local mock services (`mocks/<service>.mock.ts`)
|
|
184
|
+
|
|
185
|
+
Use executable service modules instead of handwritten routes in `dev-server.config.ts`. Install
|
|
186
|
+
`@equinor/fusion-framework-cli-plugin-mock-server`, define each service with `defineService`, and
|
|
187
|
+
run `ffc mock-server` in a separate foreground terminal.
|
|
188
|
+
|
|
189
|
+
See [Develop with mock services](../dev-server/docs/mocking.md) for normal discovery overlays,
|
|
190
|
+
isolated `--mock` development, and discovery modes.
|
|
191
|
+
|
|
183
192
|
### CLI plugins (`fusion-cli.config.ts`)
|
|
184
193
|
|
|
185
194
|
```ts
|