{"_rev":"5-8aa53b31776cfd62648c47617d5b4cbd","time":{"created":"2024-03-18T03:16:49.471Z","0.0.1":"2024-03-18T02:36:06.677Z","modified":"2024-03-18T03:16:50.653Z","0.0.2":"2024-03-18T02:51:43.986Z","0.0.3":"2024-03-18T03:11:03.023Z","0.1.1":"2024-03-18T03:16:49.765Z"},"_id":"@dongt2ls/react-native-awesome-mqtt2","name":"@dongt2ls/react-native-awesome-mqtt2","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@dongt2ls/react-native-awesome-mqtt2","version":"0.1.1","description":"MQTT Client for React Native","main":"lib/commonjs/index.js","module":"lib/module/index.js","types":"lib/typescript/index.d.ts","react-native":"src/index.tsx","source":"src/index.tsx","scripts":{"test":"jest","typescript":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","prepare":"bob build","release":"release-it","example":"yarn --cwd example","start":"yarn --cwd example start","pods":"cd example && pod-install --quiet","bootstrap":"yarn example && yarn && yarn pods"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/DongT2LS/awesome_mqtt.git"},"author":{"name":"dongt2ls"},"license":"MIT","bugs":{"url":"https://github.com/DongT2LS/awesome_mqtt/issues"},"homepage":"https://github.com/DongT2LS/awesome_mqtt","publishConfig":{"registry":"https://registry.npmjs.org/"},"dependencies":{"url-parse":"^1.5.1"},"peerDependencies":{"react":"*","react-native":"*","rxjs":"*"},"devDependencies":{"@commitlint/config-conventional":"^11.0.0","@react-native-community/eslint-config":"^2.0.0","@release-it/conventional-changelog":"^2.0.0","@types/jest":"^26.0.0","@types/react":"^16.9.19","@types/react-native":"0.62.13","@types/url-parse":"^1.4.3","commitlint":"^11.0.0","eslint":"^7.2.0","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","husky":"^4.2.5","jest":"^26.0.1","pod-install":"^0.1.0","prettier":"^2.0.5","react":"16.13.1","react-native":"0.63.4","react-native-builder-bob":"^0.18.1","release-it":"^14.2.2","rxjs":"^6.6.7","typescript":"^4.1.3"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"yarn lint && yarn typescript"}},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native-community","prettier"],"rules":{"prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]},"directories":{"example":"example","lib":"lib"},"_id":"@dongt2ls/react-native-awesome-mqtt2@0.1.1","gitHead":"76df8c96a9d319c985a4812fb8aeeec0daa01a04","_nodeVersion":"18.19.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-gOpZ6ir4oLouwPVEpKZxNv9H7QaqOJIrCQEBnZa9vLZf8Rxh+65tb0pmH5Yqd11ptATrV2MY+/GsnNhNkklm6A==","shasum":"405137e773650a1f34d600b79990961a34490f2e","tarball":"https://registry.npmjs.org/@dongt2ls/react-native-awesome-mqtt2/-/react-native-awesome-mqtt2-0.1.1.tgz","fileCount":39,"unpackedSize":241856,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEztZc8XEEqJnHaHnBMlG9sogKN1/aZLWxFJHItSTWb3AiBXINUeM63irYBNBe30k7i8Y+HZlue0Nyl4elm2rifVIA=="}]},"_npmUser":{"name":"dongt2ls","email":"dongt2ls1720@gmail.com"},"maintainers":[{"name":"dongt2ls","email":"dongt2ls1720@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-awesome-mqtt2_0.1.1_1710731809592_0.030981070515697207"},"_hasShrinkwrap":false}},"maintainers":[{"name":"dongt2ls","email":"dongt2ls1720@gmail.com"}],"description":"MQTT Client for React Native","homepage":"https://github.com/DongT2LS/awesome_mqtt","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/DongT2LS/awesome_mqtt.git"},"author":{"name":"dongt2ls"},"bugs":{"url":"https://github.com/DongT2LS/awesome_mqtt/issues"},"license":"MIT","readme":"# react-native-awesome-mqtt\r\n\r\nMQTT Client for React Native\r\n\r\n## The story\r\nThis is a port of repo [sp-react-native-mqtt](https://github.com/SudoPlz/sp-react-native-mqtt) for Typescript.\r\n\r\nI rewrite the original repo into Typescript, with some adjustments to be compatible with my project.\r\n\r\nThank to the author and his work.\r\n\r\n## Installation\r\n\r\n```sh\r\nyarn add react-native-awesome-mqtt rxjs\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nimport AwesomeMqtt from \"react-native-awesome-mqtt\";\r\nimport type {Subscription} from 'rxjs';\r\n\r\nAwesomeMqtt.createClient({\r\n  uri: 'tcp://localhost:1883',\r\n  username: 'user',\r\n  password: 'pass',\r\n  tls: false,\r\n  clientId: 'react-native-awesome-mqtt',\r\n})\r\n  .then((client: AwesomeMqtt) => {\r\n    client.on('connect', (event: AwesomeMqtt.NativeEvent) => {\r\n      const subscription: Subscription = client.message.subscribe((message: AwesomeMqtt.NativeEvent) => {\r\n\r\n      });\r\n    });\r\n    client.on('error', (event: AwesomeMqtt.NativeEvent) => {\r\n\r\n    });\r\n    client.on('closed', (event: AwesomeMqtt.NativeEvent) => {\r\n\r\n    });\r\n  });\r\n```\r\n\r\n## Contributing\r\n\r\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}