@equinor/fusion-framework-cli 15.1.8 → 15.2.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 (254) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/bin/build/bin.mjs +1 -1
  3. package/bin/build/cli.mjs +2 -2
  4. package/dist/esm/lib/app/{schemas.js → api-app-config-schema.js} +1 -1
  5. package/dist/esm/lib/app/api-app-config-schema.js.map +1 -0
  6. package/dist/esm/lib/app/{create-app-manifest.js → create-app-manifest-from-package.js} +10 -8
  7. package/dist/esm/lib/app/create-app-manifest-from-package.js.map +1 -0
  8. package/dist/esm/lib/app/{app-config.js → define-app-config.js} +1 -1
  9. package/dist/esm/lib/app/define-app-config.js.map +1 -0
  10. package/dist/esm/lib/app/{app-manifest.js → define-app-manifest.js} +1 -1
  11. package/dist/esm/lib/app/define-app-manifest.js.map +1 -0
  12. package/dist/esm/lib/app/define-app-package.js +11 -0
  13. package/dist/esm/lib/app/define-app-package.js.map +1 -0
  14. package/dist/esm/lib/app/index.js +5 -5
  15. package/dist/esm/lib/app/index.js.map +1 -1
  16. package/dist/esm/lib/app/load-app-config.js +1 -1
  17. package/dist/esm/lib/app/load-app-config.js.map +1 -1
  18. package/dist/esm/lib/app/load-app-manifest.js +1 -1
  19. package/dist/esm/lib/app/load-app-manifest.js.map +1 -1
  20. package/dist/esm/lib/app/merge-app-config.js +1 -0
  21. package/dist/esm/lib/app/merge-app-config.js.map +1 -1
  22. package/dist/esm/lib/app/{merge-app-manifest.js → merge-app-manifests.js} +2 -2
  23. package/dist/esm/lib/app/merge-app-manifests.js.map +1 -0
  24. package/dist/esm/lib/app/resolve-app-key.js +17 -0
  25. package/dist/esm/lib/app/resolve-app-key.js.map +1 -0
  26. package/dist/esm/lib/define-app-config.js +20 -0
  27. package/dist/esm/lib/define-app-config.js.map +1 -0
  28. package/dist/esm/lib/define-app-manifest.js +20 -0
  29. package/dist/esm/lib/define-app-manifest.js.map +1 -0
  30. package/dist/esm/lib/define-dev-server-config.js +7 -0
  31. package/dist/esm/lib/define-dev-server-config.js.map +1 -0
  32. package/dist/esm/lib/{fusion-cli-config.js → define-fusion-cli.js} +1 -1
  33. package/dist/esm/lib/define-fusion-cli.js.map +1 -0
  34. package/dist/esm/lib/dev-server.js +2 -1
  35. package/dist/esm/lib/dev-server.js.map +1 -1
  36. package/dist/esm/lib/index.js +7 -5
  37. package/dist/esm/lib/index.js.map +1 -1
  38. package/dist/esm/lib/load-dev-server-config.js +2 -7
  39. package/dist/esm/lib/load-dev-server-config.js.map +1 -1
  40. package/dist/esm/lib/merge-dev-server-config.js +4 -0
  41. package/dist/esm/lib/merge-dev-server-config.js.map +1 -1
  42. package/dist/esm/lib/portal/{create-portal-manifest.js → create-portal-manifest-from-package.js} +11 -6
  43. package/dist/esm/lib/portal/create-portal-manifest-from-package.js.map +1 -0
  44. package/dist/esm/lib/portal/{portal-config.js → define-portal-config.js} +1 -1
  45. package/dist/esm/lib/portal/define-portal-config.js.map +1 -0
  46. package/dist/esm/lib/portal/{portal-manifest.js → define-portal-manifest.js} +5 -17
  47. package/dist/esm/lib/portal/define-portal-manifest.js.map +1 -0
  48. package/dist/esm/lib/portal/define-portal-schema.js +8 -0
  49. package/dist/esm/lib/portal/define-portal-schema.js.map +1 -0
  50. package/dist/esm/lib/portal/index.js +4 -3
  51. package/dist/esm/lib/portal/index.js.map +1 -1
  52. package/dist/esm/lib/portal/load-portal-manifest.js +7 -2
  53. package/dist/esm/lib/portal/load-portal-manifest.js.map +1 -1
  54. package/dist/esm/lib/portal/load-portal-schema.js +0 -7
  55. package/dist/esm/lib/portal/load-portal-schema.js.map +1 -1
  56. package/dist/esm/lib/portal/{portal-manifest.schema.js → portal-manifest-build-schema.js} +5 -30
  57. package/dist/esm/lib/portal/portal-manifest-build-schema.js.map +1 -0
  58. package/dist/esm/lib/portal/portal-manifest-schema.js +31 -0
  59. package/dist/esm/lib/portal/portal-manifest-schema.js.map +1 -0
  60. package/dist/esm/lib/portal/validate-portal-manifest.js +15 -0
  61. package/dist/esm/lib/portal/validate-portal-manifest.js.map +1 -0
  62. package/dist/esm/lib/static.js +3 -1
  63. package/dist/esm/lib/static.js.map +1 -1
  64. package/dist/esm/lib/utils/assert-object.js +25 -0
  65. package/dist/esm/lib/utils/assert-object.js.map +1 -0
  66. package/dist/esm/lib/utils/assert.js +1 -135
  67. package/dist/esm/lib/utils/assert.js.map +1 -1
  68. package/dist/esm/lib/utils/{extension-filter.js → create-extension-filter-pattern.js} +6 -2
  69. package/dist/esm/lib/utils/create-extension-filter-pattern.js.map +1 -0
  70. package/dist/esm/lib/utils/fetch-latest-version.js +26 -0
  71. package/dist/esm/lib/utils/fetch-latest-version.js.map +1 -0
  72. package/dist/esm/lib/utils/fetch-package-info.js +65 -0
  73. package/dist/esm/lib/utils/fetch-package-info.js.map +1 -0
  74. package/dist/esm/lib/utils/file-exists-sync.js +29 -0
  75. package/dist/esm/lib/utils/file-exists-sync.js.map +1 -0
  76. package/dist/esm/lib/utils/file-exists.js +2 -27
  77. package/dist/esm/lib/utils/file-exists.js.map +1 -1
  78. package/dist/esm/lib/utils/{snapshot.js → generate-snapshot-version.js} +2 -1
  79. package/dist/esm/lib/utils/generate-snapshot-version.js.map +1 -0
  80. package/dist/esm/lib/utils/index.js +4 -3
  81. package/dist/esm/lib/utils/index.js.map +1 -1
  82. package/dist/esm/lib/utils/is-git-dir.js +1 -0
  83. package/dist/esm/lib/utils/is-git-dir.js.map +1 -1
  84. package/dist/esm/lib/utils/{parse-json-request.js → parse-json-from-request.js} +1 -1
  85. package/dist/esm/lib/utils/parse-json-from-request.js.map +1 -0
  86. package/dist/esm/lib/utils/resolve-annotations.js +3 -0
  87. package/dist/esm/lib/utils/resolve-annotations.js.map +1 -1
  88. package/dist/esm/lib/utils/resolve-devops-annotations.js +1 -0
  89. package/dist/esm/lib/utils/resolve-devops-annotations.js.map +1 -1
  90. package/dist/esm/lib/utils/{resolve-source-entry-point.js → resolve-entry-point.js} +3 -2
  91. package/dist/esm/lib/utils/resolve-entry-point.js.map +1 -0
  92. package/dist/esm/lib/utils/resolve-git-commit-sha.js +1 -1
  93. package/dist/esm/lib/utils/resolve-git-commit-sha.js.map +1 -1
  94. package/dist/esm/lib/utils/resolve-git-remote-url.js +1 -1
  95. package/dist/esm/lib/utils/resolve-git-remote-url.js.map +1 -1
  96. package/dist/esm/lib/utils/resolve-github-annotations.js +4 -0
  97. package/dist/esm/lib/utils/resolve-github-annotations.js.map +1 -1
  98. package/dist/esm/lib/utils/resolve-package.js +1 -0
  99. package/dist/esm/lib/utils/resolve-package.js.map +1 -1
  100. package/dist/esm/lib/utils/{resolve-package-repo.js → resolve-repo-from-package.js} +2 -1
  101. package/dist/esm/lib/utils/resolve-repo-from-package.js.map +1 -0
  102. package/dist/esm/lib/utils/safe-rm-sync.js +20 -0
  103. package/dist/esm/lib/utils/safe-rm-sync.js.map +1 -0
  104. package/dist/esm/lib/utils/{path-security.js → validate-safe-path.js} +3 -19
  105. package/dist/esm/lib/utils/validate-safe-path.js.map +1 -0
  106. package/dist/esm/version.js +1 -1
  107. package/dist/types/bin/{portal-build.d.ts → build-portal.d.ts} +6 -6
  108. package/dist/types/bin/{app-pack.d.ts → bundle-app.d.ts} +1 -1
  109. package/dist/types/bin/{app-check.d.ts → check-app.d.ts} +2 -1
  110. package/dist/types/bin/configure-framework.d.ts +58 -0
  111. package/dist/types/bin/fusion-env.d.ts +24 -0
  112. package/dist/types/bin/{portal-config.d.ts → generate-portal-config.d.ts} +1 -1
  113. package/dist/types/bin/helpers/ProjectTemplate.d.ts +7 -1
  114. package/dist/types/bin/helpers/ProjectTemplateRepository.d.ts +15 -0
  115. package/dist/types/bin/helpers/install-package-dependencies.d.ts +1 -0
  116. package/dist/types/bin/helpers/parse-templates-manifest.d.ts +20 -0
  117. package/dist/types/bin/helpers/resolve-app-from-artifact.d.ts +1 -1
  118. package/dist/types/bin/helpers/{project-templates.schema.d.ts → template.schemas.d.ts} +7 -26
  119. package/dist/types/bin/index.d.ts +23 -20
  120. package/dist/types/bin/initialize-framework.d.ts +39 -0
  121. package/dist/types/bin/{app-manifest.d.ts → load-app-manifest.d.ts} +1 -1
  122. package/dist/types/bin/{app-config-publish.d.ts → publish-app-config.d.ts} +2 -2
  123. package/dist/types/bin/{portal-config-publish.d.ts → publish-portal-config.d.ts} +2 -1
  124. package/dist/types/bin/resolve-default-env.d.ts +8 -0
  125. package/dist/types/bin/{portal-tag.d.ts → tag-portal.d.ts} +1 -1
  126. package/dist/types/bin/{app-upload.d.ts → upload-application.d.ts} +1 -1
  127. package/dist/types/bin/{portal-upload.d.ts → upload-portal-bundle.d.ts} +1 -1
  128. package/dist/types/bin/utils/ConsoleLogger.d.ts +1 -1
  129. package/dist/types/bin/utils/{spinner.d.ts → Spinner.d.ts} +8 -0
  130. package/dist/types/bin/utils/auth-error-docs.d.ts +7 -0
  131. package/dist/types/bin/utils/create-dev-server-config.d.ts +47 -0
  132. package/dist/types/bin/utils/create-dev-server.d.ts +2 -47
  133. package/dist/types/bin/utils/env-token-hint.d.ts +7 -0
  134. package/dist/types/bin/utils/format-auth-error.d.ts +0 -17
  135. package/dist/types/bin/utils/format-byte-size.d.ts +16 -0
  136. package/dist/types/bin/utils/format-path.d.ts +16 -0
  137. package/dist/types/bin/utils/format-token-acquisition-error.d.ts +17 -0
  138. package/dist/types/bin/utils/index.d.ts +9 -5
  139. package/dist/types/bin/utils/normalize-dev-server-config.d.ts +24 -0
  140. package/dist/types/cli/commands/app/default-archive.d.ts +4 -0
  141. package/dist/types/cli/commands/app/{pack.d.ts → pack.command.d.ts} +0 -1
  142. package/dist/types/cli/commands/create/_helpers/check-target-directory.d.ts +1 -0
  143. package/dist/types/cli/commands/index.d.ts +2 -2
  144. package/dist/types/cli/options/{env.d.ts → create-env-option.d.ts} +0 -5
  145. package/dist/types/cli/options/options.d.ts +20 -0
  146. package/dist/types/cli/options/{auth.d.ts → with-auth-options.d.ts} +0 -20
  147. package/dist/types/cli/plugins/load-plugins.d.ts +9 -0
  148. package/dist/types/lib/app/{app-config.d.ts → define-app-config.d.ts} +2 -2
  149. package/dist/types/lib/app/define-app-package.d.ts +26 -0
  150. package/dist/types/lib/app/index.d.ts +5 -5
  151. package/dist/types/lib/app/load-app-config.d.ts +2 -2
  152. package/dist/types/lib/app/load-app-manifest.d.ts +1 -1
  153. package/dist/types/lib/app/resolve-app-key.d.ts +11 -0
  154. package/dist/types/lib/define-app-config.d.ts +12 -0
  155. package/dist/types/lib/define-app-manifest.d.ts +12 -0
  156. package/dist/types/lib/define-dev-server-config.d.ts +21 -0
  157. package/dist/types/lib/dev-server.d.ts +2 -1
  158. package/dist/types/lib/index.d.ts +6 -4
  159. package/dist/types/lib/load-dev-server-config.d.ts +1 -20
  160. package/dist/types/lib/portal/{create-portal-manifest.d.ts → create-portal-manifest-from-package.d.ts} +1 -1
  161. package/dist/types/lib/portal/{portal-manifest.d.ts → define-portal-manifest.d.ts} +5 -13
  162. package/dist/types/lib/portal/define-portal-schema.d.ts +24 -0
  163. package/dist/types/lib/portal/index.d.ts +4 -3
  164. package/dist/types/lib/portal/load-portal-config.d.ts +1 -1
  165. package/dist/types/lib/portal/load-portal-manifest.d.ts +1 -1
  166. package/dist/types/lib/portal/load-portal-schema.d.ts +1 -23
  167. package/dist/types/lib/portal/portal-manifest-build-schema.d.ts +32 -0
  168. package/dist/types/lib/portal/{portal-manifest.schema.d.ts → portal-manifest-schema.d.ts} +0 -31
  169. package/dist/types/lib/portal/validate-portal-manifest.d.ts +11 -0
  170. package/dist/types/lib/static.d.ts +0 -9
  171. package/dist/types/lib/utils/assert-object.d.ts +20 -0
  172. package/dist/types/lib/utils/assert.d.ts +1 -100
  173. package/dist/types/lib/utils/fetch-latest-version.d.ts +20 -0
  174. package/dist/types/lib/utils/{package-info.d.ts → fetch-package-info.d.ts} +0 -45
  175. package/dist/types/lib/utils/file-exists-sync.d.ts +21 -0
  176. package/dist/types/lib/utils/file-exists.d.ts +0 -15
  177. package/dist/types/lib/utils/index.d.ts +4 -3
  178. package/dist/types/lib/utils/safe-rm-sync.d.ts +15 -0
  179. package/dist/types/lib/utils/{path-security.d.ts → validate-safe-path.d.ts} +0 -15
  180. package/dist/types/version.d.ts +1 -1
  181. package/package.json +12 -12
  182. package/dist/esm/lib/app/app-config.js.map +0 -1
  183. package/dist/esm/lib/app/app-manifest.js.map +0 -1
  184. package/dist/esm/lib/app/app-package.js +0 -92
  185. package/dist/esm/lib/app/app-package.js.map +0 -1
  186. package/dist/esm/lib/app/create-app-manifest.js.map +0 -1
  187. package/dist/esm/lib/app/merge-app-manifest.js.map +0 -1
  188. package/dist/esm/lib/app/schemas.js.map +0 -1
  189. package/dist/esm/lib/fusion-cli-config.js.map +0 -1
  190. package/dist/esm/lib/legacy.js +0 -38
  191. package/dist/esm/lib/legacy.js.map +0 -1
  192. package/dist/esm/lib/portal/create-portal-manifest.js.map +0 -1
  193. package/dist/esm/lib/portal/portal-config.js.map +0 -1
  194. package/dist/esm/lib/portal/portal-manifest.js.map +0 -1
  195. package/dist/esm/lib/portal/portal-manifest.schema.js.map +0 -1
  196. package/dist/esm/lib/utils/extension-filter.js.map +0 -1
  197. package/dist/esm/lib/utils/package-info.js +0 -135
  198. package/dist/esm/lib/utils/package-info.js.map +0 -1
  199. package/dist/esm/lib/utils/parse-json-request.js.map +0 -1
  200. package/dist/esm/lib/utils/path-security.js.map +0 -1
  201. package/dist/esm/lib/utils/resolve-package-repo.js.map +0 -1
  202. package/dist/esm/lib/utils/resolve-source-entry-point.js.map +0 -1
  203. package/dist/esm/lib/utils/snapshot.js.map +0 -1
  204. package/dist/types/bin/framework.node.d.ts +0 -123
  205. package/dist/types/bin/utils/format.d.ts +0 -35
  206. package/dist/types/cli/plugins/loader.d.ts +0 -2
  207. package/dist/types/lib/app/app-package.d.ts +0 -76
  208. package/dist/types/lib/legacy.d.ts +0 -24
  209. package/dist/types/bin/{app-build.d.ts → build-application.d.ts} +0 -0
  210. package/dist/types/bin/{portal-pack.d.ts → bundle-portal.d.ts} +5 -5
  211. package/dist/types/bin/{app-config.d.ts → generate-application-config.d.ts} +0 -0
  212. package/dist/types/bin/helpers/{load-bundle-metadata.d.ts → load-metadata.d.ts} +0 -0
  213. package/dist/types/bin/{portal-manifest.d.ts → load-portal-manifest.d.ts} +5 -5
  214. /package/dist/types/bin/{app-serve.d.ts → serve-application.d.ts} +0 -0
  215. /package/dist/types/bin/{portal-serve.d.ts → serve-portal.d.ts} +0 -0
  216. /package/dist/types/bin/{app-dev.d.ts → start-app-dev-server.d.ts} +0 -0
  217. /package/dist/types/bin/{portal-dev.d.ts → start-portal-dev-server.d.ts} +0 -0
  218. /package/dist/types/bin/{app-tag.d.ts → tag-application.d.ts} +0 -0
  219. /package/dist/types/bin/utils/{defaultHeaders.d.ts → default-headers.d.ts} +0 -0
  220. /package/dist/types/cli/commands/app/{build.d.ts → build.command.d.ts} +0 -0
  221. /package/dist/types/cli/commands/app/{check.d.ts → check.command.d.ts} +0 -0
  222. /package/dist/types/cli/commands/app/{config.d.ts → config.command.d.ts} +0 -0
  223. /package/dist/types/cli/commands/app/{dev.d.ts → dev.command.d.ts} +0 -0
  224. /package/dist/types/cli/commands/app/{manifest.d.ts → manifest.command.d.ts} +0 -0
  225. /package/dist/types/cli/commands/app/{publish.d.ts → publish.command.d.ts} +0 -0
  226. /package/dist/types/cli/commands/app/{serve.d.ts → serve.command.d.ts} +0 -0
  227. /package/dist/types/cli/commands/app/{tag.d.ts → tag.command.d.ts} +0 -0
  228. /package/dist/types/cli/commands/app/{upload.d.ts → upload.command.d.ts} +0 -0
  229. /package/dist/types/cli/commands/auth/{login.d.ts → login.command.d.ts} +0 -0
  230. /package/dist/types/cli/commands/auth/{logout.d.ts → logout.command.d.ts} +0 -0
  231. /package/dist/types/cli/commands/auth/{token.d.ts → token.command.d.ts} +0 -0
  232. /package/dist/types/cli/commands/create/_helpers/{resolve-workspace-dependencies.d.ts → resolve-package-json-workspace-dependencies.d.ts} +0 -0
  233. /package/dist/types/cli/commands/create/{app.d.ts → create-app-command.d.ts} +0 -0
  234. /package/dist/types/cli/commands/portal/{build.d.ts → build.command.d.ts} +0 -0
  235. /package/dist/types/cli/commands/portal/{config.d.ts → config.command.d.ts} +0 -0
  236. /package/dist/types/cli/commands/portal/{dev.d.ts → dev.command.d.ts} +0 -0
  237. /package/dist/types/cli/commands/portal/{manifest.d.ts → manifest.command.d.ts} +0 -0
  238. /package/dist/types/cli/commands/portal/{pack.d.ts → pack.command.d.ts} +0 -0
  239. /package/dist/types/cli/commands/portal/{publish.d.ts → publish.command.d.ts} +0 -0
  240. /package/dist/types/cli/commands/portal/{schema.d.ts → schema.command.d.ts} +0 -0
  241. /package/dist/types/cli/commands/portal/{serve.d.ts → serve.command.d.ts} +0 -0
  242. /package/dist/types/cli/commands/portal/{tag.d.ts → tag.command.d.ts} +0 -0
  243. /package/dist/types/cli/commands/portal/{upload.d.ts → upload.command.d.ts} +0 -0
  244. /package/dist/types/lib/app/{schemas.d.ts → api-app-config-schema.d.ts} +0 -0
  245. /package/dist/types/lib/app/{create-app-manifest.d.ts → create-app-manifest-from-package.d.ts} +0 -0
  246. /package/dist/types/lib/app/{app-manifest.d.ts → define-app-manifest.d.ts} +0 -0
  247. /package/dist/types/lib/app/{merge-app-manifest.d.ts → merge-app-manifests.d.ts} +0 -0
  248. /package/dist/types/lib/{fusion-cli-config.d.ts → define-fusion-cli.d.ts} +0 -0
  249. /package/dist/types/lib/portal/{portal-config.d.ts → define-portal-config.d.ts} +0 -0
  250. /package/dist/types/lib/utils/{extension-filter.d.ts → create-extension-filter-pattern.d.ts} +0 -0
  251. /package/dist/types/lib/utils/{snapshot.d.ts → generate-snapshot-version.d.ts} +0 -0
  252. /package/dist/types/lib/utils/{parse-json-request.d.ts → parse-json-from-request.d.ts} +0 -0
  253. /package/dist/types/lib/utils/{resolve-source-entry-point.d.ts → resolve-entry-point.d.ts} +0 -0
  254. /package/dist/types/lib/utils/{resolve-package-repo.d.ts → resolve-repo-from-package.d.ts} +0 -0
@@ -42,10 +42,13 @@ export const PortalManifestBuildSchema = z.object({
42
42
  .record(z.string(), z.string().nullish())
43
43
  .optional()
44
44
  .transform((rec) => {
45
+ // Nothing to normalize when annotations weren't provided at all
45
46
  if (!rec) {
46
47
  return undefined;
47
48
  }
48
- return Object.fromEntries(Object.entries(rec).filter(([, value]) => value !== undefined));
49
+ // Drop keys explicitly set to undefined, keeping explicit nulls
50
+ const definedEntries = Object.entries(rec).filter(([, value]) => value !== undefined);
51
+ return Object.fromEntries(definedEntries);
49
52
  })
50
53
  .describe('Optional build annotations'),
51
54
  // Optional project homepage
@@ -67,32 +70,4 @@ export const PortalManifestBuildSchema = z.object({
67
70
  .optional()
68
71
  .describe('Optional configuration for the portal'),
69
72
  });
70
- /**
71
- * Zod schema for validating the PortalManifest object.
72
- *
73
- * This schema defines the structure and types for the portal manifest used in the Fusion Framework CLI.
74
- * It ensures that the manifest adheres to expected types and provides sensible defaults for build metadata.
75
- *
76
- * @remarks
77
- * - Maintainers: Update this schema if the portal manifest contract changes.
78
- * - This schema is the canonical source for portal manifest validation and structure.
79
- */
80
- export const PortalManifestSchema = z.object({
81
- // Short app key (unscoped, derived from package name, required)
82
- name: z
83
- .string({ message: 'name must be a string' })
84
- .describe('Short app key (unscoped, derived from package name)'),
85
- // Full package name, may include scope (optional)
86
- displayName: z
87
- .string({ message: 'displayName must be a string' })
88
- .optional()
89
- .describe('Full package name, may include scope'),
90
- // Description of the portal (optional)
91
- description: z
92
- .string({ message: 'description must be a string' })
93
- .optional()
94
- .describe('Description of the portal'),
95
- // Build section (required, validated by PortalManifestBuildSchema)
96
- build: PortalManifestBuildSchema,
97
- });
98
- //# sourceMappingURL=portal-manifest.schema.js.map
73
+ //# sourceMappingURL=portal-manifest-build-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-manifest-build-schema.js","sourceRoot":"","sources":["../../../../src/lib/portal/portal-manifest-build-schema.ts"],"names":[],"mappings":"AA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alManifest object.
5
+ *
6
+ * This schema defines the structure and types for the portal manifest used in the Fusion Framework CLI.
7
+ * It ensures that the manifest adheres to expected types and provides sensible defaults for build metadata.
8
+ *
9
+ * @remarks
10
+ * - Maintainers: Update this schema if the portal manifest contract changes.
11
+ * - This schema is the canonical source for portal manifest validation and structure.
12
+ */
13
+ export const PortalManifestSchema = z.object({
14
+ // Short app key (unscoped, derived from package name, required)
15
+ name: z
16
+ .string({ message: 'name must be a string' })
17
+ .describe('Short app key (unscoped, derived from package name)'),
18
+ // Full package name, may include scope (optional)
19
+ displayName: z
20
+ .string({ message: 'displayName must be a string' })
21
+ .optional()
22
+ .describe('Full package name, may include scope'),
23
+ // Description of the portal (optional)
24
+ description: z
25
+ .string({ message: 'description must be a string' })
26
+ .optional()
27
+ .describe('Description of the portal'),
28
+ // Build section (required, validated by PortalManifestBuildSchema)
29
+ build: PortalManifestBuildSchema,
30
+ });
31
+ //# sourceMappingURL=portal-manifest-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-manifest-schema.js","sourceRoot":"","sources":["../../../../src/lib/portal/portal-manifest-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,gEAAgE;IAChE,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;SAC5C,QAAQ,CAAC,qDAAqD,CAAC;IAClE,kDAAkD;IAClD,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,sCAAsC,CAAC;IACnD,uCAAuC;IACvC,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,2BAA2B,CAAC;IACxC,mEAAmE;IACnE,KAAK,EAAE,yBAAyB;CACjC,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { PortalManifestSchema } from './portal-manifest-schema.js';
2
+ /**
3
+ * Validates a portal manifest object against the PortalManifestSchema.
4
+ *
5
+ * @param manifest - The manifest object to validate.
6
+ * @returns The validated manifest object (typed) if valid.
7
+ * @throws ZodError if validation fails.
8
+ *
9
+ * Use this utility to ensure a manifest conforms to the expected schema before further processing.
10
+ */
11
+ export function validatePortalManifest(manifest) {
12
+ // Throws if validation fails; returns typed manifest if valid
13
+ return PortalManifestSchema.parse(manifest);
14
+ }
15
+ //# sourceMappingURL=validate-portal-manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-portal-manifest.js","sourceRoot":"","sources":["../../../../src/lib/portal/validate-portal-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAiB;IACtD,8DAA8D;IAC9D,OAAO,oBAAoB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
@@ -7,7 +7,8 @@
7
7
  * - **Fonts**: `woff2`, `woff`, `eot`, `ttf`, `otf`
8
8
  * - **Documents**: `pdf`, `md`, `txt`
9
9
  */
10
- export const ASSET_EXTENSIONS = [
10
+ // Combine each category's extensions into a single flat lookup list
11
+ const assetExtensions = [
11
12
  // Images
12
13
  ...['png', 'jpg', 'jpeg', 'gif', 'svg', 'ico', 'webp'],
13
14
  // Videos and audio
@@ -17,4 +18,5 @@ export const ASSET_EXTENSIONS = [
17
18
  // Documents
18
19
  ...['pdf', 'md', 'txt'],
19
20
  ];
21
+ export const ASSET_EXTENSIONS = assetExtensions;
20
22
  //# sourceMappingURL=static.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"static.js","sourceRoot":"","sources":["../../../src/lib/static.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS;IACT,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;IACtD,mBAAmB;IACnB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;IACzB,QAAQ;IACR,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACzC,YAAY;IACZ,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;CACf,CAAC"}
1
+ {"version":3,"file":"static.js","sourceRoot":"","sources":["../../../src/lib/static.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oEAAoE;AACpE,MAAM,eAAe,GAAG;IACtB,SAAS;IACT,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;IACtD,mBAAmB;IACnB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;IACzB,QAAQ;IACR,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACzC,YAAY;IACZ,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;CACf,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { assert } from './assert.js';
2
+ /**
3
+ * Asserts that the provided value is an object.
4
+ *
5
+ * This function checks that the value has type 'object'. Note that
6
+ * typeof null is 'object' in JavaScript, so null values will pass this check.
7
+ *
8
+ * @param value - The value to check for being an object
9
+ * @param message - Optional custom error message or Error instance
10
+ * @returns Nothing; narrows `value` via the `asserts` return type. Throws on failure.
11
+ * @throws {AssertionError} If value is not an object
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * assertObject({}); // ✅ Passes
16
+ * assertObject([]); // ✅ Passes
17
+ * assertObject(null); // ✅ Passes (typeof null === 'object')
18
+ * assertObject('string'); // ❌ Throws AssertionError
19
+ * ```
20
+ */
21
+ export function assertObject(value, message) {
22
+ // typeof null is 'object', so this does not exclude null values
23
+ assert(typeof value === 'object', message);
24
+ }
25
+ //# sourceMappingURL=assert-object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert-object.js","sourceRoot":"","sources":["../../../../src/lib/utils/assert-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa,EAAE,OAAwB;IAClE,gEAAgE;IAChE,MAAM,CAAC,OAAO,KAAK,KAAK,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC"}
@@ -1,142 +1,8 @@
1
- import assert, { AssertionError } from 'node:assert';
2
- import { fileExists } from './file-exists.js';
3
- import { isGitDir } from './is-git-dir.js';
4
1
  /**
5
2
  * Re-exports the core Node.js assert function and AssertionError class.
6
3
  *
7
4
  * This provides consistent assertion handling throughout the codebase
8
5
  * with proper TypeScript type narrowing support.
9
6
  */
10
- export { assert, AssertionError };
11
- /**
12
- * Asserts that the provided value is a valid number (not NaN).
13
- *
14
- * This function checks that the value is not NaN, which is useful for
15
- * validating numeric inputs that might be strings or other types that
16
- * could convert to NaN.
17
- *
18
- * @param value - The value to check for being a valid number
19
- * @param message - Optional custom error message for assertion failure
20
- * @throws {AssertionError} If value is NaN
21
- *
22
- * @example
23
- * ```typescript
24
- * assertNumber(42); // ✅ Passes
25
- * assertNumber('42'); // ✅ Passes (string converts to number)
26
- * assertNumber(NaN); // ❌ Throws AssertionError
27
- * assertNumber('invalid'); // ❌ Throws AssertionError
28
- * ```
29
- */
30
- export function assertNumber(value, message) {
31
- // Ensure the value is not NaN; this does not check for type 'number'.
32
- assert(!Number.isNaN(value), new AssertionError({
33
- message,
34
- actual: value,
35
- expected: '<number>',
36
- }));
37
- }
38
- /**
39
- * Asserts that a file exists at the given path.
40
- *
41
- * This function uses the fileExists utility to check for file presence
42
- * and throws an AssertionError if the file is not found.
43
- *
44
- * @param value - The file path to check
45
- * @param message - Optional custom error message for assertion failure
46
- * @throws {AssertionError} If the file does not exist
47
- *
48
- * @example
49
- * ```typescript
50
- * assertFileExists('/path/to/file.txt'); // ✅ Passes if file exists
51
- * assertFileExists('/nonexistent/file.txt'); // ❌ Throws AssertionError
52
- * ```
53
- */
54
- export const assertFileExists = (value, message) => {
55
- // Use fileExists utility to check for file presence
56
- assert(fileExists(value), message ?? `file ${String(value)} does not exist`);
57
- };
58
- /**
59
- * Asserts that the provided value is an object.
60
- *
61
- * This function checks that the value has type 'object'. Note that
62
- * typeof null is 'object' in JavaScript, so null values will pass this check.
63
- *
64
- * @param value - The value to check for being an object
65
- * @param message - Optional custom error message or Error instance
66
- * @throws {AssertionError} If value is not an object
67
- *
68
- * @example
69
- * ```typescript
70
- * assertObject({}); // ✅ Passes
71
- * assertObject([]); // ✅ Passes
72
- * assertObject(null); // ✅ Passes (typeof null === 'object')
73
- * assertObject('string'); // ❌ Throws AssertionError
74
- * ```
75
- */
76
- export function assertObject(value, message) {
77
- // typeof null is 'object', so this does not exclude null values
78
- assert(typeof value === 'object', message);
79
- }
80
- /**
81
- * Asserts that a specific property exists and has a value on an object.
82
- * Used internally for property value checks.
83
- *
84
- * @param value - The value of the property to check.
85
- * @param prop - The property key being checked.
86
- * @param message - Optional custom error message.
87
- * @throws {AssertionError} If the property value is falsy.
88
- */
89
- function assertObjectEntryValue(value, prop, message) {
90
- // Checks for truthy value; falsy values (0, '', false) will fail.
91
- assert(!!value, message ?? `missing value of property ${prop}`);
92
- }
93
- /**
94
- * Asserts that an object contains the specified properties and that each property has a value.
95
- * Allows for custom assertion logic and pre-message prefixing.
96
- *
97
- * @typeParam T - The object type to check.
98
- * @typeParam P - The array of property keys to check on the object.
99
- * @param value - The object to check.
100
- * @param options - Optional settings for property keys, assertion function, and message prefix.
101
- * @throws {AssertionError} If any property is missing or fails the assertion.
102
- */
103
- export function assertObjectEntries(value, options) {
104
- // Use preMessage to prefix all assertion messages for context.
105
- const preMessage = options?.preMessage ?? '';
106
- // Ensure the value is an object before checking properties.
107
- assert(typeof value === 'object', `${preMessage} to be an <object>`);
108
- // Use custom assertion if provided, otherwise default.
109
- const assertion = options?.assertion ?? assertObjectEntryValue;
110
- // Use provided property list or all keys of the object.
111
- const props = options?.props ?? Object.keys(value);
112
- for (const prop of props) {
113
- // Check that the property exists on the object.
114
- assert(prop in value, `${preMessage} to have property [${String(prop)}]`);
115
- // Check that the property value passes the assertion.
116
- assertion(value[prop], prop, `${preMessage} property [${String(prop)}] to have value`);
117
- }
118
- }
119
- /**
120
- * Asserts that a directory exists and is a valid git repository.
121
- *
122
- * This function checks if the specified directory contains a valid
123
- * git repository by looking for the .git directory or file.
124
- *
125
- * @param dir - Directory path to check for git repository
126
- * @param message - Optional custom error message for assertion failure
127
- * @throws {AssertionError} If the directory is not a git repository
128
- *
129
- * @example
130
- * ```typescript
131
- * assertGitRepository('/path/to/git/repo'); // ✅ Passes if .git exists
132
- * assertGitRepository('/path/to/regular/dir'); // ❌ Throws AssertionError
133
- * ```
134
- */
135
- export function assertGitRepository(dir, message) {
136
- assert(isGitDir(dir), new AssertionError({
137
- message: message ?? `Directory is not a git repository: ${dir}`,
138
- actual: dir,
139
- expected: '<git repository>',
140
- }));
141
- }
7
+ export { default as assert, AssertionError } from 'node:assert';
142
8
  //# sourceMappingURL=assert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../../src/lib/utils/assert.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,aAAa,C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M,CAAC,OAAO,KAAK,KAAK,QAAQ,EAAE,GAAG,UAAU,oBAAoB,CAAC,CAAC;IACrE,uDAAuD;IACvD,MAAM,SAAS,GAAqC,OAAO,EAAE,SAAS,IAAI,sBAAsB,CAAC;IACjG,wDAAwD;IACxD,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,gDAAgD;QAChD,MAAM,CAAC,IAAI,IAAI,KAAK,EAAE,GAAG,UAAU,sBAAsB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1E,sDAAsD;QACtD,SAAS,CACP,KAAK,CAAC,IAAe,CAAC,EACtB,IAAoB,EACpB,GAAG,UAAU,cAAc,MAAM,CAAC,IAAI,CAAC,iBAAiB,CACzD,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW,EAAE,OAAgB;IAC/D,MAAM,CACJ,QAAQ,CAAC,GAAG,CAAC,EACb,IAAI,cAAc,CAAC;QACjB,OAAO,EAAE,OAAO,IAAI,sCAAsC,GAAG,EAAE;QAC/D,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,kBAAkB;KAC7B,CAAC,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"assert.js","sourceRoot":"","sources":["../../../../src/lib/utils/assert.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -15,6 +15,10 @@ const trimLeadingDot = (ext) => ext.replace(/^\./, '');
15
15
  * console.log(pattern); // Output: /\.(js|ts)(\?.*)?$/
16
16
  * ```
17
17
  */
18
- export const createExtensionFilterPattern = (exts) => new RegExp(`\\.(${exts.map(trimLeadingDot).join('|')})(\\?.*)?$`);
18
+ export const createExtensionFilterPattern = (exts) => {
19
+ // Normalize extensions (strip leading dots) before building the alternation group
20
+ const normalizedExts = exts.map(trimLeadingDot);
21
+ return new RegExp(`\\.(${normalizedExts.join('|')})(\\?.*)?$`);
22
+ };
19
23
  export default createExtensionFilterPattern;
20
- //# sourceMappingURL=extension-filter.js.map
24
+ //# sourceMappingURL=create-extension-filter-pattern.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-extension-filter-pattern.js","sourceRoot":"","sources":["../../../../src/lib/utils/create-extension-filter-pattern.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAE/D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,IAAc,EAAE,EAAE;IAC7D,kFAAkF;IAClF,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChD,OAAO,IAAI,MAAM,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACjE,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { fetchPackageInfo } from './fetch-package-info.js';
2
+ /**
3
+ * Fetches only the latest version of a package from npm registry.
4
+ *
5
+ * This is a convenience function that retrieves only the latest version
6
+ * string without the overhead of fetching complete package metadata.
7
+ * Useful for simple version checks and dependency resolution.
8
+ *
9
+ * @param packageName - The name of the package to fetch (e.g., "@equinor/fusion-framework")
10
+ * @param registry - The npm registry URL (defaults to https://registry.npmjs.org)
11
+ * @returns Promise resolving to the latest version string (e.g., "1.0.0")
12
+ * @throws {Error} If the package cannot be found or fetched
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * // Get latest version for dependency resolution
17
+ * const version = await fetchLatestVersion('@equinor/fusion-framework');
18
+ * console.log(`Latest version: ${version}`);
19
+ * ```
20
+ */
21
+ export async function fetchLatestVersion(packageName, registry = 'https://registry.npmjs.org') {
22
+ // Delegate to fetchPackageInfo and extract only the latest version
23
+ const packageInfo = await fetchPackageInfo(packageName, registry);
24
+ return packageInfo.latest;
25
+ }
26
+ //# sourceMappingURL=fetch-latest-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-latest-version.js","sourceRoot":"","sources":["../../../../src/lib/utils/fetch-latest-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,WAAmB,EACnB,QAAQ,GAAG,4BAA4B;IAEvC,mEAAmE;IACnE,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAClE,OAAO,WAAW,CAAC,MAAM,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Fetches complete package information from npm registry.
3
+ *
4
+ * This function retrieves all available metadata for a package including
5
+ * version information, dependencies, and package details. It performs
6
+ * validation to ensure the package exists and has a valid latest version.
7
+ *
8
+ * @param packageName - The name of the package to fetch (e.g., "@equinor/fusion-framework")
9
+ * @param registry - The npm registry URL (defaults to https://registry.npmjs.org)
10
+ * @returns Promise resolving to complete package information
11
+ * @throws {Error} If the package cannot be found, fetched, or has invalid data
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * // Fetch package info for a scoped package
16
+ * const info = await fetchPackageInfo('@equinor/fusion-framework');
17
+ * console.log(`Latest version: ${info.latest}`);
18
+ *
19
+ * // Fetch from custom registry
20
+ * const info = await fetchPackageInfo('my-package', 'https://my-registry.com');
21
+ * ```
22
+ */
23
+ export async function fetchPackageInfo(packageName, registry = 'https://registry.npmjs.org') {
24
+ try {
25
+ // Make HTTP request to npm registry API
26
+ const response = await fetch(`${registry}/${packageName}`);
27
+ // Registry errors should surface as a clear, contextual failure
28
+ if (!response.ok) {
29
+ throw new Error(`Failed to fetch package info for ${packageName}: ${response.statusText}`);
30
+ }
31
+ // Parse JSON response from registry
32
+ const data = await response.json();
33
+ // Validate that we received valid package data
34
+ if (!data.name) {
35
+ throw new Error(`Invalid package data received for ${packageName}`);
36
+ }
37
+ // Extract latest version from dist-tags (required for package resolution)
38
+ const latestVersion = data['dist-tags']?.latest;
39
+ // A package without dist-tags.latest can't be resolved
40
+ if (!latestVersion) {
41
+ throw new Error(`No latest version found for package ${packageName}`);
42
+ }
43
+ // Transform registry data to our PackageInfo interface
44
+ return {
45
+ name: data.name,
46
+ latest: latestVersion,
47
+ versions: Object.keys(data.versions || {}),
48
+ 'dist-tags': data['dist-tags'] || {},
49
+ description: data.description,
50
+ homepage: data.homepage,
51
+ repository: data.repository,
52
+ author: data.author,
53
+ license: data.license,
54
+ keywords: data.keywords,
55
+ dependencies: data.dependencies,
56
+ devDependencies: data.devDependencies,
57
+ peerDependencies: data.peerDependencies,
58
+ };
59
+ }
60
+ catch (error) {
61
+ // Wrap any errors with context about the failed operation
62
+ throw new Error(`Failed to fetch package info for ${packageName}: ${error instanceof Error ? error.message : String(error)}`);
63
+ }
64
+ }
65
+ //# sourceMappingURL=fetch-package-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-package-info.js","sourceRoot":"","sources":["../../../../src/lib/utils/fetch-package-info.ts"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,WAAmB,EACnB,QAAQ,GAAG,4BAA4B;IAEvC,IAAI,CAAC;QACH,wCAAwC;QACxC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,QAAQ,IAAI,WAAW,EAAE,CAAC,CAAC;QAC3D,gEAAgE;QAChE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,K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AAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { accessSync, constants } from 'node:fs';
2
+ /**
3
+ * Synchronously checks whether a file exists at the given path.
4
+ *
5
+ * @param file - Absolute or relative file path to check.
6
+ * @param options - When `assert` is true, the underlying `ENOENT` error is re-thrown instead of returning `false`.
7
+ * @returns `true` if the file is accessible, `false` otherwise (unless `assert` is set).
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * if (fileExistsSync('tsconfig.json')) {
12
+ * // file is present
13
+ * }
14
+ * ```
15
+ */
16
+ export const fileExistsSync = (file, options) => {
17
+ try {
18
+ accessSync(file, constants.F_OK);
19
+ return true;
20
+ }
21
+ catch (err) {
22
+ // Re-throw the original error instead of swallowing it when asserting
23
+ if (options?.assert) {
24
+ throw err;
25
+ }
26
+ return false;
27
+ }
28
+ };
29
+ //# sourceMappingURL=file-exists-sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-exists-sync.js","sourceRoot":"","sources":["../../../../src/lib/utils/file-exists-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAQhD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,OAAiB,EAAE,EAAE;IAChE,IAAI,CAAC;QACH,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,sEAAsE;QACtE,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
@@ -1,31 +1,5 @@
1
- import { accessSync, constants } from 'node:fs';
1
+ import { constants } from 'node:fs';
2
2
  import { access } from 'node:fs/promises';
3
- /**
4
- * Synchronously checks whether a file exists at the given path.
5
- *
6
- * @param file - Absolute or relative file path to check.
7
- * @param options - When `assert` is true, the underlying `ENOENT` error is re-thrown instead of returning `false`.
8
- * @returns `true` if the file is accessible, `false` otherwise (unless `assert` is set).
9
- *
10
- * @example
11
- * ```ts
12
- * if (fileExistsSync('tsconfig.json')) {
13
- * // file is present
14
- * }
15
- * ```
16
- */
17
- export const fileExistsSync = (file, options) => {
18
- try {
19
- accessSync(file, constants.F_OK);
20
- return true;
21
- }
22
- catch (err) {
23
- if (options?.assert) {
24
- throw err;
25
- }
26
- return false;
27
- }
28
- };
29
3
  /**
30
4
  * Asynchronously checks whether a file exists at the given path.
31
5
  *
@@ -46,6 +20,7 @@ export const fileExists = async (file, options) => {
46
20
  return true;
47
21
  }
48
22
  catch (err) {
23
+ // Re-throw the original error instead of swallowing it when asserting
49
24
  if (options?.assert) {
50
25
  throw err;
51
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"file-exists.js","sourceRoot":"","sources":["../../../../src/lib/utils/file-exists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAQ1C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,OAAiB,EAAE,EAAE;IAChE,IAAI,CAAC;QACH,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,IAAY,EAAE,OAAiB,EAAoB,EAAE;IACpF,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"file-exists.js","sourceRoot":"","sources":["../../../../src/lib/utils/file-exists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAQ1C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,IAAY,EAAE,OAAiB,EAAoB,EAAE;IACpF,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,sEAAsE;QACtE,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
@@ -27,6 +27,7 @@ import { coerce } from 'semver';
27
27
  export function generateSnapshotVersion(version, identifier) {
28
28
  // Coerce the version to strip any pre-release suffix and get the base version
29
29
  const baseVersion = coerce(version)?.version;
30
+ // A version that doesn't coerce to semver can't be turned into a snapshot
30
31
  if (!baseVersion) {
31
32
  throw new Error(`Invalid semantic version: "${version}". Expected format: major.minor.patch`);
32
33
  }
@@ -37,4 +38,4 @@ export function generateSnapshotVersion(version, identifier) {
37
38
  // Return the formatted snapshot version
38
39
  return `${baseVersion}-${suffix}`;
39
40
  }
40
- //# sourceMappingURL=snapshot.js.map
41
+ //# sourceMappingURL=generate-snapshot-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-snapshot-version.js","sourceRoot":"","sources":["../../../../src/lib/utils/generate-snapshot-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAe,EAAE,UAA6B;IACpF,8EAA8E;IAC9E,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAE7C,0EAA0E;IAC1E,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,uCAAuC,CAAC,CAAC;IAChG,CAAC;IAED,6CAA6C;IAC7C,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAEpD,0EAA0E;IAC1E,MAAM,MAAM,GACV,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,aAAa,EAAE,CAAC,CAAC,CAAC,YAAY,aAAa,EAAE,CAAC;IAElG,wCAAwC;IACxC,OAAO,GAAG,WAAW,IAAI,MAAM,EAAE,CAAC;AACpC,CAAC"}
@@ -7,10 +7,11 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  export { assert } from './assert.js';
10
- export { resolveEntryPoint } from './resolve-source-entry-point.js';
10
+ export { resolveEntryPoint } from './resolve-entry-point.js';
11
11
  export { resolvePackage } from './resolve-package.js';
12
- export { fileExists, fileExistsSync } from './file-exists.js';
12
+ export { fileExistsSync } from './file-exists-sync.js';
13
+ export { fileExists } from './file-exists.js';
13
14
  export { writeFile } from './write-file.js';
14
15
  export { resolveAnnotations } from './resolve-annotations.js';
15
- export { generateSnapshotVersion } from './snapshot.js';
16
+ export { generateSnapshotVersion } from './generate-snapshot-version.js';
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAwB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAwB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -8,6 +8,7 @@ import { existsSync } from 'node:fs';
8
8
  * @public
9
9
  */
10
10
  export function isGitDir(dir) {
11
+ // A non-existent directory cannot be a git repository
11
12
  if (!existsSync(dir)) {
12
13
  return false;
13
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"is-git-dir.js","sourceRoot":"","sources":["../../../../src/lib/utils/is-git-dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,6FAA6F;IAC7F,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"is-git-dir.js","sourceRoot":"","sources":["../../../../src/lib/utils/is-git-dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,sDAAsD;IACtD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,6FAA6F;IAC7F,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAED,eAAe,QAAQ,CAAC"}
@@ -16,4 +16,4 @@ export async function parseJsonFromRequest(req) {
16
16
  });
17
17
  }
18
18
  export default parseJsonFromRequest;
19
- //# sourceMappingURL=parse-json-request.js.map
19
+ //# sourceMappingURL=parse-json-from-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-json-from-request.js","sourceRoot":"","sources":["../../../../src/lib/utils/parse-json-from-request.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,GAAoB;IAC7D,OAAO,MAAM,IAAI,OAAO,CAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpE,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YACvB,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/C,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,eAAe,oBAAoB,CAAC"}
@@ -9,6 +9,7 @@ import { version } from '../../version.js';
9
9
  * for tag/release events. Only branch refs should populate the manifest branch annotation.
10
10
  */
11
11
  const resolveGithubBranch = (ref) => {
12
+ // Tag/release refs (refs/tags/...) should not populate the branch annotation
12
13
  if (!ref?.startsWith('refs/heads/')) {
13
14
  return undefined;
14
15
  }
@@ -52,6 +53,7 @@ export const resolveAnnotations = () => {
52
53
  sender_login: annotation.sender?.login,
53
54
  sender_avatar_url: annotation.sender?.avatar_url,
54
55
  };
56
+ // Pull request events carry the head branch/commit, not the base ref
55
57
  if (annotation.pull_request) {
56
58
  return {
57
59
  ...baseAnnotations,
@@ -60,6 +62,7 @@ export const resolveAnnotations = () => {
60
62
  htmlUrl: annotation.pull_request.html_url,
61
63
  };
62
64
  }
65
+ // Release events carry a tag rather than a branch
63
66
  if (annotation.release) {
64
67
  return {
65
68
  ...baseAnnotations,
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-annotations.js","sourceRoot":"","sources":["../../../../src/lib/utils/resolve-annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EA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