{"_id":"@actyx/machine-check","_rev":"5-24f67e75e9717601d3f06c193828a270","name":"@actyx/machine-check","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"@actyx/machine-check","version":"0.1.0","description":"Behavioural typechecking for @actyx/machine-runner machines","repository":{"type":"git","url":"git+https://github.com/Actyx/machines.git"},"author":{"name":"Actyx AG"},"keywords":["local-first"],"license":"Apache-2.0","type":"module","main":"./lib/index.js","scripts":{"clean":"rimraf pkg lib","build:rs":"wasm-pack build --target nodejs --release","build:ts":"tsc","build":"npm run build:rs && npm run build:ts","prepack":"npm run clean && npm run build","test":"jest"},"devDependencies":{"@actyx/machine-runner":"^0.2.0","@jest/globals":"^29.5.0","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.45.0","eslint":"^8.28.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","jest":"^29.5.0","prettier":"^2.8.0","rimraf":"^4.4.1","ts-jest":"^29.1.0","typescript":"^5.0.2"},"types":"./lib/index.d.ts","gitHead":"3b01e39d7ba5dbe6f85890a8d3658ce4f537d57c","bugs":{"url":"https://github.com/Actyx/machines/issues"},"homepage":"https://github.com/Actyx/machines#readme","_id":"@actyx/machine-check@0.1.0","_nodeVersion":"19.7.0","_npmVersion":"8.10.0","dist":{"integrity":"sha512-xzCMlWEd6WC3+kkR71FWia1Jo5r0QtZkQ82Gc+VVi6U5OHkLJ1olD1RIeHAK1zlS23ZiQNlS5zd5A4vPkwWZ0w==","shasum":"46904a6018dd464ad6220a75c32a765c0d2be15b","tarball":"https://registry.npmjs.org/@actyx/machine-check/-/machine-check-0.1.0.tgz","fileCount":9,"unpackedSize":275656,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb9wgustihyjLWuxvw5+6nzpHvbxvCRIGNdO+ljSVGrgIgKTMLo2ibzyZDFIEJtqmoCaTLwX3pLrluX71YKhsnHKE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkPk0xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpByA/9FnP7Hl6E9cBAtXvKG+L9CSZHYKxuhP4nPt9zbDiHga1i6e5W\r\n/8xB77AVfbFSba41Kmt15PfRUXKHsow5DYBjVkzyYq03pMJxvSvn3QdwKO1R\r\nfNUzwN8hJA8m4t6HaqgDVNc2hVEIc3EdR8Ko7QlBJ2LyAo46HoKfDT2EHla2\r\n3K1Eq7iTDQA17LalZJXI01zQCjSbmyfh1cjHZj4wYvbfNEMXKHiQJ9DeR3Qd\r\nAy/zTRNFarMx+SXIFbv7UhUw7Y1mKRxrubR/soAmk+nYDWCaMA2sHJ/2JqxT\r\nITVCIJp3A551mA2EQEUpUH9AdmSVxyKy71WC+c2ps4HK7rJx+jZFoqOGHB3j\r\nhyAtIFNMtVNZBxPU3JRXwHrLISBaLr39R+lMOYBEuoAi/Ao1ws0nAvQSTqHR\r\nbxdMopRVH4C+8DBo1IyuTMsJQvyKp9J0G4O0BJYK9bEXs3Oo92WMIRF/7TLr\r\nIzjk7tkv3h2+bTe77r+3t+b+ayXvZpEQ4jFsNYWsXwOWvc+oltrAh+g8BVo9\r\nR/jH9fi/XbhzdLYweEE2OoYyNhIYQI/SuCyhc4ORw6s7xFJ16s3GVHsN26wk\r\nWuUTZ2rFQerqB4z5kPwUsYbUugrcITD6Ikkl3hpEwqWZqsLnfpr0xggJYSw2\r\nvY/9dam/Ji15GikX+xytYteDUfjxspn5c0g=\r\n=Te+C\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kelerchian","email":"kelerchian@gmail.com"},"directories":{},"maintainers":[{"name":"kelerchian","email":"kelerchian@gmail.com"},{"name":"roland.kuhn","email":"roland@actyx.io"},{"name":"ostollmann","email":"oliver@alithia.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/machine-check_0.1.0_1681804592790_0.39777016389066366"},"_hasShrinkwrap":false},"0.2.0":{"name":"@actyx/machine-check","version":"0.2.0","description":"Behavioural typechecking for @actyx/machine-runner machines","repository":{"type":"git","url":"git+https://github.com/Actyx/machines.git"},"author":{"name":"Actyx AG"},"keywords":["local-first"],"license":"Apache-2.0","type":"module","main":"./lib/index.js","scripts":{"clean":"rimraf pkg lib","build:rs":"wasm-pack build --target nodejs --release","build:ts":"tsc","build":"npm run build:rs && npm run build:ts","prepack":"npm run clean && npm run build","test":"jest"},"devDependencies":{"@actyx/machine-runner":"^0.3.1","@jest/globals":"^29.5.0","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.45.0","eslint":"^8.28.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","jest":"^29.5.0","prettier":"^2.8.0","rimraf":"^4.4.1","ts-jest":"^29.1.0","typescript":"^5.0.2"},"types":"./lib/index.d.ts","gitHead":"c5f19038eb66055b0d719acb75c73fa646cc65ca","bugs":{"url":"https://github.com/Actyx/machines/issues"},"homepage":"https://github.com/Actyx/machines#readme","_id":"@actyx/machine-check@0.2.0","_nodeVersion":"19.7.0","_npmVersion":"8.10.0","dist":{"integrity":"sha512-24zrTotsYwFZz8tG7G3T/XpIVKs3oGvXeQnDmgOzydFT4hJ1dxUk/cd7mfQld778/I+sPWV2o4YucnJIqQd6ng==","shasum":"9b6c45672e6f639c06640ba68d3a399d78e45c08","tarball":"https://registry.npmjs.org/@actyx/machine-check/-/machine-check-0.2.0.tgz","fileCount":9,"unpackedSize":275656,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEIYOzrvkEcUJ2NKHqI+R3qAWXc7j52Fjh0UlStkIxM0AiAst+ZQ3K1MGiaZn8qv3UjyxqlMKRIHPLbeLyrw5kiK/w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU3X+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5KA//SZ91VxFMDCQ3TfvzU9knpffPS8PzK8qUS/6VyLMQNBVFbQ7r\r\nW2HKpiaHuRwbV9jGIng9E5Pt2Etgw5agA0vHznw03TfTfut8ZQGcHReSuO74\r\nYQ39VkZ7K4kbY4R0gEsgRWO7uT9lZCk27O4nLGZ1gjf0npoVOyJEHbt31n7r\r\nx6B5hNuhcxNB2OHSUM6x8aap/LvmhDAdhUV1uOIyQEtcKNHrI1DLZBqcjBnn\r\nxeqKzIZB/flAL/e31KxfyS2Cuo+eVE1CBO/Z/hSREmc5rSGAzwfFBX7c2UNg\r\nAEnw5O5sAImoASdJ/GZgQwlcVsWSRSgPs0kdEV/2fcVCyVqMn/keT1v2jlsR\r\n5iG8wyg/16EBb48oGYHFw74jhMA+/50jrHFyEiHqfUw3I/sYpPXJ9v0yFPXk\r\nlx+oczUFFFyhLwCE3rijBVjRztqt9aREWglNn5i5hjwqXFpDzC8PzCVF6lC1\r\n6yO1zsS0Q4jjSinpLobJPO2EogqsFcdjUgju0SP/ie5Vuhu2btCB15hABEYf\r\ncayw8W/7BtXusdO6Pxd9+zElSff/DluoqVSH/eDopMb7jWNF0/PMwET+EvDp\r\nupoXYge8lqmBVyAYU7G1QQZiPDfs1UZr+gwXXMZG+OcJBGYmDwZ4HUGQPHhW\r\nTz4dVnSl3MkLAL1oM1RBHJM2q++VIZLEgW4=\r\n=p8Fy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kelerchian","email":"kelerchian@gmail.com"},"directories":{},"maintainers":[{"name":"kelerchian","email":"kelerchian@gmail.com"},{"name":"roland.kuhn","email":"roland@actyx.io"},{"name":"ostollmann","email":"oliver@alithia.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/machine-check_0.2.0_1683191294084_0.25493413379152274"},"_hasShrinkwrap":false},"0.2.1":{"name":"@actyx/machine-check","version":"0.2.1","description":"Behavioural typechecking for @actyx/machine-runner machines","repository":{"type":"git","url":"git+https://github.com/Actyx/machines.git"},"author":{"name":"Actyx AG"},"keywords":["local-first"],"license":"Apache-2.0","type":"module","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","types":"./lib/esm/index.d.ts","exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js"}},"scripts":{"clean":"rimraf pkg lib && npm run test:cjs:remove","build:rs":"wasm-pack build --target nodejs --release && cpy pkg lib","build:ts":"npm run build:ts:esm && npm run build:ts:cjs","build:ts:esm":"tsc --build tsconfig.esm.json && cpy package.esm.json lib/esm --rename package.json","build:ts:cjs":"tsc --build tsconfig.cjs.json && cpy package.cjs.json lib/cjs --rename package.json","build":"npm run build:rs && npm run build:ts","prepack":"npm run clean && npm run build","test":"npm run test:esm && npm run test:cjs","test:esm":"cross-env NODE_OPTIONS=--experimental-vm-modules cross-env jest --config examples/esm/jest.config.ts","test:cjs":"npm run test:cjs:copy && jest --config examples/cjs/jest.config.ts","test:cjs:copy":"ts-node-esm scripts/test/cjs-copy.ts","test:cjs:remove":"ts-node-esm scripts/test/cjs-remove.ts"},"devDependencies":{"@actyx/machine-runner":"^0.4.0","@jest/globals":"^29.5.0","@types/glob":"^8.1.0","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.45.0","cpy-cli":"^4.2.0","eslint":"^8.28.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","glob":"^10.2.6","jest":"^29.5.0","prettier":"^2.8.0","rimraf":"^4.4.1","ts-jest":"^29.1.0","ts-node":"^10.9.1","typescript":"^5.0.2"},"gitHead":"f42b6b7161fbc4df0230e73208d52182739f0745","bugs":{"url":"https://github.com/Actyx/machines/issues"},"homepage":"https://github.com/Actyx/machines#readme","_id":"@actyx/machine-check@0.2.1","_nodeVersion":"19.7.0","_npmVersion":"8.10.0","dist":{"integrity":"sha512-+gnO+MR2CYuHZecVbt04IC35Hj0Ug0Wn8P5DOKqLD/7uyl0+7Au/bwW6dQ8qm8PyP62nlusI8kVWP9URhhj+Kw==","shasum":"11740baba564827beed3332f95f2c6fa9eeec79e","tarball":"https://registry.npmjs.org/@actyx/machine-check/-/machine-check-0.2.1.tgz","fileCount":17,"unpackedSize":284963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQc4+pGEb+In9ciQaYnjcyCBkjXd3rg9g4TZJW23dW2wIhANoCp4pewjxl8M+k39xDvRsgIvjwe8pfzp9HGRfy7Aho"}]},"_npmUser":{"name":"kelerchian","email":"kelerchian@gmail.com"},"directories":{},"maintainers":[{"name":"kelerchian","email":"kelerchian@gmail.com"},{"name":"roland.kuhn","email":"roland@actyx.io"},{"name":"ostollmann","email":"oliver@alithia.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/machine-check_0.2.1_1685115765751_0.12133599472899226"},"_hasShrinkwrap":false},"0.2.2":{"name":"@actyx/machine-check","version":"0.2.2","description":"Behavioural typechecking for @actyx/machine-runner machines","repository":{"type":"git","url":"git+https://github.com/Actyx/machines.git"},"author":{"name":"Actyx AG"},"keywords":["local-first"],"license":"Apache-2.0","type":"module","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","types":"./lib/esm/index.d.ts","exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js"}},"scripts":{"clean":"rimraf pkg lib && npm run test:cjs:remove","build:rs":"wasm-pack build --target nodejs --release && cpy pkg lib","build:ts":"npm run build:ts:esm && npm run build:ts:cjs","build:ts:esm":"tsc --build tsconfig.esm.json && cpy package.esm.json lib/esm --rename package.json","build:ts:cjs":"tsc --build tsconfig.cjs.json && cpy package.cjs.json lib/cjs --rename package.json","build":"npm run build:rs && npm run build:ts","prepack":"npm run clean && npm run build","test":"npm run test:esm && npm run test:cjs","test:esm":"cross-env NODE_OPTIONS=--experimental-vm-modules cross-env jest --config examples/esm/jest.config.ts","test:cjs":"npm run test:cjs:copy && jest --config examples/cjs/jest.config.ts","test:cjs:copy":"ts-node-esm scripts/test/cjs-copy.ts","test:cjs:remove":"ts-node-esm scripts/test/cjs-remove.ts"},"devDependencies":{"@actyx/machine-runner":"^0.4.4","@jest/globals":"^29.5.0","@types/glob":"^8.1.0","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.45.0","cpy-cli":"^4.2.0","eslint":"^8.28.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","glob":"^10.2.6","jest":"^29.5.0","prettier":"^2.8.0","rimraf":"^4.4.1","ts-jest":"^29.1.0","ts-node":"^10.9.1","typescript":"^5.0.2"},"gitHead":"e018cf8ae504869eb8e4eddbca74be5aa8b88751","bugs":{"url":"https://github.com/Actyx/machines/issues"},"homepage":"https://github.com/Actyx/machines#readme","_id":"@actyx/machine-check@0.2.2","_nodeVersion":"19.7.0","_npmVersion":"8.10.0","dist":{"integrity":"sha512-jXb5TRv7XxW/nl9TJnT2dctEWrZL1wkr3MVQSDOdYvuUgK0LWOILc1ab7l6qPcEGeSInzyrweeRKVxN6gfiaPA==","shasum":"1f8d0ea765de199664270c8e1343f5e8fd0830c7","tarball":"https://registry.npmjs.org/@actyx/machine-check/-/machine-check-0.2.2.tgz","fileCount":17,"unpackedSize":284963,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEpd+8wm+tIhVUIFYtSudqH5I3WIE348fEAIubf3pRlHAiEAhhY/jQmRuQogwrS6OIU8xdbdcqO/1aCHYBULysFip9k="}]},"_npmUser":{"name":"kelerchian","email":"kelerchian@gmail.com"},"directories":{},"maintainers":[{"name":"kelerchian","email":"kelerchian@gmail.com"},{"name":"roland.kuhn","email":"roland@actyx.io"},{"name":"ostollmann","email":"oliver@alithia.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/machine-check_0.2.2_1690891953706_0.4135807545121004"},"_hasShrinkwrap":false},"0.3.0":{"name":"@actyx/machine-check","version":"0.3.0","description":"Behavioural typechecking for @actyx/machine-runner machines","repository":{"type":"git","url":"git+https://github.com/Actyx/machines.git"},"author":{"name":"Actyx AG"},"keywords":["local-first"],"license":"Apache-2.0","type":"module","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","types":"./lib/esm/index.d.ts","exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js"}},"scripts":{"clean":"rimraf pkg lib && npm run test:cjs:remove","build:rs":"wasm-pack build --target nodejs --release && cpy pkg lib","build:ts":"npm run build:ts:esm && npm run build:ts:cjs","build:ts:esm":"tsc --build tsconfig.esm.json && cpy package.esm.json lib/esm --rename package.json","build:ts:cjs":"tsc --build tsconfig.cjs.json && cpy package.cjs.json lib/cjs --rename package.json","build":"npm run build:rs && npm run build:ts","prepack":"npm run clean && npm run build","test":"npm run test:esm && npm run test:cjs","test:esm":"cross-env NODE_OPTIONS=--experimental-vm-modules cross-env jest --config examples/esm/jest.config.ts","test:cjs":"npm run test:cjs:copy && jest --config examples/cjs/jest.config.ts","test:cjs:copy":"ts-node-esm scripts/test/cjs-copy.ts","test:cjs:remove":"ts-node-esm scripts/test/cjs-remove.ts"},"devDependencies":{"@actyx/machine-runner":"^0.4.4","@jest/globals":"^29.5.0","@types/glob":"^8.1.0","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.45.0","cpy-cli":"^4.2.0","eslint":"^8.28.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","glob":"^10.2.6","jest":"^29.5.0","prettier":"^2.8.0","rimraf":"^4.4.1","ts-jest":"^29.1.0","ts-node":"^10.9.1","typescript":"^5.0.2"},"gitHead":"cf539f0076d5edbb863b3d2ed69d1ade93b7d0b1","bugs":{"url":"https://github.com/Actyx/machines/issues"},"homepage":"https://github.com/Actyx/machines#readme","_id":"@actyx/machine-check@0.3.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-dOvgM3K2rst0MJXT1hVHUfRYLrAUzK00SSTI7xY71goBdXY56/aKSZvWALrJtHp8haEwiPQtIEwKo8b4nB3lJw==","shasum":"1164417b8686a932014e862c8e3a1d9a2ebffb78","tarball":"https://registry.npmjs.org/@actyx/machine-check/-/machine-check-0.3.0.tgz","fileCount":11,"unpackedSize":17658,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGcEOI4CDT+srS09Uq/zMvMAn4lZmrDKKuEYQ3MBQHC7AiB4nJd5fqyx0qwvNIwkJjwrLMkC6C80Sdz/9eTE8FC0mw=="}]},"_npmUser":{"name":"kelerchian","email":"kelerchian@gmail.com"},"directories":{},"maintainers":[{"name":"kelerchian","email":"kelerchian@gmail.com"},{"name":"roland.kuhn","email":"roland@actyx.io"},{"name":"ostollmann","email":"oliver@alithia.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/machine-check_0.3.0_1695117565027_0.3632685558661599"},"_hasShrinkwrap":false},"0.3.1":{"name":"@actyx/machine-check","version":"0.3.1","description":"Behavioural typechecking for @actyx/machine-runner machines","repository":{"type":"git","url":"git+https://github.com/Actyx/machines.git"},"author":{"name":"Actyx AG"},"keywords":["local-first"],"license":"Apache-2.0","type":"module","main":"./lib/cjs/index.js","module":"./lib/esm/index.js","types":"./lib/esm/index.d.ts","exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js"}},"scripts":{"clean":"rimraf pkg lib && npm run test:cjs:remove","build:rs":"wasm-pack build --target nodejs --release && cpy pkg lib","build:ts":"npm run build:ts:esm && npm run build:ts:cjs","build:ts:esm":"tsc --build tsconfig.esm.json && cpy package.esm.json lib/esm --rename package.json","build:ts:cjs":"tsc --build tsconfig.cjs.json && cpy package.cjs.json lib/cjs --rename package.json","build":"npm run build:rs && npm run build:ts","prepack":"npm run clean && npm run build","test":"npm run test:esm && npm run test:cjs","test:esm":"cross-env NODE_OPTIONS=--experimental-vm-modules cross-env jest --config examples/esm/jest.config.ts","test:cjs":"npm run test:cjs:copy && jest --config examples/cjs/jest.config.ts","test:cjs:copy":"ts-node-esm scripts/test/cjs-copy.ts","test:cjs:remove":"ts-node-esm scripts/test/cjs-remove.ts"},"devDependencies":{"@actyx/machine-runner":"^0.4.4","@jest/globals":"^29.5.0","@types/glob":"^8.1.0","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.45.0","cpy-cli":"^4.2.0","eslint":"^8.28.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","glob":"^10.2.6","jest":"^29.5.0","prettier":"^2.8.0","rimraf":"^4.4.1","ts-jest":"^29.1.0","ts-node":"^10.9.1","typescript":"^5.0.2"},"gitHead":"0fbb52f3488ea7414086e6a2d889fc10f166833f","bugs":{"url":"https://github.com/Actyx/machines/issues"},"homepage":"https://github.com/Actyx/machines#readme","_id":"@actyx/machine-check@0.3.1","_nodeVersion":"18.18.2","_npmVersion":"8.10.0","dist":{"integrity":"sha512-ICloBhLTo1NmkM2mdEj9LC2GLVHxsddBzQZDO8G0irmjB+7Ekwj5Wrcfrdp+GPmn3b+/AIx5bL4uuRS7RqTwhQ==","shasum":"e29b260be7d265bf41b0fb15a02b13f34979deca","tarball":"https://registry.npmjs.org/@actyx/machine-check/-/machine-check-0.3.1.tgz","fileCount":17,"unpackedSize":288411,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmIZSg0XAg9RoLcPVBxxy+PNMNArzcRf8YXamgAEHhmAiEAkhObgVK6tSzlb4Twy4xmQoQn/5j1lijoTF2YE3vWN6o="}]},"_npmUser":{"name":"kelerchian","email":"kelerchian@gmail.com"},"directories":{},"maintainers":[{"name":"kelerchian","email":"kelerchian@gmail.com"},{"name":"roland.kuhn","email":"roland@actyx.io"},{"name":"ostollmann","email":"oliver@alithia.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/machine-check_0.3.1_1714984724967_0.3953885912916779"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-18T07:56:32.741Z","0.1.0":"2023-04-18T07:56:33.020Z","modified":"2024-05-06T08:38:45.326Z","0.2.0":"2023-05-04T09:08:14.266Z","0.2.1":"2023-05-26T15:42:45.907Z","0.2.2":"2023-08-01T12:12:33.935Z","0.3.0":"2023-09-19T09:59:25.228Z","0.3.1":"2024-05-06T08:38:45.112Z"},"maintainers":[{"name":"kelerchian","email":"kelerchian@gmail.com"},{"name":"roland.kuhn","email":"roland@actyx.io"},{"name":"ostollmann","email":"oliver@alithia.net"}],"description":"Behavioural typechecking for @actyx/machine-runner machines","homepage":"https://github.com/Actyx/machines#readme","keywords":["local-first"],"repository":{"type":"git","url":"git+https://github.com/Actyx/machines.git"},"author":{"name":"Actyx AG"},"bugs":{"url":"https://github.com/Actyx/machines/issues"},"license":"Apache-2.0","readme":"# Machine Check\r\n\r\nThis library allows you to check whether the machines you implement with [machine-runner](https://www.npmjs.com/package/@actyx/machine-runner) comply with a correct overall swarm behaviour.\r\nBefore we dive into how to use it, we need to quickly establish some notation.\r\n\r\n## Swarm Protocols\r\n\r\nJust like the workflow diagrams you put on a whiteboard to discuss how your product should work, we describe swarm behaviour in terms of a [_state machine_](https://en.wikipedia.org/wiki/Finite-state_machine).\r\nThis is a fancy word for saying that we start with an initial state and whenever something happens we follow an arrow on the diagram to get to the next state.\r\nSometimes there are several choices for what can happen next, meaning that the protocol can proceed via one of several charted paths; these can loop back to an earlier state or rejoin to move forward together later.\r\n\r\nTODO: _add graph_\r\n\r\nWhile the graphical representation is much nicer, we need a textual representation for writing things down (e.g. in error messages).\r\nBesides naming the initial state, this is just a list of transitions, where each one consists of the following:\r\n\r\n- the state we start from, e.g. `(Closed)`\r\n- the name of the command that needs to be invoked to start the transition, e.g. `open`\r\n- the name of the machine role that is allowed to issue this command, e.g. `Control`\r\n- a list of event types that record this transition, e.g. `Opening`\r\n- the state we thus arrive at, e.g. `(Opening)`\r\n\r\nThe short form for writing this down is `(Closed) --[open@Control<Opening>]--> (Opening)`\r\n\r\n## Example protocol\r\n\r\nThe machines from the [Hangar Door example](../machine-runner/README.md#example-usage) might follow this protocol:\r\n\r\n- `(Closed) --[open@Control<opening>]--> (Opening)`\r\n- `(Opening) --[update@Door<opening>]--> (Opening)`\r\n- `(Opening) --[open@Door<opened>]--> (Open)`\r\n- `(Open) --[close@Control<closing>]--> (Closing)`\r\n- `(Closing) --[update@Door<closing>]--> (Closing)`\r\n- `(Closing) --[close@Door<closed>]--> (Closed)`\r\n\r\nThe Control can initiate opening and closing while the Door provides progress updates and states when each movement has been completed.\r\n\r\n## How to use this library\r\n\r\nThis library is typically used within your unit tests to check the structure of the machines you’ve written.\r\nFor this we need to provide two pieces: the desired swarm protocol and the event subscriptions of your machine roles.\r\nContinuing the example above, it could look like this:\r\n\r\n```ts\r\nimport { Door, Control, HangarBay } from './example-proto.js'\r\nimport { SwarmProtocolType, checkProjection, checkSwarmProtocol } from '@actyx/machine-check'\r\n\r\nconst swarmProtocol: SwarmProtocolType = {\r\n  initial: 'Closed',\r\n  transitions: [\r\n    {\r\n      source: 'Closed',\r\n      target: 'Opening',\r\n      label: { cmd: 'open', role: 'Control', logType: ['opening'] },\r\n    },\r\n    {\r\n      source: 'Opening',\r\n      target: 'Opening',\r\n      label: { cmd: 'update', role: 'Door', logType: ['opening'] },\r\n    },\r\n    {\r\n      source: 'Opening',\r\n      target: 'Open',\r\n      label: { cmd: 'open', role: 'Door', logType: ['opened'] },\r\n    },\r\n    {\r\n      source: 'Open',\r\n      target: 'Closing',\r\n      label: { cmd: 'close', role: 'Control', logType: ['closing'] },\r\n    },\r\n    {\r\n      source: 'Closing',\r\n      target: 'Closing',\r\n      label: { cmd: 'update', role: 'Door', logType: ['closing'] },\r\n    },\r\n    {\r\n      source: 'Closing',\r\n      target: 'Closed',\r\n      label: { cmd: 'close', role: 'Door', logType: ['closed'] },\r\n    },\r\n  ],\r\n}\r\n\r\nconst subscriptions = {\r\n  Control: ['closing', 'closed', 'opening', 'opened'],\r\n  Door: ['closing', 'closed', 'opening', 'opened'],\r\n}\r\n```\r\n\r\nThe `swarmProtocol` describes the expected flow of events, written down as if we had full oversight or all machines that will later implement it.\r\nAnd this is how we run the behaviour checker to first make sure that the swarm protocol is valid and then check that our machines implement it correctly:\r\n\r\n```ts\r\ndescribe('swarmProtocol', () => {\r\n  it('should be well-formed', () => {\r\n    expect(checkSwarmProtocol(swarmProtocol, subscriptions)).toEqual({ type: 'OK' })\r\n  })\r\n  it('should match Control', () => {\r\n    expect(\r\n      checkProjection(\r\n        swarmProtocol,\r\n        subscriptions,\r\n        'Control',\r\n        Control.Control.createJSONForAnalysis(Control.Closed),\r\n      ),\r\n    ).toEqual({ type: 'OK' })\r\n  })\r\n  it('should match Door', () => {\r\n    expect(\r\n      checkProjection(\r\n        swarmProtocol,\r\n        subscriptions,\r\n        'Door',\r\n        Door.Door.createJSONForAnalysis(Door.Closed),\r\n      ),\r\n    ).toEqual({ type: 'OK' })\r\n  })\r\n})\r\n```\r\n\r\nYou can of course use any testing framework you like.\r\nIn the example as given you’ll be notified that the overall protocol has a flaw:\r\n\r\n```text\r\n{\r\n  type: 'ERROR',\r\n  errors: [\r\n    'guard event type opening appears in transitions from multiple states',\r\n    'guard event type closing appears in transitions from multiple states'\r\n  ]\r\n}\r\n```\r\n\r\nThis means that our clever reuse of the `opening` and `closing` event types for dual purposes (i.e. as transition to a moving door as well as progress update) may not be so clever after all — the `update` commands should yield more specific `openingProgress` and `closingProgress` event types instead.\r\nOther than that, our machines are implemented correctly.\r\nYou can try to remove a command or reaction from the code to observe how this this pointed out by `checkProjection()`.\r\n","readmeFilename":"README.md"}