@equinor/fusion-framework-cli 13.3.19-next.0 → 14.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 (42) hide show
  1. package/CHANGELOG.md +114 -8
  2. package/README.md +150 -193
  3. package/bin/build/bin.mjs +1 -1
  4. package/bin/build/cli.mjs +3 -3
  5. package/dist/esm/lib/app/app-manifest.js.map +1 -1
  6. package/dist/esm/lib/app/index.js +8 -0
  7. package/dist/esm/lib/app/index.js.map +1 -1
  8. package/dist/esm/lib/dev-server.js +8 -0
  9. package/dist/esm/lib/dev-server.js.map +1 -1
  10. package/dist/esm/lib/index.js.map +1 -1
  11. package/dist/esm/lib/portal/index.js +8 -0
  12. package/dist/esm/lib/portal/index.js.map +1 -1
  13. package/dist/esm/lib/portal/portal-manifest.js +20 -1
  14. package/dist/esm/lib/portal/portal-manifest.js.map +1 -1
  15. package/dist/esm/lib/utils/expect.js +16 -2
  16. package/dist/esm/lib/utils/expect.js.map +1 -1
  17. package/dist/esm/lib/utils/file-exists.js +28 -0
  18. package/dist/esm/lib/utils/file-exists.js.map +1 -1
  19. package/dist/esm/lib/utils/index.js +8 -0
  20. package/dist/esm/lib/utils/index.js.map +1 -1
  21. package/dist/esm/version.js +1 -1
  22. package/dist/types/bin/app-config-publish.d.ts +9 -0
  23. package/dist/types/bin/index.d.ts +10 -0
  24. package/dist/types/bin/portal-config-publish.d.ts +10 -0
  25. package/dist/types/bin/utils/index.d.ts +9 -0
  26. package/dist/types/cli/commands/index.d.ts +9 -0
  27. package/dist/types/lib/app/app-manifest.d.ts +4 -14
  28. package/dist/types/lib/app/index.d.ts +9 -1
  29. package/dist/types/lib/dev-server.d.ts +8 -0
  30. package/dist/types/lib/index.d.ts +8 -0
  31. package/dist/types/lib/legacy.d.ts +1 -1
  32. package/dist/types/lib/portal/index.d.ts +8 -0
  33. package/dist/types/lib/portal/portal-manifest.d.ts +20 -0
  34. package/dist/types/lib/utils/expect.d.ts +18 -2
  35. package/dist/types/lib/utils/file-exists.d.ts +30 -0
  36. package/dist/types/lib/utils/index.d.ts +8 -0
  37. package/dist/types/version.d.ts +1 -1
  38. package/docs/ai-commands.md +162 -40
  39. package/docs/application.md +27 -0
  40. package/docs/auth.md +9 -0
  41. package/docs/portal.md +20 -0
  42. package/package.json +21 -25
@@ -1 +1 @@
1
- {"version":3,"file":"app-manifest.js","sourceRoot":"","sources":["../../../../src/lib/app/app-manifest.ts"],"names":[],"mappings":"AA0CA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"app-manifest.js","sourceRoot":"","sources":["../../../../src/lib/app/app-manifest.ts"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAiB,EAAE,EAAE,CAAC,EAAE,CAAC"}
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Application manifest and configuration utilities for `@equinor/fusion-framework-cli/app`.
3
+ *
4
+ * Provides helpers for defining, loading, merging, and validating Fusion application
5
+ * manifests and configurations.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  export { defineAppManifest, } from './app-manifest.js';
2
10
  export { createAppManifestFromPackage } from './create-app-manifest.js';
3
11
  export { mergeAppManifests } from './merge-app-manifest.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,GAIlB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAA0B,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAoC,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAwB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAE,kBAAkB,EAAqB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/app/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,iBAAiB,GAGlB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAA0B,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAoC,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAwB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAE,kBAAkB,EAAqB,MAAM,cAAc,CAAC"}
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Dev-server re-exports for `@equinor/fusion-framework-cli/dev-server`.
3
+ *
4
+ * Aggregates service processing, configuration loading/merging, and type
5
+ * definitions used when working with the Fusion dev server.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  export { processServices } from '@equinor/fusion-framework-dev-server';
2
10
  export { loadDevServerConfig, defineDevServerConfig, } from './load-dev-server-config.js';
3
11
  export { mergeDevServerConfig } from './merge-dev-server-config.js';
@@ -1 +1 @@
1
- {"version":3,"file":"dev-server.js","sourceRoot":"","sources":["../../../src/lib/dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"dev-server.js","sourceRoot":"","sources":["../../../src/lib/dev-server.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAwB,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,eAAe,GAIhB,MAAM,wBAAwB,CAAC;AAEhC,mEAAmE;AACnE,kDAAkD;AAClD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAwB,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,eAAe,GAIhB,MAAM,wBAAwB,CAAC;AAEhC,mEAAmE;AACnE,kDAAkD;AAClD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Portal manifest, configuration, and schema utilities for `@equinor/fusion-framework-cli/portal`.
3
+ *
4
+ * Provides helpers for defining, loading, merging, and validating Fusion portal
5
+ * manifests, configurations, and schemas.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  export { createPortalManifestFromPackage, definePortalManifest, loadPortalManifest, validatePortalManifest, } from './portal-manifest.js';
2
10
  export { loadPortalSchema, definePortalSchema, } from './load-portal-schema.js';
3
11
  export { definePortalConfig, } from './portal-config.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/portal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GAIvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GAInB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,kBAAkB,GAGnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,gBAAgB,GAEjB,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/portal/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GAIvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GAInB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,kBAAkB,GAGnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,gBAAgB,GAEjB,MAAM,yBAAyB,CAAC"}
@@ -2,7 +2,26 @@ import { PortalManifestSchema } from './portal-manifest.schema.js';
2
2
  // Re-export relevant manifest utilities and types for external use
3
3
  export { loadPortalManifest, } from './load-portal-manifest.js';
4
4
  export { createPortalManifestFromPackage } from './create-portal-manifest.js';
5
- // Helper to define a typed portal manifest function
5
+ /**
6
+ * Utility to define a portal manifest function with proper typing.
7
+ *
8
+ * This is a no-op at runtime — it returns the provided function unchanged.
9
+ * It exists to provide type safety and editor support when authoring portal manifest files.
10
+ *
11
+ * @template T - The portal manifest type, extending `PortalManifestSchemaType`.
12
+ * @param fn - A function that receives the runtime environment and base manifest, and returns manifest overrides.
13
+ * @returns The provided function, unchanged.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { definePortalManifest } from '@equinor/fusion-framework-cli/portal';
18
+ *
19
+ * export default definePortalManifest((env, { base }) => ({
20
+ * ...base,
21
+ * name: 'my-portal',
22
+ * }));
23
+ * ```
24
+ */
6
25
  export const definePortalManifest = (fn) => fn;
7
26
  export { PortalManifestSchema, PortalManifestBuildSchema, } from './portal-manifest.schema.js';
8
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"portal-manifest.js","sourceRoot":"","sources":["../../../../src/lib/portal/portal-manifest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,mEAAmE;AACnE,OAAO,EACL,kBAAkB,GAGnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAE9E,oDAAoD;AACpD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAqC,EAAuB,EAAE,EAAE,CAClG,EAAE,CAAC;AAEL,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAG1B,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAiB;IACtD,8DAA8D;IAC9D,OAAO,oBAAoB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
1
+ {"version":3,"file":"portal-manifest.js","sourceRoot":"","sources":["../../../../src/lib/portal/portal-manifest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,mEAAmE;AACnE,OAAO,EACL,kBAAkB,GAGnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAqC,EAAuB,EAAE,EAAE,CAClG,EAAE,CAAC;AAEL,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAG1B,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAiB;IACtD,8DAA8D;IAC9D,OAAO,oBAAoB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
@@ -1,4 +1,20 @@
1
1
  import assert from 'node:assert';
2
+ /**
3
+ * Lightweight assertion helper that provides a fluent API for value checks.
4
+ *
5
+ * Returns an object with `toBe` and `toBeInstanceOf` methods for asserting
6
+ * equality and type, respectively. Intended for internal CLI validation logic.
7
+ *
8
+ * @template T - The type of the value being asserted.
9
+ * @param value - The value to assert against.
10
+ * @returns An object with `toBe` and `toBeInstanceOf` assertion methods.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * expect(status).toBe(200, 'expected HTTP 200');
15
+ * expect(result).toBeInstanceOf('object', 'expected an object');
16
+ * ```
17
+ */
2
18
  export const expect = (value) => {
3
19
  return {
4
20
  toBe: (expected, message) => {
@@ -9,7 +25,6 @@ export const expect = (value) => {
9
25
  value,
10
26
  },
11
27
  }));
12
- return this;
13
28
  },
14
29
  toBeInstanceOf: (expected, message) => {
15
30
  const actual = typeof value;
@@ -20,7 +35,6 @@ export const expect = (value) => {
20
35
  value: value === undefined ? 'undefined' : value,
21
36
  },
22
37
  }));
23
- return this;
24
38
  },
25
39
  };
26
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"expect.js","sourceRoot":"","sources":["../../../../src/lib/utils/expect.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAI,KAAQ,EAAE,EAAE;IACpC,OAAO;QACL,IAAI,EAAE,CAAC,QAAW,EAAE,OAAe,EAAoB,EAAE;YACvD,MAAM,CACJ,KAAK,KAAK,QAAQ,EAClB,KAAK,CAAC,OAAO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AAW,CAAC,CAAC,CAAC,KAAK;iBACjD;aACF,CAAC,CACH,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +1,19 @@
1
1
  import { accessSync, constants } from 'node:fs';
2
2
  import { access } from 'node:fs/promises';
3
+ /**
4
+ * Synchronously checks whether a file exists at the given path.
5
+ *
6
+ * @param file - Absolute or relative file path to check.
7
+ * @param options - When `assert` is true, the underlying `ENOENT` error is re-thrown instead of returning `false`.
8
+ * @returns `true` if the file is accessible, `false` otherwise (unless `assert` is set).
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * if (fileExistsSync('tsconfig.json')) {
13
+ * // file is present
14
+ * }
15
+ * ```
16
+ */
3
17
  export const fileExistsSync = (file, options) => {
4
18
  try {
5
19
  accessSync(file, constants.F_OK);
@@ -12,6 +26,20 @@ export const fileExistsSync = (file, options) => {
12
26
  return false;
13
27
  }
14
28
  };
29
+ /**
30
+ * Asynchronously checks whether a file exists at the given path.
31
+ *
32
+ * @param file - Absolute or relative file path to check.
33
+ * @param options - When `assert` is true, the underlying `ENOENT` error is re-thrown instead of resolving to `false`.
34
+ * @returns A promise that resolves to `true` if the file is accessible, `false` otherwise (unless `assert` is set).
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * if (await fileExists('app.manifest.ts')) {
39
+ * // file is present
40
+ * }
41
+ * ```
42
+ */
15
43
  export const fileExists = async (file, options) => {
16
44
  try {
17
45
  await access(file, constants.F_OK);
@@ -1 +1 @@
1
- {"version":3,"file":"file-exists.js","sourceRoot":"","sources":["../../../../src/lib/utils/file-exists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAI1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,OAAiB,EAAE,EAAE;IAChE,IAAI,CAAC;QACH,UAAU,CAAC,IAAI,EAA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AiB,EAAoB,EAAE;IACpF,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Shared utility functions for the Fusion Framework CLI.
3
+ *
4
+ * Includes assertion helpers, file-system utilities, package resolution,
5
+ * annotation resolvers, and snapshot version generation.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  export { assert } from './assert.js';
2
10
  export { resolveEntryPoint } from './resolve-source-entry-point.js';
3
11
  export { resolvePackage } from './resolve-package.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAwB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAwB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '13.3.19-next.0';
2
+ export const version = '14.0.0';
3
3
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,15 @@
1
1
  import type { FusionFramework } from './framework.node.js';
2
2
  import { type ConsoleLogger } from './utils/index.js';
3
3
  import type { ApiAppConfig } from '../lib/app/schemas.js';
4
+ /**
5
+ * Options for publishing an application configuration to the app service.
6
+ *
7
+ * @property config - The validated application configuration object to publish.
8
+ * @property appKey - The unique key identifying the application in the app store.
9
+ * @property buildVersion - The build version to associate the config with.
10
+ * @property framework - The initialized FusionFramework instance for service discovery.
11
+ * @property log - Optional logger for outputting progress and debug information.
12
+ */
4
13
  type AppConfigPublishOptions = {
5
14
  config: ApiAppConfig;
6
15
  appKey: string;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Binary / command-handler API for `@equinor/fusion-framework-cli/bin`.
3
+ *
4
+ * Exports the programmatic entry points for every CLI operation —
5
+ * build, pack, upload, publish, tag, dev-server, and framework
6
+ * initialisation — so they can be consumed by both the CLI and
7
+ * third-party automation scripts.
8
+ *
9
+ * @packageDocumentation
10
+ */
1
11
  export { buildApplication } from './app-build.js';
2
12
  export { bundleApp } from './app-pack.js';
3
13
  export { generateApplicationConfig } from './app-config.js';
@@ -1,5 +1,15 @@
1
1
  import { type FusionEnv, type FusionFrameworkSettings } from './framework.node.js';
2
2
  import { type ConsoleLogger } from './utils/index.js';
3
+ /**
4
+ * Options for publishing a portal configuration to the portal service.
5
+ *
6
+ * @property config - Optional path to a custom portal config file.
7
+ * @property portal - Portal identification with name and version.
8
+ * @property environment - The target Fusion environment (excludes Development).
9
+ * @property auth - Authentication settings for the Fusion Framework.
10
+ * @property debug - Enable debug mode for verbose logging.
11
+ * @property log - Optional logger for outputting progress and debug information.
12
+ */
3
13
  type PortalConfigPublishOptions = {
4
14
  config?: string;
5
15
  portal: {
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Shared CLI display and server utilities.
3
+ *
4
+ * Provides formatting helpers, spinner/logger abstractions,
5
+ * dev-server factory functions, and default HTTP headers used
6
+ * across all Fusion CLI commands.
7
+ *
8
+ * @packageDocumentation
9
+ */
1
10
  export { formatPath, formatByteSize, chalk } from './format.js';
2
11
  export { Spinner } from './spinner.js';
3
12
  export { ConsoleLogger } from './ConsoleLogger.js';
@@ -1,3 +1,12 @@
1
1
  import type { Command } from 'commander';
2
+ /**
3
+ * Registers all built-in CLI commands and optional plugins on the Commander program.
4
+ *
5
+ * Built-in command groups: `app`, `auth`, `create`, `disco`, `portal`.
6
+ * After registering built-in commands, loads any plugins declared in the
7
+ * project's `fusion-cli.config` file.
8
+ *
9
+ * @param program - The Commander program instance to register commands on.
10
+ */
2
11
  declare const _default: (program: Command) => Promise<void>;
3
12
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { AppManifest, RouteSchemaEntry } from '@equinor/fusion-framework-module-app';
1
+ import type { AppManifest } from '@equinor/fusion-framework-module-app';
2
2
  import type { RuntimeEnv } from '@equinor/fusion-framework-cli/lib';
3
3
  import type { RecursivePartial } from '../utils/types.js';
4
4
  /**
@@ -6,20 +6,10 @@ import type { RecursivePartial } from '../utils/types.js';
6
6
  * Imported from the '@equinor/fusion-framework-module-app' package for consistency across modules.
7
7
  */
8
8
  export type { AppManifest } from '@equinor/fusion-framework-module-app';
9
- /**
10
- * Extended manifest type that allows routes to be RouteNode objects (for TypeScript definitions)
11
- * or RouteSchemaEntry arrays (for JSON serialization).
12
- *
13
- * This type is used in manifest definition files where RouteNode objects can be passed directly.
14
- * The CLI will serialize RouteNode objects to RouteSchemaEntry arrays when generating the final manifest.
15
- */
16
- export type AppManifestWithRoutes = Omit<AppManifest, 'routes'> & {
17
- routes?: RouteSchemaEntry[] | unknown;
18
- };
19
9
  /**
20
10
  * Function type for loading or modifying an application manifest.
21
11
  *
22
- * @template T - A type extending AppManifest or AppManifestWithRoutes, defaults to AppManifestWithRoutes.
12
+ * @template T - A type extending AppManifest.
23
13
  * @param env - The runtime environment (see '../types').
24
14
  * @param args - Object containing the base manifest (`base`) of type T.
25
15
  * @returns A partial manifest that will be merged with the base, void if no changes, or a promise resolving to either.
@@ -31,7 +21,7 @@ export type AppManifestWithRoutes = Omit<AppManifest, 'routes'> & {
31
21
  * - Returning void allows for side-effect-only functions, but returning the manifest is preferred for clarity.
32
22
  * - Routes can be RouteNode | RouteNode[] (from router package) or RouteSchemaEntry[] (serialized format).
33
23
  */
34
- export type AppManifestFn<T extends AppManifest | AppManifestWithRoutes = AppManifestWithRoutes> = (env: RuntimeEnv, // The runtime environment, e.g., 'development', 'production', etc.
24
+ export type AppManifestFn<T extends AppManifest = AppManifest> = (env: RuntimeEnv, // The runtime environment, e.g., 'development', 'production', etc.
35
25
  args: {
36
26
  base: T;
37
27
  }) => RecursivePartial<T> | undefined | Promise<RecursivePartial<T> | undefined>;
@@ -48,4 +38,4 @@ args: {
48
38
  * - It does not invoke the function immediately; it simply returns it for later use.
49
39
  * - Helps with static analysis and RAG-based documentation extraction.
50
40
  */
51
- export declare const defineAppManifest: (fn: AppManifestFn) => AppManifestFn<AppManifestWithRoutes>;
41
+ export declare const defineAppManifest: (fn: AppManifestFn) => AppManifestFn<AppManifest>;
@@ -1,4 +1,12 @@
1
- export { defineAppManifest, type AppManifestFn, type AppManifest, type AppManifestWithRoutes, } from './app-manifest.js';
1
+ /**
2
+ * Application manifest and configuration utilities for `@equinor/fusion-framework-cli/app`.
3
+ *
4
+ * Provides helpers for defining, loading, merging, and validating Fusion application
5
+ * manifests and configurations.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ export { defineAppManifest, type AppManifestFn, type AppManifest, } from './app-manifest.js';
2
10
  export type { RouteSchemaEntry } from '@equinor/fusion-framework-module-app';
3
11
  export { createAppManifestFromPackage } from './create-app-manifest.js';
4
12
  export { mergeAppManifests } from './merge-app-manifest.js';
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Dev-server re-exports for `@equinor/fusion-framework-cli/dev-server`.
3
+ *
4
+ * Aggregates service processing, configuration loading/merging, and type
5
+ * definitions used when working with the Fusion dev server.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  export { processServices } from '@equinor/fusion-framework-dev-server';
2
10
  export { loadDevServerConfig, defineDevServerConfig, type DevServerConfigFn, type DevServerConfigExport, } from './load-dev-server-config.js';
3
11
  export { mergeDevServerConfig } from './merge-dev-server-config.js';
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Public library API for `@equinor/fusion-framework-cli`.
3
+ *
4
+ * Re-exports configuration helpers, dev-server utilities, and package resolution
5
+ * functions used by consumers to configure Fusion CLI projects.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  export type { RuntimeEnv } from './types.js';
2
10
  export { resolvePackage, type ResolvedPackage } from './utils/resolve-package.js';
3
11
  export { resolveEntryPoint } from './utils/resolve-source-entry-point.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("./app/app-manifest.js").AppManifestWithRoutes>;
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,3 +1,11 @@
1
+ /**
2
+ * Portal manifest, configuration, and schema utilities for `@equinor/fusion-framework-cli/portal`.
3
+ *
4
+ * Provides helpers for defining, loading, merging, and validating Fusion portal
5
+ * manifests, configurations, and schemas.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  export { createPortalManifestFromPackage, definePortalManifest, loadPortalManifest, validatePortalManifest, type PortalManifest, type PortalManifestExport, type PortalManifestFn, } from './portal-manifest.js';
2
10
  export { loadPortalSchema, definePortalSchema, type PortalSchema, type PortalSchemaExport, type PortalSchemaFn, } from './load-portal-schema.js';
3
11
  export { definePortalConfig, type PortalConfig, type PortalConfigFn, } from './portal-config.js';
@@ -2,6 +2,26 @@ import type { PortalManifestFn } from './load-portal-manifest.js';
2
2
  import type { PortalManifestSchemaType } from './portal-manifest.schema.js';
3
3
  export { loadPortalManifest, type PortalManifestExport, type PortalManifestFn, } from './load-portal-manifest.js';
4
4
  export { createPortalManifestFromPackage } from './create-portal-manifest.js';
5
+ /**
6
+ * Utility to define a portal manifest function with proper typing.
7
+ *
8
+ * This is a no-op at runtime — it returns the provided function unchanged.
9
+ * It exists to provide type safety and editor support when authoring portal manifest files.
10
+ *
11
+ * @template T - The portal manifest type, extending `PortalManifestSchemaType`.
12
+ * @param fn - A function that receives the runtime environment and base manifest, and returns manifest overrides.
13
+ * @returns The provided function, unchanged.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { definePortalManifest } from '@equinor/fusion-framework-cli/portal';
18
+ *
19
+ * export default definePortalManifest((env, { base }) => ({
20
+ * ...base,
21
+ * name: 'my-portal',
22
+ * }));
23
+ * ```
24
+ */
5
25
  export declare const definePortalManifest: <T extends PortalManifestSchemaType>(fn: PortalManifestFn<T>) => PortalManifestFn<T>;
6
26
  export { PortalManifestSchema, PortalManifestBuildSchema, PortalManifestSchemaType as PortalManifest, type PortalManifestBuildSchemaType as PortalManifestBuild, } from './portal-manifest.schema.js';
7
27
  /**
@@ -1,4 +1,20 @@
1
+ /**
2
+ * Lightweight assertion helper that provides a fluent API for value checks.
3
+ *
4
+ * Returns an object with `toBe` and `toBeInstanceOf` methods for asserting
5
+ * equality and type, respectively. Intended for internal CLI validation logic.
6
+ *
7
+ * @template T - The type of the value being asserted.
8
+ * @param value - The value to assert against.
9
+ * @returns An object with `toBe` and `toBeInstanceOf` assertion methods.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * expect(status).toBe(200, 'expected HTTP 200');
14
+ * expect(result).toBeInstanceOf('object', 'expected an object');
15
+ * ```
16
+ */
1
17
  export declare const expect: <T>(value: T) => {
2
- toBe: (expected: T, message: string) => asserts expected;
3
- toBeInstanceOf: (expected: typeof value, message: string) => asserts expected;
18
+ toBe: (expected: T, message: string) => void;
19
+ toBeInstanceOf: (expected: typeof value, message: string) => void;
4
20
  };
@@ -1,6 +1,36 @@
1
+ /** Options for file existence checks. */
1
2
  type Options = {
3
+ /** If true, throws the underlying error instead of returning false. */
2
4
  assert?: boolean;
3
5
  };
6
+ /**
7
+ * Synchronously checks whether a file exists at the given path.
8
+ *
9
+ * @param file - Absolute or relative file path to check.
10
+ * @param options - When `assert` is true, the underlying `ENOENT` error is re-thrown instead of returning `false`.
11
+ * @returns `true` if the file is accessible, `false` otherwise (unless `assert` is set).
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * if (fileExistsSync('tsconfig.json')) {
16
+ * // file is present
17
+ * }
18
+ * ```
19
+ */
4
20
  export declare const fileExistsSync: (file: string, options?: Options) => boolean;
21
+ /**
22
+ * Asynchronously checks whether a file exists at the given path.
23
+ *
24
+ * @param file - Absolute or relative file path to check.
25
+ * @param options - When `assert` is true, the underlying `ENOENT` error is re-thrown instead of resolving to `false`.
26
+ * @returns A promise that resolves to `true` if the file is accessible, `false` otherwise (unless `assert` is set).
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * if (await fileExists('app.manifest.ts')) {
31
+ * // file is present
32
+ * }
33
+ * ```
34
+ */
5
35
  export declare const fileExists: (file: string, options?: Options) => Promise<boolean>;
6
36
  export {};
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Shared utility functions for the Fusion Framework CLI.
3
+ *
4
+ * Includes assertion helpers, file-system utilities, package resolution,
5
+ * annotation resolvers, and snapshot version generation.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  export { assert } from './assert.js';
2
10
  export { resolveEntryPoint } from './resolve-source-entry-point.js';
3
11
  export { resolvePackage, type ResolvedPackage } from './resolve-package.js';
@@ -1 +1 @@
1
- export declare const version = "13.3.19-next.0";
1
+ export declare const version = "14.0.0";