@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
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export interface RouteError {
|
|
2
|
+
readonly timestamp: number;
|
|
3
|
+
readonly route: string;
|
|
4
|
+
readonly error: Error;
|
|
5
|
+
readonly errorType: string;
|
|
6
|
+
readonly stackTrace?: string;
|
|
7
|
+
readonly userAgent?: string;
|
|
8
|
+
readonly userContext?: Readonly<Record<string, unknown>>;
|
|
9
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ErrorAggregation {
|
|
13
|
+
readonly route: string;
|
|
14
|
+
readonly errorType: string;
|
|
15
|
+
readonly count: number;
|
|
16
|
+
readonly firstSeen: number;
|
|
17
|
+
readonly lastSeen: number;
|
|
18
|
+
readonly affectedUsers: ReadonlySet<string>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ErrorTrackingConfig {
|
|
22
|
+
readonly maxErrors: number;
|
|
23
|
+
readonly maxAggregations: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ErrorTrackingState = {
|
|
27
|
+
readonly errors: readonly RouteError[];
|
|
28
|
+
readonly aggregations: Readonly<Record<string, ErrorAggregation>>;
|
|
29
|
+
readonly config: ErrorTrackingConfig;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Pure function to create initial error tracking state
|
|
33
|
+
export const createErrorTrackingState = (
|
|
34
|
+
config?: Partial<ErrorTrackingConfig>,
|
|
35
|
+
): ErrorTrackingState => {
|
|
36
|
+
const defaultConfig: ErrorTrackingConfig = {
|
|
37
|
+
maxErrors: 1000,
|
|
38
|
+
maxAggregations: 100,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return Object.freeze({
|
|
42
|
+
errors: Object.freeze([]),
|
|
43
|
+
aggregations: Object.freeze({}),
|
|
44
|
+
config: config ? { ...defaultConfig, ...config } : defaultConfig,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// Pure function to create a route error
|
|
49
|
+
export const createRouteError = (
|
|
50
|
+
route: string,
|
|
51
|
+
error: Error,
|
|
52
|
+
now: number,
|
|
53
|
+
userContext?: Record<string, unknown>,
|
|
54
|
+
metadata?: Record<string, unknown>,
|
|
55
|
+
userAgent?: string,
|
|
56
|
+
): RouteError => {
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
timestamp: now,
|
|
59
|
+
route,
|
|
60
|
+
error,
|
|
61
|
+
errorType: error.name,
|
|
62
|
+
...(error.stack !== undefined && { stackTrace: error.stack }),
|
|
63
|
+
...(userAgent !== undefined && { userAgent }),
|
|
64
|
+
...(userContext !== undefined && {
|
|
65
|
+
userContext: Object.freeze(userContext),
|
|
66
|
+
}),
|
|
67
|
+
...(metadata !== undefined && { metadata: Object.freeze(metadata) }),
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// Pure function to create error aggregation
|
|
72
|
+
export const createErrorAggregation = (
|
|
73
|
+
route: string,
|
|
74
|
+
errorType: string,
|
|
75
|
+
timestamp: number,
|
|
76
|
+
userId?: string,
|
|
77
|
+
): ErrorAggregation => {
|
|
78
|
+
const affectedUsers = new Set<string>();
|
|
79
|
+
if (userId) {
|
|
80
|
+
affectedUsers.add(userId);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return Object.freeze({
|
|
84
|
+
route,
|
|
85
|
+
errorType,
|
|
86
|
+
count: 1,
|
|
87
|
+
firstSeen: timestamp,
|
|
88
|
+
lastSeen: timestamp,
|
|
89
|
+
affectedUsers,
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// Pure function to set max errors
|
|
94
|
+
export const setMaxErrors = (
|
|
95
|
+
state: ErrorTrackingState,
|
|
96
|
+
max: number,
|
|
97
|
+
): ErrorTrackingState => {
|
|
98
|
+
const newErrors =
|
|
99
|
+
state.errors.length > max ? state.errors.slice(-max) : state.errors;
|
|
100
|
+
return {
|
|
101
|
+
...state,
|
|
102
|
+
errors: Object.freeze(newErrors),
|
|
103
|
+
config: { ...state.config, maxErrors: max },
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// Pure function to set max aggregations
|
|
108
|
+
export const setMaxAggregations = (
|
|
109
|
+
state: ErrorTrackingState,
|
|
110
|
+
max: number,
|
|
111
|
+
): ErrorTrackingState => {
|
|
112
|
+
const aggregationKeys = Object.keys(state.aggregations);
|
|
113
|
+
const newAggregations: Record<string, ErrorAggregation> = {};
|
|
114
|
+
|
|
115
|
+
// Keep only the most recent aggregations
|
|
116
|
+
for (
|
|
117
|
+
let i = Math.max(0, aggregationKeys.length - max);
|
|
118
|
+
i < aggregationKeys.length;
|
|
119
|
+
i++
|
|
120
|
+
) {
|
|
121
|
+
const key = aggregationKeys[i];
|
|
122
|
+
newAggregations[key] = state.aggregations[key];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
...state,
|
|
127
|
+
aggregations: Object.freeze(newAggregations),
|
|
128
|
+
config: { ...state.config, maxAggregations: max },
|
|
129
|
+
};
|
|
130
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ErrorAggregation, ErrorTrackingState } from "../models";
|
|
2
|
+
|
|
3
|
+
// Pure function to clear errors
|
|
4
|
+
export const clearErrors = (
|
|
5
|
+
state: ErrorTrackingState,
|
|
6
|
+
route?: string,
|
|
7
|
+
): ErrorTrackingState => {
|
|
8
|
+
if (route) {
|
|
9
|
+
return {
|
|
10
|
+
...state,
|
|
11
|
+
errors: Object.freeze(state.errors.filter((e) => e.route !== route)),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
...state,
|
|
16
|
+
errors: Object.freeze([]),
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Pure function to clear aggregations
|
|
21
|
+
export const clearAggregations = (
|
|
22
|
+
state: ErrorTrackingState,
|
|
23
|
+
route?: string,
|
|
24
|
+
): ErrorTrackingState => {
|
|
25
|
+
if (route) {
|
|
26
|
+
const newAggregations: Record<string, ErrorAggregation> = {};
|
|
27
|
+
for (const [key, agg] of Object.entries(state.aggregations)) {
|
|
28
|
+
if (agg.route !== route) {
|
|
29
|
+
newAggregations[key] = agg;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
...state,
|
|
34
|
+
aggregations: Object.freeze(newAggregations),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
...state,
|
|
39
|
+
aggregations: Object.freeze({}),
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// Pure function to clear all
|
|
44
|
+
export const clearAll = (state: ErrorTrackingState): ErrorTrackingState => {
|
|
45
|
+
return {
|
|
46
|
+
...state,
|
|
47
|
+
errors: Object.freeze([]),
|
|
48
|
+
aggregations: Object.freeze({}),
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ErrorAggregation,
|
|
3
|
+
ErrorTrackingState,
|
|
4
|
+
RouteError,
|
|
5
|
+
} from "../models";
|
|
6
|
+
|
|
7
|
+
// Pure function to get errors
|
|
8
|
+
export const getErrors = (
|
|
9
|
+
state: ErrorTrackingState,
|
|
10
|
+
route?: string,
|
|
11
|
+
): readonly RouteError[] => {
|
|
12
|
+
if (route) {
|
|
13
|
+
return state.errors.filter((e) => e.route === route);
|
|
14
|
+
}
|
|
15
|
+
return state.errors;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Pure function to get errors by type
|
|
19
|
+
export const getErrorsByType = (
|
|
20
|
+
state: ErrorTrackingState,
|
|
21
|
+
errorType: string,
|
|
22
|
+
): readonly RouteError[] => {
|
|
23
|
+
return state.errors.filter((e) => e.errorType === errorType);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Pure function to get errors in time range
|
|
27
|
+
export const getErrorsInTimeRange = (
|
|
28
|
+
state: ErrorTrackingState,
|
|
29
|
+
startTime: number,
|
|
30
|
+
endTime: number,
|
|
31
|
+
): readonly RouteError[] => {
|
|
32
|
+
return state.errors.filter(
|
|
33
|
+
(e) => e.timestamp >= startTime && e.timestamp <= endTime,
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// Pure function to get aggregations
|
|
38
|
+
export const getAggregations = (
|
|
39
|
+
state: ErrorTrackingState,
|
|
40
|
+
): readonly ErrorAggregation[] => {
|
|
41
|
+
return Object.values(state.aggregations);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Pure function to get aggregations by route
|
|
45
|
+
export const getAggregationsByRoute = (
|
|
46
|
+
state: ErrorTrackingState,
|
|
47
|
+
route: string,
|
|
48
|
+
): readonly ErrorAggregation[] => {
|
|
49
|
+
return getAggregations(state).filter((a) => a.route === route);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Pure function to get top errors
|
|
53
|
+
export const getTopErrors = (
|
|
54
|
+
state: ErrorTrackingState,
|
|
55
|
+
limit = 10,
|
|
56
|
+
): readonly ErrorAggregation[] => {
|
|
57
|
+
return [...getAggregations(state)]
|
|
58
|
+
.sort((a, b) => b.count - a.count)
|
|
59
|
+
.slice(0, limit);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// Pure function to get error rate
|
|
63
|
+
export const getErrorRate = (
|
|
64
|
+
state: ErrorTrackingState,
|
|
65
|
+
route: string,
|
|
66
|
+
now: number,
|
|
67
|
+
timeWindowMs = 60000,
|
|
68
|
+
): number => {
|
|
69
|
+
const recentErrors = state.errors.filter(
|
|
70
|
+
(e) => e.route === route && e.timestamp >= now - timeWindowMs,
|
|
71
|
+
);
|
|
72
|
+
return recentErrors.length;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// Pure function to get error statistics
|
|
76
|
+
export const getErrorStatistics = (
|
|
77
|
+
state: ErrorTrackingState,
|
|
78
|
+
now: number,
|
|
79
|
+
): {
|
|
80
|
+
readonly totalErrors: number;
|
|
81
|
+
readonly uniqueRoutes: number;
|
|
82
|
+
readonly uniqueErrorTypes: number;
|
|
83
|
+
readonly topError: string | null;
|
|
84
|
+
readonly errorRate: number;
|
|
85
|
+
} => {
|
|
86
|
+
const uniqueRoutes = new Set(state.errors.map((e) => e.route)).size;
|
|
87
|
+
const uniqueErrorTypes = new Set(state.errors.map((e) => e.errorType)).size;
|
|
88
|
+
const topError = getTopErrors(state, 1)[0] || null;
|
|
89
|
+
|
|
90
|
+
// Calculate error rate (errors per minute in last hour)
|
|
91
|
+
const lastHourErrors = state.errors.filter(
|
|
92
|
+
(e) => e.timestamp >= now - 3600000,
|
|
93
|
+
);
|
|
94
|
+
const errorRate = lastHourErrors.length / 60;
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
totalErrors: state.errors.length,
|
|
98
|
+
uniqueRoutes,
|
|
99
|
+
uniqueErrorTypes,
|
|
100
|
+
topError: topError ? `${topError.route}:${topError.errorType}` : null,
|
|
101
|
+
errorRate,
|
|
102
|
+
};
|
|
103
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ErrorAggregation,
|
|
3
|
+
ErrorTrackingState,
|
|
4
|
+
RouteError,
|
|
5
|
+
} from "../models";
|
|
6
|
+
import { createErrorAggregation, createRouteError } from "../models";
|
|
7
|
+
|
|
8
|
+
// Pure function to record error
|
|
9
|
+
export const recordError = (
|
|
10
|
+
state: ErrorTrackingState,
|
|
11
|
+
route: string,
|
|
12
|
+
error: Error,
|
|
13
|
+
now: number,
|
|
14
|
+
userContext?: Record<string, unknown>,
|
|
15
|
+
metadata?: Record<string, unknown>,
|
|
16
|
+
userAgent?: string,
|
|
17
|
+
): ErrorTrackingState => {
|
|
18
|
+
const routeError = createRouteError(
|
|
19
|
+
route,
|
|
20
|
+
error,
|
|
21
|
+
now,
|
|
22
|
+
userContext,
|
|
23
|
+
metadata,
|
|
24
|
+
userAgent,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// Add error to list
|
|
28
|
+
const newErrors = [...state.errors, routeError];
|
|
29
|
+
|
|
30
|
+
// Keep only last maxErrors
|
|
31
|
+
const trimmedErrors =
|
|
32
|
+
newErrors.length > state.config.maxErrors
|
|
33
|
+
? newErrors.slice(-state.config.maxErrors)
|
|
34
|
+
: newErrors;
|
|
35
|
+
|
|
36
|
+
// Update aggregation
|
|
37
|
+
const newAggregations = updateAggregation(
|
|
38
|
+
state.aggregations,
|
|
39
|
+
routeError,
|
|
40
|
+
state.config.maxAggregations,
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
...state,
|
|
45
|
+
errors: Object.freeze(trimmedErrors),
|
|
46
|
+
aggregations: Object.freeze(newAggregations),
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Helper function to update aggregation
|
|
51
|
+
const updateAggregation = (
|
|
52
|
+
aggregations: Readonly<Record<string, ErrorAggregation>>,
|
|
53
|
+
error: RouteError,
|
|
54
|
+
maxAggregations: number,
|
|
55
|
+
): Record<string, ErrorAggregation> => {
|
|
56
|
+
const key = `${error.route}:${error.errorType}`;
|
|
57
|
+
const existing = aggregations[key];
|
|
58
|
+
|
|
59
|
+
if (existing) {
|
|
60
|
+
const newAffectedUsers = new Set(existing.affectedUsers);
|
|
61
|
+
if (error.userContext?.userId) {
|
|
62
|
+
newAffectedUsers.add(String(error.userContext.userId));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
...aggregations,
|
|
67
|
+
[key]: Object.freeze({
|
|
68
|
+
...existing,
|
|
69
|
+
count: existing.count + 1,
|
|
70
|
+
lastSeen: error.timestamp,
|
|
71
|
+
affectedUsers: newAffectedUsers,
|
|
72
|
+
}),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const newAggregation = createErrorAggregation(
|
|
77
|
+
error.route,
|
|
78
|
+
error.errorType,
|
|
79
|
+
error.timestamp,
|
|
80
|
+
error.userContext?.userId ? String(error.userContext.userId) : undefined,
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const newAggregations = { ...aggregations, [key]: newAggregation };
|
|
84
|
+
|
|
85
|
+
// Keep only last maxAggregations
|
|
86
|
+
const aggregationKeys = Object.keys(newAggregations);
|
|
87
|
+
if (aggregationKeys.length > maxAggregations) {
|
|
88
|
+
const oldestKey = getOldestAggregationKey(newAggregations);
|
|
89
|
+
if (oldestKey) {
|
|
90
|
+
delete newAggregations[oldestKey];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return newAggregations;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// Helper function to get oldest aggregation key
|
|
98
|
+
const getOldestAggregationKey = (
|
|
99
|
+
aggregations: Record<string, ErrorAggregation>,
|
|
100
|
+
): string | null => {
|
|
101
|
+
let oldestKey: string | null = null;
|
|
102
|
+
let oldestTime = Infinity;
|
|
103
|
+
|
|
104
|
+
for (const [key, agg] of Object.entries(aggregations)) {
|
|
105
|
+
if (agg.firstSeen < oldestTime) {
|
|
106
|
+
oldestTime = agg.firstSeen;
|
|
107
|
+
oldestKey = key;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return oldestKey;
|
|
112
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ErrorTrackingState } from "../models";
|
|
2
|
+
import {
|
|
3
|
+
getAggregations,
|
|
4
|
+
getErrorStatistics,
|
|
5
|
+
getTopErrors,
|
|
6
|
+
} from "./error-queries";
|
|
7
|
+
|
|
8
|
+
// Pure function to generate error report
|
|
9
|
+
export const generateErrorReport = (
|
|
10
|
+
state: ErrorTrackingState,
|
|
11
|
+
now: number,
|
|
12
|
+
): string => {
|
|
13
|
+
const stats = getErrorStatistics(state, now);
|
|
14
|
+
let report = "Route Error Report\n";
|
|
15
|
+
report += "===================\n\n";
|
|
16
|
+
report += `Total Errors: ${stats.totalErrors}\n`;
|
|
17
|
+
report += `Unique Routes: ${stats.uniqueRoutes}\n`;
|
|
18
|
+
report += `Unique Error Types: ${stats.uniqueErrorTypes}\n`;
|
|
19
|
+
report += `Error Rate: ${stats.errorRate.toFixed(2)}/min\n`;
|
|
20
|
+
if (stats.topError) {
|
|
21
|
+
report += `Top Error: ${stats.topError}\n`;
|
|
22
|
+
}
|
|
23
|
+
report += "\n";
|
|
24
|
+
|
|
25
|
+
report += "Top Errors:\n";
|
|
26
|
+
const topErrors = getTopErrors(state, 5);
|
|
27
|
+
for (const error of topErrors) {
|
|
28
|
+
report += `\n${error.route} - ${error.errorType}\n`;
|
|
29
|
+
report += ` Count: ${error.count}\n`;
|
|
30
|
+
report += ` Affected Users: ${error.affectedUsers.size}\n`;
|
|
31
|
+
report += ` First Seen: ${new Date(error.firstSeen).toISOString()}\n`;
|
|
32
|
+
report += ` Last Seen: ${new Date(error.lastSeen).toISOString()}\n`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return report;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Pure function to export errors as JSON
|
|
39
|
+
export const exportErrorsAsJSON = (
|
|
40
|
+
state: ErrorTrackingState,
|
|
41
|
+
now: number,
|
|
42
|
+
): string => {
|
|
43
|
+
return JSON.stringify(
|
|
44
|
+
{
|
|
45
|
+
statistics: getErrorStatistics(state, now),
|
|
46
|
+
aggregations: getAggregations(state).map((a) => ({
|
|
47
|
+
...a,
|
|
48
|
+
affectedUsers: Array.from(a.affectedUsers),
|
|
49
|
+
})),
|
|
50
|
+
recentErrors: state.errors.slice(-50),
|
|
51
|
+
},
|
|
52
|
+
null,
|
|
53
|
+
2,
|
|
54
|
+
);
|
|
55
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ErrorAggregation, RouteError } from "../models";
|
|
2
|
+
|
|
3
|
+
export const validateRouteError = (error: RouteError): boolean => {
|
|
4
|
+
if (!error.route || typeof error.route !== "string") return false;
|
|
5
|
+
if (!error.error || !(error.error instanceof Error)) return false;
|
|
6
|
+
if (!error.errorType || typeof error.errorType !== "string") return false;
|
|
7
|
+
if (typeof error.timestamp !== "number" || error.timestamp < 0) return false;
|
|
8
|
+
return true;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const validateErrorAggregation = (
|
|
12
|
+
aggregation: ErrorAggregation,
|
|
13
|
+
): boolean => {
|
|
14
|
+
if (!aggregation.route || typeof aggregation.route !== "string") return false;
|
|
15
|
+
if (!aggregation.errorType || typeof aggregation.errorType !== "string")
|
|
16
|
+
return false;
|
|
17
|
+
if (typeof aggregation.count !== "number" || aggregation.count < 0)
|
|
18
|
+
return false;
|
|
19
|
+
if (typeof aggregation.firstSeen !== "number" || aggregation.firstSeen < 0)
|
|
20
|
+
return false;
|
|
21
|
+
if (typeof aggregation.lastSeen !== "number" || aggregation.lastSeen < 0)
|
|
22
|
+
return false;
|
|
23
|
+
if (!(aggregation.affectedUsers instanceof Set)) return false;
|
|
24
|
+
return true;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const validateRoutePath = (path: string): boolean => {
|
|
28
|
+
if (!path || typeof path !== "string") return false;
|
|
29
|
+
if (!path.startsWith("/")) return false;
|
|
30
|
+
return true;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const validateErrorType = (errorType: string): boolean => {
|
|
34
|
+
if (!errorType || typeof errorType !== "string") return false;
|
|
35
|
+
const validTypes = [
|
|
36
|
+
"Error",
|
|
37
|
+
"TypeError",
|
|
38
|
+
"ReferenceError",
|
|
39
|
+
"SyntaxError",
|
|
40
|
+
"RangeError",
|
|
41
|
+
"URIError",
|
|
42
|
+
];
|
|
43
|
+
return (
|
|
44
|
+
validTypes.includes(errorType) || /^[A-Z][a-zA-Z]*Error$/.test(errorType)
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RouteError } from "../types";
|
|
2
|
+
|
|
3
|
+
// Port for error storage (dependency injection point)
|
|
4
|
+
export interface IErrorStorage {
|
|
5
|
+
saveError(error: RouteError): Promise<void>;
|
|
6
|
+
getErrors(route?: string): Promise<RouteError[]>;
|
|
7
|
+
clearErrors(route?: string): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Port for error reporting (dependency injection point)
|
|
11
|
+
export interface IErrorReporter {
|
|
12
|
+
sendReport(report: string): Promise<void>;
|
|
13
|
+
sendAlert(error: RouteError): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Port for error aggregation (dependency injection point)
|
|
17
|
+
export interface IErrorAggregator {
|
|
18
|
+
aggregateErrors(errors: RouteError[]): Promise<void>;
|
|
19
|
+
getAggregations(): Promise<import("../domain/models").ErrorAggregation[]>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createFeatureFlag,
|
|
3
|
+
createFeatureFlagState,
|
|
4
|
+
createUserSegment,
|
|
5
|
+
} from "../../domain";
|
|
6
|
+
import {
|
|
7
|
+
addRouteFlag,
|
|
8
|
+
addUserSegment,
|
|
9
|
+
deleteFlag,
|
|
10
|
+
filterRoutesByFlags,
|
|
11
|
+
getAuditLog,
|
|
12
|
+
getFlag,
|
|
13
|
+
getFlagStatistics,
|
|
14
|
+
getUserSegment,
|
|
15
|
+
isEnabled,
|
|
16
|
+
isRouteEnabled,
|
|
17
|
+
setFlag,
|
|
18
|
+
toggleFlag,
|
|
19
|
+
} from "../../domain/operations";
|
|
20
|
+
import type {
|
|
21
|
+
AuditLogEntry,
|
|
22
|
+
FeatureFlag,
|
|
23
|
+
FeatureFlagState,
|
|
24
|
+
UserSegment,
|
|
25
|
+
} from "../../types";
|
|
26
|
+
|
|
27
|
+
// Use case: Set flag
|
|
28
|
+
export const setFlagUseCase = (
|
|
29
|
+
state: FeatureFlagState,
|
|
30
|
+
flag: FeatureFlag,
|
|
31
|
+
now: Date,
|
|
32
|
+
): FeatureFlagState => {
|
|
33
|
+
return setFlag(state, flag, now);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// Use case: Get flag
|
|
37
|
+
export const getFlagUseCase = (
|
|
38
|
+
state: FeatureFlagState,
|
|
39
|
+
name: string,
|
|
40
|
+
): FeatureFlag | undefined => {
|
|
41
|
+
return getFlag(state, name);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Use case: Check if flag is enabled
|
|
45
|
+
export const isEnabledUseCase = (
|
|
46
|
+
state: FeatureFlagState,
|
|
47
|
+
name: string,
|
|
48
|
+
now: Date,
|
|
49
|
+
userId?: string,
|
|
50
|
+
): { readonly result: boolean; readonly state: FeatureFlagState } => {
|
|
51
|
+
return isEnabled(state, name, now, userId);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Use case: Add route flag
|
|
55
|
+
export const addRouteFlagUseCase = (
|
|
56
|
+
state: FeatureFlagState,
|
|
57
|
+
routePath: string,
|
|
58
|
+
flagName: string,
|
|
59
|
+
): FeatureFlagState => {
|
|
60
|
+
return addRouteFlag(state, routePath, flagName);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// Use case: Check if route is enabled
|
|
64
|
+
export const isRouteEnabledUseCase = (
|
|
65
|
+
state: FeatureFlagState,
|
|
66
|
+
routePath: string,
|
|
67
|
+
now: Date,
|
|
68
|
+
userId?: string,
|
|
69
|
+
): { readonly result: boolean; readonly state: FeatureFlagState } => {
|
|
70
|
+
return isRouteEnabled(state, routePath, now, userId);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Use case: Filter routes by flags
|
|
74
|
+
export const filterRoutesByFlagsUseCase = (
|
|
75
|
+
state: FeatureFlagState,
|
|
76
|
+
routes: import("../../../../shared/types").RouteConfig[],
|
|
77
|
+
now: Date,
|
|
78
|
+
userId?: string,
|
|
79
|
+
): import("../../../../shared/types").RouteConfig[] => {
|
|
80
|
+
return filterRoutesByFlags(state, routes, now, userId);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Use case: Add user segment
|
|
84
|
+
export const addUserSegmentUseCase = (
|
|
85
|
+
state: FeatureFlagState,
|
|
86
|
+
segment: UserSegment,
|
|
87
|
+
): FeatureFlagState => {
|
|
88
|
+
return addUserSegment(state, segment);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// Use case: Get user segment
|
|
92
|
+
export const getUserSegmentUseCase = (
|
|
93
|
+
state: FeatureFlagState,
|
|
94
|
+
name: string,
|
|
95
|
+
): UserSegment | undefined => {
|
|
96
|
+
return getUserSegment(state, name);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Use case: Get audit log
|
|
100
|
+
export const getAuditLogUseCase = (
|
|
101
|
+
state: FeatureFlagState,
|
|
102
|
+
flagName?: string,
|
|
103
|
+
limit = 100,
|
|
104
|
+
): readonly AuditLogEntry[] => {
|
|
105
|
+
return getAuditLog(state, flagName, limit);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// Use case: Get flag statistics
|
|
109
|
+
export const getFlagStatisticsUseCase = (
|
|
110
|
+
state: FeatureFlagState,
|
|
111
|
+
): {
|
|
112
|
+
readonly totalFlags: number;
|
|
113
|
+
readonly enabledFlags: number;
|
|
114
|
+
readonly flagsWithRollout: number;
|
|
115
|
+
readonly flagsWithConditions: number;
|
|
116
|
+
} => {
|
|
117
|
+
return getFlagStatistics(state);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// Use case: Toggle flag
|
|
121
|
+
export const toggleFlagUseCase = (
|
|
122
|
+
state: FeatureFlagState,
|
|
123
|
+
name: string,
|
|
124
|
+
now: Date,
|
|
125
|
+
): { readonly result: boolean; readonly state: FeatureFlagState } => {
|
|
126
|
+
return toggleFlag(state, name, now);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// Use case: Delete flag
|
|
130
|
+
export const deleteFlagUseCase = (
|
|
131
|
+
state: FeatureFlagState,
|
|
132
|
+
name: string,
|
|
133
|
+
now: Date,
|
|
134
|
+
): { readonly result: boolean; readonly state: FeatureFlagState } => {
|
|
135
|
+
return deleteFlag(state, name, now);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// Use case: Create feature flag
|
|
139
|
+
export const createFeatureFlagUseCase = (
|
|
140
|
+
name: string,
|
|
141
|
+
enabled: boolean,
|
|
142
|
+
options?: Partial<FeatureFlag>,
|
|
143
|
+
): FeatureFlag => {
|
|
144
|
+
return createFeatureFlag(name, enabled, options);
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// Use case: Create user segment
|
|
148
|
+
export const createUserSegmentUseCase = (
|
|
149
|
+
name: string,
|
|
150
|
+
users: string[],
|
|
151
|
+
rules: ((userId: string) => boolean)[],
|
|
152
|
+
): UserSegment => {
|
|
153
|
+
return createUserSegment(name, users, rules);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
// Use case: Create feature flag state
|
|
157
|
+
export const createFeatureFlagStateUseCase = (): FeatureFlagState => {
|
|
158
|
+
return createFeatureFlagState();
|
|
159
|
+
};
|