tis-nvm

1.2.0-2
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.2.0-2
  • categories :
  • maintainer : Amel FRADJ
  • editor :
  • licence : The MIT License (MIT) Copyright (c) 2022 Ecor Ventures LLC.
  • locale :
  • target_os : windows
  • impacted_process :
  • architecture : x64
  • signature_date : 2025-01-04 09:13
  • size : 5.08 Mo
  • homepage : https://github.com/coreybutler/nvm-windows
package           : tis-nvm
version           : 1.2.0-2
architecture      : x64
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      : ed749c28-edd7-44eb-b007-eaffe03a6dba
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : e6673a2e2325a6dd244a436b2544107b8532355edc4fcf0365df7d1b12289060
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-01-04T09:13:16.000000
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
signature         : CcVd3hhAIXhtdUSoj6UOV5UGYCZOhOVgCHRb3LJsnFY+saekdRlxpGx6XSbjpsXHd3pvol7Z/TUsHahnuigV9Tj0CxWS1ZMJ9HIf+ZSY6QmUPxe8cJk1cC9P/mC3coKIo6gpN8jKR8pYr5CN9TGsykpIVDEbNkgCNLHkFmd4+JVAIzFoERkm3aqZwcrfK7Tf4n52n8c1gDB2YgRpU0Ooa7qvU5Ff8lmaottZw8+ernCgc9CJuNPBCffToZSPsuHz/gTmSdfP/5xGBnbxRnz34TjQkKQk1jBD3ZyERHL03IgK/pXLGnKv3w2ntUj1ciXl3bT7oWi5MK6iQ5xkvgxmow==
# -*- 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
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
1baa8e9b51cc7aa5ecec3825df7ed816e9a4c525463b5e91e02e6a0787391330 : WAPT/control
e6673a2e2325a6dd244a436b2544107b8532355edc4fcf0365df7d1b12289060 : WAPT/icon.png
dead44991b1dae0904b60fb137806c020d1bce58f74743e5b79af999b55f2e4a : luti.json
57650805ddcb04328bc0389d70fab45ee43dbcb1fba1234f05e305961ef4fb4c : nvm-setup.exe
3421cb5abccb275687151a6ad3f7934eef746f9be179c2217ac71cf2ddd9d895 : setup.py
5f2e7a63a6337d2d295c6ea86faf567b68fe27bc9a985cf439c99c21d1530c62 : update_package.py