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.
30 lines
693 B
JavaScript
30 lines
693 B
JavaScript
/**
|
|
* Machines plugin routes
|
|
*/
|
|
export default [
|
|
{
|
|
path: 'machines',
|
|
name: 'machines',
|
|
component: () => import('./views/MachinesList.vue'),
|
|
meta: { plugin: 'machines' }
|
|
},
|
|
{
|
|
path: 'machines/new',
|
|
name: 'machine-new',
|
|
component: () => import('./views/MachineForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'machines' }
|
|
},
|
|
{
|
|
path: 'machines/:id',
|
|
name: 'machine-detail',
|
|
component: () => import('./views/MachineDetail.vue'),
|
|
meta: { plugin: 'machines' }
|
|
},
|
|
{
|
|
path: 'machines/:id/edit',
|
|
name: 'machine-edit',
|
|
component: () => import('./views/MachineForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'machines' }
|
|
}
|
|
]
|