-
Notifications
You must be signed in to change notification settings - Fork 6
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
App Management V1 #2494
Merged
App Management V1 #2494
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 439d6d4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
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
bot
added
👨🏻🍳 cookbooks
👾 React
💾 CLI
fusion framework CLI
📚 documentation
Improvements or additions to documentation
🧬 Modules
labels
Oct 2, 2024
github-actions
bot
added
🐞 bug
Something isn't working
🚀 feature
New feature or request
labels
Oct 3, 2024
github-actions
bot
added
🛠️ utils
packages related to utils
and removed
🛠️ utils
packages related to utils
labels
Oct 11, 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 <odin.rochmann@gmail.com>
* fix(cli): log response on isAppRegistered * fix(cli): better spinner mesage
…ior 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): 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
* fix/packages/modules * docs: changeset * empty commit
eikeland
approved these changes
Oct 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🐞 bug
Something isn't working
💾 CLI
fusion framework CLI
👨🏻🍳 cookbooks
📚 documentation
Improvements or additions to documentation
🚀 feature
New feature or request
🧬 Modules
👾 React
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why These Changes Are Required
The primary reason for these changes is the transition to a micro-service architecture for hosting and managing applications, replacing the previous API.
The changes introduced in
@equinor/fusion-framework-cli
and@equinor/fusion-framework-module-app
are essential for several reasons:@equinor/fusion-framework-cli
New CLI commands for publishing applications
The new
build-config
,build-manifest
,build-pack
,build-upload
,build-tag
,build-publish
commands provide a more structured and intuitive way to publish applications. These commands streamline the process of configuring, packaging, and generating manifests for applications, making it easier for developers to manage their projects.Warning
config
command tobuild-config
.pack
command tobuild-pack
.New Dev Portal for managing applications
The new
dev-portal
only uses Vite (previously wrapped inside Express as a middleware). This change simplifies the setup and configuration of the development portal, making it more lightweight and efficient. It Also means in theory that anyone can compose their own dev portal using Vite.To achieve this, several plugins and middleware have been introduced.
index.html
from an external public directory and enhancing middleware improves the flexibility for using custom portals when developing applications.appProxyPlugin
simplifies the process of proxying requests to the Fusion app backend, ensuring seamless integration and better performance.Base Manifest Enhancements
The application manifest has had a total overhaul. Event though only
manifest.build
is used for serving and publishing, we kept themanifest
command for backwards compatibility.Documentation
Added documentation for new CLI commands and improved existing documentation.
@equinor/fusion-framework-module-app
App Service API Adjustments:
AppClient
class standardizes the way applications interact with the backend, making the codebase more maintainable and scalable.zod
for manifest validation ensures that the data structures are correctly validated, reducing runtime errors.useApps
hook with afilterByCurrentUser
parameter provides more flexibility in filtering applications based on the current user.Migration Guide:
These changes collectively enhance the functionality, maintainability, and usability of the Fusion framework, making it more robust and developer-friendly.
The changes introduced in
@equinor/fusion-framework-cli
and@equinor/fusion-framework-module-app
are essential for several reasons:@equinor/fusion-framework-cli
Proxy Request Logger:
Base Manifest Enhancements:
StandardIncludeAssetExtensions
asallowedExtensions
ensures that only the necessary file types are included, improving security and performance.Documentation:
External Public Plugin:
index.html
from an external public directory and enhancing middleware improves the flexibility and scalability of the application.Updated CLI Commands:
build-config
,build-pack
,build-manifest
) provides a clearer and more intuitive command structure.App Proxy Plugin:
appProxyPlugin
simplifies the process of proxying requests to the Fusion app backend, ensuring seamless integration and better performance.@equinor/fusion-framework-module-app
App Service API Adjustments:
AppClient
class standardizes the way applications interact with the backend, making the codebase more maintainable and scalable.zod
for manifest validation ensures that the data structures are correctly validated, reducing runtime errors.useApps
hook with afilterByCurrentUser
parameter provides more flexibility in filtering applications based on the current user.Migration Guide:
These changes collectively enhance the functionality, maintainability, and usability of the Fusion framework, making it more robust and developer-friendly.
How to Migrate
Configuration custom app client
Before:
After:
Check off the following:
Confirm that I checked changes to branch which I am merging into.
Confirm that the I have completed the self-review checklist.
Confirm that my changes meet our code of conduct.