@equinor/fusion-framework-cli 11.0.0-next.7 → 11.0.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.
Files changed (224) hide show
  1. package/CHANGELOG.md +58 -95
  2. package/README.md +112 -57
  3. package/bin/build/bin.mjs +1 -0
  4. package/bin/build/cli.mjs +7 -0
  5. package/bin/cli.mjs +1 -1
  6. package/dist/esm/lib/app/app-config.js.map +1 -1
  7. package/dist/esm/lib/app/app-manifest.js.map +1 -1
  8. package/dist/esm/lib/app/app-package.js +1 -1
  9. package/dist/esm/lib/app/app-package.js.map +1 -1
  10. package/dist/esm/lib/app/merge-app-config.js +11 -5
  11. package/dist/esm/lib/app/merge-app-config.js.map +1 -1
  12. package/dist/esm/lib/app/merge-app-manifest.js +2 -2
  13. package/dist/esm/lib/app/merge-app-manifest.js.map +1 -1
  14. package/dist/esm/lib/index.js +3 -1
  15. package/dist/esm/lib/index.js.map +1 -1
  16. package/dist/esm/lib/load-dev-server-config.js +7 -3
  17. package/dist/esm/lib/load-dev-server-config.js.map +1 -1
  18. package/dist/esm/lib/merge-dev-server-config.js +24 -16
  19. package/dist/esm/lib/merge-dev-server-config.js.map +1 -1
  20. package/dist/esm/lib/portal/create-portal-manifest.js.map +1 -1
  21. package/dist/esm/lib/portal/load-portal-config.js +1 -1
  22. package/dist/esm/lib/portal/load-portal-config.js.map +1 -1
  23. package/dist/esm/lib/portal/load-portal-manifest.js +8 -4
  24. package/dist/esm/lib/portal/load-portal-manifest.js.map +1 -1
  25. package/dist/esm/lib/portal/load-portal-schema.js.map +1 -1
  26. package/dist/esm/lib/portal/portal-config.js.map +1 -1
  27. package/dist/esm/lib/utils/index.js +1 -0
  28. package/dist/esm/lib/utils/index.js.map +1 -1
  29. package/dist/esm/lib/utils/resolve-annotations.js +48 -5
  30. package/dist/esm/lib/utils/resolve-annotations.js.map +1 -1
  31. package/dist/esm/lib/utils/resolve-devops-annotations.js +7 -3
  32. package/dist/esm/lib/utils/resolve-devops-annotations.js.map +1 -1
  33. package/dist/esm/lib/utils/resolve-git-commit-sha.js +1 -0
  34. package/dist/esm/lib/utils/resolve-git-commit-sha.js.map +1 -1
  35. package/dist/esm/lib/utils/resolve-github-annotations.js +16 -72
  36. package/dist/esm/lib/utils/resolve-github-annotations.js.map +1 -1
  37. package/dist/esm/version.js +1 -1
  38. package/dist/types/bin/app-build.d.ts +2 -2
  39. package/dist/types/bin/app-check.d.ts +2 -2
  40. package/dist/types/bin/app-config-publish.d.ts +2 -2
  41. package/dist/types/bin/app-config.d.ts +3 -3
  42. package/dist/types/bin/app-dev.d.ts +1 -1
  43. package/dist/types/bin/app-manifest.d.ts +3 -3
  44. package/dist/types/bin/app-pack.d.ts +1 -1
  45. package/dist/types/bin/app-tag.d.ts +3 -3
  46. package/dist/types/bin/app-upload.d.ts +2 -2
  47. package/dist/types/bin/helpers/load-vite-config.d.ts +1 -2
  48. package/dist/types/bin/helpers/resolve-app-config.d.ts +3 -3
  49. package/dist/types/bin/helpers/resolve-app-manifest.d.ts +3 -3
  50. package/dist/types/bin/helpers/resolve-portal-config.d.ts +3 -3
  51. package/dist/types/bin/helpers/resolve-portal-manifest.d.ts +3 -4
  52. package/dist/types/bin/helpers/resolve-project-package.d.ts +2 -2
  53. package/dist/types/bin/index.d.ts +9 -0
  54. package/dist/types/bin/pack.d.ts +1 -1
  55. package/dist/types/bin/portal-build.d.ts +5 -5
  56. package/dist/types/bin/portal-config-publish.d.ts +2 -2
  57. package/dist/types/bin/portal-config.d.ts +4 -4
  58. package/dist/types/bin/portal-dev.d.ts +2 -2
  59. package/dist/types/bin/portal-manifest.d.ts +4 -4
  60. package/dist/types/bin/portal-pack.d.ts +3 -3
  61. package/dist/types/bin/portal-tag.d.ts +2 -2
  62. package/dist/types/bin/portal-upload.d.ts +2 -2
  63. package/dist/types/bin/utils/create-dev-server.d.ts +2 -2
  64. package/dist/types/cli/commands/disco/resolve.d.ts +1 -1
  65. package/dist/types/cli/main.d.ts +0 -20
  66. package/dist/types/cli/options/env.d.ts +1 -2
  67. package/dist/types/lib/app/app-config.d.ts +2 -2
  68. package/dist/types/lib/app/app-manifest.d.ts +1 -1
  69. package/dist/types/lib/app/merge-app-config.d.ts +1 -1
  70. package/dist/types/lib/app/merge-app-manifest.d.ts +1 -1
  71. package/dist/types/lib/index.d.ts +3 -2
  72. package/dist/types/lib/legacy.d.ts +1 -1
  73. package/dist/types/lib/load-dev-server-config.d.ts +2 -2
  74. package/dist/types/lib/merge-dev-server-config.d.ts +1 -1
  75. package/dist/types/lib/portal/create-portal-manifest.d.ts +1 -1
  76. package/dist/types/lib/portal/load-portal-manifest.d.ts +2 -2
  77. package/dist/types/lib/portal/load-portal-schema.d.ts +1 -1
  78. package/dist/types/lib/portal/portal-config.d.ts +2 -2
  79. package/dist/types/lib/portal/portal-manifest.schema.d.ts +6 -6
  80. package/dist/types/lib/types.d.ts +29 -0
  81. package/dist/types/lib/utils/index.d.ts +1 -0
  82. package/dist/types/lib/utils/resolve-annotations.d.ts +35 -1
  83. package/dist/types/lib/utils/resolve-devops-annotations.d.ts +28 -3
  84. package/dist/types/lib/utils/resolve-git-commit-sha.d.ts +1 -0
  85. package/dist/types/lib/utils/resolve-github-annotations.d.ts +85 -13
  86. package/dist/types/lib/utils/types.d.ts +57 -1
  87. package/dist/types/version.d.ts +1 -1
  88. package/docs/application.md +63 -8
  89. package/docs/auth.md +17 -1
  90. package/docs/migration-v10-to-v11.md +32 -20
  91. package/package.json +69 -31
  92. package/bin/build/bin.js +0 -21
  93. package/bin/build/cli.js +0 -10097
  94. package/bin/build/create-auth-client-7P8K_6Vu.js +0 -89
  95. package/bin/build/portal-config-publish-OZ7Ocme4.js +0 -12281
  96. package/dist/esm/bin/app-build.js +0 -34
  97. package/dist/esm/bin/app-build.js.map +0 -1
  98. package/dist/esm/bin/app-check.js +0 -63
  99. package/dist/esm/bin/app-check.js.map +0 -1
  100. package/dist/esm/bin/app-config-publish.js +0 -89
  101. package/dist/esm/bin/app-config-publish.js.map +0 -1
  102. package/dist/esm/bin/app-config.js +0 -48
  103. package/dist/esm/bin/app-config.js.map +0 -1
  104. package/dist/esm/bin/app-dev.js +0 -102
  105. package/dist/esm/bin/app-dev.js.map +0 -1
  106. package/dist/esm/bin/app-manifest.js +0 -38
  107. package/dist/esm/bin/app-manifest.js.map +0 -1
  108. package/dist/esm/bin/app-pack.js +0 -51
  109. package/dist/esm/bin/app-pack.js.map +0 -1
  110. package/dist/esm/bin/app-tag.js +0 -89
  111. package/dist/esm/bin/app-tag.js.map +0 -1
  112. package/dist/esm/bin/app-upload.js +0 -109
  113. package/dist/esm/bin/app-upload.js.map +0 -1
  114. package/dist/esm/bin/helpers/load-bundle-metadata.js +0 -32
  115. package/dist/esm/bin/helpers/load-bundle-metadata.js.map +0 -1
  116. package/dist/esm/bin/helpers/load-vite-config.js +0 -55
  117. package/dist/esm/bin/helpers/load-vite-config.js.map +0 -1
  118. package/dist/esm/bin/helpers/resolve-app-config.js +0 -46
  119. package/dist/esm/bin/helpers/resolve-app-config.js.map +0 -1
  120. package/dist/esm/bin/helpers/resolve-app-manifest.js +0 -55
  121. package/dist/esm/bin/helpers/resolve-app-manifest.js.map +0 -1
  122. package/dist/esm/bin/helpers/resolve-portal-config.js +0 -46
  123. package/dist/esm/bin/helpers/resolve-portal-config.js.map +0 -1
  124. package/dist/esm/bin/helpers/resolve-portal-manifest.js +0 -55
  125. package/dist/esm/bin/helpers/resolve-portal-manifest.js.map +0 -1
  126. package/dist/esm/bin/helpers/resolve-project-package.js +0 -32
  127. package/dist/esm/bin/helpers/resolve-project-package.js.map +0 -1
  128. package/dist/esm/bin/index.js +0 -12
  129. package/dist/esm/bin/index.js.map +0 -1
  130. package/dist/esm/bin/pack.js +0 -70
  131. package/dist/esm/bin/pack.js.map +0 -1
  132. package/dist/esm/bin/portal-build.js +0 -40
  133. package/dist/esm/bin/portal-build.js.map +0 -1
  134. package/dist/esm/bin/portal-config-publish.js +0 -74
  135. package/dist/esm/bin/portal-config-publish.js.map +0 -1
  136. package/dist/esm/bin/portal-config.js +0 -48
  137. package/dist/esm/bin/portal-config.js.map +0 -1
  138. package/dist/esm/bin/portal-dev.js +0 -61
  139. package/dist/esm/bin/portal-dev.js.map +0 -1
  140. package/dist/esm/bin/portal-manifest.js +0 -38
  141. package/dist/esm/bin/portal-manifest.js.map +0 -1
  142. package/dist/esm/bin/portal-pack.js +0 -60
  143. package/dist/esm/bin/portal-pack.js.map +0 -1
  144. package/dist/esm/bin/portal-tag.js +0 -96
  145. package/dist/esm/bin/portal-tag.js.map +0 -1
  146. package/dist/esm/bin/portal-upload.js +0 -99
  147. package/dist/esm/bin/portal-upload.js.map +0 -1
  148. package/dist/esm/bin/utils/ConsoleLogger.js +0 -112
  149. package/dist/esm/bin/utils/ConsoleLogger.js.map +0 -1
  150. package/dist/esm/bin/utils/create-dev-server.js +0 -167
  151. package/dist/esm/bin/utils/create-dev-server.js.map +0 -1
  152. package/dist/esm/bin/utils/format.js +0 -47
  153. package/dist/esm/bin/utils/format.js.map +0 -1
  154. package/dist/esm/bin/utils/index.js +0 -5
  155. package/dist/esm/bin/utils/index.js.map +0 -1
  156. package/dist/esm/bin/utils/spinner.js +0 -142
  157. package/dist/esm/bin/utils/spinner.js.map +0 -1
  158. package/dist/esm/cli/commands/app/alias.js +0 -42
  159. package/dist/esm/cli/commands/app/alias.js.map +0 -1
  160. package/dist/esm/cli/commands/app/build.js +0 -53
  161. package/dist/esm/cli/commands/app/build.js.map +0 -1
  162. package/dist/esm/cli/commands/app/check.js +0 -57
  163. package/dist/esm/cli/commands/app/check.js.map +0 -1
  164. package/dist/esm/cli/commands/app/config.js +0 -103
  165. package/dist/esm/cli/commands/app/config.js.map +0 -1
  166. package/dist/esm/cli/commands/app/dev.js +0 -67
  167. package/dist/esm/cli/commands/app/dev.js.map +0 -1
  168. package/dist/esm/cli/commands/app/index.js +0 -42
  169. package/dist/esm/cli/commands/app/index.js.map +0 -1
  170. package/dist/esm/cli/commands/app/manifest.js +0 -82
  171. package/dist/esm/cli/commands/app/manifest.js.map +0 -1
  172. package/dist/esm/cli/commands/app/pack.js +0 -71
  173. package/dist/esm/cli/commands/app/pack.js.map +0 -1
  174. package/dist/esm/cli/commands/app/publish.js +0 -130
  175. package/dist/esm/cli/commands/app/publish.js.map +0 -1
  176. package/dist/esm/cli/commands/app/tag.js +0 -113
  177. package/dist/esm/cli/commands/app/tag.js.map +0 -1
  178. package/dist/esm/cli/commands/app/upload.js +0 -85
  179. package/dist/esm/cli/commands/app/upload.js.map +0 -1
  180. package/dist/esm/cli/commands/auth/index.js +0 -22
  181. package/dist/esm/cli/commands/auth/index.js.map +0 -1
  182. package/dist/esm/cli/commands/auth/login.js +0 -72
  183. package/dist/esm/cli/commands/auth/login.js.map +0 -1
  184. package/dist/esm/cli/commands/auth/logout.js +0 -58
  185. package/dist/esm/cli/commands/auth/logout.js.map +0 -1
  186. package/dist/esm/cli/commands/auth/token.js +0 -78
  187. package/dist/esm/cli/commands/auth/token.js.map +0 -1
  188. package/dist/esm/cli/commands/disco/index.js +0 -6
  189. package/dist/esm/cli/commands/disco/index.js.map +0 -1
  190. package/dist/esm/cli/commands/disco/resolve.js +0 -58
  191. package/dist/esm/cli/commands/disco/resolve.js.map +0 -1
  192. package/dist/esm/cli/commands/index.js +0 -11
  193. package/dist/esm/cli/commands/index.js.map +0 -1
  194. package/dist/esm/cli/commands/portal/build.js +0 -27
  195. package/dist/esm/cli/commands/portal/build.js.map +0 -1
  196. package/dist/esm/cli/commands/portal/config.js +0 -101
  197. package/dist/esm/cli/commands/portal/config.js.map +0 -1
  198. package/dist/esm/cli/commands/portal/dev.js +0 -27
  199. package/dist/esm/cli/commands/portal/dev.js.map +0 -1
  200. package/dist/esm/cli/commands/portal/index.js +0 -23
  201. package/dist/esm/cli/commands/portal/index.js.map +0 -1
  202. package/dist/esm/cli/commands/portal/manifest.js +0 -48
  203. package/dist/esm/cli/commands/portal/manifest.js.map +0 -1
  204. package/dist/esm/cli/commands/portal/pack.js +0 -40
  205. package/dist/esm/cli/commands/portal/pack.js.map +0 -1
  206. package/dist/esm/cli/commands/portal/publish.js +0 -76
  207. package/dist/esm/cli/commands/portal/publish.js.map +0 -1
  208. package/dist/esm/cli/commands/portal/schema.js +0 -70
  209. package/dist/esm/cli/commands/portal/schema.js.map +0 -1
  210. package/dist/esm/cli/commands/portal/tag.js +0 -73
  211. package/dist/esm/cli/commands/portal/tag.js.map +0 -1
  212. package/dist/esm/cli/commands/portal/upload.js +0 -41
  213. package/dist/esm/cli/commands/portal/upload.js.map +0 -1
  214. package/dist/esm/cli/main.js +0 -52
  215. package/dist/esm/cli/main.js.map +0 -1
  216. package/dist/esm/cli/options/auth.js +0 -96
  217. package/dist/esm/cli/options/auth.js.map +0 -1
  218. package/dist/esm/cli/options/env.js +0 -30
  219. package/dist/esm/cli/options/env.js.map +0 -1
  220. package/dist/esm/lib/framework.node.js +0 -104
  221. package/dist/esm/lib/framework.node.js.map +0 -1
  222. package/dist/esm/version.js.map +0 -1
  223. package/dist/tsconfig.tsbuildinfo +0 -1
  224. /package/dist/types/{lib → bin}/framework.node.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,135 +1,98 @@
1
1
  # Change Log
2
2
 
3
- ## 11.0.0-next.7
3
+ ## 11.0.0
4
4
 
5
- ### Patch Changes
6
-
7
- - Updated dependencies []:
8
- - @equinor/fusion-framework-dev-portal@1.0.0-next.2
9
- - @equinor/fusion-framework-dev-server@1.0.0-next.4
10
-
11
- ## 11.0.0-next.6
12
-
13
- ### Minor Changes
5
+ ### Major Changes
14
6
 
15
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`87bfb21`](https://github.com/equinor/fusion-framework/commit/87bfb21c588a434b574b8cd408bb5dc2642f0974) Thanks [@odinr](https://github.com/odinr)! - improve help output for all commands
7
+ - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253) Thanks [@odinr](https://github.com/odinr)! - **Major Changes**
16
8
 
17
- - All CLI commands now provide more detailed and consistent help output, including arguments, options, and usage examples.
18
- - Updated descriptions and help text for all app, portal, and auth commands to improve discoverability and onboarding.
9
+ - **Rewrite:** The CLI has been rewritten to use Fusion Framework internally, minimizing dependencies and improving performance. It is now a first-class citizen in the Fusion Framework ecosystem, providing a more consistent and integrated experience.
10
+ - **Dev Portal Modularization:** The dev portal has been moved to a separate package `@equinor/fusion-framework-dev-server`, enabling modular architecture and independent updates. The dev portal can be configured via `dev-server.config.js` and supports live preview and API mocking.
11
+ - **Command Structure:** CLI is now divided into three main groups: `bin` (executable functions), `commands` (CLI commands), and `lib` (for consumers, config, and utilities). This improves organization and modularity.
12
+ - **BREAKING:** The `--service` flag has been removed. The CLI now uses service discovery via Fusion environment variables. All `app -build-???` commands are deprecated and will be removed in the next major version.
19
13
 
20
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`c4cb2f7`](https://github.com/equinor/fusion-framework/commit/c4cb2f798d9804438bc216096cf4089097b3d31c) Thanks [@odinr](https://github.com/odinr)! - cli: add portal config support
14
+ - **Dev Server Abstraction:** Vite configuration and dev server functionality has been abstracted into the `@equinor/fusion-framework-dev-server` package. The CLI now provides a higher-level API that handles Vite configuration internally, eliminating the need for users to manage Vite configuration directly while still allowing for customization through configuration options.
21
15
 
22
- - Added support for loading and resolving portal configuration files via `loadPortalConfig` and `resolvePortalConfig` helpers.
23
- - Introduced `PortalConfig`, `PortalConfigFn`, and `definePortalConfig` types/utilities for authoring static or dynamic portal configs.
24
- - Updated dev server logic to use resolved portal config.
25
- - Exposed new config utilities from `lib/portal` index.
16
+ - **New Utility Functions:** The CLI now includes new utility modules for resolving CI/CD metadata (GitHub Actions, Azure DevOps), git commit and remote info, and package metadata. These utilities support advanced scripting and automation scenarios.
26
17
 
27
- This enables flexible, type-safe portal configuration for local development and deployment scenarios.
18
+ **Minor Changes**
28
19
 
29
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`b8ed76f`](https://github.com/equinor/fusion-framework/commit/b8ed76f3a6d89b89315c58ec7743f5b0b7303371) Thanks [@odinr](https://github.com/odinr)! - Added alias for fusion-framework-cli to ffc
20
+ - **Portal Config Support:** Added helpers for loading and resolving portal configuration files, with new types and utilities for authoring static or dynamic portal configs. Dev server logic updated to use resolved portal config.
21
+ - **Manifest Refactor:** Portal manifest now uses `name` and `templateEntry` for consistency with app manifests. Dev server config and routing updated. Asset paths now use `/@fs` for local development. Improved type safety and schema validation.
22
+ - **ESM Modernization:** Refactored CLI to use deepmerge instead of lodash.mergewith, updated all imports to use explicit `.js` extensions, and re-exported all bin entrypoints for ESM compatibility. Updated package.json and tsconfig.json for ESM.
30
23
 
31
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`7b8aca4`](https://github.com/equinor/fusion-framework/commit/7b8aca443197791053da20f3b43784ec69f3f4b7) Thanks [@odinr](https://github.com/odinr)! - - Added a new command to the CLI for managing portal configuration.
32
- - This update introduces enhanced support for portal config operations via the `@equinor/fusion-framework-cli` package.
24
+ **Patch Changes**
33
25
 
34
- ## 11.0.0-next.5
26
+ - **Dev Server Config:** Refactored config loading and merging, added `RecursivePartial` type, custom array merge strategy, and improved documentation. Arrays of route objects are now merged by `match` property to ensure uniqueness.
27
+ - **Node Version Check:** Added Node.js version check and LTS recommendation to CLI entrypoint. Build config injects version info via environment variables.
35
28
 
36
- ### Minor Changes
29
+ **Other**
37
30
 
38
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`a3ce07a`](https://github.com/equinor/fusion-framework/commit/a3ce07a367ae8d5a6dbac438c25928df54aefecf) Thanks [@odinr](https://github.com/odinr)! - - Portal manifest now uses `name` (unscoped) and `templateEntry` instead of `id` and `entrypoint` for improved consistency with app manifests.
31
+ - Improved maintainability, type safety, and developer experience throughout the CLI and dev server packages.
39
32
 
40
- - Dev server configuration and routing updated to expect and utilize the new manifest structure.
41
- - Asset paths for development and preview builds now use `/@fs` for more reliable local development.
42
- - Type safety and schema validation for portal manifests have been improved.
43
- - Minor typos fixed and comments clarified throughout related files.
33
+ **Note:**
44
34
 
45
- This refactor unifies manifest handling between apps and portals, simplifies local development, and ensures better type safety and validation. It also improves maintainability and developer experience by making configuration more predictable and robust.
35
+ - The removal of Vite config and schema utilities is a breaking change for users who previously relied on CLI-provided defaults. Please migrate to custom configuration as needed.
36
+ - The new utility modules are available for advanced use cases and automation, but do not affect most standard CLI usage.
37
+ - If you are authoring an `app.config.ts` file, you now need to import the config helper as follows:
46
38
 
47
- ### Patch Changes
39
+ ```diff
40
+ -import { defineAppConfig } from '@equinor/fusion-framework-cli';
41
+ +import { defineAppConfig } from '@equinor/fusion-framework-cli/app';
42
+ ```
48
43
 
49
- - Updated dependencies [[`2ed792a`](https://github.com/equinor/fusion-framework/commit/2ed792a1118f3726f811c4dbdf8d25c69d7bb756), [`d9a7ada`](https://github.com/equinor/fusion-framework/commit/d9a7ada786bfac3a0714f38c1379b5aac09a0f71)]:
50
- - @equinor/fusion-framework-dev-server@1.0.0-next.3
51
- - @equinor/fusion-imports@1.1.1-next.0
52
- - @equinor/fusion-framework-dev-portal@1.0.0-next.2
44
+ **Further Reading & Documentation Highlights**
53
45
 
54
- ## 11.0.0-next.4
46
+ +- See the CLI's [README](https://github.com/equinor/fusion-framework/blob/main/packages/cli/README.md) for a full overview, installation, and command reference.
47
+ +- The [docs folder](https://github.com/equinor/fusion-framework/tree/main/packages/cli/docs) contains:
55
48
 
56
- ### Patch Changes
49
+ - - [Developing Apps](https://github.com/equinor/fusion-framework/blob/main/packages/cli/docs/application.md): Step-by-step guide to app setup, config, CI/CD, and best practices.
50
+ - - [Developing Portals](https://github.com/equinor/fusion-framework/blob/main/packages/cli/docs/portal.md): Portal template development, manifest/schema, and deployment.
51
+ - - [Authentication](https://github.com/equinor/fusion-framework/blob/main/packages/cli/docs/auth.md): Local and CI/CD authentication, MSAL, and secure token storage.
52
+ - - [Migration Guide: v10 to v11](https://github.com/equinor/fusion-framework/blob/main/packages/cli/docs/migration-v10-to-v11.md): Breaking changes, deprecated commands, and upgrade steps.
53
+ - - [libsecret setup](https://github.com/equinor/fusion-framework/blob/main/packages/cli/docs/libsecret.md): Secure credential storage for Linux users.
54
+ +- For real-world examples, see the [cookbooks/](https://github.com/equinor/fusion-framework/tree/main/cookbooks) directory.
57
55
 
58
- - Updated dependencies []:
59
- - @equinor/fusion-framework-dev-server@1.0.0-next.2
60
- - @equinor/fusion-framework-dev-portal@1.0.0-next.2
56
+ * Key usage notes:
57
+ - All config and manifest files must use helpers from `@equinor/fusion-framework-cli/app`.
58
+ - Use `fusion-framework-cli auth login` for local authentication; use `FUSION_TOKEN` for CI/CD.
59
+ - Deprecated commands (`build-pack`, `build-upload`, etc.) are replaced by `pack`, `upload`, etc. Use `--env` instead of `--service`.
60
+ - The CLI supports "build once, deploy many" CI/CD workflows.
61
+ - Utilities like `mergeAppManifests` are available for advanced config/manifest merging.
61
62
 
62
- ## 11.0.0-next.3
63
+ This consolidated changeset replaces all previous CLI-related changesets for this release.
63
64
 
64
65
  ### Patch Changes
65
66
 
66
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`eac2234`](https://github.com/equinor/fusion-framework/commit/eac22349aa3ec6d76ed85b6d5a20966a56c32046) Thanks [@odinr](https://github.com/odinr)! - add assetPath to app manifest for non-build commands
67
-
68
- - Updated dependencies [[`ba060b7`](https://github.com/equinor/fusion-framework/commit/ba060b7a5fcc4f84891cb416b4d2f7fde231a368)]:
69
- - @equinor/fusion-framework-dev-portal@1.0.0-next.2
67
+ - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253) Thanks [@odinr](https://github.com/odinr)! - update Vite to 6.3.5
70
68
 
71
- ## 11.0.0-next.2
69
+ - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253) Thanks [@odinr](https://github.com/odinr)! - Upgrade zod dependency to ^3.25.76 in all affected packages.
72
70
 
73
- ### Patch Changes
74
-
75
- - Updated dependencies [[`84c16d7`](https://github.com/equinor/fusion-framework/commit/84c16d74c3235f809ce4c3e75868be12010ed695)]:
76
- - @equinor/fusion-framework-dev-portal@1.0.0-next.1
77
- - @equinor/fusion-framework-dev-server@1.0.0-next.1
71
+ - Updated dependencies [[`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253)]:
72
+ - @equinor/fusion-framework-dev-portal@1.0.0
73
+ - @equinor/fusion-framework-dev-server@1.0.0
74
+ - @equinor/fusion-framework-module-msal-node@1.0.0
75
+ - @equinor/fusion-imports@1.1.1
78
76
 
79
- ## 11.0.0-next.1
77
+ ## 10.7.6
80
78
 
81
79
  ### Patch Changes
82
80
 
83
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`f8a4db1`](https://github.com/equinor/fusion-framework/commit/f8a4db1208ef98eea7f6f286087338ee74858434) Thanks [@odinr](https://github.com/odinr)! - Update `.npmignore` and `package.json` to improve package publishing:
81
+ - [#3268](https://github.com/equinor/fusion-framework/pull/3268) [`7ef5afc`](https://github.com/equinor/fusion-framework/commit/7ef5afc96a8c2cebecedc85703be820d84e3885a) Thanks [@odinr](https://github.com/odinr)! - Fix: Improve type safety and error handling in `AppAssetExportPlugin` (app-assets plugin).
84
82
 
85
- - Ensure `bin` directory is included in published files by updating `.npmignore` and adding it to the `files` array in `package.json`.
86
- - Add `repository` field to `package.json` for better metadata.
83
+ - Use `unknown as PluginContext` for type casting in `resolveId` and `emitAssetSync` calls.
84
+ - Add null check and warning if asset emission fails.
85
+ - Minor code style and safety improvements.
87
86
 
88
- These changes help ensure all necessary files are included in the published package and improve discoverability and metadata for consumers.
87
+ This change improves plugin robustness and aligns with best practices for Vite/Rollup plugin development.
89
88
 
90
- ## 11.0.0-next.0
91
-
92
- ### Major Changes
89
+ - [#3268](https://github.com/equinor/fusion-framework/pull/3268) [`7ef5afc`](https://github.com/equinor/fusion-framework/commit/7ef5afc96a8c2cebecedc85703be820d84e3885a) Thanks [@odinr](https://github.com/odinr)! - Upgraded rollup from `4.22.4` to `4.46.3`
93
90
 
94
- - [#3074](https://github.com/equinor/fusion-framework/pull/3074) [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13) Thanks [@odinr](https://github.com/odinr)! - The CLI has been rewritten to use Fusion Framework internally to minimize dependencies and improve performance. This change allows the CLI to be more efficient and maintainable. It also means that the CLI is now a first-class citizen in the Fusion Framework ecosystem, providing a more consistent and integrated experience.
95
-
96
- The dev portal has been moved out to a separate package `@equinor/fusion-framework-dev-server`. This separation allows for a more modular architecture, enabling developers to use the dev portal independently of the CLI. It also facilitates easier updates and maintenance of the dev portal without affecting the CLI functionality. It also allows for 3rd party developers to create their own dev portals using the Fusion Framework. Also, moving the dev portal to a separate package allows for better versioning and dependency management, ensuring that developers can always use the latest features and improvements without being tied to the CLI release cycle.
97
-
98
- The dev portal can be configured using the `dev-server.config.js` file, which allows developers to customize the behavior and appearance of the dev portal. This configuration file provides flexibility in how the dev portal operates, enabling developers to tailor it to their specific needs and preferences. **this is currently not documented, but will be in the future**
99
-
100
- Since the dev portal uses the plugin `@equinor/fusion-framework-vite-plugin-spa`, it is possible to specify a live portal to preview the application in the dev portal. This feature allows developers to see their changes in real-time, enhancing the development experience and speeding up the feedback loop. It is particularly useful for testing and debugging applications during development.
101
-
102
- The dev portal also supports mocking API services, which allows developers to simulate backend services without needing a live server. This feature is particularly useful for testing and development, as it enables developers to work on the frontend independently of the backend, ensuring a smoother development process. **this is currently not documented, but will be in the future**
103
-
104
- The dev portal is a key component of the Fusion Framework ecosystem, providing a user-friendly interface for developers to interact with their applications. It allows developers to easily manage and test their applications, providing a streamlined development experience.
105
-
106
- The Dev Portal uses by default the `@equinor/fusion-framework-dev-portal` package, which is the official dev portal package provided by Fusion which is developer-friendly portal for developing and testing Fusion Framework applications. But it is possible to specify any package as a dev portal, allowing for customization of the development experience. This flexibility enables developers to create their own dev portals or use third-party solutions that better fit their needs.
107
-
108
- The CLI now supports the `fusion-framework-cli auth login` command for authentication, which is a more secure and user-friendly way to manage access to Fusion Framework applications. This command simplifies the authentication process, making it easier for developers to log in and start working on their applications without needing to manually set environment variables or manage tokens. _`FUSION_TOKEN`_ is still supported for CI/CD and automation, but the CLI now provides a more streamlined and intuitive way to handle authentication.
109
-
110
- The CLI has now been divided into three main groups:
111
-
112
- - **bin**: This namespace contains executable functions that can be executed from node scripts, handy for automation and scripting or creating a custom CLI.
113
- - **commands**: This namespace contains commands that can be executed from the CLI, providing a user-friendly interface for developers to interact with the Fusion Framework.
114
- - **lib**: This namespace is reserved for consumers of the CLI, like defining configuration files, exposing interfaces, and other utilities that can be used in custom scripts or applications. This separation allows for better organization and modularity of the CLI codebase, making it easier to maintain and extend.
115
-
116
- **BREAKING CHANGES:**
117
-
118
- the `--service` flag has been removed since the CLI now uses the Fusion Framework internally, which does not require this flag, but uses service discovery to resolve endpoints automatically according to provided Fusion environment variables. This change simplifies the CLI usage and aligns it more closely with the Fusion Framework's architecture, allowing for a more seamless integration and improved developer experience.
119
-
120
- All `app -build-???` has alias to correct commands, but been flagged as deprecated and will be removed in the next major version.
121
-
122
- ### Minor Changes
123
-
124
- - [#3074](https://github.com/equinor/fusion-framework/pull/3074) [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13) Thanks [@odinr](https://github.com/odinr)! - Added CLI, bin and lib functionality to the Fusion Framework CLI for portal development and management.
91
+ ## 10.7.5
125
92
 
126
93
  ### Patch Changes
127
94
 
128
- - [#3074](https://github.com/equinor/fusion-framework/pull/3074) [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13) Thanks [@odinr](https://github.com/odinr)! - update Vite to 6.3.5
129
-
130
- - Updated dependencies [[`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13), [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13), [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13), [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13)]:
131
- - @equinor/fusion-framework-dev-server@1.0.0-next.0
132
- - @equinor/fusion-framework-dev-portal@1.0.0-next.0
95
+ - [#3164](https://github.com/equinor/fusion-framework/pull/3164) [`31e4477`](https://github.com/equinor/fusion-framework/commit/31e447749cffc6d05e9dc3aef8ec49bd29751714) Thanks [@Noggling](https://github.com/Noggling)! - Fixes a bug where the app module was not using the correct configured HTTP client. Updates the configuration to ensure the app module uses the HTTP client that matches its expected name.
133
96
 
134
97
  ## 10.7.4
135
98
 
package/README.md CHANGED
@@ -33,8 +33,6 @@ keywords:
33
33
  - service discovery
34
34
  ---
35
35
 
36
- # Fusion Framework CLI
37
-
38
36
  [![npm version](https://img.shields.io/npm/v/@equinor/fusion-framework-cli.svg?style=flat)](https://www.npmjs.com/package/@equinor/fusion-framework-cli)
39
37
  [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](./LICENSE)
40
38
 
@@ -42,72 +40,91 @@ keywords:
42
40
 
43
41
  ## Table of Contents
44
42
 
45
- - [Fusion Framework CLI](#fusion-framework-cli)
46
- - [Table of Contents](#table-of-contents)
47
- - [Overview](#overview)
48
- - [Features \& Benefits](#features--benefits)
49
- - [Getting Started](#getting-started)
50
- - [1. Install the CLI](#1-install-the-cli)
51
- - [2. Initialize or update your app's manifest and config files](#2-initialize-or-update-your-apps-manifest-and-config-files)
52
- - [3. Start the development server](#3-start-the-development-server)
53
- - [4. Log in to the Fusion Framework (if needed)](#4-log-in-to-the-fusion-framework-if-needed)
54
- - [5. Build and publish your app](#5-build-and-publish-your-app)
55
- - [6. Upload configuration](#6-upload-configuration)
56
- - [Common Commands](#common-commands)
57
- - [Example: package.json](#example-packagejson)
58
- - [Troubleshooting](#troubleshooting)
59
- - [Documentation](#documentation)
60
- - [Contributing](#contributing)
61
- - [Tooling Roadmap](#tooling-roadmap)
43
+ - [Table of Contents](#table-of-contents)
44
+ - [Overview](#overview)
45
+ - [Prerequisites](#prerequisites)
46
+ - [Features \& Benefits](#features--benefits)
47
+ - [Getting Started](#getting-started)
48
+ - [Common Commands](#common-commands)
49
+ - [Example: package.json](#example-packagejson)
50
+ - [Documentation](#documentation)
51
+ - [Troubleshooting](#troubleshooting)
52
+ - [Common Issues](#common-issues)
53
+ - [Getting Help](#getting-help)
62
54
 
63
55
  ## Overview
64
56
 
65
57
  Fusion Framework CLI is a command-line tool for developing, building, and publishing applications and portal templates within the Fusion Framework ecosystem. It streamlines workflows, automates common tasks, and supports modern CI/CD pipelines.
66
58
 
59
+ **What you can build:**
60
+ - **Fusion Applications**: Interactive web apps that run within the Fusion Portal
61
+ - **Portal Templates**: Customizable portal configurations for different business contexts
62
+
63
+ **Key capabilities:**
64
+ - Development server with hot reload and service discovery
65
+ - Application manifest and configuration management
66
+ - Automated building, bundling, and deployment
67
+ - Environment-specific configuration handling
68
+ - Integrated authentication and authorization
69
+ - CI/CD pipeline support with automated publishing
70
+
71
+ ## Prerequisites
72
+
73
+ - **Node.js** (LTS version recommended)
74
+ - **pnpm** (or npm/yarn) package manager
75
+ - **Fusion Framework app or portal project** (or create a new one)
76
+ - **Access to Fusion services** (for authentication and deployment)
77
+
67
78
  ## Features & Benefits
68
79
 
69
- - **Unified developer experience**: One tool for development, build, and deployment.
70
- - **Rapid local development**: Hot reload and fast feedback.
71
- - **Environment-specific configuration**: Manage manifests and configs per environment.
72
- - **Integrated authentication**: Secure your apps locally and in CI/CD pipelines.
73
- - **Service discovery**: Built-in support for Fusion services.
74
- - **Extensible architecture**: Widgets, portals, and more coming soon.
75
- - **Comprehensive documentation**: Migration guides, app/portal setup, and troubleshooting.
80
+ - **🚀 Unified developer experience**: Single tool for the entire development lifecycle - from local development to production deployment
81
+ - **⚡ Rapid local development**: Built-in dev server with hot reload, service discovery, and real-time feedback
82
+ - **🎯 Environment-specific configuration**: Seamlessly manage manifests and configs across dev, test, and production environments
83
+ - **🔐 Integrated authentication**: Secure your apps locally and in CI/CD with Azure AD integration and token management
84
+ - **🔍 Service discovery**: Built-in support for Fusion services with automatic endpoint resolution
85
+ - **📦 Automated bundling & deployment**: One-command building, packaging, and publishing to Fusion registry
86
+ - **🏗️ Extensible architecture**: Support for apps, portals, widgets, and future Fusion components
87
+ - **📚 Comprehensive documentation**: Migration guides, detailed setup instructions, and troubleshooting resources
76
88
 
77
89
  ## Getting Started
78
90
 
79
- ### 1. Install the CLI
91
+ **Install the CLI**
80
92
 
81
93
  ```sh
82
94
  pnpm add -D @equinor/fusion-framework-cli
83
95
  ```
84
96
 
85
- ### 2. Initialize or update your app's manifest and config files
97
+ **Initialize or update your app's manifest and config files**
86
98
 
87
- See [Developing Apps](./docs/application.md) for manual setup and configuration guidance.
99
+ Create the required configuration files for your app:
88
100
 
89
- ### 3. Start the development server
101
+ - `app.manifest.ts` - Defines your app's metadata and capabilities
102
+ - `app.config.ts` - Contains runtime configuration and environment variables
103
+
104
+ See [Developing Apps](./docs/application.md) for detailed setup and configuration guidance.
105
+
106
+ **Start the development server**
90
107
 
91
108
  ```sh
92
109
  pnpm fusion-framework-cli dev
93
110
  ```
94
111
 
95
- ### 4. Log in to the Fusion Framework (if needed)
112
+ **Log in to the Fusion Framework (if needed)**
96
113
 
97
114
  ```sh
98
115
  pnpm fusion-framework-cli auth login
99
116
  ```
100
117
 
101
- ### 5. Build and publish your app
118
+ **Build and publish your app**
102
119
 
103
120
  ```sh
104
121
  pnpm fusion-framework-cli publish --env <environment>
105
122
  ```
106
123
 
107
- ### 6. Upload configuration
124
+ **Upload configuration**
108
125
 
109
126
  ```sh
110
- pnpm fusion-framework-cli app config --upload --env <environment>
127
+ pnpm fusion-framework-cli app config --publish --env <environment>
111
128
  ```
112
129
 
113
130
  > **Tip:** For CI/CD and automation, set the `FUSION_TOKEN` environment variable. See [Authentication](./docs/auth.md) for details.
@@ -116,8 +133,7 @@ pnpm fusion-framework-cli app config --upload --env <environment>
116
133
 
117
134
  | Command | Description |
118
135
  | -------------------------------------- | ------------------------------------ |
119
- | `pnpm fusion-framework-cli dev` | Start local development server |
120
- | `pnpm fusion-framework-cli auth login` | Authenticate with Fusion |
136
+ | `pnpm fusion-framework-cli auth ...` | Authenticate with Fusion |
121
137
  | `pnpm fusion-framework-cli app ...` | Working with Fusion applications |
122
138
  | `pnpm fusion-framework-cli portal ...` | Working with Fusion portal templates |
123
139
 
@@ -128,42 +144,81 @@ A minimal example for a Fusion Framework app:
128
144
  ```json
129
145
  {
130
146
  "name": "@equinor/fusion-framework-app",
131
- "version": "0.0.0",
132
- "description": "Fusion Framework App",
133
- "main": "dist/index.js",
147
+ "version": "1.0.0",
148
+ "description": "My Fusion Framework Application",
149
+ "main": "dist/bundle.js",
134
150
  "files": [
135
- "path-to-some-file/foo.png"
136
- ]
151
+ "dist/",
152
+ "assets/",
153
+ "README.md"
154
+ ],
155
+ "scripts": {
156
+ "build": "fusion-framework-cli app build",
157
+ "dev": "fusion-framework-cli dev",
158
+ "publish": "fusion-framework-cli app publish"
159
+ },
160
+ "devDependencies": {
161
+ "@equinor/fusion-framework-cli": "^11.0.0"
162
+ }
137
163
  }
138
164
  ```
139
165
 
140
- > **Note:** The `main` field should point to the build output (e.g., `dist/index.js`).
166
+ **Key fields:**
167
+ - `main`: **Required** - Points to your build output directory (CLI uses this to determine where to place built files)
168
+ - `files`: Specifies which files to include in your app bundle
169
+ - `scripts`: Convenient shortcuts for common CLI commands
170
+
171
+ > **Note:** The CLI determines the build output location from the `main` field in your package.json. If not specified, it defaults to `dist/bundle.js`.
172
+
173
+ ## Documentation
174
+
175
+ **Getting Started**
176
+ - [Developing Apps](./docs/application.md): Complete guide to building, configuring, and deploying Fusion applications
177
+ - [Developing Portals](./docs/portal.md): Guide to building, configuring, and publishing portal templates
178
+
179
+ **Setup & Configuration**
180
+ - [Authentication](./docs/auth.md): Setting up authentication for local development and CI/CD environments
181
+ - [libsecret Installation](./docs/libsecret.md): Fix credential storage issues on Linux systems
182
+
183
+ **Migration & Updates**
184
+ - [Migration Guide: v10 to v11](./docs/migration-v10-to-v11.md): Breaking changes, deprecated commands, and upgrade instructions
185
+
186
+ **Additional Resources**
187
+ - [CLI Command Reference](./docs/application.md#commands): Detailed documentation of all available commands and options
188
+ - [CI/CD Best Practices](./docs/application.md#cicd): Automated workflows and deployment strategies
189
+ - [Troubleshooting Guide](./docs/application.md#troubleshooting--faq): Common issues and solutions
190
+
191
+ > **Need more help?** Check the [docs folder](./docs/) for additional guides and examples.
141
192
 
142
193
  ## Troubleshooting
143
194
 
144
- If you encounter errors like `libsecret-1.so.0: cannot open shared object file`, it means `libsecret` is missing. see the [libsecret installation guide](./docs/libsecret.md) for instructions on how to install it based on your operating system.
195
+ ### Common Issues
145
196
 
146
- - **Command not found?** Ensure your `node_modules/.bin` is in your PATH or use `pnpm`/`npx`.
147
- - **Authentication issues?** See [Authentication](./docs/auth.md) for troubleshooting tokens and login.
148
- - **Build errors?** Check your app's manifest and config files for typos or missing fields.
149
- - **Need help?** Open an issue or see the [docs folder](./docs/).
197
+ **Authentication & Credentials**
198
+ - **Authentication issues?** See [Authentication Guide](./docs/auth.md) for token setup and troubleshooting
199
+ - **libsecret errors on Linux?** Install libsecret using our [installation guide](./docs/libsecret.md)
150
200
 
151
- ## Documentation
201
+ **CLI & Commands**
202
+ - **Command not found?** Ensure `node_modules/.bin` is in your PATH or use `pnpm`/`npx`
203
+ - **Permission errors?** Check that you have the correct access rights to Fusion services
152
204
 
153
- - [Migration Guide: v10 to v11](./docs/migration-v10-to-v11.md): Learn about breaking changes and how to upgrade.
154
- - [Developing Apps](./docs/application.md): Step-by-step guide to building and configuring apps.
155
- - [Developing Portals](./docs/portal.md): Guide to building, configuring, and publishing portal templates.
156
- - [Authentication](./docs/auth.md): Setting up authentication for local and CI/CD environments.
157
- - For more guides and advanced topics, see the [docs folder](./docs/).
205
+ **Build & Development**
206
+ - **Build errors?** Verify your `app.manifest.ts` and `app.config.ts` files for syntax errors
207
+ - **Dev server not starting?** Check for port conflicts (default: 3000) or use `--port` option
208
+ - **Missing dependencies?** Ensure all required packages are installed with `pnpm install`
158
209
 
159
- ## Contributing
210
+ **Publishing & Deployment**
211
+ - **Upload failures?** Verify your app is registered in the Fusion App Admin
212
+ - **Environment issues?** Check that you're using the correct `--env` parameter
160
213
 
161
- We welcome contributions! See our [contributing guide](../../contributing/development.md) for details on how to get started, coding standards, and submitting pull requests.
214
+ ### Getting Help
162
215
 
163
- ## Tooling Roadmap
216
+ - **Detailed troubleshooting:** See our [comprehensive troubleshooting guide](./docs/application.md#troubleshooting--faq)
217
+ - **Found a bug?** Open an issue on our GitHub repository
218
+ - **Need support?** Check the [docs folder](./docs/) or reach out to the Fusion team
164
219
 
165
- - **Vitest integration** (coming soon)
166
220
  ---
167
221
 
168
222
  For more information, visit the [docs folder](./docs/) or open an issue for support.
169
223
 
224
+