@plasmohq/bms
Version:
Browser Market Submission
73 lines (64 loc) • 2.68 kB
TypeScript
import { PublishTarget, Options } from '@plasmohq/chrome-webstore-api';
import { Options as Options$1 } from '@plasmohq/edge-addons-api';
import { Options as Options$2 } from '@plasmohq/mozilla-addons-api';
import { Options as Options$3 } from '@plasmohq/itero-testbed-api';
declare enum BrowserName {
Chrome = "chrome",
Firefox = "firefox",
Opera = "opera",
Edge = "edge",
Itero = "itero"
}
declare const supportedBrowserSet: Set<BrowserName>;
declare const marketNameMap: {
chrome: string;
edge: string;
firefox: string;
itero: string;
};
type CommonOptions = {
/**
* The path to the ZIP, relative from the current working directory (`process.cwd()`)
* You can use `{version}`, which will be replaced by the `version` entry from your `package.json` or versionFile, e.g. `some-zip-v{version}.zip`
*/
zip: string;
/**
* Alias to zip
*/
file?: string;
/**
* The path to a json file which has a `version` field. Defaults to `package.json`
*/
versionFile?: string;
/** If `true`, every step of uploading will be logged to the console. */
verbose?: boolean;
/** If `true`, it will only upload the zip but does not actually hit submission */
dryRun?: boolean;
/** Release notes */
notes?: string;
};
type ChromeOptions = {
target?: PublishTarget;
} & Options & CommonOptions;
declare function submitChrome(options: ChromeOptions): Promise<boolean>;
type EdgeOptions = Options$1 & CommonOptions;
declare function submitEdge(options: EdgeOptions): Promise<boolean>;
type FirefoxOptions = Options$2 & CommonOptions;
declare function submitFirefox(options: FirefoxOptions): Promise<boolean>;
type OperaOptions = {
/** The `sessionid` cookie to login to the publisher's account. */
sessionid: string;
/** The `csrftoken` cookie to upload the ZIP. */
csrftoken: string;
/** The extension ID. E.g. `https://addons.opera.com/developer/package/PACKAGE_ID` */
packageId: string;
/**
* A description of the changes in this version, compared to the previous one.<br>
* It's recommended to use instead `--opera-changelog` , so it stays up to date.
*/
changelog?: string;
} & CommonOptions;
declare function submitOpera(options: OperaOptions): Promise<boolean>;
type IteroOptions = Options$3 & CommonOptions;
declare function submitItero(options: IteroOptions): Promise<boolean>;
export { BrowserName, type ChromeOptions, type CommonOptions, type EdgeOptions, type FirefoxOptions, type IteroOptions, type OperaOptions, marketNameMap, submitChrome, submitEdge, submitFirefox, submitItero, submitOpera, supportedBrowserSet };