@equinor/fusion-framework-cli 10.7.4 → 11.0.0-next.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 (513) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +144 -17
  3. package/bin/cli.mjs +4 -1
  4. package/dist/esm/bin/app-build.js +34 -0
  5. package/dist/esm/bin/app-build.js.map +1 -0
  6. package/dist/esm/bin/app-check.js +63 -0
  7. package/dist/esm/bin/app-check.js.map +1 -0
  8. package/dist/esm/bin/app-config-publish.js +89 -0
  9. package/dist/esm/bin/app-config-publish.js.map +1 -0
  10. package/dist/esm/bin/app-config.js +48 -0
  11. package/dist/esm/bin/app-config.js.map +1 -0
  12. package/dist/esm/bin/app-dev.js +92 -0
  13. package/dist/esm/bin/app-dev.js.map +1 -0
  14. package/dist/esm/bin/app-manifest.js +38 -0
  15. package/dist/esm/bin/app-manifest.js.map +1 -0
  16. package/dist/esm/bin/app-pack.js +51 -0
  17. package/dist/esm/bin/app-pack.js.map +1 -0
  18. package/dist/esm/bin/app-tag.js +89 -0
  19. package/dist/esm/bin/app-tag.js.map +1 -0
  20. package/dist/esm/bin/app-upload.js +109 -0
  21. package/dist/esm/bin/app-upload.js.map +1 -0
  22. package/dist/esm/bin/helpers/load-bundle-metadata.js +32 -0
  23. package/dist/esm/bin/helpers/load-bundle-metadata.js.map +1 -0
  24. package/dist/esm/bin/helpers/load-vite-config.js +55 -0
  25. package/dist/esm/bin/helpers/load-vite-config.js.map +1 -0
  26. package/dist/esm/bin/helpers/resolve-app-config.js +46 -0
  27. package/dist/esm/bin/helpers/resolve-app-config.js.map +1 -0
  28. package/dist/esm/bin/helpers/resolve-app-manifest.js +55 -0
  29. package/dist/esm/bin/helpers/resolve-app-manifest.js.map +1 -0
  30. package/dist/esm/bin/helpers/resolve-portal-manifest.js +55 -0
  31. package/dist/esm/bin/helpers/resolve-portal-manifest.js.map +1 -0
  32. package/dist/esm/bin/helpers/resolve-project-package.js +32 -0
  33. package/dist/esm/bin/helpers/resolve-project-package.js.map +1 -0
  34. package/dist/esm/bin/index.js +10 -0
  35. package/dist/esm/bin/index.js.map +1 -0
  36. package/dist/esm/bin/pack.js +70 -0
  37. package/dist/esm/bin/pack.js.map +1 -0
  38. package/dist/esm/bin/portal-build.js +40 -0
  39. package/dist/esm/bin/portal-build.js.map +1 -0
  40. package/dist/esm/bin/portal-dev.js +69 -0
  41. package/dist/esm/bin/portal-dev.js.map +1 -0
  42. package/dist/esm/bin/portal-manifest.js +38 -0
  43. package/dist/esm/bin/portal-manifest.js.map +1 -0
  44. package/dist/esm/bin/portal-pack.js +60 -0
  45. package/dist/esm/bin/portal-pack.js.map +1 -0
  46. package/dist/esm/bin/portal-tag.js +96 -0
  47. package/dist/esm/bin/portal-tag.js.map +1 -0
  48. package/dist/esm/bin/portal-upload.js +99 -0
  49. package/dist/esm/bin/portal-upload.js.map +1 -0
  50. package/dist/esm/bin/utils/ConsoleLogger.js +112 -0
  51. package/dist/esm/bin/utils/ConsoleLogger.js.map +1 -0
  52. package/dist/esm/bin/utils/create-dev-server.js +167 -0
  53. package/dist/esm/bin/utils/create-dev-server.js.map +1 -0
  54. package/dist/esm/bin/utils/format.js +47 -0
  55. package/dist/esm/bin/utils/format.js.map +1 -0
  56. package/dist/esm/bin/utils/index.js +5 -0
  57. package/dist/esm/bin/utils/index.js.map +1 -0
  58. package/dist/esm/bin/utils/spinner.js +142 -0
  59. package/dist/esm/bin/utils/spinner.js.map +1 -0
  60. package/dist/esm/cli/commands/app/alias.js +42 -0
  61. package/dist/esm/cli/commands/app/alias.js.map +1 -0
  62. package/dist/esm/cli/commands/app/build.js +46 -0
  63. package/dist/esm/cli/commands/app/build.js.map +1 -0
  64. package/dist/esm/cli/commands/app/check.js +47 -0
  65. package/dist/esm/cli/commands/app/check.js.map +1 -0
  66. package/dist/esm/cli/commands/app/config.js +91 -0
  67. package/dist/esm/cli/commands/app/config.js.map +1 -0
  68. package/dist/esm/cli/commands/app/dev.js +61 -0
  69. package/dist/esm/cli/commands/app/dev.js.map +1 -0
  70. package/dist/esm/cli/commands/app/index.js +25 -0
  71. package/dist/esm/cli/commands/app/index.js.map +1 -0
  72. package/dist/esm/cli/commands/app/manifest.js +73 -0
  73. package/dist/esm/cli/commands/app/manifest.js.map +1 -0
  74. package/dist/esm/cli/commands/app/pack.js +64 -0
  75. package/dist/esm/cli/commands/app/pack.js.map +1 -0
  76. package/dist/esm/cli/commands/app/publish.js +119 -0
  77. package/dist/esm/cli/commands/app/publish.js.map +1 -0
  78. package/dist/esm/cli/commands/app/tag.js +101 -0
  79. package/dist/esm/cli/commands/app/tag.js.map +1 -0
  80. package/dist/esm/cli/commands/app/upload.js +80 -0
  81. package/dist/esm/cli/commands/app/upload.js.map +1 -0
  82. package/dist/esm/cli/commands/auth/index.js +10 -0
  83. package/dist/esm/cli/commands/auth/index.js.map +1 -0
  84. package/dist/esm/cli/commands/auth/login.js +68 -0
  85. package/dist/esm/cli/commands/auth/login.js.map +1 -0
  86. package/dist/esm/cli/commands/auth/logout.js +55 -0
  87. package/dist/esm/cli/commands/auth/logout.js.map +1 -0
  88. package/dist/esm/cli/commands/auth/token.js +74 -0
  89. package/dist/esm/cli/commands/auth/token.js.map +1 -0
  90. package/dist/esm/cli/commands/disco/index.js +6 -0
  91. package/dist/esm/cli/commands/disco/index.js.map +1 -0
  92. package/dist/esm/cli/commands/disco/resolve.js +61 -0
  93. package/dist/esm/cli/commands/disco/resolve.js.map +1 -0
  94. package/dist/esm/cli/commands/index.js +11 -0
  95. package/dist/esm/cli/commands/index.js.map +1 -0
  96. package/dist/esm/cli/commands/portal/build.js +22 -0
  97. package/dist/esm/cli/commands/portal/build.js.map +1 -0
  98. package/dist/esm/cli/commands/portal/dev.js +24 -0
  99. package/dist/esm/cli/commands/portal/dev.js.map +1 -0
  100. package/dist/esm/cli/commands/portal/index.js +21 -0
  101. package/dist/esm/cli/commands/portal/index.js.map +1 -0
  102. package/dist/esm/cli/commands/portal/manifest.js +45 -0
  103. package/dist/esm/cli/commands/portal/manifest.js.map +1 -0
  104. package/dist/esm/cli/commands/portal/pack.js +35 -0
  105. package/dist/esm/cli/commands/portal/pack.js.map +1 -0
  106. package/dist/esm/cli/commands/portal/publish.js +73 -0
  107. package/dist/esm/cli/commands/portal/publish.js.map +1 -0
  108. package/dist/esm/cli/commands/portal/schema.js +68 -0
  109. package/dist/esm/cli/commands/portal/schema.js.map +1 -0
  110. package/dist/esm/cli/commands/portal/tag.js +69 -0
  111. package/dist/esm/cli/commands/portal/tag.js.map +1 -0
  112. package/dist/esm/cli/commands/portal/upload.js +40 -0
  113. package/dist/esm/cli/commands/portal/upload.js.map +1 -0
  114. package/dist/esm/cli/main.js +52 -0
  115. package/dist/esm/cli/main.js.map +1 -0
  116. package/dist/esm/cli/options/auth.js +96 -0
  117. package/dist/esm/cli/options/auth.js.map +1 -0
  118. package/dist/esm/cli/options/env.js +30 -0
  119. package/dist/esm/cli/options/env.js.map +1 -0
  120. package/dist/esm/lib/app/app-config.js +12 -0
  121. package/dist/esm/lib/app/app-config.js.map +1 -0
  122. package/dist/esm/lib/app/app-manifest.js +15 -0
  123. package/dist/esm/lib/app/app-manifest.js.map +1 -0
  124. package/dist/{lib → esm/lib/app}/app-package.js +30 -10
  125. package/dist/esm/lib/app/app-package.js.map +1 -0
  126. package/dist/esm/lib/app/create-app-manifest.js +72 -0
  127. package/dist/esm/lib/app/create-app-manifest.js.map +1 -0
  128. package/dist/esm/lib/app/index.js +9 -0
  129. package/dist/esm/lib/app/index.js.map +1 -0
  130. package/dist/esm/lib/app/load-app-config.js +47 -0
  131. package/dist/esm/lib/app/load-app-config.js.map +1 -0
  132. package/dist/esm/lib/app/load-app-manifest.js +61 -0
  133. package/dist/esm/lib/app/load-app-manifest.js.map +1 -0
  134. package/dist/esm/lib/app/merge-app-config.js +21 -0
  135. package/dist/esm/lib/app/merge-app-config.js.map +1 -0
  136. package/dist/esm/lib/app/merge-app-manifest.js +31 -0
  137. package/dist/esm/lib/app/merge-app-manifest.js.map +1 -0
  138. package/dist/esm/lib/app/schemas.js +28 -0
  139. package/dist/esm/lib/app/schemas.js.map +1 -0
  140. package/dist/esm/lib/dev-server.js +3 -0
  141. package/dist/esm/lib/dev-server.js.map +1 -0
  142. package/dist/esm/lib/framework.node.js +104 -0
  143. package/dist/esm/lib/framework.node.js.map +1 -0
  144. package/dist/esm/lib/index.js +5 -0
  145. package/dist/esm/lib/index.js.map +1 -0
  146. package/dist/esm/lib/legacy.js +38 -0
  147. package/dist/esm/lib/legacy.js.map +1 -0
  148. package/dist/esm/lib/load-dev-server-config.js +43 -0
  149. package/dist/esm/lib/load-dev-server-config.js.map +1 -0
  150. package/dist/esm/lib/merge-dev-server-config.js +37 -0
  151. package/dist/esm/lib/merge-dev-server-config.js.map +1 -0
  152. package/dist/esm/lib/portal/create-portal-manifest.js +93 -0
  153. package/dist/esm/lib/portal/create-portal-manifest.js.map +1 -0
  154. package/dist/esm/lib/portal/index.js +3 -0
  155. package/dist/esm/lib/portal/index.js.map +1 -0
  156. package/dist/esm/lib/portal/load-portal-manifest.js +54 -0
  157. package/dist/esm/lib/portal/load-portal-manifest.js.map +1 -0
  158. package/dist/esm/lib/portal/load-portal-schema.js +49 -0
  159. package/dist/esm/lib/portal/load-portal-schema.js.map +1 -0
  160. package/dist/esm/lib/portal/portal-manifest.js +21 -0
  161. package/dist/esm/lib/portal/portal-manifest.js.map +1 -0
  162. package/dist/esm/lib/portal/portal-manifest.schema.js +134 -0
  163. package/dist/esm/lib/portal/portal-manifest.schema.js.map +1 -0
  164. package/dist/esm/lib/static.js +20 -0
  165. package/dist/esm/lib/static.js.map +1 -0
  166. package/dist/{lib/utils → esm/lib}/types.js.map +1 -1
  167. package/dist/esm/lib/utils/assert.js +87 -0
  168. package/dist/esm/lib/utils/assert.js.map +1 -0
  169. package/dist/esm/lib/utils/expect.js.map +1 -0
  170. package/dist/{lib/plugins/app-assets/extension-filter-pattern.js → esm/lib/utils/extension-filter.js} +1 -1
  171. package/dist/esm/lib/utils/extension-filter.js.map +1 -0
  172. package/dist/esm/lib/utils/file-exists.js.map +1 -0
  173. package/dist/esm/lib/utils/index.js +6 -0
  174. package/dist/esm/lib/utils/index.js.map +1 -0
  175. package/dist/{lib → esm/lib}/utils/parse-json-request.js +3 -1
  176. package/dist/esm/lib/utils/parse-json-request.js.map +1 -0
  177. package/dist/esm/lib/utils/resolve-annotations.js +28 -0
  178. package/dist/esm/lib/utils/resolve-annotations.js.map +1 -0
  179. package/dist/esm/lib/utils/resolve-devops-annotations.js +59 -0
  180. package/dist/esm/lib/utils/resolve-devops-annotations.js.map +1 -0
  181. package/dist/esm/lib/utils/resolve-git-commit-sha.js +23 -0
  182. package/dist/esm/lib/utils/resolve-git-commit-sha.js.map +1 -0
  183. package/dist/esm/lib/utils/resolve-git-remote-url.js +24 -0
  184. package/dist/esm/lib/utils/resolve-git-remote-url.js.map +1 -0
  185. package/dist/esm/lib/utils/resolve-github-annotations.js +127 -0
  186. package/dist/esm/lib/utils/resolve-github-annotations.js.map +1 -0
  187. package/dist/esm/lib/utils/resolve-package-repo.js +14 -0
  188. package/dist/esm/lib/utils/resolve-package-repo.js.map +1 -0
  189. package/dist/esm/lib/utils/resolve-package.js +18 -0
  190. package/dist/esm/lib/utils/resolve-package.js.map +1 -0
  191. package/dist/esm/lib/utils/resolve-source-entry-point.js +39 -0
  192. package/dist/esm/lib/utils/resolve-source-entry-point.js.map +1 -0
  193. package/dist/esm/lib/utils/types.js.map +1 -0
  194. package/dist/esm/lib/utils/write-file.js +25 -0
  195. package/dist/esm/lib/utils/write-file.js.map +1 -0
  196. package/dist/esm/version.js +3 -0
  197. package/dist/esm/version.js.map +1 -0
  198. package/dist/tsconfig.tsbuildinfo +1 -0
  199. package/dist/types/bin/app-build.d.ts +52 -0
  200. package/dist/types/bin/app-check.d.ts +31 -0
  201. package/dist/types/bin/app-config-publish.d.ts +23 -0
  202. package/dist/types/bin/app-config.d.ts +52 -0
  203. package/dist/types/bin/app-dev.d.ts +45 -0
  204. package/dist/types/bin/app-manifest.d.ts +42 -0
  205. package/dist/types/bin/app-pack.d.ts +38 -0
  206. package/dist/types/bin/app-tag.d.ts +51 -0
  207. package/dist/types/bin/app-upload.d.ts +40 -0
  208. package/dist/types/bin/helpers/load-bundle-metadata.d.ts +15 -0
  209. package/dist/types/bin/helpers/load-vite-config.d.ts +12 -0
  210. package/dist/types/bin/helpers/resolve-app-config.d.ts +18 -0
  211. package/dist/types/bin/helpers/resolve-app-manifest.d.ts +17 -0
  212. package/dist/types/bin/helpers/resolve-portal-manifest.d.ts +27 -0
  213. package/dist/types/bin/helpers/resolve-project-package.d.ts +13 -0
  214. package/dist/types/bin/index.d.ts +9 -0
  215. package/dist/types/bin/pack.d.ts +36 -0
  216. package/dist/types/bin/portal-build.d.ts +54 -0
  217. package/dist/types/bin/portal-dev.d.ts +37 -0
  218. package/dist/types/bin/portal-manifest.d.ts +60 -0
  219. package/dist/types/bin/portal-pack.d.ts +54 -0
  220. package/dist/types/bin/portal-tag.d.ts +51 -0
  221. package/dist/types/bin/portal-upload.d.ts +37 -0
  222. package/dist/types/bin/utils/ConsoleLogger.d.ts +84 -0
  223. package/dist/types/bin/utils/create-dev-server.d.ts +49 -0
  224. package/dist/types/bin/utils/format.d.ts +27 -0
  225. package/dist/types/bin/utils/index.d.ts +3 -13
  226. package/dist/types/bin/utils/spinner.d.ts +75 -0
  227. package/dist/types/cli/commands/app/alias.d.ts +6 -0
  228. package/dist/types/cli/commands/app/build.d.ts +27 -0
  229. package/dist/types/cli/commands/app/check.d.ts +26 -0
  230. package/dist/types/cli/commands/app/config.d.ts +34 -0
  231. package/dist/types/cli/commands/app/dev.d.ts +29 -0
  232. package/dist/types/cli/commands/app/index.d.ts +3 -0
  233. package/dist/types/cli/commands/app/manifest.d.ts +30 -0
  234. package/dist/types/cli/commands/app/pack.d.ts +31 -0
  235. package/dist/types/cli/commands/app/publish.d.ts +31 -0
  236. package/dist/types/cli/commands/app/tag.d.ts +33 -0
  237. package/dist/types/cli/commands/app/upload.d.ts +29 -0
  238. package/dist/types/cli/commands/auth/index.d.ts +3 -0
  239. package/dist/types/cli/commands/auth/login.d.ts +2 -0
  240. package/dist/types/cli/commands/auth/logout.d.ts +12 -0
  241. package/dist/types/cli/commands/auth/token.d.ts +13 -0
  242. package/dist/types/cli/commands/disco/index.d.ts +2 -0
  243. package/dist/types/cli/commands/disco/resolve.d.ts +25 -0
  244. package/dist/types/cli/commands/portal/build.d.ts +2 -0
  245. package/dist/types/cli/commands/portal/dev.d.ts +2 -0
  246. package/dist/types/cli/commands/portal/index.d.ts +2 -0
  247. package/dist/types/cli/commands/portal/manifest.d.ts +2 -0
  248. package/dist/types/cli/commands/portal/pack.d.ts +2 -0
  249. package/dist/types/cli/commands/portal/publish.d.ts +2 -0
  250. package/dist/types/cli/commands/portal/schema.d.ts +2 -0
  251. package/dist/types/cli/commands/portal/tag.d.ts +2 -0
  252. package/dist/types/cli/commands/portal/upload.d.ts +2 -0
  253. package/dist/types/cli/main.d.ts +21 -0
  254. package/dist/types/cli/options/auth.d.ts +37 -0
  255. package/dist/types/cli/options/env.d.ts +19 -0
  256. package/dist/types/lib/app/app-config.d.ts +31 -0
  257. package/dist/types/lib/app/app-manifest.d.ts +39 -0
  258. package/dist/types/lib/{app-package.d.ts → app/app-package.d.ts} +27 -10
  259. package/dist/types/lib/app/create-app-manifest.d.ts +17 -0
  260. package/dist/types/lib/app/index.d.ts +8 -0
  261. package/dist/types/lib/app/load-app-config.d.ts +54 -0
  262. package/dist/types/lib/app/load-app-manifest.d.ts +57 -0
  263. package/dist/types/lib/app/merge-app-config.d.ts +13 -0
  264. package/dist/types/lib/app/merge-app-manifest.d.ts +25 -0
  265. package/dist/types/{schemas.d.ts → lib/app/schemas.d.ts} +10 -1
  266. package/dist/types/lib/dev-server.d.ts +2 -0
  267. package/dist/types/lib/framework.node.d.ts +77 -0
  268. package/dist/types/lib/index.d.ts +4 -3
  269. package/dist/types/lib/legacy.d.ts +24 -0
  270. package/dist/types/lib/load-dev-server-config.d.ts +40 -0
  271. package/dist/types/lib/merge-dev-server-config.d.ts +16 -0
  272. package/dist/types/lib/portal/create-portal-manifest.d.ts +22 -0
  273. package/dist/types/lib/portal/index.d.ts +2 -0
  274. package/dist/types/lib/portal/load-portal-manifest.d.ts +65 -0
  275. package/dist/types/lib/portal/load-portal-schema.d.ts +43 -0
  276. package/dist/types/lib/portal/portal-manifest.d.ts +16 -0
  277. package/dist/types/lib/portal/portal-manifest.schema.d.ts +154 -0
  278. package/dist/types/lib/static.d.ts +10 -0
  279. package/dist/types/lib/types.d.ts +34 -0
  280. package/dist/types/lib/utils/assert.d.ts +48 -0
  281. package/dist/types/lib/utils/index.d.ts +5 -0
  282. package/dist/types/lib/utils/resolve-annotations.d.ts +11 -0
  283. package/dist/types/lib/utils/resolve-devops-annotations.d.ts +30 -0
  284. package/dist/types/lib/utils/resolve-git-commit-sha.d.ts +13 -0
  285. package/dist/types/lib/utils/resolve-git-remote-url.d.ts +13 -0
  286. package/dist/types/lib/utils/resolve-github-annotations.d.ts +65 -0
  287. package/dist/types/lib/utils/resolve-package-repo.d.ts +9 -0
  288. package/dist/types/lib/utils/resolve-package.d.ts +15 -0
  289. package/dist/types/lib/utils/resolve-source-entry-point.d.ts +17 -0
  290. package/dist/types/lib/utils/types.d.ts +1 -1
  291. package/dist/types/lib/utils/write-file.d.ts +14 -0
  292. package/dist/types/version.d.ts +1 -1
  293. package/package.json +47 -68
  294. package/dist/bin/build-application.js +0 -55
  295. package/dist/bin/build-application.js.map +0 -1
  296. package/dist/bin/bundle-application.js +0 -41
  297. package/dist/bin/bundle-application.js.map +0 -1
  298. package/dist/bin/create-dev-serve.js +0 -127
  299. package/dist/bin/create-dev-serve.js.map +0 -1
  300. package/dist/bin/create-export-config.js +0 -40
  301. package/dist/bin/create-export-config.js.map +0 -1
  302. package/dist/bin/create-export-manifest.js +0 -67
  303. package/dist/bin/create-export-manifest.js.map +0 -1
  304. package/dist/bin/dev-portal/AppLoader.js +0 -80
  305. package/dist/bin/dev-portal/AppLoader.js.map +0 -1
  306. package/dist/bin/dev-portal/BookMarkSideSheet.js +0 -13
  307. package/dist/bin/dev-portal/BookMarkSideSheet.js.map +0 -1
  308. package/dist/bin/dev-portal/ContextSelector/ContextSelector.js +0 -40
  309. package/dist/bin/dev-portal/ContextSelector/ContextSelector.js.map +0 -1
  310. package/dist/bin/dev-portal/ContextSelector/index.js +0 -2
  311. package/dist/bin/dev-portal/ContextSelector/index.js.map +0 -1
  312. package/dist/bin/dev-portal/ContextSelector/useContextResolver.js +0 -216
  313. package/dist/bin/dev-portal/ContextSelector/useContextResolver.js.map +0 -1
  314. package/dist/bin/dev-portal/EquinorLoader.js +0 -14
  315. package/dist/bin/dev-portal/EquinorLoader.js.map +0 -1
  316. package/dist/bin/dev-portal/ErrorViewer.js +0 -7
  317. package/dist/bin/dev-portal/ErrorViewer.js.map +0 -1
  318. package/dist/bin/dev-portal/FusionLogo.js +0 -4
  319. package/dist/bin/dev-portal/FusionLogo.js.map +0 -1
  320. package/dist/bin/dev-portal/Header.Actions.js +0 -12
  321. package/dist/bin/dev-portal/Header.Actions.js.map +0 -1
  322. package/dist/bin/dev-portal/Header.js +0 -41
  323. package/dist/bin/dev-portal/Header.js.map +0 -1
  324. package/dist/bin/dev-portal/PersonSideSheet/index.js +0 -32
  325. package/dist/bin/dev-portal/PersonSideSheet/index.js.map +0 -1
  326. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js +0 -16
  327. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js.map +0 -1
  328. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js +0 -15
  329. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js.map +0 -1
  330. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js +0 -13
  331. package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js.map +0 -1
  332. package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js +0 -19
  333. package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js.map +0 -1
  334. package/dist/bin/dev-portal/PersonSideSheet/sheets/Styled.js +0 -30
  335. package/dist/bin/dev-portal/PersonSideSheet/sheets/Styled.js.map +0 -1
  336. package/dist/bin/dev-portal/PersonSideSheet/sheets/index.js +0 -3
  337. package/dist/bin/dev-portal/PersonSideSheet/sheets/index.js.map +0 -1
  338. package/dist/bin/dev-portal/PersonSideSheet/sheets/types.js.map +0 -1
  339. package/dist/bin/dev-portal/Router.js +0 -59
  340. package/dist/bin/dev-portal/Router.js.map +0 -1
  341. package/dist/bin/dev-portal/config.js +0 -79
  342. package/dist/bin/dev-portal/config.js.map +0 -1
  343. package/dist/bin/dev-portal/main.js +0 -13
  344. package/dist/bin/dev-portal/main.js.map +0 -1
  345. package/dist/bin/dev-portal/resources/fallback-photo.svg.js +0 -3
  346. package/dist/bin/dev-portal/resources/fallback-photo.svg.js.map +0 -1
  347. package/dist/bin/dev-portal/useAppContextNavigation.js +0 -87
  348. package/dist/bin/dev-portal/useAppContextNavigation.js.map +0 -1
  349. package/dist/bin/main.app.js +0 -172
  350. package/dist/bin/main.app.js.map +0 -1
  351. package/dist/bin/main.js +0 -20
  352. package/dist/bin/main.js.map +0 -1
  353. package/dist/bin/public/assets/index-Cyqq53lr.js +0 -3686
  354. package/dist/bin/public/index.html +0 -37
  355. package/dist/bin/publish-application.js +0 -96
  356. package/dist/bin/publish-application.js.map +0 -1
  357. package/dist/bin/tag-application.js +0 -73
  358. package/dist/bin/tag-application.js.map +0 -1
  359. package/dist/bin/upload-application.js +0 -63
  360. package/dist/bin/upload-application.js.map +0 -1
  361. package/dist/bin/upload-export-config.js +0 -78
  362. package/dist/bin/upload-export-config.js.map +0 -1
  363. package/dist/bin/utils/execute-command.js +0 -14
  364. package/dist/bin/utils/execute-command.js.map +0 -1
  365. package/dist/bin/utils/format.js +0 -16
  366. package/dist/bin/utils/format.js.map +0 -1
  367. package/dist/bin/utils/getEndpointUrl.js +0 -40
  368. package/dist/bin/utils/getEndpointUrl.js.map +0 -1
  369. package/dist/bin/utils/index.js +0 -14
  370. package/dist/bin/utils/index.js.map +0 -1
  371. package/dist/bin/utils/isAppRegistered.js +0 -26
  372. package/dist/bin/utils/isAppRegistered.js.map +0 -1
  373. package/dist/bin/utils/load-app-config.js +0 -26
  374. package/dist/bin/utils/load-app-config.js.map +0 -1
  375. package/dist/bin/utils/load-manifest.js +0 -31
  376. package/dist/bin/utils/load-manifest.js.map +0 -1
  377. package/dist/bin/utils/load-package.js +0 -18
  378. package/dist/bin/utils/load-package.js.map +0 -1
  379. package/dist/bin/utils/load-vite-config.js +0 -45
  380. package/dist/bin/utils/load-vite-config.js.map +0 -1
  381. package/dist/bin/utils/proxy-request-logger.js +0 -33
  382. package/dist/bin/utils/proxy-request-logger.js.map +0 -1
  383. package/dist/bin/utils/publishAppConfig.js +0 -29
  384. package/dist/bin/utils/publishAppConfig.js.map +0 -1
  385. package/dist/bin/utils/requireToken.js +0 -9
  386. package/dist/bin/utils/requireToken.js.map +0 -1
  387. package/dist/bin/utils/spinner.js +0 -65
  388. package/dist/bin/utils/spinner.js.map +0 -1
  389. package/dist/bin/utils/tagAppBundle.js +0 -26
  390. package/dist/bin/utils/tagAppBundle.js.map +0 -1
  391. package/dist/bin/utils/uploadAppBundle.js +0 -45
  392. package/dist/bin/utils/uploadAppBundle.js.map +0 -1
  393. package/dist/lib/app-config.js +0 -32
  394. package/dist/lib/app-config.js.map +0 -1
  395. package/dist/lib/app-manifest.js +0 -142
  396. package/dist/lib/app-manifest.js.map +0 -1
  397. package/dist/lib/app-package.js.map +0 -1
  398. package/dist/lib/index.js +0 -4
  399. package/dist/lib/index.js.map +0 -1
  400. package/dist/lib/plugins/app-assets/app-asset-plugin.js +0 -96
  401. package/dist/lib/plugins/app-assets/app-asset-plugin.js.map +0 -1
  402. package/dist/lib/plugins/app-assets/emit-asset.js +0 -46
  403. package/dist/lib/plugins/app-assets/emit-asset.js.map +0 -1
  404. package/dist/lib/plugins/app-assets/extension-filter-pattern.js.map +0 -1
  405. package/dist/lib/plugins/app-assets/index.js +0 -4
  406. package/dist/lib/plugins/app-assets/index.js.map +0 -1
  407. package/dist/lib/plugins/app-assets/read-asset-content.js +0 -34
  408. package/dist/lib/plugins/app-assets/read-asset-content.js.map +0 -1
  409. package/dist/lib/plugins/app-assets/resolve-asset-id.js +0 -54
  410. package/dist/lib/plugins/app-assets/resolve-asset-id.js.map +0 -1
  411. package/dist/lib/plugins/app-assets/static.js +0 -15
  412. package/dist/lib/plugins/app-assets/static.js.map +0 -1
  413. package/dist/lib/plugins/app-proxy/app-proxy-plugin.js +0 -125
  414. package/dist/lib/plugins/app-proxy/app-proxy-plugin.js.map +0 -1
  415. package/dist/lib/plugins/app-proxy/index.js +0 -2
  416. package/dist/lib/plugins/app-proxy/index.js.map +0 -1
  417. package/dist/lib/plugins/app-settings/index.js +0 -36
  418. package/dist/lib/plugins/app-settings/index.js.map +0 -1
  419. package/dist/lib/plugins/external-public/external-public-plugin.js +0 -101
  420. package/dist/lib/plugins/external-public/external-public-plugin.js.map +0 -1
  421. package/dist/lib/plugins/external-public/index.js +0 -2
  422. package/dist/lib/plugins/external-public/index.js.map +0 -1
  423. package/dist/lib/plugins/help-proxy/help-proxy-plugin.js +0 -78
  424. package/dist/lib/plugins/help-proxy/help-proxy-plugin.js.map +0 -1
  425. package/dist/lib/plugins/help-proxy/index.js +0 -2
  426. package/dist/lib/plugins/help-proxy/index.js.map +0 -1
  427. package/dist/lib/utils/assert.js +0 -28
  428. package/dist/lib/utils/assert.js.map +0 -1
  429. package/dist/lib/utils/config.js +0 -67
  430. package/dist/lib/utils/config.js.map +0 -1
  431. package/dist/lib/utils/expect.js.map +0 -1
  432. package/dist/lib/utils/file-exists.js.map +0 -1
  433. package/dist/lib/utils/parse-json-request.js.map +0 -1
  434. package/dist/lib/utils/ts-transpile.js +0 -45
  435. package/dist/lib/utils/ts-transpile.js.map +0 -1
  436. package/dist/lib/vite-config.js +0 -76
  437. package/dist/lib/vite-config.js.map +0 -1
  438. package/dist/lib/vite-logger.js +0 -21
  439. package/dist/lib/vite-logger.js.map +0 -1
  440. package/dist/schemas.js +0 -14
  441. package/dist/schemas.js.map +0 -1
  442. package/dist/types/bin/build-application.d.ts +0 -13
  443. package/dist/types/bin/bundle-application.d.ts +0 -4
  444. package/dist/types/bin/create-dev-serve.d.ts +0 -12
  445. package/dist/types/bin/create-export-config.d.ts +0 -13
  446. package/dist/types/bin/create-export-manifest.d.ts +0 -16
  447. package/dist/types/bin/dev-portal/AppLoader.d.ts +0 -11
  448. package/dist/types/bin/dev-portal/BookMarkSideSheet.d.ts +0 -6
  449. package/dist/types/bin/dev-portal/ContextSelector/ContextSelector.d.ts +0 -8
  450. package/dist/types/bin/dev-portal/ContextSelector/index.d.ts +0 -1
  451. package/dist/types/bin/dev-portal/ContextSelector/useContextResolver.d.ts +0 -15
  452. package/dist/types/bin/dev-portal/EquinorLoader.d.ts +0 -5
  453. package/dist/types/bin/dev-portal/ErrorViewer.d.ts +0 -4
  454. package/dist/types/bin/dev-portal/FusionLogo.d.ts +0 -6
  455. package/dist/types/bin/dev-portal/Header.Actions.d.ts +0 -7
  456. package/dist/types/bin/dev-portal/Header.d.ts +0 -2
  457. package/dist/types/bin/dev-portal/PersonSideSheet/index.d.ts +0 -11
  458. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.d.ts +0 -6
  459. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.d.ts +0 -5
  460. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.d.ts +0 -5
  461. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.d.ts +0 -5
  462. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/Styled.d.ts +0 -6
  463. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/index.d.ts +0 -2
  464. package/dist/types/bin/dev-portal/PersonSideSheet/sheets/types.d.ts +0 -5
  465. package/dist/types/bin/dev-portal/Router.d.ts +0 -1
  466. package/dist/types/bin/dev-portal/config.d.ts +0 -3
  467. package/dist/types/bin/dev-portal/main.d.ts +0 -1
  468. package/dist/types/bin/dev-portal/resources/fallback-photo.svg.d.ts +0 -2
  469. package/dist/types/bin/dev-portal/useAppContextNavigation.d.ts +0 -5
  470. package/dist/types/bin/main.d.ts +0 -1
  471. package/dist/types/bin/publish-application.d.ts +0 -6
  472. package/dist/types/bin/tag-application.d.ts +0 -12
  473. package/dist/types/bin/upload-application.d.ts +0 -6
  474. package/dist/types/bin/upload-export-config.d.ts +0 -10
  475. package/dist/types/bin/utils/execute-command.d.ts +0 -8
  476. package/dist/types/bin/utils/getEndpointUrl.d.ts +0 -10
  477. package/dist/types/bin/utils/isAppRegistered.d.ts +0 -5
  478. package/dist/types/bin/utils/load-app-config.d.ts +0 -10
  479. package/dist/types/bin/utils/load-manifest.d.ts +0 -10
  480. package/dist/types/bin/utils/load-package.d.ts +0 -5
  481. package/dist/types/bin/utils/load-vite-config.d.ts +0 -10
  482. package/dist/types/bin/utils/proxy-request-logger.d.ts +0 -15
  483. package/dist/types/bin/utils/publishAppConfig.d.ts +0 -9
  484. package/dist/types/bin/utils/requireToken.d.ts +0 -4
  485. package/dist/types/bin/utils/tagAppBundle.d.ts +0 -7
  486. package/dist/types/bin/utils/uploadAppBundle.d.ts +0 -7
  487. package/dist/types/lib/app-config.d.ts +0 -27
  488. package/dist/types/lib/app-manifest.d.ts +0 -52
  489. package/dist/types/lib/plugins/app-assets/app-asset-plugin.d.ts +0 -36
  490. package/dist/types/lib/plugins/app-assets/emit-asset.d.ts +0 -18
  491. package/dist/types/lib/plugins/app-assets/index.d.ts +0 -3
  492. package/dist/types/lib/plugins/app-assets/read-asset-content.d.ts +0 -14
  493. package/dist/types/lib/plugins/app-assets/resolve-asset-id.d.ts +0 -16
  494. package/dist/types/lib/plugins/app-assets/static.d.ts +0 -5
  495. package/dist/types/lib/plugins/app-proxy/app-proxy-plugin.d.ts +0 -89
  496. package/dist/types/lib/plugins/app-proxy/index.d.ts +0 -1
  497. package/dist/types/lib/plugins/app-settings/index.d.ts +0 -32
  498. package/dist/types/lib/plugins/external-public/external-public-plugin.d.ts +0 -30
  499. package/dist/types/lib/plugins/external-public/index.d.ts +0 -1
  500. package/dist/types/lib/plugins/help-proxy/help-proxy-plugin.d.ts +0 -42
  501. package/dist/types/lib/plugins/help-proxy/index.d.ts +0 -1
  502. package/dist/types/lib/utils/config.d.ts +0 -32
  503. package/dist/types/lib/utils/ts-transpile.d.ts +0 -2
  504. package/dist/types/lib/vite-config.d.ts +0 -17
  505. package/dist/types/lib/vite-logger.d.ts +0 -2
  506. package/dist/version.js +0 -3
  507. package/dist/version.js.map +0 -1
  508. /package/dist/{bin/dev-portal/PersonSideSheet/sheets → esm/lib}/types.js +0 -0
  509. /package/dist/{lib → esm/lib}/utils/expect.js +0 -0
  510. /package/dist/{lib → esm/lib}/utils/file-exists.js +0 -0
  511. /package/dist/{lib → esm/lib}/utils/types.js +0 -0
  512. /package/dist/types/{bin/main.app.d.ts → cli/commands/index.d.ts} +0 -0
  513. /package/dist/types/lib/{plugins/app-assets/extension-filter-pattern.d.ts → utils/extension-filter.d.ts} +0 -0
@@ -0,0 +1,52 @@
1
+ import type { ReadResult as PackageInfo } from 'read-package-up';
2
+ import type { AppManifest } from '@equinor/fusion-framework-module-app';
3
+ import type { ConsoleLogger } from './utils';
4
+ import type { RuntimeEnv } from '../lib';
5
+ /**
6
+ * Options for building an application.
7
+ * @public
8
+ */
9
+ export type BuildApplicationOptions = {
10
+ /**
11
+ * Partial runtime environment variables to override defaults.
12
+ */
13
+ env?: Partial<RuntimeEnv>;
14
+ /**
15
+ * Path to the application manifest file.
16
+ */
17
+ manifest?: string;
18
+ /**
19
+ * Logger instance for build output. If null, disables logging.
20
+ */
21
+ log?: ConsoleLogger | null;
22
+ };
23
+ /**
24
+ * Output of the application build process.
25
+ * @public
26
+ */
27
+ type ApplicationBuildOutput = {
28
+ /**
29
+ * Package information from package.json.
30
+ */
31
+ pkg: PackageInfo;
32
+ /**
33
+ * Application manifest object.
34
+ */
35
+ manifest: AppManifest;
36
+ /**
37
+ * Output directory for the built application.
38
+ */
39
+ outDir: string;
40
+ };
41
+ /**
42
+ * Builds an application using Vite.
43
+ *
44
+ * Loads the application manifest, applies Vite configuration, and runs the Vite build process.
45
+ *
46
+ * @param opt - Build options including environment, manifest path, and logger.
47
+ * @returns Output containing package info, manifest, and output directory.
48
+ * @throws Will throw if the build process fails.
49
+ * @public
50
+ */
51
+ export declare const buildApplication: (opt?: BuildApplicationOptions) => Promise<ApplicationBuildOutput>;
52
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { ConsoleLogger } from './utils';
2
+ import { type FusionEnv, type FusionFrameworkSettings } from '../lib/framework.node.js';
3
+ /**
4
+ * Options for checking application registration in the app store.
5
+ * @public
6
+ */
7
+ type AppCheckOptions = {
8
+ /**
9
+ * The environment configuration for the Fusion Framework.
10
+ */
11
+ environment: FusionEnv;
12
+ /**
13
+ * Authentication settings for the Fusion Framework.
14
+ */
15
+ auth: FusionFrameworkSettings['auth'];
16
+ /**
17
+ * Optional logger for outputting progress and debug information.
18
+ */
19
+ log?: ConsoleLogger;
20
+ };
21
+ /**
22
+ * Checks if the application is registered in the app store.
23
+ *
24
+ * Resolves the app package and manifest, initializes the Fusion Framework, and queries the app store.
25
+ *
26
+ * @param options - Options for environment, authentication, and logging.
27
+ * @returns A promise that resolves when the check is complete.
28
+ * @public
29
+ */
30
+ export declare const checkApp: (options: AppCheckOptions) => Promise<void>;
31
+ export default checkApp;
@@ -0,0 +1,23 @@
1
+ import { type FusionEnv, type FusionFrameworkSettings } from '../lib/framework.node.js';
2
+ import { type ConsoleLogger } from './utils';
3
+ type AppConfigPublishOptions = {
4
+ config?: string;
5
+ manifest?: string;
6
+ environment: Exclude<FusionEnv, FusionEnv.Development>;
7
+ auth: FusionFrameworkSettings['auth'];
8
+ debug?: boolean;
9
+ log?: ConsoleLogger | null;
10
+ };
11
+ /**
12
+ * Publishes the application configuration to the app store for a specific build version.
13
+ *
14
+ * This function generates the application config, loads the manifest, initializes the Fusion Framework,
15
+ * and sends the config to the app service. Handles and logs errors for common failure scenarios.
16
+ *
17
+ * @param options - Options for config, manifest, environment, authentication, and logging.
18
+ * @returns A promise that resolves when publishing is complete.
19
+ * @throws If the build version is missing or publishing fails.
20
+ * @public
21
+ */
22
+ export declare const publishAppConfig: (options: AppConfigPublishOptions) => Promise<void>;
23
+ export default publishAppConfig;
@@ -0,0 +1,52 @@
1
+ import type { RuntimeEnv } from '../lib';
2
+ import { type ConsoleLogger } from './utils';
3
+ /**
4
+ * Options for generating the application configuration.
5
+ *
6
+ * This interface defines the shape of the options object accepted by
7
+ * {@link generateApplicationConfig}. It allows for optional logging, environment overrides,
8
+ * config file path, and output file path.
9
+ *
10
+ * @public
11
+ */
12
+ interface GenerateApplicationConfigOptions {
13
+ /**
14
+ * Logger instance for outputting progress and debug information (optional).
15
+ */
16
+ log?: ConsoleLogger | null;
17
+ /**
18
+ * Partial runtime environment overrides (optional).
19
+ */
20
+ env?: Partial<RuntimeEnv>;
21
+ /**
22
+ * Path to the config file to resolve (optional).
23
+ */
24
+ config?: string;
25
+ /**
26
+ * Output file path for writing the generated config (optional).
27
+ */
28
+ output?: string;
29
+ }
30
+ /**
31
+ * Generates the application configuration object for the current project.
32
+ *
33
+ * This function resolves the app package, sets up the runtime environment, resolves the app config,
34
+ * and optionally writes the config to a file if an output path is provided. Logging is supported for
35
+ * debugging and progress tracking.
36
+ *
37
+ * @param options - Optional settings for logger, environment overrides, config path, and output file.
38
+ * @returns An object containing the generated config and the resolved package info.
39
+ * @throws If writing the config to file fails.
40
+ * @public
41
+ */
42
+ export declare const generateApplicationConfig: (options?: GenerateApplicationConfigOptions) => Promise<{
43
+ config: {
44
+ environment: Record<string, any>;
45
+ endpoints?: Record<string, {
46
+ url: string;
47
+ scopes: string[];
48
+ }> | undefined;
49
+ };
50
+ pkg: import("../lib").ResolvedPackage;
51
+ }>;
52
+ export {};
@@ -0,0 +1,45 @@
1
+ import type { RuntimeEnv } from '../lib/types.js';
2
+ import type { ConsoleLogger } from './utils/ConsoleLogger.js';
3
+ /**
4
+ * Options for starting the application development server.
5
+ *
6
+ * This interface defines the shape of the options object accepted by
7
+ * {@link startAppDevServer}. It allows for optional environment, manifest path,
8
+ * config path, and logger.
9
+ *
10
+ * @public
11
+ */
12
+ export interface StartAppDevServerOptions {
13
+ /**
14
+ * Runtime environment settings for the dev server (optional).
15
+ */
16
+ env?: RuntimeEnv;
17
+ /**
18
+ * Path to the application manifest file (optional).
19
+ */
20
+ manifest?: string;
21
+ /**
22
+ * Path to the application config file (optional).
23
+ */
24
+ config?: string;
25
+ /**
26
+ * Logger instance for outputting progress and debug information (required).
27
+ */
28
+ log: ConsoleLogger | null;
29
+ /**
30
+ * Port for the development server (optional, defaults to 3000).
31
+ */
32
+ port?: number;
33
+ }
34
+ /**
35
+ * Starts the application development server for local development.
36
+ *
37
+ * This function resolves the app package, manifest, and config, sets up the runtime environment,
38
+ * and launches a development server using the resolved configuration. It also attempts to resolve
39
+ * the portal entry point if available, and provides detailed logging for each step.
40
+ *
41
+ * @param options - Settings for environment, manifest path, config path, and logger.
42
+ * @returns A promise that resolves when the dev server has started.
43
+ * @public
44
+ */
45
+ export declare const startAppDevServer: (options?: StartAppDevServerOptions) => Promise<import("vite").ViteDevServer>;
@@ -0,0 +1,42 @@
1
+ import type { RuntimeEnv } from '../lib';
2
+ import type { ConsoleLogger } from './utils';
3
+ /**
4
+ * Options for resolving the application manifest.
5
+ *
6
+ * This type defines the shape of the options object accepted by
7
+ * {@link loadAppManifest}. It allows for optional logging, environment overrides,
8
+ * and a custom manifest file path.
9
+ *
10
+ * @public
11
+ */
12
+ export type ResolveAppManifestOptions = {
13
+ /**
14
+ * Logger instance for outputting progress and debug information (optional).
15
+ */
16
+ log?: ConsoleLogger | null;
17
+ /**
18
+ * Path to a specific manifest file to resolve (optional).
19
+ */
20
+ manifest?: string;
21
+ /**
22
+ * Partial runtime environment overrides (optional).
23
+ */
24
+ env?: Partial<RuntimeEnv>;
25
+ };
26
+ /**
27
+ * Loads and resolves the application manifest based on the provided options.
28
+ *
29
+ * This function resolves the app package, sets up the runtime environment, and loads the manifest.
30
+ * Logging is supported for debugging and progress tracking. Returns the manifest, package, and environment.
31
+ *
32
+ * @param options - The options for resolving the application manifest.
33
+ * @returns An object containing the resolved manifest, package, and runtime environment.
34
+ * @throws Will throw an error if resolving the application package or manifest fails.
35
+ * @public
36
+ */
37
+ export declare const loadAppManifest: (options: ResolveAppManifestOptions) => Promise<{
38
+ manifest: import("@equinor/fusion-framework-module-app").AppManifest;
39
+ pkg: import("../lib").ResolvedPackage;
40
+ env: RuntimeEnv;
41
+ }>;
42
+ export default loadAppManifest;
@@ -0,0 +1,38 @@
1
+ import type { ConsoleLogger } from './utils/ConsoleLogger';
2
+ /**
3
+ * Options for bundling the application into an archive.
4
+ *
5
+ * This type defines the shape of the options object accepted by
6
+ * {@link bundleApp}. It allows for optional logging, manifest path, and archive name.
7
+ *
8
+ * @public
9
+ */
10
+ export type BundleAppOptions = {
11
+ /**
12
+ * Logger instance for outputting progress and debug information (optional).
13
+ */
14
+ log?: ConsoleLogger | null;
15
+ /**
16
+ * Path to the application manifest file (optional).
17
+ */
18
+ manifest?: string;
19
+ /**
20
+ * Name or path of the output archive file (optional).
21
+ */
22
+ archive?: string;
23
+ };
24
+ /**
25
+ * Bundles the application into an archive for distribution or deployment.
26
+ *
27
+ * This function builds the application, validates the manifest, and creates an archive containing
28
+ * the app manifest and metadata. Handles errors and logs progress for maintainability and debugging.
29
+ *
30
+ * @param options - Options for logger, manifest path, and archive name.
31
+ * @returns An object containing the archive path and the application manifest.
32
+ * @throws If the manifest build config is missing or packaging fails.
33
+ * @public
34
+ */
35
+ export declare const bundleApp: (options: BundleAppOptions) => Promise<{
36
+ archive: import("adm-zip");
37
+ manifest: import("@equinor/fusion-framework-module-app").AppManifest;
38
+ }>;
@@ -0,0 +1,51 @@
1
+ import type { FusionFramework } from '../lib';
2
+ import { type ConsoleLogger } from './utils';
3
+ /**
4
+ * Allowed tags for application versions in the app service.
5
+ *
6
+ * - `latest`: Marks the most recent stable version of the application.
7
+ * - `preview`: Marks a pre-release or preview version for testing or review.
8
+ *
9
+ * Used by {@link tagApplication} to validate and apply version tags.
10
+ *
11
+ * @public
12
+ */
13
+ export declare enum AllowedTags {
14
+ Latest = "latest",
15
+ Preview = "preview"
16
+ }
17
+ /**
18
+ * Options for tagging an application version in the app service.
19
+ *
20
+ * This interface defines the required and optional parameters for the
21
+ * {@link tagApplication} function, including the tag type, application key,
22
+ * version, framework instance, and logger.
23
+ *
24
+ * @property tag - The tag to apply to the application version (e.g., 'latest' or 'preview').
25
+ * @property appKey - The unique key identifying the application.
26
+ * @property version - The version of the application to tag.
27
+ * @property framework - The FusionFramework instance used for service discovery and requests.
28
+ * @property log - Optional logger for outputting progress and debug information.
29
+ *
30
+ * @public
31
+ */
32
+ export type TagApplicationOptions = {
33
+ tag: AllowedTags;
34
+ appKey: string;
35
+ version: string;
36
+ framework: FusionFramework;
37
+ log?: ConsoleLogger | null;
38
+ };
39
+ /**
40
+ * Tags an application version in the app service with a specified tag (e.g., 'latest' or 'preview').
41
+ *
42
+ * This function validates input, creates a client for the app service, and sends a tag request.
43
+ * It provides detailed logging and error handling for common failure scenarios.
44
+ *
45
+ * @param options - Tag, app key, version, framework instance, and logger.
46
+ * @returns The result of the tag operation from the app service.
47
+ * @throws If the tag, app key, or version is invalid, or if the tag operation fails.
48
+ * @public
49
+ */
50
+ export declare const tagApplication: (options: TagApplicationOptions) => Promise<unknown>;
51
+ export default tagApplication;
@@ -0,0 +1,40 @@
1
+ import AdmZip from 'adm-zip';
2
+ import type { ConsoleLogger } from './utils';
3
+ import type { FusionFramework } from '../lib/framework.node.js';
4
+ /**
5
+ * Options for uploading an application bundle to the app service.
6
+ *
7
+ * This type defines the required and optional parameters for the
8
+ * {@link uploadApplication} function, including the bundle file or AdmZip instance,
9
+ * application key, framework instance, and logger.
10
+ *
11
+ * @property fileOrBundle - Path to the bundle file or an AdmZip instance.
12
+ * @property appKey - Optional application key to override bundle metadata.
13
+ * @property framework - The FusionFramework instance used for service discovery and requests.
14
+ * @property log - Optional logger for outputting progress and debug information.
15
+ *
16
+ * @public
17
+ */
18
+ type UploadApplicationOptions = {
19
+ fileOrBundle: string | AdmZip;
20
+ appKey?: string;
21
+ framework: FusionFramework;
22
+ log?: ConsoleLogger;
23
+ };
24
+ /**
25
+ * Uploads an application bundle to the app service for publishing or updating an app.
26
+ *
27
+ * This function loads the bundle, resolves the app key (from argument or metadata),
28
+ * reads the bundle content, and uploads it to the app service. Handles and logs errors
29
+ * for common failure scenarios, including HTTP status codes and bundle reading issues.
30
+ *
31
+ * @param opt - Options for bundle file, app key, framework, and logger.
32
+ * @returns The response from the app service, or an empty object if the response cannot be parsed.
33
+ * @throws If bundle reading or upload fails, or if the app service returns an error status.
34
+ * @public
35
+ */
36
+ export declare const uploadApplication: (opt: UploadApplicationOptions) => Promise<{
37
+ name: string;
38
+ version: string;
39
+ }>;
40
+ export default uploadApplication;
@@ -0,0 +1,15 @@
1
+ import type AdmZip from 'adm-zip';
2
+ /**
3
+ * The shape of the metadata loaded from the bundle zip file.
4
+ */
5
+ export type BundleMetadata = {
6
+ name: string;
7
+ version: string;
8
+ };
9
+ /**
10
+ * Loads the metadata from a bundle zip file.
11
+ * @param bundle - The AdmZip instance representing the bundle.
12
+ * @returns A promise resolving to an object containing name and version.
13
+ * @throws If metadata.json is missing or cannot be parsed.
14
+ */
15
+ export declare const loadMetadata: (bundle: AdmZip) => Promise<BundleMetadata>;
@@ -0,0 +1,12 @@
1
+ import type { RuntimeEnv } from '../../lib';
2
+ import { type ResolvedPackage } from '../../lib/utils';
3
+ /**
4
+ * Loads and merges the Vite configuration for a given package and environment.
5
+ * Throws errors if the output directory is invalid (root or src).
6
+ *
7
+ * @param env - The runtime environment (mode, etc).
8
+ * @param pkg - The resolved package information.
9
+ * @returns The merged Vite UserConfig object.
10
+ */
11
+ export declare const loadViteConfig: (env: RuntimeEnv, pkg: ResolvedPackage) => Promise<Record<string, any>>;
12
+ export default loadViteConfig;
@@ -0,0 +1,18 @@
1
+ import type { RuntimeEnv } from '../../lib';
2
+ import type { ConsoleLogger } from '../utils';
3
+ import { type ApiAppConfig } from '../../lib/app';
4
+ /**
5
+ * Resolves the application configuration based on the provided runtime environment and options.
6
+ * Handles logging, error reporting, and fallback to built-in config if no local config is found.
7
+ *
8
+ * @param env - The runtime environment containing the command and mode information.
9
+ * @param options - Optional parameters:
10
+ * - config: Path to a specific configuration file.
11
+ * - log: Logger utility for progress and status messages.
12
+ * @returns A promise resolving to the loaded application configuration.
13
+ * @throws If the application configuration cannot be resolved.
14
+ */
15
+ export declare const resolveAppConfig: (env: RuntimeEnv, options: {
16
+ config?: string;
17
+ log?: ConsoleLogger | null;
18
+ }) => Promise<ApiAppConfig>;
@@ -0,0 +1,17 @@
1
+ import type { RuntimeEnv, ResolvedPackage } from '../../lib';
2
+ import type { ConsoleLogger } from '../utils';
3
+ /**
4
+ * Resolves the application manifest for a given package and environment.
5
+ * Attempts to load a manifest file if specified, otherwise falls back to generating a manifest from package.json.
6
+ * Handles logging for progress, success, and error states.
7
+ *
8
+ * @param env - The runtime environment context.
9
+ * @param pkg - The resolved package information.
10
+ * @param options - Optional logger and manifest path.
11
+ * @returns The resolved application manifest object.
12
+ * @throws If the manifest file is explicitly requested but not found, or if another error occurs.
13
+ */
14
+ export declare const resolveAppManifest: (env: RuntimeEnv, pkg: ResolvedPackage, options?: {
15
+ log?: ConsoleLogger | null;
16
+ manifestPath?: string;
17
+ }) => Promise<import("@equinor/fusion-framework-module-app").AppManifest>;
@@ -0,0 +1,27 @@
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';
5
+ /**
6
+ * Resolves the portal manifest for a given runtime environment and package.
7
+ *
8
+ * This function attempts to load a portal manifest, optionally merging it with a base manifest
9
+ * generated from the provided package's package.json. If a manifest file is not found and a
10
+ * manifest path was specified, an error is thrown. Otherwise, it falls back to the base manifest.
11
+ * Logging is performed at various stages if a logger is provided.
12
+ *
13
+ * @typeParam T - The shape of the portal manifest, extending Partial<PortalManifest>.
14
+ * @param env - The runtime environment context.
15
+ * @param pkg - The resolved package containing package.json metadata.
16
+ * @param options - Optional parameters.
17
+ * @param options.log - Optional logger for progress and error reporting.
18
+ * @param options.manifestPath - Optional path to a specific manifest file.
19
+ * @param options.base - Optional base manifest to merge with the loaded manifest.
20
+ * @returns A promise that resolves to the loaded or generated portal manifest.
21
+ * @throws {Error} If the manifest file is not found at the specified path or if another error occurs during loading.
22
+ */
23
+ export declare const resolvePortalManifest: <T extends PortalManifest>(env: RuntimeEnv, pkg: ResolvedPackage, options?: {
24
+ log?: ConsoleLogger | null;
25
+ manifestPath?: string;
26
+ base?: Partial<T>;
27
+ }) => Promise<T>;
@@ -0,0 +1,13 @@
1
+ import type { ConsoleLogger } from '../utils';
2
+ /**
3
+ * Resolves the application package by fetching its metadata and logging relevant information.
4
+ *
5
+ * This function uses a logger to provide feedback during the resolution process.
6
+ * It retrieves the package's packageJson and root directory, logs the results, and handles errors gracefully.
7
+ *
8
+ * @param log - Logger instance for progress and status updates.
9
+ * @returns A promise that resolves to the package information, including its packageJson and root directory.
10
+ * @throws Will throw an error if the package resolution fails.
11
+ */
12
+ export declare function resolveProjectPackage(log?: ConsoleLogger | null): Promise<import("../../lib").ResolvedPackage>;
13
+ export default resolveProjectPackage;
@@ -0,0 +1,9 @@
1
+ export { buildApplication } from './app-build.js';
2
+ export { bundleApp } from './app-pack.js';
3
+ export { generateApplicationConfig } from './app-config.js';
4
+ export { publishAppConfig } from './app-config-publish.js';
5
+ export { startAppDevServer } from './app-dev.js';
6
+ export { buildPortal } from './portal-build.js';
7
+ export { bundlePortal } from './portal-pack.js';
8
+ export { loadPortalManifest } from './portal-manifest.js';
9
+ export { pack } from './pack.js';
@@ -0,0 +1,36 @@
1
+ import AdmZip from 'adm-zip';
2
+ import type { ReadResult as PackageInfo } from 'read-package-up';
3
+ import { type ConsoleLogger } from './utils';
4
+ /**
5
+ * Options for packaging an application bundle into a zip archive.
6
+ *
7
+ * This type defines the optional parameters for the {@link pack} function, including
8
+ * the build directory, archive output path, logger, and additional content to include.
9
+ *
10
+ * @property buildDir - Directory containing build output to include in the archive (default: 'dist').
11
+ * @property archive - Path to the output archive file (optional).
12
+ * @property log - Logger instance for outputting progress and debug information (optional).
13
+ * @property content - Additional files to include in the archive as a record of filename to content.
14
+ *
15
+ * @public
16
+ */
17
+ type Options = {
18
+ buildDir?: string;
19
+ archive?: string;
20
+ log?: ConsoleLogger | null;
21
+ content?: Record<string, string>;
22
+ };
23
+ /**
24
+ * Packages an application build directory and additional files into a zip archive.
25
+ *
26
+ * This function validates the build directory, adds build output and standard files (e.g., package.json, README.md),
27
+ * and optionally writes the archive to disk. It supports adding extra content and provides detailed logging.
28
+ *
29
+ * @param pkg - The resolved package info from package.json.
30
+ * @param options - Packaging options including build directory, archive path, logger, and extra content.
31
+ * @returns The AdmZip instance representing the created archive.
32
+ * @throws If the build directory does not exist or writing the archive fails.
33
+ * @public
34
+ */
35
+ export declare const pack: (pkg: PackageInfo, options?: Options) => Promise<AdmZip>;
36
+ export default pack;
@@ -0,0 +1,54 @@
1
+ import type { RuntimeEnv } from '../lib';
2
+ import { type ConsoleLogger } from './utils';
3
+ /**
4
+ * Options for building a portal application using Vite.
5
+ *
6
+ * This type defines the optional parameters for the {@link buildPortal} function, including
7
+ * environment overrides, manifest path, and logger instance.
8
+ *
9
+ * @property env - Partial runtime environment overrides (optional).
10
+ * @property manifest - Path to the portal manifest file (optional).
11
+ * @property log - Logger instance for outputting progress and debug information (optional).
12
+ *
13
+ * @public
14
+ */
15
+ export type BuildApplicationOptions = {
16
+ env?: Partial<RuntimeEnv>;
17
+ manifest?: string;
18
+ log?: ConsoleLogger | null;
19
+ };
20
+ /**
21
+ * Builds a portal application using Vite.
22
+ *
23
+ * This function loads the portal manifest, applies Vite configuration, and runs the Vite build process.
24
+ * It provides detailed logging for each step and returns the package info, manifest, and output directory.
25
+ *
26
+ * @param opt - Build options including environment, manifest path, and logger.
27
+ * @returns An object containing the package info, manifest, and output directory.
28
+ * @throws If the build process fails or configuration is invalid.
29
+ * @public
30
+ */
31
+ export declare const buildPortal: (opt?: BuildApplicationOptions) => Promise<{
32
+ pkg: import("../lib").ResolvedPackage;
33
+ manifest: {
34
+ build: {
35
+ version: string;
36
+ timestamp: string;
37
+ commitSha: string;
38
+ allowedExtensions: string[];
39
+ templateEntry: string;
40
+ schemaEntry: string;
41
+ config?: Record<string, unknown> | undefined;
42
+ githubRepo?: string | undefined;
43
+ projectPage?: string | undefined;
44
+ assetPath?: string | undefined;
45
+ annotations?: Record<string, string> | undefined;
46
+ schema?: Record<string, unknown> | undefined;
47
+ };
48
+ name: string;
49
+ displayName?: string | undefined;
50
+ description?: string | undefined;
51
+ };
52
+ outDir: any;
53
+ }>;
54
+ export default buildPortal;
@@ -0,0 +1,37 @@
1
+ import type { RuntimeEnv } from '../lib';
2
+ import { type ConsoleLogger } from './utils';
3
+ /**
4
+ * Starts the portal development server for local development and testing.
5
+ *
6
+ * This function sets up the runtime environment, resolves the portal manifest and config,
7
+ * and launches a development server using the resolved configuration. It provides detailed
8
+ * logging for each step and returns the dev server instance for further use.
9
+ *
10
+ * @param options - Settings for environment, manifest path, config path, logger, and server options.
11
+ * @returns The dev server instance after it has started.
12
+ * @public
13
+ */
14
+ export declare const startPortalDevServer: (options?: {
15
+ /**
16
+ * Runtime environment settings for the dev server (optional).
17
+ */
18
+ env?: RuntimeEnv;
19
+ /**
20
+ * Path to the portal manifest file (optional).
21
+ */
22
+ manifest?: string;
23
+ /**
24
+ * Path to the portal config file (optional).
25
+ */
26
+ config?: string;
27
+ /**
28
+ * Logger instance for outputting progress and debug information (required).
29
+ */
30
+ log: ConsoleLogger | null;
31
+ /**
32
+ * Server options such as port (optional).
33
+ */
34
+ server?: {
35
+ port?: number;
36
+ };
37
+ }) => Promise<import("vite").ViteDevServer>;