@equinor/fusion-framework-cli 11.0.0-next.8 → 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 -103
  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 -33
  92. package/bin/build/bin.js +0 -28
  93. package/bin/build/cli.js +0 -10099
  94. package/bin/build/create-auth-client-B_j4Y_Dr.js +0 -1415
  95. package/bin/build/portal-config-publish-ezU_DFki.js +0 -29578
  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
@@ -1,6 +1,6 @@
1
- import type { RuntimeEnv } from '../../lib';
2
- import type { ConsoleLogger } from '../utils';
3
- import { type ApiAppConfig } from '../../lib/app';
1
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
2
+ import { type ApiAppConfig } from '@equinor/fusion-framework-cli/app';
3
+ import type { ConsoleLogger } from '../utils/ConsoleLogger.js';
4
4
  /**
5
5
  * Resolves the application configuration based on the provided runtime environment and options.
6
6
  * Handles logging, error reporting, and fallback to built-in config if no local config is found.
@@ -1,5 +1,5 @@
1
- import type { RuntimeEnv, ResolvedPackage } from '../../lib';
2
- import type { ConsoleLogger } from '../utils';
1
+ import type { RuntimeEnv, ResolvedPackage } from '@equinor/fusion-framework-cli/lib';
2
+ import type { ConsoleLogger } from '../utils/index.js';
3
3
  /**
4
4
  * Resolves the application manifest for a given package and environment.
5
5
  * Attempts to load a manifest file if specified, otherwise falls back to generating a manifest from package.json.
@@ -14,4 +14,4 @@ import type { ConsoleLogger } from '../utils';
14
14
  export declare const resolveAppManifest: (env: RuntimeEnv, pkg: ResolvedPackage, options?: {
15
15
  log?: ConsoleLogger | null;
16
16
  manifestPath?: string;
17
- }) => Promise<import("@equinor/fusion-framework-module-app").AppManifest>;
17
+ }) => Promise<import("@equinor/fusion-framework-cli/app").AppManifest>;
@@ -1,6 +1,6 @@
1
- import type { RuntimeEnv } from '../../lib';
2
- import type { ConsoleLogger } from '../utils';
3
- import { type PortalConfig } from '../../lib/portal';
1
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
2
+ import { type PortalConfig } from '@equinor/fusion-framework-cli/portal';
3
+ import type { ConsoleLogger } from '../utils/index.js';
4
4
  /**
5
5
  * Resolves the portal configuration based on the provided runtime environment and options.
6
6
  * Handles logging, error reporting, and fallback to built-in config if no local config is found.
@@ -1,7 +1,6 @@
1
- import type { RuntimeEnv } from '../../lib';
2
- import type { ConsoleLogger } from '../utils';
3
- import type { ResolvedPackage } from '../../lib/utils/resolve-package.js';
4
- import { type PortalManifest } from '../../lib/portal';
1
+ import type { ResolvedPackage, RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
2
+ import { type PortalManifest } from '@equinor/fusion-framework-cli/portal';
3
+ import type { ConsoleLogger } from '../utils/index.js';
5
4
  /**
6
5
  * Resolves the portal manifest for a given runtime environment and package.
7
6
  *
@@ -1,4 +1,4 @@
1
- import type { ConsoleLogger } from '../utils';
1
+ import type { ConsoleLogger } from '../utils/index.js';
2
2
  /**
3
3
  * Resolves the application package by fetching its metadata and logging relevant information.
4
4
  *
@@ -9,5 +9,5 @@ import type { ConsoleLogger } from '../utils';
9
9
  * @returns A promise that resolves to the package information, including its packageJson and root directory.
10
10
  * @throws Will throw an error if the package resolution fails.
11
11
  */
12
- export declare function resolveProjectPackage(log?: ConsoleLogger | null): Promise<import("../../lib").ResolvedPackage>;
12
+ export declare function resolveProjectPackage(log?: ConsoleLogger | null): Promise<import("@equinor/fusion-framework-cli/lib").ResolvedPackage>;
13
13
  export default resolveProjectPackage;
@@ -3,9 +3,18 @@ export { bundleApp } from './app-pack.js';
3
3
  export { generateApplicationConfig } from './app-config.js';
4
4
  export { publishAppConfig } from './app-config-publish.js';
5
5
  export { startAppDevServer } from './app-dev.js';
6
+ export { checkApp } from './app-check.js';
7
+ export { loadAppManifest } from './app-manifest.js';
8
+ export { uploadApplication } from './app-upload.js';
9
+ export { tagApplication, AllowedTags as AllowedAppTags } from './app-tag.js';
10
+ export { startPortalDevServer } from './portal-dev.js';
6
11
  export { buildPortal } from './portal-build.js';
7
12
  export { bundlePortal } from './portal-pack.js';
8
13
  export { loadPortalManifest } from './portal-manifest.js';
9
14
  export { generatePortalConfig } from './portal-config.js';
10
15
  export { publishPortalConfig } from './portal-config-publish.js';
16
+ export { uploadPortalBundle, type UploadPortalOptions } from './portal-upload.js';
17
+ export { tagPortal, AllowedTags as AllowedPortalTags } from './portal-tag.js';
11
18
  export { pack } from './pack.js';
19
+ export { ConsoleLogger } from './utils/ConsoleLogger.js';
20
+ export { initializeFramework, resolveDefaultEnv, type FusionFramework, type FusionFrameworkSettings, FusionEnv, } from './framework.node.js';
@@ -1,6 +1,6 @@
1
1
  import AdmZip from 'adm-zip';
2
2
  import type { ReadResult as PackageInfo } from 'read-package-up';
3
- import { type ConsoleLogger } from './utils';
3
+ import { type ConsoleLogger } from './utils/index.js';
4
4
  /**
5
5
  * Options for packaging an application bundle into a zip archive.
6
6
  *
@@ -1,5 +1,5 @@
1
- import type { RuntimeEnv } from '../lib';
2
- import { type ConsoleLogger } from './utils';
1
+ import { type FusionEnv } from './framework.node.js';
2
+ import { type ConsoleLogger } from './utils/index.js';
3
3
  /**
4
4
  * Options for building a portal application using Vite.
5
5
  *
@@ -13,7 +13,7 @@ import { type ConsoleLogger } from './utils';
13
13
  * @public
14
14
  */
15
15
  export type BuildApplicationOptions = {
16
- env?: Partial<RuntimeEnv>;
16
+ env?: Partial<FusionEnv>;
17
17
  manifest?: string;
18
18
  log?: ConsoleLogger | null;
19
19
  };
@@ -29,7 +29,7 @@ export type BuildApplicationOptions = {
29
29
  * @public
30
30
  */
31
31
  export declare const buildPortal: (opt?: BuildApplicationOptions) => Promise<{
32
- pkg: import("../lib").ResolvedPackage;
32
+ pkg: import("../lib/index.js").ResolvedPackage;
33
33
  manifest: {
34
34
  build: {
35
35
  version: string;
@@ -38,11 +38,11 @@ export declare const buildPortal: (opt?: BuildApplicationOptions) => Promise<{
38
38
  allowedExtensions: string[];
39
39
  templateEntry: string;
40
40
  schemaEntry: string;
41
- config?: Record<string, unknown> | undefined;
42
41
  assetPath?: string | undefined;
43
42
  githubRepo?: string | undefined;
44
43
  projectPage?: string | undefined;
45
44
  annotations?: Record<string, string> | undefined;
45
+ config?: Record<string, unknown> | undefined;
46
46
  schema?: Record<string, unknown> | undefined;
47
47
  };
48
48
  name: string;
@@ -1,5 +1,5 @@
1
- import { type FusionEnv, type FusionFrameworkSettings } from '../lib/framework.node.js';
2
- import { type ConsoleLogger } from './utils';
1
+ import { type FusionEnv, type FusionFrameworkSettings } from './framework.node.js';
2
+ import { type ConsoleLogger } from './utils/index.js';
3
3
  type PortalConfigPublishOptions = {
4
4
  config?: string;
5
5
  portal: {
@@ -1,5 +1,5 @@
1
- import type { RuntimeEnv } from '../lib';
2
- import { type ConsoleLogger } from './utils';
1
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
2
+ import { type ConsoleLogger } from './utils/index.js';
3
3
  /**
4
4
  * Options for generating the portal configuration.
5
5
  *
@@ -40,7 +40,7 @@ interface GeneratePortalConfigOptions {
40
40
  * @public
41
41
  */
42
42
  export declare const generatePortalConfig: (options?: GeneratePortalConfigOptions) => Promise<{
43
- config: import("../lib/portal").PortalConfig;
44
- pkg: import("../lib").ResolvedPackage;
43
+ config: import("../lib/portal/portal-config.js").PortalConfig;
44
+ pkg: import("@equinor/fusion-framework-cli/lib").ResolvedPackage;
45
45
  }>;
46
46
  export {};
@@ -1,5 +1,5 @@
1
- import type { RuntimeEnv } from '../lib';
2
- import { type ConsoleLogger } from './utils';
1
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
2
+ import { type ConsoleLogger } from './utils/index.js';
3
3
  /**
4
4
  * Starts the portal development server for local development and testing.
5
5
  *
@@ -1,5 +1,5 @@
1
- import type { RuntimeEnv } from '../lib';
2
- import type { ConsoleLogger } from './utils';
1
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
2
+ import type { ConsoleLogger } from './utils/index.js';
3
3
  /**
4
4
  * Options for resolving the portal manifest.
5
5
  *
@@ -43,18 +43,18 @@ export declare const loadPortalManifest: (options: ResolvePortalManifestOptions)
43
43
  allowedExtensions: string[];
44
44
  templateEntry: string;
45
45
  schemaEntry: string;
46
- config?: Record<string, unknown> | undefined;
47
46
  assetPath?: string | undefined;
48
47
  githubRepo?: string | undefined;
49
48
  projectPage?: string | undefined;
50
49
  annotations?: Record<string, string> | undefined;
50
+ config?: Record<string, unknown> | undefined;
51
51
  schema?: Record<string, unknown> | undefined;
52
52
  };
53
53
  name: string;
54
54
  displayName?: string | undefined;
55
55
  description?: string | undefined;
56
56
  };
57
- pkg: import("../lib").ResolvedPackage;
57
+ pkg: import("@equinor/fusion-framework-cli/lib").ResolvedPackage;
58
58
  env: RuntimeEnv;
59
59
  }>;
60
60
  export default loadPortalManifest;
@@ -1,4 +1,4 @@
1
- import type { ConsoleLogger } from './utils/ConsoleLogger';
1
+ import type { ConsoleLogger } from './utils/ConsoleLogger.js';
2
2
  /**
3
3
  * Options for bundling a portal into an archive for distribution or deployment.
4
4
  *
@@ -39,16 +39,16 @@ export declare const bundlePortal: (options: BundlePortalOptions) => Promise<{
39
39
  allowedExtensions: string[];
40
40
  templateEntry: string;
41
41
  schemaEntry: string;
42
- config?: Record<string, unknown> | undefined;
43
42
  assetPath?: string | undefined;
44
43
  githubRepo?: string | undefined;
45
44
  projectPage?: string | undefined;
46
45
  annotations?: Record<string, string> | undefined;
46
+ config?: Record<string, unknown> | undefined;
47
47
  schema?: Record<string, unknown> | undefined;
48
48
  };
49
49
  name: string;
50
50
  displayName?: string | undefined;
51
51
  description?: string | undefined;
52
52
  };
53
- schema: import("../lib/portal").PortalSchema;
53
+ schema: import("@equinor/fusion-framework-cli/portal").PortalSchema;
54
54
  }>;
@@ -1,5 +1,5 @@
1
- import { type ConsoleLogger } from './utils';
2
- import type { FusionFramework } from '../lib/framework.node.js';
1
+ import type { FusionFramework } from './framework.node.js';
2
+ import { type ConsoleLogger } from './utils/index.js';
3
3
  /**
4
4
  * Allowed tags for portal versions in the portal service.
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import AdmZip from 'adm-zip';
2
- import { type ConsoleLogger } from './utils';
3
- import type { FusionFramework } from '../lib/framework.node.js';
2
+ import type { FusionFramework } from './framework.node.js';
3
+ import type { ConsoleLogger } from './utils/ConsoleLogger.js';
4
4
  /**
5
5
  * Options for uploading a portal bundle to the portal service.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import type { AppManifest } from '@equinor/fusion-framework-module-app';
2
2
  import type { ApiAppConfig } from '@equinor/fusion-framework-module-app/schemas.js';
3
- import type { RuntimeEnv } from '../../lib';
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
5
  /**
6
6
  * PortalManifest describes the minimal structure required for a portal manifest.
@@ -30,7 +30,7 @@ export type CreateDevServerOptions = {
30
30
  template?: Partial<FusionTemplateEnv>;
31
31
  portal?: {
32
32
  manifest: PortalManifest;
33
- config: PortalConfig;
33
+ config?: PortalConfig;
34
34
  };
35
35
  app?: {
36
36
  manifest: AppManifest;
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * @command resolve
9
9
  * @description Resolve and display information about a service registered in Fusion service discovery.
10
- * @argument {string} service - Name of the service to resolve in Fusion service discovery.
10
+ * @param {string} service - Name of the service to resolve in Fusion service discovery.
11
11
  * @option {string} --env - Environment to use (e.g., prod, test).
12
12
  * @option {string} --token - Authentication token.
13
13
  * @option {string} --tenantId - Tenant ID for authentication.
@@ -1,21 +1 @@
1
- /**
2
- * Entry point for the Fusion Framework CLI.
3
- *
4
- * This file sets up the CLI program, loads the package metadata, and registers all available commands.
5
- *
6
- * Key responsibilities:
7
- * - Locates the CLI's root directory and package.json using read-package-up.
8
- * - Sets the CLI_BIN environment variable for internal use.
9
- * - Initializes the Commander.js program with name, version, and description from package.json.
10
- * - Registers all CLI commands via the registerCommands function.
11
- * - Parses process arguments and starts the CLI.
12
- *
13
- * Maintenance notes:
14
- * - To add new commands, update the registerCommands module.
15
- * - To change CLI metadata (name, version, description), update package.json.
16
- * - This file should remain minimal and only handle top-level CLI setup logic.
17
- * - For troubleshooting, ensure the CLI_BIN path is set correctly and that package.json is accessible.
18
- *
19
- * For more details, see the Fusion Framework CLI documentation or contact the maintainers.
20
- */
21
1
  export {};
@@ -1,5 +1,4 @@
1
- import { FusionEnv } from '../../lib/framework.node.js';
2
- export type { FusionEnv } from '../../lib/framework.node.js';
1
+ import { FusionEnv } from '@equinor/fusion-framework-cli/bin';
3
2
  /**
4
3
  * Creates an environment option for Fusion Framework CLI commands.
5
4
  *
@@ -1,6 +1,6 @@
1
1
  import type z from 'zod';
2
- import type { RuntimeEnv } from '../types';
3
- import type { ApiAppConfig, ApiAppConfigSchema } from './schemas';
2
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
3
+ import type { ApiAppConfig, ApiAppConfigSchema } from './schemas.js';
4
4
  export type { ApiAppConfig as AppConfig } from './schemas.js';
5
5
  export { mergeAppConfig } from './merge-app-config.js';
6
6
  /**
@@ -1,5 +1,5 @@
1
1
  import type { AppManifest } from '@equinor/fusion-framework-module-app';
2
- import type { RuntimeEnv } from '../types';
2
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
3
3
  /**
4
4
  * Type representing the application manifest structure used by the Fusion Framework.
5
5
  * Imported from the '@equinor/fusion-framework-module-app' package for consistency across modules.
@@ -1,4 +1,4 @@
1
- import type { AppConfig } from './app-config';
1
+ import type { AppConfig } from '@equinor/fusion-framework-cli/app';
2
2
  /**
3
3
  * Merges a base application configuration object with an overrides object,
4
4
  * returning a new configuration object. If the `scopes` property is present
@@ -1,7 +1,7 @@
1
1
  import type { AppManifest } from '@equinor/fusion-framework-module-app';
2
2
  import type { RecursivePartial } from '../utils/types.js';
3
3
  /**
4
- * Deeply merges two application manifests using lodash's mergeWith.
4
+ * Deeply merges two application manifests using deepmerge.
5
5
  *
6
6
  * This utility is intended for combining a base manifest with an override manifest,
7
7
  * supporting recursive merging of nested properties. It is commonly used in scenarios
@@ -1,4 +1,5 @@
1
1
  export type { RuntimeEnv } from './types.js';
2
- export type { ResolvedPackage } from './utils/resolve-package.js';
3
- export { initializeFramework, type FusionFramework } from './framework.node.js';
2
+ export { resolvePackage, type ResolvedPackage } from './utils/resolve-package.js';
3
+ export { resolveEntryPoint } from './utils/resolve-source-entry-point.js';
4
+ export { loadDevServerConfig } from './load-dev-server-config.js';
4
5
  export { defineAppConfig, defineAppManifest } from './legacy.js';
@@ -21,4 +21,4 @@ export declare const defineAppConfig: (...args: Parameters<typeof _defineConfig>
21
21
  *
22
22
  * @param args - Arguments passed to the new defineAppManifest function.
23
23
  */
24
- export declare const defineAppManifest: (...args: Parameters<typeof _defineManifest>) => import("./app/app-manifest.js").AppManifestFn<import("@equinor/fusion-framework-module-app").AppManifest>;
24
+ export declare const defineAppManifest: (...args: Parameters<typeof _defineManifest>) => import("./app/app-manifest.js").AppManifestFn<import("node_modules/@equinor/fusion-framework-module-app/dist/types/types.js").AppManifest>;
@@ -1,5 +1,5 @@
1
1
  import { type ImportConfigResult } from '@equinor/fusion-imports';
2
- import type { RuntimeEnv } from './types.js';
2
+ import type { RecursivePartial, RuntimeEnv } from './types.js';
3
3
  import type { DevServerOptions } from '@equinor/fusion-framework-dev-server';
4
4
  /**
5
5
  * Type definition for a function that generates or modifies DevServerOptions.
@@ -9,7 +9,7 @@ import type { DevServerOptions } from '@equinor/fusion-framework-dev-server';
9
9
  */
10
10
  export type DevServerConfigFn = (env: RuntimeEnv, args: {
11
11
  base: DevServerOptions;
12
- }) => Promise<DevServerOptions | undefined> | DevServerOptions | undefined;
12
+ }) => Promise<RecursivePartial<DevServerOptions> | undefined> | RecursivePartial<DevServerOptions> | undefined;
13
13
  /**
14
14
  * Type definition for a dev server config export, which can be either a DevServerOptions object or a function.
15
15
  */
@@ -1,5 +1,5 @@
1
1
  import type { DevServerOptions } from '@equinor/fusion-framework-dev-server';
2
- import type { RecursivePartial } from './utils/types';
2
+ import type { RecursivePartial } from './utils/types.js';
3
3
  /**
4
4
  * Merges a base development server configuration with an overrides object.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import type { PackageJson } from 'type-fest';
2
- import type { RuntimeEnv } from '../types';
2
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
3
3
  import type { PortalManifest } from './portal-manifest.js';
4
4
  /**
5
5
  * Creates a `PortalManifest` object from the provided `package.json` data and runtime environment.
@@ -1,4 +1,4 @@
1
- import type { RuntimeEnv } from '../types';
1
+ import type { RecursivePartial, RuntimeEnv } from '../types.js';
2
2
  import type { PortalManifest } from './portal-manifest.js';
3
3
  /**
4
4
  * A function type for generating or modifying a portal manifest based on the runtime environment and provided arguments.
@@ -10,7 +10,7 @@ import type { PortalManifest } from './portal-manifest.js';
10
10
  */
11
11
  export type PortalManifestFn<T extends Partial<PortalManifest>> = (env: RuntimeEnv, args: {
12
12
  base: T;
13
- }) => T | Promise<T | void> | T | void;
13
+ }) => Promise<RecursivePartial<T> | void> | RecursivePartial<T> | void;
14
14
  /**
15
15
  * Represents a value that can either be a partial portal manifest object or a function returning such an object.
16
16
  *
@@ -1,4 +1,4 @@
1
- import type { RuntimeEnv } from '../types';
1
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
2
2
  /**
3
3
  * Represents a generic portal schema as a record of key-value pairs.
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { RuntimeEnv } from '../types';
1
+ import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
2
2
  /**
3
3
  * Represents the configuration object for a portal.
4
4
  *
@@ -15,7 +15,7 @@ import type { RuntimeEnv } from '../types';
15
15
  * };
16
16
  * ```
17
17
  */
18
- export type PortalConfig = Record<any, any>;
18
+ export type PortalConfig = Record<string, unknown>;
19
19
  /**
20
20
  * A function type for defining dynamic or static portal configuration.
21
21
  *
@@ -28,11 +28,11 @@ export declare const PortalManifestBuildSchema: z.ZodObject<{
28
28
  allowedExtensions: string[];
29
29
  templateEntry: string;
30
30
  schemaEntry: string;
31
- config?: Record<string, unknown> | undefined;
32
31
  assetPath?: string | undefined;
33
32
  githubRepo?: string | undefined;
34
33
  projectPage?: string | undefined;
35
34
  annotations?: Record<string, string> | undefined;
35
+ config?: Record<string, unknown> | undefined;
36
36
  schema?: Record<string, unknown> | undefined;
37
37
  }, {
38
38
  version: string;
@@ -41,11 +41,11 @@ export declare const PortalManifestBuildSchema: z.ZodObject<{
41
41
  allowedExtensions: string[];
42
42
  templateEntry: string;
43
43
  schemaEntry: string;
44
- config?: Record<string, unknown> | undefined;
45
44
  assetPath?: string | undefined;
46
45
  githubRepo?: string | undefined;
47
46
  projectPage?: string | undefined;
48
47
  annotations?: Record<string, string> | undefined;
48
+ config?: Record<string, unknown> | undefined;
49
49
  schema?: Record<string, unknown> | undefined;
50
50
  }>;
51
51
  /**
@@ -82,11 +82,11 @@ export declare const PortalManifestSchema: z.ZodObject<{
82
82
  allowedExtensions: string[];
83
83
  templateEntry: string;
84
84
  schemaEntry: string;
85
- config?: Record<string, unknown> | undefined;
86
85
  assetPath?: string | undefined;
87
86
  githubRepo?: string | undefined;
88
87
  projectPage?: string | undefined;
89
88
  annotations?: Record<string, string> | undefined;
89
+ config?: Record<string, unknown> | undefined;
90
90
  schema?: Record<string, unknown> | undefined;
91
91
  }, {
92
92
  version: string;
@@ -95,11 +95,11 @@ export declare const PortalManifestSchema: z.ZodObject<{
95
95
  allowedExtensions: string[];
96
96
  templateEntry: string;
97
97
  schemaEntry: string;
98
- config?: Record<string, unknown> | undefined;
99
98
  assetPath?: string | undefined;
100
99
  githubRepo?: string | undefined;
101
100
  projectPage?: string | undefined;
102
101
  annotations?: Record<string, string> | undefined;
102
+ config?: Record<string, unknown> | undefined;
103
103
  schema?: Record<string, unknown> | undefined;
104
104
  }>;
105
105
  }, "strip", z.ZodTypeAny, {
@@ -110,11 +110,11 @@ export declare const PortalManifestSchema: z.ZodObject<{
110
110
  allowedExtensions: string[];
111
111
  templateEntry: string;
112
112
  schemaEntry: string;
113
- config?: Record<string, unknown> | undefined;
114
113
  assetPath?: string | undefined;
115
114
  githubRepo?: string | undefined;
116
115
  projectPage?: string | undefined;
117
116
  annotations?: Record<string, string> | undefined;
117
+ config?: Record<string, unknown> | undefined;
118
118
  schema?: Record<string, unknown> | undefined;
119
119
  };
120
120
  name: string;
@@ -128,11 +128,11 @@ export declare const PortalManifestSchema: z.ZodObject<{
128
128
  allowedExtensions: string[];
129
129
  templateEntry: string;
130
130
  schemaEntry: string;
131
- config?: Record<string, unknown> | undefined;
132
131
  assetPath?: string | undefined;
133
132
  githubRepo?: string | undefined;
134
133
  projectPage?: string | undefined;
135
134
  annotations?: Record<string, string> | undefined;
135
+ config?: Record<string, unknown> | undefined;
136
136
  schema?: Record<string, unknown> | undefined;
137
137
  };
138
138
  name: string;
@@ -32,3 +32,32 @@ export type RuntimeEnv = {
32
32
  */
33
33
  environment?: string | null;
34
34
  };
35
+ /**
36
+ * Makes all properties of a type optional, recursively.
37
+ * For array properties, applies the transformation to the array's element type.
38
+ *
39
+ * @template T - The type to make recursively partial.
40
+ *
41
+ * @example
42
+ * type Example = {
43
+ * a: number;
44
+ * b: {
45
+ * c: string;
46
+ * d: number[];
47
+ * };
48
+ * };
49
+ * // RecursivePartial<Example> will be:
50
+ * // {
51
+ * // a?: number;
52
+ * // b?: {
53
+ * // c?: string;
54
+ * // d?: number[];
55
+ * // };
56
+ * // }
57
+ */
58
+ export type RecursivePartial<T> = {
59
+ [P in keyof T]?: T[P] extends Array<infer U> ? Array<Value<U>> : Value<T[P]>;
60
+ };
61
+ type AllowedPrimitives = Function | boolean | string | number | Date;
62
+ type Value<T> = T extends AllowedPrimitives ? T : RecursivePartial<T>;
63
+ export {};
@@ -1,3 +1,4 @@
1
+ export { assert } from './assert.js';
1
2
  export { resolveEntryPoint } from './resolve-source-entry-point.js';
2
3
  export { resolvePackage, type ResolvedPackage } from './resolve-package.js';
3
4
  export { fileExists, fileExistsSync } from './file-exists.js';
@@ -1,3 +1,37 @@
1
+ /**
2
+ * Represents metadata annotations related to a release process.
3
+ *
4
+ * @property source - The origin or system that triggered the release.
5
+ * @property reason - The reason or context for the release.
6
+ * @property [repository] - The repository associated with the release, if applicable.
7
+ * @property [actor] - The user or system that initiated the release.
8
+ * @property [workflow] - The workflow or pipeline responsible for the release.
9
+ * @property [runId] - The unique identifier for the workflow run.
10
+ * @property [branch] - The branch from which the release was made.
11
+ * @property [commitId] - The commit hash associated with the release.
12
+ * @property [runUrl] - The URL to the workflow run details.
13
+ * @property [htmlUrl] - The URL to the release or related resource in a web interface.
14
+ * @property [tag] - The tag name associated with the release.
15
+ */
16
+ export type ReleaseAnnotations = {
17
+ source: string;
18
+ reason: string;
19
+ actor?: string;
20
+ workflow?: string;
21
+ runId?: string;
22
+ branch?: string;
23
+ commitId?: string;
24
+ runUrl?: string;
25
+ repository?: string;
26
+ repository_homepage?: string;
27
+ repository_license?: string;
28
+ repository_owner?: string;
29
+ repository_owner_avatar_url?: string;
30
+ htmlUrl?: string;
31
+ tag?: string;
32
+ sender_login?: string;
33
+ sender_avatar_url?: string;
34
+ };
1
35
  /**
2
36
  * Resolves CI/CD environment-specific annotation variables.
3
37
  *
@@ -8,4 +42,4 @@
8
42
  * @returns {Record<string, string>} An object containing annotation variables for the detected environment.
9
43
  * If no known environment is detected, returns an empty object.
10
44
  */
11
- export declare const resolveAnnotations: () => Record<string, string>;
45
+ export declare const resolveAnnotations: () => ReleaseAnnotations | undefined;
@@ -1,10 +1,35 @@
1
+ /**
2
+ * Represents metadata annotations related to a DevOps pipeline run.
3
+ *
4
+ * @property runId - The unique identifier for the pipeline run.
5
+ * @property pipelineName - The name of the pipeline.
6
+ * @property repository - The name or URL of the source code repository.
7
+ * @property project - The name of the project within the DevOps organization.
8
+ * @property orgUrl - The URL of the DevOps organization.
9
+ * @property actor - The user or service that triggered the pipeline run.
10
+ * @property branch - The branch name associated with the pipeline run.
11
+ * @property commitId - The commit SHA or identifier for the pipeline run.
12
+ * @property runUrl - The URL to view the pipeline run details.
13
+ */
14
+ export interface DevopsAnnotations {
15
+ runId: string;
16
+ pipelineName: string;
17
+ repository: string;
18
+ project: string;
19
+ orgUrl: string;
20
+ actor: string;
21
+ branch: string;
22
+ commitId: string;
23
+ runUrl: string;
24
+ reason: string;
25
+ }
1
26
  /**
2
27
  * Resolves Azure DevOps-specific annotation variables from environment variables.
3
28
  *
4
29
  * This function extracts relevant build and repository information from Azure DevOps environment variables.
5
30
  * It constructs a set of annotation variables that can be used for reporting or logging purposes in CI/CD pipelines.
6
31
  *
7
- * @returns {Record<string, string>} An object containing Azure DevOps annotation variables such as runId, repository,
32
+ * @returns {DevopsAnnotations} An object containing Azure DevOps annotation variables such as runId, repository,
8
33
  * project, orgUrl, actor, branch, commitId, and runUrl. If a variable is not found, its value defaults to 'unknown'.
9
34
  *
10
35
  * Environment variables used by this function (see: https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-pipelines&tabs=yaml):
@@ -26,5 +51,5 @@
26
51
  * - To add more annotations, extract additional environment variables as needed and include them in the returned object.
27
52
  * - For custom pipelines or self-hosted agents, verify that all required environment variables are available.
28
53
  */
29
- export declare const resolveAnnotations: () => Record<string, string>;
30
- export default resolveAnnotations;
54
+ export declare const resolveDevopsAnnotations: () => DevopsAnnotations;
55
+ export default resolveDevopsAnnotations;
@@ -11,3 +11,4 @@
11
11
  * @throws Will throw an error if the `git` command fails or is not available.
12
12
  */
13
13
  export declare const resolveGitCommitSha: (ref?: string) => string | undefined;
14
+ export default resolveGitCommitSha;