This process will allow you to use Swagger Yaml files for validation. I've only tried this with REST endpoints, however it seems this should work with real-time sockets as well.
You'll need a few npm packages.
yarn add swagger-tools
var _ = require('/lib/underscore'); | |
/* | |
*This is the lightweight version I use based on Kevin Whinnery's one: https://gist.github.com/kwhinnery/1595307 | |
* Wrapper for Titanium UI components. This wrapper provides a few pieces of critical | |
* functionality, currently missing from Titanium UI objects: | |
* - The ability to safely extend components with new members | |
* - Rudimentary resource management and object lifecycle handling | |
* |
04423751241947fb9591458093d5dbd427d23f7eceef01d613df04ac4486eff0e4af8b2f5a246b13acd352e8c5f0f2b78c130197d4323f3e3eed71c39ef964c005 |
The goal here is to be able to dynamically add and spawn actors within xstate.
system
object for system.get(id)
calls from other actors.export function useStateHook() { | |
const machineRef = useActorRef(userStateMachine); | |
const result = trpcReact.user.getById.useQuery('someUserId', { | |
onSettled(data, error) { | |
if (error) { | |
machineRef.send({ | |
type: 'FETCH_ERROR', | |
error, | |
}); |
import { writeFileSync } from 'fs'; | |
import { resolve } from 'path'; | |
import type { ExecutorContext } from '@nx/devkit'; | |
import { | |
logger, | |
stripIndents, | |
writeJsonFile, | |
detectPackageManager, | |
} from '@nx/devkit'; | |
import { createLockFile, createPackageJson, getLockFileName } from '@nx/js'; |