feat(import): wire feature into server and web shell; browser-safe web entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
596099a13f
commit
9f96e293e1
@@ -1,4 +1,4 @@
|
||||
import type { Feature, JobHandler, ServerContext, WebFeature } from "@stc/contracts";
|
||||
import type { Feature, JobHandler, ServerContext } from "@stc/contracts";
|
||||
import type { Deps, ImportOptions } from "./context";
|
||||
import { importCodeRepo } from "./jobs/code-repo";
|
||||
import { importPacktVideo } from "./jobs/packt-video";
|
||||
@@ -34,7 +34,4 @@ export function importFeature(ctx: ServerContext, opts: ImportOptions = {}): Fea
|
||||
};
|
||||
}
|
||||
|
||||
export const importWeb: WebFeature = {
|
||||
name: "import",
|
||||
routes: [{ path: "/admin/import", element: () => import("./web/ImportPage"), nav: { label: "Import", area: "admin" } }],
|
||||
};
|
||||
export { importWeb } from "./web";
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { WebFeature } from "@stc/contracts";
|
||||
|
||||
/** Browser-safe entry (no server imports): apps/web imports this as "@stc/feature-import/web". */
|
||||
export const importWeb: WebFeature = {
|
||||
name: "import",
|
||||
routes: [{ path: "/admin/import", element: () => import("./web/ImportPage"), nav: { label: "Import", area: "admin" } }],
|
||||
};
|
||||
Reference in New Issue
Block a user