How to use sign-addon - 5 common examples

To help you get started, we’ve selected a few sign-addon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FirefoxBar / HeaderEditor / build / pack-utils / xpi.js View on Github external
exec(`cd ${common.dist} && zip -r ${zipPath} ./*`, (error, stdout, stderr) => {
			if (error) {
				console.info('Error : ' + stderr);
				resolve();
			} else {
				signAddon({
					xpiPath: zipPath,
					version: common.version,
					apiKey: common.config.firefox.mozilla.key,
					apiSecret: process.env[common.config.firefox.mozilla.secret],
					id: common.config.firefox.xpi,
					downloadDir: common.pack
				})
				.then(result => {
					if (result.success) {
						console.log("Downloaded signed addon");
						fs.unlinkSync(zipPath);
						const out = common.resolve(outputDir, common.config.dist.replace('{VER}', common.version) + '.xpi');
						// Move download file to output dir
						if (result.downloadedFiles[0]) {
							fs.renameSync(result.downloadedFiles[0], out);
							resolve(out);
github WorldBrain / Memex / gulpfile.babel.js View on Github external
gulp.task('publish-extension:firefox', ['package'], () => {
    return signAddon({
        id: 'info@worldbrain.io',
        xpiPath: 'dist/extension.zip',
        version: JSON.parse(fs.readFileSync('package.json')).version,
        apiKey: process.env.AMO_API_KEY,
        apiSecret: process.env.AMO_API_SECRET,
        channel: 'listed',
        downloadDir: 'downloaded_amo',
    })
        .then(function(result) {
            if (result.success) {
                console.log('The following signed files were downloaded:')
                console.log(result.downloadedFiles)
                console.log('Your extension ID is:')
                console.log(result.id)
            } else {
                console.error('Your add-on could not be signed!')
github FirefoxBar / HeaderEditor / build / pack-utils / amo.js View on Github external
exec(`cd ${common.dist} && zip -r ${zipPath} ./*`, (error, stdout, stderr) => {
			if (error) {
				console.info('Error : ' + stderr);
				resolve();
			} else {
				signAddon({
					xpiPath: zipPath,
					version: common.version,
					apiKey: AMOUser.key,
					apiSecret: AMOUser.secret,
					id: common.config.firefox.amo
				})
				.then(() => {
					fs.unlinkSync(zipPath);
					resolve();
				});
			}
		});
	})
github WorldBrain / Memex / publish.js View on Github external
async function publishFF() {
    try {
        const result = await signAddon({
            id: 'info@worldbrain.io',
            xpiPath: 'dist/extension.zip',
            version: process.env.npm_package_version,
            apiKey: process.env.AMO_API_KEY,
            apiSecret: process.env.AMO_API_SECRET,
            channel: 'listed',
            downloadDir: 'downloaded_amo',
        })

        if (result.success) {
            console.log('The following signed files were downloaded:')
            console.log(result.downloadedFiles)
            console.log('Your extension ID is:')
            console.log(result.id)
        } else {
            console.error('Your add-on could not be signed!')
github code-mancers / interceptor / gulpfile.js View on Github external
function sign() {
  const manifest = require(DIST_PATH + "manifest.json");
  const distFileName = manifest.name + "-" + manifest.version + ".xpi";
  signAddon({
    xpiPath: OUTPUT_PATH + distFileName,
    version: manifest.version,
    apiKey: process.env.AMO_API_KEY,
    apiSecret: process.env.AMO_API_SECRET,
    downloadDir: OUTPUT_PATH,
    channel: "listed",
    id: "{024f65fd-47e3-4556-bd93-4c0a1d08cd33}"
  })
    .then(function(result) {
      if (result.success) {
        console.log("The following signed files were downloaded:");
        console.log(result.downloadedFiles);
        console.log("Your extension ID is:");
        console.log(result.id);
      } else {
        console.error("Your add-on could not be signed!");

sign-addon

Signs a Firefox add-on using Mozilla's web service

MPL-2.0
Latest version published 12 months ago

Package Health Score

50 / 100
Full package analysis

Popular sign-addon functions