I am using chrome-webstore-upload-cli
to automatically deploy a Chrome extension to the Chrome Web Store.
webstore upload \
--source dist/extension.zip \
--extension-id $CHROME_STORE_EXT_ID \
--client-id $CHROME_STORE_CLIENT_ID \
--client-secret $CHROME_STORE_SECRET \
--refresh-token $CHROME_STORE_REFRESH_TOKEN \
--auto-publish
This works fine most of the time; the extension is uploaded and published.
The Problem
However, occasionally, the extension will not be published automatically. Instead, it's "pending review", and it might be in this state for an hour or two:
Since my deployment scripts assume that the extension will be available to users once it's uploaded to the web store, this leads to errors down the line (e.g., broken links, version numbers etc.).
Is there any way I can programmatically check if the extension is actually available in a given version, or when it is?
What I've tried
I tried using curl
to query the contents of the Web Store site that allows users to download the extension, but it does not actually contain the version string. At least the “Additional Information” tab is rendered dynamically and not part of the original site's source code…
I've also checked the Web Store API. It offers an Items.Get
method, but it only returns the following information:
{
"kind": "chromewebstore#item",
"id": string,
"publicKey": string,
"uploadState": string,
"itemError": [
(value)
]
}
This data does not contain information about the latest published version or the review state. And anyway, the request can only be used with DRAFT
resources.