Relocate applications, geenforce, knowledgebase, and machines - each owns only its own views dir, so a clean move to plugins/<name>/frontend/ (views/ + routes.js, core imports rewritten to @/). geenforce's entryForm.js helper + its vitest spec move with it (ManifestEditor imports it as a sibling). Machinery fixes this batch surfaced: - routes.gen.js codegen uses namespace imports (import * as p_x). A route file without a `toplevel` export is undefined on the namespace instead of a strict- ESM missing-binding build error. - vitest gains a `pretest` stage so plugin-frontend specs (now under plugins/<name>/frontend/) run from their staged copy in src/.plugins-staged/. Verified live: GE-Enforce (the most complex, uses the entryForm sibling helper) renders fully from its staged frontend. Build + 58 vitest + naming green.
31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
/**
|
|
* GE-Enforce plugin routes.
|
|
*
|
|
* A top-level section (not under /settings) - the manifest editor + fleet
|
|
* reports are a large operational surface, so they get their own full-width
|
|
* shell with tabs. meta.plugin = 'geenforce' so the ADR-009 guard hides the
|
|
* section when the plugin is disabled. Admin-only.
|
|
*/
|
|
export default [
|
|
{
|
|
path: 'geenforce',
|
|
component: () => import('./views/GeEnforceLayout.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'geenforce' },
|
|
children: [
|
|
{ path: '', redirect: '/geenforce/manifests' },
|
|
{
|
|
path: 'manifests',
|
|
name: 'geenforce-manifests',
|
|
component: () => import('./views/ManifestEditor.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'geenforce' }
|
|
},
|
|
{
|
|
path: 'reports',
|
|
name: 'geenforce-reports',
|
|
component: () => import('./views/EnforcementReports.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'geenforce' }
|
|
}
|
|
]
|
|
}
|
|
]
|