refactor: module federation
All checks were successful
JS Unit Tests / test (pull_request) Successful in 50s
Build Test / test (pull_request) Successful in 54s
PHP Unit Tests / test (pull_request) Successful in 57s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-02-22 16:54:00 -05:00
parent 6e5627f83b
commit ad0a20613e
4 changed files with 22 additions and 22 deletions

View File

@@ -1,10 +1,6 @@
import type { App as Vue } from 'vue'
import routes from '@/routes'
import integrations from '@/integrations'
import { useCollectionsStore } from '@/stores/collectionsStore'
import { useEntitiesStore } from '@/stores/entitiesStore'
import { useProvidersStore } from '@/stores/providersStore'
import { useServicesStore } from '@/stores/servicesStore'
/**
* Mail Manager Module Boot Script
@@ -23,21 +19,15 @@ export const css = ['__CSS_FILENAME_PLACEHOLDER__']
// Export routes and integrations for module system
export { routes, integrations }
// Export stores for external use if needed
export { useCollectionsStore, useEntitiesStore, useProvidersStore, useServicesStore }
// Export services, stores and models for external use
export * from '@/services'
export * from '@/stores'
export * from '@/models'
// Export composables
// Export composables for external use
export { useMailSync } from '@/composables/useMailSync'
// Export services
export { providerService, serviceService, collectionService, entityService } from '@/services'
// Export models
export { CollectionObject, CollectionPropertiesObject } from '@/models/collection'
export { MessageObject } from '@/models/message'
export { EntityObject } from '@/models/entity'
// Export components
// Export components for external use
export { default as AddAccountDialog } from '@/components/AddAccountDialog.vue'
export { default as EditAccountDialog } from '@/components/EditAccountDialog.vue'

View File

@@ -1,7 +1,14 @@
export { CollectionObject } from './collection';
export { EntityObject } from './entity';
export { ProviderObject } from './provider';
export { ServiceObject } from './service';
export {
CollectionObject,
CollectionPropertiesObject
} from './collection';
export { EntityObject } from './entity';
export {
MessageObject,
MessagePartObject
} from './message';
export {
Identity,
IdentityNone,

View File

@@ -3,7 +3,7 @@
* Provides a centralized way to make API calls with envelope wrapping/unwrapping
*/
import { createFetchWrapper } from '@KTXC/utils/helpers/fetch-wrapper-core';
import { createFetchWrapper } from '@KTXC';
import type { ApiRequest, ApiResponse } from '../types/common';
const fetchWrapper = createFetchWrapper();

View File

@@ -41,13 +41,16 @@ export default defineConfig({
},
rollupOptions: {
external: [
'pinia',
'vue',
'vue-router',
// Externalize shared utilities from core to avoid duplication
/^@KTXC\/utils\//,
'pinia',
'@KTXC',
],
output: {
paths: (id) => {
if (id === '@KTXC') return '/js/ktxc.mjs'
return id
},
assetFileNames: (assetInfo) => {
if (assetInfo.name?.endsWith('.css')) {
return 'mail_manager-[hash].css'