@noego/wood 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -0
- package/bin/axe.js +202 -0
- package/bin/stick.js +96 -0
- package/bin/wood.js +572 -0
- package/dist/bridge/backend_bridge.cjs +186 -0
- package/dist/bridge/backend_bridge.cjs.map +1 -0
- package/dist/bridge/backend_bridge.d.cts +32 -0
- package/dist/bridge/backend_bridge.d.ts +32 -0
- package/dist/bridge/backend_bridge.js +152 -0
- package/dist/bridge/backend_bridge.js.map +1 -0
- package/dist/bridge/backend_entry.cjs +64 -0
- package/dist/bridge/backend_entry.cjs.map +1 -0
- package/dist/bridge/backend_entry.d.cts +14 -0
- package/dist/bridge/backend_entry.d.ts +14 -0
- package/dist/bridge/backend_entry.js +39 -0
- package/dist/bridge/backend_entry.js.map +1 -0
- package/dist/bridge/index.cjs +34 -0
- package/dist/bridge/index.cjs.map +1 -0
- package/dist/bridge/index.d.cts +2 -0
- package/dist/bridge/index.d.ts +2 -0
- package/dist/bridge/index.js +8 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/client/controller_contract.cjs +17 -0
- package/dist/client/controller_contract.cjs.map +1 -0
- package/dist/client/controller_contract.d.cts +15 -0
- package/dist/client/controller_contract.d.ts +15 -0
- package/dist/client/controller_contract.js +1 -0
- package/dist/client/controller_contract.js.map +1 -0
- package/dist/client/global_polyfill.cjs +6 -0
- package/dist/client/global_polyfill.cjs.map +1 -0
- package/dist/client/global_polyfill.d.cts +2 -0
- package/dist/client/global_polyfill.d.ts +2 -0
- package/dist/client/global_polyfill.js +5 -0
- package/dist/client/global_polyfill.js.map +1 -0
- package/dist/client/index.cjs +451 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +75 -0
- package/dist/client/index.d.ts +75 -0
- package/dist/client/index.js +414 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/wood_controller.svelte.cjs +110 -0
- package/dist/client/wood_controller.svelte.cjs.map +1 -0
- package/dist/client/wood_controller.svelte.d.cts +30 -0
- package/dist/client/wood_controller.svelte.d.ts +30 -0
- package/dist/client/wood_controller.svelte.js +86 -0
- package/dist/client/wood_controller.svelte.js.map +1 -0
- package/dist/codegen/controller_registration_generator.cjs +138 -0
- package/dist/codegen/controller_registration_generator.cjs.map +1 -0
- package/dist/codegen/controller_registration_generator.d.cts +18 -0
- package/dist/codegen/controller_registration_generator.d.ts +18 -0
- package/dist/codegen/controller_registration_generator.js +104 -0
- package/dist/codegen/controller_registration_generator.js.map +1 -0
- package/dist/codegen/index.cjs +50 -0
- package/dist/codegen/index.cjs.map +1 -0
- package/dist/codegen/index.d.cts +10 -0
- package/dist/codegen/index.d.ts +10 -0
- package/dist/codegen/index.js +19 -0
- package/dist/codegen/index.js.map +1 -0
- package/dist/codegen/preload_generator.cjs +151 -0
- package/dist/codegen/preload_generator.cjs.map +1 -0
- package/dist/codegen/preload_generator.d.cts +8 -0
- package/dist/codegen/preload_generator.d.ts +8 -0
- package/dist/codegen/preload_generator.js +127 -0
- package/dist/codegen/preload_generator.js.map +1 -0
- package/dist/codegen/renderer_app_generator.cjs +397 -0
- package/dist/codegen/renderer_app_generator.cjs.map +1 -0
- package/dist/codegen/renderer_app_generator.d.cts +13 -0
- package/dist/codegen/renderer_app_generator.d.ts +13 -0
- package/dist/codegen/renderer_app_generator.js +363 -0
- package/dist/codegen/renderer_app_generator.js.map +1 -0
- package/dist/codegen/renderer_controller_registration_generator.cjs +122 -0
- package/dist/codegen/renderer_controller_registration_generator.cjs.map +1 -0
- package/dist/codegen/renderer_controller_registration_generator.d.cts +9 -0
- package/dist/codegen/renderer_controller_registration_generator.d.ts +9 -0
- package/dist/codegen/renderer_controller_registration_generator.js +88 -0
- package/dist/codegen/renderer_controller_registration_generator.js.map +1 -0
- package/dist/codegen/renderer_view_manifest_generator.cjs +126 -0
- package/dist/codegen/renderer_view_manifest_generator.cjs.map +1 -0
- package/dist/codegen/renderer_view_manifest_generator.d.cts +11 -0
- package/dist/codegen/renderer_view_manifest_generator.d.ts +11 -0
- package/dist/codegen/renderer_view_manifest_generator.js +92 -0
- package/dist/codegen/renderer_view_manifest_generator.js.map +1 -0
- package/dist/codegen/runtime_generator.cjs +156 -0
- package/dist/codegen/runtime_generator.cjs.map +1 -0
- package/dist/codegen/runtime_generator.d.cts +14 -0
- package/dist/codegen/runtime_generator.d.ts +14 -0
- package/dist/codegen/runtime_generator.js +122 -0
- package/dist/codegen/runtime_generator.js.map +1 -0
- package/dist/codegen/test_mock_generator.cjs +98 -0
- package/dist/codegen/test_mock_generator.cjs.map +1 -0
- package/dist/codegen/test_mock_generator.d.cts +5 -0
- package/dist/codegen/test_mock_generator.d.ts +5 -0
- package/dist/codegen/test_mock_generator.js +74 -0
- package/dist/codegen/test_mock_generator.js.map +1 -0
- package/dist/codegen/type_generator.cjs +203 -0
- package/dist/codegen/type_generator.cjs.map +1 -0
- package/dist/codegen/type_generator.d.cts +5 -0
- package/dist/codegen/type_generator.d.ts +5 -0
- package/dist/codegen/type_generator.js +179 -0
- package/dist/codegen/type_generator.js.map +1 -0
- package/dist/components/contextMenu.cjs +163 -0
- package/dist/components/contextMenu.cjs.map +1 -0
- package/dist/components/contextMenu.d.cts +43 -0
- package/dist/components/contextMenu.d.ts +43 -0
- package/dist/components/contextMenu.js +138 -0
- package/dist/components/contextMenu.js.map +1 -0
- package/dist/config/config_parser.cjs +176 -0
- package/dist/config/config_parser.cjs.map +1 -0
- package/dist/config/config_parser.d.cts +9 -0
- package/dist/config/config_parser.d.ts +9 -0
- package/dist/config/config_parser.js +142 -0
- package/dist/config/config_parser.js.map +1 -0
- package/dist/config/index.cjs +29 -0
- package/dist/config/index.cjs.map +1 -0
- package/dist/config/index.d.cts +2 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +5 -0
- package/dist/config/index.js.map +1 -0
- package/dist/controller/__fixtures__/controllers/chat.cjs +32 -0
- package/dist/controller/__fixtures__/controllers/chat.cjs.map +1 -0
- package/dist/controller/__fixtures__/controllers/chat.d.cts +11 -0
- package/dist/controller/__fixtures__/controllers/chat.d.ts +11 -0
- package/dist/controller/__fixtures__/controllers/chat.js +12 -0
- package/dist/controller/__fixtures__/controllers/chat.js.map +1 -0
- package/dist/controller/__fixtures__/controllers/not_a_class.cjs +29 -0
- package/dist/controller/__fixtures__/controllers/not_a_class.cjs.map +1 -0
- package/dist/controller/__fixtures__/controllers/not_a_class.d.cts +3 -0
- package/dist/controller/__fixtures__/controllers/not_a_class.d.ts +3 -0
- package/dist/controller/__fixtures__/controllers/not_a_class.js +5 -0
- package/dist/controller/__fixtures__/controllers/not_a_class.js.map +1 -0
- package/dist/controller/__fixtures__/controllers/settings.controller.cjs +32 -0
- package/dist/controller/__fixtures__/controllers/settings.controller.cjs.map +1 -0
- package/dist/controller/__fixtures__/controllers/settings.controller.d.cts +12 -0
- package/dist/controller/__fixtures__/controllers/settings.controller.d.ts +12 -0
- package/dist/controller/__fixtures__/controllers/settings.controller.js +12 -0
- package/dist/controller/__fixtures__/controllers/settings.controller.js.map +1 -0
- package/dist/controller/__fixtures__/controllers/test.cjs +29 -0
- package/dist/controller/__fixtures__/controllers/test.cjs.map +1 -0
- package/dist/controller/__fixtures__/controllers/test.d.cts +7 -0
- package/dist/controller/__fixtures__/controllers/test.d.ts +7 -0
- package/dist/controller/__fixtures__/controllers/test.js +9 -0
- package/dist/controller/__fixtures__/controllers/test.js.map +1 -0
- package/dist/controller/controller_resolver.cjs +180 -0
- package/dist/controller/controller_resolver.cjs.map +1 -0
- package/dist/controller/controller_resolver.d.cts +51 -0
- package/dist/controller/controller_resolver.d.ts +51 -0
- package/dist/controller/controller_resolver.js +145 -0
- package/dist/controller/controller_resolver.js.map +1 -0
- package/dist/controller/index.cjs +31 -0
- package/dist/controller/index.cjs.map +1 -0
- package/dist/controller/index.d.cts +2 -0
- package/dist/controller/index.d.ts +2 -0
- package/dist/controller/index.js +6 -0
- package/dist/controller/index.js.map +1 -0
- package/dist/dev/backend_watcher.cjs +108 -0
- package/dist/dev/backend_watcher.cjs.map +1 -0
- package/dist/dev/backend_watcher.d.cts +22 -0
- package/dist/dev/backend_watcher.d.ts +22 -0
- package/dist/dev/backend_watcher.js +84 -0
- package/dist/dev/backend_watcher.js.map +1 -0
- package/dist/dev/dev_metadata.cjs +94 -0
- package/dist/dev/dev_metadata.cjs.map +1 -0
- package/dist/dev/dev_metadata.d.cts +20 -0
- package/dist/dev/dev_metadata.d.ts +20 -0
- package/dist/dev/dev_metadata.js +52 -0
- package/dist/dev/dev_metadata.js.map +1 -0
- package/dist/dev/esbuild_backend.cjs +124 -0
- package/dist/dev/esbuild_backend.cjs.map +1 -0
- package/dist/dev/esbuild_backend.d.cts +30 -0
- package/dist/dev/esbuild_backend.d.ts +30 -0
- package/dist/dev/esbuild_backend.js +90 -0
- package/dist/dev/esbuild_backend.js.map +1 -0
- package/dist/dev/index.cjs +57 -0
- package/dist/dev/index.cjs.map +1 -0
- package/dist/dev/index.d.cts +8 -0
- package/dist/dev/index.d.ts +8 -0
- package/dist/dev/index.js +31 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/dev/wood_dev_server.cjs +220 -0
- package/dist/dev/wood_dev_server.cjs.map +1 -0
- package/dist/dev/wood_dev_server.d.cts +39 -0
- package/dist/dev/wood_dev_server.d.ts +39 -0
- package/dist/dev/wood_dev_server.js +186 -0
- package/dist/dev/wood_dev_server.js.map +1 -0
- package/dist/dev/yaml_watcher.cjs +142 -0
- package/dist/dev/yaml_watcher.cjs.map +1 -0
- package/dist/dev/yaml_watcher.d.cts +22 -0
- package/dist/dev/yaml_watcher.d.ts +22 -0
- package/dist/dev/yaml_watcher.js +108 -0
- package/dist/dev/yaml_watcher.js.map +1 -0
- package/dist/electron/index.cjs +176 -0
- package/dist/electron/index.cjs.map +1 -0
- package/dist/electron/index.d.cts +29 -0
- package/dist/electron/index.d.ts +29 -0
- package/dist/electron/index.js +140 -0
- package/dist/electron/index.js.map +1 -0
- package/dist/index.cjs +178 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +41 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +122 -0
- package/dist/index.js.map +1 -0
- package/dist/ipc/index.cjs +80 -0
- package/dist/ipc/index.cjs.map +1 -0
- package/dist/ipc/index.d.cts +12 -0
- package/dist/ipc/index.d.ts +12 -0
- package/dist/ipc/index.js +57 -0
- package/dist/ipc/index.js.map +1 -0
- package/dist/ipc/shared.cjs +50 -0
- package/dist/ipc/shared.cjs.map +1 -0
- package/dist/ipc/shared.d.cts +10 -0
- package/dist/ipc/shared.d.ts +10 -0
- package/dist/ipc/shared.js +23 -0
- package/dist/ipc/shared.js.map +1 -0
- package/dist/loader/__fixtures__/layouts/app.load.cjs +27 -0
- package/dist/loader/__fixtures__/layouts/app.load.cjs.map +1 -0
- package/dist/loader/__fixtures__/layouts/app.load.d.cts +5 -0
- package/dist/loader/__fixtures__/layouts/app.load.d.ts +5 -0
- package/dist/loader/__fixtures__/layouts/app.load.js +7 -0
- package/dist/loader/__fixtures__/layouts/app.load.js.map +1 -0
- package/dist/loader/__fixtures__/views/test/page.load.cjs +27 -0
- package/dist/loader/__fixtures__/views/test/page.load.cjs.map +1 -0
- package/dist/loader/__fixtures__/views/test/page.load.d.cts +6 -0
- package/dist/loader/__fixtures__/views/test/page.load.d.ts +6 -0
- package/dist/loader/__fixtures__/views/test/page.load.js +7 -0
- package/dist/loader/__fixtures__/views/test/page.load.js.map +1 -0
- package/dist/loader/index.cjs +29 -0
- package/dist/loader/index.cjs.map +1 -0
- package/dist/loader/index.d.cts +3 -0
- package/dist/loader/index.d.ts +3 -0
- package/dist/loader/index.js +5 -0
- package/dist/loader/index.js.map +1 -0
- package/dist/loader/loader_runner.cjs +109 -0
- package/dist/loader/loader_runner.cjs.map +1 -0
- package/dist/loader/loader_runner.d.cts +27 -0
- package/dist/loader/loader_runner.d.ts +27 -0
- package/dist/loader/loader_runner.js +75 -0
- package/dist/loader/loader_runner.js.map +1 -0
- package/dist/main/index.cjs +500 -0
- package/dist/main/index.cjs.map +1 -0
- package/dist/main/index.d.cts +98 -0
- package/dist/main/index.d.ts +98 -0
- package/dist/main/index.js +475 -0
- package/dist/main/index.js.map +1 -0
- package/dist/middleware/__fixtures__/middleware/auth.cjs +44 -0
- package/dist/middleware/__fixtures__/middleware/auth.cjs.map +1 -0
- package/dist/middleware/__fixtures__/middleware/auth.d.cts +6 -0
- package/dist/middleware/__fixtures__/middleware/auth.d.ts +6 -0
- package/dist/middleware/__fixtures__/middleware/auth.js +19 -0
- package/dist/middleware/__fixtures__/middleware/auth.js.map +1 -0
- package/dist/middleware/__fixtures__/middleware/sequence.cjs +47 -0
- package/dist/middleware/__fixtures__/middleware/sequence.cjs.map +1 -0
- package/dist/middleware/__fixtures__/middleware/sequence.d.cts +7 -0
- package/dist/middleware/__fixtures__/middleware/sequence.d.ts +7 -0
- package/dist/middleware/__fixtures__/middleware/sequence.js +21 -0
- package/dist/middleware/__fixtures__/middleware/sequence.js.map +1 -0
- package/dist/middleware/index.cjs +34 -0
- package/dist/middleware/index.cjs.map +1 -0
- package/dist/middleware/index.d.cts +3 -0
- package/dist/middleware/index.d.ts +3 -0
- package/dist/middleware/index.js +8 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/middleware_pipeline.cjs +55 -0
- package/dist/middleware/middleware_pipeline.cjs.map +1 -0
- package/dist/middleware/middleware_pipeline.d.cts +13 -0
- package/dist/middleware/middleware_pipeline.d.ts +13 -0
- package/dist/middleware/middleware_pipeline.js +30 -0
- package/dist/middleware/middleware_pipeline.js.map +1 -0
- package/dist/middleware/middleware_resolver.cjs +91 -0
- package/dist/middleware/middleware_resolver.cjs.map +1 -0
- package/dist/middleware/middleware_resolver.d.cts +19 -0
- package/dist/middleware/middleware_resolver.d.ts +19 -0
- package/dist/middleware/middleware_resolver.js +57 -0
- package/dist/middleware/middleware_resolver.js.map +1 -0
- package/dist/navigation/index.cjs +205 -0
- package/dist/navigation/index.cjs.map +1 -0
- package/dist/navigation/index.d.cts +34 -0
- package/dist/navigation/index.d.ts +34 -0
- package/dist/navigation/index.js +176 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/parser/index.cjs +36 -0
- package/dist/parser/index.cjs.map +1 -0
- package/dist/parser/index.d.cts +4 -0
- package/dist/parser/index.d.ts +4 -0
- package/dist/parser/index.js +9 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/operations_parser.cjs +94 -0
- package/dist/parser/operations_parser.cjs.map +1 -0
- package/dist/parser/operations_parser.d.cts +7 -0
- package/dist/parser/operations_parser.d.ts +7 -0
- package/dist/parser/operations_parser.js +59 -0
- package/dist/parser/operations_parser.js.map +1 -0
- package/dist/parser/views_parser.cjs +153 -0
- package/dist/parser/views_parser.cjs.map +1 -0
- package/dist/parser/views_parser.d.cts +11 -0
- package/dist/parser/views_parser.d.ts +11 -0
- package/dist/parser/views_parser.js +118 -0
- package/dist/parser/views_parser.js.map +1 -0
- package/dist/router/index.cjs +31 -0
- package/dist/router/index.cjs.map +1 -0
- package/dist/router/index.d.cts +2 -0
- package/dist/router/index.d.ts +2 -0
- package/dist/router/index.js +6 -0
- package/dist/router/index.js.map +1 -0
- package/dist/router/wood_router.cjs +246 -0
- package/dist/router/wood_router.cjs.map +1 -0
- package/dist/router/wood_router.d.cts +70 -0
- package/dist/router/wood_router.d.ts +70 -0
- package/dist/router/wood_router.js +221 -0
- package/dist/router/wood_router.js.map +1 -0
- package/dist/runtime/application_root.cjs +98 -0
- package/dist/runtime/application_root.cjs.map +1 -0
- package/dist/runtime/application_root.d.cts +5 -0
- package/dist/runtime/application_root.d.ts +5 -0
- package/dist/runtime/application_root.js +61 -0
- package/dist/runtime/application_root.js.map +1 -0
- package/dist/runtime/get_container.cjs +96 -0
- package/dist/runtime/get_container.cjs.map +1 -0
- package/dist/runtime/get_container.d.cts +16 -0
- package/dist/runtime/get_container.d.ts +16 -0
- package/dist/runtime/get_container.js +60 -0
- package/dist/runtime/get_container.js.map +1 -0
- package/dist/runtime/index.cjs +49 -0
- package/dist/runtime/index.cjs.map +1 -0
- package/dist/runtime/index.d.cts +8 -0
- package/dist/runtime/index.d.ts +8 -0
- package/dist/runtime/index.js +24 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/renderer_log_dispatcher.cjs +79 -0
- package/dist/runtime/renderer_log_dispatcher.cjs.map +1 -0
- package/dist/runtime/renderer_log_dispatcher.d.cts +27 -0
- package/dist/runtime/renderer_log_dispatcher.d.ts +27 -0
- package/dist/runtime/renderer_log_dispatcher.js +54 -0
- package/dist/runtime/renderer_log_dispatcher.js.map +1 -0
- package/dist/runtime/runtime.cjs +158 -0
- package/dist/runtime/runtime.cjs.map +1 -0
- package/dist/runtime/runtime.d.cts +35 -0
- package/dist/runtime/runtime.d.ts +35 -0
- package/dist/runtime/runtime.js +136 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/dist/stick/allow_cli.cjs +39 -0
- package/dist/stick/allow_cli.cjs.map +1 -0
- package/dist/stick/allow_cli.d.cts +6 -0
- package/dist/stick/allow_cli.d.ts +6 -0
- package/dist/stick/allow_cli.js +15 -0
- package/dist/stick/allow_cli.js.map +1 -0
- package/dist/stick/index.cjs +276 -0
- package/dist/stick/index.cjs.map +1 -0
- package/dist/stick/index.d.cts +111 -0
- package/dist/stick/index.d.ts +111 -0
- package/dist/stick/index.js +237 -0
- package/dist/stick/index.js.map +1 -0
- package/dist/stick/static_renderer.cjs +144 -0
- package/dist/stick/static_renderer.cjs.map +1 -0
- package/dist/stick/static_renderer.d.cts +51 -0
- package/dist/stick/static_renderer.d.ts +51 -0
- package/dist/stick/static_renderer.js +119 -0
- package/dist/stick/static_renderer.js.map +1 -0
- package/dist/stick/template_resolver.cjs +156 -0
- package/dist/stick/template_resolver.cjs.map +1 -0
- package/dist/stick/template_resolver.d.cts +7 -0
- package/dist/stick/template_resolver.d.ts +7 -0
- package/dist/stick/template_resolver.js +122 -0
- package/dist/stick/template_resolver.js.map +1 -0
- package/dist/testing/create_controller_harness.cjs +175 -0
- package/dist/testing/create_controller_harness.cjs.map +1 -0
- package/dist/testing/create_controller_harness.d.cts +37 -0
- package/dist/testing/create_controller_harness.d.ts +37 -0
- package/dist/testing/create_controller_harness.js +162 -0
- package/dist/testing/create_controller_harness.js.map +1 -0
- package/dist/testing/create_router_bridge.cjs +103 -0
- package/dist/testing/create_router_bridge.cjs.map +1 -0
- package/dist/testing/create_router_bridge.d.cts +71 -0
- package/dist/testing/create_router_bridge.d.ts +71 -0
- package/dist/testing/create_router_bridge.js +78 -0
- package/dist/testing/create_router_bridge.js.map +1 -0
- package/dist/testing/create_test_container.cjs +72 -0
- package/dist/testing/create_test_container.cjs.map +1 -0
- package/dist/testing/create_test_container.d.cts +14 -0
- package/dist/testing/create_test_container.d.ts +14 -0
- package/dist/testing/create_test_container.js +48 -0
- package/dist/testing/create_test_container.js.map +1 -0
- package/dist/testing/create_test_router.cjs +57 -0
- package/dist/testing/create_test_router.cjs.map +1 -0
- package/dist/testing/create_test_router.d.cts +19 -0
- package/dist/testing/create_test_router.d.ts +19 -0
- package/dist/testing/create_test_router.js +33 -0
- package/dist/testing/create_test_router.js.map +1 -0
- package/dist/testing/index.cjs +48 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +12 -0
- package/dist/testing/index.d.ts +12 -0
- package/dist/testing/index.js +22 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mock_electron.cjs +100 -0
- package/dist/testing/mock_electron.cjs.map +1 -0
- package/dist/testing/mock_electron.d.cts +12 -0
- package/dist/testing/mock_electron.d.ts +12 -0
- package/dist/testing/mock_electron.js +75 -0
- package/dist/testing/mock_electron.js.map +1 -0
- package/dist/tracing/index.cjs +56 -0
- package/dist/tracing/index.cjs.map +1 -0
- package/dist/tracing/index.d.cts +4 -0
- package/dist/tracing/index.d.ts +4 -0
- package/dist/tracing/index.js +35 -0
- package/dist/tracing/index.js.map +1 -0
- package/dist/tracing/trace_hub.cjs +213 -0
- package/dist/tracing/trace_hub.cjs.map +1 -0
- package/dist/tracing/trace_hub.d.cts +47 -0
- package/dist/tracing/trace_hub.d.ts +47 -0
- package/dist/tracing/trace_hub.js +172 -0
- package/dist/tracing/trace_hub.js.map +1 -0
- package/dist/tracing/trace_provider.cjs +200 -0
- package/dist/tracing/trace_provider.cjs.map +1 -0
- package/dist/tracing/trace_provider.d.cts +69 -0
- package/dist/tracing/trace_provider.d.ts +69 -0
- package/dist/tracing/trace_provider.js +179 -0
- package/dist/tracing/trace_provider.js.map +1 -0
- package/dist/types/bridge.cjs +51 -0
- package/dist/types/bridge.cjs.map +1 -0
- package/dist/types/bridge.d.cts +56 -0
- package/dist/types/bridge.d.ts +56 -0
- package/dist/types/bridge.js +25 -0
- package/dist/types/bridge.js.map +1 -0
- package/dist/types/config.cjs +17 -0
- package/dist/types/config.cjs.map +1 -0
- package/dist/types/config.d.cts +74 -0
- package/dist/types/config.d.ts +74 -0
- package/dist/types/config.js +1 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/context.cjs +17 -0
- package/dist/types/context.cjs.map +1 -0
- package/dist/types/context.d.cts +61 -0
- package/dist/types/context.d.ts +61 -0
- package/dist/types/context.js +1 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/context_menu.cjs +17 -0
- package/dist/types/context_menu.cjs.map +1 -0
- package/dist/types/context_menu.d.cts +30 -0
- package/dist/types/context_menu.d.ts +30 -0
- package/dist/types/context_menu.js +1 -0
- package/dist/types/context_menu.js.map +1 -0
- package/dist/types/index.cjs +33 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +6 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/operations.cjs +17 -0
- package/dist/types/operations.cjs.map +1 -0
- package/dist/types/operations.d.cts +39 -0
- package/dist/types/operations.d.ts +39 -0
- package/dist/types/operations.js +1 -0
- package/dist/types/operations.js.map +1 -0
- package/dist/types/views.cjs +17 -0
- package/dist/types/views.cjs.map +1 -0
- package/dist/types/views.d.cts +44 -0
- package/dist/types/views.d.ts +44 -0
- package/dist/types/views.js +1 -0
- package/dist/types/views.js.map +1 -0
- package/dist/validation/index.cjs +29 -0
- package/dist/validation/index.cjs.map +1 -0
- package/dist/validation/index.d.cts +1 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +5 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/schema_validator.cjs +86 -0
- package/dist/validation/schema_validator.cjs.map +1 -0
- package/dist/validation/schema_validator.d.cts +24 -0
- package/dist/validation/schema_validator.d.ts +24 -0
- package/dist/validation/schema_validator.js +52 -0
- package/dist/validation/schema_validator.js.map +1 -0
- package/dist/window/index.cjs +32 -0
- package/dist/window/index.cjs.map +1 -0
- package/dist/window/index.d.cts +4 -0
- package/dist/window/index.d.ts +4 -0
- package/dist/window/index.js +7 -0
- package/dist/window/index.js.map +1 -0
- package/dist/window/window_manager.cjs +354 -0
- package/dist/window/window_manager.cjs.map +1 -0
- package/dist/window/window_manager.d.cts +172 -0
- package/dist/window/window_manager.d.ts +172 -0
- package/dist/window/window_manager.js +330 -0
- package/dist/window/window_manager.js.map +1 -0
- package/dist/window/window_state_store.cjs +129 -0
- package/dist/window/window_state_store.cjs.map +1 -0
- package/dist/window/window_state_store.d.cts +39 -0
- package/dist/window/window_state_store.d.ts +39 -0
- package/dist/window/window_state_store.js +105 -0
- package/dist/window/window_state_store.js.map +1 -0
- package/loaders/loader.mjs +46 -0
- package/package.json +119 -0
- package/src/components/ContextMenuProvider.svelte +145 -0
- package/src/components/NavigationShell.svelte +204 -0
- package/src/components/WoodRecursiveRender.svelte +91 -0
- package/src/components/contextMenu.ts +228 -0
- package/src/components/index.d.ts +14 -0
- package/src/components/index.js +2 -0
- package/src/stick/WoodRecursiveRender.svelte +74 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var test_mock_generator_exports = {};
|
|
20
|
+
__export(test_mock_generator_exports, {
|
|
21
|
+
generateTestMock: () => generateTestMock
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(test_mock_generator_exports);
|
|
24
|
+
function buildNestedMockTree(operations) {
|
|
25
|
+
const tree = {};
|
|
26
|
+
for (const [channel, op] of operations) {
|
|
27
|
+
const parts = channel.split(".");
|
|
28
|
+
let current = tree;
|
|
29
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
30
|
+
if (!current[parts[i]]) current[parts[i]] = {};
|
|
31
|
+
current = current[parts[i]];
|
|
32
|
+
}
|
|
33
|
+
current[parts[parts.length - 1]] = { __operation: op };
|
|
34
|
+
}
|
|
35
|
+
return tree;
|
|
36
|
+
}
|
|
37
|
+
function generateMockTree(node, indent = " ") {
|
|
38
|
+
const lines = [];
|
|
39
|
+
for (const [key, value] of Object.entries(node)) {
|
|
40
|
+
const entry = value;
|
|
41
|
+
if (entry.__operation) {
|
|
42
|
+
lines.push(`${indent}${key}: vi.fn().mockResolvedValue({}),`);
|
|
43
|
+
} else {
|
|
44
|
+
lines.push(`${indent}${key}: {`);
|
|
45
|
+
lines.push(generateMockTree(entry, indent + " "));
|
|
46
|
+
lines.push(`${indent}},`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return lines.join("\n");
|
|
50
|
+
}
|
|
51
|
+
function generateTestMock(operations) {
|
|
52
|
+
const tree = buildNestedMockTree(operations);
|
|
53
|
+
const mockCode = generateMockTree(tree);
|
|
54
|
+
return `// AUTO-GENERATED by @noego/wood -- do not edit
|
|
55
|
+
// Regenerated by noego dev and noego build when YAML changes
|
|
56
|
+
import { vi } from 'vitest';
|
|
57
|
+
|
|
58
|
+
const __WOOD_INTERNAL_BRIDGE_KEY = '__NOEGO_WOOD_BRIDGE__';
|
|
59
|
+
|
|
60
|
+
const mockWood = {
|
|
61
|
+
${mockCode}
|
|
62
|
+
__load: vi.fn(),
|
|
63
|
+
__navigate: vi.fn(),
|
|
64
|
+
__window: {
|
|
65
|
+
open: vi.fn(),
|
|
66
|
+
close: vi.fn(),
|
|
67
|
+
focus: vi.fn(),
|
|
68
|
+
minimize: vi.fn(),
|
|
69
|
+
maximize: vi.fn(),
|
|
70
|
+
},
|
|
71
|
+
__debug: {
|
|
72
|
+
current: vi.fn().mockResolvedValue({
|
|
73
|
+
ok: true,
|
|
74
|
+
enabled: false,
|
|
75
|
+
mode: 'production',
|
|
76
|
+
windows: [],
|
|
77
|
+
}),
|
|
78
|
+
},
|
|
79
|
+
__contextMenu: {
|
|
80
|
+
show: vi.fn(),
|
|
81
|
+
},
|
|
82
|
+
on: vi.fn(() => vi.fn()),
|
|
83
|
+
__log: vi.fn().mockResolvedValue({
|
|
84
|
+
ok: true,
|
|
85
|
+
forwarded: false,
|
|
86
|
+
configured: false,
|
|
87
|
+
reason: 'unconfigured',
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
Object.defineProperty(window, __WOOD_INTERNAL_BRIDGE_KEY, { value: mockWood, writable: true });
|
|
92
|
+
`;
|
|
93
|
+
}
|
|
94
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
95
|
+
0 && (module.exports = {
|
|
96
|
+
generateTestMock
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=test_mock_generator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/codegen/test_mock_generator.ts"],"sourcesContent":["import type { OperationDef } from '../types/index.cjs';\n\nfunction buildNestedMockTree(operations: Map<string, OperationDef>): Record<string, unknown> {\n const tree: Record<string, unknown> = {};\n for (const [channel, op] of operations) {\n const parts = channel.split('.');\n let current: Record<string, unknown> = tree;\n for (let i = 0; i < parts.length - 1; i++) {\n if (!current[parts[i]]) current[parts[i]] = {};\n current = current[parts[i]] as Record<string, unknown>;\n }\n current[parts[parts.length - 1]] = { __operation: op };\n }\n return tree;\n}\n\nfunction generateMockTree(node: Record<string, unknown>, indent: string = ' '): string {\n const lines: string[] = [];\n for (const [key, value] of Object.entries(node)) {\n const entry = value as Record<string, unknown>;\n if (entry.__operation) {\n lines.push(`${indent}${key}: vi.fn().mockResolvedValue({}),`);\n } else {\n lines.push(`${indent}${key}: {`);\n lines.push(generateMockTree(entry, indent + ' '));\n lines.push(`${indent}},`);\n }\n }\n return lines.join('\\n');\n}\n\nexport function generateTestMock(operations: Map<string, OperationDef>): string {\n const tree = buildNestedMockTree(operations);\n const mockCode = generateMockTree(tree);\n\n return `// AUTO-GENERATED by @noego/wood -- do not edit\n// Regenerated by noego dev and noego build when YAML changes\nimport { vi } from 'vitest';\n\nconst __WOOD_INTERNAL_BRIDGE_KEY = '__NOEGO_WOOD_BRIDGE__';\n\nconst mockWood = {\n${mockCode}\n __load: vi.fn(),\n __navigate: vi.fn(),\n __window: {\n open: vi.fn(),\n close: vi.fn(),\n focus: vi.fn(),\n minimize: vi.fn(),\n maximize: vi.fn(),\n },\n __debug: {\n current: vi.fn().mockResolvedValue({\n ok: true,\n enabled: false,\n mode: 'production',\n windows: [],\n }),\n },\n __contextMenu: {\n show: vi.fn(),\n },\n on: vi.fn(() => vi.fn()),\n __log: vi.fn().mockResolvedValue({\n ok: true,\n forwarded: false,\n configured: false,\n reason: 'unconfigured',\n }),\n};\n\nObject.defineProperty(window, __WOOD_INTERNAL_BRIDGE_KEY, { value: mockWood, writable: true });\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,SAAS,oBAAoB,YAAgE;AAC3F,QAAM,OAAgC,CAAC;AACvC,aAAW,CAAC,SAAS,EAAE,KAAK,YAAY;AACtC,UAAM,QAAQ,QAAQ,MAAM,GAAG;AAC/B,QAAI,UAAmC;AACvC,aAAS,IAAI,GAAG,IAAI,MAAM,SAAS,GAAG,KAAK;AACzC,UAAI,CAAC,QAAQ,MAAM,CAAC,CAAC,EAAG,SAAQ,MAAM,CAAC,CAAC,IAAI,CAAC;AAC7C,gBAAU,QAAQ,MAAM,CAAC,CAAC;AAAA,IAC5B;AACA,YAAQ,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG;AAAA,EACvD;AACA,SAAO;AACT;AAEA,SAAS,iBAAiB,MAA+B,SAAiB,MAAc;AACtF,QAAM,QAAkB,CAAC;AACzB,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAAI,GAAG;AAC/C,UAAM,QAAQ;AACd,QAAI,MAAM,aAAa;AACrB,YAAM,KAAK,GAAG,MAAM,GAAG,GAAG,kCAAkC;AAAA,IAC9D,OAAO;AACL,YAAM,KAAK,GAAG,MAAM,GAAG,GAAG,KAAK;AAC/B,YAAM,KAAK,iBAAiB,OAAO,SAAS,IAAI,CAAC;AACjD,YAAM,KAAK,GAAG,MAAM,IAAI;AAAA,IAC1B;AAAA,EACF;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;AAEO,SAAS,iBAAiB,YAA+C;AAC9E,QAAM,OAAO,oBAAoB,UAAU;AAC3C,QAAM,WAAW,iBAAiB,IAAI;AAEtC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOP,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCV;","names":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
function buildNestedMockTree(operations) {
|
|
2
|
+
const tree = {};
|
|
3
|
+
for (const [channel, op] of operations) {
|
|
4
|
+
const parts = channel.split(".");
|
|
5
|
+
let current = tree;
|
|
6
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
7
|
+
if (!current[parts[i]]) current[parts[i]] = {};
|
|
8
|
+
current = current[parts[i]];
|
|
9
|
+
}
|
|
10
|
+
current[parts[parts.length - 1]] = { __operation: op };
|
|
11
|
+
}
|
|
12
|
+
return tree;
|
|
13
|
+
}
|
|
14
|
+
function generateMockTree(node, indent = " ") {
|
|
15
|
+
const lines = [];
|
|
16
|
+
for (const [key, value] of Object.entries(node)) {
|
|
17
|
+
const entry = value;
|
|
18
|
+
if (entry.__operation) {
|
|
19
|
+
lines.push(`${indent}${key}: vi.fn().mockResolvedValue({}),`);
|
|
20
|
+
} else {
|
|
21
|
+
lines.push(`${indent}${key}: {`);
|
|
22
|
+
lines.push(generateMockTree(entry, indent + " "));
|
|
23
|
+
lines.push(`${indent}},`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return lines.join("\n");
|
|
27
|
+
}
|
|
28
|
+
function generateTestMock(operations) {
|
|
29
|
+
const tree = buildNestedMockTree(operations);
|
|
30
|
+
const mockCode = generateMockTree(tree);
|
|
31
|
+
return `// AUTO-GENERATED by @noego/wood -- do not edit
|
|
32
|
+
// Regenerated by noego dev and noego build when YAML changes
|
|
33
|
+
import { vi } from 'vitest';
|
|
34
|
+
|
|
35
|
+
const __WOOD_INTERNAL_BRIDGE_KEY = '__NOEGO_WOOD_BRIDGE__';
|
|
36
|
+
|
|
37
|
+
const mockWood = {
|
|
38
|
+
${mockCode}
|
|
39
|
+
__load: vi.fn(),
|
|
40
|
+
__navigate: vi.fn(),
|
|
41
|
+
__window: {
|
|
42
|
+
open: vi.fn(),
|
|
43
|
+
close: vi.fn(),
|
|
44
|
+
focus: vi.fn(),
|
|
45
|
+
minimize: vi.fn(),
|
|
46
|
+
maximize: vi.fn(),
|
|
47
|
+
},
|
|
48
|
+
__debug: {
|
|
49
|
+
current: vi.fn().mockResolvedValue({
|
|
50
|
+
ok: true,
|
|
51
|
+
enabled: false,
|
|
52
|
+
mode: 'production',
|
|
53
|
+
windows: [],
|
|
54
|
+
}),
|
|
55
|
+
},
|
|
56
|
+
__contextMenu: {
|
|
57
|
+
show: vi.fn(),
|
|
58
|
+
},
|
|
59
|
+
on: vi.fn(() => vi.fn()),
|
|
60
|
+
__log: vi.fn().mockResolvedValue({
|
|
61
|
+
ok: true,
|
|
62
|
+
forwarded: false,
|
|
63
|
+
configured: false,
|
|
64
|
+
reason: 'unconfigured',
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
Object.defineProperty(window, __WOOD_INTERNAL_BRIDGE_KEY, { value: mockWood, writable: true });
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
generateTestMock
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=test_mock_generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/codegen/test_mock_generator.ts"],"sourcesContent":["import type { OperationDef } from '../types/index.js';\n\nfunction buildNestedMockTree(operations: Map<string, OperationDef>): Record<string, unknown> {\n const tree: Record<string, unknown> = {};\n for (const [channel, op] of operations) {\n const parts = channel.split('.');\n let current: Record<string, unknown> = tree;\n for (let i = 0; i < parts.length - 1; i++) {\n if (!current[parts[i]]) current[parts[i]] = {};\n current = current[parts[i]] as Record<string, unknown>;\n }\n current[parts[parts.length - 1]] = { __operation: op };\n }\n return tree;\n}\n\nfunction generateMockTree(node: Record<string, unknown>, indent: string = ' '): string {\n const lines: string[] = [];\n for (const [key, value] of Object.entries(node)) {\n const entry = value as Record<string, unknown>;\n if (entry.__operation) {\n lines.push(`${indent}${key}: vi.fn().mockResolvedValue({}),`);\n } else {\n lines.push(`${indent}${key}: {`);\n lines.push(generateMockTree(entry, indent + ' '));\n lines.push(`${indent}},`);\n }\n }\n return lines.join('\\n');\n}\n\nexport function generateTestMock(operations: Map<string, OperationDef>): string {\n const tree = buildNestedMockTree(operations);\n const mockCode = generateMockTree(tree);\n\n return `// AUTO-GENERATED by @noego/wood -- do not edit\n// Regenerated by noego dev and noego build when YAML changes\nimport { vi } from 'vitest';\n\nconst __WOOD_INTERNAL_BRIDGE_KEY = '__NOEGO_WOOD_BRIDGE__';\n\nconst mockWood = {\n${mockCode}\n __load: vi.fn(),\n __navigate: vi.fn(),\n __window: {\n open: vi.fn(),\n close: vi.fn(),\n focus: vi.fn(),\n minimize: vi.fn(),\n maximize: vi.fn(),\n },\n __debug: {\n current: vi.fn().mockResolvedValue({\n ok: true,\n enabled: false,\n mode: 'production',\n windows: [],\n }),\n },\n __contextMenu: {\n show: vi.fn(),\n },\n on: vi.fn(() => vi.fn()),\n __log: vi.fn().mockResolvedValue({\n ok: true,\n forwarded: false,\n configured: false,\n reason: 'unconfigured',\n }),\n};\n\nObject.defineProperty(window, __WOOD_INTERNAL_BRIDGE_KEY, { value: mockWood, writable: true });\n`;\n}\n"],"mappings":"AAEA,SAAS,oBAAoB,YAAgE;AAC3F,QAAM,OAAgC,CAAC;AACvC,aAAW,CAAC,SAAS,EAAE,KAAK,YAAY;AACtC,UAAM,QAAQ,QAAQ,MAAM,GAAG;AAC/B,QAAI,UAAmC;AACvC,aAAS,IAAI,GAAG,IAAI,MAAM,SAAS,GAAG,KAAK;AACzC,UAAI,CAAC,QAAQ,MAAM,CAAC,CAAC,EAAG,SAAQ,MAAM,CAAC,CAAC,IAAI,CAAC;AAC7C,gBAAU,QAAQ,MAAM,CAAC,CAAC;AAAA,IAC5B;AACA,YAAQ,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG;AAAA,EACvD;AACA,SAAO;AACT;AAEA,SAAS,iBAAiB,MAA+B,SAAiB,MAAc;AACtF,QAAM,QAAkB,CAAC;AACzB,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAAI,GAAG;AAC/C,UAAM,QAAQ;AACd,QAAI,MAAM,aAAa;AACrB,YAAM,KAAK,GAAG,MAAM,GAAG,GAAG,kCAAkC;AAAA,IAC9D,OAAO;AACL,YAAM,KAAK,GAAG,MAAM,GAAG,GAAG,KAAK;AAC/B,YAAM,KAAK,iBAAiB,OAAO,SAAS,IAAI,CAAC;AACjD,YAAM,KAAK,GAAG,MAAM,IAAI;AAAA,IAC1B;AAAA,EACF;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;AAEO,SAAS,iBAAiB,YAA+C;AAC9E,QAAM,OAAO,oBAAoB,UAAU;AAC3C,QAAM,WAAW,iBAAiB,IAAI;AAEtC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOP,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCV;","names":[]}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var type_generator_exports = {};
|
|
20
|
+
__export(type_generator_exports, {
|
|
21
|
+
generateTypes: () => generateTypes
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(type_generator_exports);
|
|
24
|
+
function operationHasInput(op) {
|
|
25
|
+
return Boolean(
|
|
26
|
+
op.inputSchema && op.inputSchema.type === "object" && Object.keys(op.inputSchema.properties ?? {}).length > 0
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function jsonSchemaToTS(schema, indent = "") {
|
|
30
|
+
if (!schema) return "unknown";
|
|
31
|
+
const type = schema.type;
|
|
32
|
+
if (type === "string") {
|
|
33
|
+
if (schema.enum) {
|
|
34
|
+
return schema.enum.map((v) => `'${v}'`).join(" | ");
|
|
35
|
+
}
|
|
36
|
+
return "string";
|
|
37
|
+
}
|
|
38
|
+
if (type === "number" || type === "integer") return "number";
|
|
39
|
+
if (type === "boolean") return "boolean";
|
|
40
|
+
if (type === "array") {
|
|
41
|
+
const itemType = jsonSchemaToTS(schema.items, indent);
|
|
42
|
+
return `Array<${itemType}>`;
|
|
43
|
+
}
|
|
44
|
+
if (type === "object") {
|
|
45
|
+
const props = schema.properties ?? {};
|
|
46
|
+
const required = new Set(schema.required ?? []);
|
|
47
|
+
const entries = Object.entries(props);
|
|
48
|
+
if (entries.length === 0) return "Record<string, unknown>";
|
|
49
|
+
const lines = entries.map(([key, val]) => {
|
|
50
|
+
const optional = required.has(key) ? "" : "?";
|
|
51
|
+
const valType = jsonSchemaToTS(val, indent + " ");
|
|
52
|
+
return `${indent} ${key}${optional}: ${valType};`;
|
|
53
|
+
});
|
|
54
|
+
return `{
|
|
55
|
+
${lines.join("\n")}
|
|
56
|
+
${indent}}`;
|
|
57
|
+
}
|
|
58
|
+
return "unknown";
|
|
59
|
+
}
|
|
60
|
+
function buildNestedTypeTree(operations) {
|
|
61
|
+
const tree = {};
|
|
62
|
+
for (const [channel, op] of operations) {
|
|
63
|
+
const parts = channel.split(".");
|
|
64
|
+
let current = tree;
|
|
65
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
66
|
+
if (!current[parts[i]]) current[parts[i]] = {};
|
|
67
|
+
current = current[parts[i]];
|
|
68
|
+
}
|
|
69
|
+
current[parts[parts.length - 1]] = { __operation: op };
|
|
70
|
+
}
|
|
71
|
+
return tree;
|
|
72
|
+
}
|
|
73
|
+
function generateTypeTree(node, indent = " ") {
|
|
74
|
+
const lines = [];
|
|
75
|
+
for (const [key, value] of Object.entries(node)) {
|
|
76
|
+
const entry = value;
|
|
77
|
+
if (entry.__operation) {
|
|
78
|
+
const op = entry.__operation;
|
|
79
|
+
const inputType = jsonSchemaToTS(op.inputSchema, indent + " ");
|
|
80
|
+
const outputType = jsonSchemaToTS(op.outputSchema, indent + " ");
|
|
81
|
+
const hasInput = operationHasInput(op);
|
|
82
|
+
if (hasInput) {
|
|
83
|
+
lines.push(`${indent}${key}(data: ${inputType}): Promise<${outputType}>;`);
|
|
84
|
+
} else {
|
|
85
|
+
lines.push(`${indent}${key}(): Promise<${outputType}>;`);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
lines.push(`${indent}${key}: {`);
|
|
89
|
+
lines.push(generateTypeTree(entry, indent + " "));
|
|
90
|
+
lines.push(`${indent}};`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return lines.join("\n");
|
|
94
|
+
}
|
|
95
|
+
function buildRpcControllerTree(operations) {
|
|
96
|
+
const tree = {};
|
|
97
|
+
for (const operation of operations.values()) {
|
|
98
|
+
const controller = operation.controller;
|
|
99
|
+
const action = operation.action;
|
|
100
|
+
if (!tree[controller]) {
|
|
101
|
+
tree[controller] = {};
|
|
102
|
+
}
|
|
103
|
+
if (tree[controller][action]) {
|
|
104
|
+
throw new Error(
|
|
105
|
+
`Type codegen failed: duplicate RPC action "${controller}.${action}" found in channel "${operation.channel}".`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
tree[controller][action] = {
|
|
109
|
+
channel: operation.channel,
|
|
110
|
+
inputType: jsonSchemaToTS(operation.inputSchema, " "),
|
|
111
|
+
outputType: jsonSchemaToTS(operation.outputSchema, " "),
|
|
112
|
+
hasInput: operationHasInput(operation)
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return tree;
|
|
116
|
+
}
|
|
117
|
+
function generateRpcTypeTree(operations) {
|
|
118
|
+
const controllerTree = buildRpcControllerTree(operations);
|
|
119
|
+
const controllerNames = Object.keys(controllerTree).sort((a, b) => a.localeCompare(b));
|
|
120
|
+
const lines = [];
|
|
121
|
+
for (const controllerName of controllerNames) {
|
|
122
|
+
lines.push(` ${controllerName}: {`);
|
|
123
|
+
const actions = controllerTree[controllerName];
|
|
124
|
+
const actionNames = Object.keys(actions).sort((a, b) => a.localeCompare(b));
|
|
125
|
+
for (const actionName of actionNames) {
|
|
126
|
+
const action = actions[actionName];
|
|
127
|
+
if (action.hasInput) {
|
|
128
|
+
lines.push(` ${actionName}(data: ${action.inputType}): Promise<${action.outputType}>;`);
|
|
129
|
+
} else {
|
|
130
|
+
lines.push(` ${actionName}(): Promise<${action.outputType}>;`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
lines.push(" };");
|
|
134
|
+
}
|
|
135
|
+
return lines.join("\n");
|
|
136
|
+
}
|
|
137
|
+
function generateTypes(operations) {
|
|
138
|
+
const tree = buildNestedTypeTree(operations);
|
|
139
|
+
const typesCode = generateTypeTree(tree);
|
|
140
|
+
const rpcTypeCode = generateRpcTypeTree(operations);
|
|
141
|
+
return `// AUTO-GENERATED by @noego/wood -- do not edit
|
|
142
|
+
export interface WoodRpcManifestEntry {
|
|
143
|
+
channel: string;
|
|
144
|
+
controller: string;
|
|
145
|
+
action: string;
|
|
146
|
+
path: string[];
|
|
147
|
+
hasInput: boolean;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface WoodRpcApi {
|
|
151
|
+
${rpcTypeCode}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface WoodApi {
|
|
155
|
+
${typesCode}
|
|
156
|
+
__rpcManifest: WoodRpcManifestEntry[];
|
|
157
|
+
__load(route: string, params: Record<string, string>): Promise<unknown>;
|
|
158
|
+
__navigate(windowId: string, route: string): Promise<void>;
|
|
159
|
+
__window: {
|
|
160
|
+
current(): Promise<{ ok: boolean; windowId?: string; defaultRoute?: string }>;
|
|
161
|
+
open(windowId: string, options?: Record<string, unknown>): Promise<void>;
|
|
162
|
+
close(windowId?: string): Promise<void>;
|
|
163
|
+
focus(windowId: string): Promise<void>;
|
|
164
|
+
minimize(windowId?: string): Promise<void>;
|
|
165
|
+
maximize(windowId?: string): Promise<void>;
|
|
166
|
+
};
|
|
167
|
+
__debug: {
|
|
168
|
+
current(): Promise<{
|
|
169
|
+
ok: boolean;
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
mode: 'development' | 'production';
|
|
172
|
+
port?: number;
|
|
173
|
+
windows: Array<{
|
|
174
|
+
windowId: string;
|
|
175
|
+
title: string;
|
|
176
|
+
webContentsId: number;
|
|
177
|
+
url: string;
|
|
178
|
+
focused: boolean;
|
|
179
|
+
}>;
|
|
180
|
+
}>;
|
|
181
|
+
};
|
|
182
|
+
__contextMenu: {
|
|
183
|
+
show(data: {
|
|
184
|
+
items: Array<{ label?: string; action?: string; data?: string; _callbackId?: string; disabled?: boolean; type?: 'separator' }>;
|
|
185
|
+
position: { x: number; y: number };
|
|
186
|
+
}): Promise<void>;
|
|
187
|
+
};
|
|
188
|
+
on(channel: string, callback: (...args: unknown[]) => void): () => void;
|
|
189
|
+
__log(level: string, logger: string, message: string, context?: unknown): Promise<{
|
|
190
|
+
ok: boolean;
|
|
191
|
+
forwarded: boolean;
|
|
192
|
+
configured: boolean;
|
|
193
|
+
reason?: 'unconfigured' | 'callback-error';
|
|
194
|
+
errorMessage?: string;
|
|
195
|
+
}>;
|
|
196
|
+
}
|
|
197
|
+
`;
|
|
198
|
+
}
|
|
199
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
200
|
+
0 && (module.exports = {
|
|
201
|
+
generateTypes
|
|
202
|
+
});
|
|
203
|
+
//# sourceMappingURL=type_generator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/codegen/type_generator.ts"],"sourcesContent":["import type { OperationDef } from '../types/index.cjs';\n\nfunction operationHasInput(op: OperationDef): boolean {\n return Boolean(\n op.inputSchema &&\n (op.inputSchema as Record<string, unknown>).type === 'object' &&\n Object.keys((op.inputSchema as Record<string, Record<string, unknown>>).properties ?? {}).length > 0,\n );\n}\n\nfunction jsonSchemaToTS(schema: Record<string, unknown> | undefined, indent: string = ''): string {\n if (!schema) return 'unknown';\n\n const type = schema.type as string | undefined;\n\n if (type === 'string') {\n if (schema.enum) {\n return (schema.enum as string[]).map((v) => `'${v}'`).join(' | ');\n }\n return 'string';\n }\n if (type === 'number' || type === 'integer') return 'number';\n if (type === 'boolean') return 'boolean';\n if (type === 'array') {\n const itemType = jsonSchemaToTS(schema.items as Record<string, unknown>, indent);\n return `Array<${itemType}>`;\n }\n if (type === 'object') {\n const props = (schema.properties ?? {}) as Record<string, Record<string, unknown>>;\n const required = new Set((schema.required as string[]) ?? []);\n const entries = Object.entries(props);\n if (entries.length === 0) return 'Record<string, unknown>';\n\n const lines = entries.map(([key, val]) => {\n const optional = required.has(key) ? '' : '?';\n const valType = jsonSchemaToTS(val, indent + ' ');\n return `${indent} ${key}${optional}: ${valType};`;\n });\n return `{\\n${lines.join('\\n')}\\n${indent}}`;\n }\n\n return 'unknown';\n}\n\nfunction buildNestedTypeTree(operations: Map<string, OperationDef>): Record<string, unknown> {\n const tree: Record<string, unknown> = {};\n for (const [channel, op] of operations) {\n const parts = channel.split('.');\n let current: Record<string, unknown> = tree;\n for (let i = 0; i < parts.length - 1; i++) {\n if (!current[parts[i]]) current[parts[i]] = {};\n current = current[parts[i]] as Record<string, unknown>;\n }\n current[parts[parts.length - 1]] = { __operation: op };\n }\n return tree;\n}\n\nfunction generateTypeTree(node: Record<string, unknown>, indent: string = ' '): string {\n const lines: string[] = [];\n for (const [key, value] of Object.entries(node)) {\n const entry = value as Record<string, unknown>;\n if (entry.__operation) {\n const op = entry.__operation as OperationDef;\n const inputType = jsonSchemaToTS(op.inputSchema as Record<string, unknown>, indent + ' ');\n const outputType = jsonSchemaToTS(op.outputSchema as Record<string, unknown>, indent + ' ');\n const hasInput = operationHasInput(op);\n\n if (hasInput) {\n lines.push(`${indent}${key}(data: ${inputType}): Promise<${outputType}>;`);\n } else {\n lines.push(`${indent}${key}(): Promise<${outputType}>;`);\n }\n } else {\n lines.push(`${indent}${key}: {`);\n lines.push(generateTypeTree(entry, indent + ' '));\n lines.push(`${indent}};`);\n }\n }\n return lines.join('\\n');\n}\n\ntype RpcActionTypeEntry = {\n channel: string;\n inputType: string;\n outputType: string;\n hasInput: boolean;\n};\n\nfunction buildRpcControllerTree(\n operations: Map<string, OperationDef>,\n): Record<string, Record<string, RpcActionTypeEntry>> {\n const tree: Record<string, Record<string, RpcActionTypeEntry>> = {};\n\n for (const operation of operations.values()) {\n const controller = operation.controller;\n const action = operation.action;\n\n if (!tree[controller]) {\n tree[controller] = {};\n }\n\n if (tree[controller][action]) {\n throw new Error(\n `Type codegen failed: duplicate RPC action \"${controller}.${action}\" found in channel \"${operation.channel}\".`,\n );\n }\n\n tree[controller][action] = {\n channel: operation.channel,\n inputType: jsonSchemaToTS(operation.inputSchema as Record<string, unknown>, ' '),\n outputType: jsonSchemaToTS(operation.outputSchema as Record<string, unknown>, ' '),\n hasInput: operationHasInput(operation),\n };\n }\n\n return tree;\n}\n\nfunction generateRpcTypeTree(operations: Map<string, OperationDef>): string {\n const controllerTree = buildRpcControllerTree(operations);\n const controllerNames = Object.keys(controllerTree).sort((a, b) => a.localeCompare(b));\n const lines: string[] = [];\n\n for (const controllerName of controllerNames) {\n lines.push(` ${controllerName}: {`);\n const actions = controllerTree[controllerName];\n const actionNames = Object.keys(actions).sort((a, b) => a.localeCompare(b));\n for (const actionName of actionNames) {\n const action = actions[actionName];\n if (action.hasInput) {\n lines.push(` ${actionName}(data: ${action.inputType}): Promise<${action.outputType}>;`);\n } else {\n lines.push(` ${actionName}(): Promise<${action.outputType}>;`);\n }\n }\n lines.push(' };');\n }\n\n return lines.join('\\n');\n}\n\nexport function generateTypes(operations: Map<string, OperationDef>): string {\n const tree = buildNestedTypeTree(operations);\n const typesCode = generateTypeTree(tree);\n const rpcTypeCode = generateRpcTypeTree(operations);\n\n return `// AUTO-GENERATED by @noego/wood -- do not edit\nexport interface WoodRpcManifestEntry {\n channel: string;\n controller: string;\n action: string;\n path: string[];\n hasInput: boolean;\n}\n\nexport interface WoodRpcApi {\n${rpcTypeCode}\n}\n\nexport interface WoodApi {\n${typesCode}\n __rpcManifest: WoodRpcManifestEntry[];\n __load(route: string, params: Record<string, string>): Promise<unknown>;\n __navigate(windowId: string, route: string): Promise<void>;\n __window: {\n current(): Promise<{ ok: boolean; windowId?: string; defaultRoute?: string }>;\n open(windowId: string, options?: Record<string, unknown>): Promise<void>;\n close(windowId?: string): Promise<void>;\n focus(windowId: string): Promise<void>;\n minimize(windowId?: string): Promise<void>;\n maximize(windowId?: string): Promise<void>;\n };\n __debug: {\n current(): Promise<{\n ok: boolean;\n enabled: boolean;\n mode: 'development' | 'production';\n port?: number;\n windows: Array<{\n windowId: string;\n title: string;\n webContentsId: number;\n url: string;\n focused: boolean;\n }>;\n }>;\n };\n __contextMenu: {\n show(data: {\n items: Array<{ label?: string; action?: string; data?: string; _callbackId?: string; disabled?: boolean; type?: 'separator' }>;\n position: { x: number; y: number };\n }): Promise<void>;\n };\n on(channel: string, callback: (...args: unknown[]) => void): () => void;\n __log(level: string, logger: string, message: string, context?: unknown): Promise<{\n ok: boolean;\n forwarded: boolean;\n configured: boolean;\n reason?: 'unconfigured' | 'callback-error';\n errorMessage?: string;\n }>;\n}\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,SAAS,kBAAkB,IAA2B;AACpD,SAAO;AAAA,IACL,GAAG,eACA,GAAG,YAAwC,SAAS,YACrD,OAAO,KAAM,GAAG,YAAwD,cAAc,CAAC,CAAC,EAAE,SAAS;AAAA,EACvG;AACF;AAEA,SAAS,eAAe,QAA6C,SAAiB,IAAY;AAChG,MAAI,CAAC,OAAQ,QAAO;AAEpB,QAAM,OAAO,OAAO;AAEpB,MAAI,SAAS,UAAU;AACrB,QAAI,OAAO,MAAM;AACf,aAAQ,OAAO,KAAkB,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,KAAK,KAAK;AAAA,IAClE;AACA,WAAO;AAAA,EACT;AACA,MAAI,SAAS,YAAY,SAAS,UAAW,QAAO;AACpD,MAAI,SAAS,UAAW,QAAO;AAC/B,MAAI,SAAS,SAAS;AACpB,UAAM,WAAW,eAAe,OAAO,OAAkC,MAAM;AAC/E,WAAO,SAAS,QAAQ;AAAA,EAC1B;AACA,MAAI,SAAS,UAAU;AACrB,UAAM,QAAS,OAAO,cAAc,CAAC;AACrC,UAAM,WAAW,IAAI,IAAK,OAAO,YAAyB,CAAC,CAAC;AAC5D,UAAM,UAAU,OAAO,QAAQ,KAAK;AACpC,QAAI,QAAQ,WAAW,EAAG,QAAO;AAEjC,UA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,SAAS,QAAQ,UAAU;AACjC,UAAI,OAAO,UAAU;AACnB,cAAM,KAAK,OAAO,UAAU,UAAU,OAAO,SAAS,cAAc,OAAO,UAAU,IAAI;AAAA,MAC3F,OAAO;AACL,cAAM,KAAK,OAAO,UAAU,eAAe,OAAO,UAAU,IAAI;AAAA,MAClE;AAAA,IACF;AACA,UAAM,KAAK,MAAM;AAAA,EACnB;AAEA,SAAO,MAAM,KAAK,IAAI;AACxB;AAEO,SAAS,cAAc,YAA+C;AAC3E,QAAM,OAAO,oBAAoB,UAAU;AAC3C,QAAM,YAAY,iBAAiB,IAAI;AACvC,QAAM,cAAc,oBAAoB,UAAU;AAElD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUP,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2CX;","names":[]}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
function operationHasInput(op) {
|
|
2
|
+
return Boolean(
|
|
3
|
+
op.inputSchema && op.inputSchema.type === "object" && Object.keys(op.inputSchema.properties ?? {}).length > 0
|
|
4
|
+
);
|
|
5
|
+
}
|
|
6
|
+
function jsonSchemaToTS(schema, indent = "") {
|
|
7
|
+
if (!schema) return "unknown";
|
|
8
|
+
const type = schema.type;
|
|
9
|
+
if (type === "string") {
|
|
10
|
+
if (schema.enum) {
|
|
11
|
+
return schema.enum.map((v) => `'${v}'`).join(" | ");
|
|
12
|
+
}
|
|
13
|
+
return "string";
|
|
14
|
+
}
|
|
15
|
+
if (type === "number" || type === "integer") return "number";
|
|
16
|
+
if (type === "boolean") return "boolean";
|
|
17
|
+
if (type === "array") {
|
|
18
|
+
const itemType = jsonSchemaToTS(schema.items, indent);
|
|
19
|
+
return `Array<${itemType}>`;
|
|
20
|
+
}
|
|
21
|
+
if (type === "object") {
|
|
22
|
+
const props = schema.properties ?? {};
|
|
23
|
+
const required = new Set(schema.required ?? []);
|
|
24
|
+
const entries = Object.entries(props);
|
|
25
|
+
if (entries.length === 0) return "Record<string, unknown>";
|
|
26
|
+
const lines = entries.map(([key, val]) => {
|
|
27
|
+
const optional = required.has(key) ? "" : "?";
|
|
28
|
+
const valType = jsonSchemaToTS(val, indent + " ");
|
|
29
|
+
return `${indent} ${key}${optional}: ${valType};`;
|
|
30
|
+
});
|
|
31
|
+
return `{
|
|
32
|
+
${lines.join("\n")}
|
|
33
|
+
${indent}}`;
|
|
34
|
+
}
|
|
35
|
+
return "unknown";
|
|
36
|
+
}
|
|
37
|
+
function buildNestedTypeTree(operations) {
|
|
38
|
+
const tree = {};
|
|
39
|
+
for (const [channel, op] of operations) {
|
|
40
|
+
const parts = channel.split(".");
|
|
41
|
+
let current = tree;
|
|
42
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
43
|
+
if (!current[parts[i]]) current[parts[i]] = {};
|
|
44
|
+
current = current[parts[i]];
|
|
45
|
+
}
|
|
46
|
+
current[parts[parts.length - 1]] = { __operation: op };
|
|
47
|
+
}
|
|
48
|
+
return tree;
|
|
49
|
+
}
|
|
50
|
+
function generateTypeTree(node, indent = " ") {
|
|
51
|
+
const lines = [];
|
|
52
|
+
for (const [key, value] of Object.entries(node)) {
|
|
53
|
+
const entry = value;
|
|
54
|
+
if (entry.__operation) {
|
|
55
|
+
const op = entry.__operation;
|
|
56
|
+
const inputType = jsonSchemaToTS(op.inputSchema, indent + " ");
|
|
57
|
+
const outputType = jsonSchemaToTS(op.outputSchema, indent + " ");
|
|
58
|
+
const hasInput = operationHasInput(op);
|
|
59
|
+
if (hasInput) {
|
|
60
|
+
lines.push(`${indent}${key}(data: ${inputType}): Promise<${outputType}>;`);
|
|
61
|
+
} else {
|
|
62
|
+
lines.push(`${indent}${key}(): Promise<${outputType}>;`);
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
lines.push(`${indent}${key}: {`);
|
|
66
|
+
lines.push(generateTypeTree(entry, indent + " "));
|
|
67
|
+
lines.push(`${indent}};`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return lines.join("\n");
|
|
71
|
+
}
|
|
72
|
+
function buildRpcControllerTree(operations) {
|
|
73
|
+
const tree = {};
|
|
74
|
+
for (const operation of operations.values()) {
|
|
75
|
+
const controller = operation.controller;
|
|
76
|
+
const action = operation.action;
|
|
77
|
+
if (!tree[controller]) {
|
|
78
|
+
tree[controller] = {};
|
|
79
|
+
}
|
|
80
|
+
if (tree[controller][action]) {
|
|
81
|
+
throw new Error(
|
|
82
|
+
`Type codegen failed: duplicate RPC action "${controller}.${action}" found in channel "${operation.channel}".`
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
tree[controller][action] = {
|
|
86
|
+
channel: operation.channel,
|
|
87
|
+
inputType: jsonSchemaToTS(operation.inputSchema, " "),
|
|
88
|
+
outputType: jsonSchemaToTS(operation.outputSchema, " "),
|
|
89
|
+
hasInput: operationHasInput(operation)
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
return tree;
|
|
93
|
+
}
|
|
94
|
+
function generateRpcTypeTree(operations) {
|
|
95
|
+
const controllerTree = buildRpcControllerTree(operations);
|
|
96
|
+
const controllerNames = Object.keys(controllerTree).sort((a, b) => a.localeCompare(b));
|
|
97
|
+
const lines = [];
|
|
98
|
+
for (const controllerName of controllerNames) {
|
|
99
|
+
lines.push(` ${controllerName}: {`);
|
|
100
|
+
const actions = controllerTree[controllerName];
|
|
101
|
+
const actionNames = Object.keys(actions).sort((a, b) => a.localeCompare(b));
|
|
102
|
+
for (const actionName of actionNames) {
|
|
103
|
+
const action = actions[actionName];
|
|
104
|
+
if (action.hasInput) {
|
|
105
|
+
lines.push(` ${actionName}(data: ${action.inputType}): Promise<${action.outputType}>;`);
|
|
106
|
+
} else {
|
|
107
|
+
lines.push(` ${actionName}(): Promise<${action.outputType}>;`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
lines.push(" };");
|
|
111
|
+
}
|
|
112
|
+
return lines.join("\n");
|
|
113
|
+
}
|
|
114
|
+
function generateTypes(operations) {
|
|
115
|
+
const tree = buildNestedTypeTree(operations);
|
|
116
|
+
const typesCode = generateTypeTree(tree);
|
|
117
|
+
const rpcTypeCode = generateRpcTypeTree(operations);
|
|
118
|
+
return `// AUTO-GENERATED by @noego/wood -- do not edit
|
|
119
|
+
export interface WoodRpcManifestEntry {
|
|
120
|
+
channel: string;
|
|
121
|
+
controller: string;
|
|
122
|
+
action: string;
|
|
123
|
+
path: string[];
|
|
124
|
+
hasInput: boolean;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface WoodRpcApi {
|
|
128
|
+
${rpcTypeCode}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface WoodApi {
|
|
132
|
+
${typesCode}
|
|
133
|
+
__rpcManifest: WoodRpcManifestEntry[];
|
|
134
|
+
__load(route: string, params: Record<string, string>): Promise<unknown>;
|
|
135
|
+
__navigate(windowId: string, route: string): Promise<void>;
|
|
136
|
+
__window: {
|
|
137
|
+
current(): Promise<{ ok: boolean; windowId?: string; defaultRoute?: string }>;
|
|
138
|
+
open(windowId: string, options?: Record<string, unknown>): Promise<void>;
|
|
139
|
+
close(windowId?: string): Promise<void>;
|
|
140
|
+
focus(windowId: string): Promise<void>;
|
|
141
|
+
minimize(windowId?: string): Promise<void>;
|
|
142
|
+
maximize(windowId?: string): Promise<void>;
|
|
143
|
+
};
|
|
144
|
+
__debug: {
|
|
145
|
+
current(): Promise<{
|
|
146
|
+
ok: boolean;
|
|
147
|
+
enabled: boolean;
|
|
148
|
+
mode: 'development' | 'production';
|
|
149
|
+
port?: number;
|
|
150
|
+
windows: Array<{
|
|
151
|
+
windowId: string;
|
|
152
|
+
title: string;
|
|
153
|
+
webContentsId: number;
|
|
154
|
+
url: string;
|
|
155
|
+
focused: boolean;
|
|
156
|
+
}>;
|
|
157
|
+
}>;
|
|
158
|
+
};
|
|
159
|
+
__contextMenu: {
|
|
160
|
+
show(data: {
|
|
161
|
+
items: Array<{ label?: string; action?: string; data?: string; _callbackId?: string; disabled?: boolean; type?: 'separator' }>;
|
|
162
|
+
position: { x: number; y: number };
|
|
163
|
+
}): Promise<void>;
|
|
164
|
+
};
|
|
165
|
+
on(channel: string, callback: (...args: unknown[]) => void): () => void;
|
|
166
|
+
__log(level: string, logger: string, message: string, context?: unknown): Promise<{
|
|
167
|
+
ok: boolean;
|
|
168
|
+
forwarded: boolean;
|
|
169
|
+
configured: boolean;
|
|
170
|
+
reason?: 'unconfigured' | 'callback-error';
|
|
171
|
+
errorMessage?: string;
|
|
172
|
+
}>;
|
|
173
|
+
}
|
|
174
|
+
`;
|
|
175
|
+
}
|
|
176
|
+
export {
|
|
177
|
+
generateTypes
|
|
178
|
+
};
|
|
179
|
+
//# sourceMappingURL=type_generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/codegen/type_generator.ts"],"sourcesContent":["import type { OperationDef } from '../types/index.js';\n\nfunction operationHasInput(op: OperationDef): boolean {\n return Boolean(\n op.inputSchema &&\n (op.inputSchema as Record<string, unknown>).type === 'object' &&\n Object.keys((op.inputSchema as Record<string, Record<string, unknown>>).properties ?? {}).length > 0,\n );\n}\n\nfunction jsonSchemaToTS(schema: Record<string, unknown> | undefined, indent: string = ''): string {\n if (!schema) return 'unknown';\n\n const type = schema.type as string | undefined;\n\n if (type === 'string') {\n if (schema.enum) {\n return (schema.enum as string[]).map((v) => `'${v}'`).join(' | ');\n }\n return 'string';\n }\n if (type === 'number' || type === 'integer') return 'number';\n if (type === 'boolean') return 'boolean';\n if (type === 'array') {\n const itemType = jsonSchemaToTS(schema.items as Record<string, unknown>, indent);\n return `Array<${itemType}>`;\n }\n if (type === 'object') {\n const props = (schema.properties ?? {}) as Record<string, Record<string, unknown>>;\n const required = new Set((schema.required as string[]) ?? []);\n const entries = Object.entries(props);\n if (entries.length === 0) return 'Record<string, unknown>';\n\n const lines = entries.map(([key, val]) => {\n const optional = required.has(key) ? '' : '?';\n const valType = jsonSchemaToTS(val, indent + ' ');\n return `${indent} ${key}${optional}: ${valType};`;\n });\n return `{\\n${lines.join('\\n')}\\n${indent}}`;\n }\n\n return 'unknown';\n}\n\nfunction buildNestedTypeTree(operations: Map<string, OperationDef>): Record<string, unknown> {\n const tree: Record<string, unknown> = {};\n for (const [channel, op] of operations) {\n const parts = channel.split('.');\n let current: Record<string, unknown> = tree;\n for (let i = 0; i < parts.length - 1; i++) {\n if (!current[parts[i]]) current[parts[i]] = {};\n current = current[parts[i]] as Record<string, unknown>;\n }\n current[parts[parts.length - 1]] = { __operation: op };\n }\n return tree;\n}\n\nfunction generateTypeTree(node: Record<string, unknown>, indent: string = ' '): string {\n const lines: string[] = [];\n for (const [key, value] of Object.entries(node)) {\n const entry = value as Record<string, unknown>;\n if (entry.__operation) {\n const op = entry.__operation as OperationDef;\n const inputType = jsonSchemaToTS(op.inputSchema as Record<string, unknown>, indent + ' ');\n const outputType = jsonSchemaToTS(op.outputSchema as Record<string, unknown>, indent + ' ');\n const hasInput = operationHasInput(op);\n\n if (hasInput) {\n lines.push(`${indent}${key}(data: ${inputType}): Promise<${outputType}>;`);\n } else {\n lines.push(`${indent}${key}(): Promise<${outputType}>;`);\n }\n } else {\n lines.push(`${indent}${key}: {`);\n lines.push(generateTypeTree(entry, indent + ' '));\n lines.push(`${indent}};`);\n }\n }\n return lines.join('\\n');\n}\n\ntype RpcActionTypeEntry = {\n channel: string;\n inputType: string;\n outputType: string;\n hasInput: boolean;\n};\n\nfunction buildRpcControllerTree(\n operations: Map<string, OperationDef>,\n): Record<string, Record<string, RpcActionTypeEntry>> {\n const tree: Record<string, Record<string, RpcActionTypeEntry>> = {};\n\n for (const operation of operations.values()) {\n const controller = operation.controller;\n const action = operation.action;\n\n if (!tree[controller]) {\n tree[controller] = {};\n }\n\n if (tree[controller][action]) {\n throw new Error(\n `Type codegen failed: duplicate RPC action \"${controller}.${action}\" found in channel \"${operation.channel}\".`,\n );\n }\n\n tree[controller][action] = {\n channel: operation.channel,\n inputType: jsonSchemaToTS(operation.inputSchema as Record<string, unknown>, ' '),\n outputType: jsonSchemaToTS(operation.outputSchema as Record<string, unknown>, ' '),\n hasInput: operationHasInput(operation),\n };\n }\n\n return tree;\n}\n\nfunction generateRpcTypeTree(operations: Map<string, OperationDef>): string {\n const controllerTree = buildRpcControllerTree(operations);\n const controllerNames = Object.keys(controllerTree).sort((a, b) => a.localeCompare(b));\n const lines: string[] = [];\n\n for (const controllerName of controllerNames) {\n lines.push(` ${controllerName}: {`);\n const actions = controllerTree[controllerName];\n const actionNames = Object.keys(actions).sort((a, b) => a.localeCompare(b));\n for (const actionName of actionNames) {\n const action = actions[actionName];\n if (action.hasInput) {\n lines.push(` ${actionName}(data: ${action.inputType}): Promise<${action.outputType}>;`);\n } else {\n lines.push(` ${actionName}(): Promise<${action.outputType}>;`);\n }\n }\n lines.push(' };');\n }\n\n return lines.join('\\n');\n}\n\nexport function generateTypes(operations: Map<string, OperationDef>): string {\n const tree = buildNestedTypeTree(operations);\n const typesCode = generateTypeTree(tree);\n const rpcTypeCode = generateRpcTypeTree(operations);\n\n return `// AUTO-GENERATED by @noego/wood -- do not edit\nexport interface WoodRpcManifestEntry {\n channel: string;\n controller: string;\n action: string;\n path: string[];\n hasInput: boolean;\n}\n\nexport interface WoodRpcApi {\n${rpcTypeCode}\n}\n\nexport interface WoodApi {\n${typesCode}\n __rpcManifest: WoodRpcManifestEntry[];\n __load(route: string, params: Record<string, string>): Promise<unknown>;\n __navigate(windowId: string, route: string): Promise<void>;\n __window: {\n current(): Promise<{ ok: boolean; windowId?: string; defaultRoute?: string }>;\n open(windowId: string, options?: Record<string, unknown>): Promise<void>;\n close(windowId?: string): Promise<void>;\n focus(windowId: string): Promise<void>;\n minimize(windowId?: string): Promise<void>;\n maximize(windowId?: string): Promise<void>;\n };\n __debug: {\n current(): Promise<{\n ok: boolean;\n enabled: boolean;\n mode: 'development' | 'production';\n port?: number;\n windows: Array<{\n windowId: string;\n title: string;\n webContentsId: number;\n url: string;\n focused: boolean;\n }>;\n }>;\n };\n __contextMenu: {\n show(data: {\n items: Array<{ label?: string; action?: string; data?: string; _callbackId?: string; disabled?: boolean; type?: 'separator' }>;\n position: { x: number; y: number };\n }): Promise<void>;\n };\n on(channel: string, callback: (...args: unknown[]) => void): () => void;\n __log(level: string, logger: string, message: string, context?: unknown): Promise<{\n ok: boolean;\n forwarded: boolean;\n configured: boolean;\n reason?: 'unconfigured' | 'callback-error';\n errorMessage?: string;\n }>;\n}\n`;\n}\n"],"mappings":"AAEA,SAAS,kBAAkB,IAA2B;AACpD,SAAO;AAAA,IACL,GAAG,eACA,GAAG,YAAwC,SAAS,YACrD,OAAO,KAAM,GAAG,YAAwD,cAAc,CAAC,CAAC,EAAE,SAAS;AAAA,EACvG;AACF;AAEA,SAAS,eAAe,QAA6C,SAAiB,IAAY;AAChG,MAAI,CAAC,OAAQ,QAAO;AAEpB,QAAM,OAAO,OAAO;AAEpB,MAAI,SAAS,UAAU;AACrB,QAAI,OAAO,MAAM;AACf,aAAQ,OAAO,KAAkB,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,KAAK,KAAK;AAAA,IAClE;AACA,WAAO;AAAA,EACT;AACA,MAAI,SAAS,YAAY,SAAS,UAAW,QAAO;AACpD,MAAI,SAAS,UAAW,QAAO;AAC/B,MAAI,SAAS,SAAS;AACpB,UAAM,WAAW,eAAe,OAAO,OAAkC,MAAM;AAC/E,WAAO,SAAS,QAAQ;AAAA,EAC1B;AACA,MAAI,SAAS,UAAU;AACrB,UAAM,QAAS,OAAO,cAAc,CAAC;AACr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