Files
FreeCADWasmDev/web/src/module-registry.generated.ts
wangdequan 65f59aba25 Remove OpenSCAD from the web port
Web FreeCAD does not implement OpenSCAD. Drop the module end to end
instead of keeping a blocked or placeholder shell:

- delete the parity-matrix row and regenerate the module registry
  (31 modules, OpenSCAD absent)
- remove the OpenSCAD-only frontend modules (worker, facades, slice,
  mesh backend, desktop/preferences tasks) and strip the OpenSCAD
  branches from the dispatchers, shells, storage and router
- neutralise the two shared owners that outlived the module:
  openscad-desktop-view -> scene-viewport (SceneViewport) and
  openscad-desktop-adapter -> scene-document (SceneDocument), so Part,
  Mesh and the other consumers keep working
- drop the FreeCADWebOpenSCADRuntimeProbe target and
  FREECAD_WEB_ENABLE_OPENSCAD option from the kernel CMake;
  BUILD_OPENSCAD stays in the forced-off list
- delete web/openscad.html, its Vite input, the kernel artifacts and
  the 17 OpenSCAD tool entry points

AGENTS.md records the removal rule. tsc --noEmit is clean and
grep -ri openscad web/src is empty.

Also carry the Boost pthread guard: under Emscripten a plain -lpthread
implies -sUSE_PTHREADS=1 and therewith --shared-memory, which the
non-atomics VTK archives cannot link against.

Validation NOT_RUN / PARTIAL_FAILED, Acceptance NOT_CLAIMED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 06:53:03 +08:00

342 lines
37 KiB
TypeScript

/* Generated by tools/generate_web_module_registry.py. */
import { artifactForWorker, createDynamicModuleWorker, type WebModuleArtifact } from "./module-loader.js";
import workerEntry0 from "./assembly.worker.ts?worker&url";
import workerEntry1 from "./bim.worker.ts?worker&url";
import workerEntry2 from "./cam.worker.ts?worker&url";
import workerEntry3 from "./cloud.worker.ts?worker&url";
import workerEntry4 from "./draft.worker.ts?worker&url";
import workerEntry5 from "./fem.worker.ts?worker&url";
import workerEntry6 from "./help.worker.ts?worker&url";
import workerEntry7 from "./import.worker.ts?worker&url";
import workerEntry8 from "./inspection.worker.ts?worker&url";
import workerEntry9 from "./jtreader.worker.ts?worker&url";
import workerEntry10 from "./material-python.worker.ts?worker&url";
import workerEntry11 from "./material.worker.ts?worker&url";
import workerEntry12 from "./measure.worker.ts?worker&url";
import workerEntry13 from "./mesh.worker.ts?worker&url";
import workerEntry14 from "./meshpart.worker.ts?worker&url";
import workerEntry15 from "./part-save.worker.ts?worker&url";
import workerEntry16 from "./part.worker.ts?worker&url";
import workerEntry17 from "./partdesign-inspect.worker.ts?worker&url";
import workerEntry18 from "./partdesign-python.worker.ts?worker&url";
import workerEntry19 from "./partdesign-save.worker.ts?worker&url";
import workerEntry20 from "./partdesign.worker.ts?worker&url";
import workerEntry21 from "./plot-python.worker.ts?worker&url";
import workerEntry22 from "./points-persistence.worker.ts?worker&url";
import workerEntry23 from "./points.worker.ts?worker&url";
import workerEntry24 from "./reverseengineering-create.worker.ts?worker&url";
import workerEntry25 from "./reverseengineering-inspect.worker.ts?worker&url";
import workerEntry26 from "./reverseengineering-python.worker.ts?worker&url";
import workerEntry27 from "./reverseengineering-save.worker.ts?worker&url";
import workerEntry28 from "./robot-create.worker.ts?worker&url";
import workerEntry29 from "./robot-inspect.worker.ts?worker&url";
import workerEntry30 from "./robot-python.worker.ts?worker&url";
import workerEntry31 from "./robot-save.worker.ts?worker&url";
import workerEntry32 from "./sandbox-inspect.worker.ts?worker&url";
import workerEntry33 from "./sandbox-python.worker.ts?worker&url";
import workerEntry34 from "./sandbox-save.worker.ts?worker&url";
import workerEntry35 from "./sandbox.worker.ts?worker&url";
import workerEntry36 from "./show-inspect.worker.ts?worker&url";
import workerEntry37 from "./show-python.worker.ts?worker&url";
import workerEntry38 from "./sketcher-inspect.worker.ts?worker&url";
import workerEntry39 from "./sketcher-persistence.worker.ts?worker&url";
import workerEntry40 from "./sketcher-python.worker.ts?worker&url";
import workerEntry41 from "./sketcher.worker.ts?worker&url";
import workerEntry42 from "./spreadsheet-inspect.worker.ts?worker&url";
import workerEntry43 from "./spreadsheet-python.worker.ts?worker&url";
import workerEntry44 from "./spreadsheet-save.worker.ts?worker&url";
import workerEntry45 from "./spreadsheet.worker.ts?worker&url";
import workerEntry46 from "./start-inventory.worker.ts?worker&url";
import workerEntry47 from "./start-python.worker.ts?worker&url";
import workerEntry48 from "./start.worker.ts?worker&url";
import workerEntry49 from "./surface-inspect.worker.ts?worker&url";
import workerEntry50 from "./surface-python.worker.ts?worker&url";
import workerEntry51 from "./surface-save.worker.ts?worker&url";
import workerEntry52 from "./surface.worker.ts?worker&url";
import workerEntry53 from "./techdraw-inspect.worker.ts?worker&url";
import workerEntry54 from "./techdraw-native.worker.ts?worker&url";
import workerEntry55 from "./techdraw-python.worker.ts?worker&url";
import workerEntry56 from "./techdraw-save.worker.ts?worker&url";
import workerEntry57 from "./techdraw.worker.ts?worker&url";
import workerEntry58 from "./templatepymod-python.worker.ts?worker&url";
import workerEntry59 from "./templatepymod.worker.ts?worker&url";
import workerEntry60 from "./test.worker.ts?worker&url";
import workerEntry61 from "./tux.worker.ts?worker&url";
import workerEntry62 from "./web-dock-overlay.worker.ts?worker&url";
import workerEntry63 from "./web-persistence.worker.ts?worker&url";
import workerEntry64 from "./web.worker.ts?worker&url";
export const WEB_MODULE_REGISTRY_SCHEMA = "freecad-web-module-registry/v1" as const;
export interface WebModuleRoute {
readonly module: string;
readonly workers: readonly string[];
readonly primaryWorker: string | null;
readonly commands: readonly string[];
readonly objectTypeCount: number;
readonly pythonApiCount: number;
readonly guiDependency: boolean;
readonly formatExtensions: readonly string[];
}
export const WEB_MODULE_REGISTRY = [
{ module: "Assembly", workers: ["assembly.worker.ts"], primaryWorker: "assembly.worker.ts", commands: ["assembly.createRecompute", "assembly.inspectPythonApi", "assembly.inspectSourceInventory", "assembly.nativeTypeProbe", "assembly.pythonFamily", "assembly.saveReopen", "assembly.testCore"], objectTypeCount: 8, pythonApiCount: 552, guiDependency: true, formatExtensions: [".fcstd"] },
{ module: "BIM", workers: ["bim.worker.ts"], primaryWorker: "bim.worker.ts", commands: ["bim.create2DViews", "bim.createAxis", "bim.document", "bim.extrusionData", "bim.inspectPythonApi", "bim.inspectSourceInventory", "bim.nativeProbe", "bim.pythonFamily", "bim.pythonFamilyBatch", "bim.testArchAxis", "bim.testArchBatch", "bim.testArchBuildingPart", "bim.testArchBuildingPartGui", "bim.testArchComponent", "bim.testArchCurtainWall", "bim.testArchEquipment", "bim.testArchFence", "bim.testArchFrame", "bim.testArchGrid", "bim.testArchImporters", "bim.testArchMaterial", "bim.testArchPanel", "bim.testArchPipe", "bim.testArchProfile", "bim.testArchProject", "bim.testArchRebar", "bim.testArchReference", "bim.testArchReport", "bim.testArchReportGui", "bim.testArchSiteGui", "bim.testArchWallGui", "bim.testWebGLExportGui"], objectTypeCount: 0, pythonApiCount: 2366, guiDependency: false, formatExtensions: [".brp", ".dae", ".dxf", ".fcstd", ".ifc", ".json", ".obj", ".stp", ".svg"] },
{ module: "CAM", workers: ["cam.worker.ts"], primaryWorker: "cam.worker.ts", commands: ["cam.createRecompute", "cam.export", "cam.import", "cam.inspectPythonApi", "cam.inspectSourceInventory", "cam.pythonFamilyBatch", "cam.saveReopen", "cam.testCentroidLegacyPost", "cam.testCentroidPost", "cam.testDressupPost", "cam.testDrillCycleExpander", "cam.testFanucPost", "cam.testGcodeProcessingUtils", "cam.testGenericPlasma", "cam.testGenericPost", "cam.testGrblLegacyPost", "cam.testGrblPost", "cam.testLinkingGenerator", "cam.testLinuxCNCLegacyPost", "cam.testLinuxCNCPost", "cam.testMach3Mach4LegacyPost", "cam.testMach3Mach4Post", "cam.testMachine", "cam.testMassoG3Post", "cam.testMaterial", "cam.testPathAdaptive", "cam.testPathCommandAnnotations", "cam.testPathCore", "cam.testPathDepthParams", "cam.testPathDressupArray", "cam.testPathDressupDogboneII", "cam.testPathDressupHoldingTags", "cam.testPathDrillGenerator", "cam.testPathDrillable", "cam.testPathFacingGenerator", "cam.testPathGeneratorDogboneII", "cam.testPathGeom", "cam.testPathHelix", "cam.testPathHelixGenerator", "cam.testPathHelpers", "cam.testPathLanguage", "cam.testPathLog", "cam.testPathOpDeburr", "cam.testPathOpUtil", "cam.testPathPreferences", "cam.testPathProfile", "cam.testPathPropertyBag", "cam.testPathRotationGenerator", "cam.testPathSetupSheet", "cam.testPathSpiralGenerator", "cam.testPathStock", "cam.testPathTapGenerator", "cam.testPathThreadMilling", "cam.testPathThreadMillingGenerator", "cam.testPathToolAsset", "cam.testPathToolAssetCache", "cam.testPathToolAssetManager", "cam.testPathToolAssetStore", "cam.testPathToolAssetUri", "cam.testPathToolBit", "cam.testPathToolBitSerializer", "cam.testPathToolChangeGenerator", "cam.testPathToolController", "cam.testPathToolLibrary", "cam.testPathToolLibrarySerializer", "cam.testPathToolShapeClasses", "cam.testPathToolShapeDoc", "cam.testPathUtil", "cam.testPathVcarve", "cam.testPathVoronoi", "cam.testPostCore", "cam.testPostGCodes", "cam.testPostMCodes", "cam.testSanity", "cam.testSnapmakerPost", "cam.testTSPSolver", "cam.testTestPost"], objectTypeCount: 12, pythonApiCount: 2883, guiDependency: true, formatExtensions: [".fcstd", ".json", ".obj", ".step", ".svg"] },
{ module: "Cloud", workers: ["cloud.worker.ts"], primaryWorker: "cloud.worker.ts", commands: ["cloud.configureRecompute", "cloud.inspectPythonApi", "cloud.inspectSourceInventory", "cloud.pythonFamilyBatch", "cloud.restore", "cloud.save", "cloud.saveReopen"], objectTypeCount: 0, pythonApiCount: 3, guiDependency: true, formatExtensions: [] },
{ module: "Draft", workers: ["draft.worker.ts"], primaryWorker: "draft.worker.ts", commands: ["draft.action", "draft.formatBatch", "draft.pythonFamilyBatch", "draft.testOfficialSuite"], objectTypeCount: 0, pythonApiCount: 2043, guiDependency: false, formatExtensions: [".dxf", ".obj", ".svg"] },
{ module: "Fem", workers: ["fem.worker.ts"], primaryWorker: "fem.worker.ts", commands: ["fem.action", "fem.brep", "fem.document", "fem.nativeProbe", "fem.pythonFamilyBatch"], objectTypeCount: 53, pythonApiCount: 1305, guiDependency: true, formatExtensions: [".brep", ".json", ".obj", ".svg", ".txt"] },
{ module: "Help", workers: ["help.worker.ts"], primaryWorker: "help.worker.ts", commands: ["help.inspectSourceInventory", "help.pythonApi"], objectTypeCount: 0, pythonApiCount: 14, guiDependency: false, formatExtensions: [] },
{ module: "Import", workers: ["import.worker.ts"], primaryWorker: "import.worker.ts", commands: ["import.createRecompute", "import.inspectSourceInventory", "import.pythonApi", "import.pythonFamilyBatch", "import.saveReopen", "import.step"], objectTypeCount: 2, pythonApiCount: 1135, guiDependency: true, formatExtensions: [".ifc", ".igs", ".obj", ".step", ".stp"] },
{ module: "Inspection", workers: ["inspection.worker.ts"], primaryWorker: "inspection.worker.ts", commands: ["inspection.createRecompute", "inspection.inspectPythonApi", "inspection.inspectSourceInventory", "inspection.pythonFamilyBatch", "inspection.saveReopen"], objectTypeCount: 3, pythonApiCount: 3, guiDependency: true, formatExtensions: [] },
{ module: "JtReader", workers: ["jtreader.worker.ts"], primaryWorker: "jtreader.worker.ts", commands: ["jtreader.createRecompute", "jtreader.document", "jtreader.inspectSourceInventory", "jtreader.saveReopen"], objectTypeCount: 1, pythonApiCount: 0, guiDependency: false, formatExtensions: [".fcstd", ".jt"] },
{ module: "Material", workers: ["material-python.worker.ts", "material.worker.ts"], primaryWorker: "material-python.worker.ts", commands: ["material.createRecompute", "material.inspectSourceInventory", "material.pythonApi", "material.pythonFamilyBatch", "material.saveReopen"], objectTypeCount: 22, pythonApiCount: 178, guiDependency: true, formatExtensions: [] },
{ module: "Measure", workers: ["measure.worker.ts"], primaryWorker: "measure.worker.ts", commands: ["measure.createRecompute", "measure.inspectSourceInventory", "measure.measurementApi", "measure.objectFamily", "measure.pythonApi", "measure.pythonFamilyBatch", "measure.saveReopen"], objectTypeCount: 11, pythonApiCount: 31, guiDependency: true, formatExtensions: [] },
{ module: "Mesh", workers: ["mesh.worker.ts"], primaryWorker: "mesh.worker.ts", commands: ["mesh.createRecompute", "mesh.importExport", "mesh.inspectSourceInventory", "mesh.pythonApi", "mesh.pythonFamilyBatch", "mesh.saveReopen"], objectTypeCount: 31, pythonApiCount: 211, guiDependency: true, formatExtensions: [".3mf", ".amf", ".ast", ".obj", ".off", ".ply", ".stl"] },
{ module: "MeshPart", workers: ["meshpart.worker.ts"], primaryWorker: "meshpart.worker.ts", commands: ["meshpart.createRecompute", "meshpart.inspectSourceInventory", "meshpart.pythonApi", "meshpart.pythonFamilyBatch"], objectTypeCount: 0, pythonApiCount: 13, guiDependency: true, formatExtensions: [] },
{ module: "Part", workers: ["part-save.worker.ts", "part.worker.ts"], primaryWorker: "part.worker.ts", commands: ["part.createRecompute", "part.document", "part.documentViewCommand", "part.importExport", "part.inspectSourceInventory", "part.pythonApi", "part.pythonFamilyBatch", "part.pythonMethod", "part.saveReopen", "part.viewCommand"], objectTypeCount: 116, pythonApiCount: 1191, guiDependency: true, formatExtensions: [".brep", ".brp", ".fcstd", ".iges", ".igs", ".obj", ".step", ".stp", ".svg"] },
{ module: "PartDesign", workers: ["partdesign-inspect.worker.ts", "partdesign-python.worker.ts", "partdesign-save.worker.ts", "partdesign.worker.ts"], primaryWorker: "partdesign.worker.ts", commands: ["PartDesign_AdditiveHelix", "PartDesign_AdditiveLoft", "PartDesign_AdditivePipe", "PartDesign_Body", "PartDesign_Boolean", "PartDesign_Chamfer", "PartDesign_Clone", "PartDesign_CompDatums", "PartDesign_CompPrimitiveAdditive", "PartDesign_CompPrimitiveSubtractive", "PartDesign_CompSketches", "PartDesign_CoordinateSystem", "PartDesign_Draft", "PartDesign_DuplicateSelection", "PartDesign_Fillet", "PartDesign_Groove", "PartDesign_Hole", "PartDesign_InvoluteGear", "PartDesign_Line", "PartDesign_LinearPattern", "PartDesign_Migrate", "PartDesign_Mirrored", "PartDesign_MoveFeature", "PartDesign_MoveFeatureInTree", "PartDesign_MoveTip", "PartDesign_MultiTransform", "PartDesign_NewSketch", "PartDesign_Pad", "PartDesign_Plane", "PartDesign_Pocket", "PartDesign_Point", "PartDesign_PolarPattern", "PartDesign_Revolution", "PartDesign_Scaled", "PartDesign_ShapeBinder", "PartDesign_Sprocket", "PartDesign_SubShapeBinder", "PartDesign_SubtractiveHelix", "PartDesign_SubtractiveLoft", "PartDesign_SubtractivePipe", "PartDesign_Thickness", "Sketcher_EditSketch", "Sketcher_MapSketch", "partdesign.createRecompute", "partdesign.document", "partdesign.geometryFamily", "partdesign.inspectSourceInventory", "partdesign.pythonApi", "partdesign.pythonFamilyBatch", "partdesign.saveReopen"], objectTypeCount: 65, pythonApiCount: 238, guiDependency: true, formatExtensions: [] },
{ module: "Plot", workers: ["plot-python.worker.ts"], primaryWorker: "plot-python.worker.ts", commands: ["plot.pythonApi", "plot.pythonFamilyBatch"], objectTypeCount: 0, pythonApiCount: 28, guiDependency: false, formatExtensions: [] },
{ module: "Points", workers: ["points-persistence.worker.ts", "points.worker.ts"], primaryWorker: "points.worker.ts", commands: ["points.createRecompute", "points.desktopBatch", "points.document", "points.inspectSource", "points.pythonApi", "points.pythonFamilyBatch", "points.saveReopen"], objectTypeCount: 8, pythonApiCount: 12, guiDependency: true, formatExtensions: [".obj", ".ply"] },
{ module: "ReverseEngineering", workers: ["reverseengineering-create.worker.ts", "reverseengineering-inspect.worker.ts", "reverseengineering-python.worker.ts", "reverseengineering-save.worker.ts"], primaryWorker: "reverseengineering-create.worker.ts", commands: ["reverseengineering.createRecompute", "reverseengineering.inspectSourceInventory", "reverseengineering.pythonApi", "reverseengineering.pythonFamilyBatch", "reverseengineering.saveReopen"], objectTypeCount: 0, pythonApiCount: 3, guiDependency: true, formatExtensions: [] },
{ module: "Robot", workers: ["robot-create.worker.ts", "robot-inspect.worker.ts", "robot-python.worker.ts", "robot-save.worker.ts"], primaryWorker: "robot-create.worker.ts", commands: ["robot.createRecompute", "robot.inspectSourceInventory", "robot.pythonApi", "robot.pythonFamilyBatch", "robot.saveReopen"], objectTypeCount: 6, pythonApiCount: 16, guiDependency: true, formatExtensions: [] },
{ module: "Sandbox", workers: ["sandbox-inspect.worker.ts", "sandbox-python.worker.ts", "sandbox-save.worker.ts", "sandbox.worker.ts"], primaryWorker: "sandbox-inspect.worker.ts", commands: ["sandbox.createRecompute", "sandbox.inspectSourceInventory", "sandbox.pythonApi", "sandbox.pythonFamilyBatch", "sandbox.saveReopen"], objectTypeCount: 2, pythonApiCount: 30, guiDependency: true, formatExtensions: [".ast", ".obj", ".stl"] },
{ module: "Show", workers: ["show-inspect.worker.ts", "show-python.worker.ts"], primaryWorker: "show-inspect.worker.ts", commands: ["show.clipping", "show.documentLifecycle", "show.inspectSourceInventory", "show.pythonApi", "show.pythonFamilyBatch", "show.visibility"], objectTypeCount: 0, pythonApiCount: 104, guiDependency: false, formatExtensions: [] },
{ module: "Sketcher", workers: ["sketcher-inspect.worker.ts", "sketcher-persistence.worker.ts", "sketcher-python.worker.ts", "sketcher.worker.ts"], primaryWorker: "sketcher.worker.ts", commands: ["sketcher.createRecompute", "sketcher.inspectSourceInventory", "sketcher.pythonApi", "sketcher.pythonFamilyBatch", "sketcher.pythonMethod", "sketcher.saveReopen"], objectTypeCount: 10, pythonApiCount: 141, guiDependency: true, formatExtensions: [] },
{ module: "Spreadsheet", workers: ["spreadsheet-inspect.worker.ts", "spreadsheet-python.worker.ts", "spreadsheet-save.worker.ts", "spreadsheet.worker.ts"], primaryWorker: "spreadsheet-inspect.worker.ts", commands: ["spreadsheet.createRecompute", "spreadsheet.importExportCsv", "spreadsheet.inspectSourceInventory", "spreadsheet.pythonApi", "spreadsheet.pythonFamilyBatch", "spreadsheet.saveReopen"], objectTypeCount: 5, pythonApiCount: 63, guiDependency: true, formatExtensions: [".csv"] },
{ module: "Start", workers: ["start-inventory.worker.ts", "start-python.worker.ts", "start.worker.ts"], primaryWorker: "start-inventory.worker.ts", commands: ["Start:desktop:Start_Start", "start.importSvg", "start.inspectSourceInventory", "start.moduleImport", "start.pythonApi"], objectTypeCount: 0, pythonApiCount: 2, guiDependency: true, formatExtensions: [".fcstd", ".svg"] },
{ module: "Surface", workers: ["surface-inspect.worker.ts", "surface-python.worker.ts", "surface-save.worker.ts", "surface.worker.ts"], primaryWorker: "surface-inspect.worker.ts", commands: ["surface.createRecompute", "surface.desktopCommand", "surface.inspectSourceInventory", "surface.objectContractBatch", "surface.pythonApi", "surface.pythonFamilyBatch", "surface.saveReopen"], objectTypeCount: 7, pythonApiCount: 10, guiDependency: true, formatExtensions: [] },
{ module: "TechDraw", workers: ["techdraw-inspect.worker.ts", "techdraw-native.worker.ts", "techdraw-python.worker.ts", "techdraw-save.worker.ts", "techdraw.worker.ts"], primaryWorker: "techdraw-native.worker.ts", commands: ["techdraw.createRecompute", "techdraw.desktopCommand", "techdraw.nativeImportExport", "techdraw.nativeInventory", "techdraw.nativeSaveReopen", "techdraw.pythonApi", "techdraw.pythonFamilyBatch", "techdraw.pythonMethod"], objectTypeCount: 41, pythonApiCount: 247, guiDependency: true, formatExtensions: [".dxf", ".svg"] },
{ module: "TemplatePyMod", workers: ["templatepymod-python.worker.ts", "templatepymod.worker.ts"], primaryWorker: "templatepymod-python.worker.ts", commands: ["templatepymod.inspectSourceInventory", "templatepymod.pythonApi", "templatepymod.pythonFamilyBatch"], objectTypeCount: 0, pythonApiCount: 244, guiDependency: false, formatExtensions: [] },
{ module: "Test", workers: ["test.worker.ts"], primaryWorker: "test.worker.ts", commands: ["test.inspectRegistry"], objectTypeCount: 0, pythonApiCount: 0, guiDependency: true, formatExtensions: [".fcstd", ".obj"] },
{ module: "Tux", workers: ["tux.worker.ts"], primaryWorker: "tux.worker.ts", commands: ["tux.navigationBoundary"], objectTypeCount: 0, pythonApiCount: 25, guiDependency: false, formatExtensions: [] },
{ module: "Web", workers: ["stateful-family.worker.ts", "web-dock-overlay.worker.ts", "web-persistence.worker.ts", "web.worker.ts"], primaryWorker: "stateful-family.worker.ts", commands: ["web.dockOverlay", "web.saveReopenBoundary", "web.serverContract", "web.statefulFamilyBatch"], objectTypeCount: 0, pythonApiCount: 0, guiDependency: false, formatExtensions: [] },
] as const satisfies readonly WebModuleRoute[];
const ROUTES: ReadonlyMap<string, WebModuleRoute> = new Map<string, WebModuleRoute>(WEB_MODULE_REGISTRY.map((route) => [route.module, route]));
export function getWebModuleRoute(module: string): WebModuleRoute | undefined {
return ROUTES.get(module);
}
export function listWebModuleCommands(module?: string): string[] {
if (module) return [...(ROUTES.get(module)?.commands ?? [])];
return WEB_MODULE_REGISTRY.flatMap((route) => route.commands);
}
export function createWebModuleWorker(module: string, workerFile?: string, artifact?: WebModuleArtifact): Worker | undefined {
const route = ROUTES.get(module);
const selectedWorker = workerFile ?? route?.primaryWorker;
if (!route || !selectedWorker) return undefined;
const entryUrl = (() => { switch (`${module}:${selectedWorker}`) {
case "Assembly:assembly.worker.ts": return new URL(workerEntry0, import.meta.url);
case "BIM:bim.worker.ts": return new URL(workerEntry1, import.meta.url);
case "CAM:cam.worker.ts": return new URL(workerEntry2, import.meta.url);
case "Cloud:cloud.worker.ts": return new URL(workerEntry3, import.meta.url);
case "Draft:draft.worker.ts": return new URL(workerEntry4, import.meta.url);
case "Fem:fem.worker.ts": return new URL(workerEntry5, import.meta.url);
case "Help:help.worker.ts": return new URL(workerEntry6, import.meta.url);
case "Import:import.worker.ts": return new URL(workerEntry7, import.meta.url);
case "Inspection:inspection.worker.ts": return new URL(workerEntry8, import.meta.url);
case "JtReader:jtreader.worker.ts": return new URL(workerEntry9, import.meta.url);
case "Material:material-python.worker.ts": return new URL(workerEntry10, import.meta.url);
case "Material:material.worker.ts": return new URL(workerEntry11, import.meta.url);
case "Measure:measure.worker.ts": return new URL(workerEntry12, import.meta.url);
case "Mesh:mesh.worker.ts": return new URL(workerEntry13, import.meta.url);
case "MeshPart:meshpart.worker.ts": return new URL(workerEntry14, import.meta.url);
case "Part:part-save.worker.ts": return new URL(workerEntry15, import.meta.url);
case "Part:part.worker.ts": return new URL(workerEntry16, import.meta.url);
case "PartDesign:partdesign-inspect.worker.ts": return new URL(workerEntry17, import.meta.url);
case "PartDesign:partdesign-python.worker.ts": return new URL(workerEntry18, import.meta.url);
case "PartDesign:partdesign-save.worker.ts": return new URL(workerEntry19, import.meta.url);
case "PartDesign:partdesign.worker.ts": return new URL(workerEntry20, import.meta.url);
case "Plot:plot-python.worker.ts": return new URL(workerEntry21, import.meta.url);
case "Points:points-persistence.worker.ts": return new URL(workerEntry22, import.meta.url);
case "Points:points.worker.ts": return new URL(workerEntry23, import.meta.url);
case "ReverseEngineering:reverseengineering-create.worker.ts": return new URL(workerEntry24, import.meta.url);
case "ReverseEngineering:reverseengineering-inspect.worker.ts": return new URL(workerEntry25, import.meta.url);
case "ReverseEngineering:reverseengineering-python.worker.ts": return new URL(workerEntry26, import.meta.url);
case "ReverseEngineering:reverseengineering-save.worker.ts": return new URL(workerEntry27, import.meta.url);
case "Robot:robot-create.worker.ts": return new URL(workerEntry28, import.meta.url);
case "Robot:robot-inspect.worker.ts": return new URL(workerEntry29, import.meta.url);
case "Robot:robot-python.worker.ts": return new URL(workerEntry30, import.meta.url);
case "Robot:robot-save.worker.ts": return new URL(workerEntry31, import.meta.url);
case "Sandbox:sandbox-inspect.worker.ts": return new URL(workerEntry32, import.meta.url);
case "Sandbox:sandbox-python.worker.ts": return new URL(workerEntry33, import.meta.url);
case "Sandbox:sandbox-save.worker.ts": return new URL(workerEntry34, import.meta.url);
case "Sandbox:sandbox.worker.ts": return new URL(workerEntry35, import.meta.url);
case "Show:show-inspect.worker.ts": return new URL(workerEntry36, import.meta.url);
case "Show:show-python.worker.ts": return new URL(workerEntry37, import.meta.url);
case "Sketcher:sketcher-inspect.worker.ts": return new URL(workerEntry38, import.meta.url);
case "Sketcher:sketcher-persistence.worker.ts": return new URL(workerEntry39, import.meta.url);
case "Sketcher:sketcher-python.worker.ts": return new URL(workerEntry40, import.meta.url);
case "Sketcher:sketcher.worker.ts": return new URL(workerEntry41, import.meta.url);
case "Spreadsheet:spreadsheet-inspect.worker.ts": return new URL(workerEntry42, import.meta.url);
case "Spreadsheet:spreadsheet-python.worker.ts": return new URL(workerEntry43, import.meta.url);
case "Spreadsheet:spreadsheet-save.worker.ts": return new URL(workerEntry44, import.meta.url);
case "Spreadsheet:spreadsheet.worker.ts": return new URL(workerEntry45, import.meta.url);
case "Start:start-inventory.worker.ts": return new URL(workerEntry46, import.meta.url);
case "Start:start-python.worker.ts": return new URL(workerEntry47, import.meta.url);
case "Start:start.worker.ts": return new URL(workerEntry48, import.meta.url);
case "Surface:surface-inspect.worker.ts": return new URL(workerEntry49, import.meta.url);
case "Surface:surface-python.worker.ts": return new URL(workerEntry50, import.meta.url);
case "Surface:surface-save.worker.ts": return new URL(workerEntry51, import.meta.url);
case "Surface:surface.worker.ts": return new URL(workerEntry52, import.meta.url);
case "TechDraw:techdraw-inspect.worker.ts": return new URL(workerEntry53, import.meta.url);
case "TechDraw:techdraw-native.worker.ts": return new URL(workerEntry54, import.meta.url);
case "TechDraw:techdraw-python.worker.ts": return new URL(workerEntry55, import.meta.url);
case "TechDraw:techdraw-save.worker.ts": return new URL(workerEntry56, import.meta.url);
case "TechDraw:techdraw.worker.ts": return new URL(workerEntry57, import.meta.url);
case "TemplatePyMod:templatepymod-python.worker.ts": return new URL(workerEntry58, import.meta.url);
case "TemplatePyMod:templatepymod.worker.ts": return new URL(workerEntry59, import.meta.url);
case "Test:test.worker.ts": return new URL(workerEntry60, import.meta.url);
case "Tux:tux.worker.ts": return new URL(workerEntry61, import.meta.url);
case "Web:web-dock-overlay.worker.ts": return new URL(workerEntry62, import.meta.url);
case "Web:web-persistence.worker.ts": return new URL(workerEntry63, import.meta.url);
case "Web:web.worker.ts": return new URL(workerEntry64, import.meta.url);
default: return undefined;
} })();
return entryUrl ? createDynamicModuleWorker(entryUrl, artifactForWorker(artifact, selectedWorker)) : undefined;
}
export function getWebModuleWorkerForCommand(module: string, command: string): string | undefined {
const route = ROUTES.get(module);
if (!route) return undefined;
switch (`${module}:${command}`) {
case "Assembly:assembly.nativeTypeProbe": return "assembly.worker.ts";
case "Assembly:assembly.saveReopen": return "assembly.worker.ts";
case "BIM:bim.createAxis": return "bim.worker.ts";
case "BIM:bim.extrusionData": return "bim.worker.ts";
case "CAM:cam.pythonFamilyBatch": return "cam.worker.ts";
case "CAM:cam.saveReopen": return "cam.worker.ts";
case "Cloud:cloud.pythonFamilyBatch": return "cloud.worker.ts";
case "Cloud:cloud.saveReopen": return "cloud.worker.ts";
case "Draft:draft.pythonFamilyBatch": return "draft.worker.ts";
case "Fem:fem.pythonFamilyBatch": return "fem.worker.ts";
case "Import:import.pythonFamilyBatch": return "import.worker.ts";
case "Import:import.saveReopen": return "import.worker.ts";
case "Inspection:inspection.pythonFamilyBatch": return "inspection.worker.ts";
case "Inspection:inspection.saveReopen": return "inspection.worker.ts";
case "JtReader:jtreader.saveReopen": return "jtreader.worker.ts";
case "Material:material.pythonApi": return "material.worker.ts";
case "Material:material.pythonFamilyBatch": return "material.worker.ts";
case "Material:material.saveReopen": return "material.worker.ts";
case "Measure:measure.pythonFamilyBatch": return "measure.worker.ts";
case "Measure:measure.saveReopen": return "measure.worker.ts";
case "Mesh:mesh.pythonFamilyBatch": return "mesh.worker.ts";
case "Mesh:mesh.saveReopen": return "mesh.worker.ts";
case "MeshPart:meshpart.pythonFamilyBatch": return "meshpart.worker.ts";
case "Part:part.document": return "part-save.worker.ts";
case "Part:part.documentViewCommand": return "part-save.worker.ts";
case "Part:part.saveReopen": return "part-save.worker.ts";
case "Part:part.viewCommand": return "part.worker.ts";
case "PartDesign:PartDesign_AdditiveHelix": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_AdditiveLoft": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_AdditivePipe": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Body": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Boolean": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Chamfer": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Clone": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_CompDatums": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_CompPrimitiveAdditive": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_CompPrimitiveSubtractive": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_CompSketches": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_CoordinateSystem": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Draft": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_DuplicateSelection": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Fillet": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Groove": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Hole": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_InvoluteGear": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Line": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_LinearPattern": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Migrate": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Mirrored": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_MoveFeature": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_MoveFeatureInTree": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_MoveTip": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_MultiTransform": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_NewSketch": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Pad": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Plane": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Pocket": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Point": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_PolarPattern": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Revolution": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Scaled": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_ShapeBinder": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Sprocket": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_SubShapeBinder": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_SubtractiveHelix": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_SubtractiveLoft": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_SubtractivePipe": return "partdesign-python.worker.ts";
case "PartDesign:PartDesign_Thickness": return "partdesign-python.worker.ts";
case "PartDesign:Sketcher_EditSketch": return "partdesign-python.worker.ts";
case "PartDesign:Sketcher_MapSketch": return "partdesign-python.worker.ts";
case "PartDesign:partdesign.geometryFamily": return "partdesign.worker.ts";
case "PartDesign:partdesign.inspectSourceInventory": return "partdesign-inspect.worker.ts";
case "PartDesign:partdesign.pythonApi": return "partdesign-python.worker.ts";
case "PartDesign:partdesign.pythonFamilyBatch": return "partdesign-python.worker.ts";
case "PartDesign:partdesign.saveReopen": return "partdesign.worker.ts";
case "Plot:plot.pythonApi": return "plot-python.worker.ts";
case "Points:points.createRecompute": return "points.worker.ts";
case "Points:points.desktopBatch": return "points.worker.ts";
case "Points:points.document": return "points.worker.ts";
case "Points:points.inspectSource": return "points.worker.ts";
case "Points:points.pythonApi": return "points.worker.ts";
case "Points:points.saveReopen": return "points.worker.ts";
case "ReverseEngineering:reverseengineering.createRecompute": return "reverseengineering-create.worker.ts";
case "ReverseEngineering:reverseengineering.inspectSourceInventory": return "reverseengineering-inspect.worker.ts";
case "ReverseEngineering:reverseengineering.pythonApi": return "reverseengineering-python.worker.ts";
case "ReverseEngineering:reverseengineering.pythonFamilyBatch": return "reverseengineering-python.worker.ts";
case "ReverseEngineering:reverseengineering.saveReopen": return "reverseengineering-save.worker.ts";
case "Robot:robot.createRecompute": return "robot-create.worker.ts";
case "Robot:robot.inspectSourceInventory": return "robot-inspect.worker.ts";
case "Robot:robot.pythonApi": return "robot-python.worker.ts";
case "Robot:robot.saveReopen": return "robot-save.worker.ts";
case "Sandbox:sandbox.createRecompute": return "sandbox.worker.ts";
case "Sandbox:sandbox.inspectSourceInventory": return "sandbox-inspect.worker.ts";
case "Sandbox:sandbox.pythonApi": return "sandbox-python.worker.ts";
case "Sandbox:sandbox.pythonFamilyBatch": return "sandbox-python.worker.ts";
case "Sandbox:sandbox.saveReopen": return "sandbox.worker.ts";
case "Show:show.clipping": return "show-python.worker.ts";
case "Show:show.documentLifecycle": return "show-python.worker.ts";
case "Show:show.inspectSourceInventory": return "show-inspect.worker.ts";
case "Show:show.pythonApi": return "show-python.worker.ts";
case "Show:show.pythonFamilyBatch": return "show-python.worker.ts";
case "Show:show.visibility": return "show-python.worker.ts";
case "Sketcher:sketcher.inspectSourceInventory": return "sketcher-inspect.worker.ts";
case "Sketcher:sketcher.pythonApi": return "sketcher-python.worker.ts";
case "Sketcher:sketcher.pythonFamilyBatch": return "sketcher-python.worker.ts";
case "Sketcher:sketcher.pythonMethod": return "sketcher-python.worker.ts";
case "Sketcher:sketcher.saveReopen": return "sketcher-python.worker.ts";
case "Spreadsheet:spreadsheet.createRecompute": return "spreadsheet.worker.ts";
case "Spreadsheet:spreadsheet.inspectSourceInventory": return "spreadsheet-inspect.worker.ts";
case "Spreadsheet:spreadsheet.pythonApi": return "spreadsheet-python.worker.ts";
case "Spreadsheet:spreadsheet.pythonFamilyBatch": return "spreadsheet-python.worker.ts";
case "Spreadsheet:spreadsheet.saveReopen": return "spreadsheet-save.worker.ts";
case "Start:Start:desktop:Start_Start": return "start.worker.ts";
case "Start:start.importSvg": return "start.worker.ts";
case "Start:start.inspectSourceInventory": return "start-inventory.worker.ts";
case "Start:start.moduleImport": return "start.worker.ts";
case "Start:start.pythonApi": return "start-python.worker.ts";
case "Surface:surface.createRecompute": return "surface.worker.ts";
case "Surface:surface.inspectSourceInventory": return "surface-inspect.worker.ts";
case "Surface:surface.pythonApi": return "surface-python.worker.ts";
case "Surface:surface.pythonFamilyBatch": return "surface-python.worker.ts";
case "Surface:surface.saveReopen": return "surface-save.worker.ts";
case "TechDraw:techdraw.createRecompute": return "techdraw-python.worker.ts";
case "TechDraw:techdraw.desktopCommand": return "techdraw-python.worker.ts";
case "TechDraw:techdraw.nativeInventory": return "techdraw-inspect.worker.ts";
case "TechDraw:techdraw.nativeSaveReopen": return "techdraw-python.worker.ts";
case "TechDraw:techdraw.pythonApi": return "techdraw-python.worker.ts";
case "TechDraw:techdraw.pythonFamilyBatch": return "techdraw-python.worker.ts";
case "TechDraw:techdraw.pythonMethod": return "techdraw-python.worker.ts";
case "TemplatePyMod:templatepymod.pythonApi": return "templatepymod-python.worker.ts";
case "Web:web.dockOverlay": return "web-dock-overlay.worker.ts";
case "Web:web.saveReopenBoundary": return "web-persistence.worker.ts";
case "Web:web.statefulFamilyBatch": return "stateful-family.worker.ts";
default: return route.primaryWorker ?? undefined;
}
}