@equinor/fusion-framework-cli 10.7.5-apploader-be21a6b60eb13eee8bf869e75002d8634e9c50a9 → 11.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (522) hide show
  1. package/CHANGELOG.md +51 -2
  2. package/README.md +144 -17
  3. package/bin/build/bin.js +21 -0
  4. package/bin/build/cli.js +9868 -0
  5. package/bin/build/create-auth-client-7P8K_6Vu.js +89 -0
  6. package/bin/build/portal-pack-CAsnV44B.js +12069 -0
  7. package/bin/cli.mjs +4 -1
  8. package/dist/esm/bin/app-build.js +34 -0
  9. package/dist/esm/bin/app-build.js.map +1 -0
  10. package/dist/esm/bin/app-check.js +63 -0
  11. package/dist/esm/bin/app-check.js.map +1 -0
  12. package/dist/esm/bin/app-config-publish.js +89 -0
  13. package/dist/esm/bin/app-config-publish.js.map +1 -0
  14. package/dist/esm/bin/app-config.js +48 -0
  15. package/dist/esm/bin/app-config.js.map +1 -0
  16. package/dist/esm/bin/app-dev.js +92 -0
  17. package/dist/esm/bin/app-dev.js.map +1 -0
  18. package/dist/esm/bin/app-manifest.js +38 -0
  19. package/dist/esm/bin/app-manifest.js.map +1 -0
  20. package/dist/esm/bin/app-pack.js +51 -0
  21. package/dist/esm/bin/app-pack.js.map +1 -0
  22. package/dist/esm/bin/app-tag.js +89 -0
  23. package/dist/esm/bin/app-tag.js.map +1 -0
  24. package/dist/esm/bin/app-upload.js +109 -0
  25. package/dist/esm/bin/app-upload.js.map +1 -0
  26. package/dist/esm/bin/helpers/load-bundle-metadata.js +32 -0
  27. package/dist/esm/bin/helpers/load-bundle-metadata.js.map +1 -0
  28. package/dist/esm/bin/helpers/load-vite-config.js +55 -0
  29. package/dist/esm/bin/helpers/load-vite-config.js.map +1 -0
  30. package/dist/esm/bin/helpers/resolve-app-config.js +46 -0
  31. package/dist/esm/bin/helpers/resolve-app-config.js.map +1 -0
  32. package/dist/esm/bin/helpers/resolve-app-manifest.js +55 -0
  33. package/dist/esm/bin/helpers/resolve-app-manifest.js.map +1 -0
  34. package/dist/esm/bin/helpers/resolve-portal-manifest.js +55 -0
  35. package/dist/esm/bin/helpers/resolve-portal-manifest.js.map +1 -0
  36. package/dist/esm/bin/helpers/resolve-project-package.js +32 -0
  37. package/dist/esm/bin/helpers/resolve-project-package.js.map +1 -0
  38. package/dist/esm/bin/index.js +10 -0
  39. package/dist/esm/bin/index.js.map +1 -0
  40. package/dist/esm/bin/pack.js +70 -0
  41. package/dist/esm/bin/pack.js.map +1 -0
  42. package/dist/esm/bin/portal-build.js +40 -0
  43. package/dist/esm/bin/portal-build.js.map +1 -0
  44. package/dist/esm/bin/portal-dev.js +69 -0
  45. package/dist/esm/bin/portal-dev.js.map +1 -0
  46. package/dist/esm/bin/portal-manifest.js +38 -0
  47. package/dist/esm/bin/portal-manifest.js.map +1 -0
  48. package/dist/esm/bin/portal-pack.js +60 -0
  49. package/dist/esm/bin/portal-pack.js.map +1 -0
  50. package/dist/esm/bin/portal-tag.js +96 -0
  51. package/dist/esm/bin/portal-tag.js.map +1 -0
  52. package/dist/esm/bin/portal-upload.js +99 -0
  53. package/dist/esm/bin/portal-upload.js.map +1 -0
  54. package/dist/esm/bin/utils/ConsoleLogger.js +112 -0
  55. package/dist/esm/bin/utils/ConsoleLogger.js.map +1 -0
  56. package/dist/esm/bin/utils/create-dev-server.js +167 -0
  57. package/dist/esm/bin/utils/create-dev-server.js.map +1 -0
  58. package/dist/esm/bin/utils/format.js +47 -0
  59. package/dist/esm/bin/utils/format.js.map +1 -0
  60. package/dist/esm/bin/utils/index.js +5 -0
  61. package/dist/esm/bin/utils/index.js.map +1 -0
  62. package/dist/esm/bin/utils/spinner.js +142 -0
  63. package/dist/esm/bin/utils/spinner.js.map +1 -0
  64. package/dist/esm/cli/commands/app/alias.js +42 -0
  65. package/dist/esm/cli/commands/app/alias.js.map +1 -0
  66. package/dist/esm/cli/commands/app/build.js +46 -0
  67. package/dist/esm/cli/commands/app/build.js.map +1 -0
  68. package/dist/esm/cli/commands/app/check.js +47 -0
  69. package/dist/esm/cli/commands/app/check.js.map +1 -0
  70. package/dist/esm/cli/commands/app/config.js +91 -0
  71. package/dist/esm/cli/commands/app/config.js.map +1 -0
  72. package/dist/esm/cli/commands/app/dev.js +61 -0
  73. package/dist/esm/cli/commands/app/dev.js.map +1 -0
  74. package/dist/esm/cli/commands/app/index.js +25 -0
  75. package/dist/esm/cli/commands/app/index.js.map +1 -0
  76. package/dist/esm/cli/commands/app/manifest.js +73 -0
  77. package/dist/esm/cli/commands/app/manifest.js.map +1 -0
  78. package/dist/esm/cli/commands/app/pack.js +64 -0
  79. package/dist/esm/cli/commands/app/pack.js.map +1 -0
  80. package/dist/esm/cli/commands/app/publish.js +119 -0
  81. package/dist/esm/cli/commands/app/publish.js.map +1 -0
  82. package/dist/esm/cli/commands/app/tag.js +101 -0
  83. package/dist/esm/cli/commands/app/tag.js.map +1 -0
  84. package/dist/esm/cli/commands/app/upload.js +80 -0
  85. package/dist/esm/cli/commands/app/upload.js.map +1 -0
  86. package/dist/esm/cli/commands/auth/index.js +10 -0
  87. package/dist/esm/cli/commands/auth/index.js.map +1 -0
  88. package/dist/esm/cli/commands/auth/login.js +68 -0
  89. package/dist/esm/cli/commands/auth/login.js.map +1 -0
  90. package/dist/esm/cli/commands/auth/logout.js +55 -0
  91. package/dist/esm/cli/commands/auth/logout.js.map +1 -0
  92. package/dist/esm/cli/commands/auth/token.js +74 -0
  93. package/dist/esm/cli/commands/auth/token.js.map +1 -0
  94. package/dist/esm/cli/commands/disco/index.js +6 -0
  95. package/dist/esm/cli/commands/disco/index.js.map +1 -0
  96. package/dist/esm/cli/commands/disco/resolve.js +61 -0
  97. package/dist/esm/cli/commands/disco/resolve.js.map +1 -0
  98. package/dist/esm/cli/commands/index.js +11 -0
  99. package/dist/esm/cli/commands/index.js.map +1 -0
  100. package/dist/esm/cli/commands/portal/build.js +22 -0
  101. package/dist/esm/cli/commands/portal/build.js.map +1 -0
  102. package/dist/esm/cli/commands/portal/dev.js +24 -0
  103. package/dist/esm/cli/commands/portal/dev.js.map +1 -0
  104. package/dist/esm/cli/commands/portal/index.js +21 -0
  105. package/dist/esm/cli/commands/portal/index.js.map +1 -0
  106. package/dist/esm/cli/commands/portal/manifest.js +45 -0
  107. package/dist/esm/cli/commands/portal/manifest.js.map +1 -0
  108. package/dist/esm/cli/commands/portal/pack.js +35 -0
  109. package/dist/esm/cli/commands/portal/pack.js.map +1 -0
  110. package/dist/esm/cli/commands/portal/publish.js +73 -0
  111. package/dist/esm/cli/commands/portal/publish.js.map +1 -0
  112. package/dist/esm/cli/commands/portal/schema.js +68 -0
  113. package/dist/esm/cli/commands/portal/schema.js.map +1 -0
  114. package/dist/esm/cli/commands/portal/tag.js +69 -0
  115. package/dist/esm/cli/commands/portal/tag.js.map +1 -0
  116. package/dist/esm/cli/commands/portal/upload.js +40 -0
  117. package/dist/esm/cli/commands/portal/upload.js.map +1 -0
  118. package/dist/esm/cli/main.js +52 -0
  119. package/dist/esm/cli/main.js.map +1 -0
  120. package/dist/esm/cli/options/auth.js +96 -0
  121. package/dist/esm/cli/options/auth.js.map +1 -0
  122. package/dist/esm/cli/options/env.js +30 -0
  123. package/dist/esm/cli/options/env.js.map +1 -0
  124. package/dist/esm/lib/app/app-config.js +12 -0
  125. package/dist/esm/lib/app/app-config.js.map +1 -0
  126. package/dist/esm/lib/app/app-manifest.js +15 -0
  127. package/dist/esm/lib/app/app-manifest.js.map +1 -0
  128. package/dist/{lib → esm/lib/app}/app-package.js +30 -10
  129. package/dist/esm/lib/app/app-package.js.map +1 -0
  130. package/dist/esm/lib/app/create-app-manifest.js +72 -0
  131. package/dist/esm/lib/app/create-app-manifest.js.map +1 -0
  132. package/dist/esm/lib/app/index.js +9 -0
  133. package/dist/esm/lib/app/index.js.map +1 -0
  134. package/dist/esm/lib/app/load-app-config.js +47 -0
  135. package/dist/esm/lib/app/load-app-config.js.map +1 -0
  136. package/dist/esm/lib/app/load-app-manifest.js +61 -0
  137. package/dist/esm/lib/app/load-app-manifest.js.map +1 -0
  138. package/dist/esm/lib/app/merge-app-config.js +21 -0
  139. package/dist/esm/lib/app/merge-app-config.js.map +1 -0
  140. package/dist/esm/lib/app/merge-app-manifest.js +31 -0
  141. package/dist/esm/lib/app/merge-app-manifest.js.map +1 -0
  142. package/dist/esm/lib/app/schemas.js +28 -0
  143. package/dist/esm/lib/app/schemas.js.map +1 -0
  144. package/dist/esm/lib/dev-server.js +3 -0
  145. package/dist/esm/lib/dev-server.js.map +1 -0
  146. package/dist/esm/lib/framework.node.js +104 -0
  147. package/dist/esm/lib/framework.node.js.map +1 -0
  148. package/dist/esm/lib/index.js +5 -0
  149. package/dist/esm/lib/index.js.map +1 -0
  150. package/dist/esm/lib/legacy.js +38 -0
  151. package/dist/esm/lib/legacy.js.map +1 -0
  152. package/dist/esm/lib/load-dev-server-config.js +43 -0
  153. package/dist/esm/lib/load-dev-server-config.js.map +1 -0
  154. package/dist/esm/lib/merge-dev-server-config.js +37 -0
  155. package/dist/esm/lib/merge-dev-server-config.js.map +1 -0
  156. package/dist/esm/lib/portal/create-portal-manifest.js +93 -0
  157. package/dist/esm/lib/portal/create-portal-manifest.js.map +1 -0
  158. package/dist/esm/lib/portal/index.js +3 -0
  159. package/dist/esm/lib/portal/index.js.map +1 -0
  160. package/dist/esm/lib/portal/load-portal-manifest.js +54 -0
  161. package/dist/esm/lib/portal/load-portal-manifest.js.map +1 -0
  162. package/dist/esm/lib/portal/load-portal-schema.js +49 -0
  163. package/dist/esm/lib/portal/load-portal-schema.js.map +1 -0
  164. package/dist/esm/lib/portal/portal-manifest.js +21 -0
  165. package/dist/esm/lib/portal/portal-manifest.js.map +1 -0
  166. package/dist/esm/lib/portal/portal-manifest.schema.js +134 -0
  167. package/dist/esm/lib/portal/portal-manifest.schema.js.map +1 -0
  168. package/dist/esm/lib/static.js +20 -0
  169. package/dist/esm/lib/static.js.map +1 -0
  170. package/dist/{lib/utils → esm/lib}/types.js.map +1 -1
  171. package/dist/esm/lib/utils/assert.js +87 -0
  172. package/dist/esm/lib/utils/assert.js.map +1 -0
  173. package/dist/esm/lib/utils/expect.js.map +1 -0
  174. package/dist/{lib/plugins/app-assets/extension-filter-pattern.js → esm/lib/utils/extension-filter.js} +1 -1
  175. package/dist/esm/lib/utils/extension-filter.js.map +1 -0
  176. package/dist/esm/lib/utils/file-exists.js.map +1 -0
  177. package/dist/esm/lib/utils/index.js +6 -0
  178. package/dist/esm/lib/utils/index.js.map +1 -0
  179. package/dist/{lib → esm/lib}/utils/parse-json-request.js +3 -1
  180. package/dist/esm/lib/utils/parse-json-request.js.map +1 -0
  181. package/dist/esm/lib/utils/resolve-annotations.js +28 -0
  182. package/dist/esm/lib/utils/resolve-annotations.js.map +1 -0
  183. package/dist/esm/lib/utils/resolve-devops-annotations.js +59 -0
  184. package/dist/esm/lib/utils/resolve-devops-annotations.js.map +1 -0
  185. package/dist/esm/lib/utils/resolve-git-commit-sha.js +23 -0
  186. package/dist/esm/lib/utils/resolve-git-commit-sha.js.map +1 -0
  187. package/dist/esm/lib/utils/resolve-git-remote-url.js +24 -0
  188. package/dist/esm/lib/utils/resolve-git-remote-url.js.map +1 -0
  189. package/dist/esm/lib/utils/resolve-github-annotations.js +127 -0
  190. package/dist/esm/lib/utils/resolve-github-annotations.js.map +1 -0
  191. package/dist/esm/lib/utils/resolve-package-repo.js +14 -0
  192. package/dist/esm/lib/utils/resolve-package-repo.js.map +1 -0
  193. package/dist/esm/lib/utils/resolve-package.js +18 -0
  194. package/dist/esm/lib/utils/resolve-package.js.map +1 -0
  195. package/dist/esm/lib/utils/resolve-source-entry-point.js +39 -0
  196. package/dist/esm/lib/utils/resolve-source-entry-point.js.map +1 -0
  197. package/dist/esm/lib/utils/types.js.map +1 -0
  198. package/dist/esm/lib/utils/write-file.js +25 -0
  199. package/dist/esm/lib/utils/write-file.js.map +1 -0
  200. package/dist/esm/version.js +3 -0
  201. package/dist/esm/version.js.map +1 -0
  202. package/dist/tsconfig.tsbuildinfo +1 -0
  203. package/dist/types/bin/app-build.d.ts +52 -0
  204. package/dist/types/bin/app-check.d.ts +31 -0
  205. package/dist/types/bin/app-config-publish.d.ts +23 -0
  206. package/dist/types/bin/app-config.d.ts +52 -0
  207. package/dist/types/bin/app-dev.d.ts +45 -0
  208. package/dist/types/bin/app-manifest.d.ts +42 -0
  209. package/dist/types/bin/app-pack.d.ts +38 -0
  210. package/dist/types/bin/app-tag.d.ts +51 -0
  211. package/dist/types/bin/app-upload.d.ts +40 -0
  212. package/dist/types/bin/helpers/load-bundle-metadata.d.ts +15 -0
  213. package/dist/types/bin/helpers/load-vite-config.d.ts +12 -0
  214. package/dist/types/bin/helpers/resolve-app-config.d.ts +18 -0
  215. package/dist/types/bin/helpers/resolve-app-manifest.d.ts +17 -0
  216. package/dist/types/bin/helpers/resolve-portal-manifest.d.ts +27 -0
  217. package/dist/types/bin/helpers/resolve-project-package.d.ts +13 -0
  218. package/dist/types/bin/index.d.ts +9 -0
  219. package/dist/types/bin/pack.d.ts +36 -0
  220. package/dist/types/bin/portal-build.d.ts +54 -0
  221. package/dist/types/bin/portal-dev.d.ts +37 -0
  222. package/dist/types/bin/portal-manifest.d.ts +60 -0
  223. package/dist/types/bin/portal-pack.d.ts +54 -0
  224. package/dist/types/bin/portal-tag.d.ts +51 -0
  225. package/dist/types/bin/portal-upload.d.ts +37 -0
  226. package/dist/types/bin/utils/ConsoleLogger.d.ts +84 -0
  227. package/dist/types/bin/utils/create-dev-server.d.ts +49 -0
  228. package/dist/types/bin/utils/format.d.ts +27 -0
  229. package/dist/types/bin/utils/index.d.ts +3 -13
  230. package/dist/types/bin/utils/spinner.d.ts +75 -0
  231. package/dist/types/cli/commands/app/alias.d.ts +6 -0
  232. package/dist/types/cli/commands/app/build.d.ts +27 -0
  233. package/dist/types/cli/commands/app/check.d.ts +26 -0
  234. package/dist/types/cli/commands/app/config.d.ts +34 -0
  235. package/dist/types/cli/commands/app/dev.d.ts +29 -0
  236. package/dist/types/cli/commands/app/index.d.ts +3 -0
  237. package/dist/types/cli/commands/app/manifest.d.ts +30 -0
  238. package/dist/types/cli/commands/app/pack.d.ts +31 -0
  239. package/dist/types/cli/commands/app/publish.d.ts +31 -0
  240. package/dist/types/cli/commands/app/tag.d.ts +33 -0
  241. package/dist/types/cli/commands/app/upload.d.ts +29 -0
  242. package/dist/types/cli/commands/auth/index.d.ts +3 -0
  243. package/dist/types/cli/commands/auth/login.d.ts +2 -0
  244. package/dist/types/cli/commands/auth/logout.d.ts +12 -0
  245. package/dist/types/cli/commands/auth/token.d.ts +13 -0
  246. package/dist/types/cli/commands/disco/index.d.ts +2 -0
  247. package/dist/types/cli/commands/disco/resolve.d.ts +25 -0
  248. package/dist/types/cli/commands/portal/build.d.ts +2 -0
  249. package/dist/types/cli/commands/portal/dev.d.ts +2 -0
  250. package/dist/types/cli/commands/portal/index.d.ts +2 -0
  251. package/dist/types/cli/commands/portal/manifest.d.ts +2 -0
  252. package/dist/types/cli/commands/portal/pack.d.ts +2 -0
  253. package/dist/types/cli/commands/portal/publish.d.ts +2 -0
  254. package/dist/types/cli/commands/portal/schema.d.ts +2 -0
  255. package/dist/types/cli/commands/portal/tag.d.ts +2 -0
  256. package/dist/types/cli/commands/portal/upload.d.ts +2 -0
  257. package/dist/types/cli/main.d.ts +21 -0
  258. package/dist/types/cli/options/auth.d.ts +37 -0
  259. package/dist/types/cli/options/env.d.ts +19 -0
  260. package/dist/types/lib/app/app-config.d.ts +31 -0
  261. package/dist/types/lib/app/app-manifest.d.ts +39 -0
  262. package/dist/types/lib/{app-package.d.ts → app/app-package.d.ts} +27 -10
  263. package/dist/types/lib/app/create-app-manifest.d.ts +17 -0
  264. package/dist/types/lib/app/index.d.ts +8 -0
  265. package/dist/types/lib/app/load-app-config.d.ts +54 -0
  266. package/dist/types/lib/app/load-app-manifest.d.ts +57 -0
  267. package/dist/types/lib/app/merge-app-config.d.ts +13 -0
  268. package/dist/types/lib/app/merge-app-manifest.d.ts +25 -0
  269. package/dist/types/{schemas.d.ts → lib/app/schemas.d.ts} +10 -1
  270. package/dist/types/lib/dev-server.d.ts +2 -0
  271. package/dist/types/lib/framework.node.d.ts +77 -0
  272. package/dist/types/lib/index.d.ts +4 -3
  273. package/dist/types/lib/legacy.d.ts +24 -0
  274. package/dist/types/lib/load-dev-server-config.d.ts +40 -0
  275. package/dist/types/lib/merge-dev-server-config.d.ts +16 -0
  276. package/dist/types/lib/portal/create-portal-manifest.d.ts +22 -0
  277. package/dist/types/lib/portal/index.d.ts +2 -0
  278. package/dist/types/lib/portal/load-portal-manifest.d.ts +65 -0
  279. package/dist/types/lib/portal/load-portal-schema.d.ts +43 -0
  280. package/dist/types/lib/portal/portal-manifest.d.ts +16 -0
  281. package/dist/types/lib/portal/portal-manifest.schema.d.ts +154 -0
  282. package/dist/types/lib/static.d.ts +10 -0
  283. package/dist/types/lib/types.d.ts +34 -0
  284. package/dist/types/lib/utils/assert.d.ts +48 -0
  285. package/dist/types/lib/utils/index.d.ts +5 -0
  286. package/dist/types/lib/utils/resolve-annotations.d.ts +11 -0
  287. package/dist/types/lib/utils/resolve-devops-annotations.d.ts +30 -0
  288. package/dist/types/lib/utils/resolve-git-commit-sha.d.ts +13 -0
  289. package/dist/types/lib/utils/resolve-git-remote-url.d.ts +13 -0
  290. package/dist/types/lib/utils/resolve-github-annotations.d.ts +65 -0
  291. package/dist/types/lib/utils/resolve-package-repo.d.ts +9 -0
  292. package/dist/types/lib/utils/resolve-package.d.ts +15 -0
  293. package/dist/types/lib/utils/resolve-source-entry-point.d.ts +17 -0
  294. package/dist/types/lib/utils/types.d.ts +1 -1
  295. package/dist/types/lib/utils/write-file.d.ts +14 -0
  296. package/dist/types/version.d.ts +1 -1
  297. package/docs/application.md +644 -0
  298. package/docs/auth.md +190 -0
  299. package/docs/libsecret.md +97 -0
  300. package/docs/migration-v10-to-v11.md +74 -0
  301. package/docs/portal.md +278 -0
  302. package/package.json +60 -69
  303. package/dist/bin/build-application.js +0 -55
  304. package/dist/bin/build-application.js.map +0 -1
  305. package/dist/bin/bundle-application.js +0 -41
  306. package/dist/bin/bundle-application.js.map +0 -1
  307. package/dist/bin/create-dev-serve.js +0 -127
  308. package/dist/bin/create-dev-serve.js.map +0 -1
  309. package/dist/bin/create-export-config.js +0 -40
  310. package/dist/bin/create-export-config.js.map +0 -1
  311. package/dist/bin/create-export-manifest.js +0 -67
  312. package/dist/bin/create-export-manifest.js.map +0 -1
  313. package/dist/bin/dev-portal/AppLoader.js +0 -80
  314. package/dist/bin/dev-portal/AppLoader.js.map +0 -1
  315. package/dist/bin/dev-portal/BookMarkSideSheet.js +0 -13
  316. package/dist/bin/dev-portal/BookMarkSideSheet.js.map +0 -1
  317. package/dist/bin/dev-portal/ContextSelector/ContextSelector.js +0 -40
  318. package/dist/bin/dev-portal/ContextSelector/ContextSelector.js.map +0 -1
  319. package/dist/bin/dev-portal/ContextSelector/index.js +0 -2
  320. package/dist/bin/dev-portal/ContextSelector/index.js.map +0 -1
  321. package/dist/bin/dev-portal/ContextSelector/useContextResolver.js +0 -216
  322. package/dist/bin/dev-portal/ContextSelector/useContextResolver.js.map +0 -1
  323. package/dist/bin/dev-portal/EquinorLoader.js +0 -14
  324. package/dist/bin/dev-portal/EquinorLoader.js.map +0 -1
  325. package/dist/bin/dev-portal/ErrorViewer.js +0 -7
  326. package/dist/bin/dev-portal/ErrorViewer.js.map +0 -1
  327. package/dist/bin/dev-portal/FusionLogo.js +0 -4
  328. package/dist/bin/dev-portal/FusionLogo.js.map +0 -1
  329. package/dist/bin/dev-portal/Header.Actions.js +0 -12
  330. package/dist/bin/dev-portal/Header.Actions.js.map +0 -1
  331. package/dist/bin/dev-portal/Header.js +0 -41
  332. package/dist/bin/dev-portal/Header.js.map +0 -1
  333. package/dist/bin/dev-portal/PersonSideSheet/index.js +0 -32
  334. package/dist/bin/dev-portal/PersonSideSheet/index.js.map +0 -1
  335. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js +0 -16
  336. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js.map +0 -1
  337. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js +0 -15
  338. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js.map +0 -1
  339. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js +0 -13
  340. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js.map +0 -1
  341. package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js +0 -19
  342. package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js.map +0 -1
  343. package/dist/bin/dev-portal/PersonSideSheet/sheets/Styled.js +0 -30
  344. package/dist/bin/dev-portal/PersonSideSheet/sheets/Styled.js.map +0 -1
  345. package/dist/bin/dev-portal/PersonSideSheet/sheets/index.js +0 -3
  346. package/dist/bin/dev-portal/PersonSideSheet/sheets/index.js.map +0 -1
  347. package/dist/bin/dev-portal/PersonSideSheet/sheets/types.js.map +0 -1
  348. package/dist/bin/dev-portal/Router.js +0 -59
  349. package/dist/bin/dev-portal/Router.js.map +0 -1
  350. package/dist/bin/dev-portal/config.js +0 -79
  351. package/dist/bin/dev-portal/config.js.map +0 -1
  352. package/dist/bin/dev-portal/main.js +0 -13
  353. package/dist/bin/dev-portal/main.js.map +0 -1
  354. package/dist/bin/dev-portal/resources/fallback-photo.svg.js +0 -3
  355. package/dist/bin/dev-portal/resources/fallback-photo.svg.js.map +0 -1
  356. package/dist/bin/dev-portal/useAppContextNavigation.js +0 -87
  357. package/dist/bin/dev-portal/useAppContextNavigation.js.map +0 -1
  358. package/dist/bin/main.app.js +0 -172
  359. package/dist/bin/main.app.js.map +0 -1
  360. package/dist/bin/main.js +0 -20
  361. package/dist/bin/main.js.map +0 -1
  362. package/dist/bin/public/assets/index-B7SVn0UQ.js +0 -3686
  363. package/dist/bin/public/index.html +0 -37
  364. package/dist/bin/publish-application.js +0 -96
  365. package/dist/bin/publish-application.js.map +0 -1
  366. package/dist/bin/tag-application.js +0 -73
  367. package/dist/bin/tag-application.js.map +0 -1
  368. package/dist/bin/upload-application.js +0 -63
  369. package/dist/bin/upload-application.js.map +0 -1
  370. package/dist/bin/upload-export-config.js +0 -78
  371. package/dist/bin/upload-export-config.js.map +0 -1
  372. package/dist/bin/utils/execute-command.js +0 -14
  373. package/dist/bin/utils/execute-command.js.map +0 -1
  374. package/dist/bin/utils/format.js +0 -16
  375. package/dist/bin/utils/format.js.map +0 -1
  376. package/dist/bin/utils/getEndpointUrl.js +0 -40
  377. package/dist/bin/utils/getEndpointUrl.js.map +0 -1
  378. package/dist/bin/utils/index.js +0 -14
  379. package/dist/bin/utils/index.js.map +0 -1
  380. package/dist/bin/utils/isAppRegistered.js +0 -26
  381. package/dist/bin/utils/isAppRegistered.js.map +0 -1
  382. package/dist/bin/utils/load-app-config.js +0 -26
  383. package/dist/bin/utils/load-app-config.js.map +0 -1
  384. package/dist/bin/utils/load-manifest.js +0 -31
  385. package/dist/bin/utils/load-manifest.js.map +0 -1
  386. package/dist/bin/utils/load-package.js +0 -18
  387. package/dist/bin/utils/load-package.js.map +0 -1
  388. package/dist/bin/utils/load-vite-config.js +0 -45
  389. package/dist/bin/utils/load-vite-config.js.map +0 -1
  390. package/dist/bin/utils/proxy-request-logger.js +0 -33
  391. package/dist/bin/utils/proxy-request-logger.js.map +0 -1
  392. package/dist/bin/utils/publishAppConfig.js +0 -29
  393. package/dist/bin/utils/publishAppConfig.js.map +0 -1
  394. package/dist/bin/utils/requireToken.js +0 -9
  395. package/dist/bin/utils/requireToken.js.map +0 -1
  396. package/dist/bin/utils/spinner.js +0 -65
  397. package/dist/bin/utils/spinner.js.map +0 -1
  398. package/dist/bin/utils/tagAppBundle.js +0 -26
  399. package/dist/bin/utils/tagAppBundle.js.map +0 -1
  400. package/dist/bin/utils/uploadAppBundle.js +0 -45
  401. package/dist/bin/utils/uploadAppBundle.js.map +0 -1
  402. package/dist/lib/app-config.js +0 -32
  403. package/dist/lib/app-config.js.map +0 -1
  404. package/dist/lib/app-manifest.js +0 -142
  405. package/dist/lib/app-manifest.js.map +0 -1
  406. package/dist/lib/app-package.js.map +0 -1
  407. package/dist/lib/index.js +0 -4
  408. package/dist/lib/index.js.map +0 -1
  409. package/dist/lib/plugins/app-assets/app-asset-plugin.js +0 -96
  410. package/dist/lib/plugins/app-assets/app-asset-plugin.js.map +0 -1
  411. package/dist/lib/plugins/app-assets/emit-asset.js +0 -46
  412. package/dist/lib/plugins/app-assets/emit-asset.js.map +0 -1
  413. package/dist/lib/plugins/app-assets/extension-filter-pattern.js.map +0 -1
  414. package/dist/lib/plugins/app-assets/index.js +0 -4
  415. package/dist/lib/plugins/app-assets/index.js.map +0 -1
  416. package/dist/lib/plugins/app-assets/read-asset-content.js +0 -34
  417. package/dist/lib/plugins/app-assets/read-asset-content.js.map +0 -1
  418. package/dist/lib/plugins/app-assets/resolve-asset-id.js +0 -54
  419. package/dist/lib/plugins/app-assets/resolve-asset-id.js.map +0 -1
  420. package/dist/lib/plugins/app-assets/static.js +0 -15
  421. package/dist/lib/plugins/app-assets/static.js.map +0 -1
  422. package/dist/lib/plugins/app-proxy/app-proxy-plugin.js +0 -125
  423. package/dist/lib/plugins/app-proxy/app-proxy-plugin.js.map +0 -1
  424. package/dist/lib/plugins/app-proxy/index.js +0 -2
  425. package/dist/lib/plugins/app-proxy/index.js.map +0 -1
  426. package/dist/lib/plugins/app-settings/index.js +0 -36
  427. package/dist/lib/plugins/app-settings/index.js.map +0 -1
  428. package/dist/lib/plugins/external-public/external-public-plugin.js +0 -101
  429. package/dist/lib/plugins/external-public/external-public-plugin.js.map +0 -1
  430. package/dist/lib/plugins/external-public/index.js +0 -2
  431. package/dist/lib/plugins/external-public/index.js.map +0 -1
  432. package/dist/lib/plugins/help-proxy/help-proxy-plugin.js +0 -78
  433. package/dist/lib/plugins/help-proxy/help-proxy-plugin.js.map +0 -1
  434. package/dist/lib/plugins/help-proxy/index.js +0 -2
  435. package/dist/lib/plugins/help-proxy/index.js.map +0 -1
  436. package/dist/lib/utils/assert.js +0 -28
  437. package/dist/lib/utils/assert.js.map +0 -1
  438. package/dist/lib/utils/config.js +0 -67
  439. package/dist/lib/utils/config.js.map +0 -1
  440. package/dist/lib/utils/expect.js.map +0 -1
  441. package/dist/lib/utils/file-exists.js.map +0 -1
  442. package/dist/lib/utils/parse-json-request.js.map +0 -1
  443. package/dist/lib/utils/ts-transpile.js +0 -45
  444. package/dist/lib/utils/ts-transpile.js.map +0 -1
  445. package/dist/lib/vite-config.js +0 -76
  446. package/dist/lib/vite-config.js.map +0 -1
  447. package/dist/lib/vite-logger.js +0 -21
  448. package/dist/lib/vite-logger.js.map +0 -1
  449. package/dist/schemas.js +0 -14
  450. package/dist/schemas.js.map +0 -1
  451. package/dist/types/bin/build-application.d.ts +0 -13
  452. package/dist/types/bin/bundle-application.d.ts +0 -4
  453. package/dist/types/bin/create-dev-serve.d.ts +0 -12
  454. package/dist/types/bin/create-export-config.d.ts +0 -13
  455. package/dist/types/bin/create-export-manifest.d.ts +0 -16
  456. package/dist/types/bin/dev-portal/AppLoader.d.ts +0 -11
  457. package/dist/types/bin/dev-portal/BookMarkSideSheet.d.ts +0 -6
  458. package/dist/types/bin/dev-portal/ContextSelector/ContextSelector.d.ts +0 -8
  459. package/dist/types/bin/dev-portal/ContextSelector/index.d.ts +0 -1
  460. package/dist/types/bin/dev-portal/ContextSelector/useContextResolver.d.ts +0 -15
  461. package/dist/types/bin/dev-portal/EquinorLoader.d.ts +0 -5
  462. package/dist/types/bin/dev-portal/ErrorViewer.d.ts +0 -4
  463. package/dist/types/bin/dev-portal/FusionLogo.d.ts +0 -6
  464. package/dist/types/bin/dev-portal/Header.Actions.d.ts +0 -7
  465. package/dist/types/bin/dev-portal/Header.d.ts +0 -2
  466. package/dist/types/bin/dev-portal/PersonSideSheet/index.d.ts +0 -11
  467. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.d.ts +0 -6
  468. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.d.ts +0 -5
  469. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.d.ts +0 -5
  470. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.d.ts +0 -5
  471. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/Styled.d.ts +0 -6
  472. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/index.d.ts +0 -2
  473. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/types.d.ts +0 -5
  474. package/dist/types/bin/dev-portal/Router.d.ts +0 -1
  475. package/dist/types/bin/dev-portal/config.d.ts +0 -3
  476. package/dist/types/bin/dev-portal/main.d.ts +0 -1
  477. package/dist/types/bin/dev-portal/resources/fallback-photo.svg.d.ts +0 -2
  478. package/dist/types/bin/dev-portal/useAppContextNavigation.d.ts +0 -5
  479. package/dist/types/bin/main.d.ts +0 -1
  480. package/dist/types/bin/publish-application.d.ts +0 -6
  481. package/dist/types/bin/tag-application.d.ts +0 -12
  482. package/dist/types/bin/upload-application.d.ts +0 -6
  483. package/dist/types/bin/upload-export-config.d.ts +0 -10
  484. package/dist/types/bin/utils/execute-command.d.ts +0 -8
  485. package/dist/types/bin/utils/getEndpointUrl.d.ts +0 -10
  486. package/dist/types/bin/utils/isAppRegistered.d.ts +0 -5
  487. package/dist/types/bin/utils/load-app-config.d.ts +0 -10
  488. package/dist/types/bin/utils/load-manifest.d.ts +0 -10
  489. package/dist/types/bin/utils/load-package.d.ts +0 -5
  490. package/dist/types/bin/utils/load-vite-config.d.ts +0 -10
  491. package/dist/types/bin/utils/proxy-request-logger.d.ts +0 -15
  492. package/dist/types/bin/utils/publishAppConfig.d.ts +0 -9
  493. package/dist/types/bin/utils/requireToken.d.ts +0 -4
  494. package/dist/types/bin/utils/tagAppBundle.d.ts +0 -7
  495. package/dist/types/bin/utils/uploadAppBundle.d.ts +0 -7
  496. package/dist/types/lib/app-config.d.ts +0 -27
  497. package/dist/types/lib/app-manifest.d.ts +0 -52
  498. package/dist/types/lib/plugins/app-assets/app-asset-plugin.d.ts +0 -36
  499. package/dist/types/lib/plugins/app-assets/emit-asset.d.ts +0 -18
  500. package/dist/types/lib/plugins/app-assets/index.d.ts +0 -3
  501. package/dist/types/lib/plugins/app-assets/read-asset-content.d.ts +0 -14
  502. package/dist/types/lib/plugins/app-assets/resolve-asset-id.d.ts +0 -16
  503. package/dist/types/lib/plugins/app-assets/static.d.ts +0 -5
  504. package/dist/types/lib/plugins/app-proxy/app-proxy-plugin.d.ts +0 -89
  505. package/dist/types/lib/plugins/app-proxy/index.d.ts +0 -1
  506. package/dist/types/lib/plugins/app-settings/index.d.ts +0 -32
  507. package/dist/types/lib/plugins/external-public/external-public-plugin.d.ts +0 -30
  508. package/dist/types/lib/plugins/external-public/index.d.ts +0 -1
  509. package/dist/types/lib/plugins/help-proxy/help-proxy-plugin.d.ts +0 -42
  510. package/dist/types/lib/plugins/help-proxy/index.d.ts +0 -1
  511. package/dist/types/lib/utils/config.d.ts +0 -32
  512. package/dist/types/lib/utils/ts-transpile.d.ts +0 -2
  513. package/dist/types/lib/vite-config.d.ts +0 -17
  514. package/dist/types/lib/vite-logger.d.ts +0 -2
  515. package/dist/version.js +0 -3
  516. package/dist/version.js.map +0 -1
  517. /package/dist/{bin/dev-portal/PersonSideSheet/sheets → esm/lib}/types.js +0 -0
  518. /package/dist/{lib → esm/lib}/utils/expect.js +0 -0
  519. /package/dist/{lib → esm/lib}/utils/file-exists.js +0 -0
  520. /package/dist/{lib → esm/lib}/utils/types.js +0 -0
  521. /package/dist/types/{bin/main.app.d.ts → cli/commands/index.d.ts} +0 -0
  522. /package/dist/types/lib/{plugins/app-assets/extension-filter-pattern.d.ts → utils/extension-filter.d.ts} +0 -0
@@ -0,0 +1,31 @@
1
+ export declare const defaultArchive = "app-bundle.zip";
2
+ /**
3
+ * CLI command: `pack`
4
+ *
5
+ * Creates a distributable app bundle of the application.
6
+ *
7
+ * Features:
8
+ * - Bundles all necessary files for deployment.
9
+ * - Output filename and directory can be specified.
10
+ * - Optionally provide a manifest file to customize the bundle.
11
+ * - If no manifest is provided, defaults to app.manifest.[ts|js|json] in the current directory.
12
+ *
13
+ * Usage:
14
+ * $ fusion pack [manifest] [options]
15
+ *
16
+ * Arguments:
17
+ * [manifest] Manifest file to use for bundling (e.g., app.manifest.ts)
18
+ *
19
+ * Options:
20
+ * -a, --archive Name of the output archive file (default: app-bundle.zip)
21
+ * -o, --output Directory where the archive will be saved (default: current working directory)
22
+ * -d, --debug Enable debug mode for verbose logging
23
+ *
24
+ * Example:
25
+ * $ fusion pack
26
+ * $ fusion pack app.manifest.dev.ts --archive my-app.zip --output ./dist
27
+ *
28
+ * @see bundleApp for implementation details
29
+ */
30
+ export declare const command: import("commander").Command;
31
+ export default command;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * CLI command: `publish`
3
+ *
4
+ * Builds, uploads, and tags a Fusion application for deployment to the Fusion portal.
5
+ *
6
+ * Features:
7
+ * - Bundles the app, uploads it to the Fusion app store, and applies a tag for versioning.
8
+ * - Supports specifying environment, manifest file, and tag.
9
+ * - Debug mode and authentication options are supported.
10
+ *
11
+ * Usage:
12
+ * $ fusion publish [bundle] [options]
13
+ *
14
+ * Arguments:
15
+ * [bundle] Path to the app bundle to upload
16
+ *
17
+ * Options:
18
+ * -d, --debug Enable debug mode for verbose logging (default: false)
19
+ * -e, --env <env> Target environment
20
+ * -m, --manifest Manifest file to use for bundling (e.g., app.manifest.ts)
21
+ * -t, --tag Tag to apply to the published app (latest | preview)
22
+ *
23
+ * Example:
24
+ * $ fusion publish
25
+ * $ fusion publish --env prod --manifest app.manifest.prod.ts
26
+ * $ fusion publish --tag latest app.bundle.zip
27
+ *
28
+ * @see uploadApplication, tagApplication for implementation details
29
+ */
30
+ export declare const command: import("commander").Command;
31
+ export default command;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * CLI command: `tag`
3
+ *
4
+ * Tags a Fusion application with a specific version or preview in the Fusion app registry.
5
+ *
6
+ * Features:
7
+ * - Applies a tag to the specified application version for release management.
8
+ * - App key and version can be provided or resolved from the manifest file.
9
+ * - Supports environment selection, debug, and silent modes.
10
+ *
11
+ * Usage:
12
+ * $ fusion tag <tag> [options]
13
+ *
14
+ * Arguments:
15
+ * <tag> Tag to apply (latest | preview | stable)
16
+ *
17
+ * Options:
18
+ * --appKey <string> Application key (if not provided, resolved from manifest)
19
+ * -v, --version <string> Version to tag (if not provided, resolved from manifest)
20
+ * -m, --manifest <string> Manifest file to use for resolving app key and version
21
+ * --debug Enable debug mode for verbose logging
22
+ * --silent Silent mode, suppresses output except errors
23
+ * -e, --env <env> Target environment
24
+ *
25
+ * Example:
26
+ * $ fusion tag latest
27
+ * $ fusion tag preview --env prod --manifest app.manifest.prod.ts
28
+ * $ fusion tag stable --appKey my-app --version 1.2.3
29
+ *
30
+ * @see tagApplication for implementation details
31
+ */
32
+ export declare const command: import("commander").Command;
33
+ export default command;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * CLI command: `upload`
3
+ *
4
+ * Uploads a Fusion application bundle to the Fusion App Store.
5
+ *
6
+ * Features:
7
+ * - Uploads a distributable application bundle (e.g., app-bundle.zip) to the Fusion app registry.
8
+ * - Supports specifying application key, environment, and debug mode.
9
+ *
10
+ * Usage:
11
+ * $ fusion upload [bundle] [options]
12
+ *
13
+ * Arguments:
14
+ * [bundle] Application bundle to upload (default: app-bundle.zip)
15
+ *
16
+ * Options:
17
+ * -k, --appKey <string> Application key (if not provided, resolved from manifest)
18
+ * -e, --env <env> Target environment
19
+ * -d, --debug Enable debug mode for verbose logging
20
+ *
21
+ * Example:
22
+ * $ fusion upload
23
+ * $ fusion upload my-app-bundle.zip --appKey my-app
24
+ * $ fusion upload --debug
25
+ *
26
+ * @see uploadApplication for implementation details
27
+ */
28
+ export declare const command: import("commander").Command;
29
+ export default command;
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const command: Command;
3
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Command to log out from Fusion Framework and clear your authentication session.
3
+ *
4
+ * This command removes your current authentication state from the Fusion Framework CLI.
5
+ * Supports custom tenant and client options for advanced scenarios.
6
+ *
7
+ * @example
8
+ * $ fusion logout
9
+ * $ fusion logout --tenant my-tenant --client my-client-id
10
+ */
11
+ export declare const command: import("commander").Command;
12
+ export default command;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Command to acquire and print an access token for Fusion APIs using your current authentication context.
3
+ *
4
+ * This command retrieves an access token for the specified scopes, tenant, and client.
5
+ * Supports debug and silent modes for flexible output.
6
+ *
7
+ * @example
8
+ * $ fusion token
9
+ * $ fusion token --scope api://my-app/.default
10
+ * $ fusion token --tenant my-tenant --client my-client-id --silent
11
+ */
12
+ export declare const command: import("commander").Command;
13
+ export default command;
@@ -0,0 +1,2 @@
1
+ declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The `resolve` command resolves and displays information about a service registered in Fusion service discovery.
3
+ *
4
+ * This command looks up a service by name and prints its discovery details using the current authentication and environment.
5
+ *
6
+ * Supports environment selection and authentication options.
7
+ *
8
+ * ## Examples
9
+ *
10
+ * ```sh
11
+ * $ fusion resolve my-service
12
+ * $ fusion resolve my-service --env prod
13
+ * ```
14
+ *
15
+ * @command resolve
16
+ * @description Resolve and display information about a service registered in Fusion service discovery.
17
+ * @argument {string} service - Name of the service to resolve in Fusion service discovery.
18
+ * @option {string} --env - Environment to use (e.g., prod, test).
19
+ * @option {string} --token - Authentication token.
20
+ * @option {string} --tenantId - Tenant ID for authentication.
21
+ * @option {string} --clientId - Client ID for authentication.
22
+ * @returns {Promise<void>} Prints the resolved service details to the console.
23
+ */
24
+ declare const command: import("commander").Command;
25
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,2 @@
1
+ export declare const command: import("commander").Command;
2
+ export default command;
@@ -0,0 +1,21 @@
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
+ export {};
@@ -0,0 +1,37 @@
1
+ import { type Command } from 'commander';
2
+ export declare const tenantOption: import("commander").Option;
3
+ export declare const clientOption: import("commander").Option;
4
+ export declare const tokenOption: import("commander").Option;
5
+ export declare const scopeOption: import("commander").Option;
6
+ /**
7
+ * Enhances a given command with authentication-related options.
8
+ *
9
+ * This function adds the following options to the provided command:
10
+ * - `tenantId`: Specifies the tenant identifier.
11
+ * - `clientId`: Specifies the client identifier.
12
+ * - `token`: Specifies the authentication token.
13
+ *
14
+ * @param command - The command to which authentication options will be added.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * import { createCommand } from 'commander';
19
+ * import { withAuthOptions } from './path/to/this/file';
20
+ * const command = withAuthOptions(
21
+ * createCommand('my-command')
22
+ * .description('My command description')
23
+ * .action((options) => {
24
+ * console.log('tenantId:', options.tenant);
25
+ * console.log('clientId:', options.client);
26
+ * console.log('token:', options.token);
27
+ * })
28
+ * );
29
+ *
30
+ * withAuthOptions(command);
31
+ * ```
32
+ **/
33
+ export declare const withAuthOptions: (command: Command, args?: Partial<{
34
+ excludeToken: boolean;
35
+ includeScope: boolean;
36
+ }>) => Command;
37
+ export default withAuthOptions;
@@ -0,0 +1,19 @@
1
+ import { FusionEnv } from '../../lib/framework.node.js';
2
+ export type { FusionEnv } from '../../lib/framework.node.js';
3
+ /**
4
+ * Creates an environment option for Fusion Framework CLI commands.
5
+ *
6
+ * @param options - Configuration options for the environment option.
7
+ * @param options.default - The default environment to use if not specified.
8
+ * @param options.allowDev - Whether to allow the development environment.
9
+ * @returns A configured Commander option for the environment.
10
+ */
11
+ export declare const createEnvOption: (options: {
12
+ default?: FusionEnv;
13
+ allowDev: boolean;
14
+ }) => import("commander").Option;
15
+ /**
16
+ * Default environment option that allows the development environment.
17
+ */
18
+ export declare const envOption: import("commander").Option;
19
+ export default envOption;
@@ -0,0 +1,31 @@
1
+ import type z from 'zod';
2
+ import type { RuntimeEnv } from '../types';
3
+ import type { ApiAppConfig, ApiAppConfigSchema } from './schemas';
4
+ export type { ApiAppConfig as AppConfig } from './schemas.js';
5
+ export { mergeAppConfig } from './merge-app-config.js';
6
+ /**
7
+ * A function type that defines the structure for configuring an application.
8
+ *
9
+ * This function receives the runtime environment and a base config, and returns
10
+ * either a config object, a promise resolving to a config object, or void.
11
+ *
12
+ * @template env - The runtime environment in which the application is running.
13
+ * @param env - The runtime environment object.
14
+ * @param args - An object containing the base API application configuration.
15
+ * @param args.base - The base configuration for the API application.
16
+ * @returns A value or a promise resolving to a value that matches the input type of `ApiAppConfigSchema`,
17
+ * or `void` if no configuration is provided.
18
+ */
19
+ export type AppConfigFn = (env: RuntimeEnv, args: {
20
+ base: ApiAppConfig;
21
+ }) => z.input<typeof ApiAppConfigSchema> | Promise<z.input<typeof ApiAppConfigSchema> | void> | void;
22
+ /**
23
+ * Defines the application configuration by accepting a function that returns the configuration object.
24
+ *
25
+ * This utility is typically used to encapsulate and organize application-specific settings
26
+ * in a structured and type-safe manner.
27
+ *
28
+ * @param fn - A function that returns the application configuration object.
29
+ * @returns The result of invoking the provided configuration function.
30
+ */
31
+ export declare const defineAppConfig: (fn: AppConfigFn) => AppConfigFn;
@@ -0,0 +1,39 @@
1
+ import type { AppManifest } from '@equinor/fusion-framework-module-app';
2
+ import type { RuntimeEnv } from '../types';
3
+ /**
4
+ * Type representing the application manifest structure used by the Fusion Framework.
5
+ * Imported from the '@equinor/fusion-framework-module-app' package for consistency across modules.
6
+ */
7
+ export type { AppManifest } from '@equinor/fusion-framework-module-app';
8
+ /**
9
+ * Function type for loading or modifying an application manifest.
10
+ *
11
+ * @template T - A type extending Partial<AppManifest>, defaults to Partial<AppManifest>.
12
+ * @param env - The runtime environment (see '../types').
13
+ * @param args - Object containing the base manifest (`base`) of type T.
14
+ * @returns The modified manifest of type T, a promise resolving to T, or void if no changes are made.
15
+ *
16
+ * Usage: Implement this type to create functions that dynamically adjust the manifest based on environment or other factors.
17
+ *
18
+ * Inline notes:
19
+ * - This type is generic to allow for partial or full manifest overrides.
20
+ * - Returning void allows for side-effect-only functions, but returning the manifest is preferred for clarity.
21
+ */
22
+ export type AppManifestFn<T extends AppManifest = AppManifest> = (env: RuntimeEnv, // The runtime environment, e.g., 'development', 'production', etc.
23
+ args: {
24
+ base: T;
25
+ }) => T | void | Promise<T | void>;
26
+ /**
27
+ * Utility to define an application manifest in a type-safe and organized manner.
28
+ *
29
+ * @param fn - A function conforming to AppManifestFn that generates the manifest configuration.
30
+ * @returns The result of the provided function, representing the application manifest.
31
+ *
32
+ * Usage: Use this to encapsulate manifest logic, enabling better maintainability and discoverability for RAG systems.
33
+ *
34
+ * Inline notes:
35
+ * - This function is a higher-order utility for manifest definition, not execution.
36
+ * - It does not invoke the function immediately; it simply returns it for later use.
37
+ * - Helps with static analysis and RAG-based documentation extraction.
38
+ */
39
+ export declare const defineAppManifest: (fn: AppManifestFn) => AppManifestFn<AppManifest>;
@@ -1,35 +1,44 @@
1
1
  import { type PackageJson, type NormalizeOptions as ResolveAppPackageOptions } from 'read-package-up';
2
2
  import type { AppManifest } from '@equinor/fusion-framework-module-app';
3
+ /**
4
+ * Extended type for application package.json, optionally including a manifest.
5
+ */
3
6
  export type AppPackageJson = PackageJson & {
4
7
  manifest?: AppManifest;
5
8
  };
9
+ /**
10
+ * Function type for defining a package, supporting both sync and async returns.
11
+ */
6
12
  type DefinePackageFn = () => AppPackageJson | Promise<AppPackageJson>;
13
+ /**
14
+ * Structure representing a resolved application package, including its path and root directory.
15
+ */
7
16
  export type ResolvedAppPackage = {
8
17
  packageJson: AppPackageJson;
9
18
  path: string;
19
+ root: string;
10
20
  };
11
21
  /**
12
- * Method to define the application package with the given object.
22
+ * Defines the application package using the provided object.
13
23
  *
14
- * @param obj - The object to define the application package.
15
- * @returns The defined application package object.
24
+ * @param obj - The object representing the application package.
25
+ * @returns The same object, typed as AppPackageJson.
16
26
  */
17
27
  export declare function defineAppPackage(obj: AppPackageJson): AppPackageJson;
18
28
  /**
19
- * Method to define the application package with the given function.
29
+ * Defines the application package using a function.
20
30
  *
21
- * @param fn - The function to define the application package.
31
+ * @param fn - The function returning the application package.
22
32
  */
23
33
  export declare function defineAppPackage(fn: DefinePackageFn): void;
24
34
  /**
25
35
  * Resolves the entry point of a given package.
26
36
  *
27
- * This function attempts to find the entry point of a package by checking several
28
- * common properties in the package's `package.json` file, such as `entrypoint`, `main`,
29
- * and `module`. If none of these properties are found, it defaults to checking for
30
- * common entry files like `src/index.ts`, `src/index.tsx`, `src/index.js`, and `src/index.jsx`.
37
+ * This function checks for common entry point fields in the package.json (entrypoint, main, module),
38
+ * and falls back to typical source files if not found. It returns the first existing entry.
31
39
  *
32
- * @param pkg - The resolved application package containing the package.json and path information.
40
+ * @param packageJson - The package.json object to resolve from.
41
+ * @param pkgPath - The path to the package.json file (used for relative resolution).
33
42
  * @returns The relative path to the resolved entry point.
34
43
  * @throws Will throw an error if no entry point can be resolved.
35
44
  */
@@ -37,6 +46,8 @@ export declare const resolveEntryPoint: (packageJson: PackageJson, pkgPath?: str
37
46
  /**
38
47
  * Resolves the application key from the given package.json object.
39
48
  *
49
+ * This function strips any leading '@' or scope from the package name, returning a normalized key.
50
+ *
40
51
  * @param packageJson - An object containing the 'name' property from the package.json.
41
52
  * @returns The resolved application key, which is the package name with any leading '@' or scope removed.
42
53
  * @throws Will throw an error if the 'name' property is not present in the packageJson.
@@ -45,12 +56,18 @@ export declare const resolveAppKey: (packageJson: Pick<PackageJson, "name">) =>
45
56
  /**
46
57
  * Asserts the validity of a given package by resolving its application key and entry point.
47
58
  *
59
+ * This function is useful for validating that a package is correctly structured and can be used by the framework.
60
+ *
48
61
  * @param pkg - A partial representation of the application's package JSON.
62
+ * @throws Will throw if the package is missing a valid name or entry point.
49
63
  */
50
64
  export declare const assertPackage: (pkg: Partial<AppPackageJson>) => void;
51
65
  /**
52
66
  * Resolves the application package by searching for the nearest `package.json` file.
53
67
  *
68
+ * This function uses `read-package-up` to traverse up the directory tree and find the closest package.json.
69
+ * It returns the package contents, its path, and the root directory.
70
+ *
54
71
  * @param options - Optional parameters to customize the search behavior.
55
72
  * @returns A promise that resolves to the found package information.
56
73
  * @throws Will throw an error if the `package.json` file is not found.
@@ -0,0 +1,17 @@
1
+ import type { PackageJson } from 'type-fest';
2
+ import type { AppManifest } from '@equinor/fusion-framework-module-app';
3
+ import type { RuntimeEnv } from '../types.js';
4
+ /**
5
+ * Creates an AppManifest object from the given runtime environment and package.json.
6
+ *
7
+ * This function extracts and normalizes manifest fields, resolves the entry point, asset path,
8
+ * and repository information, and includes build metadata. It is the main entry for generating
9
+ * a manifest for Fusion Framework applications.
10
+ *
11
+ * @param env - The runtime environment.
12
+ * @param packageJson - The application's package.json object.
13
+ * @returns The generated AppManifest object.
14
+ * @throws If required fields are missing in packageJson.
15
+ * @public
16
+ */
17
+ export declare const createAppManifestFromPackage: (env: RuntimeEnv, packageJson: PackageJson) => AppManifest;
@@ -0,0 +1,8 @@
1
+ export { defineAppManifest, type AppManifestFn, type AppManifest } from './app-manifest.js';
2
+ export { createAppManifestFromPackage } from './create-app-manifest.js';
3
+ export { mergeAppManifests } from './merge-app-manifest.js';
4
+ export { loadAppManifest, type AppManifestExport } from './load-app-manifest.js';
5
+ export { mergeAppConfig } from './merge-app-config.js';
6
+ export { defineAppConfig, type AppConfigFn, type AppConfig } from './app-config.js';
7
+ export { loadAppConfig, type AppConfigExport } from './load-app-config.js';
8
+ export { ApiAppConfigSchema, type ApiAppConfig } from './schemas.js';
@@ -0,0 +1,54 @@
1
+ import { type ImportConfigResult } from '@equinor/fusion-imports';
2
+ import { type ApiAppConfig } from './schemas.js';
3
+ import type { RuntimeEnv } from '../types.js';
4
+ import type { AppConfigFn } from './app-config.js';
5
+ /**
6
+ * Represents the configuration export for an application.
7
+ *
8
+ * This can either be a static configuration object (`ApiAppConfig`) or a function (`AppConfigFn`)
9
+ * that returns or modifies the application configuration dynamically.
10
+ *
11
+ * Used for both static and dynamic app config patterns.
12
+ *
13
+ * @remarks
14
+ * - Enables flexible config authoring for different deployment scenarios.
15
+ */
16
+ export type AppConfigExport = ApiAppConfig | AppConfigFn;
17
+ /**
18
+ * Options for loading an application config file.
19
+ *
20
+ * @property base - A base configuration object to merge with the imported configuration.
21
+ * @property file - The name of the configuration file to import. Defaults to 'app.config'.
22
+ * @property extensions - An array of file extensions to consider when resolving the configuration file.
23
+ *
24
+ * @remarks
25
+ * - Allows for custom config file resolution and merging strategies.
26
+ * - Useful for multi-environment setups and advanced config loading.
27
+ */
28
+ export type LoadAppConfigOptions = {
29
+ base?: ApiAppConfig;
30
+ file?: string;
31
+ extensions?: string[];
32
+ };
33
+ /**
34
+ * Loads and resolves the application configuration from a file or function export.
35
+ *
36
+ * This function uses a script resolver to handle dynamic imports. If the imported module's default export
37
+ * is a function, it will be invoked with the runtime environment and the base configuration. The result
38
+ * is validated against the `ApiAppConfigSchema`. If the export is an object, it is validated directly.
39
+ *
40
+ * @param env - The runtime environment containing the root directory and other environment-specific settings.
41
+ * @param options - Optional parameters for configuring the import process.
42
+ * @returns A promise that resolves to the imported and validated application configuration.
43
+ *
44
+ * @remarks
45
+ * - Supports both static and dynamic config authoring patterns.
46
+ * - Ensures all configs are validated against the schema for type safety.
47
+ * - Designed for maintainability and RAG-based documentation extraction.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const config = await loadAppConfig(env, { file: 'custom.config.ts' });
52
+ * ```
53
+ */
54
+ export declare const loadAppConfig: (env: RuntimeEnv, options?: LoadAppConfigOptions) => Promise<ImportConfigResult<ApiAppConfig>>;
@@ -0,0 +1,57 @@
1
+ import type { AppManifest } from '@equinor/fusion-framework-module-app';
2
+ import type { RuntimeEnv } from '../types.js';
3
+ import type { AppManifestFn } from './app-manifest.js';
4
+ /**
5
+ * Represents the export type for an application manifest, which can either be
6
+ * a static `AppManifest` object or a function (`AppManifestFn`) that generates
7
+ * an `AppManifest` dynamically based on the runtime environment.
8
+ *
9
+ * Used for both static and dynamic manifest patterns.
10
+ *
11
+ * @public
12
+ */
13
+ export type AppManifestExport = AppManifest | AppManifestFn;
14
+ /**
15
+ * Options for loading an application manifest file.
16
+ *
17
+ * @template T - The type of the application manifest, extending a partial `AppManifest`.
18
+ * @property base - A base manifest object to merge with the loaded manifest.
19
+ * @property file - The file path of the manifest to load. Defaults to `app.manifest` or environment-specific variants.
20
+ * @property extensions - An array of file extensions to consider when resolving the manifest.
21
+ */
22
+ export type LoadAppManifestOptions = {
23
+ base?: AppManifest;
24
+ file?: string | string[];
25
+ extensions?: string[];
26
+ };
27
+ /**
28
+ * Represents the result of loading an application manifest.
29
+ *
30
+ * @template T - A type extending `Partial<AppManifest>` that represents the structure of the manifest.
31
+ * @property manifest - The loaded application manifest of type `T`.
32
+ * @property path - The file path where the manifest was loaded from.
33
+ * @property extension - The file extension of the manifest file.
34
+ */
35
+ type LoadAppManifestResult = {
36
+ manifest: AppManifest;
37
+ path: string;
38
+ extension: string;
39
+ };
40
+ /**
41
+ * Loads an application manifest file and processes its contents.
42
+ *
43
+ * This function attempts to load a configuration file (defaulting to `app.manifest`) and resolves
44
+ * its contents using a provided script resolver. The manifest can either be a static object
45
+ * or a function that dynamically generates the manifest based on the runtime environment.
46
+ *
47
+ * If the specified file is not found and the runtime environment includes an `environment` property,
48
+ * the function will attempt to load a manifest file specific to that environment (e.g., `app.manifest.<environment>`).
49
+ *
50
+ * @param env - The runtime environment object, containing information such as the root directory and environment name.
51
+ * @param options - Optional parameters for loading the manifest.
52
+ * @returns A promise that resolves to an object containing the loaded manifest, the file path, and the file extension.
53
+ * @throws {FileNotFoundError} If the manifest file cannot be found and no fallback is available.
54
+ * @public
55
+ */
56
+ export declare const loadAppManifest: (env: RuntimeEnv, options?: LoadAppManifestOptions) => Promise<LoadAppManifestResult>;
57
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { AppConfig } from './app-config';
2
+ /**
3
+ * Merges a base application configuration object with an overrides object,
4
+ * returning a new configuration object. If the `scopes` property is present
5
+ * in the overrides, it will replace the corresponding property in the base
6
+ * configuration instead of merging deeply.
7
+ *
8
+ * @typeParam T - The type of the application configuration object, extending `AppConfig`.
9
+ * @param base - The base configuration object to merge into.
10
+ * @param overrides - An object containing properties to override in the base configuration.
11
+ * @returns A new configuration object resulting from merging `base` and `overrides`.
12
+ */
13
+ export declare const mergeAppConfig: <T extends AppConfig>(base: T, overrides: Partial<T>) => T;
@@ -0,0 +1,25 @@
1
+ import type { AppManifest } from '@equinor/fusion-framework-module-app';
2
+ import type { RecursivePartial } from '../utils/types.js';
3
+ /**
4
+ * Deeply merges two application manifests using lodash's mergeWith.
5
+ *
6
+ * This utility is intended for combining a base manifest with an override manifest,
7
+ * supporting recursive merging of nested properties. It is commonly used in scenarios
8
+ * where environment-specific or user-specific manifest customizations are required.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * export default defineAppManifest(base => mergeAppManifests(base, { prop: value }));
13
+ * ```
14
+ *
15
+ * @param base - The base manifest to merge with. Typically the default or environment-agnostic manifest.
16
+ * @param overrides - The manifest containing properties to override or extend the base manifest.
17
+ * @returns The deeply merged manifest object.
18
+ *
19
+ * @remarks
20
+ * - Maintainers: This function does not perform schema validation. Ensure validation is handled elsewhere.
21
+ * - Future: Consider adding assertions or schema checks after merging for safety.
22
+ */
23
+ export declare const mergeAppManifests: (base: RecursivePartial<AppManifest>, // The base manifest (may be partial)
24
+ overrides: RecursivePartial<AppManifest>) => AppManifest;
25
+ export default mergeAppManifests;