tis-nvm

1.1.12-1
Gérez plusieurs installations de node.js sur un ordinateur Windows.
308 téléchargements
Télécharger
Voir le résultat de la construction Voir l'analyse de VirusTotal
tis-nvm icon
  • package : tis-nvm
  • name : nvm-windows
  • version : 1.1.12-1
  • categories :
  • maintainer : Amel FRADJ
  • editor :
  • licence : The MIT License (MIT) Copyright (c) 2022 Ecor Ventures LLC.
  • locale :
  • target_os : windows
  • impacted_process :
  • architecture : all
  • signature_date : 2024-06-01 10:08
  • size : 5.27 Mo
  • homepage : https://github.com/coreybutler/nvm-windows
package           : tis-nvm
version           : 1.1.12-1
architecture      : all
section           : base
priority          : optional
name              : nvm-windows
categories        : 
maintainer        : Amel FRADJ
description       : Manage multiple installations of node.js on a Windows computer.
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Gérez plusieurs installations de node.js sur un ordinateur Windows.
description_pl    : Zarządzaj wieloma instalacjami node.js na komputerze z systemem Windows.
description_de    : Verwalten Sie mehrere Installationen von node.js auf einem Windows-Computer.
description_es    : Administre múltiples instalaciones de node.js en una computadora con Windows.
description_pt    : Gerencie várias instalações de node.js em um computador Windows.
description_it    : Gestisci più installazioni di node.js su un computer Windows.
description_nl    : Beheer meerdere installaties van node.js op een Windows-computer.
description_ru    : Управляйте несколькими установками node.js на компьютере под управлением Windows.
audit_schedule    : 
editor            : 
keywords          : 
licence           : The MIT License (MIT) Copyright (c) 2022 Ecor Ventures LLC.
homepage          : https://github.com/coreybutler/nvm-windows
package_uuid      : a5856503-2325-4f5b-9af5-f1826b9dffd0
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : e6673a2e2325a6dd244a436b2544107b8532355edc4fcf0365df7d1b12289060
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : kIs4EVJjeklyIiR0VX2Bd6PJlrcz+2e+kaEnibaNSR8kEVd0vKa1vtRp4bC+bb81wckluijrN+Bi5tzHVuYLbZCuq/L1+GX5x4geT4APSXZe7XjLT16kK2utq+EvgCGAcqvL8C0VsyOJugvigBJBC55FBcTf9svxBzed05HzZ1zf3ImV2UlWFhrs76Wx/PVeatHhfDeDSthGWqQQISiwWJj0FCRJ9vkH6Pt+xHvkrSWkpyZKVTk8ggnp/MBbDjqJgz+61F1J2HVE5KvvPsFd0o/bbZODPwuLCsVV2Oy00YFmmtts5ERIJx8O43++LTgTuMUh6dmjsJrBdhq8SJRfGQ==
signature_date    : 2024-06-01T10:08:26.489331
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
# -*- coding: utf-8 -*-
from setuphelpers import *

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
{
   "key":"40078385-F676-4C61-9A9C-F9028599D6D3_is1",
   "name":"NVM for Windows 1.1.12",
   "version":"1.1.12",
   "install_date":"2024-05-24 00:00:00",
   "install_location":"C:\\Users\\Administrator\\AppData\\Roaming\\nvm\\",
   "uninstall_string":"\"C:\\Users\\Administrator\\AppData\\Roaming\\nvm\\unins000.exe\"",
   "publisher":"Ecor Ventures LLC",
   "system_component":0,
   "win64":true
  }

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def install():
    # Declaring local variables

    # Installing the software
    install_exe_if_needed('nvm-setup.exe',
        silentflags='/VERYSILENT   /NOCIONS',
        key='40078385-F676-4C61-9A9C-F9028599D6D3_is1',
        min_version= control.get_software_version(),
    )

    uninstallkey.clear()

def uninstall():
        for uninstall in installed_softwares('nvm'):
            uninstall_string = uninstall.get("uninstall_string", "")
            print(f"Uninstalling nvm: {uninstall_string}")
            run(f"{uninstall_string} /SILENT /SUPPRESSMSGBOXES")    
            wait_uninstallkey_absent(uninstall['key'],max_loop=600)  

def audit():
    if not uninstall_key_exists("40078385-F676-4C61-9A9C-F9028599D6D3_is1"):
        print('uninstallkey nvm  not found')
        return "ERROR"
    else:
        return "OK"
# -*- coding: utf-8 -*-
from setuphelpers import *
import re


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()

    api_url = "https://api.github.com/repos/coreybutler/nvm-windows/releases/latest"

     # Get data from API
    releases_dict = wgets(api_url, proxies=proxies, as_json=True)
    zip_found = False  # Flag pour indiquer la découverte d'un fichier .zip
    #target_extension = control.target_os + ".zip"
    for release in releases_dict:
        if zip_found:
            break
        for asset in releases_dict["assets"]:
            if asset["browser_download_url"].endswith("setup.zip"):
                url_download = asset["browser_download_url"]
                latest_bin = url_download.split('/')[-1]
                version = releases_dict["name"].split("v")[-1]
                zip_found = True  # Mettre à jour le flag pour indiquer qu'un .zip a été trouvé
                break

    if Version(control.get_software_version()) < Version(version):

        # Downloading latest binaries
        print("Download URL is: %s" % url_download )
        wget(url_download , latest_bin, proxies=proxies)
  

        setup_file = unzip(latest_bin,("."))
        extracted_file_path = setup_file[0] 
        remove_file(latest_bin)
           
        if extracted_file_path != latest_bin:
            for f in glob.glob("*.exe"):
                if Version(get_version_from_binary(f)) < Version(version):
                    remove_file(f)

        version = get_version_from_binary(extracted_file_path )            
        # Updating the package
        control.set_software_version(version)
        control.save_control_to_wapt()

    return package_updated
3421cb5abccb275687151a6ad3f7934eef746f9be179c2217ac71cf2ddd9d895 : setup.py
 : __pycache__
5f2e7a63a6337d2d295c6ea86faf567b68fe27bc9a985cf439c99c21d1530c62 : update_package.py
e6673a2e2325a6dd244a436b2544107b8532355edc4fcf0365df7d1b12289060 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
3f6e423b065d33af31a13583c098948f5e7b9c08e402b38a13b8a4db69852fb7 : luti.json
41be147a7715faaa74ee404ce920aa7d941f5d6c3b7edbb0fa097a656aa1a23b : nvm-setup.exe
cb40c36609c25e96223fd4555c6a29f0534904b373bb79badd6c383ea026447c : WAPT/control