{"_id":"@asyx/mqtt-client","name":"@asyx/mqtt-client","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@asyx/mqtt-client","version":"0.1.0","description":"Asyx MQTT client layer: client-only TopicMap & Policy on top of @asyx/mqtt-core.","type":"module","license":"Apache-2.0","engines":{"node":">=18.17"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"clean":"rm -rf dist","build":"tsc -p tsconfig.json","test":"node --test --test-reporter=spec","guard:no-internal-imports":"grep -R \"@asyx-internal/\" src && (echo '❌ private import found' && exit 1) || echo 'ok'","prepublishOnly":"npm run clean && npm run build && npm run guard:no-internal-imports && npm pack --dry-run >/dev/null"},"dependencies":{"@asyx/mqtt-core":"^0.1.0"},"devDependencies":{"@types/node":"^20.12.12","typescript":"^5.6.3"},"_id":"@asyx/mqtt-client@0.1.0","gitHead":"d77fcb53d0cfce1bc30dae17a2609c2044001445","_nodeVersion":"24.2.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-k4vVFerCAGTLwr/MH23bXqzKKmZDnOhFncBHqzSVGIgg+w8NnODGcRCRzHsRxZr99sH+oQu6xJwURXSAQ4KwtQ==","shasum":"facd4349308d596f10c2f1fd24d29e87af8b6d0c","tarball":"https://registry.npmjs.org/@asyx/mqtt-client/-/mqtt-client-0.1.0.tgz","fileCount":13,"unpackedSize":8461,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEF2PJYidQfDdD7Iz9J/RDjEFkF8mndujZ85YjVWfewdAiADKCBFTBjB0W6ZTm6bIRWYpAWheuIB4qmymSlet8gGmQ=="}]},"_npmUser":{"name":"asyx-admin","email":"asyxcde@gmail.com"},"directories":{},"maintainers":[{"name":"asyx-admin","email":"asyxcde@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mqtt-client_0.1.0_1761870048912_0.14897920666715203"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-31T00:20:48.773Z","0.1.0":"2025-10-31T00:20:49.159Z","modified":"2025-10-31T00:20:49.521Z"},"maintainers":[{"name":"asyx-admin","email":"asyxcde@gmail.com"}],"description":"Asyx MQTT client layer: client-only TopicMap & Policy on top of @asyx/mqtt-core.","license":"Apache-2.0","readme":"# @asyx/mqtt-client\n\nClient-only MQTT layer on top of `@asyx/mqtt-core`. Provides:\n- **TopicMap** for client control stream (subscribe-only)\n- **Policy** that blocks publishes by default\n- **AsyxMqttClient** wrapper to subscribe and receive control messages\n\n## Install\n```bash\nnpm i @asyx/mqtt-core @asyx/mqtt-client\n```\n\n## Basics\n```javascript\nimport { MemoryTransport } from \"@asyx/mqtt-core/dist/testing/MemoryTransport.js\";\nimport { AsyxMqttClient } from \"@asyx/mqtt-client\";\n\nconst t = new MemoryTransport();\nconst client = new AsyxMqttClient(t, { tenantId: \"t1\", clientId: \"cli_X\" });\nawait client.core.connect({ clientId: \"cli_X\" });\nawait client.subscribeControl();\n\nclient.onMessage((m) => {\n  console.log(\"control:\", m.topic, new TextDecoder().decode(m.payload));\n});\n```\n\nNo broker endpoints or relay topic strings are shipped here. This package is OSS-safe and subscribe-only by default.\n","readmeFilename":"README.md","_rev":"1-241c9f81edc436072b101a994f4e3674"}