@xmachines/docs 1.0.0-beta.45 → 1.0.0-beta.48
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 +135 -7
- package/api/@xmachines/play/README.md +134 -57
- package/api/@xmachines/play/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/README.md +130 -155
- package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
- package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +5 -5
- package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +5 -5
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/README.md +140 -232
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
- package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +13 -13
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +6 -6
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +4 -4
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +12 -12
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +4 -4
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +5 -5
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +5 -5
- package/api/@xmachines/play-dom/type-aliases/ActionFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/Actions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +7 -7
- package/api/@xmachines/play-dom/type-aliases/CatalogHasActions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/ComponentRegistry.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomSchema.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/SetState.md +1 -1
- package/api/@xmachines/play-dom/variables/schema.md +1 -1
- package/api/@xmachines/play-dom-router/README.md +160 -158
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-react/README.md +109 -320
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-react-router/README.md +107 -124
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +23 -23
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/README.md +235 -475
- package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +23 -23
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMatcher.md +1 -1
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
- package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteMatcher.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/README.md +105 -73
- package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +117 -263
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +93 -606
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +24 -24
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-svelte/README.md +111 -103
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +11 -11
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-svelte/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/README.md +156 -17
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router/README.md +168 -17
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +147 -122
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +23 -23
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/README.md +195 -173
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +24 -24
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +3 -3
- package/api/@xmachines/play-vue/README.md +126 -271
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +5 -5
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +148 -528
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +24 -24
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/README.md +167 -496
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +12 -12
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/README.md +81 -294
- package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
- package/examples/@xmachines/play-dom-demo/README.md +4 -4
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-dom-router-demo/README.md +3 -3
- package/examples/@xmachines/play-react-demo/README.md +2 -2
- package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-react-router-demo/README.md +2 -2
- package/examples/@xmachines/play-solid-demo/README.md +2 -2
- package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-solid-router-demo/README.md +1 -1
- package/examples/@xmachines/play-svelte-demo/README.md +2 -2
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-spa-router-demo/README.md +3 -3
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +3 -3
- package/examples/@xmachines/play-tanstack-react-router-demo/README.md +1 -1
- package/examples/@xmachines/play-tanstack-solid-router-demo/README.md +1 -1
- package/examples/@xmachines/play-vue-demo/README.md +2 -2
- package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-vue-router-demo/README.md +1 -1
- package/examples/README.md +24 -25
- package/examples/form-validation.md +2 -2
- package/guides/README.md +7 -7
- package/guides/actor-model.md +18 -18
- package/guides/architecture.md +500 -0
- package/guides/configuration.md +556 -0
- package/guides/deployment.md +336 -0
- package/guides/development.md +617 -0
- package/guides/getting-started.md +351 -142
- package/guides/signals.md +19 -19
- package/guides/state-machines.md +16 -16
- package/guides/testing.md +460 -0
- package/package.json +5 -5
- package/guides/installation.md +0 -257
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
<!-- generated-by: gsd-doc-writer -->
|
|
2
|
+
|
|
3
|
+
# Configuration Reference
|
|
4
|
+
|
|
5
|
+
This document describes every configuration file used by the `@xmachines/xmachines-js` monorepo — TypeScript build settings, linting, formatting, testing, and CI/CD. All configuration is file-based; the project uses no environment variables for build or test execution.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Environment Variables](#environment-variables)
|
|
12
|
+
- [TypeScript Configuration](#typescript-configuration)
|
|
13
|
+
- [Shared Base Config (`@xmachines/shared/tsconfig`)](#shared-base-config-xmachinessharedtsconfig)
|
|
14
|
+
- [Root Workspace Coordinator (`tsconfig.json`)](#root-workspace-coordinator-tsconfigjson)
|
|
15
|
+
- [Per-Package Config Pattern](#per-package-config-pattern)
|
|
16
|
+
- [Test TypeScript Config](#test-typescript-config)
|
|
17
|
+
- [Linting Configuration (oxlint)](#linting-configuration-oxlint)
|
|
18
|
+
- [Shared Linting Rules (`@xmachines/shared/oxlint`)](#shared-linting-rules-xmachinessharedoxlint)
|
|
19
|
+
- [Root Linting Config (`oxlint.config.ts`)](#root-linting-config-oxlintconfigts)
|
|
20
|
+
- [Formatting Configuration (oxfmt)](#formatting-configuration-oxfmt)
|
|
21
|
+
- [Shared Formatting Rules (`@xmachines/shared/oxfmt`)](#shared-formatting-rules-xmachinessharedoxfmt)
|
|
22
|
+
- [Root Formatting Config (`oxfmt.config.ts`)](#root-formatting-config-oxfmtconfigts)
|
|
23
|
+
- [Editor Configuration (`.editorconfig`)](#editor-configuration-editorconfig)
|
|
24
|
+
- [Vitest Configuration](#vitest-configuration)
|
|
25
|
+
- [Root Node Test Config (`vitest.config.ts`)](#root-node-test-config-vitestconfigts)
|
|
26
|
+
- [Root Browser Test Config (`vitest.browser.config.ts`)](#root-browser-test-config-vitestbrowserconfigts)
|
|
27
|
+
- [Shared Vitest Helper (`@xmachines/shared/vitest`)](#shared-vitest-helper-xmachinessharedvitest)
|
|
28
|
+
- [Per-Package Vitest Config Pattern](#per-package-vitest-config-pattern)
|
|
29
|
+
- [Coverage Thresholds](#coverage-thresholds)
|
|
30
|
+
- [Release Configuration (`.releaserc.json`)](#release-configuration-releaserc-json)
|
|
31
|
+
- [CI/CD Configuration (`.gitlab-ci.yml`)](#cicd-configuration-gitlab-ciyml)
|
|
32
|
+
- [npm Overrides and Patches](#npm-overrides-and-patches)
|
|
33
|
+
- [Per-Environment Overrides](#per-environment-overrides)
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Environment Variables
|
|
38
|
+
|
|
39
|
+
This project does **not** require environment variables to build, test, or develop. All configuration is expressed through config files checked into the repository.
|
|
40
|
+
|
|
41
|
+
The only environment variable that affects runtime behaviour is `NODE_ENV`, which is managed automatically by Vitest and the CI pipeline.
|
|
42
|
+
|
|
43
|
+
> The `.env` file pattern is in `.gitignore` but no `.env.example` exists — no user-facing environment variables are consumed by this project.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## TypeScript Configuration
|
|
48
|
+
|
|
49
|
+
The monorepo uses a **TypeScript composite build system** with project references. A single root `tsconfig.json` coordinates all packages; each package extends a shared base config from [`@xmachines/shared`](../api/@xmachines/shared/README.md).
|
|
50
|
+
|
|
51
|
+
### Shared Base Config (`@xmachines/shared/tsconfig`)
|
|
52
|
+
|
|
53
|
+
**Source:** `packages/shared/config/tsconfig.json`
|
|
54
|
+
**Exported as:** `@xmachines/shared/tsconfig`
|
|
55
|
+
|
|
56
|
+
This is the authoritative base config inherited by every package. Key settings:
|
|
57
|
+
|
|
58
|
+
| Category | Option | Value | Purpose |
|
|
59
|
+
| ------------- | ---------------------------- | ------------ | ------------------------------------------------------------ |
|
|
60
|
+
| Language | `target` | `ESNext` | Compile to modern JavaScript |
|
|
61
|
+
| Language | `lib` | `["ESNext"]` | ESNext globals only (no DOM) |
|
|
62
|
+
| Language | `types` | `["node"]` | Node.js type declarations |
|
|
63
|
+
| Modules | `module` | `NodeNext` | Native ESM, respects `exports` field |
|
|
64
|
+
| Modules | `moduleResolution` | `NodeNext` | Node12+ resolution algorithm |
|
|
65
|
+
| Modules | `customConditions` | `["source"]` | Resolves `@xmachines/*` to TypeScript source during dev/test |
|
|
66
|
+
| Type checking | `strict` | `true` | Full strict mode |
|
|
67
|
+
| Type checking | `noUnusedLocals` | `true` | Error on unused local variables |
|
|
68
|
+
| Type checking | `noUnusedParameters` | `true` | Error on unused function parameters |
|
|
69
|
+
| Type checking | `noFallthroughCasesInSwitch` | `true` | Error on switch fallthrough |
|
|
70
|
+
| Type checking | `noImplicitReturns` | `true` | All code paths must return |
|
|
71
|
+
| Type checking | `noImplicitOverride` | `true` | `override` keyword required |
|
|
72
|
+
| Type checking | `exactOptionalPropertyTypes` | `true` | Optional props cannot be `undefined` unless explicitly typed |
|
|
73
|
+
| Emit | `declaration` | `true` | Generate `.d.ts` files |
|
|
74
|
+
| Emit | `declarationMap` | `true` | Generate `.d.ts.map` for IDE "go to definition" |
|
|
75
|
+
| Emit | `sourceMap` | `true` | Generate `.js.map` files |
|
|
76
|
+
| Emit | `removeComments` | `false` | Preserve JSDoc in output |
|
|
77
|
+
| Interop | `verbatimModuleSyntax` | `true` | Enforce `import type` for type-only imports |
|
|
78
|
+
| Interop | `isolatedModules` | `true` | Each file compilable independently |
|
|
79
|
+
|
|
80
|
+
**Include/exclude defaults:**
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"include": ["src/**/*"],
|
|
85
|
+
"exclude": ["dist", "node_modules", "**/*.spec.ts", "**/*.test.ts"]
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Root Workspace Coordinator (`tsconfig.json`)
|
|
90
|
+
|
|
91
|
+
**Source:** `tsconfig.json`
|
|
92
|
+
|
|
93
|
+
The root config does **not compile anything itself**. It contains only `references` to all packages, listed in dependency order (leaves first, dependents last). TypeScript uses this to build the full graph in the correct sequence.
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
Layer 0 (no internal deps): play-signals, play, docs
|
|
97
|
+
Layer 1 (depends on Layer 0): play-actor
|
|
98
|
+
Layer 2 (depends on Layers 0–1): play-router, play-dom-router, play-sveltekit-router,
|
|
99
|
+
play-xstate, play-react, play-vue, play-solid, play-svelte,
|
|
100
|
+
play-dom, play-tanstack-react-router, play-vue-router,
|
|
101
|
+
play-solid-router, play-svelte-spa-router,
|
|
102
|
+
play-tanstack-solid-router
|
|
103
|
+
Layer 3 (top-level / examples): play-react-router, all examples/demo packages
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Run the full build with:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm run build # tsc --build (incremental, correct order)
|
|
110
|
+
npm run build -w <pkg> # Build one package and its dependencies
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Per-Package Config Pattern
|
|
114
|
+
|
|
115
|
+
Every package uses two `tsconfig` files:
|
|
116
|
+
|
|
117
|
+
**`packages/<name>/tsconfig.base.json`** — points to the shared base:
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
122
|
+
"extends": "@xmachines/shared/tsconfig"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**`packages/<name>/tsconfig.json`** — the build config with composite enabled:
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
131
|
+
"extends": "./tsconfig.base.json",
|
|
132
|
+
"compilerOptions": {
|
|
133
|
+
"composite": true,
|
|
134
|
+
"rootDir": "./src",
|
|
135
|
+
"outDir": "./dist"
|
|
136
|
+
},
|
|
137
|
+
"include": ["src/**/*"]
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Packages that depend on other `@xmachines/*` packages also declare `references` (see [`@xmachines/shared`](../api/@xmachines/shared/README.md) for the base config):
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"references": [{ "path": "../play" }]
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Test TypeScript Config
|
|
150
|
+
|
|
151
|
+
**Source:** `packages/shared/config/tsconfig.test.json`
|
|
152
|
+
**Exported as:** `@xmachines/shared/tsconfig-test`
|
|
153
|
+
|
|
154
|
+
Per-package test configs extend both the package base and this shared test config:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"extends": ["./tsconfig.base.json", "@xmachines/shared/tsconfig-test"],
|
|
159
|
+
"include": ["src/**/*", "test/**/*"]
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Key test-specific settings:
|
|
164
|
+
|
|
165
|
+
| Option | Value | Purpose |
|
|
166
|
+
| ---------------------------- | ---------------------------- | ----------------------------------------------------- |
|
|
167
|
+
| `noEmit` | `true` | Type-check only; Vitest transpiles at runtime |
|
|
168
|
+
| `allowImportingTsExtensions` | `true` | Import `.ts` files directly in test code |
|
|
169
|
+
| `customConditions` | `["source"]` | Resolves packages to source, not dist |
|
|
170
|
+
| `types` | `["node", "vitest/globals"]` | Adds Vitest global types (`describe`, `it`, `expect`) |
|
|
171
|
+
|
|
172
|
+
The root `tsconfig.test.json` coordinates all per-package test configs (used by `npm run test:build`).
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Linting Configuration (oxlint)
|
|
177
|
+
|
|
178
|
+
The project uses **oxlint** (`^1.60.0`) — a fast Rust-based linter with ESLint-compatible rules.
|
|
179
|
+
|
|
180
|
+
### Shared Linting Rules (`@xmachines/shared/oxlint`)
|
|
181
|
+
|
|
182
|
+
**Source:** `packages/shared/config/oxlint.config.ts`
|
|
183
|
+
**Exported as:** `@xmachines/shared/oxlint`
|
|
184
|
+
|
|
185
|
+
| Setting | Value |
|
|
186
|
+
| ------------- | --------------------------------- |
|
|
187
|
+
| Plugins | `typescript`, `unicorn`, `import` |
|
|
188
|
+
| `correctness` | `"error"` |
|
|
189
|
+
| `suspicious` | `"warn"` |
|
|
190
|
+
| `pedantic` | `"off"` |
|
|
191
|
+
| `perf` | `"warn"` |
|
|
192
|
+
| `style` | `"off"` |
|
|
193
|
+
|
|
194
|
+
Custom rule overrides:
|
|
195
|
+
|
|
196
|
+
| Rule | Level | Reason |
|
|
197
|
+
| ---------------------------- | --------- | ------------------------------------------- |
|
|
198
|
+
| `unicorn/filename-case` | `"off"` | Not enforced project-wide |
|
|
199
|
+
| `import/no-cycle` | `"error"` | Circular imports are forbidden |
|
|
200
|
+
| `typescript/no-explicit-any` | `"error"` | `any` is prohibited |
|
|
201
|
+
| `typescript/no-unused-vars` | `"error"` | Unused vars are errors; `_` prefix exempted |
|
|
202
|
+
|
|
203
|
+
### Root Linting Config (`oxlint.config.ts`)
|
|
204
|
+
|
|
205
|
+
**Source:** `oxlint.config.ts`
|
|
206
|
+
|
|
207
|
+
Extends the shared config and adds monorepo-level ignore patterns:
|
|
208
|
+
|
|
209
|
+
| Ignored Path | Reason |
|
|
210
|
+
| ----------------- | ---------------------------- |
|
|
211
|
+
| `.planning` | Auto-generated planning docs |
|
|
212
|
+
| `.opencode` | AI tooling cache |
|
|
213
|
+
| `node_modules` | Third-party dependencies |
|
|
214
|
+
| `dist` | Build output |
|
|
215
|
+
| `build` | Build output |
|
|
216
|
+
| `coverage` | Test coverage output |
|
|
217
|
+
| `docs/api/_media` | Auto-generated TypeDoc media |
|
|
218
|
+
| `*.min.js` | Minified files |
|
|
219
|
+
| `CHANGELOG.md` | Managed by semantic-release |
|
|
220
|
+
|
|
221
|
+
**Run commands:**
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
npm run lint # oxlint .
|
|
225
|
+
npm run lint:fix # oxlint --fix .
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Per-package linting can be run with:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
npm run lint -w packages/<name>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Formatting Configuration (oxfmt)
|
|
237
|
+
|
|
238
|
+
The project uses **oxfmt** (`^0.45.0`) — an opinionated formatter compatible with Prettier's output.
|
|
239
|
+
|
|
240
|
+
### Shared Formatting Rules (`@xmachines/shared/oxfmt`)
|
|
241
|
+
|
|
242
|
+
**Source:** `packages/shared/config/oxfmt.config.ts`
|
|
243
|
+
**Exported as:** `@xmachines/shared/oxfmt`
|
|
244
|
+
|
|
245
|
+
| Option | Value |
|
|
246
|
+
| -------------------- | ----------------------------- |
|
|
247
|
+
| `printWidth` | `100` |
|
|
248
|
+
| `tabWidth` | `4` |
|
|
249
|
+
| `useTabs` | `true` (tabs for indentation) |
|
|
250
|
+
| `semi` | `true` |
|
|
251
|
+
| `singleQuote` | `false` (double quotes) |
|
|
252
|
+
| `trailingComma` | `"all"` |
|
|
253
|
+
| `insertFinalNewline` | `true` |
|
|
254
|
+
|
|
255
|
+
**JSON and YAML override** (via `overrides`):
|
|
256
|
+
|
|
257
|
+
| Option | Value |
|
|
258
|
+
| ---------- | ---------------- |
|
|
259
|
+
| `useTabs` | `false` (spaces) |
|
|
260
|
+
| `tabWidth` | `2` |
|
|
261
|
+
|
|
262
|
+
Default ignored paths include: `**/node_modules`, `**/dist`, `**/build`, `**/coverage`, `**/*.tsbuildinfo`, `**/*.log`, `**/*.min.js`, `**/.git`, `**/.svelte-kit`, `**/.nyc_output`, IDE directories, and test artifact directories.
|
|
263
|
+
|
|
264
|
+
### Root Formatting Config (`oxfmt.config.ts`)
|
|
265
|
+
|
|
266
|
+
**Source:** `oxfmt.config.ts`
|
|
267
|
+
|
|
268
|
+
Extends the shared config and adds additional monorepo-level ignore patterns:
|
|
269
|
+
|
|
270
|
+
| Ignored Path |
|
|
271
|
+
| --------------- |
|
|
272
|
+
| `.planning` |
|
|
273
|
+
| `.opencode` |
|
|
274
|
+
| `.agents` |
|
|
275
|
+
| `.githuman` |
|
|
276
|
+
| `.devcontainer` |
|
|
277
|
+
| `CHANGELOG.md` |
|
|
278
|
+
| `Thumbs.db` |
|
|
279
|
+
|
|
280
|
+
**Run commands:**
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
npm run format # oxfmt . (format in place)
|
|
284
|
+
npm run format:check # oxfmt --check . (CI mode, no writes)
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Editor Configuration (`.editorconfig`)
|
|
290
|
+
|
|
291
|
+
**Source:** `.editorconfig`
|
|
292
|
+
|
|
293
|
+
Enforces consistent whitespace across all editors:
|
|
294
|
+
|
|
295
|
+
| File Pattern | `indent_style` | `indent_size` | Notes |
|
|
296
|
+
| ------------------- | -------------- | ------------- | ----------------------------------------------------------------- |
|
|
297
|
+
| `*` (default) | `tab` | `4` | UTF-8, LF line endings, trim trailing whitespace, final newline |
|
|
298
|
+
| `*.{json,yml,yaml}` | `space` | `2` | Matches oxfmt JSON/YAML override |
|
|
299
|
+
| `*.md` | (inherited) | (inherited) | Trailing whitespace **not** trimmed (allows Markdown line breaks) |
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Vitest Configuration
|
|
304
|
+
|
|
305
|
+
The project uses **Vitest** (`^4.1.4`) with two distinct test modes — Node.js (unit/integration) and Browser (Playwright Chromium).
|
|
306
|
+
|
|
307
|
+
### Root Node Test Config (`vitest.config.ts`)
|
|
308
|
+
|
|
309
|
+
**Source:** `vitest.config.ts`
|
|
310
|
+
|
|
311
|
+
| Option | Value | Notes |
|
|
312
|
+
| ----------------- | -------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
313
|
+
| `pool` | `"forks"` | Isolated Node.js process per file |
|
|
314
|
+
| `maxWorkers` | `4` | Parallel worker cap |
|
|
315
|
+
| `isolate` | `true` | Full module isolation between tests |
|
|
316
|
+
| `fileParallelism` | `false` | Files run sequentially within each worker |
|
|
317
|
+
| `testTimeout` | `10000` ms | Per-test timeout |
|
|
318
|
+
| `hookTimeout` | `30000` ms | `beforeAll`/`afterAll` timeout |
|
|
319
|
+
| `teardownTimeout` | `30000` ms | Teardown timeout |
|
|
320
|
+
| `resolve.alias` | [`xmAliases(...)`](../api/@xmachines/shared/vite-aliases/functions/xmAliases.md) | `@xmachines/*` → TypeScript source |
|
|
321
|
+
|
|
322
|
+
The config enumerates all per-package `vitest.config.ts` files explicitly via the `projects` array. 29 project configs are currently registered.
|
|
323
|
+
|
|
324
|
+
**Run commands:**
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
npm test # vitest run (all packages, node mode)
|
|
328
|
+
npm run test:watch # vitest (watch mode)
|
|
329
|
+
npm run test:coverage # vitest run --coverage
|
|
330
|
+
npm run coverage:report # vitest run --coverage --coverage.reporter=html
|
|
331
|
+
npm run coverage:summary # vitest run --coverage --coverage.reporter=json-summary
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Root Browser Test Config (`vitest.browser.config.ts`)
|
|
335
|
+
|
|
336
|
+
**Source:** `vitest.browser.config.ts`
|
|
337
|
+
|
|
338
|
+
Browser tests run via **Playwright Chromium** in headless mode.
|
|
339
|
+
|
|
340
|
+
| Option | Value | Notes |
|
|
341
|
+
| ----------------- | -------------------------------- | -------------------------------------------------- |
|
|
342
|
+
| `pool` | `"forks"` | Isolated process per browser project |
|
|
343
|
+
| `maxWorkers` | `2` | Capped lower than Node tests (Playwright overhead) |
|
|
344
|
+
| `isolate` | `true` | Full isolation |
|
|
345
|
+
| `fileParallelism` | `false` | Sequential file execution |
|
|
346
|
+
| `testTimeout` | `20000` ms | Higher than Node (UI rendering overhead) |
|
|
347
|
+
| `hookTimeout` | `30000` ms | Same as Node |
|
|
348
|
+
| `teardownTimeout` | `30000` ms | Same as Node |
|
|
349
|
+
| `globalSetup` | `vitest.browser.global-setup.ts` | Raises `process.setMaxListeners` to `32` |
|
|
350
|
+
| `resolve` | `xmResolve(...)` | Source aliases + `conditions: ["source"]` |
|
|
351
|
+
|
|
352
|
+
The `projects` array lists 24 browser test configs (package-level unit browser tests and demo app integration flows).
|
|
353
|
+
|
|
354
|
+
**Run command:**
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
npm run test:browser # vitest run --config vitest.browser.config.ts
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Shared Vitest Helper ([`@xmachines/shared/vitest`](../api/@xmachines/shared/vitest/README.md))
|
|
361
|
+
|
|
362
|
+
**Source:** `packages/shared/config/vitest.ts`
|
|
363
|
+
**Exported as:** [`@xmachines/shared/vitest`](../api/@xmachines/shared/vitest/README.md)
|
|
364
|
+
|
|
365
|
+
All packages call [`defineXmVitestConfig(import.meta.url, overrides)`](../api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md) instead of `defineConfig` directly. This helper automatically:
|
|
366
|
+
|
|
367
|
+
1. Injects `resolve.alias: xmAliases(import.meta.url)` so `@xmachines/*` packages resolve to TypeScript source.
|
|
368
|
+
2. Prepends `vitest.node.setup.ts` for non-browser projects (enforces Node.js >= 22.0.0 at runtime).
|
|
369
|
+
3. Prepends `vitest.setup.ts` (extends matchers with `@testing-library/jest-dom`).
|
|
370
|
+
|
|
371
|
+
Setup injection is additive — caller-provided `setupFiles` are appended after the shared ones.
|
|
372
|
+
|
|
373
|
+
### Per-Package Vitest Config Pattern
|
|
374
|
+
|
|
375
|
+
Packages use one of two environment patterns:
|
|
376
|
+
|
|
377
|
+
**Node environment (core packages):**
|
|
378
|
+
|
|
379
|
+
```typescript
|
|
380
|
+
// packages/<name>/vitest.config.ts
|
|
381
|
+
import { defineXmVitestConfig } from "@xmachines/shared/vitest";
|
|
382
|
+
|
|
383
|
+
export default defineXmVitestConfig(import.meta.url, {
|
|
384
|
+
test: {
|
|
385
|
+
environment: "node",
|
|
386
|
+
include: ["test/**/*.spec.ts", "test/**/*.test.ts"],
|
|
387
|
+
exclude: ["node_modules/**"],
|
|
388
|
+
coverage: {
|
|
389
|
+
/* package-specific thresholds */
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
});
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Browser environment (packages with DOM interaction):**
|
|
396
|
+
|
|
397
|
+
```typescript
|
|
398
|
+
// packages/<name>/vitest.browser.config.ts
|
|
399
|
+
import { defineConfig } from "vitest/config";
|
|
400
|
+
import { playwright } from "@vitest/browser-playwright";
|
|
401
|
+
import { xmResolve, xmCacheDir, xmOptimizeDeps } from "@xmachines/shared/vite-aliases";
|
|
402
|
+
|
|
403
|
+
export default defineConfig({
|
|
404
|
+
cacheDir: xmCacheDir(import.meta.url, "<project-name>"),
|
|
405
|
+
resolve: xmResolve(import.meta.url),
|
|
406
|
+
optimizeDeps: xmOptimizeDeps([
|
|
407
|
+
/* framework packages */
|
|
408
|
+
]),
|
|
409
|
+
test: {
|
|
410
|
+
name: "<project-name>",
|
|
411
|
+
browser: {
|
|
412
|
+
enabled: true,
|
|
413
|
+
provider: playwright(),
|
|
414
|
+
headless: true,
|
|
415
|
+
instances: [{ browser: "chromium" }],
|
|
416
|
+
},
|
|
417
|
+
include: ["test/browser/**/*.browser.test.ts"],
|
|
418
|
+
},
|
|
419
|
+
});
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### Coverage Thresholds
|
|
423
|
+
|
|
424
|
+
Coverage is enforced by `@vitest/coverage-v8`. Thresholds apply at two levels:
|
|
425
|
+
|
|
426
|
+
**Root (regression gate) — `vitest.config.ts`:**
|
|
427
|
+
|
|
428
|
+
| Type | Threshold |
|
|
429
|
+
| ---------- | --------- |
|
|
430
|
+
| Lines | 80% |
|
|
431
|
+
| Functions | 80% |
|
|
432
|
+
| Branches | 75% |
|
|
433
|
+
| Statements | 80% |
|
|
434
|
+
|
|
435
|
+
**Core packages** (`play`, `play-actor`, `play-signals` and others with highest standards):
|
|
436
|
+
|
|
437
|
+
| Type | Threshold |
|
|
438
|
+
| ---------- | --------- |
|
|
439
|
+
| Lines | 90% |
|
|
440
|
+
| Functions | 90% |
|
|
441
|
+
| Branches | 85% |
|
|
442
|
+
| Statements | 90% |
|
|
443
|
+
|
|
444
|
+
**Integration/renderer packages** (e.g., `play-react`, `play-vue`, `play-solid`):
|
|
445
|
+
|
|
446
|
+
| Type | Threshold |
|
|
447
|
+
| ---------- | --------- |
|
|
448
|
+
| Lines | 80% |
|
|
449
|
+
| Functions | 80% |
|
|
450
|
+
| Branches | 80% |
|
|
451
|
+
| Statements | 80% |
|
|
452
|
+
|
|
453
|
+
Coverage reports are produced in `text`, `html`, and `json-summary` formats, written to `coverage/` (gitignored).
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
## Release Configuration (`.releaserc.json`)
|
|
458
|
+
|
|
459
|
+
**Source:** `.releaserc.json`
|
|
460
|
+
**Tool:** `semantic-release`
|
|
461
|
+
|
|
462
|
+
| Setting | Value |
|
|
463
|
+
| ------------------ | ------------------------------------------------------ |
|
|
464
|
+
| Tag format | `v${version}` |
|
|
465
|
+
| Stable branch | `main` |
|
|
466
|
+
| Pre-release branch | `beta` (channel: `beta`, prerelease: auto-incremented) |
|
|
467
|
+
| RC branch | `pre/rc` (channel: `pre/rc`, prerelease: `rc`) |
|
|
468
|
+
|
|
469
|
+
**Release plugins in order:**
|
|
470
|
+
|
|
471
|
+
1. `@semantic-release/commit-analyzer` — determines version bump from conventional commits
|
|
472
|
+
2. `@semantic-release/release-notes-generator` — generates changelog entries
|
|
473
|
+
3. `@semantic-release/changelog` — writes `CHANGELOG.md`
|
|
474
|
+
4. `@semantic-release/exec` — runs `set-workspace-versions.mjs`, builds all packages, regenerates TypeDoc API docs
|
|
475
|
+
5. `@semantic-release/npm` — publishes each public package to npm (18 packages total)
|
|
476
|
+
6. `@semantic-release/git` — commits updated `CHANGELOG.md`, `package.json`, `package-lock.json`, all per-package `package.json` files, and generated API docs
|
|
477
|
+
7. `@semantic-release/gitlab` — creates a GitLab release with tarball assets
|
|
478
|
+
|
|
479
|
+
Packages with `npmPublish: false` (all `examples/demo` packages) are packed as tarballs but not published to npm.
|
|
480
|
+
|
|
481
|
+
The `NPM_ID_TOKEN` GitLab CI token is used for authenticated npm publishing via OIDC. <!-- VERIFY: NPM_OIDC_token configuration details are managed in GitLab CI/CD secrets -->
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
## CI/CD Configuration (`.gitlab-ci.yml`)
|
|
486
|
+
|
|
487
|
+
**Source:** `.gitlab-ci.yml`
|
|
488
|
+
|
|
489
|
+
**Pipeline trigger conditions:**
|
|
490
|
+
|
|
491
|
+
| Condition | Trigger |
|
|
492
|
+
| ----------------------------------------- | ----------------------------- |
|
|
493
|
+
| `$CI_COMMIT_TAG` | Tag push |
|
|
494
|
+
| `$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH` | Push to default branch (main) |
|
|
495
|
+
| `$CI_MERGE_REQUEST_IID` | Merge request |
|
|
496
|
+
|
|
497
|
+
**Included components:**
|
|
498
|
+
|
|
499
|
+
| Component | Version | Purpose |
|
|
500
|
+
| ---------------------------------------------------- | ------- | ----------------------------------------- |
|
|
501
|
+
| `to-be-continuous/node/gitlab-ci-node` | `5.1.2` | Node.js build, test, lint, and audit jobs |
|
|
502
|
+
| `to-be-continuous/semantic-release/gitlab-ci-semrel` | `4.1.0` | Automated versioning and release |
|
|
503
|
+
|
|
504
|
+
**node-build job** (the primary test job):
|
|
505
|
+
|
|
506
|
+
| Setting | Value |
|
|
507
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ----------------- |
|
|
508
|
+
| Test command | `npm run test:coverage -- --coverage.reporter=text --coverage.reporter=cobertura --coverage.reportsDirectory=reports/coverage --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml` |
|
|
509
|
+
| Coverage extraction | Regex: `/All files[^ | ]\*\|[^ | ]\*\s+([\d\.]+)/` |
|
|
510
|
+
| JUnit report | `reports/junit.xml` |
|
|
511
|
+
| Coverage report | `reports/coverage/cobertura-coverage.xml` (Cobertura format) |
|
|
512
|
+
| Audit level | `--audit-level=high` |
|
|
513
|
+
|
|
514
|
+
**semantic-release job:**
|
|
515
|
+
|
|
516
|
+
| Setting | Value |
|
|
517
|
+
| ------------------ | ------------------------ |
|
|
518
|
+
| Release branches | `main`, `beta`, `pre/rc` |
|
|
519
|
+
| Artifact path | `dist/releases/*.tgz` |
|
|
520
|
+
| Artifact retention | 1 week |
|
|
521
|
+
|
|
522
|
+
Jobs tagged as `rules: *auto-or-manual` run automatically on tag/main-branch pushes and are available as manual triggers on MRs.
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## npm Overrides and Patches
|
|
527
|
+
|
|
528
|
+
**Source:** `package.json` `overrides` section and `patches/` directory
|
|
529
|
+
|
|
530
|
+
The root `package.json` declares two npm overrides to pin transitive dependency versions:
|
|
531
|
+
|
|
532
|
+
| Package | Override | Reason |
|
|
533
|
+
| ----------------- | --------------------------- | ----------------------------------- |
|
|
534
|
+
| `glob` | `^13.0.6` | Pin to compatible major |
|
|
535
|
+
| `whatwg-encoding` | `npm:@exodus/bytes@^1.15.0` | Replace with compatible alternative |
|
|
536
|
+
|
|
537
|
+
Patches are applied automatically on `npm install` via the `postinstall` script:
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
# Applied via postinstall → patch-package
|
|
541
|
+
npm ci # patches applied automatically after install
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
To re-apply patches manually:
|
|
545
|
+
|
|
546
|
+
```bash
|
|
547
|
+
npm run apply-patches # runs patch-package
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
---
|
|
551
|
+
|
|
552
|
+
## Per-Environment Overrides
|
|
553
|
+
|
|
554
|
+
This project does not use `.env.development`, `.env.production`, or `.env.test` files. There are no per-environment configuration overrides — the same config files apply in all contexts.
|
|
555
|
+
|
|
556
|
+
The one environment-aware distinction is in Vitest: the `source` custom condition in `tsconfig` / Vite resolve config causes `@xmachines/*` imports to resolve to TypeScript source during development and testing, while production builds use the compiled `dist/` output via the standard `exports` field in each package's `package.json`.
|