tis-nodejs

16.0.0-3
Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser
1278 downloads
Download

  Description 

  • package : tis-nodejs
  • version : 16.0.0-3
  • architecture : x64
  • categories : Development
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • description : Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser
  • locale :
  • target_os : windows
  • min_wapt_version : 1.7
  • sources : https://nodejs.org/en/download/current/
  • installed_size :
  • impacted_process :
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : OpenJS Foundation
  • licence : MIT
  • signature_date : 2021-04-29T16:52:24.851451
  • Homepage : https://nodejs.org/

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *
try:
    import bs4 as BeautifulSoup
except:
    import BeautifulSoup
import requests
import platform

uninstallkey = []

# Defining variables
bin_name_string = 'node-v%s-x64.msi'
silent_args = '/quiet ADDLOCAL=ALL REMOVE=NodeEtwSupport'


def install():
    # Initializing variables
    package_version = control.version.split('-')[0]
    bin_name = bin_name_string % package_version

    # Installing the package
    install_msi_if_needed(bin_name
        ,properties=silent_args
        ,min_version=package_version)


def update_package():
    print('Download/Update package content from upstream binary sources')

    # Getting proxy informations from WAPT settings
    proxy = {}
    if platform.system()=='Windows' and isfile(makepath(user_local_appdata(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}

    # Initializing variables
    app_name = control.name
    url = control.sources

    # Getting latest version from official website
    page = requests.get(url,proxies=proxy).text
    bs = BeautifulSoup.BeautifulSoup(page)
    version = bs.find('strong').text
    latest_bin = bin_name_string % version
    url_dl = 'https://nodejs.org/dist/v%s/%s' % (version,latest_bin)

    print("Latest %s version is: %s" % (app_name,version))
    print("Download url is: %s" % url_dl)

    # Downloading latest binaries
    if not isfile(latest_bin):
        print('Downloading: %s' % latest_bin)
        wget(url_dl,latest_bin,proxies=proxy)

        # Checking version from file
        version_from_file = get_msi_properties(latest_bin)['ProductVersion']
        if version != version_from_file and version_from_file != '':
            version = version_from_file
            old_latest_bin = latest_bin
            latest_bin = bin_name_string % version
            if isfile(latest_bin):
                remove_file(latest_bin)
            os.rename(old_latest_bin,latest_bin)
            print('Verified latest ' + app_name + ' version is: ' + version)

        # Changing version of the package
        control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
        control.save_control_to_wapt()
        print('Changing version to: %s in WAPT\\control' % control.version)

    # Deleting outdated binaries
    for bin_in_dir in glob.glob('*.exe') or glob.glob('*.msi') or glob.glob('*.zip'):
        if bin_in_dir != latest_bin :
            print('Outdated binary: %s Deleted' % bin_in_dir)
            remove_file(bin_in_dir)




										

  Changelog 



Changelog software url : https://github.com/nodejs/node/blob/master/CHANGELOG.md



No changelog.txt.
									
  manifest.sha256