UNPKG

@applicaster/zapplicaster-cli

Version:

CLI Tool for the zapp app and Quick Brick project

21 lines (16 loc) 429 B
const logger = require("../../logger"); const axios = require("axios"); const isPackagePublished = async (version) => { try { logger.log("checking if package", this.name, " was published"); const response = await axios.get( `https://registry.npmjs.org/${this.name}/${version}` ); return response.status === 200; } catch (error) { return false; } }; module.exports = { isPackagePublished, };