tis-nodejs20 icon

NodeJS 20

Paquet d’installation silencieuse pour NodeJS 20

20.5.1-5

  • package: tis-nodejs20
  • name: NodeJS 20
  • version: 20.5.1-5
  • categories: Development
  • maintainer: Kevin Guerineau
  • editor: OpenJS Foundation
  • licence: MIT
  • locale: all
  • target_os: debian-bookworm
  • architecture: x64
  • signature_date:
  • size: 30.34 Mo
  • homepage : https://nodejs.org/
  • conflicts :

package           : tis-nodejs20
version           : 20.5.1-5
architecture      : x64
section           : base
priority          : optional
name              : NodeJS 20
categories        : Development
maintainer        : Kevin Guerineau
description       : Node.js is an open source JavaScript software platform for highly concurrent, event-driven network applications that need to scale.
depends           : 
conflicts         : tis-nodejs14
maturity          : PROD
locale            : all
target_os         : debian-bookworm
min_wapt_version  : 2.2
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Node.js est une plateforme logicielle libre en JavaScript, orientée vers les applications réseau évènementielles hautement concurrentes qui doivent pouvoir monter en charge.
description_pl    : Node.js to platforma oprogramowania open-source JavaScript dla wysoce współbieżnych, sterowanych zdarzeniami aplikacji sieciowych, które muszą się skalować.
description_de    : Node.js ist eine freie Softwareplattform in JavaScript, die auf hochgradig konkurrierende ereignisgesteuerte Netzwerkanwendungen ausgerichtet ist, die skalierbar sein müssen.
description_es    : Node.js es una plataforma de software JavaScript de código abierto para aplicaciones de red altamente concurrentes y basadas en eventos que necesitan escalarse.
description_pt    : Node.js é uma plataforma de software JavaScript de código aberto para aplicações de rede altamente concorrentes, orientadas para eventos, que precisam de ser escaladas.
description_it    : Node.js è una piattaforma software open-source in JavaScript per applicazioni di rete altamente concorrenti e guidate dagli eventi che devono essere scalate.
description_nl    : Node.js is een open-source JavaScript-softwareplatform voor sterk gelijktijdige, event-driven netwerktoepassingen die geschaald moeten worden.
description_ru    : Node.js - это программная платформа JavaScript с открытым исходным кодом для высоко параллельных, управляемых событиями сетевых приложений, которые нуждаются в масштабировании.
audit_schedule    : 
editor            : OpenJS Foundation
keywords          : 
licence           : MIT
homepage          : https://nodejs.org/
package_uuid      : df50fe3a-16ae-400e-bfe9-311ebdb93093
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 23b5725227d528044c91ad531f1a07126e3e1ad3c238b533a41b40b141c79701
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-12-17T23:02:45.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         : iF9oA47ivDMDrsdpSN4AntPbNrrQu5dXcXOWbrnhQ/wjvQo/Rju5TMSg7ItfIvJYHZOQyK4b2Plmgieub/DaDcXJtjP35+7ajwZgLFv0qLYCTbtYsbRiCIMFewHtjzPG4iNV6yONkhLvsicXNsQfB42RQdBXddWVwzOdQ8O/gyoqsYTfEU6qWy5inIrEgHUvzrkEarDFLN/Hn4e8CsbgepAj1bPsnfXfG1zlhxEWmpOZ2FryhlCAKP+Zi2qFDDc1Wpi6OyvPmffznXkhTcqcqlKBcZCGJt1/wUYGzyi1JtZJgXfM7dYrRBti8JMSVrK66PaAPWYDukcYwu3tE9zAbQ==

# -*- coding: utf-8 -*-
from setuphelpers import *
import os

def install():
    run("LANG=C DEBIAN_FRONTEND=noninteractive apt-get install ./*.deb -y --allow-downgrades")
    if not os.path.islink("/usr/bin/nodejs"):
        os.symlink("/usr/bin/node", "/usr/bin/nodejs")


def uninstall():
    uninstall_apt('nodejs',autoremove=True)



# -*- coding: utf-8 -*-
from setuphelpers import *
import gzip
from io import BytesIO
from setuphelpers import Version,wgets
from setupdevhelpers import *
import requests

def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies_from_wapt_console()

    if not proxies:
        proxies = get_proxies()

    dict_arch = {"x64": "amd64"}

    urldepot = 'https://deb.nodesource.com/node_20.x'
    dist = control.target_os.split('-')[1]

    arch = dict_arch[control.architecture]
    package_name_list = ["nodejs"]

    if len(dist.split(' ')) < 2 :
        dist = dist + ' ' + "main"

    disturl = dist.replace(' ','/')

    with gzip.open(BytesIO(requests.get('%s/dists/%s/binary-%s/Packages.gz' % (urldepot,disturl,arch),proxies=proxies).content)) as f:
        data = f.read().decode('utf-8')

    list_package = listcontrol_to_dict_data(data,'\nPackage: ')
    all_dep=[]

    last_version= None
    list_deb = []
    for package_name in package_name_list :

        last_package = sorted([u for u in list_package if u['package'] == package_name], key=lambda p: (Version(p['version'].split(':',1)[-1].split('+')[0],4)), reverse=True)[0]
        if not last_version:
            last_version = last_package['version'].split(':',1)[-1].split('+')[0]

        all_dep.append(last_package)

        for s in last_package.get('depends','').split(','):
            for p in s.split('|'):
                get_all_dep_version_pacakge(list_package,p.split('(')[0].strip(),all_dep)

        for u in all_dep:
            list_deb.append(urldepot + '/' + u['filename'])

    list_all_file = []
    for f in list_deb:
        filename = f.split('/')[-1]
        list_all_file.append(filename)
        if not isfile(filename):
            wget(f,filename,proxies=proxies)

    for f in glob.glob('*.deb'):
        if not f in list_all_file:
            remove_file(f)

    control.set_software_version(str(Version(last_version,4)).split('-')[0])
    control.save_control_to_wapt()



def listcontrol_to_dict_data(data=None, first_entry=None):
    list_package = '\n' + data
    list_control=[]
    for i in list_package.split(first_entry):
        if not i.strip('\n'):
            continue
        list_control.append(first_entry.replace('\n','') + i)

    list_package = []
    for pkg in list_control:
        entry = {}
        gpg = False
        for l in pkg.split('\n'):

            if '-----BEGIN PGP PUBLIC KEY BLOCK-----' in l:
                gpg = True
                continue
            if '-----END PGP PUBLIC KEY BLOCK-----' in l:
                gpg = False
                continue
            if gpg :
                continue

            if not l:
                continue
            if (':' in l) and (not '::' in l) and (not l.startswith(' ')) :
                key = l.split(':',1)[0].strip().lower()
                value = l.split(':',1)[1].strip()
                entry[key] = value.strip('\n')
            else:
                entry[key] =  entry[key].strip('\n') + ' ' if entry[key].strip() else "" + l.strip()

        list_package.append(entry)
    return list_package

def get_all_dep_version_pacakge(list_package,package_name,all_dep):
    last_package = sorted([u for u in list_package if u['package'] == package_name], key=lambda p: (Version(p['version'].split(':',1)[-1].split('+')[0])), reverse=True)
    if last_package:
        last_package = last_package[0]
        all_dep.append(last_package)
    else:
        return
    for k in last_package.get('depends','').split('|'):
        for p in k.split(','):
            get_all_dep_version_pacakge(list_package,p.split('(')[0].strip(),all_dep)

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
563501c18c6adcd4e77a9c019438f92a96289455907d91164d02f87a8d6903c4 : WAPT/control
23b5725227d528044c91ad531f1a07126e3e1ad3c238b533a41b40b141c79701 : WAPT/icon.png
4f6c06baed111d85cf594e7ace85ebc53b6c551f2c401a976d5e3f0b53524f71 : luti.json
73458dd3d0d562f84e453a21801e9d2a5e08dd026f6409756371b92de6026828 : nodejs_20.5.1-deb-1nodesource1_amd64.deb
b5fc2ce4ca6cea0e0c61188d593fc34c7b62915e0d5c05624b0f444a52224c33 : setup.py
021a8406e9b284a6f9d2206e261f59e584f17fe74fcc655a5cf4ee0225e1b61c : update_package.py