Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/cli/appmanager/publish #2178

Merged
merged 111 commits into from
Oct 2, 2024
Merged

Feat/cli/appmanager/publish #2178

merged 111 commits into from
Oct 2, 2024

Conversation

eikeland
Copy link
Contributor

@eikeland eikeland commented May 22, 2024

Why

New fusion-framework-cli commands for managing apps.

Commands

  • build-publish - create zip bundle and runs upload and tag on the bundle.
  • build-upload - uploads provided --bundle <zipbundle>
  • build-tag - tags provided --version <semver> with 'preview' | 'latest'
  • build-config - Will upload the generated config to the version provided.
  • build-manifest - Will generate manifest.

TODO

  • Change UserSettingsClient from @equinor/fusion in portal.
  • Apps bundle should be loaded from apps-proxy
  • CLI: Add notations to AppManifestExport in fusion-framework-cli app manifest.
  • module-app: find a better way to handle changing appKey in ApplicationManifest when creating legacy app component in apploader.

Create prereleases of framework packages from this pr and install them in portal to test.

Reference AB#52910

Reference AB#52917

Reference AB#52915

Check off the following:

  • Confirm that I checked changes to branch which I am merging into.

    • I have validated included files
    • My code does not generate new linting warnings
    • My PR is not a duplicate, check existing pr`s
  • Confirm that the I have completed the self-review checklist.

  • Confirm that my changes meet our code of conduct.

Copy link

changeset-bot bot commented May 22, 2024

🦋 Changeset detected

Latest commit: 613c631

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@equinor/fusion-framework-cli Major
@equinor/fusion-framework-react-components-people-provider Patch
@equinor/fusion-framework-docs Minor
@equinor/fusion-framework-cookbook-app-react-environment-variables Patch
@equinor/fusion-framework-cookbook-app-react-bookmark-advanced Patch
@equinor/fusion-framework-cookbook-app-react-feature-flag Patch
@equinor/fusion-framework-cookbook-app-react-bookmark Patch
@equinor/fusion-framework-cookbook-app-react-ag-grid Patch
@equinor/fusion-framework-cookbook-app-react-context Patch
@equinor/fusion-framework-cookbook-app-react-module Patch
@equinor/fusion-framework-cookbook-app-react-people Patch
@equinor/fusion-framework-cookbook-app-react-msal Patch
@equinor/fusion-framework-cookbook-app-vanilla Patch
@equinor/fusion-framework-cookbook-app-react Patch
@equinor/fusion-framework-cookbook-app-react-context-custom-error Patch
@equinor/fusion-framework-cookbook-app-react-router Patch
@equinor/fusion-framework-module-app Major
@equinor/fusion-framework-react-app Patch
@equinor/fusion-framework-react-components-bookmark Patch
@equinor/fusion-framework-react Minor
@equinor/fusion-framework-legacy-interopt Major
poc-portal Patch
@equinor/fusion-framework-app Patch
@equinor/fusion-framework-react-module-bookmark Patch
@equinor/fusion-framework-react-widget Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added 👨🏻‍🍳 cookbooks 💾 CLI fusion framework CLI 📚 documentation Improvements or additions to documentation 🚀 feature New feature or request 🧬 Modules 🚧 chore maintaines work, (update deps, workflos ...) labels May 22, 2024
@eikeland eikeland force-pushed the feat/cli/appmanager/publish branch 3 times, most recently from 8035e5e to be941e3 Compare May 22, 2024 12:06
@github-actions github-actions bot added 🐞 bug Something isn't working and removed 🧬 Modules labels May 22, 2024
@eikeland eikeland force-pushed the feat/cli/appmanager/publish branch from cd1ea02 to fc8c7cb Compare May 23, 2024 14:37
@eikeland eikeland marked this pull request as ready for review May 23, 2024 14:58
@eikeland eikeland requested review from odinr and a team as code owners May 23, 2024 14:58
Copy link
Contributor

github-actions bot commented May 23, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 0.37% 1633 / 434509
🔵 Statements 0.37% 1633 / 434509
🔵 Functions 23.34% 212 / 908
🔵 Branches 36.18% 377 / 1042
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
cookbooks/app-react/app.config.ts 0% 0% 0% 0% 1, 3-11
cookbooks/app-react/app.manifest.config.ts 0% 0% 0% 0% 1, 3
cookbooks/app-react-assets/app.manifest.config.ts 0% 0% 0% 0% 1, 3-7
cookbooks/app-react-assets/src/App.tsx 0% 0% 0% 0% 1, 3-6, 9
cookbooks/app-react-assets/src/config.ts 0% 100% 100% 0% 3, 5, 8-10, 13-16, 18
cookbooks/app-react-assets/src/index.ts 0% 0% 0% 0% 1-2, 4, 6-7, 10, 13, 16, 18, 21, 24, 27-28, 30
cookbooks/poc-portal/app.config.ts 0% 0% 0% 0% 1, 3-12
cookbooks/poc-portal/src/AppList.tsx 0% 0% 0% 0% 1, 3-6, 8
cookbooks/poc-portal/src/Framework.tsx 0% 0% 0% 0% 1-2, 4, 6-7, 9-13, 15-20, 22-23, 25-26, 28-36, 38, 40
cookbooks/poc-portal/src/config.ts 0% 100% 100% 0% 3, 5, 8-10, 13-16, 18
cookbooks/poc-portal/src/index.tsx 0% 0% 0% 0% 1-2, 5, 7-9, 11
cookbooks/poc-portal/src/portal/bootloader.ts 0% 0% 0% 0% 1-2, 4-6, 8, 10, 12, 14, 16-21, 23-28, 30-39, 41-44, 46-47
packages/app/src/configure-modules.ts 0% 0% 0% 0% 1, 4, 7, 25-27, 32-34, 40-47, 49, 51-59, 61
packages/cli/src/bin/build-application.ts 0% 0% 0% 0% 1, 3, 5-8, 11, 15, 17, 25-30, 32, 34-36, 38-41, 43-44, 46-50, 52-54, 56-58, 60, 62-67, 69-72, 74, 76, 78, 80, 82, 84-89
packages/cli/src/bin/bundle-application.ts 0% 0% 0% 0% 1, 3-4, 6-10, 12-13, 15, 17-19, 21-23, 25, 27-28, 30-31, 33, 35-41, 43-49, 51-54, 56-62
packages/cli/src/bin/create-dev-serve.ts 0% 0% 0% 0% 1, 7, 9-10, 12, 14, 16-18, 20-22, 24-30, 34, 44-45, 47, 49, 51-55, 57-68, 70-75, 77, 79, 82-83, 85-87, 89, 91-130, 132-133, 135-139, 141, 143, 145, 147-150, 152, 154-165
packages/cli/src/bin/create-export-config.ts 0% 0% 0% 0% 1-4, 6-7, 16, 20-21, 23, 30-31, 33, 35-36, 38-42, 44-46, 48-63, 65-66, 68-78, 80-82, 84-85, 87-88, 90-95, 97-98, 100-108, 110-116, 118-119, 121-133, 135-142, 144-145, 147
packages/cli/src/bin/create-export-manifest.ts 0% 0% 0% 0% 1-3, 5, 7-8, 10, 13-14, 17-20, 22-24, 33-42, 44-53, 55-72, 74-75, 77-81, 83-85, 87-88
packages/cli/src/bin/main.app.ts 0% 0% 0% 0% 1, 3-7, 9-14, 16-19, 21-68, 70-79, 81-108, 110-135, 137-146, 148-155, 157-175, 177-195, 197-220
packages/cli/src/bin/main.ts 0% 0% 0% 0% 1-2, 4-13, 15, 17-22, 24-26, 28-29
packages/cli/src/bin/publish-application.ts 0% 0% 0% 0% 1-4, 12, 15, 17, 21-22, 24, 26-27, 29-30, 32-33, 35-40, 42-43, 45-55, 57-63, 65, 67-68, 70-73, 75-78, 80, 82-86, 88-95, 97, 99, 101-109, 111-112, 114-121, 123-132, 134-138
packages/cli/src/bin/tag-application.ts 0% 0% 0% 0% 1-5, 8-11, 13, 18-19, 21, 23-26, 28-30, 32-33, 35-36, 38-43, 45-46, 48-58, 60-66, 68-78, 80-92
packages/cli/src/bin/upload-application.ts 0% 0% 0% 0% 1-5, 8, 12-13, 15, 17-18, 20-21, 23-24, 26-31, 33-35, 37-39, 41-48, 50-56, 58-62, 64-67, 69, 71, 73-83
packages/cli/src/bin/dev-portal/config.ts 0% 0% 0% 0% 1-3, 5-7, 11, 13-20, 22-26, 28-35, 37, 39, 41, 43-49, 51-68, 70-72, 74-78, 80
packages/cli/src/bin/utils/format.ts 0% 0% 0% 0% 1-2, 4, 6, 10-14, 16-21, 23
packages/cli/src/bin/utils/getEndpointUrl.ts 0% 0% 0% 0% 1-2, 4, 11-18, 20-23, 25-27, 29-36, 38-42, 44-50, 52-54, 56-57, 59-61
packages/cli/src/bin/utils/index.ts 0% 0% 0% 0% 1
packages/cli/src/bin/utils/isAppRegistered.ts 0% 0% 0% 0% 1, 6-12, 14-18, 20-26, 28-29
packages/cli/src/bin/utils/load-app-config.ts 0% 0% 0% 0% 1-2, 4, 8-11, 13-40, 42
packages/cli/src/bin/utils/load-manifest.ts 0% 0% 0% 0% 1-2, 4, 11-14, 16-22, 24-28, 30-32, 34, 36-42, 44-51, 53
packages/cli/src/bin/utils/proxy-request-logger.ts 0% 0% 0% 0% 1-3, 5, 16-34, 36
packages/cli/src/bin/utils/publishAppConfig.ts 0% 0% 0% 0% 1, 3, 9-18, 20-30, 32-33
packages/cli/src/bin/utils/requireToken.ts 0% 0% 0% 0% 1, 3-10
packages/cli/src/bin/utils/spinner.ts 0% 0% 0% 0% 1, 3-4, 6, 8-9, 11-13, 15-22, 24-27, 29-32, 34-36, 38-40, 42-44, 46-72, 75
packages/cli/src/bin/utils/tagAppBundle.ts 0% 0% 0% 0% 1, 6-15, 17-21, 23-29, 31-32
packages/cli/src/bin/utils/uploadAppBundle.ts 0% 0% 0% 0% 1, 3, 8-12, 14-18, 20-27, 29-33, 35-37, 39-43, 45-47, 49-55, 57-58
packages/cli/src/lib/app-config.ts 0% 0% 0% 0% 1, 8, 10, 12, 26, 28-31, 33, 35-42, 44-45, 47-48, 50-60, 62-66, 68-85
packages/cli/src/lib/app-manifest.ts 0% 0% 0% 0% 1-2, 9, 18, 20, 23-24, 37-38, 40, 52-53, 55-60, 62-73, 75, 83-91, 93-95, 97, 100-102, 104-114, 116-132, 134-140, 142-169, 171-189
packages/cli/src/lib/app-package.ts 0% 0% 0% 0% 1-2, 8, 11, 33-35, 37, 48-61, 63, 65-66, 68, 74-78, 80, 84-88, 90, 96-105, 107
packages/cli/src/lib/index.ts 0% 0% 0% 0% 1
packages/cli/src/lib/vite-config.ts 0% 0% 0% 0% 1, 3, 5, 7, 16, 18, 20-22, 24, 26-28, 30-31, 33-34, 36-46, 48-50, 52-64, 66-77, 79-112
packages/cli/src/lib/plugins/app-assets/app-asset-plugin.ts 0% 0% 0% 0% 1, 3-5, 7, 9, 11, 39-41, 45-47, 49, 51, 53, 55-69, 71-76, 78, 80-85, 87-110, 112
packages/cli/src/lib/plugins/app-assets/emit-asset.ts 0% 0% 0% 0% 1, 4, 6, 10, 20-24, 28-31, 33-37, 39-47, 49-51, 53-59, 61-62, 64
packages/cli/src/lib/plugins/app-assets/extension-filter-pattern.ts 0% 0% 0% 0% 1, 4-5, 7, 18-20, 22
packages/cli/src/lib/plugins/app-assets/index.ts 0% 0% 0% 0% 1
packages/cli/src/lib/plugins/app-assets/read-asset-content.ts 0% 0% 0% 0% 1, 3, 5-6, 8, 19-24, 26-27, 29-34, 36-37, 39
packages/cli/src/lib/plugins/app-assets/resolve-asset-id.ts 0% 0% 0% 0% 1-2, 6, 8, 10-22, 24, 37-45, 57-62
packages/cli/src/lib/plugins/app-assets/static.ts 0% 0% 0% 0% 1, 3, 5-15
packages/cli/src/lib/plugins/app-proxy/app-proxy-plugin.ts 0% 0% 0% 0% 1, 6, 20-21, 52, 88-122, 124-125, 127-133, 135-140, 142-153, 155
packages/cli/src/lib/plugins/app-proxy/index.ts 0% 0% 0% 0% 1
packages/cli/src/lib/plugins/external-public/external-public-plugin.ts 0% 0% 0% 0% 1-2, 4, 6, 8, 31-34, 37-39, 41, 43-52, 54, 56-68, 70-83, 85-103, 105-111, 113-121, 123
packages/cli/src/lib/plugins/external-public/index.ts 0% 0% 0% 0% 1
packages/cli/src/lib/utils/config.ts 0% 0% 0% 0% 1-2, 4, 6-10, 12, 46, 48-56, 58-59, 61-62, 64-75, 77-89, 91-95, 97-114, 116-118, 120-121, 123
packages/modules/app/src/AppClient.ts 0% 0% 0% 0% 1, 3-4, 6-7, 9, 12, 34, 38-54, 56, 59-63, 65-81, 83-100, 102-131, 133-134, 136-137, 139, 142-157, 159-164, 167
packages/modules/app/src/AppConfigurator.ts 0% 0% 0% 0% 1, 5, 9, 11, 28-29, 32, 34, 36-38, 40-46, 48-52, 54-55, 57, 59-61, 63-67, 69-71, 73-79, 81-83, 85-87
packages/modules/app/src/AppModuleProvider.ts 0% 0% 0% 0% 1, 10, 17, 22-25, 27, 29, 31, 33, 35, 37, 43-46, 48-57, 59-60, 62-63, 65, 67, 69-81, 83-92, 94, 97-100, 102-104, 106, 109-112, 114, 117-120, 122-123, 125, 128-133, 135-137, 139-141, 143, 146-150, 152-154, 157
packages/modules/app/src/application.schema.ts 0% 0% 0% 0% 1, 3-11, 13-26, 28-56, 58
packages/modules/app/src/enable-app-module.ts 0% 0% 0% 0% 1-2, 5, 8-22
packages/modules/app/src/index.ts 0% 0% 0% 0% 1, 14-15
packages/modules/app/src/module.ts 0% 0% 0% 0% 1, 4-5, 7, 11, 15-17, 19-21, 24-26, 30-36, 39-43, 45
packages/modules/app/src/types.ts 100% 100% 100% 100%
packages/modules/app/src/app/App.ts 0% 0% 0% 0% 1-2, 14, 17-18, 22, 24-27, 176-178, 181, 183, 185-190, 192-197, 199-204, 206-211, 213, 215-218, 220-222, 224-226, 228-230, 232-234, 236-238, 240-242, 244-246, 249, 251, 253-254, 256-257, 259-260, 262-266, 268-278, 280-288, 294-295, 297-304, 306-313, 315-322, 324-331, 333-340, 342-349, 351-358, 360-367, 369-376, 378-385, 387-394, 396-404, 406, 411-440, 442-449, 451-453, 455-457, 459-468, 470-479, 481-487, 489-497, 499-510, 512-514, 516-520, 522-538, 540-559, 561-564, 566-570, 572-581, 583-589, 591-599, 601-612, 614-635, 637-641, 646
packages/modules/app/src/app/actions.ts 0% 0% 0% 0% 1, 6, 9-18, 20-42, 44-47, 49-55, 57
packages/modules/app/src/app/create-reducer.ts 0% 0% 0% 0% 1, 6, 8, 10, 12, 16-47, 49
packages/modules/app/src/app/create-state.ts 0% 0% 0% 0% 1, 3, 5, 11-15, 17-18, 20-21, 23-24, 26-27, 29-30
packages/modules/app/src/app/flows.ts 0% 0% 0% 0% 1-2, 4, 11, 17-29, 31-37, 39-53, 55, 61-94, 96, 99-117
packages/modules/app/src/app/types.ts 100% 100% 100% 100%
packages/modules/service-discovery/src/configurator.ts 0% 0% 0% 0% 1, 7, 11, 18-21, 23-25, 27-34, 36-38, 40, 47-50, 52-56, 58, 64-66, 68-72, 74, 81-83, 85-96, 98, 110-120
packages/react/app/src/index.ts 0% 0% 0% 0% 1, 21
packages/react/app/src/feature-flag/enable-feature-flag.ts 0% 0% 0% 0% 1, 7, 12, 40, 44-47, 49, 51-77
packages/react/components/bookmark/src/components/create-bookmark/CreateBookmark.tsx 0% 0% 0% 0% 1, 3-5, 7-9, 13, 15-17, 21-26, 28, 30, 32-62, 64-76, 78-85, 88-93
packages/react/components/bookmark/src/components/edit-bookmark/EditBookmark.tsx 0% 0% 0% 0% 1, 3, 7-9, 11, 13-14, 16-17, 21-22, 25-26, 29-30, 32-35, 40-47, 49, 51-52, 54, 56-61, 63-94, 96-120, 122-129, 132-137
packages/react/framework/src/app/useApps.ts 0% 0% 0% 0% 1-3, 5, 14, 19-23, 25, 27-37, 39-40, 42
packages/react/legacy-interopt/src/LegacyAppContainer.ts 0% 0% 0% 0% 1, 8, 11, 13-14, 24-28, 30-38, 42-49, 51-63, 65-83, 85-86, 88-89, 91-94, 97, 99-100, 102-105, 107-110, 112-114, 116-118, 120-122, 124-126, 128, 133-135, 137, 139, 141-150, 152-164, 166-185, 187-192, 194-204, 206-213, 215-221, 223-229, 231-232, 234-235, 237-242, 244-259, 261-264, 266-280, 282-283, 285-313, 315-317, 319-321, 323-326, 328-330, 332-335, 337-339, 341-345, 347-349, 351-353, 356-376, 379
Generated in workflow #7822

packages/cli/docs/commands.md Outdated Show resolved Hide resolved
odinr and others added 23 commits October 2, 2024 11:16
- remove altering of `publicDir`
- add middleware for handling static assets from provided path
- ensure that middleware does not hijack source assets
- ensure static asset middleware does not process `index.html`
- check public dir for asset
- allow filtering
* feat(cli): Add app assets export plugin

create a plugin which will extract application assets and inject loader for import the correct asset when imported threw proxy

* feat(cli): Include StandardIncludeAssetExtensions in generated base manifest

* feat(cli): Include AppAssetExportPlugin in ViteConfig

When building an application, the `AppAssetExportPlugin` is now added to the `ViteConfig` and configured to include `manifest.build.allowedExtensions`.

* refactor(cli): Improve asset resolution and error handling in AppAssetExportPlugin

- resolve should check if the asset exists before filtering

* feat(cookbook-app-react-assets): Add Asset cookbook

Create a cookbook for testing the asset plugin
If the discoveryClient is already configured, skip the fallback configuration
@eikeland eikeland requested a review from odinr October 2, 2024 09:20
@odinr odinr merged commit e5ee21c into next Oct 2, 2024
6 of 7 checks passed
@odinr odinr deleted the feat/cli/appmanager/publish branch October 2, 2024 11:01
odinr added a commit that referenced this pull request Oct 2, 2024
* Chore/deps/update/fusion wc person (#2493)

* chore(person-resolver): updating fusion-wc-person to fix issue with controlled component usage

* docs: changeset

* feat(cli): command for publish app

* fix(http): reverting changes to http module

* feat(cli): command 'app publish' to publish app with app api

* feat(cli): new app commands for upload, tag and publish

* feat(cookbook-app-react): new config type for cli app publishing

* chore(cookbooks): updating app config to latest type

* docs: changeset

* fix(cli): removing commented console.log

* fix(cli): fixing lint warning

* chore(cli): console message when uploading new app version

* chore(cli): app publishing support environments

* fix(cli): renaming versin parameter for main cli

* fix(cli): renaming variable

* fix(cli): lint warning in upload-application

* fix(cli): comment in upload-application

* fix(cli): getEndpointUrl resolves api from service discovery

* feat(apps-service): cookbook app-react adjustd for new apps service

* feat(module-app): module-apps using the new apps-proxy, cli using the updated apps module

* fix(cli): options for config --env is no longer required

* feat(module-app): appmanifest is now instance of ApplicationManifest

* fix(legacy): mapping legacy apploader to new api

* fix: lockfile

* feat(app-react): new hook for useMyApps for getting a users apps

* docs: chanegset

* chore(cors): adding cors module to cli dev-serve

* chore(module-app): handle setting app key

* chore(config): adapting cookbooks config til new app api scheme

* fix(cli): appConfigurators setClient in type

* fix(cli): improves commands help text

* docs(cli): ads command and authentication documentation to README

* docs(cli): updated README

* docs(cli): add examples in README

* fix(cli): use correct path to resources

* docs(cli): improving documentation structure in vue-press

* fix(app): setting app api version and exposing baseUri in app configurator

* fix(cli): app config now supports using tags

* docs(cli): example for github-workflow to publish with app service

* chore(cookbook-app-react): removing publish script from package.json

* fix(cli): adding dev comments

* fix(cli: using ApplicationManifest in app-package command

* docs: comments and changeset

* chore(app): update app configurator to support filtering app manifests by current user

* docs: changeset cookbooks

* fix(cookbooks): adjusting app config and manifest to breaking changes in cookbooks

* docs(cli): vuepress cli commands options in markdown table

* docs(cli): changing config to new syntax in vuepress

* chore(vuepress): simplifying github workflow for publishing app

* chore(cli): renaming variable tagd to tagged

* fix(cli): creating export manifest defaults increateManifestFromPackage

* fix(cli): createManifestFromPackage proper check for type module

* fix(react-app): removing hook useMyApps since removed from provider

* fix(module-app): remove early return in logic

* fix(modules-app): set api version in client query

* fix(module-app): enableAppModule async callback

* feat(cli): create plugin for handling application api calls (#2448)

- generate manifest, config and source code when local app
- proxy app-service calls when app miss-match

* feat(cli): create plugin for serving index.html from external public directory (#2449)

Create a plugin `externalPublicPlugin` to fix the issue with serving the `index.html` file from the specified external public directory. Vite mode `spa` will not serve the `index.html` file from the specified external public directory.

- Enhanced the middleware to intercept requests and serve the `index.html` file from the specified external public directory.
- Transformed the HTML using Vite's `transformIndexHtml` method.
- Applied appropriate content headers and additional configured headers before sending the response.

* feat(cli): Rewrite dev-portal (#2462)

* feat(cli): add proxyRequestLogger to log proxy requests in the CLI

* fix(cli): set entryPoint in loadAppManifest based on environment mode

* feat(cli): rewrite CLI to use standard vite config.

- removed custom proxy servers
- added plugin for external portal
- added plugin for app-proxy
- added httpClient for app-proxy
- fixed app manifest

TODO: rework app manifest template

* fix(app): update AppConfigurator and ApplicationManifest for improved type handling and async support

* refactor(cli): remove unused imports and clean up Vite config

* build: update lock file

* feat(cookbooks): add a portal poc app

* Feat/cli/appmanager/refactoring-commands (#2450)

* fix(cli): improving docs and types

* feat(cli): refactoring and error handling in commands using apps-service

* fix: lint fixes

* fix(cli): todo in getEndpointUrl, and not using default import in dev-proxy

* fix(cookbook-poc-portal): package as private to not releae to npm

* Renaming getCommisSha to resolveCommitSha

* docs: temporary changeset

* fix(cli): re-adding is-mergable-object as dependency

* fix(cli): make sure export manifest uses js or mjs based on package type

* Feat(module-app): Adjusted module to the new app service API. (#2470)

* feat(module-app): Align manifest with new app service

- Updated zod to version 3.23.8
- Added zod to package.json dependencies
- Removed unused import from index.ts
- Removed unused import from types.ts
- Updated flows.ts to use payload.appKey instead of payload.key
- Updated actions.ts to use AppManifest instead of ApplicationManifest
- Added application.schema.ts to validate application manifest
- Added changeset slimy-buses-give.md

* refactor: Update modules to reflect new manifest

* style: fix lint

* Refactor(app): Update AppBuildManifest and AppManifest types (#2472)

* Refactor(cli): Improve build process and manifest generation

- Refactored build-application.ts to improve the build process.
- Updated create-export-manifest.js to generate the build manifest.
- Renamed getCommisSha to resolveCommitSha in app-package.ts.
- Updated load-app-config.ts to provide more informative console output.
- Updated config.ts to handle unsupported file types.
- Updated vite-config.ts to handle undefined config.
- Updated spinner.ts to attach and detach console output.
- Updated app-config.ts to handle void return type in AppConfigFn.
- Updated bundle-application.ts to use createBuildManifest instead of createExportManifest.
- Updated load-manifest.ts to generate the manifest with command and mode information.

* Refactor(cookbook-app-react): Update app.config and app.manifest.config

- Update app.config.ts to remove unused imports and adjust the endpoints URL.
- Update app.manifest.config.ts to set the appKey to 'app-react' when serving.

* Refactor(app): Update AppBuildManifest and AppManifest types

* refactor(cookbook): Remove unused app configuration files

* doc: update changesets

* refactor(cli): Update publish option default value to 'current'

* docs: update changeset

* Refactor(types): Update imports and exports in types.ts

* doc: updated docs

* docs(cli): documenting major cli changes and vue-press docs

* fix(AppManifest): adding missing types for AppManifest in module-app

* fix(app-module): adding allowedExtensions in build manifest

* fix(module-app): correcting name of categories in AppManifest

* fix(app-module): removed allowed extensions in zod ApiApplicationBuildSchema

* fix(cli): merge of manifest

* fix(app-proxy): simplify app proxy

* fix(module-app): update interfaces and schemas for api calls

* fix(cli): use correct app key when running dev-server

* fix(app-module): merging fixes

* fix(cli): remove doubble import of deepmerge

* fix(module-app): adding category to ApiApplicationSchema

* style: fix lint

* refactor(cli): emit error on failed bundle upload

* refactor(cli): Update import paths for app-proxy and external-public plugins

* doc(cli): Add README for the app proxy plugin

* refactor(cli): Add middleware to serve static assets from specified path

- remove altering of `publicDir`
- add middleware for handling static assets from provided path
- ensure that middleware does not hijack source assets
- ensure static asset middleware does not process `index.html`

* refactor(cli): Update external-public plugin

- check public dir for asset
- allow filtering

* doc(cli): Add External Public Plugin documentation

* build: update lock

* feat(cli): Add App Asset Export Plugin (#2479)

* feat(cli): Add app assets export plugin

create a plugin which will extract application assets and inject loader for import the correct asset when imported threw proxy

* feat(cli): Include StandardIncludeAssetExtensions in generated base manifest

* feat(cli): Include AppAssetExportPlugin in ViteConfig

When building an application, the `AppAssetExportPlugin` is now added to the `ViteConfig` and configured to include `manifest.build.allowedExtensions`.

* refactor(cli): Improve asset resolution and error handling in AppAssetExportPlugin

- resolve should check if the asset exists before filtering

* feat(cookbook-app-react-assets): Add Asset cookbook

Create a cookbook for testing the asset plugin

* refactor(app): rename `baseUri` to `assetUri` to make more sense

* refactor(configurator): Update ServiceDiscoveryConfigurator

If the discoveryClient is already configured, skip the fallback configuration

* refactor(cookbook-poc-portal): Update configuration of service discovery

* docs(changeset): setting minor for fusion-framewoerk-react

* fix(cli): adding correct entryPoint when building and serving

* docs: changeset for externalPlugin for vite

* docs(cli): vue-press adding command app manifest

* docs(vue-press): cli corrects typo in README

* fix(cli): env as required option to publish config, display error response in console

* fix(cli): using node fetch in cli

* fix(cli): remove dead code

* fix(cli): setting node-fetch agent to allow certificate error

* fix(cli): defineAppManifest returns Partial AppManifest

* fix(cli): removing https agent in node-fetch

* docs(cli): defineAppManifest example

* refactor(cli): export plugins

* fix(cli): resolving code review issues

* docs: changeset

---------

Co-authored-by: Odin Thomas Rochmann <[email protected]>
odinr added a commit that referenced this pull request Oct 14, 2024
* Chore/deps/update/fusion wc person (#2493)

* chore(person-resolver): updating fusion-wc-person to fix issue with controlled component usage

* docs: changeset

* feat(cli): command for publish app

* fix(http): reverting changes to http module

* feat(cli): command 'app publish' to publish app with app api

* feat(cli): new app commands for upload, tag and publish

* feat(cookbook-app-react): new config type for cli app publishing

* chore(cookbooks): updating app config to latest type

* docs: changeset

* fix(cli): removing commented console.log

* fix(cli): fixing lint warning

* chore(cli): console message when uploading new app version

* chore(cli): app publishing support environments

* fix(cli): renaming versin parameter for main cli

* fix(cli): renaming variable

* fix(cli): lint warning in upload-application

* fix(cli): comment in upload-application

* fix(cli): getEndpointUrl resolves api from service discovery

* feat(apps-service): cookbook app-react adjustd for new apps service

* feat(module-app): module-apps using the new apps-proxy, cli using the updated apps module

* fix(cli): options for config --env is no longer required

* feat(module-app): appmanifest is now instance of ApplicationManifest

* fix(legacy): mapping legacy apploader to new api

* fix: lockfile

* feat(app-react): new hook for useMyApps for getting a users apps

* docs: chanegset

* chore(cors): adding cors module to cli dev-serve

* chore(module-app): handle setting app key

* chore(config): adapting cookbooks config til new app api scheme

* fix(cli): appConfigurators setClient in type

* fix(cli): improves commands help text

* docs(cli): ads command and authentication documentation to README

* docs(cli): updated README

* docs(cli): add examples in README

* fix(cli): use correct path to resources

* docs(cli): improving documentation structure in vue-press

* fix(app): setting app api version and exposing baseUri in app configurator

* fix(cli): app config now supports using tags

* docs(cli): example for github-workflow to publish with app service

* chore(cookbook-app-react): removing publish script from package.json

* fix(cli): adding dev comments

* fix(cli: using ApplicationManifest in app-package command

* docs: comments and changeset

* chore(app): update app configurator to support filtering app manifests by current user

* docs: changeset cookbooks

* fix(cookbooks): adjusting app config and manifest to breaking changes in cookbooks

* docs(cli): vuepress cli commands options in markdown table

* docs(cli): changing config to new syntax in vuepress

* chore(vuepress): simplifying github workflow for publishing app

* chore(cli): renaming variable tagd to tagged

* fix(cli): creating export manifest defaults increateManifestFromPackage

* fix(cli): createManifestFromPackage proper check for type module

* fix(react-app): removing hook useMyApps since removed from provider

* fix(module-app): remove early return in logic

* fix(modules-app): set api version in client query

* fix(module-app): enableAppModule async callback

* feat(cli): create plugin for handling application api calls (#2448)

- generate manifest, config and source code when local app
- proxy app-service calls when app miss-match

* feat(cli): create plugin for serving index.html from external public directory (#2449)

Create a plugin `externalPublicPlugin` to fix the issue with serving the `index.html` file from the specified external public directory. Vite mode `spa` will not serve the `index.html` file from the specified external public directory.

- Enhanced the middleware to intercept requests and serve the `index.html` file from the specified external public directory.
- Transformed the HTML using Vite's `transformIndexHtml` method.
- Applied appropriate content headers and additional configured headers before sending the response.

* feat(cli): Rewrite dev-portal (#2462)

* feat(cli): add proxyRequestLogger to log proxy requests in the CLI

* fix(cli): set entryPoint in loadAppManifest based on environment mode

* feat(cli): rewrite CLI to use standard vite config.

- removed custom proxy servers
- added plugin for external portal
- added plugin for app-proxy
- added httpClient for app-proxy
- fixed app manifest

TODO: rework app manifest template

* fix(app): update AppConfigurator and ApplicationManifest for improved type handling and async support

* refactor(cli): remove unused imports and clean up Vite config

* build: update lock file

* feat(cookbooks): add a portal poc app

* Feat/cli/appmanager/refactoring-commands (#2450)

* fix(cli): improving docs and types

* feat(cli): refactoring and error handling in commands using apps-service

* fix: lint fixes

* fix(cli): todo in getEndpointUrl, and not using default import in dev-proxy

* fix(cookbook-poc-portal): package as private to not releae to npm

* Renaming getCommisSha to resolveCommitSha

* docs: temporary changeset

* fix(cli): re-adding is-mergable-object as dependency

* fix(cli): make sure export manifest uses js or mjs based on package type

* Feat(module-app): Adjusted module to the new app service API. (#2470)

* feat(module-app): Align manifest with new app service

- Updated zod to version 3.23.8
- Added zod to package.json dependencies
- Removed unused import from index.ts
- Removed unused import from types.ts
- Updated flows.ts to use payload.appKey instead of payload.key
- Updated actions.ts to use AppManifest instead of ApplicationManifest
- Added application.schema.ts to validate application manifest
- Added changeset slimy-buses-give.md

* refactor: Update modules to reflect new manifest

* style: fix lint

* Refactor(app): Update AppBuildManifest and AppManifest types (#2472)

* Refactor(cli): Improve build process and manifest generation

- Refactored build-application.ts to improve the build process.
- Updated create-export-manifest.js to generate the build manifest.
- Renamed getCommisSha to resolveCommitSha in app-package.ts.
- Updated load-app-config.ts to provide more informative console output.
- Updated config.ts to handle unsupported file types.
- Updated vite-config.ts to handle undefined config.
- Updated spinner.ts to attach and detach console output.
- Updated app-config.ts to handle void return type in AppConfigFn.
- Updated bundle-application.ts to use createBuildManifest instead of createExportManifest.
- Updated load-manifest.ts to generate the manifest with command and mode information.

* Refactor(cookbook-app-react): Update app.config and app.manifest.config

- Update app.config.ts to remove unused imports and adjust the endpoints URL.
- Update app.manifest.config.ts to set the appKey to 'app-react' when serving.

* Refactor(app): Update AppBuildManifest and AppManifest types

* refactor(cookbook): Remove unused app configuration files

* doc: update changesets

* refactor(cli): Update publish option default value to 'current'

* docs: update changeset

* Refactor(types): Update imports and exports in types.ts

* doc: updated docs

* docs(cli): documenting major cli changes and vue-press docs

* fix(AppManifest): adding missing types for AppManifest in module-app

* fix(app-module): adding allowedExtensions in build manifest

* fix(module-app): correcting name of categories in AppManifest

* fix(app-module): removed allowed extensions in zod ApiApplicationBuildSchema

* fix(cli): merge of manifest

* fix(app-proxy): simplify app proxy

* fix(module-app): update interfaces and schemas for api calls

* fix(cli): use correct app key when running dev-server

* fix(app-module): merging fixes

* fix(cli): remove doubble import of deepmerge

* fix(module-app): adding category to ApiApplicationSchema

* style: fix lint

* refactor(cli): emit error on failed bundle upload

* refactor(cli): Update import paths for app-proxy and external-public plugins

* doc(cli): Add README for the app proxy plugin

* refactor(cli): Add middleware to serve static assets from specified path

- remove altering of `publicDir`
- add middleware for handling static assets from provided path
- ensure that middleware does not hijack source assets
- ensure static asset middleware does not process `index.html`

* refactor(cli): Update external-public plugin

- check public dir for asset
- allow filtering

* doc(cli): Add External Public Plugin documentation

* build: update lock

* feat(cli): Add App Asset Export Plugin (#2479)

* feat(cli): Add app assets export plugin

create a plugin which will extract application assets and inject loader for import the correct asset when imported threw proxy

* feat(cli): Include StandardIncludeAssetExtensions in generated base manifest

* feat(cli): Include AppAssetExportPlugin in ViteConfig

When building an application, the `AppAssetExportPlugin` is now added to the `ViteConfig` and configured to include `manifest.build.allowedExtensions`.

* refactor(cli): Improve asset resolution and error handling in AppAssetExportPlugin

- resolve should check if the asset exists before filtering

* feat(cookbook-app-react-assets): Add Asset cookbook

Create a cookbook for testing the asset plugin

* refactor(app): rename `baseUri` to `assetUri` to make more sense

* refactor(configurator): Update ServiceDiscoveryConfigurator

If the discoveryClient is already configured, skip the fallback configuration

* refactor(cookbook-poc-portal): Update configuration of service discovery

* docs(changeset): setting minor for fusion-framewoerk-react

* fix(cli): adding correct entryPoint when building and serving

* docs: changeset for externalPlugin for vite

* docs(cli): vue-press adding command app manifest

* docs(vue-press): cli corrects typo in README

* fix(cli): env as required option to publish config, display error response in console

* fix(cli): using node fetch in cli

* fix(cli): remove dead code

* fix(cli): setting node-fetch agent to allow certificate error

* fix(cli): defineAppManifest returns Partial AppManifest

* fix(cli): removing https agent in node-fetch

* docs(cli): defineAppManifest example

* refactor(cli): export plugins

* fix(cli): resolving code review issues

* docs: changeset

---------

Co-authored-by: Odin Thomas Rochmann <[email protected]>
odinr added a commit that referenced this pull request Oct 15, 2024
* Feat/cli/appmanager/publish (#2178)

* Chore/deps/update/fusion wc person (#2493)

* chore(person-resolver): updating fusion-wc-person to fix issue with controlled component usage

* docs: changeset

* feat(cli): command for publish app

* fix(http): reverting changes to http module

* feat(cli): command 'app publish' to publish app with app api

* feat(cli): new app commands for upload, tag and publish

* feat(cookbook-app-react): new config type for cli app publishing

* chore(cookbooks): updating app config to latest type

* docs: changeset

* fix(cli): removing commented console.log

* fix(cli): fixing lint warning

* chore(cli): console message when uploading new app version

* chore(cli): app publishing support environments

* fix(cli): renaming versin parameter for main cli

* fix(cli): renaming variable

* fix(cli): lint warning in upload-application

* fix(cli): comment in upload-application

* fix(cli): getEndpointUrl resolves api from service discovery

* feat(apps-service): cookbook app-react adjustd for new apps service

* feat(module-app): module-apps using the new apps-proxy, cli using the updated apps module

* fix(cli): options for config --env is no longer required

* feat(module-app): appmanifest is now instance of ApplicationManifest

* fix(legacy): mapping legacy apploader to new api

* fix: lockfile

* feat(app-react): new hook for useMyApps for getting a users apps

* docs: chanegset

* chore(cors): adding cors module to cli dev-serve

* chore(module-app): handle setting app key

* chore(config): adapting cookbooks config til new app api scheme

* fix(cli): appConfigurators setClient in type

* fix(cli): improves commands help text

* docs(cli): ads command and authentication documentation to README

* docs(cli): updated README

* docs(cli): add examples in README

* fix(cli): use correct path to resources

* docs(cli): improving documentation structure in vue-press

* fix(app): setting app api version and exposing baseUri in app configurator

* fix(cli): app config now supports using tags

* docs(cli): example for github-workflow to publish with app service

* chore(cookbook-app-react): removing publish script from package.json

* fix(cli): adding dev comments

* fix(cli: using ApplicationManifest in app-package command

* docs: comments and changeset

* chore(app): update app configurator to support filtering app manifests by current user

* docs: changeset cookbooks

* fix(cookbooks): adjusting app config and manifest to breaking changes in cookbooks

* docs(cli): vuepress cli commands options in markdown table

* docs(cli): changing config to new syntax in vuepress

* chore(vuepress): simplifying github workflow for publishing app

* chore(cli): renaming variable tagd to tagged

* fix(cli): creating export manifest defaults increateManifestFromPackage

* fix(cli): createManifestFromPackage proper check for type module

* fix(react-app): removing hook useMyApps since removed from provider

* fix(module-app): remove early return in logic

* fix(modules-app): set api version in client query

* fix(module-app): enableAppModule async callback

* feat(cli): create plugin for handling application api calls (#2448)

- generate manifest, config and source code when local app
- proxy app-service calls when app miss-match

* feat(cli): create plugin for serving index.html from external public directory (#2449)

Create a plugin `externalPublicPlugin` to fix the issue with serving the `index.html` file from the specified external public directory. Vite mode `spa` will not serve the `index.html` file from the specified external public directory.

- Enhanced the middleware to intercept requests and serve the `index.html` file from the specified external public directory.
- Transformed the HTML using Vite's `transformIndexHtml` method.
- Applied appropriate content headers and additional configured headers before sending the response.

* feat(cli): Rewrite dev-portal (#2462)

* feat(cli): add proxyRequestLogger to log proxy requests in the CLI

* fix(cli): set entryPoint in loadAppManifest based on environment mode

* feat(cli): rewrite CLI to use standard vite config.

- removed custom proxy servers
- added plugin for external portal
- added plugin for app-proxy
- added httpClient for app-proxy
- fixed app manifest

TODO: rework app manifest template

* fix(app): update AppConfigurator and ApplicationManifest for improved type handling and async support

* refactor(cli): remove unused imports and clean up Vite config

* build: update lock file

* feat(cookbooks): add a portal poc app

* Feat/cli/appmanager/refactoring-commands (#2450)

* fix(cli): improving docs and types

* feat(cli): refactoring and error handling in commands using apps-service

* fix: lint fixes

* fix(cli): todo in getEndpointUrl, and not using default import in dev-proxy

* fix(cookbook-poc-portal): package as private to not releae to npm

* Renaming getCommisSha to resolveCommitSha

* docs: temporary changeset

* fix(cli): re-adding is-mergable-object as dependency

* fix(cli): make sure export manifest uses js or mjs based on package type

* Feat(module-app): Adjusted module to the new app service API. (#2470)

* feat(module-app): Align manifest with new app service

- Updated zod to version 3.23.8
- Added zod to package.json dependencies
- Removed unused import from index.ts
- Removed unused import from types.ts
- Updated flows.ts to use payload.appKey instead of payload.key
- Updated actions.ts to use AppManifest instead of ApplicationManifest
- Added application.schema.ts to validate application manifest
- Added changeset slimy-buses-give.md

* refactor: Update modules to reflect new manifest

* style: fix lint

* Refactor(app): Update AppBuildManifest and AppManifest types (#2472)

* Refactor(cli): Improve build process and manifest generation

- Refactored build-application.ts to improve the build process.
- Updated create-export-manifest.js to generate the build manifest.
- Renamed getCommisSha to resolveCommitSha in app-package.ts.
- Updated load-app-config.ts to provide more informative console output.
- Updated config.ts to handle unsupported file types.
- Updated vite-config.ts to handle undefined config.
- Updated spinner.ts to attach and detach console output.
- Updated app-config.ts to handle void return type in AppConfigFn.
- Updated bundle-application.ts to use createBuildManifest instead of createExportManifest.
- Updated load-manifest.ts to generate the manifest with command and mode information.

* Refactor(cookbook-app-react): Update app.config and app.manifest.config

- Update app.config.ts to remove unused imports and adjust the endpoints URL.
- Update app.manifest.config.ts to set the appKey to 'app-react' when serving.

* Refactor(app): Update AppBuildManifest and AppManifest types

* refactor(cookbook): Remove unused app configuration files

* doc: update changesets

* refactor(cli): Update publish option default value to 'current'

* docs: update changeset

* Refactor(types): Update imports and exports in types.ts

* doc: updated docs

* docs(cli): documenting major cli changes and vue-press docs

* fix(AppManifest): adding missing types for AppManifest in module-app

* fix(app-module): adding allowedExtensions in build manifest

* fix(module-app): correcting name of categories in AppManifest

* fix(app-module): removed allowed extensions in zod ApiApplicationBuildSchema

* fix(cli): merge of manifest

* fix(app-proxy): simplify app proxy

* fix(module-app): update interfaces and schemas for api calls

* fix(cli): use correct app key when running dev-server

* fix(app-module): merging fixes

* fix(cli): remove doubble import of deepmerge

* fix(module-app): adding category to ApiApplicationSchema

* style: fix lint

* refactor(cli): emit error on failed bundle upload

* refactor(cli): Update import paths for app-proxy and external-public plugins

* doc(cli): Add README for the app proxy plugin

* refactor(cli): Add middleware to serve static assets from specified path

- remove altering of `publicDir`
- add middleware for handling static assets from provided path
- ensure that middleware does not hijack source assets
- ensure static asset middleware does not process `index.html`

* refactor(cli): Update external-public plugin

- check public dir for asset
- allow filtering

* doc(cli): Add External Public Plugin documentation

* build: update lock

* feat(cli): Add App Asset Export Plugin (#2479)

* feat(cli): Add app assets export plugin

create a plugin which will extract application assets and inject loader for import the correct asset when imported threw proxy

* feat(cli): Include StandardIncludeAssetExtensions in generated base manifest

* feat(cli): Include AppAssetExportPlugin in ViteConfig

When building an application, the `AppAssetExportPlugin` is now added to the `ViteConfig` and configured to include `manifest.build.allowedExtensions`.

* refactor(cli): Improve asset resolution and error handling in AppAssetExportPlugin

- resolve should check if the asset exists before filtering

* feat(cookbook-app-react-assets): Add Asset cookbook

Create a cookbook for testing the asset plugin

* refactor(app): rename `baseUri` to `assetUri` to make more sense

* refactor(configurator): Update ServiceDiscoveryConfigurator

If the discoveryClient is already configured, skip the fallback configuration

* refactor(cookbook-poc-portal): Update configuration of service discovery

* docs(changeset): setting minor for fusion-framewoerk-react

* fix(cli): adding correct entryPoint when building and serving

* docs: changeset for externalPlugin for vite

* docs(cli): vue-press adding command app manifest

* docs(vue-press): cli corrects typo in README

* fix(cli): env as required option to publish config, display error response in console

* fix(cli): using node fetch in cli

* fix(cli): remove dead code

* fix(cli): setting node-fetch agent to allow certificate error

* fix(cli): defineAppManifest returns Partial AppManifest

* fix(cli): removing https agent in node-fetch

* docs(cli): defineAppManifest example

* refactor(cli): export plugins

* fix(cli): resolving code review issues

* docs: changeset

---------

Co-authored-by: Odin Thomas Rochmann <[email protected]>

* fix(cli): app-proxy-plugin changin order of execution for paths (#2498)

* Fix/cli/appmanifest/app key (#2502)

* fix(cli): log response on isAppRegistered

* fix(cli): better spinner mesage

* fix(cli): using node fetch in is AppRegistered (#2505)

* fix(cli): better error handling of isAppRegistered (#2507)

* feat(app): Convert config to instance so that implementation of behavior is abstracted (#2508)

* feat(app): Convert config to instance so that implementation of behavior is abstracted

- create manifest for config validation
- create class for transpiling of config
- update cli to use the VO type of config

NOTE: direct access of endpoints if now deprecated!

BREAKING CHANGES: `endpoints` will be deprecate in future, applications should use `getEndpoint`

* refactor(app): Refactor AppConfig class to improve endpoint handling

* Feat/cli/upload config (#2506)

* feat(cli): added new command for upload-config

* docs: changeset for the new command upload-config

* fix(cli): eslint issues

* fix(cli): better error handling in isAppRegistered

* fix(cli): to many input params for isAppREgistered in  upload-export-config

* fix(cli): throwing error if app is not registrered

* fix(cli): error message when app is deleted

* refactor(cli): rework cli to support import without type module in package.json (#2509)

* refactor(cli): Remove "type" module from package.json

* fix/packages/modules (#2510)

* fix/packages/modules

* docs: changeset

* empty commit

* fix(cli): adding ApiConfigSchema zod type to zli (#2511)

* Revert "fix/packages/modules (#2510)"

This reverts commit 663bed8.

* Revert "refactor(cli): Remove "type" module from package.json"

This reverts commit 43b4cac.

* fix(cli): adding ApiConfigSchema zod type

* Revert "refactor(cli): rework cli to support import without type module in package.json (#2509)"

This reverts commit e2f0f5f.

* Delete packages/cli/TODO.md

---------

Co-authored-by: Øyvind Eikeland <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🚧 chore maintaines work, (update deps, workflos ...) 💾 CLI fusion framework CLI 👨🏻‍🍳 cookbooks 📚 documentation Improvements or additions to documentation 🚀 feature New feature or request 🧬 Modules 👾 React
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update
2 participants