@wrikka/solid-framework 0.0.0-stage → 0.15.0
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 +104 -3
- package/dist/vite.d.ts +661 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +10 -0
- package/dist/vite.js.map +1 -0
- package/package.json +247 -5
- package/src/actions/index.ts +5 -0
- package/src/actions/modules/action/adapters/http/handler.ts +80 -0
- package/src/actions/modules/action/application/index.ts +1 -0
- package/src/actions/modules/action/application/usecases/create-action.ts +92 -0
- package/src/actions/modules/action/application/usecases/index.ts +2 -0
- package/src/actions/modules/action/application/usecases/registry.ts +20 -0
- package/src/actions/modules/action/index.ts +2 -0
- package/src/actions/presentation/index.ts +1 -0
- package/src/actions/presentation/useSubmission.ts +46 -0
- package/src/actions/types/index.ts +35 -0
- package/src/app/index.ts +126 -0
- package/src/app/modules/ai/domain/operations/handler.ts +46 -0
- package/src/app/modules/ai/domain/operations/llms.ts +54 -0
- package/src/app/modules/ai/domain/operations/mcp.ts +134 -0
- package/src/app/modules/ai/index.ts +3 -0
- package/src/app/modules/api-docs/domain/operations/openapi.ts +113 -0
- package/src/app/modules/api-docs/index.ts +1 -0
- package/src/app/modules/app-def/index.ts +225 -0
- package/src/app/modules/auth/application/usecases/auth.ts +161 -0
- package/src/app/modules/auth/application/usecases/oauth.ts +105 -0
- package/src/app/modules/auth/index.ts +2 -0
- package/src/app/modules/cache/adapters/edge-kv.ts +55 -0
- package/src/app/modules/cache/adapters/fs.ts +58 -0
- package/src/app/modules/cache/adapters/memory.ts +13 -0
- package/src/app/modules/cache/domain/operations/tags.ts +114 -0
- package/src/app/modules/cache/index.ts +7 -0
- package/src/app/modules/cache/ports/store.ts +14 -0
- package/src/app/modules/config/domain/index.ts +1 -0
- package/src/app/modules/config/domain/models/config.ts +72 -0
- package/src/app/modules/config/domain/models/index.ts +1 -0
- package/src/app/modules/config/index.ts +1 -0
- package/src/app/modules/content/domain/operations/collection.ts +109 -0
- package/src/app/modules/content/index.ts +8 -0
- package/src/app/modules/content/presentation/Markdown.tsx +78 -0
- package/src/app/modules/conventions/domain/index.ts +1 -0
- package/src/app/modules/conventions/domain/operations/index.ts +1 -0
- package/src/app/modules/conventions/domain/operations/scan.ts +73 -0
- package/src/app/modules/conventions/index.ts +1 -0
- package/src/app/modules/db/application/usecases/db.ts +49 -0
- package/src/app/modules/db/index.ts +1 -0
- package/src/app/modules/deploy/adapters/aws-lambda.ts +54 -0
- package/src/app/modules/deploy/adapters/bun.ts +15 -0
- package/src/app/modules/deploy/adapters/cloudflare.ts +15 -0
- package/src/app/modules/deploy/adapters/deno.ts +15 -0
- package/src/app/modules/deploy/adapters/netlify.ts +18 -0
- package/src/app/modules/deploy/adapters/node.ts +63 -0
- package/src/app/modules/deploy/adapters/vercel.ts +22 -0
- package/src/app/modules/deploy/domain/models/preset.ts +38 -0
- package/src/app/modules/deploy/domain/operations/presets.ts +92 -0
- package/src/app/modules/deploy/index.ts +9 -0
- package/src/app/modules/draft/domain/operations/draft-mode.ts +125 -0
- package/src/app/modules/draft/index.ts +1 -0
- package/src/app/modules/env/domain/operations/create-env.ts +156 -0
- package/src/app/modules/env/index.ts +1 -0
- package/src/app/modules/file-routes/application/usecases/api-client.ts +120 -0
- package/src/app/modules/file-routes/domain/errors.ts +61 -0
- package/src/app/modules/file-routes/domain/index.ts +63 -0
- package/src/app/modules/file-routes/domain/models/index.ts +1 -0
- package/src/app/modules/file-routes/domain/models/route.ts +38 -0
- package/src/app/modules/file-routes/domain/operations/actions.ts +107 -0
- package/src/app/modules/file-routes/domain/operations/api.ts +87 -0
- package/src/app/modules/file-routes/domain/operations/codegen.ts +76 -0
- package/src/app/modules/file-routes/domain/operations/content.ts +61 -0
- package/src/app/modules/file-routes/domain/operations/defer.ts +245 -0
- package/src/app/modules/file-routes/domain/operations/index.ts +65 -0
- package/src/app/modules/file-routes/domain/operations/loader.ts +138 -0
- package/src/app/modules/file-routes/domain/operations/manifest.ts +229 -0
- package/src/app/modules/file-routes/domain/operations/match.ts +75 -0
- package/src/app/modules/file-routes/domain/operations/static-params.ts +58 -0
- package/src/app/modules/file-routes/domain/operations/typed.ts +127 -0
- package/src/app/modules/file-routes/index.ts +143 -0
- package/src/app/modules/file-routes/presentation/DevtoolsOverlay.tsx +234 -0
- package/src/app/modules/file-routes/presentation/FileRoutes.ts +254 -0
- package/src/app/modules/file-routes/presentation/Form.tsx +122 -0
- package/src/app/modules/file-routes/presentation/Link.tsx +132 -0
- package/src/app/modules/file-routes/presentation/ServerComponent.tsx +100 -0
- package/src/app/modules/file-routes/presentation/content-page.tsx +26 -0
- package/src/app/modules/file-routes/presentation/dev-events.ts +112 -0
- package/src/app/modules/file-routes/presentation/index.ts +98 -0
- package/src/app/modules/file-routes/presentation/loader-cache.ts +96 -0
- package/src/app/modules/file-routes/presentation/loader-data.ts +207 -0
- package/src/app/modules/file-routes/presentation/location.ts +217 -0
- package/src/app/modules/file-routes/presentation/normalize-route.ts +155 -0
- package/src/app/modules/file-routes/presentation/page-tree.ts +211 -0
- package/src/app/modules/file-routes/presentation/route-contexts.ts +89 -0
- package/src/app/modules/file-routes/presentation/route-def.ts +154 -0
- package/src/app/modules/file-routes/presentation/route-fallbacks.ts +66 -0
- package/src/app/modules/file-routes/presentation/route-modules.ts +138 -0
- package/src/app/modules/file-routes/presentation/slot.tsx +43 -0
- package/src/app/modules/file-routes/presentation/status.ts +13 -0
- package/src/app/modules/file-routes/presentation/use-action.ts +81 -0
- package/src/app/modules/file-routes/presentation/use-optimistic.ts +50 -0
- package/src/app/modules/file-routes/presentation/use-preload.ts +38 -0
- package/src/app/modules/file-routes/presentation/use-route.ts +254 -0
- package/src/app/modules/flash/domain/operations/flash.ts +70 -0
- package/src/app/modules/flash/index.ts +1 -0
- package/src/app/modules/fonts/domain/operations/font.ts +91 -0
- package/src/app/modules/fonts/index.ts +1 -0
- package/src/app/modules/i18n/domain/operations/i18n-middleware.ts +76 -0
- package/src/app/modules/i18n/domain/operations/locale.ts +39 -0
- package/src/app/modules/i18n/index.ts +3 -0
- package/src/app/modules/i18n/presentation/use-locale.ts +16 -0
- package/src/app/modules/middleware/domain/operations/request-id.ts +33 -0
- package/src/app/modules/middleware/domain/operations/run.ts +29 -0
- package/src/app/modules/middleware/index.ts +7 -0
- package/src/app/modules/route-rules/domain/index.ts +1 -0
- package/src/app/modules/route-rules/domain/operations/ab-variant.ts +58 -0
- package/src/app/modules/route-rules/domain/operations/index.ts +4 -0
- package/src/app/modules/route-rules/domain/operations/match.ts +51 -0
- package/src/app/modules/route-rules/domain/operations/rate-limit.ts +63 -0
- package/src/app/modules/route-rules/domain/operations/security.ts +67 -0
- package/src/app/modules/route-rules/index.ts +1 -0
- package/src/app/modules/runtime-config/application/index.ts +1 -0
- package/src/app/modules/runtime-config/application/usecases/index.ts +1 -0
- package/src/app/modules/runtime-config/application/usecases/runtime-config.ts +42 -0
- package/src/app/modules/runtime-config/index.ts +1 -0
- package/src/app/modules/seo/domain/operations/og.ts +66 -0
- package/src/app/modules/seo/domain/operations/site.ts +106 -0
- package/src/app/modules/seo/index.ts +2 -0
- package/src/app/modules/server-entry/application/index.ts +1 -0
- package/src/app/modules/server-entry/application/usecases/create-app-server.ts +205 -0
- package/src/app/modules/server-entry/application/usecases/devtools-handler.ts +31 -0
- package/src/app/modules/server-entry/application/usecases/image-handler.ts +38 -0
- package/src/app/modules/server-entry/application/usecases/index.ts +3 -0
- package/src/app/modules/server-entry/application/usecases/ops-handler.ts +55 -0
- package/src/app/modules/server-entry/application/usecases/prerender-cache.ts +59 -0
- package/src/app/modules/server-entry/application/usecases/route-render.ts +276 -0
- package/src/app/modules/server-entry/application/usecases/routed-entry.ts +194 -0
- package/src/app/modules/server-entry/application/usecases/static-handler.ts +20 -0
- package/src/app/modules/server-entry/application/usecases/zone-handler.ts +37 -0
- package/src/app/modules/server-entry/index.ts +1 -0
- package/src/app/modules/session/index.ts +77 -0
- package/src/app/modules/static/domain/operations/serve.ts +88 -0
- package/src/app/modules/static/index.ts +1 -0
- package/src/app/presentation/App.tsx +34 -0
- package/src/app/presentation/define-config.ts +11 -0
- package/src/app/presentation/index.ts +3 -0
- package/src/app/presentation/providers.ts +80 -0
- package/src/app/types/index.ts +273 -0
- package/src/assets/adapters/sharp.ts +83 -0
- package/src/assets/index.ts +6 -0
- package/src/assets/modules/assets/domain/index.ts +1 -0
- package/src/assets/modules/assets/domain/operations/image.ts +67 -0
- package/src/assets/modules/assets/domain/operations/index.ts +2 -0
- package/src/assets/modules/assets/domain/operations/manifest.ts +29 -0
- package/src/assets/modules/assets/index.ts +1 -0
- package/src/assets/presentation/Image.tsx +90 -0
- package/src/assets/presentation/index.ts +1 -0
- package/src/assets/types/index.ts +21 -0
- package/src/cli/bin.ts +8 -0
- package/src/cli/commands.ts +145 -0
- package/src/cli/doctor.ts +111 -0
- package/src/cli/index.ts +3 -0
- package/src/cli/infra.ts +38 -0
- package/src/cli/migrate.ts +119 -0
- package/src/cli/nav.ts +164 -0
- package/src/cli/ops.ts +135 -0
- package/src/cli/routes.ts +240 -0
- package/src/cli/scaffold.ts +217 -0
- package/src/devtools/App.tsx +14 -0
- package/src/devtools/adapters/connector.ts +23 -0
- package/src/devtools/adapters/index.ts +4 -0
- package/src/devtools/index.ts +26 -0
- package/src/devtools/modules/component-inspector/application/index.ts +4 -0
- package/src/devtools/modules/component-inspector/application/usecases/component-inspector.ts +67 -0
- package/src/devtools/modules/component-inspector/application/usecases/index.ts +5 -0
- package/src/devtools/modules/component-inspector/application/usecases/useComponentInspector.ts +52 -0
- package/src/devtools/modules/component-inspector/domain/events/component-events.ts +37 -0
- package/src/devtools/modules/component-inspector/domain/events/index.ts +4 -0
- package/src/devtools/modules/component-inspector/domain/index.ts +7 -0
- package/src/devtools/modules/component-inspector/domain/models/component-node.ts +30 -0
- package/src/devtools/modules/component-inspector/domain/models/component-tree.ts +20 -0
- package/src/devtools/modules/component-inspector/domain/models/index.ts +5 -0
- package/src/devtools/modules/component-inspector/domain/operations/component-operations.ts +63 -0
- package/src/devtools/modules/component-inspector/domain/operations/index.ts +4 -0
- package/src/devtools/modules/component-inspector/index.ts +7 -0
- package/src/devtools/modules/devtools/application/index.ts +4 -0
- package/src/devtools/modules/devtools/application/usecases/devtools.ts +60 -0
- package/src/devtools/modules/devtools/application/usecases/index.ts +5 -0
- package/src/devtools/modules/devtools/application/usecases/useDevtools.ts +47 -0
- package/src/devtools/modules/devtools/domain/events/devtools-events.ts +56 -0
- package/src/devtools/modules/devtools/domain/events/index.ts +4 -0
- package/src/devtools/modules/devtools/domain/index.ts +8 -0
- package/src/devtools/modules/devtools/domain/models/devtools-state.ts +15 -0
- package/src/devtools/modules/devtools/domain/models/index.ts +4 -0
- package/src/devtools/modules/devtools/domain/operations/devtools-operations.ts +27 -0
- package/src/devtools/modules/devtools/domain/operations/index.ts +4 -0
- package/src/devtools/modules/devtools/domain/validators/devtools-validators.ts +36 -0
- package/src/devtools/modules/devtools/domain/validators/index.ts +4 -0
- package/src/devtools/modules/devtools/index.ts +7 -0
- package/src/devtools/modules/devtools/ports/connector.ts +10 -0
- package/src/devtools/modules/devtools/ports/index.ts +4 -0
- package/src/devtools/modules/timeline/application/index.ts +4 -0
- package/src/devtools/modules/timeline/application/usecases/index.ts +5 -0
- package/src/devtools/modules/timeline/application/usecases/timeline.ts +61 -0
- package/src/devtools/modules/timeline/application/usecases/useTimeline.ts +37 -0
- package/src/devtools/modules/timeline/domain/events/index.ts +4 -0
- package/src/devtools/modules/timeline/domain/events/timeline-events.ts +34 -0
- package/src/devtools/modules/timeline/domain/index.ts +7 -0
- package/src/devtools/modules/timeline/domain/models/index.ts +4 -0
- package/src/devtools/modules/timeline/domain/models/timeline-event.ts +27 -0
- package/src/devtools/modules/timeline/domain/operations/index.ts +4 -0
- package/src/devtools/modules/timeline/domain/operations/timeline-operations.ts +28 -0
- package/src/devtools/modules/timeline/index.ts +7 -0
- package/src/devtools/presentation/DevtoolsPanel.tsx +80 -0
- package/src/devtools/presentation/components/ComponentTreeView.tsx +79 -0
- package/src/devtools/presentation/components/StateInspector.tsx +70 -0
- package/src/devtools/presentation/components/TimelineView.tsx +52 -0
- package/src/devtools/presentation/components/index.ts +7 -0
- package/src/devtools/presentation/composables/index.ts +7 -0
- package/src/devtools/presentation/composables/useComponentInspector.ts +52 -0
- package/src/devtools/presentation/index.ts +5 -0
- package/src/devtools/shared/errors/index.ts +23 -0
- package/src/devtools/shared/index.ts +7 -0
- package/src/devtools/shared/types/index.ts +6 -0
- package/src/devtools/shared/types/option.ts +58 -0
- package/src/devtools/shared/types/result.ts +53 -0
- package/src/devtools/shared/utils/index.ts +32 -0
- package/src/devtools/style.css +2 -0
- package/src/head/index.ts +5 -0
- package/src/head/modules/head/application/index.ts +1 -0
- package/src/head/modules/head/application/usecases/head-manager.ts +68 -0
- package/src/head/modules/head/application/usecases/index.ts +1 -0
- package/src/head/modules/head/domain/index.ts +3 -0
- package/src/head/modules/head/domain/models/head-tag.ts +73 -0
- package/src/head/modules/head/domain/models/index.ts +1 -0
- package/src/head/modules/head/domain/operations/dedupe.ts +18 -0
- package/src/head/modules/head/domain/operations/index.ts +2 -0
- package/src/head/modules/head/domain/operations/render-tags.ts +43 -0
- package/src/head/modules/head/domain/validators/index.ts +12 -0
- package/src/head/modules/head/index.ts +3 -0
- package/src/head/modules/head/ports/index.ts +11 -0
- package/src/head/presentation/HeadProvider.tsx +42 -0
- package/src/head/presentation/Tags.tsx +90 -0
- package/src/head/presentation/head-context.ts +11 -0
- package/src/head/presentation/index.ts +3 -0
- package/src/head/presentation/useHead.ts +77 -0
- package/src/head/shared/index.ts +1 -0
- package/src/head/shared/types/index.ts +5 -0
- package/src/head/types/index.ts +47 -0
- package/src/hooks/adapters/config/constants.ts +12 -0
- package/src/hooks/adapters/config/index.ts +48 -0
- package/src/hooks/adapters/index.ts +13 -0
- package/src/hooks/adapters/monaco/index.ts +96 -0
- package/src/hooks/adapters/qr/index.ts +65 -0
- package/src/hooks/index.ts +21 -0
- package/src/hooks/modules/array/application/index.ts +2 -0
- package/src/hooks/modules/array/application/usecases/index.ts +123 -0
- package/src/hooks/modules/array/domain/events/index.ts +5 -0
- package/src/hooks/modules/array/domain/index.ts +3 -0
- package/src/hooks/modules/array/domain/models/index.ts +2 -0
- package/src/hooks/modules/array/domain/operations/create.ts +10 -0
- package/src/hooks/modules/array/domain/operations/index.ts +31 -0
- package/src/hooks/modules/array/domain/operations/modify.ts +61 -0
- package/src/hooks/modules/array/domain/operations/query.ts +36 -0
- package/src/hooks/modules/array/domain/validators/index.ts +5 -0
- package/src/hooks/modules/array/index.ts +5 -0
- package/src/hooks/modules/array/types/index.ts +9 -0
- package/src/hooks/modules/counter/application/index.ts +12 -0
- package/src/hooks/modules/counter/application/usecases/index.ts +156 -0
- package/src/hooks/modules/counter/domain/events/index.ts +6 -0
- package/src/hooks/modules/counter/domain/index.ts +21 -0
- package/src/hooks/modules/counter/domain/models/index.ts +2 -0
- package/src/hooks/modules/counter/domain/operations/calculate.ts +22 -0
- package/src/hooks/modules/counter/domain/operations/create.ts +22 -0
- package/src/hooks/modules/counter/domain/operations/index.ts +25 -0
- package/src/hooks/modules/counter/domain/operations/modify.ts +78 -0
- package/src/hooks/modules/counter/domain/operations/query.ts +38 -0
- package/src/hooks/modules/counter/domain/operations/validate.ts +58 -0
- package/src/hooks/modules/counter/domain/validators/counter-validators.ts +19 -0
- package/src/hooks/modules/counter/domain/validators/index.ts +2 -0
- package/src/hooks/modules/counter/index.ts +6 -0
- package/src/hooks/modules/counter/ports/index.ts +7 -0
- package/src/hooks/modules/counter/types/index.ts +13 -0
- package/src/hooks/modules/editor/application/index.ts +6 -0
- package/src/hooks/modules/editor/application/useCodeEditor.ts +81 -0
- package/src/hooks/modules/editor/domain/events/editor-events.ts +16 -0
- package/src/hooks/modules/editor/domain/events/index.ts +6 -0
- package/src/hooks/modules/editor/domain/index.ts +7 -0
- package/src/hooks/modules/editor/domain/models/editor.ts +16 -0
- package/src/hooks/modules/editor/domain/models/index.ts +6 -0
- package/src/hooks/modules/editor/domain/validators/index.ts +34 -0
- package/src/hooks/modules/editor/index.ts +8 -0
- package/src/hooks/modules/editor/types/index.ts +34 -0
- package/src/hooks/modules/sensor/application/index.ts +2 -0
- package/src/hooks/modules/sensor/application/usecases/index.ts +25 -0
- package/src/hooks/modules/sensor/domain/events/index.ts +12 -0
- package/src/hooks/modules/sensor/domain/index.ts +10 -0
- package/src/hooks/modules/sensor/domain/models/index.ts +7 -0
- package/src/hooks/modules/sensor/domain/operations/gamepad.ts +16 -0
- package/src/hooks/modules/sensor/domain/operations/index.ts +12 -0
- package/src/hooks/modules/sensor/domain/operations/motion.ts +10 -0
- package/src/hooks/modules/sensor/domain/operations/orientation.ts +10 -0
- package/src/hooks/modules/sensor/domain/validators/index.ts +2 -0
- package/src/hooks/modules/sensor/index.ts +10 -0
- package/src/hooks/modules/sensor/ports/index.ts +8 -0
- package/src/hooks/modules/sensor/types/index.ts +29 -0
- package/src/hooks/modules/storage/application/index.ts +2 -0
- package/src/hooks/modules/storage/application/usecases/index.ts +18 -0
- package/src/hooks/modules/storage/domain/events/index.ts +5 -0
- package/src/hooks/modules/storage/domain/index.ts +6 -0
- package/src/hooks/modules/storage/domain/models/index.ts +6 -0
- package/src/hooks/modules/storage/domain/models/storage.ts +11 -0
- package/src/hooks/modules/storage/domain/operations/index.ts +8 -0
- package/src/hooks/modules/storage/domain/operations/serialize.ts +22 -0
- package/src/hooks/modules/storage/domain/operations/validate.ts +7 -0
- package/src/hooks/modules/storage/domain/validators/index.ts +2 -0
- package/src/hooks/modules/storage/index.ts +6 -0
- package/src/hooks/modules/storage/ports/index.ts +7 -0
- package/src/hooks/modules/storage/types/index.ts +6 -0
- package/src/hooks/modules/time/application/index.ts +2 -0
- package/src/hooks/modules/time/application/usecases/index.ts +5 -0
- package/src/hooks/modules/time/application/usecases/use-debounce.ts +10 -0
- package/src/hooks/modules/time/application/usecases/use-interval.ts +10 -0
- package/src/hooks/modules/time/application/usecases/use-throttle.ts +10 -0
- package/src/hooks/modules/time/application/usecases/use-timeout.ts +10 -0
- package/src/hooks/modules/time/domain/events/index.ts +6 -0
- package/src/hooks/modules/time/domain/index.ts +12 -0
- package/src/hooks/modules/time/domain/models/index.ts +6 -0
- package/src/hooks/modules/time/domain/models/time.ts +16 -0
- package/src/hooks/modules/time/domain/operations/calculate.ts +8 -0
- package/src/hooks/modules/time/domain/operations/index.ts +11 -0
- package/src/hooks/modules/time/domain/operations/validate.ts +11 -0
- package/src/hooks/modules/time/domain/validators/index.ts +2 -0
- package/src/hooks/modules/time/index.ts +5 -0
- package/src/hooks/modules/time/ports/index.ts +9 -0
- package/src/hooks/modules/time/types/index.ts +18 -0
- package/src/hooks/modules/toggle/application/index.ts +2 -0
- package/src/hooks/modules/toggle/application/usecases/index.ts +48 -0
- package/src/hooks/modules/toggle/domain/events/index.ts +4 -0
- package/src/hooks/modules/toggle/domain/index.ts +11 -0
- package/src/hooks/modules/toggle/domain/models/index.ts +7 -0
- package/src/hooks/modules/toggle/domain/operations/create.ts +11 -0
- package/src/hooks/modules/toggle/domain/operations/index.ts +12 -0
- package/src/hooks/modules/toggle/domain/operations/modify.ts +18 -0
- package/src/hooks/modules/toggle/domain/operations/query.ts +9 -0
- package/src/hooks/modules/toggle/domain/validators/index.ts +2 -0
- package/src/hooks/modules/toggle/index.ts +6 -0
- package/src/hooks/modules/toggle/ports/index.ts +5 -0
- package/src/hooks/modules/toggle/types/index.ts +9 -0
- package/src/hooks/presentation/index.ts +2 -0
- package/src/hooks/presentation/solid/animation/index.ts +11 -0
- package/src/hooks/presentation/solid/animation/useElapsedTime.ts +75 -0
- package/src/hooks/presentation/solid/animation/useInterval.ts +68 -0
- package/src/hooks/presentation/solid/animation/useIntervalFn.ts +54 -0
- package/src/hooks/presentation/solid/animation/useNow.ts +57 -0
- package/src/hooks/presentation/solid/animation/useRafFn.ts +57 -0
- package/src/hooks/presentation/solid/animation/useTimeout.ts +55 -0
- package/src/hooks/presentation/solid/animation/useTimeoutFn.ts +55 -0
- package/src/hooks/presentation/solid/animation/useTimestamp.ts +61 -0
- package/src/hooks/presentation/solid/animation/useTransition.ts +87 -0
- package/src/hooks/presentation/solid/array/index.ts +14 -0
- package/src/hooks/presentation/solid/array/useArrayConcat.ts +18 -0
- package/src/hooks/presentation/solid/array/useArrayEvery.ts +8 -0
- package/src/hooks/presentation/solid/array/useArrayFilter.ts +8 -0
- package/src/hooks/presentation/solid/array/useArrayFind.ts +8 -0
- package/src/hooks/presentation/solid/array/useArrayIncludes.ts +8 -0
- package/src/hooks/presentation/solid/array/useArrayMap.ts +8 -0
- package/src/hooks/presentation/solid/array/useArrayPop.ts +18 -0
- package/src/hooks/presentation/solid/array/useArrayPush.ts +15 -0
- package/src/hooks/presentation/solid/array/useArrayReduce.ts +9 -0
- package/src/hooks/presentation/solid/array/useArrayShift.ts +18 -0
- package/src/hooks/presentation/solid/array/useArraySome.ts +8 -0
- package/src/hooks/presentation/solid/array/useArraySort.ts +12 -0
- package/src/hooks/presentation/solid/browser/index.ts +35 -0
- package/src/hooks/presentation/solid/browser/useBarcode.ts +15 -0
- package/src/hooks/presentation/solid/browser/useBattery.ts +37 -0
- package/src/hooks/presentation/solid/browser/useBeacon.ts +4 -0
- package/src/hooks/presentation/solid/browser/useBluetooth.ts +15 -0
- package/src/hooks/presentation/solid/browser/useClipboard.ts +17 -0
- package/src/hooks/presentation/solid/browser/useClipboardAdvanced.ts +54 -0
- package/src/hooks/presentation/solid/browser/useConnection.ts +22 -0
- package/src/hooks/presentation/solid/browser/useCredential.ts +18 -0
- package/src/hooks/presentation/solid/browser/useDisplayMedia.ts +24 -0
- package/src/hooks/presentation/solid/browser/useFaceDetection.ts +20 -0
- package/src/hooks/presentation/solid/browser/useFullscreen.ts +33 -0
- package/src/hooks/presentation/solid/browser/useGeolocation.ts +64 -0
- package/src/hooks/presentation/solid/browser/useLocalStorage.ts +11 -0
- package/src/hooks/presentation/solid/browser/useMediaDevices.ts +24 -0
- package/src/hooks/presentation/solid/browser/useMemory.ts +9 -0
- package/src/hooks/presentation/solid/browser/useNetwork.ts +43 -0
- package/src/hooks/presentation/solid/browser/useNotification.ts +21 -0
- package/src/hooks/presentation/solid/browser/usePayment.ts +17 -0
- package/src/hooks/presentation/solid/browser/usePerformance.ts +13 -0
- package/src/hooks/presentation/solid/browser/usePush.ts +12 -0
- package/src/hooks/presentation/solid/browser/useQrCode.ts +11 -0
- package/src/hooks/presentation/solid/browser/useScreenOrientation.ts +37 -0
- package/src/hooks/presentation/solid/browser/useServiceWorker.ts +29 -0
- package/src/hooks/presentation/solid/browser/useSessionStorage.ts +11 -0
- package/src/hooks/presentation/solid/browser/useShare.ts +12 -0
- package/src/hooks/presentation/solid/browser/useSpeechRecognition.ts +71 -0
- package/src/hooks/presentation/solid/browser/useSpeechSynthesis.ts +54 -0
- package/src/hooks/presentation/solid/browser/useStorage.ts +22 -0
- package/src/hooks/presentation/solid/browser/useTextDetection.ts +20 -0
- package/src/hooks/presentation/solid/browser/useUsb.ts +15 -0
- package/src/hooks/presentation/solid/browser/useUserMedia.ts +24 -0
- package/src/hooks/presentation/solid/browser/useVibration.ts +12 -0
- package/src/hooks/presentation/solid/browser/useWakeLock.ts +29 -0
- package/src/hooks/presentation/solid/browser/useWebAuthn.ts +35 -0
- package/src/hooks/presentation/solid/elements/index.ts +51 -0
- package/src/hooks/presentation/solid/elements/useActive.ts +33 -0
- package/src/hooks/presentation/solid/elements/useAudio.ts +82 -0
- package/src/hooks/presentation/solid/elements/useBreakpoints.ts +56 -0
- package/src/hooks/presentation/solid/elements/useCanvas.ts +43 -0
- package/src/hooks/presentation/solid/elements/useClick.ts +49 -0
- package/src/hooks/presentation/solid/elements/useDrag.ts +56 -0
- package/src/hooks/presentation/solid/elements/useDraggable.ts +57 -0
- package/src/hooks/presentation/solid/elements/useDraggableHandle.ts +92 -0
- package/src/hooks/presentation/solid/elements/useDrop.ts +54 -0
- package/src/hooks/presentation/solid/elements/useDropZone.ts +67 -0
- package/src/hooks/presentation/solid/elements/useElementBounding.ts +52 -0
- package/src/hooks/presentation/solid/elements/useElementSize.ts +30 -0
- package/src/hooks/presentation/solid/elements/useElementVisibility.ts +33 -0
- package/src/hooks/presentation/solid/elements/useFileDialog.ts +33 -0
- package/src/hooks/presentation/solid/elements/useFileInput.ts +20 -0
- package/src/hooks/presentation/solid/elements/useFocus.ts +49 -0
- package/src/hooks/presentation/solid/elements/useHover.ts +33 -0
- package/src/hooks/presentation/solid/elements/useImagePreview.ts +27 -0
- package/src/hooks/presentation/solid/elements/useImageUpload.ts +66 -0
- package/src/hooks/presentation/solid/elements/useInfiniteScroll.ts +52 -0
- package/src/hooks/presentation/solid/elements/useIntersectionAdvanced.ts +43 -0
- package/src/hooks/presentation/solid/elements/useIntersectionObserver.ts +40 -0
- package/src/hooks/presentation/solid/elements/useLayout.ts +47 -0
- package/src/hooks/presentation/solid/elements/useLongPress.ts +54 -0
- package/src/hooks/presentation/solid/elements/useMagicKeys.ts +60 -0
- package/src/hooks/presentation/solid/elements/useMediaQuery.ts +24 -0
- package/src/hooks/presentation/solid/elements/useModal.ts +24 -0
- package/src/hooks/presentation/solid/elements/useMouse.ts +51 -0
- package/src/hooks/presentation/solid/elements/useMutationObserver.ts +38 -0
- package/src/hooks/presentation/solid/elements/useOnClickOutside.ts +25 -0
- package/src/hooks/presentation/solid/elements/useOnKeyStroke.ts +33 -0
- package/src/hooks/presentation/solid/elements/useParallax.ts +34 -0
- package/src/hooks/presentation/solid/elements/usePerformanceObserver.ts +30 -0
- package/src/hooks/presentation/solid/elements/usePinch.ts +61 -0
- package/src/hooks/presentation/solid/elements/usePopover.ts +54 -0
- package/src/hooks/presentation/solid/elements/useResize.ts +34 -0
- package/src/hooks/presentation/solid/elements/useResizeObserver.ts +42 -0
- package/src/hooks/presentation/solid/elements/useRotate.ts +42 -0
- package/src/hooks/presentation/solid/elements/useScroll.ts +97 -0
- package/src/hooks/presentation/solid/elements/useScrollTo.ts +30 -0
- package/src/hooks/presentation/solid/elements/useSortable.ts +22 -0
- package/src/hooks/presentation/solid/elements/useSplitter.ts +61 -0
- package/src/hooks/presentation/solid/elements/useSticky.ts +33 -0
- package/src/hooks/presentation/solid/elements/useSvg.ts +31 -0
- package/src/hooks/presentation/solid/elements/useSwipe.ts +87 -0
- package/src/hooks/presentation/solid/elements/useTabs.ts +44 -0
- package/src/hooks/presentation/solid/elements/useTooltip.ts +57 -0
- package/src/hooks/presentation/solid/elements/useVideo.ts +83 -0
- package/src/hooks/presentation/solid/elements/useVirtualList.ts +43 -0
- package/src/hooks/presentation/solid/elements/useWebgl.ts +36 -0
- package/src/hooks/presentation/solid/index.ts +11 -0
- package/src/hooks/presentation/solid/math/index.ts +10 -0
- package/src/hooks/presentation/solid/math/useAbs.ts +9 -0
- package/src/hooks/presentation/solid/math/useCeil.ts +9 -0
- package/src/hooks/presentation/solid/math/useClamp.ts +24 -0
- package/src/hooks/presentation/solid/math/useExp.ts +9 -0
- package/src/hooks/presentation/solid/math/useFloor.ts +9 -0
- package/src/hooks/presentation/solid/math/useLog.ts +21 -0
- package/src/hooks/presentation/solid/math/useMath.ts +3 -0
- package/src/hooks/presentation/solid/math/useOffset.ts +20 -0
- package/src/hooks/presentation/solid/math/usePow.ts +16 -0
- package/src/hooks/presentation/solid/math/useRound.ts +24 -0
- package/src/hooks/presentation/solid/math/useSign.ts +9 -0
- package/src/hooks/presentation/solid/math/useSqrt.ts +9 -0
- package/src/hooks/presentation/solid/network/index.ts +5 -0
- package/src/hooks/presentation/solid/network/useEventSource.ts +87 -0
- package/src/hooks/presentation/solid/network/useFetch.ts +187 -0
- package/src/hooks/presentation/solid/network/useWebSocket.ts +120 -0
- package/src/hooks/presentation/solid/sensors/index.ts +21 -0
- package/src/hooks/presentation/solid/sensors/useAbsoluteOrientation.ts +41 -0
- package/src/hooks/presentation/solid/sensors/useAccelerometer.ts +39 -0
- package/src/hooks/presentation/solid/sensors/useAmbientLight.ts +35 -0
- package/src/hooks/presentation/solid/sensors/useDeviceMotion.ts +50 -0
- package/src/hooks/presentation/solid/sensors/useDeviceOrientation.ts +38 -0
- package/src/hooks/presentation/solid/sensors/useGamepad.ts +52 -0
- package/src/hooks/presentation/solid/sensors/useGamepadRumble.ts +28 -0
- package/src/hooks/presentation/solid/sensors/useGravity.ts +39 -0
- package/src/hooks/presentation/solid/sensors/useGyroscope.ts +39 -0
- package/src/hooks/presentation/solid/sensors/useHID.ts +19 -0
- package/src/hooks/presentation/solid/sensors/useLinearAcceleration.ts +41 -0
- package/src/hooks/presentation/solid/sensors/useMagnetometer.ts +39 -0
- package/src/hooks/presentation/solid/sensors/useMotion.ts +31 -0
- package/src/hooks/presentation/solid/sensors/useNFC.ts +19 -0
- package/src/hooks/presentation/solid/sensors/usePressure.ts +35 -0
- package/src/hooks/presentation/solid/sensors/useProximity.ts +38 -0
- package/src/hooks/presentation/solid/sensors/useRelativeOrientation.ts +41 -0
- package/src/hooks/presentation/solid/sensors/useSerial.ts +18 -0
- package/src/hooks/presentation/solid/sensors/useShake.ts +54 -0
- package/src/hooks/presentation/solid/sensors/useTilt.ts +31 -0
- package/src/hooks/presentation/solid/state/createSharedComposable.ts +24 -0
- package/src/hooks/presentation/solid/state/index.ts +14 -0
- package/src/hooks/presentation/solid/state/reactivity.ts +43 -0
- package/src/hooks/presentation/solid/state/refDebounced.ts +27 -0
- package/src/hooks/presentation/solid/state/refThrottled.ts +39 -0
- package/src/hooks/presentation/solid/state/syncRef.ts +24 -0
- package/src/hooks/presentation/solid/state/toRef.ts +18 -0
- package/src/hooks/presentation/solid/state/useArray.ts +55 -0
- package/src/hooks/presentation/solid/state/useCounter.ts +24 -0
- package/src/hooks/presentation/solid/state/useToggle.ts +20 -0
- package/src/hooks/presentation/solid/time/index.ts +6 -0
- package/src/hooks/presentation/solid/time/useDebounceFn.ts +18 -0
- package/src/hooks/presentation/solid/time/useInterval.ts +44 -0
- package/src/hooks/presentation/solid/time/useThrottleFn.ts +30 -0
- package/src/hooks/presentation/solid/time/useTimeout.ts +37 -0
- package/src/hooks/presentation/solid/time/watchDebounced.ts +19 -0
- package/src/hooks/presentation/solid/time/watchPausable.ts +29 -0
- package/src/hooks/presentation/solid/time/whenever.ts +13 -0
- package/src/hooks/presentation/solid/utilities/index.ts +8 -0
- package/src/hooks/presentation/solid/utilities/useArrayEvery.ts +8 -0
- package/src/hooks/presentation/solid/utilities/useArrayFilter.ts +11 -0
- package/src/hooks/presentation/solid/utilities/useArrayFind.ts +8 -0
- package/src/hooks/presentation/solid/utilities/useArrayIncludes.ts +8 -0
- package/src/hooks/presentation/solid/utilities/useArrayMap.ts +8 -0
- package/src/hooks/presentation/solid/utilities/useArrayReduce.ts +9 -0
- package/src/hooks/presentation/solid/utilities/useArraySome.ts +8 -0
- package/src/hooks/presentation/solid/utilities/useArraySort.ts +12 -0
- package/src/hooks/presentation/solid/utilities/useClamp.ts +24 -0
- package/src/hooks/presentation/solid/utilities/useDebounce.ts +32 -0
- package/src/hooks/presentation/solid/utilities/useEventBus.ts +57 -0
- package/src/hooks/presentation/solid/utilities/useMemoize.ts +15 -0
- package/src/hooks/presentation/solid/utilities/useOffset.ts +20 -0
- package/src/hooks/presentation/solid/utilities/useRound.ts +24 -0
- package/src/hooks/presentation/solid/utilities/useSorted.ts +12 -0
- package/src/hooks/presentation/solid/utilities/useThrottle.ts +44 -0
- package/src/hooks/presentation/solid/utilities/useToNumber.ts +11 -0
- package/src/hooks/presentation/solid/utilities/useToString.ts +10 -0
- package/src/hooks/realtime/use-sse.ts +70 -0
- package/src/hooks/shared/constants/index.ts +4 -0
- package/src/hooks/shared/errors/index.ts +1 -0
- package/src/hooks/shared/errors/validation-error.ts +28 -0
- package/src/hooks/shared/index.ts +8 -0
- package/src/hooks/shared/types/index.ts +17 -0
- package/src/hooks/shared/types/option.ts +17 -0
- package/src/hooks/shared/types/result.ts +34 -0
- package/src/hooks/shared/types/utilities.ts +102 -0
- package/src/hooks/shared/utils/identity.ts +2 -0
- package/src/hooks/shared/utils/index.ts +4 -0
- package/src/hooks/shared/utils/logger.ts +69 -0
- package/src/hooks/shared/utils/pipe.ts +5 -0
- package/src/hooks/shared/utils/result.ts +9 -0
- package/src/hooks/test/counter.test.ts +25 -0
- package/src/index.ts +16 -0
- package/src/internal.ts +61 -0
- package/src/query/adapters/devtools/index.ts +29 -0
- package/src/query/adapters/persistence/index.ts +62 -0
- package/src/query/adapters/solid/index.ts +10 -0
- package/src/query/adapters/solid/solid-query-context.ts +29 -0
- package/src/query/adapters/solid/solid-query-empty-result.ts +34 -0
- package/src/query/adapters/solid/solid-query-options.ts +52 -0
- package/src/query/adapters/solid/solid-query-use-infinite.ts +228 -0
- package/src/query/adapters/solid/solid-query-use-mutation.ts +54 -0
- package/src/query/adapters/solid/solid-query-use-query.ts +75 -0
- package/src/query/adapters/solid/solid.test.ts +53 -0
- package/src/query/adapters/validation/index.ts +20 -0
- package/src/query/index.test.ts +203 -0
- package/src/query/index.ts +4 -0
- package/src/query/modules/query/application/usecases/query-client-data.ts +29 -0
- package/src/query/modules/query/application/usecases/query-client-helpers.ts +49 -0
- package/src/query/modules/query/application/usecases/query-client-infinite.ts +39 -0
- package/src/query/modules/query/application/usecases/query-client.ts +251 -0
- package/src/query/modules/query/domain/models/mutation-cache.ts +115 -0
- package/src/query/modules/query/domain/models/mutation.ts +207 -0
- package/src/query/modules/query/domain/models/query-cache.ts +119 -0
- package/src/query/modules/query/domain/models/query-environment.ts +16 -0
- package/src/query/modules/query/domain/models/query-observer.ts +162 -0
- package/src/query/modules/query/domain/models/query-operations.ts +76 -0
- package/src/query/modules/query/domain/models/query.ts +239 -0
- package/src/query/modules/query/domain/operations/index.ts +76 -0
- package/src/query/modules/query/index.ts +9 -0
- package/src/query/modules/query/ports/index.ts +53 -0
- package/src/query/modules/query/types/index.ts +239 -0
- package/src/query/shared/index.ts +48 -0
- package/src/render/adapters/index.ts +1 -0
- package/src/render/adapters/solid-web/hydration.ts +35 -0
- package/src/render/adapters/solid-web/index.ts +3 -0
- package/src/render/adapters/solid-web/renderer.ts +20 -0
- package/src/render/index.ts +7 -0
- package/src/render/modules/render/application/index.ts +1 -0
- package/src/render/modules/render/application/usecases/index.ts +4 -0
- package/src/render/modules/render/application/usecases/remote-island.ts +46 -0
- package/src/render/modules/render/application/usecases/render-page.ts +86 -0
- package/src/render/modules/render/application/usecases/render-shell.ts +56 -0
- package/src/render/modules/render/application/usecases/stream-page.ts +159 -0
- package/src/render/modules/render/domain/index.ts +3 -0
- package/src/render/modules/render/domain/models/context.ts +34 -0
- package/src/render/modules/render/domain/models/document.ts +26 -0
- package/src/render/modules/render/domain/models/index.ts +2 -0
- package/src/render/modules/render/domain/operations/document.ts +58 -0
- package/src/render/modules/render/domain/operations/hydration.ts +58 -0
- package/src/render/modules/render/domain/operations/index.ts +3 -0
- package/src/render/modules/render/domain/operations/rsc.ts +53 -0
- package/src/render/modules/render/domain/validators/index.ts +11 -0
- package/src/render/modules/render/index.ts +3 -0
- package/src/render/modules/render/ports/index.ts +17 -0
- package/src/render/presentation/ClientComponent.tsx +42 -0
- package/src/render/presentation/Document.tsx +45 -0
- package/src/render/presentation/Island.tsx +146 -0
- package/src/render/presentation/RemoteIsland.tsx +68 -0
- package/src/render/presentation/entries.ts +83 -0
- package/src/render/presentation/index.ts +5 -0
- package/src/render/shared/index.ts +2 -0
- package/src/render/shared/types/index.ts +9 -0
- package/src/render/shared/utils/index.ts +1 -0
- package/src/render/shared/utils/result.ts +30 -0
- package/src/render/types/index.ts +58 -0
- package/src/router/adapters/index.ts +1 -0
- package/src/router/adapters/solid-start/index.ts +42 -0
- package/src/router/cli/bundle-analyzer.ts +142 -0
- package/src/router/cli/index.ts +3 -0
- package/src/router/cli/migration-cli.ts +217 -0
- package/src/router/cli/route-generator-config.ts +109 -0
- package/src/router/cli/route-generator-templates.ts +117 -0
- package/src/router/cli/route-generator-types.ts +9 -0
- package/src/router/cli/route-generator-utils.ts +40 -0
- package/src/router/cli/route-generator.ts +64 -0
- package/src/router/index.test.ts +7 -0
- package/src/router/index.ts +21 -0
- package/src/router/modules/navigation/application/index.ts +1 -0
- package/src/router/modules/navigation/application/usecases.ts +42 -0
- package/src/router/modules/navigation/domain/index.ts +2 -0
- package/src/router/modules/navigation/domain/models.ts +44 -0
- package/src/router/modules/navigation/domain/operations.ts +28 -0
- package/src/router/modules/navigation/index.ts +3 -0
- package/src/router/modules/navigation/types/index.ts +15 -0
- package/src/router/modules/route-cache/application/usecases/index.ts +74 -0
- package/src/router/modules/route-cache/domain/models/index.ts +63 -0
- package/src/router/modules/route-cache/domain/operations/cache-evict.ts +104 -0
- package/src/router/modules/route-cache/domain/operations/cache-invalidate.ts +101 -0
- package/src/router/modules/route-cache/domain/operations/cache-read.ts +74 -0
- package/src/router/modules/route-cache/domain/operations/cache-write.ts +62 -0
- package/src/router/modules/route-cache/domain/operations/index.ts +4 -0
- package/src/router/modules/route-cache/domain/validators/index.ts +25 -0
- package/src/router/modules/route-cache/index.ts +8 -0
- package/src/router/modules/route-cache/ports/index.ts +20 -0
- package/src/router/modules/route-cache/types/index.ts +8 -0
- package/src/router/modules/route-error-tracking/application/usecases/index.ts +182 -0
- package/src/router/modules/route-error-tracking/domain/index.ts +5 -0
- package/src/router/modules/route-error-tracking/domain/models/index.ts +130 -0
- package/src/router/modules/route-error-tracking/domain/operations/error-cleanup.ts +50 -0
- package/src/router/modules/route-error-tracking/domain/operations/error-queries.ts +103 -0
- package/src/router/modules/route-error-tracking/domain/operations/error-recording.ts +112 -0
- package/src/router/modules/route-error-tracking/domain/operations/error-reporting.ts +55 -0
- package/src/router/modules/route-error-tracking/domain/operations/index.ts +4 -0
- package/src/router/modules/route-error-tracking/domain/validators/index.ts +46 -0
- package/src/router/modules/route-error-tracking/index.ts +8 -0
- package/src/router/modules/route-error-tracking/ports/index.ts +20 -0
- package/src/router/modules/route-error-tracking/types/index.ts +6 -0
- package/src/router/modules/route-feature-flags/application/usecases/index.ts +159 -0
- package/src/router/modules/route-feature-flags/domain/index.ts +5 -0
- package/src/router/modules/route-feature-flags/domain/models/index.ts +102 -0
- package/src/router/modules/route-feature-flags/domain/operations/feature-flag-audit.ts +37 -0
- package/src/router/modules/route-feature-flags/domain/operations/feature-flag-conditions.ts +52 -0
- package/src/router/modules/route-feature-flags/domain/operations/feature-flag-flags.ts +205 -0
- package/src/router/modules/route-feature-flags/domain/operations/feature-flag-routes.ts +54 -0
- package/src/router/modules/route-feature-flags/domain/operations/feature-flag-segments.ts +22 -0
- package/src/router/modules/route-feature-flags/domain/operations/feature-flag-statistics.ts +22 -0
- package/src/router/modules/route-feature-flags/domain/operations/index.ts +6 -0
- package/src/router/modules/route-feature-flags/domain/validators/index.ts +40 -0
- package/src/router/modules/route-feature-flags/index.ts +8 -0
- package/src/router/modules/route-feature-flags/ports/index.ts +23 -0
- package/src/router/modules/route-feature-flags/types/index.ts +7 -0
- package/src/router/modules/route-i18n/application/usecases/index.ts +81 -0
- package/src/router/modules/route-i18n/domain/models/index.ts +85 -0
- package/src/router/modules/route-i18n/domain/operations/index.ts +201 -0
- package/src/router/modules/route-i18n/domain/validators/index.ts +43 -0
- package/src/router/modules/route-i18n/index.ts +8 -0
- package/src/router/modules/route-i18n/ports/index.ts +20 -0
- package/src/router/modules/route-i18n/types/index.ts +7 -0
- package/src/router/modules/route-navigation-timeline/application/usecases/index.ts +182 -0
- package/src/router/modules/route-navigation-timeline/domain/index.ts +5 -0
- package/src/router/modules/route-navigation-timeline/domain/models/index.ts +143 -0
- package/src/router/modules/route-navigation-timeline/domain/operations/index.ts +177 -0
- package/src/router/modules/route-navigation-timeline/domain/validators/index.ts +19 -0
- package/src/router/modules/route-navigation-timeline/index.ts +8 -0
- package/src/router/modules/route-navigation-timeline/ports/index.ts +30 -0
- package/src/router/modules/route-navigation-timeline/types/index.ts +5 -0
- package/src/router/modules/route-performance/application/usecases/index.ts +166 -0
- package/src/router/modules/route-performance/domain/models/index.ts +96 -0
- package/src/router/modules/route-performance/domain/operations/index.ts +5 -0
- package/src/router/modules/route-performance/domain/operations/performance-cleanup.ts +29 -0
- package/src/router/modules/route-performance/domain/operations/performance-queries.ts +91 -0
- package/src/router/modules/route-performance/domain/operations/performance-recording.ts +151 -0
- package/src/router/modules/route-performance/domain/operations/performance-reporting.ts +32 -0
- package/src/router/modules/route-performance/domain/operations/performance-tracking.ts +75 -0
- package/src/router/modules/route-performance/domain/validators/index.ts +55 -0
- package/src/router/modules/route-performance/index.ts +8 -0
- package/src/router/modules/route-performance/ports/index.ts +25 -0
- package/src/router/modules/route-performance/types/index.ts +6 -0
- package/src/router/modules/route-security/application/usecases/index.ts +153 -0
- package/src/router/modules/route-security/domain/models/index.ts +216 -0
- package/src/router/modules/route-security/domain/operations/index.ts +165 -0
- package/src/router/modules/route-security/domain/validators/index.ts +32 -0
- package/src/router/modules/route-security/index.ts +8 -0
- package/src/router/modules/route-security/ports/index.ts +31 -0
- package/src/router/modules/route-security/types/index.ts +11 -0
- package/src/router/modules/route-testing/application/usecases/index.ts +131 -0
- package/src/router/modules/route-testing/domain/models/index.ts +217 -0
- package/src/router/modules/route-testing/domain/operations/contract-testing-operations.ts +239 -0
- package/src/router/modules/route-testing/domain/operations/e2e-testing-operations.ts +167 -0
- package/src/router/modules/route-testing/domain/operations/index.ts +3 -0
- package/src/router/modules/route-testing/domain/operations/route-testing-core.ts +48 -0
- package/src/router/modules/route-testing/domain/validators/index.ts +34 -0
- package/src/router/modules/route-testing/index.ts +8 -0
- package/src/router/modules/route-testing/ports/index.ts +21 -0
- package/src/router/modules/route-testing/types/index.ts +13 -0
- package/src/router/modules/routing/application/index.ts +7 -0
- package/src/router/modules/routing/application/usecases.ts +49 -0
- package/src/router/modules/routing/domain/ab-testing.ts +86 -0
- package/src/router/modules/routing/domain/analytics.ts +88 -0
- package/src/router/modules/routing/domain/caching-evict.ts +104 -0
- package/src/router/modules/routing/domain/caching-invalidate.ts +101 -0
- package/src/router/modules/routing/domain/caching-read.ts +74 -0
- package/src/router/modules/routing/domain/caching-state.ts +38 -0
- package/src/router/modules/routing/domain/caching-types.ts +38 -0
- package/src/router/modules/routing/domain/caching-write.ts +62 -0
- package/src/router/modules/routing/domain/caching.ts +6 -0
- package/src/router/modules/routing/domain/code-splitting.ts +226 -0
- package/src/router/modules/routing/domain/contract-factory.ts +37 -0
- package/src/router/modules/routing/domain/contract-testing.ts +13 -0
- package/src/router/modules/routing/domain/contract-types.ts +32 -0
- package/src/router/modules/routing/domain/contract-validator.ts +246 -0
- package/src/router/modules/routing/domain/dynamic-imports.ts +67 -0
- package/src/router/modules/routing/domain/e2e-testing.ts +267 -0
- package/src/router/modules/routing/domain/error-boundaries.ts +54 -0
- package/src/router/modules/routing/domain/error-tracking.ts +277 -0
- package/src/router/modules/routing/domain/feature-flags.ts +255 -0
- package/src/router/modules/routing/domain/guards.ts +104 -0
- package/src/router/modules/routing/domain/i18n.ts +230 -0
- package/src/router/modules/routing/domain/index.ts +30 -0
- package/src/router/modules/routing/domain/interactive-docs-advanced-sections.ts +164 -0
- package/src/router/modules/routing/domain/interactive-docs-core-sections.ts +198 -0
- package/src/router/modules/routing/domain/interactive-docs.ts +154 -0
- package/src/router/modules/routing/domain/isr.ts +35 -0
- package/src/router/modules/routing/domain/middleware.ts +79 -0
- package/src/router/modules/routing/domain/models.ts +95 -0
- package/src/router/modules/routing/domain/navigation-timeline.ts +243 -0
- package/src/router/modules/routing/domain/operations.ts +36 -0
- package/src/router/modules/routing/domain/optimized-matcher.ts +75 -0
- package/src/router/modules/routing/domain/performance-alert-manager.ts +28 -0
- package/src/router/modules/routing/domain/performance-monitoring.ts +287 -0
- package/src/router/modules/routing/domain/performance-report.ts +29 -0
- package/src/router/modules/routing/domain/performance-types.ts +19 -0
- package/src/router/modules/routing/domain/predictive-preloading.ts +296 -0
- package/src/router/modules/routing/domain/rbac.ts +219 -0
- package/src/router/modules/routing/domain/resource-routes.ts +64 -0
- package/src/router/modules/routing/domain/route-autocomplete.ts +176 -0
- package/src/router/modules/routing/domain/route-groups.ts +63 -0
- package/src/router/modules/routing/domain/security-scanner.ts +225 -0
- package/src/router/modules/routing/domain/server-actions.ts +71 -0
- package/src/router/modules/routing/domain/testing.ts +80 -0
- package/src/router/modules/routing/domain/type-safe-links.ts +72 -0
- package/src/router/modules/routing/domain/validators.ts +23 -0
- package/src/router/modules/routing/index.ts +4 -0
- package/src/router/modules/routing/ports/index.ts +1 -0
- package/src/router/modules/routing/ports/router-port.ts +15 -0
- package/src/router/modules/routing/types/index.ts +14 -0
- package/src/router/modules/routing-core/application/usecases/index.ts +49 -0
- package/src/router/modules/routing-core/domain/models/index.ts +95 -0
- package/src/router/modules/routing-core/domain/operations/index.ts +36 -0
- package/src/router/modules/routing-core/domain/validators/index.ts +28 -0
- package/src/router/modules/routing-core/index.ts +8 -0
- package/src/router/modules/routing-core/ports/index.ts +16 -0
- package/src/router/modules/routing-core/types/index.ts +25 -0
- package/src/router/presentation/index.ts +1 -0
- package/src/router/presentation/solid/components/index.ts +1 -0
- package/src/router/presentation/solid/components/route-visualizer-details.tsx +37 -0
- package/src/router/presentation/solid/components/route-visualizer-helpers.ts +56 -0
- package/src/router/presentation/solid/components/route-visualizer-tree.tsx +99 -0
- package/src/router/presentation/solid/components/route-visualizer-types.ts +41 -0
- package/src/router/presentation/solid/components/route-visualizer.tsx +110 -0
- package/src/router/presentation/solid/components/router.ts +82 -0
- package/src/router/presentation/solid/devtools/index.ts +2 -0
- package/src/router/presentation/solid/devtools/router-devtools-panel.tsx +141 -0
- package/src/router/presentation/solid/devtools/router-inspector.ts +54 -0
- package/src/router/presentation/solid/hmr.ts +77 -0
- package/src/router/presentation/solid/index.ts +7 -0
- package/src/router/presentation/solid/lazy-loading.ts +111 -0
- package/src/router/presentation/solid/preloading.ts +81 -0
- package/src/router/presentation/solid/route-state.ts +58 -0
- package/src/router/presentation/solid/signals/index.ts +2 -0
- package/src/router/presentation/solid/signals/route-state.ts +39 -0
- package/src/router/presentation/solid/signals/search-params.ts +31 -0
- package/src/router/shared/constants/index.ts +6 -0
- package/src/router/shared/errors/enhanced-errors.ts +94 -0
- package/src/router/shared/errors/index.ts +30 -0
- package/src/router/shared/index.ts +4 -0
- package/src/router/shared/types/either.ts +55 -0
- package/src/router/shared/types/index.ts +5 -0
- package/src/router/shared/types/option.ts +20 -0
- package/src/router/shared/types/result.ts +34 -0
- package/src/router/shared/types/route-inference.ts +49 -0
- package/src/router/shared/types/routing.ts +31 -0
- package/src/router/shared/utils/index.ts +3 -0
- package/src/router/shared/utils/path.ts +43 -0
- package/src/router/shared/utils/result.ts +5 -0
- package/src/router/shared/utils/time-condition.ts +53 -0
- package/src/router/vite-plugin/index.ts +2 -0
- package/src/router/vite-plugin/vite-plugin-core.ts +79 -0
- package/src/router/vite-plugin/vite-plugin-options-advanced.ts +127 -0
- package/src/router/vite-plugin/vite-plugin-options-features.ts +117 -0
- package/src/router/vite-plugin/vite-plugin-options-routing.ts +70 -0
- package/src/router/vite-plugin/vite-plugin-options.ts +23 -0
- package/src/server/adapters/index.ts +2 -0
- package/src/server/adapters/platforms.ts +79 -0
- package/src/server/adapters/web-server/index.ts +281 -0
- package/src/server/index.ts +13 -0
- package/src/server/modules/http/domain/operations/cookies.ts +151 -0
- package/src/server/modules/http/domain/operations/metrics.ts +103 -0
- package/src/server/modules/http/domain/operations/request-context.ts +36 -0
- package/src/server/modules/http/domain/operations/session-store.ts +98 -0
- package/src/server/modules/http/index.ts +15 -0
- package/src/server/modules/loaders/application/index.ts +1 -0
- package/src/server/modules/loaders/application/usecases/create-route-loader.ts +88 -0
- package/src/server/modules/loaders/application/usecases/dehydrate.ts +21 -0
- package/src/server/modules/loaders/application/usecases/index.ts +2 -0
- package/src/server/modules/loaders/index.ts +1 -0
- package/src/server/modules/realtime/domain/operations/channels.ts +241 -0
- package/src/server/modules/realtime/domain/operations/sse.ts +63 -0
- package/src/server/modules/realtime/index.ts +2 -0
- package/src/server/modules/server-functions/adapters/http/handler.ts +128 -0
- package/src/server/modules/server-functions/application/index.ts +1 -0
- package/src/server/modules/server-functions/application/usecases/batch.ts +135 -0
- package/src/server/modules/server-functions/application/usecases/create-server-fn.ts +272 -0
- package/src/server/modules/server-functions/application/usecases/csrf.ts +67 -0
- package/src/server/modules/server-functions/application/usecases/index.ts +6 -0
- package/src/server/modules/server-functions/application/usecases/live.ts +172 -0
- package/src/server/modules/server-functions/application/usecases/registry.ts +22 -0
- package/src/server/modules/server-functions/application/usecases/scheduler.ts +115 -0
- package/src/server/modules/server-functions/domain/index.ts +24 -0
- package/src/server/modules/server-functions/domain/models/execution-result.ts +18 -0
- package/src/server/modules/server-functions/domain/models/index.ts +1 -0
- package/src/server/modules/server-functions/domain/operations/result.ts +61 -0
- package/src/server/modules/server-functions/domain/operations/serialize.ts +134 -0
- package/src/server/modules/server-functions/domain/operations/stream.ts +107 -0
- package/src/server/modules/server-functions/index.ts +3 -0
- package/src/server/modules/server-only/index.ts +30 -0
- package/src/server/node.ts +10 -0
- package/src/server/shared/errors/index.ts +1 -0
- package/src/server/shared/errors/server-fn-error.ts +27 -0
- package/src/server/shared/index.ts +2 -0
- package/src/server/shared/types/index.ts +5 -0
- package/src/server/types/index.ts +65 -0
- package/src/stores/adapters/analytics/index.ts +5 -0
- package/src/stores/adapters/analytics/monitoring.ts +164 -0
- package/src/stores/adapters/devtools/index.ts +80 -0
- package/src/stores/adapters/persistence/index.ts +5 -0
- package/src/stores/adapters/persistence/versioning.ts +142 -0
- package/src/stores/adapters/router/index.ts +144 -0
- package/src/stores/adapters/storage/index.ts +6 -0
- package/src/stores/adapters/storage/indexed-db.ts +83 -0
- package/src/stores/adapters/storage/local-storage.ts +44 -0
- package/src/stores/adapters/storage/session-storage.ts +44 -0
- package/src/stores/adapters/sync/index.ts +5 -0
- package/src/stores/adapters/sync/tab-sync.ts +148 -0
- package/src/stores/adapters/validation/arktype-validator.ts +32 -0
- package/src/stores/adapters/validation/error-handling.ts +27 -0
- package/src/stores/adapters/validation/index.ts +61 -0
- package/src/stores/adapters/validation/schemas/api-schemas.ts +30 -0
- package/src/stores/adapters/validation/schemas/common-schemas.ts +32 -0
- package/src/stores/adapters/validation/schemas/config-schemas.ts +22 -0
- package/src/stores/adapters/validation/schemas/constraint-schemas.ts +34 -0
- package/src/stores/adapters/validation/schemas/ecommerce-schemas.ts +43 -0
- package/src/stores/adapters/validation/schemas/form-schemas.ts +27 -0
- package/src/stores/adapters/validation/schemas/primitive-schemas.ts +9 -0
- package/src/stores/adapters/validation/schemas/store-schemas.ts +52 -0
- package/src/stores/adapters/validation/schemas.ts +11 -0
- package/src/stores/index.ts +13 -0
- package/src/stores/modules/query/index.ts +24 -0
- package/src/stores/modules/query/mutation-state.ts +33 -0
- package/src/stores/modules/query/mutation-store.ts +59 -0
- package/src/stores/modules/query/query-builder.ts +25 -0
- package/src/stores/modules/query/query-cache.ts +65 -0
- package/src/stores/modules/query/query-manager.ts +103 -0
- package/src/stores/modules/query/query-state.ts +39 -0
- package/src/stores/modules/query/query-store.ts +81 -0
- package/src/stores/modules/store/application/usecases/index.ts +217 -0
- package/src/stores/modules/store/domain/models/index.ts +38 -0
- package/src/stores/modules/store/domain/operations/actions.ts +120 -0
- package/src/stores/modules/store/domain/operations/composition.ts +205 -0
- package/src/stores/modules/store/domain/operations/derived-operations.ts +21 -0
- package/src/stores/modules/store/domain/operations/diffing.ts +272 -0
- package/src/stores/modules/store/domain/operations/event-bus.ts +255 -0
- package/src/stores/modules/store/domain/operations/history-operations.ts +101 -0
- package/src/stores/modules/store/domain/operations/hydration.ts +159 -0
- package/src/stores/modules/store/domain/operations/immutable.ts +173 -0
- package/src/stores/modules/store/domain/operations/index.ts +21 -0
- package/src/stores/modules/store/domain/operations/middleware.ts +193 -0
- package/src/stores/modules/store/domain/operations/mutations.ts +14 -0
- package/src/stores/modules/store/domain/operations/normalization.ts +195 -0
- package/src/stores/modules/store/domain/operations/optimistic.ts +171 -0
- package/src/stores/modules/store/domain/operations/persistence-operations.ts +26 -0
- package/src/stores/modules/store/domain/operations/queries.ts +296 -0
- package/src/stores/modules/store/domain/operations/selectors.ts +112 -0
- package/src/stores/modules/store/domain/operations/store-operations.ts +52 -0
- package/src/stores/modules/store/domain/operations/time-machine.ts +240 -0
- package/src/stores/modules/store/domain/operations/transactions.ts +198 -0
- package/src/stores/modules/store/domain/validators/action-validators.ts +20 -0
- package/src/stores/modules/store/domain/validators/history-validators.ts +19 -0
- package/src/stores/modules/store/domain/validators/index.ts +7 -0
- package/src/stores/modules/store/domain/validators/persistence-validators.ts +23 -0
- package/src/stores/modules/store/domain/validators/store-validators.ts +41 -0
- package/src/stores/modules/store/index.ts +9 -0
- package/src/stores/modules/store/ports/index.ts +104 -0
- package/src/stores/modules/store/types/index.ts +35 -0
- package/src/stores/shared/constants/index.ts +50 -0
- package/src/stores/shared/errors/index.ts +122 -0
- package/src/stores/shared/index.ts +7 -0
- package/src/stores/shared/schema-generator.ts +262 -0
- package/src/stores/shared/types/index.ts +147 -0
- package/src/testing/index.ts +90 -0
- package/src/vite/auto-imports.ts +65 -0
- package/src/vite/client.d.ts +25 -0
- package/src/vite/dev-middleware.ts +142 -0
- package/src/vite/index.ts +9 -0
- package/src/vite/plugin.ts +277 -0
- package/src/vite/prerender.ts +72 -0
- package/src/vite/server-fn-ids.ts +52 -0
- package/src/vite/types/index.ts +24 -0
- package/src/vite/virtual-modules.ts +68 -0
package/src/cli/ops.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ops commands — dev/build/start/preview lifecycle, config printing,
|
|
3
|
+
* env diffing, bundle size audit. The vite/bun-backed commands spawn
|
|
4
|
+
* external processes and return their exit code.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
8
|
+
import type { CliResult } from "./infra";
|
|
9
|
+
import { listFiles, run, vite } from "./infra";
|
|
10
|
+
|
|
11
|
+
export const dev = (): CliResult => vite(["dev"]);
|
|
12
|
+
|
|
13
|
+
export const build = (): CliResult => {
|
|
14
|
+
const client = vite(["build"]);
|
|
15
|
+
if (client.code !== 0) return client;
|
|
16
|
+
// SSR bundle — entry resolved from config convention
|
|
17
|
+
return vite(["build", "--ssr", "src/entry-server.tsx"], {
|
|
18
|
+
SOLID_SSR_BUILD: "1",
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const start = (entry = "dist/server/entry-server.js"): CliResult => {
|
|
23
|
+
const candidates = [
|
|
24
|
+
entry,
|
|
25
|
+
"dist/server/index.js",
|
|
26
|
+
".output/server/index.mjs",
|
|
27
|
+
];
|
|
28
|
+
const target = candidates.find((file) => existsSync(file));
|
|
29
|
+
if (!target) {
|
|
30
|
+
console.error(
|
|
31
|
+
`[solid] no built server found (tried: ${candidates.join(", ")}). Run \`solid build\` first.`,
|
|
32
|
+
);
|
|
33
|
+
return { code: 1 };
|
|
34
|
+
}
|
|
35
|
+
return run("bun", [target]);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* `solid preview` — serve the production build locally: static assets
|
|
40
|
+
* from dist/client + the built server entry on one port (Bun.serve)
|
|
41
|
+
*/
|
|
42
|
+
export const preview = (port = Number(process.env.PORT) || 4321): CliResult => {
|
|
43
|
+
const entry = ["dist/server/entry-server.js", "dist/server/index.js"].find(
|
|
44
|
+
existsSync,
|
|
45
|
+
);
|
|
46
|
+
if (!entry) {
|
|
47
|
+
console.error("[solid] run `solid build` first — no dist/server entry");
|
|
48
|
+
return { code: 1 };
|
|
49
|
+
}
|
|
50
|
+
const staticDir = existsSync("dist/client") ? "dist/client" : "dist";
|
|
51
|
+
const code = `
|
|
52
|
+
const mod = await import(${JSON.stringify(entry.replaceAll("\\\\", "/"))});
|
|
53
|
+
const handler = mod.fetch ?? mod.default?.fetch ?? mod.default;
|
|
54
|
+
const mime = {js:"text/javascript",css:"text/css",json:"application/json",svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",webp:"image/webp",woff2:"font/woff2",ico:"image/x-icon",webmanifest:"application/manifest+json"};
|
|
55
|
+
Bun.serve({port:${port},async fetch(req){
|
|
56
|
+
const {pathname}=new URL(req.url);
|
|
57
|
+
const file=Bun.file(${JSON.stringify(staticDir)}+pathname);
|
|
58
|
+
if(pathname!=="/"&&await file.exists()){return new Response(file,{headers:{"Content-Type":mime[pathname.split(".").pop()]??"application/octet-stream"}})}
|
|
59
|
+
return handler(req);
|
|
60
|
+
}});
|
|
61
|
+
console.log("[solid] preview → http://localhost:${port}");`;
|
|
62
|
+
return run("bun", ["-e", code]);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** `solid config` — print the resolved framework config (JSON) */
|
|
66
|
+
export const printConfig = (): CliResult => {
|
|
67
|
+
try {
|
|
68
|
+
const candidate = [
|
|
69
|
+
"solid.config.ts",
|
|
70
|
+
"solid.config.mts",
|
|
71
|
+
"src/app.config.ts",
|
|
72
|
+
].find(existsSync);
|
|
73
|
+
if (!candidate) {
|
|
74
|
+
console.log("[solid] no solid.config.ts — using defaults");
|
|
75
|
+
return { code: 0 };
|
|
76
|
+
}
|
|
77
|
+
console.log(`[solid] ${candidate}`);
|
|
78
|
+
return run("bun", [
|
|
79
|
+
"-e",
|
|
80
|
+
`import c from "${candidate.replaceAll("\\", "/")}"; console.log(JSON.stringify(c, null, 2))`,
|
|
81
|
+
]);
|
|
82
|
+
} catch {
|
|
83
|
+
return { code: 1 };
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* `solid env` — diff `.env` against `.env.example` and print
|
|
89
|
+
* missing keys (never prints values)
|
|
90
|
+
*/
|
|
91
|
+
export const envCheck = (): CliResult => {
|
|
92
|
+
const parse = (file: string) =>
|
|
93
|
+
existsSync(file)
|
|
94
|
+
? readFileSync(file, "utf8")
|
|
95
|
+
.split("\n")
|
|
96
|
+
.filter((l) => l.trim() && !l.startsWith("#"))
|
|
97
|
+
.map((l) => l.split("=")[0].trim())
|
|
98
|
+
: [];
|
|
99
|
+
const example = parse(".env.example");
|
|
100
|
+
const actual = new Set(parse(".env"));
|
|
101
|
+
if (!example.length) {
|
|
102
|
+
console.log("[solid] no .env.example — nothing to check");
|
|
103
|
+
return { code: 0 };
|
|
104
|
+
}
|
|
105
|
+
const missing = example.filter((k) => !actual.has(k));
|
|
106
|
+
for (const k of missing) console.log(` ! missing ${k}`);
|
|
107
|
+
console.log(
|
|
108
|
+
missing.length
|
|
109
|
+
? `env: ${missing.length} missing key(s)`
|
|
110
|
+
: "env: all keys set",
|
|
111
|
+
);
|
|
112
|
+
return { code: missing.length ? 1 : 0 };
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* `solid size [dir]` — report dist/ bundle sizes (post-build audit)
|
|
117
|
+
*/
|
|
118
|
+
export const size = (dir = "dist"): CliResult => {
|
|
119
|
+
if (!existsSync(dir)) {
|
|
120
|
+
console.log(`[solid] no ${dir} — run \`solid build\` first`);
|
|
121
|
+
return { code: 1 };
|
|
122
|
+
}
|
|
123
|
+
const files = listFiles(dir);
|
|
124
|
+
const rows = files
|
|
125
|
+
.map((f) => ({ file: f, bytes: statSync(f).size }))
|
|
126
|
+
.sort((a, b) => b.bytes - a.bytes);
|
|
127
|
+
for (const r of rows.slice(0, 20)) {
|
|
128
|
+
console.log(` ${(r.bytes / 1024).toFixed(1).padStart(8)}kB ${r.file}`);
|
|
129
|
+
}
|
|
130
|
+
const all = rows.reduce((s, r) => s + r.bytes, 0);
|
|
131
|
+
console.log(
|
|
132
|
+
`[solid] ${rows.length} file(s), ${(all / 1024).toFixed(1)}kB total`,
|
|
133
|
+
);
|
|
134
|
+
return { code: 0 };
|
|
135
|
+
};
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route-ops commands — manifest generation, inspection, sitemap,
|
|
3
|
+
* rename, eject. All read `src/routes` (or a routesDir arg) from cwd.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { execSync } from "node:child_process";
|
|
7
|
+
import {
|
|
8
|
+
existsSync,
|
|
9
|
+
mkdirSync,
|
|
10
|
+
readFileSync,
|
|
11
|
+
renameSync,
|
|
12
|
+
writeFileSync,
|
|
13
|
+
} from "node:fs";
|
|
14
|
+
import { dirname, join, relative } from "node:path";
|
|
15
|
+
import {
|
|
16
|
+
buildRouteManifest,
|
|
17
|
+
generateApiTypes,
|
|
18
|
+
generateRouteTypes,
|
|
19
|
+
matchFileRoute,
|
|
20
|
+
} from "#app/modules/file-routes";
|
|
21
|
+
import type { CliResult } from "./infra";
|
|
22
|
+
import { listFiles } from "./infra";
|
|
23
|
+
|
|
24
|
+
export const generate = (routesDir = "src/routes"): CliResult => {
|
|
25
|
+
// Scan the routes dir and emit .solid/routes.d.ts — the RoutePath
|
|
26
|
+
// union consumed by route(), <Link to>, and useParams
|
|
27
|
+
const files = listFiles(routesDir);
|
|
28
|
+
const manifest = buildRouteManifest(files, routesDir);
|
|
29
|
+
const outDir = ".solid";
|
|
30
|
+
mkdirSync(outDir, { recursive: true });
|
|
31
|
+
const target = join(outDir, "routes.d.ts");
|
|
32
|
+
writeFileSync(target, generateRouteTypes(manifest));
|
|
33
|
+
const apiTarget = join(outDir, "api.d.ts");
|
|
34
|
+
writeFileSync(
|
|
35
|
+
apiTarget,
|
|
36
|
+
generateApiTypes(manifest, (file) => readFileSync(file, "utf8")),
|
|
37
|
+
);
|
|
38
|
+
console.log(`[solid] generated ${target} — ${manifest.length} route(s)`);
|
|
39
|
+
for (const route of manifest) {
|
|
40
|
+
console.log(` ${route.path} → ${relative(".", route.file)}`);
|
|
41
|
+
}
|
|
42
|
+
return { code: 0 };
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const routes = (routesDir = "src/routes", json = false): CliResult => {
|
|
46
|
+
// Route tree inspector — path → file, kind, rule mode, middleware chain
|
|
47
|
+
const files = listFiles(routesDir);
|
|
48
|
+
const manifest = buildRouteManifest(files, routesDir);
|
|
49
|
+
if (json) {
|
|
50
|
+
console.log(JSON.stringify(manifest, null, 2));
|
|
51
|
+
return { code: 0 };
|
|
52
|
+
}
|
|
53
|
+
const rows = manifest.map((r) => ({
|
|
54
|
+
path: r.path,
|
|
55
|
+
kind: r.kind ?? "page",
|
|
56
|
+
mw: r.middleware?.length ? `+${r.middleware.length}mw` : "",
|
|
57
|
+
file: r.file,
|
|
58
|
+
}));
|
|
59
|
+
const width = Math.max(4, ...rows.map((r) => r.path.length));
|
|
60
|
+
for (const row of rows) {
|
|
61
|
+
console.log(
|
|
62
|
+
` ${row.path.padEnd(width)} ${row.kind.padEnd(4)} ${row.mw.padEnd(4)} ${row.file}`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
const pages = rows.filter((r) => r.kind === "page").length;
|
|
66
|
+
const apis = rows.length - pages;
|
|
67
|
+
console.log(`${rows.length} route(s) — ${pages} page, ${apis} api`);
|
|
68
|
+
return { code: 0 };
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* `solid inspect <path>` — show which route matches a URL plus its
|
|
73
|
+
* layouts, middleware and file
|
|
74
|
+
*/
|
|
75
|
+
export const inspect = (
|
|
76
|
+
path = "/",
|
|
77
|
+
routesDir = "src/routes",
|
|
78
|
+
json = false,
|
|
79
|
+
): CliResult => {
|
|
80
|
+
const files = listFiles(routesDir);
|
|
81
|
+
const manifest = buildRouteManifest(files, routesDir);
|
|
82
|
+
const match = matchFileRoute(path, manifest);
|
|
83
|
+
if (!match) {
|
|
84
|
+
console.log(`[solid] no route matches ${path}`);
|
|
85
|
+
return { code: 1 };
|
|
86
|
+
}
|
|
87
|
+
if (json) {
|
|
88
|
+
console.log(
|
|
89
|
+
JSON.stringify(
|
|
90
|
+
{
|
|
91
|
+
path,
|
|
92
|
+
file: match.route.file,
|
|
93
|
+
params: match.params,
|
|
94
|
+
layouts: match.route.layouts,
|
|
95
|
+
middleware: match.route.middleware ?? [],
|
|
96
|
+
loading: match.route.loading,
|
|
97
|
+
error: match.route.error,
|
|
98
|
+
},
|
|
99
|
+
null,
|
|
100
|
+
2,
|
|
101
|
+
),
|
|
102
|
+
);
|
|
103
|
+
return { code: 0 };
|
|
104
|
+
}
|
|
105
|
+
console.log(`${path} → ${match.route.file}`);
|
|
106
|
+
console.log(` params ${JSON.stringify(match.params)}`);
|
|
107
|
+
console.log(` layouts ${match.route.layouts.join(", ") || "—"}`);
|
|
108
|
+
console.log(` mw ${match.route.middleware?.join(", ") || "—"}`);
|
|
109
|
+
if (match.route.loading) console.log(` loading ${match.route.loading}`);
|
|
110
|
+
if (match.route.error) console.log(` error ${match.route.error}`);
|
|
111
|
+
return { code: 0 };
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* `solid manifest` — dump routes + kinds + files as JSON for ops tooling
|
|
116
|
+
*/
|
|
117
|
+
export const manifestDump = (routesDir = "src/routes"): CliResult => {
|
|
118
|
+
const files = listFiles(routesDir);
|
|
119
|
+
const manifest = buildRouteManifest(files, routesDir);
|
|
120
|
+
console.log(
|
|
121
|
+
JSON.stringify(
|
|
122
|
+
{
|
|
123
|
+
routes: manifest,
|
|
124
|
+
counts: {
|
|
125
|
+
total: manifest.length,
|
|
126
|
+
pages: manifest.filter(
|
|
127
|
+
(r) => r.kind !== "api" && r.kind !== "content",
|
|
128
|
+
).length,
|
|
129
|
+
api: manifest.filter((r) => r.kind === "api").length,
|
|
130
|
+
content: manifest.filter((r) => r.kind === "content").length,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
null,
|
|
134
|
+
2,
|
|
135
|
+
),
|
|
136
|
+
);
|
|
137
|
+
return { code: 0 };
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* `solid diff` — routes added/removed vs HEAD (file-level, via git)
|
|
142
|
+
*/
|
|
143
|
+
export const diffRoutes = (routesDir = "src/routes"): CliResult => {
|
|
144
|
+
let atHead: string[];
|
|
145
|
+
try {
|
|
146
|
+
atHead = execSync(`git ls-files "${routesDir}"`, { encoding: "utf8" })
|
|
147
|
+
.split("\n")
|
|
148
|
+
.filter(Boolean);
|
|
149
|
+
} catch {
|
|
150
|
+
console.log("[solid] git diff unavailable (not a repo?)");
|
|
151
|
+
return { code: 1 };
|
|
152
|
+
}
|
|
153
|
+
const now = listFiles(routesDir);
|
|
154
|
+
const norm = (f: string) => f.replace(/\\/g, "/");
|
|
155
|
+
const nowSet = new Set(now.map(norm));
|
|
156
|
+
const headSet = new Set(atHead.map(norm));
|
|
157
|
+
const added = [...nowSet].filter((f) => !headSet.has(f));
|
|
158
|
+
const removed = [...headSet].filter((f) => !nowSet.has(f));
|
|
159
|
+
for (const f of added) console.log(` + ${f}`);
|
|
160
|
+
for (const f of removed) console.log(` - ${f}`);
|
|
161
|
+
console.log(
|
|
162
|
+
added.length || removed.length
|
|
163
|
+
? `diff: +${added.length} -${removed.length} route file(s)`
|
|
164
|
+
: "diff: no route changes",
|
|
165
|
+
);
|
|
166
|
+
return { code: 0 };
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* `solid sitemap <origin>` — sitemap.xml from static page routes
|
|
171
|
+
*/
|
|
172
|
+
export const sitemap = (
|
|
173
|
+
origin: string,
|
|
174
|
+
routesDir = "src/routes",
|
|
175
|
+
out = "public/sitemap.xml",
|
|
176
|
+
): CliResult => {
|
|
177
|
+
if (!origin) {
|
|
178
|
+
console.log("usage: solid sitemap <origin> [--out <file>]");
|
|
179
|
+
return { code: 1 };
|
|
180
|
+
}
|
|
181
|
+
const files = listFiles(routesDir);
|
|
182
|
+
const manifest = buildRouteManifest(files, routesDir);
|
|
183
|
+
const urls = manifest
|
|
184
|
+
.filter((r) => !r.kind || r.kind === "page" || r.kind === "content")
|
|
185
|
+
.map((r) => r.path)
|
|
186
|
+
.filter((p) => !p.includes(":") && !p.includes("*"))
|
|
187
|
+
.sort();
|
|
188
|
+
const xml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
189
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
190
|
+
${urls.map((u) => ` <url><loc>${origin.replace(/\/$/, "")}${u}</loc></url>`).join("\n")}
|
|
191
|
+
</urlset>
|
|
192
|
+
`;
|
|
193
|
+
mkdirSync(dirname(out), { recursive: true });
|
|
194
|
+
writeFileSync(out, xml);
|
|
195
|
+
console.log(`sitemap: ${urls.length} url(s) → ${out}`);
|
|
196
|
+
return { code: 0 };
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* `solid rename <from> <to>` — rename a route file inside src/routes
|
|
201
|
+
* and regenerate types
|
|
202
|
+
*/
|
|
203
|
+
export const renameRoute = (from: string, to: string): CliResult => {
|
|
204
|
+
if (!from || !to) {
|
|
205
|
+
console.log("usage: solid rename <from> <to>");
|
|
206
|
+
return { code: 1 };
|
|
207
|
+
}
|
|
208
|
+
const routesDir = "src/routes";
|
|
209
|
+
const src = join(routesDir, from);
|
|
210
|
+
const dest = join(routesDir, to);
|
|
211
|
+
if (!existsSync(src)) {
|
|
212
|
+
console.log(`[solid] not found: ${src}`);
|
|
213
|
+
return { code: 1 };
|
|
214
|
+
}
|
|
215
|
+
mkdirSync(join(dest, ".."), { recursive: true });
|
|
216
|
+
renameSync(src, dest);
|
|
217
|
+
generate(routesDir);
|
|
218
|
+
console.log(`[solid] ${from} → ${to} (types regenerated)`);
|
|
219
|
+
return { code: 0 };
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* `solid eject [outDir]` — dump the resolved route manifest and
|
|
224
|
+
* generated types to `.solid/eject/` for audit/debug
|
|
225
|
+
*/
|
|
226
|
+
export const eject = (outDir = ".solid/eject"): CliResult => {
|
|
227
|
+
const routesDir = "src/routes";
|
|
228
|
+
const files = listFiles(routesDir);
|
|
229
|
+
const manifest = buildRouteManifest(files, routesDir);
|
|
230
|
+
mkdirSync(outDir, { recursive: true });
|
|
231
|
+
writeFileSync(
|
|
232
|
+
join(outDir, "manifest.json"),
|
|
233
|
+
JSON.stringify(manifest, null, 2),
|
|
234
|
+
);
|
|
235
|
+
writeFileSync(join(outDir, "routes.d.ts"), generateRouteTypes(manifest));
|
|
236
|
+
console.log(
|
|
237
|
+
`[solid] ejected ${manifest.length} route(s) → ${outDir}/manifest.json + routes.d.ts`,
|
|
238
|
+
);
|
|
239
|
+
return { code: 0 };
|
|
240
|
+
};
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scaffolding commands — `solid add`, `solid scaffold`, `solid test`,
|
|
3
|
+
* `solid adopt`. Writes starter files; never touches existing ones.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
import { buildRouteManifest } from "#app/modules/file-routes";
|
|
9
|
+
import type { CliResult } from "./infra";
|
|
10
|
+
import { listFiles } from "./infra";
|
|
11
|
+
|
|
12
|
+
const kebab = (name: string): string =>
|
|
13
|
+
name
|
|
14
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1-$2")
|
|
15
|
+
.replace(/[\s_]+/g, "-")
|
|
16
|
+
.toLowerCase();
|
|
17
|
+
|
|
18
|
+
const routeTemplate = (name: string): string => `export default function ${name
|
|
19
|
+
.split("-")
|
|
20
|
+
.map((s) => s.charAt(0).toUpperCase() + s.slice(1))
|
|
21
|
+
.join("")}() {
|
|
22
|
+
return <section><h1>${name}</h1></section>;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
const apiTemplate = `export const GET = () => Response.json({ ok: true });
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
const middlewareTemplate = `import type { AppMiddleware } from "@wrikka/solid-framework/app";
|
|
30
|
+
|
|
31
|
+
export default (async (ctx) => {
|
|
32
|
+
return undefined;
|
|
33
|
+
}) satisfies AppMiddleware;
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
/** `solid add route|api|middleware <name>` — scaffolds into src/routes */
|
|
37
|
+
export const add = (type?: string, name?: string): CliResult => {
|
|
38
|
+
if (!type || !name || !["route", "api", "middleware"].includes(type)) {
|
|
39
|
+
console.log("usage: solid add route|api|middleware <name>");
|
|
40
|
+
return { code: 1 };
|
|
41
|
+
}
|
|
42
|
+
const file = kebab(name);
|
|
43
|
+
const dir = join("src", "routes");
|
|
44
|
+
const target =
|
|
45
|
+
type === "api"
|
|
46
|
+
? join(dir, `${file}.api.ts`)
|
|
47
|
+
: type === "middleware"
|
|
48
|
+
? join(
|
|
49
|
+
dir,
|
|
50
|
+
file === "middleware"
|
|
51
|
+
? "middleware.ts"
|
|
52
|
+
: join(file, "middleware.ts"),
|
|
53
|
+
)
|
|
54
|
+
: join(dir, `${file}.tsx`);
|
|
55
|
+
if (existsSync(target)) {
|
|
56
|
+
console.log(` ✗ exists: ${target}`);
|
|
57
|
+
return { code: 1 };
|
|
58
|
+
}
|
|
59
|
+
mkdirSync(join(target, ".."), { recursive: true });
|
|
60
|
+
writeFileSync(
|
|
61
|
+
target,
|
|
62
|
+
type === "api"
|
|
63
|
+
? apiTemplate
|
|
64
|
+
: type === "middleware"
|
|
65
|
+
? middlewareTemplate
|
|
66
|
+
: routeTemplate(file),
|
|
67
|
+
);
|
|
68
|
+
console.log(` + ${target}`);
|
|
69
|
+
return { code: 0 };
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* `solid scaffold <dir>` — minimal app: solid.config.tsx, entries,
|
|
74
|
+
* index route, package.json script hints
|
|
75
|
+
*/
|
|
76
|
+
export const scaffold = (dir: string): CliResult => {
|
|
77
|
+
if (!dir) {
|
|
78
|
+
console.log("usage: solid scaffold <dir>");
|
|
79
|
+
return { code: 1 };
|
|
80
|
+
}
|
|
81
|
+
const put = (rel: string, content: string) => {
|
|
82
|
+
const target = join(dir, rel);
|
|
83
|
+
mkdirSync(join(target, ".."), { recursive: true });
|
|
84
|
+
writeFileSync(target, content);
|
|
85
|
+
};
|
|
86
|
+
put(
|
|
87
|
+
"solid.config.tsx",
|
|
88
|
+
`import { defineApp } from "@wrikka/solid-framework/app";
|
|
89
|
+
import { AppRoutes } from "@wrikka/solid-framework/app";
|
|
90
|
+
|
|
91
|
+
export default defineApp({
|
|
92
|
+
render: () => <AppRoutes />,
|
|
93
|
+
});
|
|
94
|
+
`,
|
|
95
|
+
);
|
|
96
|
+
put(
|
|
97
|
+
"src/entry-server.tsx",
|
|
98
|
+
`import app from "../solid.config";
|
|
99
|
+
import { serve } from "@wrikka/solid-framework/app";
|
|
100
|
+
|
|
101
|
+
export default serve(app);
|
|
102
|
+
`,
|
|
103
|
+
);
|
|
104
|
+
put(
|
|
105
|
+
"src/entry-client.tsx",
|
|
106
|
+
`import app from "../solid.config";
|
|
107
|
+
import { hydrate } from "@wrikka/solid-framework/app";
|
|
108
|
+
|
|
109
|
+
await hydrate(app);
|
|
110
|
+
`,
|
|
111
|
+
);
|
|
112
|
+
put(
|
|
113
|
+
"src/routes/index.tsx",
|
|
114
|
+
`import { page } from "@wrikka/solid-framework/app";
|
|
115
|
+
|
|
116
|
+
export default page({
|
|
117
|
+
load: () => ({ hello: "world" }),
|
|
118
|
+
head: () => ({ title: "Home" }),
|
|
119
|
+
component: ({ data }) => <main>{data()?.hello}</main>,
|
|
120
|
+
});
|
|
121
|
+
`,
|
|
122
|
+
);
|
|
123
|
+
console.log(`[solid] scaffolded ${dir} — run \`solid dev\``);
|
|
124
|
+
return { code: 0 };
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const testTemplate = (
|
|
128
|
+
path: string,
|
|
129
|
+
file: string,
|
|
130
|
+
): string => `import { describe, expect, it } from "vitest";
|
|
131
|
+
import { buildRouteManifest, runFileRouteLoader } from "#app/modules/file-routes";
|
|
132
|
+
|
|
133
|
+
const manifest = buildRouteManifest(["${file}"]);
|
|
134
|
+
|
|
135
|
+
describe("${path}", () => {
|
|
136
|
+
it("matches the manifest", () => {
|
|
137
|
+
expect(manifest.some((r) => r.path === "${path}")).toBe(true);
|
|
138
|
+
});
|
|
139
|
+
it("runs the loader chain", async () => {
|
|
140
|
+
const data = await runFileRouteLoader(
|
|
141
|
+
"${path}",
|
|
142
|
+
manifest,
|
|
143
|
+
{ "${file}": await import("${file.replace("src/", "../src/")}") },
|
|
144
|
+
new Request("http://x${path}"),
|
|
145
|
+
);
|
|
146
|
+
expect(data).toBeDefined();
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
`;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* `solid test` — scaffold a vitest file per manifest route into
|
|
153
|
+
* test/routes/ (skips files that already exist)
|
|
154
|
+
*/
|
|
155
|
+
export const scaffoldTests = (routesDir = "src/routes"): CliResult => {
|
|
156
|
+
const files = listFiles(routesDir);
|
|
157
|
+
const manifest = buildRouteManifest(files, routesDir);
|
|
158
|
+
const outDir = join("test", "routes");
|
|
159
|
+
mkdirSync(outDir, { recursive: true });
|
|
160
|
+
let created = 0;
|
|
161
|
+
for (const route of manifest) {
|
|
162
|
+
if (route.kind === "api") continue;
|
|
163
|
+
const name =
|
|
164
|
+
route.path === "/"
|
|
165
|
+
? "index"
|
|
166
|
+
: route.path.replace(/[^\w]+/g, "_").replace(/^_|_$/g, "");
|
|
167
|
+
const target = join(outDir, `${name}.test.ts`);
|
|
168
|
+
if (existsSync(target)) continue;
|
|
169
|
+
writeFileSync(target, testTemplate(route.path, route.file));
|
|
170
|
+
created++;
|
|
171
|
+
}
|
|
172
|
+
console.log(`[solid] scaffolded ${created} test(s) into ${outDir}`);
|
|
173
|
+
return { code: 0 };
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* `solid adopt [dir]` — scan an existing app and print the scaffold
|
|
178
|
+
* needed to adopt the framework (routes dir, config, entries)
|
|
179
|
+
*/
|
|
180
|
+
export const adopt = (dir = ".", write = false): CliResult => {
|
|
181
|
+
console.log(`[solid] adopt ${dir}`);
|
|
182
|
+
const routeDirs = [
|
|
183
|
+
"src/routes",
|
|
184
|
+
"src/pages",
|
|
185
|
+
"pages",
|
|
186
|
+
"app",
|
|
187
|
+
"routes",
|
|
188
|
+
].filter((d) => existsSync(join(dir, d)));
|
|
189
|
+
if (routeDirs.length > 0) {
|
|
190
|
+
console.log(` routes detected: ${routeDirs.join(", ")}`);
|
|
191
|
+
if (!routeDirs.includes("src/routes"))
|
|
192
|
+
console.log(" → move/rename to src/routes (or set routesDir in config)");
|
|
193
|
+
} else {
|
|
194
|
+
console.log(" + create src/routes/ with page() modules");
|
|
195
|
+
}
|
|
196
|
+
if (
|
|
197
|
+
!["solid.config.tsx", "solid.config.ts"].some((f) =>
|
|
198
|
+
existsSync(join(dir, f)),
|
|
199
|
+
)
|
|
200
|
+
) {
|
|
201
|
+
console.log(
|
|
202
|
+
" + create solid.config.tsx → export default defineApp({ render })",
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
if (!existsSync(join(dir, "src/entry-server.tsx")))
|
|
206
|
+
console.log(" + create src/entry-server.tsx → export default serve(app)");
|
|
207
|
+
if (!existsSync(join(dir, "src/entry-client.tsx")))
|
|
208
|
+
console.log(" + create src/entry-client.tsx → await hydrate(app)");
|
|
209
|
+
if (!existsSync(join(dir, "vite.config.ts")))
|
|
210
|
+
console.log(" + create vite.config.ts with the solidFramework() plugin");
|
|
211
|
+
if (write) {
|
|
212
|
+
scaffold(dir);
|
|
213
|
+
console.log(" → scaffold files written (--write)");
|
|
214
|
+
}
|
|
215
|
+
console.log(" then: solid generate && solid test-nav && solid dev");
|
|
216
|
+
return { code: 0 };
|
|
217
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Button } from "@wrikka/ui";
|
|
2
|
+
import { createSignal } from "solid-js";
|
|
3
|
+
|
|
4
|
+
export default function App() {
|
|
5
|
+
const [count, setCount] = createSignal(0);
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<div class="p-8">
|
|
9
|
+
<h1 class="text-2xl font-bold mb-4">SolidJS Devtools</h1>
|
|
10
|
+
<p class="mb-4">Count: {count()}</p>
|
|
11
|
+
<Button onClick={() => setCount(count() + 1)}>Increment</Button>
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IDevtoolsConnector } from "#devtools/modules/devtools/ports";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Connector adapter for devtools protocol
|
|
5
|
+
* Handles I/O operations for devtools communication
|
|
6
|
+
* Implements IDevtoolsConnector port interface
|
|
7
|
+
*/
|
|
8
|
+
export function createConnector(): IDevtoolsConnector {
|
|
9
|
+
return {
|
|
10
|
+
async connect() {
|
|
11
|
+
// Implementation - connect to devtools backend
|
|
12
|
+
},
|
|
13
|
+
disconnect() {
|
|
14
|
+
// Implementation - disconnect from devtools backend
|
|
15
|
+
},
|
|
16
|
+
send(_message: unknown) {
|
|
17
|
+
// Implementation - send message to devtools backend
|
|
18
|
+
},
|
|
19
|
+
onMessage(_handler: (message: unknown) => void) {
|
|
20
|
+
// Implementation - register message handler
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Devtools Module
|
|
3
|
+
* Clean Architecture implementation for SolidJS devtools
|
|
4
|
+
*
|
|
5
|
+
* Structure:
|
|
6
|
+
* - modules/ - Feature modules (Vertical Slice Architecture)
|
|
7
|
+
* - component-inspector/ - Component tree inspection feature
|
|
8
|
+
* - devtools/ - Devtools panel feature
|
|
9
|
+
* - timeline/ - Timeline event tracking feature
|
|
10
|
+
* - shared/ - Shared kernel (types, errors, utils)
|
|
11
|
+
* - adapters/ - External systems integration
|
|
12
|
+
* - presentation/ - Entry points (composables, components)
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// Adapters exports (internal barrel files - acceptable exception)
|
|
16
|
+
export * from "./adapters";
|
|
17
|
+
// Module exports (Vertical Slice Architecture)
|
|
18
|
+
export * from "./modules/component-inspector";
|
|
19
|
+
export * from "./modules/devtools";
|
|
20
|
+
export * from "./modules/timeline";
|
|
21
|
+
|
|
22
|
+
// Presentation exports
|
|
23
|
+
export { DevtoolsPanel, default } from "./presentation/DevtoolsPanel";
|
|
24
|
+
|
|
25
|
+
// Shared kernel exports (internal barrel files - acceptable exception)
|
|
26
|
+
export * from "./shared";
|