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

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-02-22 12:35:56 -05:00
parent 8560aef5e2
commit bb05f3d20f
4 changed files with 35 additions and 16 deletions

View File

@@ -9,7 +9,7 @@
"vue": "/vendor/vue.mjs",
"vue-router": "/vendor/vue-router.mjs",
"pinia": "/vendor/pinia.mjs",
"@KTXC/utils/helpers/fetch-wrapper-core": "/js/shared-utils.js"
"@KTXC": "/js/ktxc.mjs"
}
}
</script>

28
core/src/shared/index.ts Normal file
View File

@@ -0,0 +1,28 @@
/**
* KTXC Host SDK
*
* This is the single public contract between the host application and modules.
* Modules must import from '@KTXC' (this file), never from '@KTXC/...' sub-paths.
* At runtime, '@KTXC' resolves to '/js/ktxc.mjs' via the import map.
*/
// Stores
export { useModuleStore } from '../stores/moduleStore'
export { useTenantStore } from '../stores/tenantStore'
export { useUserStore } from '../stores/userStore'
export { useIntegrationStore } from '../stores/integrationStore'
export { useLayoutStore } from '../stores/layoutStore'
// Composables
export { useUser } from '../composables/useUser'
export { useClipboard } from '../composables/useClipboard'
// Services
export { userService } from '../services/user/userService'
// Utilities
export { fetchWrapper } from '../utils/helpers/fetch-wrapper'
export { createFetchWrapper } from '../utils/helpers/fetch-wrapper-core'
// Types
export type { ModuleIntegrations } from '../types/moduleTypes'

View File

@@ -1,10 +0,0 @@
/**
* Shared utilities entry point for external modules
* This file is built separately and exposed via import map
*/
export {
createFetchWrapper,
type FetchWrapperOptions,
type RequestCallOptions,
} from './fetch-wrapper-core';