{"id":20980373,"url":"https://github.com/zenhubio/chromepet","last_synced_at":"2025-05-14T15:30:32.729Z","repository":{"id":23000772,"uuid":"26351398","full_name":"ZenHubIO/chromepet","owner":"ZenHubIO","description":"A NodeJS module for reporting new version of Chrome extension being published on Chrome Web Store","archived":false,"fork":false,"pushed_at":"2014-11-09T19:54:08.000Z","size":163,"stargazers_count":35,"open_issues_count":6,"forks_count":25,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-13T05:43:59.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZenHubIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-08T05:55:55.000Z","updated_at":"2025-03-26T07:41:10.000Z","dependencies_parsed_at":"2022-07-27T03:47:10.932Z","dependency_job_id":null,"html_url":"https://github.com/ZenHubIO/chromepet","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenHubIO%2Fchromepet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenHubIO%2Fchromepet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenHubIO%2Fchromepet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZenHubIO%2Fchromepet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZenHubIO","download_url":"https://codeload.github.com/ZenHubIO/chromepet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254171523,"owners_count":22026457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T05:28:05.246Z","updated_at":"2025-05-14T15:30:32.705Z","avatar_url":"https://github.com/ZenHubIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ChromePet\n=========\n\nA node.js command line app for reporting new extension version published on Chrome Web Store\n\n## Quick Start\n\n```\nnpm install -g chromepet\n\n$ chromepet -u https://chrome.google.com/webstore/detail/zenhub-for-github/ogcgkffhplmphkaahpmffcafajaocjbd -v 1.0.3\n```\n\n#### Result\n```\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\n...\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\nNew version 1.0.3 is published! UserDownloads:9,823.\nTotal seconds: 1.132\n```\n\n## Module API\n\n```\nnpm install chromepet\n```\n\nThis file `example/zenhub.js` is to check if a new version of ZenHub Chrome Extension has been published on Chrome Web Store.\n\n```js\nvar chromepet = require('chromepet');\n\nchromepet({\n  extensionURL: 'https://chrome.google.com/webstore/detail/zenhub-for-github/ogcgkffhplmphkaahpmffcafajaocjbd',\n  publishingVersion: '1.0.3'\n})\n.watch()\n.on('end', function(extension, totalSeconds) {\n  console.log(util.format('New version %s is published! %s.',\n    extension.version,\n    extension.interactionCount));\n  console.log('Total seconds:', totalSeconds);\n});\n```\n\n#### Result\n```\n$ node example/zenhub.js\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\n...\nPublishing version: 1.0.3; Published version: 1.0.2; Not published yet\nNew version 1.0.3 is published! UserDownloads:9,823.\nTotal seconds: 1.132\n```\n\n\n## Read Chrome Extension's Version from manifest.json\n```js\nvar fs = require('fs');\nvar path = require('path');\nvar join = path.join;\nvar util = require('util');\n\nvar chromepet = require('chromepet');\n\nvar manifestPath = join(__dirname, './manifest.json');\nconsole.log('reading manifest from path', manifestPath);\nvar manifest = require(manifestPath);\nvar publishingVersion = manifest.version;\n\nchromepet({\n  extensionURL: 'https://chrome.google.com/webstore/detail/zenhub-for-github/ogcgkffhplmphkaahpmffcafajaocjbd',\n  publishingVersion: publishingVersion,\n  watchIntervalMS: 1000,\n})\n.watch()\n.on('error', function(error) {\n  console.error('Fail to fetch', error);\n})\n.on('data', function(extension) {\n  console.log(util.format('Publishing version: %s; Published version: %s; Not published yet',\n    publishingVersion,\n    extension.version));\n})\n.on('end', function(extension, totalSeconds) {\n  console.log(util.format('New version %s is published! %s.',\n    extension.version,\n    extension.interactionCount));\n  console.log('Total seconds:', totalSeconds);\n});\n```\n\n\n## Contributors\n* [Leo Zhang](https://github.com/zhangchiqing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenhubio%2Fchromepet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenhubio%2Fchromepet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenhubio%2Fchromepet/lists"}