{"_id":"dbus-ts","_rev":"9-b48bb2cdf627c1b41b2e4c10b90f44fb","name":"dbus-ts","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.6":{"name":"dbus-ts","version":"0.0.6","description":"Re-implementation of dbus-native in typescript using promises","main":"lib/index.js","scripts":{"build":"tsc"},"keywords":["dbus","promises","typescript"],"repository":{"type":"git","url":"git+https://github.com/bonan/dbus-ts.git"},"bugs":{"url":"https://github.com/bonan/dbus-ts/issues"},"homepage":"https://github.com/bonan/dbus-ts","author":{"name":"bonan","url":"https://github.com/bonan"},"types":"lib/index.d.ts","contributors":[],"license":"MIT","dependencies":{"@dbus-types/dbus":"^0.0.4","@homebridge/long":"^5.2.1","@homebridge/put":"^0.0.8","xml2js":"^0.4.23"},"devDependencies":{"@types/node":"^16","typescript":"^4.9.5"},"gitHead":"0bb5453cb0487f6d5836654e7e624781cbee3f81","_id":"dbus-ts@0.0.6","_nodeVersion":"19.7.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-2XJf/iK46bpzkKslgsADIxOJIvCu1q+4rVNFZ69cjhC9sjgLKt/4UHrxFjeK22xgQcMgSVCI+4Syhq/n0BaySQ==","shasum":"966682255007c02bb86e9689a79f28fe1954fa10","tarball":"https://registry.npmjs.org/dbus-ts/-/dbus-ts-0.0.6.tgz","fileCount":52,"unpackedSize":145034,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+FffZ/n5a8efP//pc00oOsD1PrmWSsYy7wcajPTmugAIhAMoZnhTQbk1QZ7CuUVxWSBeA6u8vlD57JJUJ10IBjzna"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBUZYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr86g/8C8RRT0mvSEhzMzCziO+GMB/HekeMuoA8P7Qxprpx8QZkIivb\r\nZzZD3I81UMDif78M4t9koz6x7N5JlYlkPJCbkZAsXR4+xsvtpBvJ7aPOKSBh\r\nVrgvaDEnzXu7FroBuJXaByy67wV/MrFZO131uuOOPCRD/n1lWXOQyyUjPOrM\r\nU/7CPnGiUjGE4XB2n8cBIUepjy4wzM3+qLJrIIebm6PvKTgNkrV/EF3muPSX\r\n7G0mH+Km+QprkAwxQiO3CcKMV3Aus+zLMwWH/elZAq5slxibDLxH45NpeuOX\r\nOsHhDq1/dsU8xQ4YHwhpd9eY1apOgb9AiV0GpcRb3Pc0kcL1aAeInZPBZJec\r\nrQCeU/uTsbe9b+Izpl4sq1na9r1e64ClfEXoxPiHHQwrdtB8qv78VKTkq2by\r\n8d0Ehy4EF835BRV6HGFu3N1vHkQqngi6Lw+sz1YDv21KARNKOrXa59Z5qmcp\r\nNPuip6+M42A6XhAchI97fWUMb9jMNG57s9O3G5hoJHsIdMah+s2AW535bhbv\r\na3IsE8VtLZuCgLP+JbNIzhiYdulpL/x3o9FWZR/diKrDAB6HNo45RVp6EEnO\r\nTKzWYBaaby7P2x6MmvBb0EiETb9G6wxhCk4cevv3WEbJ8xcpwkMNjUzOcxBp\r\nHHtnRnn2In52sIqcymIb6xBSJ2ofCLfW+Mg=\r\n=NRHs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bonan","email":"npm@bonan.se"},"directories":{},"maintainers":[{"name":"bonan","email":"npm@bonan.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dbus-ts_0.0.6_1678067287960_0.3195816253914907"},"_hasShrinkwrap":false},"0.0.7":{"name":"dbus-ts","version":"0.0.7","description":"Re-implementation of dbus-native in typescript using promises","main":"lib/index.js","scripts":{"build":"tsc"},"keywords":["dbus","promises","typescript"],"repository":{"type":"git","url":"git+https://github.com/bonan/dbus-ts.git"},"bugs":{"url":"https://github.com/bonan/dbus-ts/issues"},"homepage":"https://github.com/bonan/dbus-ts","author":{"name":"bonan","url":"https://github.com/bonan"},"types":"lib/index.d.ts","contributors":[],"license":"MIT","dependencies":{"@dbus-types/dbus":"^0.0.4","@homebridge/long":"^5.2.1","@homebridge/put":"^0.0.8","xml2js":"^0.4.23"},"devDependencies":{"@types/node":"^16","typescript":"^4.9.5"},"gitHead":"87943dd750206c85f557ed4edc92deb29970e179","_id":"dbus-ts@0.0.7","_nodeVersion":"19.7.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-2Iig5znVcrIMSAgTxy5DcUm2mIkgbFGP01YUSxSakkzQzrx+OH24LMIiopDAEWS8LR6V3/eVywO72us438eX0Q==","shasum":"919e1b00555d9dda8a59cfc1cbd75b3ef5b9960f","tarball":"https://registry.npmjs.org/dbus-ts/-/dbus-ts-0.0.7.tgz","fileCount":68,"unpackedSize":211359,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG48Ob1/yULwizEe8WW2fMwXGH1D18gJJhoPdqUNed5wIgVFcZqskVZGHIF7abKXUKHlr4weqPSyLyaASEAt7N9/Y="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCvv1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkTw/9EqRLXvJS3HQT0PMgbuOnWxMUBjMz0dPV4ZWRzn/qc6ux1nAW\r\nKR9EbvPrGo7equzfPjTM5VdDFw72e8tCzttmTHivxJQoLg3nbi0r821d8sxK\r\nX5xBLkJpysRR9AY0V4dnHo5RBrMiVC//oFaSOXS5zBGIZfdECvdNGFKJtSSM\r\n2YIn9Vy/GOR/5wHPhB7vqHjY6JJs4xQvBKA0uLdAbk2XZ8qlAB7qI+e94PDF\r\nqLzba/0dnxksBYNGPtz/k0fF48tjWDo11LjlTOZk4v2Ew9MGrt/+3sRoWkwj\r\nNM/u6SQOUTelbJMuAwOf4SZuMfjz7xOyTJsFCyMbFQuq8+yMBXVtfCqV5keB\r\nWn301mATOpkN5+Z7EuCSEFGAPYoDTBUp/RS36HIIi5aQKOSZqFgem5G5J/Hb\r\nl4GRHjQWQaF+DtkBiPUvU3o3ldyZwnWfiH5gitdETW0TsN/vAewOqCzqjhH0\r\nxNLAbMFjDWwhbVD62oeqAgJvbI4v3Bz3+/S++61+TRbZr2b0mSTw8yAxoCuR\r\nHOH9Qi4QPZVLyen6ttsfYPWtRDzsRVa7BaD8gIdR8eT/ZmOEnO2QJRqoDuOx\r\nuA3LM44WNRx5wgDn2uA0v9q5Gd0XmXu2OGl/mxFU7fL+JLr+5hB8kiAkcClt\r\nCN6rFgv00aST652kHkIzaZf286HY0xOqZIU=\r\n=SgZG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bonan","email":"npm@bonan.se"},"directories":{},"maintainers":[{"name":"bonan","email":"npm@bonan.se"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dbus-ts_0.0.7_1678441461349_0.42933242007035366"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-06T01:17:01.989Z","0.0.1":"2023-03-06T01:17:02.328Z","modified":"2023-03-10T09:44:21.681Z","0.0.2":"2023-03-06T01:28:22.093Z","0.0.3":"2023-03-06T01:38:14.520Z","0.0.5":"2023-03-06T01:42:49.932Z","0.0.6":"2023-03-06T01:48:08.174Z","0.0.7":"2023-03-10T09:44:21.572Z"},"maintainers":[{"name":"bonan","email":"npm@bonan.se"}],"description":"Re-implementation of dbus-native in typescript using promises","keywords":["dbus","promises","typescript"],"contributors":[],"author":{"name":"bonan","url":"https://github.com/bonan"},"license":"MIT","readme":"# dbus-ts\n\nThis project is a fork of [dbus-native](https://github.com/sidorares/dbus-native), rewritten with promises and TypeScript\ndefinitions.\n\nInstallation\n------------\n\n```shell\nnpm install dbus-ts\n```\n\nUsage\n------\n\nShort example using systemd & desktop notifications service\n\n```typescript\nimport { sessionBus } from 'dbus-ts';\nimport { Interfaces as Notifications } from '@dbus-types/notifications'\nimport { Interfaces as Systemd } from '@dbus-types/systemd'\n\nasync function run() {\n\n    // Hint when creating object which dbus type definitions should be used\n    const bus = await sessionBus<Notifications & Systemd>();\n\n    const systemd = await bus.getInterface(\"org.freedesktop.systemd1\", \"/org/freedesktop/systemd1\",\"org.freedesktop.systemd1.Manager\")\n    const [units] = await systemd.ListUnits()\n\n    const numRunningUnits = units.filter(u => u[4] == 'running').length;\n\n    const notifications = await bus.getInterface(\"org.freedesktop.Notifications\", \"/org/freedesktop/Notifications\", \"org.freedesktop.Notifications\")\n    await notifications.on('ActionInvoked', (id, action_key) => console.log(\"ActionInvoked\", id, action_key));\n    await notifications.on('NotificationClosed', (id, reason) => console.log(\"NotificationClosed\", id, reason));\n\n    const [id] = await notifications.Notify('dbus-ts', 0, '', `${numRunningUnits} units!`, `${numRunningUnits} units are currently running`,\n        ['Yes', 'No', 'Maybe'], {},  30);\n\n    console.log(\"Notification sent successfully with id \" + id)\n\n}\n\nrun().catch(err => console.log(err))\n```\n\n\nType hints\n------\n\nCheck out [npmjs/@dbus-types](https://www.npmjs.com/org/dbus-types) for all available type definitions\n\nType hints in action:\n\n![type hints](https://github.com/bonan/dbus-ts/raw/main/typehint.png)\n\n\n","readmeFilename":"README.md","homepage":"https://github.com/bonan/dbus-ts","repository":{"type":"git","url":"git+https://github.com/bonan/dbus-ts.git"},"bugs":{"url":"https://github.com/bonan/dbus-ts/issues"}}